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