Support desktop entry in launchbar.
[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 };
18enum { ORIENT_NONE, ORIENT_VERT, ORIENT_HORIZ };
19enum { POS_NONE, POS_START, POS_END };
20
21#define PANEL_HEIGHT_DEFAULT 26
22#define PANEL_HEIGHT_MAX 200
23#define PANEL_HEIGHT_MIN 16
24
25
26typedef struct {
27
28 GtkWidget *topgwin; /* main panel window */
29 Window topxwin; /* and it X window */
30 GtkWidget *lbox; /* primary layout box */
31 GtkWidget *bbox; /* backgound box for box */
32 GtkWidget *box; /* box that contains all plugins */
33 GtkRequisition requisition;
34 GtkWidget *(*my_box_new) (gboolean, gint);
35 GtkWidget *(*my_separator_new) ();
36
37 FbBg *bg;
38 int alpha;
39 guint32 tintcolor;
40 GdkColor gtintcolor;
41
42 int ax, ay, aw, ah; /* prefferd allocation of a panel */
43 int cx, cy, cw, ch; /* current allocation (as reported by configure event) allocation */
44 int allign, edge, margin;
45 int orientation;
46 int widthtype, width;
47 int heighttype, height;
48
49 int self_destroy : 1;
50 int setdocktype : 1;
51 int setstrut : 1;
52 int round_corners : 1;
53 int transparent : 1;
54 int spacing;
55
56 int desknum;
57 int curdesk;
58 guint32 *workarea;
59 int wa_len;
60
61 int plug_num;
62 GList *plugins;
63
64} panel;
65
66
67typedef struct {
68 unsigned int modal : 1;
69 unsigned int sticky : 1;
70 unsigned int maximized_vert : 1;
71 unsigned int maximized_horz : 1;
72 unsigned int shaded : 1;
73 unsigned int skip_taskbar : 1;
74 unsigned int skip_pager : 1;
75 unsigned int hidden : 1;
76 unsigned int fullscreen : 1;
77 unsigned int above : 1;
78 unsigned int below : 1;
79} net_wm_state;
80
81typedef struct {
82 unsigned int desktop : 1;
83 unsigned int dock : 1;
84 unsigned int toolbar : 1;
85 unsigned int menu : 1;
86 unsigned int utility : 1;
87 unsigned int splash : 1;
88 unsigned int dialog : 1;
89 unsigned int normal : 1;
90} net_wm_window_type;
91
92typedef struct {
93 char *name;
08ea5341 94 char *disp_name;
a52c2257
HJYP
95 void (*cmd)(void);
96} command;
97
98extern command commands[];
99
100extern gchar *cprofile;
101
102extern Atom a_UTF8_STRING;
103extern Atom a_XROOTPMAP_ID;
104
105extern Atom a_WM_STATE;
106extern Atom a_WM_CLASS;
107extern Atom a_WM_DELETE_WINDOW;
108extern Atom a_WM_PROTOCOLS;
109extern Atom a_NET_WORKAREA;
110extern Atom a_NET_CLIENT_LIST;
111extern Atom a_NET_CLIENT_LIST_STACKING;
112extern Atom a_NET_NUMBER_OF_DESKTOPS;
113extern Atom a_NET_CURRENT_DESKTOP;
114extern Atom a_NET_DESKTOP_NAMES;
115extern Atom a_NET_ACTIVE_WINDOW;
116extern Atom a_NET_CLOSE_WINDOW;
117extern Atom a_NET_SUPPORTED;
118extern Atom a_NET_WM_STATE;
119extern Atom a_NET_WM_STATE_SKIP_TASKBAR;
120extern Atom a_NET_WM_STATE_SKIP_PAGER;
121extern Atom a_NET_WM_STATE_STICKY;
122extern Atom a_NET_WM_STATE_HIDDEN;
123extern Atom a_NET_WM_STATE_SHADED;
124
125#define a_NET_WM_STATE_REMOVE 0 /* remove/unset property */
126#define a_NET_WM_STATE_ADD 1 /* add/set property */
127#define a_NET_WM_STATE_TOGGLE 2 /* toggle property */
128
129extern Atom a_NET_WM_WINDOW_TYPE;
130extern Atom a_NET_WM_WINDOW_TYPE_DESKTOP;
131extern Atom a_NET_WM_WINDOW_TYPE_DOCK;
132extern Atom a_NET_WM_WINDOW_TYPE_TOOLBAR;
133extern Atom a_NET_WM_WINDOW_TYPE_MENU;
134extern Atom a_NET_WM_WINDOW_TYPE_UTILITY;
135extern Atom a_NET_WM_WINDOW_TYPE_SPLASH;
136extern Atom a_NET_WM_WINDOW_TYPE_DIALOG;
137extern Atom a_NET_WM_WINDOW_TYPE_NORMAL;
138
139extern Atom a_NET_WM_DESKTOP;
140extern Atom a_NET_WM_NAME;
141extern Atom a_NET_WM_VISIBLE_NAME;
142extern Atom a_NET_WM_STRUT;
143extern Atom a_NET_WM_STRUT_PARTIAL;
144extern Atom a_NET_WM_ICON;
145extern Atom a_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR;
146
147
148extern int verbose;
149
150extern FbEv *fbev;
151
152#define FBPANEL_WIN(win) gdk_window_lookup(win)
153
154#endif