X-Git-Url: https://git.decadent.org.uk/gitweb/?p=ion3.git;a=blobdiff_plain;f=de%2Fbrush.h;h=d9a040a50f80b970c1d3838c15492f0835f3c478;hp=a1a6b3fd7de2be784b28976f658992f61a6fc431;hb=803afbc1cd633f6c025bcd9537e9b7e9aedadd0d;hpb=8366314611bf30a0f31d25bf5f5023186fa87692 diff --git a/de/brush.h b/de/brush.h index a1a6b3f..d9a040a 100644 --- a/de/brush.h +++ b/de/brush.h @@ -1,7 +1,7 @@ /* * ion/de/brush.h * - * Copyright (c) Tuomo Valkonen 1999-2006. + * Copyright (c) Tuomo Valkonen 1999-2007. * * Ion is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by @@ -25,10 +25,12 @@ INTRCLASS(DEBrush); typedef void DEBrushExtrasFn(DEBrush *brush, - const WRectangle *g, DEColourGroup *cg, + const WRectangle *g, + DEColourGroup *cg, GrBorderWidths *bdw, GrFontExtents *fnte, - const char *a1, const char *a2, + const GrStyleSpec *a1, + const GrStyleSpec *a2, bool pre); DECLCLASS(DEBrush){ @@ -38,15 +40,17 @@ DECLCLASS(DEBrush){ int indicator_w; Window win; bool clip_set; + + GrStyleSpec current_attr; }; extern DEBrush *de_get_brush(Window win, WRootWin *rootwin, const char *style); extern DEBrush *create_debrush(Window win, - const char *stylename, DEStyle *style); + const GrStyleSpec *spec, DEStyle *style); extern bool debrush_init(DEBrush *brush, Window win, - const char *stylename, DEStyle *style); + const GrStyleSpec *spec, DEStyle *style); extern void debrush_deinit(DEBrush *brush); extern DEBrush *debrush_get_slave(DEBrush *brush, WRootWin *rootwin, @@ -56,18 +60,24 @@ extern void debrush_release(DEBrush *brush); extern DEColourGroup *debrush_get_colour_group2(DEBrush *brush, - const char *attr_p1, - const char *attr_p2); + const GrStyleSpec *a1, + const GrStyleSpec *a2); extern DEColourGroup *debrush_get_colour_group(DEBrush *brush, - const char *attr); + const GrStyleSpec *attr); +extern DEColourGroup *debrush_get_current_colour_group(DEBrush *brush); /* Begin/end */ extern void debrush_begin(DEBrush *brush, const WRectangle *geom, int flags); extern void debrush_end(DEBrush *brush); +extern void debrush_init_attr(DEBrush *brush, const GrStyleSpec *spec); +extern void debrush_set_attr(DEBrush *brush, GrAttr attr); +extern void debrush_unset_attr(DEBrush *brush, GrAttr attr); +extern GrStyleSpec *debrush_get_current_attr(DEBrush *brush); + /* Information */ extern void debrush_get_border_widths(DEBrush *brush, GrBorderWidths *bdw); @@ -77,18 +87,16 @@ extern bool debrush_get_extra(DEBrush *brush, const char *key, char type, /* Borders & boxes */ extern void debrush_draw_border(DEBrush *brush, - const WRectangle *geom, - const char *attrib); + const WRectangle *geom); extern void debrush_draw_borderline(DEBrush *brush, const WRectangle *geom, - const char *attrib, GrBorderLine line); + GrBorderLine line); extern void debrush_draw_textbox(DEBrush *brush, const WRectangle *geom, - const char *text, const char *attr, - bool needfill); + const char *text, bool needfill); extern void debrush_draw_textboxes(DEBrush *brush, const WRectangle *geom, int n, const GrTextElem *elem, - bool needfill, const char *common_attrib); + bool needfill); extern DEBrushExtrasFn debrush_tab_extras; extern DEBrushExtrasFn debrush_menuentry_extras; @@ -100,8 +108,7 @@ extern void debrush_set_window_shape(DEBrush *brush, bool rough, extern void debrush_enable_transparency(DEBrush *brush, GrTransparency mode); -extern void debrush_fill_area(DEBrush *brush, const WRectangle *geom, - const char *attr); +extern void debrush_fill_area(DEBrush *brush, const WRectangle *geom); extern void debrush_clear_area(DEBrush *brush, const WRectangle *geom);