Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h
index 967af4019f..9a9dc3bb3d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h
@@ -69,6 +69,17 @@
#define OS_LOAD_FUNCTION LOAD_FUNCTION
+// Hard-link code generated from GTK.java to LIB_GTK
+#define GTK_LOAD_FUNCTION(var, name) \
+ static int initialized = 0; \
+ static void *var = NULL; \
+ if (!initialized) { \
+ void* handle = dlopen(LIB_GTK, LOAD_FLAGS); \
+ if (handle) var = dlsym(handle, #name); \
+ initialized = 1; \
+ CHECK_DLERROR \
+ }
+
#ifdef GDK_WINDOWING_X11
#include <gdk/gdkx.h>

Back to the top