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