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;
9 typedef struct _ClearlooksStyleConstants ClearlooksStyleConstants;
15 CL_STYLE_INVERTED = 2,
26 } ClearlooksStateType;
31 CL_JUNCTION_BEGIN = 1,
37 CL_STEPPER_UNKNOWN = 0,
46 CL_ORDER_FIRST = 1 << 0,
47 CL_ORDER_LAST = 1 << 1,
53 CL_CONT_LEFT = 1 << 0,
54 CL_CONT_RIGHT = 1 << 1
59 CL_ORIENTATION_LEFT_TO_RIGHT,
60 CL_ORIENTATION_RIGHT_TO_LEFT,
61 CL_ORIENTATION_BOTTOM_TO_TOP,
62 CL_ORIENTATION_TOP_TO_BOTTOM
63 } ClearlooksOrientation;
80 } ClearlooksShadowType;
86 } ClearlooksHandleType;
92 } ClearlooksArrowType;
100 CL_FOCUS_TREEVIEW_HEADER,
101 CL_FOCUS_TREEVIEW_ROW,
102 CL_FOCUS_TREEVIEW_DND,
105 CL_FOCUS_COLOR_WHEEL_DARK,
106 CL_FOCUS_COLOR_WHEEL_LIGHT,
108 } ClearlooksFocusType;
117 } ClearlooksDirection;
121 CL_PROGRESSBAR_CONTINUOUS,
122 CL_PROGRESSBAR_DISCRETE
123 } ClearlooksProgressBarStyle;
127 CL_WINDOW_EDGE_NORTH_WEST,
128 CL_WINDOW_EDGE_NORTH,
129 CL_WINDOW_EDGE_NORTH_EAST,
132 CL_WINDOW_EDGE_SOUTH_WEST,
133 CL_WINDOW_EDGE_SOUTH,
134 CL_WINDOW_EDGE_SOUTH_EAST
135 } ClearlooksWindowEdge;
143 } ClearlooksRectangle;
164 boolean enable_shadow;
168 ClearlooksStateType state_type;
176 ClearlooksStyleFunctions *style_functions;
177 ClearlooksStyleConstants *style_constants;
182 ClearlooksFocusType type;
183 ClearlooksContinue continue_side;
201 ClearlooksOrientation orientation;
204 } ProgressBarParameters;
209 } OptionMenuParameters;
213 ClearlooksShadowType shadow;
214 ClearlooksGapSide gap_side;
217 const CairoColor *border; /* maybe changes this to some other hint ... */
222 ClearlooksGapSide gap_side;
223 FocusParameters focus;
228 CairoCorners corners;
229 ClearlooksShadowType shadow;
235 } SeparatorParameters;
239 ClearlooksOrder order; /* XXX: rename to position */
241 } ListViewHeaderParameters;
246 ClearlooksJunction junction; /* On which sides the slider junctions */
249 } ScrollBarParameters;
253 ClearlooksHandleType type;
259 ClearlooksStepper stepper; /* Which stepper to draw */
260 } ScrollBarStepperParameters;
264 ClearlooksWindowEdge edge;
265 } ResizeGripParameters;
274 ClearlooksShadowType shadow_type;
277 } CheckboxParameters;
281 ClearlooksArrowType type;
282 ClearlooksDirection direction;
291 struct _ClearlooksStyleConstants
293 gdouble topleft_highlight_shade;
294 gdouble topleft_highlight_alpha;
297 struct _ClearlooksStyleFunctions
299 void (*draw_top_left_highlight) (cairo_t *cr,
300 const CairoColor *color,
301 const WidgetParameters *params,
302 int x, int y, int width, int height,
304 CairoCorners corners);
306 void (*draw_button) (cairo_t *cr,
307 const ClearlooksColors *colors,
308 const WidgetParameters *widget,
309 int x, int y, int width, int height);
311 void (*draw_scale_trough) (cairo_t *cr,
312 const ClearlooksColors *colors,
313 const WidgetParameters *widget,
314 const SliderParameters *slider,
315 int x, int y, int width, int height);
317 void (*draw_progressbar_trough) (cairo_t *cr,
318 const ClearlooksColors *colors,
319 const WidgetParameters *widget,
320 int x, int y, int width, int height);
322 void (*draw_progressbar_fill) (cairo_t *cr,
323 const ClearlooksColors *colors,
324 const WidgetParameters *widget,
325 const ProgressBarParameters *progressbar,
326 int x, int y, int width, int height, gint offset);
328 void (*draw_slider_button) (cairo_t *cr,
329 const ClearlooksColors *colors,
330 const WidgetParameters *widget,
331 const SliderParameters *slider,
332 int x, int y, int width, int height);
334 void (*draw_entry) (cairo_t *cr,
335 const ClearlooksColors *colors,
336 const WidgetParameters *widget,
337 int x, int y, int width, int height);
339 void (*draw_spinbutton) (cairo_t *cr,
340 const ClearlooksColors *colors,
341 const WidgetParameters *widget,
342 int x, int y, int width, int height);
344 void (*draw_spinbutton_down) (cairo_t *cr,
345 const ClearlooksColors *colors,
346 const WidgetParameters *widget,
347 int x, int y, int width, int height);
349 void (*draw_optionmenu) (cairo_t *cr,
350 const ClearlooksColors *colors,
351 const WidgetParameters *widget,
352 const OptionMenuParameters *optionmenu,
353 int x, int y, int width, int height);
355 void (*draw_inset) (cairo_t *cr,
356 const CairoColor *bg_color,
357 double x, double y, double w, double h,
358 double radius, uint8 corners);
360 void (*draw_menubar) (cairo_t *cr,
361 const ClearlooksColors *colors,
362 const WidgetParameters *widget,
363 const MenuBarParameters *menubar,
364 int x, int y, int width, int height);
366 void (*draw_tab) (cairo_t *cr,
367 const ClearlooksColors *colors,
368 const WidgetParameters *widget,
369 const TabParameters *tab,
370 int x, int y, int width, int height);
372 void (*draw_frame) (cairo_t *cr,
373 const ClearlooksColors *colors,
374 const WidgetParameters *widget,
375 const FrameParameters *frame,
376 int x, int y, int width, int height);
378 void (*draw_separator) (cairo_t *cr,
379 const ClearlooksColors *colors,
380 const WidgetParameters *widget,
381 const SeparatorParameters *separator,
382 int x, int y, int width, int height);
384 void (*draw_menu_item_separator) (cairo_t *cr,
385 const ClearlooksColors *colors,
386 const WidgetParameters *widget,
387 const SeparatorParameters *separator,
388 int x, int y, int width, int height);
390 void (*draw_list_view_header) (cairo_t *cr,
391 const ClearlooksColors *colors,
392 const WidgetParameters *widget,
393 const ListViewHeaderParameters *header,
394 int x, int y, int width, int height);
396 void (*draw_toolbar) (cairo_t *cr,
397 const ClearlooksColors *colors,
398 const WidgetParameters *widget,
399 const ToolbarParameters *toolbar,
400 int x, int y, int width, int height);
402 void (*draw_menuitem) (cairo_t *cr,
403 const ClearlooksColors *colors,
404 const WidgetParameters *widget,
405 int x, int y, int width, int height);
407 void (*draw_menubaritem) (cairo_t *cr,
408 const ClearlooksColors *colors,
409 const WidgetParameters *widget,
410 int x, int y, int width, int height);
412 void (*draw_selected_cell) (cairo_t *cr,
413 const ClearlooksColors *colors,
414 const WidgetParameters *widget,
415 int x, int y, int width, int height);
417 void (*draw_scrollbar_stepper) (cairo_t *cr,
418 const ClearlooksColors *colors,
419 const WidgetParameters *widget,
420 const ScrollBarParameters *scrollbar,
421 const ScrollBarStepperParameters *stepper,
422 int x, int y, int width, int height);
424 void (*draw_scrollbar_slider) (cairo_t *cr,
425 const ClearlooksColors *colors,
426 const WidgetParameters *widget,
427 const ScrollBarParameters *scrollbar,
428 int x, int y, int width, int height);
430 void (*draw_scrollbar_trough) (cairo_t *cr,
431 const ClearlooksColors *colors,
432 const WidgetParameters *widget,
433 const ScrollBarParameters *scrollbar,
434 int x, int y, int width, int height);
436 void (*draw_statusbar) (cairo_t *cr,
437 const ClearlooksColors *colors,
438 const WidgetParameters *widget,
439 int x, int y, int width, int height);
441 void (*draw_menu_frame) (cairo_t *cr,
442 const ClearlooksColors *colors,
443 const WidgetParameters *widget,
444 int x, int y, int width, int height);
446 void (*draw_tooltip) (cairo_t *cr,
447 const ClearlooksColors *colors,
448 const WidgetParameters *widget,
449 int x, int y, int width, int height);
451 void (*draw_handle) (cairo_t *cr,
452 const ClearlooksColors *colors,
453 const WidgetParameters *widget,
454 const HandleParameters *handle,
455 int x, int y, int width, int height);
457 void (*draw_resize_grip) (cairo_t *cr,
458 const ClearlooksColors *colors,
459 const WidgetParameters *widget,
460 const ResizeGripParameters *grip,
461 int x, int y, int width, int height);
463 void (*draw_arrow) (cairo_t *cr,
464 const ClearlooksColors *colors,
465 const WidgetParameters *widget,
466 const ArrowParameters *arrow,
467 int x, int y, int width, int height);
469 void (*draw_focus) (cairo_t *cr,
470 const ClearlooksColors *colors,
471 const WidgetParameters *widget,
472 const FocusParameters *focus,
473 int x, int y, int width, int height);
475 void (*draw_checkbox) (cairo_t *cr,
476 const ClearlooksColors *colors,
477 const WidgetParameters *widget,
478 const CheckboxParameters *checkbox,
479 int x, int y, int width, int height);
481 void (*draw_radiobutton) (cairo_t *cr,
482 const ClearlooksColors *colors,
483 const WidgetParameters *widget,
484 const CheckboxParameters *checkbox,
485 int x, int y, int width, int height);
487 /* Style internal functions */
488 /* XXX: Only used by slider_button, inline it? */
489 void (*draw_shadow) (cairo_t *cr,
490 const ClearlooksColors *colors,
491 gfloat radius, int width, int height);
493 void (*draw_slider) (cairo_t *cr,
494 const ClearlooksColors *colors,
495 const WidgetParameters *widget,
496 int x, int y, int width, int height);
498 void (*draw_gripdots) (cairo_t *cr,
499 const ClearlooksColors *colors, int x, int y,
500 int width, int height, int xr, int yr,
505 #define CLEARLOOKS_RECTANGLE_SET(rect, _x, _y, _w, _h) (rect).x = (_x); \
507 (rect).width = (_w); \
508 (rect).height = (_h);
510 #endif /* CLEARLOOKS_TYPES_H */