4 #include <WINGs/WINGs.h>
6 void showSelectedColor(void *self
, void *cdata
)
8 WMColorPanel
*panel
= (WMColorPanel
*) self
;
10 printf("Selected Color: %s\n", WMGetColorRGBDescription(WMGetColorPanelColor(panel
)));
13 int main(int argc
, char **argv
)
18 WMInitializeApplication("wmcolorpick", &argc
, argv
);
20 dpy
= XOpenDisplay("");
22 printf("could not open display\n");
26 scr
= WMCreateScreen(dpy
, DefaultScreen(dpy
));
29 WMColorPanel
*panel
= WMGetColorPanel(scr
);
31 WMSetColorPanelAction(panel
, showSelectedColor
, NULL
);
33 WMShowColorPanel(panel
);
36 WMScreenMainLoop(scr
);