Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXi Yan2019-01-25 12:57:56 -0500
committerXi Yan2019-01-25 12:57:56 -0500
commitd0579df87d1f3eae7ca376e21d9e8049a86bd3ac (patch)
treeed06beec2ee48f5f9f40cc07f93c855de88cf522
parent9e36dacf9e3ff7815d0b9e297c84970b37c159fa (diff)
downloadeclipse.platform.swt-d0579df87d1f3eae7ca376e21d9e8049a86bd3ac.tar.gz
eclipse.platform.swt-d0579df87d1f3eae7ca376e21d9e8049a86bd3ac.tar.xz
eclipse.platform.swt-d0579df87d1f3eae7ca376e21d9e8049a86bd3ac.zip
Bug 540675 - [GTK4] Adapt to sizing machinery changes
Add gtk_widget_measure to os.h, add parameters. Change-Id: I1664b6f0c6de42c996ea1d903d750293c3b9b23f Signed-off-by: Xi Yan <xixiyan@redhat.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java10
3 files changed, 11 insertions, 2 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 753a70a0ae..b10967a0a7 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
@@ -12689,7 +12689,7 @@ JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1measure)
if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
if (arg5) if ((lparg5 = (*env)->GetIntArrayElements(env, arg5, NULL)) == NULL) goto fail;
if (arg6) if ((lparg6 = (*env)->GetIntArrayElements(env, arg6, NULL)) == NULL) goto fail;
- gtk_widget_measure((GtkWidget *)arg0, arg1, arg2, lparg3, lparg4, lparg5, lparg6);
+ gtk_widget_measure((GtkWidget *)arg0, (GtkOrientation)arg1, (int)arg2, (int *)lparg3, (int *)lparg4, (int *)lparg5, (int *)lparg6);
fail:
if (arg6 && lparg6) (*env)->ReleaseIntArrayElements(env, arg6, lparg6, 0);
if (arg5 && lparg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h
index 36f8ca2b1b..edcacb3d9f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h
@@ -438,6 +438,7 @@
#define NO__1gdk_1cursor_1new_1from_1name___3BI
#define NO__1gdk_1cursor_1new_1from_1name___3BJ
#define NO__1gdk_1display_1get_1keymap
+#define NO__1gtk_1widget_1measure
#define NO__1gtk_1style_1context_1add_1provider_1for_1display
// GtkEventController related functions for GTK4
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 04acb3d06f..2823e1c55a 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
@@ -8709,7 +8709,15 @@ public class GTK extends OS {
lock.unlock();
}
}
- /** @param widget cast=(GtkWidget *) */
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param orientation cast=(GtkOrientation)
+ * @param for_size cast=(int)
+ * @param minimum cast=(int *)
+ * @param natural cast=(int *)
+ * @param minimum_baseline cast=(int *)
+ * @param natural_baseline cast=(int *)
+ */
public static final native void _gtk_widget_measure(long /*int*/ widget, int orientation, int for_size, int[] minimum, int[] natural, int[] minimum_baseline, int[] natural_baseline);
/** [GTK4 only, if-def'd in os.h] */
public static final void gtk_widget_measure(long /*int*/ widget, int orientation, int for_size, int[] minimum, int[] natural, int[] minimum_baseline, int[] natural_baseline) {

Back to the top