]> Pileus Git - ~andy/gtk/blob - gtk/gtkstyle.h
Modify the gettext translation domain for the gtk3 rename
[~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 #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
28 #error "Only <gtk/gtk.h> can be included directly."
29 #endif
30
31 #ifndef __GTK_STYLE_H__
32 #define __GTK_STYLE_H__
33
34
35 #include <gdk/gdk.h>
36 #include <gtk/gtkenums.h>
37
38
39 G_BEGIN_DECLS
40
41 #define GTK_TYPE_STYLE              (gtk_style_get_type ())
42 #define GTK_STYLE(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), GTK_TYPE_STYLE, GtkStyle))
43 #define GTK_STYLE_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_STYLE, GtkStyleClass))
44 #define GTK_IS_STYLE(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), GTK_TYPE_STYLE))
45 #define GTK_IS_STYLE_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_STYLE))
46 #define GTK_STYLE_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_STYLE, GtkStyleClass))
47
48 #define GTK_TYPE_BORDER             (gtk_border_get_type ())
49
50 /* Some forward declarations needed to rationalize the header
51  * files.
52  */
53 typedef struct _GtkBorder      GtkBorder;
54 typedef struct _GtkStyle       GtkStyle;
55 typedef struct _GtkStyleClass  GtkStyleClass;
56 typedef struct _GtkThemeEngine GtkThemeEngine;
57 typedef struct _GtkRcStyle     GtkRcStyle;
58 typedef struct _GtkIconSet     GtkIconSet;
59 typedef struct _GtkIconSource  GtkIconSource;
60 typedef struct _GtkRcProperty  GtkRcProperty;
61 typedef struct _GtkSettings    GtkSettings;
62 typedef gboolean (*GtkRcPropertyParser) (const GParamSpec *pspec,
63                                          const GString    *rc_string,
64                                          GValue           *property_value);
65
66 /* We make this forward declaration here, since we pass
67  * GtkWidget's to the draw functions.
68  */
69 typedef struct _GtkWidget      GtkWidget;
70
71 #define GTK_STYLE_ATTACHED(style)       (GTK_STYLE (style)->attach_count > 0)
72
73 struct _GtkStyle
74 {
75   GObject parent_instance;
76
77   /*< public >*/
78
79   GdkColor fg[5];
80   GdkColor bg[5];
81   GdkColor light[5];
82   GdkColor dark[5];
83   GdkColor mid[5];
84   GdkColor text[5];
85   GdkColor base[5];
86   GdkColor text_aa[5];          /* Halfway between text/base */
87
88   GdkColor black;
89   GdkColor white;
90   PangoFontDescription *font_desc;
91
92   gint xthickness;
93   gint ythickness;
94
95   GdkGC *fg_gc[5];
96   GdkGC *bg_gc[5];
97   GdkGC *light_gc[5];
98   GdkGC *dark_gc[5];
99   GdkGC *mid_gc[5];
100   GdkGC *text_gc[5];
101   GdkGC *base_gc[5];
102   GdkGC *text_aa_gc[5];
103   GdkGC *black_gc;
104   GdkGC *white_gc;
105
106   GdkPixmap *bg_pixmap[5];
107
108   /*< private >*/
109
110   gint attach_count;
111
112   gint depth;
113   GdkColormap *colormap;
114   GdkFont *private_font;
115   PangoFontDescription *private_font_desc; /* Font description for style->private_font or %NULL */
116
117   /* the RcStyle from which this style was created */
118   GtkRcStyle     *rc_style;
119
120   GSList         *styles;         /* of type GtkStyle* */
121   GArray         *property_cache;
122   GSList         *icon_factories; /* of type GtkIconFactory* */
123 };
124
125 struct _GtkStyleClass
126 {
127   GObjectClass parent_class;
128
129   /* Initialize for a particular colormap/depth
130    * combination. style->colormap/style->depth will have
131    * been set at this point. Will typically chain to parent.
132    */
133   void (*realize)               (GtkStyle               *style);
134
135   /* Clean up for a particular colormap/depth combination. Will
136    * typically chain to parent.
137    */
138   void (*unrealize)             (GtkStyle               *style);
139
140   /* Make style an exact duplicate of src.
141    */
142   void (*copy)                  (GtkStyle               *style,
143                                  GtkStyle               *src);
144
145   /* Create an empty style of the same type as this style.
146    * The default implementation, which does
147    * g_object_new (G_OBJECT_TYPE (style), NULL);
148    * should work in most cases.
149    */
150   GtkStyle *(*clone)             (GtkStyle               *style);
151
152   /* Initialize the GtkStyle with the values in the GtkRcStyle.
153    * should chain to the parent implementation.
154    */
155   void     (*init_from_rc)      (GtkStyle               *style,
156                                  GtkRcStyle             *rc_style);
157
158   void (*set_background)        (GtkStyle               *style,
159                                  GdkWindow              *window,
160                                  GtkStateType            state_type);
161
162
163   GdkPixbuf * (* render_icon)   (GtkStyle               *style,
164                                  const GtkIconSource    *source,
165                                  GtkTextDirection        direction,
166                                  GtkStateType            state,
167                                  GtkIconSize             size,
168                                  GtkWidget              *widget,
169                                  const gchar            *detail);
170
171   /* Drawing functions
172    */
173
174   void (*draw_hline)            (GtkStyle               *style,
175                                  GdkWindow              *window,
176                                  GtkStateType            state_type,
177                                  GdkRectangle           *area,
178                                  GtkWidget              *widget,
179                                  const gchar            *detail,
180                                  gint                    x1,
181                                  gint                    x2,
182                                  gint                    y);
183   void (*draw_vline)            (GtkStyle               *style,
184                                  GdkWindow              *window,
185                                  GtkStateType            state_type,
186                                  GdkRectangle           *area,
187                                  GtkWidget              *widget,
188                                  const gchar            *detail,
189                                  gint                    y1_,
190                                  gint                    y2_,
191                                  gint                    x);
192   void (*draw_shadow)           (GtkStyle               *style,
193                                  GdkWindow              *window,
194                                  GtkStateType            state_type,
195                                  GtkShadowType           shadow_type,
196                                  GdkRectangle           *area,
197                                  GtkWidget              *widget,
198                                  const gchar            *detail,
199                                  gint                    x,
200                                  gint                    y,
201                                  gint                    width,
202                                  gint                    height);
203   void (*draw_polygon)          (GtkStyle               *style,
204                                  GdkWindow              *window,
205                                  GtkStateType            state_type,
206                                  GtkShadowType           shadow_type,
207                                  GdkRectangle           *area,
208                                  GtkWidget              *widget,
209                                  const gchar            *detail,
210                                  GdkPoint               *point,
211                                  gint                    npoints,
212                                  gboolean                fill);
213   void (*draw_arrow)            (GtkStyle               *style,
214                                  GdkWindow              *window,
215                                  GtkStateType            state_type,
216                                  GtkShadowType           shadow_type,
217                                  GdkRectangle           *area,
218                                  GtkWidget              *widget,
219                                  const gchar            *detail,
220                                  GtkArrowType            arrow_type,
221                                  gboolean                fill,
222                                  gint                    x,
223                                  gint                    y,
224                                  gint                    width,
225                                  gint                    height);
226   void (*draw_diamond)          (GtkStyle               *style,
227                                  GdkWindow              *window,
228                                  GtkStateType            state_type,
229                                  GtkShadowType           shadow_type,
230                                  GdkRectangle           *area,
231                                  GtkWidget              *widget,
232                                  const gchar            *detail,
233                                  gint                    x,
234                                  gint                    y,
235                                  gint                    width,
236                                  gint                    height);
237   void (*draw_string)           (GtkStyle               *style,
238                                  GdkWindow              *window,
239                                  GtkStateType            state_type,
240                                  GdkRectangle           *area,
241                                  GtkWidget              *widget,
242                                  const gchar            *detail,
243                                  gint                    x,
244                                  gint                    y,
245                                  const gchar            *string);
246   void (*draw_box)              (GtkStyle               *style,
247                                  GdkWindow              *window,
248                                  GtkStateType            state_type,
249                                  GtkShadowType           shadow_type,
250                                  GdkRectangle           *area,
251                                  GtkWidget              *widget,
252                                  const gchar            *detail,
253                                  gint                    x,
254                                  gint                    y,
255                                  gint                    width,
256                                  gint                    height);
257   void (*draw_flat_box)         (GtkStyle               *style,
258                                  GdkWindow              *window,
259                                  GtkStateType            state_type,
260                                  GtkShadowType           shadow_type,
261                                  GdkRectangle           *area,
262                                  GtkWidget              *widget,
263                                  const gchar            *detail,
264                                  gint                    x,
265                                  gint                    y,
266                                  gint                    width,
267                                  gint                    height);
268   void (*draw_check)            (GtkStyle               *style,
269                                  GdkWindow              *window,
270                                  GtkStateType            state_type,
271                                  GtkShadowType           shadow_type,
272                                  GdkRectangle           *area,
273                                  GtkWidget              *widget,
274                                  const gchar            *detail,
275                                  gint                    x,
276                                  gint                    y,
277                                  gint                    width,
278                                  gint                    height);
279   void (*draw_option)           (GtkStyle               *style,
280                                  GdkWindow              *window,
281                                  GtkStateType            state_type,
282                                  GtkShadowType           shadow_type,
283                                  GdkRectangle           *area,
284                                  GtkWidget              *widget,
285                                  const gchar            *detail,
286                                  gint                    x,
287                                  gint                    y,
288                                  gint                    width,
289                                  gint                    height);
290   void (*draw_tab)              (GtkStyle               *style,
291                                  GdkWindow              *window,
292                                  GtkStateType            state_type,
293                                  GtkShadowType           shadow_type,
294                                  GdkRectangle           *area,
295                                  GtkWidget              *widget,
296                                  const gchar            *detail,
297                                  gint                    x,
298                                  gint                    y,
299                                  gint                    width,
300                                  gint                    height);
301   void (*draw_shadow_gap)       (GtkStyle               *style,
302                                  GdkWindow              *window,
303                                  GtkStateType            state_type,
304                                  GtkShadowType           shadow_type,
305                                  GdkRectangle           *area,
306                                  GtkWidget              *widget,
307                                  const gchar            *detail,
308                                  gint                    x,
309                                  gint                    y,
310                                  gint                    width,
311                                  gint                    height,
312                                  GtkPositionType         gap_side,
313                                  gint                    gap_x,
314                                  gint                    gap_width);
315   void (*draw_box_gap)          (GtkStyle               *style,
316                                  GdkWindow              *window,
317                                  GtkStateType            state_type,
318                                  GtkShadowType           shadow_type,
319                                  GdkRectangle           *area,
320                                  GtkWidget              *widget,
321                                  const gchar            *detail,
322                                  gint                    x,
323                                  gint                    y,
324                                  gint                    width,
325                                  gint                    height,
326                                  GtkPositionType         gap_side,
327                                  gint                    gap_x,
328                                  gint                    gap_width);
329   void (*draw_extension)        (GtkStyle               *style,
330                                  GdkWindow              *window,
331                                  GtkStateType            state_type,
332                                  GtkShadowType           shadow_type,
333                                  GdkRectangle           *area,
334                                  GtkWidget              *widget,
335                                  const gchar            *detail,
336                                  gint                    x,
337                                  gint                    y,
338                                  gint                    width,
339                                  gint                    height,
340                                  GtkPositionType         gap_side);
341   void (*draw_focus)            (GtkStyle               *style,
342                                  GdkWindow              *window,
343                                  GtkStateType            state_type,
344                                  GdkRectangle           *area,
345                                  GtkWidget              *widget,
346                                  const gchar            *detail,
347                                  gint                    x,
348                                  gint                    y,
349                                  gint                    width,
350                                  gint                    height);
351   void (*draw_slider)           (GtkStyle               *style,
352                                  GdkWindow              *window,
353                                  GtkStateType            state_type,
354                                  GtkShadowType           shadow_type,
355                                  GdkRectangle           *area,
356                                  GtkWidget              *widget,
357                                  const gchar            *detail,
358                                  gint                    x,
359                                  gint                    y,
360                                  gint                    width,
361                                  gint                    height,
362                                  GtkOrientation          orientation);
363   void (*draw_handle)           (GtkStyle               *style,
364                                  GdkWindow              *window,
365                                  GtkStateType            state_type,
366                                  GtkShadowType           shadow_type,
367                                  GdkRectangle           *area,
368                                  GtkWidget              *widget,
369                                  const gchar            *detail,
370                                  gint                    x,
371                                  gint                    y,
372                                  gint                    width,
373                                  gint                    height,
374                                  GtkOrientation          orientation);
375
376   void (*draw_expander)         (GtkStyle               *style,
377                                  GdkWindow              *window,
378                                  GtkStateType            state_type,
379                                  GdkRectangle           *area,
380                                  GtkWidget              *widget,
381                                  const gchar            *detail,
382                                  gint                    x,
383                                  gint                    y,
384                                  GtkExpanderStyle        expander_style);
385   void (*draw_layout)           (GtkStyle               *style,
386                                  GdkWindow              *window,
387                                  GtkStateType            state_type,
388                                  gboolean                use_text,
389                                  GdkRectangle           *area,
390                                  GtkWidget              *widget,
391                                  const gchar            *detail,
392                                  gint                    x,
393                                  gint                    y,
394                                  PangoLayout            *layout);
395   void (*draw_resize_grip)      (GtkStyle               *style,
396                                  GdkWindow              *window,
397                                  GtkStateType            state_type,
398                                  GdkRectangle           *area,
399                                  GtkWidget              *widget,
400                                  const gchar            *detail,
401                                  GdkWindowEdge           edge,
402                                  gint                    x,
403                                  gint                    y,
404                                  gint                    width,
405                                  gint                    height);
406   void (*draw_spinner)          (GtkStyle               *style,
407                                  GdkWindow              *window,
408                                  GtkStateType            state_type,
409                                  GdkRectangle           *area,
410                                  GtkWidget              *widget,
411                                  const gchar            *detail,
412                                  guint                   step,
413                                  gint                    x,
414                                  gint                    y,
415                                  gint                    width,
416                                  gint                    height);
417
418   /* Padding for future expansion */
419   void (*_gtk_reserved1)  (void);
420   void (*_gtk_reserved2)  (void);
421   void (*_gtk_reserved3)  (void);
422   void (*_gtk_reserved4)  (void);
423   void (*_gtk_reserved5)  (void);
424   void (*_gtk_reserved6)  (void);
425   void (*_gtk_reserved7)  (void);
426   void (*_gtk_reserved8)  (void);
427   void (*_gtk_reserved9)  (void);
428   void (*_gtk_reserved10) (void);
429   void (*_gtk_reserved11) (void);
430 };
431
432 struct _GtkBorder
433 {
434   gint left;
435   gint right;
436   gint top;
437   gint bottom;
438 };
439
440 GType     gtk_style_get_type                 (void) G_GNUC_CONST;
441 GtkStyle* gtk_style_new                      (void);
442 GtkStyle* gtk_style_copy                     (GtkStyle     *style);
443 GtkStyle* gtk_style_attach                   (GtkStyle     *style,
444                                               GdkWindow    *window) G_GNUC_WARN_UNUSED_RESULT;
445 void      gtk_style_detach                   (GtkStyle     *style);
446 void      gtk_style_set_background           (GtkStyle     *style,
447                                               GdkWindow    *window,
448                                               GtkStateType  state_type);
449 void      gtk_style_apply_default_background (GtkStyle     *style,
450                                               GdkWindow    *window,
451                                               gboolean      set_bg,
452                                               GtkStateType  state_type,
453                                               const GdkRectangle *area,
454                                               gint          x,
455                                               gint          y,
456                                               gint          width,
457                                               gint          height);
458
459 GtkIconSet* gtk_style_lookup_icon_set        (GtkStyle     *style,
460                                               const gchar  *stock_id);
461 gboolean    gtk_style_lookup_color           (GtkStyle     *style,
462                                               const gchar  *color_name,
463                                               GdkColor     *color);
464
465 GdkPixbuf*  gtk_style_render_icon     (GtkStyle            *style,
466                                        const GtkIconSource *source,
467                                        GtkTextDirection     direction,
468                                        GtkStateType         state,
469                                        GtkIconSize          size,
470                                        GtkWidget           *widget,
471                                        const gchar         *detail);
472
473 void gtk_paint_hline       (GtkStyle           *style,
474                             GdkWindow          *window,
475                             GtkStateType        state_type,
476                             const GdkRectangle *area,
477                             GtkWidget          *widget,
478                             const gchar        *detail,
479                             gint                x1,
480                             gint                x2,
481                             gint                y);
482 void gtk_paint_vline       (GtkStyle           *style,
483                             GdkWindow          *window,
484                             GtkStateType        state_type,
485                             const GdkRectangle *area,
486                             GtkWidget          *widget,
487                             const gchar        *detail,
488                             gint                y1_,
489                             gint                y2_,
490                             gint                x);
491 void gtk_paint_shadow      (GtkStyle           *style,
492                             GdkWindow          *window,
493                             GtkStateType        state_type,
494                             GtkShadowType       shadow_type,
495                             const GdkRectangle *area,
496                             GtkWidget          *widget,
497                             const gchar        *detail,
498                             gint                x,
499                             gint                y,
500                             gint                width,
501                             gint                height);
502 void gtk_paint_polygon     (GtkStyle           *style,
503                             GdkWindow          *window,
504                             GtkStateType        state_type,
505                             GtkShadowType       shadow_type,
506                             const GdkRectangle *area,
507                             GtkWidget          *widget,
508                             const gchar        *detail,
509                             const GdkPoint     *points,
510                             gint                n_points,
511                             gboolean            fill);
512 void gtk_paint_arrow       (GtkStyle           *style,
513                             GdkWindow          *window,
514                             GtkStateType        state_type,
515                             GtkShadowType       shadow_type,
516                             const GdkRectangle *area,
517                             GtkWidget          *widget,
518                             const gchar        *detail,
519                             GtkArrowType        arrow_type,
520                             gboolean            fill,
521                             gint                x,
522                             gint                y,
523                             gint                width,
524                             gint                height);
525 void gtk_paint_diamond     (GtkStyle           *style,
526                             GdkWindow          *window,
527                             GtkStateType        state_type,
528                             GtkShadowType       shadow_type,
529                             const GdkRectangle *area,
530                             GtkWidget          *widget,
531                             const gchar        *detail,
532                             gint                x,
533                             gint                y,
534                             gint                width,
535                             gint                height);
536 void gtk_paint_box         (GtkStyle           *style,
537                             GdkWindow          *window,
538                             GtkStateType        state_type,
539                             GtkShadowType       shadow_type,
540                             const GdkRectangle *area,
541                             GtkWidget          *widget,
542                             const gchar        *detail,
543                             gint                x,
544                             gint                y,
545                             gint                width,
546                             gint                height);
547 void gtk_paint_flat_box    (GtkStyle           *style,
548                             GdkWindow          *window,
549                             GtkStateType        state_type,
550                             GtkShadowType       shadow_type,
551                             const GdkRectangle *area,
552                             GtkWidget          *widget,
553                             const gchar        *detail,
554                             gint                x,
555                             gint                y,
556                             gint                width,
557                             gint                height);
558 void gtk_paint_check       (GtkStyle           *style,
559                             GdkWindow          *window,
560                             GtkStateType        state_type,
561                             GtkShadowType       shadow_type,
562                             const GdkRectangle *area,
563                             GtkWidget          *widget,
564                             const gchar        *detail,
565                             gint                x,
566                             gint                y,
567                             gint                width,
568                             gint                height);
569 void gtk_paint_option      (GtkStyle           *style,
570                             GdkWindow          *window,
571                             GtkStateType        state_type,
572                             GtkShadowType       shadow_type,
573                             const GdkRectangle *area,
574                             GtkWidget          *widget,
575                             const gchar        *detail,
576                             gint                x,
577                             gint                y,
578                             gint                width,
579                             gint                height);
580 void gtk_paint_tab         (GtkStyle           *style,
581                             GdkWindow          *window,
582                             GtkStateType        state_type,
583                             GtkShadowType       shadow_type,
584                             const GdkRectangle *area,
585                             GtkWidget          *widget,
586                             const gchar        *detail,
587                             gint                x,
588                             gint                y,
589                             gint                width,
590                             gint                height);
591 void gtk_paint_shadow_gap  (GtkStyle           *style,
592                             GdkWindow          *window,
593                             GtkStateType        state_type,
594                             GtkShadowType       shadow_type,
595                             const GdkRectangle *area,
596                             GtkWidget          *widget,
597                             const gchar        *detail,
598                             gint                x,
599                             gint                y,
600                             gint                width,
601                             gint                height,
602                             GtkPositionType     gap_side,
603                             gint                gap_x,
604                             gint                gap_width);
605 void gtk_paint_box_gap     (GtkStyle           *style,
606                             GdkWindow          *window,
607                             GtkStateType        state_type,
608                             GtkShadowType       shadow_type,
609                             const GdkRectangle *area,
610                             GtkWidget          *widget,
611                             const gchar        *detail,
612                             gint                x,
613                             gint                y,
614                             gint                width,
615                             gint                height,
616                             GtkPositionType     gap_side,
617                             gint                gap_x,
618                             gint                gap_width);
619 void gtk_paint_extension   (GtkStyle           *style,
620                             GdkWindow          *window,
621                             GtkStateType        state_type,
622                             GtkShadowType       shadow_type,
623                             const GdkRectangle *area,
624                             GtkWidget          *widget,
625                             const gchar        *detail,
626                             gint                x,
627                             gint                y,
628                             gint                width,
629                             gint                height,
630                             GtkPositionType     gap_side);
631 void gtk_paint_focus       (GtkStyle           *style,
632                             GdkWindow          *window,
633                             GtkStateType        state_type,
634                             const GdkRectangle *area,
635                             GtkWidget          *widget,
636                             const gchar        *detail,
637                             gint                x,
638                             gint                y,
639                             gint                width,
640                             gint                height);
641 void gtk_paint_slider      (GtkStyle           *style,
642                             GdkWindow          *window,
643                             GtkStateType        state_type,
644                             GtkShadowType       shadow_type,
645                             const GdkRectangle *area,
646                             GtkWidget          *widget,
647                             const gchar        *detail,
648                             gint                x,
649                             gint                y,
650                             gint                width,
651                             gint                height,
652                             GtkOrientation      orientation);
653 void gtk_paint_handle      (GtkStyle           *style,
654                             GdkWindow          *window,
655                             GtkStateType        state_type,
656                             GtkShadowType       shadow_type,
657                             const GdkRectangle *area,
658                             GtkWidget          *widget,
659                             const gchar        *detail,
660                             gint                x,
661                             gint                y,
662                             gint                width,
663                             gint                height,
664                             GtkOrientation      orientation);
665 void gtk_paint_expander    (GtkStyle           *style,
666                             GdkWindow          *window,
667                             GtkStateType        state_type,
668                             const GdkRectangle *area,
669                             GtkWidget          *widget,
670                             const gchar        *detail,
671                             gint                x,
672                             gint                y,
673                             GtkExpanderStyle    expander_style);
674 void gtk_paint_layout      (GtkStyle           *style,
675                             GdkWindow          *window,
676                             GtkStateType        state_type,
677                             gboolean            use_text,
678                             const GdkRectangle *area,
679                             GtkWidget          *widget,
680                             const gchar        *detail,
681                             gint                x,
682                             gint                y,
683                             PangoLayout        *layout);
684 void gtk_paint_resize_grip (GtkStyle           *style,
685                             GdkWindow          *window,
686                             GtkStateType        state_type,
687                             const GdkRectangle *area,
688                             GtkWidget          *widget,
689                             const gchar        *detail,
690                             GdkWindowEdge       edge,
691                             gint                x,
692                             gint                y,
693                             gint                width,
694                             gint                height);
695 void gtk_paint_spinner     (GtkStyle           *style,
696                             GdkWindow          *window,
697                             GtkStateType        state_type,
698                             const GdkRectangle *area,
699                             GtkWidget          *widget,
700                             const gchar        *detail,
701                             guint               step,
702                             gint                x,
703                             gint                y,
704                             gint                width,
705                             gint                height);
706
707 GType      gtk_border_get_type (void) G_GNUC_CONST;
708 GtkBorder *gtk_border_new      (void) G_GNUC_MALLOC;
709 GtkBorder *gtk_border_copy     (const GtkBorder *border_);
710 void       gtk_border_free     (GtkBorder       *border_);
711
712 void gtk_style_get_style_property (GtkStyle    *style,
713                                    GType        widget_type,
714                                    const gchar *property_name,
715                                    GValue      *value);
716 void gtk_style_get_valist         (GtkStyle    *style,
717                                    GType        widget_type,
718                                    const gchar *first_property_name,
719                                    va_list      var_args);
720 void gtk_style_get                (GtkStyle    *style,
721                                    GType        widget_type,
722                                    const gchar *first_property_name,
723                                    ...) G_GNUC_NULL_TERMINATED;
724
725 /* --- private API --- */
726 const GValue* _gtk_style_peek_property_value (GtkStyle           *style,
727                                               GType               widget_type,
728                                               GParamSpec         *pspec,
729                                               GtkRcPropertyParser parser);
730
731 void          _gtk_style_init_for_settings   (GtkStyle           *style,
732                                               GtkSettings        *settings);
733
734 void          _gtk_style_shade               (const GdkColor     *a,
735                                               GdkColor           *b,
736                                               gdouble             k);
737
738 void   gtk_draw_insertion_cursor    (GtkWidget          *widget,
739                                      GdkDrawable        *drawable,
740                                      const GdkRectangle *area,
741                                      const GdkRectangle *location,
742                                      gboolean            is_primary,
743                                      GtkTextDirection    direction,
744                                      gboolean            draw_arrow);
745 GdkGC *_gtk_widget_get_cursor_gc    (GtkWidget          *widget);
746 void   _gtk_widget_get_cursor_color (GtkWidget          *widget,
747                                      GdkColor           *color);
748
749 G_END_DECLS
750
751 #endif /* __GTK_STYLE_H__ */