4 #include <WINGs/WINGs.h>
6 void showSelectedColor(void *self
, void *cdata
)
8 WMColorPanel
*panel
= (WMColorPanel
*) self
;
11 printf("Selected Color: %s\n", WMGetColorRGBDescription(WMGetColorPanelColor(panel
)));
14 int main(int argc
, char **argv
)
19 WMInitializeApplication("wmcolorpick", &argc
, argv
);
21 dpy
= XOpenDisplay("");
23 printf("could not open display\n");
27 scr
= WMCreateScreen(dpy
, DefaultScreen(dpy
));
30 WMColorPanel
*panel
= WMGetColorPanel(scr
);
32 WMSetColorPanelAction(panel
, showSelectedColor
, NULL
);
34 WMShowColorPanel(panel
);
37 WMScreenMainLoop(scr
);