]> Pileus Git - ~andy/gtk/blob - gtk/gtkstylecontext.h
Merge branch 'bgo593793-filechooser-recent-folders-master'
[~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_BUTTON:
175  *
176  * A CSS class to match buttons.
177  *
178  * This is used by #GtkButton and its subclasses, as well
179  * as various other widget pieces that appear like buttons,
180  * e.g. the arrows in a #GtkCalendar.
181  */
182 #define GTK_STYLE_CLASS_BUTTON "button"
183
184 /**
185  * GTK_STYLE_CLASS_CALENDAR:
186  *
187  * A CSS class to match calendars.
188  *
189  * This is not used by GTK+ itself, currently.
190  */
191 #define GTK_STYLE_CLASS_CALENDAR "calendar"
192
193 /**
194  * GTK_STYLE_CLASS_SLIDER:
195  *
196  * A CSS class to match sliders.
197  *
198  * This is used by #GtkSwitch and #GtkRange and its subclasses.
199  */
200 #define GTK_STYLE_CLASS_SLIDER "slider"
201
202 /**
203  * GTK_STYLE_CLASS_BACKGROUND:
204  *
205  * A CSS class to match the window background.
206  */
207 #define GTK_STYLE_CLASS_BACKGROUND "background"
208
209 /**
210  * GTK_STYLE_CLASS_RUBBERBAND:
211  *
212  * A CSS class to match the rubberband selection rectangle.
213  *
214  * This is used in #GtkIconView and #GtkTreeView.
215  */
216 #define GTK_STYLE_CLASS_RUBBERBAND "rubberband"
217
218 /**
219  * GTK_STYLE_CLASS_TOOLTIP:
220  *
221  * A CSS class to match tooltip windows.
222  */
223 #define GTK_STYLE_CLASS_TOOLTIP "tooltip"
224
225 /**
226  * GTK_STYLE_CLASS_MENU:
227  *
228  * A CSS class to match popup menus.
229  *
230  * This is used in #GtkMenu.
231  */
232 #define GTK_STYLE_CLASS_MENU "menu"
233
234 /**
235  * GTK_STYLE_CLASS_MENUBAR:
236  *
237  * A CSS class to menubars.
238  *
239  * This is used in #GtkMenuBar.
240  */
241 #define GTK_STYLE_CLASS_MENUBAR "menubar"
242
243 /**
244  * GTK_STYLE_CLASS_MENUITEM:
245  *
246  * A CSS class to match menu items.
247  *
248  * This is used in #GtkMenuItem and its subclasses.
249  */
250 #define GTK_STYLE_CLASS_MENUITEM "menuitem"
251
252 /**
253  * GTK_STYLE_CLASS_TOOLBAR:
254  *
255  * A CSS class to match toolbars.
256  *
257  * This is used in #GtkToolbar.
258  */
259 #define GTK_STYLE_CLASS_TOOLBAR "toolbar"
260
261 /**
262  * GTK_STYLE_CLASS_PRIMARY_TOOLBAR:
263  *
264  * A CSS class to match primary toolbars.
265  *
266  * This should be used for the 'main' toolbar of an application,
267  * right below its menubar.
268  */
269 #define GTK_STYLE_CLASS_PRIMARY_TOOLBAR "primary-toolbar"
270
271 /**
272  * GTK_STYLE_CLASS_INLINE_TOOLBAR:
273  *
274  * A CSS class to match inline toolbars.
275  *
276  * This should be used for toolbars that are used to hold
277  * actions below lists, as seen e.g. in the left pane of the
278  * file chooser.
279  */
280 #define GTK_STYLE_CLASS_INLINE_TOOLBAR "inline-toolbar"
281
282 /**
283  * GTK_STYLE_CLASS_RADIO:
284  *
285  * A CSS class to match radio buttons.
286  *
287  * This is used in #GtkRadioButton, #GtkRadioMenuItem and
288  * #GtkCellRendererToggle.
289  */
290 #define GTK_STYLE_CLASS_RADIO "radio"
291
292 /**
293  * GTK_STYLE_CLASS_CHECK:
294  *
295  * A CSS class to match check boxes.
296  *
297  * This is used in #GtkCheckButton, #GtkCheckMenuItem and
298  * #GtkCellRendererToggle.
299  */
300 #define GTK_STYLE_CLASS_CHECK "check"
301
302 /**
303  * GTK_STYLE_CLASS_DEFAULT:
304  *
305  * A CSS class to match the default widget.
306  *
307  * This is used by #GtkButton.
308  */
309 #define GTK_STYLE_CLASS_DEFAULT "default"
310
311 /**
312  * GTK_STYLE_CLASS_TROUGH:
313  *
314  * A CSS class to match troughs, as in scrollbars and progressbars.
315  *
316  * This is used in #GtkRange and its subclasses, #GtkProgressBar
317  * and #GtkSwitch.
318  */
319 #define GTK_STYLE_CLASS_TROUGH "trough"
320
321 /**
322  * GTK_STYLE_CLASS_SCROLLBAR:
323  *
324  * A CSS class to match scrollbars.
325  */
326 #define GTK_STYLE_CLASS_SCROLLBAR "scrollbar"
327
328 /**
329  * GTK_STYLE_CLASS_SCALE:
330  *
331  * A CSS class to match scale widgets.
332  *
333  * This is used in #GtkScale.
334  */
335 #define GTK_STYLE_CLASS_SCALE "scale"
336
337 /**
338  * GTK_STYLE_CLASS_SCALE_HAS_MARKS_ABOVE:
339  *
340  * A CSS class to match scale widgets with marks attached,
341  * all the marks are above for horizontal #GtkScale.
342  * left for vertical #GtkScale.
343  */
344 #define GTK_STYLE_CLASS_SCALE_HAS_MARKS_ABOVE "scale-has-marks-above"
345
346 /**
347  * GTK_STYLE_CLASS_SCALE_HAS_MARKS_BELOW:
348  *
349  * A CSS class to match scale widgets with marks attached,
350  * all the marks are below for horizontal #GtkScale,
351  * right for vertical #GtkScale.
352  */
353 #define GTK_STYLE_CLASS_SCALE_HAS_MARKS_BELOW "scale-has-marks-below"
354
355 /**
356  * GTK_STYLE_CLASS_HEADER:
357  *
358  * A CSS class to match a header element.
359  *
360  * This is used for the header in #GtkCalendar.
361  */
362 #define GTK_STYLE_CLASS_HEADER "header"
363
364 /**
365  * GTK_STYLE_CLASS_ACCELERATOR:
366  *
367  * A CSS class to match an accelerator.
368  *
369  * This is used for the accelerator in #GtkAccelLabel.
370  */
371 #define GTK_STYLE_CLASS_ACCELERATOR "accelerator"
372
373 /**
374  * GTK_STYLE_CLASS_RAISED:
375  *
376  * A CSS class to match a raised control, such as a raised
377  * button on a toolbar.
378  *
379  * This should be used in conjunction with #GTK_STYLE_CLASS_PRIMARY_TOOLBAR.
380  */
381 #define GTK_STYLE_CLASS_RAISED "raised"
382
383 /**
384  * GTK_STYLE_CLASS_GRIP:
385  *
386  * A CSS class defining a resize grip.
387  *
388  * This is used for the resize grip in #GtkWindow.
389  */
390 #define GTK_STYLE_CLASS_GRIP "grip"
391
392 /**
393  * GTK_STYLE_CLASS_DOCK:
394  *
395  * A CSS class defining a dock area.
396  *
397  * This is used by #GtkHandleBox.
398  */
399 #define GTK_STYLE_CLASS_DOCK "dock"
400
401 /**
402  * GTK_STYLE_CLASS_PROGRESSBAR:
403  *
404  * A CSS class to use when rendering activity as a progressbar.
405  *
406  * This is used in #GtkProgressBar and when drawing progress
407  * inside a #GtkEntry or in #GtkCellRendererProgress.
408  */
409 #define GTK_STYLE_CLASS_PROGRESSBAR "progressbar"
410
411 /**
412  * GTK_STYLE_CLASS_SPINNER:
413  *
414  * A CSS class to use when rendering activity as a 'spinner'.
415  *
416  * This is used by #GtkSpinner and #GtkCellRendererSpinner.
417  */
418 #define GTK_STYLE_CLASS_SPINNER "spinner"
419
420 /**
421  * GTK_STYLE_CLASS_MARK:
422  *
423  * A CSS class defining marks in a widget, such as in scales.
424  *
425  * Used in #GtkScale.
426  */
427 #define GTK_STYLE_CLASS_MARK "mark"
428
429 /**
430  * GTK_STYLE_CLASS_EXPANDER:
431  *
432  * A CSS class defining an expander, such as those in treeviews.
433  *
434  * Used for drawing expanders in #GtkTreeView, GtkExpander and
435  * #GtkToolItemGroup.
436  */
437 #define GTK_STYLE_CLASS_EXPANDER "expander"
438
439 /**
440  * GTK_STYLE_CLASS_SPINBUTTON:
441  *
442  * A CSS class defining an spinbutton.
443  *
444  * This is used in #GtkSpinButton.
445  */
446 #define GTK_STYLE_CLASS_SPINBUTTON "spinbutton"
447
448 /**
449  * GTK_STYLE_CLASS_NOTEBOOK:
450  *
451  * A CSS class defining a notebook.
452  *
453  * Used in #GtkNotebook.
454  */
455 #define GTK_STYLE_CLASS_NOTEBOOK "notebook"
456
457 /**
458  * GTK_STYLE_CLASS_VIEW:
459  *
460  * A CSS class defining a view, such as iconviews or treeviews.
461  *
462  * This is used in #GtkTreeView, #GtkIconView, #GtkTextView,
463  * as well as #GtkCalendar.
464  */
465 #define GTK_STYLE_CLASS_VIEW "view"
466
467 /**
468  * GTK_STYLE_CLASS_SIDEBAR:
469  *
470  * A CSS class defining a sidebar, such as the left side in
471  * a file chooser.
472  *
473  * This is used in #GtkFileChooser and in #GtkAssistant.
474  */
475 #define GTK_STYLE_CLASS_SIDEBAR "sidebar"
476
477 /**
478  * GTK_STYLE_CLASS_IMAGE:
479  *
480  * A CSS class defining an image, such as the icon in an entry.
481  *
482  * This is used when rendering icons in #GtkEntry.
483  */
484 #define GTK_STYLE_CLASS_IMAGE "image"
485
486 /**
487  * GTK_STYLE_CLASS_HIGHLIGHT:
488  *
489  * A CSS class defining a highlighted area, such as headings in
490  * assistants and calendars.
491  *
492  * This is used in #GtkAssistant and #GtkCalendar.
493  */
494 #define GTK_STYLE_CLASS_HIGHLIGHT "highlight"
495
496 /**
497  * GTK_STYLE_CLASS_FRAME:
498  *
499  * A CSS class defining a frame delimiting content, such as
500  * #GtkFrame or the scrolled window frame around the
501  * scrollable area.
502  *
503  * This is used in #GtkFrame and #GtkScrollbar.
504  */
505 #define GTK_STYLE_CLASS_FRAME "frame"
506
507 /**
508  * GTK_STYLE_CLASS_DND:
509  *
510  * A CSS class for a drag-and-drop indicator.
511  *
512  * This is used when drawing an outline around a potential
513  * drop target during DND.
514  */
515 #define GTK_STYLE_CLASS_DND "dnd"
516
517 /**
518  * GTK_STYLE_CLASS_PANE_SEPARATOR:
519  *
520  * A CSS class for a pane separator, such as those in #GtkPaned.
521  *
522  * Used in #GtkPaned.
523  */
524 #define GTK_STYLE_CLASS_PANE_SEPARATOR "pane-separator"
525
526 /**
527  * GTK_STYLE_CLASS_SEPARATOR:
528  *
529  * A CSS class for a separator.
530  *
531  * This is used in #GtkSeparator, #GtkSeparatorMenuItem,
532  * #GtkSeparatorToolItem, and when drawing separators in #GtkTreeView.
533  */
534 #define GTK_STYLE_CLASS_SEPARATOR "separator"
535
536 /**
537  * GTK_STYLE_CLASS_INFO:
538  *
539  * A CSS class for an area displaying an informational message,
540  * such as those in infobars.
541  *
542  * This is used by #GtkInfoBar.
543  */
544 #define GTK_STYLE_CLASS_INFO "info"
545
546 /**
547  * GTK_STYLE_CLASS_WARNING:
548  *
549  * A CSS class for an area displaying a warning message,
550  * such as those in infobars.
551  *
552  * This is used by #GtkInfoBar.
553  */
554 #define GTK_STYLE_CLASS_WARNING "warning"
555
556 /**
557  * GTK_STYLE_CLASS_QUESTION:
558  *
559  * A CSS class for an area displaying a question to the user,
560  * such as those in infobars.
561  *
562  * This is used by #GtkInfoBar.
563  */
564 #define GTK_STYLE_CLASS_QUESTION "question"
565
566 /**
567  * GTK_STYLE_CLASS_ERROR:
568  *
569  * A CSS class for an area displaying an error message,
570  * such as those in infobars.
571  *
572  * This is used by #GtkInfoBar.
573  */
574 #define GTK_STYLE_CLASS_ERROR "error"
575
576 /**
577  * GTK_STYLE_CLASS_HORIZONTAL:
578  *
579  * A CSS class for horizontally layered widgets.
580  *
581  * This is used by widgets implementing #GtkOrientable.
582  */
583 #define GTK_STYLE_CLASS_HORIZONTAL "horizontal"
584
585 /**
586  * GTK_STYLE_CLASS_VERTICAL:
587  *
588  * A CSS class for vertically layered widgets.
589  *
590  * This is used by widgets implementing #GtkOrientable.
591  */
592 #define GTK_STYLE_CLASS_VERTICAL "vertical"
593
594
595 /* Predefined set of widget regions */
596
597 /**
598  * GTK_STYLE_REGION_ROW:
599  *
600  * A widget region name to define a treeview row.
601  */
602 #define GTK_STYLE_REGION_ROW "row"
603
604 /**
605  * GTK_STYLE_REGION_COLUMN:
606  *
607  * A widget region name to define a treeview column.
608  */
609 #define GTK_STYLE_REGION_COLUMN "column"
610
611 /**
612  * GTK_STYLE_REGION_COLUMN_HEADER:
613  *
614  * A widget region name to define a treeview column header.
615  */
616 #define GTK_STYLE_REGION_COLUMN_HEADER "column-header"
617
618 /**
619  * GTK_STYLE_REGION_TAB:
620  *
621  * A widget region name to define a notebook tab.
622  */
623 #define GTK_STYLE_REGION_TAB "tab"
624
625
626 GType gtk_style_context_get_type (void) G_GNUC_CONST;
627
628 GtkStyleContext * gtk_style_context_new (void);
629
630 void gtk_style_context_add_provider_for_screen    (GdkScreen        *screen,
631                                                    GtkStyleProvider *provider,
632                                                    guint             priority);
633 void gtk_style_context_remove_provider_for_screen (GdkScreen        *screen,
634                                                    GtkStyleProvider *provider);
635
636 void gtk_style_context_add_provider    (GtkStyleContext  *context,
637                                         GtkStyleProvider *provider,
638                                         guint             priority);
639
640 void gtk_style_context_remove_provider (GtkStyleContext  *context,
641                                         GtkStyleProvider *provider);
642
643 void gtk_style_context_save    (GtkStyleContext *context);
644 void gtk_style_context_restore (GtkStyleContext *context);
645
646 void gtk_style_context_get_property (GtkStyleContext *context,
647                                      const gchar     *property,
648                                      GtkStateFlags    state,
649                                      GValue          *value);
650 void gtk_style_context_get_valist   (GtkStyleContext *context,
651                                      GtkStateFlags    state,
652                                      va_list          args);
653 void gtk_style_context_get          (GtkStyleContext *context,
654                                      GtkStateFlags    state,
655                                      ...) G_GNUC_NULL_TERMINATED;
656
657 void          gtk_style_context_set_state    (GtkStyleContext *context,
658                                               GtkStateFlags    flags);
659 GtkStateFlags gtk_style_context_get_state    (GtkStyleContext *context);
660
661 gboolean      gtk_style_context_state_is_running (GtkStyleContext *context,
662                                                   GtkStateType     state,
663                                                   gdouble         *progress);
664
665 void          gtk_style_context_set_path     (GtkStyleContext *context,
666                                               GtkWidgetPath   *path);
667 const GtkWidgetPath * gtk_style_context_get_path (GtkStyleContext *context);
668
669 GList *  gtk_style_context_list_classes (GtkStyleContext *context);
670
671 void     gtk_style_context_add_class    (GtkStyleContext *context,
672                                          const gchar     *class_name);
673 void     gtk_style_context_remove_class (GtkStyleContext *context,
674                                          const gchar     *class_name);
675 gboolean gtk_style_context_has_class    (GtkStyleContext *context,
676                                          const gchar     *class_name);
677
678 GList *  gtk_style_context_list_regions (GtkStyleContext *context);
679
680 void     gtk_style_context_add_region    (GtkStyleContext    *context,
681                                           const gchar        *region_name,
682                                           GtkRegionFlags      flags);
683 void     gtk_style_context_remove_region (GtkStyleContext    *context,
684                                           const gchar        *region_name);
685 gboolean gtk_style_context_has_region    (GtkStyleContext    *context,
686                                           const gchar        *region_name,
687                                           GtkRegionFlags     *flags_return);
688
689 void gtk_style_context_get_style_property (GtkStyleContext *context,
690                                            const gchar     *property_name,
691                                            GValue          *value);
692 void gtk_style_context_get_style_valist   (GtkStyleContext *context,
693                                            va_list          args);
694 void gtk_style_context_get_style          (GtkStyleContext *context,
695                                            ...);
696
697 GtkIconSet * gtk_style_context_lookup_icon_set (GtkStyleContext *context,
698                                                 const gchar     *stock_id);
699 GdkPixbuf  * gtk_icon_set_render_icon_pixbuf   (GtkIconSet      *icon_set,
700                                                 GtkStyleContext *context,
701                                                 GtkIconSize      size);
702
703 void        gtk_style_context_set_screen (GtkStyleContext *context,
704                                           GdkScreen       *screen);
705 GdkScreen * gtk_style_context_get_screen (GtkStyleContext *context);
706
707 void             gtk_style_context_set_direction (GtkStyleContext  *context,
708                                                   GtkTextDirection  direction);
709 GtkTextDirection gtk_style_context_get_direction (GtkStyleContext  *context);
710
711 void             gtk_style_context_set_junction_sides (GtkStyleContext  *context,
712                                                        GtkJunctionSides  sides);
713 GtkJunctionSides gtk_style_context_get_junction_sides (GtkStyleContext  *context);
714
715 gboolean gtk_style_context_lookup_color (GtkStyleContext *context,
716                                          const gchar     *color_name,
717                                          GdkRGBA         *color);
718
719 void  gtk_style_context_notify_state_change (GtkStyleContext *context,
720                                              GdkWindow       *window,
721                                              gpointer         region_id,
722                                              GtkStateType     state,
723                                              gboolean         state_value);
724 void  gtk_style_context_cancel_animations   (GtkStyleContext *context,
725                                              gpointer         region_id);
726 void  gtk_style_context_scroll_animations   (GtkStyleContext *context,
727                                              GdkWindow       *window,
728                                              gint             dx,
729                                              gint             dy);
730
731 void gtk_style_context_push_animatable_region (GtkStyleContext *context,
732                                                gpointer         region_id);
733 void gtk_style_context_pop_animatable_region  (GtkStyleContext *context);
734
735 /* Some helper functions to retrieve most common properties */
736 void gtk_style_context_get_color            (GtkStyleContext *context,
737                                              GtkStateFlags    state,
738                                              GdkRGBA         *color);
739 void gtk_style_context_get_background_color (GtkStyleContext *context,
740                                              GtkStateFlags    state,
741                                              GdkRGBA         *color);
742 void gtk_style_context_get_border_color     (GtkStyleContext *context,
743                                              GtkStateFlags    state,
744                                              GdkRGBA         *color);
745 const PangoFontDescription *
746      gtk_style_context_get_font             (GtkStyleContext *context,
747                                              GtkStateFlags    state);
748 void gtk_style_context_get_border           (GtkStyleContext *context,
749                                              GtkStateFlags    state,
750                                              GtkBorder       *border);
751 void gtk_style_context_get_padding          (GtkStyleContext *context,
752                                              GtkStateFlags    state,
753                                              GtkBorder       *padding);
754 void gtk_style_context_get_margin           (GtkStyleContext *context,
755                                              GtkStateFlags    state,
756                                              GtkBorder       *margin);
757
758 void gtk_style_context_invalidate           (GtkStyleContext *context);
759 void gtk_style_context_reset_widgets        (GdkScreen       *screen);
760
761 void gtk_style_context_set_background       (GtkStyleContext *context,
762                                              GdkWindow       *window);
763
764 /* Paint methods */
765 void        gtk_render_check       (GtkStyleContext     *context,
766                                     cairo_t             *cr,
767                                     gdouble              x,
768                                     gdouble              y,
769                                     gdouble              width,
770                                     gdouble              height);
771 void        gtk_render_option      (GtkStyleContext     *context,
772                                     cairo_t             *cr,
773                                     gdouble              x,
774                                     gdouble              y,
775                                     gdouble              width,
776                                     gdouble              height);
777 void        gtk_render_arrow       (GtkStyleContext     *context,
778                                     cairo_t             *cr,
779                                     gdouble              angle,
780                                     gdouble              x,
781                                     gdouble              y,
782                                     gdouble              size);
783 void        gtk_render_background  (GtkStyleContext     *context,
784                                     cairo_t             *cr,
785                                     gdouble              x,
786                                     gdouble              y,
787                                     gdouble              width,
788                                     gdouble              height);
789 void        gtk_render_frame       (GtkStyleContext     *context,
790                                     cairo_t             *cr,
791                                     gdouble              x,
792                                     gdouble              y,
793                                     gdouble              width,
794                                     gdouble              height);
795 void        gtk_render_expander    (GtkStyleContext     *context,
796                                     cairo_t             *cr,
797                                     gdouble              x,
798                                     gdouble              y,
799                                     gdouble              width,
800                                     gdouble              height);
801 void        gtk_render_focus       (GtkStyleContext     *context,
802                                     cairo_t             *cr,
803                                     gdouble              x,
804                                     gdouble              y,
805                                     gdouble              width,
806                                     gdouble              height);
807 void        gtk_render_layout      (GtkStyleContext     *context,
808                                     cairo_t             *cr,
809                                     gdouble              x,
810                                     gdouble              y,
811                                     PangoLayout         *layout);
812 void        gtk_render_line        (GtkStyleContext     *context,
813                                     cairo_t             *cr,
814                                     gdouble              x0,
815                                     gdouble              y0,
816                                     gdouble              x1,
817                                     gdouble              y1);
818 void        gtk_render_slider      (GtkStyleContext     *context,
819                                     cairo_t             *cr,
820                                     gdouble              x,
821                                     gdouble              y,
822                                     gdouble              width,
823                                     gdouble              height,
824                                     GtkOrientation       orientation);
825 void        gtk_render_frame_gap   (GtkStyleContext     *context,
826                                     cairo_t             *cr,
827                                     gdouble              x,
828                                     gdouble              y,
829                                     gdouble              width,
830                                     gdouble              height,
831                                     GtkPositionType      gap_side,
832                                     gdouble              xy0_gap,
833                                     gdouble              xy1_gap);
834 void        gtk_render_extension   (GtkStyleContext     *context,
835                                     cairo_t             *cr,
836                                     gdouble              x,
837                                     gdouble              y,
838                                     gdouble              width,
839                                     gdouble              height,
840                                     GtkPositionType      gap_side);
841 void        gtk_render_handle      (GtkStyleContext     *context,
842                                     cairo_t             *cr,
843                                     gdouble              x,
844                                     gdouble              y,
845                                     gdouble              width,
846                                     gdouble              height);
847 void        gtk_render_activity    (GtkStyleContext     *context,
848                                     cairo_t             *cr,
849                                     gdouble              x,
850                                     gdouble              y,
851                                     gdouble              width,
852                                     gdouble              height);
853 GdkPixbuf * gtk_render_icon_pixbuf (GtkStyleContext     *context,
854                                     const GtkIconSource *source,
855                                     GtkIconSize          size);
856 void        gtk_render_icon        (GtkStyleContext     *context,
857                                     cairo_t             *cr,
858                                     GdkPixbuf           *pixbuf,
859                                     gdouble              x,
860                                     gdouble              y);
861
862 /* Accessibility support */
863 AtkAttributeSet *_gtk_style_context_get_attributes (AtkAttributeSet *attributes,
864                                                     GtkStyleContext *context,
865                                                     GtkStateFlags    flags);
866
867 G_END_DECLS
868
869 #endif /* __GTK_STYLE_CONTEXT_H__ */