FreeRTOS Tetris
|
Utilities required by other TUM_XXX files. More...
#include <linux/unistd.h>
#include <assert.h>
#include "TUM_Event.h"
#include "task.h"
#include "semphr.h"
#include "SDL2/SDL.h"
#include "SDL2/SDL_mouse.h"
#include "TUM_Draw.h"
#include "TUM_Utils.h"
Data Structures | |
struct | mouse |
Macros | |
#define | FETCH_BLOCK_S 0 |
#define | FETCH_NONBLOCK_S 1 |
#define | FETCH_NO_GL_CHECK_S 2 |
Typedefs | |
typedef struct mouse | mouse_t |
Functions | |
static int | initMouse (void) |
static void | SDLFetchEvents (void) |
int | tumEventFetchEvents (int flags) |
Polls all outstanding SDL Events. Should be called from Draw Loop that holds the OpenGL context. More... | |
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 | tumEventInit (void) |
Initializes the TUM Event backend. More... | |
void | tumEventExit (void) |
Deinitializes the TUM Event backend. | |
Variables | |
QueueHandle_t | buttonInputQueue = NULL |
FreeRTOS queue used to obtain a current copy of the keyboard lookup table. More... | |
mouse_t | mouse |
xSemaphoreHandle | fetch_lock |
Utilities required by other TUM_XXX files.
---------------------------------------------------------------------- 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/>. ----------------------------------------------------------------------