Merged with latest official SDL sources.

This commit is contained in:
DavidLudwig 2012-11-12 13:25:44 -05:00
commit 6db1ac4bad
52 changed files with 6069 additions and 445 deletions

View file

@ -152,6 +152,17 @@ extern "C" {
*/
#define SDL_HINT_VIDEO_X11_XRANDR "SDL_VIDEO_X11_XRANDR"
/**
* \brief A variable controlling whether grabbing input grabs the keyboard
*
* This variable can be set to the following values:
* "0" - Grab will affect only the mouse
* "1" - Grab will affect mouse and keyboard
*
* By default SDL will not grab the keyboard so system shortcuts still work.
*/
#define SDL_HINT_GRAB_KEYBOARD "SDL_GRAB_KEYBOARD"
/**
* \brief A variable controlling whether the idle timer is disabled on iOS.
*

View file

@ -151,21 +151,34 @@ extern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromName(const char *name);
/**
* \brief Start accepting Unicode text input events.
* This function will show the on-screen keyboard if supported.
*
* \sa SDL_StopTextInput()
* \sa SDL_SetTextInputRect()
* \sa SDL_HasScreenKeyboardSupport()
*/
extern DECLSPEC void SDLCALL SDL_StartTextInput(void);
/**
* \brief Return whether or not Unicode text input events are enabled.
*
* \sa SDL_StartTextInput()
* \sa SDL_StopTextInput()
*/
extern DECLSPEC SDL_bool SDLCALL SDL_IsTextInputActive(void);
/**
* \brief Stop receiving any text input events.
* This function will hide the on-screen keyboard if supported.
*
* \sa SDL_StartTextInput()
* \sa SDL_HasScreenKeyboardSupport()
*/
extern DECLSPEC void SDLCALL SDL_StopTextInput(void);
/**
* \brief Set the rectangle used to type Unicode text inputs.
* This is used as a hint for IME and on-screen keyboard placement.
*
* \sa SDL_StartTextInput()
*/
@ -174,60 +187,13 @@ extern DECLSPEC void SDLCALL SDL_SetTextInputRect(SDL_Rect *rect);
/**
* \brief Returns whether the platform has some screen keyboard support.
*
* \param window The window for which screen keyboard should be checked.
*
* \return SDL_TRUE if some keyboard support is available else SDL_FALSE.
*
* \note Not all screen keyboard functions are supported on all platforms.
*
* \sa SDL_ShowScreenKeyboard()
* \sa SDL_HideScreenKeyboard()
* \sa SDL_IsScreenKeyboardShown()
* \sa SDL_ToggleScreenKeyboard()
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasScreenKeyboardSupport(SDL_Window *window);
/**
* \brief Requests to show a screen keyboard for given window.
*
* \param window The window for which screen keyboard should be shown.
*
* \return 0 if request will be processed or -1 on error (e.g. no support).
*
* \note Showing screen keyboards is asynchronous on some platforms.
*
* \sa SDL_HasScreenKeyboardSupport()
* \sa SDL_HideScreenKeyboard()
*/
extern DECLSPEC int SDLCALL SDL_ShowScreenKeyboard(SDL_Window *window);
/**
* \brief Requests to hide a screen keyboard for given window.
*
* \param window The window for which screen keyboard should be shown.
*
* \return 0 if request will be processed or -1 on error (e.g. no support).
*
* \note Hiding screen keyboards is asynchronous on some platforms.
*
* \sa SDL_HasScreenKeyboardSupport()
* \sa SDL_ShowScreenKeyboard()
*/
extern DECLSPEC int SDLCALL SDL_HideScreenKeyboard(SDL_Window *window);
/**
* \brief Requests to toggle a screen keyboard for given window.
*
* \param window The window for which screen keyboard should be toggled.
*
* \return 0 if request will be processed or -1 on error (e.g. no support).
*
* \note Showing and hiding screen keyboards is asynchronous on some platforms.
*
* \sa SDL_HasScreenKeyboardSupport()
* \sa SDL_IsScreenKeyboardShown()
*/
extern DECLSPEC int SDLCALL SDL_ToggleScreenKeyboard(SDL_Window * window);
extern DECLSPEC SDL_bool SDLCALL SDL_HasScreenKeyboardSupport();
/**
* \brief Returns whether the screen keyboard is shown for given window.
@ -236,11 +202,7 @@ extern DECLSPEC int SDLCALL SDL_ToggleScreenKeyboard(SDL_Window * window);
*
* \return SDL_TRUE if screen keyboard is shown else SDL_FALSE.
*
* \note May always return SDL_FALSE on some platforms (not implemented there).
*
* \sa SDL_HasScreenKeyboardSupport()
* \sa SDL_ShowScreenKeyboard()
* \sa SDL_HideScreenKeyboard()
*/
extern DECLSPEC SDL_bool SDLCALL SDL_IsScreenKeyboardShown(SDL_Window *window);

View file

@ -186,6 +186,7 @@ extern DECLSPEC void SDLCALL SDL_FreeRW(SDL_RWops * area);
* Read an item of the specified endianness and return in native format.
*/
/*@{*/
extern DECLSPEC Uint8 SDLCALL SDL_ReadU8(SDL_RWops * src);
extern DECLSPEC Uint16 SDLCALL SDL_ReadLE16(SDL_RWops * src);
extern DECLSPEC Uint16 SDLCALL SDL_ReadBE16(SDL_RWops * src);
extern DECLSPEC Uint32 SDLCALL SDL_ReadLE32(SDL_RWops * src);
@ -200,6 +201,7 @@ extern DECLSPEC Uint64 SDLCALL SDL_ReadBE64(SDL_RWops * src);
* Write an item of native format to the specified endianness.
*/
/*@{*/
extern DECLSPEC size_t SDLCALL SDL_WriteU8(SDL_RWops * dst, Uint8 value);
extern DECLSPEC size_t SDLCALL SDL_WriteLE16(SDL_RWops * dst, Uint16 value);
extern DECLSPEC size_t SDLCALL SDL_WriteBE16(SDL_RWops * dst, Uint16 value);
extern DECLSPEC size_t SDLCALL SDL_WriteLE32(SDL_RWops * dst, Uint32 value);

View file

@ -49,11 +49,6 @@ extern "C" {
extern DECLSPEC int SDLCALL SDL_iPhoneSetAnimationCallback(SDL_Window * window, int interval, void (*callback)(void*), void *callbackParam);
extern DECLSPEC void SDLCALL SDL_iPhoneSetEventPump(SDL_bool enabled);
#define SDL_iPhoneKeyboardShow SDL_ShowScreenKeyboard
#define SDL_iPhoneKeyboardHide SDL_HideScreenKeyboard
#define SDL_iPhoneKeyboardToggle SDL_ToggleScreenKeyboard
#define SDL_iPhoneKeyboardIsShown SDL_IsScreenKeyboardShown
#endif /* __IPHONEOS__ */
@ -76,7 +71,10 @@ extern DECLSPEC void * SDLCALL SDL_AndroidGetActivity();
#define SDL_ANDROID_EXTERNAL_STORAGE_READ 0x01
#define SDL_ANDROID_EXTERNAL_STORAGE_WRITE 0x02
/* Get the path used for internal storage for this application */
/* Get the path used for internal storage for this application.
This path is unique to your application and cannot be written to
by other applications.
*/
extern DECLSPEC const char * SDLCALL SDL_AndroidGetInternalStoragePath();
/* Get the current state of external storage, a bitmask of these values:
@ -86,7 +84,10 @@ extern DECLSPEC const char * SDLCALL SDL_AndroidGetInternalStoragePath();
*/
extern DECLSPEC int SDLCALL SDL_AndroidGetExternalStorageState();
/* Get the path used for external storage for this application */
/* Get the path used for external storage for this application.
This path is unique to your application, but is public and can be
written to by other applications.
*/
extern DECLSPEC const char * SDLCALL SDL_AndroidGetExternalStoragePath();
#endif /* __ANDROID__ */