X-Git-Url: https://repo.or.cz/w/wmaker-crm.git/blobdiff_plain/59fc927dc9f183802621138534fa6eaafe5593ba..688a56e8ab67b56550e2874d9d7423f0d435bfd9:/WINGs/Examples/colorpick.c diff --git a/WINGs/Examples/colorpick.c b/WINGs/Examples/colorpick.c dissimilarity index 78% index ae1695e4..24daa2ce 100644 --- a/WINGs/Examples/colorpick.c +++ b/WINGs/Examples/colorpick.c @@ -1,42 +1,39 @@ - -#include -#include -#include - - - -void showSelectedColor(void *self, void *cdata) -{ - WMColorPanel *panel= (WMColorPanel*)self; - - printf("Selected Color: %s\n", WMGetColorRGBDescription(WMGetColorPanelColor(panel))); -} - - -int main(int argc, char **argv) -{ - Display *dpy; - WMScreen *scr; - - WMInitializeApplication("wmcolorpick", &argc, argv); - - dpy = XOpenDisplay(""); - if (!dpy) { - printf("could not open display\n"); - exit(1); - } - - scr = WMCreateScreen(dpy, DefaultScreen(dpy)); - - { - WMColorPanel *panel= WMGetColorPanel(scr); - - WMSetColorPanelAction(panel, showSelectedColor, NULL); - - WMShowColorPanel(panel); - } - - WMScreenMainLoop(scr); - - return 0; -} + +#include +#include +#include + +void showSelectedColor(void *self, void *cdata) +{ + WMColorPanel *panel = (WMColorPanel *) self; + + printf("Selected Color: %s\n", WMGetColorRGBDescription(WMGetColorPanelColor(panel))); +} + +int main(int argc, char **argv) +{ + Display *dpy; + WMScreen *scr; + + WMInitializeApplication("wmcolorpick", &argc, argv); + + dpy = XOpenDisplay(""); + if (!dpy) { + printf("could not open display\n"); + exit(1); + } + + scr = WMCreateScreen(dpy, DefaultScreen(dpy)); + + { + WMColorPanel *panel = WMGetColorPanel(scr); + + WMSetColorPanelAction(panel, showSelectedColor, NULL); + + WMShowColorPanel(panel); + } + + WMScreenMainLoop(scr); + + return 0; +}