aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnatoly Spektor2012-08-16 10:43:52 (EDT)
committerSilenio Quarti2012-08-16 15:46:17 (EDT)
commita215b82e21c4662f93a9c3b2b1fa9b09bb89fa3f (patch)
treef6ecebcfaf4a5754e32278cbc1ed66b764b43c88
parentc727147cfc912981c3a3385133f2828fe1d74e9b (diff)
downloadeclipse.platform.swt-a215b82e21c4662f93a9c3b2b1fa9b09bb89fa3f.zip
eclipse.platform.swt-a215b82e21c4662f93a9c3b2b1fa9b09bb89fa3f.tar.gz
eclipse.platform.swt-a215b82e21c4662f93a9c3b2b1fa9b09bb89fa3f.tar.bz2
Omit use of GTK_RANGE_HAS_STEPPER_A,B,C,D constants for newer GTK+
Conflicts: bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c48
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ScrollBar.java13
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 37e7de3..12cff6d 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 d66a7c7..69b4454 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 aeb340c..657e025 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 6b46369..e97f220 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 597a56c..312603a 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 fecf64e..f738c23 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) {