456
456
sanitize_size(window, &width, &height);
459
printf("Arrow (%d,%d,%d,%d) Widget: %s Detail: %s\n", x, y, width, height,gtk_widget_get_name(widget),detail);
458
461
if (DETAIL("hscrollbar") || DETAIL("vscrollbar"))
460
463
if (DETAIL("spinbutton"))
470
473
GtkWidget* parent;
471
gpix = gdk_pixbuf_get_from_drawable(NULL, gtk_widget_get_parent_window(widget),NULL, x, y, 0, 0, width, height);
473
g_object_unref(gpix);
474
if (gdk_window_is_viewable(gtk_widget_get_parent_window(widget)))
476
gpix = gdk_pixbuf_get_from_drawable(NULL, gtk_widget_get_parent_window(widget),NULL, x, y, 0, 0, width, height);
478
g_object_unref(gpix);
475
481
parent = gtk_widget_get_parent(widget);
476
482
drawArrow(window,style, GTK_WIDGET_STATE(parent), arrow_type, x, y, width, height);
558
gpix = gdk_pixbuf_get_from_drawable(NULL, gtk_widget_get_parent_window(widget),NULL, x, y, 0, 0, width, height);
560
g_object_unref(gpix);
564
if (gdk_window_is_viewable(gtk_widget_get_parent_window(widget)))
566
gpix = gdk_pixbuf_get_from_drawable(NULL, gtk_widget_get_parent_window(widget),NULL, x, y, 0, 0, width, height);
568
g_object_unref(gpix);
562
571
drawArrow(window, style, state_type, arrow_type, x, y, width, height);
628
637
if (DETAIL("menubar"))
630
drawMenubar(window,style,state_type,x,y,width,height);
639
if (openOfficeFix == 1)
640
parent_class->draw_box (style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
642
drawMenubar(window,style,state_type,x,y,width,height);
633
645
if (DETAIL("menu"))
635
if ((x >= 0) && (y >= 0)) /* Work around weirdness in firefox */
636
drawMenu(window,style,state_type,x,y,width,height);
647
if (openOfficeFix == 1)
648
parent_class->draw_box (style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
651
if ((x >= 0) && (y >= 0)) /* Work around weirdness in firefox */
652
drawMenu(window,style,state_type,x,y,width,height);
639
656
if (GTK_IS_PROGRESS(widget) && DETAIL("trough"))
647
664
if (GTK_IS_PROGRESS(widget) && DETAIL("bar"))
666
if (area) gdk_gc_set_clip_rectangle(style->bg_gc[state_type], area);
649
668
drawProgressChunk(window,style,state_type,x,y,width,height);
670
if (area) gdk_gc_set_clip_rectangle(style->bg_gc[state_type], NULL);
652
673
if (GTK_IS_SCALE(widget) && DETAIL("trough"))
655
675
GtkAdjustment* adj;
656
gpix = gdk_pixbuf_get_from_drawable(NULL, gtk_widget_get_parent_window(widget),NULL, x, y, 0, 0, width, height);
658
g_object_unref(gpix);
677
GValue *val = (GValue*)g_malloc( sizeof(GValue) );
678
if (gdk_window_is_viewable(gtk_widget_get_parent_window(widget)))
681
gpix = gdk_pixbuf_get_from_drawable(NULL, gtk_widget_get_parent_window(widget),NULL, x, y, 0, 0, width, height);
683
g_object_unref(gpix);
686
memset( val, 0, sizeof(GValue) );
687
g_value_init( val, G_TYPE_BOOLEAN );
688
g_object_get_property(widget, "inverted", val);
689
inverted = g_value_get_boolean(val);
660
693
adj = gtk_range_get_adjustment((GtkRange *) widget);
661
drawSlider(window,style,state_type,adj,x,y,width,height, (GTK_RANGE(widget))->orientation);
694
drawSlider(window,style,state_type,adj,x,y,width,height, (GTK_RANGE(widget))->orientation, inverted);
664
697
if (DETAIL("button"))
768
801
if (DETAIL("toolbar"))
770
drawToolbar(window,style,state_type,x,y,width,height);
803
if (openOfficeFix == 1)
804
parent_class->draw_box (style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
806
drawToolbar(window,style,state_type,x,y,width,height);
773
809
if (DETAIL("spinbutton_up"))
902
printf("Check (%d,%d,%d,%d) Widget: %s Detail: %s\n", x, y, width, height,gtk_widget_get_name(widget),detail);
865
904
if (GTK_IS_MENU_ITEM(widget))
867
906
if (shadow_type == GTK_SHADOW_IN)
870
gpix = gdk_pixbuf_get_from_drawable(NULL, gtk_widget_get_parent_window(widget), NULL, x, y, 0, 0, width, height);
872
g_object_unref(gpix);
908
if (gdk_window_is_viewable(gtk_widget_get_parent_window(widget)))
911
gpix = gdk_pixbuf_get_from_drawable(NULL, gtk_widget_get_parent_window(widget), NULL, x, y, 0, 0, width, height);
913
g_object_unref(gpix);
874
916
drawMenuCheck(window,style,state_type,x,y,width,height);
897
gpix = gdk_pixbuf_get_from_drawable(NULL, gtk_widget_get_parent_window(widget),NULL, x, y, 0, 0, width, height);
899
g_object_unref(gpix);
939
printf("Option (%d,%d,%d,%d) Widget: %s Detail: %s\n", x, y, width, height,gtk_widget_get_name(widget),detail);
941
if (gdk_window_is_viewable(gtk_widget_get_parent_window(widget)))
944
gpix = gdk_pixbuf_get_from_drawable(NULL, gtk_widget_get_parent_window(widget),NULL, x, y, 0, 0, width, height);
946
g_object_unref(gpix);
901
949
if (GTK_IS_MENU_ITEM(widget))
973
printf("Tab (%d,%d,%d,%d) Widget: %s Detail: %s\n", x, y, width, height,gtk_widget_get_name(widget),detail);
924
975
gtk_paint_box(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
1090
1141
gint gap_width)
1092
1143
sanitize_size (window, &width, &height);
1145
if (width<0 || height<0) return; /* Eclipse really can be this stupid! */
1148
printf("Box_gap (%d,%d,%d,%d) Widget: %s Detail: %s\n", x, y, width, height,gtk_widget_get_name(widget),detail);
1093
1150
if (DETAIL("notebook"))
1094
1151
drawTabFrame(window,style,state_type,x,y-2,width,height+2, gtk_notebook_get_tab_pos((GtkNotebook *)widget));
1115
1172
sanitize_size (window, &width, &height);
1175
printf("Extension (%d,%d,%d,%d) Widget: %s Detail: %s\n", x, y, width, height,gtk_widget_get_name(widget),detail);
1117
1177
gtk_paint_box(style, window, state_type, shadow_type, area, widget, detail,
1118
1178
x, y, width, height);
1149
1209
GtkOrientation orientation)
1212
printf("Slider (%d,%d,%d,%d) Widget: %s Detail: %s\n", x, y, width, height,gtk_widget_get_name(widget),detail);
1151
1214
if (DETAIL("slider"))
1153
1216
GtkAdjustment* adj = gtk_range_get_adjustment(GTK_RANGE(widget));
1227
1290
PangoAttribute *textcolorattr;
1228
1291
text_length = g_utf8_strlen (text, -1);
1229
1292
text_bytelen = strlen (text);
1294
/* Try to get the attribute list of the layout */
1295
PangoAttrList* attrlist = pango_layout_get_attributes(layout);
1297
/* Now iterate over the attribute list */
1298
PangoAttrIterator* it = pango_attr_list_get_iterator(attrlist);
1300
/* Try to get the first foreground color attribute
1301
Note that there can be more than one foreground
1302
color, we use only the first */
1303
PangoAttrColor* fg = (PangoAttrColor*)pango_attr_iterator_get(it, PANGO_ATTR_FOREGROUND);
1305
/* Use this color to render the text, instead of
1306
the default text color */
1307
color.red = fg->color.red;
1308
color.green = fg->color.green;
1309
color.blue = fg->color.blue;
1311
pango_attr_iterator_destroy(it);
1231
1315
textcolorattr = pango_attr_foreground_new(color.red, color.green, color.blue);
1232
1316
textcolorattr->start_index = 0;
1778
1862
pixmap = pix_test;
1779
1863
parent_relative = FALSE;
1864
gdk_drawable_set_colormap(pixmap, style->colormap);
1867
if (pixmap && !gdk_drawable_get_colormap (pixmap)) gdk_drawable_set_colormap (pixmap, gdk_drawable_get_colormap (window));
1782
1868
gdk_window_set_back_pixmap (window, pixmap, parent_relative);