diff options
author | aspektor <aspektor@redhat.com> | 2012-09-14 12:51:03 -0400 |
---|---|---|
committer | aspektor <aspektor@redhat.com> | 2012-09-14 12:51:03 -0400 |
commit | 581453749640c1d130107d787c034295f9ba07ba (patch) | |
tree | 6fb010e26dfd0c666ab270b61e726c74622fc4f3 | |
parent | eda05e5e1bfd7a8e6860cccbab7bfcd105765ca8 (diff) | |
parent | e146916783f37aa41636cc83669e5f610cf7343a (diff) | |
download | eclipse.platform.swt-581453749640c1d130107d787c034295f9ba07ba.tar.gz eclipse.platform.swt-581453749640c1d130107d787c034295f9ba07ba.tar.xz eclipse.platform.swt-581453749640c1d130107d787c034295f9ba07ba.zip |
Merge branch 'master' of http://git.eclipse.org/gitroot/platform/eclipse.platform.swt.git
44 files changed, 659 insertions, 279 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/MozillaDelegate.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/MozillaDelegate.java index 3a92ce31f8..07a2a65866 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/MozillaDelegate.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/MozillaDelegate.java @@ -122,25 +122,26 @@ static void loadAdditionalLibraries (String mozillaPath) { String libName = "libswt-xulrunner-fix.so"; //$NON-NLS-1$ File libsDir = new File (getProfilePath () + "/libs/" + Mozilla.OS() + '/' + Mozilla.Arch ()); //$NON-NLS-1$ File file = new File (libsDir, libName); - java.io.InputStream is = Library.class.getResourceAsStream ('/' + libName); - if (is != null) { - if (!libsDir.exists ()) { - libsDir.mkdirs (); - } - int read; - byte [] buffer = new byte [4096]; - try { - FileOutputStream os = new FileOutputStream (file); - while ((read = is.read (buffer)) != -1) { - os.write(buffer, 0, read); + if (!file.exists()) { + java.io.InputStream is = Library.class.getResourceAsStream ('/' + libName); + if (is != null) { + if (!libsDir.exists ()) { + libsDir.mkdirs (); + } + int read; + byte [] buffer = new byte [4096]; + try { + FileOutputStream os = new FileOutputStream (file); + while ((read = is.read (buffer)) != -1) { + os.write(buffer, 0, read); + } + os.close (); + is.close (); + } catch (FileNotFoundException e) { + } catch (IOException e) { } - os.close (); - is.close (); - } catch (FileNotFoundException e) { - } catch (IOException e) { } } - if (file.exists ()) { byte[] bytes = Converter.wcsToMbcs (null, file.getAbsolutePath (), true); OS.dlopen (bytes, OS.RTLD_NOW | OS.RTLD_GLOBAL); @@ -177,7 +178,12 @@ int /*long*/ getHandle () { * causing the child of the GtkFixed handle to be resized to 1. * The workaround is to embed Mozilla into a GtkHBox handle. */ - embedHandle = OS.gtk_hbox_new (false, 0); + if (OS.GTK_VERSION >= OS.VERSION (3, 0, 0)) { + embedHandle = OS.gtk_box_new (OS.GTK_ORIENTATION_HORIZONTAL, 0); + OS.gtk_box_set_homogeneous (embedHandle, false); + } else { + embedHandle = OS.gtk_hbox_new (false, 0); + } OS.gtk_container_add (browser.handle, embedHandle); OS.gtk_widget_show (embedHandle); return embedHandle; diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras index 2038c03f8a..3372577a18 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras @@ -3992,6 +3992,9 @@ <method selector="mouseDownCanMoveWindow" swt_gen="true"> <retval swt_gen="true"></retval> </method> + <method selector="needsPanelToBecomeKey" swt_gen="true"> + <retval swt_gen="true"></retval> + </method> <method selector="registerForDraggedTypes:" swt_gen="true"> <arg swt_gen="true"></arg> <retval swt_gen="true"></retval> @@ -4683,6 +4686,7 @@ <enum name="NSAlphaFirstBitmapFormat" swt_gen="true"></enum> <enum name="NSAlphaNonpremultipliedBitmapFormat" swt_gen="true"></enum> <enum name="NSAlternateKeyMask" swt_gen="true"></enum> + <enum name="NSAppKitDefined" swt_gen="true"></enum> <enum name="NSApplicationDefined" swt_gen="true"></enum> <enum name="NSApplicationDelegateReplySuccess" swt_gen="true"></enum> <enum name="NSAtTop" swt_gen="true"></enum> diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSView.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSView.java index fd70c7f9bb..7bfb67fc9f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSView.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSView.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2011 IBM Corporation and others. + * Copyright (c) 2000, 2012 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -211,6 +211,10 @@ public boolean mouseDownCanMoveWindow() { return OS.objc_msgSend_bool(this.id, OS.sel_mouseDownCanMoveWindow); } +public boolean needsPanelToBecomeKey() { + return OS.objc_msgSend_bool(this.id, OS.sel_needsPanelToBecomeKey); +} + public void registerForDraggedTypes(NSArray newTypes) { OS.objc_msgSend(this.id, OS.sel_registerForDraggedTypes_, newTypes != null ? newTypes.id : 0); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java index 85c7e05db6..80daea4f87 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java @@ -150,12 +150,11 @@ public class OS extends C { public static final int /*long*/ sel_frameSizeForContentSize_horizontalScrollerClass_verticalScrollerClass_borderType_controlSize_scrollerStyle_ = sel_registerName("frameSizeForContentSize:horizontalScrollerClass:verticalScrollerClass:borderType:controlSize:scrollerStyle:"); public static final int /*long*/ sel_scrollerStyle = sel_registerName("scrollerStyle"); public static final int /*long*/ sel_toggleFullScreen_ = sel_registerName("toggleFullScreen:"); - public static final int /*long*/ sel_windowDidEnterFullScreen_ = sel_registerName("windowDidEnterFullScreen:"); - public static final int /*long*/ sel_windowDidExitFullScreen_ = sel_registerName("windowDidExitFullScreen:"); public static final int NSScrollerStyleLegacy = 0; public static final int NSScrollerStyleOverlay = 1; public static final int NSWindowFullScreenButton = 7; + public static final int NSFullScreenWindowMask = 1 << 14; public static final int NSWindowCollectionBehaviorFullScreenPrimary = 1 << 7; public static final int NSWindowCollectionBehaviorFullScreenAuxiliary = 1 << 8; @@ -1551,6 +1550,7 @@ public static final int /*long*/ sel_moveUp_ = sel_registerName("moveUp:"); public static final int /*long*/ sel_mutableCopy = sel_registerName("mutableCopy"); public static final int /*long*/ sel_mutableString = sel_registerName("mutableString"); public static final int /*long*/ sel_name = sel_registerName("name"); +public static final int /*long*/ sel_needsPanelToBecomeKey = sel_registerName("needsPanelToBecomeKey"); public static final int /*long*/ sel_nextEventMatchingMask_untilDate_inMode_dequeue_ = sel_registerName("nextEventMatchingMask:untilDate:inMode:dequeue:"); public static final int /*long*/ sel_nextObject = sel_registerName("nextObject"); public static final int /*long*/ sel_nextState = sel_registerName("nextState"); @@ -2289,6 +2289,7 @@ public static final int NSAlertThirdButtonReturn = 1002; public static final int NSAlphaFirstBitmapFormat = 1; public static final int NSAlphaNonpremultipliedBitmapFormat = 2; public static final int NSAlternateKeyMask = 524288; +public static final int NSAppKitDefined = 13; public static final int NSApplicationDefined = 15; public static final int NSApplicationDelegateReplySuccess = 0; public static final int NSAtTop = 2; diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/common_j2me/org/eclipse/swt/internal/Library.java b/bundles/org.eclipse.swt/Eclipse SWT PI/common_j2me/org/eclipse/swt/internal/Library.java index b73a359626..f92df972a9 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/common_j2me/org/eclipse/swt/internal/Library.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/common_j2me/org/eclipse/swt/internal/Library.java @@ -26,7 +26,7 @@ public class Library { /** * SWT Minor version number (must be in the range 0..999) */ - static int MINOR_VERSION = 303; + static int MINOR_VERSION = 304; /** * SWT revision number (must be >= 0) diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/common_j2se/org/eclipse/swt/internal/Library.java b/bundles/org.eclipse.swt/Eclipse SWT PI/common_j2se/org/eclipse/swt/internal/Library.java index a60452838e..41e01dbe80 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/common_j2se/org/eclipse/swt/internal/Library.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/common_j2se/org/eclipse/swt/internal/Library.java @@ -26,7 +26,7 @@ public class Library { /** * SWT Minor version number (must be in the range 0..999) */ - static int MINOR_VERSION = 303; + static int MINOR_VERSION = 304; /** * SWT revision number (must be >= 0) 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 90c1ebac16..e2b6d7546d 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 @@ -7471,6 +7471,26 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1border_1free) } #endif +#ifndef NO__1gtk_1box_1new +JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1box_1new) + (JNIEnv *env, jclass that, jint arg0, jint arg1) +{ + jintLong rc = 0; + OS_NATIVE_ENTER(env, that, _1gtk_1box_1new_FUNC); +/* + rc = (jintLong)gtk_box_new((GtkOrientation)arg0, arg1); +*/ + { + OS_LOAD_FUNCTION(fp, gtk_box_new) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GtkOrientation, jint))fp)((GtkOrientation)arg0, arg1); + } + } + OS_NATIVE_EXIT(env, that, _1gtk_1box_1new_FUNC); + return rc; +} +#endif + #ifndef NO__1gtk_1box_1set_1child_1packing JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1box_1set_1child_1packing) (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jboolean arg2, jboolean arg3, jint arg4, jint arg5) @@ -7481,6 +7501,24 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1box_1set_1child_1packing) } #endif +#ifndef NO__1gtk_1box_1set_1homogeneous +JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1box_1set_1homogeneous) + (JNIEnv *env, jclass that, jintLong arg0, jboolean arg1) +{ + OS_NATIVE_ENTER(env, that, _1gtk_1box_1set_1homogeneous_FUNC); +/* + gtk_box_set_homogeneous((GtkBox *)arg0, arg1); +*/ + { + OS_LOAD_FUNCTION(fp, gtk_box_set_homogeneous) + if (fp) { + ((void (CALLING_CONVENTION*)(GtkBox *, jboolean))fp)((GtkBox *)arg0, arg1); + } + } + OS_NATIVE_EXIT(env, that, _1gtk_1box_1set_1homogeneous_FUNC); +} +#endif + #ifndef NO__1gtk_1box_1set_1spacing JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1box_1set_1spacing) (JNIEnv *env, jclass that, jintLong arg0, jint arg1) @@ -9457,7 +9495,15 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1hbox_1new) { jintLong rc = 0; OS_NATIVE_ENTER(env, that, _1gtk_1hbox_1new_FUNC); +/* rc = (jintLong)gtk_hbox_new((gboolean)arg0, (gint)arg1); +*/ + { + OS_LOAD_FUNCTION(fp, gtk_hbox_new) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(gboolean, gint))fp)((gboolean)arg0, (gint)arg1); + } + } OS_NATIVE_EXIT(env, that, _1gtk_1hbox_1new_FUNC); return rc; } @@ -9469,7 +9515,15 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1hscale_1new) { jintLong rc = 0; OS_NATIVE_ENTER(env, that, _1gtk_1hscale_1new_FUNC); +/* rc = (jintLong)gtk_hscale_new((GtkAdjustment *)arg0); +*/ + { + OS_LOAD_FUNCTION(fp, gtk_hscale_new) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GtkAdjustment *))fp)((GtkAdjustment *)arg0); + } + } OS_NATIVE_EXIT(env, that, _1gtk_1hscale_1new_FUNC); return rc; } @@ -9481,7 +9535,15 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1hscrollbar_1new) { jintLong rc = 0; OS_NATIVE_ENTER(env, that, _1gtk_1hscrollbar_1new_FUNC); +/* rc = (jintLong)gtk_hscrollbar_new((GtkAdjustment *)arg0); +*/ + { + OS_LOAD_FUNCTION(fp, gtk_hscrollbar_new) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GtkAdjustment *))fp)((GtkAdjustment *)arg0); + } + } OS_NATIVE_EXIT(env, that, _1gtk_1hscrollbar_1new_FUNC); return rc; } @@ -10059,60 +10121,60 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1remove) } #endif -#if (!defined(NO__1gtk_1list_1store_1set__IIIII) && !defined(JNI64)) || (!defined(NO__1gtk_1list_1store_1set__JJIIJ) && defined(JNI64)) +#if (!defined(NO__1gtk_1list_1store_1set__IIIII) && !defined(JNI64)) || (!defined(NO__1gtk_1list_1store_1set__JJIII) && defined(JNI64)) #ifndef JNI64 -JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__IIIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jintLong arg4) +JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__IIIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jint arg4) #else -JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__JJIIJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jintLong arg4) +JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__JJIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jint arg4) #endif { #ifndef JNI64 OS_NATIVE_ENTER(env, that, _1gtk_1list_1store_1set__IIIII_FUNC); #else - OS_NATIVE_ENTER(env, that, _1gtk_1list_1store_1set__JJIIJ_FUNC); + OS_NATIVE_ENTER(env, that, _1gtk_1list_1store_1set__JJIII_FUNC); #endif gtk_list_store_set((GtkListStore *)arg0, (GtkTreeIter *)arg1, arg2, arg3, arg4); #ifndef JNI64 OS_NATIVE_EXIT(env, that, _1gtk_1list_1store_1set__IIIII_FUNC); #else - OS_NATIVE_EXIT(env, that, _1gtk_1list_1store_1set__JJIIJ_FUNC); + OS_NATIVE_EXIT(env, that, _1gtk_1list_1store_1set__JJIII_FUNC); #endif } #endif -#if (!defined(NO__1gtk_1list_1store_1set__IIIJI) && !defined(JNI64)) || (!defined(NO__1gtk_1list_1store_1set__JJIJJ) && defined(JNI64)) +#if (!defined(NO__1gtk_1list_1store_1set__IIIJI) && !defined(JNI64)) || (!defined(NO__1gtk_1list_1store_1set__JJIJI) && defined(JNI64)) #ifndef JNI64 -JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__IIIJI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jlong arg3, jintLong arg4) +JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__IIIJI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jlong arg3, jint arg4) #else -JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__JJIJJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jlong arg3, jintLong arg4) +JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__JJIJI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jlong arg3, jint arg4) #endif { #ifndef JNI64 OS_NATIVE_ENTER(env, that, _1gtk_1list_1store_1set__IIIJI_FUNC); #else - OS_NATIVE_ENTER(env, that, _1gtk_1list_1store_1set__JJIJJ_FUNC); + OS_NATIVE_ENTER(env, that, _1gtk_1list_1store_1set__JJIJI_FUNC); #endif gtk_list_store_set((GtkListStore *)arg0, (GtkTreeIter *)arg1, arg2, arg3, arg4); #ifndef JNI64 OS_NATIVE_EXIT(env, that, _1gtk_1list_1store_1set__IIIJI_FUNC); #else - OS_NATIVE_EXIT(env, that, _1gtk_1list_1store_1set__JJIJJ_FUNC); + OS_NATIVE_EXIT(env, that, _1gtk_1list_1store_1set__JJIJI_FUNC); #endif } #endif -#if (!defined(NO__1gtk_1list_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I) && !defined(JNI64)) || (!defined(NO__1gtk_1list_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2J) && defined(JNI64)) +#if (!defined(NO__1gtk_1list_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I) && !defined(JNI64)) || (!defined(NO__1gtk_1list_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2I) && defined(JNI64)) #ifndef JNI64 -JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jobject arg3, jintLong arg4) +JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jobject arg3, jint arg4) #else -JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2J)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jobject arg3, jintLong arg4) +JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2I)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jobject arg3, jint arg4) #endif { GdkColor _arg3, *lparg3=NULL; #ifndef JNI64 OS_NATIVE_ENTER(env, that, _1gtk_1list_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I_FUNC); #else - OS_NATIVE_ENTER(env, that, _1gtk_1list_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2J_FUNC); + OS_NATIVE_ENTER(env, that, _1gtk_1list_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2I_FUNC); #endif if (arg3) if ((lparg3 = getGdkColorFields(env, arg3, &_arg3)) == NULL) goto fail; gtk_list_store_set((GtkListStore *)arg0, (GtkTreeIter *)arg1, arg2, lparg3, arg4); @@ -10120,44 +10182,44 @@ fail: #ifndef JNI64 OS_NATIVE_EXIT(env, that, _1gtk_1list_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I_FUNC); #else - OS_NATIVE_EXIT(env, that, _1gtk_1list_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2J_FUNC); + OS_NATIVE_EXIT(env, that, _1gtk_1list_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2I_FUNC); #endif } #endif -#if (!defined(NO__1gtk_1list_1store_1set__IIIZI) && !defined(JNI64)) || (!defined(NO__1gtk_1list_1store_1set__JJIZJ) && defined(JNI64)) +#if (!defined(NO__1gtk_1list_1store_1set__IIIZI) && !defined(JNI64)) || (!defined(NO__1gtk_1list_1store_1set__JJIZI) && defined(JNI64)) #ifndef JNI64 -JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__IIIZI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jboolean arg3, jintLong arg4) +JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__IIIZI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jboolean arg3, jint arg4) #else -JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__JJIZJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jboolean arg3, jintLong arg4) +JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__JJIZI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jboolean arg3, jint arg4) #endif { #ifndef JNI64 OS_NATIVE_ENTER(env, that, _1gtk_1list_1store_1set__IIIZI_FUNC); #else - OS_NATIVE_ENTER(env, that, _1gtk_1list_1store_1set__JJIZJ_FUNC); + OS_NATIVE_ENTER(env, that, _1gtk_1list_1store_1set__JJIZI_FUNC); #endif gtk_list_store_set((GtkListStore *)arg0, (GtkTreeIter *)arg1, arg2, arg3, arg4); #ifndef JNI64 OS_NATIVE_EXIT(env, that, _1gtk_1list_1store_1set__IIIZI_FUNC); #else - OS_NATIVE_EXIT(env, that, _1gtk_1list_1store_1set__JJIZJ_FUNC); + OS_NATIVE_EXIT(env, that, _1gtk_1list_1store_1set__JJIZI_FUNC); #endif } #endif -#if (!defined(NO__1gtk_1list_1store_1set__III_3BI) && !defined(JNI64)) || (!defined(NO__1gtk_1list_1store_1set__JJI_3BJ) && defined(JNI64)) +#if (!defined(NO__1gtk_1list_1store_1set__III_3BI) && !defined(JNI64)) || (!defined(NO__1gtk_1list_1store_1set__JJI_3BI) && defined(JNI64)) #ifndef JNI64 -JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__III_3BI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jbyteArray arg3, jintLong arg4) +JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__III_3BI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jbyteArray arg3, jint arg4) #else -JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__JJI_3BJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jbyteArray arg3, jintLong arg4) +JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__JJI_3BI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jbyteArray arg3, jint arg4) #endif { jbyte *lparg3=NULL; #ifndef JNI64 OS_NATIVE_ENTER(env, that, _1gtk_1list_1store_1set__III_3BI_FUNC); #else - OS_NATIVE_ENTER(env, that, _1gtk_1list_1store_1set__JJI_3BJ_FUNC); + OS_NATIVE_ENTER(env, that, _1gtk_1list_1store_1set__JJI_3BI_FUNC); #endif if (arg3) if ((lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL)) == NULL) goto fail; gtk_list_store_set((GtkListStore *)arg0, (GtkTreeIter *)arg1, arg2, lparg3, arg4); @@ -10166,7 +10228,7 @@ fail: #ifndef JNI64 OS_NATIVE_EXIT(env, that, _1gtk_1list_1store_1set__III_3BI_FUNC); #else - OS_NATIVE_EXIT(env, that, _1gtk_1list_1store_1set__JJI_3BJ_FUNC); + OS_NATIVE_EXIT(env, that, _1gtk_1list_1store_1set__JJI_3BI_FUNC); #endif } #endif @@ -12317,6 +12379,26 @@ fail: } #endif +#ifndef NO__1gtk_1scale_1new +JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1scale_1new) + (JNIEnv *env, jclass that, jint arg0, jintLong arg1) +{ + jintLong rc = 0; + OS_NATIVE_ENTER(env, that, _1gtk_1scale_1new_FUNC); +/* + rc = (jintLong)gtk_scale_new((GtkOrientation)arg0, (GtkAdjustment *)arg1); +*/ + { + OS_LOAD_FUNCTION(fp, gtk_scale_new) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GtkOrientation, GtkAdjustment *))fp)((GtkOrientation)arg0, (GtkAdjustment *)arg1); + } + } + OS_NATIVE_EXIT(env, that, _1gtk_1scale_1new_FUNC); + return rc; +} +#endif + #ifndef NO__1gtk_1scale_1set_1digits JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1scale_1set_1digits) (JNIEnv *env, jclass that, jintLong arg0, jint arg1) @@ -12337,6 +12419,26 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1scale_1set_1draw_1value) } #endif +#ifndef NO__1gtk_1scrollbar_1new +JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1scrollbar_1new) + (JNIEnv *env, jclass that, jint arg0, jintLong arg1) +{ + jintLong rc = 0; + OS_NATIVE_ENTER(env, that, _1gtk_1scrollbar_1new_FUNC); +/* + rc = (jintLong)gtk_scrollbar_new((GtkOrientation)arg0, (GtkAdjustment *)arg1); +*/ + { + OS_LOAD_FUNCTION(fp, gtk_scrollbar_new) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GtkOrientation, GtkAdjustment *))fp)((GtkOrientation)arg0, (GtkAdjustment *)arg1); + } + } + OS_NATIVE_EXIT(env, that, _1gtk_1scrollbar_1new_FUNC); + return rc; +} +#endif + #ifndef NO__1gtk_1scrolled_1window_1add_1with_1viewport JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1scrolled_1window_1add_1with_1viewport) (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1) @@ -14047,18 +14149,18 @@ fail: } #endif -#if (!defined(NO__1gtk_1tree_1model_1get__III_3II) && !defined(JNI64)) || (!defined(NO__1gtk_1tree_1model_1get__JJI_3IJ) && defined(JNI64)) +#if (!defined(NO__1gtk_1tree_1model_1get__III_3II) && !defined(JNI64)) || (!defined(NO__1gtk_1tree_1model_1get__JJI_3II) && defined(JNI64)) #ifndef JNI64 -JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1model_1get__III_3II)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintArray arg3, jintLong arg4) +JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1model_1get__III_3II)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintArray arg3, jint arg4) #else -JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1model_1get__JJI_3IJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintArray arg3, jintLong arg4) +JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1model_1get__JJI_3II)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintArray arg3, jint arg4) #endif { jint *lparg3=NULL; #ifndef JNI64 OS_NATIVE_ENTER(env, that, _1gtk_1tree_1model_1get__III_3II_FUNC); #else - OS_NATIVE_ENTER(env, that, _1gtk_1tree_1model_1get__JJI_3IJ_FUNC); + OS_NATIVE_ENTER(env, that, _1gtk_1tree_1model_1get__JJI_3II_FUNC); #endif if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail; gtk_tree_model_get((GtkTreeModel *)arg0, (GtkTreeIter *)arg1, arg2, lparg3, arg4); @@ -14067,23 +14169,23 @@ fail: #ifndef JNI64 OS_NATIVE_EXIT(env, that, _1gtk_1tree_1model_1get__III_3II_FUNC); #else - OS_NATIVE_EXIT(env, that, _1gtk_1tree_1model_1get__JJI_3IJ_FUNC); + OS_NATIVE_EXIT(env, that, _1gtk_1tree_1model_1get__JJI_3II_FUNC); #endif } #endif -#if (!defined(NO__1gtk_1tree_1model_1get__III_3JI) && !defined(JNI64)) || (!defined(NO__1gtk_1tree_1model_1get__JJI_3JJ) && defined(JNI64)) +#if (!defined(NO__1gtk_1tree_1model_1get__III_3JI) && !defined(JNI64)) || (!defined(NO__1gtk_1tree_1model_1get__JJI_3JI) && defined(JNI64)) #ifndef JNI64 -JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1model_1get__III_3JI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jlongArray arg3, jintLong arg4) +JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1model_1get__III_3JI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jlongArray arg3, jint arg4) #else -JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1model_1get__JJI_3JJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jlongArray arg3, jintLong arg4) +JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1model_1get__JJI_3JI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jlongArray arg3, jint arg4) #endif { jlong *lparg3=NULL; #ifndef JNI64 OS_NATIVE_ENTER(env, that, _1gtk_1tree_1model_1get__III_3JI_FUNC); #else - OS_NATIVE_ENTER(env, that, _1gtk_1tree_1model_1get__JJI_3JJ_FUNC); + OS_NATIVE_ENTER(env, that, _1gtk_1tree_1model_1get__JJI_3JI_FUNC); #endif if (arg3) if ((lparg3 = (*env)->GetLongArrayElements(env, arg3, NULL)) == NULL) goto fail; gtk_tree_model_get((GtkTreeModel *)arg0, (GtkTreeIter *)arg1, arg2, lparg3, arg4); @@ -14092,7 +14194,7 @@ fail: #ifndef JNI64 OS_NATIVE_EXIT(env, that, _1gtk_1tree_1model_1get__III_3JI_FUNC); #else - OS_NATIVE_EXIT(env, that, _1gtk_1tree_1model_1get__JJI_3JJ_FUNC); + OS_NATIVE_EXIT(env, that, _1gtk_1tree_1model_1get__JJI_3JI_FUNC); #endif } #endif @@ -14508,60 +14610,60 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1remove) } #endif -#if (!defined(NO__1gtk_1tree_1store_1set__IIIII) && !defined(JNI64)) || (!defined(NO__1gtk_1tree_1store_1set__JJIIJ) && defined(JNI64)) +#if (!defined(NO__1gtk_1tree_1store_1set__IIIII) && !defined(JNI64)) || (!defined(NO__1gtk_1tree_1store_1set__JJIII) && defined(JNI64)) #ifndef JNI64 -JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__IIIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jintLong arg4) +JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__IIIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jint arg4) #else -JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__JJIIJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jintLong arg4) +JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__JJIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jint arg4) #endif { #ifndef JNI64 OS_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1set__IIIII_FUNC); #else - OS_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1set__JJIIJ_FUNC); + OS_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1set__JJIII_FUNC); #endif gtk_tree_store_set((GtkTreeStore *)arg0, (GtkTreeIter *)arg1, arg2, arg3, arg4); #ifndef JNI64 OS_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1set__IIIII_FUNC); #else - OS_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1set__JJIIJ_FUNC); + OS_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1set__JJIII_FUNC); #endif } #endif -#if (!defined(NO__1gtk_1tree_1store_1set__IIIJI) && !defined(JNI64)) || (!defined(NO__1gtk_1tree_1store_1set__JJIJJ) && defined(JNI64)) +#if (!defined(NO__1gtk_1tree_1store_1set__IIIJI) && !defined(JNI64)) || (!defined(NO__1gtk_1tree_1store_1set__JJIJI) && defined(JNI64)) #ifndef JNI64 -JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__IIIJI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jlong arg3, jintLong arg4) +JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__IIIJI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jlong arg3, jint arg4) #else -JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__JJIJJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jlong arg3, jintLong arg4) +JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__JJIJI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jlong arg3, jint arg4) #endif { #ifndef JNI64 OS_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1set__IIIJI_FUNC); #else - OS_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1set__JJIJJ_FUNC); + OS_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1set__JJIJI_FUNC); #endif gtk_tree_store_set((GtkTreeStore *)arg0, (GtkTreeIter *)arg1, arg2, arg3, arg4); #ifndef JNI64 OS_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1set__IIIJI_FUNC); #else - OS_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1set__JJIJJ_FUNC); + OS_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1set__JJIJI_FUNC); #endif } #endif -#if (!defined(NO__1gtk_1tree_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I) && !defined(JNI64)) || (!defined(NO__1gtk_1tree_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2J) && defined(JNI64)) +#if (!defined(NO__1gtk_1tree_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I) && !defined(JNI64)) || (!defined(NO__1gtk_1tree_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2I) && defined(JNI64)) #ifndef JNI64 -JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jobject arg3, jintLong arg4) +JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jobject arg3, jint arg4) #else -JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2J)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jobject arg3, jintLong arg4) +JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2I)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jobject arg3, jint arg4) #endif { GdkColor _arg3, *lparg3=NULL; #ifndef JNI64 OS_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I_FUNC); #else - OS_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2J_FUNC); + OS_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2I_FUNC); #endif if (arg3) if ((lparg3 = getGdkColorFields(env, arg3, &_arg3)) == NULL) goto fail; gtk_tree_store_set((GtkTreeStore *)arg0, (GtkTreeIter *)arg1, arg2, lparg3, arg4); @@ -14569,44 +14671,44 @@ fail: #ifndef JNI64 OS_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I_FUNC); #else - OS_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2J_FUNC); + OS_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2I_FUNC); #endif } #endif -#if (!defined(NO__1gtk_1tree_1store_1set__IIIZI) && !defined(JNI64)) || (!defined(NO__1gtk_1tree_1store_1set__JJIZJ) && defined(JNI64)) +#if (!defined(NO__1gtk_1tree_1store_1set__IIIZI) && !defined(JNI64)) || (!defined(NO__1gtk_1tree_1store_1set__JJIZI) && defined(JNI64)) #ifndef JNI64 -JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__IIIZI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jboolean arg3, jintLong arg4) +JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__IIIZI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jboolean arg3, jint arg4) #else -JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__JJIZJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jboolean arg3, jintLong arg4) +JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__JJIZI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jboolean arg3, jint arg4) #endif { #ifndef JNI64 OS_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1set__IIIZI_FUNC); #else - OS_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1set__JJIZJ_FUNC); + OS_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1set__JJIZI_FUNC); #endif gtk_tree_store_set((GtkTreeStore *)arg0, (GtkTreeIter *)arg1, arg2, arg3, arg4); #ifndef JNI64 OS_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1set__IIIZI_FUNC); #else - OS_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1set__JJIZJ_FUNC); + OS_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1set__JJIZI_FUNC); #endif } #endif -#if (!defined(NO__1gtk_1tree_1store_1set__III_3BI) && !defined(JNI64)) || (!defined(NO__1gtk_1tree_1store_1set__JJI_3BJ) && defined(JNI64)) +#if (!defined(NO__1gtk_1tree_1store_1set__III_3BI) && !defined(JNI64)) || (!defined(NO__1gtk_1tree_1store_1set__JJI_3BI) && defined(JNI64)) #ifndef JNI64 -JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__III_3BI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jbyteArray arg3, jintLong arg4) +JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__III_3BI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jbyteArray arg3, jint arg4) #else -JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__JJI_3BJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jbyteArray arg3, jintLong arg4) +JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__JJI_3BI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jbyteArray arg3, jint arg4) #endif { jbyte *lparg3=NULL; #ifndef JNI64 OS_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1set__III_3BI_FUNC); #else - OS_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1set__JJI_3BJ_FUNC); + OS_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1set__JJI_3BI_FUNC); #endif if (arg3) if ((lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL)) == NULL) goto fail; gtk_tree_store_set((GtkTreeStore *)arg0, (GtkTreeIter *)arg1, arg2, lparg3, arg4); @@ -14615,7 +14717,7 @@ fail: #ifndef JNI64 OS_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1set__III_3BI_FUNC); #else - OS_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1set__JJI_3BJ_FUNC); + OS_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1set__JJI_3BI_FUNC); #endif } #endif @@ -15373,7 +15475,15 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1vbox_1new) { jintLong rc = 0; OS_NATIVE_ENTER(env, that, _1gtk_1vbox_1new_FUNC); +/* rc = (jintLong)gtk_vbox_new((gboolean)arg0, (gint)arg1); +*/ + { + OS_LOAD_FUNCTION(fp, gtk_vbox_new) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(gboolean, gint))fp)((gboolean)arg0, (gint)arg1); + } + } OS_NATIVE_EXIT(env, that, _1gtk_1vbox_1new_FUNC); return rc; } @@ -15395,7 +15505,15 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1vscale_1new) { jintLong rc = 0; OS_NATIVE_ENTER(env, that, _1gtk_1vscale_1new_FUNC); +/* rc = (jintLong)gtk_vscale_new((GtkAdjustment *)arg0); +*/ + { + OS_LOAD_FUNCTION(fp, gtk_vscale_new) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GtkAdjustment *))fp)((GtkAdjustment *)arg0); + } + } OS_NATIVE_EXIT(env, that, _1gtk_1vscale_1new_FUNC); return rc; } @@ -15407,7 +15525,15 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1vscrollbar_1new) { jintLong rc = 0; OS_NATIVE_ENTER(env, that, _1gtk_1vscrollbar_1new_FUNC); +/* rc = (jintLong)gtk_vscrollbar_new((GtkAdjustment *)arg0); +*/ + { + OS_LOAD_FUNCTION(fp, gtk_vscrollbar_new) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GtkAdjustment *))fp)((GtkAdjustment *)arg0); + } + } OS_NATIVE_EXIT(env, that, _1gtk_1vscrollbar_1new_FUNC); return rc; } 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 09073e9c3e..288a48cf4f 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 @@ -72,6 +72,10 @@ #define XRenderSetPictureTransform_LIB LIB_XRENDER #define g_filename_display_name_LIB LIB_GLIB #define gtk_widget_set_allocation_LIB LIB_GTK +#define gtk_box_new_LIB LIB_GTK +#define gtk_box_set_homogeneous_LIB LIB_GTK +#define gtk_hbox_new_LIB LIB_GTK +#define gtk_vbox_new_LIB LIB_GTK #define gtk_calendar_display_options_LIB LIB_GTK #define gtk_calendar_get_date_LIB LIB_GTK #define gtk_calendar_new_LIB LIB_GTK @@ -136,6 +140,9 @@ #define gtk_menu_tool_button_new_LIB LIB_GTK #define gtk_window_set_keep_below_LIB LIB_GTK #define gtk_set_locale_LIB LIB_GTK +#define gtk_scrollbar_new_LIB LIB_GTK +#define gtk_hscrollbar_new_LIB LIB_GTK +#define gtk_vscrollbar_new_LIB LIB_GTK #define gtk_toolbar_set_orientation_LIB LIB_GTK #define gtk_tooltip_trigger_tooltip_query_LIB LIB_GTK #define gtk_tooltips_set_tip_LIB LIB_GTK @@ -187,6 +194,9 @@ #define gdk_pixbuf_render_to_drawable_LIB LIB_GDK #define gtk_scrolled_window_get_hscrollbar_LIB LIB_GTK #define gtk_scrolled_window_get_vscrollbar_LIB LIB_GTK +#define gtk_scale_new_LIB LIB_GTK +#define gtk_hscale_new_LIB LIB_GTK +#define gtk_vscale_new_LIB LIB_GTK #define gtk_status_icon_get_geometry_LIB LIB_GTK #define gtk_status_icon_get_visible_LIB LIB_GTK #define gtk_status_icon_new_LIB LIB_GTK @@ -372,8 +382,13 @@ /* Field accessors */ #define G_OBJECT_CLASS_CONSTRUCTOR(arg0) (arg0)->constructor #define G_OBJECT_CLASS_SET_CONSTRUCTOR(arg0, arg1) (arg0)->constructor = (GObject* (*) (GType, guint, GObjectConstructParam *))arg1 +#if GTK_CHECK_VERSION(3,0,0) +#define GTK_ACCEL_LABEL_SET_ACCEL_STRING(arg0, arg1) +#define GTK_ACCEL_LABEL_GET_ACCEL_STRING(arg0) 0 +#else #define GTK_ACCEL_LABEL_SET_ACCEL_STRING(arg0, arg1) (arg0)->accel_string = arg1 #define GTK_ACCEL_LABEL_GET_ACCEL_STRING(arg0) (arg0)->accel_string +#endif #if GTK_CHECK_VERSION(2,20,0) #define GTK_RANGE_SLIDER_START(arg0) 0 #else 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 119f1c66aa..0ca15f077d 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 = 1335; -int OS_nativeFunctionCallCount[1335]; +int OS_nativeFunctionCount = 1339; +int OS_nativeFunctionCallCount[1339]; char * OS_nativeFunctionNames[] = { #ifndef JNI64 "Call__IIII", @@ -595,7 +595,9 @@ char * OS_nativeFunctionNames[] = { "_1gtk_1arrow_1set", "_1gtk_1bin_1get_1child", "_1gtk_1border_1free", + "_1gtk_1box_1new", "_1gtk_1box_1set_1child_1packing", + "_1gtk_1box_1set_1homogeneous", "_1gtk_1box_1set_1spacing", "_1gtk_1button_1clicked", "_1gtk_1button_1get_1relief", @@ -785,27 +787,27 @@ char * OS_nativeFunctionNames[] = { #ifndef JNI64 "_1gtk_1list_1store_1set__IIIII", #else - "_1gtk_1list_1store_1set__JJIIJ", + "_1gtk_1list_1store_1set__JJIII", #endif #ifndef JNI64 "_1gtk_1list_1store_1set__IIIJI", #else - "_1gtk_1list_1store_1set__JJIJJ", + "_1gtk_1list_1store_1set__JJIJI", #endif #ifndef JNI64 "_1gtk_1list_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I", #else - "_1gtk_1list_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2J", + "_1gtk_1list_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2I", #endif #ifndef JNI64 "_1gtk_1list_1store_1set__IIIZI", #else - "_1gtk_1list_1store_1set__JJIZJ", + "_1gtk_1list_1store_1set__JJIZI", #endif #ifndef JNI64 "_1gtk_1list_1store_1set__III_3BI", #else - "_1gtk_1list_1store_1set__JJI_3BJ", + "_1gtk_1list_1store_1set__JJI_3BI", #endif "_1gtk_1main", "_1gtk_1main_1do_1event", @@ -938,8 +940,10 @@ char * OS_nativeFunctionNames[] = { "_1gtk_1rc_1style_1set_1color_1flags", "_1gtk_1rc_1style_1set_1fg", "_1gtk_1rc_1style_1set_1text", + "_1gtk_1scale_1new", "_1gtk_1scale_1set_1digits", "_1gtk_1scale_1set_1draw_1value", + "_1gtk_1scrollbar_1new", "_1gtk_1scrolled_1window_1add_1with_1viewport", "_1gtk_1scrolled_1window_1get_1hadjustment", "_1gtk_1scrolled_1window_1get_1hscrollbar", @@ -1075,12 +1079,12 @@ char * OS_nativeFunctionNames[] = { #ifndef JNI64 "_1gtk_1tree_1model_1get__III_3II", #else - "_1gtk_1tree_1model_1get__JJI_3IJ", + "_1gtk_1tree_1model_1get__JJI_3II", #endif #ifndef JNI64 "_1gtk_1tree_1model_1get__III_3JI", #else - "_1gtk_1tree_1model_1get__JJI_3JJ", + "_1gtk_1tree_1model_1get__JJI_3JI", #endif "_1gtk_1tree_1model_1get_1iter", "_1gtk_1tree_1model_1get_1iter_1first", @@ -1122,27 +1126,27 @@ char * OS_nativeFunctionNames[] = { #ifndef JNI64 "_1gtk_1tree_1store_1set__IIIII", #else - "_1gtk_1tree_1store_1set__JJIIJ", + "_1gtk_1tree_1store_1set__JJIII", #endif #ifndef JNI64 "_1gtk_1tree_1store_1set__IIIJI", #else - "_1gtk_1tree_1store_1set__JJIJJ", + "_1gtk_1tree_1store_1set__JJIJI", #endif #ifndef JNI64 "_1gtk_1tree_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I", #else - "_1gtk_1tree_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2J", + "_1gtk_1tree_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2I", #endif #ifndef JNI64 "_1gtk_1tree_1store_1set__IIIZI", #else - "_1gtk_1tree_1store_1set__JJIZJ", + "_1gtk_1tree_1store_1set__JJIZI", #endif #ifndef JNI64 "_1gtk_1tree_1store_1set__III_3BI", #else - "_1gtk_1tree_1store_1set__JJI_3BJ", + "_1gtk_1tree_1store_1set__JJI_3BI", #endif "_1gtk_1tree_1view_1collapse_1row", "_1gtk_1tree_1view_1column_1add_1attribute", 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 20250dbe2b..03201ea558 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 @@ -603,7 +603,9 @@ typedef enum { _1gtk_1arrow_1set_FUNC, _1gtk_1bin_1get_1child_FUNC, _1gtk_1border_1free_FUNC, + _1gtk_1box_1new_FUNC, _1gtk_1box_1set_1child_1packing_FUNC, + _1gtk_1box_1set_1homogeneous_FUNC, _1gtk_1box_1set_1spacing_FUNC, _1gtk_1button_1clicked_FUNC, _1gtk_1button_1get_1relief_FUNC, @@ -793,27 +795,27 @@ typedef enum { #ifndef JNI64 _1gtk_1list_1store_1set__IIIII_FUNC, #else - _1gtk_1list_1store_1set__JJIIJ_FUNC, + _1gtk_1list_1store_1set__JJIII_FUNC, #endif #ifndef JNI64 _1gtk_1list_1store_1set__IIIJI_FUNC, #else - _1gtk_1list_1store_1set__JJIJJ_FUNC, + _1gtk_1list_1store_1set__JJIJI_FUNC, #endif #ifndef JNI64 _1gtk_1list_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I_FUNC, #else - _1gtk_1list_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2J_FUNC, + _1gtk_1list_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2I_FUNC, #endif #ifndef JNI64 _1gtk_1list_1store_1set__IIIZI_FUNC, #else - _1gtk_1list_1store_1set__JJIZJ_FUNC, + _1gtk_1list_1store_1set__JJIZI_FUNC, #endif #ifndef JNI64 _1gtk_1list_1store_1set__III_3BI_FUNC, #else - _1gtk_1list_1store_1set__JJI_3BJ_FUNC, + _1gtk_1list_1store_1set__JJI_3BI_FUNC, #endif _1gtk_1main_FUNC, _1gtk_1main_1do_1event_FUNC, @@ -946,8 +948,10 @@ typedef enum { _1gtk_1rc_1style_1set_1color_1flags_FUNC, _1gtk_1rc_1style_1set_1fg_FUNC, _1gtk_1rc_1style_1set_1text_FUNC, + _1gtk_1scale_1new_FUNC, _1gtk_1scale_1set_1digits_FUNC, _1gtk_1scale_1set_1draw_1value_FUNC, + _1gtk_1scrollbar_1new_FUNC, _1gtk_1scrolled_1window_1add_1with_1viewport_FUNC, _1gtk_1scrolled_1window_1get_1hadjustment_FUNC, _1gtk_1scrolled_1window_1get_1hscrollbar_FUNC, @@ -1083,12 +1087,12 @@ typedef enum { #ifndef JNI64 _1gtk_1tree_1model_1get__III_3II_FUNC, #else - _1gtk_1tree_1model_1get__JJI_3IJ_FUNC, + _1gtk_1tree_1model_1get__JJI_3II_FUNC, #endif #ifndef JNI64 _1gtk_1tree_1model_1get__III_3JI_FUNC, #else - _1gtk_1tree_1model_1get__JJI_3JJ_FUNC, + _1gtk_1tree_1model_1get__JJI_3JI_FUNC, #endif _1gtk_1tree_1model_1get_1iter_FUNC, _1gtk_1tree_1model_1get_1iter_1first_FUNC, @@ -1130,27 +1134,27 @@ typedef enum { #ifndef JNI64 _1gtk_1tree_1store_1set__IIIII_FUNC, #else - _1gtk_1tree_1store_1set__JJIIJ_FUNC, + _1gtk_1tree_1store_1set__JJIII_FUNC, #endif #ifndef JNI64 _1gtk_1tree_1store_1set__IIIJI_FUNC, #else - _1gtk_1tree_1store_1set__JJIJJ_FUNC, + _1gtk_1tree_1store_1set__JJIJI_FUNC, #endif #ifndef JNI64 _1gtk_1tree_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I_FUNC, #else - _1gtk_1tree_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2J_FUNC, + _1gtk_1tree_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2I_FUNC, #endif #ifndef JNI64 _1gtk_1tree_1store_1set__IIIZI_FUNC, #else - _1gtk_1tree_1store_1set__JJIZJ_FUNC, + _1gtk_1tree_1store_1set__JJIZI_FUNC, #endif #ifndef JNI64 _1gtk_1tree_1store_1set__III_3BI_FUNC, #else - _1gtk_1tree_1store_1set__JJI_3BJ_FUNC, + _1gtk_1tree_1store_1set__JJI_3BI_FUNC, #endif _1gtk_1tree_1view_1collapse_1row_FUNC, _1gtk_1tree_1view_1column_1add_1attribute_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 c2310b7878..4630423a17 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 @@ -7117,6 +7117,7 @@ public static final int /*long*/ gtk_grab_get_current() { } } /** + * @method flags=dynamic * @param homogeneous cast=(gboolean) * @param spacing cast=(gint) */ @@ -7129,7 +7130,36 @@ public static final int /*long*/ gtk_hbox_new(boolean homogeneous, int spacing) lock.unlock(); } } -/** @param adjustment cast=(GtkAdjustment *) */ +/** + * @method flags=dynamic + * @param orientation cast=(GtkOrientation) + */ +public static final native int /*long*/ _gtk_box_new(int orientation, int spacing); +public static final int /*long*/ gtk_box_new(int orientation, int spacing) { + lock.lock(); + try { + return _gtk_box_new(orientation, spacing); + } finally { + lock.unlock(); + } +} +/** + * @method flags=dynamic + * @param box cast=(GtkBox *) + */ +public static final native void _gtk_box_set_homogeneous(int /*long*/ box, boolean homogeneous); +public static final void gtk_box_set_homogeneous(int /*long*/ box, boolean homogeneous) { + lock.lock(); + try { + _gtk_box_set_homogeneous(box, homogeneous); + } finally { + lock.unlock(); + } +} +/** + * @method flags=dynamic + * @param adjustment cast=(GtkAdjustment *) + */ public static final native int /*long*/ _gtk_hscale_new(int /*long*/ adjustment); public static final int /*long*/ gtk_hscale_new(int /*long*/ adjustment) { lock.lock(); @@ -7139,7 +7169,24 @@ public static final int /*long*/ gtk_hscale_new(int /*long*/ adjustment) { lock.unlock(); } } -/** @param adjustment cast=(GtkAdjustment *) */ +/** + * @method flags=dynamic + * @param orientation cast=(GtkOrientation) + * @param adjustment cast=(GtkAdjustment *) + */ +public static final native int /*long*/ _gtk_scale_new(int orientation, int /*long*/ adjustment); +public static final int /*long*/ gtk_scale_new(int orientation, int /*long*/ adjustment) { + lock.lock(); + try { + return _gtk_scale_new(orientation, adjustment); + } finally { + lock.unlock(); + } +} +/** +* @method flags=dynamic +* @param adjustment cast=(GtkAdjustment *) +*/ public static final native int /*long*/ _gtk_hscrollbar_new(int /*long*/ adjustment); public static final int /*long*/ gtk_hscrollbar_new(int /*long*/ adjustment) { lock.lock(); @@ -7149,6 +7196,20 @@ public static final int /*long*/ gtk_hscrollbar_new(int /*long*/ adjustment) { lock.unlock(); } } +/** + * @method flags=dynamic + * @param orientation cast=(GtkOrientation) + * @param adjustment cast=(GtkAdjustment *) + * */ +public static final native int /*long*/ _gtk_scrollbar_new(int orientation, int /*long*/ adjustment); +public static final int /*long*/ gtk_scrollbar_new(int orientation, int /*long*/ adjustment) { + lock.lock(); + try { + return _gtk_scrollbar_new(orientation, adjustment); + } finally { + lock.unlock(); + } +} public static final native int /*long*/ _gtk_hseparator_new(); public static final int /*long*/ gtk_hseparator_new() { lock.lock(); @@ -7653,8 +7714,8 @@ public static final void gtk_list_store_remove(int /*long*/ list_store, int /*lo * @param store cast=(GtkListStore *) * @param iter cast=(GtkTreeIter *) */ -public static final native void _gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, byte[] value, int /*long*/ terminator); -public static final void gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, byte[] value, int /*long*/ terminator) { +public static final native void _gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, byte[] value, int terminator); +public static final void gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, byte[] value, int terminator) { lock.lock(); try { _gtk_list_store_set(store, iter, column, value, terminator); @@ -7666,8 +7727,8 @@ public static final void gtk_list_store_set(int /*long*/ store, int /*long*/ ite * @param store cast=(GtkListStore *) * @param iter cast=(GtkTreeIter *) */ -public static final native void _gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, int value, int /*long*/ terminator); -public static final void gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, int value, int /*long*/ terminator) { +public static final native void _gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, int value, int terminator); +public static final void gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, int value, int terminator) { lock.lock(); try { _gtk_list_store_set(store, iter, column, value, terminator); @@ -7679,8 +7740,8 @@ public static final void gtk_list_store_set(int /*long*/ store, int /*long*/ ite * @param store cast=(GtkListStore *) * @param iter cast=(GtkTreeIter *) */ -public static final native void _gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, long value, int /*long*/ terminator); -public static final void gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, long value, int /*long*/ terminator) { +public static final native void _gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, long value, int terminator); +public static final void gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, long value, int terminator) { lock.lock(); try { _gtk_list_store_set(store, iter, column, value, terminator); @@ -7693,8 +7754,8 @@ public static final void gtk_list_store_set(int /*long*/ store, int /*long*/ ite * @param iter cast=(GtkTreeIter *) * @param value flags=no_out */ -public static final native void _gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, GdkColor value, int /*long*/ terminator); -public static final void gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, GdkColor value, int /*long*/ terminator) { +public static final native void _gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, GdkColor value, int terminator); +public static final void gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, GdkColor value, int terminator) { lock.lock(); try { _gtk_list_store_set(store, iter, column, value, terminator); @@ -7706,8 +7767,8 @@ public static final void gtk_list_store_set(int /*long*/ store, int /*long*/ ite * @param store cast=(GtkListStore *) * @param iter cast=(GtkTreeIter *) */ -public static final native void _gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, boolean value, int /*long*/ terminator); -public static final void gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, boolean value, int /*long*/ terminator) { +public static final native void _gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, boolean value, int terminator); +public static final void gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, boolean value, int terminator) { lock.lock(); try { _gtk_list_store_set(store, iter, column, value, terminator); @@ -10803,8 +10864,8 @@ public static final void gtk_tooltips_set_tip(int /*long*/ tooltips, int /*long* * @param tree_model cast=(GtkTreeModel *) * @param iter cast=(GtkTreeIter *) */ -public static final native void _gtk_tree_model_get(int /*long*/ tree_model, int /*long*/ iter, int column, long[] value, int /*long*/ terminator); -public static final void gtk_tree_model_get(int /*long*/ tree_model, int /*long*/ iter, int column, long[] value, int /*long*/ terminator) { +public static final native void _gtk_tree_model_get(int /*long*/ tree_model, int /*long*/ iter, int column, long[] value, int terminator); +public static final void gtk_tree_model_get(int /*long*/ tree_model, int /*long*/ iter, int column, long[] value, int terminator) { lock.lock(); try { _gtk_tree_model_get(tree_model, iter, column, value, terminator); @@ -10816,8 +10877,8 @@ public static final void gtk_tree_model_get(int /*long*/ tree_model, int /*long* * @param tree_model cast=(GtkTreeModel *) * @param iter cast=(GtkTreeIter *) */ -public static final native void _gtk_tree_model_get(int /*long*/ tree_model, int /*long*/ iter, int column, int[] value, int /*long*/ terminator); -public static final void gtk_tree_model_get(int /*long*/ tree_model, int /*long*/ iter, int column, int[] value, int /*long*/ terminator) { +public static final native void _gtk_tree_model_get(int /*long*/ tree_model, int /*long*/ iter, int column, int[] value, int terminator); +public static final void gtk_tree_model_get(int /*long*/ tree_model, int /*long*/ iter, int column, int[] value, int terminator) { lock.lock(); try { _gtk_tree_model_get(tree_model, iter, column, value, terminator); @@ -11215,8 +11276,8 @@ public static final void gtk_tree_store_remove(int /*long*/ store, int /*long*/ * @param store cast=(GtkTreeStore *) * @param iter cast=(GtkTreeIter *) */ -public static final native void _gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, byte[] value, int /*long*/ terminator); -public static final void gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, byte[] value, int /*long*/ terminator) { +public static final native void _gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, byte[] value, int terminator); +public static final void gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, byte[] value, int terminator) { lock.lock(); try { _gtk_tree_store_set(store, iter, column, value, terminator); @@ -11228,8 +11289,8 @@ public static final void gtk_tree_store_set(int /*long*/ store, int /*long*/ ite * @param store cast=(GtkTreeStore *) * @param iter cast=(GtkTreeIter *) */ -public static final native void _gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, int value, int /*long*/ terminator); -public static final void gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, int value, int /*long*/ terminator) { +public static final native void _gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, int value, int terminator); +public static final void gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, int value, int terminator) { lock.lock(); try { _gtk_tree_store_set(store, iter, column, value, terminator); @@ -11241,8 +11302,8 @@ public static final void gtk_tree_store_set(int /*long*/ store, int /*long*/ ite * @param store cast=(GtkTreeStore *) * @param iter cast=(GtkTreeIter *) */ -public static final native void _gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, long value, int /*long*/ terminator); -public static final void gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, long value, int /*long*/ terminator) { +public static final native void _gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, long value, int terminator); +public static final void gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, long value, int terminator) { lock.lock(); try { _gtk_tree_store_set(store, iter, column, value, terminator); @@ -11255,8 +11316,8 @@ public static final void gtk_tree_store_set(int /*long*/ store, int /*long*/ ite * @param iter cast=(GtkTreeIter *) * @param value flags=no_out */ -public static final native void _gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, GdkColor value, int /*long*/ terminator); -public static final void gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, GdkColor value, int /*long*/ terminator) { +public static final native void _gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, GdkColor value, int terminator); +public static final void gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, GdkColor value, int terminator) { lock.lock(); try { _gtk_tree_store_set(store, iter, column, value, terminator); @@ -11268,8 +11329,8 @@ public static final void gtk_tree_store_set(int /*long*/ store, int /*long*/ ite * @param store cast=(GtkTreeStore *) * @param iter cast=(GtkTreeIter *) */ -public static final native void _gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, boolean value, int /*long*/ terminator); -public static final void gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, boolean value, int /*long*/ terminator) { +public static final native void _gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, boolean value, int terminator); +public static final void gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, boolean value, int terminator) { lock.lock(); try { _gtk_tree_store_set(store, iter, column, value, terminator); @@ -12021,6 +12082,7 @@ public static final void gtk_tree_view_convert_widget_to_bin_window_coords(int / } } /** + * @method flags=dynamic * @param homogeneous cast=(gboolean) * @param spacing cast=(gint) */ @@ -12046,7 +12108,10 @@ public static final void gtk_viewport_set_shadow_type(int /*long*/ viewport, int lock.unlock(); } } -/** @param adjustment cast=(GtkAdjustment *) */ +/** + * @method flags=dynamic + * @param adjustment cast=(GtkAdjustment *) + */ public static final native int /*long*/ _gtk_vscale_new(int /*long*/ adjustment); public static final int /*long*/ gtk_vscale_new(int /*long*/ adjustment) { lock.lock(); @@ -12056,7 +12121,10 @@ public static final int /*long*/ gtk_vscale_new(int /*long*/ adjustment) { lock.unlock(); } } -/** @param adjustment cast=(GtkAdjustment *) */ +/** + * @method flags=dynamic + * @param adjustment cast=(GtkAdjustment *) + */ public static final native int /*long*/ _gtk_vscrollbar_new(int /*long*/ adjustment); public static final int /*long*/ gtk_vscrollbar_new(int /*long*/ adjustment) { lock.lock(); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java index 6678d079cb..e2622c6878 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java @@ -127,6 +127,13 @@ Control [] _getTabList () { return tabList; } +boolean acceptsFirstMouse (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { + if ((state & CANVAS) != 0) { + return true; + } + return super.acceptsFirstMouse (id, sel, theEvent); +} + boolean acceptsFirstResponder (int /*long*/ id, int /*long*/ sel) { if ((state & CANVAS) != 0) { if ((style & SWT.NO_FOCUS) == 0 && hooksKeys ()) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java index a6b1299851..cdc8ba5b94 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java @@ -2603,6 +2603,8 @@ void initClasses () { OS.class_addMethod(cls, OS.sel_expandItem_expandChildren_, proc4, "@:@Z"); OS.class_addMethod(cls, OS.sel_collapseItem_collapseChildren_, proc4, "@:@Z"); OS.class_addMethod(cls, OS.sel_drawBackgroundInClipRect_, drawBackgroundInClipRectProc, "@:{NSRect}"); + OS.class_addMethod(cls, OS.sel_acceptsFirstResponder, proc2, "@:"); + OS.class_addMethod(cls, OS.sel_needsPanelToBecomeKey, proc2, "@:"); addEventMethods(cls, proc2, proc3, drawRectProc, hitTestProc, setNeedsDisplayInRectProc); addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc); OS.objc_registerClassPair(cls); @@ -2782,6 +2784,8 @@ void initClasses () { OS.class_addMethod(cls, OS.sel_deselectAll_, proc3, "@:@"); OS.class_addMethod(cls, OS.sel_tableView_writeRowsWithIndexes_toPasteboard_, proc5, "@:@@@"); OS.class_addMethod(cls, OS.sel_drawBackgroundInClipRect_, drawBackgroundInClipRectProc, "@:{NSRect}"); + OS.class_addMethod(cls, OS.sel_acceptsFirstResponder, proc2, "@:"); + OS.class_addMethod(cls, OS.sel_needsPanelToBecomeKey, proc2, "@:"); addEventMethods(cls, proc2, proc3, drawRectProc, hitTestProc, setNeedsDisplayInRectProc); addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc); OS.objc_registerClassPair(cls); @@ -2903,10 +2907,6 @@ void initClasses () { OS.class_addMethod(cls, OS.sel_systemSettingsChanged_, proc3, "@:@"); OS.class_addMethod(cls, OS.sel_windowDidMiniaturize_, proc3, "@:@"); OS.class_addMethod(cls, OS.sel_windowDidDeminiaturize_, proc3, "@:@"); - if (OS.VERSION >= 0x1070) { - OS.class_addMethod(cls, OS.sel_windowDidEnterFullScreen_, proc3, "@:@"); - OS.class_addMethod(cls, OS.sel_windowDidExitFullScreen_, proc3, "@:@"); - } OS.objc_registerClassPair(cls); } @@ -4989,7 +4989,7 @@ void applicationSendEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event } break; } - sendEvent = true; + if (type != OS.NSAppKitDefined) sendEvent = true; /* * Feature in Cocoa. The help key triggers context-sensitive help but doesn't get forwarded to the window as a key event. @@ -5011,7 +5011,7 @@ void applicationSendEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event super_struct.super_class = OS.objc_msgSend (id, OS.sel_superclass); OS.objc_msgSendSuper (super_struct, sel, event); } - sendEvent = false; + if (type != OS.NSAppKitDefined) sendEvent = false; } void applicationWillFinishLaunching (int /*long*/ id, int /*long*/ sel, int /*long*/ notification) { @@ -5371,6 +5371,8 @@ static int /*long*/ windowProc(int /*long*/ id, int /*long*/ sel) { return widget.isFlipped(id, sel) ? 1 : 0; } else if (sel == OS.sel_canBecomeKeyView) { return widget.canBecomeKeyView(id,sel) ? 1 : 0; + } else if (sel == OS.sel_needsPanelToBecomeKey) { + return widget.needsPanelToBecomeKey(id,sel) ? 1 : 0; } else if (sel == OS.sel_becomeKeyWindow) { widget.becomeKeyWindow(id, sel); } else if (sel == OS.sel_unmarkText) { @@ -5683,10 +5685,6 @@ static int /*long*/ windowProc(int /*long*/ id, int /*long*/ sel, int /*long*/ a widget.windowDidMiniturize(id, sel, arg0); } else if (sel == OS.sel_windowDidDeminiaturize_) { widget.windowDidDeminiturize(id, sel, arg0); - } else if (sel == OS.sel_windowDidEnterFullScreen_) { - widget.windowDidEnterFullScreen(id, sel, arg0); - } else if (sel == OS.sel_windowDidExitFullScreen_) { - widget.windowDidExitFullScreen(id, sel, arg0); } else if (sel == OS.sel_touchesBeganWithEvent_) { widget.touchesBeganWithEvent(id, sel, arg0); } else if (sel == OS.sel_touchesMovedWithEvent_) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java index 2fc57e3873..72cd7a9bd4 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java @@ -96,6 +96,10 @@ int /*long*/ accessibilityAttributeValue (int /*long*/ id, int /*long*/ sel, int return super.accessibilityAttributeValue(id, sel, arg0); } +boolean acceptsFirstResponder (int /*long*/ id, int /*long*/ sel) { + return true; +} + /** * Adds the argument to the end of the receiver's list. * @@ -766,6 +770,10 @@ void mouseDownSuper(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { didSelect = false; } +boolean needsPanelToBecomeKey (int /*long*/ id, int /*long*/ sel) { + return false; +} + int /*long*/ numberOfRowsInTableView(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView) { return itemCount; } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java index fc8181af25..ef4b26e7cb 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java @@ -631,7 +631,7 @@ public Rectangle computeTrim (int x, int y, int width, int height) { rect.width = trim.width; rect.height = trim.height; if (window != null) { - if (!fullScreen && !fixResize()) { + if (!_getFullScreen() && !fixResize()) { float /*double*/ h = rect.height; rect = window.frameRectForContentRect(rect); rect.y += h-rect.height; @@ -971,6 +971,13 @@ public Rectangle getClientArea () { */ public boolean getFullScreen () { checkWidget(); + return _getFullScreen (); +} + +boolean _getFullScreen () { + if ((window.collectionBehavior() & OS.NSWindowCollectionBehaviorFullScreenPrimary) != 0) { + return (window.styleMask() & OS.NSFullScreenWindowMask) != 0 ? true : false; + } return fullScreen; } @@ -1027,7 +1034,7 @@ public Point getLocation () { public boolean getMaximized () { checkWidget(); if (window == null) return false; - return !fullScreen && window.isZoomed(); + return !_getFullScreen() && window.isZoomed(); } Shell getModalShell () { @@ -1596,7 +1603,7 @@ void setBounds (int x, int y, int width, int height, boolean move, boolean resiz return; } } - if (fullScreen) setFullScreen (false); + if (_getFullScreen ()) setFullScreen (false); boolean sheet = window.isSheet(); if (sheet && move && !resize) return; int screenHeight = (int) display.getPrimaryFrame().height; @@ -1684,14 +1691,14 @@ public void setEnabled (boolean enabled) { public void setFullScreen (boolean fullScreen) { checkWidget (); if (window == null) return; - if (this.fullScreen == fullScreen) return; - this.fullScreen = fullScreen; + if (_getFullScreen () == fullScreen) return; if ((window.collectionBehavior() & OS.NSWindowCollectionBehaviorFullScreenPrimary) != 0) { OS.objc_msgSend(window.id, OS.sel_toggleFullScreen_, 0); return; } + this.fullScreen = fullScreen; if (fullScreen) { currentFrame = window.frame(); window.setShowsResizeIndicator(false); //only hides resize indicator @@ -2144,11 +2151,11 @@ void windowDidBecomeKey(int /*long*/ id, int /*long*/ sel, int /*long*/ notifica Shell parentShell = this; while (parentShell.parent != null) { parentShell = (Shell) parentShell.parent; - if (parentShell.fullScreen) { + if (parentShell._getFullScreen ()) { break; } } - if (!parentShell.fullScreen || menuBar != null) { + if (!parentShell._getFullScreen () || menuBar != null) { updateSystemUIMode (); } else { parentShell.updateSystemUIMode (); @@ -2166,21 +2173,13 @@ void windowDidMiniturize(int /*long*/ id, int /*long*/ sel, int /*long*/ notific sendEvent(SWT.Iconify); } -void windowDidEnterFullScreen(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) { - this.fullScreen = true; -} - -void windowDidExitFullScreen(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) { - this.fullScreen = false; -} - void windowDidMove(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) { moved = true; sendEvent(SWT.Move); } void windowDidResize(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) { - if (fullScreen && ((window.collectionBehavior() & OS.NSWindowCollectionBehaviorFullScreenPrimary) == 0)) { + if (((window.collectionBehavior() & OS.NSWindowCollectionBehaviorFullScreenPrimary) == 0) && fullScreen) { window.setFrame(fullScreenFrame, true); NSRect contentViewFrame = new NSRect(); contentViewFrame.width = fullScreenFrame.width; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java index 2bc300acf5..bee0d9b369 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java @@ -126,6 +126,10 @@ public Table (Composite parent, int style) { super (parent, checkStyle (style)); } +boolean acceptsFirstResponder (int /*long*/ id, int /*long*/ sel) { + return true; +} + int /*long*/ accessibilityAttributeValue(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) { int /*long*/ returnValue = 0; NSString attributeName = new NSString(arg0); @@ -252,7 +256,7 @@ boolean canDragRowsWithIndexes_atPoint(int /*long*/ id, int /*long*/ sel, int /* } // The clicked row must be selected to initiate a drag. - return (widget.isRowSelected(row) && drag); + return (widget.isRowSelected(row) && drag) || !hasFocus(); } boolean checkData (TableItem item) { @@ -2005,6 +2009,10 @@ void mouseDownSuper(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { didSelect = false; } +boolean needsPanelToBecomeKey (int /*long*/ id, int /*long*/ sel) { + return false; +} + /* * Feature in Cocoa. If a checkbox is in multi-state mode, nextState cycles * from off to mixed to on and back to off again. This will cause the on state diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java index e379bf5a7c..f71d48025d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java @@ -158,6 +158,10 @@ TreeItem _getItem (TreeItem parentItem, int index, boolean create) { return item; } +boolean acceptsFirstResponder (int /*long*/ id, int /*long*/ sel) { + return true; +} + int /*long*/ accessibilityAttributeValue(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) { int /*long*/ returnValue = 0; NSString attributeName = new NSString(arg0); @@ -304,7 +308,7 @@ boolean canDragRowsWithIndexes_atPoint(int /*long*/ id, int /*long*/ sel, int /* } // The clicked row must be selected to initiate a drag. - return (widget.isRowSelected(row) && drag); + return (widget.isRowSelected(row) && drag) || !hasFocus(); } boolean checkData (TreeItem item) { @@ -2054,6 +2058,10 @@ void mouseDownSuper(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { didSelect = false; } +boolean needsPanelToBecomeKey (int /*long*/ id, int /*long*/ sel) { + return false; +} + /* * Feature in Cocoa. If a checkbox is in multi-state mode, nextState cycles * from off to mixed to on and back to off again. This will cause the on state diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java index 0edfe16fff..d3f6668a63 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java @@ -260,6 +260,10 @@ boolean canBecomeKeyWindow (int /*long*/ id, int /*long*/ sel) { return callSuperBoolean (id, sel); } +boolean needsPanelToBecomeKey (int /*long*/ id, int /*long*/ sel) { + return callSuperBoolean (id, sel); +} + void cancelOperation(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) { } @@ -2092,12 +2096,6 @@ void windowDidMiniturize(int /*long*/ id, int /*long*/ sel, int /*long*/ notific void windowDidDeminiturize(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) { } -void windowDidEnterFullScreen(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) { -} - -void windowDidExitFullScreen(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) { -} - void windowSendEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ event) { callSuper(id, sel, event); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/library/make_common.mak b/bundles/org.eclipse.swt/Eclipse SWT/common/library/make_common.mak index 446dcd1744..a3b10efdae 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/common/library/make_common.mak +++ b/bundles/org.eclipse.swt/Eclipse SWT/common/library/make_common.mak @@ -10,5 +10,5 @@ #******************************************************************************* maj_ver=4 -min_ver=303 -comma_ver=4,3,0,3 +min_ver=304 +comma_ver=4,3,0,4 diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/version.txt b/bundles/org.eclipse.swt/Eclipse SWT/common/version.txt index 15bb04a4ac..6237919edd 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/common/version.txt +++ b/bundles/org.eclipse.swt/Eclipse SWT/common/version.txt @@ -1 +1 @@ -version 4.303
\ No newline at end of file +version 4.304
\ No newline at end of file diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java index 917dad9c5a..4367e36358 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java @@ -879,6 +879,8 @@ void createSurface() { OS.gdk_drawable_get_size(pixmap, w, h); } int width = w[0], height = h[0]; + this.width = width; + this.height = height; if (mask != 0 || alpha != -1 || alphaData != null) { int /*long*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, true, 8, width, height); if (pixbuf == 0) SWT.error(SWT.ERROR_NO_HANDLES); 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 7649674a1a..6d1ba92794 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 @@ -308,7 +308,7 @@ void createHandle (int index) { if ((style & SWT.ARROW) != 0) { OS.gtk_container_add (handle, arrowHandle); } else { - boxHandle = OS.gtk_hbox_new (false, 4); + boxHandle = gtk_box_new (OS.GTK_ORIENTATION_HORIZONTAL, false, 4); if (boxHandle == 0) error (SWT.ERROR_NO_HANDLES); labelHandle = OS.gtk_label_new_with_mnemonic (null); if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java index 9f6c6ba29f..9c16040137 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java @@ -605,13 +605,10 @@ public Rectangle getClientArea () { } forceResize (); int /*long*/ clientHandle = clientHandle (); - int width = 0, height = 0; - if ((state & ZERO_WIDTH) == 0) { - GtkAllocation allocation = new GtkAllocation(); - gtk_widget_get_allocation (clientHandle, allocation); - width = allocation.width; - height = allocation.height; - } + GtkAllocation allocation = new GtkAllocation(); + gtk_widget_get_allocation (clientHandle, allocation); + int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width; + int height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height; return new Rectangle (0, 0, width, height); } return super.getClientArea(); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java index e23576990a..91407953dd 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java @@ -1022,14 +1022,11 @@ public void setLocation(int x, int y) { */ public Point getSize () { checkWidget(); - int width = 0, height = 0; - if ((state & ZERO_WIDTH) == 0) { - int /*long*/ topHandle = topHandle (); - GtkAllocation allocation = new GtkAllocation (); - gtk_widget_get_allocation (topHandle, allocation); - width = allocation.width; - height = allocation.height; - } + int /*long*/ topHandle = topHandle (); + GtkAllocation allocation = new GtkAllocation (); + gtk_widget_get_allocation (topHandle, allocation); + int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width; + int height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height; return new Point (width, height); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java index cd4060359a..d10d2b8bf1 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java @@ -159,7 +159,13 @@ String openChooserDialog () { } if (message.length () > 0) { byte [] buffer = Converter.wcsToMbcs (null, message, true); - int /*long*/ box = OS.gtk_hbox_new (false, 0); + int /*long*/ box = 0; + if (OS.GTK_VERSION >= OS.VERSION (3, 0, 0)) { + box = OS.gtk_box_new (OS.GTK_ORIENTATION_HORIZONTAL, 0); + OS.gtk_box_set_homogeneous (box, false); + } else { + box = OS.gtk_hbox_new (false, 0); + } if (box == 0) error (SWT.ERROR_NO_HANDLES); int /*long*/ label = OS.gtk_label_new (buffer); if (label == 0) error (SWT.ERROR_NO_HANDLES); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java index 5b4887b7f9..c515ebaf77 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java @@ -130,7 +130,7 @@ void createHandle (int index) { fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0); if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES); gtk_widget_set_has_window (fixedHandle, true); - handle = OS.gtk_vbox_new (false, 0); + handle = gtk_box_new (OS.GTK_ORIENTATION_VERTICAL, false, 0); if (handle == 0) error (SWT.ERROR_NO_HANDLES); if ((style & SWT.V_SCROLL) != 0) { scrolledHandle = OS.gtk_scrolled_window_new (0, 0); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandItem.java index d312929e94..311e6b802b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandItem.java @@ -127,7 +127,7 @@ void createHandle (int index) { clientHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0); if (clientHandle == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_container_add (handle, clientHandle); - boxHandle = OS.gtk_hbox_new (false, 4); + boxHandle = gtk_box_new (OS.GTK_ORIENTATION_HORIZONTAL, false, 4); if (boxHandle == 0) error (SWT.ERROR_NO_HANDLES); labelHandle = OS.gtk_label_new (null); if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java index 4885a1b520..d4326cdebb 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java @@ -211,7 +211,7 @@ void createHandle (int index) { } if (handle == 0) error (SWT.ERROR_NO_HANDLES); } else { - handle = OS.gtk_hbox_new (false, 0); + handle = gtk_box_new (OS.GTK_ORIENTATION_HORIZONTAL, false, 0); if (handle == 0) error (SWT.ERROR_NO_HANDLES); labelHandle = OS.gtk_label_new_with_mnemonic (null); if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java index 40c3504191..f05769a34c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java @@ -884,13 +884,15 @@ public void setText (String string) { int /*long*/ label = OS.gtk_bin_get_child (handle); if (label != 0 && OS.GTK_IS_LABEL(label)) { OS.gtk_label_set_text_with_mnemonic (label, buffer); - buffer = Converter.wcsToMbcs (null, accelString, true); - int /*long*/ ptr = OS.g_malloc (buffer.length); - OS.memmove (ptr, buffer, buffer.length); - if (OS.GTK_IS_ACCEL_LABEL(label)) { - int /*long*/ oldPtr = OS.GTK_ACCEL_LABEL_GET_ACCEL_STRING (label); - OS.GTK_ACCEL_LABEL_SET_ACCEL_STRING (label, ptr); - if (oldPtr != 0) OS.g_free (oldPtr); + if (OS.GTK_VERSION < OS.VERSION(3, 0, 0)) { + if (OS.GTK_IS_ACCEL_LABEL(label)) { + buffer = Converter.wcsToMbcs (null, accelString, true); + int /*long*/ ptr = OS.g_malloc (buffer.length); + OS.memmove (ptr, buffer, buffer.length); + int /*long*/ oldPtr = OS.GTK_ACCEL_LABEL_GET_ACCEL_STRING (label); + OS.GTK_ACCEL_LABEL_SET_ACCEL_STRING (label, ptr); + if (oldPtr != 0) OS.g_free (oldPtr); + } } } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scale.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scale.java index 79d7416dd9..4d925481c7 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scale.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scale.java @@ -129,9 +129,9 @@ void createHandle (int index) { int /*long*/ hAdjustment = OS.gtk_adjustment_new (0, 0, 100, 1, 10, 0); if (hAdjustment == 0) error (SWT.ERROR_NO_HANDLES); if ((style & SWT.HORIZONTAL) != 0) { - handle = OS.gtk_hscale_new (hAdjustment); + handle = gtk_scale_new (OS.GTK_ORIENTATION_HORIZONTAL, hAdjustment); } else { - handle = OS.gtk_vscale_new (hAdjustment); + handle = gtk_scale_new (OS.GTK_ORIENTATION_VERTICAL, hAdjustment); } if (handle == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_container_add (fixedHandle, handle); @@ -373,4 +373,17 @@ public void setSelection (int value) { OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED); } +int /*long*/ gtk_scale_new (int orientation, int /*long*/ adjustment) { + int /*long*/ scale = 0; + if (OS.GTK_VERSION >= OS.VERSION(3, 0, 0)) { + scale = OS.gtk_scale_new (orientation, adjustment); + } else { + if (orientation == OS.GTK_ORIENTATION_HORIZONTAL) { + scale = OS.gtk_hscale_new (adjustment); + } else { + scale = OS.gtk_vscale_new (adjustment); + } + } + return scale; +} } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java index 91bc955651..5f1a5416bc 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java @@ -677,7 +677,7 @@ void createHandle (int index) { } else { OS.gtk_window_set_resizable (shellHandle, false); } - vboxHandle = OS.gtk_vbox_new (false, 0); + vboxHandle = gtk_box_new (OS.GTK_ORIENTATION_VERTICAL, false, 0); if (vboxHandle == 0) error (SWT.ERROR_NO_HANDLES); createHandle (index, false, true); OS.gtk_container_add (vboxHandle, scrolledHandle); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Slider.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Slider.java index fb26b7dc08..61a3f21d5e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Slider.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Slider.java @@ -156,9 +156,9 @@ void createHandle (int index) { int /*long*/ hAdjustment = OS.gtk_adjustment_new (0, 0, 100, 1, 10, 10); if (hAdjustment == 0) error (SWT.ERROR_NO_HANDLES); if ((style & SWT.HORIZONTAL) != 0) { - handle = OS.gtk_hscrollbar_new (hAdjustment); + handle = gtk_scrollbar_new (OS.GTK_ORIENTATION_HORIZONTAL, hAdjustment); } else { - handle = OS.gtk_vscrollbar_new (hAdjustment); + handle = gtk_scrollbar_new (OS.GTK_ORIENTATION_VERTICAL, hAdjustment); } if (handle == 0) error (SWT.ERROR_NO_HANDLES); /* @@ -613,4 +613,18 @@ public void setValues (int selection, int minimum, int maximum, int thumb, int i OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED); } +int /*long*/ gtk_scrollbar_new (int orientation, int /*long*/ adjustment) { + int /*long*/ scrollbar = 0; + if (OS.GTK_VERSION >= OS.VERSION(3, 0, 0)) { + scrollbar = OS.gtk_scrollbar_new (orientation, adjustment); + } else { + if (orientation == OS.GTK_ORIENTATION_HORIZONTAL) { + scrollbar = OS.gtk_hscrollbar_new (adjustment); + } else { + scrollbar = OS.gtk_vscrollbar_new (adjustment); + } + } + return scrollbar; +} + } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java index 6e3cb9f984..e8ff75e44b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java @@ -217,7 +217,7 @@ void createItem (TabItem item, int index) { System.arraycopy (items, 0, newItems, 0, items.length); items = newItems; } - int /*long*/ boxHandle = OS.gtk_hbox_new (false, 0); + int /*long*/ boxHandle = gtk_box_new (OS.GTK_ORIENTATION_HORIZONTAL, false, 0); if (boxHandle == 0) error (SWT.ERROR_NO_HANDLES); int /*long*/ labelHandle = OS.gtk_label_new_with_mnemonic (null); if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java index 3aca800842..70621ce8c7 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java @@ -519,18 +519,18 @@ void createColumn (TableColumn column, int index) { TableItem item = items [i]; if (item != null) { int /*long*/ oldItem = item.handle; - /* the first three columns contain int values, subsequent columns contain pointers */ - for (int j=0; j<3; j++) { + /* the columns before FOREGROUND_COLUMN contain int values, subsequent columns contain pointers */ + for (int j=0; j<FOREGROUND_COLUMN; j++) { OS.gtk_tree_model_get (oldModel, oldItem, j, ptr1, -1); OS.gtk_list_store_set (newModel, newItem, j, ptr1 [0], -1); } - for (int j=3; j<modelLength; j++) { + for (int j=FOREGROUND_COLUMN; j<modelLength; j++) { OS.gtk_tree_model_get (oldModel, oldItem, j, ptr, -1); OS.gtk_list_store_set (newModel, newItem, j, ptr [0], -1); - if (types [j] == OS.G_TYPE_STRING ()) { - OS.g_free ((ptr [0])); - } else if (ptr [0] != 0) { - if (types [j] == OS.GDK_TYPE_COLOR()) { + if (ptr [0] != 0) { + if (types [j] == OS.G_TYPE_STRING ()) { + OS.g_free ((ptr [0])); + } else if (types [j] == OS.GDK_TYPE_COLOR()) { OS.gdk_color_free (ptr [0]); } else if (types [j] == OS.GDK_TYPE_PIXBUF()) { OS.g_object_unref (ptr [0]); @@ -658,7 +658,7 @@ void createItem (TableColumn column, int index) { } else { createColumn (column, index); } - int /*long*/ boxHandle = OS.gtk_hbox_new (false, 3); + int /*long*/ boxHandle = gtk_box_new (OS.GTK_ORIENTATION_HORIZONTAL, false, 3); if (boxHandle == 0) error (SWT.ERROR_NO_HANDLES); int /*long*/ labelHandle = OS.gtk_label_new_with_mnemonic (null); if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES); @@ -962,12 +962,12 @@ void destroyItem (TableColumn column) { TableItem item = items [i]; if (item != null) { int /*long*/ oldItem = item.handle; - /* the first three columns contain int values, subsequent columns contain pointers */ - for (int j=0; j<3; j++) { + /* the columns before FOREGROUND_COLUMN contain int values, subsequent columns contain pointers */ + for (int j=0; j<FOREGROUND_COLUMN; j++) { OS.gtk_tree_model_get (oldModel, oldItem, j, ptr1, -1); OS.gtk_list_store_set (newModel, newItem, j, ptr1 [0], -1); } - for (int j=3; j<FIRST_COLUMN; j++) { + for (int j=FOREGROUND_COLUMN; j<FIRST_COLUMN; j++) { OS.gtk_tree_model_get (oldModel, oldItem, j, ptr, -1); OS.gtk_list_store_set (newModel, newItem, j, ptr [0], -1); if (ptr [0] != 0) { @@ -1009,11 +1009,11 @@ void destroyItem (TableColumn column) { if (item != null) { int /*long*/ iter = item.handle; int modelIndex = column.modelIndex; - OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_PIXBUF, 0, -1); - OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_TEXT, 0, -1); - OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_FOREGROUND, 0, -1); - OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_BACKGROUND, 0, -1); - OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_FONT, 0, -1); + OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_PIXBUF, (int /*long*/)0, -1); + OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_TEXT, (int /*long*/)0, -1); + OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_FOREGROUND, (int /*long*/)0, -1); + OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_BACKGROUND, (int /*long*/)0, -1); + OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_FONT, (int /*long*/)0, -1); Font [] cellFont = item.cellFont; if (cellFont != null) { @@ -1136,13 +1136,10 @@ public Rectangle getClientArea () { int [] fixedX = new int [1], fixedY = new int [1]; OS.gdk_window_get_origin (fixedWindow, fixedX, fixedY); int /*long*/ clientHandle = clientHandle (); - int width = 0, height = 0; - if ((state & ZERO_WIDTH) == 0) { - GtkAllocation allocation = new GtkAllocation (); - gtk_widget_get_allocation (clientHandle, allocation); - width = allocation.width; - height = allocation.height; - } + GtkAllocation allocation = new GtkAllocation (); + gtk_widget_get_allocation (clientHandle, allocation); + int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width; + int height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height; return new Rectangle (fixedX [0] - binX [0], fixedY [0] - binY [0], width, height); } @@ -1979,14 +1976,14 @@ int /*long*/ gtk_row_activated (int /*long*/ tree, int /*long*/ path, int /*long return 0; } -int gtk_row_deleted (int model, int path) { +int /*long*/ gtk_row_deleted (int /*long*/ model, int /*long*/ path) { if (ignoreAccessibility) { OS.g_signal_stop_emission_by_name (model, OS.row_deleted); } return 0; } -int gtk_row_inserted (int model, int path, int iter) { +int /*long*/ gtk_row_inserted (int /*long*/ model, int /*long*/ path, int /*long*/ iter) { if (ignoreAccessibility) { OS.g_signal_stop_emission_by_name (model, OS.row_inserted); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java index f1fc5aaa52..7eb81b0adf 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java @@ -214,9 +214,13 @@ void clear () { if (parent.currentItem == this) return; if (cached || (parent.style & SWT.VIRTUAL) == 0) { int columnCount = OS.gtk_tree_model_get_n_columns (parent.modelHandle); - for (int i=0; i<columnCount; i++) { + /* the columns before FOREGROUND_COLUMN contain int values, subsequent columns contain pointers */ + for (int i=Table.CHECKED_COLUMN; i<Table.FOREGROUND_COLUMN; i++) { OS.gtk_list_store_set (parent.modelHandle, handle, i, 0, -1); } + for (int i=Table.FOREGROUND_COLUMN; i<columnCount; i++) { + OS.gtk_list_store_set (parent.modelHandle, handle, i, (int /*long*/)0, -1); + } /* * Bug in GTK. When using fixed-height-mode, * row changes do not cause the row to be repainted. The fix is to diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java index b6ae773f1f..742d742ead 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java @@ -215,7 +215,7 @@ void createHandle (int index) { */ handle = OS.gtk_tool_button_new (0, null); if (handle == 0) error (SWT.ERROR_NO_HANDLES); - arrowBoxHandle = OS.gtk_hbox_new (false, 0); + arrowBoxHandle = gtk_box_new (OS.GTK_ORIENTATION_HORIZONTAL, false, 0); if (arrowBoxHandle == 0) error(SWT.ERROR_NO_HANDLES); arrowHandle = OS.gtk_arrow_new (OS.GTK_ARROW_DOWN, OS.GTK_SHADOW_NONE); if (arrowHandle == 0) error (SWT.ERROR_NO_HANDLES); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java index 94a93419ff..f3a061833a 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java @@ -564,18 +564,18 @@ void copyModel (int /*long*/ oldModel, int oldStart, int /*long*/ newModel, int if (item != null) { int /*long*/ oldItem = item.handle; oldItems[oldIndex++] = oldItem; - /* the first three columns contain int values, subsequent columns contain pointers */ - for (int j = 0; j < 3; j++) { + /* the columns before FOREGROUND_COLUMN contain int values, subsequent columns contain pointers */ + for (int j = 0; j < FOREGROUND_COLUMN; j++) { OS.gtk_tree_model_get (oldModel, oldItem, j, ptr1, -1); OS.gtk_tree_store_set (newModel, newItem, j, ptr1 [0], -1); } - for (int j = 3; j < FIRST_COLUMN; j++) { + for (int j = FOREGROUND_COLUMN; j < FIRST_COLUMN; j++) { OS.gtk_tree_model_get (oldModel, oldItem, j, ptr, -1); OS.gtk_tree_store_set (newModel, newItem, j, ptr [0], -1); - if (types [j] == OS.G_TYPE_STRING ()) { - OS.g_free ((ptr [0])); - } else if (ptr[0] != 0) { - if (types[j] == OS.GDK_TYPE_COLOR()) { + if (ptr [0] != 0) { + if (types [j] == OS.G_TYPE_STRING ()) { + OS.g_free ((ptr [0])); + } else if (types[j] == OS.GDK_TYPE_COLOR()) { OS.gdk_color_free(ptr[0]); } else if (types[j] == OS.GDK_TYPE_PIXBUF()) { OS.g_object_unref(ptr[0]); @@ -585,16 +585,17 @@ void copyModel (int /*long*/ oldModel, int oldStart, int /*long*/ newModel, int } } for (int j= 0; j<modelLength - FIRST_COLUMN; j++) { + int newIndex = newStart + j; OS.gtk_tree_model_get (oldModel, oldItem, oldStart + j, ptr, -1); - OS.gtk_tree_store_set (newModel, newItem, newStart + j, ptr [0], -1); - if (types [j] == OS.G_TYPE_STRING ()) { - OS.g_free ((ptr [0])); - } else if (ptr[0] != 0) { - if (types[j] == OS.GDK_TYPE_COLOR()) { + OS.gtk_tree_store_set (newModel, newItem, newIndex, ptr [0], -1); + if (ptr[0] != 0) { + if (types [newIndex] == OS.G_TYPE_STRING ()) { + OS.g_free ((ptr [0])); + } else if (types[newIndex] == OS.GDK_TYPE_COLOR()) { OS.gdk_color_free(ptr[0]); - } else if (types[j] == OS.GDK_TYPE_PIXBUF()) { + } else if (types[newIndex] == OS.GDK_TYPE_PIXBUF()) { OS.g_object_unref(ptr[0]); - } else if (types[j] == OS.PANGO_TYPE_FONT_DESCRIPTION()) { + } else if (types[newIndex] == OS.PANGO_TYPE_FONT_DESCRIPTION()) { OS.pango_font_description_free(ptr[0]); } } @@ -768,7 +769,7 @@ void createItem (TreeColumn column, int index) { } else { createColumn (column, index); } - int /*long*/ boxHandle = OS.gtk_hbox_new (false, 3); + int /*long*/ boxHandle = gtk_box_new (OS.GTK_ORIENTATION_HORIZONTAL, false, 3); if (boxHandle == 0) error (SWT.ERROR_NO_HANDLES); int /*long*/ labelHandle = OS.gtk_label_new_with_mnemonic (null); if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES); @@ -1007,11 +1008,11 @@ void destroyItem (TreeColumn column) { if (item != null) { int /*long*/ iter = item.handle; int modelIndex = column.modelIndex; - OS.gtk_tree_store_set (modelHandle, iter, modelIndex + CELL_PIXBUF, 0, -1); - OS.gtk_tree_store_set (modelHandle, iter, modelIndex + CELL_TEXT, 0, -1); - OS.gtk_tree_store_set (modelHandle, iter, modelIndex + CELL_FOREGROUND, 0, -1); - OS.gtk_tree_store_set (modelHandle, iter, modelIndex + CELL_BACKGROUND, 0, -1); - OS.gtk_tree_store_set (modelHandle, iter, modelIndex + CELL_FONT, 0, -1); + OS.gtk_tree_store_set (modelHandle, iter, modelIndex + CELL_PIXBUF, (int /*long*/)0, -1); + OS.gtk_tree_store_set (modelHandle, iter, modelIndex + CELL_TEXT, (int /*long*/)0, -1); + OS.gtk_tree_store_set (modelHandle, iter, modelIndex + CELL_FOREGROUND, (int /*long*/)0, -1); + OS.gtk_tree_store_set (modelHandle, iter, modelIndex + CELL_BACKGROUND, (int /*long*/)0, -1); + OS.gtk_tree_store_set (modelHandle, iter, modelIndex + CELL_FONT, (int /*long*/)0, -1); Font [] cellFont = item.cellFont; if (cellFont != null) { @@ -1130,13 +1131,10 @@ public Rectangle getClientArea () { int [] fixedX = new int [1], fixedY = new int [1]; OS.gdk_window_get_origin (fixedWindow, fixedX, fixedY); int /*long*/ clientHandle = clientHandle (); - int height = 0, width = 0; - if ((state & ZERO_WIDTH) == 0) { - GtkAllocation allocation = new GtkAllocation (); - gtk_widget_get_allocation (clientHandle, allocation); - width = allocation.width; - height = allocation.height; - } + GtkAllocation allocation = new GtkAllocation (); + gtk_widget_get_allocation (clientHandle, allocation); + int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width; + int height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height; return new Rectangle (fixedX [0] - binX [0], fixedY [0] - binY [0], width, height); } @@ -1988,14 +1986,14 @@ int /*long*/ gtk_row_activated (int /*long*/ tree, int /*long*/ path, int /*long return 0; } -int gtk_row_deleted (int model, int path) { +int /*long*/ gtk_row_deleted (int /*long*/ model, int /*long*/ path) { if (ignoreAccessibility) { OS.g_signal_stop_emission_by_name (model, OS.row_deleted); } return 0; } -int gtk_row_inserted (int model, int path, int iter) { +int /*long*/ gtk_row_inserted (int /*long*/ model, int /*long*/ path, int /*long*/ iter) { if (ignoreAccessibility) { OS.g_signal_stop_emission_by_name (model, OS.row_inserted); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java index 98f73da4c0..7b07001b15 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java @@ -295,9 +295,13 @@ void clear () { if (parent.currentItem == this) return; if (cached || (parent.style & SWT.VIRTUAL) == 0) { int columnCount = OS.gtk_tree_model_get_n_columns (parent.modelHandle); - for (int i=Tree.CHECKED_COLUMN; i<columnCount; i++) { + /* the columns before FOREGROUND_COLUMN contain int values, subsequent columns contain pointers */ + for (int i=Tree.CHECKED_COLUMN; i<Tree.FOREGROUND_COLUMN; i++) { OS.gtk_tree_store_set (parent.modelHandle, handle, i, 0, -1); } + for (int i=Tree.FOREGROUND_COLUMN; i<columnCount; i++) { + OS.gtk_tree_store_set (parent.modelHandle, handle, i, (int /*long*/)0, -1); + } /* * Bug in GTK. When using fixed-height-mode, * row changes do not cause the row to be repainted. The fix is to diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java index 465a0f733e..5161141007 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java @@ -1826,7 +1826,7 @@ void gdk_pixmap_get_size (int /*long*/ pixmap, int[] width, int[] height) { } void gdk_window_get_size (int /*long*/ drawable, int[] width, int[] height) { - if (OS.GTK_VERSION >= OS.VERSION(2, 24, 0)) { + if (OS.GTK_VERSION >= OS.VERSION (2, 24, 0)) { width[0] = OS.gdk_window_get_width (drawable); height[0] = OS.gdk_window_get_height (drawable); } else { @@ -1834,6 +1834,21 @@ void gdk_window_get_size (int /*long*/ drawable, int[] width, int[] height) { } } +int /*long*/ gtk_box_new (int orientation, boolean homogeneous, int spacing) { + int /*long*/ box = 0; + if (OS.GTK_VERSION >= OS.VERSION (3, 0, 0)) { + box = OS.gtk_box_new (orientation, spacing); + OS.gtk_box_set_homogeneous (box, homogeneous); + } else { + if (orientation == OS.GTK_ORIENTATION_HORIZONTAL) { + box = OS.gtk_hbox_new (homogeneous, spacing); + } else { + box = OS.gtk_vbox_new (homogeneous, spacing); + } + } + return box; +} + /** * Returns a string containing a concise, human-readable * description of the receiver. diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet160.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet160.java index ba660d056c..053f05d28f 100644 --- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet160.java +++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet160.java @@ -11,10 +11,10 @@ package org.eclipse.swt.snippets; /* - * Browser example snippet: query DOM node value (pre-eclipse/swt 3.5 implementation) - * An improved implementation of this snippet that can be used with eclipse/swt 3.5 - * and newer is available at - * http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet308.java?view=co + * Browser example snippet: query DOM node value (Eclipse/SWT 3.4 and earlier). + * For an improved implementation of this snippet that can be used with Eclipse/SWT 3.5 + * and newer see + * http://git.eclipse.org/c/platform/eclipse.platform.swt.git/tree/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet308.java * * For a list of all SWT example snippets see * http://www.eclipse.org/swt/snippets/ diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet303.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet303.java index 353ac5e9a3..8f961762be 100644 --- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet303.java +++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet303.java @@ -12,9 +12,12 @@ package org.eclipse.swt.snippets; /* * Browser example snippet: listen for DOM mousedown events with javascript + * (Eclipse/SWT 3.4 and earlier). For an improved implementation of this + * snippet that can be used with Eclipse/SWT 3.5 and newer see + * http://git.eclipse.org/c/platform/eclipse.platform.swt.git/tree/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet362.java . * * This snippet works for all supported browser types (ie.- Browsers created with style - * SWT.NONE). For a Browser created with style SWT.MOZILLA the cleaner approach would + * SWT.NONE). For a Browser created with style SWT.MOZILLA an alternate approach would * be to use JavaXPCOM to hook the DOM listeners. * * For a list of all SWT example snippets see diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet308.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet308.java index 3acf5ef186..575c149cd5 100644 --- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet308.java +++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet308.java @@ -11,7 +11,7 @@ package org.eclipse.swt.snippets; /* - * Browser example snippet: query DOM node value (improved implementation for eclipse/swt 3.5 and newer) + * Browser example snippet: query DOM node value (improved implementation for Eclipse/SWT 3.5 and newer). * * For a list of all SWT example snippets see * http://www.eclipse.org/swt/snippets/ diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet362.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet362.java new file mode 100644 index 0000000000..a30b49db43 --- /dev/null +++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet362.java @@ -0,0 +1,70 @@ +/******************************************************************************* + * Copyright (c) 2012 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.swt.snippets; + +/* + * Browser example snippet: listen for DOM mousedown events with javascript (improved + * implementation for Eclipse/SWT 3.5 and newer). + * + * For a list of all SWT example snippets see + * http://www.eclipse.org/swt/snippets/ + */ +import org.eclipse.swt.*; +import org.eclipse.swt.browser.*; +import org.eclipse.swt.layout.*; +import org.eclipse.swt.widgets.*; + +public class Snippet362 { + +public static void main(String [] args) { + final String SCRIPT = "document.onmousedown = function(e) {if (!e) {e = window.event;} if (e) {mouseDownHappened(e.clientX, e.clientY);}}"; + Display display = new Display(); + final Shell shell = new Shell(display); + shell.setLayout(new FillLayout()); + final Browser browser; + try { + browser = new Browser(shell, SWT.NONE); + } catch (SWTError e) { + System.out.println("Could not instantiate Browser: " + e.getMessage()); + display.dispose(); + return; + } + final BrowserFunction function = new CustomFunction (browser, "mouseDownHappened"); + browser.addProgressListener (new ProgressAdapter () { + public void completed (ProgressEvent event) { + browser.execute(SCRIPT); + browser.addLocationListener (new LocationAdapter () { + public void changed (LocationEvent event) { + browser.removeLocationListener (this); + function.dispose (); + } + }); + } + }); + + browser.setUrl("eclipse.org"); + shell.open(); + while (!shell.isDisposed()) { + if (!display.readAndDispatch()) display.sleep(); + } + display.dispose(); +} + +static class CustomFunction extends BrowserFunction { + CustomFunction (Browser browser, String name) { + super (browser, name); + } + public Object function (Object[] arguments) { + System.out.println ("mouseDown: " + ((Number)arguments[0]).intValue() + "," + ((Number)arguments[1]).intValue()); + return null; + } +} +} diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Display.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Display.java index 5ef2020718..d087b17caa 100644 --- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Display.java +++ b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Display.java @@ -719,15 +719,15 @@ public void test_postLorg_eclipse_swt_widgets_Event() { // Test key events (down/up) event = new Event(); -// event.type = SWT.KeyDown; -// event.keyCode = -1; // bogus key code -// assertTrue(display.post(event)); // uses default 0 character -// // don't test KeyDown/KeyUp with a character to avoid sending to -// // random window if test shell looses focus -// -// event = new Event(); -// event.type = SWT.KeyUp; -// assertTrue(display.post(event)); + event.type = SWT.KeyDown; + event.keyCode = -1; // bogus key code + assertTrue(display.post(event)); // uses default 0 character + // don't test KeyDown/KeyUp with a character to avoid sending to + // random window if test shell looses focus + + event = new Event(); + event.type = SWT.KeyUp; + assertTrue(display.post(event)); event.type = SWT.KeyDown; event.keyCode = KEYCODE; |