1 /* GTK - The GIMP Toolkit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
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 Free
16 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 #ifndef __GTK_STYLE_H__
19 #define __GTK_STYLE_H__
23 #include <gtk/gtkenums.h>
28 #endif /* __cplusplus */
31 typedef struct _GtkStyle GtkStyle;
32 typedef struct _GtkStyleClass GtkStyleClass;
34 /* This is used for having dynamic style changing stuff */
35 /* fg, bg, light, dark, mid, text, base */
36 #define GTK_STYLE_NUM_STYLECOLORS() 7*5
62 GdkPixmap *bg_pixmap[5];
68 GdkColormap *colormap;
78 void (*draw_hline) (GtkStyle *style,
80 GtkStateType state_type,
84 void (*draw_vline) (GtkStyle *style,
86 GtkStateType state_type,
90 void (*draw_shadow) (GtkStyle *style,
92 GtkStateType state_type,
93 GtkShadowType shadow_type,
98 void (*draw_polygon) (GtkStyle *style,
100 GtkStateType state_type,
101 GtkShadowType shadow_type,
105 void (*draw_arrow) (GtkStyle *style,
107 GtkStateType state_type,
108 GtkShadowType shadow_type,
109 GtkArrowType arrow_type,
115 void (*draw_diamond) (GtkStyle *style,
117 GtkStateType state_type,
118 GtkShadowType shadow_type,
123 void (*draw_oval) (GtkStyle *style,
125 GtkStateType state_type,
126 GtkShadowType shadow_type,
131 void (*draw_string) (GtkStyle *style,
133 GtkStateType state_type,
136 const gchar *string);
140 GtkStyle* gtk_style_new (void);
141 GtkStyle* gtk_style_attach (GtkStyle *style,
143 void gtk_style_detach (GtkStyle *style);
144 GtkStyle *gtk_style_ref (GtkStyle *style);
145 void gtk_style_unref (GtkStyle *style);
146 void gtk_style_set_background (GtkStyle *style,
148 GtkStateType state_type);
151 void gtk_draw_hline (GtkStyle *style,
153 GtkStateType state_type,
157 void gtk_draw_vline (GtkStyle *style,
159 GtkStateType state_type,
163 void gtk_draw_shadow (GtkStyle *style,
165 GtkStateType state_type,
166 GtkShadowType shadow_type,
171 void gtk_draw_polygon (GtkStyle *style,
173 GtkStateType state_type,
174 GtkShadowType shadow_type,
178 void gtk_draw_arrow (GtkStyle *style,
180 GtkStateType state_type,
181 GtkShadowType shadow_type,
182 GtkArrowType arrow_type,
188 void gtk_draw_diamond (GtkStyle *style,
190 GtkStateType state_type,
191 GtkShadowType shadow_type,
196 void gtk_draw_oval (GtkStyle *style,
198 GtkStateType state_type,
199 GtkShadowType shadow_type,
204 void gtk_draw_string (GtkStyle *style,
206 GtkStateType state_type,
209 const gchar *string);
214 #endif /* __cplusplus */
217 #endif /* __GTK_STYLE_H__ */