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 e39800b2c05..5d8128a13b0 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 @@ -6878,6 +6878,16 @@ JNIEXPORT void JNICALL GTK_NATIVE(gtk_1scrolled_1window_1set_1hadjustment) } #endif +#ifndef NO_gtk_1scrolled_1window_1set_1overlay_1scrolling +JNIEXPORT void JNICALL GTK_NATIVE(gtk_1scrolled_1window_1set_1overlay_1scrolling) + (JNIEnv *env, jclass that, jlong arg0, jboolean arg1) +{ + GTK_NATIVE_ENTER(env, that, gtk_1scrolled_1window_1set_1overlay_1scrolling_FUNC); + gtk_scrolled_window_set_overlay_scrolling((GtkScrolledWindow *)arg0, arg1); + GTK_NATIVE_EXIT(env, that, gtk_1scrolled_1window_1set_1overlay_1scrolling_FUNC); +} +#endif + #ifndef NO_gtk_1scrolled_1window_1set_1policy JNIEXPORT void JNICALL GTK_NATIVE(gtk_1scrolled_1window_1set_1policy) (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2) 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 e9ae5fd095c..db6d165a171 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 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2023 IBM Corporation and others. All rights reserved. + * Copyright (c) 2000, 2024 IBM Corporation and others. All rights reserved. * The contents of this file are made available under the terms * of the GNU Lesser General Public License (LGPL) Version 2.1 that * accompanies this distribution (lgpl-v21.txt). The LGPL is also @@ -553,6 +553,7 @@ typedef enum { gtk_1scrolled_1window_1get_1vadjustment_FUNC, gtk_1scrolled_1window_1get_1vscrollbar_FUNC, gtk_1scrolled_1window_1set_1hadjustment_FUNC, + gtk_1scrolled_1window_1set_1overlay_1scrolling_FUNC, gtk_1scrolled_1window_1set_1policy_FUNC, gtk_1scrolled_1window_1set_1vadjustment_FUNC, gtk_1search_1entry_1new_FUNC, diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java index 859be7e9b3a..38e077c4972 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java @@ -1469,6 +1469,8 @@ public class GTK extends OS { public static final native void gtk_scrolled_window_set_policy(long scrolled_window, int hscrollbar_policy, int vscrollbar_policy); /** @param scrolled_window cast=(GtkScrolledWindow *) */ public static final native boolean gtk_scrolled_window_get_overlay_scrolling(long scrolled_window); + /** @param scrolled_window cast=(GtkScrolledWindow *) */ + public static final native void gtk_scrolled_window_set_overlay_scrolling(long scrolled_window, boolean overlay_scrolling); /** * @param scrolled_window cast=(GtkScrolledWindow *) * @param adjustment cast=(GtkAdjustment *) diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java index c2fac26d1ae..b37487f034f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java @@ -252,6 +252,30 @@ public int getScrollbarsMode () { return style; } +/** + * Sets the mode of the receiver's scrollbars. This will be + * bitwise OR of one or more of the constants defined in class + * SWT.
+ * + * + * @exception SWTException + * + * @see SWT#SCROLLBAR_OVERLAY + * @since 3.126 + */ +public void setScrollbarsMode (int mode) { + checkWidget(); +} + /** * Returns the receiver's vertical scroll bar if it has * one, and null if it does not. diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java index 9eb7404950b..340c3ba068e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java @@ -313,6 +313,31 @@ public int getScrollbarsMode () { } return SWT.NONE; } +/** + * Sets the mode of the receiver's scrollbars. This will be + * bitwise OR of one or more of the constants defined in class + * SWT.
+ * + * + * @exception SWTException + * + * @see SWT#SCROLLBAR_OVERLAY + * @since 3.126 + */ +public void setScrollbarsMode (int mode) { + checkWidget(); + boolean overlayScrolling = (mode & SWT.SCROLLBAR_OVERLAY) != 0; + GTK.gtk_scrolled_window_set_overlay_scrolling(scrolledHandle, overlayScrolling); +} /** * Returns the receiver's vertical scroll bar if it has * one, and null if it does not. diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java index 2b28e5aee3c..ceb12219aa3 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java @@ -276,6 +276,31 @@ public int getScrollbarsMode () { return SWT.NONE; } +/** + * Sets the mode of the receiver's scrollbars. This will be + * bitwise OR of one or more of the constants defined in class + * SWT.
+ * + * + * @exception SWTException + * + * @see SWT#SCROLLBAR_OVERLAY + * + * @since 3.126 + */ +public void setScrollbarsMode (int mode) { + checkWidget(); +} + /** * Returns the receiver's vertical scroll bar if it has * one, and null if it does not.