]> icculus.org git repositories - mikachu/openbox.git/blob - engines/openbox/obengine.h
create a generic tokenizer/sectionizer for the config file. pass off the token to...
[mikachu/openbox.git] / engines / openbox / obengine.h
1 #ifndef __engine_openbox_h
2 #define __engine_openbox_h
3
4 #include "../../kernel/frame.h"
5 #include "../../render/render.h"
6 #include "../../render/color.h"
7 #include "../../render/font.h"
8 #include "../../render/mask.h"
9
10 #define LABEL_HEIGHT    (ob_s_winfont_height + 2)
11 #define TITLE_HEIGHT    (LABEL_HEIGHT + ob_s_bevel * 2)
12 #define HANDLE_Y(f)     (f->innersize.top + f->frame.client->area.height + \
13                          f->cbwidth)
14 #define BUTTON_SIZE     (LABEL_HEIGHT - 2)
15 #define GRIP_WIDTH      (BUTTON_SIZE * 2)
16
17 extern int ob_s_bevel;
18 extern int ob_s_handle_height;
19 extern int ob_s_bwidth;
20 extern int ob_s_cbwidth;
21
22 extern color_rgb *ob_s_b_color;
23 extern color_rgb *ob_s_cb_focused_color;
24 extern color_rgb *ob_s_cb_unfocused_color;
25 extern color_rgb *ob_s_title_focused_color;
26 extern color_rgb *ob_s_title_unfocused_color;
27 extern color_rgb *ob_s_titlebut_focused_color;
28 extern color_rgb *ob_s_titlebut_unfocused_color;
29
30 extern int ob_s_winfont_height;
31 extern int ob_s_winfont_shadow;
32 extern int ob_s_winfont_shadow_offset;
33 extern int ob_s_winfont_shadow_tint;
34 extern ObFont *ob_s_winfont;
35
36 extern pixmap_mask *ob_s_max_set_mask;
37 extern pixmap_mask *ob_s_max_unset_mask;
38 extern pixmap_mask *ob_s_iconify_mask;
39 extern pixmap_mask *ob_s_desk_set_mask;
40 extern pixmap_mask *ob_s_desk_unset_mask;
41 extern pixmap_mask *ob_s_shade_set_mask;
42 extern pixmap_mask *ob_s_shade_unset_mask;
43 extern pixmap_mask *ob_s_close_mask;
44
45 extern Appearance *ob_a_focused_unpressed_max;
46 extern Appearance *ob_a_focused_pressed_max;
47 extern Appearance *ob_a_focused_pressed_set_max;
48 extern Appearance *ob_a_unfocused_unpressed_max;
49 extern Appearance *ob_a_unfocused_pressed_max;
50 extern Appearance *ob_a_unfocused_pressed_set_max;
51 extern Appearance *ob_a_focused_unpressed_close;
52 extern Appearance *ob_a_focused_pressed_close;
53 extern Appearance *ob_a_unfocused_unpressed_close;
54 extern Appearance *ob_a_unfocused_pressed_close;
55 extern Appearance *ob_a_focused_unpressed_desk;
56 extern Appearance *ob_a_focused_pressed_desk;
57 extern Appearance *ob_a_focused_pressed_set_desk;
58 extern Appearance *ob_a_unfocused_unpressed_desk;
59 extern Appearance *ob_a_unfocused_pressed_desk;
60 extern Appearance *ob_a_unfocused_pressed_set_desk;
61 extern Appearance *ob_a_focused_unpressed_shade;
62 extern Appearance *ob_a_focused_pressed_shade;
63 extern Appearance *ob_a_focused_pressed_set_shade;
64 extern Appearance *ob_a_unfocused_unpressed_shade;
65 extern Appearance *ob_a_unfocused_pressed_shade;
66 extern Appearance *ob_a_unfocused_pressed_set_shade;
67 extern Appearance *ob_a_focused_unpressed_iconify;
68 extern Appearance *ob_a_focused_pressed_iconify;
69 extern Appearance *ob_a_unfocused_unpressed_iconify;
70 extern Appearance *ob_a_unfocused_pressed_iconify;
71 extern Appearance *ob_a_focused_grip;
72 extern Appearance *ob_a_unfocused_grip;
73 extern Appearance *ob_a_focused_title;
74 extern Appearance *ob_a_unfocused_title;
75 extern Appearance *ob_a_focused_label;
76 extern Appearance *ob_a_unfocused_label;
77 extern Appearance *ob_a_icon;
78 extern Appearance *ob_a_focused_handle;
79 extern Appearance *ob_a_unfocused_handle;
80
81 typedef struct ObFrame {
82     Frame frame;
83
84     Window title;
85     Window label;
86     Window max;
87     Window close;
88     Window desk;
89     Window shade;
90     Window icon;
91     Window iconify;
92     Window handle;
93     Window lgrip;
94     Window rgrip;
95
96     Appearance *a_unfocused_title;
97     Appearance *a_focused_title;
98     Appearance *a_unfocused_label;
99     Appearance *a_focused_label;
100     Appearance *a_icon;
101     Appearance *a_unfocused_handle;
102     Appearance *a_focused_handle;
103
104     Strut  innersize;
105
106     GSList *clients;
107
108     int width; /* title and handle */
109     int label_width;
110     int icon_x;        /* x-position of the window icon button */
111     int label_x;       /* x-position of the window title */
112     int iconify_x;     /* x-position of the window iconify button */
113     int desk_x;         /* x-position of the window all-desktops button */
114     int shade_x;         /* x-position of the window shade button */
115     int max_x;         /* x-position of the window maximize button */
116     int close_x;       /* x-position of the window close button */
117     int bwidth;        /* border width */
118     int cbwidth;       /* client border width */
119
120     gboolean max_press;
121     gboolean close_press;
122     gboolean desk_press;
123     gboolean shade_press;
124     gboolean iconify_press;
125 } ObFrame;
126
127 #endif