RangeProtocol

public protocol RangeProtocol : OrientableProtocol, WidgetProtocol

GtkRange is the common base class for widgets which visualize an adjustment, e.g GtkScale or GtkScrollbar.

Apart from signals for monitoring the parameters of the adjustment, GtkRange provides properties and methods for influencing the sensitivity of the “steppers”. It also provides properties and methods for setting a “fill level” on range widgets. See gtk_range_set_fill_level().

The RangeProtocol protocol exposes the methods and properties of an underlying GtkRange instance. The default implementation of these can be found in the protocol extension below. For a concrete class that implements these methods and properties, see Range. Alternatively, use RangeRef as a lighweight, unowned reference if you already have an instance you just want to use.

  • ptr

    Untyped pointer to the underlying GtkRange instance.

    Declaration

    Swift

    var ptr: UnsafeMutableRawPointer! { get }
  • range_ptr Default implementation

    Typed pointer to the underlying GtkRange instance.

    Default Implementation

    Return the stored, untyped pointer as a typed pointer to the GtkRange instance.

    Declaration

    Swift

    var range_ptr: UnsafeMutablePointer<GtkRange>! { get }
  • Required Initialiser for types conforming to RangeProtocol

    Declaration

    Swift

    init(raw: UnsafeMutableRawPointer)

Range Class

  • Bind a RangePropertyName source property to a given target object.

    Declaration

    Swift

    @discardableResult
    @inlinable
    func bind<Q, T>(property source_property: RangePropertyName, to target: T, _ target_property: Q, flags f: BindingFlags = .default, transformFrom transform_from: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }, transformTo transform_to: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }) -> BindingRef! where Q : PropertyNameProtocol, T : ObjectProtocol

    Parameters

    source_property

    the source property to bind

    target

    the target object to bind to

    target_property

    the target property to bind to

    flags

    the flags to pass to the Binding

    transform_from

    ValueTransformer to use for forward transformation

    transform_to

    ValueTransformer to use for backwards transformation

    Return Value

    binding reference or nil in case of an error

  • get(property:) Extension method

    Get the value of a Range property

    Declaration

    Swift

    @inlinable
    func get(property: RangePropertyName) -> GLibObject.Value

    Parameters

    property

    the property to get the value for

    Return Value

    the value of the named property

  • set(property:value:) Extension method

    Set the value of a Range property. Note that this will only have an effect on properties that are writable and not construct-only!

    Declaration

    Swift

    @inlinable
    func set(property: RangePropertyName, value v: GLibObject.Value)

    Parameters

    property

    the property to get the value for

    Return Value

    the value of the named property

Range signals

  • Connect a Swift signal handler to the given, typed RangeSignalName signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func connect(signal s: RangeSignalName, flags f: ConnectFlags = ConnectFlags(0), handler h: @escaping SignalHandler) -> Int

    Parameters

    signal

    The signal to connect

    flags

    The connection flags to use

    data

    A pointer to user data to provide to the callback

    destroyData

    A GClosureNotify C function to destroy the data pointed to by userData

    handler

    The Swift signal handler (function or callback) to invoke on the given signal

    Return Value

    The signal handler ID (always greater than 0 for successful connections)

  • Connect a C signal handler to the given, typed RangeSignalName signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func connect(signal s: RangeSignalName, flags f: ConnectFlags = ConnectFlags(0), data userData: gpointer!, destroyData destructor: GClosureNotify? = nil, signalHandler h: @escaping GCallback) -> Int

    Parameters

    signal

    The signal to connect

    flags

    The connection flags to use

    data

    A pointer to user data to provide to the callback

    destroyData

    A GClosureNotify C function to destroy the data pointed to by userData

    signalHandler

    The C function to be called on the given signal

    Return Value

    The signal handler ID (always greater than 0 for successful connections)

  • Emitted before clamping a value, to give the application a chance to adjust the bounds.

    Note

    This represents the underlying adjust-bounds signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onAdjustBounds(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: RangeRef, _ value: Double) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    value

    the value before we clamp

    handler

    The signal handler to call Run the given callback whenever the adjustBounds signal is emitted

  • adjustBoundsSignal Extension method

    Typed adjust-bounds signal for using the connect(signal:) methods

    Declaration

    Swift

    static var adjustBoundsSignal: RangeSignalName { get }
  • The GtkRange::change-value signal is emitted when a scroll action is performed on a range. It allows an application to determine the type of scroll event that occurred and the resultant new value. The application can handle the event itself and return true to prevent further processing. Or, by returning false, it can pass the event to other handlers until the default GTK+ handler is reached.

    The value parameter is unrounded. An application that overrides the GtkRangechange-value signal is responsible for clamping the value to the desired number of decimal digits; the default GTK+ handler clamps the value based on GtkRange:round-digits.

    Note

    This represents the underlying change-value signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onChangeValue(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: RangeRef, _ scroll: ScrollType, _ value: Double) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    scroll

    the type of scroll action that was performed

    value

    the new value resulting from the scroll action

    handler

    true to prevent other handlers from being invoked for the signal, false to propagate the signal further Run the given callback whenever the changeValue signal is emitted

  • changeValueSignal Extension method

    Typed change-value signal for using the connect(signal:) methods

    Declaration

    Swift

    static var changeValueSignal: RangeSignalName { get }
  • onMoveSlider(flags:handler:) Extension method

    Virtual function that moves the slider. Used for keybindings.

    Note

    This represents the underlying move-slider signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onMoveSlider(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: RangeRef, _ step: ScrollType) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    step

    how to move the slider

    handler

    The signal handler to call Run the given callback whenever the moveSlider signal is emitted

  • moveSliderSignal Extension method

    Typed move-slider signal for using the connect(signal:) methods

    Declaration

    Swift

    static var moveSliderSignal: RangeSignalName { get }
  • Emitted when the range value changes.

    Note

    This represents the underlying value-changed signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onValueChanged(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: RangeRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    handler

    The signal handler to call Run the given callback whenever the valueChanged signal is emitted

  • valueChangedSignal Extension method

    Typed value-changed signal for using the connect(signal:) methods

    Declaration

    Swift

    static var valueChangedSignal: RangeSignalName { get }
  • The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

    Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with G_PARAM_EXPLICIT_NOTIFY, then any call to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.

    This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the g_signal_connect() call, like this:

    (C Language Example):

    g_signal_connect (text_view->buffer, "notify::paste-target-list",
                      G_CALLBACK (gtk_text_view_target_list_notify),
                      text_view)
    

    It is important to note that you must use canonical parameter names as detail strings for the notify signal.

    Note

    This represents the underlying notify::adjustment signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyAdjustment(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: RangeRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyAdjustment signal is emitted

  • notifyAdjustmentSignal Extension method

    Typed notify::adjustment signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyAdjustmentSignal: RangeSignalName { get }
  • The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

    Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with G_PARAM_EXPLICIT_NOTIFY, then any call to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.

    This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the g_signal_connect() call, like this:

    (C Language Example):

    g_signal_connect (text_view->buffer, "notify::paste-target-list",
                      G_CALLBACK (gtk_text_view_target_list_notify),
                      text_view)
    

    It is important to note that you must use canonical parameter names as detail strings for the notify signal.

    Note

    This represents the underlying notify::fill-level signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyFillLevel(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: RangeRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyFillLevel signal is emitted

  • notifyFillLevelSignal Extension method

    Typed notify::fill-level signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyFillLevelSignal: RangeSignalName { get }
  • The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

    Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with G_PARAM_EXPLICIT_NOTIFY, then any call to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.

    This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the g_signal_connect() call, like this:

    (C Language Example):

    g_signal_connect (text_view->buffer, "notify::paste-target-list",
                      G_CALLBACK (gtk_text_view_target_list_notify),
                      text_view)
    

    It is important to note that you must use canonical parameter names as detail strings for the notify signal.

    Note

    This represents the underlying notify::inverted signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyInverted(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: RangeRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyInverted signal is emitted

  • notifyInvertedSignal Extension method

    Typed notify::inverted signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyInvertedSignal: RangeSignalName { get }
  • The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

    Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with G_PARAM_EXPLICIT_NOTIFY, then any call to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.

    This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the g_signal_connect() call, like this:

    (C Language Example):

    g_signal_connect (text_view->buffer, "notify::paste-target-list",
                      G_CALLBACK (gtk_text_view_target_list_notify),
                      text_view)
    

    It is important to note that you must use canonical parameter names as detail strings for the notify signal.

    Note

    This represents the underlying notify::lower-stepper-sensitivity signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyLowerStepperSensitivity(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: RangeRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyLowerStepperSensitivity signal is emitted

  • Typed notify::lower-stepper-sensitivity signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyLowerStepperSensitivitySignal: RangeSignalName { get }
  • The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

    Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with G_PARAM_EXPLICIT_NOTIFY, then any call to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.

    This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the g_signal_connect() call, like this:

    (C Language Example):

    g_signal_connect (text_view->buffer, "notify::paste-target-list",
                      G_CALLBACK (gtk_text_view_target_list_notify),
                      text_view)
    

    It is important to note that you must use canonical parameter names as detail strings for the notify signal.

    Note

    This represents the underlying notify::restrict-to-fill-level signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyRestrictToFillLevel(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: RangeRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyRestrictToFillLevel signal is emitted

  • Typed notify::restrict-to-fill-level signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyRestrictToFillLevelSignal: RangeSignalName { get }
  • The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

    Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with G_PARAM_EXPLICIT_NOTIFY, then any call to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.

    This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the g_signal_connect() call, like this:

    (C Language Example):

    g_signal_connect (text_view->buffer, "notify::paste-target-list",
                      G_CALLBACK (gtk_text_view_target_list_notify),
                      text_view)
    

    It is important to note that you must use canonical parameter names as detail strings for the notify signal.

    Note

    This represents the underlying notify::round-digits signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyRoundDigits(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: RangeRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyRoundDigits signal is emitted

  • notifyRoundDigitsSignal Extension method

    Typed notify::round-digits signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyRoundDigitsSignal: RangeSignalName { get }
  • The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

    Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with G_PARAM_EXPLICIT_NOTIFY, then any call to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.

    This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the g_signal_connect() call, like this:

    (C Language Example):

    g_signal_connect (text_view->buffer, "notify::paste-target-list",
                      G_CALLBACK (gtk_text_view_target_list_notify),
                      text_view)
    

    It is important to note that you must use canonical parameter names as detail strings for the notify signal.

    Note

    This represents the underlying notify::show-fill-level signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyShowFillLevel(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: RangeRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyShowFillLevel signal is emitted

  • notifyShowFillLevelSignal Extension method

    Typed notify::show-fill-level signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyShowFillLevelSignal: RangeSignalName { get }
  • The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

    Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with G_PARAM_EXPLICIT_NOTIFY, then any call to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.

    This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the g_signal_connect() call, like this:

    (C Language Example):

    g_signal_connect (text_view->buffer, "notify::paste-target-list",
                      G_CALLBACK (gtk_text_view_target_list_notify),
                      text_view)
    

    It is important to note that you must use canonical parameter names as detail strings for the notify signal.

    Note

    This represents the underlying notify::upper-stepper-sensitivity signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyUpperStepperSensitivity(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: RangeRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyUpperStepperSensitivity signal is emitted

  • Typed notify::upper-stepper-sensitivity signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyUpperStepperSensitivitySignal: RangeSignalName { get }

Range Class: RangeProtocol extension (methods and fields)

  • getAdjustment() Extension method

    Get the GtkAdjustment which is the “model” object for GtkRange. See gtk_range_set_adjustment() for details. The return value does not have a reference added, so should not be unreferenced.

    Declaration

    Swift

    @inlinable
    func getAdjustment() -> AdjustmentRef!
  • getFillLevel() Extension method

    Gets the current position of the fill level indicator.

    Declaration

    Swift

    @inlinable
    func getFillLevel() -> Double
  • getFlippable() Extension method

    Gets the value set by gtk_range_set_flippable().

    Declaration

    Swift

    @inlinable
    func getFlippable() -> Bool
  • getInverted() Extension method

    Gets the value set by gtk_range_set_inverted().

    Declaration

    Swift

    @inlinable
    func getInverted() -> Bool
  • getLowerStepperSensitivity() Extension method

    Gets the sensitivity policy for the stepper that points to the ‘lower’ end of the GtkRange’s adjustment.

    Declaration

    Swift

    @inlinable
    func getLowerStepperSensitivity() -> GtkSensitivityType
  • getMinSliderSize() Extension method

    This function is useful mainly for GtkRange subclasses.

    See gtk_range_set_min_slider_size().

    get_min_slider_size is deprecated: Use the min-height/min-width CSS properties on the slider node.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getMinSliderSize() -> Int
  • get(rangeRect:) Extension method

    This function returns the area that contains the range’s trough and its steppers, in widget->window coordinates.

    This function is useful mainly for GtkRange subclasses.

    Declaration

    Swift

    @inlinable
    func get<RectangleT>(rangeRect: RectangleT) where RectangleT : RectangleProtocol
  • getRestrictToFillLevel() Extension method

    Gets whether the range is restricted to the fill level.

    Declaration

    Swift

    @inlinable
    func getRestrictToFillLevel() -> Bool
  • getRoundDigits() Extension method

    Gets the number of digits to round the value to when it changes. See GtkRange::change-value.

    Declaration

    Swift

    @inlinable
    func getRoundDigits() -> Int
  • getShowFillLevel() Extension method

    Gets whether the range displays the fill level graphically.

    Declaration

    Swift

    @inlinable
    func getShowFillLevel() -> Bool
  • This function returns sliders range along the long dimension, in widget->window coordinates.

    This function is useful mainly for GtkRange subclasses.

    Declaration

    Swift

    @inlinable
    func getSliderRange(sliderStart: UnsafeMutablePointer<gint>! = nil, sliderEnd: UnsafeMutablePointer<gint>! = nil)
  • getSliderSizeFixed() Extension method

    This function is useful mainly for GtkRange subclasses.

    See gtk_range_set_slider_size_fixed().

    Declaration

    Swift

    @inlinable
    func getSliderSizeFixed() -> Bool
  • getUpperStepperSensitivity() Extension method

    Gets the sensitivity policy for the stepper that points to the ‘upper’ end of the GtkRange’s adjustment.

    Declaration

    Swift

    @inlinable
    func getUpperStepperSensitivity() -> GtkSensitivityType
  • getValue() Extension method

    Gets the current value of the range.

    Declaration

    Swift

    @inlinable
    func getValue() -> Double
  • set(adjustment:) Extension method

    Sets the adjustment to be used as the “model” object for this range widget. The adjustment indicates the current range value, the minimum and maximum range values, the step/page increments used for keybindings and scrolling, and the page size. The page size is normally 0 for GtkScale and nonzero for GtkScrollbar, and indicates the size of the visible area of the widget being scrolled. The page size affects the size of the scrollbar slider.

    Declaration

    Swift

    @inlinable
    func set<AdjustmentT>(adjustment: AdjustmentT) where AdjustmentT : AdjustmentProtocol
  • set(fillLevel:) Extension method

    Set the new position of the fill level indicator.

    The “fill level” is probably best described by its most prominent use case, which is an indicator for the amount of pre-buffering in a streaming media player. In that use case, the value of the range would indicate the current play position, and the fill level would be the position up to which the file/stream has been downloaded.

    This amount of prebuffering can be displayed on the range’s trough and is themeable separately from the trough. To enable fill level display, use gtk_range_set_show_fill_level(). The range defaults to not showing the fill level.

    Additionally, it’s possible to restrict the range’s slider position to values which are smaller than the fill level. This is controller by gtk_range_set_restrict_to_fill_level() and is by default enabled.

    Declaration

    Swift

    @inlinable
    func set(fillLevel: Double)
  • set(flippable:) Extension method

    If a range is flippable, it will switch its direction if it is horizontal and its direction is GTK_TEXT_DIR_RTL.

    See gtk_widget_get_direction().

    Declaration

    Swift

    @inlinable
    func set(flippable: Bool)
  • setIncrements(step:page:) Extension method

    Sets the step and page sizes for the range. The step size is used when the user clicks the GtkScrollbar arrows or moves GtkScale via arrow keys. The page size is used for example when moving via Page Up or Page Down keys.

    Declaration

    Swift

    @inlinable
    func setIncrements(step: Double, page: Double)
  • setInverted(setting:) Extension method

    Ranges normally move from lower to higher values as the slider moves from top to bottom or left to right. Inverted ranges have higher values at the top or on the right rather than on the bottom or left.

    Declaration

    Swift

    @inlinable
    func setInverted(setting: Bool)
  • Sets the sensitivity policy for the stepper that points to the ‘lower’ end of the GtkRange’s adjustment.

    Declaration

    Swift

    @inlinable
    func setLowerStepper(sensitivity: GtkSensitivityType)
  • setMinSliderSize(minSize:) Extension method

    Sets the minimum size of the range’s slider.

    This function is useful mainly for GtkRange subclasses.

    set_min_slider_size is deprecated: Use the min-height/min-width CSS properties on the slider node.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func setMinSliderSize(minSize: Int)
  • setRange(min:max:) Extension method

    Sets the allowable values in the GtkRange, and clamps the range value to be between min and max. (If the range has a non-zero page size, it is clamped between min and max - page-size.)

    Declaration

    Swift

    @inlinable
    func setRange(min: Double, max: Double)
  • set(restrictToFillLevel:) Extension method

    Sets whether the slider is restricted to the fill level. See gtk_range_set_fill_level() for a general description of the fill level concept.

    Declaration

    Swift

    @inlinable
    func set(restrictToFillLevel: Bool)
  • set(roundDigits:) Extension method

    Sets the number of digits to round the value to when it changes. See GtkRange::change-value.

    Declaration

    Swift

    @inlinable
    func set(roundDigits: Int)
  • set(showFillLevel:) Extension method

    Sets whether a graphical fill level is show on the trough. See gtk_range_set_fill_level() for a general description of the fill level concept.

    Declaration

    Swift

    @inlinable
    func set(showFillLevel: Bool)
  • setSlider(sizeFixed:) Extension method

    Sets whether the range’s slider has a fixed size, or a size that depends on its adjustment’s page size.

    This function is useful mainly for GtkRange subclasses.

    Declaration

    Swift

    @inlinable
    func setSlider(sizeFixed: Bool)
  • Sets the sensitivity policy for the stepper that points to the ‘upper’ end of the GtkRange’s adjustment.

    Declaration

    Swift

    @inlinable
    func setUpperStepper(sensitivity: GtkSensitivityType)
  • set(value:) Extension method

    Sets the current value of the range; if the value is outside the minimum or maximum range values, it will be clamped to fit inside them. The range emits the GtkRange::value-changed signal if the value changes.

    Declaration

    Swift

    @inlinable
    func set(value: Double)
  • adjustment Extension method

    Undocumented

    Declaration

    Swift

    @inlinable
    var adjustment: AdjustmentRef! { get nonmutating set }
  • fillLevel Extension method

    Gets the current position of the fill level indicator.

    Declaration

    Swift

    @inlinable
    var fillLevel: Double { get nonmutating set }
  • flippable Extension method

    Gets the value set by gtk_range_set_flippable().

    Declaration

    Swift

    @inlinable
    var flippable: Bool { get nonmutating set }
  • inverted Extension method

    Undocumented

    Declaration

    Swift

    @inlinable
    var inverted: Bool { get nonmutating set }
  • lowerStepperSensitivity Extension method

    Gets the sensitivity policy for the stepper that points to the ‘lower’ end of the GtkRange’s adjustment.

    Declaration

    Swift

    @inlinable
    var lowerStepperSensitivity: GtkSensitivityType { get nonmutating set }
  • minSliderSize Extension method

    This function is useful mainly for GtkRange subclasses.

    See gtk_range_set_min_slider_size().

    get_min_slider_size is deprecated: Use the min-height/min-width CSS properties on the slider node.

    Declaration

    Swift

    @inlinable
    var minSliderSize: Int { get nonmutating set }
  • restrictToFillLevel Extension method

    Gets whether the range is restricted to the fill level.

    Declaration

    Swift

    @inlinable
    var restrictToFillLevel: Bool { get nonmutating set }
  • roundDigits Extension method

    Gets the number of digits to round the value to when it changes. See GtkRange::change-value.

    Declaration

    Swift

    @inlinable
    var roundDigits: Int { get nonmutating set }
  • showFillLevel Extension method

    Gets whether the range displays the fill level graphically.

    Declaration

    Swift

    @inlinable
    var showFillLevel: Bool { get nonmutating set }
  • sliderSizeFixed Extension method

    This function is useful mainly for GtkRange subclasses.

    See gtk_range_set_slider_size_fixed().

    Declaration

    Swift

    @inlinable
    var sliderSizeFixed: Bool { get nonmutating set }
  • upperStepperSensitivity Extension method

    Gets the sensitivity policy for the stepper that points to the ‘upper’ end of the GtkRange’s adjustment.

    Declaration

    Swift

    @inlinable
    var upperStepperSensitivity: GtkSensitivityType { get nonmutating set }
  • value Extension method

    Gets the current value of the range.

    Declaration

    Swift

    @inlinable
    var value: Double { get nonmutating set }
  • widget Extension method

    Undocumented

    Declaration

    Swift

    @inlinable
    var widget: GtkWidget { get }