summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnatoly Spektor <aspektor@redhat.com>2013-02-12 09:25:38 -0500
committerSilenio Quarti <silenio_quarti@ca.ibm.com>2013-03-18 12:29:42 -0400
commit9d9800abc02490355ebf40a1ac63069ee7d48cc3 (patch)
tree9c0628fe2750fe3013ea5609e9e215d22373ac6a
parent060961b49eb51e2c34874d083e17e60c16bb5dd2 (diff)
downloadeclipse.platform.swt-9d9800abc02490355ebf40a1ac63069ee7d48cc3.tar.gz
eclipse.platform.swt-9d9800abc02490355ebf40a1ac63069ee7d48cc3.tar.xz
eclipse.platform.swt-9d9800abc02490355ebf40a1ac63069ee7d48cc3.zip
Remove ColorSelection deprecation warnings when compiling against GTK3.6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c48
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h5
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java24
3 files changed, 61 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 a21ddb96a3..65a1081a23 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
@@ -9126,7 +9126,15 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1color_1selection_1dialog_1new)
jintLong rc = 0;
OS_NATIVE_ENTER(env, that, _1gtk_1color_1selection_1dialog_1new_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+/*
rc = (jintLong)gtk_color_selection_dialog_new((const gchar *)lparg0);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gtk_color_selection_dialog_new)
+ if (fp) {
+ rc = (jintLong)((jintLong (CALLING_CONVENTION*)(const gchar *))fp)((const gchar *)lparg0);
+ }
+ }
fail:
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
OS_NATIVE_EXIT(env, that, _1gtk_1color_1selection_1dialog_1new_FUNC);
@@ -9141,7 +9149,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1color_1selection_1get_1current_1color)
GdkColor _arg1, *lparg1=NULL;
OS_NATIVE_ENTER(env, that, _1gtk_1color_1selection_1get_1current_1color_FUNC);
if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail;
- gtk_color_selection_get_current_color((GtkColorSelection *)arg0, (GdkColor *)lparg1);
+/*
+ gtk_color_selection_get_current_color(arg0, lparg1);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gtk_color_selection_get_current_color)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(jintLong, GdkColor *))fp)(arg0, lparg1);
+ }
+ }
fail:
if (arg1 && lparg1) setGdkColorFields(env, arg1, lparg1);
OS_NATIVE_EXIT(env, that, _1gtk_1color_1selection_1get_1current_1color_FUNC);
@@ -9154,7 +9170,15 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1color_1selection_1palette_1to_1strin
{
jintLong rc = 0;
OS_NATIVE_ENTER(env, that, _1gtk_1color_1selection_1palette_1to_1string_FUNC);
- rc = (jintLong)gtk_color_selection_palette_to_string((GdkColor *)arg0, (gint)arg1);
+/*
+ rc = (jintLong)gtk_color_selection_palette_to_string(arg0, arg1);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gtk_color_selection_palette_to_string)
+ if (fp) {
+ rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong, jint))fp)(arg0, arg1);
+ }
+ }
OS_NATIVE_EXIT(env, that, _1gtk_1color_1selection_1palette_1to_1string_FUNC);
return rc;
}
@@ -9167,7 +9191,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1color_1selection_1set_1current_1color)
GdkColor _arg1, *lparg1=NULL;
OS_NATIVE_ENTER(env, that, _1gtk_1color_1selection_1set_1current_1color_FUNC);
if (arg1) if ((lparg1 = getGdkColorFields(env, arg1, &_arg1)) == NULL) goto fail;
- gtk_color_selection_set_current_color((GtkColorSelection *)arg0, (GdkColor *)lparg1);
+/*
+ gtk_color_selection_set_current_color(arg0, lparg1);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gtk_color_selection_set_current_color)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(jintLong, GdkColor *))fp)(arg0, lparg1);
+ }
+ }
fail:
OS_NATIVE_EXIT(env, that, _1gtk_1color_1selection_1set_1current_1color_FUNC);
}
@@ -9178,7 +9210,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1color_1selection_1set_1has_1palette)
(JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
{
OS_NATIVE_ENTER(env, that, _1gtk_1color_1selection_1set_1has_1palette_FUNC);
- gtk_color_selection_set_has_palette((GtkColorSelection *)arg0, arg1);
+/*
+ gtk_color_selection_set_has_palette(arg0, arg1);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gtk_color_selection_set_has_palette)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(jintLong, jboolean))fp)(arg0, arg1);
+ }
+ }
OS_NATIVE_EXIT(env, that, _1gtk_1color_1selection_1set_1has_1palette_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 d2ae9ed6da..1a5a81eef9 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
@@ -112,6 +112,11 @@
#define gtk_cell_renderer_get_preferred_size_LIB LIB_GTK
#define gtk_cell_renderer_get_size_LIB LIB_GTK
#define gtk_color_selection_dialog_get_color_selection_LIB LIB_GTK
+#define gtk_color_selection_dialog_new_LIB LIB_GTK
+#define gtk_color_selection_set_has_palette_LIB LIB_GTK
+#define gtk_color_selection_get_current_color_LIB LIB_GTK
+#define gtk_color_selection_set_current_color_LIB LIB_GTK
+#define gtk_color_selection_palette_to_string_LIB LIB_GTK
#define gtk_color_chooser_get_rgba_LIB LIB_GTK
#define gtk_color_chooser_dialog_new_LIB LIB_GTK
#define gtk_color_chooser_set_rgba_LIB LIB_GTK
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 3f9fc64c2f..db9e5ca1d9 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
@@ -6504,7 +6504,10 @@ public static final long /*int*/ gtk_clipboard_wait_for_contents(long /*int*/ cl
lock.unlock();
}
}
-/** @param title cast=(const gchar *) */
+/**
+ * @method flags=dynamic
+ * @param title cast=(const gchar *)
+ */
public static final native long /*int*/ _gtk_color_selection_dialog_new(byte[] title);
public static final long /*int*/ gtk_color_selection_dialog_new(byte[] title) {
lock.lock();
@@ -6577,9 +6580,9 @@ public static final void gtk_color_chooser_set_rgba(long /*int*/ chooser, GdkRG
lock.unlock();
}
}
-/**
- * @param colorsel cast=(GtkColorSelection *)
- * @param color cast=(GdkColor *),flags=no_in
+/**
+ * @method flags=dynamic
+ * @param color flags=no_in
*/
public static final native void _gtk_color_selection_get_current_color(long /*int*/ colorsel, GdkColor color);
public static final void gtk_color_selection_get_current_color(long /*int*/ colorsel, GdkColor color) {
@@ -6590,10 +6593,7 @@ public static final void gtk_color_selection_get_current_color(long /*int*/ colo
lock.unlock();
}
}
-/**
- * @param colors cast=(GdkColor *)
- * @param n_colors cast=(gint)
- */
+/** @method flags=dynamic */
public static final native long /*int*/ _gtk_color_selection_palette_to_string(long /*int*/ colors, int n_colors);
public static final long /*int*/ gtk_color_selection_palette_to_string(long /*int*/ colors, int n_colors) {
lock.lock();
@@ -6603,9 +6603,9 @@ public static final long /*int*/ gtk_color_selection_palette_to_string(long /*in
lock.unlock();
}
}
-/**
- * @param colorsel cast=(GtkColorSelection *)
- * @param color cast=(GdkColor *),flags=no_out
+/**
+ * @method flags=dynamic
+ * @param color flags=no_out
*/
public static final native void _gtk_color_selection_set_current_color(long /*int*/ colorsel, GdkColor color);
public static final void gtk_color_selection_set_current_color(long /*int*/ colorsel, GdkColor color) {
@@ -6616,7 +6616,7 @@ public static final void gtk_color_selection_set_current_color(long /*int*/ colo
lock.unlock();
}
}
-/** @param colorsel cast=(GtkColorSelection *) */
+/** @method flags=dynamic */
public static final native void _gtk_color_selection_set_has_palette(long /*int*/ colorsel, boolean has_palette);
public static final void gtk_color_selection_set_has_palette(long /*int*/ colorsel, boolean has_palette) {
lock.lock();