blob: df6cdbcd3e7ee3f2301f310f2643e08eae52cf0b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
#ifndef __engine_openbox_h
#define __engine_openbox_h
#include "../../kernel/frame.h"
#include "../../render/render.h"
#include "../../render/color.h"
#include "../../render/font.h"
#include "../../render/mask.h"
#define LABEL_HEIGHT (ob_s_winfont_height + 2)
#define TITLE_HEIGHT (LABEL_HEIGHT + ob_s_bevel * 2)
#define HANDLE_Y(f) (f->innersize.top + f->frame.client->area.height + \
f->cbwidth)
#define BUTTON_SIZE (LABEL_HEIGHT - 2)
#define GRIP_WIDTH (BUTTON_SIZE * 2)
extern int ob_s_bevel;
extern int ob_s_handle_height;
extern int ob_s_bwidth;
extern int ob_s_cbwidth;
extern color_rgb *ob_s_b_color;
extern color_rgb *ob_s_cb_focused_color;
extern color_rgb *ob_s_cb_unfocused_color;
extern color_rgb *ob_s_title_focused_color;
extern color_rgb *ob_s_title_unfocused_color;
extern color_rgb *ob_s_titlebut_focused_color;
extern color_rgb *ob_s_titlebut_unfocused_color;
extern int ob_s_winfont_height;
extern int ob_s_winfont_shadow;
extern int ob_s_winfont_shadow_offset;
extern ObFont *ob_s_winfont;
extern pixmap_mask *ob_s_max_mask;
extern pixmap_mask *ob_s_icon_mask;
extern pixmap_mask *ob_s_desk_mask;
extern pixmap_mask *ob_s_close_mask;
extern Appearance *ob_a_focused_unpressed_max;
extern Appearance *ob_a_focused_pressed_max;
extern Appearance *ob_a_unfocused_unpressed_max;
extern Appearance *ob_a_unfocused_pressed_max;
extern Appearance *ob_a_focused_unpressed_close;
extern Appearance *ob_a_focused_pressed_close;
extern Appearance *ob_a_unfocused_unpressed_close;
extern Appearance *ob_a_unfocused_pressed_close;
extern Appearance *ob_a_focused_unpressed_desk;
extern Appearance *ob_a_focused_pressed_desk;
extern Appearance *ob_a_unfocused_unpressed_desk;
extern Appearance *ob_a_unfocused_pressed_desk;
extern Appearance *ob_a_focused_unpressed_iconify;
extern Appearance *ob_a_focused_pressed_iconify;
extern Appearance *ob_a_unfocused_unpressed_iconify;
extern Appearance *ob_a_unfocused_pressed_iconify;
extern Appearance *ob_a_focused_grip;
extern Appearance *ob_a_unfocused_grip;
extern Appearance *ob_a_focused_title;
extern Appearance *ob_a_unfocused_title;
extern Appearance *ob_a_focused_label;
extern Appearance *ob_a_unfocused_label;
extern Appearance *ob_a_icon;
extern Appearance *ob_a_focused_handle;
extern Appearance *ob_a_unfocused_handle;
typedef struct ObFrame {
Frame frame;
Window title;
Window label;
Window max;
Window close;
Window desk;
Window icon;
Window iconify;
Window handle;
Window lgrip;
Window rgrip;
Appearance *a_unfocused_title;
Appearance *a_focused_title;
Appearance *a_unfocused_label;
Appearance *a_focused_label;
Appearance *a_icon;
Appearance *a_unfocused_handle;
Appearance *a_focused_handle;
Strut innersize;
GSList *clients;
int width; /* title and handle */
int label_width;
int icon_x; /* x-position of the window icon button */
int label_x; /* x-position of the window title */
int iconify_x; /* x-position of the window iconify button */
int desk_x; /* x-position of the window all-desktops button */
int max_x; /* x-position of the window maximize button */
int close_x; /* x-position of the window close button */
int bwidth; /* border width */
int cbwidth; /* client border width */
gboolean max_press;
gboolean close_press;
gboolean desk_press;
gboolean iconify_press;
} ObFrame;
#endif
|