Move get_colorpixel to libi3, use it everywhere else
This commit is contained in:
@ -93,4 +93,20 @@ int ipc_recv_message(int sockfd, uint32_t message_type,
|
||||
*/
|
||||
void fake_configure_notify(xcb_connection_t *conn, xcb_rectangle_t r, xcb_window_t window, int border_width);
|
||||
|
||||
/**
|
||||
* Returns the colorpixel to use for the given hex color (think of HTML). Only
|
||||
* works for true-color (vast majority of cases) at the moment, avoiding a
|
||||
* roundtrip to X11.
|
||||
*
|
||||
* The hex_color has to start with #, for example #FF00FF.
|
||||
*
|
||||
* NOTE that get_colorpixel() does _NOT_ check the given color code for validity.
|
||||
* This has to be done by the caller.
|
||||
*
|
||||
* NOTE that this function may in the future rely on a global xcb_connection_t
|
||||
* variable called 'conn' to be present.
|
||||
*
|
||||
*/
|
||||
uint32_t get_colorpixel(const char *hex) __attribute__((const));
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user