Android 3.0 is now lowest supported version, because of new 'clipboard changed' notification in SDL_syswm.h, using SDL_SYSWMEVENT.
This commit is contained in:
@@ -148,6 +148,30 @@ extern DECLSPEC void SDLCALL SDL_ANDROID_SetGamepadKeymap(int A, int B, int X, i
|
||||
/* Copy contents of Android clipboard into supplied buffer */
|
||||
extern DECLSPEC void SDLCALL SDL_ANDROID_GetClipboardText(char * buf, int len);
|
||||
|
||||
/* Copy of SDL2 API */
|
||||
|
||||
/**
|
||||
* \brief Put UTF-8 text into the clipboard
|
||||
*
|
||||
* \sa SDL_GetClipboardText()
|
||||
*/
|
||||
|
||||
extern DECLSPEC int SDLCALL SDL_SetClipboardText(const char *text);
|
||||
|
||||
/**
|
||||
* \brief Get UTF-8 text from the clipboard, which must be freed with SDL_free()
|
||||
*
|
||||
* \sa SDL_SetClipboardText()
|
||||
*/
|
||||
extern DECLSPEC char * SDLCALL SDL_GetClipboardText(void);
|
||||
|
||||
/**
|
||||
* \brief Returns a flag indicating whether the clipboard exists and contains a text string that is non-empty
|
||||
*
|
||||
* \sa SDL_GetClipboardText()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_HasClipboardText(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -181,9 +181,32 @@ typedef struct SDL_SysWMinfo {
|
||||
int data;
|
||||
} SDL_SysWMinfo;
|
||||
|
||||
#else
|
||||
#elif defined(SDL_VIDEO_DRIVER_ANDROID)
|
||||
|
||||
#include "SDL_video.h"
|
||||
|
||||
typedef enum {
|
||||
SDL_SYSWM_ANDROID_CLIPBOARD_CHANGED, /* Call SDL_GetClipboardText() after receiving this event */
|
||||
SDL_SYSWM_ANDROID_SCREEN_VISIBLE_RECT,
|
||||
} SDL_SYSWM_TYPE;
|
||||
|
||||
/** The generic custom event structure */
|
||||
struct SDL_SysWMmsg {
|
||||
SDL_version version;
|
||||
SDL_SYSWM_TYPE type;
|
||||
union {
|
||||
SDL_Rect screenVisibleRect; /* These are physical screen dimensions, as returned by SDL_ListModes(NULL, 0)[0], not values from SDL_SetVideoMode() */
|
||||
} event;
|
||||
};
|
||||
|
||||
/** The generic custom window manager information structure */
|
||||
typedef struct SDL_SysWMinfo {
|
||||
SDL_version version;
|
||||
int data;
|
||||
} SDL_SysWMinfo;
|
||||
|
||||
#else
|
||||
|
||||
struct SDL_SysWMmsg {
|
||||
SDL_version version;
|
||||
int data;
|
||||
|
||||
Reference in New Issue
Block a user