*** empty log message ***
This commit is contained in:
parent
743bbad6c7
commit
dd0886851a
|
@ -42,7 +42,7 @@ import java.io.IOException;
|
||||||
* @version $Revision$
|
* @version $Revision$
|
||||||
*/
|
*/
|
||||||
public final class Sys {
|
public final class Sys {
|
||||||
public static final String VERSION = "0.91";
|
public static final String VERSION = "0.92";
|
||||||
|
|
||||||
/** Low process priority. @see #setProcessPriority() */
|
/** Low process priority. @see #setProcessPriority() */
|
||||||
public static final int LOW_PRIORITY = -1;
|
public static final int LOW_PRIORITY = -1;
|
||||||
|
@ -259,4 +259,28 @@ public final class Sys {
|
||||||
* Where necessary, we use a native implementation of openURL.
|
* Where necessary, we use a native implementation of openURL.
|
||||||
*/
|
*/
|
||||||
private static native void nOpenURL(String url);
|
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();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set 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 silently
|
||||||
|
* ignore this method as a no-op.<p>Passing null is allowed and is effectively the
|
||||||
|
* same as passing the empty string "".
|
||||||
|
* @param newClip the new clipboard contents
|
||||||
|
*/
|
||||||
|
public static void setClipboard(String newClip) {
|
||||||
|
if (newClip == null) {
|
||||||
|
newClip = "";
|
||||||
|
}
|
||||||
|
nSetClipboard(newClip);
|
||||||
|
}
|
||||||
|
private static native void nSetClipboard(String newClip);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
#include "common_tools.h"
|
#include "common_tools.h"
|
||||||
|
|
||||||
static bool debug = false;
|
static bool debug = false;
|
||||||
static const char* VERSION = "0.91";
|
static const char* VERSION = "0.92";
|
||||||
JavaVM *jvm;
|
JavaVM *jvm;
|
||||||
|
|
||||||
void initAttribList(attrib_list_t *list) {
|
void initAttribList(attrib_list_t *list) {
|
||||||
|
|
|
@ -75,6 +75,22 @@ JNIEXPORT void JNICALL Java_org_lwjgl_Sys_nAlert
|
||||||
JNIEXPORT void JNICALL Java_org_lwjgl_Sys_nOpenURL
|
JNIEXPORT void JNICALL Java_org_lwjgl_Sys_nOpenURL
|
||||||
(JNIEnv *, jclass, jstring);
|
(JNIEnv *, jclass, jstring);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Class: org_lwjgl_Sys
|
||||||
|
* Method: setClipboard
|
||||||
|
* Signature: (Ljava/lang/String;)V
|
||||||
|
*/
|
||||||
|
JNIEXPORT void JNICALL Java_org_lwjgl_Sys_setClipboard
|
||||||
|
(JNIEnv *, jclass, jstring );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Class: org_lwjgl_Sys
|
||||||
|
* Method: getClipboard
|
||||||
|
* Signature: ()Ljava/lang/String;
|
||||||
|
*/
|
||||||
|
JNIEXPORT jstring JNICALL Java_org_lwjgl_Sys_getClipboard
|
||||||
|
(JNIEnv *, jclass);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -166,3 +166,26 @@ JNIEXPORT void JNICALL Java_org_lwjgl_Sys_nOpenURL
|
||||||
env->ReleaseStringUTFChars(url, urlString);
|
env->ReleaseStringUTFChars(url, urlString);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Class: org_lwjgl_Sys
|
||||||
|
* Method: setClipboard
|
||||||
|
* Signature: (Ljava/lang/String;)V
|
||||||
|
*/
|
||||||
|
JNIEXPORT void JNICALL Java_org_lwjgl_Sys_setClipboard
|
||||||
|
(JNIEnv * env, jclass clazz, jstring clipboard)
|
||||||
|
{
|
||||||
|
const char * urlString = env->GetStringUTFChars(clipboard, NULL);
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Class: org_lwjgl_Sys
|
||||||
|
* Method: getClipboard
|
||||||
|
* Signature: ()Ljava/lang/String;
|
||||||
|
*/
|
||||||
|
JNIEXPORT jstring JNICALL Java_org_lwjgl_Sys_getClipboard
|
||||||
|
(JNIEnv * env, jclass clazz)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -175,3 +175,27 @@ JNIEXPORT void JNICALL Java_org_lwjgl_Sys_nOpenURL
|
||||||
CloseHandle( pi.hThread );
|
CloseHandle( pi.hThread );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Class: org_lwjgl_Sys
|
||||||
|
* Method: setClipboard
|
||||||
|
* Signature: (Ljava/lang/String;)V
|
||||||
|
*/
|
||||||
|
JNIEXPORT void JNICALL Java_org_lwjgl_Sys_setClipboard
|
||||||
|
(JNIEnv * env, jclass clazz, jstring clipboard)
|
||||||
|
{
|
||||||
|
const char * urlString = env->GetStringUTFChars(clipboard, NULL);
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Class: org_lwjgl_Sys
|
||||||
|
* Method: getClipboard
|
||||||
|
* Signature: ()Ljava/lang/String;
|
||||||
|
*/
|
||||||
|
JNIEXPORT jstring JNICALL Java_org_lwjgl_Sys_getClipboard
|
||||||
|
(JNIEnv * env, jclass clazz)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue