GoldFish Engine
Quite simple and lightweight game engine
Loading...
Searching...
No Matches
gf_gui.h
Go to the documentation of this file.
1
7#ifndef __GF_GUI_H__
8#define __GF_GUI_H__
9
10#include <gf_pre.h>
11#include <gf_macro.h>
12
13/* Type */
14#include <gf_type/gui.h>
15
16/* Engine */
17#include <gf_type/draw.h>
18#include <gf_type/core.h>
19
20/* Standard */
21
26#define GF_GUI_NORMAL 1
27
32#define GF_GUI_INVERT -1
33
38#define GF_GUI_FONT_SIZE 32
39
49
61GF_EXPORT gf_gui_id_t gf_gui_create_button(gf_gui_t* gui, double x, double y, double w, double h, const char* text);
62
69
78
89GF_EXPORT void gf_gui_draw_box(gf_gui_t* gui, int mul, double x, double y, double w, double h);
90
98GF_EXPORT void gf_gui_set_callback(gf_gui_t* gui, gf_gui_id_t id, gf_gui_callback_t callback);
99
100#endif
Type definitions related to core.
Type definitions related to drawing interface.
gf_gui_component_t * gf_gui_first_unused(gf_gui_t *gui, gf_gui_id_t *id)
Get first unused component entry.
Definition gf_gui.c:67
void gf_gui_render(gf_gui_t *gui)
Render GUI.
Definition gf_gui.c:96
void gf_gui_draw_box(gf_gui_t *gui, int mul, double x, double y, double w, double h)
Render box.
Definition gf_gui.c:45
gf_gui_t * gf_gui_create(gf_engine_t *engine, gf_draw_t *draw)
Create GUI.
Definition gf_gui.c:26
gf_gui_id_t gf_gui_create_button(gf_gui_t *gui, double x, double y, double w, double h, const char *text)
Create button component.
Definition gf_gui.c:78
void gf_gui_set_callback(gf_gui_t *gui, gf_gui_id_t id, gf_gui_callback_t callback)
Set callback.
Definition gf_gui.c:145
#define GF_EXPORT
Macro for platform-dependent symbol export/import.
Definition gf_macro.h:190
Required headers before anything.
Type definitions related to GUI.
int gf_gui_id_t
Component ID.
Definition gui.h:17
Drawing interface.
Definition draw.h:108
Engine instance.
Definition core.h:46
Component.
Definition gui.h:120
GUI.
Definition gui.h:144