diff options
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library')
3 files changed, 29 insertions, 16 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c index 0d85ddb3ea..d63668cf19 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c @@ -10312,22 +10312,18 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1file_1chooser_1get_1uris) #ifndef NO__1gtk_1file_1chooser_1set_1current_1folder JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1file_1chooser_1set_1current_1folder) - (JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1) { - jbyte *lparg1=NULL; OS_NATIVE_ENTER(env, that, _1gtk_1file_1chooser_1set_1current_1folder_FUNC); - if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail; /* - gtk_file_chooser_set_current_folder(arg0, lparg1); + gtk_file_chooser_set_current_folder(arg0, arg1); */ { OS_LOAD_FUNCTION(fp, gtk_file_chooser_set_current_folder) if (fp) { - ((void (CALLING_CONVENTION*)(jintLong, jbyte *))fp)(arg0, lparg1); + ((void (CALLING_CONVENTION*)(jintLong, jintLong))fp)(arg0, arg1); } } -fail: - if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0); OS_NATIVE_EXIT(env, that, _1gtk_1file_1chooser_1set_1current_1folder_FUNC); } #endif @@ -10414,22 +10410,18 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1file_1chooser_1set_1extra_1widget) #ifndef NO__1gtk_1file_1chooser_1set_1filename JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1file_1chooser_1set_1filename) - (JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1) { - jbyte *lparg1=NULL; OS_NATIVE_ENTER(env, that, _1gtk_1file_1chooser_1set_1filename_FUNC); - if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail; /* - gtk_file_chooser_set_filename(arg0, lparg1); + gtk_file_chooser_set_filename(arg0, arg1); */ { OS_LOAD_FUNCTION(fp, gtk_file_chooser_set_filename) if (fp) { - ((void (CALLING_CONVENTION*)(jintLong, jbyte *))fp)(arg0, lparg1); + ((void (CALLING_CONVENTION*)(jintLong, jintLong))fp)(arg0, arg1); } } -fail: - if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0); OS_NATIVE_EXIT(env, that, _1gtk_1file_1chooser_1set_1filename_FUNC); } #endif @@ -22421,6 +22413,25 @@ fail: } #endif +#ifndef NO_realpath +JNIEXPORT jintLong JNICALL OS_NATIVE(realpath) + (JNIEnv *env, jclass that, jbyteArray arg0, jbyteArray arg1) +{ + jbyte *lparg0=NULL; + jbyte *lparg1=NULL; + jintLong rc = 0; + OS_NATIVE_ENTER(env, that, realpath_FUNC); + if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail; + if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail; + rc = (jintLong)realpath((const char *)lparg0, (char *)lparg1); +fail: + if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0); + if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0); + OS_NATIVE_EXIT(env, that, realpath_FUNC); + return rc; +} +#endif + #ifndef NO_strcmp JNIEXPORT jint JNICALL OS_NATIVE(strcmp) (JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1) diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c index 94ee49552c..cc04542d6e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2014 IBM Corporation and others. All rights reserved. + * Copyright (c) 2000, 2013 IBM Corporation and others. All rights reserved. * The contents of this file are made available under the terms * of the GNU Lesser General Public License (LGPL) Version 2.1 that * accompanies this distribution (lgpl-v21.txt). The LGPL is also @@ -1817,6 +1817,7 @@ char * OS_nativeFunctionNames[] = { "memmove__Lorg_eclipse_swt_internal_gtk_XVisibilityEvent_2JJ", #endif "pangoLayoutNewProc_1CALLBACK", + "realpath", "strcmp", }; #define NATIVE_FUNCTION_COUNT sizeof(OS_nativeFunctionNames) / sizeof(char*) diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h index 45e07cc7ef..575f5109e0 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2014 IBM Corporation and others. All rights reserved. + * Copyright (c) 2000, 2013 IBM Corporation and others. All rights reserved. * The contents of this file are made available under the terms * of the GNU Lesser General Public License (LGPL) Version 2.1 that * accompanies this distribution (lgpl-v21.txt). The LGPL is also @@ -1827,5 +1827,6 @@ typedef enum { memmove__Lorg_eclipse_swt_internal_gtk_XVisibilityEvent_2JJ_FUNC, #endif pangoLayoutNewProc_1CALLBACK_FUNC, + realpath_FUNC, strcmp_FUNC, } OS_FUNCS; |