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
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
19 #ifndef __GTK_STYLE_H__
20 #define __GTK_STYLE_H__
24 #include <gtk/gtkenums.h>
29 #endif /* __cplusplus */
32 typedef struct _GtkStyle GtkStyle;
33 typedef struct _GtkStyleClass GtkStyleClass;
35 /* This is used for having dynamic style changing stuff */
36 /* fg, bg, light, dark, mid, text, base */
37 #define GTK_STYLE_NUM_STYLECOLORS() 7*5
39 #define GTK_STYLE_ATTACHED(style) (((GtkStyle*)(style))->attach_count > 0)
65 GdkPixmap *bg_pixmap[5];
71 GdkColormap *colormap;
81 void (*draw_hline) (GtkStyle *style,
83 GtkStateType state_type,
87 void (*draw_vline) (GtkStyle *style,
89 GtkStateType state_type,
93 void (*draw_shadow) (GtkStyle *style,
95 GtkStateType state_type,
96 GtkShadowType shadow_type,
101 void (*draw_polygon) (GtkStyle *style,
103 GtkStateType state_type,
104 GtkShadowType shadow_type,
108 void (*draw_arrow) (GtkStyle *style,
110 GtkStateType state_type,
111 GtkShadowType shadow_type,
112 GtkArrowType arrow_type,
118 void (*draw_diamond) (GtkStyle *style,
120 GtkStateType state_type,
121 GtkShadowType shadow_type,
126 void (*draw_oval) (GtkStyle *style,
128 GtkStateType state_type,
129 GtkShadowType shadow_type,
134 void (*draw_string) (GtkStyle *style,
136 GtkStateType state_type,
139 const gchar *string);
143 GtkStyle* gtk_style_new (void);
144 GtkStyle* gtk_style_copy (GtkStyle *style);
145 GtkStyle* gtk_style_attach (GtkStyle *style,
147 void gtk_style_detach (GtkStyle *style);
148 GtkStyle* gtk_style_ref (GtkStyle *style);
149 void gtk_style_unref (GtkStyle *style);
150 void gtk_style_set_background (GtkStyle *style,
152 GtkStateType state_type);
155 void gtk_draw_hline (GtkStyle *style,
157 GtkStateType state_type,
161 void gtk_draw_vline (GtkStyle *style,
163 GtkStateType state_type,
167 void gtk_draw_shadow (GtkStyle *style,
169 GtkStateType state_type,
170 GtkShadowType shadow_type,
175 void gtk_draw_polygon (GtkStyle *style,
177 GtkStateType state_type,
178 GtkShadowType shadow_type,
182 void gtk_draw_arrow (GtkStyle *style,
184 GtkStateType state_type,
185 GtkShadowType shadow_type,
186 GtkArrowType arrow_type,
192 void gtk_draw_diamond (GtkStyle *style,
194 GtkStateType state_type,
195 GtkShadowType shadow_type,
200 void gtk_draw_oval (GtkStyle *style,
202 GtkStateType state_type,
203 GtkShadowType shadow_type,
208 void gtk_draw_string (GtkStyle *style,
210 GtkStateType state_type,
213 const gchar *string);
218 #endif /* __cplusplus */
221 #endif /* __GTK_STYLE_H__ */