include/SDL_joystick.h
author Sam Lantinga <slouken@libsdl.org>
Thu, 25 Oct 2018 16:53:14 -0700
changeset 12359 691c32a30fb9
parent 12357 40f09c8c517b
child 12503 806492103856
permissions -rw-r--r--
Generalized the XInput user index into a player index
slouken@0
     1
/*
slouken@5535
     2
  Simple DirectMedia Layer
slouken@11811
     3
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
slouken@0
     4
slouken@5535
     5
  This software is provided 'as-is', without any express or implied
slouken@5535
     6
  warranty.  In no event will the authors be held liable for any damages
slouken@5535
     7
  arising from the use of this software.
slouken@0
     8
slouken@5535
     9
  Permission is granted to anyone to use this software for any purpose,
slouken@5535
    10
  including commercial applications, and to alter it and redistribute it
slouken@5535
    11
  freely, subject to the following restrictions:
slouken@0
    12
slouken@5535
    13
  1. The origin of this software must not be misrepresented; you must not
slouken@5535
    14
     claim that you wrote the original software. If you use this software
slouken@5535
    15
     in a product, an acknowledgment in the product documentation would be
slouken@5535
    16
     appreciated but is not required.
slouken@5535
    17
  2. Altered source versions must be plainly marked as such, and must not be
slouken@5535
    18
     misrepresented as being the original software.
slouken@5535
    19
  3. This notice may not be removed or altered from any source distribution.
slouken@0
    20
*/
slouken@0
    21
slouken@1895
    22
/**
slouken@3407
    23
 *  \file SDL_joystick.h
slouken@7191
    24
 *
slouken@3407
    25
 *  Include file for SDL joystick event handling
slouken@6690
    26
 *
philipp@10213
    27
 * The term "device_index" identifies currently plugged in joystick devices between 0 and SDL_NumJoysticks(), with the exact joystick
slouken@6690
    28
 *   behind a device_index changing as joysticks are plugged and unplugged.
slouken@6690
    29
 *
slouken@6690
    30
 * The term "instance_id" is the current instantiation of a joystick device in the system, if the joystick is removed and then re-inserted
slouken@6690
    31
 *   then it will get a new instance_id, instance_id's are monotonically increasing identifiers of a joystick plugged in.
slouken@6690
    32
 *
slouken@7191
    33
 * The term JoystickGUID is a stable 128-bit identifier for a joystick device that does not change over time, it identifies class of
slouken@6690
    34
 *   the device (a X360 wired controller for example). This identifier is platform dependent.
slouken@6690
    35
 *
slouken@6690
    36
 *
slouken@1895
    37
 */
slouken@0
    38
slouken@10638
    39
#ifndef SDL_joystick_h_
slouken@10638
    40
#define SDL_joystick_h_
slouken@0
    41
slouken@1356
    42
#include "SDL_stdinc.h"
slouken@1358
    43
#include "SDL_error.h"
slouken@0
    44
slouken@0
    45
#include "begin_code.h"
slouken@0
    46
/* Set up for C function definitions, even when using C++ */
slouken@0
    47
#ifdef __cplusplus
slouken@0
    48
extern "C" {
slouken@0
    49
#endif
slouken@0
    50
slouken@3407
    51
/**
slouken@3407
    52
 *  \file SDL_joystick.h
slouken@3407
    53
 *
slouken@3407
    54
 *  In order to use these functions, SDL_Init() must have been called
slouken@3407
    55
 *  with the ::SDL_INIT_JOYSTICK flag.  This causes SDL to scan the system
slouken@3407
    56
 *  for joysticks, and load appropriate drivers.
slouken@7341
    57
 *
slouken@7341
    58
 *  If you would like to receive joystick updates while the application
slouken@7341
    59
 *  is in the background, you should set the following hint before calling
slouken@7341
    60
 *  SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS
slouken@3407
    61
 */
slouken@0
    62
slouken@10636
    63
/**
slouken@10636
    64
 * The joystick structure used to identify an SDL joystick
slouken@10636
    65
 */
slouken@0
    66
struct _SDL_Joystick;
slouken@0
    67
typedef struct _SDL_Joystick SDL_Joystick;
slouken@0
    68
slouken@6707
    69
/* A structure that encodes the stable unique id for a joystick device */
slouken@6707
    70
typedef struct {
slouken@7191
    71
    Uint8 data[16];
slouken@6738
    72
} SDL_JoystickGUID;
slouken@6707
    73
slouken@10934
    74
/**
slouken@10934
    75
 * This is a unique ID for a joystick for the time it is connected to the system,
slouken@10934
    76
 * and is never reused for the lifetime of the application. If the joystick is
slouken@10934
    77
 * disconnected and reconnected, it will get a new ID.
slouken@10934
    78
 *
slouken@10934
    79
 * The ID value starts at 0 and increments from there. The value -1 is an invalid ID.
slouken@10934
    80
 */
slouken@6974
    81
typedef Sint32 SDL_JoystickID;
slouken@6707
    82
slouken@9884
    83
typedef enum
slouken@9884
    84
{
slouken@10855
    85
    SDL_JOYSTICK_TYPE_UNKNOWN,
slouken@10855
    86
    SDL_JOYSTICK_TYPE_GAMECONTROLLER,
slouken@10855
    87
    SDL_JOYSTICK_TYPE_WHEEL,
slouken@10855
    88
    SDL_JOYSTICK_TYPE_ARCADE_STICK,
slouken@10855
    89
    SDL_JOYSTICK_TYPE_FLIGHT_STICK,
slouken@10855
    90
    SDL_JOYSTICK_TYPE_DANCE_PAD,
slouken@10855
    91
    SDL_JOYSTICK_TYPE_GUITAR,
slouken@10855
    92
    SDL_JOYSTICK_TYPE_DRUM_KIT,
slouken@10868
    93
    SDL_JOYSTICK_TYPE_ARCADE_PAD,
slouken@10870
    94
    SDL_JOYSTICK_TYPE_THROTTLE
slouken@10855
    95
} SDL_JoystickType;
slouken@10855
    96
slouken@10855
    97
typedef enum
slouken@10855
    98
{
slouken@9884
    99
    SDL_JOYSTICK_POWER_UNKNOWN = -1,
slouken@12088
   100
    SDL_JOYSTICK_POWER_EMPTY,   /* <= 5% */
slouken@12088
   101
    SDL_JOYSTICK_POWER_LOW,     /* <= 20% */
slouken@12088
   102
    SDL_JOYSTICK_POWER_MEDIUM,  /* <= 70% */
slouken@12088
   103
    SDL_JOYSTICK_POWER_FULL,    /* <= 100% */
slouken@9884
   104
    SDL_JOYSTICK_POWER_WIRED,
slouken@9884
   105
    SDL_JOYSTICK_POWER_MAX
slouken@9884
   106
} SDL_JoystickPowerLevel;
slouken@6707
   107
slouken@0
   108
/* Function prototypes */
slouken@11581
   109
slouken@11581
   110
/**
slouken@11581
   111
 * Locking for multi-threaded access to the joystick API
slouken@11581
   112
 *
slouken@11581
   113
 * If you are using the joystick API or handling events from multiple threads
slouken@11581
   114
 * you should use these locking functions to protect access to the joysticks.
slouken@11581
   115
 *
slouken@11581
   116
 * In particular, you are guaranteed that the joystick list won't change, so
slouken@11581
   117
 * the API functions that take a joystick index will be valid, and joystick
slouken@11581
   118
 * and game controller events will not be delivered.
slouken@11581
   119
 */
slouken@11581
   120
extern DECLSPEC void SDLCALL SDL_LockJoysticks(void);
slouken@11581
   121
extern DECLSPEC void SDLCALL SDL_UnlockJoysticks(void);
slouken@11581
   122
slouken@3407
   123
/**
slouken@6690
   124
 *  Count the number of joysticks attached to the system right now
slouken@0
   125
 */
slouken@337
   126
extern DECLSPEC int SDLCALL SDL_NumJoysticks(void);
slouken@0
   127
slouken@3407
   128
/**
slouken@3407
   129
 *  Get the implementation dependent name of a joystick.
slouken@3407
   130
 *  This can be called before any joysticks are opened.
slouken@3407
   131
 *  If no name can be found, this function returns NULL.
slouken@0
   132
 */
slouken@6690
   133
extern DECLSPEC const char *SDLCALL SDL_JoystickNameForIndex(int device_index);
slouken@0
   134
slouken@3407
   135
/**
slouken@12359
   136
 *  Get the player index of a joystick, or -1 if it's not available
slouken@12359
   137
 *  This can be called before any joysticks are opened.
slouken@12359
   138
 */
slouken@12359
   139
extern DECLSPEC int SDLCALL SDL_JoystickGetDevicePlayerIndex(int device_index);
slouken@12359
   140
slouken@12359
   141
/**
slouken@10595
   142
 *  Return the GUID for the joystick at this index
slouken@10595
   143
 *  This can be called before any joysticks are opened.
slouken@10595
   144
 */
slouken@10595
   145
extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetDeviceGUID(int device_index);
slouken@10595
   146
slouken@10595
   147
/**
slouken@10595
   148
 *  Get the USB vendor ID of a joystick, if available.
slouken@10595
   149
 *  This can be called before any joysticks are opened.
slouken@10595
   150
 *  If the vendor ID isn't available this function returns 0.
slouken@10595
   151
 */
slouken@10595
   152
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceVendor(int device_index);
slouken@10595
   153
slouken@10595
   154
/**
slouken@10595
   155
 *  Get the USB product ID of a joystick, if available.
slouken@10595
   156
 *  This can be called before any joysticks are opened.
slouken@10595
   157
 *  If the product ID isn't available this function returns 0.
slouken@10595
   158
 */
slouken@10595
   159
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceProduct(int device_index);
slouken@10595
   160
slouken@10595
   161
/**
slouken@10595
   162
 *  Get the product version of a joystick, if available.
slouken@10595
   163
 *  This can be called before any joysticks are opened.
slouken@10595
   164
 *  If the product version isn't available this function returns 0.
slouken@10595
   165
 */
slouken@10595
   166
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceProductVersion(int device_index);
slouken@10595
   167
slouken@10595
   168
/**
slouken@10855
   169
 *  Get the type of a joystick, if available.
slouken@10855
   170
 *  This can be called before any joysticks are opened.
slouken@10855
   171
 */
slouken@10855
   172
extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetDeviceType(int device_index);
slouken@10855
   173
slouken@10855
   174
/**
slouken@10934
   175
 *  Get the instance ID of a joystick.
slouken@10934
   176
 *  This can be called before any joysticks are opened.
slouken@10934
   177
 *  If the index is out of range, this function will return -1.
slouken@10934
   178
 */
slouken@10934
   179
extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickGetDeviceInstanceID(int device_index);
slouken@10934
   180
slouken@10934
   181
/**
slouken@7191
   182
 *  Open a joystick for use.
philipp@9227
   183
 *  The index passed as an argument refers to the N'th joystick on the system.
philipp@9569
   184
 *  This index is not the value which will identify this joystick in future
philipp@9569
   185
 *  joystick events.  The joystick's instance id (::SDL_JoystickID) will be used
philipp@9569
   186
 *  there instead.
slouken@7191
   187
 *
slouken@3407
   188
 *  \return A joystick identifier, or NULL if an error occurred.
slouken@0
   189
 */
slouken@1895
   190
extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickOpen(int device_index);
slouken@0
   191
slouken@3407
   192
/**
icculus@9916
   193
 * Return the SDL_Joystick associated with an instance id.
icculus@9916
   194
 */
icculus@9916
   195
extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromInstanceID(SDL_JoystickID joyid);
icculus@9916
   196
icculus@9916
   197
/**
slouken@6690
   198
 *  Return the name for this currently opened joystick.
slouken@6690
   199
 *  If no name can be found, this function returns NULL.
slouken@0
   200
 */
slouken@6690
   201
extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick * joystick);
slouken@7191
   202
slouken@6690
   203
/**
slouken@12359
   204
 *  Get the player index of an opened joystick, or -1 if it's not available
slouken@12359
   205
 *
slouken@12359
   206
 *  For XInput controllers this returns the XInput user index.
slouken@12359
   207
 */
slouken@12359
   208
extern DECLSPEC int SDLCALL SDL_JoystickGetPlayerIndex(SDL_Joystick * joystick);
slouken@12359
   209
slouken@12359
   210
/**
slouken@6690
   211
 *  Return the GUID for this opened joystick
slouken@6690
   212
 */
slouken@6738
   213
extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUID(SDL_Joystick * joystick);
slouken@6690
   214
slouken@6690
   215
/**
slouken@10595
   216
 *  Get the USB vendor ID of an opened joystick, if available.
slouken@10595
   217
 *  If the vendor ID isn't available this function returns 0.
slouken@10595
   218
 */
slouken@10595
   219
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetVendor(SDL_Joystick * joystick);
slouken@10595
   220
slouken@10595
   221
/**
slouken@10595
   222
 *  Get the USB product ID of an opened joystick, if available.
slouken@10595
   223
 *  If the product ID isn't available this function returns 0.
slouken@10595
   224
 */
slouken@10595
   225
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProduct(SDL_Joystick * joystick);
slouken@10595
   226
slouken@10595
   227
/**
slouken@10595
   228
 *  Get the product version of an opened joystick, if available.
slouken@10595
   229
 *  If the product version isn't available this function returns 0.
slouken@10595
   230
 */
slouken@10595
   231
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProductVersion(SDL_Joystick * joystick);
slouken@10595
   232
slouken@10595
   233
/**
slouken@10855
   234
 *  Get the type of an opened joystick.
slouken@10855
   235
 */
slouken@10855
   236
extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetType(SDL_Joystick * joystick);
slouken@10855
   237
slouken@10855
   238
/**
icculus@6746
   239
 *  Return a string representation for this guid. pszGUID must point to at least 33 bytes
icculus@6746
   240
 *  (32 for the string plus a NULL terminator).
slouken@6690
   241
 */
icculus@8028
   242
extern DECLSPEC void SDLCALL SDL_JoystickGetGUIDString(SDL_JoystickGUID guid, char *pszGUID, int cbGUID);
slouken@6690
   243
slouken@6690
   244
/**
slouken@10595
   245
 *  Convert a string into a joystick guid
slouken@6690
   246
 */
slouken@6738
   247
extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUIDFromString(const char *pchGUID);
slouken@6690
   248
slouken@6707
   249
/**
slouken@6707
   250
 *  Returns SDL_TRUE if the joystick has been opened and currently connected, or SDL_FALSE if it has not.
slouken@6707
   251
 */
slouken@6707
   252
extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAttached(SDL_Joystick * joystick);
slouken@6690
   253
slouken@6690
   254
/**
slouken@6974
   255
 *  Get the instance ID of an opened joystick or -1 if the joystick is invalid.
slouken@0
   256
 */
slouken@6690
   257
extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickInstanceID(SDL_Joystick * joystick);
slouken@0
   258
slouken@3407
   259
/**
slouken@3407
   260
 *  Get the number of general axis controls on a joystick.
slouken@0
   261
 */
slouken@1895
   262
extern DECLSPEC int SDLCALL SDL_JoystickNumAxes(SDL_Joystick * joystick);
slouken@0
   263
slouken@3407
   264
/**
slouken@3407
   265
 *  Get the number of trackballs on a joystick.
slouken@7191
   266
 *
slouken@3407
   267
 *  Joystick trackballs have only relative motion events associated
slouken@3407
   268
 *  with them and their state cannot be polled.
slouken@0
   269
 */
slouken@1895
   270
extern DECLSPEC int SDLCALL SDL_JoystickNumBalls(SDL_Joystick * joystick);
slouken@0
   271
slouken@3407
   272
/**
slouken@3407
   273
 *  Get the number of POV hats on a joystick.
slouken@0
   274
 */
slouken@1895
   275
extern DECLSPEC int SDLCALL SDL_JoystickNumHats(SDL_Joystick * joystick);
slouken@0
   276
slouken@3407
   277
/**
slouken@3407
   278
 *  Get the number of buttons on a joystick.
slouken@0
   279
 */
slouken@1895
   280
extern DECLSPEC int SDLCALL SDL_JoystickNumButtons(SDL_Joystick * joystick);
slouken@0
   281
slouken@3407
   282
/**
slouken@3407
   283
 *  Update the current state of the open joysticks.
slouken@7191
   284
 *
slouken@3407
   285
 *  This is called automatically by the event loop if any joystick
slouken@3407
   286
 *  events are enabled.
slouken@0
   287
 */
slouken@337
   288
extern DECLSPEC void SDLCALL SDL_JoystickUpdate(void);
slouken@0
   289
slouken@3407
   290
/**
slouken@3407
   291
 *  Enable/disable joystick event polling.
slouken@7191
   292
 *
slouken@3407
   293
 *  If joystick events are disabled, you must call SDL_JoystickUpdate()
slouken@3407
   294
 *  yourself and check the state of the joystick when you want joystick
slouken@3407
   295
 *  information.
slouken@7191
   296
 *
slouken@3407
   297
 *  The state can be one of ::SDL_QUERY, ::SDL_ENABLE or ::SDL_IGNORE.
slouken@0
   298
 */
slouken@337
   299
extern DECLSPEC int SDLCALL SDL_JoystickEventState(int state);
slouken@0
   300
slouken@10724
   301
#define SDL_JOYSTICK_AXIS_MAX   32767
slouken@10724
   302
#define SDL_JOYSTICK_AXIS_MIN   -32768
slouken@3407
   303
/**
slouken@3407
   304
 *  Get the current state of an axis control on a joystick.
slouken@7191
   305
 *
slouken@3407
   306
 *  The state is a value ranging from -32768 to 32767.
slouken@7191
   307
 *
slouken@3407
   308
 *  The axis indices start at index 0.
slouken@0
   309
 */
slouken@1895
   310
extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick * joystick,
slouken@1895
   311
                                                   int axis);
slouken@0
   312
slouken@3407
   313
/**
slouken@10752
   314
 *  Get the initial state of an axis control on a joystick.
slouken@10752
   315
 *
slouken@10752
   316
 *  The state is a value ranging from -32768 to 32767.
slouken@10752
   317
 *
slouken@10752
   318
 *  The axis indices start at index 0.
slouken@10752
   319
 *
slouken@10752
   320
 *  \return SDL_TRUE if this axis has any initial value, or SDL_FALSE if not.
slouken@10752
   321
 */
slouken@10752
   322
extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAxisInitialState(SDL_Joystick * joystick,
slouken@10752
   323
                                                   int axis, Sint16 *state);
slouken@10752
   324
slouken@10752
   325
/**
slouken@3407
   326
 *  \name Hat positions
slouken@0
   327
 */
gabomdq@7678
   328
/* @{ */
slouken@7191
   329
#define SDL_HAT_CENTERED    0x00
philipp@9806
   330
#define SDL_HAT_UP          0x01
slouken@7191
   331
#define SDL_HAT_RIGHT       0x02
slouken@7191
   332
#define SDL_HAT_DOWN        0x04
slouken@7191
   333
#define SDL_HAT_LEFT        0x08
slouken@7191
   334
#define SDL_HAT_RIGHTUP     (SDL_HAT_RIGHT|SDL_HAT_UP)
slouken@7191
   335
#define SDL_HAT_RIGHTDOWN   (SDL_HAT_RIGHT|SDL_HAT_DOWN)
slouken@7191
   336
#define SDL_HAT_LEFTUP      (SDL_HAT_LEFT|SDL_HAT_UP)
slouken@7191
   337
#define SDL_HAT_LEFTDOWN    (SDL_HAT_LEFT|SDL_HAT_DOWN)
gabomdq@7678
   338
/* @} */
slouken@3407
   339
slouken@3407
   340
/**
slouken@3407
   341
 *  Get the current state of a POV hat on a joystick.
slouken@3407
   342
 *
slouken@3407
   343
 *  The hat indices start at index 0.
slouken@7191
   344
 *
slouken@3407
   345
 *  \return The return value is one of the following positions:
slouken@3407
   346
 *           - ::SDL_HAT_CENTERED
slouken@3407
   347
 *           - ::SDL_HAT_UP
slouken@3407
   348
 *           - ::SDL_HAT_RIGHT
slouken@3407
   349
 *           - ::SDL_HAT_DOWN
slouken@3407
   350
 *           - ::SDL_HAT_LEFT
slouken@3407
   351
 *           - ::SDL_HAT_RIGHTUP
slouken@3407
   352
 *           - ::SDL_HAT_RIGHTDOWN
slouken@3407
   353
 *           - ::SDL_HAT_LEFTUP
slouken@3407
   354
 *           - ::SDL_HAT_LEFTDOWN
slouken@0
   355
 */
slouken@1895
   356
extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick * joystick,
slouken@1895
   357
                                                 int hat);
slouken@0
   358
slouken@3407
   359
/**
slouken@3407
   360
 *  Get the ball axis change since the last poll.
slouken@7191
   361
 *
slouken@3407
   362
 *  \return 0, or -1 if you passed it invalid parameters.
slouken@7191
   363
 *
slouken@3407
   364
 *  The ball indices start at index 0.
slouken@0
   365
 */
slouken@1895
   366
extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick * joystick,
slouken@1895
   367
                                                int ball, int *dx, int *dy);
slouken@0
   368
slouken@3407
   369
/**
slouken@3407
   370
 *  Get the current state of a button on a joystick.
slouken@7191
   371
 *
slouken@3407
   372
 *  The button indices start at index 0.
slouken@0
   373
 */
slouken@1895
   374
extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick * joystick,
slouken@1895
   375
                                                    int button);
slouken@0
   376
slouken@3407
   377
/**
slouken@12088
   378
 *  Trigger a rumble effect
slouken@12088
   379
 *  Each call to this function cancels any previous rumble effect, and calling it with 0 intensity stops any rumbling.
slouken@12088
   380
 *
slouken@12088
   381
 *  \param joystick The joystick to vibrate
slouken@12088
   382
 *  \param low_frequency_rumble The intensity of the low frequency (left) rumble motor, from 0 to 0xFFFF
slouken@12088
   383
 *  \param high_frequency_rumble The intensity of the high frequency (right) rumble motor, from 0 to 0xFFFF
slouken@12088
   384
 *  \param duration_ms The duration of the rumble effect, in milliseconds
slouken@12088
   385
 *
slouken@12088
   386
 *  \return 0, or -1 if rumble isn't supported on this joystick
slouken@12088
   387
 */
slouken@12088
   388
extern DECLSPEC int SDLCALL SDL_JoystickRumble(SDL_Joystick * joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);
slouken@12088
   389
slouken@12088
   390
/**
slouken@3407
   391
 *  Close a joystick previously opened with SDL_JoystickOpen().
slouken@0
   392
 */
slouken@1895
   393
extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick * joystick);
slouken@0
   394
slouken@9884
   395
/**
icculus@9917
   396
 *  Return the battery level of this joystick
icculus@9917
   397
 */
slouken@9884
   398
extern DECLSPEC SDL_JoystickPowerLevel SDLCALL SDL_JoystickCurrentPowerLevel(SDL_Joystick * joystick);
slouken@9884
   399
slouken@0
   400
/* Ends C function definitions when using C++ */
slouken@0
   401
#ifdef __cplusplus
slouken@0
   402
}
slouken@0
   403
#endif
slouken@0
   404
#include "close_code.h"
slouken@0
   405
slouken@10638
   406
#endif /* SDL_joystick_h_ */
slouken@1895
   407
slouken@1895
   408
/* vi: set ts=4 sw=4 expandtab: */