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 GtkStyleClass *parent_class;
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 (image->match_data.detail &&
78 (!image->match_data.detail ||
79 strcmp (match_data->detail, image->match_data.detail) != 0))
89 draw_simple_image(GtkStyle *style,
93 ThemeMatchData *match_data,
102 gboolean setbg = FALSE;
104 if ((width == -1) && (height == -1))
106 gdk_window_get_size(window, &width, &height);
110 else if (width == -1)
111 gdk_window_get_size(window, &width, NULL);
112 else if (height == -1)
113 gdk_window_get_size(window, NULL, &height);
115 if (!(match_data->flags & THEME_MATCH_ORIENTATION))
117 match_data->flags |= THEME_MATCH_ORIENTATION;
120 match_data->orientation = GTK_ORIENTATION_VERTICAL;
122 match_data->orientation = GTK_ORIENTATION_HORIZONTAL;
125 image = match_theme_image (style, match_data);
128 if (image->background)
130 GdkBitmap *mask = NULL;
132 if (image->background->stretch && setbg &&
133 !GDK_IS_PIXMAP (window))
135 GdkPixbuf *pixbuf = theme_pixbuf_get_pixbuf (image->background);
136 if (pixbuf && gdk_pixbuf_get_has_alpha (pixbuf))
137 mask = gdk_pixmap_new (window, width, height, 1);
140 theme_pixbuf_render (image->background,
142 draw_center ? COMPONENT_ALL : COMPONENT_ALL | COMPONENT_CENTER,
144 x, y, width, height);
148 gdk_window_shape_combine_mask (window, mask, 0, 0);
149 gdk_pixmap_unref (mask);
153 if (image->overlay && draw_center)
154 theme_pixbuf_render (image->overlay,
155 window, NULL, area, COMPONENT_ALL,
157 x, y, width, height);
166 draw_gap_image(GtkStyle *style,
170 ThemeMatchData *match_data,
171 gboolean draw_center,
176 GtkPositionType gap_side,
181 gboolean setbg = FALSE;
183 if ((width == -1) && (height == -1))
185 gdk_window_get_size(window, &width, &height);
188 else if (width == -1)
189 gdk_window_get_size(window, &width, NULL);
190 else if (height == -1)
191 gdk_window_get_size(window, NULL, &height);
193 if (!(match_data->flags & THEME_MATCH_ORIENTATION))
195 match_data->flags |= THEME_MATCH_ORIENTATION;
198 match_data->orientation = GTK_ORIENTATION_VERTICAL;
200 match_data->orientation = GTK_ORIENTATION_HORIZONTAL;
203 match_data->flags |= THEME_MATCH_GAP_SIDE;
204 match_data->gap_side = gap_side;
206 image = match_theme_image (style, match_data);
210 GdkRectangle r1, r2, r3;
211 GdkPixbuf *pixbuf = NULL;
212 guint components = COMPONENT_ALL;
215 components |= COMPONENT_CENTER;
217 if (image->gap_start)
218 pixbuf = theme_pixbuf_get_pixbuf (image->gap_start);
224 thickness = gdk_pixbuf_get_height (pixbuf);
226 thickness = style->ythickness;
229 components |= COMPONENT_NORTH_WEST | COMPONENT_NORTH | COMPONENT_NORTH_EAST;
234 r1.height = thickness;
237 r2.width = gap_width;
238 r2.height = thickness;
239 r3.x = x + gap_x + gap_width;
241 r3.width = width - (gap_x + gap_width);
242 r3.height = thickness;
247 thickness = gdk_pixbuf_get_height (pixbuf);
249 thickness = style->ythickness;
252 components |= COMPONENT_SOUTH_WEST | COMPONENT_SOUTH | COMPONENT_SOUTH_EAST;
255 r1.y = y + height - thickness;
257 r1.height = thickness;
259 r2.y = y + height - thickness;
260 r2.width = gap_width;
261 r2.height = thickness;
262 r3.x = x + gap_x + gap_width;
263 r3.y = y + height - thickness;
264 r3.width = width - (gap_x + gap_width);
265 r3.height = thickness;
270 thickness = gdk_pixbuf_get_width (pixbuf);
272 thickness = style->xthickness;
275 components |= COMPONENT_NORTH_WEST | COMPONENT_WEST | COMPONENT_SOUTH_WEST;
279 r1.width = thickness;
283 r2.width = thickness;
284 r2.height = gap_width;
286 r3.y = y + gap_x + gap_width;
287 r3.width = thickness;
288 r3.height = height - (gap_x + gap_width);
293 thickness = gdk_pixbuf_get_width (pixbuf);
295 thickness = style->xthickness;
298 components |= COMPONENT_NORTH_EAST | COMPONENT_EAST | COMPONENT_SOUTH_EAST;
300 r1.x = x + width - thickness;
302 r1.width = thickness;
304 r2.x = x + width - thickness;
306 r2.width = thickness;
307 r2.height = gap_width;
308 r3.x = x + width - thickness;
309 r3.y = y + gap_x + gap_width;
310 r3.width = thickness;
311 r3.height = height - (gap_x + gap_width);
315 if (image->background)
316 theme_pixbuf_render (image->background,
317 window, NULL, area, components, FALSE,
318 x, y, width, height);
319 if (image->gap_start)
320 theme_pixbuf_render (image->gap_start,
321 window, NULL, area, COMPONENT_ALL, FALSE,
322 r1.x, r1.y, r1.width, r1.height);
324 theme_pixbuf_render (image->gap,
325 window, NULL, area, COMPONENT_ALL, FALSE,
326 r2.x, r2.y, r2.width, r2.height);
328 theme_pixbuf_render (image->gap_end,
329 window, NULL, area, COMPONENT_ALL, FALSE,
330 r3.x, r3.y, r3.width, r3.height);
339 draw_hline (GtkStyle *style,
350 ThemeMatchData match_data;
352 g_return_if_fail(style != NULL);
353 g_return_if_fail(window != NULL);
355 match_data.function = TOKEN_D_HLINE;
356 match_data.detail = (gchar *)detail;
357 match_data.flags = THEME_MATCH_ORIENTATION | THEME_MATCH_STATE;
358 match_data.state = state;
359 match_data.orientation = GTK_ORIENTATION_HORIZONTAL;
361 image = match_theme_image (style, &match_data);
364 if (image->background)
365 theme_pixbuf_render (image->background,
366 window, NULL, area, COMPONENT_ALL, FALSE,
367 x1, y, (x2 - x1) + 1, 2);
370 parent_class->draw_hline (style, window, state, area, widget, detail,
375 draw_vline (GtkStyle *style,
386 ThemeMatchData match_data;
388 g_return_if_fail (style != NULL);
389 g_return_if_fail (window != NULL);
391 match_data.function = TOKEN_D_VLINE;
392 match_data.detail = (gchar *)detail;
393 match_data.flags = THEME_MATCH_ORIENTATION | THEME_MATCH_STATE;
394 match_data.state = state;
395 match_data.orientation = GTK_ORIENTATION_VERTICAL;
397 image = match_theme_image (style, &match_data);
400 if (image->background)
401 theme_pixbuf_render (image->background,
402 window, NULL, area, COMPONENT_ALL, FALSE,
403 x, y1, 2, (y2 - y1) + 1);
406 parent_class->draw_hline (style, window, state, area, widget, detail,
411 draw_shadow(GtkStyle *style,
414 GtkShadowType shadow,
423 ThemeMatchData match_data;
425 g_return_if_fail(style != NULL);
426 g_return_if_fail(window != NULL);
428 match_data.function = TOKEN_D_SHADOW;
429 match_data.detail = (gchar *)detail;
430 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
431 match_data.shadow = shadow;
432 match_data.state = state;
434 if (!draw_simple_image (style, window, area, widget, &match_data, FALSE, FALSE,
435 x, y, width, height))
436 parent_class->draw_shadow (style, window, state, shadow, area, widget, detail,
437 x, y, width, height);
441 draw_polygon(GtkStyle * style,
444 GtkShadowType shadow,
453 #define M_PI 3.14159265358979323846
456 #define M_PI_4 0.78539816339744830962
459 static const gdouble pi_over_4 = M_PI_4;
460 static const gdouble pi_3_over_4 = M_PI_4 * 3;
467 g_return_if_fail(style != NULL);
468 g_return_if_fail(window != NULL);
469 g_return_if_fail(points != NULL);
474 gc3 = style->light_gc[state];
475 gc4 = style->black_gc;
478 gc3 = style->black_gc;
479 gc4 = style->light_gc[state];
487 gdk_gc_set_clip_rectangle(gc3, area);
488 gdk_gc_set_clip_rectangle(gc4, area);
491 gdk_draw_polygon(window, style->bg_gc[state], TRUE, points, npoints);
495 for (i = 0; i < npoints; i++)
497 if ((points[i].x == points[i + 1].x) &&
498 (points[i].y == points[i + 1].y))
501 angle = atan2(points[i + 1].y - points[i].y,
502 points[i + 1].x - points[i].x);
504 if ((angle > -pi_3_over_4) && (angle < pi_over_4))
505 gdk_draw_line(window, gc3,
506 points[i].x, points[i].y,
507 points[i + 1].x, points[i + 1].y);
509 gdk_draw_line(window, gc4,
510 points[i].x, points[i].y,
511 points[i + 1].x, points[i + 1].y);
515 gdk_gc_set_clip_rectangle(gc3, NULL);
516 gdk_gc_set_clip_rectangle(gc4, NULL);
521 draw_arrow (GtkStyle *style,
524 GtkShadowType shadow,
528 GtkArrowType arrow_direction,
535 ThemeMatchData match_data;
537 g_return_if_fail(style != NULL);
538 g_return_if_fail(window != NULL);
540 match_data.function = TOKEN_D_ARROW;
541 match_data.detail = (gchar *)detail;
542 match_data.flags = (THEME_MATCH_SHADOW |
544 THEME_MATCH_ARROW_DIRECTION);
545 match_data.shadow = shadow;
546 match_data.state = state;
547 match_data.arrow_direction = arrow_direction;
549 if (!draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE,
550 x, y, width, height))
551 parent_class->draw_arrow (style, window, state, shadow, area, widget, detail,
552 arrow_direction, fill, x, y, width, height);
556 draw_diamond (GtkStyle *style,
559 GtkShadowType shadow,
568 ThemeMatchData match_data;
570 g_return_if_fail(style != NULL);
571 g_return_if_fail(window != NULL);
573 match_data.function = TOKEN_D_DIAMOND;
574 match_data.detail = (gchar *)detail;
575 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
576 match_data.shadow = shadow;
577 match_data.state = state;
579 if (!draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE,
580 x, y, width, height))
581 parent_class->draw_diamond (style, window, state, shadow, area, widget, detail,
582 x, y, width, height);
586 draw_oval (GtkStyle *style,
589 GtkShadowType shadow,
598 ThemeMatchData match_data;
600 g_return_if_fail(style != NULL);
601 g_return_if_fail(window != NULL);
603 match_data.function = TOKEN_D_OVAL;
604 match_data.detail = (gchar *)detail;
605 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
606 match_data.shadow = shadow;
607 match_data.state = state;
609 if (!draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE,
610 x, y, width, height))
611 parent_class->draw_oval (style, window, state, shadow, area, widget, detail,
612 x, y, width, height);
616 draw_string (GtkStyle * style,
624 const gchar * string)
626 g_return_if_fail(style != NULL);
627 g_return_if_fail(window != NULL);
629 if (state == GTK_STATE_INSENSITIVE)
633 gdk_gc_set_clip_rectangle(style->white_gc, area);
634 gdk_gc_set_clip_rectangle(style->fg_gc[state], area);
637 gdk_draw_string(window, style->font, style->fg_gc[state], x, y, string);
641 gdk_gc_set_clip_rectangle(style->white_gc, NULL);
642 gdk_gc_set_clip_rectangle(style->fg_gc[state], NULL);
647 gdk_gc_set_clip_rectangle(style->fg_gc[state], area);
648 gdk_draw_string(window, style->font, style->fg_gc[state], x, y, string);
649 gdk_gc_set_clip_rectangle(style->fg_gc[state], NULL);
654 draw_box (GtkStyle *style,
657 GtkShadowType shadow,
666 ThemeMatchData match_data;
668 g_return_if_fail(style != NULL);
669 g_return_if_fail(window != NULL);
671 match_data.function = TOKEN_D_BOX;
672 match_data.detail = (gchar *)detail;
673 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
674 match_data.shadow = shadow;
675 match_data.state = state;
677 if (!draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE,
678 x, y, width, height))
679 parent_class->draw_box (style, window, state, shadow, area, widget, detail,
680 x, y, width, height);
684 draw_flat_box (GtkStyle *style,
687 GtkShadowType shadow,
696 ThemeMatchData match_data;
698 g_return_if_fail(style != NULL);
699 g_return_if_fail(window != NULL);
701 match_data.function = TOKEN_D_FLAT_BOX;
702 match_data.detail = (gchar *)detail;
703 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
704 match_data.shadow = shadow;
705 match_data.state = state;
707 if (!draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE,
708 x, y, width, height))
709 parent_class->draw_flat_box (style, window, state, shadow, area, widget, detail,
710 x, y, width, height);
714 draw_check (GtkStyle *style,
717 GtkShadowType shadow,
726 ThemeMatchData match_data;
728 g_return_if_fail(style != NULL);
729 g_return_if_fail(window != NULL);
731 match_data.function = TOKEN_D_CHECK;
732 match_data.detail = (gchar *)detail;
733 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
734 match_data.shadow = shadow;
735 match_data.state = state;
737 if (!draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE,
738 x, y, width, height))
739 parent_class->draw_check (style, window, state, shadow, area, widget, detail,
740 x, y, width, height);
744 draw_option (GtkStyle *style,
747 GtkShadowType shadow,
756 ThemeMatchData match_data;
758 g_return_if_fail(style != NULL);
759 g_return_if_fail(window != NULL);
761 match_data.function = TOKEN_D_OPTION;
762 match_data.detail = (gchar *)detail;
763 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
764 match_data.shadow = shadow;
765 match_data.state = state;
767 if (!draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE,
768 x, y, width, height))
769 parent_class->draw_option (style, window, state, shadow, area, widget, detail,
770 x, y, width, height);
774 draw_cross (GtkStyle *style,
777 GtkShadowType shadow,
786 ThemeMatchData match_data;
788 g_return_if_fail(style != NULL);
789 g_return_if_fail(window != NULL);
791 match_data.function = TOKEN_D_CROSS;
792 match_data.detail = (gchar *)detail;
793 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
794 match_data.shadow = shadow;
795 match_data.state = state;
797 if (!draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE,
798 x, y, width, height))
799 parent_class->draw_cross (style, window, state, shadow, area, widget, detail,
800 x, y, width, height);
804 draw_ramp (GtkStyle *style,
807 GtkShadowType shadow,
811 GtkArrowType arrow_direction,
817 ThemeMatchData match_data;
819 g_return_if_fail(style != NULL);
820 g_return_if_fail(window != NULL);
822 match_data.function = TOKEN_D_RAMP;
823 match_data.detail = (gchar *)detail;
824 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
825 match_data.shadow = shadow;
826 match_data.state = state;
828 if (!draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE,
829 x, y, width, height))
830 parent_class->draw_ramp (style, window, state, shadow, area, widget, detail,
831 arrow_direction, x, y, width, height);
835 draw_tab (GtkStyle *style,
838 GtkShadowType shadow,
847 ThemeMatchData match_data;
849 g_return_if_fail(style != NULL);
850 g_return_if_fail(window != NULL);
852 match_data.function = TOKEN_D_TAB;
853 match_data.detail = (gchar *)detail;
854 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
855 match_data.shadow = shadow;
856 match_data.state = state;
858 if (!draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE,
859 x, y, width, height))
860 parent_class->draw_tab (style, window, state, shadow, area, widget, detail,
861 x, y, width, height);
865 draw_shadow_gap (GtkStyle *style,
868 GtkShadowType shadow,
876 GtkPositionType gap_side,
880 ThemeMatchData match_data;
882 match_data.function = TOKEN_D_SHADOW_GAP;
883 match_data.detail = (gchar *)detail;
884 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
885 match_data.flags = (THEME_MATCH_SHADOW |
887 THEME_MATCH_ORIENTATION);
888 match_data.shadow = shadow;
889 match_data.state = state;
891 if (!draw_gap_image (style, window, area, widget, &match_data, FALSE,
892 x, y, width, height, gap_side, gap_x, gap_width))
893 parent_class->draw_shadow_gap (style, window, state, shadow, area, widget, detail,
894 x, y, width, height, gap_side, gap_x, gap_width);
898 draw_box_gap (GtkStyle *style,
901 GtkShadowType shadow,
909 GtkPositionType gap_side,
913 ThemeMatchData match_data;
915 match_data.function = TOKEN_D_BOX_GAP;
916 match_data.detail = (gchar *)detail;
917 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
918 match_data.flags = (THEME_MATCH_SHADOW |
920 THEME_MATCH_ORIENTATION);
921 match_data.shadow = shadow;
922 match_data.state = state;
924 if (!draw_gap_image (style, window, area, widget, &match_data, TRUE,
925 x, y, width, height, gap_side, gap_x, gap_width))
926 parent_class->draw_box_gap (style, window, state, shadow, area, widget, detail,
927 x, y, width, height, gap_side, gap_x, gap_width);
931 draw_extension (GtkStyle *style,
934 GtkShadowType shadow,
942 GtkPositionType gap_side)
944 ThemeMatchData match_data;
946 g_return_if_fail(style != NULL);
947 g_return_if_fail(window != NULL);
955 match_data.function = TOKEN_D_EXTENSION;
956 match_data.detail = (gchar *)detail;
957 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE | THEME_MATCH_GAP_SIDE;
958 match_data.shadow = shadow;
959 match_data.state = state;
960 match_data.gap_side = gap_side;
962 if (!draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE,
963 x, y, width, height))
964 parent_class->draw_extension (style, window, state, shadow, area, widget, detail,
965 x, y, width, height, gap_side);
969 draw_focus (GtkStyle *style,
979 ThemeMatchData match_data;
981 g_return_if_fail(style != NULL);
982 g_return_if_fail(window != NULL);
990 match_data.function = TOKEN_D_FOCUS;
991 match_data.detail = (gchar *)detail;
992 match_data.flags = 0;
994 if (!draw_simple_image (style, window, area, widget, &match_data, TRUE, FALSE,
995 x, y, width, height))
996 parent_class->draw_focus (style, window, area, widget, detail,
997 x, y, width, height);
1001 draw_slider (GtkStyle *style,
1004 GtkShadowType shadow,
1007 const gchar *detail,
1012 GtkOrientation orientation)
1014 ThemeMatchData match_data;
1016 g_return_if_fail(style != NULL);
1017 g_return_if_fail(window != NULL);
1019 match_data.function = TOKEN_D_SLIDER;
1020 match_data.detail = (gchar *)detail;
1021 match_data.flags = (THEME_MATCH_SHADOW |
1023 THEME_MATCH_ORIENTATION);
1024 match_data.shadow = shadow;
1025 match_data.state = state;
1026 match_data.orientation = orientation;
1028 if (!draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE,
1029 x, y, width, height))
1030 parent_class->draw_slider (style, window, state, shadow, area, widget, detail,
1031 x, y, width, height, orientation);
1036 draw_handle (GtkStyle *style,
1039 GtkShadowType shadow,
1042 const gchar *detail,
1047 GtkOrientation orientation)
1049 ThemeMatchData match_data;
1051 g_return_if_fail (style != NULL);
1052 g_return_if_fail (window != NULL);
1054 match_data.function = TOKEN_D_HANDLE;
1055 match_data.detail = (gchar *)detail;
1056 match_data.flags = (THEME_MATCH_SHADOW |
1058 THEME_MATCH_ORIENTATION);
1059 match_data.shadow = shadow;
1060 match_data.state = state;
1061 match_data.orientation = orientation;
1063 if (!draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE,
1064 x, y, width, height))
1065 parent_class->draw_handle (style, window, state, shadow, area, widget, detail,
1066 x, y, width, height, orientation);
1069 GType pixbuf_type_style = 0;
1072 pixbuf_style_register_type (GtkThemeEngine *engine)
1074 static const GTypeInfo object_info =
1076 sizeof (PixbufStyleClass),
1077 (GBaseInitFunc) NULL,
1078 (GBaseFinalizeFunc) NULL,
1079 (GClassInitFunc) pixbuf_style_class_init,
1080 NULL, /* class_finalize */
1081 NULL, /* class_data */
1082 sizeof (PixbufStyle),
1083 0, /* n_preallocs */
1084 (GInstanceInitFunc) pixbuf_style_init,
1087 pixbuf_type_style = gtk_theme_engine_register_type (engine,
1094 pixbuf_style_init (PixbufStyle *style)
1099 pixbuf_style_class_init (PixbufStyleClass *klass)
1101 GtkStyleClass *style_class = GTK_STYLE_CLASS (klass);
1103 parent_class = g_type_class_peek_parent (klass);
1105 style_class->draw_hline = draw_hline;
1106 style_class->draw_vline = draw_vline;
1107 style_class->draw_shadow = draw_shadow;
1108 style_class->draw_polygon = draw_polygon;
1109 style_class->draw_arrow = draw_arrow;
1110 style_class->draw_diamond = draw_diamond;
1111 style_class->draw_oval = draw_oval;
1112 style_class->draw_string = draw_string;
1113 style_class->draw_box = draw_box;
1114 style_class->draw_flat_box = draw_flat_box;
1115 style_class->draw_check = draw_check;
1116 style_class->draw_option = draw_option;
1117 style_class->draw_cross = draw_cross;
1118 style_class->draw_ramp = draw_ramp;
1119 style_class->draw_tab = draw_tab;
1120 style_class->draw_shadow_gap = draw_shadow_gap;
1121 style_class->draw_box_gap = draw_box_gap;
1122 style_class->draw_extension = draw_extension;
1123 style_class->draw_focus = draw_focus;
1124 style_class->draw_slider = draw_slider;
1125 style_class->draw_handle = draw_handle;