labwc/include/xbm/parse.h

38 lines
753 B
C
Raw Normal View History

2020-06-29 19:27:59 +01:00
/*
* Parse xbm token to create pixmap
*
* Copyright Johan Malm 2020
*/
2020-08-03 20:56:38 +01:00
#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);
2020-08-03 20:56:38 +01:00
#endif /* __LABWC_PARSE_H */