X-Git-Url: https://repo.or.cz/w/wmaker-crm.git/blobdiff_plain/59fc927dc9f183802621138534fa6eaafe5593ba..688a56e8ab67b56550e2874d9d7423f0d435bfd9:/WINGs/Tests/testmywidget.c diff --git a/WINGs/Tests/testmywidget.c b/WINGs/Tests/testmywidget.c dissimilarity index 85% index ad158685..3a271fd9 100644 --- a/WINGs/Tests/testmywidget.c +++ b/WINGs/Tests/testmywidget.c @@ -1,52 +1,46 @@ - - -#include -#include - -#include "mywidget.h" - - -void -wAbort() -{ - exit(1); -} - - -int main(int argc, char **argv) -{ - Display *dpy = XOpenDisplay(""); - WMScreen *scr; - WMWindow *win; - MyWidget *thing; - - - WMInitializeApplication("Test", &argc, argv); - - if (!dpy) { - wfatal("could not open display"); - exit(1); - } - - scr = WMCreateSimpleApplicationScreen(dpy); - - /* init our widget */ - InitMyWidget(scr); - - win = WMCreateWindow(scr, "test"); - WMResizeWidget(win, 150, 50); - - thing = CreateMyWidget(win); - SetMyWidgetText(thing, "The Test"); - WMResizeWidget(thing, 100, 20); - WMMoveWidget(thing, 10, 10); - - WMRealizeWidget(win); - WMMapSubwidgets(win); - WMMapWidget(win); - - WMScreenMainLoop(scr); - - return 0; -} - + +#include +#include + +#include "mywidget.h" + +void wAbort() +{ + exit(1); +} + +int main(int argc, char **argv) +{ + Display *dpy = XOpenDisplay(""); + WMScreen *scr; + WMWindow *win; + MyWidget *thing; + + WMInitializeApplication("Test", &argc, argv); + + if (!dpy) { + wfatal("could not open display"); + exit(1); + } + + scr = WMCreateSimpleApplicationScreen(dpy); + + /* init our widget */ + InitMyWidget(scr); + + win = WMCreateWindow(scr, "test"); + WMResizeWidget(win, 150, 50); + + thing = CreateMyWidget(win); + SetMyWidgetText(thing, "The Test"); + WMResizeWidget(thing, 100, 20); + WMMoveWidget(thing, 10, 10); + + WMRealizeWidget(win); + WMMapSubwidgets(win); + WMMapWidget(win); + + WMScreenMainLoop(scr); + + return 0; +}