labwc/include/xbm/parse.h

39 lines
791 B
C
Raw Normal View History

2021-11-13 21:56:53 +00:00
/* SPDX-License-Identifier: GPL-2.0-only */
2020-06-29 19:27:59 +01:00
/*
* Parse xbm token to create pixmap
*
* Copyright Johan Malm 2020
*/
#ifndef LABWC_PARSE_H
#define LABWC_PARSE_H
2020-06-29 19:27:59 +01:00
2020-08-31 20:01:08 +01:00
#include "xbm/tokenize.h"
#include <stdint.h>
2020-06-29 19:27:59 +01:00
struct pixmap {
uint32_t *data;
int width;
int height;
};
/**
* parse_set_color - set color to be used when parsing icons
* @rgba: four floats representing red, green, blue, alpha
*/
void parse_set_color(float *rgba);
2020-06-29 19:27:59 +01:00
/**
2020-08-06 15:09:13 +01:00
* parse_xbm_tokens - parse xbm tokens and create pixmap
2020-06-29 19:27:59 +01:00
* @tokens: token vector
*/
2020-08-06 15:09:13 +01:00
struct pixmap parse_xbm_tokens(struct token *tokens);
2020-06-29 19:27:59 +01:00
2020-08-06 15:09:13 +01:00
/**
* parse_xbm_builtin - parse builtin xbm button and create pixmap
* @button: button byte array (xbm format)
*/
struct pixmap parse_xbm_builtin(const char *button, int size);
#endif /* LABWC_PARSE_H */