various fixes to MidiRegionView selection handling, key handling, drawing of ghost...
[ardour2.git] / libs / clearlooks-newer / clearlooks_types.h
blob7caf8a3208d37a8d79ccb0e2cb5d19bb15b3a2bf
1 #ifndef CLEARLOOKS_TYPES_H
2 #define CLEARLOOKS_TYPES_H
4 #include <ge-support.h>
6 typedef unsigned char boolean;
7 typedef unsigned char uint8;
8 typedef struct _ClearlooksStyleFunctions ClearlooksStyleFunctions;
10 typedef enum
12 CL_STYLE_CLASSIC = 0,
13 CL_STYLE_GLOSSY = 1,
14 CL_STYLE_INVERTED = 2,
15 CL_STYLE_GUMMY = 3,
16 CL_NUM_STYLES = 4
17 } ClearlooksStyles;
20 typedef enum
22 CL_STATE_NORMAL,
23 CL_STATE_ACTIVE,
24 CL_STATE_SELECTED,
25 CL_STATE_INSENSITIVE
26 } ClearlooksStateType;
28 typedef enum
30 CL_JUNCTION_NONE = 0,
31 CL_JUNCTION_BEGIN = 1,
32 CL_JUNCTION_END = 2
33 } ClearlooksJunction;
35 typedef enum
37 CL_STEPPER_UNKNOWN = 0,
38 CL_STEPPER_A = 1,
39 CL_STEPPER_B = 2,
40 CL_STEPPER_C = 4,
41 CL_STEPPER_D = 8
42 } ClearlooksStepper;
44 typedef enum
46 CL_ORDER_FIRST,
47 CL_ORDER_MIDDLE,
48 CL_ORDER_LAST
49 } ClearlooksOrder;
51 typedef enum
53 CL_ORIENTATION_LEFT_TO_RIGHT,
54 CL_ORIENTATION_RIGHT_TO_LEFT,
55 CL_ORIENTATION_BOTTOM_TO_TOP,
56 CL_ORIENTATION_TOP_TO_BOTTOM
57 } ClearlooksOrientation;
59 typedef enum
61 CL_GAP_LEFT,
62 CL_GAP_RIGHT,
63 CL_GAP_TOP,
64 CL_GAP_BOTTOM
65 } ClearlooksGapSide;
67 typedef enum
69 CL_SHADOW_NONE,
70 CL_SHADOW_IN,
71 CL_SHADOW_OUT,
72 CL_SHADOW_ETCHED_IN,
73 CL_SHADOW_ETCHED_OUT
74 } ClearlooksShadowType;
76 typedef enum
78 CL_HANDLE_TOOLBAR,
79 CL_HANDLE_SPLITTER
80 } ClearlooksHandleType;
82 typedef enum
84 CL_ARROW_NORMAL,
85 CL_ARROW_COMBO
86 } ClearlooksArrowType;
88 typedef enum
90 CL_DIRECTION_UP,
91 CL_DIRECTION_DOWN,
92 CL_DIRECTION_LEFT,
93 CL_DIRECTION_RIGHT
94 } ClearlooksDirection;
96 typedef enum
98 CL_PROGRESSBAR_CONTINUOUS,
99 CL_PROGRESSBAR_DISCRETE
100 } ClearlooksProgressBarStyle;
102 typedef enum
104 CL_WINDOW_EDGE_NORTH_WEST,
105 CL_WINDOW_EDGE_NORTH,
106 CL_WINDOW_EDGE_NORTH_EAST,
107 CL_WINDOW_EDGE_WEST,
108 CL_WINDOW_EDGE_EAST,
109 CL_WINDOW_EDGE_SOUTH_WEST,
110 CL_WINDOW_EDGE_SOUTH,
111 CL_WINDOW_EDGE_SOUTH_EAST
112 } ClearlooksWindowEdge;
114 typedef struct
116 double x;
117 double y;
118 double width;
119 double height;
120 } ClearlooksRectangle;
122 typedef struct
124 CairoColor fg[5];
125 CairoColor bg[5];
126 CairoColor base[5];
127 CairoColor text[5];
129 CairoColor shade[9];
130 CairoColor spot[3];
131 } ClearlooksColors;
133 typedef struct
135 boolean active;
136 boolean prelight;
137 boolean disabled;
138 boolean focus;
139 boolean is_default;
140 boolean ltr;
141 boolean enable_glow;
143 gfloat radius;
145 ClearlooksStateType state_type;
147 uint8 corners;
148 uint8 xthickness;
149 uint8 ythickness;
151 CairoColor parentbg;
153 ClearlooksStyleFunctions *style_functions;
154 } WidgetParameters;
156 typedef struct
158 boolean lower;
159 boolean horizontal;
160 boolean fill_level;
161 } SliderParameters;
163 typedef struct
165 ClearlooksOrientation orientation;
166 boolean pulsing;
167 float value;
168 } ProgressBarParameters;
170 typedef struct
172 int linepos;
173 } OptionMenuParameters;
175 typedef struct
177 ClearlooksShadowType shadow;
178 ClearlooksGapSide gap_side;
179 int gap_x;
180 int gap_width;
181 const CairoColor *border; /* maybe changes this to some other hint ... */
182 } FrameParameters;
184 typedef struct
186 ClearlooksGapSide gap_side;
187 } TabParameters;
189 typedef struct
191 CairoCorners corners;
192 ClearlooksShadowType shadow;
193 } ShadowParameters;
195 typedef struct
197 boolean horizontal;
198 } SeparatorParameters;
200 typedef struct
202 ClearlooksOrder order; /* XXX: rename to position */
203 boolean resizable;
204 } ListViewHeaderParameters;
206 typedef struct
208 CairoColor color;
209 ClearlooksJunction junction; /* On which sides the slider junctions */
210 boolean horizontal;
211 boolean has_color;
212 } ScrollBarParameters;
214 typedef struct
216 ClearlooksHandleType type;
217 boolean horizontal;
218 } HandleParameters;
220 typedef struct
222 ClearlooksStepper stepper; /* Which stepper to draw */
223 } ScrollBarStepperParameters;
225 typedef struct
227 ClearlooksWindowEdge edge;
228 } ResizeGripParameters;
230 typedef struct
232 int style;
233 } MenuBarParameters;
235 typedef struct
237 ClearlooksShadowType shadow_type;
238 boolean in_cell;
239 boolean in_menu;
240 } CheckboxParameters;
242 typedef struct
244 ClearlooksArrowType type;
245 ClearlooksDirection direction;
246 } ArrowParameters;
248 typedef struct
250 int style;
251 boolean topmost;
252 } ToolbarParameters;
254 struct _ClearlooksStyleFunctions
256 void (*draw_button) (cairo_t *cr,
257 const ClearlooksColors *colors,
258 const WidgetParameters *widget,
259 int x, int y, int width, int height);
261 void (*draw_scale_trough) (cairo_t *cr,
262 const ClearlooksColors *colors,
263 const WidgetParameters *widget,
264 const SliderParameters *slider,
265 int x, int y, int width, int height);
267 void (*draw_progressbar_trough) (cairo_t *cr,
268 const ClearlooksColors *colors,
269 const WidgetParameters *widget,
270 int x, int y, int width, int height);
272 void (*draw_progressbar_fill) (cairo_t *cr,
273 const ClearlooksColors *colors,
274 const WidgetParameters *widget,
275 const ProgressBarParameters *progressbar,
276 int x, int y, int width, int height, gint offset);
278 void (*draw_slider_button) (cairo_t *cr,
279 const ClearlooksColors *colors,
280 const WidgetParameters *widget,
281 const SliderParameters *slider,
282 int x, int y, int width, int height);
284 void (*draw_entry) (cairo_t *cr,
285 const ClearlooksColors *colors,
286 const WidgetParameters *widget,
287 int x, int y, int width, int height);
289 void (*draw_spinbutton) (cairo_t *cr,
290 const ClearlooksColors *colors,
291 const WidgetParameters *widget,
292 int x, int y, int width, int height);
294 void (*draw_spinbutton_down) (cairo_t *cr,
295 const ClearlooksColors *colors,
296 const WidgetParameters *widget,
297 int x, int y, int width, int height);
299 void (*draw_optionmenu) (cairo_t *cr,
300 const ClearlooksColors *colors,
301 const WidgetParameters *widget,
302 const OptionMenuParameters *optionmenu,
303 int x, int y, int width, int height);
305 void (*draw_inset) (cairo_t *cr,
306 const CairoColor *bg_color,
307 double x, double y, double w, double h,
308 double radius, uint8 corners);
310 void (*draw_menubar) (cairo_t *cr,
311 const ClearlooksColors *colors,
312 const WidgetParameters *widget,
313 const MenuBarParameters *menubar,
314 int x, int y, int width, int height);
316 void (*draw_tab) (cairo_t *cr,
317 const ClearlooksColors *colors,
318 const WidgetParameters *widget,
319 const TabParameters *tab,
320 int x, int y, int width, int height);
322 void (*draw_frame) (cairo_t *cr,
323 const ClearlooksColors *colors,
324 const WidgetParameters *widget,
325 const FrameParameters *frame,
326 int x, int y, int width, int height);
328 void (*draw_separator) (cairo_t *cr,
329 const ClearlooksColors *colors,
330 const WidgetParameters *widget,
331 const SeparatorParameters *separator,
332 int x, int y, int width, int height);
334 void (*draw_menu_item_separator) (cairo_t *cr,
335 const ClearlooksColors *colors,
336 const WidgetParameters *widget,
337 const SeparatorParameters *separator,
338 int x, int y, int width, int height);
340 void (*draw_list_view_header) (cairo_t *cr,
341 const ClearlooksColors *colors,
342 const WidgetParameters *widget,
343 const ListViewHeaderParameters *header,
344 int x, int y, int width, int height);
346 void (*draw_toolbar) (cairo_t *cr,
347 const ClearlooksColors *colors,
348 const WidgetParameters *widget,
349 const ToolbarParameters *toolbar,
350 int x, int y, int width, int height);
352 void (*draw_menuitem) (cairo_t *cr,
353 const ClearlooksColors *colors,
354 const WidgetParameters *widget,
355 int x, int y, int width, int height);
357 void (*draw_menubaritem) (cairo_t *cr,
358 const ClearlooksColors *colors,
359 const WidgetParameters *widget,
360 int x, int y, int width, int height);
362 void (*draw_selected_cell) (cairo_t *cr,
363 const ClearlooksColors *colors,
364 const WidgetParameters *widget,
365 int x, int y, int width, int height);
367 void (*draw_scrollbar_stepper) (cairo_t *cr,
368 const ClearlooksColors *colors,
369 const WidgetParameters *widget,
370 const ScrollBarParameters *scrollbar,
371 const ScrollBarStepperParameters *stepper,
372 int x, int y, int width, int height);
374 void (*draw_scrollbar_slider) (cairo_t *cr,
375 const ClearlooksColors *colors,
376 const WidgetParameters *widget,
377 const ScrollBarParameters *scrollbar,
378 int x, int y, int width, int height);
380 void (*draw_scrollbar_trough) (cairo_t *cr,
381 const ClearlooksColors *colors,
382 const WidgetParameters *widget,
383 const ScrollBarParameters *scrollbar,
384 int x, int y, int width, int height);
386 void (*draw_statusbar) (cairo_t *cr,
387 const ClearlooksColors *colors,
388 const WidgetParameters *widget,
389 int x, int y, int width, int height);
391 void (*draw_menu_frame) (cairo_t *cr,
392 const ClearlooksColors *colors,
393 const WidgetParameters *widget,
394 int x, int y, int width, int height);
396 void (*draw_tooltip) (cairo_t *cr,
397 const ClearlooksColors *colors,
398 const WidgetParameters *widget,
399 int x, int y, int width, int height);
401 void (*draw_handle) (cairo_t *cr,
402 const ClearlooksColors *colors,
403 const WidgetParameters *widget,
404 const HandleParameters *handle,
405 int x, int y, int width, int height);
407 void (*draw_resize_grip) (cairo_t *cr,
408 const ClearlooksColors *colors,
409 const WidgetParameters *widget,
410 const ResizeGripParameters *grip,
411 int x, int y, int width, int height);
413 void (*draw_arrow) (cairo_t *cr,
414 const ClearlooksColors *colors,
415 const WidgetParameters *widget,
416 const ArrowParameters *arrow,
417 int x, int y, int width, int height);
419 void (*draw_checkbox) (cairo_t *cr,
420 const ClearlooksColors *colors,
421 const WidgetParameters *widget,
422 const CheckboxParameters *checkbox,
423 int x, int y, int width, int height);
425 void (*draw_radiobutton) (cairo_t *cr,
426 const ClearlooksColors *colors,
427 const WidgetParameters *widget,
428 const CheckboxParameters *checkbox,
429 int x, int y, int width, int height);
431 /* Style internal functions */
432 /* XXX: Only used by slider_button, inline it? */
433 void (*draw_shadow) (cairo_t *cr,
434 const ClearlooksColors *colors,
435 gfloat radius,
436 int width, int height);
438 void (*draw_slider) (cairo_t *cr,
439 const ClearlooksColors *colors,
440 const WidgetParameters *widget,
441 int x, int y, int width, int height);
443 void (*draw_gripdots) (cairo_t *cr,
444 const ClearlooksColors *colors, int x, int y,
445 int width, int height, int xr, int yr,
446 float contrast);
450 #define CLEARLOOKS_RECTANGLE_SET(rect, _x, _y, _w, _h) rect.x = _x; \
451 rect.y = _y; \
452 rect.width = _w; \
453 rect.height = _h;
455 #endif /* CLEARLOOKS_TYPES_H */