Philipp Wiesemann 2012-08-18 14:09:47 PDT there is currently no way in SDL to interact with the system clipboard on Android. I attached a patch which tries to implement the three clipboard functions for Android. It does not add the CLIPBOARDUPDATE event because this seems to require Android API 11 or polling.
26 lines
442 B
C
26 lines
442 B
C
#include "SDL_config.h"
|
|
|
|
#if SDL_VIDEO_DRIVER_ANDROID
|
|
|
|
#include "SDL_androidvideo.h"
|
|
|
|
#include "../../core/android/SDL_android.h"
|
|
|
|
int
|
|
Android_SetClipboardText(_THIS, const char *text)
|
|
{
|
|
return Android_JNI_SetClipboardText(text);
|
|
}
|
|
|
|
char *
|
|
Android_GetClipboardText(_THIS)
|
|
{
|
|
return Android_JNI_GetClipboardText();
|
|
}
|
|
|
|
SDL_bool Android_HasClipboardText(_THIS)
|
|
{
|
|
return Android_JNI_HasClipboardText();
|
|
}
|
|
|
|
#endif /* SDL_VIDEO_DRIVER_ANDROID */
|