summary refs log tree commit diff stats
path: root/tests/rodfiles/gtkex1.nim
blob: 50779cb9edaf86f03e4abf7f51bbdb4055006ed4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import
  cairo, glib2, gtk2

proc destroy(widget: PWidget, data: Pgpointer) {.cdecl.} =
  main_quit()

var
  window: PWidget
nim_init()
window = window_new(WINDOW_TOPLEVEL)
discard signal_connect(window, "destroy",
                       SIGNAL_FUNC(gtkex1.destroy), nil)
show(window)
main()