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