]> Pileus Git - ~andy/gtk/blob - gtk/gtkstylecontext.h
33cf5560faf4e73ca7cdb0f167a28aff09513496
[~andy/gtk] / gtk / gtkstylecontext.h
1 /* GTK - The GIMP Toolkit
2  * Copyright (C) 2010 Carlos Garnacho <carlosg@gnome.org>
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 #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
21 #error "Only <gtk/gtk.h> can be included directly."
22 #endif
23
24 #ifndef __GTK_STYLE_CONTEXT_H__
25 #define __GTK_STYLE_CONTEXT_H__
26
27 #include <glib-object.h>
28 #include <gtk/gtkstyleprovider.h>
29 #include <gtk/gtkwidgetpath.h>
30 #include <gtk/gtkborder.h>
31 #include <atk/atk.h>
32
33 G_BEGIN_DECLS
34
35 #define GTK_TYPE_STYLE_CONTEXT         (gtk_style_context_get_type ())
36 #define GTK_STYLE_CONTEXT(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_STYLE_CONTEXT, GtkStyleContext))
37 #define GTK_STYLE_CONTEXT_CLASS(c)     (G_TYPE_CHECK_CLASS_CAST    ((c), GTK_TYPE_STYLE_CONTEXT, GtkStyleContextClass))
38 #define GTK_IS_STYLE_CONTEXT(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_STYLE_CONTEXT))
39 #define GTK_IS_STYLE_CONTEXT_CLASS(c)  (G_TYPE_CHECK_CLASS_TYPE    ((c), GTK_TYPE_STYLE_CONTEXT))
40 #define GTK_STYLE_CONTEXT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS  ((o), GTK_TYPE_STYLE_CONTEXT, GtkStyleContextClass))
41
42 typedef struct _GtkStyleContext GtkStyleContext;
43 typedef struct _GtkStyleContextClass GtkStyleContextClass;
44 typedef struct _GtkStyleContextPrivate GtkStyleContextPrivate;
45
46 struct _GtkStyleContext
47 {
48   GObject parent_object;
49   GtkStyleContextPrivate *priv;
50 };
51
52 struct _GtkStyleContextClass
53 {
54   GObjectClass parent_class;
55
56   void (* changed) (GtkStyleContext *context);
57
58   /* Padding for future expansion */
59   void (*_gtk_reserved1) (void);
60   void (*_gtk_reserved2) (void);
61   void (*_gtk_reserved3) (void);
62   void (*_gtk_reserved4) (void);
63 };
64
65 /* Default set of properties that GtkStyleContext may contain */
66
67 /**
68  * GTK_STYLE_PROPERTY_BACKGROUND_COLOR:
69  *
70  * A property holding the background color of rendered elements as a #GdkRGBA.
71  */
72 #define GTK_STYLE_PROPERTY_BACKGROUND_COLOR "background-color"
73
74 /**
75  * GTK_STYLE_PROPERTY_COLOR:
76  *
77  * A property holding the foreground color of rendered elements as a #GdkRGBA.
78  */
79 #define GTK_STYLE_PROPERTY_COLOR "color"
80
81 /**
82  * GTK_STYLE_PROPERTY_FONT:
83  *
84  * A property holding the font properties used when rendering text
85  * as a #PangoFontDescription.
86  */
87 #define GTK_STYLE_PROPERTY_FONT "font"
88
89 /**
90  * GTK_STYLE_PROPERTY_PADDING:
91  *
92  * A property holding the rendered element's padding as a #GtkBorder. The
93  * padding is defined as the spacing between the inner part of the element border
94  * and its child. It's the innermost spacing property of the padding/border/margin
95  * series.
96  */
97 #define GTK_STYLE_PROPERTY_PADDING "padding"
98
99 /**
100  * GTK_STYLE_PROPERTY_BORDER_WIDTH:
101  *
102  * A property holding the rendered element's border width in pixels as
103  * a #GtkBorder. The border is the intermediary spacing property of the
104  * padding/border/margin series.
105  *
106  * gtk_render_frame() uses this property to find out the frame line width,
107  * so #GtkWidget<!-- -->s rendering frames may need to add up this padding when
108  * requesting size
109  */
110 #define GTK_STYLE_PROPERTY_BORDER_WIDTH "border-width"
111
112 /**
113  * GTK_STYLE_PROPERTY_MARGIN:
114  *
115  * A property holding the rendered element's margin as a #GtkBorder. The
116  * margin is defined as the spacing between the border of the element
117  * and its surrounding elements. It is external to #GtkWidget<!-- -->s's
118  * size allocations, and the most external spacing property of the
119  * padding/border/margin series.
120  */
121 #define GTK_STYLE_PROPERTY_MARGIN "margin"
122
123 /**
124  * GTK_STYLE_PROPERTY_BORDER_RADIUS:
125  *
126  * A property holding the rendered element's border radius in pixels as a #gint.
127  */
128 #define GTK_STYLE_PROPERTY_BORDER_RADIUS "border-radius"
129
130 /**
131  * GTK_STYLE_PROPERTY_BORDER_STYLE:
132  *
133  * A property holding the element's border style as a #GtkBorderStyle.
134  */
135 #define GTK_STYLE_PROPERTY_BORDER_STYLE "border-style"
136
137 /**
138  * GTK_STYLE_PROPERTY_BORDER_COLOR:
139  *
140  * A property holding the element's border color as a #GdkRGBA.
141  */
142 #define GTK_STYLE_PROPERTY_BORDER_COLOR "border-color"
143
144 /**
145  * GTK_STYLE_PROPERTY_BACKGROUND_IMAGE:
146  *
147  * A property holding the element's background as a #cairo_pattern_t.
148  */
149 #define GTK_STYLE_PROPERTY_BACKGROUND_IMAGE "background-image"
150
151
152 /* Predefined set of CSS classes */
153
154 /**
155  * GTK_STYLE_CLASS_CELL:
156  *
157  * A CSS class to match content rendered in cell views.
158  *
159  * This is used by cell renderers, e.g. in #GtkIconView
160  * and #GtkTreeView.
161  */
162 #define GTK_STYLE_CLASS_CELL "cell"
163
164 /**
165  * GTK_STYLE_CLASS_ENTRY:
166  *
167  * A CSS class to match text entries.
168  *
169  * This is used by #GtkEntry.
170  */
171 #define GTK_STYLE_CLASS_ENTRY "entry"
172
173 /**
174  * GTK_STYLE_CLASS_COMBOBOX_ENTRY:
175  *
176  * A CSS class to match combobox entries.
177  *
178  * This is used by #GtkComboBox.
179  */
180 #define GTK_STYLE_CLASS_COMBOBOX_ENTRY "combobox-entry"
181
182 /**
183  * GTK_STYLE_CLASS_BUTTON:
184  *
185  * A CSS class to match buttons.
186  *
187  * This is used by #GtkButton and its subclasses, as well
188  * as various other widget pieces that appear like buttons,
189  * e.g. the arrows in a #GtkCalendar.
190  */
191 #define GTK_STYLE_CLASS_BUTTON "button"
192
193 /**
194  * GTK_STYLE_CLASS_CALENDAR:
195  *
196  * A CSS class to match calendars.
197  *
198  * This is not used by GTK+ itself, currently.
199  */
200 #define GTK_STYLE_CLASS_CALENDAR "calendar"
201
202 /**
203  * GTK_STYLE_CLASS_SLIDER:
204  *
205  * A CSS class to match sliders.
206  *
207  * This is used by #GtkSwitch and #GtkRange and its subclasses.
208  */
209 #define GTK_STYLE_CLASS_SLIDER "slider"
210
211 /**
212  * GTK_STYLE_CLASS_BACKGROUND:
213  *
214  * A CSS class to match the window background.
215  */
216 #define GTK_STYLE_CLASS_BACKGROUND "background"
217
218 /**
219  * GTK_STYLE_CLASS_RUBBERBAND:
220  *
221  * A CSS class to match the rubberband selection rectangle.
222  *
223  * This is used in #GtkIconView and #GtkTreeView.
224  */
225 #define GTK_STYLE_CLASS_RUBBERBAND "rubberband"
226
227 /**
228  * GTK_STYLE_CLASS_TOOLTIP:
229  *
230  * A CSS class to match tooltip windows.
231  */
232 #define GTK_STYLE_CLASS_TOOLTIP "tooltip"
233
234 /**
235  * GTK_STYLE_CLASS_MENU:
236  *
237  * A CSS class to match popup menus.
238  *
239  * This is used in #GtkMenu.
240  */
241 #define GTK_STYLE_CLASS_MENU "menu"
242
243 /**
244  * GTK_STYLE_CLASS_MENUBAR:
245  *
246  * A CSS class to menubars.
247  *
248  * This is used in #GtkMenuBar.
249  */
250 #define GTK_STYLE_CLASS_MENUBAR "menubar"
251
252 /**
253  * GTK_STYLE_CLASS_MENUITEM:
254  *
255  * A CSS class to match menu items.
256  *
257  * This is used in #GtkMenuItem and its subclasses.
258  */
259 #define GTK_STYLE_CLASS_MENUITEM "menuitem"
260
261 /**
262  * GTK_STYLE_CLASS_TOOLBAR:
263  *
264  * A CSS class to match toolbars.
265  *
266  * This is used in #GtkToolbar.
267  */
268 #define GTK_STYLE_CLASS_TOOLBAR "toolbar"
269
270 /**
271  * GTK_STYLE_CLASS_PRIMARY_TOOLBAR:
272  *
273  * A CSS class to match primary toolbars.
274  *
275  * This should be used for the 'main' toolbar of an application,
276  * right below its menubar.
277  */
278 #define GTK_STYLE_CLASS_PRIMARY_TOOLBAR "primary-toolbar"
279
280 /**
281  * GTK_STYLE_CLASS_INLINE_TOOLBAR:
282  *
283  * A CSS class to match inline toolbars.
284  *
285  * This should be used for toolbars that are used to hold
286  * actions below lists, as seen e.g. in the left pane of the
287  * file chooser.
288  */
289 #define GTK_STYLE_CLASS_INLINE_TOOLBAR "inline-toolbar"
290
291 /**
292  * GTK_STYLE_CLASS_RADIO:
293  *
294  * A CSS class to match radio buttons.
295  *
296  * This is used in #GtkRadioButton, #GtkRadioMenuItem and
297  * #GtkCellRendererToggle.
298  */
299 #define GTK_STYLE_CLASS_RADIO "radio"
300
301 /**
302  * GTK_STYLE_CLASS_CHECK:
303  *
304  * A CSS class to match check boxes.
305  *
306  * This is used in #GtkCheckButton, #GtkCheckMenuItem and
307  * #GtkCellRendererToggle.
308  */
309 #define GTK_STYLE_CLASS_CHECK "check"
310
311 /**
312  * GTK_STYLE_CLASS_DEFAULT:
313  *
314  * A CSS class to match the default widget.
315  *
316  * This is used by #GtkButton.
317  */
318 #define GTK_STYLE_CLASS_DEFAULT "default"
319
320 /**
321  * GTK_STYLE_CLASS_TROUGH:
322  *
323  * A CSS class to match troughs, as in scrollbars and progressbars.
324  *
325  * This is used in #GtkRange and its subclasses, #GtkProgressBar
326  * and #GtkSwitch.
327  */
328 #define GTK_STYLE_CLASS_TROUGH "trough"
329
330 /**
331  * GTK_STYLE_CLASS_SCROLLBAR:
332  *
333  * A CSS class to match scrollbars.
334  */
335 #define GTK_STYLE_CLASS_SCROLLBAR "scrollbar"
336
337 /**
338  * GTK_STYLE_CLASS_SCALE:
339  *
340  * A CSS class to match scale widgets.
341  *
342  * This is used in #GtkScale.
343  */
344 #define GTK_STYLE_CLASS_SCALE "scale"
345
346 /**
347  * GTK_STYLE_CLASS_SCALE_HAS_MARKS_ABOVE:
348  *
349  * A CSS class to match scale widgets with marks attached,
350  * all the marks are above for horizontal #GtkScale.
351  * left for vertical #GtkScale.
352  */
353 #define GTK_STYLE_CLASS_SCALE_HAS_MARKS_ABOVE "scale-has-marks-above"
354
355 /**
356  * GTK_STYLE_CLASS_SCALE_HAS_MARKS_BELOW:
357  *
358  * A CSS class to match scale widgets with marks attached,
359  * all the marks are below for horizontal #GtkScale,
360  * right for vertical #GtkScale.
361  */
362 #define GTK_STYLE_CLASS_SCALE_HAS_MARKS_BELOW "scale-has-marks-below"
363
364 /**
365  * GTK_STYLE_CLASS_HEADER:
366  *
367  * A CSS class to match a header element.
368  *
369  * This is used for the header in #GtkCalendar.
370  */
371 #define GTK_STYLE_CLASS_HEADER "header"
372
373 /**
374  * GTK_STYLE_CLASS_ACCELERATOR:
375  *
376  * A CSS class to match an accelerator.
377  *
378  * This is used for the accelerator in #GtkAccelLabel.
379  */
380 #define GTK_STYLE_CLASS_ACCELERATOR "accelerator"
381
382 /**
383  * GTK_STYLE_CLASS_RAISED:
384  *
385  * A CSS class to match a raised control, such as a raised
386  * button on a toolbar.
387  *
388  * This should be used in conjunction with #GTK_STYLE_CLASS_PRIMARY_TOOLBAR.
389  */
390 #define GTK_STYLE_CLASS_RAISED "raised"
391
392 /**
393  * GTK_STYLE_CLASS_GRIP:
394  *
395  * A CSS class defining a resize grip.
396  *
397  * This is used for the resize grip in #GtkWindow.
398  */
399 #define GTK_STYLE_CLASS_GRIP "grip"
400
401 /**
402  * GTK_STYLE_CLASS_DOCK:
403  *
404  * A CSS class defining a dock area.
405  *
406  * This is used by #GtkHandleBox.
407  */
408 #define GTK_STYLE_CLASS_DOCK "dock"
409
410 /**
411  * GTK_STYLE_CLASS_PROGRESSBAR:
412  *
413  * A CSS class to use when rendering activity as a progressbar.
414  *
415  * This is used in #GtkProgressBar and when drawing progress
416  * inside a #GtkEntry or in #GtkCellRendererProgress.
417  */
418 #define GTK_STYLE_CLASS_PROGRESSBAR "progressbar"
419
420 /**
421  * GTK_STYLE_CLASS_SPINNER:
422  *
423  * A CSS class to use when rendering activity as a 'spinner'.
424  *
425  * This is used by #GtkSpinner and #GtkCellRendererSpinner.
426  */
427 #define GTK_STYLE_CLASS_SPINNER "spinner"
428
429 /**
430  * GTK_STYLE_CLASS_MARK:
431  *
432  * A CSS class defining marks in a widget, such as in scales.
433  *
434  * Used in #GtkScale.
435  */
436 #define GTK_STYLE_CLASS_MARK "mark"
437
438 /**
439  * GTK_STYLE_CLASS_EXPANDER:
440  *
441  * A CSS class defining an expander, such as those in treeviews.
442  *
443  * Used for drawing expanders in #GtkTreeView, GtkExpander and
444  * #GtkToolItemGroup.
445  */
446 #define GTK_STYLE_CLASS_EXPANDER "expander"
447
448 /**
449  * GTK_STYLE_CLASS_SPINBUTTON:
450  *
451  * A CSS class defining an spinbutton.
452  *
453  * This is used in #GtkSpinButton.
454  */
455 #define GTK_STYLE_CLASS_SPINBUTTON "spinbutton"
456
457 /**
458  * GTK_STYLE_CLASS_NOTEBOOK:
459  *
460  * A CSS class defining a notebook.
461  *
462  * Used in #GtkNotebook.
463  */
464 #define GTK_STYLE_CLASS_NOTEBOOK "notebook"
465
466 /**
467  * GTK_STYLE_CLASS_VIEW:
468  *
469  * A CSS class defining a view, such as iconviews or treeviews.
470  *
471  * This is used in #GtkTreeView, #GtkIconView, #GtkTextView,
472  * as well as #GtkCalendar.
473  */
474 #define GTK_STYLE_CLASS_VIEW "view"
475
476 /**
477  * GTK_STYLE_CLASS_SIDEBAR:
478  *
479  * A CSS class defining a sidebar, such as the left side in
480  * a file chooser.
481  *
482  * This is used in #GtkFileChooser and in #GtkAssistant.
483  */
484 #define GTK_STYLE_CLASS_SIDEBAR "sidebar"
485
486 /**
487  * GTK_STYLE_CLASS_IMAGE:
488  *
489  * A CSS class defining an image, such as the icon in an entry.
490  *
491  * This is used when rendering icons in #GtkEntry.
492  */
493 #define GTK_STYLE_CLASS_IMAGE "image"
494
495 /**
496  * GTK_STYLE_CLASS_HIGHLIGHT:
497  *
498  * A CSS class defining a highlighted area, such as headings in
499  * assistants and calendars.
500  *
501  * This is used in #GtkAssistant and #GtkCalendar.
502  */
503 #define GTK_STYLE_CLASS_HIGHLIGHT "highlight"
504
505 /**
506  * GTK_STYLE_CLASS_FRAME:
507  *
508  * A CSS class defining a frame delimiting content, such as
509  * #GtkFrame or the scrolled window frame around the
510  * scrollable area.
511  *
512  * This is used in #GtkFrame and #GtkScrollbar.
513  */
514 #define GTK_STYLE_CLASS_FRAME "frame"
515
516 /**
517  * GTK_STYLE_CLASS_DND:
518  *
519  * A CSS class for a drag-and-drop indicator.
520  *
521  * This is used when drawing an outline around a potential
522  * drop target during DND.
523  */
524 #define GTK_STYLE_CLASS_DND "dnd"
525
526 /**
527  * GTK_STYLE_CLASS_PANE_SEPARATOR:
528  *
529  * A CSS class for a pane separator, such as those in #GtkPaned.
530  *
531  * Used in #GtkPaned.
532  */
533 #define GTK_STYLE_CLASS_PANE_SEPARATOR "pane-separator"
534
535 /**
536  * GTK_STYLE_CLASS_SEPARATOR:
537  *
538  * A CSS class for a separator.
539  *
540  * This is used in #GtkSeparator, #GtkSeparatorMenuItem,
541  * #GtkSeparatorToolItem, and when drawing separators in #GtkTreeView.
542  */
543 #define GTK_STYLE_CLASS_SEPARATOR "separator"
544
545 /**
546  * GTK_STYLE_CLASS_INFO:
547  *
548  * A CSS class for an area displaying an informational message,
549  * such as those in infobars.
550  *
551  * This is used by #GtkInfoBar.
552  */
553 #define GTK_STYLE_CLASS_INFO "info"
554
555 /**
556  * GTK_STYLE_CLASS_WARNING:
557  *
558  * A CSS class for an area displaying a warning message,
559  * such as those in infobars.
560  *
561  * This is used by #GtkInfoBar.
562  */
563 #define GTK_STYLE_CLASS_WARNING "warning"
564
565 /**
566  * GTK_STYLE_CLASS_QUESTION:
567  *
568  * A CSS class for an area displaying a question to the user,
569  * such as those in infobars.
570  *
571  * This is used by #GtkInfoBar.
572  */
573 #define GTK_STYLE_CLASS_QUESTION "question"
574
575 /**
576  * GTK_STYLE_CLASS_ERROR:
577  *
578  * A CSS class for an area displaying an error message,
579  * such as those in infobars.
580  *
581  * This is used by #GtkInfoBar.
582  */
583 #define GTK_STYLE_CLASS_ERROR "error"
584
585 /**
586  * GTK_STYLE_CLASS_HORIZONTAL:
587  *
588  * A CSS class for horizontally layered widgets.
589  *
590  * This is used by widgets implementing #GtkOrientable.
591  */
592 #define GTK_STYLE_CLASS_HORIZONTAL "horizontal"
593
594 /**
595  * GTK_STYLE_CLASS_VERTICAL:
596  *
597  * A CSS class for vertically layered widgets.
598  *
599  * This is used by widgets implementing #GtkOrientable.
600  */
601 #define GTK_STYLE_CLASS_VERTICAL "vertical"
602
603 /**
604  * GTK_STYLE_CLASS_TOP:
605  *
606  * A CSS class to indicate an area at the top of a widget.
607  *
608  * This is used by widgets that can render an area in different
609  * positions, such as tabs in a #GtkNotebook.
610  */
611 #define GTK_STYLE_CLASS_TOP "top"
612
613 /**
614  * GTK_STYLE_CLASS_BOTTOM:
615  *
616  * A CSS class to indicate an area at the bottom of a widget.
617  *
618  * This is used by widgets that can render an area in different
619  * positions, such as tabs in a #GtkNotebook.
620  */
621 #define GTK_STYLE_CLASS_BOTTOM "bottom"
622
623 /**
624  * GTK_STYLE_CLASS_LEFT:
625  *
626  * A CSS class to indicate an area at the left of a widget.
627  *
628  * This is used by widgets that can render an area in different
629  * positions, such as tabs in a #GtkNotebook.
630  */
631 #define GTK_STYLE_CLASS_LEFT "left"
632
633 /**
634  * GTK_STYLE_CLASS_RIGHT:
635  *
636  * A CSS class to indicate an area at the right of a widget.
637  *
638  * This is used by widgets that can render an area in different
639  * positions, such as tabs in a #GtkNotebook.
640  */
641 #define GTK_STYLE_CLASS_RIGHT "right"
642
643 /* Predefined set of widget regions */
644
645 /**
646  * GTK_STYLE_REGION_ROW:
647  *
648  * A widget region name to define a treeview row.
649  */
650 #define GTK_STYLE_REGION_ROW "row"
651
652 /**
653  * GTK_STYLE_REGION_COLUMN:
654  *
655  * A widget region name to define a treeview column.
656  */
657 #define GTK_STYLE_REGION_COLUMN "column"
658
659 /**
660  * GTK_STYLE_REGION_COLUMN_HEADER:
661  *
662  * A widget region name to define a treeview column header.
663  */
664 #define GTK_STYLE_REGION_COLUMN_HEADER "column-header"
665
666 /**
667  * GTK_STYLE_REGION_TAB:
668  *
669  * A widget region name to define a notebook tab.
670  */
671 #define GTK_STYLE_REGION_TAB "tab"
672
673
674 GType gtk_style_context_get_type (void) G_GNUC_CONST;
675
676 GtkStyleContext * gtk_style_context_new (void);
677
678 void gtk_style_context_add_provider_for_screen    (GdkScreen        *screen,
679                                                    GtkStyleProvider *provider,
680                                                    guint             priority);
681 void gtk_style_context_remove_provider_for_screen (GdkScreen        *screen,
682                                                    GtkStyleProvider *provider);
683
684 void gtk_style_context_add_provider    (GtkStyleContext  *context,
685                                         GtkStyleProvider *provider,
686                                         guint             priority);
687
688 void gtk_style_context_remove_provider (GtkStyleContext  *context,
689                                         GtkStyleProvider *provider);
690
691 void gtk_style_context_save    (GtkStyleContext *context);
692 void gtk_style_context_restore (GtkStyleContext *context);
693
694 void gtk_style_context_get_property (GtkStyleContext *context,
695                                      const gchar     *property,
696                                      GtkStateFlags    state,
697                                      GValue          *value);
698 void gtk_style_context_get_valist   (GtkStyleContext *context,
699                                      GtkStateFlags    state,
700                                      va_list          args);
701 void gtk_style_context_get          (GtkStyleContext *context,
702                                      GtkStateFlags    state,
703                                      ...) G_GNUC_NULL_TERMINATED;
704
705 void          gtk_style_context_set_state    (GtkStyleContext *context,
706                                               GtkStateFlags    flags);
707 GtkStateFlags gtk_style_context_get_state    (GtkStyleContext *context);
708
709 gboolean      gtk_style_context_state_is_running (GtkStyleContext *context,
710                                                   GtkStateType     state,
711                                                   gdouble         *progress);
712
713 void          gtk_style_context_set_path     (GtkStyleContext *context,
714                                               GtkWidgetPath   *path);
715 const GtkWidgetPath * gtk_style_context_get_path (GtkStyleContext *context);
716
717 GList *  gtk_style_context_list_classes (GtkStyleContext *context);
718
719 void     gtk_style_context_add_class    (GtkStyleContext *context,
720                                          const gchar     *class_name);
721 void     gtk_style_context_remove_class (GtkStyleContext *context,
722                                          const gchar     *class_name);
723 gboolean gtk_style_context_has_class    (GtkStyleContext *context,
724                                          const gchar     *class_name);
725
726 GList *  gtk_style_context_list_regions (GtkStyleContext *context);
727
728 void     gtk_style_context_add_region    (GtkStyleContext    *context,
729                                           const gchar        *region_name,
730                                           GtkRegionFlags      flags);
731 void     gtk_style_context_remove_region (GtkStyleContext    *context,
732                                           const gchar        *region_name);
733 gboolean gtk_style_context_has_region    (GtkStyleContext    *context,
734                                           const gchar        *region_name,
735                                           GtkRegionFlags     *flags_return);
736
737 void gtk_style_context_get_style_property (GtkStyleContext *context,
738                                            const gchar     *property_name,
739                                            GValue          *value);
740 void gtk_style_context_get_style_valist   (GtkStyleContext *context,
741                                            va_list          args);
742 void gtk_style_context_get_style          (GtkStyleContext *context,
743                                            ...);
744
745 GtkIconSet * gtk_style_context_lookup_icon_set (GtkStyleContext *context,
746                                                 const gchar     *stock_id);
747 GdkPixbuf  * gtk_icon_set_render_icon_pixbuf   (GtkIconSet      *icon_set,
748                                                 GtkStyleContext *context,
749                                                 GtkIconSize      size);
750
751 void        gtk_style_context_set_screen (GtkStyleContext *context,
752                                           GdkScreen       *screen);
753 GdkScreen * gtk_style_context_get_screen (GtkStyleContext *context);
754
755 void             gtk_style_context_set_direction (GtkStyleContext  *context,
756                                                   GtkTextDirection  direction);
757 GtkTextDirection gtk_style_context_get_direction (GtkStyleContext  *context);
758
759 void             gtk_style_context_set_junction_sides (GtkStyleContext  *context,
760                                                        GtkJunctionSides  sides);
761 GtkJunctionSides gtk_style_context_get_junction_sides (GtkStyleContext  *context);
762
763 gboolean gtk_style_context_lookup_color (GtkStyleContext *context,
764                                          const gchar     *color_name,
765                                          GdkRGBA         *color);
766
767 void  gtk_style_context_notify_state_change (GtkStyleContext *context,
768                                              GdkWindow       *window,
769                                              gpointer         region_id,
770                                              GtkStateType     state,
771                                              gboolean         state_value);
772 void  gtk_style_context_cancel_animations   (GtkStyleContext *context,
773                                              gpointer         region_id);
774 void  gtk_style_context_scroll_animations   (GtkStyleContext *context,
775                                              GdkWindow       *window,
776                                              gint             dx,
777                                              gint             dy);
778
779 void gtk_style_context_push_animatable_region (GtkStyleContext *context,
780                                                gpointer         region_id);
781 void gtk_style_context_pop_animatable_region  (GtkStyleContext *context);
782
783 /* Some helper functions to retrieve most common properties */
784 void gtk_style_context_get_color            (GtkStyleContext *context,
785                                              GtkStateFlags    state,
786                                              GdkRGBA         *color);
787 void gtk_style_context_get_background_color (GtkStyleContext *context,
788                                              GtkStateFlags    state,
789                                              GdkRGBA         *color);
790 void gtk_style_context_get_border_color     (GtkStyleContext *context,
791                                              GtkStateFlags    state,
792                                              GdkRGBA         *color);
793 const PangoFontDescription *
794      gtk_style_context_get_font             (GtkStyleContext *context,
795                                              GtkStateFlags    state);
796 void gtk_style_context_get_border           (GtkStyleContext *context,
797                                              GtkStateFlags    state,
798                                              GtkBorder       *border);
799 void gtk_style_context_get_padding          (GtkStyleContext *context,
800                                              GtkStateFlags    state,
801                                              GtkBorder       *padding);
802 void gtk_style_context_get_margin           (GtkStyleContext *context,
803                                              GtkStateFlags    state,
804                                              GtkBorder       *margin);
805
806 void gtk_style_context_invalidate           (GtkStyleContext *context);
807 void gtk_style_context_reset_widgets        (GdkScreen       *screen);
808
809 void gtk_style_context_set_background       (GtkStyleContext *context,
810                                              GdkWindow       *window);
811
812 /* Paint methods */
813 void        gtk_render_check       (GtkStyleContext     *context,
814                                     cairo_t             *cr,
815                                     gdouble              x,
816                                     gdouble              y,
817                                     gdouble              width,
818                                     gdouble              height);
819 void        gtk_render_option      (GtkStyleContext     *context,
820                                     cairo_t             *cr,
821                                     gdouble              x,
822                                     gdouble              y,
823                                     gdouble              width,
824                                     gdouble              height);
825 void        gtk_render_arrow       (GtkStyleContext     *context,
826                                     cairo_t             *cr,
827                                     gdouble              angle,
828                                     gdouble              x,
829                                     gdouble              y,
830                                     gdouble              size);
831 void        gtk_render_background  (GtkStyleContext     *context,
832                                     cairo_t             *cr,
833                                     gdouble              x,
834                                     gdouble              y,
835                                     gdouble              width,
836                                     gdouble              height);
837 void        gtk_render_frame       (GtkStyleContext     *context,
838                                     cairo_t             *cr,
839                                     gdouble              x,
840                                     gdouble              y,
841                                     gdouble              width,
842                                     gdouble              height);
843 void        gtk_render_expander    (GtkStyleContext     *context,
844                                     cairo_t             *cr,
845                                     gdouble              x,
846                                     gdouble              y,
847                                     gdouble              width,
848                                     gdouble              height);
849 void        gtk_render_focus       (GtkStyleContext     *context,
850                                     cairo_t             *cr,
851                                     gdouble              x,
852                                     gdouble              y,
853                                     gdouble              width,
854                                     gdouble              height);
855 void        gtk_render_layout      (GtkStyleContext     *context,
856                                     cairo_t             *cr,
857                                     gdouble              x,
858                                     gdouble              y,
859                                     PangoLayout         *layout);
860 void        gtk_render_line        (GtkStyleContext     *context,
861                                     cairo_t             *cr,
862                                     gdouble              x0,
863                                     gdouble              y0,
864                                     gdouble              x1,
865                                     gdouble              y1);
866 void        gtk_render_slider      (GtkStyleContext     *context,
867                                     cairo_t             *cr,
868                                     gdouble              x,
869                                     gdouble              y,
870                                     gdouble              width,
871                                     gdouble              height,
872                                     GtkOrientation       orientation);
873 void        gtk_render_frame_gap   (GtkStyleContext     *context,
874                                     cairo_t             *cr,
875                                     gdouble              x,
876                                     gdouble              y,
877                                     gdouble              width,
878                                     gdouble              height,
879                                     GtkPositionType      gap_side,
880                                     gdouble              xy0_gap,
881                                     gdouble              xy1_gap);
882 void        gtk_render_extension   (GtkStyleContext     *context,
883                                     cairo_t             *cr,
884                                     gdouble              x,
885                                     gdouble              y,
886                                     gdouble              width,
887                                     gdouble              height,
888                                     GtkPositionType      gap_side);
889 void        gtk_render_handle      (GtkStyleContext     *context,
890                                     cairo_t             *cr,
891                                     gdouble              x,
892                                     gdouble              y,
893                                     gdouble              width,
894                                     gdouble              height);
895 void        gtk_render_activity    (GtkStyleContext     *context,
896                                     cairo_t             *cr,
897                                     gdouble              x,
898                                     gdouble              y,
899                                     gdouble              width,
900                                     gdouble              height);
901 GdkPixbuf * gtk_render_icon_pixbuf (GtkStyleContext     *context,
902                                     const GtkIconSource *source,
903                                     GtkIconSize          size);
904 void        gtk_render_icon        (GtkStyleContext     *context,
905                                     cairo_t             *cr,
906                                     GdkPixbuf           *pixbuf,
907                                     gdouble              x,
908                                     gdouble              y);
909
910 /* Accessibility support */
911 AtkAttributeSet *_gtk_style_context_get_attributes (AtkAttributeSet *attributes,
912                                                     GtkStyleContext *context,
913                                                     GtkStateFlags    flags);
914
915 G_END_DECLS
916
917 #endif /* __GTK_STYLE_CONTEXT_H__ */