Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBogdan Gheorghe2011-12-05 22:55:00 +0000
committerFelipe Heidrich2011-12-05 22:55:00 +0000
commitd4dc76f502521d658d8db0cfa2a42de71bc22567 (patch)
treeb41eabda5037dd2416e71ec0bf5be461f6497bf2
parent399668ec62007974ac5ae7cf065fd3ab7640c5d3 (diff)
downloadeclipse.platform.swt-d4dc76f502521d658d8db0cfa2a42de71bc22567.tar.gz
eclipse.platform.swt-d4dc76f502521d658d8db0cfa2a42de71bc22567.tar.xz
eclipse.platform.swt-d4dc76f502521d658d8db0cfa2a42de71bc22567.zip
Added gdk_free_color
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c5
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java10
4 files changed, 24 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 2f8f9fc3f1..4f0bbc78b8 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
@@ -5014,6 +5014,16 @@ fail:
}
#endif
+#ifndef NO__1gdk_1color_1free
+JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1color_1free)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ OS_NATIVE_ENTER(env, that, _1gdk_1color_1free_FUNC);
+ gdk_color_free((GdkColor *)arg0);
+ OS_NATIVE_EXIT(env, that, _1gdk_1color_1free_FUNC);
+}
+#endif
+
#ifndef NO__1gdk_1color_1white
JNIEXPORT jboolean JNICALL OS_NATIVE(_1gdk_1color_1white)
(JNIEnv *env, jclass that, jintLong arg0, jobject 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 f34c147bdc..966af0eec8 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
@@ -18,8 +18,8 @@
#ifdef NATIVE_STATS
-int OS_nativeFunctionCount = 1379;
-int OS_nativeFunctionCallCount[1379];
+int OS_nativeFunctionCount = 1380;
+int OS_nativeFunctionCallCount[1380];
char * OS_nativeFunctionNames[] = {
#ifndef JNI64
"Call__IIII",
@@ -429,6 +429,7 @@ char * OS_nativeFunctionNames[] = {
"_1gdk_1cairo_1region",
"_1gdk_1cairo_1reset_1clip",
"_1gdk_1cairo_1set_1source_1color",
+ "_1gdk_1color_1free",
"_1gdk_1color_1white",
"_1gdk_1colormap_1alloc_1color",
"_1gdk_1colormap_1free_1colors",
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 972785aef8..e0312237fe 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
@@ -437,6 +437,7 @@ typedef enum {
_1gdk_1cairo_1region_FUNC,
_1gdk_1cairo_1reset_1clip_FUNC,
_1gdk_1cairo_1set_1source_1color_FUNC,
+ _1gdk_1color_1free_FUNC,
_1gdk_1color_1white_FUNC,
_1gdk_1colormap_1alloc_1color_FUNC,
_1gdk_1colormap_1free_1colors_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 dc48a3d105..4d2f048ad7 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
@@ -3636,6 +3636,16 @@ public static final void gdk_cairo_set_source_color(int /*long*/ cairo, GdkColor
lock.unlock();
}
}
+/** @param color cast=(GdkColor *) */
+public static final native void _gdk_color_free(int /*long*/ color);
+public static final void gdk_color_free(int /*long*/ color) {
+ lock.lock();
+ try {
+ _gdk_color_free(color);
+ } finally {
+ lock.unlock();
+ }
+}
/**
* @param colormap cast=(GdkColormap *)
* @param color cast=(GdkColor *),flags=no_in

Back to the top