GtkAllocation allocation;
gtk_widget_get_allocation(widget, &allocation);
-
+#if !GTK_CHECK_VERSION(3,0,0)
if (has_focus)
{
gtk_paint_focus(gtk_widget_get_style(widget), gtk_widget_get_window(widget), GTK_STATE_ACTIVE,
allocation.x, allocation.y,
allocation.width - 1, allocation.height - 1);
}
+#endif
}
static gboolean image_focus_expose(GtkWidget *widget, GdkEventExpose *event, gpointer data)
void image_to_root_window(ImageWindow *imd, gboolean scaled)
{
+#if !GTK_CHECK_VERSION(3,0,0)
GdkScreen *screen;
GdkWindow *rootwindow;
GdkPixmap *pixmap;
screen = gtk_widget_get_screen(imd->widget);
rootwindow = gdk_screen_get_root_window(screen);
- if (gdk_drawable_get_visual(rootwindow) != gdk_visual_get_system()) return;
+ if (gdk_window_get_visual(rootwindow) != gdk_visual_get_system()) return;
if (scaled)
{
g_object_unref(pixmap);
gdk_flush();
+#endif
}
void image_select(ImageWindow *imd, gboolean select)
g_free(imd);
}
-static void image_destroy_cb(GtkObject *widget, gpointer data)
+static void image_destroy_cb(GtkWidget *widget, gpointer data)
{
ImageWindow *imd = data;
image_free(imd);
{
GtkAllocation allocation;
gtk_widget_get_allocation(widget, &allocation);
-
+#if !GTK_CHECK_VERSION(3,0,0)
gtk_paint_flat_box(gtk_widget_get_style(widget),
gtk_widget_get_window(widget),
gtk_widget_get_state(widget),
allocation.x + 3, allocation.y + 3,
allocation.width - 6, allocation.height - 6);
-
+#endif
return FALSE;
}