GoldFish Engine
Quite simple and lightweight game engine
Loading...
Searching...
No Matches
gui.h
Go to the documentation of this file.
1
7#ifndef __GF_TYPE_GUI_H__
8#define __GF_TYPE_GUI_H__
9
10#include <gf_pre.h>
11#include <gf_macro.h>
12
17typedef int gf_gui_id_t;
18
19#ifdef GF_EXPOSE_GUI
20/* External library */
21
22/* Engine */
23#include <gf_type/draw.h>
24#include <gf_type/core.h>
25
26/* Standard */
27
32#define GF_GUI_MAX_COMPONENTS 64
33
39 GF_GUI_UNUSED = -1,
40 GF_GUI_BUTTON
41};
42
54GF_DECLARE_TYPE(gui_button, {
55 char* text;
56 int pressed;
57});
58
70
95GF_DECLARE_TYPE(gui_component, {
96 int type;
97 double x;
98 double y;
99 double width;
100 double height;
102});
103
118GF_DECLARE_TYPE(gui, {
119 gf_engine_t* engine;
120 gf_draw_t* draw;
122});
123#else
124typedef void gf_gui_button_t;
125
126typedef void gf_gui_t;
127typedef void gf_gui_component_t;
128typedef void gf_gui_union_t;
129#endif
130
131#endif
Type definitions related to core.
Type definitions related to drawing interface.
#define GF_DECLARE_TYPE(n, b)
Macro to define engine type shorter.
Definition gf_macro.h:172
Required headers before anything.
int gf_gui_id_t
Component ID.
Definition gui.h:17
GF_GUI_COMPONENT_TYPES
GUI component types.
Definition gui.h:38
#define GF_GUI_MAX_COMPONENTS
Max components engine GUI can handle.
Definition gui.h:32
Drawing interface.
Definition draw.h:101
Engine instance.
Definition core.h:44
Button component.
Definition gui.h:57
Component.
Definition gui.h:102
GUI.
Definition gui.h:122
Component union.
Definition gui.h:67
gf_gui_button_t button
Button component.
Definition gui.h:68