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