mirror of
https://github.com/labwc/labwc.git
synced 2025-11-02 09:01:47 -05:00
theme: move more button fallback logic to theme.c
...and simplify button_xbm_load() by splitting it into one function that loads an xbm file and another that creates an icon from a builtin bitmap.
This commit is contained in:
parent
27de4e6398
commit
b7ee8b16f3
3 changed files with 69 additions and 31 deletions
|
|
@ -4,9 +4,19 @@
|
|||
|
||||
struct lab_data_buffer;
|
||||
|
||||
/**
|
||||
* button_xbm_from_bitmap() - create button from monochrome bitmap
|
||||
* @bitmap: bitmap data array in hexadecimal xbm format
|
||||
* @buffer: cairo-surface-buffer to create
|
||||
* @rgba: color
|
||||
*
|
||||
* Example bitmap: char button[6] = { 0x3f, 0x3f, 0x21, 0x21, 0x21, 0x3f };
|
||||
*/
|
||||
void button_xbm_from_bitmap(const char *bitmap, struct lab_data_buffer **buffer,
|
||||
float *rgba);
|
||||
|
||||
/* button_xbm_load - Convert xbm file to buffer with cairo surface */
|
||||
void button_xbm_load(const char *button_name, const char *alt_name,
|
||||
struct lab_data_buffer **buffer, const char *fallback_button,
|
||||
void button_xbm_load(const char *button_name, struct lab_data_buffer **buffer,
|
||||
float *rgba);
|
||||
|
||||
#endif /* LABWC_BUTTON_XBM_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue