2 * Copyright (C) 1998-2000 Red Hat, Inc.
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
17 * Written by Owen Taylor <otaylor@redhat.com>, based on code by
18 * Carsten Haitzler <raster@rasterman.com>
22 #include <gdk-pixbuf/gdk-pixbuf.h>
26 typedef struct _ThemeData ThemeData;
27 typedef struct _ThemeImage ThemeImage;
28 typedef struct _ThemeMatchData ThemeMatchData;
29 typedef struct _ThemePixbuf ThemePixbuf;
33 TOKEN_IMAGE = G_TOKEN_LAST + 1,
46 TOKEN_GAP_START_BORDER,
51 TOKEN_OVERLAY_STRETCH,
52 TOKEN_ARROW_DIRECTION,
102 TOKEN_SEMI_COLLAPSED,
117 COMPONENT_NORTH_WEST = 1 << 0,
118 COMPONENT_NORTH = 1 << 1,
119 COMPONENT_NORTH_EAST = 1 << 2,
120 COMPONENT_WEST = 1 << 3,
121 COMPONENT_CENTER = 1 << 4,
122 COMPONENT_EAST = 1 << 5,
123 COMPONENT_SOUTH_EAST = 1 << 6,
124 COMPONENT_SOUTH = 1 << 7,
125 COMPONENT_SOUTH_WEST = 1 << 8,
126 COMPONENT_ALL = 1 << 9
127 } ThemePixbufComponent;
130 THEME_MATCH_GAP_SIDE = 1 << 0,
131 THEME_MATCH_ORIENTATION = 1 << 1,
132 THEME_MATCH_STATE = 1 << 2,
133 THEME_MATCH_SHADOW = 1 << 3,
134 THEME_MATCH_ARROW_DIRECTION = 1 << 4,
135 THEME_MATCH_EXPANDER_STYLE = 1 << 5,
136 THEME_MATCH_WINDOW_EDGE = 1 << 6
140 THEME_CONSTANT_ROWS = 1 << 0,
141 THEME_CONSTANT_COLS = 1 << 1,
142 THEME_MISSING = 1 << 2
157 struct _ThemeMatchData
159 guint function; /* Mandatory */
162 ThemeMatchFlags flags;
164 GtkPositionType gap_side;
165 GtkOrientation orientation;
167 GtkShadowType shadow;
168 GtkArrowType arrow_direction;
169 GtkExpanderStyle expander_style;
170 GdkWindowEdge window_edge;
177 ThemePixbuf *background;
178 ThemePixbuf *overlay;
179 ThemePixbuf *gap_start;
181 ThemePixbuf *gap_end;
185 ThemeMatchData match_data;
189 G_GNUC_INTERNAL ThemePixbuf *theme_pixbuf_new (void);
190 G_GNUC_INTERNAL void theme_pixbuf_destroy (ThemePixbuf *theme_pb);
191 G_GNUC_INTERNAL void theme_pixbuf_set_filename (ThemePixbuf *theme_pb,
192 const char *filename);
193 G_GNUC_INTERNAL GdkPixbuf * theme_pixbuf_get_pixbuf (ThemePixbuf *theme_pb);
194 G_GNUC_INTERNAL void theme_pixbuf_set_border (ThemePixbuf *theme_pb,
199 G_GNUC_INTERNAL void theme_pixbuf_set_stretch (ThemePixbuf *theme_pb,
201 G_GNUC_INTERNAL void theme_pixbuf_render (ThemePixbuf *theme_pb,
203 guint component_mask,
212 extern GtkStyleClass pixmap_default_class;