include/SDL_events.h
author Philipp Wiesemann <philipp.wiesemann@arcor.de>
Fri, 08 May 2015 21:53:02 +0200
changeset 9593 66631a359254
parent 9418 eaafb42daa70
child 9619 b94b6d0bff0f
permissions -rw-r--r--
Fixed SDL_TouchFingerEvent documentation in header file.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
     1
/*
5535
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
     2
  Simple DirectMedia Layer
8149
681eb46b8ac4 Fixed bug 2374 - Update copyright for 2014...
Sam Lantinga <slouken@libsdl.org>
parents: 8066
diff changeset
     3
  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
     4
5535
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
     5
  This software is provided 'as-is', without any express or implied
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
     6
  warranty.  In no event will the authors be held liable for any damages
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
     7
  arising from the use of this software.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
     8
5535
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
     9
  Permission is granted to anyone to use this software for any purpose,
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
    10
  including commercial applications, and to alter it and redistribute it
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
    11
  freely, subject to the following restrictions:
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    12
5535
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
    13
  1. The origin of this software must not be misrepresented; you must not
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
    14
     claim that you wrote the original software. If you use this software
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
    15
     in a product, an acknowledgment in the product documentation would be
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
    16
     appreciated but is not required.
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
    17
  2. Altered source versions must be plainly marked as such, and must not be
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
    18
     misrepresented as being the original software.
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
    19
  3. This notice may not be removed or altered from any source distribution.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    20
*/
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    21
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
    22
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
    23
 *  \file SDL_events.h
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
    24
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
    25
 *  Include file for SDL event handling.
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
    26
 */
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    27
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    28
#ifndef _SDL_events_h
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    29
#define _SDL_events_h
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    30
1356
67114343400d *** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents: 1330
diff changeset
    31
#include "SDL_stdinc.h"
1358
c71e05b4dc2e More header massaging... works great on Windows. ;-)
Sam Lantinga <slouken@libsdl.org>
parents: 1356
diff changeset
    32
#include "SDL_error.h"
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
    33
#include "SDL_video.h"
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    34
#include "SDL_keyboard.h"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    35
#include "SDL_mouse.h"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    36
#include "SDL_joystick.h"
6690
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
    37
#include "SDL_gamecontroller.h"
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    38
#include "SDL_quit.h"
4659
063b9455bd1a Added some files I had previosuly missed
Jim Grandpre <jim.tla@gmail.com>
parents: 4658
diff changeset
    39
#include "SDL_gesture.h"
063b9455bd1a Added some files I had previosuly missed
Jim Grandpre <jim.tla@gmail.com>
parents: 4658
diff changeset
    40
#include "SDL_touch.h"
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    41
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    42
#include "begin_code.h"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    43
/* Set up for C function definitions, even when using C++ */
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    44
#ifdef __cplusplus
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    45
extern "C" {
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    46
#endif
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    47
1330
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents: 1312
diff changeset
    48
/* General keyboard/mouse state definitions */
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
    49
#define SDL_RELEASED    0
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
    50
#define SDL_PRESSED 1
1330
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents: 1312
diff changeset
    51
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
    52
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
    53
 * \brief The types of events that can be delivered.
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
    54
 */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
    55
typedef enum
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
    56
{
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
    57
    SDL_FIRSTEVENT     = 0,     /**< Unused (do not remove) */
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
    58
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
    59
    /* Application events */
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
    60
    SDL_QUIT           = 0x100, /**< User-requested quit */
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
    61
9049
411e05b86ac3 Updated README name in header.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 9002
diff changeset
    62
    /* These application events have special meaning on iOS, see README-ios.md for details */
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
    63
    SDL_APP_TERMINATING,        /**< The application is being terminated by the OS
7190
11612d544fcd Added mobile application events, with implementations for iOS and Android
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
    64
                                     Called on iOS in applicationWillTerminate()
11612d544fcd Added mobile application events, with implementations for iOS and Android
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
    65
                                     Called on Android in onDestroy()
11612d544fcd Added mobile application events, with implementations for iOS and Android
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
    66
                                */
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
    67
    SDL_APP_LOWMEMORY,          /**< The application is low on memory, free memory if possible.
7190
11612d544fcd Added mobile application events, with implementations for iOS and Android
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
    68
                                     Called on iOS in applicationDidReceiveMemoryWarning()
11612d544fcd Added mobile application events, with implementations for iOS and Android
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
    69
                                     Called on Android in onLowMemory()
11612d544fcd Added mobile application events, with implementations for iOS and Android
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
    70
                                */
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
    71
    SDL_APP_WILLENTERBACKGROUND, /**< The application is about to enter the background
7190
11612d544fcd Added mobile application events, with implementations for iOS and Android
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
    72
                                     Called on iOS in applicationWillResignActive()
11612d544fcd Added mobile application events, with implementations for iOS and Android
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
    73
                                     Called on Android in onPause()
11612d544fcd Added mobile application events, with implementations for iOS and Android
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
    74
                                */
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
    75
    SDL_APP_DIDENTERBACKGROUND, /**< The application did enter the background and may not get CPU for some time
7190
11612d544fcd Added mobile application events, with implementations for iOS and Android
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
    76
                                     Called on iOS in applicationDidEnterBackground()
11612d544fcd Added mobile application events, with implementations for iOS and Android
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
    77
                                     Called on Android in onPause()
11612d544fcd Added mobile application events, with implementations for iOS and Android
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
    78
                                */
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
    79
    SDL_APP_WILLENTERFOREGROUND, /**< The application is about to enter the foreground
7190
11612d544fcd Added mobile application events, with implementations for iOS and Android
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
    80
                                     Called on iOS in applicationWillEnterForeground()
11612d544fcd Added mobile application events, with implementations for iOS and Android
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
    81
                                     Called on Android in onResume()
11612d544fcd Added mobile application events, with implementations for iOS and Android
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
    82
                                */
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
    83
    SDL_APP_DIDENTERFOREGROUND, /**< The application is now interactive
7190
11612d544fcd Added mobile application events, with implementations for iOS and Android
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
    84
                                     Called on iOS in applicationDidBecomeActive()
11612d544fcd Added mobile application events, with implementations for iOS and Android
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
    85
                                     Called on Android in onResume()
11612d544fcd Added mobile application events, with implementations for iOS and Android
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
    86
                                */
11612d544fcd Added mobile application events, with implementations for iOS and Android
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
    87
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
    88
    /* Window events */
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
    89
    SDL_WINDOWEVENT    = 0x200, /**< Window state change */
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
    90
    SDL_SYSWMEVENT,             /**< System specific event */
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
    91
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
    92
    /* Keyboard events */
4971
158bb5752974 Updated headers to match wiki documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4694
diff changeset
    93
    SDL_KEYDOWN        = 0x300, /**< Key pressed */
158bb5752974 Updated headers to match wiki documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4694
diff changeset
    94
    SDL_KEYUP,                  /**< Key released */
3280
00cace2d9080 Merged a cleaned up version of Jiang's code changes from Google Summer of Code 2009
Sam Lantinga <slouken@libsdl.org>
parents: 3191
diff changeset
    95
    SDL_TEXTEDITING,            /**< Keyboard text editing (composition) */
1957
c7803e4c21d3 Implemented Cocoa mouse wheel events
Sam Lantinga <slouken@libsdl.org>
parents: 1914
diff changeset
    96
    SDL_TEXTINPUT,              /**< Keyboard text input */
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
    97
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
    98
    /* Mouse events */
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
    99
    SDL_MOUSEMOTION    = 0x400, /**< Mouse moved */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   100
    SDL_MOUSEBUTTONDOWN,        /**< Mouse button pressed */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   101
    SDL_MOUSEBUTTONUP,          /**< Mouse button released */
1957
c7803e4c21d3 Implemented Cocoa mouse wheel events
Sam Lantinga <slouken@libsdl.org>
parents: 1914
diff changeset
   102
    SDL_MOUSEWHEEL,             /**< Mouse wheel motion */
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   103
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   104
    /* Joystick events */
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   105
    SDL_JOYAXISMOTION  = 0x600, /**< Joystick axis motion */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   106
    SDL_JOYBALLMOTION,          /**< Joystick trackball motion */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   107
    SDL_JOYHATMOTION,           /**< Joystick hat position change */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   108
    SDL_JOYBUTTONDOWN,          /**< Joystick button pressed */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   109
    SDL_JOYBUTTONUP,            /**< Joystick button released */
6690
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
   110
    SDL_JOYDEVICEADDED,         /**< A new joystick has been inserted into the system */
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
   111
    SDL_JOYDEVICEREMOVED,       /**< An opened joystick has been removed */
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
   112
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   113
    /* Game controller events */
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   114
    SDL_CONTROLLERAXISMOTION  = 0x650, /**< Game controller axis motion */
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   115
    SDL_CONTROLLERBUTTONDOWN,          /**< Game controller button pressed */
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   116
    SDL_CONTROLLERBUTTONUP,            /**< Game controller button released */
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   117
    SDL_CONTROLLERDEVICEADDED,         /**< A new Game controller has been inserted into the system */
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   118
    SDL_CONTROLLERDEVICEREMOVED,       /**< An opened Game controller has been removed */
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   119
    SDL_CONTROLLERDEVICEREMAPPED,      /**< The controller mapping was updated */
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   120
4661
03dcb795c583 Merged changes from the main SDL codebase
Sam Lantinga <slouken@libsdl.org>
parents: 4659 4503
diff changeset
   121
    /* Touch events */
03dcb795c583 Merged changes from the main SDL codebase
Sam Lantinga <slouken@libsdl.org>
parents: 4659 4503
diff changeset
   122
    SDL_FINGERDOWN      = 0x700,
4641
49a97daea6ec Added touch event definitions. Heavily modified events/SDL_touch*.
Jim Grandpre <jim.tla@gmail.com>
parents: 4435
diff changeset
   123
    SDL_FINGERUP,
49a97daea6ec Added touch event definitions. Heavily modified events/SDL_touch*.
Jim Grandpre <jim.tla@gmail.com>
parents: 4435
diff changeset
   124
    SDL_FINGERMOTION,
49a97daea6ec Added touch event definitions. Heavily modified events/SDL_touch*.
Jim Grandpre <jim.tla@gmail.com>
parents: 4435
diff changeset
   125
4661
03dcb795c583 Merged changes from the main SDL codebase
Sam Lantinga <slouken@libsdl.org>
parents: 4659 4503
diff changeset
   126
    /* Gesture events */
03dcb795c583 Merged changes from the main SDL codebase
Sam Lantinga <slouken@libsdl.org>
parents: 4659 4503
diff changeset
   127
    SDL_DOLLARGESTURE   = 0x800,
4659
063b9455bd1a Added some files I had previosuly missed
Jim Grandpre <jim.tla@gmail.com>
parents: 4658
diff changeset
   128
    SDL_DOLLARRECORD,
4657
eed063a0bf5b Moved Multi finger gesture recognition into the library.
Jim Grandpre <jim.tla@gmail.com>
parents: 4644
diff changeset
   129
    SDL_MULTIGESTURE,
eed063a0bf5b Moved Multi finger gesture recognition into the library.
Jim Grandpre <jim.tla@gmail.com>
parents: 4644
diff changeset
   130
4503
524dfefd554c Added an event when the clipboard is updated, triggered after the window gains the keyboard focus.
Sam Lantinga <slouken@libsdl.org>
parents: 4465
diff changeset
   131
    /* Clipboard events */
6091
61fa4f3238c5 First pass at a simple drag and drop API, allowing you to accept files dropped into your application.
Sam Lantinga <slouken@libsdl.org>
parents: 6053
diff changeset
   132
    SDL_CLIPBOARDUPDATE = 0x900, /**< The clipboard changed */
4662
3c4e0130c9b1 Added alternative finger tracking method. Still prefer IPHONE_TOUCH_EFFICIENT_DANGEROUS.
Jim Grandpre <jim.tla@gmail.com>
parents: 4661
diff changeset
   133
6091
61fa4f3238c5 First pass at a simple drag and drop API, allowing you to accept files dropped into your application.
Sam Lantinga <slouken@libsdl.org>
parents: 6053
diff changeset
   134
    /* Drag and drop events */
61fa4f3238c5 First pass at a simple drag and drop API, allowing you to accept files dropped into your application.
Sam Lantinga <slouken@libsdl.org>
parents: 6053
diff changeset
   135
    SDL_DROPFILE        = 0x1000, /**< The system requests a file open */
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   136
9417
86483b23f44a Fixed confusing audio and touch events because of shared enumeration values.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 9393
diff changeset
   137
    /* Audio hotplug events */
86483b23f44a Fixed confusing audio and touch events because of shared enumeration values.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 9393
diff changeset
   138
    SDL_AUDIODEVICEADDED = 0x1100, /**< A new audio device is available */
86483b23f44a Fixed confusing audio and touch events because of shared enumeration values.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 9393
diff changeset
   139
    SDL_AUDIODEVICEREMOVED,        /**< An audio device has been removed. */
86483b23f44a Fixed confusing audio and touch events because of shared enumeration values.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 9393
diff changeset
   140
8207
f06add42160c Recreate render target textures when the D3D device is being reset, and notify the application using the SDL_RENDER_TARGETS_RESET event when this happens.
Sam Lantinga <slouken@libsdl.org>
parents: 8149
diff changeset
   141
    /* Render events */
8674
d7d2e69a0b08 Added an event SDL_RENDER_DEVICE_RESET, which is triggered on Direct3D 11 when the device has been lost and all textures need to be recreated.
Sam Lantinga <slouken@libsdl.org>
parents: 8232
diff changeset
   142
    SDL_RENDER_TARGETS_RESET = 0x2000, /**< The render targets have been reset and their contents need to be updated */
d7d2e69a0b08 Added an event SDL_RENDER_DEVICE_RESET, which is triggered on Direct3D 11 when the device has been lost and all textures need to be recreated.
Sam Lantinga <slouken@libsdl.org>
parents: 8232
diff changeset
   143
    SDL_RENDER_DEVICE_RESET, /**< The device has been reset and all textures need to be recreated */
8207
f06add42160c Recreate render target textures when the D3D device is being reset, and notify the application using the SDL_RENDER_TARGETS_RESET event when this happens.
Sam Lantinga <slouken@libsdl.org>
parents: 8149
diff changeset
   144
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   145
    /** Events ::SDL_USEREVENT through ::SDL_LASTEVENT are for your use,
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   146
     *  and should be allocated with SDL_RegisterEvents()
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   147
     */
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   148
    SDL_USEREVENT    = 0x8000,
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   149
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   150
    /**
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   151
     *  This last event is only for bounding internal arrays
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   152
     */
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   153
    SDL_LASTEVENT    = 0xFFFF
1294
1760ceb23bc6 Date: Fri, 18 Feb 2005 20:49:35 +0200 (EET)
Sam Lantinga <slouken@libsdl.org>
parents: 1258
diff changeset
   154
} SDL_EventType;
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   155
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   156
/**
6949
4de584a3a027 Fixed the joystick id usage in the joystick and game controller events.
Sam Lantinga <slouken@libsdl.org>
parents: 6917
diff changeset
   157
 *  \brief Fields shared by every event
4de584a3a027 Fixed the joystick id usage in the joystick and game controller events.
Sam Lantinga <slouken@libsdl.org>
parents: 6917
diff changeset
   158
 */
7082
e9d6004d2978 future-proofing for Microsoft's C++/CX extensions, whereby "generic" is a reserved keyword
David Ludwig <dludwig@pobox.com>
parents: 6974
diff changeset
   159
typedef struct SDL_CommonEvent
6949
4de584a3a027 Fixed the joystick id usage in the joystick and game controller events.
Sam Lantinga <slouken@libsdl.org>
parents: 6917
diff changeset
   160
{
4de584a3a027 Fixed the joystick id usage in the joystick and game controller events.
Sam Lantinga <slouken@libsdl.org>
parents: 6917
diff changeset
   161
    Uint32 type;
4de584a3a027 Fixed the joystick id usage in the joystick and game controller events.
Sam Lantinga <slouken@libsdl.org>
parents: 6917
diff changeset
   162
    Uint32 timestamp;
7082
e9d6004d2978 future-proofing for Microsoft's C++/CX extensions, whereby "generic" is a reserved keyword
David Ludwig <dludwig@pobox.com>
parents: 6974
diff changeset
   163
} SDL_CommonEvent;
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   164
6949
4de584a3a027 Fixed the joystick id usage in the joystick and game controller events.
Sam Lantinga <slouken@libsdl.org>
parents: 6917
diff changeset
   165
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   166
 *  \brief Window state change event data (event.window.*)
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   167
 */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   168
typedef struct SDL_WindowEvent
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   169
{
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   170
    Uint32 type;        /**< ::SDL_WINDOWEVENT */
6114
d166819bf2b3 Fixed bug 1336 - Added a timestamp on all SDL events
Sam Lantinga <slouken@libsdl.org>
parents: 6091
diff changeset
   171
    Uint32 timestamp;
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   172
    Uint32 windowID;    /**< The associated window */
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   173
    Uint8 event;        /**< ::SDL_WindowEventID */
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   174
    Uint8 padding1;
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   175
    Uint8 padding2;
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   176
    Uint8 padding3;
6950
1ddb72193079 Added a mouse ID to the mouse events, which set to the special value SDL_TOUCH_MOUSEID for mouse events simulated by touch input.
Sam Lantinga <slouken@libsdl.org>
parents: 6949
diff changeset
   177
    Sint32 data1;       /**< event dependent data */
1ddb72193079 Added a mouse ID to the mouse events, which set to the special value SDL_TOUCH_MOUSEID for mouse events simulated by touch input.
Sam Lantinga <slouken@libsdl.org>
parents: 6949
diff changeset
   178
    Sint32 data2;       /**< event dependent data */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   179
} SDL_WindowEvent;
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   180
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   181
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   182
 *  \brief Keyboard button event structure (event.key.*)
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   183
 */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   184
typedef struct SDL_KeyboardEvent
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   185
{
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   186
    Uint32 type;        /**< ::SDL_KEYDOWN or ::SDL_KEYUP */
6114
d166819bf2b3 Fixed bug 1336 - Added a timestamp on all SDL events
Sam Lantinga <slouken@libsdl.org>
parents: 6091
diff changeset
   187
    Uint32 timestamp;
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   188
    Uint32 windowID;    /**< The window with keyboard focus, if any */
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   189
    Uint8 state;        /**< ::SDL_PRESSED or ::SDL_RELEASED */
4560
95352c671a6e Added support for keyboard repeat (only tested on Windows so far)
Sam Lantinga <slouken@libsdl.org>
parents: 4503
diff changeset
   190
    Uint8 repeat;       /**< Non-zero if this is a key repeat */
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   191
    Uint8 padding2;
4465
3e69e077cb95 Removed multi-mouse / multi-keyboard support in anticipation of a real multi-mouse and multi-touch API.
Sam Lantinga <slouken@libsdl.org>
parents: 4435
diff changeset
   192
    Uint8 padding3;
5218
572a73d71b5f Sheena pointed out that "scancode" and "keysym" are single words and shouldn't be camel-cased.
Sam Lantinga <slouken@libsdl.org>
parents: 5146
diff changeset
   193
    SDL_Keysym keysym;  /**< The key that was pressed or released */
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   194
} SDL_KeyboardEvent;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   195
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   196
#define SDL_TEXTEDITINGEVENT_TEXT_SIZE (32)
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   197
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   198
 *  \brief Keyboard text editing event structure (event.edit.*)
3280
00cace2d9080 Merged a cleaned up version of Jiang's code changes from Google Summer of Code 2009
Sam Lantinga <slouken@libsdl.org>
parents: 3191
diff changeset
   199
 */
00cace2d9080 Merged a cleaned up version of Jiang's code changes from Google Summer of Code 2009
Sam Lantinga <slouken@libsdl.org>
parents: 3191
diff changeset
   200
typedef struct SDL_TextEditingEvent
00cace2d9080 Merged a cleaned up version of Jiang's code changes from Google Summer of Code 2009
Sam Lantinga <slouken@libsdl.org>
parents: 3191
diff changeset
   201
{
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   202
    Uint32 type;                                /**< ::SDL_TEXTEDITING */
6114
d166819bf2b3 Fixed bug 1336 - Added a timestamp on all SDL events
Sam Lantinga <slouken@libsdl.org>
parents: 6091
diff changeset
   203
    Uint32 timestamp;
4434
5c64052fb476 changeset: 4433:25667ea797fa
Sam Lantinga <slouken@libsdl.org>
parents: 4429
diff changeset
   204
    Uint32 windowID;                            /**< The window with keyboard focus, if any */
3280
00cace2d9080 Merged a cleaned up version of Jiang's code changes from Google Summer of Code 2009
Sam Lantinga <slouken@libsdl.org>
parents: 3191
diff changeset
   205
    char text[SDL_TEXTEDITINGEVENT_TEXT_SIZE];  /**< The editing text */
6950
1ddb72193079 Added a mouse ID to the mouse events, which set to the special value SDL_TOUCH_MOUSEID for mouse events simulated by touch input.
Sam Lantinga <slouken@libsdl.org>
parents: 6949
diff changeset
   206
    Sint32 start;                               /**< The start cursor of selected editing text */
1ddb72193079 Added a mouse ID to the mouse events, which set to the special value SDL_TOUCH_MOUSEID for mouse events simulated by touch input.
Sam Lantinga <slouken@libsdl.org>
parents: 6949
diff changeset
   207
    Sint32 length;                              /**< The length of selected editing text */
3280
00cace2d9080 Merged a cleaned up version of Jiang's code changes from Google Summer of Code 2009
Sam Lantinga <slouken@libsdl.org>
parents: 3191
diff changeset
   208
} SDL_TextEditingEvent;
00cace2d9080 Merged a cleaned up version of Jiang's code changes from Google Summer of Code 2009
Sam Lantinga <slouken@libsdl.org>
parents: 3191
diff changeset
   209
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   210
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   211
#define SDL_TEXTINPUTEVENT_TEXT_SIZE (32)
3280
00cace2d9080 Merged a cleaned up version of Jiang's code changes from Google Summer of Code 2009
Sam Lantinga <slouken@libsdl.org>
parents: 3191
diff changeset
   212
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   213
 *  \brief Keyboard text input event structure (event.text.*)
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   214
 */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   215
typedef struct SDL_TextInputEvent
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   216
{
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   217
    Uint32 type;                              /**< ::SDL_TEXTINPUT */
6114
d166819bf2b3 Fixed bug 1336 - Added a timestamp on all SDL events
Sam Lantinga <slouken@libsdl.org>
parents: 6091
diff changeset
   218
    Uint32 timestamp;
3685
64ce267332c6 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents: 3572
diff changeset
   219
    Uint32 windowID;                          /**< The window with keyboard focus, if any */
2300
c97ad1abe05b Minimal implementation of textinput events for x11. It only works for latin-1.
Bob Pendleton <bob@pendleton.com>
parents: 2152
diff changeset
   220
    char text[SDL_TEXTINPUTEVENT_TEXT_SIZE];  /**< The input text */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   221
} SDL_TextInputEvent;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   222
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   223
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   224
 *  \brief Mouse motion event structure (event.motion.*)
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   225
 */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   226
typedef struct SDL_MouseMotionEvent
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   227
{
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   228
    Uint32 type;        /**< ::SDL_MOUSEMOTION */
6114
d166819bf2b3 Fixed bug 1336 - Added a timestamp on all SDL events
Sam Lantinga <slouken@libsdl.org>
parents: 6091
diff changeset
   229
    Uint32 timestamp;
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   230
    Uint32 windowID;    /**< The window with mouse focus, if any */
6950
1ddb72193079 Added a mouse ID to the mouse events, which set to the special value SDL_TOUCH_MOUSEID for mouse events simulated by touch input.
Sam Lantinga <slouken@libsdl.org>
parents: 6949
diff changeset
   231
    Uint32 which;       /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
7203
c74f5dbcfd23 Fixed bug 1856 - (Patch) More bits for SDL_MouseMotionEvent.state
Sam Lantinga <slouken@libsdl.org>
parents: 7191
diff changeset
   232
    Uint32 state;       /**< The current button state */
6950
1ddb72193079 Added a mouse ID to the mouse events, which set to the special value SDL_TOUCH_MOUSEID for mouse events simulated by touch input.
Sam Lantinga <slouken@libsdl.org>
parents: 6949
diff changeset
   233
    Sint32 x;           /**< X coordinate, relative to window */
1ddb72193079 Added a mouse ID to the mouse events, which set to the special value SDL_TOUCH_MOUSEID for mouse events simulated by touch input.
Sam Lantinga <slouken@libsdl.org>
parents: 6949
diff changeset
   234
    Sint32 y;           /**< Y coordinate, relative to window */
1ddb72193079 Added a mouse ID to the mouse events, which set to the special value SDL_TOUCH_MOUSEID for mouse events simulated by touch input.
Sam Lantinga <slouken@libsdl.org>
parents: 6949
diff changeset
   235
    Sint32 xrel;        /**< The relative motion in the X direction */
1ddb72193079 Added a mouse ID to the mouse events, which set to the special value SDL_TOUCH_MOUSEID for mouse events simulated by touch input.
Sam Lantinga <slouken@libsdl.org>
parents: 6949
diff changeset
   236
    Sint32 yrel;        /**< The relative motion in the Y direction */
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   237
} SDL_MouseMotionEvent;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   238
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   239
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   240
 *  \brief Mouse button event structure (event.button.*)
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   241
 */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   242
typedef struct SDL_MouseButtonEvent
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   243
{
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   244
    Uint32 type;        /**< ::SDL_MOUSEBUTTONDOWN or ::SDL_MOUSEBUTTONUP */
6114
d166819bf2b3 Fixed bug 1336 - Added a timestamp on all SDL events
Sam Lantinga <slouken@libsdl.org>
parents: 6091
diff changeset
   245
    Uint32 timestamp;
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   246
    Uint32 windowID;    /**< The window with mouse focus, if any */
6950
1ddb72193079 Added a mouse ID to the mouse events, which set to the special value SDL_TOUCH_MOUSEID for mouse events simulated by touch input.
Sam Lantinga <slouken@libsdl.org>
parents: 6949
diff changeset
   247
    Uint32 which;       /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   248
    Uint8 button;       /**< The mouse button index */
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   249
    Uint8 state;        /**< ::SDL_PRESSED or ::SDL_RELEASED */
8066
658b461d81be Added support for double-clicks, through a new "clicks" field in the mouse button event.
Sam Lantinga <slouken@libsdl.org>
parents: 7678
diff changeset
   250
    Uint8 clicks;       /**< 1 for single-click, 2 for double-click, etc. */
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   251
    Uint8 padding1;
6950
1ddb72193079 Added a mouse ID to the mouse events, which set to the special value SDL_TOUCH_MOUSEID for mouse events simulated by touch input.
Sam Lantinga <slouken@libsdl.org>
parents: 6949
diff changeset
   252
    Sint32 x;           /**< X coordinate, relative to window */
1ddb72193079 Added a mouse ID to the mouse events, which set to the special value SDL_TOUCH_MOUSEID for mouse events simulated by touch input.
Sam Lantinga <slouken@libsdl.org>
parents: 6949
diff changeset
   253
    Sint32 y;           /**< Y coordinate, relative to window */
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   254
} SDL_MouseButtonEvent;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   255
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   256
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   257
 *  \brief Mouse wheel event structure (event.wheel.*)
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   258
 */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   259
typedef struct SDL_MouseWheelEvent
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   260
{
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   261
    Uint32 type;        /**< ::SDL_MOUSEWHEEL */
6114
d166819bf2b3 Fixed bug 1336 - Added a timestamp on all SDL events
Sam Lantinga <slouken@libsdl.org>
parents: 6091
diff changeset
   262
    Uint32 timestamp;
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   263
    Uint32 windowID;    /**< The window with mouse focus, if any */
6950
1ddb72193079 Added a mouse ID to the mouse events, which set to the special value SDL_TOUCH_MOUSEID for mouse events simulated by touch input.
Sam Lantinga <slouken@libsdl.org>
parents: 6949
diff changeset
   264
    Uint32 which;       /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
8232
8976fb30952f Fixed bug 2346 - Mac: mousewheel events have flipped horizontal scroll values
Sam Lantinga <slouken@libsdl.org>
parents: 8207
diff changeset
   265
    Sint32 x;           /**< The amount scrolled horizontally, positive to the right and negative to the left */
8976fb30952f Fixed bug 2346 - Mac: mousewheel events have flipped horizontal scroll values
Sam Lantinga <slouken@libsdl.org>
parents: 8207
diff changeset
   266
    Sint32 y;           /**< The amount scrolled vertically, positive away from the user and negative toward the user */
9257
6f41196c2d6b add in support for passing down the "natural" (or flipped) scrolling direction in the MouseWheelEvent event
Edward Rudd <urkle@outoforder.cc>
parents: 9049
diff changeset
   267
    Uint32 direction;   /**< Set to one of the SDL_MOUSEWHEEL_* defines. When FLIPPED the values in X and Y will be opposite. Multiply by -1 to change them back */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   268
} SDL_MouseWheelEvent;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   269
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   270
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   271
 *  \brief Joystick axis motion event structure (event.jaxis.*)
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   272
 */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   273
typedef struct SDL_JoyAxisEvent
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   274
{
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   275
    Uint32 type;        /**< ::SDL_JOYAXISMOTION */
6114
d166819bf2b3 Fixed bug 1336 - Added a timestamp on all SDL events
Sam Lantinga <slouken@libsdl.org>
parents: 6091
diff changeset
   276
    Uint32 timestamp;
6974
11a03a79dfe8 The joystick events contain a joystick instance ID, which is a signed value, with -1 being invalid.
Sam Lantinga <slouken@libsdl.org>
parents: 6972
diff changeset
   277
    SDL_JoystickID which; /**< The joystick instance id */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   278
    Uint8 axis;         /**< The joystick axis index */
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   279
    Uint8 padding1;
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   280
    Uint8 padding2;
6949
4de584a3a027 Fixed the joystick id usage in the joystick and game controller events.
Sam Lantinga <slouken@libsdl.org>
parents: 6917
diff changeset
   281
    Uint8 padding3;
4de584a3a027 Fixed the joystick id usage in the joystick and game controller events.
Sam Lantinga <slouken@libsdl.org>
parents: 6917
diff changeset
   282
    Sint16 value;       /**< The axis value (range: -32768 to 32767) */
4de584a3a027 Fixed the joystick id usage in the joystick and game controller events.
Sam Lantinga <slouken@libsdl.org>
parents: 6917
diff changeset
   283
    Uint16 padding4;
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   284
} SDL_JoyAxisEvent;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   285
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   286
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   287
 *  \brief Joystick trackball motion event structure (event.jball.*)
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   288
 */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   289
typedef struct SDL_JoyBallEvent
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   290
{
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   291
    Uint32 type;        /**< ::SDL_JOYBALLMOTION */
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   292
    Uint32 timestamp;
6974
11a03a79dfe8 The joystick events contain a joystick instance ID, which is a signed value, with -1 being invalid.
Sam Lantinga <slouken@libsdl.org>
parents: 6972
diff changeset
   293
    SDL_JoystickID which; /**< The joystick instance id */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   294
    Uint8 ball;         /**< The joystick trackball index */
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   295
    Uint8 padding1;
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   296
    Uint8 padding2;
6949
4de584a3a027 Fixed the joystick id usage in the joystick and game controller events.
Sam Lantinga <slouken@libsdl.org>
parents: 6917
diff changeset
   297
    Uint8 padding3;
4de584a3a027 Fixed the joystick id usage in the joystick and game controller events.
Sam Lantinga <slouken@libsdl.org>
parents: 6917
diff changeset
   298
    Sint16 xrel;        /**< The relative motion in the X direction */
4de584a3a027 Fixed the joystick id usage in the joystick and game controller events.
Sam Lantinga <slouken@libsdl.org>
parents: 6917
diff changeset
   299
    Sint16 yrel;        /**< The relative motion in the Y direction */
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   300
} SDL_JoyBallEvent;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   301
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   302
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   303
 *  \brief Joystick hat position change event structure (event.jhat.*)
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   304
 */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   305
typedef struct SDL_JoyHatEvent
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   306
{
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   307
    Uint32 type;        /**< ::SDL_JOYHATMOTION */
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   308
    Uint32 timestamp;
6974
11a03a79dfe8 The joystick events contain a joystick instance ID, which is a signed value, with -1 being invalid.
Sam Lantinga <slouken@libsdl.org>
parents: 6972
diff changeset
   309
    SDL_JoystickID which; /**< The joystick instance id */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   310
    Uint8 hat;          /**< The joystick hat index */
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   311
    Uint8 value;        /**< The hat position value.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   312
                         *   \sa ::SDL_HAT_LEFTUP ::SDL_HAT_UP ::SDL_HAT_RIGHTUP
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   313
                         *   \sa ::SDL_HAT_LEFT ::SDL_HAT_CENTERED ::SDL_HAT_RIGHT
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   314
                         *   \sa ::SDL_HAT_LEFTDOWN ::SDL_HAT_DOWN ::SDL_HAT_RIGHTDOWN
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   315
                         *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   316
                         *   Note that zero means the POV is centered.
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   317
                         */
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   318
    Uint8 padding1;
6949
4de584a3a027 Fixed the joystick id usage in the joystick and game controller events.
Sam Lantinga <slouken@libsdl.org>
parents: 6917
diff changeset
   319
    Uint8 padding2;
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   320
} SDL_JoyHatEvent;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   321
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   322
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   323
 *  \brief Joystick button event structure (event.jbutton.*)
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   324
 */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   325
typedef struct SDL_JoyButtonEvent
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   326
{
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   327
    Uint32 type;        /**< ::SDL_JOYBUTTONDOWN or ::SDL_JOYBUTTONUP */
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   328
    Uint32 timestamp;
6974
11a03a79dfe8 The joystick events contain a joystick instance ID, which is a signed value, with -1 being invalid.
Sam Lantinga <slouken@libsdl.org>
parents: 6972
diff changeset
   329
    SDL_JoystickID which; /**< The joystick instance id */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   330
    Uint8 button;       /**< The joystick button index */
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   331
    Uint8 state;        /**< ::SDL_PRESSED or ::SDL_RELEASED */
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   332
    Uint8 padding1;
6949
4de584a3a027 Fixed the joystick id usage in the joystick and game controller events.
Sam Lantinga <slouken@libsdl.org>
parents: 6917
diff changeset
   333
    Uint8 padding2;
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   334
} SDL_JoyButtonEvent;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   335
6690
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
   336
/**
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
   337
 *  \brief Joystick device event structure (event.jdevice.*)
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
   338
 */
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
   339
typedef struct SDL_JoyDeviceEvent
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
   340
{
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   341
    Uint32 type;        /**< ::SDL_JOYDEVICEADDED or ::SDL_JOYDEVICEREMOVED */
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   342
    Uint32 timestamp;
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   343
    Sint32 which;       /**< The joystick device index for the ADDED event, instance id for the REMOVED event */
6690
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
   344
} SDL_JoyDeviceEvent;
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
   345
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
   346
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
   347
/**
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
   348
 *  \brief Game controller axis motion event structure (event.caxis.*)
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
   349
 */
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
   350
typedef struct SDL_ControllerAxisEvent
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
   351
{
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
   352
    Uint32 type;        /**< ::SDL_CONTROLLERAXISMOTION */
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   353
    Uint32 timestamp;
6974
11a03a79dfe8 The joystick events contain a joystick instance ID, which is a signed value, with -1 being invalid.
Sam Lantinga <slouken@libsdl.org>
parents: 6972
diff changeset
   354
    SDL_JoystickID which; /**< The joystick instance id */
6949
4de584a3a027 Fixed the joystick id usage in the joystick and game controller events.
Sam Lantinga <slouken@libsdl.org>
parents: 6917
diff changeset
   355
    Uint8 axis;         /**< The controller axis (SDL_GameControllerAxis) */
4de584a3a027 Fixed the joystick id usage in the joystick and game controller events.
Sam Lantinga <slouken@libsdl.org>
parents: 6917
diff changeset
   356
    Uint8 padding1;
4de584a3a027 Fixed the joystick id usage in the joystick and game controller events.
Sam Lantinga <slouken@libsdl.org>
parents: 6917
diff changeset
   357
    Uint8 padding2;
4de584a3a027 Fixed the joystick id usage in the joystick and game controller events.
Sam Lantinga <slouken@libsdl.org>
parents: 6917
diff changeset
   358
    Uint8 padding3;
4de584a3a027 Fixed the joystick id usage in the joystick and game controller events.
Sam Lantinga <slouken@libsdl.org>
parents: 6917
diff changeset
   359
    Sint16 value;       /**< The axis value (range: -32768 to 32767) */
4de584a3a027 Fixed the joystick id usage in the joystick and game controller events.
Sam Lantinga <slouken@libsdl.org>
parents: 6917
diff changeset
   360
    Uint16 padding4;
6690
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
   361
} SDL_ControllerAxisEvent;
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
   362
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
   363
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
   364
/**
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
   365
 *  \brief Game controller button event structure (event.cbutton.*)
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
   366
 */
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
   367
typedef struct SDL_ControllerButtonEvent
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
   368
{
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
   369
    Uint32 type;        /**< ::SDL_CONTROLLERBUTTONDOWN or ::SDL_CONTROLLERBUTTONUP */
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   370
    Uint32 timestamp;
6974
11a03a79dfe8 The joystick events contain a joystick instance ID, which is a signed value, with -1 being invalid.
Sam Lantinga <slouken@libsdl.org>
parents: 6972
diff changeset
   371
    SDL_JoystickID which; /**< The joystick instance id */
6949
4de584a3a027 Fixed the joystick id usage in the joystick and game controller events.
Sam Lantinga <slouken@libsdl.org>
parents: 6917
diff changeset
   372
    Uint8 button;       /**< The controller button (SDL_GameControllerButton) */
6690
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
   373
    Uint8 state;        /**< ::SDL_PRESSED or ::SDL_RELEASED */
6949
4de584a3a027 Fixed the joystick id usage in the joystick and game controller events.
Sam Lantinga <slouken@libsdl.org>
parents: 6917
diff changeset
   374
    Uint8 padding1;
4de584a3a027 Fixed the joystick id usage in the joystick and game controller events.
Sam Lantinga <slouken@libsdl.org>
parents: 6917
diff changeset
   375
    Uint8 padding2;
6690
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
   376
} SDL_ControllerButtonEvent;
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
   377
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
   378
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
   379
/**
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
   380
 *  \brief Controller device event structure (event.cdevice.*)
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
   381
 */
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
   382
typedef struct SDL_ControllerDeviceEvent
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
   383
{
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   384
    Uint32 type;        /**< ::SDL_CONTROLLERDEVICEADDED, ::SDL_CONTROLLERDEVICEREMOVED, or ::SDL_CONTROLLERDEVICEREMAPPED */
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   385
    Uint32 timestamp;
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   386
    Sint32 which;       /**< The joystick device index for the ADDED event, instance id for the REMOVED or REMAPPED event */
6690
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
   387
} SDL_ControllerDeviceEvent;
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
   388
9393
ed79a66e57e5 Initial work on audio device hotplug support.
Ryan C. Gordon <icculus@icculus.org>
parents: 9257
diff changeset
   389
/**
ed79a66e57e5 Initial work on audio device hotplug support.
Ryan C. Gordon <icculus@icculus.org>
parents: 9257
diff changeset
   390
 *  \brief Audio device event structure (event.adevice.*)
ed79a66e57e5 Initial work on audio device hotplug support.
Ryan C. Gordon <icculus@icculus.org>
parents: 9257
diff changeset
   391
 */
ed79a66e57e5 Initial work on audio device hotplug support.
Ryan C. Gordon <icculus@icculus.org>
parents: 9257
diff changeset
   392
typedef struct SDL_AudioDeviceEvent
ed79a66e57e5 Initial work on audio device hotplug support.
Ryan C. Gordon <icculus@icculus.org>
parents: 9257
diff changeset
   393
{
ed79a66e57e5 Initial work on audio device hotplug support.
Ryan C. Gordon <icculus@icculus.org>
parents: 9257
diff changeset
   394
    Uint32 type;        /**< ::SDL_AUDIODEVICEADDED, or ::SDL_AUDIODEVICEREMOVED */
ed79a66e57e5 Initial work on audio device hotplug support.
Ryan C. Gordon <icculus@icculus.org>
parents: 9257
diff changeset
   395
    Uint32 timestamp;
ed79a66e57e5 Initial work on audio device hotplug support.
Ryan C. Gordon <icculus@icculus.org>
parents: 9257
diff changeset
   396
    Uint32 which;       /**< The audio device index for the ADDED event (valid until next SDL_GetNumAudioDevices() call), SDL_AudioDeviceID for the REMOVED event */
ed79a66e57e5 Initial work on audio device hotplug support.
Ryan C. Gordon <icculus@icculus.org>
parents: 9257
diff changeset
   397
    Uint8 iscapture;    /**< zero if an output device, non-zero if a capture device. */
ed79a66e57e5 Initial work on audio device hotplug support.
Ryan C. Gordon <icculus@icculus.org>
parents: 9257
diff changeset
   398
    Uint8 padding1;
ed79a66e57e5 Initial work on audio device hotplug support.
Ryan C. Gordon <icculus@icculus.org>
parents: 9257
diff changeset
   399
    Uint8 padding2;
ed79a66e57e5 Initial work on audio device hotplug support.
Ryan C. Gordon <icculus@icculus.org>
parents: 9257
diff changeset
   400
    Uint8 padding3;
ed79a66e57e5 Initial work on audio device hotplug support.
Ryan C. Gordon <icculus@icculus.org>
parents: 9257
diff changeset
   401
} SDL_AudioDeviceEvent;
ed79a66e57e5 Initial work on audio device hotplug support.
Ryan C. Gordon <icculus@icculus.org>
parents: 9257
diff changeset
   402
4641
49a97daea6ec Added touch event definitions. Heavily modified events/SDL_touch*.
Jim Grandpre <jim.tla@gmail.com>
parents: 4435
diff changeset
   403
49a97daea6ec Added touch event definitions. Heavily modified events/SDL_touch*.
Jim Grandpre <jim.tla@gmail.com>
parents: 4435
diff changeset
   404
/**
6951
7833f01322b3 Updated touch API
Sam Lantinga <slouken@libsdl.org>
parents: 6950
diff changeset
   405
 *  \brief Touch finger event structure (event.tfinger.*)
4641
49a97daea6ec Added touch event definitions. Heavily modified events/SDL_touch*.
Jim Grandpre <jim.tla@gmail.com>
parents: 4435
diff changeset
   406
 */
49a97daea6ec Added touch event definitions. Heavily modified events/SDL_touch*.
Jim Grandpre <jim.tla@gmail.com>
parents: 4435
diff changeset
   407
typedef struct SDL_TouchFingerEvent
49a97daea6ec Added touch event definitions. Heavily modified events/SDL_touch*.
Jim Grandpre <jim.tla@gmail.com>
parents: 4435
diff changeset
   408
{
6949
4de584a3a027 Fixed the joystick id usage in the joystick and game controller events.
Sam Lantinga <slouken@libsdl.org>
parents: 6917
diff changeset
   409
    Uint32 type;        /**< ::SDL_FINGERMOTION or ::SDL_FINGERDOWN or ::SDL_FINGERUP */
6114
d166819bf2b3 Fixed bug 1336 - Added a timestamp on all SDL events
Sam Lantinga <slouken@libsdl.org>
parents: 6091
diff changeset
   410
    Uint32 timestamp;
6949
4de584a3a027 Fixed the joystick id usage in the joystick and game controller events.
Sam Lantinga <slouken@libsdl.org>
parents: 6917
diff changeset
   411
    SDL_TouchID touchId; /**< The touch device id */
4678
f8431f66613d Added SDL_TouchID, SDL_FingerID, SDL_GestureID types. Converted to integer cioordinates (<- not working).
jimtla
parents: 4676
diff changeset
   412
    SDL_FingerID fingerId;
6951
7833f01322b3 Updated touch API
Sam Lantinga <slouken@libsdl.org>
parents: 6950
diff changeset
   413
    float x;            /**< Normalized in the range 0...1 */
7833f01322b3 Updated touch API
Sam Lantinga <slouken@libsdl.org>
parents: 6950
diff changeset
   414
    float y;            /**< Normalized in the range 0...1 */
9593
66631a359254 Fixed SDL_TouchFingerEvent documentation in header file.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 9418
diff changeset
   415
    float dx;           /**< Normalized in the range -1...1 */
66631a359254 Fixed SDL_TouchFingerEvent documentation in header file.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 9418
diff changeset
   416
    float dy;           /**< Normalized in the range -1...1 */
6951
7833f01322b3 Updated touch API
Sam Lantinga <slouken@libsdl.org>
parents: 6950
diff changeset
   417
    float pressure;     /**< Normalized in the range 0...1 */
4641
49a97daea6ec Added touch event definitions. Heavily modified events/SDL_touch*.
Jim Grandpre <jim.tla@gmail.com>
parents: 4435
diff changeset
   418
} SDL_TouchFingerEvent;
49a97daea6ec Added touch event definitions. Heavily modified events/SDL_touch*.
Jim Grandpre <jim.tla@gmail.com>
parents: 4435
diff changeset
   419
49a97daea6ec Added touch event definitions. Heavily modified events/SDL_touch*.
Jim Grandpre <jim.tla@gmail.com>
parents: 4435
diff changeset
   420
49a97daea6ec Added touch event definitions. Heavily modified events/SDL_touch*.
Jim Grandpre <jim.tla@gmail.com>
parents: 4435
diff changeset
   421
/**
5009
b21ad135d86b Minor documentation consistency cleanup
Sam Lantinga <slouken@libsdl.org>
parents: 4972
diff changeset
   422
 *  \brief Multiple Finger Gesture Event (event.mgesture.*)
4657
eed063a0bf5b Moved Multi finger gesture recognition into the library.
Jim Grandpre <jim.tla@gmail.com>
parents: 4644
diff changeset
   423
 */
eed063a0bf5b Moved Multi finger gesture recognition into the library.
Jim Grandpre <jim.tla@gmail.com>
parents: 4644
diff changeset
   424
typedef struct SDL_MultiGestureEvent
eed063a0bf5b Moved Multi finger gesture recognition into the library.
Jim Grandpre <jim.tla@gmail.com>
parents: 4644
diff changeset
   425
{
eed063a0bf5b Moved Multi finger gesture recognition into the library.
Jim Grandpre <jim.tla@gmail.com>
parents: 4644
diff changeset
   426
    Uint32 type;        /**< ::SDL_MULTIGESTURE */
6114
d166819bf2b3 Fixed bug 1336 - Added a timestamp on all SDL events
Sam Lantinga <slouken@libsdl.org>
parents: 6091
diff changeset
   427
    Uint32 timestamp;
6951
7833f01322b3 Updated touch API
Sam Lantinga <slouken@libsdl.org>
parents: 6950
diff changeset
   428
    SDL_TouchID touchId; /**< The touch device index */
4657
eed063a0bf5b Moved Multi finger gesture recognition into the library.
Jim Grandpre <jim.tla@gmail.com>
parents: 4644
diff changeset
   429
    float dTheta;
eed063a0bf5b Moved Multi finger gesture recognition into the library.
Jim Grandpre <jim.tla@gmail.com>
parents: 4644
diff changeset
   430
    float dDist;
6951
7833f01322b3 Updated touch API
Sam Lantinga <slouken@libsdl.org>
parents: 6950
diff changeset
   431
    float x;
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   432
    float y;
4683
15dfe42edbfd Fixed gestureMulti. Disabled dollar gesture temporarily.
Jim Grandpre <jim.tla@gmail.com>
parents: 4678
diff changeset
   433
    Uint16 numFingers;
15dfe42edbfd Fixed gestureMulti. Disabled dollar gesture temporarily.
Jim Grandpre <jim.tla@gmail.com>
parents: 4678
diff changeset
   434
    Uint16 padding;
4657
eed063a0bf5b Moved Multi finger gesture recognition into the library.
Jim Grandpre <jim.tla@gmail.com>
parents: 4644
diff changeset
   435
} SDL_MultiGestureEvent;
eed063a0bf5b Moved Multi finger gesture recognition into the library.
Jim Grandpre <jim.tla@gmail.com>
parents: 4644
diff changeset
   436
6951
7833f01322b3 Updated touch API
Sam Lantinga <slouken@libsdl.org>
parents: 6950
diff changeset
   437
7309
eae894fafea0 Changed comment to be used by doxygen.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7303
diff changeset
   438
/**
eae894fafea0 Changed comment to be used by doxygen.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7303
diff changeset
   439
 * \brief Dollar Gesture Event (event.dgesture.*)
eae894fafea0 Changed comment to be used by doxygen.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7303
diff changeset
   440
 */
5014
22751715e11a Fixed compiler error
Sam Lantinga <slouken@libsdl.org>
parents: 5009
diff changeset
   441
typedef struct SDL_DollarGestureEvent
4658
454385d76845 Moved $1 Gestures into the SDL Library
Jim Grandpre <jim.tla@gmail.com>
parents: 4657
diff changeset
   442
{
9418
eaafb42daa70 Added missing SDL_DOLLARRECORD event type documentation in header.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 9417
diff changeset
   443
    Uint32 type;        /**< ::SDL_DOLLARGESTURE or ::SDL_DOLLARRECORD */
6114
d166819bf2b3 Fixed bug 1336 - Added a timestamp on all SDL events
Sam Lantinga <slouken@libsdl.org>
parents: 6091
diff changeset
   444
    Uint32 timestamp;
6951
7833f01322b3 Updated touch API
Sam Lantinga <slouken@libsdl.org>
parents: 6950
diff changeset
   445
    SDL_TouchID touchId; /**< The touch device id */
4678
f8431f66613d Added SDL_TouchID, SDL_FingerID, SDL_GestureID types. Converted to integer cioordinates (<- not working).
jimtla
parents: 4676
diff changeset
   446
    SDL_GestureID gestureId;
4689
f9ab8df6d45a Added README.touch and README.gesture. Moved touchtest/gestureSDLTest to test/testgesture
Jim Grandpre <jim.tla@gmail.com>
parents: 4683
diff changeset
   447
    Uint32 numFingers;
4658
454385d76845 Moved $1 Gestures into the SDL Library
Jim Grandpre <jim.tla@gmail.com>
parents: 4657
diff changeset
   448
    float error;
6951
7833f01322b3 Updated touch API
Sam Lantinga <slouken@libsdl.org>
parents: 6950
diff changeset
   449
    float x;            /**< Normalized center of gesture */
7833f01322b3 Updated touch API
Sam Lantinga <slouken@libsdl.org>
parents: 6950
diff changeset
   450
    float y;            /**< Normalized center of gesture */
4658
454385d76845 Moved $1 Gestures into the SDL Library
Jim Grandpre <jim.tla@gmail.com>
parents: 4657
diff changeset
   451
} SDL_DollarGestureEvent;
454385d76845 Moved $1 Gestures into the SDL Library
Jim Grandpre <jim.tla@gmail.com>
parents: 4657
diff changeset
   452
4657
eed063a0bf5b Moved Multi finger gesture recognition into the library.
Jim Grandpre <jim.tla@gmail.com>
parents: 4644
diff changeset
   453
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   454
/**
6091
61fa4f3238c5 First pass at a simple drag and drop API, allowing you to accept files dropped into your application.
Sam Lantinga <slouken@libsdl.org>
parents: 6053
diff changeset
   455
 *  \brief An event used to request a file open by the system (event.drop.*)
61fa4f3238c5 First pass at a simple drag and drop API, allowing you to accept files dropped into your application.
Sam Lantinga <slouken@libsdl.org>
parents: 6053
diff changeset
   456
 *         This event is disabled by default, you can enable it with SDL_EventState()
61fa4f3238c5 First pass at a simple drag and drop API, allowing you to accept files dropped into your application.
Sam Lantinga <slouken@libsdl.org>
parents: 6053
diff changeset
   457
 *  \note If you enable this event, you must free the filename in the event.
61fa4f3238c5 First pass at a simple drag and drop API, allowing you to accept files dropped into your application.
Sam Lantinga <slouken@libsdl.org>
parents: 6053
diff changeset
   458
 */
61fa4f3238c5 First pass at a simple drag and drop API, allowing you to accept files dropped into your application.
Sam Lantinga <slouken@libsdl.org>
parents: 6053
diff changeset
   459
typedef struct SDL_DropEvent
61fa4f3238c5 First pass at a simple drag and drop API, allowing you to accept files dropped into your application.
Sam Lantinga <slouken@libsdl.org>
parents: 6053
diff changeset
   460
{
61fa4f3238c5 First pass at a simple drag and drop API, allowing you to accept files dropped into your application.
Sam Lantinga <slouken@libsdl.org>
parents: 6053
diff changeset
   461
    Uint32 type;        /**< ::SDL_DROPFILE */
6114
d166819bf2b3 Fixed bug 1336 - Added a timestamp on all SDL events
Sam Lantinga <slouken@libsdl.org>
parents: 6091
diff changeset
   462
    Uint32 timestamp;
6091
61fa4f3238c5 First pass at a simple drag and drop API, allowing you to accept files dropped into your application.
Sam Lantinga <slouken@libsdl.org>
parents: 6053
diff changeset
   463
    char *file;         /**< The file name, which should be freed with SDL_free() */
61fa4f3238c5 First pass at a simple drag and drop API, allowing you to accept files dropped into your application.
Sam Lantinga <slouken@libsdl.org>
parents: 6053
diff changeset
   464
} SDL_DropEvent;
61fa4f3238c5 First pass at a simple drag and drop API, allowing you to accept files dropped into your application.
Sam Lantinga <slouken@libsdl.org>
parents: 6053
diff changeset
   465
61fa4f3238c5 First pass at a simple drag and drop API, allowing you to accept files dropped into your application.
Sam Lantinga <slouken@libsdl.org>
parents: 6053
diff changeset
   466
61fa4f3238c5 First pass at a simple drag and drop API, allowing you to accept files dropped into your application.
Sam Lantinga <slouken@libsdl.org>
parents: 6053
diff changeset
   467
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   468
 *  \brief The "quit requested" event
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   469
 */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   470
typedef struct SDL_QuitEvent
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   471
{
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   472
    Uint32 type;        /**< ::SDL_QUIT */
6114
d166819bf2b3 Fixed bug 1336 - Added a timestamp on all SDL events
Sam Lantinga <slouken@libsdl.org>
parents: 6091
diff changeset
   473
    Uint32 timestamp;
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   474
} SDL_QuitEvent;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   475
7190
11612d544fcd Added mobile application events, with implementations for iOS and Android
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   476
/**
11612d544fcd Added mobile application events, with implementations for iOS and Android
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   477
 *  \brief OS Specific event
11612d544fcd Added mobile application events, with implementations for iOS and Android
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   478
 */
11612d544fcd Added mobile application events, with implementations for iOS and Android
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   479
typedef struct SDL_OSEvent
11612d544fcd Added mobile application events, with implementations for iOS and Android
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   480
{
11612d544fcd Added mobile application events, with implementations for iOS and Android
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   481
    Uint32 type;        /**< ::SDL_QUIT */
11612d544fcd Added mobile application events, with implementations for iOS and Android
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   482
    Uint32 timestamp;
11612d544fcd Added mobile application events, with implementations for iOS and Android
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   483
} SDL_OSEvent;
5009
b21ad135d86b Minor documentation consistency cleanup
Sam Lantinga <slouken@libsdl.org>
parents: 4972
diff changeset
   484
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   485
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   486
 *  \brief A user-defined event type (event.user.*)
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   487
 */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   488
typedef struct SDL_UserEvent
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   489
{
7278
fc8b57a2a541 Fixed doxygen warnings and corrected documentation in header files.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7203
diff changeset
   490
    Uint32 type;        /**< ::SDL_USEREVENT through ::SDL_LASTEVENT-1 */
6114
d166819bf2b3 Fixed bug 1336 - Added a timestamp on all SDL events
Sam Lantinga <slouken@libsdl.org>
parents: 6091
diff changeset
   491
    Uint32 timestamp;
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   492
    Uint32 windowID;    /**< The associated window if any */
6950
1ddb72193079 Added a mouse ID to the mouse events, which set to the special value SDL_TOUCH_MOUSEID for mouse events simulated by touch input.
Sam Lantinga <slouken@libsdl.org>
parents: 6949
diff changeset
   493
    Sint32 code;        /**< User defined event code */
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   494
    void *data1;        /**< User defined data pointer */
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   495
    void *data2;        /**< User defined data pointer */
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   496
} SDL_UserEvent;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   497
5009
b21ad135d86b Minor documentation consistency cleanup
Sam Lantinga <slouken@libsdl.org>
parents: 4972
diff changeset
   498
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   499
struct SDL_SysWMmsg;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   500
typedef struct SDL_SysWMmsg SDL_SysWMmsg;
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   501
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   502
/**
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   503
 *  \brief A video driver dependent system event (event.syswm.*)
6091
61fa4f3238c5 First pass at a simple drag and drop API, allowing you to accept files dropped into your application.
Sam Lantinga <slouken@libsdl.org>
parents: 6053
diff changeset
   504
 *         This event is disabled by default, you can enable it with SDL_EventState()
61fa4f3238c5 First pass at a simple drag and drop API, allowing you to accept files dropped into your application.
Sam Lantinga <slouken@libsdl.org>
parents: 6053
diff changeset
   505
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   506
 *  \note If you want to use this event, you should include SDL_syswm.h.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   507
 */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   508
typedef struct SDL_SysWMEvent
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   509
{
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   510
    Uint32 type;        /**< ::SDL_SYSWMEVENT */
6114
d166819bf2b3 Fixed bug 1336 - Added a timestamp on all SDL events
Sam Lantinga <slouken@libsdl.org>
parents: 6091
diff changeset
   511
    Uint32 timestamp;
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   512
    SDL_SysWMmsg *msg;  /**< driver dependent data, defined in SDL_syswm.h */
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   513
} SDL_SysWMEvent;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   514
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   515
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   516
 *  \brief General event structure
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   517
 */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   518
typedef union SDL_Event
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   519
{
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   520
    Uint32 type;                    /**< Event type, shared with all events */
7082
e9d6004d2978 future-proofing for Microsoft's C++/CX extensions, whereby "generic" is a reserved keyword
David Ludwig <dludwig@pobox.com>
parents: 6974
diff changeset
   521
    SDL_CommonEvent common;         /**< Common event data */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   522
    SDL_WindowEvent window;         /**< Window event data */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   523
    SDL_KeyboardEvent key;          /**< Keyboard event data */
3280
00cace2d9080 Merged a cleaned up version of Jiang's code changes from Google Summer of Code 2009
Sam Lantinga <slouken@libsdl.org>
parents: 3191
diff changeset
   524
    SDL_TextEditingEvent edit;      /**< Text editing event data */
2300
c97ad1abe05b Minimal implementation of textinput events for x11. It only works for latin-1.
Bob Pendleton <bob@pendleton.com>
parents: 2152
diff changeset
   525
    SDL_TextInputEvent text;        /**< Text input event data */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   526
    SDL_MouseMotionEvent motion;    /**< Mouse motion event data */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   527
    SDL_MouseButtonEvent button;    /**< Mouse button event data */
2300
c97ad1abe05b Minimal implementation of textinput events for x11. It only works for latin-1.
Bob Pendleton <bob@pendleton.com>
parents: 2152
diff changeset
   528
    SDL_MouseWheelEvent wheel;      /**< Mouse wheel event data */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   529
    SDL_JoyAxisEvent jaxis;         /**< Joystick axis event data */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   530
    SDL_JoyBallEvent jball;         /**< Joystick ball event data */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   531
    SDL_JoyHatEvent jhat;           /**< Joystick hat event data */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   532
    SDL_JoyButtonEvent jbutton;     /**< Joystick button event data */
6690
9548c8a58103 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
Sam Lantinga <slouken@libsdl.org>
parents: 6596
diff changeset
   533
    SDL_JoyDeviceEvent jdevice;     /**< Joystick device change event data */
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   534
    SDL_ControllerAxisEvent caxis;      /**< Game Controller axis event data */
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   535
    SDL_ControllerButtonEvent cbutton;  /**< Game Controller button event data */
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   536
    SDL_ControllerDeviceEvent cdevice;  /**< Game Controller device event data */
9393
ed79a66e57e5 Initial work on audio device hotplug support.
Ryan C. Gordon <icculus@icculus.org>
parents: 9257
diff changeset
   537
    SDL_AudioDeviceEvent adevice;   /**< Audio device event data */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   538
    SDL_QuitEvent quit;             /**< Quit request event data */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   539
    SDL_UserEvent user;             /**< Custom event data */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   540
    SDL_SysWMEvent syswm;           /**< System dependent window event data */
4641
49a97daea6ec Added touch event definitions. Heavily modified events/SDL_touch*.
Jim Grandpre <jim.tla@gmail.com>
parents: 4435
diff changeset
   541
    SDL_TouchFingerEvent tfinger;   /**< Touch finger event data */
6951
7833f01322b3 Updated touch API
Sam Lantinga <slouken@libsdl.org>
parents: 6950
diff changeset
   542
    SDL_MultiGestureEvent mgesture; /**< Gesture event data */
7833f01322b3 Updated touch API
Sam Lantinga <slouken@libsdl.org>
parents: 6950
diff changeset
   543
    SDL_DollarGestureEvent dgesture; /**< Gesture event data */
6091
61fa4f3238c5 First pass at a simple drag and drop API, allowing you to accept files dropped into your application.
Sam Lantinga <slouken@libsdl.org>
parents: 6053
diff changeset
   544
    SDL_DropEvent drop;             /**< Drag and drop event data */
6595
c6402c811a40 Fixed another gcc <-> Visual C++ ABI issue
Sam Lantinga <slouken@libsdl.org>
parents: 6256
diff changeset
   545
c6402c811a40 Fixed another gcc <-> Visual C++ ABI issue
Sam Lantinga <slouken@libsdl.org>
parents: 6256
diff changeset
   546
    /* This is necessary for ABI compatibility between Visual C++ and GCC
c6402c811a40 Fixed another gcc <-> Visual C++ ABI issue
Sam Lantinga <slouken@libsdl.org>
parents: 6256
diff changeset
   547
       Visual C++ will respect the push pack pragma and use 52 bytes for
c6402c811a40 Fixed another gcc <-> Visual C++ ABI issue
Sam Lantinga <slouken@libsdl.org>
parents: 6256
diff changeset
   548
       this structure, and GCC will use the alignment of the largest datatype
c6402c811a40 Fixed another gcc <-> Visual C++ ABI issue
Sam Lantinga <slouken@libsdl.org>
parents: 6256
diff changeset
   549
       within the union, which is 8 bytes.
c6402c811a40 Fixed another gcc <-> Visual C++ ABI issue
Sam Lantinga <slouken@libsdl.org>
parents: 6256
diff changeset
   550
c6402c811a40 Fixed another gcc <-> Visual C++ ABI issue
Sam Lantinga <slouken@libsdl.org>
parents: 6256
diff changeset
   551
       So... we'll add padding to force the size to be 56 bytes for both.
c6402c811a40 Fixed another gcc <-> Visual C++ ABI issue
Sam Lantinga <slouken@libsdl.org>
parents: 6256
diff changeset
   552
    */
c6402c811a40 Fixed another gcc <-> Visual C++ ABI issue
Sam Lantinga <slouken@libsdl.org>
parents: 6256
diff changeset
   553
    Uint8 padding[56];
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   554
} SDL_Event;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   555
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   556
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   557
/* Function prototypes */
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   558
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   559
/**
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   560
 *  Pumps the event loop, gathering events from the input devices.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   561
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   562
 *  This function updates the event queue and internal input device state.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   563
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   564
 *  This should only be run in the thread that sets the video mode.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   565
 */
337
9154ec9ca3d2 Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents: 297
diff changeset
   566
extern DECLSPEC void SDLCALL SDL_PumpEvents(void);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   567
7678
286c42d7c5ed OCD fixes: Adds a space after /* (glory to regular expressions!)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7677
diff changeset
   568
/* @{ */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   569
typedef enum
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   570
{
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   571
    SDL_ADDEVENT,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   572
    SDL_PEEKEVENT,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   573
    SDL_GETEVENT
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   574
} SDL_eventaction;
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   575
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   576
/**
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   577
 *  Checks the event queue for messages and optionally returns them.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   578
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   579
 *  If \c action is ::SDL_ADDEVENT, up to \c numevents events will be added to
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   580
 *  the back of the event queue.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   581
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   582
 *  If \c action is ::SDL_PEEKEVENT, up to \c numevents events at the front
4635
0a07d002f10b Fixed documentation error
Sam Lantinga <slouken@libsdl.org>
parents: 4560
diff changeset
   583
 *  of the event queue, within the specified minimum and maximum type,
0a07d002f10b Fixed documentation error
Sam Lantinga <slouken@libsdl.org>
parents: 4560
diff changeset
   584
 *  will be returned and will not be removed from the queue.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   585
 *
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   586
 *  If \c action is ::SDL_GETEVENT, up to \c numevents events at the front
4635
0a07d002f10b Fixed documentation error
Sam Lantinga <slouken@libsdl.org>
parents: 4560
diff changeset
   587
 *  of the event queue, within the specified minimum and maximum type,
0a07d002f10b Fixed documentation error
Sam Lantinga <slouken@libsdl.org>
parents: 4560
diff changeset
   588
 *  will be returned and will be removed from the queue.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   589
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   590
 *  \return The number of events actually stored, or -1 if there was an error.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   591
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   592
 *  This function is thread-safe.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   593
 */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   594
extern DECLSPEC int SDLCALL SDL_PeepEvents(SDL_Event * events, int numevents,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   595
                                           SDL_eventaction action,
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   596
                                           Uint32 minType, Uint32 maxType);
7678
286c42d7c5ed OCD fixes: Adds a space after /* (glory to regular expressions!)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7677
diff changeset
   597
/* @} */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   598
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   599
/**
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   600
 *  Checks to see if certain event types are in the event queue.
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   601
 */
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   602
extern DECLSPEC SDL_bool SDLCALL SDL_HasEvent(Uint32 type);
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   603
extern DECLSPEC SDL_bool SDLCALL SDL_HasEvents(Uint32 minType, Uint32 maxType);
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   604
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   605
/**
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   606
 *  This function clears events from the event queue
9002
c1bd00f50724 Clarified the documentation for SDL_FlushEvents() so people know it only affects currently queued events.
Sam Lantinga <slouken@libsdl.org>
parents: 8674
diff changeset
   607
 *  This function only affects currently queued events. If you want to make
c1bd00f50724 Clarified the documentation for SDL_FlushEvents() so people know it only affects currently queued events.
Sam Lantinga <slouken@libsdl.org>
parents: 8674
diff changeset
   608
 *  sure that all pending OS events are flushed, you can call SDL_PumpEvents()
c1bd00f50724 Clarified the documentation for SDL_FlushEvents() so people know it only affects currently queued events.
Sam Lantinga <slouken@libsdl.org>
parents: 8674
diff changeset
   609
 *  on the main thread immediately before the flush call.
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   610
 */
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   611
extern DECLSPEC void SDLCALL SDL_FlushEvent(Uint32 type);
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   612
extern DECLSPEC void SDLCALL SDL_FlushEvents(Uint32 minType, Uint32 maxType);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   613
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   614
/**
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   615
 *  \brief Polls for currently pending events.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   616
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   617
 *  \return 1 if there are any pending events, or 0 if there are none available.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   618
 *
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   619
 *  \param event If not NULL, the next event is removed from the queue and
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   620
 *               stored in that area.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   621
 */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   622
extern DECLSPEC int SDLCALL SDL_PollEvent(SDL_Event * event);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   623
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   624
/**
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   625
 *  \brief Waits indefinitely for the next available event.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   626
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   627
 *  \return 1, or 0 if there was an error while waiting for events.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   628
 *
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   629
 *  \param event If not NULL, the next event is removed from the queue and
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   630
 *               stored in that area.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   631
 */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   632
extern DECLSPEC int SDLCALL SDL_WaitEvent(SDL_Event * event);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   633
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   634
/**
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   635
 *  \brief Waits until the specified timeout (in milliseconds) for the next
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   636
 *         available event.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   637
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   638
 *  \return 1, or 0 if there was an error while waiting for events.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   639
 *
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   640
 *  \param event If not NULL, the next event is removed from the queue and
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   641
 *               stored in that area.
7188
20bd120bf7e4 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7125
diff changeset
   642
 *  \param timeout The timeout (in milliseconds) to wait for next event.
3072
9da8f57ab92c Fixed bug #684
Sam Lantinga <slouken@libsdl.org>
parents: 2859
diff changeset
   643
 */
9da8f57ab92c Fixed bug #684
Sam Lantinga <slouken@libsdl.org>
parents: 2859
diff changeset
   644
extern DECLSPEC int SDLCALL SDL_WaitEventTimeout(SDL_Event * event,
9da8f57ab92c Fixed bug #684
Sam Lantinga <slouken@libsdl.org>
parents: 2859
diff changeset
   645
                                                 int timeout);
9da8f57ab92c Fixed bug #684
Sam Lantinga <slouken@libsdl.org>
parents: 2859
diff changeset
   646
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   647
/**
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   648
 *  \brief Add an event to the event queue.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   649
 *
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   650
 *  \return 1 on success, 0 if the event was filtered, or -1 if the event queue
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   651
 *          was full or there was some other error.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   652
 */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   653
extern DECLSPEC int SDLCALL SDL_PushEvent(SDL_Event * event);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   654
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   655
typedef int (SDLCALL * SDL_EventFilter) (void *userdata, SDL_Event * event);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   656
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   657
/**
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   658
 *  Sets up a filter to process all events before they change internal state and
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   659
 *  are posted to the internal event queue.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   660
 *
7125
082c0c53ac16 Corrected spelling in header files.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7082
diff changeset
   661
 *  The filter is prototyped as:
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   662
 *  \code
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   663
 *      int SDL_EventFilter(void *userdata, SDL_Event * event);
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   664
 *  \endcode
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   665
 *
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   666
 *  If the filter returns 1, then the event will be added to the internal queue.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   667
 *  If it returns 0, then the event will be dropped from the queue, but the
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   668
 *  internal state will still be updated.  This allows selective filtering of
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   669
 *  dynamically arriving events.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   670
 *
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   671
 *  \warning  Be very careful of what you do in the event filter function, as
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   672
 *            it may run in a different thread!
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   673
 *
7278
fc8b57a2a541 Fixed doxygen warnings and corrected documentation in header files.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7203
diff changeset
   674
 *  There is one caveat when dealing with the ::SDL_QuitEvent event type.  The
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   675
 *  event filter is only called when the window manager desires to close the
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   676
 *  application window.  If the event filter returns 1, then the window will
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   677
 *  be closed, otherwise the window will remain open if possible.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   678
 *
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   679
 *  If the quit event is generated by an interrupt signal, it will bypass the
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   680
 *  internal queue and be delivered to the application at the next event poll.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   681
 */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   682
extern DECLSPEC void SDLCALL SDL_SetEventFilter(SDL_EventFilter filter,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   683
                                                void *userdata);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   684
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   685
/**
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   686
 *  Return the current event filter - can be used to "chain" filters.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   687
 *  If there is no event filter set, this function returns SDL_FALSE.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   688
 */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   689
extern DECLSPEC SDL_bool SDLCALL SDL_GetEventFilter(SDL_EventFilter * filter,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   690
                                                    void **userdata);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   691
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   692
/**
5146
3052772b59db Added functions to watch events as they go through the event queue.
Sam Lantinga <slouken@libsdl.org>
parents: 5081
diff changeset
   693
 *  Add a function which is called when an event is added to the queue.
3052772b59db Added functions to watch events as they go through the event queue.
Sam Lantinga <slouken@libsdl.org>
parents: 5081
diff changeset
   694
 */
3052772b59db Added functions to watch events as they go through the event queue.
Sam Lantinga <slouken@libsdl.org>
parents: 5081
diff changeset
   695
extern DECLSPEC void SDLCALL SDL_AddEventWatch(SDL_EventFilter filter,
3052772b59db Added functions to watch events as they go through the event queue.
Sam Lantinga <slouken@libsdl.org>
parents: 5081
diff changeset
   696
                                               void *userdata);
3052772b59db Added functions to watch events as they go through the event queue.
Sam Lantinga <slouken@libsdl.org>
parents: 5081
diff changeset
   697
3052772b59db Added functions to watch events as they go through the event queue.
Sam Lantinga <slouken@libsdl.org>
parents: 5081
diff changeset
   698
/**
3052772b59db Added functions to watch events as they go through the event queue.
Sam Lantinga <slouken@libsdl.org>
parents: 5081
diff changeset
   699
 *  Remove an event watch function added with SDL_AddEventWatch()
3052772b59db Added functions to watch events as they go through the event queue.
Sam Lantinga <slouken@libsdl.org>
parents: 5081
diff changeset
   700
 */
3052772b59db Added functions to watch events as they go through the event queue.
Sam Lantinga <slouken@libsdl.org>
parents: 5081
diff changeset
   701
extern DECLSPEC void SDLCALL SDL_DelEventWatch(SDL_EventFilter filter,
3052772b59db Added functions to watch events as they go through the event queue.
Sam Lantinga <slouken@libsdl.org>
parents: 5081
diff changeset
   702
                                               void *userdata);
3052772b59db Added functions to watch events as they go through the event queue.
Sam Lantinga <slouken@libsdl.org>
parents: 5081
diff changeset
   703
3052772b59db Added functions to watch events as they go through the event queue.
Sam Lantinga <slouken@libsdl.org>
parents: 5081
diff changeset
   704
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   705
 *  Run the filter function on the current event queue, removing any
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   706
 *  events for which the filter returns 0.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   707
 */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   708
extern DECLSPEC void SDLCALL SDL_FilterEvents(SDL_EventFilter filter,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   709
                                              void *userdata);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   710
7678
286c42d7c5ed OCD fixes: Adds a space after /* (glory to regular expressions!)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7677
diff changeset
   711
/* @{ */
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   712
#define SDL_QUERY   -1
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   713
#define SDL_IGNORE   0
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   714
#define SDL_DISABLE  0
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   715
#define SDL_ENABLE   1
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   716
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   717
/**
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   718
 *  This function allows you to set the state of processing certain events.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   719
 *   - If \c state is set to ::SDL_IGNORE, that event will be automatically
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   720
 *     dropped from the event queue and will not event be filtered.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   721
 *   - If \c state is set to ::SDL_ENABLE, that event will be processed
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   722
 *     normally.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7190
diff changeset
   723
 *   - If \c state is set to ::SDL_QUERY, SDL_EventState() will return the
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   724
 *     current processing state of the specified event.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
   725
 */
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   726
extern DECLSPEC Uint8 SDLCALL SDL_EventState(Uint32 type, int state);
7678
286c42d7c5ed OCD fixes: Adds a space after /* (glory to regular expressions!)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7677
diff changeset
   727
/* @} */
4429
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   728
#define SDL_GetEventState(type) SDL_EventState(type, SDL_QUERY)
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   729
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   730
/**
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   731
 *  This function allocates a set of user-defined events, and returns
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   732
 *  the beginning event number for that set of events.
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   733
 *
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   734
 *  If there aren't enough user-defined events left, this function
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   735
 *  returns (Uint32)-1
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   736
 */
faa9fc8e7f67 General improvements for user custom event registration
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   737
extern DECLSPEC Uint32 SDLCALL SDL_RegisterEvents(int numevents);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   738
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   739
/* Ends C function definitions when using C++ */
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   740
#ifdef __cplusplus
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   741
}
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   742
#endif
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   743
#include "close_code.h"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   744
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   745
#endif /* _SDL_events_h */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   746
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1358
diff changeset
   747
/* vi: set ts=4 sw=4 expandtab: */