comparison finch/libgnt/test/parse.c @ 16125:5f204f55af09

Add a utility function to create widgets from an XML description.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sun, 15 Apr 2007 05:49:27 +0000
parents
children
comparison
equal deleted inserted replaced
16124:ab3f93232a2d 16125:5f204f55af09
1 #include "gntutils.h"
2
3 int main()
4 {
5 GntWidget *win, *button;
6
7 gnt_init();
8
9 gnt_util_parse_widgets("<vwindow id='0' fill='0' align='2'><label>This is a test.</label><button id='1'>OK</button></vwindow>", 2, &win, &button);
10 g_signal_connect_swapped(G_OBJECT(button), "activate", G_CALLBACK(gnt_widget_destroy), win);
11 gnt_widget_show(win);
12
13 gnt_main();
14
15 gnt_quit();
16 return 0;
17 }
18