Make drawIconProc() static
[wmaker-crm.git] / WINGs / Tests / testmywidget.c
blobad158685f77c823863edd19e2af4b0a311f0b525
3 #include <WINGs/WINGs.h>
4 #include <stdlib.h>
6 #include "mywidget.h"
9 void
10 wAbort()
12 exit(1);
16 int main(int argc, char **argv)
18 Display *dpy = XOpenDisplay("");
19 WMScreen *scr;
20 WMWindow *win;
21 MyWidget *thing;
24 WMInitializeApplication("Test", &argc, argv);
26 if (!dpy) {
27 wfatal("could not open display");
28 exit(1);
31 scr = WMCreateSimpleApplicationScreen(dpy);
33 /* init our widget */
34 InitMyWidget(scr);
36 win = WMCreateWindow(scr, "test");
37 WMResizeWidget(win, 150, 50);
39 thing = CreateMyWidget(win);
40 SetMyWidgetText(thing, "The Test");
41 WMResizeWidget(thing, 100, 20);
42 WMMoveWidget(thing, 10, 10);
44 WMRealizeWidget(win);
45 WMMapSubwidgets(win);
46 WMMapWidget(win);
48 WMScreenMainLoop(scr);
50 return 0;