Support desktop entry in launchbar.
[lxde/lxpanel.git] / src / misc.h
CommitLineData
a52c2257
HJYP
1#ifndef MISC_H
2#define MISC_H
3
4#include <X11/Xatom.h>
5#include <gtk/gtk.h>
6#include <gdk/gdk.h>
7#include <gdk/gdkx.h>
8#include <stdio.h>
9
10#include "panel.h"
11
12enum { LINE_NONE, LINE_BLOCK_START, LINE_BLOCK_END, LINE_VAR };
13
14typedef struct {
15 int num, len, type;
16 gchar str[256];
17 gchar *t[3];
18} line;
19
20
21typedef struct {
22 int num;
23 gchar *str;
24} pair;
25
26extern pair allign_pair[];
27extern pair edge_pair[];
28extern pair width_pair[];
29extern pair height_pair[];
30extern pair bool_pair[];
31extern pair pos_pair[];
32
33int str2num(pair *p, gchar *str, int defval);
34gchar *num2str(pair *p, int num, gchar *defval);
35extern int get_line(FILE *fp, line *s);
36int get_line_as_is(FILE *fp, line *s);
37
38void Xclimsg(Window win, long type, long l0, long l1, long l2, long l3, long l4);
39void Xclimsgwm(Window win, Atom type, Atom arg);
40void *get_xaproperty (Window win, Atom prop, Atom type, int *nitems);
41char *get_textproperty(Window win, Atom prop);
42void *get_utf8_property(Window win, Atom atom);
43char **get_utf8_property_list(Window win, Atom atom, int *count);
44
45void resolve_atoms();
46//Window Select_Window(Display *dpy);
47int get_net_number_of_desktops();
48int get_net_current_desktop ();
49int get_net_wm_desktop(Window win);
50int get_wm_state (Window win);
51void get_net_wm_state(Window win, net_wm_state *nws);
52void get_net_wm_window_type(Window win, net_wm_window_type *nwwt);
53
54void calculate_position(panel *np);
55gchar *expand_tilda(gchar *file);
56GdkPixbuf *gdk_pixbuf_scale_ratio(GdkPixbuf *p, int width, int height, GdkInterpType itype,
57 gboolean keep_ratio);
58GtkWidget *gtk_image_new_from_file_scaled(const gchar *file, gint width, gint height,
59 gboolean keep_ratio);
60void get_button_spacing(GtkRequisition *req, GtkContainer *parent, gchar *name);
61guint32 gcolor2rgb24(GdkColor *color);
62GtkWidget *fb_button_new_from_file(gchar *fname, int width, int height, gulong hicolor,
63 gboolean keep_ratio);
64GtkWidget *fb_button_new_from_file_with_label(gchar *fname, int width, int height,
65 gulong hicolor, gboolean keep_ratio, gchar *label);
08ea5341
HJYP
66
67char* translate_exec_to_cmd( const char* exec, const char* icon,
68 const char* title, const char* fpath );
a52c2257 69#endif