4 * Copyright (c) Tuomo Valkonen 1999-2009.
6 * See the included file LICENSE for details.
10 #define ION_DE_BRUSH_H
12 #include <libextl/extl.h>
14 #include <ioncore/common.h>
15 #include <ioncore/gr.h>
16 #include <ioncore/rectangle.h>
24 typedef void DEBrushExtrasFn(DEBrush
*brush
,
27 const GrBorderWidths
*bdw
,
28 const GrFontExtents
*fnte
,
29 const GrStyleSpec
*a1
,
30 const GrStyleSpec
*a2
,
36 DEBrushExtrasFn
*extras_fn
;
41 GrStyleSpec current_attr
;
44 extern DEBrush
*de_get_brush(Window win
, WRootWin
*rootwin
,
47 extern DEBrush
*create_debrush(Window win
,
48 const GrStyleSpec
*spec
, DEStyle
*style
);
49 extern bool debrush_init(DEBrush
*brush
, Window win
,
50 const GrStyleSpec
*spec
, DEStyle
*style
);
51 extern void debrush_deinit(DEBrush
*brush
);
53 extern DEBrush
*debrush_get_slave(DEBrush
*brush
, WRootWin
*rootwin
,
56 extern void debrush_release(DEBrush
*brush
);
59 extern DEColourGroup
*debrush_get_colour_group2(DEBrush
*brush
,
60 const GrStyleSpec
*a1
,
61 const GrStyleSpec
*a2
);
63 extern DEColourGroup
*debrush_get_colour_group(DEBrush
*brush
,
64 const GrStyleSpec
*attr
);
66 extern DEColourGroup
*debrush_get_current_colour_group(DEBrush
*brush
);
70 extern void debrush_begin(DEBrush
*brush
, const WRectangle
*geom
, int flags
);
71 extern void debrush_end(DEBrush
*brush
);
73 extern void debrush_init_attr(DEBrush
*brush
, const GrStyleSpec
*spec
);
74 extern void debrush_set_attr(DEBrush
*brush
, GrAttr attr
);
75 extern void debrush_unset_attr(DEBrush
*brush
, GrAttr attr
);
76 extern GrStyleSpec
*debrush_get_current_attr(DEBrush
*brush
);
80 extern void debrush_get_border_widths(DEBrush
*brush
, GrBorderWidths
*bdw
);
81 extern bool debrush_get_extra(DEBrush
*brush
, const char *key
, char type
,
86 extern void debrush_draw_border(DEBrush
*brush
,
87 const WRectangle
*geom
);
88 extern void debrush_draw_borderline(DEBrush
*brush
, const WRectangle
*geom
,
91 extern void debrush_draw_textbox(DEBrush
*brush
, const WRectangle
*geom
,
92 const char *text
, bool needfill
);
94 extern void debrush_draw_textboxes(DEBrush
*brush
, const WRectangle
*geom
,
95 int n
, const GrTextElem
*elem
,
98 extern DEBrushExtrasFn debrush_tab_extras
;
99 extern DEBrushExtrasFn debrush_menuentry_extras
;
103 extern void debrush_set_window_shape(DEBrush
*brush
, bool rough
,
104 int n
, const WRectangle
*rects
);
106 extern void debrush_enable_transparency(DEBrush
*brush
, GrTransparency mode
);
108 extern void debrush_fill_area(DEBrush
*brush
, const WRectangle
*geom
);
109 extern void debrush_clear_area(DEBrush
*brush
, const WRectangle
*geom
);
112 #endif /* ION_DE_BRUSH_H */