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