summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2009-05-27 17:09:56 +0200
committerAlexander Larsson <alexl@redhat.com>2009-05-27 17:10:37 +0200
commita6e3da131955ae8532c23bc5d2e9b55e8bfef316 (patch)
tree330c19c23d48b468399862c230606501fd23a621 /tests
parent0b586a5ad7b991cc4c7027a2e36aeccd7f99b545 (diff)
downloadgtk+-a6e3da131955ae8532c23bc5d2e9b55e8bfef316.tar.gz
Add some test for draw_drawable graphics exposures
Diffstat (limited to 'tests')
-rw-r--r--tests/testwindows.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/testwindows.c b/tests/testwindows.c
index 842f8566a3..37bd74049a 100644
--- a/tests/testwindows.c
+++ b/tests/testwindows.c
@@ -222,6 +222,22 @@ add_window_clicked (GtkWidget *button,
}
static void
+draw_drawable_clicked (GtkWidget *button,
+ gpointer data)
+{
+ GdkGC *gc;
+ gc = gdk_gc_new (darea->window);
+ gdk_draw_drawable (darea->window,
+ gc,
+ darea->window,
+ -15, -15,
+ 40, 70,
+ 100, 100);
+ g_object_unref (gc);
+}
+
+
+static void
remove_window_clicked (GtkWidget *button,
gpointer data)
{
@@ -990,6 +1006,16 @@ main (int argc, char **argv)
2, 3);
gtk_widget_show (button);
+ button = gtk_button_new_with_label ("draw drawable");
+ gtk_box_pack_start (GTK_BOX (vbox),
+ button,
+ FALSE, FALSE,
+ 2);
+ gtk_widget_show (button);
+ g_signal_connect (button, "clicked",
+ G_CALLBACK (draw_drawable_clicked),
+ NULL);
+
button = gtk_button_new_with_label ("Add window");
gtk_box_pack_start (GTK_BOX (vbox),
button,