include/SDL_events.h
branchSDL-1.3
changeset 1724 6c63fc2bd986
parent 1722 5daa04d862f1
child 1731 875c3cf1a12c
     1.1 --- a/include/SDL_events.h	Thu Jul 06 05:53:32 2006 +0000
     1.2 +++ b/include/SDL_events.h	Thu Jul 06 07:17:11 2006 +0000
     1.3 @@ -60,9 +60,11 @@
     1.4      SDL_WINDOWEVENT,            /**< Window state change */
     1.5      SDL_KEYDOWN,                /**< Keys pressed */
     1.6      SDL_KEYUP,                  /**< Keys released */
     1.7 +    SDL_TEXTINPUT,                              /**< Keyboard text input */
     1.8      SDL_MOUSEMOTION,            /**< Mouse moved */
     1.9      SDL_MOUSEBUTTONDOWN,        /**< Mouse button pressed */
    1.10      SDL_MOUSEBUTTONUP,          /**< Mouse button released */
    1.11 +    SDL_MOUSEWHEEL,                             /**< Mouse wheel motion */
    1.12      SDL_JOYAXISMOTION,          /**< Joystick axis motion */
    1.13      SDL_JOYBALLMOTION,          /**< Joystick trackball motion */
    1.14      SDL_JOYHATMOTION,           /**< Joystick hat position change */
    1.15 @@ -93,9 +95,11 @@
    1.16      SDL_KEYDOWNMASK = SDL_EVENTMASK(SDL_KEYDOWN),
    1.17      SDL_KEYUPMASK = SDL_EVENTMASK(SDL_KEYUP),
    1.18      SDL_KEYEVENTMASK = SDL_EVENTMASK(SDL_KEYDOWN) | SDL_EVENTMASK(SDL_KEYUP),
    1.19 +    SDL_TEXTINPUTMASK = SDL_EVENTMASK(SDL_TEXTINPUT),
    1.20      SDL_MOUSEMOTIONMASK = SDL_EVENTMASK(SDL_MOUSEMOTION),
    1.21      SDL_MOUSEBUTTONDOWNMASK = SDL_EVENTMASK(SDL_MOUSEBUTTONDOWN),
    1.22      SDL_MOUSEBUTTONUPMASK = SDL_EVENTMASK(SDL_MOUSEBUTTONUP),
    1.23 +    SDL_MOUSEWHEELMASK = SDL_EVENTMASK(SDL_MOUSEWHEEL),
    1.24      SDL_MOUSEEVENTMASK = SDL_EVENTMASK(SDL_MOUSEMOTION) |
    1.25          SDL_EVENTMASK(SDL_MOUSEBUTTONDOWN) | SDL_EVENTMASK(SDL_MOUSEBUTTONUP),
    1.26      SDL_JOYAXISMOTIONMASK = SDL_EVENTMASK(SDL_JOYAXISMOTION),
    1.27 @@ -141,17 +145,17 @@
    1.28  } SDL_KeyboardEvent;
    1.29  
    1.30  /**
    1.31 - * \struct SDL_CharEvent
    1.32 + * \struct SDL_TextInputEvent
    1.33   *
    1.34 - * \brief Keyboard input event structure
    1.35 + * \brief Keyboard text input event structure
    1.36   */
    1.37 -typedef struct SDL_CharEvent
    1.38 +typedef struct SDL_TextInputEvent
    1.39  {
    1.40 -    Uint8 type;             /**< SDL_CHARINPUT (FIXME: NYI) */
    1.41 +    Uint8 type;             /**< SDL_TEXTINPUT */
    1.42      Uint8 which;            /**< The keyboard device index */
    1.43      char text[32];          /**< The input text */
    1.44      SDL_WindowID windowID;  /**< The window with keyboard focus, if any */
    1.45 -} SDL_CharEvent;
    1.46 +} SDL_TextInputEvent;
    1.47  
    1.48  /**
    1.49   * \struct SDL_MouseMotionEvent
    1.50 @@ -187,6 +191,19 @@
    1.51  } SDL_MouseButtonEvent;
    1.52  
    1.53  /**
    1.54 + * \struct SDL_MouseWheelEvent
    1.55 + *
    1.56 + * \brief Mouse wheel event structure
    1.57 + */
    1.58 +typedef struct SDL_MouseWheelEvent
    1.59 +{
    1.60 +    Uint8 type;             /**< SDL_MOUSEWHEEL */
    1.61 +    Uint8 which;            /**< The mouse device index */
    1.62 +    int motion;                                 /**< The direction and distance scrolled */
    1.63 +    SDL_WindowID windowID;  /**< The window with mouse focus, if any */
    1.64 +} SDL_MouseWheelEvent;
    1.65 +
    1.66 +/**
    1.67   * \struct SDL_JoyAxisEvent
    1.68   *
    1.69   * \brief Joystick axis motion event structure
    1.70 @@ -306,8 +323,10 @@
    1.71      Uint8 type;                     /**< Event type, shared with all events */
    1.72      SDL_WindowEvent window;         /**< Window event data */
    1.73      SDL_KeyboardEvent key;          /**< Keyboard event data */
    1.74 +    SDL_TextInputEvent text;                    /**< Text input event data */
    1.75      SDL_MouseMotionEvent motion;    /**< Mouse motion event data */
    1.76      SDL_MouseButtonEvent button;    /**< Mouse button event data */
    1.77 +    SDL_MouseWheelEvent wheel;                  /**< Mouse wheel event data */
    1.78      SDL_JoyAxisEvent jaxis;         /**< Joystick axis event data */
    1.79      SDL_JoyBallEvent jball;         /**< Joystick ball event data */
    1.80      SDL_JoyHatEvent jhat;           /**< Joystick hat event data */
    1.81 @@ -353,6 +372,10 @@
    1.82                                             SDL_eventaction action,
    1.83                                             Uint32 mask);
    1.84  
    1.85 +/* Checks to see if certain event types are in the event queue.
    1.86 + */
    1.87 +extern DECLSPEC SDL_bool SDLCALL SDL_HasEvent(Uint32 mask);
    1.88 +
    1.89  /* Polls for currently pending events, and returns 1 if there are any pending
    1.90     events, or 0 if there are none available.  If 'event' is not NULL, the next
    1.91     event is removed from the queue and stored in that area.