diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2010-02-24 01:04:39 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2010-02-24 01:04:39 +0100 |
commit | f41bd71e6152174c3b0819c7549fa431e8a01222 (patch) | |
tree | 35bec88bad6f84e9551316888744037e8d15e598 /examples/gtk/ex1.nim | |
parent | 6da95ed9ca899db702c6a7b17d2d7db14dbb0de4 (diff) | |
download | Nim-f41bd71e6152174c3b0819c7549fa431e8a01222.tar.gz |
SQLite wrapper
Diffstat (limited to 'examples/gtk/ex1.nim')
-rw-r--r-- | examples/gtk/ex1.nim | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/examples/gtk/ex1.nim b/examples/gtk/ex1.nim new file mode 100644 index 000000000..aa3ed2f66 --- /dev/null +++ b/examples/gtk/ex1.nim @@ -0,0 +1,14 @@ +import + cairo, glib2, gtk2 + +proc destroy(widget: pGtkWidget, data: pgpointer) {.cdecl.} = + gtk_main_quit() + +var + window: pGtkWidget +gtk_nimrod_init() +window = gtk_window_new(GTK_WINDOW_TOPLEVEL) +discard gtk_signal_connect(GTKOBJECT(window), "destroy", + GTK_SIGNAL_FUNC(destroy), nil) +gtk_widget_show(window) +gtk_main() |