… | |
… | |
386 | } |
386 | } |
387 | |
387 | |
388 | bool |
388 | bool |
389 | rxvt_color::set (rxvt_display *display, const char *name) |
389 | rxvt_color::set (rxvt_display *display, const char *name) |
390 | { |
390 | { |
|
|
391 | #if XFT |
|
|
392 | return XftColorAllocName (display->display, display->visual, display->cmap, |
|
|
393 | name, &c); |
|
|
394 | #else |
391 | XColor xc; |
395 | XColor xc; |
392 | |
396 | |
393 | if (XParseColor (display->display, display->cmap, name, &xc)) |
397 | if (XParseColor (display->display, display->cmap, name, &xc)) |
394 | return set (display, xc.red, xc.green, xc.blue); |
398 | return set (display, xc.red, xc.green, xc.blue); |
395 | |
399 | |
396 | return false; |
400 | return false; |
|
|
401 | #endif |
397 | } |
402 | } |
398 | |
403 | |
399 | bool |
404 | bool |
400 | rxvt_color::set (rxvt_display *display, unsigned short cr, unsigned short cg, unsigned short cb) |
405 | rxvt_color::set (rxvt_display *display, unsigned short cr, unsigned short cg, unsigned short cb) |
401 | { |
406 | { |