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
;
14 CL_STYLE_INVERTED
= 2,
26 } ClearlooksStateType
;
31 CL_JUNCTION_BEGIN
= 1,
37 CL_STEPPER_UNKNOWN
= 0,
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
;
74 } ClearlooksShadowType
;
80 } ClearlooksHandleType
;
86 } ClearlooksArrowType
;
94 } ClearlooksDirection
;
98 CL_PROGRESSBAR_CONTINUOUS
,
99 CL_PROGRESSBAR_DISCRETE
100 } ClearlooksProgressBarStyle
;
104 CL_WINDOW_EDGE_NORTH_WEST
,
105 CL_WINDOW_EDGE_NORTH
,
106 CL_WINDOW_EDGE_NORTH_EAST
,
109 CL_WINDOW_EDGE_SOUTH_WEST
,
110 CL_WINDOW_EDGE_SOUTH
,
111 CL_WINDOW_EDGE_SOUTH_EAST
112 } ClearlooksWindowEdge
;
120 } ClearlooksRectangle
;
145 ClearlooksStateType state_type
;
153 ClearlooksStyleFunctions
*style_functions
;
165 ClearlooksOrientation orientation
;
168 } ProgressBarParameters
;
173 } OptionMenuParameters
;
177 ClearlooksShadowType shadow
;
178 ClearlooksGapSide gap_side
;
181 const CairoColor
*border
; /* maybe changes this to some other hint ... */
186 ClearlooksGapSide gap_side
;
191 CairoCorners corners
;
192 ClearlooksShadowType shadow
;
198 } SeparatorParameters
;
202 ClearlooksOrder order
; /* XXX: rename to position */
204 } ListViewHeaderParameters
;
209 ClearlooksJunction junction
; /* On which sides the slider junctions */
212 } ScrollBarParameters
;
216 ClearlooksHandleType type
;
222 ClearlooksStepper stepper
; /* Which stepper to draw */
223 } ScrollBarStepperParameters
;
227 ClearlooksWindowEdge edge
;
228 } ResizeGripParameters
;
237 ClearlooksShadowType shadow_type
;
240 } CheckboxParameters
;
244 ClearlooksArrowType type
;
245 ClearlooksDirection direction
;
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
,
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
,
450 #define CLEARLOOKS_RECTANGLE_SET(rect, _x, _y, _w, _h) rect.x = _x; \
455 #endif /* CLEARLOOKS_TYPES_H */