27#define N_GUI_MAX_TOKEN_SIZE 1024
38#define N_ENUM_N_GUI_TOKEN(_)\
39 _(N_GUI_TOKEN_TAG_OPEN, 2)\
40 _(N_GUI_TOKEN_TAG_CLOSE, 4)\
41 _(N_GUI_TOKEN_TAG_NAME, 8)\
42 _(N_GUI_TOKEN_ATTR_NAME, 16)\
43 _(N_GUI_TOKEN_ATTR_VALUE, 32)\
44 _(N_GUI_TOKEN_TEXT, 64)\
45 _(N_GUI_TOKEN_EOF, 128)
#define N_ENUM_DECLARE(MACRO_DEFINITION, enum_name)
Macro to declare a N_ENUM.
TREE * tree
tree of widgets
size_t margin_right
margin right
N_GUI_LAYOUT layout
layout of the widget
size_t margin_top
margin top
size_t margin_bottom
margin bottom
size_t x
computed x position
size_t type
type of widget
size_t vertical_align
vertical align type
size_t font_size
font size
N_STR * font
font file string
size_t max_width
maximum width
size_t max_height
maximum height
size_t font_style
font style
size_t min_width
minimum width
HASH_TABLE * styles
hash table of styles
size_t y
computed y position
ALLEGRO_COLOR background_color
background color
N_STR * background_image
background image file string
char value[N_GUI_MAX_TOKEN_SIZE]
token content
size_t margin_left
margin left
size_t horizontal_align
horziontal align type
size_t min_height
minimum height
size_t position
position in the input text
const char * input
pointer to the input text
char n_gui_next_char(N_GUI_TOKENIZER *tokenizer)
Get next character from input.
void n_gui_print_token(N_GUI_TOKEN token)
Function to print a token (for debugging purposes)
int n_gui_is_eof(N_GUI_TOKENIZER *tokenizer)
char n_gui_peek_char(N_GUI_TOKENIZER *tokenizer)
Peek at next character without advancing the position.
N_GUI_DIALOG * n_gui_load_dialog(char *html, char *css)
Load a html + css file into a N_GUI_DIALOG.
#define N_GUI_MAX_TOKEN_SIZE
maximum size of a single token content
void n_gui_init_tokenizer(N_GUI_TOKENIZER *tokenizer, const char *input)
Initialize tokenizer.
#define N_ENUM_N_GUI_TOKEN(_)
N_GUI_CTX codes definition.
N_GUI_TOKEN n_gui_next_token(N_GUI_TOKENIZER *tokenizer, bool *inside_open_tag)
Read next N_GUI_TOKEN from input.
structure of a N_GUI_DIALOG
structure of a N_GUI_DIALOG or N_GUI_WIDGET layout
structure of a N_GUI_TOKENIZER token
structure of a N_GUI_DIALOG tokenizer
structure of a N_GUI_DIALOG widget
structure of a hash table
A box including a string and his lenght.
Common headers and low-level hugly functions & define.
__N_GUI_TOKEN
type for a token
Hash functions and table.
List structures and definitions.
N_STR and string function declaration.