Put getClipboard back.

This commit is contained in:
Caspian Rychlik-Prince 2004-08-12 14:30:13 +00:00
parent 6c3f89f3c1
commit f0954a9a70
4 changed files with 21 additions and 0 deletions

View File

@ -259,5 +259,13 @@ public final class Sys {
* Where necessary, we use a native implementation of openURL.
*/
private static native void nOpenURL(String url);
/**
* Get the contents of the system clipboard. The system might not have a clipboard
* (particularly if it doesn't even have a keyboard) in which case we return null.
* Otherwise we return a String, which may be the empty string "".
* @return a String, or null if there is no system clipboard.
*/
public static native String getClipboard();
}

View File

@ -76,6 +76,9 @@ JNIEXPORT void JNICALL Java_org_lwjgl_Sys_nOpenURL
(JNIEnv *, jclass, jstring);
JNIEXPORT jstring JNICALL Java_org_lwjgl_Sys_getClipboard
(JNIEnv *, jclass);
#ifdef __cplusplus
}
#endif

View File

@ -167,3 +167,8 @@ JNIEXPORT void JNICALL Java_org_lwjgl_Sys_nOpenURL
}
JNIEXPORT jstring JNICALL Java_org_lwjgl_Sys_getClipboard
(JNIEnv * env, jclass clazz)
{
return NULL;
}

View File

@ -177,3 +177,8 @@ JNIEXPORT void JNICALL Java_org_lwjgl_Sys_nOpenURL
}
JNIEXPORT jstring JNICALL Java_org_lwjgl_Sys_getClipboard
(JNIEnv * env, jclass clazz)
{
return NULL;
}