1 #ifndef __engine_openbox_h
2 #define __engine_openbox_h
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"
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 + \
14 #define BUTTON_SIZE (LABEL_HEIGHT - 2)
15 #define GRIP_WIDTH (BUTTON_SIZE * 2)
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
;
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
;
30 extern int ob_s_winfont_height
;
31 extern int ob_s_winfont_shadow
;
32 extern int ob_s_winfont_shadow_offset
;
33 extern ObFont
*ob_s_winfont
;
35 extern pixmap_mask
*ob_s_max_pressed_mask
;
36 extern pixmap_mask
*ob_s_max_unpressed_mask
;
37 extern pixmap_mask
*ob_s_iconify_pressed_mask
;
38 extern pixmap_mask
*ob_s_iconify_unpressed_mask
;
39 extern pixmap_mask
*ob_s_desk_pressed_mask
;
40 extern pixmap_mask
*ob_s_desk_unpressed_mask
;
41 extern pixmap_mask
*ob_s_close_pressed_mask
;
42 extern pixmap_mask
*ob_s_close_unpressed_mask
;
44 extern Appearance
*ob_a_focused_unpressed_max
;
45 extern Appearance
*ob_a_focused_pressed_max
;
46 extern Appearance
*ob_a_unfocused_unpressed_max
;
47 extern Appearance
*ob_a_unfocused_pressed_max
;
48 extern Appearance
*ob_a_focused_unpressed_close
;
49 extern Appearance
*ob_a_focused_pressed_close
;
50 extern Appearance
*ob_a_unfocused_unpressed_close
;
51 extern Appearance
*ob_a_unfocused_pressed_close
;
52 extern Appearance
*ob_a_focused_unpressed_desk
;
53 extern Appearance
*ob_a_focused_pressed_desk
;
54 extern Appearance
*ob_a_unfocused_unpressed_desk
;
55 extern Appearance
*ob_a_unfocused_pressed_desk
;
56 extern Appearance
*ob_a_focused_unpressed_iconify
;
57 extern Appearance
*ob_a_focused_pressed_iconify
;
58 extern Appearance
*ob_a_unfocused_unpressed_iconify
;
59 extern Appearance
*ob_a_unfocused_pressed_iconify
;
60 extern Appearance
*ob_a_focused_grip
;
61 extern Appearance
*ob_a_unfocused_grip
;
62 extern Appearance
*ob_a_focused_title
;
63 extern Appearance
*ob_a_unfocused_title
;
64 extern Appearance
*ob_a_focused_label
;
65 extern Appearance
*ob_a_unfocused_label
;
66 extern Appearance
*ob_a_icon
;
67 extern Appearance
*ob_a_focused_handle
;
68 extern Appearance
*ob_a_unfocused_handle
;
70 typedef struct ObFrame
{
84 Appearance
*a_unfocused_title
;
85 Appearance
*a_focused_title
;
86 Appearance
*a_unfocused_label
;
87 Appearance
*a_focused_label
;
89 Appearance
*a_unfocused_handle
;
90 Appearance
*a_focused_handle
;
96 int width
; /* title and handle */
98 int icon_x
; /* x-position of the window icon button */
99 int label_x
; /* x-position of the window title */
100 int iconify_x
; /* x-position of the window iconify button */
101 int desk_x
; /* x-position of the window all-desktops button */
102 int max_x
; /* x-position of the window maximize button */
103 int close_x
; /* x-position of the window close button */
104 int bwidth
; /* border width */
105 int cbwidth
; /* client border width */
108 gboolean close_press
;
110 gboolean iconify_press
;