2022-04-18 22:36:07 +02:00
|
|
|
/*
|
|
|
|
SDL - Simple DirectMedia Layer
|
|
|
|
Copyright (C) 1997-2012 Sam Lantinga
|
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Lesser General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2.1 of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This library 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
|
|
|
|
Lesser General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
|
|
License along with this library; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
|
|
|
|
Sam Lantinga
|
|
|
|
slouken@libsdl.org
|
|
|
|
*/
|
|
|
|
#include "SDL_config.h"
|
|
|
|
|
|
|
|
#include "SDL_prizmvideo.h"
|
|
|
|
|
|
|
|
#define PRZ_UPDATE_KEY_EVENT(s, sc, ks, kp) do { \
|
|
|
|
SDL_keysym keysym; \
|
|
|
|
keysym.scancode = sc; \
|
|
|
|
keysym.sym = s; \
|
|
|
|
if ( ks == SDL_RELEASED ) { \
|
|
|
|
if ( kp ) { \
|
|
|
|
SDL_PrivateKeyboard(SDL_PRESSED, &keysym); \
|
|
|
|
ks = SDL_PRESSED; \
|
|
|
|
} \
|
|
|
|
} else if ( ! kp ) { \
|
|
|
|
SDL_PrivateKeyboard(SDL_RELEASED, &keysym); \
|
|
|
|
ks = SDL_RELEASED; \
|
|
|
|
} \
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
/* Keys */
|
|
|
|
enum {
|
|
|
|
PRZ_KEY_F1,
|
|
|
|
PRZ_KEY_F2,
|
|
|
|
PRZ_KEY_F3,
|
|
|
|
PRZ_KEY_F4,
|
|
|
|
P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PRZ_KEY_LEFTUP,
|
|
|
|
// PRZ_KEY_LEFTDOWN,
|
|
|
|
// PRZ_KEY_RIGHTUP,
|
|
|
|
// PRZ_KEY_RIGHTDOWN,
|
2022-04-18 22:36:07 +02:00
|
|
|
PRZ_NUMKEYS
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Variables and functions exported by SDL_sysevents.c to other parts
|
|
|
|
of the native video subsystem (SDL_sysvideo.c)
|
|
|
|
*/
|
|
|
|
extern void PRZ_InitOSKeymap(_THIS);
|
|
|
|
extern void PRZ_PumpEvents(_THIS);
|
|
|
|
|
|
|
|
/* end of SDL_tinspireevents_c.h ... */
|