summary refs log tree commit diff stats
path: root/tests/rodfiles/gtkex2.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2011-10-27 23:25:34 +0200
committerAraq <rumpf_a@web.de>2011-10-27 23:25:34 +0200
commit2d54b850894004ad8116f804b6c0c2f013a5b7a2 (patch)
tree70d4112f8e67bdf5e7f08ab538a5de7e0993c2d7 /tests/rodfiles/gtkex2.nim
parent5e5e4abfeee16bcacf659d35745d456586cb37e5 (diff)
downloadNim-2d54b850894004ad8116f804b6c0c2f013a5b7a2.tar.gz
compilation cache: tests now part of test suite
Diffstat (limited to 'tests/rodfiles/gtkex2.nim')
-rwxr-xr-xtests/rodfiles/gtkex2.nim22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/rodfiles/gtkex2.nim b/tests/rodfiles/gtkex2.nim
new file mode 100755
index 000000000..3d181ba12
--- /dev/null
+++ b/tests/rodfiles/gtkex2.nim
@@ -0,0 +1,22 @@
+
+import 
+  glib2, gtk2
+
+proc destroy(widget: pWidget, data: pgpointer){.cdecl.} = 
+  main_quit()
+
+var 
+  window: PWidget
+  button: PWidget
+
+nimrod_init()
+window = window_new(WINDOW_TOPLEVEL)
+button = button_new("Click me")
+set_border_width(PContainer(Window), 5)
+add(PContainer(window), button)
+discard signal_connect(window, "destroy", 
+                           SIGNAL_FUNC(gtkex2.destroy), nil)
+show(button)
+show(window)
+main()
+