trunk: changeset 1970
[notion/jeffpc.git] / de / style.h
blob117e54fe33fdeed5985a3e989277cb61a6ad2464
1 /*
2 * ion/de/style.h
4 * Copyright (c) Tuomo Valkonen 1999-2005.
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_STYLE_H
13 #define ION_DE_STYLE_H
15 #include <libextl/extl.h>
17 #include <ioncore/common.h>
18 #include <ioncore/gr.h>
19 #include <ioncore/rectangle.h>
21 INTRSTRUCT(DEBorder);
22 INTRSTRUCT(DEStyle);
24 #include "font.h"
25 #include "colour.h"
27 enum{
28 DEBORDER_INLAID=0, /* -\xxxxxx/- */
29 DEBORDER_RIDGE, /* /-\xxxx/-\ */
30 DEBORDER_ELEVATED, /* /-xxxxxx-\ */
31 DEBORDER_GROOVE /* \_/xxxx\_/ */
35 enum{
36 DEALIGN_LEFT=0,
37 DEALIGN_RIGHT=1,
38 DEALIGN_CENTER=2
42 DECLSTRUCT(DEBorder){
43 uint sh, hl, pad;
44 uint style;
48 DECLSTRUCT(DEStyle){
49 char *style;
50 int usecount;
51 bool is_fallback;
53 WRootWin *rootwin;
55 DEStyle *based_on;
57 GC normal_gc;
59 DEBorder border;
60 bool cgrp_alloced;
61 DEColourGroup cgrp;
62 int n_extra_cgrps;
63 DEColourGroup *extra_cgrps;
64 GrTransparency transparency_mode;
65 DEFont *font;
66 int textalign;
67 uint spacing;
69 ExtlTab data_table;
71 /* Only initialised if used as a DETabBrush */
72 bool tabbrush_data_ok;
73 GC stipple_gc;
74 GC copy_gc;
76 Pixmap tag_pixmap;
77 int tag_pixmap_w;
78 int tag_pixmap_h;
80 DEStyle *next, *prev;
84 extern bool destyle_init(DEStyle *style, WRootWin *rootwin, const char *name);
85 extern void destyle_deinit(DEStyle *style);
86 extern DEStyle *de_create_style(WRootWin *rootwin, const char *name);
87 extern void destyle_unref(DEStyle *style);
89 extern void destyle_create_tab_gcs(DEStyle *style);
91 extern void de_reset();
92 extern void de_deinit_styles();
94 extern DEStyle *de_get_style(WRootWin *rootwin, const char *name);
97 #endif /* ION_DE_STYLE_H */