aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2013-02-15 13:58:36 (EST)
committerCarolyn MacLeod2013-04-09 10:56:21 (EDT)
commit6a5427227a149a4b01baa912927ed53c03c676a4 (patch)
tree05f35089d02fca2e94e2065c9272562fc7154222
parent734432cda14217617a07eea16dfa60f7b7c3110d (diff)
downloadeclipse.platform.swt-6a5427227a149a4b01baa912927ed53c03c676a4.zip
eclipse.platform.swt-6a5427227a149a4b01baa912927ed53c03c676a4.tar.gz
eclipse.platform.swt-6a5427227a149a4b01baa912927ed53c03c676a4.tar.bz2
Make g_thread_init dynamic.
This needs to define LIB_GTHREAD as the function is there. Also g_thread_supported define is redefined for new glib version. There is g_thread_get_initialized function for bindings but as the whole g_thread_init is going away it makes no sense to add it in the place of(conditionally) g_thread_supported.
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java1
3 files changed, 17 insertions, 2 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 2900290..cea1a16 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
@@ -4145,7 +4145,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1g_1thread_1init)
(JNIEnv *env, jclass that, jintLong arg0)
{
OS_NATIVE_ENTER(env, that, _1g_1thread_1init_FUNC);
+/*
g_thread_init((GThreadFunctions *)arg0);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, g_thread_init)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(GThreadFunctions *))fp)((GThreadFunctions *)arg0);
+ }
+ }
OS_NATIVE_EXIT(env, that, _1g_1thread_1init_FUNC);
}
#endif
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h
index b147c9f..4c39eb1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h
@@ -31,6 +31,7 @@
#define LIB_GDK "libgdk-x11-2.0.a(libgdk-x11-2.0.so.0)"
#define LIB_GLIB "libglib-2.0.a(libglib-2.0.so.0)"
#define LIB_GOBJECT "libgobject-2.0.a(libgobject-2.0.so.0)"
+#define LIB_GTHREAD "libgthread-2.0.a(libgthread-2.0.so.0)"
#define LIB_ATK "libatk-1.0.a(libatk-1.0.so.0)"
#define LIB_PANGO "libpango-1.0.a(libpango-1.0.so.0)"
#define LIB_PANGOCAIRO "libpangocairo-1.0.a(libpangocairo-1.0.so.0)"
@@ -42,6 +43,7 @@
#define LIB_GDK "libgdk-x11-2.0.so"
#define LIB_GLIB "libglib-2.0.so"
#define LIB_GOBJECT "libgobject-2.0.so"
+#define LIB_GTHREAD "libgthread-2.0.so"
#define LIB_ATK "libatk-1.0.so"
#define LIB_PANGO "libpango-1.0.so"
#define LIB_PANGOCAIRO "libpangocairo-1.0.so"
@@ -58,6 +60,7 @@
#endif
#define LIB_GLIB "libglib-2.0.so.0"
#define LIB_GOBJECT "libgobject-2.0.so.0"
+#define LIB_GTHREAD "libgthread-2.0.so.0"
#define LIB_ATK "libatk-1.0.so.0"
#define LIB_PANGO "libpango-1.0.so.0"
#define LIB_PANGOCAIRO "libpangocairo-1.0.so.0"
@@ -76,8 +79,7 @@
#define XRenderSetPictureClipRectangles_LIB LIB_XRENDER
#define XRenderSetPictureTransform_LIB LIB_XRENDER
#define g_filename_display_name_LIB LIB_GLIB
-#define g_thread_init_LIB LIB_GLIB
-#define g_thread_supported_LIB LIB_GLIB
+#define g_thread_init_LIB LIB_GTHREAD
#define gtk_widget_set_allocation_LIB LIB_GTK
#define gtk_adjustment_configure_LIB LIB_GTK
#define gtk_adjustment_get_lower_LIB LIB_GTK
@@ -541,6 +543,10 @@
#define gtk_css_provider_new_LIB LIB_GTK
#define gtk_icon_set_render_icon_pixbuf_LIB LIB_GTK
+#if GLIB_CHECK_VERSION(2,32,0)
+#define g_thread_supported() 0
+#endif
+
/* Field accessors */
#if GTK_CHECK_VERSION(3,0,0)
#define GTK_WIDGET_FLAGS(arg0) 0
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 39f6afe..8b72f41 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
@@ -3304,6 +3304,7 @@ public static final long /*int*/ g_type_register_static (long /*int*/ parent_typ
}
}
/**
+ * @method flags=dynamic
* @param vtable cast=(GThreadFunctions *)
*/
public static final native void _g_thread_init(long /*int*/ vtable);