Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2013-09-13 09:21:39 -0400
committerAlexander Kurtakov2013-09-13 09:21:39 -0400
commit98d172ae45a89062f852907145db6c5058b932d8 (patch)
tree66036467fde7e064df1561ac30c783d56394ec00
parent16a2d99c4a0024885d5ddc5cc660afb5f8b55f19 (diff)
downloadeclipse.platform.swt-98d172ae45a89062f852907145db6c5058b932d8.tar.gz
eclipse.platform.swt-98d172ae45a89062f852907145db6c5058b932d8.tar.xz
eclipse.platform.swt-98d172ae45a89062f852907145db6c5058b932d8.zip
Make deprecated methods dynamic.
These methods are not used in GTK3 port and are marked as deprecated in Gtk 3.9. Making them dynamic saves us deprecation warnings when compiling. List of methods: gtk_widget_get_default_style gtk_widget_set_state gtk_widget_modify_base gtk_widget_modify_bg gtk_widget_modify_font gtk_widget_modify_style Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-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.h6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java6
3 files changed, 60 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 b796a706e0..58643fc3e1 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
@@ -18027,7 +18027,15 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1widget_1get_1default_1style)
{
jintLong rc = 0;
OS_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1default_1style_FUNC);
+/*
rc = (jintLong)gtk_widget_get_default_style();
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gtk_widget_get_default_style)
+ if (fp) {
+ rc = (jintLong)((jintLong (CALLING_CONVENTION*)())fp)();
+ }
+ }
OS_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1default_1style_FUNC);
return rc;
}
@@ -18528,7 +18536,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1modify_1base)
GdkColor _arg2, *lparg2=NULL;
OS_NATIVE_ENTER(env, that, _1gtk_1widget_1modify_1base_FUNC);
if (arg2) if ((lparg2 = getGdkColorFields(env, arg2, &_arg2)) == NULL) goto fail;
+/*
gtk_widget_modify_base((GtkWidget *)arg0, (GtkStateType)arg1, (GdkColor *)lparg2);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gtk_widget_modify_base)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(GtkWidget *, GtkStateType, GdkColor *))fp)((GtkWidget *)arg0, (GtkStateType)arg1, (GdkColor *)lparg2);
+ }
+ }
fail:
OS_NATIVE_EXIT(env, that, _1gtk_1widget_1modify_1base_FUNC);
}
@@ -18541,7 +18557,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1modify_1bg)
GdkColor _arg2, *lparg2=NULL;
OS_NATIVE_ENTER(env, that, _1gtk_1widget_1modify_1bg_FUNC);
if (arg2) if ((lparg2 = getGdkColorFields(env, arg2, &_arg2)) == NULL) goto fail;
+/*
gtk_widget_modify_bg((GtkWidget *)arg0, (GtkStateType)arg1, (GdkColor *)lparg2);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gtk_widget_modify_bg)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(GtkWidget *, GtkStateType, GdkColor *))fp)((GtkWidget *)arg0, (GtkStateType)arg1, (GdkColor *)lparg2);
+ }
+ }
fail:
OS_NATIVE_EXIT(env, that, _1gtk_1widget_1modify_1bg_FUNC);
}
@@ -18552,7 +18576,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1modify_1font)
(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
{
OS_NATIVE_ENTER(env, that, _1gtk_1widget_1modify_1font_FUNC);
+/*
gtk_widget_modify_font((GtkWidget *)arg0, (PangoFontDescription *)arg1);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gtk_widget_modify_font)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(GtkWidget *, PangoFontDescription *))fp)((GtkWidget *)arg0, (PangoFontDescription *)arg1);
+ }
+ }
OS_NATIVE_EXIT(env, that, _1gtk_1widget_1modify_1font_FUNC);
}
#endif
@@ -18562,7 +18594,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1modify_1style)
(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
{
OS_NATIVE_ENTER(env, that, _1gtk_1widget_1modify_1style_FUNC);
+/*
gtk_widget_modify_style((GtkWidget *)arg0, (GtkRcStyle *)arg1);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gtk_widget_modify_style)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(GtkWidget *, GtkRcStyle *))fp)((GtkWidget *)arg0, (GtkRcStyle *)arg1);
+ }
+ }
OS_NATIVE_EXIT(env, that, _1gtk_1widget_1modify_1style_FUNC);
}
#endif
@@ -18893,7 +18933,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1set_1state)
(JNIEnv *env, jclass that, jintLong arg0, jint arg1)
{
OS_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1state_FUNC);
+/*
gtk_widget_set_state((GtkWidget *)arg0, (GtkStateType)arg1);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gtk_widget_set_state)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(GtkWidget *, GtkStateType))fp)((GtkWidget *)arg0, (GtkStateType)arg1);
+ }
+ }
OS_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1state_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 79e8a088f1..18de557115 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
@@ -326,6 +326,7 @@
#define gtk_widget_is_composited_LIB LIB_GTK
#define gtk_widget_get_allocation_LIB LIB_GTK
#define gtk_widget_size_request_LIB LIB_GTK
+#define gtk_widget_get_default_style_LIB LIB_GTK
#define gtk_widget_get_preferred_size_LIB LIB_GTK
#define gtk_widget_get_style_context_LIB LIB_GTK
#define gtk_widget_get_tooltip_text_LIB LIB_GTK
@@ -349,7 +350,12 @@
#define gtk_widget_set_sensitive_LIB LIB_GTK
#define gtk_widget_set_receives_default_LIB LIB_GTK
#define gtk_widget_set_visible_LIB LIB_GTK
+#define gtk_widget_set_state_LIB LIB_GTK
#define gtk_widget_shape_combine_region_LIB LIB_GTK
+#define gtk_widget_modify_base_LIB LIB_GTK
+#define gtk_widget_modify_bg_LIB LIB_GTK
+#define gtk_widget_modify_font_LIB LIB_GTK
+#define gtk_widget_modify_style_LIB LIB_GTK
#define gtk_range_get_slider_range_LIB LIB_GTK
#define gdk_x11_screen_get_window_manager_name_LIB LIB_GDK
#define gdk_x11_screen_lookup_visual_LIB LIB_GDK
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 7cb76acae1..e76357d4cb 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
@@ -13514,6 +13514,7 @@ public static final boolean gtk_widget_get_child_visible (long /*int*/ widget) {
lock.unlock();
}
}
+/** @method flags=dynamic */
public static final native long /*int*/ _gtk_widget_get_default_style();
public static final long /*int*/ gtk_widget_get_default_style() {
lock.lock();
@@ -13770,6 +13771,7 @@ public static final boolean gtk_widget_mnemonic_activate(long /*int*/ widget, bo
}
}
/**
+ * @method flags=dynamic
* @param widget cast=(GtkWidget *)
* @param state cast=(GtkStateType)
* @param color cast=(GdkColor *),flags=no_out
@@ -13784,6 +13786,7 @@ public static final void gtk_widget_modify_base(long /*int*/ widget, int state,
}
}
/**
+ * @method flags=dynamic
* @param widget cast=(GtkWidget *)
* @param state cast=(GtkStateType)
* @param color cast=(GdkColor *),flags=no_out
@@ -13798,6 +13801,7 @@ public static final void gtk_widget_modify_bg(long /*int*/ widget, int state, Gd
}
}
/**
+ * @method flags=dynamic
* @param widget cast=(GtkWidget *)
* @param pango_font_descr cast=(PangoFontDescription *)
*/
@@ -13811,6 +13815,7 @@ public static final void gtk_widget_modify_font(long /*int*/ widget, long /*int*
}
}
/**
+ * @method flags=dynamic
* @param widget cast=(GtkWidget *)
* @param style cast=(GtkRcStyle *)
*/
@@ -14070,6 +14075,7 @@ public static final void gtk_widget_set_size_request(long /*int*/ widget, int wi
}
}
/**
+ * @method flags=dynamic
* @param widget cast=(GtkWidget *)
* @param state cast=(GtkStateType)
*/

Back to the top