new version of the 'single click' patch
[wmaker-crm.git] / WINGs / Tests / testmywidget.c
blob2164f10592897084a8dea1125e66f478cb64965a
3 #include <WINGs/WINGs.h>
5 #include "mywidget.h"
8 void
9 wAbort()
11 exit(1);
15 int main(int argc, char **argv)
17 Display *dpy = XOpenDisplay("");
18 WMScreen *scr;
19 WMWindow *win;
20 MyWidget *thing;
23 WMInitializeApplication("Test", &argc, argv);
25 if (!dpy) {
26 wfatal("could not open display");
27 exit(1);
30 scr = WMCreateSimpleApplicationScreen(dpy);
32 /* init our widget */
33 InitMyWidget(scr);
35 win = WMCreateWindow(scr, "test");
36 WMResizeWidget(win, 150, 50);
38 thing = CreateMyWidget(win);
39 SetMyWidgetText(thing, "The Test");
40 WMResizeWidget(thing, 100, 20);
41 WMMoveWidget(thing, 10, 10);
43 WMRealizeWidget(win);
44 WMMapSubwidgets(win);
45 WMMapWidget(win);
47 WMScreenMainLoop(scr);
49 return 0;