Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Williams2018-04-03 17:50:54 +0000
committerEric Williams2018-04-03 18:01:37 +0000
commit6186fb3eb3c00dde36a5ef7b90a15abcb46b5dcf (patch)
tree873f7d5f8fc87cb8e79c15ce019bf8c503b3baf5 /bundles/org.eclipse.swt/Eclipse SWT PI
parent32a4ec463315fd2e2cc607aeeefcd084d8768804 (diff)
downloadeclipse.platform.swt-6186fb3eb3c00dde36a5ef7b90a15abcb46b5dcf.tar.gz
eclipse.platform.swt-6186fb3eb3c00dde36a5ef7b90a15abcb46b5dcf.tar.xz
eclipse.platform.swt-6186fb3eb3c00dde36a5ef7b90a15abcb46b5dcf.zip
Bug 529431: [GTK3.10+] Snippet294 fails to draw Region
Allow GtkWindow (usually Shells) to be shaped using gdk_window_shape_combine_region() instead of cairo_clip. GtkWindow is unaffected by the changes in GTK3.10 so this is fine. A snippet has been added to test this functionality, and to test for the case mentioned in comment 8 of bug 529431. Change-Id: I40c80599e015553576fc8979181577c1170146d2 Signed-off-by: Eric Williams <ericwill@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c1
-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/GTK.java10
4 files changed, 24 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 5fc92d0de9..565ee2ac1c 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
@@ -4228,6 +4228,18 @@ JNIEXPORT jintLong JNICALL GTK_NATIVE(_1GTK_1TYPE_1WIDGET)
}
#endif
+#ifndef NO__1GTK_1TYPE_1WINDOW
+JNIEXPORT jintLong JNICALL GTK_NATIVE(_1GTK_1TYPE_1WINDOW)
+ (JNIEnv *env, jclass that)
+{
+ jintLong rc = 0;
+ GTK_NATIVE_ENTER(env, that, _1GTK_1TYPE_1WINDOW_FUNC);
+ rc = (jintLong)GTK_TYPE_WINDOW;
+ GTK_NATIVE_EXIT(env, that, _1GTK_1TYPE_1WINDOW_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO__1GTK_1WIDGET_1SET_1FLAGS
JNIEXPORT void JNICALL GTK_NATIVE(_1GTK_1WIDGET_1SET_1FLAGS)
(JNIEnv *env, jclass that, jintLong arg0, jint 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 98f36e68bb..01f966424d 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
@@ -321,6 +321,7 @@ char * GTK_nativeFunctionNames[] = {
"_1GTK_1TYPE_1IM_1MULTICONTEXT",
"_1GTK_1TYPE_1MENU",
"_1GTK_1TYPE_1WIDGET",
+ "_1GTK_1TYPE_1WINDOW",
"_1GTK_1WIDGET_1SET_1FLAGS",
"_1GTK_1WIDGET_1UNSET_1FLAGS",
"_1gtk_1accel_1group_1new",
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 97f4d144ee..64a3069337 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
@@ -319,6 +319,7 @@ typedef enum {
_1GTK_1TYPE_1IM_1MULTICONTEXT_FUNC,
_1GTK_1TYPE_1MENU_FUNC,
_1GTK_1TYPE_1WIDGET_FUNC,
+ _1GTK_1TYPE_1WINDOW_FUNC,
_1GTK_1WIDGET_1SET_1FLAGS_FUNC,
_1GTK_1WIDGET_1UNSET_1FLAGS_FUNC,
_1gtk_1accel_1group_1new_FUNC,
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 ae31f7be36..ff3427fa12 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
@@ -478,6 +478,16 @@ public class GTK extends OS {
lock.unlock();
}
}
+ /** @method flags=const */
+ public static final native long /*int*/ _GTK_TYPE_WINDOW();
+ public static final long /*int*/ GTK_TYPE_WINDOW() {
+ lock.lock();
+ try {
+ return _GTK_TYPE_WINDOW();
+ } finally {
+ lock.unlock();
+ }
+ }
public static final native void _GTK_WIDGET_SET_FLAGS(long /*int*/ wid, int flag);
public static final void GTK_WIDGET_SET_FLAGS(long /*int*/ wid, int flag) {
lock.lock();

Back to the top