GoldFish Engine
Quite simple and lightweight game engine
Loading...
Searching...
No Matches
input.h
Go to the documentation of this file.
1
7#ifndef __GF_TYPE_INPUT_H__
8#define __GF_TYPE_INPUT_H__
9
10#include <gf_pre.h>
11#include <gf_macro.h>
12
13#ifdef GF_EXPOSE_INPUT
14typedef struct gf_input_t gf_input_t;
15
16/* External library */
17
18/* Engine */
19#include <gf_type/draw.h>
20#include <gf_type/core.h>
21
22/* Standard */
23
28#define GF_INPUT_MOUSE_LEFT_MASK (1 << 0)
29
34#define GF_INPUT_MOUSE_MIDDLE_MASK (1 << 1)
35
40#define GF_INPUT_MOUSE_RIGHT_MASK (1 << 2)
41
59GF_DECLARE_TYPE(input, {
61 int mouse_x;
62 int mouse_y;
63 int mouse_flag;
64});
65#else
66typedef void gf_input_t;
67#endif
68
69#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:180
Required headers before anything.
Engine instance.
Definition core.h:46
Input interface.
Definition input.h:64
int mouse_flag
Mouse flag.
Definition input.h:64
int mouse_y
Y coord of mouse.
Definition input.h:64
gf_engine_t * engine
Engine instance.
Definition input.h:64
int mouse_x
X coord of mouse.
Definition input.h:64