seed r301 - trunk/tests
- From: hortont svn gnome org
- To: svn-commits-list gnome org
- Subject: seed r301 - trunk/tests
- Date: Sat, 22 Nov 2008 03:23:48 +0000 (UTC)
Author: hortont
Date: Sat Nov 22 03:23:48 2008
New Revision: 301
URL: http://svn.gnome.org/viewvc/seed?rev=301&view=rev
Log:
Add GdkEvent test.
Added:
trunk/tests/gdk-event.js (contents, props changed)
Modified:
trunk/tests/Makefile.am
Modified: trunk/tests/Makefile.am
==============================================================================
--- trunk/tests/Makefile.am (original)
+++ trunk/tests/Makefile.am Sat Nov 22 03:23:48 2008
@@ -32,6 +32,7 @@
syntax-test.js \
type-conversion.js \
native-closure.js \
+ gdk-event.js \
make-test.py
Added: trunk/tests/gdk-event.js
==============================================================================
--- (empty file)
+++ trunk/tests/gdk-event.js Sat Nov 22 03:23:48 2008
@@ -0,0 +1,28 @@
+#!/usr/bin/env seed
+// Returns: 0
+// STDIN:
+// STDOUT:\[object GdkWindow\]\n\[object GdkWindow\]\n1\.000000\n200\.000000
+// STDERR:
+
+Seed.import_namespace("Gtk");
+Seed.import_namespace("Gdk");
+Gtk.init(null, null);
+
+function paint(wdg, evt)
+{
+ Seed.print(evt.expose.window);
+ Seed.print(wdg.window);
+ Seed.print(evt.expose.window === wdg.window);
+
+ Seed.print(evt.expose.area.width);
+
+ Gtk.main_quit();
+ return false;
+}
+
+var win = new Gtk.Window();
+win.signal.expose_event.connect(paint);
+win.resize(200,200);
+win.show();
+
+Gtk.main();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]