1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 #ifndef _XlwMenuP_h
22 #define _XlwMenuP_h
23
24 #include "xlwmenu.h"
25 #include <X11/CoreP.h>
26 #if defined USE_CAIRO || defined HAVE_XFT
27 #ifdef USE_CAIRO
28 #include "lwlib-utils.h"
29 #else
30 #include <X11/Xft/Xft.h>
31 #endif
32 #endif
33
34
35 typedef struct _window_state
36 {
37 Widget w;
38 Window window;
39 Pixmap pixmap;
40 Position x;
41 Position y;
42 Dimension width;
43 Dimension height;
44 Dimension label_width;
45 int max_rest_width;
46
47
48 Dimension button_width;
49 #if defined USE_CAIRO || defined HAVE_XFT
50 XftDraw* xft_draw;
51 #endif
52 } window_state;
53
54
55
56 typedef struct _XlwMenu_part
57 {
58
59 #ifdef HAVE_X_I18N
60 XFontSet fontSet;
61 XFontSetExtents *font_extents;
62 #endif
63 #if defined USE_CAIRO || defined HAVE_XFT
64 int default_face;
65 XftFont* xft_font;
66 XftColor xft_fg, xft_bg, xft_disabled_fg, xft_highlight_fg;
67 #endif
68 String fontName;
69 XFontStruct* font;
70 Pixel foreground;
71 Pixel disabled_foreground;
72 Pixel button_foreground;
73 Pixel highlight_foreground;
74 Pixel highlight_background;
75 Dimension margin;
76 Dimension horizontal_spacing;
77 Dimension vertical_spacing;
78 Dimension arrow_spacing;
79 Dimension shadow_thickness;
80 Dimension border_thickness;
81 Pixel top_shadow_color;
82 Pixel bottom_shadow_color;
83 Pixmap top_shadow_pixmap;
84 Pixmap bottom_shadow_pixmap;
85 Pixel top_highlight_shadow_color;
86 Pixel bottom_highlight_shadow_color;
87 Pixmap top_highlight_shadow_pixmap;
88 Pixmap bottom_highlight_shadow_pixmap;
89 Cursor cursor_shape;
90 XtCallbackList open;
91 XtCallbackList select, highlight;
92 XtCallbackList enter, leave;
93 widget_value* contents;
94 int horizontal;
95
96
97 Boolean free_top_shadow_color_p;
98 Boolean free_bottom_shadow_color_p;
99 Boolean free_top_highlight_shadow_color_p;
100 Boolean free_bottom_highlight_shadow_color_p;
101
102
103 int top_depth;
104 int old_depth;
105 widget_value** old_stack;
106 int old_stack_length;
107 widget_value* inside_entry;
108
109
110 int new_depth;
111 widget_value** new_stack;
112 int new_stack_length;
113
114
115 window_state* windows;
116 int windows_length;
117
118
119 GC foreground_gc;
120 GC button_gc;
121 GC background_gc;
122 GC disabled_gc;
123 GC highlight_foreground_gc;
124 GC highlight_background_gc;
125 GC inactive_button_gc;
126 GC shadow_top_gc;
127 GC shadow_bottom_gc;
128 GC highlight_shadow_top_gc;
129 GC highlight_shadow_bottom_gc;
130 Cursor cursor;
131 Boolean popped_up;
132 Pixmap gray_pixmap;
133 } XlwMenuPart;
134
135
136 typedef struct _XlwMenuRec
137 {
138 CorePart core;
139 XlwMenuPart menu;
140 } XlwMenuRec;
141
142
143 typedef struct
144 {
145 int dummy;
146 } XlwMenuClassPart;
147
148
149 typedef struct _XlwMenuClassRec
150 {
151 CoreClassPart core_class;
152 XlwMenuClassPart menu_class;
153 } XlwMenuClassRec;
154
155
156 extern XlwMenuClassRec xlwMenuClassRec;
157
158 #endif