From d8239786b306ffda6d5d73753d01f0ad3358e1a0 Mon Sep 17 00:00:00 2001 From: Jesse Hall Date: Tue, 17 Jul 2012 16:58:55 -0700 Subject: Delete sdl-1.2.12 Change-Id: Ia96f80df04035ae84be3af468c945f2cec14f99c --- .../src/video/directfb/SDL_DirectFB_events.c | 210 --------------------- 1 file changed, 210 deletions(-) delete mode 100644 distrib/sdl-1.2.12/src/video/directfb/SDL_DirectFB_events.c (limited to 'distrib/sdl-1.2.12/src/video/directfb/SDL_DirectFB_events.c') diff --git a/distrib/sdl-1.2.12/src/video/directfb/SDL_DirectFB_events.c b/distrib/sdl-1.2.12/src/video/directfb/SDL_DirectFB_events.c deleted file mode 100644 index 0864d9a..0000000 --- a/distrib/sdl-1.2.12/src/video/directfb/SDL_DirectFB_events.c +++ /dev/null @@ -1,210 +0,0 @@ -/* - SDL - Simple DirectMedia Layer - Copyright (C) 1997-2006 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" - -/* Handle the event stream, converting DirectFB input events into SDL events */ - -#include -#include -#include -#include -#include - -#include - -#include "SDL.h" -#include "../SDL_sysvideo.h" -#include "../../events/SDL_sysevents.h" -#include "../../events/SDL_events_c.h" -#include "SDL_DirectFB_video.h" -#include "SDL_DirectFB_events.h" - -/* The translation tables from a DirectFB keycode to a SDL keysym */ -static SDLKey keymap[256]; -static SDL_keysym *DirectFB_TranslateKey (DFBInputEvent *ev, SDL_keysym *keysym); -static int DirectFB_TranslateButton (DFBInputEvent *ev); - -static int posted = 0; - - -void DirectFB_PumpEvents (_THIS) -{ - DFBInputEvent evt; - - while (HIDDEN->eventbuffer->GetEvent (HIDDEN->eventbuffer, - DFB_EVENT (&evt)) == DFB_OK) - { - SDL_keysym keysym; - - switch (evt.type) - { - case DIET_BUTTONPRESS: - posted += SDL_PrivateMouseButton(SDL_PRESSED, - DirectFB_TranslateButton (&evt), 0, 0); - break; - case DIET_BUTTONRELEASE: - posted += SDL_PrivateMouseButton(SDL_RELEASED, - DirectFB_TranslateButton (&evt), 0, 0); - break; - case DIET_KEYPRESS: - posted += SDL_PrivateKeyboard(SDL_PRESSED, DirectFB_TranslateKey(&evt, &keysym)); - break; - case DIET_KEYRELEASE: - posted += SDL_PrivateKeyboard(SDL_RELEASED, DirectFB_TranslateKey(&evt, &keysym)); - break; - case DIET_AXISMOTION: - if (evt.flags & DIEF_AXISREL) - { - if (evt.axis == DIAI_X) - posted += SDL_PrivateMouseMotion(0, 1, evt.axisrel, 0); - else if (evt.axis == DIAI_Y) - posted += SDL_PrivateMouseMotion(0, 1, 0, evt.axisrel); - } - break; - default: - ; - } - } -} - -void DirectFB_InitOSKeymap (_THIS) -{ - int i; - - /* Initialize the DirectFB key translation table */ - for (i=0; iscancode = ev->key_id; - keysym->mod = KMOD_NONE; /* FIXME */ - keysym->unicode = (DFB_KEY_TYPE (ev->key_symbol) == DIKT_UNICODE) ? ev->key_symbol : 0; - - if (ev->key_symbol > 0 && ev->key_symbol < 128) - keysym->sym = ev->key_symbol; - else - keysym->sym = keymap[ev->key_id - DIKI_UNKNOWN]; - - return keysym; -} - -static int DirectFB_TranslateButton (DFBInputEvent *ev) -{ - switch (ev->button) - { - case DIBI_LEFT: - return 1; - case DIBI_MIDDLE: - return 2; - case DIBI_RIGHT: - return 3; - default: - return 0; - } -} -- cgit v1.1