diff options
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/gtk')
4 files changed, 22 insertions, 0 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 e7bb60deb9..2231032baa 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 @@ -2577,6 +2577,16 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1closure_1ref) } #endif +#ifndef NO__1g_1closure_1sink +JNIEXPORT void JNICALL OS_NATIVE(_1g_1closure_1sink) + (JNIEnv *env, jclass that, jintLong arg0) +{ + OS_NATIVE_ENTER(env, that, _1g_1closure_1sink_FUNC); + g_closure_sink((GClosure *)arg0); + OS_NATIVE_EXIT(env, that, _1g_1closure_1sink_FUNC); +} +#endif + #ifndef NO__1g_1closure_1unref JNIEXPORT void JNICALL OS_NATIVE(_1g_1closure_1unref) (JNIEnv *env, jclass that, jintLong arg0) 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 b6f21a5d6c..576b8eba96 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 @@ -229,6 +229,7 @@ char * OS_nativeFunctionNames[] = { "_1g_1app_1info_1supports_1uris", "_1g_1cclosure_1new", "_1g_1closure_1ref", + "_1g_1closure_1sink", "_1g_1closure_1unref", "_1g_1content_1type_1equals", "_1g_1content_1type_1is_1a", 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 c503d9c53d..b42f0f79ec 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 @@ -239,6 +239,7 @@ typedef enum { _1g_1app_1info_1supports_1uris_FUNC, _1g_1cclosure_1new_FUNC, _1g_1closure_1ref_FUNC, + _1g_1closure_1sink_FUNC, _1g_1closure_1unref_FUNC, _1g_1content_1type_1equals_FUNC, _1g_1content_1type_1is_1a_FUNC, diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java index 59c2960e06..aad5a380d2 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java @@ -2211,6 +2211,16 @@ public static final long /*int*/ g_closure_ref(long /*int*/ closure) { } } /** @param closure cast=(GClosure *) */ +public static final native void _g_closure_sink(long /*int*/ closure); +public static final void g_closure_sink(long /*int*/ closure) { + lock.lock(); + try { + _g_closure_sink(closure); + } finally { + lock.unlock(); + } +} +/** @param closure cast=(GClosure *) */ public static final native void _g_closure_unref(long /*int*/ closure); public static final void g_closure_unref(long /*int*/ closure) { lock.lock(); |