2 * Copyright (C) 1998-2000 Red Hat, Inc.
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library 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.
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 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library 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.
19 * Written by Owen Taylor <otaylor@redhat.com>, based on code by
20 * Carsten Haitzler <raster@rasterman.com>
27 #include "pixbuf-rc-style.h"
28 #include "pixbuf-style.h"
30 static void pixbuf_style_init (PixbufStyle *style);
31 static void pixbuf_style_class_init (PixbufStyleClass *klass);
33 static GtkStyleClass *parent_class = NULL;
36 match_theme_image (GtkStyle *style,
37 ThemeMatchData *match_data)
41 tmp_list = PIXBUF_RC_STYLE (style->rc_style)->img_list;
46 ThemeImage *image = tmp_list->data;
47 tmp_list = tmp_list->next;
49 if (match_data->function != image->match_data.function)
52 flags = match_data->flags & image->match_data.flags;
54 if (flags != image->match_data.flags) /* Required components not present */
57 if ((flags & THEME_MATCH_STATE) &&
58 match_data->state != image->match_data.state)
61 if ((flags & THEME_MATCH_SHADOW) &&
62 match_data->shadow != image->match_data.shadow)
65 if ((flags & THEME_MATCH_ARROW_DIRECTION) &&
66 match_data->arrow_direction != image->match_data.arrow_direction)
69 if ((flags & THEME_MATCH_ORIENTATION) &&
70 match_data->orientation != image->match_data.orientation)
73 if ((flags & THEME_MATCH_GAP_SIDE) &&
74 match_data->gap_side != image->match_data.gap_side)
77 if ((flags & THEME_MATCH_EXPANDER_STYLE) &&
78 match_data->expander_style != image->match_data.expander_style)
81 if ((flags & THEME_MATCH_WINDOW_EDGE) &&
82 match_data->window_edge != image->match_data.window_edge)
85 if (image->match_data.detail &&
86 (!match_data->detail ||
87 strcmp (match_data->detail, image->match_data.detail) != 0))
97 draw_simple_image(GtkStyle *style,
100 ThemeMatchData *match_data,
101 gboolean draw_center,
102 gboolean allow_setbg,
111 if (!(match_data->flags & THEME_MATCH_ORIENTATION))
113 match_data->flags |= THEME_MATCH_ORIENTATION;
116 match_data->orientation = GTK_ORIENTATION_VERTICAL;
118 match_data->orientation = GTK_ORIENTATION_HORIZONTAL;
121 image = match_theme_image (style, match_data);
124 if (image->background)
126 theme_pixbuf_render (image->background, cr,
127 draw_center ? COMPONENT_ALL : COMPONENT_ALL | COMPONENT_CENTER,
129 x, y, width, height);
132 if (image->overlay && draw_center)
133 theme_pixbuf_render (image->overlay, cr, COMPONENT_ALL,
135 x, y, width, height);
144 draw_simple_image_no_cairo(GtkStyle *style,
148 ThemeMatchData *match_data,
149 gboolean draw_center,
150 gboolean allow_setbg,
159 if ((width == -1) && (height == -1))
160 gdk_drawable_get_size(window, &width, &height);
161 else if (width == -1)
162 gdk_drawable_get_size(window, &width, NULL);
163 else if (height == -1)
164 gdk_drawable_get_size(window, NULL, &height);
166 cr = gdk_cairo_create (window);
169 gdk_cairo_rectangle (cr, area);
173 result = draw_simple_image (style, cr, widget, match_data,
174 draw_center, allow_setbg,
175 x, y, width, height);
183 draw_gap_image(GtkStyle *style,
186 ThemeMatchData *match_data,
187 gboolean draw_center,
192 GtkPositionType gap_side,
198 if (!(match_data->flags & THEME_MATCH_ORIENTATION))
200 match_data->flags |= THEME_MATCH_ORIENTATION;
203 match_data->orientation = GTK_ORIENTATION_VERTICAL;
205 match_data->orientation = GTK_ORIENTATION_HORIZONTAL;
208 match_data->flags |= THEME_MATCH_GAP_SIDE;
209 match_data->gap_side = gap_side;
211 image = match_theme_image (style, match_data);
215 GdkRectangle r1, r2, r3;
216 GdkPixbuf *pixbuf = NULL;
217 guint components = COMPONENT_ALL;
220 components |= COMPONENT_CENTER;
222 if (image->gap_start)
223 pixbuf = theme_pixbuf_get_pixbuf (image->gap_start);
229 thickness = gdk_pixbuf_get_height (pixbuf);
231 thickness = style->ythickness;
234 components |= COMPONENT_NORTH_WEST | COMPONENT_NORTH | COMPONENT_NORTH_EAST;
239 r1.height = thickness;
242 r2.width = gap_width;
243 r2.height = thickness;
244 r3.x = x + gap_x + gap_width;
246 r3.width = width - (gap_x + gap_width);
247 r3.height = thickness;
252 thickness = gdk_pixbuf_get_height (pixbuf);
254 thickness = style->ythickness;
257 components |= COMPONENT_SOUTH_WEST | COMPONENT_SOUTH | COMPONENT_SOUTH_EAST;
260 r1.y = y + height - thickness;
262 r1.height = thickness;
264 r2.y = y + height - thickness;
265 r2.width = gap_width;
266 r2.height = thickness;
267 r3.x = x + gap_x + gap_width;
268 r3.y = y + height - thickness;
269 r3.width = width - (gap_x + gap_width);
270 r3.height = thickness;
275 thickness = gdk_pixbuf_get_width (pixbuf);
277 thickness = style->xthickness;
280 components |= COMPONENT_NORTH_WEST | COMPONENT_WEST | COMPONENT_SOUTH_WEST;
284 r1.width = thickness;
288 r2.width = thickness;
289 r2.height = gap_width;
291 r3.y = y + gap_x + gap_width;
292 r3.width = thickness;
293 r3.height = height - (gap_x + gap_width);
298 thickness = gdk_pixbuf_get_width (pixbuf);
300 thickness = style->xthickness;
303 components |= COMPONENT_NORTH_EAST | COMPONENT_EAST | COMPONENT_SOUTH_EAST;
305 r1.x = x + width - thickness;
307 r1.width = thickness;
309 r2.x = x + width - thickness;
311 r2.width = thickness;
312 r2.height = gap_width;
313 r3.x = x + width - thickness;
314 r3.y = y + gap_x + gap_width;
315 r3.width = thickness;
316 r3.height = height - (gap_x + gap_width);
320 g_assert_not_reached ();
323 if (image->background)
324 theme_pixbuf_render (image->background,
325 cr, components, FALSE,
326 x, y, width, height);
327 if (image->gap_start)
328 theme_pixbuf_render (image->gap_start,
329 cr, COMPONENT_ALL, FALSE,
330 r1.x, r1.y, r1.width, r1.height);
332 theme_pixbuf_render (image->gap,
333 cr, COMPONENT_ALL, FALSE,
334 r2.x, r2.y, r2.width, r2.height);
336 theme_pixbuf_render (image->gap_end,
337 cr, COMPONENT_ALL, FALSE,
338 r3.x, r3.y, r3.width, r3.height);
347 draw_gap_image_no_cairo(GtkStyle *style,
351 ThemeMatchData *match_data,
352 gboolean draw_center,
357 GtkPositionType gap_side,
364 if ((width == -1) && (height == -1))
365 gdk_drawable_get_size(window, &width, &height);
366 else if (width == -1)
367 gdk_drawable_get_size(window, &width, NULL);
368 else if (height == -1)
369 gdk_drawable_get_size(window, NULL, &height);
371 cr = gdk_cairo_create (window);
374 gdk_cairo_rectangle (cr, area);
378 result = draw_gap_image (style, cr, widget, match_data,
379 draw_center, x, y, width, height,
380 gap_side, gap_x, gap_width);
388 draw_hline (GtkStyle *style,
398 ThemeMatchData match_data;
400 match_data.function = TOKEN_D_HLINE;
401 match_data.detail = (gchar *)detail;
402 match_data.flags = THEME_MATCH_ORIENTATION | THEME_MATCH_STATE;
403 match_data.state = state;
404 match_data.orientation = GTK_ORIENTATION_HORIZONTAL;
406 image = match_theme_image (style, &match_data);
409 if (image->background)
410 theme_pixbuf_render (image->background,
411 cr, COMPONENT_ALL, FALSE,
412 x1, y, (x2 - x1) + 1, 2);
415 parent_class->draw_hline (style, cr, state, widget, detail,
420 draw_vline (GtkStyle *style,
430 ThemeMatchData match_data;
432 match_data.function = TOKEN_D_VLINE;
433 match_data.detail = (gchar *)detail;
434 match_data.flags = THEME_MATCH_ORIENTATION | THEME_MATCH_STATE;
435 match_data.state = state;
436 match_data.orientation = GTK_ORIENTATION_VERTICAL;
438 image = match_theme_image (style, &match_data);
441 if (image->background)
442 theme_pixbuf_render (image->background,
443 cr, COMPONENT_ALL, FALSE,
444 x, y1, 2, (y2 - y1) + 1);
447 parent_class->draw_vline (style, cr, state, widget, detail,
452 draw_shadow(GtkStyle *style,
455 GtkShadowType shadow,
463 ThemeMatchData match_data;
465 match_data.function = TOKEN_D_SHADOW;
466 match_data.detail = (gchar *)detail;
467 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
468 match_data.shadow = shadow;
469 match_data.state = state;
471 if (!draw_simple_image (style, cr, widget, &match_data, FALSE, FALSE,
472 x, y, width, height))
473 parent_class->draw_shadow (style, cr, state, shadow, widget, detail,
474 x, y, width, height);
477 /* This function makes up for some brokeness in gtkrange.c
478 * where we never get the full arrow of the stepper button
479 * and the type of button in a single drawing function.
481 * It doesn't work correctly when the scrollbar is squished
482 * to the point we don't have room for full-sized steppers.
485 reverse_engineer_stepper_box (GtkWidget *range,
486 GtkArrowType arrow_type,
492 gint slider_width = 14, stepper_size = 14;
496 if (range && GTK_IS_RANGE (range))
498 gtk_widget_style_get (range,
499 "slider_width", &slider_width,
500 "stepper_size", &stepper_size,
504 if (arrow_type == GTK_ARROW_UP || arrow_type == GTK_ARROW_DOWN)
506 box_width = slider_width;
507 box_height = stepper_size;
511 box_width = stepper_size;
512 box_height = slider_width;
515 *x = *x - (box_width - *width) / 2;
516 *y = *y - (box_height - *height) / 2;
518 *height = box_height;
522 draw_arrow (GtkStyle *style,
525 GtkShadowType shadow,
528 GtkArrowType arrow_direction,
535 ThemeMatchData match_data;
538 (strcmp (detail, "hscrollbar") == 0 || strcmp (detail, "vscrollbar") == 0))
540 /* This is a hack to work around the fact that scrollbar steppers are drawn
541 * as a box + arrow, so we never have
543 * The full bounding box of the scrollbar
544 * The arrow direction
546 * At the same time. We simulate an extra paint function, "STEPPER", by doing
547 * nothing for the box, and then here, reverse engineering the box that
548 * was passed to draw box and using that
552 gint box_width = width;
553 gint box_height = height;
555 reverse_engineer_stepper_box (widget, arrow_direction,
556 &box_x, &box_y, &box_width, &box_height);
558 match_data.function = TOKEN_D_STEPPER;
559 match_data.detail = (gchar *)detail;
560 match_data.flags = (THEME_MATCH_SHADOW |
562 THEME_MATCH_ARROW_DIRECTION);
563 match_data.shadow = shadow;
564 match_data.state = state;
565 match_data.arrow_direction = arrow_direction;
567 if (draw_simple_image (style, cr, widget, &match_data, TRUE, TRUE,
568 box_x, box_y, box_width, box_height))
570 /* The theme included stepper images, we're done */
574 /* Otherwise, draw the full box, and fall through to draw the arrow
576 match_data.function = TOKEN_D_BOX;
577 match_data.detail = (gchar *)detail;
578 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
579 match_data.shadow = shadow;
580 match_data.state = state;
582 if (!draw_simple_image (style, cr, widget, &match_data, TRUE, TRUE,
583 box_x, box_y, box_width, box_height))
584 parent_class->draw_box (style, cr, state, shadow, widget, detail,
585 box_x, box_y, box_width, box_height);
589 match_data.function = TOKEN_D_ARROW;
590 match_data.detail = (gchar *)detail;
591 match_data.flags = (THEME_MATCH_SHADOW |
593 THEME_MATCH_ARROW_DIRECTION);
594 match_data.shadow = shadow;
595 match_data.state = state;
596 match_data.arrow_direction = arrow_direction;
598 if (!draw_simple_image (style, cr, widget, &match_data, TRUE, TRUE,
599 x, y, width, height))
600 parent_class->draw_arrow (style, cr, state, shadow, widget, detail,
601 arrow_direction, fill, x, y, width, height);
605 draw_diamond (GtkStyle *style,
608 GtkShadowType shadow,
616 ThemeMatchData match_data;
618 match_data.function = TOKEN_D_DIAMOND;
619 match_data.detail = (gchar *)detail;
620 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
621 match_data.shadow = shadow;
622 match_data.state = state;
624 if (!draw_simple_image (style, cr, widget, &match_data, TRUE, TRUE,
625 x, y, width, height))
626 parent_class->draw_diamond (style, cr, state, shadow, widget, detail,
627 x, y, width, height);
631 draw_box (GtkStyle *style,
634 GtkShadowType shadow,
642 ThemeMatchData match_data;
645 (strcmp (detail, "hscrollbar") == 0 || strcmp (detail, "vscrollbar") == 0))
647 /* We handle this in draw_arrow */
651 match_data.function = TOKEN_D_BOX;
652 match_data.detail = (gchar *)detail;
653 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
654 match_data.shadow = shadow;
655 match_data.state = state;
657 if (!draw_simple_image (style, cr, widget, &match_data, TRUE, TRUE,
658 x, y, width, height)) {
659 parent_class->draw_box (style, cr, state, shadow, widget, detail,
660 x, y, width, height);
665 draw_flat_box (GtkStyle *style,
668 GtkShadowType shadow,
676 ThemeMatchData match_data;
678 match_data.function = TOKEN_D_FLAT_BOX;
679 match_data.detail = (gchar *)detail;
680 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
681 match_data.shadow = shadow;
682 match_data.state = state;
684 if (!draw_simple_image (style, cr, widget, &match_data, TRUE, TRUE,
685 x, y, width, height))
686 parent_class->draw_flat_box (style, cr, state, shadow, widget, detail,
687 x, y, width, height);
691 draw_check (GtkStyle *style,
694 GtkShadowType shadow,
703 ThemeMatchData match_data;
705 g_return_if_fail(style != NULL);
706 g_return_if_fail(window != NULL);
708 match_data.function = TOKEN_D_CHECK;
709 match_data.detail = (gchar *)detail;
710 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
711 match_data.shadow = shadow;
712 match_data.state = state;
714 if (!draw_simple_image_no_cairo (style, window, area, widget, &match_data, TRUE, TRUE,
715 x, y, width, height))
716 parent_class->draw_check (style, window, state, shadow, area, widget, detail,
717 x, y, width, height);
721 draw_option (GtkStyle *style,
724 GtkShadowType shadow,
733 ThemeMatchData match_data;
735 g_return_if_fail(style != NULL);
736 g_return_if_fail(window != NULL);
738 match_data.function = TOKEN_D_OPTION;
739 match_data.detail = (gchar *)detail;
740 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
741 match_data.shadow = shadow;
742 match_data.state = state;
744 if (!draw_simple_image_no_cairo (style, window, area, widget, &match_data, TRUE, TRUE,
745 x, y, width, height))
746 parent_class->draw_option (style, window, state, shadow, area, widget, detail,
747 x, y, width, height);
751 draw_tab (GtkStyle *style,
754 GtkShadowType shadow,
763 ThemeMatchData match_data;
765 g_return_if_fail(style != NULL);
766 g_return_if_fail(window != NULL);
768 match_data.function = TOKEN_D_TAB;
769 match_data.detail = (gchar *)detail;
770 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
771 match_data.shadow = shadow;
772 match_data.state = state;
774 if (!draw_simple_image_no_cairo (style, window, area, widget, &match_data, TRUE, TRUE,
775 x, y, width, height))
776 parent_class->draw_tab (style, window, state, shadow, area, widget, detail,
777 x, y, width, height);
781 draw_shadow_gap (GtkStyle *style,
784 GtkShadowType shadow,
792 GtkPositionType gap_side,
796 ThemeMatchData match_data;
798 match_data.function = TOKEN_D_SHADOW_GAP;
799 match_data.detail = (gchar *)detail;
800 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
801 match_data.flags = (THEME_MATCH_SHADOW |
803 THEME_MATCH_ORIENTATION);
804 match_data.shadow = shadow;
805 match_data.state = state;
807 if (!draw_gap_image_no_cairo (style, window, area, widget, &match_data, FALSE,
808 x, y, width, height, gap_side, gap_x, gap_width))
809 parent_class->draw_shadow_gap (style, window, state, shadow, area, widget, detail,
810 x, y, width, height, gap_side, gap_x, gap_width);
814 draw_box_gap (GtkStyle *style,
817 GtkShadowType shadow,
825 GtkPositionType gap_side,
829 ThemeMatchData match_data;
831 match_data.function = TOKEN_D_BOX_GAP;
832 match_data.detail = (gchar *)detail;
833 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
834 match_data.flags = (THEME_MATCH_SHADOW |
836 THEME_MATCH_ORIENTATION);
837 match_data.shadow = shadow;
838 match_data.state = state;
840 if (!draw_gap_image_no_cairo (style, window, area, widget, &match_data, TRUE,
841 x, y, width, height, gap_side, gap_x, gap_width))
842 parent_class->draw_box_gap (style, window, state, shadow, area, widget, detail,
843 x, y, width, height, gap_side, gap_x, gap_width);
847 draw_extension (GtkStyle *style,
850 GtkShadowType shadow,
858 GtkPositionType gap_side)
860 ThemeMatchData match_data;
862 g_return_if_fail (style != NULL);
863 g_return_if_fail (window != NULL);
865 match_data.function = TOKEN_D_EXTENSION;
866 match_data.detail = (gchar *)detail;
867 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE | THEME_MATCH_GAP_SIDE;
868 match_data.shadow = shadow;
869 match_data.state = state;
870 match_data.gap_side = gap_side;
872 if (!draw_simple_image_no_cairo (style, window, area, widget, &match_data, TRUE, TRUE,
873 x, y, width, height))
874 parent_class->draw_extension (style, window, state, shadow, area, widget, detail,
875 x, y, width, height, gap_side);
879 draw_focus (GtkStyle *style,
881 GtkStateType state_type,
890 ThemeMatchData match_data;
892 g_return_if_fail (style != NULL);
893 g_return_if_fail (window != NULL);
895 match_data.function = TOKEN_D_FOCUS;
896 match_data.detail = (gchar *)detail;
897 match_data.flags = 0;
899 if (!draw_simple_image_no_cairo (style, window, area, widget, &match_data, TRUE, FALSE,
900 x, y, width, height))
901 parent_class->draw_focus (style, window, state_type, area, widget, detail,
902 x, y, width, height);
906 draw_slider (GtkStyle *style,
909 GtkShadowType shadow,
917 GtkOrientation orientation)
919 ThemeMatchData match_data;
921 g_return_if_fail(style != NULL);
922 g_return_if_fail(window != NULL);
924 match_data.function = TOKEN_D_SLIDER;
925 match_data.detail = (gchar *)detail;
926 match_data.flags = (THEME_MATCH_SHADOW |
928 THEME_MATCH_ORIENTATION);
929 match_data.shadow = shadow;
930 match_data.state = state;
931 match_data.orientation = orientation;
933 if (!draw_simple_image_no_cairo (style, window, area, widget, &match_data, TRUE, TRUE,
934 x, y, width, height))
935 parent_class->draw_slider (style, window, state, shadow, area, widget, detail,
936 x, y, width, height, orientation);
941 draw_handle (GtkStyle *style,
944 GtkShadowType shadow,
952 GtkOrientation orientation)
954 ThemeMatchData match_data;
956 g_return_if_fail (style != NULL);
957 g_return_if_fail (window != NULL);
959 match_data.function = TOKEN_D_HANDLE;
960 match_data.detail = (gchar *)detail;
961 match_data.flags = (THEME_MATCH_SHADOW |
963 THEME_MATCH_ORIENTATION);
964 match_data.shadow = shadow;
965 match_data.state = state;
966 match_data.orientation = orientation;
968 if (!draw_simple_image_no_cairo (style, window, area, widget, &match_data, TRUE, TRUE,
969 x, y, width, height))
970 parent_class->draw_handle (style, window, state, shadow, area, widget, detail,
971 x, y, width, height, orientation);
975 draw_expander (GtkStyle *style,
983 GtkExpanderStyle expander_style)
985 #define DEFAULT_EXPANDER_SIZE 12
987 ThemeMatchData match_data;
991 g_return_if_fail (style != NULL);
992 g_return_if_fail (window != NULL);
995 gtk_widget_class_find_style_property (GTK_WIDGET_GET_CLASS (widget),
998 gtk_widget_style_get (widget,
999 "expander-size", &expander_size,
1003 expander_size = DEFAULT_EXPANDER_SIZE;
1005 radius = expander_size/2;
1007 match_data.function = TOKEN_D_EXPANDER;
1008 match_data.detail = (gchar *)detail;
1009 match_data.flags = (THEME_MATCH_STATE |
1010 THEME_MATCH_EXPANDER_STYLE);
1011 match_data.state = state;
1012 match_data.expander_style = expander_style;
1014 if (!draw_simple_image_no_cairo (style, window, area, widget, &match_data, TRUE, TRUE,
1015 x - radius, y - radius, expander_size, expander_size))
1016 parent_class->draw_expander (style, window, state, area, widget, detail,
1017 x, y, expander_style);
1021 draw_resize_grip (GtkStyle *style,
1026 const gchar *detail,
1033 ThemeMatchData match_data;
1035 g_return_if_fail (style != NULL);
1036 g_return_if_fail (window != NULL);
1038 match_data.function = TOKEN_D_RESIZE_GRIP;
1039 match_data.detail = (gchar *)detail;
1040 match_data.flags = (THEME_MATCH_STATE |
1041 THEME_MATCH_WINDOW_EDGE);
1042 match_data.state = state;
1043 match_data.window_edge = edge;
1045 if (!draw_simple_image_no_cairo (style, window, area, widget, &match_data, TRUE, TRUE,
1046 x, y, width, height))
1047 parent_class->draw_resize_grip (style, window, state, area, widget, detail,
1048 edge, x, y, width, height);
1051 GType pixbuf_type_style = 0;
1054 pixbuf_style_register_type (GTypeModule *module)
1056 const GTypeInfo object_info =
1058 sizeof (PixbufStyleClass),
1059 (GBaseInitFunc) NULL,
1060 (GBaseFinalizeFunc) NULL,
1061 (GClassInitFunc) pixbuf_style_class_init,
1062 NULL, /* class_finalize */
1063 NULL, /* class_data */
1064 sizeof (PixbufStyle),
1065 0, /* n_preallocs */
1066 (GInstanceInitFunc) pixbuf_style_init,
1069 pixbuf_type_style = g_type_module_register_type (module,
1076 pixbuf_style_init (PixbufStyle *style)
1081 pixbuf_style_class_init (PixbufStyleClass *klass)
1083 GtkStyleClass *style_class = GTK_STYLE_CLASS (klass);
1085 parent_class = g_type_class_peek_parent (klass);
1087 style_class->draw_hline = draw_hline;
1088 style_class->draw_vline = draw_vline;
1089 style_class->draw_shadow = draw_shadow;
1090 style_class->draw_arrow = draw_arrow;
1091 style_class->draw_diamond = draw_diamond;
1092 style_class->draw_box = draw_box;
1093 style_class->draw_flat_box = draw_flat_box;
1094 style_class->draw_check = draw_check;
1095 style_class->draw_option = draw_option;
1096 style_class->draw_tab = draw_tab;
1097 style_class->draw_shadow_gap = draw_shadow_gap;
1098 style_class->draw_box_gap = draw_box_gap;
1099 style_class->draw_extension = draw_extension;
1100 style_class->draw_focus = draw_focus;
1101 style_class->draw_slider = draw_slider;
1102 style_class->draw_handle = draw_handle;
1103 style_class->draw_expander = draw_expander;
1104 style_class->draw_resize_grip = draw_resize_grip;