src/video/android/SDL_androidevents.c
author Paul Hunkin <paul@bieh.net>
Thu, 10 Jun 2010 18:54:23 +1200
changeset 4701 d40bb3165d2b
child 4713 ba38983b10c2
permissions -rw-r--r--
Added (partially implemented) android video backend and associated files needed to build
paul@4701
     1
/*
paul@4701
     2
    SDL - Simple DirectMedia Layer
paul@4701
     3
    Copyright (C) 1997-2010 Sam Lantinga
paul@4701
     4
paul@4701
     5
    This library is free software; you can redistribute it and/or
paul@4701
     6
    modify it under the terms of the GNU Lesser General Public
paul@4701
     7
    License as published by the Free Software Foundation; either
paul@4701
     8
    version 2.1 of the License, or (at your option) any later version.
paul@4701
     9
paul@4701
    10
    This library is distributed in the hope that it will be useful,
paul@4701
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
paul@4701
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
paul@4701
    13
    Lesser General Public License for more details.
paul@4701
    14
paul@4701
    15
    You should have received a copy of the GNU Lesser General Public
paul@4701
    16
    License along with this library; if not, write to the Free Software
paul@4701
    17
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
paul@4701
    18
paul@4701
    19
    Sam Lantinga
paul@4701
    20
    slouken@libsdl.org
paul@4701
    21
*/
paul@4701
    22
#include "SDL_config.h"
paul@4701
    23
paul@4701
    24
/* Being a null driver, there's no event stream. We just define stubs for
paul@4701
    25
   most of the API. */
paul@4701
    26
paul@4701
    27
#include <stdio.h>
paul@4701
    28
#include <stdlib.h>
paul@4701
    29
paul@4701
    30
#include "../../events/SDL_sysevents.h"
paul@4701
    31
#include "../../events/SDL_events_c.h"
paul@4701
    32
paul@4701
    33
void
paul@4701
    34
Android_PumpEvents(_THIS)
paul@4701
    35
{
paul@4701
    36
paul@4701
    37
    //scanKeys();
paul@4701
    38
    /* TODO: defer click-age */
paul@4701
    39
    /*
paul@4701
    40
    if (keysDown() & KEY_TOUCH) {
paul@4701
    41
        SDL_SendMouseButton(0, SDL_PRESSED, 0);
paul@4701
    42
    } else if (keysUp() & KEY_TOUCH) {
paul@4701
    43
        SDL_SendMouseButton(0, SDL_RELEASED, 0);
paul@4701
    44
    }
paul@4701
    45
    if (keysHeld() & KEY_TOUCH) {
paul@4701
    46
        touchPosition t = touchReadXY();
paul@4701
    47
        SDL_SendMouseMotion(0, 0, t.px, t.py, 1);       
paul@4701
    48
    }
paul@4701
    49
    */
paul@4701
    50
}
paul@4701
    51
paul@4701
    52
/* vi: set ts=4 sw=4 expandtab: */