Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Williams2018-09-27 15:44:31 +0000
committerEric Williams2018-09-27 19:02:24 +0000
commitbf106421914e5a7a70814eb9dcbd50f023e8feb6 (patch)
tree52d586e67c181d0818780402d27d119e0a63493a
parentfb540937ebc0916d33df2b3b4b4e9f84b2a2f932 (diff)
downloadeclipse.platform.swt-bf106421914e5a7a70814eb9dcbd50f023e8feb6.tar.gz
eclipse.platform.swt-bf106421914e5a7a70814eb9dcbd50f023e8feb6.tar.xz
eclipse.platform.swt-bf106421914e5a7a70814eb9dcbd50f023e8feb6.zip
Bug 539571: [GTK3] Clean up functions that don't need to be dynamic
Remove some unnecessary dynamic functions, and add tags for those that are deprecated. Change-Id: Idb0dd82bf4f1b2a50d8d9547419e0699eb445e00 Signed-off-by: Eric Williams <ericwill@redhat.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c56
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java3
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java59
5 files changed, 16 insertions, 106 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 1fb1299c27..5e4228f961 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
@@ -8556,34 +8556,6 @@ JNIEXPORT jintLong JNICALL GTK_NATIVE(_1gtk_1settings_1get_1default)
}
#endif
-#ifndef NO__1gtk_1settings_1set_1string_1property
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1settings_1set_1string_1property)
- (JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jbyteArray arg2, jbyteArray arg3)
-{
- jbyte *lparg1=NULL;
- jbyte *lparg2=NULL;
- jbyte *lparg3=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1settings_1set_1string_1property_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
- if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
- if (arg3) if ((lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL)) == NULL) goto fail;
-/*
- gtk_settings_set_string_property((GtkSettings *)arg0, (const gchar *)lparg1, (const gchar *)lparg2, (const gchar *)lparg3);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_settings_set_string_property)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkSettings *, const gchar *, const gchar *, const gchar *))fp)((GtkSettings *)arg0, (const gchar *)lparg1, (const gchar *)lparg2, (const gchar *)lparg3);
- }
- }
-fail:
- if (arg3 && lparg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, 0);
- if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
- if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1settings_1set_1string_1property_FUNC);
-}
-#endif
-
#ifndef NO__1gtk_1socket_1get_1id
JNIEXPORT jintLong JNICALL GTK_NATIVE(_1gtk_1socket_1get_1id)
(JNIEnv *env, jclass that, jintLong arg0)
@@ -11351,15 +11323,7 @@ JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1draw)
(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
{
GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1draw_FUNC);
-/*
gtk_widget_draw(arg0, arg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_widget_draw)
- if (fp) {
- ((void (CALLING_CONVENTION*)(jintLong, jintLong))fp)(arg0, arg1);
- }
- }
GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1draw_FUNC);
}
#endif
@@ -12017,26 +11981,6 @@ JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1reparent)
}
#endif
-#ifndef NO__1gtk_1widget_1send_1expose
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1widget_1send_1expose)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
-{
- jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1send_1expose_FUNC);
-/*
- rc = (jint)gtk_widget_send_expose((GtkWidget *)arg0, (GdkEvent *)arg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_widget_send_expose)
- if (fp) {
- rc = (jint)((jint (CALLING_CONVENTION*)(GtkWidget *, GdkEvent *))fp)((GtkWidget *)arg0, (GdkEvent *)arg1);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1send_1expose_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO__1gtk_1widget_1set_1allocation
JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1set_1allocation)
(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 2b23e97130..447f5e36f6 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
@@ -688,7 +688,6 @@ char * GTK_nativeFunctionNames[] = {
"_1gtk_1separator_1tool_1item_1new",
"_1gtk_1separator_1tool_1item_1set_1draw",
"_1gtk_1settings_1get_1default",
- "_1gtk_1settings_1set_1string_1property",
"_1gtk_1socket_1get_1id",
"_1gtk_1socket_1new",
"_1gtk_1spin_1button_1configure",
@@ -988,7 +987,6 @@ char * GTK_nativeFunctionNames[] = {
"_1gtk_1widget_1realize",
"_1gtk_1widget_1remove_1accelerator",
"_1gtk_1widget_1reparent",
- "_1gtk_1widget_1send_1expose",
"_1gtk_1widget_1set_1allocation",
"_1gtk_1widget_1set_1app_1paintable",
"_1gtk_1widget_1set_1can_1default",
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 d683dc208d..6046f9e1c7 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
@@ -686,7 +686,6 @@ typedef enum {
_1gtk_1separator_1tool_1item_1new_FUNC,
_1gtk_1separator_1tool_1item_1set_1draw_FUNC,
_1gtk_1settings_1get_1default_FUNC,
- _1gtk_1settings_1set_1string_1property_FUNC,
_1gtk_1socket_1get_1id_FUNC,
_1gtk_1socket_1new_FUNC,
_1gtk_1spin_1button_1configure_FUNC,
@@ -986,7 +985,6 @@ typedef enum {
_1gtk_1widget_1realize_FUNC,
_1gtk_1widget_1remove_1accelerator_FUNC,
_1gtk_1widget_1reparent_FUNC,
- _1gtk_1widget_1send_1expose_FUNC,
_1gtk_1widget_1set_1allocation_FUNC,
_1gtk_1widget_1set_1app_1paintable_FUNC,
_1gtk_1widget_1set_1can_1default_FUNC,
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java
index e38f1e233c..e77b58d85a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java
@@ -1237,6 +1237,7 @@ public class GDK extends OS {
* @param time_ cast=(guint32)
*/
public static final native int _gdk_device_grab(long /*int*/ device, long /*int*/ window, int grab_ownership, boolean owner_events, int event_mask, long /*int*/ cursor, int time_);
+ /** [GTK3; 3.20 deprecated] */
public static final int gdk_device_grab(long /*int*/ device, long /*int*/ window, int grab_ownership, boolean owner_events, int event_mask, long /*int*/ cursor, int time_) {
lock.lock();
try {
@@ -1251,6 +1252,7 @@ public class GDK extends OS {
* @param time_ cast=(guint32)
*/
public static final native void _gdk_device_ungrab(long /*int*/ device, int time_);
+ /** [GTK3; 3.20 deprecated] */
public static final void gdk_device_ungrab(long /*int*/ device, int time_) {
lock.lock();
try {
@@ -2095,6 +2097,7 @@ public class GDK extends OS {
}
/** @method flags=dynamic */
public static final native void _gdk_window_set_background_pattern(long /*int*/ window, long /*int*/ pattern);
+ /** [GTK3; 3.22 deprecated] */
public static final void gdk_window_set_background_pattern(long /*int*/ window, long /*int*/ pattern) {
lock.lock();
try {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java
index 7fbb11324d..735fd33404 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java
@@ -745,7 +745,7 @@ public class GTK extends OS {
* @param adjustment cast=(GtkAdjustment *)
* */
public static final native void _gtk_adjustment_value_changed(long /*int*/ adjustment);
- /** [GTK2/GTK3; 3.18 deprecated] */
+ /** [GTK2/GTK3; 3.18 deprecated, replaced] */
public static final void gtk_adjustment_value_changed(long /*int*/ adjustment) {
lock.lock();
try {
@@ -1304,7 +1304,7 @@ public class GTK extends OS {
* @param val cast=(gboolean)
*/
public static final native void _gtk_combo_box_set_focus_on_click(long /*int*/ combo, boolean val);
- /** [GTK2/GTK3; 3.20 deprecated] */
+ /** [GTK2/GTK3; 3.20 deprecated, replaced] */
public static final void gtk_combo_box_set_focus_on_click(long /*int*/ combo, boolean val) {
lock.lock();
try {
@@ -1578,7 +1578,7 @@ public class GTK extends OS {
* @param event cast=(GdkEvent *)
*/
public static final native long /*int*/ _gtk_drag_begin(long /*int*/ widget, long /*int*/ targets, int actions, int button, long /*int*/ event);
- /** [GTK2/GTK3; 3.10 deprecated] */
+ /** [GTK2/GTK3; 3.10 deprecated, replaced] */
public static final long /*int*/ gtk_drag_begin(long /*int*/ widget, long /*int*/ targets, int actions, int button, long /*int*/ event) {
lock.lock();
try {
@@ -3061,7 +3061,7 @@ public class GTK extends OS {
* @method flags=dynamic
*/
public static final native void _gtk_icon_info_free(long /*int*/ icon_info);
- /** [GTK2/GTK3; 3.8 deprecated] */
+ /** [GTK2/GTK3; 3.8 deprecated, replaced] */
public static final void gtk_icon_info_free(long /*int*/ icon_info) {
lock.lock();
try {
@@ -3795,7 +3795,7 @@ public class GTK extends OS {
* @param activate_time cast=(guint32)
*/
public static final native void _gtk_menu_popup(long /*int*/ menu, long /*int*/ parent_menu_shell, long /*int*/ parent_menu_item, long /*int*/ func, long /*int*/ data, int button, int activate_time);
- /** [GTK2/GTK3; 3.22 deprecated] */
+ /** [GTK2/GTK3; 3.22 deprecated, replaced] */
public static final void gtk_menu_popup(long /*int*/ menu, long /*int*/ parent_menu_shell, long /*int*/ parent_menu_item, long /*int*/ func, long /*int*/ data, int button, int activate_time) {
lock.lock();
try {
@@ -3902,7 +3902,7 @@ public class GTK extends OS {
* @param yalign cast=(gfloat)
*/
public static final native void _gtk_misc_set_alignment(long /*int*/ misc, float xalign, float yalign);
- /** [GTK2/GTK3; 3.14 deprecated] */
+ /** [GTK2/GTK3; 3.14 deprecated, replaced] */
public static final void gtk_misc_set_alignment(long /*int*/ misc, float xalign, float yalign) {
lock.lock();
try {
@@ -5102,7 +5102,7 @@ public class GTK extends OS {
* @param child cast=(GtkWidget *)
*/
public static final native void _gtk_scrolled_window_add_with_viewport(long /*int*/ scrolled_window, long /*int*/ child);
- /** [GTK2/GTK3; 3.8 deprecated] */
+ /** [GTK2/GTK3; 3.8 deprecated, replaced] */
public static final void gtk_scrolled_window_add_with_viewport(long /*int*/ scrolled_window, long /*int*/ child) {
lock.lock();
try {
@@ -5241,23 +5241,6 @@ public class GTK extends OS {
lock.unlock();
}
}
- /**
- * @method flags=dynamic
- * @param settings cast=(GtkSettings *)
- * @param name cast=(const gchar *)
- * @param v_string cast=(const gchar *)
- * @param origin cast=(const gchar *)
- */
- public static final native void _gtk_settings_set_string_property(long /*int*/ settings, byte[] name, byte[] v_string, byte[] origin);
- /** [GTK2/GTK3; 3.16 deprecated] */
- public static final void gtk_settings_set_string_property(long /*int*/ settings, byte[] name, byte[] v_string, byte[] origin) {
- lock.lock();
- try {
- _gtk_settings_set_string_property(settings, name, v_string, origin);
- } finally {
- lock.unlock();
- }
- }
/** @param selection_data cast=(GtkSelectionData *) */
public static final native void _gtk_selection_data_free(long /*int*/ selection_data);
public static final void gtk_selection_data_free(long /*int*/ selection_data) {
@@ -5595,7 +5578,7 @@ public class GTK extends OS {
}
/** @method flags=dynamic */
public static final native void _gtk_style_context_get_background_color(long /*int*/ context, int state, GdkRGBA color);
- /** [GTK3; 3.16 deprecated] */
+ /** [GTK3; 3.16 deprecated, replaced] */
public static final void gtk_style_context_get_background_color(long /*int*/ context, int state, GdkRGBA color) {
lock.lock();
try {
@@ -5616,7 +5599,7 @@ public class GTK extends OS {
}
/** @method flags=dynamic */
public static final native long /*int*/ _gtk_style_context_get_font(long /*int*/ context, int state);
- /** [GTK3; 3.8 deprecated] */
+ /** [GTK3; 3.8 deprecated, replaced] */
public static final long /*int*/ gtk_style_context_get_font(long /*int*/ context, int state) {
lock.lock();
try {
@@ -7860,7 +7843,6 @@ public class GTK extends OS {
lock.unlock();
}
}
- /** @method flags=dynamic [GTK3; GTK2 deprecated (different signature)] */
public static final native void _gtk_widget_draw(long /*int*/ widget, long /*int*/ cr);
public static final void gtk_widget_draw(long /*int*/ widget, long /*int*/ cr) {
lock.lock();
@@ -8173,7 +8155,7 @@ public class GTK extends OS {
* @method flags=dynamic
*/
public static final native void _gtk_widget_override_color(long /*int*/ widget, int state, GdkRGBA color);
- /** [GTK3; 3.16 deprecated]*/
+ /** [GTK3; 3.16 deprecated, replaced]*/
public static final void gtk_widget_override_color(long /*int*/ widget, int state, GdkRGBA color) {
lock.lock();
try {
@@ -8186,7 +8168,7 @@ public class GTK extends OS {
* @method flags=dynamic
*/
public static final native void _gtk_widget_override_background_color(long /*int*/ widget, int state, GdkRGBA color);
- /** [GTK3; 3.16 deprecated] */
+ /** [GTK3; 3.16 deprecated, replaced] */
public static final void gtk_widget_override_background_color(long /*int*/ widget, int state, GdkRGBA color) {
lock.lock();
try {
@@ -8258,21 +8240,6 @@ public class GTK extends OS {
lock.unlock();
}
}
-
- /**
- * @method flags=dynamic
- * @param widget cast=(GtkWidget *)
- * @param event cast=(GdkEvent *)
- */
- public static final native int _gtk_widget_send_expose(long /*int*/ widget, long /*int*/ event);
- public static final int gtk_widget_send_expose(long /*int*/ widget, long /*int*/ event) {
- lock.lock();
- try {
- return _gtk_widget_send_expose(widget, event);
- } finally {
- lock.unlock();
- }
- }
/** @param widget cast=(GtkWidget *) */
public static final native void _gtk_widget_set_app_paintable(long /*int*/ widget, boolean app_paintable);
public static final void gtk_widget_set_app_paintable(long /*int*/ widget, boolean app_paintable) {
@@ -8656,7 +8623,7 @@ public class GTK extends OS {
* @param window cast=(GtkWindow *)
*/
public static final native double _gtk_window_get_opacity (long /*int*/ window);
- /** [GTK2/GTK3; 3.8 deprecated] */
+ /** [GTK2/GTK3; 3.8 deprecated, replaced] */
public static final double gtk_window_get_opacity (long /*int*/ window) {
lock.lock();
try {
@@ -8935,7 +8902,7 @@ public class GTK extends OS {
* @param window cast=(GtkWindow *)
*/
public static final native void _gtk_window_set_opacity(long /*int*/ window, double opacity);
- /** [GTK2/GTK3; 3.8 deprecated] */
+ /** [GTK2/GTK3; 3.8 deprecated, replaced] */
public static final void gtk_window_set_opacity(long /*int*/ window, double opacity) {
lock.lock();
try {

Back to the top