static PyObject * forms_getmcolor(PyObject *self, PyObject *args) { int arg; short r, g, b; if (!PyArg_Parse(args, "i", &arg)) return NULL; fl_getmcolor(arg, &r, &g, &b); return Py_BuildValue("(hhh)", r, g, b); }
void fl_set_cursor_color( int name, FL_COLOR fg, FL_COLOR bg ) { XColor xfg, xbg; int r, g, b; Cursor cur = fli_get_cursor_byname( name ); fl_getmcolor( fg, &r, &g, &b ); xfg.red = ( r << 8 ) | 0xff; xfg.green = ( g << 8 ) | 0xff; xfg.blue = ( b << 8 ) | 0xff; fl_getmcolor( bg, &r, &g, &b ); xbg.red = ( r << 8 ) | 0xff; xbg.green = ( g << 8 ) | 0xff; xbg.blue = ( b << 8 ) | 0xff; XRecolorCursor( flx->display, cur, &xfg, &xbg ); }