FreeRTOS Tetris
TUM_Event.h
Go to the documentation of this file.
1 
24 #ifndef __TUM_EVENT_H__
25 #define __TUM_EVENT_H__
26 
27 #include "FreeRTOS.h"
28 #include "queue.h"
29 
55 int tumEventInit(void);
56 
60 void tumEventExit(void);
61 
67 signed short tumEventGetMouseX(void);
68 
74 signed short tumEventGetMouseY(void);
75 
81 signed char tumEventGetMouseLeft(void);
82 
88 signed char tumEventGetMouseRight(void);
89 
95 signed char tumEventGetMouseMiddle(void);
96 
110 #define FETCH_EVENT_BLOCK 0b1
111 
113 #define FETCH_EVENT_NONBLOCK 0b10
114 
116 #define FETCH_EVENT_NO_GL_CHECK 0b100
117 
144 int tumEventFetchEvents(int flags);
145 
153 
155 #endif
tumEventGetMouseMiddle
signed char tumEventGetMouseMiddle(void)
Returns a copy of the mouse's middle button status.
Definition: TUM_Event.c:218
tumEventGetMouseX
signed short tumEventGetMouseX(void)
Returns a copy of the mouse's most recent X coord (in pixels)
Definition: TUM_Event.c:169
tumEventInit
int tumEventInit(void)
Initializes the TUM Event backend.
Definition: TUM_Event.c:229
QueueHandle_t
void * QueueHandle_t
Definition: queue.h:135
tumEventFetchEvents
int tumEventFetchEvents(int flags)
Polls all outstanding SDL Events. Should be called from Draw Loop that holds the OpenGL context.
Definition: TUM_Event.c:144
tumEventGetMouseLeft
signed char tumEventGetMouseLeft(void)
Returns a copy of the mouse's left button status.
Definition: TUM_Event.c:196
tumEventGetMouseY
signed short tumEventGetMouseY(void)
Returns a copy of the mouse's most recent Y coord (in pixels)
Definition: TUM_Event.c:182
buttonInputQueue
QueueHandle_t buttonInputQueue
FreeRTOS queue used to obtain a current copy of the keyboard lookup table.
Definition: TUM_Event.c:46
tumEventExit
void tumEventExit(void)
Deinitializes the TUM Event backend.
Definition: TUM_Event.c:257
tumEventGetMouseRight
signed char tumEventGetMouseRight(void)
Returns a copy of the mouse's right button status.
Definition: TUM_Event.c:207