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