Change to the linux kernel coding style
[wmaker-crm.git] / WINGs / Tests / testmywidget.c
blob3a271fd95b06e59ef0904c6e1c7aa2bba0eb409a
2 #include <WINGs/WINGs.h>
3 #include <stdlib.h>
5 #include "mywidget.h"
7 void wAbort()
8 {
9 exit(1);
10 }
12 int main(int argc, char **argv)
13 {
14 Display *dpy = XOpenDisplay("");
15 WMScreen *scr;
16 WMWindow *win;
17 MyWidget *thing;
19 WMInitializeApplication("Test", &argc, argv);
21 if (!dpy) {
22 wfatal("could not open display");
23 exit(1);
24 }
26 scr = WMCreateSimpleApplicationScreen(dpy);
28 /* init our widget */
29 InitMyWidget(scr);
31 win = WMCreateWindow(scr, "test");
32 WMResizeWidget(win, 150, 50);
34 thing = CreateMyWidget(win);
35 SetMyWidgetText(thing, "The Test");
36 WMResizeWidget(thing, 100, 20);
37 WMMoveWidget(thing, 10, 10);
39 WMRealizeWidget(win);
40 WMMapSubwidgets(win);
41 WMMapWidget(win);
43 WMScreenMainLoop(scr);
45 return 0;
46 }