diff options
author | Anatoly Spektor <aspektor@redhat.com> | 2012-08-16 16:13:58 -0400 |
---|---|---|
committer | Anatoly Spektor <aspektor@redhat.com> | 2012-08-16 16:13:58 -0400 |
commit | 2d5e716dffd4dddfb3899a221100868813e35d21 (patch) | |
tree | 9999b757eaba65907106f29726e4a745bd7ea842 | |
parent | 99e2cd5c57f5e0088828f77a6ce683637583beb4 (diff) | |
parent | a215b82e21c4662f93a9c3b2b1fa9b09bb89fa3f (diff) | |
download | eclipse.platform.swt-2d5e716dffd4dddfb3899a221100868813e35d21.tar.gz eclipse.platform.swt-2d5e716dffd4dddfb3899a221100868813e35d21.tar.xz eclipse.platform.swt-2d5e716dffd4dddfb3899a221100868813e35d21.zip |
Merge branch 'master' of http://git.eclipse.org/gitroot/platform/eclipse.platform.swt.git
6 files changed, 15 insertions, 74 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c index 37e7de34e8..12cff6d853 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c @@ -149,54 +149,6 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(GTK_1ENTRY_1IM_1CONTEXT) } #endif -#ifndef NO_GTK_1RANGE_1HAS_1STEPPER_1A -JNIEXPORT jboolean JNICALL OS_NATIVE(GTK_1RANGE_1HAS_1STEPPER_1A) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jboolean rc = 0; - OS_NATIVE_ENTER(env, that, GTK_1RANGE_1HAS_1STEPPER_1A_FUNC); - rc = (jboolean)GTK_RANGE_HAS_STEPPER_A((GtkRange *)arg0); - OS_NATIVE_EXIT(env, that, GTK_1RANGE_1HAS_1STEPPER_1A_FUNC); - return rc; -} -#endif - -#ifndef NO_GTK_1RANGE_1HAS_1STEPPER_1B -JNIEXPORT jboolean JNICALL OS_NATIVE(GTK_1RANGE_1HAS_1STEPPER_1B) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jboolean rc = 0; - OS_NATIVE_ENTER(env, that, GTK_1RANGE_1HAS_1STEPPER_1B_FUNC); - rc = (jboolean)GTK_RANGE_HAS_STEPPER_B((GtkRange *)arg0); - OS_NATIVE_EXIT(env, that, GTK_1RANGE_1HAS_1STEPPER_1B_FUNC); - return rc; -} -#endif - -#ifndef NO_GTK_1RANGE_1HAS_1STEPPER_1C -JNIEXPORT jboolean JNICALL OS_NATIVE(GTK_1RANGE_1HAS_1STEPPER_1C) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jboolean rc = 0; - OS_NATIVE_ENTER(env, that, GTK_1RANGE_1HAS_1STEPPER_1C_FUNC); - rc = (jboolean)GTK_RANGE_HAS_STEPPER_C((GtkRange *)arg0); - OS_NATIVE_EXIT(env, that, GTK_1RANGE_1HAS_1STEPPER_1C_FUNC); - return rc; -} -#endif - -#ifndef NO_GTK_1RANGE_1HAS_1STEPPER_1D -JNIEXPORT jboolean JNICALL OS_NATIVE(GTK_1RANGE_1HAS_1STEPPER_1D) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jboolean rc = 0; - OS_NATIVE_ENTER(env, that, GTK_1RANGE_1HAS_1STEPPER_1D_FUNC); - rc = (jboolean)GTK_RANGE_HAS_STEPPER_D((GtkRange *)arg0); - OS_NATIVE_EXIT(env, that, GTK_1RANGE_1HAS_1STEPPER_1D_FUNC); - return rc; -} -#endif - #ifndef NO_GTK_1RANGE_1SLIDER_1END JNIEXPORT jint JNICALL OS_NATIVE(GTK_1RANGE_1SLIDER_1END) (JNIEnv *env, jclass that, jintLong arg0) 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 d66a7c730c..69b44542ef 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 @@ -382,10 +382,6 @@ #else #define GTK_RANGE_SLIDER_END(arg0) (arg0)->slider_end #endif -#define GTK_RANGE_HAS_STEPPER_A(arg0) (arg0)->has_stepper_a -#define GTK_RANGE_HAS_STEPPER_B(arg0) (arg0)->has_stepper_b -#define GTK_RANGE_HAS_STEPPER_C(arg0) (arg0)->has_stepper_c -#define GTK_RANGE_HAS_STEPPER_D(arg0) (arg0)->has_stepper_d #if GTK_CHECK_VERSION(2,8,0) #define GTK_SCROLLED_WINDOW_HSCROLLBAR(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 aeb340c4a1..657e02529d 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 = 1337; -int OS_nativeFunctionCallCount[1337]; +int OS_nativeFunctionCount = 1333; +int OS_nativeFunctionCallCount[1333]; char * OS_nativeFunctionNames[] = { #ifndef JNI64 "Call__IIII", @@ -39,10 +39,6 @@ char * OS_nativeFunctionNames[] = { "GTK_1ACCEL_1LABEL_1GET_1ACCEL_1STRING", "GTK_1ACCEL_1LABEL_1SET_1ACCEL_1STRING", "GTK_1ENTRY_1IM_1CONTEXT", - "GTK_1RANGE_1HAS_1STEPPER_1A", - "GTK_1RANGE_1HAS_1STEPPER_1B", - "GTK_1RANGE_1HAS_1STEPPER_1C", - "GTK_1RANGE_1HAS_1STEPPER_1D", "GTK_1RANGE_1SLIDER_1END", "GTK_1RANGE_1SLIDER_1START", "GTK_1SCROLLED_1WINDOW_1HSCROLLBAR", 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 6b46369112..e97f22092c 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 @@ -47,10 +47,6 @@ typedef enum { GTK_1ACCEL_1LABEL_1GET_1ACCEL_1STRING_FUNC, GTK_1ACCEL_1LABEL_1SET_1ACCEL_1STRING_FUNC, GTK_1ENTRY_1IM_1CONTEXT_FUNC, - GTK_1RANGE_1HAS_1STEPPER_1A_FUNC, - GTK_1RANGE_1HAS_1STEPPER_1B_FUNC, - GTK_1RANGE_1HAS_1STEPPER_1C_FUNC, - GTK_1RANGE_1HAS_1STEPPER_1D_FUNC, GTK_1RANGE_1SLIDER_1END_FUNC, GTK_1RANGE_1SLIDER_1START_FUNC, GTK_1SCROLLED_1WINDOW_1HSCROLLBAR_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 597a56c91a..312603a2b1 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 @@ -563,6 +563,10 @@ public class OS extends C { public static final byte[] gtk_menu_bar_accel = ascii("gtk-menu-bar-accel"); public static final byte[] gtk_menu_images = ascii("gtk-menu-images"); public static final byte[] inner_border = ascii("inner-border"); + public static final byte[] has_backward_stepper = ascii("has-backward-stepper"); + public static final byte[] has_secondary_backward_stepper = ascii("has-secondary-backward-stepper"); + public static final byte[] has_forward_stepper = ascii("has-forward-stepper"); + public static final byte[] has_secondary_forward_stepper = ascii("has-secondary-forward-stepper"); public static final byte[] horizontal_separator = ascii("horizontal-separator"); public static final byte[] inconsistent = ascii("inconsistent"); public static final byte[] indicator_size = ascii("indicator-size"); @@ -703,14 +707,6 @@ public static final native int GTK_WIDGET_Y(int /*long*/ widget); public static final native int GTK_RANGE_SLIDER_START(int /*long*/ widget); /** @param widget cast=(GtkRange *) */ public static final native int GTK_RANGE_SLIDER_END(int /*long*/ widget); -/** @param widget cast=(GtkRange *) */ -public static final native boolean GTK_RANGE_HAS_STEPPER_A(int /*long*/ widget); -/** @param widget cast=(GtkRange *) */ -public static final native boolean GTK_RANGE_HAS_STEPPER_B(int /*long*/ widget); -/** @param widget cast=(GtkRange *) */ -public static final native boolean GTK_RANGE_HAS_STEPPER_C(int /*long*/ widget); -/** @param widget cast=(GtkRange *) */ -public static final native boolean GTK_RANGE_HAS_STEPPER_D(int /*long*/ widget); /** @param widget cast=(GtkScrolledWindow *) */ public static final native int /*long*/ GTK_SCROLLED_WINDOW_HSCROLLBAR(int /*long*/ widget); /** @param widget cast=(GtkScrolledWindow *) */ diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ScrollBar.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ScrollBar.java index fecf64eba9..f738c23278 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ScrollBar.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ScrollBar.java @@ -396,10 +396,15 @@ public Rectangle getThumbBounds () { public Rectangle getThumbTrackBounds () { checkWidget(); int x = 0, y = 0, width, height; - boolean hasA = OS.GTK_RANGE_HAS_STEPPER_A (handle); - boolean hasB = OS.GTK_RANGE_HAS_STEPPER_B (handle); - boolean hasC = OS.GTK_RANGE_HAS_STEPPER_C (handle); - boolean hasD = OS.GTK_RANGE_HAS_STEPPER_D (handle); + int[] has_stepper = new int[1]; + OS.gtk_widget_style_get (handle, OS.has_backward_stepper, has_stepper, 0); + boolean hasA = has_stepper[0] != 0; + OS.gtk_widget_style_get (handle, OS.has_secondary_backward_stepper, has_stepper, 0); + boolean hasB = has_stepper[0] != 0; + OS.gtk_widget_style_get (handle, OS.has_forward_stepper, has_stepper, 0); + boolean hasC = has_stepper[0] != 0; + OS.gtk_widget_style_get (handle, OS.has_secondary_forward_stepper, has_stepper, 0); + boolean hasD = has_stepper[0] != 0; GtkAllocation allocation = new GtkAllocation (); int stepperSize = 0; if ((style & SWT.VERTICAL) != 0) { |