ToplevelProtocol

public protocol ToplevelProtocol : SurfaceProtocol

The ToplevelProtocol protocol exposes the methods and properties of an underlying GdkToplevel 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 Toplevel. Alternatively, use ToplevelRef as a lighweight, unowned reference if you already have an instance you just want to use.

A GdkToplevel is a freestanding toplevel surface.

The GdkToplevel interface provides useful APIs for interacting with the windowing system, such as controlling maximization and size of the surface, setting icons and transient parents for dialogs.

  • ptr

    Untyped pointer to the underlying GdkToplevel instance.

    Declaration

    Swift

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

    Typed pointer to the underlying GdkToplevel instance.

    Default Implementation

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

    Declaration

    Swift

    var toplevel_ptr: UnsafeMutablePointer<GdkToplevel>! { get }
  • Required Initialiser for types conforming to ToplevelProtocol

    Declaration

    Swift

    init(raw: UnsafeMutableRawPointer)

Toplevel Interface

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

    Declaration

    Swift

    @discardableResult
    @inlinable
    func bind<Q, T>(property source_property: ToplevelPropertyName, 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 Toplevel property

    Declaration

    Swift

    @inlinable
    func get(property: ToplevelPropertyName) -> 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 Toplevel property. Note that this will only have an effect on properties that are writable and not construct-only!

    Declaration

    Swift

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

    Parameters

    property

    the property to get the value for

    Return Value

    the value of the named property

Toplevel signals

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

    Declaration

    Swift

    @discardableResult
    @inlinable
    func connect(signal s: ToplevelSignalName, 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 ToplevelSignalName signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func connect(signal s: ToplevelSignalName, 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)

  • computeSizeSignal Extension method

    Emitted when the size for the surface needs to be computed, when it is present.

    It will normally be emitted during or after [methodGdk.Toplevel.present], depending on the configuration received by the windowing system. It may also be emitted at any other point in time, in response to the windowing system spontaneously changing the configuration.

    It is the responsibility of the toplevel user to handle this signal and compute the desired size of the toplevel, given the information passed via the [structGdk.ToplevelSize] object. Failing to do so will result in an arbitrary size being used as a result.

    Note

    This represents the underlying compute-size signal

    Warning

    a onComputeSize wrapper for this signal could not be generated because it contains unimplemented features: { (2) out or inout argument direction is not allowed }

    Note

    Instead, you can connect computeSizeSignal using the connect(signal:) methods

    Declaration

    Swift

    static var computeSizeSignal: ToplevelSignalName { get }

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    size

    a GdkToplevelSize

    handler

    The signal handler to call

  • 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::decorated signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyDecorated(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ToplevelRef, _ 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 notifyDecorated signal is emitted

  • notifyDecoratedSignal Extension method

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

    Declaration

    Swift

    static var notifyDecoratedSignal: ToplevelSignalName { 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::deletable signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyDeletable(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ToplevelRef, _ 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 notifyDeletable signal is emitted

  • notifyDeletableSignal Extension method

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

    Declaration

    Swift

    static var notifyDeletableSignal: ToplevelSignalName { 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::fullscreen-mode signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyFullscreenMode(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ToplevelRef, _ 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 notifyFullscreenMode signal is emitted

  • notifyFullscreenModeSignal Extension method

    Typed notify::fullscreen-mode signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyFullscreenModeSignal: ToplevelSignalName { 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::icon-list signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyIconList(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ToplevelRef, _ 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 notifyIconList signal is emitted

  • notifyIconListSignal Extension method

    Typed notify::icon-list signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyIconListSignal: ToplevelSignalName { 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::modal signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyModal(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ToplevelRef, _ 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 notifyModal signal is emitted

  • notifyModalSignal Extension method

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

    Declaration

    Swift

    static var notifyModalSignal: ToplevelSignalName { 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::shortcuts-inhibited signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyShortcutsInhibited(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ToplevelRef, _ 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 notifyShortcutsInhibited signal is emitted

  • Typed notify::shortcuts-inhibited signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyShortcutsInhibitedSignal: ToplevelSignalName { 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::startup-id signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyStartupId(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ToplevelRef, _ 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 notifyStartupId signal is emitted

  • notifyStartupIdSignal Extension method

    Typed notify::startup-id signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyStartupIdSignal: ToplevelSignalName { 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::state signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyState(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ToplevelRef, _ 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 notifyState signal is emitted

  • notifyStateSignal Extension method

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

    Declaration

    Swift

    static var notifyStateSignal: ToplevelSignalName { 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::title signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyTitle(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ToplevelRef, _ 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 notifyTitle signal is emitted

  • notifyTitleSignal Extension method

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

    Declaration

    Swift

    static var notifyTitleSignal: ToplevelSignalName { 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::transient-for signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyTransientFor(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ToplevelRef, _ 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 notifyTransientFor signal is emitted

  • notifyTransientForSignal Extension method

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

    Declaration

    Swift

    static var notifyTransientForSignal: ToplevelSignalName { get }

Toplevel Interface: ToplevelProtocol extension (methods and fields)

  • Begins an interactive move operation.

    You might use this function to implement draggable titlebars.

    Declaration

    Swift

    @inlinable
    func beginMove<DeviceT>(device: DeviceT, button: Int, x: CDouble, y: CDouble, timestamp: guint32) where DeviceT : DeviceProtocol
  • Begins an interactive resize operation.

    You might use this function to implement a “window resize grip.”

    Declaration

    Swift

    @inlinable
    func beginResize(edge: GdkSurfaceEdge, device: DeviceRef? = nil, button: Int, x: CDouble, y: CDouble, timestamp: guint32)
  • Begins an interactive resize operation.

    You might use this function to implement a “window resize grip.”

    Declaration

    Swift

    @inlinable
    func beginResize<DeviceT>(edge: GdkSurfaceEdge, device: DeviceT?, button: Int, x: CDouble, y: CDouble, timestamp: guint32) where DeviceT : DeviceProtocol
  • focus(timestamp:) Extension method

    Sets keyboard focus to surface.

    In most cases, [methodGtk.Window.present_with_time] should be used on a [classGtk.Window], rather than calling this function.

    Declaration

    Swift

    @inlinable
    func focus(timestamp: guint32)
  • getState() Extension method

    Gets the bitwise or of the currently active surface state flags, from the GdkToplevelState enumeration.

    Declaration

    Swift

    @inlinable
    func getState() -> ToplevelState
  • Requests that the toplevel inhibit the system shortcuts.

    This is asking the desktop environment/windowing system to let all keyboard events reach the surface, as long as it is focused, instead of triggering system actions.

    If granted, the rerouting remains active until the default shortcuts processing is restored with [methodGdk.Toplevel.restore_system_shortcuts], or the request is revoked by the desktop environment, windowing system or the user.

    A typical use case for this API is remote desktop or virtual machine viewers which need to inhibit the default system keyboard shortcuts so that the remote session or virtual host gets those instead of the local environment.

    The windowing system or desktop environment may ask the user to grant or deny the request or even choose to ignore the request entirely.

    The caller can be notified whenever the request is granted or revoked by listening to the [propertyGdk.Toplevel:shortcuts-inhibited] property.

    Declaration

    Swift

    @inlinable
    func inhibitSystemShortcuts(event: EventRef? = nil)
  • Requests that the toplevel inhibit the system shortcuts.

    This is asking the desktop environment/windowing system to let all keyboard events reach the surface, as long as it is focused, instead of triggering system actions.

    If granted, the rerouting remains active until the default shortcuts processing is restored with [methodGdk.Toplevel.restore_system_shortcuts], or the request is revoked by the desktop environment, windowing system or the user.

    A typical use case for this API is remote desktop or virtual machine viewers which need to inhibit the default system keyboard shortcuts so that the remote session or virtual host gets those instead of the local environment.

    The windowing system or desktop environment may ask the user to grant or deny the request or even choose to ignore the request entirely.

    The caller can be notified whenever the request is granted or revoked by listening to the [propertyGdk.Toplevel:shortcuts-inhibited] property.

    Declaration

    Swift

    @inlinable
    func inhibitSystemShortcuts<EventT>(event: EventT?) where EventT : EventProtocol
  • lower() Extension method

    Asks to lower the toplevel below other windows.

    The windowing system may choose to ignore the request.

    Declaration

    Swift

    @inlinable
    func lower() -> Bool
  • minimize() Extension method

    Asks to minimize the toplevel.

    The windowing system may choose to ignore the request.

    Declaration

    Swift

    @inlinable
    func minimize() -> Bool
  • present(layout:) Extension method

    Present toplevel after having processed the GdkToplevelLayout rules.

    If the toplevel was previously not showing, it will be showed, otherwise it will change layout according to layout.

    GDK may emit the [signalGdk.Toplevel::compute-size] signal to let the user of this toplevel compute the preferred size of the toplevel surface.

    Presenting is asynchronous and the specified layout parameters are not guaranteed to be respected.

    Declaration

    Swift

    @inlinable
    func present<ToplevelLayoutT>(layout: ToplevelLayoutT) where ToplevelLayoutT : ToplevelLayoutProtocol
  • restoreSystemShortcuts() Extension method

    Restore default system keyboard shortcuts which were previously inhibited.

    This undoes the effect of [methodGdk.Toplevel.inhibit_system_shortcuts].

    Declaration

    Swift

    @inlinable
    func restoreSystemShortcuts()
  • set(decorated:) Extension method

    Sets the toplevel to be decorated.

    Setting decorated to false hints the desktop environment that the surface has its own, client-side decorations and does not need to have window decorations added.

    Declaration

    Swift

    @inlinable
    func set(decorated: Bool)
  • set(deletable:) Extension method

    Sets the toplevel to be deletable.

    Setting deletable to true hints the desktop environment that it should offer the user a way to close the surface.

    Declaration

    Swift

    @inlinable
    func set(deletable: Bool)
  • setIconList(surfaces:) Extension method

    Sets a list of icons for the surface.

    One of these will be used to represent the surface in iconic form. The icon may be shown in window lists or task bars. Which icon size is shown depends on the window manager. The window manager can scale the icon but setting several size icons can give better image quality.

    Note that some platforms don’t support surface icons.

    Declaration

    Swift

    @inlinable
    func setIconList<ListT>(surfaces: ListT) where ListT : ListProtocol
  • set(modal:) Extension method

    Sets the toplevel to be modal.

    The application can use this hint to tell the window manager that a certain surface has modal behaviour. The window manager can use this information to handle modal surfaces in a special way.

    You should only use this on surfaces for which you have previously called [methodGdk.Toplevel.set_transient_for].

    Declaration

    Swift

    @inlinable
    func set(modal: Bool)
  • set(startupId:) Extension method

    Sets the startup notification ID.

    When using GTK, typically you should use [methodGtk.Window.set_startup_id] instead of this low-level function.

    Declaration

    Swift

    @inlinable
    func set(startupId: UnsafePointer<CChar>!)
  • set(title:) Extension method

    Sets the title of a toplevel surface.

    The title maybe be displayed in the titlebar, in lists of windows, etc.

    Declaration

    Swift

    @inlinable
    func set(title: UnsafePointer<CChar>!)
  • setTransientFor(parent:) Extension method

    Sets a transient-for parent.

    Indicates to the window manager that surface is a transient dialog associated with the application surface parent. This allows the window manager to do things like center surface on parent and keep surface above parent.

    See [methodGtk.Window.set_transient_for] if you’re using [classGtk.Window] or [classGtk.Dialog].

    Declaration

    Swift

    @inlinable
    func setTransientFor<SurfaceT>(parent: SurfaceT) where SurfaceT : SurfaceProtocol
  • showWindowMenu(event:) Extension method

    Asks the windowing system to show the window menu.

    The window menu is the menu shown when right-clicking the titlebar on traditional windows managed by the window manager. This is useful for windows using client-side decorations, activating it with a right-click on the window decorations.

    Declaration

    Swift

    @inlinable
    func showWindowMenu<EventT>(event: EventT) -> Bool where EventT : EventProtocol
  • supportsEdgeConstraints() Extension method

    Returns whether the desktop environment supports tiled window states.

    Declaration

    Swift

    @inlinable
    func supportsEdgeConstraints() -> Bool
  • state Extension method

    The state of the toplevel.

    Declaration

    Swift

    @inlinable
    var state: ToplevelState { get }