]> Pileus Git - ~andy/gtk/blob - gtk/gtkstyle.h
Add support for animating expanders.
[~andy/gtk] / gtk / gtkstyle.h
1 /* GTK - The GIMP Toolkit
2  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser 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.
8  *
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  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser 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.
18  */
19
20 /*
21  * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
22  * file for a list of people on the GTK+ Team.  See the ChangeLog
23  * files for a list of changes.  These files are distributed with
24  * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
25  */
26
27 #ifndef __GTK_STYLE_H__
28 #define __GTK_STYLE_H__
29
30
31 #include <gdk/gdk.h>
32 #include <gtk/gtkenums.h>
33 #include <pango/pango.h>
34
35 #ifdef __cplusplus
36 extern "C" {
37 #endif /* __cplusplus */
38
39 #define GTK_TYPE_STYLE              (gtk_style_get_type ())
40 #define GTK_STYLE(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), GTK_TYPE_STYLE, GtkStyle))
41 #define GTK_STYLE_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_STYLE, GtkStyleClass))
42 #define GTK_IS_STYLE(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), GTK_TYPE_STYLE))
43 #define GTK_IS_STYLE_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_STYLE))
44 #define GTK_STYLE_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_STYLE, GtkStyleClass))
45
46 /* Some forward declarations needed to rationalize the header
47  * files.
48  */
49 typedef struct _GtkBorder      GtkBorder;
50 typedef struct _GtkStyle       GtkStyle;
51 typedef struct _GtkStyleClass  GtkStyleClass;
52 typedef struct _GtkThemeEngine GtkThemeEngine;
53 typedef struct _GtkRcStyle     GtkRcStyle;
54 typedef struct _GtkIconSet     GtkIconSet;
55 typedef struct _GtkIconSource  GtkIconSource;
56 typedef struct _GtkRcProperty  GtkRcProperty;
57 typedef gboolean (*GtkRcPropertyParser) (const GParamSpec *pspec,
58                                          const GString    *rc_string,
59                                          GValue           *property_value);
60
61 /* We make this forward declaration here, since we pass
62  * GtkWidgt's to the draw functions.
63  */
64 typedef struct _GtkWidget      GtkWidget;
65
66 /* This is used for having dynamic style changing stuff
67  * fg, bg, light, dark, mid, text, base
68  */
69 #define GTK_STYLE_NUM_STYLECOLORS()     (7 * 5)
70
71 #define GTK_STYLE_ATTACHED(style)       (GTK_STYLE (style)->attach_count > 0)
72
73 struct _GtkStyle
74 {
75   GObject parent_instance;
76
77   /*< public >*/
78   
79   GdkColor fg[5];
80   GdkColor bg[5];
81   GdkColor light[5];
82   GdkColor dark[5];
83   GdkColor mid[5];
84   GdkColor text[5];
85   GdkColor base[5];
86   GdkColor text_aa[5];          /* Halfway between text/base */
87   
88   GdkColor black;
89   GdkColor white;
90   GdkFont *font;
91   PangoFontDescription *font_desc;
92   
93   gint xthickness;
94   gint ythickness;
95   
96   GdkGC *fg_gc[5];
97   GdkGC *bg_gc[5];
98   GdkGC *light_gc[5];
99   GdkGC *dark_gc[5];
100   GdkGC *mid_gc[5];
101   GdkGC *text_gc[5];
102   GdkGC *base_gc[5];
103   GdkGC *text_aa_gc[5];
104   GdkGC *black_gc;
105   GdkGC *white_gc;
106   
107   GdkPixmap *bg_pixmap[5];
108
109   /*< private >*/
110   
111   gint attach_count;
112   
113   gint depth;
114   GdkColormap *colormap;
115   
116   /* the RcStyle from which this style was created */
117   GtkRcStyle     *rc_style;
118
119   GSList         *styles;         /* of type GtkStyle* */
120   GBSearchArray  *property_cache;
121   GSList         *icon_factories; /* of type GtkIconFactory* */
122 };
123
124 struct _GtkStyleClass
125 {
126   GObjectClass parent_class;
127
128   /* Initialize for a particular colormap/depth
129    * combination. style->colormap/style->depth will have
130    * been set at this point. Will typically chain to parent.
131    */
132   void (*realize)               (GtkStyle               *style);
133
134   /* Clean up for a particular colormap/depth combination. Will
135    * typically chain to parent.
136    */
137   void (*unrealize)             (GtkStyle               *style);
138
139   /* Make style an exact duplicate of src.
140    */
141   void (*copy)                  (GtkStyle               *style,
142                                  GtkStyle               *src);
143
144   /* Create an empty style of the same type as this style.
145    * The default implementation, which does
146    * g_object_new (G_OBJECT_TYPE (style), NULL);
147    * should work in most cases.
148    */
149   GtkStyle *(*clone)             (GtkStyle               *style);
150
151   /* Initialize the GtkStyle with the values in the GtkRcStyle.
152    * should chain to the parent implementation.
153    */
154   void     (*init_from_rc)      (GtkStyle               *style,
155                                  GtkRcStyle             *rc_style);
156
157   void (*set_background)        (GtkStyle               *style,
158                                  GdkWindow              *window,
159                                  GtkStateType            state_type);
160
161
162   GdkPixbuf * (* render_icon)   (GtkStyle               *style,
163                                  const GtkIconSource    *source,
164                                  GtkTextDirection        direction,
165                                  GtkStateType            state,
166                                  GtkIconSize             size,
167                                  GtkWidget              *widget,
168                                  const gchar            *detail);
169   
170   /* Drawing functions
171    */
172   
173   void (*draw_hline)            (GtkStyle               *style,
174                                  GdkWindow              *window,
175                                  GtkStateType            state_type,
176                                  GdkRectangle           *area,
177                                  GtkWidget              *widget,
178                                  const gchar            *detail,
179                                  gint                    x1,
180                                  gint                    x2,
181                                  gint                    y);
182   void (*draw_vline)            (GtkStyle               *style,
183                                  GdkWindow              *window,
184                                  GtkStateType            state_type,
185                                  GdkRectangle           *area,
186                                  GtkWidget              *widget,
187                                  const gchar            *detail,
188                                  gint                    y1,
189                                  gint                    y2,
190                                  gint                    x);
191   void (*draw_shadow)           (GtkStyle               *style,
192                                  GdkWindow              *window,
193                                  GtkStateType            state_type,
194                                  GtkShadowType           shadow_type,
195                                  GdkRectangle           *area,
196                                  GtkWidget              *widget,
197                                  const gchar            *detail,
198                                  gint                    x,
199                                  gint                    y,
200                                  gint                    width,
201                                  gint                    height);
202   void (*draw_polygon)          (GtkStyle               *style,
203                                  GdkWindow              *window,
204                                  GtkStateType            state_type,
205                                  GtkShadowType           shadow_type,
206                                  GdkRectangle           *area,
207                                  GtkWidget              *widget,
208                                  const gchar            *detail,
209                                  GdkPoint               *point,
210                                  gint                    npoints,
211                                  gboolean                fill);
212   void (*draw_arrow)            (GtkStyle               *style,
213                                  GdkWindow              *window,
214                                  GtkStateType            state_type,
215                                  GtkShadowType           shadow_type,
216                                  GdkRectangle           *area,
217                                  GtkWidget              *widget,
218                                  const gchar            *detail,
219                                  GtkArrowType            arrow_type,
220                                  gboolean                fill,
221                                  gint                    x,
222                                  gint                    y,
223                                  gint                    width,
224                                  gint                    height);
225   void (*draw_diamond)          (GtkStyle               *style,
226                                  GdkWindow              *window,
227                                  GtkStateType            state_type,
228                                  GtkShadowType           shadow_type,
229                                  GdkRectangle           *area,
230                                  GtkWidget              *widget,
231                                  const gchar            *detail,
232                                  gint                    x,
233                                  gint                    y,
234                                  gint                    width,
235                                  gint                    height);
236   void (*draw_string)           (GtkStyle               *style,
237                                  GdkWindow              *window,
238                                  GtkStateType            state_type,
239                                  GdkRectangle           *area,
240                                  GtkWidget              *widget,
241                                  const gchar            *detail,
242                                  gint                    x,
243                                  gint                    y,
244                                  const gchar            *string);
245   void (*draw_box)              (GtkStyle               *style,
246                                  GdkWindow              *window,
247                                  GtkStateType            state_type,
248                                  GtkShadowType           shadow_type,
249                                  GdkRectangle           *area,
250                                  GtkWidget              *widget,
251                                  const gchar            *detail,
252                                  gint                    x,
253                                  gint                    y,
254                                  gint                    width,
255                                  gint                    height);
256   void (*draw_flat_box)         (GtkStyle               *style,
257                                  GdkWindow              *window,
258                                  GtkStateType            state_type,
259                                  GtkShadowType           shadow_type,
260                                  GdkRectangle           *area,
261                                  GtkWidget              *widget,
262                                  const gchar            *detail,
263                                  gint                    x,
264                                  gint                    y,
265                                  gint                    width,
266                                  gint                    height);
267   void (*draw_check)            (GtkStyle               *style,
268                                  GdkWindow              *window,
269                                  GtkStateType            state_type,
270                                  GtkShadowType           shadow_type,
271                                  GdkRectangle           *area,
272                                  GtkWidget              *widget,
273                                  const gchar            *detail,
274                                  gint                    x,
275                                  gint                    y,
276                                  gint                    width,
277                                  gint                    height);
278   void (*draw_option)           (GtkStyle               *style,
279                                  GdkWindow              *window,
280                                  GtkStateType            state_type,
281                                  GtkShadowType           shadow_type,
282                                  GdkRectangle           *area,
283                                  GtkWidget              *widget,
284                                  const gchar            *detail,
285                                  gint                    x,
286                                  gint                    y,
287                                  gint                    width,
288                                  gint                    height);
289   void (*draw_tab)              (GtkStyle               *style,
290                                  GdkWindow              *window,
291                                  GtkStateType            state_type,
292                                  GtkShadowType           shadow_type,
293                                  GdkRectangle           *area,
294                                  GtkWidget              *widget,
295                                  const gchar            *detail,
296                                  gint                    x,
297                                  gint                    y,
298                                  gint                    width,
299                                  gint                    height); 
300   void (*draw_shadow_gap)       (GtkStyle               *style,
301                                  GdkWindow              *window,
302                                  GtkStateType            state_type,
303                                  GtkShadowType           shadow_type,
304                                  GdkRectangle           *area,
305                                  GtkWidget              *widget,
306                                  const gchar            *detail,
307                                  gint                    x,
308                                  gint                    y,
309                                  gint                    width,
310                                  gint                    height,
311                                  GtkPositionType         gap_side,
312                                  gint                    gap_x,
313                                  gint                    gap_width);
314   void (*draw_box_gap)          (GtkStyle               *style,
315                                  GdkWindow              *window,
316                                  GtkStateType            state_type,
317                                  GtkShadowType           shadow_type,
318                                  GdkRectangle           *area,
319                                  GtkWidget              *widget,
320                                  const gchar            *detail,
321                                  gint                    x,
322                                  gint                    y,
323                                  gint                    width,
324                                  gint                    height,
325                                  GtkPositionType         gap_side,
326                                  gint                    gap_x,
327                                  gint                    gap_width);
328   void (*draw_extension)        (GtkStyle               *style,
329                                  GdkWindow              *window,
330                                  GtkStateType            state_type,
331                                  GtkShadowType           shadow_type,
332                                  GdkRectangle           *area,
333                                  GtkWidget              *widget,
334                                  const gchar            *detail,
335                                  gint                    x,
336                                  gint                    y,
337                                  gint                    width,
338                                  gint                    height,
339                                  GtkPositionType         gap_side);
340   void (*draw_focus)            (GtkStyle               *style,
341                                  GdkWindow              *window,
342                                  GdkRectangle           *area,
343                                  GtkWidget              *widget,
344                                  const gchar            *detail,
345                                  gint                    x,
346                                  gint                    y,
347                                  gint                    width,
348                                  gint                    height);
349   void (*draw_slider)           (GtkStyle               *style,
350                                  GdkWindow              *window,
351                                  GtkStateType            state_type,
352                                  GtkShadowType           shadow_type,
353                                  GdkRectangle           *area,
354                                  GtkWidget              *widget,
355                                  const gchar            *detail,
356                                  gint                    x,
357                                  gint                    y,
358                                  gint                    width,
359                                  gint                    height,
360                                  GtkOrientation          orientation);
361   void (*draw_handle)           (GtkStyle               *style,
362                                  GdkWindow              *window,
363                                  GtkStateType            state_type,
364                                  GtkShadowType           shadow_type,
365                                  GdkRectangle           *area,
366                                  GtkWidget              *widget,
367                                  const gchar            *detail,
368                                  gint                    x,
369                                  gint                    y,
370                                  gint                    width,
371                                  gint                    height,
372                                  GtkOrientation          orientation);
373
374   void (*draw_expander)         (GtkStyle               *style,
375                                  GdkWindow              *window,
376                                  GtkStateType            state_type,
377                                  GdkRectangle           *area,
378                                  GtkWidget              *widget,
379                                  const gchar            *detail,
380                                  gint                    x,
381                                  gint                    y,
382                                  GtkExpanderStyle        expander_style);
383   void (*draw_layout)           (GtkStyle               *style,
384                                  GdkWindow              *window,
385                                  GtkStateType            state_type,
386                                  gboolean                use_text,
387                                  GdkRectangle           *area,
388                                  GtkWidget              *widget,
389                                  const gchar            *detail,
390                                  gint                    x,
391                                  gint                    y,
392                                  PangoLayout            *layout);
393   void (*draw_resize_grip)      (GtkStyle               *style,
394                                  GdkWindow              *window,
395                                  GtkStateType            state_type,
396                                  GdkRectangle           *area,
397                                  GtkWidget              *widget,
398                                  const gchar            *detail,
399                                  GdkWindowEdge           edge,
400                                  gint                    x,
401                                  gint                    y,
402                                  gint                    width,
403                                  gint                    height);
404   
405 };
406
407 struct _GtkBorder
408 {
409   gint left;
410   gint right;
411   gint top;
412   gint bottom;
413 };
414
415 GType     gtk_style_get_type                 (void) G_GNUC_CONST;
416 GtkStyle* gtk_style_new                      (void);
417 GtkStyle* gtk_style_copy                     (GtkStyle      *style);
418 GtkStyle* gtk_style_attach                   (GtkStyle      *style,
419                                               GdkWindow     *window);
420 void      gtk_style_detach                   (GtkStyle     *style);
421 GtkStyle* gtk_style_ref                      (GtkStyle     *style);
422 void      gtk_style_unref                    (GtkStyle     *style);
423 void      gtk_style_set_background           (GtkStyle     *style,
424                                               GdkWindow    *window,
425                                               GtkStateType  state_type);
426 void      gtk_style_apply_default_background (GtkStyle     *style,
427                                               GdkWindow    *window,
428                                               gboolean      set_bg,
429                                               GtkStateType  state_type, 
430                                               GdkRectangle *area, 
431                                               gint          x, 
432                                               gint          y, 
433                                               gint          width, 
434                                               gint          height);
435
436 GtkIconSet* gtk_style_lookup_icon_set (GtkStyle            *style,
437                                        const gchar         *stock_id);
438 GdkPixbuf*  gtk_style_render_icon     (GtkStyle            *style,
439                                        const GtkIconSource *source,
440                                        GtkTextDirection     direction,
441                                        GtkStateType         state,
442                                        GtkIconSize          size,
443                                        GtkWidget           *widget,
444                                        const gchar         *detail);
445 void gtk_draw_hline      (GtkStyle        *style,
446                           GdkWindow       *window,
447                           GtkStateType     state_type,
448                           gint             x1,
449                           gint             x2,
450                           gint             y);
451 void gtk_draw_vline      (GtkStyle        *style,
452                           GdkWindow       *window,
453                           GtkStateType     state_type,
454                           gint             y1,
455                           gint             y2,
456                           gint             x);
457 void gtk_draw_shadow     (GtkStyle        *style,
458                           GdkWindow       *window,
459                           GtkStateType     state_type,
460                           GtkShadowType    shadow_type,
461                           gint             x,
462                           gint             y,
463                           gint             width,
464                           gint             height);
465 void gtk_draw_polygon    (GtkStyle        *style,
466                           GdkWindow       *window,
467                           GtkStateType     state_type,
468                           GtkShadowType    shadow_type,
469                           GdkPoint        *points,
470                           gint             npoints,
471                           gboolean         fill);
472 void gtk_draw_arrow      (GtkStyle        *style,
473                           GdkWindow       *window,
474                           GtkStateType     state_type,
475                           GtkShadowType    shadow_type,
476                           GtkArrowType     arrow_type,
477                           gboolean         fill,
478                           gint             x,
479                           gint             y,
480                           gint             width,
481                           gint             height);
482 void gtk_draw_diamond    (GtkStyle        *style,
483                           GdkWindow       *window,
484                           GtkStateType     state_type,
485                           GtkShadowType    shadow_type,
486                           gint             x,
487                           gint             y,
488                           gint             width,
489                           gint             height);
490 void gtk_draw_box        (GtkStyle        *style,
491                           GdkWindow       *window,
492                           GtkStateType     state_type,
493                           GtkShadowType    shadow_type,
494                           gint             x,
495                           gint             y,
496                           gint             width,
497                           gint             height);
498 void gtk_draw_flat_box   (GtkStyle        *style,
499                           GdkWindow       *window,
500                           GtkStateType     state_type,
501                           GtkShadowType    shadow_type,
502                           gint             x,
503                           gint             y,
504                           gint             width,
505                           gint             height);
506 void gtk_draw_check      (GtkStyle        *style,
507                           GdkWindow       *window,
508                           GtkStateType     state_type,
509                           GtkShadowType    shadow_type,
510                           gint             x,
511                           gint             y,
512                           gint             width,
513                           gint             height);
514 void gtk_draw_option     (GtkStyle        *style,
515                           GdkWindow       *window,
516                           GtkStateType     state_type,
517                           GtkShadowType    shadow_type,
518                           gint             x,
519                           gint             y,
520                           gint             width,
521                           gint             height);
522 void gtk_draw_tab        (GtkStyle        *style,
523                           GdkWindow       *window,
524                           GtkStateType     state_type,
525                           GtkShadowType    shadow_type,
526                           gint             x,
527                           gint             y,
528                           gint             width,
529                           gint             height);
530 void gtk_draw_shadow_gap (GtkStyle        *style,
531                           GdkWindow       *window,
532                           GtkStateType     state_type,
533                           GtkShadowType    shadow_type,
534                           gint             x,
535                           gint             y,
536                           gint             width,
537                           gint             height,
538                           GtkPositionType  gap_side,
539                           gint             gap_x,
540                           gint             gap_width);
541 void gtk_draw_box_gap    (GtkStyle        *style,
542                           GdkWindow       *window,
543                           GtkStateType     state_type,
544                           GtkShadowType    shadow_type,
545                           gint             x,
546                           gint             y,
547                           gint             width,
548                           gint             height,
549                           GtkPositionType  gap_side,
550                           gint             gap_x,
551                           gint             gap_width);
552 void gtk_draw_extension  (GtkStyle        *style,
553                           GdkWindow       *window,
554                           GtkStateType     state_type,
555                           GtkShadowType    shadow_type,
556                           gint             x,
557                           gint             y,
558                           gint             width,
559                           gint             height,
560                           GtkPositionType  gap_side);
561 void gtk_draw_focus      (GtkStyle        *style,
562                           GdkWindow       *window,
563                           gint             x,
564                           gint             y,
565                           gint             width,
566                           gint             height);
567 void gtk_draw_slider     (GtkStyle        *style,
568                           GdkWindow       *window,
569                           GtkStateType     state_type,
570                           GtkShadowType    shadow_type,
571                           gint             x,
572                           gint             y,
573                           gint             width,
574                           gint             height,
575                           GtkOrientation   orientation);
576 void gtk_draw_handle     (GtkStyle        *style,
577                           GdkWindow       *window,
578                           GtkStateType     state_type,
579                           GtkShadowType    shadow_type,
580                           gint             x,
581                           gint             y,
582                           gint             width,
583                           gint             height,
584                           GtkOrientation   orientation);
585 void gtk_draw_expander   (GtkStyle        *style,
586                           GdkWindow       *window,
587                           GtkStateType     state_type,
588                           gint             x,
589                           gint             y,
590                           GtkExpanderStyle expander_style);
591 void gtk_draw_layout     (GtkStyle        *style,
592                           GdkWindow       *window,
593                           GtkStateType     state_type,
594                           gboolean         use_text,
595                           gint             x,
596                           gint             y,
597                           PangoLayout     *layout);
598
599 void gtk_draw_resize_grip (GtkStyle       *style,
600                            GdkWindow      *window,
601                            GtkStateType    state_type,
602                            GdkWindowEdge   edge,
603                            gint            x,
604                            gint            y,
605                            gint            width,
606                            gint            height);
607
608 void gtk_paint_hline      (GtkStyle        *style,
609                            GdkWindow       *window,
610                            GtkStateType     state_type,
611                            GdkRectangle    *area,
612                            GtkWidget       *widget,
613                            const gchar     *detail,
614                            gint             x1,
615                            gint             x2,
616                            gint             y);
617 void gtk_paint_vline      (GtkStyle        *style,
618                            GdkWindow       *window,
619                            GtkStateType     state_type,
620                            GdkRectangle    *area,
621                            GtkWidget       *widget,
622                            const gchar     *detail,
623                            gint             y1,
624                            gint             y2,
625                            gint             x);
626 void gtk_paint_shadow     (GtkStyle        *style,
627                            GdkWindow       *window,
628                            GtkStateType     state_type,
629                            GtkShadowType    shadow_type,
630                            GdkRectangle    *area,
631                            GtkWidget       *widget,
632                            const gchar     *detail,
633                            gint             x,
634                            gint             y,
635                            gint             width,
636                            gint             height);
637 void gtk_paint_polygon    (GtkStyle        *style,
638                            GdkWindow       *window,
639                            GtkStateType     state_type,
640                            GtkShadowType    shadow_type,
641                            GdkRectangle    *area,
642                            GtkWidget       *widget,
643                            const gchar     *detail,
644                            GdkPoint        *points,
645                            gint             npoints,
646                            gboolean         fill);
647 void gtk_paint_arrow      (GtkStyle        *style,
648                            GdkWindow       *window,
649                            GtkStateType     state_type,
650                            GtkShadowType    shadow_type,
651                            GdkRectangle    *area,
652                            GtkWidget       *widget,
653                            const gchar     *detail,
654                            GtkArrowType     arrow_type,
655                            gboolean         fill,
656                            gint             x,
657                            gint             y,
658                            gint             width,
659                            gint             height);
660 void gtk_paint_diamond    (GtkStyle        *style,
661                            GdkWindow       *window,
662                            GtkStateType     state_type,
663                            GtkShadowType    shadow_type,
664                            GdkRectangle    *area,
665                            GtkWidget       *widget,
666                            const gchar     *detail,
667                            gint             x,
668                            gint             y,
669                            gint             width,
670                            gint             height);
671 void gtk_paint_box        (GtkStyle        *style,
672                            GdkWindow       *window,
673                            GtkStateType     state_type,
674                            GtkShadowType    shadow_type,
675                            GdkRectangle    *area,
676                            GtkWidget       *widget,
677                            const gchar     *detail,
678                            gint             x,
679                            gint             y,
680                            gint             width,
681                            gint             height);
682 void gtk_paint_flat_box   (GtkStyle        *style,
683                            GdkWindow       *window,
684                            GtkStateType     state_type,
685                            GtkShadowType    shadow_type,
686                            GdkRectangle    *area,
687                            GtkWidget       *widget,
688                            const gchar     *detail,
689                            gint             x,
690                            gint             y,
691                            gint             width,
692                            gint             height);
693 void gtk_paint_check      (GtkStyle        *style,
694                            GdkWindow       *window,
695                            GtkStateType     state_type,
696                            GtkShadowType    shadow_type,
697                            GdkRectangle    *area,
698                            GtkWidget       *widget,
699                            const gchar     *detail,
700                            gint             x,
701                            gint             y,
702                            gint             width,
703                            gint             height);
704 void gtk_paint_option     (GtkStyle        *style,
705                            GdkWindow       *window,
706                            GtkStateType     state_type,
707                            GtkShadowType    shadow_type,
708                            GdkRectangle    *area,
709                            GtkWidget       *widget,
710                            const gchar     *detail,
711                            gint             x,
712                            gint             y,
713                            gint             width,
714                            gint             height);
715 void gtk_paint_tab        (GtkStyle        *style,
716                            GdkWindow       *window,
717                            GtkStateType     state_type,
718                            GtkShadowType    shadow_type,
719                            GdkRectangle    *area,
720                            GtkWidget       *widget,
721                            const gchar     *detail,
722                            gint             x,
723                            gint             y,
724                            gint             width,
725                            gint             height);
726 void gtk_paint_shadow_gap (GtkStyle        *style,
727                            GdkWindow       *window,
728                            GtkStateType     state_type,
729                            GtkShadowType    shadow_type,
730                            GdkRectangle    *area,
731                            GtkWidget       *widget,
732                            gchar           *detail,
733                            gint             x,
734                            gint             y,
735                            gint             width,
736                            gint             height,
737                            GtkPositionType  gap_side,
738                            gint             gap_x,
739                            gint             gap_width);
740 void gtk_paint_box_gap    (GtkStyle        *style,
741                            GdkWindow       *window,
742                            GtkStateType     state_type,
743                            GtkShadowType    shadow_type,
744                            GdkRectangle    *area,
745                            GtkWidget       *widget,
746                            gchar           *detail,
747                            gint             x,
748                            gint             y,
749                            gint             width,
750                            gint             height,
751                            GtkPositionType  gap_side,
752                            gint             gap_x,
753                            gint             gap_width);
754 void gtk_paint_extension  (GtkStyle        *style,
755                            GdkWindow       *window,
756                            GtkStateType     state_type,
757                            GtkShadowType    shadow_type,
758                            GdkRectangle    *area,
759                            GtkWidget       *widget,
760                            gchar           *detail,
761                            gint             x,
762                            gint             y,
763                            gint             width,
764                            gint             height,
765                            GtkPositionType  gap_side);
766 void gtk_paint_focus      (GtkStyle        *style,
767                            GdkWindow       *window,
768                            GdkRectangle    *area,
769                            GtkWidget       *widget,
770                            const gchar     *detail,
771                            gint             x,
772                            gint             y,
773                            gint             width,
774                            gint             height);
775 void gtk_paint_slider     (GtkStyle        *style,
776                            GdkWindow       *window,
777                            GtkStateType     state_type,
778                            GtkShadowType    shadow_type,
779                            GdkRectangle    *area,
780                            GtkWidget       *widget,
781                            const gchar     *detail,
782                            gint             x,
783                            gint             y,
784                            gint             width,
785                            gint             height,
786                            GtkOrientation   orientation);
787 void gtk_paint_handle     (GtkStyle        *style,
788                            GdkWindow       *window,
789                            GtkStateType     state_type,
790                            GtkShadowType    shadow_type,
791                            GdkRectangle    *area,
792                            GtkWidget       *widget,
793                            const gchar     *detail,
794                            gint             x,
795                            gint             y,
796                            gint             width,
797                            gint             height,
798                            GtkOrientation   orientation);
799 void gtk_paint_expander   (GtkStyle        *style,
800                            GdkWindow       *window,
801                            GtkStateType     state_type,
802                            GdkRectangle    *area,
803                            GtkWidget       *widget,
804                            const gchar     *detail,
805                            gint             x,
806                            gint             y,
807                            GtkExpanderStyle expander_style);
808 void gtk_paint_layout     (GtkStyle        *style,
809                            GdkWindow       *window,
810                            GtkStateType     state_type,
811                            gboolean         use_text,
812                            GdkRectangle    *area,
813                            GtkWidget       *widget,
814                            const gchar     *detail,
815                            gint             x,
816                            gint             y,
817                            PangoLayout     *layout);
818
819 void gtk_paint_resize_grip (GtkStyle            *style,
820                             GdkWindow           *window,
821                             GtkStateType         state_type,
822                             GdkRectangle        *area,
823                             GtkWidget           *widget,
824                             const gchar         *detail,
825                             GdkWindowEdge        edge,
826                             gint                 x,
827                             gint                 y,
828                             gint                 width,
829                             gint                 height);
830
831
832 GtkBorder *gtk_border_copy (const GtkBorder *border);
833 void       gtk_border_free (GtkBorder       *border);
834
835 /* --- private API --- */
836 const GValue* _gtk_style_peek_property_value (GtkStyle           *style,
837                                               GType               widget_type,
838                                               GParamSpec         *pspec,
839                                               GtkRcPropertyParser parser);
840
841
842 /* depprecated */
843 #ifndef GTK_DISABLE_DEPRECATED
844 void gtk_draw_string     (GtkStyle        *style,
845                           GdkWindow       *window,
846                           GtkStateType     state_type,
847                           gint             x,
848                           gint             y,
849                           const gchar     *string);
850 void gtk_paint_string     (GtkStyle        *style,
851                            GdkWindow       *window,
852                            GtkStateType     state_type,
853                            GdkRectangle    *area,
854                            GtkWidget       *widget,
855                            const gchar     *detail,
856                            gint             x,
857                            gint             y,
858                            const gchar     *string);
859 #endif /* GTK_DISABLE_DEPRECATED */
860
861 #ifdef __cplusplus
862 }
863 #endif /* __cplusplus */
864
865
866 #endif /* __GTK_STYLE_H__ */