FreeRTOS Tetris
Functions | Variables
TUM_Event.h File Reference

Utilities required by other TUM_XXX files. More...

#include "FreeRTOS.h"
#include "queue.h"
Include dependency graph for TUM_Event.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

Event fetching flags

Flags for tumEventFetchEvents()

Fetching of SDL events can be done in a block, nonblocking as well as GL context checking fashion. See tumEventFetchEvents() for more details.

#define FETCH_EVENT_BLOCK   0b1
 
#define FETCH_EVENT_NONBLOCK   0b10
 
#define FETCH_EVENT_NO_GL_CHECK   0b100
 

Functions

int tumEventInit (void)
 Initializes the TUM Event backend. More...
 
void tumEventExit (void)
 Deinitializes the TUM Event backend.
 
signed short tumEventGetMouseX (void)
 Returns a copy of the mouse's most recent X coord (in pixels) More...
 
signed short tumEventGetMouseY (void)
 Returns a copy of the mouse's most recent Y coord (in pixels) More...
 
signed char tumEventGetMouseLeft (void)
 Returns a copy of the mouse's left button status. More...
 
signed char tumEventGetMouseRight (void)
 Returns a copy of the mouse's right button status. More...
 
signed char tumEventGetMouseMiddle (void)
 Returns a copy of the mouse's middle button status. More...
 
int tumEventFetchEvents (int flags)
 Polls all outstanding SDL Events. Should be called from Draw Loop that holds the OpenGL context. More...
 

Variables

QueueHandle_t buttonInputQueue
 FreeRTOS queue used to obtain a current copy of the keyboard lookup table. More...
 

Detailed Description

Utilities required by other TUM_XXX files.

Author
Alex Hoffman
Date
27 August 2019
----------------------------------------------------------------------
Copyright (C) Alexander Hoffman, 2019
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
----------------------------------------------------------------------