This repository has been archived by the owner on Feb 11, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed bug 1573 - SDL does not support system clipboard on Android.
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.
- Loading branch information
Showing
5 changed files
with
125 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#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 */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#include "SDL_config.h" | ||
|
||
#ifndef _SDL_androidclipboard_h | ||
#define _SDL_androidclipboard_h | ||
|
||
extern int Android_SetClipboardText(_THIS, const char *text); | ||
extern char *Android_GetClipboardText(_THIS); | ||
extern SDL_bool Android_HasClipboardText(_THIS); | ||
|
||
#endif /* _SDL_androidclipboard_h */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters