[gtk+/client-side-windows] Add some test for draw_drawable graphics exposures



commit a6e3da131955ae8532c23bc5d2e9b55e8bfef316
Author: Alexander Larsson <alexl redhat com>
Date:   Wed May 27 17:09:56 2009 +0200

    Add some test for draw_drawable graphics exposures
---
 tests/testwindows.c |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/tests/testwindows.c b/tests/testwindows.c
index 842f856..37bd740 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,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]