mirror of
https://github.com/labwc/labwc.git
synced 2025-11-03 09:01:51 -05:00
button/common.c: share button_filename() to reduce duplication
This commit is contained in:
parent
143714f1c9
commit
a8951c4b75
7 changed files with 38 additions and 24 deletions
|
|
@ -4,6 +4,6 @@
|
|||
|
||||
struct lab_data_buffer;
|
||||
|
||||
void png_load(const char *filename, struct lab_data_buffer **buffer);
|
||||
void png_load(const char *button_name, struct lab_data_buffer **buffer);
|
||||
|
||||
#endif /* LABWC_BUTTON_PNG_H */
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
struct lab_data_buffer;
|
||||
|
||||
/* button_xbm_load - Convert xbm file to buffer with cairo surface */
|
||||
void button_xbm_load(const char *filename, struct lab_data_buffer **buffer,
|
||||
void button_xbm_load(const char *button_name, struct lab_data_buffer **buffer,
|
||||
char *fallback_button, float *rgba);
|
||||
|
||||
#endif /* LABWC_BUTTON_XBM_H */
|
||||
|
|
|
|||
15
include/button/common.h
Normal file
15
include/button/common.h
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef LABWC_BUTTON_COMMON_H
|
||||
#define LABWC_BUTTON_COMMON_H
|
||||
|
||||
/**
|
||||
* button_filename() - Get full filename for button.
|
||||
* @name: The name of the button (for example 'iconify.xbm').
|
||||
* @buf: Buffer to fill with the full filename
|
||||
* @len: Length of buffer
|
||||
*
|
||||
* Example return value: /usr/share/themes/Numix/openbox-3/iconfify.xbm
|
||||
*/
|
||||
void button_filename(const char *name, char *buf, size_t len);
|
||||
|
||||
#endif /* LABWC_BUTTON_COMMON_H */
|
||||
Loading…
Add table
Add a link
Reference in a new issue