Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2018-03-14 09:31:21 +0000
committerAlexander Kurtakov2018-03-14 12:08:46 +0000
commit1c8a0ecfbe778d718be00e3b273a19d9c628f0be (patch)
tree4ca94ffa225eeed3cd8f45cd626b6883feb4648d /bundles/org.eclipse.swt/Eclipse SWT PI/gtk
parentffa2702d1e7bc9674329b844cfae45bca2cb809e (diff)
downloadeclipse.platform.swt-1c8a0ecfbe778d718be00e3b273a19d9c628f0be.tar.gz
eclipse.platform.swt-1c8a0ecfbe778d718be00e3b273a19d9c628f0be.tar.xz
eclipse.platform.swt-1c8a0ecfbe778d718be00e3b273a19d9c628f0be.zip
Bug 532433 - Don't use deprecated gdk_beep
Must be replaced with gtk_display_beep. Change-Id: Ic276387881a5e992139b7768a19ac4d4a9090d58 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/gtk')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c20
-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.java9
4 files changed, 18 insertions, 15 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 7cddab1bdb..fb2b491d3a 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
@@ -340,16 +340,6 @@ JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1atom_1name)
}
#endif
-#ifndef NO__1gdk_1beep
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1beep)
- (JNIEnv *env, jclass that)
-{
- GDK_NATIVE_ENTER(env, that, _1gdk_1beep_FUNC);
- gdk_beep();
- GDK_NATIVE_EXIT(env, that, _1gdk_1beep_FUNC);
-}
-#endif
-
#ifndef NO__1gdk_1bitmap_1create_1from_1data
JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1bitmap_1create_1from_1data)
(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jint arg2, jint arg3)
@@ -920,6 +910,16 @@ JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1device_1warp)
}
#endif
+#ifndef NO__1gdk_1display_1beep
+JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1display_1beep)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ GDK_NATIVE_ENTER(env, that, _1gdk_1display_1beep_FUNC);
+ gdk_display_beep((GdkDisplay *)arg0);
+ GDK_NATIVE_EXIT(env, that, _1gdk_1display_1beep_FUNC);
+}
+#endif
+
#ifndef NO__1gdk_1display_1get_1default
JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1display_1get_1default)
(JNIEnv *env, jclass that)
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 43acdb330e..7dba1abf59 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
@@ -48,7 +48,6 @@ char * GDK_nativeFunctionNames[] = {
"_1GDK_1TYPE_1RGBA",
"_1gdk_1atom_1intern",
"_1gdk_1atom_1name",
- "_1gdk_1beep",
"_1gdk_1bitmap_1create_1from_1data",
"_1gdk_1cairo_1create",
"_1gdk_1cairo_1get_1clip_1rectangle",
@@ -77,6 +76,7 @@ char * GDK_nativeFunctionNames[] = {
"_1gdk_1device_1manager_1get_1client_1pointer",
"_1gdk_1device_1ungrab",
"_1gdk_1device_1warp",
+ "_1gdk_1display_1beep",
"_1gdk_1display_1get_1default",
"_1gdk_1display_1get_1default_1seat",
"_1gdk_1display_1get_1device_1manager",
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 2038eea393..702b2b099c 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
@@ -58,7 +58,6 @@ typedef enum {
_1GDK_1TYPE_1RGBA_FUNC,
_1gdk_1atom_1intern_FUNC,
_1gdk_1atom_1name_FUNC,
- _1gdk_1beep_FUNC,
_1gdk_1bitmap_1create_1from_1data_FUNC,
_1gdk_1cairo_1create_FUNC,
_1gdk_1cairo_1get_1clip_1rectangle_FUNC,
@@ -87,6 +86,7 @@ typedef enum {
_1gdk_1device_1manager_1get_1client_1pointer_FUNC,
_1gdk_1device_1ungrab_FUNC,
_1gdk_1device_1warp_FUNC,
+ _1gdk_1display_1beep_FUNC,
_1gdk_1display_1get_1default_FUNC,
_1gdk_1display_1get_1default_1seat_FUNC,
_1gdk_1display_1get_1device_1manager_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 aeba7b06bd..1944897425 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
@@ -446,11 +446,14 @@ public class GDK extends OS {
lock.unlock();
}
}
- public static final native void _gdk_beep();
- public static final void gdk_beep() {
+ /**
+ * @param display cast=(GdkDisplay *)
+ */
+ public static final native void _gdk_display_beep(long /*int*/ display);
+ public static final void gdk_display_beep(long /*int*/ display) {
lock.lock();
try {
- _gdk_beep();
+ _gdk_display_beep(display);
} finally {
lock.unlock();
}

Back to the top