summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBilly Biggs <bbiggs>2005-02-07 21:35:56 +0000
committerBilly Biggs <bbiggs>2005-02-07 21:35:56 +0000
commitb6b265573946787e6f72560160d3b068bbd2b72b (patch)
tree0b524bbaac2df866b63a5c0007742c81ddc41e45
parentd98950274c90c535e2eff8105675766663534295 (diff)
downloadeclipse.platform.swt-b6b265573946787e6f72560160d3b068bbd2b72b.tar.gz
eclipse.platform.swt-b6b265573946787e6f72560160d3b068bbd2b72b.tar.xz
eclipse.platform.swt-b6b265573946787e6f72560160d3b068bbd2b72b.zip
Add accessors for the widget requisition.
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gtk.OS.properties22
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c32
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c6
-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/OS.java2
6 files changed, 64 insertions, 10 deletions
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gtk.OS.properties b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gtk.OS.properties
index 07955a5cdb..4a67266bd3 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gtk.OS.properties
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gtk.OS.properties
@@ -424,6 +424,28 @@ OS_GTK_TEXTVIEW_IM_CONTEXT_0=cast=(GtkTextView *)
OS_GTK_WIDGET_HEIGHT=
OS_GTK_WIDGET_HEIGHT_0=cast=(GtkWidget *)
+OS_GTK_WIDGET_REQUISITION_HEIGHT=
+OS_GTK_WIDGET_REQUISITION_HEIGHT_0=cast=(GtkWidget *)
+
+OS_GTK_WIDGET_REQUISITION_WIDTH=
+OS_GTK_WIDGET_REQUISITION_WIDTH_0=cast=(GtkWidget *)
+
+OS_GTK_WIDGET_SET_HEIGHT=
+OS_GTK_WIDGET_SET_HEIGHT_0=cast=(GtkWidget *)
+OS_GTK_WIDGET_SET_HEIGHT_1=
+
+OS_GTK_WIDGET_SET_WIDTH=
+OS_GTK_WIDGET_SET_WIDTH_0=cast=(GtkWidget *)
+OS_GTK_WIDGET_SET_WIDTH_1=
+
+OS_GTK_WIDGET_SET_X=
+OS_GTK_WIDGET_SET_X_0=cast=(GtkWidget *)
+OS_GTK_WIDGET_SET_X_1=
+
+OS_GTK_WIDGET_SET_Y=
+OS_GTK_WIDGET_SET_Y_0=cast=(GtkWidget *)
+OS_GTK_WIDGET_SET_Y_1=
+
OS_GTK_WIDGET_WIDTH=
OS_GTK_WIDGET_WIDTH_0=cast=(GtkWidget *)
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 d4cf8dfff4..af4858cb23 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
@@ -149,12 +149,36 @@ JNIEXPORT jint JNICALL OS_NATIVE(GTK_1WIDGET_1HEIGHT)
}
#endif
+#ifndef NO_GTK_1WIDGET_1REQUISITION_1HEIGHT
+JNIEXPORT jint JNICALL OS_NATIVE(GTK_1WIDGET_1REQUISITION_1HEIGHT)
+ (JNIEnv *env, jclass that, jint arg0)
+{
+ jint rc = 0;
+ OS_NATIVE_ENTER(env, that, GTK_1WIDGET_1REQUISITION_1HEIGHT_FUNC);
+ rc = (jint)GTK_WIDGET_REQUISITION_HEIGHT((GtkWidget *)arg0);
+ OS_NATIVE_EXIT(env, that, GTK_1WIDGET_1REQUISITION_1HEIGHT_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_GTK_1WIDGET_1REQUISITION_1WIDTH
+JNIEXPORT jint JNICALL OS_NATIVE(GTK_1WIDGET_1REQUISITION_1WIDTH)
+ (JNIEnv *env, jclass that, jint arg0)
+{
+ jint rc = 0;
+ OS_NATIVE_ENTER(env, that, GTK_1WIDGET_1REQUISITION_1WIDTH_FUNC);
+ rc = (jint)GTK_WIDGET_REQUISITION_WIDTH((GtkWidget *)arg0);
+ OS_NATIVE_EXIT(env, that, GTK_1WIDGET_1REQUISITION_1WIDTH_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO_GTK_1WIDGET_1SET_1HEIGHT
JNIEXPORT void JNICALL OS_NATIVE(GTK_1WIDGET_1SET_1HEIGHT)
(JNIEnv *env, jclass that, jint arg0, jint arg1)
{
OS_NATIVE_ENTER(env, that, GTK_1WIDGET_1SET_1HEIGHT_FUNC);
- GTK_WIDGET_SET_HEIGHT(arg0, arg1);
+ GTK_WIDGET_SET_HEIGHT((GtkWidget *)arg0, arg1);
OS_NATIVE_EXIT(env, that, GTK_1WIDGET_1SET_1HEIGHT_FUNC);
}
#endif
@@ -164,7 +188,7 @@ JNIEXPORT void JNICALL OS_NATIVE(GTK_1WIDGET_1SET_1WIDTH)
(JNIEnv *env, jclass that, jint arg0, jint arg1)
{
OS_NATIVE_ENTER(env, that, GTK_1WIDGET_1SET_1WIDTH_FUNC);
- GTK_WIDGET_SET_WIDTH(arg0, arg1);
+ GTK_WIDGET_SET_WIDTH((GtkWidget *)arg0, arg1);
OS_NATIVE_EXIT(env, that, GTK_1WIDGET_1SET_1WIDTH_FUNC);
}
#endif
@@ -174,7 +198,7 @@ JNIEXPORT void JNICALL OS_NATIVE(GTK_1WIDGET_1SET_1X)
(JNIEnv *env, jclass that, jint arg0, jint arg1)
{
OS_NATIVE_ENTER(env, that, GTK_1WIDGET_1SET_1X_FUNC);
- GTK_WIDGET_SET_X(arg0, arg1);
+ GTK_WIDGET_SET_X((GtkWidget *)arg0, arg1);
OS_NATIVE_EXIT(env, that, GTK_1WIDGET_1SET_1X_FUNC);
}
#endif
@@ -184,7 +208,7 @@ JNIEXPORT void JNICALL OS_NATIVE(GTK_1WIDGET_1SET_1Y)
(JNIEnv *env, jclass that, jint arg0, jint arg1)
{
OS_NATIVE_ENTER(env, that, GTK_1WIDGET_1SET_1Y_FUNC);
- GTK_WIDGET_SET_Y(arg0, arg1);
+ GTK_WIDGET_SET_Y((GtkWidget *)arg0, arg1);
OS_NATIVE_EXIT(env, that, GTK_1WIDGET_1SET_1Y_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 480b7ee28c..e47ac3df4f 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
@@ -53,16 +53,18 @@
#define GTK_SCROLLED_WINDOW_SCROLLBAR_SPACING(arg0) (GTK_SCROLLED_WINDOW_GET_CLASS (arg0)->scrollbar_spacing >= 0 ? GTK_SCROLLED_WINDOW_GET_CLASS (arg0)->scrollbar_spacing : 3)
#define GTK_SCROLLED_WINDOW_VSCROLLBAR(arg0) (arg0)->vscrollbar
#define GTK_WIDGET_HEIGHT(arg0) (arg0)->allocation.height
-#define GTK_WIDGET_SET_HEIGHT(arg0, arg1) ((GtkWidget *)arg0)->allocation.height = arg1
+#define GTK_WIDGET_SET_HEIGHT(arg0, arg1) (arg0)->allocation.height = arg1
#define GTK_WIDGET_WIDTH(arg0) (arg0)->allocation.width
-#define GTK_WIDGET_SET_WIDTH(arg0, arg1) ((GtkWidget *)arg0)->allocation.width = arg1
+#define GTK_WIDGET_SET_WIDTH(arg0, arg1) (arg0)->allocation.width = arg1
#define GTK_WIDGET_WINDOW(arg0) (arg0)->window
#define GTK_WIDGET_X(arg0) (arg0)->allocation.x
-#define GTK_WIDGET_SET_X(arg0, arg1) ((GtkWidget *)arg0)->allocation.x = arg1
+#define GTK_WIDGET_SET_X(arg0, arg1) (arg0)->allocation.x = arg1
#define GTK_ENTRY_IM_CONTEXT(arg0) (arg0)->im_context
#define GTK_TEXTVIEW_IM_CONTEXT(arg0) (arg0)->im_context
#define GTK_WIDGET_Y(arg0) ((GtkWidget *)arg0)->allocation.y
-#define GTK_WIDGET_SET_Y(arg0, arg1) ((GtkWidget *)arg0)->allocation.y = arg1
+#define GTK_WIDGET_SET_Y(arg0, arg1) (arg0)->allocation.y = arg1
+#define GTK_WIDGET_REQUISITION_WIDTH(arg0) (arg0)->requisition.width
+#define GTK_WIDGET_REQUISITION_HEIGHT(arg0) (arg0)->requisition.height
#define g_list_data(arg0) (arg0)->data
#define g_slist_data(arg0) (arg0)->data
#define g_list_set_next(arg0, arg1) (arg0)->next = 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 a8f21e097b..75a5779a54 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
@@ -18,8 +18,8 @@
#ifdef NATIVE_STATS
-int OS_nativeFunctionCount = 962;
-int OS_nativeFunctionCallCount[962];
+int OS_nativeFunctionCount = 964;
+int OS_nativeFunctionCallCount[964];
char * OS_nativeFunctionNames[] = {
"Call",
"GDK_1WINDOWING_1X11",
@@ -33,6 +33,8 @@ char * OS_nativeFunctionNames[] = {
"GTK_1SCROLLED_1WINDOW_1VSCROLLBAR",
"GTK_1TEXTVIEW_1IM_1CONTEXT",
"GTK_1WIDGET_1HEIGHT",
+ "GTK_1WIDGET_1REQUISITION_1HEIGHT",
+ "GTK_1WIDGET_1REQUISITION_1WIDTH",
"GTK_1WIDGET_1SET_1HEIGHT",
"GTK_1WIDGET_1SET_1WIDTH",
"GTK_1WIDGET_1SET_1X",
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 e722c712fb..19a36156da 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
@@ -37,6 +37,8 @@ typedef enum {
GTK_1SCROLLED_1WINDOW_1VSCROLLBAR_FUNC,
GTK_1TEXTVIEW_1IM_1CONTEXT_FUNC,
GTK_1WIDGET_1HEIGHT_FUNC,
+ GTK_1WIDGET_1REQUISITION_1HEIGHT_FUNC,
+ GTK_1WIDGET_1REQUISITION_1WIDTH_FUNC,
GTK_1WIDGET_1SET_1HEIGHT_FUNC,
GTK_1WIDGET_1SET_1WIDTH_FUNC,
GTK_1WIDGET_1SET_1X_FUNC,
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 4f1b47f40d..21751e31af 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
@@ -496,6 +496,8 @@ public static final native void GTK_WIDGET_SET_HEIGHT(int /*long*/ widget, int h
public static final native void GTK_WIDGET_SET_WIDTH(int /*long*/ widget, int width);
public static final native void GTK_WIDGET_SET_X(int /*long*/ widget, int x);
public static final native void GTK_WIDGET_SET_Y(int /*long*/ widget, int y);
+public static final native int GTK_WIDGET_REQUISITION_WIDTH(int /*long*/ widget);
+public static final native int GTK_WIDGET_REQUISITION_HEIGHT(int /*long*/ widget);
/** X11 Native methods and constants */
public static final int Above = 0;