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