Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti2004-09-14 20:36:04 +0000
committerSilenio Quarti2004-09-14 20:36:04 +0000
commit88d75ad2bbe8971f6d86a38530d074943cf76c9b (patch)
tree12d8a2aabc881695c4c1eb91d4a8b48f71325055 /bundles
parentc4a9a7312682b25a6ce13e8bdc5d2382c2ab3ee9 (diff)
downloadeclipse.platform.swt-88d75ad2bbe8971f6d86a38530d074943cf76c9b.tar.gz
eclipse.platform.swt-88d75ad2bbe8971f6d86a38530d074943cf76c9b.tar.xz
eclipse.platform.swt-88d75ad2bbe8971f6d86a38530d074943cf76c9b.zip
73717
Diffstat (limited to 'bundles')
-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.c56
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.c40
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.h12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkBorder.java21
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java9
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java17
9 files changed, 184 insertions, 5 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 42f60312dc..fc9a2cad01 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
@@ -242,6 +242,12 @@ GtkAllocation_y=
GtkAllocation_width=
GtkAllocation_height=
+org_eclipse_swt_internal_gtk_GtkBorder=
+GtkBorder_left=
+GtkBorder_right=
+GtkBorder_top=
+GtkBorder_bottom=
+
org_eclipse_swt_internal_gtk_GtkColorSelectionDialog=
GtkColorSelectionDialog_colorsel=cast=(GtkWidget *)
GtkColorSelectionDialog_ok_button=cast=(GtkWidget *)
@@ -371,6 +377,9 @@ LONG_value=
org_eclipse_swt_internal_gtk_OS=
OS_GDK_DISPLAY=
+OS_GDK_PIXMAP_XID=
+OS_GDK_PIXMAP_XID_0=cast=GdkPixmap *
+
OS_GDK_ROOT_PARENT=
OS_GDK_TYPE_COLOR=flags=const
@@ -515,6 +524,8 @@ OS_GtkAdjustment_sizeof=
OS_GtkAllocation_sizeof=
+OS_GtkBorder_sizeof=
+
OS_GtkColorSelectionDialog_sizeof=
OS_GtkCombo_sizeof=
@@ -1539,6 +1550,12 @@ OS_gdk_window_get_frame_extents=
OS_gdk_window_get_frame_extents_0=cast=(GdkWindow *)
OS_gdk_window_get_frame_extents_1=cast=(GdkRectangle *)
+OS_gdk_window_get_internal_paint_info=
+OS_gdk_window_get_internal_paint_info_0=cast=GdkWindow *
+OS_gdk_window_get_internal_paint_info_1=cast=GdkDrawable **
+OS_gdk_window_get_internal_paint_info_2=cast=gint *
+OS_gdk_window_get_internal_paint_info_3=cast=gint *
+
OS_gdk_window_get_origin=
OS_gdk_window_get_origin_0=cast=(GdkWindow *)
OS_gdk_window_get_origin_1=cast=(gint *)
@@ -3539,6 +3556,11 @@ OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkAdjustment_2I=
OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkAdjustment_2I_0=cast=(void *),flags=no_in
OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkAdjustment_2I_1=cast=(const void *)
+OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkBorder_2II=
+OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkBorder_2II_0=cast=(void *),flags=no_in
+OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkBorder_2II_1=cast=(const void *)
+OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkBorder_2II_2=cast=(size_t)
+
OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkColorSelectionDialog_2I=
OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkColorSelectionDialog_2I_0=cast=(void *),flags=no_in
OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkColorSelectionDialog_2I_1=cast=(const void *)
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 74e27b2700..3b9907fafb 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
@@ -30,6 +30,18 @@ JNIEXPORT jint JNICALL OS_NATIVE(GDK_1DISPLAY)
}
#endif
+#ifndef NO_GDK_1PIXMAP_1XID
+JNIEXPORT jint JNICALL OS_NATIVE(GDK_1PIXMAP_1XID)
+ (JNIEnv *env, jclass that, jint arg0)
+{
+ jint rc;
+ OS_NATIVE_ENTER(env, that, GDK_1PIXMAP_1XID_FUNC);
+ rc = (jint)GDK_PIXMAP_XID((GdkPixmap *)arg0);
+ OS_NATIVE_EXIT(env, that, GDK_1PIXMAP_1XID_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO_GDK_1ROOT_1PARENT
JNIEXPORT jint JNICALL OS_NATIVE(GDK_1ROOT_1PARENT)
(JNIEnv *env, jclass that)
@@ -696,6 +708,18 @@ JNIEXPORT jint JNICALL OS_NATIVE(GtkAllocation_1sizeof)
}
#endif
+#ifndef NO_GtkBorder_1sizeof
+JNIEXPORT jint JNICALL OS_NATIVE(GtkBorder_1sizeof)
+ (JNIEnv *env, jclass that)
+{
+ jint rc;
+ OS_NATIVE_ENTER(env, that, GtkBorder_1sizeof_FUNC);
+ rc = (jint)GtkBorder_sizeof();
+ OS_NATIVE_EXIT(env, that, GtkBorder_1sizeof_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO_GtkColorSelectionDialog_1sizeof
JNIEXPORT jint JNICALL OS_NATIVE(GtkColorSelectionDialog_1sizeof)
(JNIEnv *env, jclass that)
@@ -3837,6 +3861,25 @@ JNIEXPORT void JNICALL OS_NATIVE(gdk_1window_1get_1frame_1extents)
}
#endif
+#ifndef NO_gdk_1window_1get_1internal_1paint_1info
+JNIEXPORT void JNICALL OS_NATIVE(gdk_1window_1get_1internal_1paint_1info)
+ (JNIEnv *env, jclass that, jint arg0, jintArray arg1, jintArray arg2, jintArray arg3)
+{
+ jint *lparg1=NULL;
+ jint *lparg2=NULL;
+ jint *lparg3=NULL;
+ OS_NATIVE_ENTER(env, that, gdk_1window_1get_1internal_1paint_1info_FUNC);
+ if (arg1) lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL);
+ if (arg2) lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL);
+ if (arg3) lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL);
+ gdk_window_get_internal_paint_info((GdkWindow *)arg0, (GdkDrawable **)lparg1, (gint *)lparg2, (gint *)lparg3);
+ if (arg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
+ if (arg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
+ if (arg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
+ OS_NATIVE_EXIT(env, that, gdk_1window_1get_1internal_1paint_1info_FUNC);
+}
+#endif
+
#ifndef NO_gdk_1window_1get_1origin
JNIEXPORT jint JNICALL OS_NATIVE(gdk_1window_1get_1origin)
(JNIEnv *env, jclass that, jint arg0, jintArray arg1, jintArray arg2)
@@ -9737,6 +9780,19 @@ JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_GtkAdjus
}
#endif
+#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_GtkBorder_2II
+JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_GtkBorder_2II)
+ (JNIEnv *env, jclass that, jobject arg0, jint arg1, jint arg2)
+{
+ GtkBorder _arg0, *lparg0=NULL;
+ OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GtkBorder_2II_FUNC);
+ if (arg0) lparg0 = &_arg0;
+ memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
+ if (arg0) setGtkBorderFields(env, arg0, lparg0);
+ OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GtkBorder_2II_FUNC);
+}
+#endif
+
#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_GtkColorSelectionDialog_2I
JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_GtkColorSelectionDialog_2I)
(JNIEnv *env, jclass that, jobject 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 b1a701691e..bbb9518f4a 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,10 +18,11 @@
#ifdef NATIVE_STATS
-int OS_nativeFunctionCount = 882;
-int OS_nativeFunctionCallCount[882];
+int OS_nativeFunctionCount = 886;
+int OS_nativeFunctionCallCount[886];
char * OS_nativeFunctionNames[] = {
"GDK_1DISPLAY",
+ "GDK_1PIXMAP_1XID",
"GDK_1ROOT_1PARENT",
"GDK_1TYPE_1COLOR",
"GDK_1TYPE_1PIXBUF",
@@ -79,6 +80,7 @@ char * OS_nativeFunctionNames[] = {
"GdkWindowAttr_1sizeof",
"GtkAdjustment_1sizeof",
"GtkAllocation_1sizeof",
+ "GtkBorder_1sizeof",
"GtkColorSelectionDialog_1sizeof",
"GtkCombo_1sizeof",
"GtkFileSelection_1sizeof",
@@ -310,6 +312,7 @@ char * OS_nativeFunctionNames[] = {
"gdk_1window_1get_1children",
"gdk_1window_1get_1events",
"gdk_1window_1get_1frame_1extents",
+ "gdk_1window_1get_1internal_1paint_1info",
"gdk_1window_1get_1origin",
"gdk_1window_1get_1parent",
"gdk_1window_1get_1pointer",
@@ -803,6 +806,7 @@ char * OS_nativeFunctionNames[] = {
"memmove__Lorg_eclipse_swt_internal_gtk_GdkRectangle_2II",
"memmove__Lorg_eclipse_swt_internal_gtk_GdkVisual_2I",
"memmove__Lorg_eclipse_swt_internal_gtk_GtkAdjustment_2I",
+ "memmove__Lorg_eclipse_swt_internal_gtk_GtkBorder_2II",
"memmove__Lorg_eclipse_swt_internal_gtk_GtkColorSelectionDialog_2I",
"memmove__Lorg_eclipse_swt_internal_gtk_GtkCombo_2I",
"memmove__Lorg_eclipse_swt_internal_gtk_GtkFileSelection_2I",
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 629ae978e1..e7e4ee77b4 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
@@ -25,6 +25,7 @@ char* OS_nativeFunctionNames[];
typedef enum {
GDK_1DISPLAY_FUNC,
+ GDK_1PIXMAP_1XID_FUNC,
GDK_1ROOT_1PARENT_FUNC,
GDK_1TYPE_1COLOR_FUNC,
GDK_1TYPE_1PIXBUF_FUNC,
@@ -82,6 +83,7 @@ typedef enum {
GdkWindowAttr_1sizeof_FUNC,
GtkAdjustment_1sizeof_FUNC,
GtkAllocation_1sizeof_FUNC,
+ GtkBorder_1sizeof_FUNC,
GtkColorSelectionDialog_1sizeof_FUNC,
GtkCombo_1sizeof_FUNC,
GtkFileSelection_1sizeof_FUNC,
@@ -313,6 +315,7 @@ typedef enum {
gdk_1window_1get_1children_FUNC,
gdk_1window_1get_1events_FUNC,
gdk_1window_1get_1frame_1extents_FUNC,
+ gdk_1window_1get_1internal_1paint_1info_FUNC,
gdk_1window_1get_1origin_FUNC,
gdk_1window_1get_1parent_FUNC,
gdk_1window_1get_1pointer_FUNC,
@@ -806,6 +809,7 @@ typedef enum {
memmove__Lorg_eclipse_swt_internal_gtk_GdkRectangle_2II_FUNC,
memmove__Lorg_eclipse_swt_internal_gtk_GdkVisual_2I_FUNC,
memmove__Lorg_eclipse_swt_internal_gtk_GtkAdjustment_2I_FUNC,
+ memmove__Lorg_eclipse_swt_internal_gtk_GtkBorder_2II_FUNC,
memmove__Lorg_eclipse_swt_internal_gtk_GtkColorSelectionDialog_2I_FUNC,
memmove__Lorg_eclipse_swt_internal_gtk_GtkCombo_2I_FUNC,
memmove__Lorg_eclipse_swt_internal_gtk_GtkFileSelection_2I_FUNC,
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.c
index 944aff2836..baedf4ac99 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.c
@@ -1248,6 +1248,46 @@ void setGtkAllocationFields(JNIEnv *env, jobject lpObject, GtkAllocation *lpStru
}
#endif
+#ifndef NO_GtkBorder
+typedef struct GtkBorder_FID_CACHE {
+ int cached;
+ jclass clazz;
+ jfieldID left, right, top, bottom;
+} GtkBorder_FID_CACHE;
+
+GtkBorder_FID_CACHE GtkBorderFc;
+
+void cacheGtkBorderFields(JNIEnv *env, jobject lpObject)
+{
+ if (GtkBorderFc.cached) return;
+ GtkBorderFc.clazz = (*env)->GetObjectClass(env, lpObject);
+ GtkBorderFc.left = (*env)->GetFieldID(env, GtkBorderFc.clazz, "left", "I");
+ GtkBorderFc.right = (*env)->GetFieldID(env, GtkBorderFc.clazz, "right", "I");
+ GtkBorderFc.top = (*env)->GetFieldID(env, GtkBorderFc.clazz, "top", "I");
+ GtkBorderFc.bottom = (*env)->GetFieldID(env, GtkBorderFc.clazz, "bottom", "I");
+ GtkBorderFc.cached = 1;
+}
+
+GtkBorder *getGtkBorderFields(JNIEnv *env, jobject lpObject, GtkBorder *lpStruct)
+{
+ if (!GtkBorderFc.cached) cacheGtkBorderFields(env, lpObject);
+ lpStruct->left = (*env)->GetIntField(env, lpObject, GtkBorderFc.left);
+ lpStruct->right = (*env)->GetIntField(env, lpObject, GtkBorderFc.right);
+ lpStruct->top = (*env)->GetIntField(env, lpObject, GtkBorderFc.top);
+ lpStruct->bottom = (*env)->GetIntField(env, lpObject, GtkBorderFc.bottom);
+ return lpStruct;
+}
+
+void setGtkBorderFields(JNIEnv *env, jobject lpObject, GtkBorder *lpStruct)
+{
+ if (!GtkBorderFc.cached) cacheGtkBorderFields(env, lpObject);
+ (*env)->SetIntField(env, lpObject, GtkBorderFc.left, (jint)lpStruct->left);
+ (*env)->SetIntField(env, lpObject, GtkBorderFc.right, (jint)lpStruct->right);
+ (*env)->SetIntField(env, lpObject, GtkBorderFc.top, (jint)lpStruct->top);
+ (*env)->SetIntField(env, lpObject, GtkBorderFc.bottom, (jint)lpStruct->bottom);
+}
+#endif
+
#ifndef NO_GtkColorSelectionDialog
typedef struct GtkColorSelectionDialog_FID_CACHE {
int cached;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.h
index 7993e53d3a..eab701d372 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.h
@@ -291,6 +291,18 @@ void setGtkAllocationFields(JNIEnv *env, jobject lpObject, GtkAllocation *lpStru
#define GtkAllocation_sizeof() 0
#endif
+#ifndef NO_GtkBorder
+void cacheGtkBorderFields(JNIEnv *env, jobject lpObject);
+GtkBorder *getGtkBorderFields(JNIEnv *env, jobject lpObject, GtkBorder *lpStruct);
+void setGtkBorderFields(JNIEnv *env, jobject lpObject, GtkBorder *lpStruct);
+#define GtkBorder_sizeof() sizeof(GtkBorder)
+#else
+#define cacheGtkBorderFields(a,b)
+#define getGtkBorderFields(a,b,c) NULL
+#define setGtkBorderFields(a,b,c)
+#define GtkBorder_sizeof() 0
+#endif
+
#ifndef NO_GtkColorSelectionDialog
void cacheGtkColorSelectionDialogFields(JNIEnv *env, jobject lpObject);
GtkColorSelectionDialog *getGtkColorSelectionDialogFields(JNIEnv *env, jobject lpObject, GtkColorSelectionDialog *lpStruct);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkBorder.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkBorder.java
new file mode 100644
index 0000000000..c9ec0b4dc9
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkBorder.java
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others. All rights reserved.
+ * The contents of this file are made available under the terms
+ * of the GNU Lesser General Public License (LGPL) Version 2.1 that
+ * accompanies this distribution (lgpl-v21.txt). The LGPL is also
+ * available at http://www.gnu.org/licenses/lgpl.html. If the version
+ * of the LGPL at http://www.gnu.org is different to the version of
+ * the LGPL accompanying this distribution and there is any conflict
+ * between the two license versions, the terms of the LGPL accompanying
+ * this distribution shall govern.
+ *******************************************************************************/
+package org.eclipse.swt.internal.gtk;
+
+
+public class GtkBorder {
+ public int left;
+ public int right;
+ public int top;
+ public int bottom;
+ public static final int sizeof = OS.GtkBorder_sizeof();
+}
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 df258dca14..8991c58a3e 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
@@ -369,6 +369,7 @@ public class OS {
public static final byte[] pixbuf = signal("pixbuf");
public static final byte[] text = signal("text");
public static final byte[] xalign = signal("xalign");
+ public static final byte[] default_border = signal("default_border");
protected static byte [] signal (String name) {
int length = name.length ();
@@ -406,6 +407,7 @@ public static final synchronized native int GdkVisual_sizeof();
public static final synchronized native int GdkWindowAttr_sizeof();
public static final synchronized native int GtkAdjustment_sizeof();
public static final synchronized native int GtkAllocation_sizeof();
+public static final synchronized native int GtkBorder_sizeof();
public static final synchronized native int GtkColorSelectionDialog_sizeof();
public static final synchronized native int GtkCombo_sizeof();
public static final synchronized native int GtkFileSelection_sizeof();
@@ -470,6 +472,7 @@ public static final int VisibilityFullyObscured = 2;
public static final int VisibilityNotify = 15;
public static final int SYSTEM_TRAY_REQUEST_DOCK = 0;
public static final native boolean GDK_WINDOWING_X11();
+public static final native int /*long*/ GDK_PIXMAP_XID(int /*long*/ pixmap);
public static final synchronized native boolean XCheckMaskEvent(int /*long*/ display, int /*long*/ event_mask, int /*long*/ event_return);
public static final synchronized native boolean XCheckWindowEvent(int /*long*/ display, int /*long*/ window, int /*long*/ event_mask, int /*long*/ event_return);
public static final synchronized native boolean XCheckIfEvent(int /*long*/ display, int /*long*/ event_return, int /*long*/ predicate, int /*long*/ arg);
@@ -489,7 +492,7 @@ public static final synchronized native void XTestFakeButtonEvent(int /*long*/ d
public static final synchronized native void XTestFakeKeyEvent(int /*long*/ display, int keycode, boolean is_press, int /*long*/ delay);
public static final synchronized native void XTestFakeMotionEvent(int /*long*/ display, int screen_number, int x, int y, int /*long*/ delay);
public static final synchronized native int XWarpPointer(int /*long*/ display, int /*long*/ sourceWindow, int /*long*/ destWindow, int sourceX, int sourceY, int sourceWidth, int sourceHeight, int destX, int destY);
-public static final synchronized native int /*long*/gdk_x11_atom_to_xatom(int /*long*/ atom);
+public static final synchronized native int /*long*/ gdk_x11_atom_to_xatom(int /*long*/ atom);
public static final synchronized native int /*long*/ gdk_x11_drawable_get_xdisplay(int /*long*/ drawable);
public static final synchronized native int /*long*/ gdk_x11_drawable_get_xid(int /*long*/ drawable);
public static final synchronized native int /*long*/ gdk_pixmap_foreign_new(int /*long*/ anid);
@@ -712,6 +715,7 @@ public static final synchronized native int gdk_window_get_events(int /*long*/ w
public static final synchronized native void gdk_window_focus(int /*long*/ window, int timestamp);
public static final synchronized native void gdk_window_freeze_updates(int /*long*/ window);
public static final synchronized native void gdk_window_get_frame_extents(int /*long*/ window, GdkRectangle rect);
+public static final synchronized native void gdk_window_get_internal_paint_info(int /*long*/ window, int /*long*/ [] real_drawable, int[] x_offset, int[] y_offset);
public static final synchronized native int gdk_window_get_origin(int /*long*/ window, int[] x, int[] y);
public static final synchronized native int /*long*/ gdk_window_get_parent(int /*long*/ window);
public static final synchronized native int /*long*/ gdk_window_get_pointer(int /*long*/ window, int[] x, int[] y, int[] mask);
@@ -1187,6 +1191,7 @@ public static final native void memmove(GtkWidgetClass dest, int /*long*/ src);
public static final native void memmove(GtkTargetPair dest, int /*long*/ src, int /*long*/ size);
public static final native void memmove(GtkCombo dest, int /*long*/ src);
public static final native void memmove(GtkAdjustment dest, int /*long*/ src);
+public static final native void memmove(GtkBorder dest, int /*long*/ src, int /*long*/ size);
public static final native void memmove(GdkColor dest, int /*long*/ src, int /*long*/ size);
public static final native void memmove(GdkEvent dest, int /*long*/ src, int /*long*/ size);
public static final native void memmove(GdkEventButton dest, int /*long*/ src, int /*long*/ size);
@@ -1247,7 +1252,7 @@ public static final synchronized native void pango_font_description_set_style(in
public static final synchronized native void pango_font_description_set_weight(int /*long*/ desc, int weight);
public static final synchronized native int /*long*/ pango_font_description_to_string(int /*long*/ desc);
public static final synchronized native int /*long*/ pango_font_face_describe(int /*long*/ face);
-public static final synchronized native int /*long*/ pango_font_family_get_name (int /*long*/ family);
+public static final synchronized native int /*long*/ pango_font_family_get_name(int /*long*/ family);
public static final synchronized native void pango_font_family_list_faces(int /*long*/ family, int /*long*/[] faces, int[] n_faces);
public static final synchronized native int /*long*/ pango_font_get_metrics(int /*long*/ font, int /*long*/ language);
public static final synchronized native int pango_font_metrics_get_approximate_char_width(int /*long*/ metrics);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java
index 430cc3cc96..a1b45faf03 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java
@@ -145,7 +145,22 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
OS.gtk_widget_set_size_request (handle, width, height);
width = wHint == SWT.DEFAULT ? requisition.width : wHint;
height = hHint == SWT.DEFAULT ? requisition.height : hHint;
- return new Point (width, height);
+ if (wHint != SWT.DEFAULT || hHint != SWT.DEFAULT) {
+ if ((OS.GTK_WIDGET_FLAGS (handle) & OS.GTK_CAN_DEFAULT) != 0) {
+ int /*long*/ [] buffer = new int /*long*/ [1];
+ GtkBorder border = new GtkBorder ();
+ OS.gtk_widget_style_get (handle, OS.default_border, buffer, 0);
+ if (buffer[0] != 0) {
+ OS.memmove (border, buffer[0], GtkBorder.sizeof);
+ } else {
+ /* Use the GTK+ default value of 1 for each. */
+ border.left = border.right = border.top = border.bottom = 1;
+ }
+ if (wHint != SWT.DEFAULT) width += border.left + border.right;
+ if (hHint != SWT.DEFAULT) height += border.top + border.bottom;
+ }
+ }
+ return new Point (width, height);
}
void createHandle (int index) {

Back to the top