4 * Copyright (c) Tuomo Valkonen 1999-2006.
6 * Ion is free software; you can redistribute it and/or modify it under
7 * the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2.1 of the License, or
9 * (at your option) any later version.
12 #ifndef ION_DE_BRUSH_H
13 #define ION_DE_BRUSH_H
15 #include <libextl/extl.h>
17 #include <ioncore/common.h>
18 #include <ioncore/gr.h>
19 #include <ioncore/rectangle.h>
27 typedef void DEBrushExtrasFn(DEBrush *brush,
28 const WRectangle *g, DEColourGroup *cg,
31 const char *a1, const char *a2,
37 DEBrushExtrasFn *extras_fn;
43 extern DEBrush *de_get_brush(Window win, WRootWin *rootwin,
46 extern DEBrush *create_debrush(Window win,
47 const char *stylename, DEStyle *style);
48 extern bool debrush_init(DEBrush *brush, Window win,
49 const char *stylename, DEStyle *style);
50 extern void debrush_deinit(DEBrush *brush);
52 extern DEBrush *debrush_get_slave(DEBrush *brush, WRootWin *rootwin,
55 extern void debrush_release(DEBrush *brush);
58 extern DEColourGroup *debrush_get_colour_group2(DEBrush *brush,
62 extern DEColourGroup *debrush_get_colour_group(DEBrush *brush,
68 extern void debrush_begin(DEBrush *brush, const WRectangle *geom, int flags);
69 extern void debrush_end(DEBrush *brush);
73 extern void debrush_get_border_widths(DEBrush *brush, GrBorderWidths *bdw);
74 extern bool debrush_get_extra(DEBrush *brush, const char *key, char type,
79 extern void debrush_draw_border(DEBrush *brush,
80 const WRectangle *geom,
82 extern void debrush_draw_borderline(DEBrush *brush, const WRectangle *geom,
83 const char *attrib, GrBorderLine line);
85 extern void debrush_draw_textbox(DEBrush *brush, const WRectangle *geom,
86 const char *text, const char *attr,
89 extern void debrush_draw_textboxes(DEBrush *brush, const WRectangle *geom,
90 int n, const GrTextElem *elem,
91 bool needfill, const char *common_attrib);
93 extern DEBrushExtrasFn debrush_tab_extras;
94 extern DEBrushExtrasFn debrush_menuentry_extras;
98 extern void debrush_set_window_shape(DEBrush *brush, bool rough,
99 int n, const WRectangle *rects);
101 extern void debrush_enable_transparency(DEBrush *brush, GrTransparency mode);
103 extern void debrush_fill_area(DEBrush *brush, const WRectangle *geom,
105 extern void debrush_clear_area(DEBrush *brush, const WRectangle *geom);
108 #endif /* ION_DE_BRUSH_H */