get_netwm_icon clean up.
[lxde/lxpanel.git] / src / panel.h
CommitLineData
a52c2257
HJYP
1#ifndef PANEL_H
2#define PANEL_H
3
4
5#include <X11/Xlib.h>
6#include <gtk/gtk.h>
7#include <gdk/gdk.h>
8
9#include "config.h"
10
11#include "bg.h"
12#include "ev.h"
13
14enum { ALLIGN_NONE, ALLIGN_LEFT, ALLIGN_CENTER, ALLIGN_RIGHT };
15enum { EDGE_NONE, EDGE_LEFT, EDGE_RIGHT, EDGE_TOP, EDGE_BOTTOM };
16enum { WIDTH_NONE, WIDTH_REQUEST, WIDTH_PIXEL, WIDTH_PERCENT };
17enum { HEIGHT_NONE, HEIGHT_PIXEL, HEIGHT_REQUEST };
a97d06a6
HJYP
18enum {
19 ORIENT_NONE = -1,
20 ORIENT_VERT = GTK_ORIENTATION_VERTICAL,
21 ORIENT_HORIZ = GTK_ORIENTATION_HORIZONTAL
22};
a52c2257
HJYP
23enum { POS_NONE, POS_START, POS_END };
24
25#define PANEL_HEIGHT_DEFAULT 26
26#define PANEL_HEIGHT_MAX 200
27#define PANEL_HEIGHT_MIN 16
28
29
30typedef struct {
31
32 GtkWidget *topgwin; /* main panel window */
33 Window topxwin; /* and it X window */
a97d06a6 34 GtkWidget *box; /* primary layout box which contains all plugins */
a52c2257 35 GtkWidget *bbox; /* backgound box for box */
a52c2257
HJYP
36 GtkRequisition requisition;
37 GtkWidget *(*my_box_new) (gboolean, gint);
38 GtkWidget *(*my_separator_new) ();
39
40 FbBg *bg;
41 int alpha;
42 guint32 tintcolor;
43 GdkColor gtintcolor;
bee4c26e 44
a52c2257
HJYP
45 int ax, ay, aw, ah; /* prefferd allocation of a panel */
46 int cx, cy, cw, ch; /* current allocation (as reported by configure event) allocation */
47 int allign, edge, margin;
48 int orientation;
49 int widthtype, width;
50 int heighttype, height;
51
52 int self_destroy : 1;
53 int setdocktype : 1;
54 int setstrut : 1;
55 int round_corners : 1;
56 int transparent : 1;
57 int spacing;
bee4c26e 58
a52c2257
HJYP
59 int desknum;
60 int curdesk;
61 guint32 *workarea;
62 int wa_len;
63
389975e0
HJYP
64 char* logout_command;
65
a52c2257
HJYP
66 int plug_num;
67 GList *plugins;
e996608e
HJYP
68
69 gpointer system_menu;
a52c2257
HJYP
70} panel;
71
72
bee4c26e 73typedef struct {
a52c2257
HJYP
74 unsigned int modal : 1;
75 unsigned int sticky : 1;
76 unsigned int maximized_vert : 1;
77 unsigned int maximized_horz : 1;
78 unsigned int shaded : 1;
79 unsigned int skip_taskbar : 1;
80 unsigned int skip_pager : 1;
81 unsigned int hidden : 1;
82 unsigned int fullscreen : 1;
83 unsigned int above : 1;
84 unsigned int below : 1;
85} net_wm_state;
86
bee4c26e 87typedef struct {
a52c2257
HJYP
88 unsigned int desktop : 1;
89 unsigned int dock : 1;
90 unsigned int toolbar : 1;
91 unsigned int menu : 1;
92 unsigned int utility : 1;
93 unsigned int splash : 1;
94 unsigned int dialog : 1;
95 unsigned int normal : 1;
96} net_wm_window_type;
97
98typedef struct {
99 char *name;
08ea5341 100 char *disp_name;
a52c2257
HJYP
101 void (*cmd)(void);
102} command;
103
104extern command commands[];
105
106extern gchar *cprofile;
107
108extern Atom a_UTF8_STRING;
109extern Atom a_XROOTPMAP_ID;
110
111extern Atom a_WM_STATE;
112extern Atom a_WM_CLASS;
113extern Atom a_WM_DELETE_WINDOW;
114extern Atom a_WM_PROTOCOLS;
115extern Atom a_NET_WORKAREA;
116extern Atom a_NET_CLIENT_LIST;
117extern Atom a_NET_CLIENT_LIST_STACKING;
118extern Atom a_NET_NUMBER_OF_DESKTOPS;
119extern Atom a_NET_CURRENT_DESKTOP;
120extern Atom a_NET_DESKTOP_NAMES;
121extern Atom a_NET_ACTIVE_WINDOW;
122extern Atom a_NET_CLOSE_WINDOW;
123extern Atom a_NET_SUPPORTED;
124extern Atom a_NET_WM_STATE;
125extern Atom a_NET_WM_STATE_SKIP_TASKBAR;
126extern Atom a_NET_WM_STATE_SKIP_PAGER;
127extern Atom a_NET_WM_STATE_STICKY;
128extern Atom a_NET_WM_STATE_HIDDEN;
129extern Atom a_NET_WM_STATE_SHADED;
130
131#define a_NET_WM_STATE_REMOVE 0 /* remove/unset property */
132#define a_NET_WM_STATE_ADD 1 /* add/set property */
133#define a_NET_WM_STATE_TOGGLE 2 /* toggle property */
134
135extern Atom a_NET_WM_WINDOW_TYPE;
136extern Atom a_NET_WM_WINDOW_TYPE_DESKTOP;
137extern Atom a_NET_WM_WINDOW_TYPE_DOCK;
138extern Atom a_NET_WM_WINDOW_TYPE_TOOLBAR;
139extern Atom a_NET_WM_WINDOW_TYPE_MENU;
140extern Atom a_NET_WM_WINDOW_TYPE_UTILITY;
141extern Atom a_NET_WM_WINDOW_TYPE_SPLASH;
142extern Atom a_NET_WM_WINDOW_TYPE_DIALOG;
143extern Atom a_NET_WM_WINDOW_TYPE_NORMAL;
bee4c26e 144
a52c2257
HJYP
145extern Atom a_NET_WM_DESKTOP;
146extern Atom a_NET_WM_NAME;
147extern Atom a_NET_WM_VISIBLE_NAME;
148extern Atom a_NET_WM_STRUT;
149extern Atom a_NET_WM_STRUT_PARTIAL;
150extern Atom a_NET_WM_ICON;
151extern Atom a_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR;
152
77886b88 153extern Atom a_LXPANEL_CMD; /* for private client message */
a52c2257
HJYP
154
155extern int verbose;
156
157extern FbEv *fbev;
158
159#define FBPANEL_WIN(win) gdk_window_lookup(win)
160
bee4c26e
HJYP
161void panel_set_wm_strut(panel *p);
162void panel_set_dock_type(panel *p);
a97d06a6 163void panel_set_orientation(panel *p);
bee4c26e 164
a52c2257 165#endif