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, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
19 * Written by Owen Taylor <otaylor@redhat.com>, based on code by
20 * Carsten Haitzler <raster@rasterman.com>
24 #include <gdk-pixbuf/gdk-pixbuf.h>
28 typedef struct _ThemeData ThemeData;
29 typedef struct _ThemeImage ThemeImage;
30 typedef struct _ThemeMatchData ThemeMatchData;
31 typedef struct _ThemePixbuf ThemePixbuf;
35 TOKEN_IMAGE = G_TOKEN_LAST + 1,
48 TOKEN_GAP_START_BORDER,
53 TOKEN_OVERLAY_STRETCH,
54 TOKEN_ARROW_DIRECTION,
104 TOKEN_SEMI_COLLAPSED,
119 COMPONENT_NORTH_WEST = 1 << 0,
120 COMPONENT_NORTH = 1 << 1,
121 COMPONENT_NORTH_EAST = 1 << 2,
122 COMPONENT_WEST = 1 << 3,
123 COMPONENT_CENTER = 1 << 4,
124 COMPONENT_EAST = 1 << 5,
125 COMPONENT_SOUTH_EAST = 1 << 6,
126 COMPONENT_SOUTH = 1 << 7,
127 COMPONENT_SOUTH_WEST = 1 << 8,
128 COMPONENT_ALL = 1 << 9
129 } ThemePixbufComponent;
132 THEME_MATCH_GAP_SIDE = 1 << 0,
133 THEME_MATCH_ORIENTATION = 1 << 1,
134 THEME_MATCH_STATE = 1 << 2,
135 THEME_MATCH_SHADOW = 1 << 3,
136 THEME_MATCH_ARROW_DIRECTION = 1 << 4,
137 THEME_MATCH_EXPANDER_STYLE = 1 << 5,
138 THEME_MATCH_WINDOW_EDGE = 1 << 6
142 THEME_CONSTANT_ROWS = 1 << 0,
143 THEME_CONSTANT_COLS = 1 << 1,
144 THEME_MISSING = 1 << 2
159 struct _ThemeMatchData
161 guint function; /* Mandatory */
164 ThemeMatchFlags flags;
166 GtkPositionType gap_side;
167 GtkOrientation orientation;
169 GtkShadowType shadow;
170 GtkArrowType arrow_direction;
171 GtkExpanderStyle expander_style;
172 GdkWindowEdge window_edge;
179 ThemePixbuf *background;
180 ThemePixbuf *overlay;
181 ThemePixbuf *gap_start;
183 ThemePixbuf *gap_end;
187 ThemeMatchData match_data;
191 G_GNUC_INTERNAL ThemePixbuf *theme_pixbuf_new (void);
192 G_GNUC_INTERNAL void theme_pixbuf_destroy (ThemePixbuf *theme_pb);
193 G_GNUC_INTERNAL void theme_pixbuf_set_filename (ThemePixbuf *theme_pb,
194 const char *filename);
195 G_GNUC_INTERNAL GdkPixbuf * theme_pixbuf_get_pixbuf (ThemePixbuf *theme_pb);
196 G_GNUC_INTERNAL void theme_pixbuf_set_border (ThemePixbuf *theme_pb,
201 G_GNUC_INTERNAL void theme_pixbuf_set_stretch (ThemePixbuf *theme_pb,
203 G_GNUC_INTERNAL void theme_pixbuf_render (ThemePixbuf *theme_pb,
205 guint component_mask,
214 extern GtkStyleClass pixmap_default_class;