FreeRTOS Emulator with SDL2 Based Graphics and Input Library  1.0
A POSIX wrapper to run FreeRTOS on an x86 machine with some basic input and output libraries aimed at making teaching FreeRTOS simpler.
gfx_event.h
Go to the documentation of this file.
1 
24 #ifndef __GFX_EVENT_H__
25 #define __GFX_EVENT_H__
26 
27 #include "FreeRTOS.h"
28 #include "queue.h"
29 
54 int gfxEventInit(void);
55 
59 void gfxEventExit(void);
60 
66 signed short gfxEventGetMouseX(void);
67 
73 signed short gfxEventGetMouseY(void);
74 
80 signed char gfxEventGetMouseLeft(void);
81 
87 signed char gfxEventGetMouseRight(void);
88 
94 signed char gfxEventGetMouseMiddle(void);
95 
109 #define FETCH_EVENT_BLOCK 0b1
110 
112 #define FETCH_EVENT_NONBLOCK 0b10
113 
115 #define FETCH_EVENT_NO_GL_CHECK 0b100
116 
143 int gfxEventFetchEvents(int flags);
144 
151 extern QueueHandle_t buttonInputQueue;
152 
154 #endif
signed short gfxEventGetMouseX(void)
Returns a copy of the mouse's most recent X coord (in pixels)
Definition: gfx_event.c:174
int gfxEventInit(void)
Initializes the GFX Event backend.
Definition: gfx_event.c:234
void gfxEventExit(void)
Deinitializes the GFX Event backend.
Definition: gfx_event.c:262
signed char gfxEventGetMouseMiddle(void)
Returns a copy of the mouse's middle button status.
Definition: gfx_event.c:223
int gfxEventFetchEvents(int flags)
Polls all outstanding SDL Events. Should be called from Draw Loop that holds the OpenGL context.
Definition: gfx_event.c:146
signed char gfxEventGetMouseLeft(void)
Returns a copy of the mouse's left button status.
Definition: gfx_event.c:201
signed short gfxEventGetMouseY(void)
Returns a copy of the mouse's most recent Y coord (in pixels)
Definition: gfx_event.c:187
signed char gfxEventGetMouseRight(void)
Returns a copy of the mouse's right button status.
Definition: gfx_event.c:212
QueueHandle_t buttonInputQueue
Definition: gfx_event.c:47