WindowProtocol
public protocol WindowProtocol : BinProtocol
A GtkWindow is a toplevel window which can contain other widgets. Windows normally have decorations that are under the control of the windowing system and allow the user to manipulate the window (resize it, move it, close it,…).
GtkWindow as GtkBuildable
The GtkWindow implementation of the GtkBuildable interface supports a
custom <accel-groups> element, which supports any number of <group>
elements representing the GtkAccelGroup objects you want to add to
your window (synonymous with gtk_window_add_accel_group().
It also supports the <initial-focus> element, whose name property names the widget to receive the focus when the window is mapped.
An example of a UI definition fragment with accel groups:
<object class="GtkWindow">
<accel-groups>
<group name="accelgroup1"/>
</accel-groups>
<initial-focus name="thunderclap"/>
</object>
...
<object class="GtkAccelGroup" id="accelgroup1"/>
The GtkWindow implementation of the GtkBuildable interface supports
setting a child as the titlebar by specifying “titlebar” as the “type”
attribute of a <child> element.
CSS nodes
(plain Language Example):
window.background
├── decoration
├── <titlebar child>.titlebar [.default-decoration]
╰── <child>
GtkWindow has a main CSS node with name window and style class .background, and a subnode with name decoration.
Style classes that are typically used with the main CSS node are .csd (when client-side decorations are in use), .solid-csd (for client-side decorations without invisible borders), .ssd (used by mutter when rendering server-side decorations). GtkWindow also represents window states with the following style classes on the main node: .tiled, .maximized, .fullscreen. Specialized types of window often add their own discriminating style classes, such as .popup or .tooltip.
GtkWindow adds the .titlebar and .default-decoration style classes to the widget that is added as a titlebar child.
The WindowProtocol protocol exposes the methods and properties of an underlying GtkWindow 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 Window.
Alternatively, use WindowRef as a lighweight, unowned reference if you already have an instance you just want to use.
-
Untyped pointer to the underlying
GtkWindowinstance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get } -
window_ptrDefault implementationTyped pointer to the underlying
GtkWindowinstance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkWindowinstance.Declaration
Swift
var window_ptr: UnsafeMutablePointer<GtkWindow>! { get } -
Required Initialiser for types conforming to
WindowProtocolDeclaration
Swift
init(raw: UnsafeMutableRawPointer)
-
bind(property:Extension methodto: _: flags: transformFrom: transformTo: ) Bind a
WindowPropertyNamesource property to a given target object.Declaration
Swift
@discardableResult @inlinable func bind<Q, T>(property source_property: WindowPropertyName, 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 : ObjectProtocolParameters
source_propertythe source property to bind
targetthe target object to bind to
target_propertythe target property to bind to
flagsthe flags to pass to the
Bindingtransform_fromValueTransformerto use for forward transformationtransform_toValueTransformerto use for backwards transformationReturn Value
binding reference or
nilin case of an error -
get(property:Extension method) Get the value of a Window property
Declaration
Swift
@inlinable func get(property: WindowPropertyName) -> GLibObject.ValueParameters
propertythe property to get the value for
Return Value
the value of the named property
-
set(property:Extension methodvalue: ) Set the value of a Window property. Note that this will only have an effect on properties that are writable and not construct-only!
Declaration
Swift
@inlinable func set(property: WindowPropertyName, value v: GLibObject.Value)Parameters
propertythe property to get the value for
Return Value
the value of the named property
-
connect(signal:Extension methodflags: handler: ) Connect a Swift signal handler to the given, typed
WindowSignalNamesignalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: WindowSignalName, flags f: ConnectFlags = ConnectFlags(0), handler h: @escaping SignalHandler) -> IntParameters
signalThe signal to connect
flagsThe connection flags to use
dataA pointer to user data to provide to the callback
destroyDataA
GClosureNotifyC function to destroy the data pointed to byuserDatahandlerThe 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(signal:Extension methodflags: data: destroyData: signalHandler: ) Connect a C signal handler to the given, typed
WindowSignalNamesignalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: WindowSignalName, flags f: ConnectFlags = ConnectFlags(0), data userData: gpointer!, destroyData destructor: GClosureNotify? = nil, signalHandler h: @escaping GCallback) -> IntParameters
signalThe signal to connect
flagsThe connection flags to use
dataA pointer to user data to provide to the callback
destroyDataA
GClosureNotifyC function to destroy the data pointed to byuserDatasignalHandlerThe C function to be called on the given signal
Return Value
The signal handler ID (always greater than 0 for successful connections)
-
onActivateDefault(flags:Extension methodhandler: ) The
activate-defaultsignal is a keybinding signal which gets emitted when the user activates the default widget ofwindow.Note
This represents the underlyingactivate-defaultsignalDeclaration
Swift
@discardableResult @inlinable func onActivateDefault(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WindowRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
handlerThe signal handler to call Run the given callback whenever the
activateDefaultsignal is emitted -
activateDefaultSignalExtension methodTyped
activate-defaultsignal for using theconnect(signal:)methodsDeclaration
Swift
static var activateDefaultSignal: WindowSignalName { get } -
onActivateFocus(flags:Extension methodhandler: ) The
activate-focussignal is a keybinding signal which gets emitted when the user activates the currently focused widget ofwindow.Note
This represents the underlyingactivate-focussignalDeclaration
Swift
@discardableResult @inlinable func onActivateFocus(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WindowRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
handlerThe signal handler to call Run the given callback whenever the
activateFocussignal is emitted -
activateFocusSignalExtension methodTyped
activate-focussignal for using theconnect(signal:)methodsDeclaration
Swift
static var activateFocusSignal: WindowSignalName { get } -
onEnableDebugging(flags:Extension methodhandler: ) The
enable-debuggingsignal is a keybinding signal which gets emitted when the user enables or disables interactive debugging. Whentoggleistrue, interactive debugging is toggled on or off, when it isfalse, the debugger will be pointed at the widget under the pointer.The default bindings for this signal are Ctrl-Shift-I and Ctrl-Shift-D.
Note
This represents the underlyingenable-debuggingsignalDeclaration
Swift
@discardableResult @inlinable func onEnableDebugging(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WindowRef, _ toggle: Bool) -> Bool) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
toggletoggle the debugger
handlertrueif the key binding was handled Run the given callback whenever theenableDebuggingsignal is emitted -
enableDebuggingSignalExtension methodTyped
enable-debuggingsignal for using theconnect(signal:)methodsDeclaration
Swift
static var enableDebuggingSignal: WindowSignalName { get } -
onKeysChanged(flags:Extension methodhandler: ) The
keys-changedsignal gets emitted when the set of accelerators or mnemonics that are associated withwindowchanges.Note
This represents the underlyingkeys-changedsignalDeclaration
Swift
@discardableResult @inlinable func onKeysChanged(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WindowRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
handlerThe signal handler to call Run the given callback whenever the
keysChangedsignal is emitted -
keysChangedSignalExtension methodTyped
keys-changedsignal for using theconnect(signal:)methodsDeclaration
Swift
static var keysChangedSignal: WindowSignalName { get } -
onSetFocus(flags:Extension methodhandler: ) This signal is emitted whenever the currently focused widget in this window changes.
Note
This represents the underlyingset-focussignalDeclaration
Parameters
flagsFlags
unownedSelfReference to instance of self
widgetthe newly focused widget (or
nilfor no focus)handlerThe signal handler to call Run the given callback whenever the
setFocussignal is emitted -
setFocusSignalExtension methodTyped
set-focussignal for using theconnect(signal:)methodsDeclaration
Swift
static var setFocusSignal: WindowSignalName { get } -
onNotifyAcceptFocus(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::accept-focussignalDeclaration
Swift
@discardableResult @inlinable func onNotifyAcceptFocus(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyAcceptFocussignal is emitted -
notifyAcceptFocusSignalExtension methodTyped
notify::accept-focussignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyAcceptFocusSignal: WindowSignalName { get } -
onNotifyApplication(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::applicationsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyApplication(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyApplicationsignal is emitted -
notifyApplicationSignalExtension methodTyped
notify::applicationsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyApplicationSignal: WindowSignalName { get } -
onNotifyAttachedTo(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::attached-tosignalDeclaration
Swift
@discardableResult @inlinable func onNotifyAttachedTo(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyAttachedTosignal is emitted -
notifyAttachedToSignalExtension methodTyped
notify::attached-tosignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyAttachedToSignal: WindowSignalName { get } -
onNotifyDecorated(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::decoratedsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyDecorated(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyDecoratedsignal is emitted -
notifyDecoratedSignalExtension methodTyped
notify::decoratedsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyDecoratedSignal: WindowSignalName { get } -
onNotifyDefaultHeight(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::default-heightsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyDefaultHeight(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyDefaultHeightsignal is emitted -
notifyDefaultHeightSignalExtension methodTyped
notify::default-heightsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyDefaultHeightSignal: WindowSignalName { get } -
onNotifyDefaultWidth(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::default-widthsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyDefaultWidth(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyDefaultWidthsignal is emitted -
notifyDefaultWidthSignalExtension methodTyped
notify::default-widthsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyDefaultWidthSignal: WindowSignalName { get } -
onNotifyDeletable(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::deletablesignalDeclaration
Swift
@discardableResult @inlinable func onNotifyDeletable(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyDeletablesignal is emitted -
notifyDeletableSignalExtension methodTyped
notify::deletablesignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyDeletableSignal: WindowSignalName { get } -
onNotifyDestroyWithParent(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::destroy-with-parentsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyDestroyWithParent(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyDestroyWithParentsignal is emitted -
notifyDestroyWithParentSignalExtension methodTyped
notify::destroy-with-parentsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyDestroyWithParentSignal: WindowSignalName { get } -
onNotifyFocusOnMap(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::focus-on-mapsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyFocusOnMap(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyFocusOnMapsignal is emitted -
notifyFocusOnMapSignalExtension methodTyped
notify::focus-on-mapsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyFocusOnMapSignal: WindowSignalName { get } -
onNotifyFocusVisible(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::focus-visiblesignalDeclaration
Swift
@discardableResult @inlinable func onNotifyFocusVisible(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyFocusVisiblesignal is emitted -
notifyFocusVisibleSignalExtension methodTyped
notify::focus-visiblesignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyFocusVisibleSignal: WindowSignalName { get } -
onNotifyGravity(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::gravitysignalDeclaration
Swift
@discardableResult @inlinable func onNotifyGravity(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyGravitysignal is emitted -
notifyGravitySignalExtension methodTyped
notify::gravitysignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyGravitySignal: WindowSignalName { get } -
onNotifyHasResizeGrip(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::has-resize-gripsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyHasResizeGrip(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyHasResizeGripsignal is emitted -
notifyHasResizeGripSignalExtension methodTyped
notify::has-resize-gripsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyHasResizeGripSignal: WindowSignalName { get } -
onNotifyHasToplevelFocus(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::has-toplevel-focussignalDeclaration
Swift
@discardableResult @inlinable func onNotifyHasToplevelFocus(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyHasToplevelFocussignal is emitted -
notifyHasToplevelFocusSignalExtension methodTyped
notify::has-toplevel-focussignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyHasToplevelFocusSignal: WindowSignalName { get } -
onNotifyHideTitlebarWhenMaximized(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::hide-titlebar-when-maximizedsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyHideTitlebarWhenMaximized(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyHideTitlebarWhenMaximizedsignal is emitted -
notifyHideTitlebarWhenMaximizedSignalExtension methodTyped
notify::hide-titlebar-when-maximizedsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyHideTitlebarWhenMaximizedSignal: WindowSignalName { get } -
onNotifyIcon(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::iconsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyIcon(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyIconsignal is emitted -
notifyIconSignalExtension methodTyped
notify::iconsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyIconSignal: WindowSignalName { get } -
onNotifyIconName(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::icon-namesignalDeclaration
Swift
@discardableResult @inlinable func onNotifyIconName(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyIconNamesignal is emitted -
notifyIconNameSignalExtension methodTyped
notify::icon-namesignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyIconNameSignal: WindowSignalName { get } -
onNotifyIsActive(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::is-activesignalDeclaration
Swift
@discardableResult @inlinable func onNotifyIsActive(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyIsActivesignal is emitted -
notifyIsActiveSignalExtension methodTyped
notify::is-activesignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyIsActiveSignal: WindowSignalName { get } -
onNotifyIsMaximized(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::is-maximizedsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyIsMaximized(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyIsMaximizedsignal is emitted -
notifyIsMaximizedSignalExtension methodTyped
notify::is-maximizedsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyIsMaximizedSignal: WindowSignalName { get } -
onNotifyMnemonicsVisible(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::mnemonics-visiblesignalDeclaration
Swift
@discardableResult @inlinable func onNotifyMnemonicsVisible(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyMnemonicsVisiblesignal is emitted -
notifyMnemonicsVisibleSignalExtension methodTyped
notify::mnemonics-visiblesignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyMnemonicsVisibleSignal: WindowSignalName { get } -
onNotifyModal(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::modalsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyModal(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyModalsignal is emitted -
notifyModalSignalExtension methodTyped
notify::modalsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyModalSignal: WindowSignalName { get } -
onNotifyResizable(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::resizablesignalDeclaration
Swift
@discardableResult @inlinable func onNotifyResizable(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyResizablesignal is emitted -
notifyResizableSignalExtension methodTyped
notify::resizablesignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyResizableSignal: WindowSignalName { get } -
onNotifyResizeGripVisible(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::resize-grip-visiblesignalDeclaration
Swift
@discardableResult @inlinable func onNotifyResizeGripVisible(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyResizeGripVisiblesignal is emitted -
notifyResizeGripVisibleSignalExtension methodTyped
notify::resize-grip-visiblesignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyResizeGripVisibleSignal: WindowSignalName { get } -
onNotifyRole(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::rolesignalDeclaration
Swift
@discardableResult @inlinable func onNotifyRole(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyRolesignal is emitted -
notifyRoleSignalExtension methodTyped
notify::rolesignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyRoleSignal: WindowSignalName { get } -
onNotifyScreen(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::screensignalDeclaration
Swift
@discardableResult @inlinable func onNotifyScreen(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyScreensignal is emitted -
notifyScreenSignalExtension methodTyped
notify::screensignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyScreenSignal: WindowSignalName { get } -
onNotifySkipPagerHint(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::skip-pager-hintsignalDeclaration
Swift
@discardableResult @inlinable func onNotifySkipPagerHint(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifySkipPagerHintsignal is emitted -
notifySkipPagerHintSignalExtension methodTyped
notify::skip-pager-hintsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifySkipPagerHintSignal: WindowSignalName { get } -
onNotifySkipTaskbarHint(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::skip-taskbar-hintsignalDeclaration
Swift
@discardableResult @inlinable func onNotifySkipTaskbarHint(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifySkipTaskbarHintsignal is emitted -
notifySkipTaskbarHintSignalExtension methodTyped
notify::skip-taskbar-hintsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifySkipTaskbarHintSignal: WindowSignalName { get } -
onNotifyStartupID(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::startup-idsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyStartupID(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyStartupIDsignal is emitted -
notifyStartupIDSignalExtension methodTyped
notify::startup-idsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyStartupIDSignal: WindowSignalName { get } -
onNotifyTitle(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::titlesignalDeclaration
Swift
@discardableResult @inlinable func onNotifyTitle(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyTitlesignal is emitted -
notifyTitleSignalExtension methodTyped
notify::titlesignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyTitleSignal: WindowSignalName { get } -
onNotifyTransientFor(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::transient-forsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyTransientFor(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyTransientForsignal is emitted -
notifyTransientForSignalExtension methodTyped
notify::transient-forsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyTransientForSignal: WindowSignalName { get } -
onNotifyType(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::typesignalDeclaration
Swift
@discardableResult @inlinable func onNotifyType(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyTypesignal is emitted -
notifyTypeSignalExtension methodTyped
notify::typesignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyTypeSignal: WindowSignalName { get } -
onNotifyTypeHint(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::type-hintsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyTypeHint(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyTypeHintsignal is emitted -
notifyTypeHintSignalExtension methodTyped
notify::type-hintsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyTypeHintSignal: WindowSignalName { get } -
onNotifyUrgencyHint(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::urgency-hintsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyUrgencyHint(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyUrgencyHintsignal is emitted -
notifyUrgencyHintSignalExtension methodTyped
notify::urgency-hintsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyUrgencyHintSignal: WindowSignalName { get } -
onNotifyWindowPosition(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::window-positionsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyWindowPosition(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyWindowPositionsignal is emitted -
notifyWindowPositionSignalExtension methodTyped
notify::window-positionsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyWindowPositionSignal: WindowSignalName { get }
-
activateDefault()Extension methodActivates the default widget for the window, unless the current focused widget has been configured to receive the default action (see
gtk_widget_set_receives_default()), in which case the focused widget is activated.Declaration
Swift
@inlinable func activateDefault() -> Bool -
activateFocus()Extension methodActivates the current focused widget within the window.
Declaration
Swift
@inlinable func activateFocus() -> Bool -
activateKey(event:Extension method) Activates mnemonics and accelerators for this
GtkWindow. This is normally called by the defaultkey_press_eventhandler for toplevel windows, however in some cases it may be useful to call this directly when overriding the standard key handling for a toplevel window.Declaration
Swift
@inlinable func activateKey<EventKeyT>(event: EventKeyT) -> Bool where EventKeyT : EventKeyProtocol -
add(accelGroup:Extension method) Associate
accel_groupwithwindow, such that callinggtk_accel_groups_activate()onwindowwill activate accelerators inaccel_group.Declaration
Swift
@inlinable func add<AccelGroupT>(accelGroup: AccelGroupT) where AccelGroupT : AccelGroupProtocol -
addMnemonic(keyval:Extension methodtarget: ) Adds a mnemonic to this window.
Declaration
Swift
@inlinable func addMnemonic<WidgetT>(keyval: Int, target: WidgetT) where WidgetT : WidgetProtocol -
beginMoveDrag(button:Extension methodrootX: rootY: timestamp: ) Starts moving a window. This function is used if an application has window movement grips. When GDK can support it, the window movement will be done using the standard mechanism for the window manager or windowing system. Otherwise, GDK will try to emulate window movement, potentially not all that well, depending on the windowing system.
Declaration
Swift
@inlinable func beginMoveDrag(button: Int, rootX: Int, rootY: Int, timestamp: guint32) -
beginResizeDrag(edge:Extension methodbutton: rootX: rootY: timestamp: ) Starts resizing a window. This function is used if an application has window resizing controls. When GDK can support it, the resize will be done using the standard mechanism for the window manager or windowing system. Otherwise, GDK will try to emulate window resizing, potentially not all that well, depending on the windowing system.
Declaration
Swift
@inlinable func beginResizeDrag(edge: GdkWindowEdge, button: Int, rootX: Int, rootY: Int, timestamp: guint32) -
close()Extension methodRequests that the window is closed, similar to what happens when a window manager close button is clicked.
This function can be used with close buttons in custom titlebars.
Declaration
Swift
@inlinable func close() -
deiconify()Extension methodAsks to deiconify (i.e. unminimize) the specified
window. Note that you shouldn’t assume the window is definitely deiconified afterward, because other entities (e.g. the user or window manager)) could iconify it again before your code which assumes deiconification gets to run.You can track iconification via the “window-state-event” signal on
GtkWidget.Declaration
Swift
@inlinable func deiconify() -
fullscreen()Extension methodAsks to place
windowin the fullscreen state. Note that you shouldn’t assume the window is definitely full screen afterward, because other entities (e.g. the user or window manager) could unfullscreen it again, and not all window managers honor requests to fullscreen windows. But normally the window will end up fullscreen. Just don’t write code that crashes if not.You can track the fullscreen state via the “window-state-event” signal on
GtkWidget.Declaration
Swift
@inlinable func fullscreen() -
fullscreenOnMonitor(screen:Extension methodmonitor: ) Asks to place
windowin the fullscreen state. Note that you shouldn’t assume the window is definitely full screen afterward.You can track the fullscreen state via the “window-state-event” signal on
GtkWidget.Declaration
Swift
@inlinable func fullscreenOnMonitor<ScreenT>(screen: ScreenT, monitor: Int) where ScreenT : ScreenProtocol -
getAcceptFocus()Extension methodGets the value set by
gtk_window_set_accept_focus().Declaration
Swift
@inlinable func getAcceptFocus() -> Bool -
getApplication()Extension methodGets the
GtkApplicationassociated with the window (if any).Declaration
Swift
@inlinable func getApplication() -> ApplicationRef! -
getAttachedTo()Extension methodFetches the attach widget for this window. See
gtk_window_set_attached_to().Declaration
Swift
@inlinable func getAttachedTo() -> WidgetRef! -
getDecorated()Extension methodReturns whether the window has been set to have decorations such as a title bar via
gtk_window_set_decorated().Declaration
Swift
@inlinable func getDecorated() -> Bool -
getDefaultSize(width:Extension methodheight: ) Gets the default size of the window. A value of -1 for the width or height indicates that a default size has not been explicitly set for that dimension, so the “natural” size of the window will be used.
Declaration
Swift
@inlinable func getDefaultSize(width: UnsafeMutablePointer<gint>! = nil, height: UnsafeMutablePointer<gint>! = nil) -
getDefaultWidget()Extension methodReturns the default widget for
window. Seegtk_window_set_default()for more details.Declaration
Swift
@inlinable func getDefaultWidget() -> WidgetRef! -
getDeletable()Extension methodReturns whether the window has been set to have a close button via
gtk_window_set_deletable().Declaration
Swift
@inlinable func getDeletable() -> Bool -
getDestroyWithParent()Extension methodReturns whether the window will be destroyed with its transient parent. See gtk_window_set_destroy_with_parent ().
Declaration
Swift
@inlinable func getDestroyWithParent() -> Bool -
getFocus()Extension methodRetrieves the current focused widget within the window. Note that this is the widget that would have the focus if the toplevel window focused; if the toplevel window is not focused then
gtk_widget_has_focus (widget)will not betruefor the widget.Declaration
Swift
@inlinable func getFocus() -> WidgetRef! -
getFocusOnMap()Extension methodGets the value set by
gtk_window_set_focus_on_map().Declaration
Swift
@inlinable func getFocusOnMap() -> Bool -
getFocusVisible()Extension methodGets the value of the
GtkWindow:focus-visibleproperty.Declaration
Swift
@inlinable func getFocusVisible() -> Bool -
getGravity()Extension methodGets the value set by
gtk_window_set_gravity().Declaration
Swift
@inlinable func getGravity() -> GdkGravity -
getGroup()Extension methodReturns the group for
windowor the default group, ifwindowisnilor ifwindowdoes not have an explicit window group.Declaration
Swift
@inlinable func getGroup() -> WindowGroupRef! -
getHasResizeGrip()Extension methodDetermines whether the window may have a resize grip.
get_has_resize_grip is deprecated: Resize grips have been removed.
Declaration
Swift
@available(*, deprecated) @inlinable func getHasResizeGrip() -> Bool -
getHideTitlebarWhenMaximized()Extension methodReturns whether the window has requested to have its titlebar hidden when maximized. See gtk_window_set_hide_titlebar_when_maximized ().
Declaration
Swift
@inlinable func getHideTitlebarWhenMaximized() -> Bool -
getIcon()Extension methodGets the value set by
gtk_window_set_icon()(or if you’ve calledgtk_window_set_icon_list(), gets the first icon in the icon list).Declaration
Swift
@inlinable func getIcon() -> PixbufRef! -
getIconList()Extension methodRetrieves the list of icons set by
gtk_window_set_icon_list(). The list is copied, but the reference count on each member won’t be incremented.Declaration
Swift
@inlinable func getIconList() -> GLib.ListRef! -
getIconName()Extension methodReturns the name of the themed icon for the window, see
gtk_window_set_icon_name().Declaration
Swift
@inlinable func getIconName() -> String! -
getMnemonicModifier()Extension methodReturns the mnemonic modifier for this window. See
gtk_window_set_mnemonic_modifier().Declaration
Swift
@inlinable func getMnemonicModifier() -> Gdk.ModifierType -
getMnemonicsVisible()Extension methodGets the value of the
GtkWindow:mnemonics-visibleproperty.Declaration
Swift
@inlinable func getMnemonicsVisible() -> Bool -
getModal()Extension methodReturns whether the window is modal. See
gtk_window_set_modal().Declaration
Swift
@inlinable func getModal() -> Bool -
getOpacity()Extension methodFetches the requested opacity for this window. See
gtk_window_set_opacity().get_opacity is deprecated: Use gtk_widget_get_opacity instead.
Declaration
Swift
@available(*, deprecated) @inlinable func getOpacity() -> Double -
getPosition(rootX:Extension methodrootY: ) This function returns the position you need to pass to
gtk_window_move()to keepwindowin its current position. This means that the meaning of the returned value varies with window gravity. Seegtk_window_move()for more details.The reliability of this function depends on the windowing system currently in use. Some windowing systems, such as Wayland, do not support a global coordinate system, and thus the position of the window will always be (0, 0). Others, like X11, do not have a reliable way to obtain the geometry of the decorations of a window if they are provided by the window manager. Additionally, on X11, window manager have been known to mismanage window gravity, which result in windows moving even if you use the coordinates of the current position as returned by this function.
If you haven’t changed the window gravity, its gravity will be
GDK_GRAVITY_NORTH_WEST. This means thatgtk_window_get_position()gets the position of the top-left corner of the window manager frame for the window.gtk_window_move()sets the position of this same top-left corner.If a window has gravity
GDK_GRAVITY_STATICthe window manager frame is not relevant, and thusgtk_window_get_position()will always produce accurate results. However you can’t use static gravity to do things like place a window in a corner of the screen, because static gravity ignores the window manager decorations.Ideally, this function should return appropriate values if the window has client side decorations, assuming that the windowing system supports global coordinates.
In practice, saving the window position should not be left to applications, as they lack enough knowledge of the windowing system and the window manager state to effectively do so. The appropriate way to implement saving the window position is to use a platform-specific protocol, wherever that is available.
Declaration
Swift
@inlinable func getPosition(rootX: UnsafeMutablePointer<gint>! = nil, rootY: UnsafeMutablePointer<gint>! = nil) -
getResizable()Extension methodGets the value set by
gtk_window_set_resizable().Declaration
Swift
@inlinable func getResizable() -> Bool -
getResizeGripArea(rect:Extension method) If a window has a resize grip, this will retrieve the grip position, width and height into the specified
GdkRectangle.get_resize_grip_area is deprecated: Resize grips have been removed.
Declaration
Swift
@available(*, deprecated) @inlinable func getResizeGripArea<RectangleT>(rect: RectangleT) -> Bool where RectangleT : RectangleProtocol -
getRole()Extension methodReturns the role of the window. See
gtk_window_set_role()for further explanation.Declaration
Swift
@inlinable func getRole() -> String! -
getScreen()Extension methodReturns the
GdkScreenassociated withwindow.Declaration
Swift
@inlinable func getScreen() -> Gdk.ScreenRef! -
getSize(width:Extension methodheight: ) Obtains the current size of
window.If
windowis not visible on screen, this function return the size GTK+ will suggest to the window manager for the initial window size (but this is not reliably the same as the size the window manager will actually select). See:gtk_window_set_default_size().Depending on the windowing system and the window manager constraints, the size returned by this function may not match the size set using
gtk_window_resize(); additionally, sincegtk_window_resize()may be implemented as an asynchronous operation, GTK+ cannot guarantee in any way that this code:(C Language Example):
// width and height are set elsewhere gtk_window_resize (window, width, height); int new_width, new_height; gtk_window_get_size (window, &new_width, &new_height);will result in
new_widthandnew_heightmatchingwidthandheight, respectively.This function will return the logical size of the
GtkWindow, excluding the widgets used in client side decorations; there is, however, no guarantee that the result will be completely accurate because client side decoration may include widgets that depend on the user preferences and that may not be visibile at the time you call this function.The dimensions returned by this function are suitable for being stored across sessions; use
gtk_window_set_default_size()to restore them when before showing the window.To avoid potential race conditions, you should only call this function in response to a size change notification, for instance inside a handler for the
GtkWidget::size-allocatesignal, or inside a handler for theGtkWidget::configure-eventsignal:(C Language Example):
static void on_size_allocate (GtkWidget *widget, GtkAllocation *allocation) { int new_width, new_height; gtk_window_get_size (GTK_WINDOW (widget), &new_width, &new_height); ... }Note that, if you connect to the
GtkWidget::size-allocatesignal, you should not use the dimensions of theGtkAllocationpassed to the signal handler, as the allocation may contain client side decorations added by GTK+, depending on the windowing system in use.If you are getting a window size in order to position the window on the screen, you should, instead, simply set the window’s semantic type with
gtk_window_set_type_hint(), which allows the window manager to e.g. center dialogs. Also, if you set the transient parent of dialogs withgtk_window_set_transient_for()window managers will often center the dialog over its parent window. It’s much preferred to let the window manager handle these cases rather than doing it yourself, because all apps will behave consistently and according to user or system preferences, if the window manager handles it. Also, the window manager can take into account the size of the window decorations and border that it may add, and of which GTK+ has no knowledge. Additionally, positioning windows in global screen coordinates may not be allowed by the windowing system. For more information, see:gtk_window_set_position().Declaration
Swift
@inlinable func getSize(width: UnsafeMutablePointer<gint>?, height: UnsafeMutablePointer<gint>?) -
getSkipPagerHint()Extension methodGets the value set by
gtk_window_set_skip_pager_hint().Declaration
Swift
@inlinable func getSkipPagerHint() -> Bool -
getSkipTaskbarHint()Extension methodGets the value set by
gtk_window_set_skip_taskbar_hint()Declaration
Swift
@inlinable func getSkipTaskbarHint() -> Bool -
getTitle()Extension methodRetrieves the title of the window. See
gtk_window_set_title().Declaration
Swift
@inlinable func getTitle() -> String! -
getTitlebar()Extension methodReturns the custom titlebar that has been set with
gtk_window_set_titlebar().Declaration
Swift
@inlinable func getTitlebar() -> WidgetRef! -
getTransientFor()Extension methodFetches the transient parent for this window. See
gtk_window_set_transient_for().Declaration
Swift
@inlinable func getTransientFor() -> WindowRef! -
getTypeHint()Extension methodGets the type hint for this window. See
gtk_window_set_type_hint().Declaration
Swift
@inlinable func getTypeHint() -> GdkWindowTypeHint -
getUrgencyHint()Extension methodGets the value set by
gtk_window_set_urgency_hint()Declaration
Swift
@inlinable func getUrgencyHint() -> Bool -
getWindowType()Extension methodGets the type of the window. See
GtkWindowType.Declaration
Swift
@inlinable func getWindowType() -> GtkWindowType -
hasGroup()Extension methodReturns whether
windowhas an explicit window group.Declaration
Swift
@inlinable func hasGroup() -> Bool -
hasToplevelFocus()Extension methodReturns whether the input focus is within this GtkWindow. For real toplevel windows, this is identical to
gtk_window_is_active(), but for embedded windows, likeGtkPlug, the results will differ.Declaration
Swift
@inlinable func hasToplevelFocus() -> Bool -
iconify()Extension methodAsks to iconify (i.e. minimize) the specified
window. Note that you shouldn’t assume the window is definitely iconified afterward, because other entities (e.g. the user or window manager) could deiconify it again, or there may not be a window manager in which case iconification isn’t possible, etc. But normally the window will end up iconified. Just don’t write code that crashes if not.It’s permitted to call this function before showing a window, in which case the window will be iconified before it ever appears onscreen.
You can track iconification via the “window-state-event” signal on
GtkWidget.Declaration
Swift
@inlinable func iconify() -
maximize()Extension methodAsks to maximize
window, so that it becomes full-screen. Note that you shouldn’t assume the window is definitely maximized afterward, because other entities (e.g. the user or window manager) could unmaximize it again, and not all window managers support maximization. But normally the window will end up maximized. Just don’t write code that crashes if not.It’s permitted to call this function before showing a window, in which case the window will be maximized when it appears onscreen initially.
You can track maximization via the “window-state-event” signal on
GtkWidget, or by listening to notifications on theGtkWindow:is-maximizedproperty.Declaration
Swift
@inlinable func maximize() -
mnemonicActivate(keyval:Extension methodmodifier: ) Activates the targets associated with the mnemonic.
Declaration
Swift
@inlinable func mnemonicActivate(keyval: Int, modifier: Gdk.ModifierType) -> Bool -
move(x:Extension methody: ) Asks the window manager to move
windowto the given position. Window managers are free to ignore this; most window managers ignore requests for initial window positions (instead using a user-defined placement algorithm) and honor requests after the window has already been shown.Note: the position is the position of the gravity-determined reference point for the window. The gravity determines two things: first, the location of the reference point in root window coordinates; and second, which point on the window is positioned at the reference point.
By default the gravity is
GDK_GRAVITY_NORTH_WEST, so the reference point is simply thex,ysupplied togtk_window_move(). The top-left corner of the window decorations (aka window frame or border) will be placed atx,y. Therefore, to position a window at the top left of the screen, you want to use the default gravity (which isGDK_GRAVITY_NORTH_WEST) and move the window to 0,0.To position a window at the bottom right corner of the screen, you would set
GDK_GRAVITY_SOUTH_EAST, which means that the reference point is atx+ the window width andy+ the window height, and the bottom-right corner of the window border will be placed at that reference point. So, to place a window in the bottom right corner you would first set gravity to south east, then write:gtk_window_move (window, gdk_screen_width () - window_width, gdk_screen_height () - window_height)(note that this example does not take multi-head scenarios into account).The Extended Window Manager Hints Specification has a nice table of gravities in the “implementation notes” section.
The
gtk_window_get_position()documentation may also be relevant.Declaration
Swift
@inlinable func move(x: Int, y: Int) -
parse(geometry:Extension method) Parses a standard X Window System geometry string - see the manual page for X (type “man X”) for details on this.
gtk_window_parse_geometry()does work on all GTK+ ports including Win32 but is primarily intended for an X environment.If either a size or a position can be extracted from the geometry string,
gtk_window_parse_geometry()returnstrueand callsgtk_window_set_default_size()and/orgtk_window_move()to resize/move the window.If
gtk_window_parse_geometry()returnstrue, it will also set theGDK_HINT_USER_POSand/orGDK_HINT_USER_SIZEhints indicating to the window manager that the size/position of the window was user-specified. This causes most window managers to honor the geometry.Note that for
gtk_window_parse_geometry()to work as expected, it has to be called when the window has its “final” size, i.e. after callinggtk_widget_show_all()on the contents andgtk_window_set_geometry_hints()on the window. (C Language Example):#include <gtk/gtk.h> static void fill_with_content (GtkWidget *vbox) { // fill with content... } int main (int argc, char *argv[]) { GtkWidget *window, *vbox; GdkGeometry size_hints = { 100, 50, 0, 0, 100, 50, 10, 10, 0.0, 0.0, GDK_GRAVITY_NORTH_WEST }; gtk_init (&argc, &argv); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); gtk_container_add (GTK_CONTAINER (window), vbox); fill_with_content (vbox); gtk_widget_show_all (vbox); gtk_window_set_geometry_hints (GTK_WINDOW (window), NULL, &size_hints, GDK_HINT_MIN_SIZE | GDK_HINT_BASE_SIZE | GDK_HINT_RESIZE_INC); if (argc > 1) { gboolean res; res = gtk_window_parse_geometry (GTK_WINDOW (window), argv[1]); if (! res) fprintf (stderr, "Failed to parse “%s”\n", argv[1]); } gtk_widget_show_all (window); gtk_main (); return 0; }parse_geometry is deprecated: Geometry handling in GTK is deprecated.
Declaration
Swift
@available(*, deprecated) @inlinable func parse(geometry: UnsafePointer<gchar>!) -> Bool -
present()Extension methodPresents a window to the user. This function should not be used as when it is called, it is too late to gather a valid timestamp to allow focus stealing prevention to work correctly.
Declaration
Swift
@inlinable func present() -
presentWithTime(timestamp:Extension method) Presents a window to the user. This may mean raising the window in the stacking order, deiconifying it, moving it to the current desktop, and/or giving it the keyboard focus, possibly dependent on the user’s platform, window manager, and preferences.
If
windowis hidden, this function callsgtk_widget_show()as well.This function should be used when the user tries to open a window that’s already open. Say for example the preferences dialog is currently open, and the user chooses Preferences from the menu a second time; use
gtk_window_present()to move the already-open dialog where the user can see it.Presents a window to the user in response to a user interaction. The timestamp should be gathered when the window was requested to be shown (when clicking a link for example), rather than once the window is ready to be shown.
Declaration
Swift
@inlinable func presentWithTime(timestamp: guint32) -
propagateKey(event:Extension method) Propagate a key press or release event to the focus widget and up the focus container chain until a widget handles
event. This is normally called by the defaultkey_press_eventandkey_release_eventhandlers for toplevel windows, however in some cases it may be useful to call this directly when overriding the standard key handling for a toplevel window.Declaration
Swift
@inlinable func propagateKey<EventKeyT>(event: EventKeyT) -> Bool where EventKeyT : EventKeyProtocol -
remove(accelGroup:Extension method) Reverses the effects of
gtk_window_add_accel_group().Declaration
Swift
@inlinable func remove<AccelGroupT>(accelGroup: AccelGroupT) where AccelGroupT : AccelGroupProtocol -
removeMnemonic(keyval:Extension methodtarget: ) Removes a mnemonic from this window.
Declaration
Swift
@inlinable func removeMnemonic<WidgetT>(keyval: Int, target: WidgetT) where WidgetT : WidgetProtocol -
reshowWithInitialSize()Extension methodHides
window, then reshows it, resetting the default size and position of the window. Used by GUI builders only.reshow_with_initial_size is deprecated: GUI builders can call gtk_widget_hide(), gtk_widget_unrealize() and then gtk_widget_show() on @window themselves, if they still need this functionality.
Declaration
Swift
@available(*, deprecated) @inlinable func reshowWithInitialSize() -
resize(width:Extension methodheight: ) Resizes the window as if the user had done so, obeying geometry constraints. The default geometry constraint is that windows may not be smaller than their size request; to override this constraint, call
gtk_widget_set_size_request()to set the window’s request to a smaller value.If
gtk_window_resize()is called before showing a window for the first time, it overrides any default size set withgtk_window_set_default_size().Windows may not be resized smaller than 1 by 1 pixels.
When using client side decorations, GTK+ will do its best to adjust the given size so that the resulting window size matches the requested size without the title bar, borders and shadows added for the client side decorations, but there is no guarantee that the result will be totally accurate because these widgets added for client side decorations depend on the theme and may not be realized or visible at the time
gtk_window_resize()is issued.If the GtkWindow has a titlebar widget (see
gtk_window_set_titlebar()), then typically,gtk_window_resize()will compensate for the height of the titlebar widget only if the height is known when the resulting GtkWindow configuration is issued. For example, if new widgets are added after the GtkWindow configuration and cause the titlebar widget to grow in height, this will result in a window content smaller that specified bygtk_window_resize()and not a larger window.Declaration
Swift
@inlinable func resize(width: Int, height: Int) -
resizeGripIsVisible()Extension methodDetermines whether a resize grip is visible for the specified window.
resize_grip_is_visible is deprecated: Resize grips have been removed.
Declaration
Swift
@available(*, deprecated) @inlinable func resizeGripIsVisible() -> Bool -
resizeToGeometry(width:Extension methodheight: ) Like
gtk_window_resize(), butwidthandheightare interpreted in terms of the base size and increment set with gtk_window_set_geometry_hints.resize_to_geometry is deprecated: This function does nothing. Use gtk_window_resize() and compute the geometry yourself.
Declaration
Swift
@available(*, deprecated) @inlinable func resizeToGeometry(width: Int, height: Int) -
setAcceptFocus(setting:Extension method) Windows may set a hint asking the desktop environment not to receive the input focus. This function sets this hint.
Declaration
Swift
@inlinable func setAcceptFocus(setting: Bool) -
set(application:Extension method) Sets or unsets the
GtkApplicationassociated with the window.The application will be kept alive for at least as long as it has any windows associated with it (see
g_application_hold()for a way to keep it alive without windows).Normally, the connection between the application and the window will remain until the window is destroyed, but you can explicitly remove it by setting the
applicationtonil.This is equivalent to calling
gtk_application_remove_window()and/orgtk_application_add_window()on the old/new applications as relevant.Declaration
Swift
@inlinable func set(application: ApplicationRef? = nil) -
set(application:Extension method) Sets or unsets the
GtkApplicationassociated with the window.The application will be kept alive for at least as long as it has any windows associated with it (see
g_application_hold()for a way to keep it alive without windows).Normally, the connection between the application and the window will remain until the window is destroyed, but you can explicitly remove it by setting the
applicationtonil.This is equivalent to calling
gtk_application_remove_window()and/orgtk_application_add_window()on the old/new applications as relevant.Declaration
Swift
@inlinable func set<ApplicationT>(application: ApplicationT?) where ApplicationT : ApplicationProtocol -
setAttachedTo(attachWidget:Extension method) Marks
windowas attached toattach_widget. This creates a logical binding between the window and the widget it belongs to, which is used by GTK+ to propagate information such as styling or accessibility towindowas if it was a children ofattach_widget.Examples of places where specifying this relation is useful are for instance a
GtkMenucreated by aGtkComboBox, a completion popup window created byGtkEntryor a typeahead search entry created byGtkTreeView.Note that this function should not be confused with
gtk_window_set_transient_for(), which specifies a window manager relation between two toplevels instead.Passing
nilforattach_widgetdetaches the window.Declaration
Swift
@inlinable func setAttachedTo(attachWidget: WidgetRef? = nil) -
setAttachedTo(attachWidget:Extension method) Marks
windowas attached toattach_widget. This creates a logical binding between the window and the widget it belongs to, which is used by GTK+ to propagate information such as styling or accessibility towindowas if it was a children ofattach_widget.Examples of places where specifying this relation is useful are for instance a
GtkMenucreated by aGtkComboBox, a completion popup window created byGtkEntryor a typeahead search entry created byGtkTreeView.Note that this function should not be confused with
gtk_window_set_transient_for(), which specifies a window manager relation between two toplevels instead.Passing
nilforattach_widgetdetaches the window.Declaration
Swift
@inlinable func setAttachedTo<WidgetT>(attachWidget: WidgetT?) where WidgetT : WidgetProtocol -
setDecorated(setting:Extension method) By default, windows are decorated with a title bar, resize controls, etc. Some window managers allow GTK+ to disable these decorations, creating a borderless window. If you set the decorated property to
falseusing this function, GTK+ will do its best to convince the window manager not to decorate the window. Depending on the system, this function may not have any effect when called on a window that is already visible, so you should call it before callinggtk_widget_show().On Windows, this function always works, since there’s no window manager policy involved.
Declaration
Swift
@inlinable func setDecorated(setting: Bool) -
setDefault(defaultWidget:Extension method) The default widget is the widget that’s activated when the user presses Enter in a dialog (for example). This function sets or unsets the default widget for a
GtkWindow. When setting (rather than unsetting) the default widget it’s generally easier to callgtk_widget_grab_default()on the widget. Before making a widget the default widget, you must callgtk_widget_set_can_default()on the widget you’d like to make the default.Declaration
Swift
@inlinable func setDefault(defaultWidget: WidgetRef? = nil) -
setDefault(defaultWidget:Extension method) The default widget is the widget that’s activated when the user presses Enter in a dialog (for example). This function sets or unsets the default widget for a
GtkWindow. When setting (rather than unsetting) the default widget it’s generally easier to callgtk_widget_grab_default()on the widget. Before making a widget the default widget, you must callgtk_widget_set_can_default()on the widget you’d like to make the default.Declaration
Swift
@inlinable func setDefault<WidgetT>(defaultWidget: WidgetT?) where WidgetT : WidgetProtocol -
setDefaultGeometry(width:Extension methodheight: ) Like
gtk_window_set_default_size(), butwidthandheightare interpreted in terms of the base size and increment set with gtk_window_set_geometry_hints.set_default_geometry is deprecated: This function does nothing. If you want to set a default size, use gtk_window_set_default_size() instead.
Declaration
Swift
@available(*, deprecated) @inlinable func setDefaultGeometry(width: Int, height: Int) -
setDefaultSize(width:Extension methodheight: ) Sets the default size of a window. If the window’s “natural” size (its size request) is larger than the default, the default will be ignored. More generally, if the default size does not obey the geometry hints for the window (
gtk_window_set_geometry_hints()can be used to set these explicitly), the default size will be clamped to the nearest permitted size.Unlike
gtk_widget_set_size_request(), which sets a size request for a widget and thus would keep users from shrinking the window, this function only sets the initial size, just as if the user had resized the window themselves. Users can still shrink the window again as they normally would. Setting a default size of -1 means to use the “natural” default size (the size request of the window).For more control over a window’s initial size and how resizing works, investigate
gtk_window_set_geometry_hints().For some uses,
gtk_window_resize()is a more appropriate function.gtk_window_resize()changes the current size of the window, rather than the size to be used on initial display.gtk_window_resize()always affects the window itself, not the geometry widget.The default size of a window only affects the first time a window is shown; if a window is hidden and re-shown, it will remember the size it had prior to hiding, rather than using the default size.
Windows can’t actually be 0x0 in size, they must be at least 1x1, but passing 0 for
widthandheightis OK, resulting in a 1x1 default size.If you use this function to reestablish a previously saved window size, note that the appropriate size to save is the one returned by
gtk_window_get_size(). Using the window allocation directly will not work in all circumstances and can lead to growing or shrinking windows.Declaration
Swift
@inlinable func setDefaultSize(width: Int, height: Int) -
setDeletable(setting:Extension method) By default, windows have a close button in the window frame. Some window managers allow GTK+ to disable this button. If you set the deletable property to
falseusing this function, GTK+ will do its best to convince the window manager not to show a close button. Depending on the system, this function may not have any effect when called on a window that is already visible, so you should call it before callinggtk_widget_show().On Windows, this function always works, since there’s no window manager policy involved.
Declaration
Swift
@inlinable func setDeletable(setting: Bool) -
setDestroyWithParent(setting:Extension method) If
settingistrue, then destroying the transient parent ofwindowwill also destroywindowitself. This is useful for dialogs that shouldn’t persist beyond the lifetime of the main window they’re associated with, for example.Declaration
Swift
@inlinable func setDestroyWithParent(setting: Bool) -
set(focus:Extension method) If
focusis not the current focus widget, and is focusable, sets it as the focus widget for the window. Iffocusisnil, unsets the focus widget for this window. To set the focus to a particular widget in the toplevel, it is usually more convenient to usegtk_widget_grab_focus()instead of this function.Declaration
Swift
@inlinable func set(focus: WidgetRef? = nil) -
set(focus:Extension method) If
focusis not the current focus widget, and is focusable, sets it as the focus widget for the window. Iffocusisnil, unsets the focus widget for this window. To set the focus to a particular widget in the toplevel, it is usually more convenient to usegtk_widget_grab_focus()instead of this function.Declaration
Swift
@inlinable func set<WidgetT>(focus: WidgetT?) where WidgetT : WidgetProtocol -
setFocusOnMap(setting:Extension method) Windows may set a hint asking the desktop environment not to receive the input focus when the window is mapped. This function sets this hint.
Declaration
Swift
@inlinable func setFocusOnMap(setting: Bool) -
setFocusVisible(setting:Extension method) Sets the
GtkWindow:focus-visibleproperty.Declaration
Swift
@inlinable func setFocusVisible(setting: Bool) -
setGeometryHints(geometryWidget:Extension methodgeometry: geomMask: ) This function sets up hints about how a window can be resized by the user. You can set a minimum and maximum size; allowed resize increments (e.g. for xterm, you can only resize by the size of a character); aspect ratios; and more. See the
GdkGeometrystruct.Declaration
Swift
@inlinable func setGeometryHints(geometryWidget: WidgetRef? = nil, geometry: Gdk.GeometryRef? = nil, geomMask: Gdk.WindowHints) -
setGeometryHints(geometryWidget:Extension methodgeometry: geomMask: ) This function sets up hints about how a window can be resized by the user. You can set a minimum and maximum size; allowed resize increments (e.g. for xterm, you can only resize by the size of a character); aspect ratios; and more. See the
GdkGeometrystruct.Declaration
Swift
@inlinable func setGeometryHints<GeometryT, WidgetT>(geometryWidget: WidgetT?, geometry: GeometryT?, geomMask: Gdk.WindowHints) where GeometryT : GeometryProtocol, WidgetT : WidgetProtocol -
set(gravity:Extension method) Window gravity defines the meaning of coordinates passed to
gtk_window_move(). Seegtk_window_move()andGdkGravityfor more details.The default window gravity is
GDK_GRAVITY_NORTH_WESTwhich will typically “do what you mean.”Declaration
Swift
@inlinable func set(gravity: GdkGravity) -
setHasResizeGrip(value:Extension method) Sets whether
windowhas a corner resize grip.Note that the resize grip is only shown if the window is actually resizable and not maximized. Use
gtk_window_resize_grip_is_visible()to find out if the resize grip is currently shown.set_has_resize_grip is deprecated: Resize grips have been removed.
Declaration
Swift
@available(*, deprecated) @inlinable func setHasResizeGrip(value: Bool) -
setHasUserRefCount(setting:Extension method) Tells GTK+ whether to drop its extra reference to the window when
gtk_widget_destroy()is called.This function is only exported for the benefit of language bindings which may need to keep the window alive until their wrapper object is garbage collected. There is no justification for ever calling this function in an application.
Declaration
Swift
@inlinable func setHasUserRefCount(setting: Bool) -
setHideTitlebarWhenMaximized(setting:Extension method) If
settingistrue, thenwindowwill request that it’s titlebar should be hidden when maximized. This is useful for windows that don’t convey any information other than the application name in the titlebar, to put the available screen space to better use. If the underlying window system does not support the request, the setting will not have any effect.Note that custom titlebars set with
gtk_window_set_titlebar()are not affected by this. The application is in full control of their content and visibility anyway.Declaration
Swift
@inlinable func setHideTitlebarWhenMaximized(setting: Bool) -
set(icon:Extension method) Sets up the icon representing a
GtkWindow. This icon is used when the window is minimized (also known as iconified). Some window managers or desktop environments may also place it in the window frame, or display it in other contexts. On others, the icon is not used at all, so your mileage may vary.The icon should be provided in whatever size it was naturally drawn; that is, don’t scale the image before passing it to GTK+. Scaling is postponed until the last minute, when the desired final size is known, to allow best quality.
If you have your icon hand-drawn in multiple sizes, use
gtk_window_set_icon_list(). Then the best size will be used.This function is equivalent to calling
gtk_window_set_icon_list()with a 1-element list.See also
gtk_window_set_default_icon_list()to set the icon for all windows in your application in one go.Declaration
Swift
@inlinable func set(icon: PixbufRef? = nil) -
set(icon:Extension method) Sets up the icon representing a
GtkWindow. This icon is used when the window is minimized (also known as iconified). Some window managers or desktop environments may also place it in the window frame, or display it in other contexts. On others, the icon is not used at all, so your mileage may vary.The icon should be provided in whatever size it was naturally drawn; that is, don’t scale the image before passing it to GTK+. Scaling is postponed until the last minute, when the desired final size is known, to allow best quality.
If you have your icon hand-drawn in multiple sizes, use
gtk_window_set_icon_list(). Then the best size will be used.This function is equivalent to calling
gtk_window_set_icon_list()with a 1-element list.See also
gtk_window_set_default_icon_list()to set the icon for all windows in your application in one go.Declaration
Swift
@inlinable func set<PixbufT>(icon: PixbufT?) where PixbufT : PixbufProtocol -
setIconFromFile(filename:Extension method) Sets the icon for
window. Warns on failure iferrisnil.This function is equivalent to calling
gtk_window_set_icon()with a pixbuf created by loading the image fromfilename.Declaration
Swift
@inlinable func setIconFromFile(filename: UnsafePointer<gchar>!) throws -> Bool -
setIcon(list:Extension method) Sets up the icon representing a
GtkWindow. The icon is used when the window is minimized (also known as iconified). Some window managers or desktop environments may also place it in the window frame, or display it in other contexts. On others, the icon is not used at all, so your mileage may vary.gtk_window_set_icon_list()allows you to pass in the same icon in several hand-drawn sizes. The list should contain the natural sizes your icon is available in; that is, don’t scale the image before passing it to GTK+. Scaling is postponed until the last minute, when the desired final size is known, to allow best quality.By passing several sizes, you may improve the final image quality of the icon, by reducing or eliminating automatic image scaling.
Recommended sizes to provide: 16x16, 32x32, 48x48 at minimum, and larger images (64x64, 128x128) if you have them.
See also
gtk_window_set_default_icon_list()to set the icon for all windows in your application in one go.Note that transient windows (those who have been set transient for another window using
gtk_window_set_transient_for()) will inherit their icon from their transient parent. So there’s no need to explicitly set the icon on transient windows.Declaration
Swift
@inlinable func setIcon<ListT>(list: ListT) where ListT : ListProtocol -
setIcon(name:Extension method) Sets the icon for the window from a named themed icon. See the docs for
GtkIconThemefor more details. On some platforms, the window icon is not used at all.Note that this has nothing to do with the WM_ICON_NAME property which is mentioned in the ICCCM.
Declaration
Swift
@inlinable func setIcon(name: UnsafePointer<gchar>? = nil) -
setKeepAbove(setting:Extension method) Asks to keep
windowabove, so that it stays on top. Note that you shouldn’t assume the window is definitely above afterward, because other entities (e.g. the user or window manager) could not keep it above, and not all window managers support keeping windows above. But normally the window will end kept above. Just don’t write code that crashes if not.It’s permitted to call this function before showing a window, in which case the window will be kept above when it appears onscreen initially.
You can track the above state via the “window-state-event” signal on
GtkWidget.Note that, according to the Extended Window Manager Hints Specification, the above state is mainly meant for user preferences and should not be used by applications e.g. for drawing attention to their dialogs.
Declaration
Swift
@inlinable func setKeepAbove(setting: Bool) -
setKeepBelow(setting:Extension method) Asks to keep
windowbelow, so that it stays in bottom. Note that you shouldn’t assume the window is definitely below afterward, because other entities (e.g. the user or window manager) could not keep it below, and not all window managers support putting windows below. But normally the window will be kept below. Just don’t write code that crashes if not.It’s permitted to call this function before showing a window, in which case the window will be kept below when it appears onscreen initially.
You can track the below state via the “window-state-event” signal on
GtkWidget.Note that, according to the Extended Window Manager Hints Specification, the above state is mainly meant for user preferences and should not be used by applications e.g. for drawing attention to their dialogs.
Declaration
Swift
@inlinable func setKeepBelow(setting: Bool) -
setMnemonic(modifier:Extension method) Sets the mnemonic modifier for this window.
Declaration
Swift
@inlinable func setMnemonic(modifier: Gdk.ModifierType) -
setMnemonicsVisible(setting:Extension method) Sets the
GtkWindow:mnemonics-visibleproperty.Declaration
Swift
@inlinable func setMnemonicsVisible(setting: Bool) -
set(modal:Extension method) Sets a window modal or non-modal. Modal windows prevent interaction with other windows in the same application. To keep modal dialogs on top of main application windows, use
gtk_window_set_transient_for()to make the dialog transient for the parent; most window managers will then disallow lowering the dialog below the parent.Declaration
Swift
@inlinable func set(modal: Bool) -
set(opacity:Extension method) Request the windowing system to make
windowpartially transparent, with opacity 0 being fully transparent and 1 fully opaque. (Values of the opacity parameter are clamped to the [0,1] range.) On X11 this has any effect only on X screens with a compositing manager running. Seegtk_widget_is_composited(). On Windows it should work always.Note that setting a window’s opacity after the window has been shown causes it to flicker once on Windows.
set_opacity is deprecated: Use gtk_widget_set_opacity instead.
Declaration
Swift
@available(*, deprecated) @inlinable func set(opacity: Double) -
set(position:Extension method) Sets a position constraint for this window. If the old or new constraint is
GTK_WIN_POS_CENTER_ALWAYS, this will also cause the window to be repositioned to satisfy the new constraint.Declaration
Swift
@inlinable func set(position: GtkWindowPosition) -
set(resizable:Extension method) Sets whether the user can resize a window. Windows are user resizable by default.
Declaration
Swift
@inlinable func set(resizable: Bool) -
set(role:Extension method) This function is only useful on X11, not with other GTK+ targets.
In combination with the window title, the window role allows a window manager to identify “the same” window when an application is restarted. So for example you might set the “toolbox” role on your app’s toolbox window, so that when the user restarts their session, the window manager can put the toolbox back in the same place.
If a window already has a unique title, you don’t need to set the role, since the WM can use the title to identify the window when restoring the session.
Declaration
Swift
@inlinable func set(role: UnsafePointer<gchar>!) -
set(screen:Extension method) Sets the
GdkScreenwhere thewindowis displayed; if the window is already mapped, it will be unmapped, and then remapped on the new screen.Declaration
Swift
@inlinable func set<ScreenT>(screen: ScreenT) where ScreenT : ScreenProtocol -
setSkipPagerHint(setting:Extension method) Windows may set a hint asking the desktop environment not to display the window in the pager. This function sets this hint. (A “pager” is any desktop navigation tool such as a workspace switcher that displays a thumbnail representation of the windows on the screen.)
Declaration
Swift
@inlinable func setSkipPagerHint(setting: Bool) -
setSkipTaskbarHint(setting:Extension method) Windows may set a hint asking the desktop environment not to display the window in the task bar. This function sets this hint.
Declaration
Swift
@inlinable func setSkipTaskbarHint(setting: Bool) -
set(startupID:Extension method) Startup notification identifiers are used by desktop environment to track application startup, to provide user feedback and other features. This function changes the corresponding property on the underlying GdkWindow. Normally, startup identifier is managed automatically and you should only use this function in special cases like transferring focus from other processes. You should use this function before calling
gtk_window_present()or any equivalent function generating a window map event.This function is only useful on X11, not with other GTK+ targets.
Declaration
Swift
@inlinable func set(startupID: UnsafePointer<gchar>!) -
set(title:Extension method) Sets the title of the
GtkWindow. The title of a window will be displayed in its title bar; on the X Window System, the title bar is rendered by the window manager, so exactly how the title appears to users may vary according to a user’s exact configuration. The title should help a user distinguish this window from other windows they may have open. A good title might include the application name and current document filename, for example.Declaration
Swift
@inlinable func set(title: UnsafePointer<gchar>!) -
set(titlebar:Extension method) Sets a custom titlebar for
window.A typical widget used here is
GtkHeaderBar, as it provides various features expected of a titlebar while allowing the addition of child widgets to it.If you set a custom titlebar, GTK+ will do its best to convince the window manager not to put its own titlebar on the window. Depending on the system, this function may not work for a window that is already visible, so you set the titlebar before calling
gtk_widget_show().Declaration
Swift
@inlinable func set(titlebar: WidgetRef? = nil) -
set(titlebar:Extension method) Sets a custom titlebar for
window.A typical widget used here is
GtkHeaderBar, as it provides various features expected of a titlebar while allowing the addition of child widgets to it.If you set a custom titlebar, GTK+ will do its best to convince the window manager not to put its own titlebar on the window. Depending on the system, this function may not work for a window that is already visible, so you set the titlebar before calling
gtk_widget_show().Declaration
Swift
@inlinable func set<WidgetT>(titlebar: WidgetT?) where WidgetT : WidgetProtocol -
setTransientFor(parent:Extension method) Dialog windows should be set transient for the main application window they were spawned from. This allows window managers to e.g. keep the dialog on top of the main window, or center the dialog over the main window.
gtk_dialog_new_with_buttons()and other convenience functions in GTK+ will sometimes callgtk_window_set_transient_for()on your behalf.Passing
nilforparentunsets the current transient window.On Wayland, this function can also be used to attach a new
GTK_WINDOW_POPUPto aGTK_WINDOW_TOPLEVELparent already mapped on screen so that theGTK_WINDOW_POPUPwill be created as a subsurface-based windowGDK_WINDOW_SUBSURFACEwhich can be positioned at will relatively to theGTK_WINDOW_TOPLEVELsurface.On Windows, this function puts the child window on top of the parent, much as the window manager would have done on X.
Declaration
Swift
@inlinable func setTransientFor(parent: WindowRef? = nil) -
setTransientFor(parent:Extension method) Dialog windows should be set transient for the main application window they were spawned from. This allows window managers to e.g. keep the dialog on top of the main window, or center the dialog over the main window.
gtk_dialog_new_with_buttons()and other convenience functions in GTK+ will sometimes callgtk_window_set_transient_for()on your behalf.Passing
nilforparentunsets the current transient window.On Wayland, this function can also be used to attach a new
GTK_WINDOW_POPUPto aGTK_WINDOW_TOPLEVELparent already mapped on screen so that theGTK_WINDOW_POPUPwill be created as a subsurface-based windowGDK_WINDOW_SUBSURFACEwhich can be positioned at will relatively to theGTK_WINDOW_TOPLEVELsurface.On Windows, this function puts the child window on top of the parent, much as the window manager would have done on X.
Declaration
Swift
@inlinable func setTransientFor<WindowT>(parent: WindowT?) where WindowT : WindowProtocol -
setType(hint:Extension method) By setting the type hint for the window, you allow the window manager to decorate and handle the window in a way which is suitable to the function of the window in your application.
This function should be called before the window becomes visible.
gtk_dialog_new_with_buttons()and other convenience functions in GTK+ will sometimes callgtk_window_set_type_hint()on your behalf.Declaration
Swift
@inlinable func setType(hint: GdkWindowTypeHint) -
setUrgencyHint(setting:Extension method) Windows may set a hint asking the desktop environment to draw the users attention to the window. This function sets this hint.
Declaration
Swift
@inlinable func setUrgencyHint(setting: Bool) -
setWmclass(wmclassName:Extension methodwmclassClass: ) Don’t use this function. It sets the X Window System “class” and “name” hints for a window. According to the ICCCM, you should always set these to the same value for all windows in an application, and GTK+ sets them to that value by default, so calling this function is sort of pointless. However, you may want to call
gtk_window_set_role()on each window in your application, for the benefit of the session manager. Setting the role allows the window manager to restore window positions when loading a saved session.set_wmclass is deprecated: This method is deprecated.
Declaration
Swift
@available(*, deprecated) @inlinable func setWmclass(wmclassName: UnsafePointer<gchar>!, wmclassClass: UnsafePointer<gchar>!) -
stick()Extension methodAsks to stick
window, which means that it will appear on all user desktops. Note that you shouldn’t assume the window is definitely stuck afterward, because other entities (e.g. the user or window manager could unstick it again, and some window managers do not support sticking windows. But normally the window will end up stuck. Just don’t write code that crashes if not.It’s permitted to call this function before showing a window.
You can track stickiness via the “window-state-event” signal on
GtkWidget.Declaration
Swift
@inlinable func stick() -
unfullscreen()Extension methodAsks to toggle off the fullscreen state for
window. Note that you shouldn’t assume the window is definitely not full screen afterward, because other entities (e.g. the user or window manager) could fullscreen it again, and not all window managers honor requests to unfullscreen windows. But normally the window will end up restored to its normal state. Just don’t write code that crashes if not.You can track the fullscreen state via the “window-state-event” signal on
GtkWidget.Declaration
Swift
@inlinable func unfullscreen() -
unmaximize()Extension methodAsks to unmaximize
window. Note that you shouldn’t assume the window is definitely unmaximized afterward, because other entities (e.g. the user or window manager) could maximize it again, and not all window managers honor requests to unmaximize. But normally the window will end up unmaximized. Just don’t write code that crashes if not.You can track maximization via the “window-state-event” signal on
GtkWidget.Declaration
Swift
@inlinable func unmaximize() -
unstick()Extension methodAsks to unstick
window, which means that it will appear on only one of the user’s desktops. Note that you shouldn’t assume the window is definitely unstuck afterward, because other entities (e.g. the user or window manager) could stick it again. But normally the window will end up stuck. Just don’t write code that crashes if not.You can track stickiness via the “window-state-event” signal on
GtkWidget.Declaration
Swift
@inlinable func unstick() -
printRunPageSetupDialog(pageSetup:Extension methodsettings: ) Runs a page setup dialog, letting the user modify the values from
page_setup. If the user cancels the dialog, the returnedGtkPageSetupis identical to the passed inpage_setup, otherwise it contains the modifications done in the dialog.Note that this function may use a recursive mainloop to show the page setup dialog. See
gtk_print_run_page_setup_dialog_async()if this is a problem.Declaration
Swift
@inlinable func printRunPageSetupDialog<PrintSettingsT>(pageSetup: PageSetupRef? = nil, settings: PrintSettingsT) -> PageSetupRef! where PrintSettingsT : PrintSettingsProtocol -
printRunPageSetupDialog(pageSetup:Extension methodsettings: ) Runs a page setup dialog, letting the user modify the values from
page_setup. If the user cancels the dialog, the returnedGtkPageSetupis identical to the passed inpage_setup, otherwise it contains the modifications done in the dialog.Note that this function may use a recursive mainloop to show the page setup dialog. See
gtk_print_run_page_setup_dialog_async()if this is a problem.Declaration
Swift
@inlinable func printRunPageSetupDialog<PageSetupT, PrintSettingsT>(pageSetup: PageSetupT?, settings: PrintSettingsT) -> PageSetupRef! where PageSetupT : PageSetupProtocol, PrintSettingsT : PrintSettingsProtocol -
printRunPageSetupDialogAsync(pageSetup:Extension methodsettings: doneCb: data: ) Runs a page setup dialog, letting the user modify the values from
page_setup.In contrast to
gtk_print_run_page_setup_dialog(), this function returns after showing the page setup dialog on platforms that support this, and callsdone_cbfrom a signal handler for theresponsesignal of the dialog.Declaration
Swift
@inlinable func printRunPageSetupDialogAsync<PrintSettingsT>(pageSetup: PageSetupRef? = nil, settings: PrintSettingsT, doneCb: GtkPageSetupDoneFunc?, data: gpointer! = nil) where PrintSettingsT : PrintSettingsProtocol -
printRunPageSetupDialogAsync(pageSetup:Extension methodsettings: doneCb: data: ) Runs a page setup dialog, letting the user modify the values from
page_setup.In contrast to
gtk_print_run_page_setup_dialog(), this function returns after showing the page setup dialog on platforms that support this, and callsdone_cbfrom a signal handler for theresponsesignal of the dialog.Declaration
Swift
@inlinable func printRunPageSetupDialogAsync<PageSetupT, PrintSettingsT>(pageSetup: PageSetupT?, settings: PrintSettingsT, doneCb: GtkPageSetupDoneFunc?, data: gpointer! = nil) where PageSetupT : PageSetupProtocol, PrintSettingsT : PrintSettingsProtocol -
showURIOnWindow(uri:Extension methodtimestamp: ) This is a convenience function for launching the default application to show the uri. The uri must be of a form understood by GIO (i.e. you need to install gvfs to get support for uri schemes such as http:// or ftp://, as only local files are handled by GIO itself). Typical examples are
file:///home/gnome/pict.jpghttp://www.gnome.orgmailto:megnome.org``
Ideally the timestamp is taken from the event triggering the
gtk_show_uri()call. If timestamp is not known you can takeGDK_CURRENT_TIME.This is the recommended call to be used as it passes information necessary for sandbox helpers to parent their dialogs properly.
Declaration
Swift
@inlinable func showURIOnWindow(uri: UnsafePointer<CChar>!, timestamp: guint32) throws -> Bool -
acceptFocusExtension methodGets the value set by
gtk_window_set_accept_focus().Declaration
Swift
@inlinable var acceptFocus: Bool { get nonmutating set } -
applicationExtension methodThe
GtkApplicationassociated with the window.The application will be kept alive for at least as long as it has any windows associated with it (see
g_application_hold()for a way to keep it alive without windows).Normally, the connection between the application and the window will remain until the window is destroyed, but you can explicitly remove it by setting the :application property to
nil.Declaration
Swift
@inlinable var application: ApplicationRef! { get nonmutating set } -
attachedToExtension methodFetches the attach widget for this window. See
gtk_window_set_attached_to().Declaration
Swift
@inlinable var attachedTo: WidgetRef! { get nonmutating set } -
decoratedExtension methodWhether the window should be decorated by the window manager.
Declaration
Swift
@inlinable var decorated: Bool { get nonmutating set } -
defaultWidgetExtension methodReturns the default widget for
window. Seegtk_window_set_default()for more details.Declaration
Swift
@inlinable var defaultWidget: WidgetRef! { get } -
deletableExtension methodWhether the window frame should have a close button.
Declaration
Swift
@inlinable var deletable: Bool { get nonmutating set } -
destroyWithParentExtension methodReturns whether the window will be destroyed with its transient parent. See gtk_window_set_destroy_with_parent ().
Declaration
Swift
@inlinable var destroyWithParent: Bool { get nonmutating set } -
focusExtension methodRetrieves the current focused widget within the window. Note that this is the widget that would have the focus if the toplevel window focused; if the toplevel window is not focused then
gtk_widget_has_focus (widget)will not betruefor the widget.Declaration
Swift
@inlinable var focus: WidgetRef! { get nonmutating set } -
focusOnMapExtension methodGets the value set by
gtk_window_set_focus_on_map().Declaration
Swift
@inlinable var focusOnMap: Bool { get nonmutating set } -
focusVisibleExtension methodGets the value of the
GtkWindow:focus-visibleproperty.Declaration
Swift
@inlinable var focusVisible: Bool { get nonmutating set } -
gravityExtension methodThe window gravity of the window. See
gtk_window_move()andGdkGravityfor more details about window gravity.Declaration
Swift
@inlinable var gravity: GdkGravity { get nonmutating set } -
groupExtension methodReturns the group for
windowor the default group, ifwindowisnilor ifwindowdoes not have an explicit window group.Declaration
Swift
@inlinable var group: WindowGroupRef! { get } -
hasResizeGripExtension methodDetermines whether the window may have a resize grip.
get_has_resize_grip is deprecated: Resize grips have been removed.
Declaration
Swift
@inlinable var hasResizeGrip: Bool { get nonmutating set } -
hideTitlebarWhenMaximizedExtension methodReturns whether the window has requested to have its titlebar hidden when maximized. See gtk_window_set_hide_titlebar_when_maximized ().
Declaration
Swift
@inlinable var hideTitlebarWhenMaximized: Bool { get nonmutating set } -
iconExtension methodUndocumented
Declaration
Swift
@inlinable var icon: PixbufRef! { get nonmutating set } -
iconListExtension methodRetrieves the list of icons set by
gtk_window_set_icon_list(). The list is copied, but the reference count on each member won’t be incremented.Declaration
Swift
@inlinable var iconList: GLib.ListRef! { get nonmutating set } -
iconNameExtension methodReturns the name of the themed icon for the window, see
gtk_window_set_icon_name().Declaration
Swift
@inlinable var iconName: String! { get nonmutating set } -
isActiveExtension methodReturns whether the window is part of the current active toplevel. (That is, the toplevel window receiving keystrokes.) The return value is
trueif the window is active toplevel itself, but also if it is, say, aGtkPlugembedded in the active toplevel. You might use this function if you wanted to draw a widget differently in an active window from a widget in an inactive window. Seegtk_window_has_toplevel_focus()Declaration
Swift
@inlinable var isActive: Bool { get } -
isMaximizedExtension methodRetrieves the current maximized state of
window.Note that since maximization is ultimately handled by the window manager and happens asynchronously to an application request, you shouldn’t assume the return value of this function changing immediately (or at all), as an effect of calling
gtk_window_maximize()orgtk_window_unmaximize().Declaration
Swift
@inlinable var isMaximized: Bool { get } -
mnemonicModifierExtension methodReturns the mnemonic modifier for this window. See
gtk_window_set_mnemonic_modifier().Declaration
Swift
@inlinable var mnemonicModifier: Gdk.ModifierType { get nonmutating set } -
mnemonicsVisibleExtension methodGets the value of the
GtkWindow:mnemonics-visibleproperty.Declaration
Swift
@inlinable var mnemonicsVisible: Bool { get nonmutating set } -
modalExtension methodUndocumented
Declaration
Swift
@inlinable var modal: Bool { get nonmutating set } -
opacityExtension methodFetches the requested opacity for this window. See
gtk_window_set_opacity().get_opacity is deprecated: Use gtk_widget_get_opacity instead.
Declaration
Swift
@inlinable var opacity: Double { get nonmutating set } -
resizableExtension methodUndocumented
Declaration
Swift
@inlinable var resizable: Bool { get nonmutating set } -
roleExtension methodUndocumented
Declaration
Swift
@inlinable var role: String! { get nonmutating set } -
screenExtension methodUndocumented
Declaration
Swift
@inlinable var screen: Gdk.ScreenRef! { get nonmutating set } -
skipPagerHintExtension methodGets the value set by
gtk_window_set_skip_pager_hint().Declaration
Swift
@inlinable var skipPagerHint: Bool { get nonmutating set } -
skipTaskbarHintExtension methodGets the value set by
gtk_window_set_skip_taskbar_hint()Declaration
Swift
@inlinable var skipTaskbarHint: Bool { get nonmutating set } -
titleExtension methodUndocumented
Declaration
Swift
@inlinable var title: String! { get nonmutating set } -
titlebarExtension methodReturns the custom titlebar that has been set with
gtk_window_set_titlebar().Declaration
Swift
@inlinable var titlebar: WidgetRef! { get nonmutating set } -
transientForExtension methodFetches the transient parent for this window. See
gtk_window_set_transient_for().Declaration
Swift
@inlinable var transientFor: WindowRef! { get nonmutating set } -
typeHintExtension methodGets the type hint for this window. See
gtk_window_set_type_hint().Declaration
Swift
@inlinable var typeHint: GdkWindowTypeHint { get nonmutating set } -
urgencyHintExtension methodGets the value set by
gtk_window_set_urgency_hint()Declaration
Swift
@inlinable var urgencyHint: Bool { get nonmutating set } -
windowTypeExtension methodGets the type of the window. See
GtkWindowType.Declaration
Swift
@inlinable var windowType: GtkWindowType { get } -
binExtension methodUndocumented
Declaration
Swift
@inlinable var bin: GtkBin { get } -
sizeExtension methodsize of the window
Declaration
Swift
@inlinable var size: (width: Int, height: Int) { get }
View on GitHub
Install in Dash
WindowProtocol Protocol Reference