WidgetProtocol

public protocol WidgetProtocol : ImplementorIfaceProtocol, InitiallyUnownedProtocol, BuildableProtocol

GtkWidget is the base class all widgets in GTK+ derive from. It manages the widget lifecycle, states and style.

Height-for-width Geometry Management #

GTK+ uses a height-for-width (and width-for-height) geometry management system. Height-for-width means that a widget can change how much vertical space it needs, depending on the amount of horizontal space that it is given (and similar for width-for-height). The most common example is a label that reflows to fill up the available width, wraps to fewer lines, and therefore needs less height.

Height-for-width geometry management is implemented in GTK+ by way of five virtual methods:

  • GtkWidgetClass.get_request_mode()
  • GtkWidgetClass.get_preferred_width()
  • GtkWidgetClass.get_preferred_height()
  • GtkWidgetClass.get_preferred_height_for_width()
  • GtkWidgetClass.get_preferred_width_for_height()
  • GtkWidgetClass.get_preferred_height_and_baseline_for_width()

There are some important things to keep in mind when implementing height-for-width and when using it in container implementations.

The geometry management system will query a widget hierarchy in only one orientation at a time. When widgets are initially queried for their minimum sizes it is generally done in two initial passes in the GtkSizeRequestMode chosen by the toplevel.

For example, when queried in the normal GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH mode: First, the default minimum and natural width for each widget in the interface will be computed using gtk_widget_get_preferred_width(). Because the preferred widths for each container depend on the preferred widths of their children, this information propagates up the hierarchy, and finally a minimum and natural width is determined for the entire toplevel. Next, the toplevel will use the minimum width to query for the minimum height contextual to that width using gtk_widget_get_preferred_height_for_width(), which will also be a highly recursive operation. The minimum height for the minimum width is normally used to set the minimum size constraint on the toplevel (unless gtk_window_set_geometry_hints() is explicitly used instead).

After the toplevel window has initially requested its size in both dimensions it can go on to allocate itself a reasonable size (or a size previously specified with gtk_window_set_default_size()). During the recursive allocation process it’s important to note that request cycles will be recursively executed while container widgets allocate their children. Each container widget, once allocated a size, will go on to first share the space in one orientation among its children and then request each child’s height for its target allocated width or its width for allocated height, depending. In this way a GtkWidget will typically be requested its size a number of times before actually being allocated a size. The size a widget is finally allocated can of course differ from the size it has requested. For this reason, GtkWidget caches a small number of results to avoid re-querying for the same sizes in one allocation cycle.

See GtkContainer’s geometry management section to learn more about how height-for-width allocations are performed by container widgets.

If a widget does move content around to intelligently use up the allocated size then it must support the request in both GtkSizeRequestModes even if the widget in question only trades sizes in a single orientation.

For instance, a GtkLabel that does height-for-width word wrapping will not expect to have GtkWidgetClass.get_preferred_height() called because that call is specific to a width-for-height request. In this case the label must return the height required for its own minimum possible width. By following this rule any widget that handles height-for-width or width-for-height requests will always be allocated at least enough space to fit its own content.

Here are some examples of how a GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH widget generally deals with width-for-height requests, for GtkWidgetClass.get_preferred_height() it will do:

(C Language Example):

static void
foo_widget_get_preferred_height (GtkWidget *widget,
                                 gint *min_height,
                                 gint *nat_height)
{
   if (i_am_in_height_for_width_mode)
     {
       gint min_width, nat_width;

       GTK_WIDGET_GET_CLASS (widget)->get_preferred_width (widget,
                                                           &min_width,
                                                           &nat_width);
       GTK_WIDGET_GET_CLASS (widget)->get_preferred_height_for_width
                                                          (widget,
                                                           min_width,
                                                           min_height,
                                                           nat_height);
     }
   else
     {
        ... some widgets do both. For instance, if a GtkLabel is
        rotated to 90 degrees it will return the minimum and
        natural height for the rotated label here.
     }
}

And in GtkWidgetClass.get_preferred_width_for_height() it will simply return the minimum and natural width: (C Language Example):

static void
foo_widget_get_preferred_width_for_height (GtkWidget *widget,
                                           gint for_height,
                                           gint *min_width,
                                           gint *nat_width)
{
   if (i_am_in_height_for_width_mode)
     {
       GTK_WIDGET_GET_CLASS (widget)->get_preferred_width (widget,
                                                           min_width,
                                                           nat_width);
     }
   else
     {
        ... again if a widget is sometimes operating in
        width-for-height mode (like a rotated GtkLabel) it can go
        ahead and do its real width for height calculation here.
     }
}

Often a widget needs to get its own request during size request or allocation. For example, when computing height it may need to also compute width. Or when deciding how to use an allocation, the widget may need to know its natural size. In these cases, the widget should be careful to call its virtual methods directly, like this:

(C Language Example):

GTK_WIDGET_GET_CLASS(widget)->get_preferred_width (widget,
                                                   &min,
                                                   &natural);

It will not work to use the wrapper functions, such as gtk_widget_get_preferred_width() inside your own size request implementation. These return a request adjusted by GtkSizeGroup and by the GtkWidgetClass.adjust_size_request() virtual method. If a widget used the wrappers inside its virtual method implementations, then the adjustments (such as widget margins) would be applied twice. GTK+ therefore does not allow this and will warn if you try to do it.

Of course if you are getting the size request for another widget, such as a child of a container, you must use the wrapper APIs. Otherwise, you would not properly consider widget margins, GtkSizeGroup, and so forth.

Since 3.10 GTK+ also supports baseline vertical alignment of widgets. This means that widgets are positioned such that the typographical baseline of widgets in the same row are aligned. This happens if a widget supports baselines, has a vertical alignment of GTK_ALIGN_BASELINE, and is inside a container that supports baselines and has a natural “row” that it aligns to the baseline, or a baseline assigned to it by the grandparent.

Baseline alignment support for a widget is done by the GtkWidgetClass.get_preferred_height_and_baseline_for_width() virtual function. It allows you to report a baseline in combination with the minimum and natural height. If there is no baseline you can return -1 to indicate this. The default implementation of this virtual function calls into the GtkWidgetClass.get_preferred_height() and GtkWidgetClass.get_preferred_height_for_width(), so if baselines are not supported it doesn’t need to be implemented.

If a widget ends up baseline aligned it will be allocated all the space in the parent as if it was GTK_ALIGN_FILL, but the selected baseline can be found via gtk_widget_get_allocated_baseline(). If this has a value other than -1 you need to align the widget such that the baseline appears at the position.

Style Properties

GtkWidget introduces “style properties” - these are basically object properties that are stored not on the object, but in the style object associated to the widget. Style properties are set in resource files. This mechanism is used for configuring such things as the location of the scrollbar arrows through the theme, giving theme authors more control over the look of applications without the need to write a theme engine in C.

Use gtk_widget_class_install_style_property() to install style properties for a widget class, gtk_widget_class_find_style_property() or gtk_widget_class_list_style_properties() to get information about existing style properties and gtk_widget_style_get_property(), gtk_widget_style_get() or gtk_widget_style_get_valist() to obtain the value of a style property.

GtkWidget as GtkBuildable

The GtkWidget implementation of the GtkBuildable interface supports a custom <accelerator> element, which has attributes named ”key”, ”modifiers” and ”signal” and allows to specify accelerators.

An example of a UI definition fragment specifying an accelerator:

<object class="GtkButton">
  <accelerator key="q" modifiers="GDK_CONTROL_MASK" signal="clicked"/>
</object>

In addition to accelerators, GtkWidget also support a custom <accessible> element, which supports actions and relations. Properties on the accessible implementation of an object can be set by accessing the internal child “accessible” of a GtkWidget.

An example of a UI definition fragment specifying an accessible:

<object class="GtkLabel" id="label1"/>
  <property name="label">I am a Label for a Button</property>
</object>
<object class="GtkButton" id="button1">
  <accessibility>
    <action action_name="click" translatable="yes">Click the button.</action>
    <relation target="label1" type="labelled-by"/>
  </accessibility>
  <child internal-child="accessible">
    <object class="AtkObject" id="a11y-button1">
      <property name="accessible-name">Clickable Button</property>
    </object>
  </child>
</object>

Finally, GtkWidget allows style information such as style classes to be associated with widgets, using the custom <style> element:

<object class="GtkButton" id="button1">
  <style>
    <class name="my-special-button-class"/>
    <class name="dark-button"/>
  </style>
</object>

Building composite widgets from template XML ##

GtkWidget exposes some facilities to automate the procedure of creating composite widgets using GtkBuilder interface description language.

To create composite widgets with GtkBuilder XML, one must associate the interface description with the widget class at class initialization time using gtk_widget_class_set_template().

The interface description semantics expected in composite template descriptions is slightly different from regular GtkBuilder XML.

Unlike regular interface descriptions, gtk_widget_class_set_template() will expect a <template> tag as a direct child of the toplevel <interface> tag. The <template> tag must specify the “class” attribute which must be the type name of the widget. Optionally, the “parent” attribute may be specified to specify the direct parent type of the widget type, this is ignored by the GtkBuilder but required for Glade to introspect what kind of properties and internal children exist for a given type when the actual type does not exist.

The XML which is contained inside the <template> tag behaves as if it were added to the <object> tag defining widget itself. You may set properties on widget by inserting <property> tags into the <template> tag, and also add <child> tags to add children and extend widget in the normal way you would with <object> tags.

Additionally, <object> tags can also be added before and after the initial <template> tag in the normal way, allowing one to define auxiliary objects which might be referenced by other widgets declared as children of the <template> tag.

An example of a GtkBuilder Template Definition:

<interface>
  <template class="FooWidget" parent="GtkBox">
    <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
    <property name="spacing">4</property>
    <child>
      <object class="GtkButton" id="hello_button">
        <property name="label">Hello World</property>
        <signal name="clicked" handler="hello_button_clicked" object="FooWidget" swapped="yes"/>
      </object>
    </child>
    <child>
      <object class="GtkButton" id="goodbye_button">
        <property name="label">Goodbye World</property>
      </object>
    </child>
  </template>
</interface>

Typically, you’ll place the template fragment into a file that is bundled with your project, using GResource. In order to load the template, you need to call gtk_widget_class_set_template_from_resource() from the class initialization of your GtkWidget type:

(C Language Example):

static void
foo_widget_class_init (FooWidgetClass *klass)
{
  // ...

  gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass),
                                               "/com/example/ui/foowidget.ui");
}

You will also need to call gtk_widget_init_template() from the instance initialization function:

(C Language Example):

static void
foo_widget_init (FooWidget *self)
{
  // ...
  gtk_widget_init_template (GTK_WIDGET (self));
}

You can access widgets defined in the template using the gtk_widget_get_template_child() function, but you will typically declare a pointer in the instance private data structure of your type using the same name as the widget in the template definition, and call gtk_widget_class_bind_template_child_private() with that name, e.g.

(C Language Example):

typedef struct {
  GtkWidget *hello_button;
  GtkWidget *goodbye_button;
} FooWidgetPrivate;

G_DEFINE_TYPE_WITH_PRIVATE (FooWidget, foo_widget, GTK_TYPE_BOX)

static void
foo_widget_class_init (FooWidgetClass *klass)
{
  // ...
  gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass),
                                               "/com/example/ui/foowidget.ui");
  gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass),
                                                FooWidget, hello_button);
  gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass),
                                                FooWidget, goodbye_button);
}

static void
foo_widget_init (FooWidget *widget)
{

}

You can also use gtk_widget_class_bind_template_callback() to connect a signal callback defined in the template with a function visible in the scope of the class, e.g.

(C Language Example):

// the signal handler has the instance and user data swapped
// because of the swapped="yes" attribute in the template XML
static void
hello_button_clicked (FooWidget *self,
                      GtkButton *button)
{
  g_print ("Hello, world!\n");
}

static void
foo_widget_class_init (FooWidgetClass *klass)
{
  // ...
  gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass),
                                               "/com/example/ui/foowidget.ui");
  gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (klass), hello_button_clicked);
}

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

  • ptr

    Untyped pointer to the underlying GtkWidget instance.

    Declaration

    Swift

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

    Typed pointer to the underlying GtkWidget instance.

    Default Implementation

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

    Declaration

    Swift

    var widget_ptr: UnsafeMutablePointer<GtkWidget>! { get }
  • Required Initialiser for types conforming to WidgetProtocol

    Declaration

    Swift

    init(raw: UnsafeMutableRawPointer)
  • Set a drag source

    Declaration

    Swift

    @inlinable
    func dragSourceSet(startButton: Gdk.ModifierType = .button1Mask, action: Gdk.DragAction = .copy, targets: [String])

    Parameters

    startButton

    button to start dragging from (defaults to .button1Mask)

    action

    drag action to perform (defaults to .copy)

    targets

    array of targets to target

  • Set a drag source

    Declaration

    Swift

    @inlinable
    func dragSourceSet(startButton: Gdk.ModifierType = .button1Mask, action: Gdk.DragAction = .copy, targets: [GtkTargetEntry])

    Parameters

    startButton

    button to start dragging from (defaults to .button1Mask)

    action

    drag action to perform (defaults to .copy)

    targets

    array of targets to target

  • Set a drag source

    Declaration

    Swift

    @inlinable
    func dragSourceSet(startButton b: Gdk.ModifierType = .button1Mask, action a: Gdk.DragAction = .copy, targets t: String...)

    Parameters

    startButton

    button to start dragging from (defaults to .button1Mask)

    action

    drag action to perform (defaults to .copy)

    targets

    list of targets to target

  • Set a drag source

    Declaration

    Swift

    @inlinable
    func dragSourceSet(startButton b: Gdk.ModifierType = .button1Mask, action a: Gdk.DragAction = .copy, targets t: GtkTargetEntry...)

    Parameters

    startButton

    button to start dragging from (defaults to .button1Mask)

    action

    drag action to perform (defaults to .copy)

    targets

    list of targets to target

  • Set a drag destination

    Declaration

    Swift

    @inlinable
    func dragDestSet(flags f: DestDefaults = .all, action a: Gdk.DragAction = .copy, targets: [String])

    Parameters

    flags

    destination defaults (defaults to .all)

    action

    drag action to perform (defaults to .copy)

    targets

    array of targets to target

  • Set a drag destination

    Declaration

    Swift

    @inlinable
    func dragDestSet(flags f: DestDefaults = .all, action a: Gdk.DragAction = .copy, targets: [GtkTargetEntry])

    Parameters

    flags

    destination defaults (defaults to .all)

    action

    drag action to perform (defaults to .copy)

    targets

    array of targets to target

  • Set a drag destination

    Declaration

    Swift

    @inlinable
    func dragDestSet(flags f: DestDefaults = .all, action a: Gdk.DragAction = .copy, targets t: String...)

    Parameters

    flags

    destination defaults (defaults to .all)

    action

    drag action to perform (defaults to .copy)

    targets

    list of targets to target

  • Set a drag destination

    Declaration

    Swift

    @inlinable
    func dragDestSet(flags f: DestDefaults = .all, action a: Gdk.DragAction = .copy, targets t: GtkTargetEntry...)

    Parameters

    flags

    destination defaults (defaults to .all)

    action

    drag action to perform (defaults to .copy)

    targets

    list of targets to target

Widget Class

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

    Declaration

    Swift

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

    Parameters

    source_property

    the source property to bind

    target

    the target object to bind to

    target_property

    the target property to bind to

    flags

    the flags to pass to the Binding

    transform_from

    ValueTransformer to use for forward transformation

    transform_to

    ValueTransformer to use for backwards transformation

    Return Value

    binding reference or nil in case of an error

  • get(property:) Extension method

    Get the value of a Widget property

    Declaration

    Swift

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

    Parameters

    property

    the property to get the value for

    Return Value

    the value of the named property

  • set(property:value:) Extension method

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

    Declaration

    Swift

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

    Parameters

    property

    the property to get the value for

    Return Value

    the value of the named property

Widget signals

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

    Declaration

    Swift

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

    Parameters

    signal

    The signal to connect

    flags

    The connection flags to use

    data

    A pointer to user data to provide to the callback

    destroyData

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

    handler

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

    Return Value

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

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

    Declaration

    Swift

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

    Parameters

    signal

    The signal to connect

    flags

    The connection flags to use

    data

    A pointer to user data to provide to the callback

    destroyData

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

    signalHandler

    The C function to be called on the given signal

    Return Value

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

  • sizeAllocateSignal Extension method

    Note

    This represents the underlying size-allocate signal

    Warning

    a onSizeAllocate wrapper for this signal could not be generated because it contains unimplemented features: { (5) Alias argument or return is not yet supported }

    Note

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

    Declaration

    Swift

    static var sizeAllocateSignal: WidgetSignalName { get }

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    allocation

    the region which has been allocated to the widget.

    handler

    The signal handler to call

  • Note

    This represents the underlying accel-closures-changed signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    handler

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

  • accelClosuresChangedSignal Extension method

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

    Declaration

    Swift

    static var accelClosuresChangedSignal: WidgetSignalName { get }
  • The button-press-event signal will be emitted when a button (typically from a mouse) is pressed.

    To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_BUTTON_PRESS_MASK mask.

    This signal will be sent to the grab widget if there is one.

    Note

    This represents the underlying button-press-event signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onButtonPressEvent(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ event: Gdk.EventButtonRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    event

    the GdkEventButton which triggered this signal.

    handler

    true to stop other handlers from being invoked for the event. false to propagate the event further. Run the given callback whenever the buttonPressEvent signal is emitted

  • buttonPressEventSignal Extension method

    Typed button-press-event signal for using the connect(signal:) methods

    Declaration

    Swift

    static var buttonPressEventSignal: WidgetSignalName { get }
  • The button-release-event signal will be emitted when a button (typically from a mouse) is released.

    To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_BUTTON_RELEASE_MASK mask.

    This signal will be sent to the grab widget if there is one.

    Note

    This represents the underlying button-release-event signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onButtonReleaseEvent(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ event: Gdk.EventButtonRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    event

    the GdkEventButton which triggered this signal.

    handler

    true to stop other handlers from being invoked for the event. false to propagate the event further. Run the given callback whenever the buttonReleaseEvent signal is emitted

  • buttonReleaseEventSignal Extension method

    Typed button-release-event signal for using the connect(signal:) methods

    Declaration

    Swift

    static var buttonReleaseEventSignal: WidgetSignalName { get }
  • Determines whether an accelerator that activates the signal identified by signal_id can currently be activated. This signal is present to allow applications and derived widgets to override the default GtkWidget handling for determining whether an accelerator can be activated.

    Note

    This represents the underlying can-activate-accel signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onCanActivateAccel(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ signalID: UInt) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    signalID

    the ID of a signal installed on widget

    handler

    true if the signal can be activated. Run the given callback whenever the canActivateAccel signal is emitted

  • canActivateAccelSignal Extension method

    Typed can-activate-accel signal for using the connect(signal:) methods

    Declaration

    Swift

    static var canActivateAccelSignal: WidgetSignalName { get }
  • The child-notify signal is emitted for each child property that has changed on an object. The signal’s detail holds the property name.

    Note

    This represents the underlying child-notify signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onChildNotify(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ childProperty: GLibObject.ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    childProperty

    the GParamSpec of the changed child property

    handler

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

  • childNotifySignal Extension method

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

    Declaration

    Swift

    static var childNotifySignal: WidgetSignalName { get }
  • The composited-changed signal is emitted when the composited status of widgets screen changes. See gdk_screen_is_composited().

    Note

    This represents the underlying composited-changed signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    handler

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

  • compositedChangedSignal Extension method

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

    Declaration

    Swift

    static var compositedChangedSignal: WidgetSignalName { get }
  • The configure-event signal will be emitted when the size, position or stacking of the widget‘s window has changed.

    To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_STRUCTURE_MASK mask. GDK will enable this mask automatically for all new windows.

    Note

    This represents the underlying configure-event signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onConfigureEvent(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ event: Gdk.EventConfigureRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    event

    the GdkEventConfigure which triggered this signal.

    handler

    true to stop other handlers from being invoked for the event. false to propagate the event further. Run the given callback whenever the configureEvent signal is emitted

  • configureEventSignal Extension method

    Typed configure-event signal for using the connect(signal:) methods

    Declaration

    Swift

    static var configureEventSignal: WidgetSignalName { get }
  • Emitted when a redirected window belonging to widget gets drawn into. The region/area members of the event shows what area of the redirected drawable was drawn into.

    Note

    This represents the underlying damage-event signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onDamageEvent(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ event: Gdk.EventExposeRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    event

    the GdkEventExpose event

    handler

    true to stop other handlers from being invoked for the event. false to propagate the event further. Run the given callback whenever the damageEvent signal is emitted

  • damageEventSignal Extension method

    Typed damage-event signal for using the connect(signal:) methods

    Declaration

    Swift

    static var damageEventSignal: WidgetSignalName { get }
  • The delete-event signal is emitted if a user requests that a toplevel window is closed. The default handler for this signal destroys the window. Connecting gtk_widget_hide_on_delete() to this signal will cause the window to be hidden instead, so that it can later be shown again without reconstructing it.

    Note

    This represents the underlying delete-event signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onDeleteEvent(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ event: Gdk.EventRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    event

    the event which triggered this signal

    handler

    true to stop other handlers from being invoked for the event. false to propagate the event further. Run the given callback whenever the deleteEvent signal is emitted

  • deleteEventSignal Extension method

    Typed delete-event signal for using the connect(signal:) methods

    Declaration

    Swift

    static var deleteEventSignal: WidgetSignalName { get }
  • onDestroy(flags:handler:) Extension method

    Signals that all holders of a reference to the widget should release the reference that they hold. May result in finalization of the widget if all references are released.

    This signal is not suitable for saving widget state.

    Note

    This represents the underlying destroy signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    handler

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

  • destroySignal Extension method

    Typed destroy signal for using the connect(signal:) methods

    Declaration

    Swift

    static var destroySignal: WidgetSignalName { get }
  • The destroy-event signal is emitted when a GdkWindow is destroyed. You rarely get this signal, because most widgets disconnect themselves from their window before they destroy it, so no widget owns the window at destroy time.

    To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_STRUCTURE_MASK mask. GDK will enable this mask automatically for all new windows.

    Note

    This represents the underlying destroy-event signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onDestroyEvent(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ event: Gdk.EventRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    event

    the event which triggered this signal

    handler

    true to stop other handlers from being invoked for the event. false to propagate the event further. Run the given callback whenever the destroyEvent signal is emitted

  • destroyEventSignal Extension method

    Typed destroy-event signal for using the connect(signal:) methods

    Declaration

    Swift

    static var destroyEventSignal: WidgetSignalName { get }
  • The direction-changed signal is emitted when the text direction of a widget changes.

    Note

    This represents the underlying direction-changed signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onDirectionChanged(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ previousDirection: TextDirection) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    previousDirection

    the previous text direction of widget

    handler

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

  • directionChangedSignal Extension method

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

    Declaration

    Swift

    static var directionChangedSignal: WidgetSignalName { get }
  • onDragBegin(flags:handler:) Extension method

    The drag-begin signal is emitted on the drag source when a drag is started. A typical reason to connect to this signal is to set up a custom drag icon with e.g. gtk_drag_source_set_icon_pixbuf().

    Note that some widgets set up a drag icon in the default handler of this signal, so you may have to use g_signal_connect_after() to override what the default handler did.

    Note

    This represents the underlying drag-begin signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onDragBegin(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ context: Gdk.DragContextRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    context

    the drag context

    handler

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

  • dragBeginSignal Extension method

    Typed drag-begin signal for using the connect(signal:) methods

    Declaration

    Swift

    static var dragBeginSignal: WidgetSignalName { get }
  • The drag-data-delete signal is emitted on the drag source when a drag with the action GDK_ACTION_MOVE is successfully completed. The signal handler is responsible for deleting the data that has been dropped. What “delete” means depends on the context of the drag operation.

    Note

    This represents the underlying drag-data-delete signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onDragDataDelete(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ context: Gdk.DragContextRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    context

    the drag context

    handler

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

  • dragDataDeleteSignal Extension method

    Typed drag-data-delete signal for using the connect(signal:) methods

    Declaration

    Swift

    static var dragDataDeleteSignal: WidgetSignalName { get }
  • The drag-data-get signal is emitted on the drag source when the drop site requests the data which is dragged. It is the responsibility of the signal handler to fill data with the data in the format which is indicated by info. See gtk_selection_data_set() and gtk_selection_data_set_text().

    Note

    This represents the underlying drag-data-get signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onDragDataGet(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ context: Gdk.DragContextRef, _ data: SelectionDataRef, _ info: UInt, _ time: UInt) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    context

    the drag context

    data

    the GtkSelectionData to be filled with the dragged data

    info

    the info that has been registered with the target in the GtkTargetList

    time

    the timestamp at which the data was requested

    handler

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

  • dragDataGetSignal Extension method

    Typed drag-data-get signal for using the connect(signal:) methods

    Declaration

    Swift

    static var dragDataGetSignal: WidgetSignalName { get }
  • The drag-data-received signal is emitted on the drop site when the dragged data has been received. If the data was received in order to determine whether the drop will be accepted, the handler is expected to call gdk_drag_status() and not finish the drag. If the data was received in response to a GtkWidget::drag-drop signal (and this is the last target to be received), the handler for this signal is expected to process the received data and then call gtk_drag_finish(), setting the success parameter depending on whether the data was processed successfully.

    Applications must create some means to determine why the signal was emitted and therefore whether to call gdk_drag_status() or gtk_drag_finish().

    The handler may inspect the selected action with gdk_drag_context_get_selected_action() before calling gtk_drag_finish(), e.g. to implement GDK_ACTION_ASK as shown in the following example: (C Language Example):

    void
    drag_data_received (GtkWidget          *widget,
                        GdkDragContext     *context,
                        gint                x,
                        gint                y,
                        GtkSelectionData   *data,
                        guint               info,
                        guint               time)
    {
      if ((data->length >= 0) && (data->format == 8))
        {
          GdkDragAction action;
    
          // handle data here
    
          action = gdk_drag_context_get_selected_action (context);
          if (action == GDK_ACTION_ASK)
            {
              GtkWidget *dialog;
              gint response;
    
              dialog = gtk_message_dialog_new (NULL,
                                               GTK_DIALOG_MODAL |
                                               GTK_DIALOG_DESTROY_WITH_PARENT,
                                               GTK_MESSAGE_INFO,
                                               GTK_BUTTONS_YES_NO,
                                               "Move the data ?\n");
              response = gtk_dialog_run (GTK_DIALOG (dialog));
              gtk_widget_destroy (dialog);
    
              if (response == GTK_RESPONSE_YES)
                action = GDK_ACTION_MOVE;
              else
                action = GDK_ACTION_COPY;
             }
    
          gtk_drag_finish (context, TRUE, action == GDK_ACTION_MOVE, time);
        }
      else
        gtk_drag_finish (context, FALSE, FALSE, time);
     }
    

    Note

    This represents the underlying drag-data-received signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onDragDataReceived(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ context: Gdk.DragContextRef, _ x: Int, _ y: Int, _ data: SelectionDataRef, _ info: UInt, _ time: UInt) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    context

    the drag context

    x

    where the drop happened

    y

    where the drop happened

    data

    the received data

    info

    the info that has been registered with the target in the GtkTargetList

    time

    the timestamp at which the data was received

    handler

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

  • dragDataReceivedSignal Extension method

    Typed drag-data-received signal for using the connect(signal:) methods

    Declaration

    Swift

    static var dragDataReceivedSignal: WidgetSignalName { get }
  • onDragDrop(flags:handler:) Extension method

    The drag-drop signal is emitted on the drop site when the user drops the data onto the widget. The signal handler must determine whether the cursor position is in a drop zone or not. If it is not in a drop zone, it returns false and no further processing is necessary. Otherwise, the handler returns true. In this case, the handler must ensure that gtk_drag_finish() is called to let the source know that the drop is done. The call to gtk_drag_finish() can be done either directly or in a GtkWidget::drag-data-received handler which gets triggered by calling gtk_drag_get_data() to receive the data for one or more of the supported targets.

    Note

    This represents the underlying drag-drop signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onDragDrop(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ context: Gdk.DragContextRef, _ x: Int, _ y: Int, _ time: UInt) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    context

    the drag context

    x

    the x coordinate of the current cursor position

    y

    the y coordinate of the current cursor position

    time

    the timestamp of the motion event

    handler

    whether the cursor position is in a drop zone Run the given callback whenever the dragDrop signal is emitted

  • dragDropSignal Extension method

    Typed drag-drop signal for using the connect(signal:) methods

    Declaration

    Swift

    static var dragDropSignal: WidgetSignalName { get }
  • onDragEnd(flags:handler:) Extension method

    The drag-end signal is emitted on the drag source when a drag is finished. A typical reason to connect to this signal is to undo things done in GtkWidget::drag-begin.

    Note

    This represents the underlying drag-end signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onDragEnd(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ context: Gdk.DragContextRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    context

    the drag context

    handler

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

  • dragEndSignal Extension method

    Typed drag-end signal for using the connect(signal:) methods

    Declaration

    Swift

    static var dragEndSignal: WidgetSignalName { get }
  • onDragFailed(flags:handler:) Extension method

    The drag-failed signal is emitted on the drag source when a drag has failed. The signal handler may hook custom code to handle a failed DnD operation based on the type of error, it returns true is the failure has been already handled (not showing the default “drag operation failed” animation), otherwise it returns false.

    Note

    This represents the underlying drag-failed signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onDragFailed(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ context: Gdk.DragContextRef, _ result: DragResult) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    context

    the drag context

    result

    the result of the drag operation

    handler

    true if the failed drag operation has been already handled. Run the given callback whenever the dragFailed signal is emitted

  • dragFailedSignal Extension method

    Typed drag-failed signal for using the connect(signal:) methods

    Declaration

    Swift

    static var dragFailedSignal: WidgetSignalName { get }
  • onDragLeave(flags:handler:) Extension method

    The drag-leave signal is emitted on the drop site when the cursor leaves the widget. A typical reason to connect to this signal is to undo things done in GtkWidget::drag-motion, e.g. undo highlighting with gtk_drag_unhighlight().

    Likewise, the GtkWidget::drag-leave signal is also emitted before the drag-drop signal, for instance to allow cleaning up of a preview item created in the GtkWidget::drag-motion signal handler.

    Note

    This represents the underlying drag-leave signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onDragLeave(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ context: Gdk.DragContextRef, _ time: UInt) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    context

    the drag context

    time

    the timestamp of the motion event

    handler

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

  • dragLeaveSignal Extension method

    Typed drag-leave signal for using the connect(signal:) methods

    Declaration

    Swift

    static var dragLeaveSignal: WidgetSignalName { get }
  • onDragMotion(flags:handler:) Extension method

    The drag-motion signal is emitted on the drop site when the user moves the cursor over the widget during a drag. The signal handler must determine whether the cursor position is in a drop zone or not. If it is not in a drop zone, it returns false and no further processing is necessary. Otherwise, the handler returns true. In this case, the handler is responsible for providing the necessary information for displaying feedback to the user, by calling gdk_drag_status().

    If the decision whether the drop will be accepted or rejected can’t be made based solely on the cursor position and the type of the data, the handler may inspect the dragged data by calling gtk_drag_get_data() and defer the gdk_drag_status() call to the GtkWidget::drag-data-received handler. Note that you must pass GTK_DEST_DEFAULT_DROP, GTK_DEST_DEFAULT_MOTION or GTK_DEST_DEFAULT_ALL to gtk_drag_dest_set() when using the drag-motion signal that way.

    Also note that there is no drag-enter signal. The drag receiver has to keep track of whether he has received any drag-motion signals since the last GtkWidget::drag-leave and if not, treat the drag-motion signal as an “enter” signal. Upon an “enter”, the handler will typically highlight the drop site with gtk_drag_highlight(). (C Language Example):

    static void
    drag_motion (GtkWidget      *widget,
                 GdkDragContext *context,
                 gint            x,
                 gint            y,
                 guint           time)
    {
      GdkAtom target;
    
      PrivateData *private_data = GET_PRIVATE_DATA (widget);
    
      if (!private_data->drag_highlight)
       {
         private_data->drag_highlight = 1;
         gtk_drag_highlight (widget);
       }
    
      target = gtk_drag_dest_find_target (widget, context, NULL);
      if (target == GDK_NONE)
        gdk_drag_status (context, 0, time);
      else
       {
         private_data->pending_status
            = gdk_drag_context_get_suggested_action (context);
         gtk_drag_get_data (widget, context, target, time);
       }
    
      return TRUE;
    }
    
    static void
    drag_data_received (GtkWidget        *widget,
                        GdkDragContext   *context,
                        gint              x,
                        gint              y,
                        GtkSelectionData *selection_data,
                        guint             info,
                        guint             time)
    {
      PrivateData *private_data = GET_PRIVATE_DATA (widget);
    
      if (private_data->suggested_action)
       {
         private_data->suggested_action = 0;
    
         // We are getting this data due to a request in drag_motion,
         // rather than due to a request in drag_drop, so we are just
         // supposed to call gdk_drag_status(), not actually paste in
         // the data.
    
         str = gtk_selection_data_get_text (selection_data);
         if (!data_is_acceptable (str))
           gdk_drag_status (context, 0, time);
         else
           gdk_drag_status (context,
                            private_data->suggested_action,
                            time);
       }
      else
       {
         // accept the drop
       }
    }
    

    Note

    This represents the underlying drag-motion signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onDragMotion(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ context: Gdk.DragContextRef, _ x: Int, _ y: Int, _ time: UInt) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    context

    the drag context

    x

    the x coordinate of the current cursor position

    y

    the y coordinate of the current cursor position

    time

    the timestamp of the motion event

    handler

    whether the cursor position is in a drop zone Run the given callback whenever the dragMotion signal is emitted

  • dragMotionSignal Extension method

    Typed drag-motion signal for using the connect(signal:) methods

    Declaration

    Swift

    static var dragMotionSignal: WidgetSignalName { get }
  • onDraw(flags:handler:) Extension method

    This signal is emitted when a widget is supposed to render itself. The widget‘s top left corner must be painted at the origin of the passed in context and be sized to the values returned by gtk_widget_get_allocated_width() and gtk_widget_get_allocated_height().

    Signal handlers connected to this signal can modify the cairo context passed as cr in any way they like and don’t need to restore it. The signal emission takes care of calling cairo_save() before and cairo_restore() after invoking the handler.

    The signal handler will get a cr with a clip region already set to the widget’s dirty region, i.e. to the area that needs repainting. Complicated widgets that want to avoid redrawing themselves completely can get the full extents of the clip region with gdk_cairo_get_clip_rectangle(), or they can get a finer-grained representation of the dirty region with cairo_copy_clip_rectangle_list().

    Note

    This represents the underlying draw signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onDraw(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ cr: Cairo.ContextRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    cr

    the cairo context to draw to

    handler

    true to stop other handlers from being invoked for the event. false to propagate the event further. Run the given callback whenever the draw signal is emitted

  • drawSignal Extension method

    Typed draw signal for using the connect(signal:) methods

    Declaration

    Swift

    static var drawSignal: WidgetSignalName { get }
  • The enter-notify-event will be emitted when the pointer enters the widget‘s window.

    To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_ENTER_NOTIFY_MASK mask.

    This signal will be sent to the grab widget if there is one.

    Note

    This represents the underlying enter-notify-event signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onEnterNotifyEvent(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ event: Gdk.EventCrossingRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    event

    the GdkEventCrossing which triggered this signal.

    handler

    true to stop other handlers from being invoked for the event. false to propagate the event further. Run the given callback whenever the enterNotifyEvent signal is emitted

  • enterNotifyEventSignal Extension method

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

    Declaration

    Swift

    static var enterNotifyEventSignal: WidgetSignalName { get }
  • onEvent(flags:handler:) Extension method

    The GTK+ main loop will emit three signals for each GDK event delivered to a widget: one generic event signal, another, more specific, signal that matches the type of event delivered (e.g. GtkWidget::key-press-event) and finally a generic GtkWidget::event-after signal.

    Note

    This represents the underlying event signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onEvent(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ event: Gdk.EventRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    event

    the GdkEvent which triggered this signal

    handler

    true to stop other handlers from being invoked for the event and to cancel the emission of the second specific event signal. false to propagate the event further and to allow the emission of the second signal. The event-after signal is emitted regardless of the return value. Run the given callback whenever the event signal is emitted

  • eventSignal Extension method

    Typed event signal for using the connect(signal:) methods

    Declaration

    Swift

    static var eventSignal: WidgetSignalName { get }
  • onEventAfter(flags:handler:) Extension method

    After the emission of the GtkWidget::event signal and (optionally) the second more specific signal, event-after will be emitted regardless of the previous two signals handlers return values.

    Note

    This represents the underlying event-after signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onEventAfter(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ event: Gdk.EventRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    event

    the GdkEvent which triggered this signal

    handler

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

  • eventAfterSignal Extension method

    Typed event-after signal for using the connect(signal:) methods

    Declaration

    Swift

    static var eventAfterSignal: WidgetSignalName { get }
  • onFocus(flags:handler:) Extension method

    Note

    This represents the underlying focus signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onFocus(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ direction: DirectionType) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    direction

    none

    handler

    true to stop other handlers from being invoked for the event. false to propagate the event further. Run the given callback whenever the focus signal is emitted

  • focusSignal Extension method

    Typed focus signal for using the connect(signal:) methods

    Declaration

    Swift

    static var focusSignal: WidgetSignalName { get }
  • The focus-in-event signal will be emitted when the keyboard focus enters the widget‘s window.

    To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_FOCUS_CHANGE_MASK mask.

    Note

    This represents the underlying focus-in-event signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onFocusInEvent(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ event: Gdk.EventFocusRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    event

    the GdkEventFocus which triggered this signal.

    handler

    true to stop other handlers from being invoked for the event. false to propagate the event further. Run the given callback whenever the focusInEvent signal is emitted

  • focusInEventSignal Extension method

    Typed focus-in-event signal for using the connect(signal:) methods

    Declaration

    Swift

    static var focusInEventSignal: WidgetSignalName { get }
  • The focus-out-event signal will be emitted when the keyboard focus leaves the widget‘s window.

    To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_FOCUS_CHANGE_MASK mask.

    Note

    This represents the underlying focus-out-event signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onFocusOutEvent(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ event: Gdk.EventFocusRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    event

    the GdkEventFocus which triggered this signal.

    handler

    true to stop other handlers from being invoked for the event. false to propagate the event further. Run the given callback whenever the focusOutEvent signal is emitted

  • focusOutEventSignal Extension method

    Typed focus-out-event signal for using the connect(signal:) methods

    Declaration

    Swift

    static var focusOutEventSignal: WidgetSignalName { get }
  • Emitted when a pointer or keyboard grab on a window belonging to widget gets broken.

    On X11, this happens when the grab window becomes unviewable (i.e. it or one of its ancestors is unmapped), or if the same application grabs the pointer or keyboard again.

    Note

    This represents the underlying grab-broken-event signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onGrabBrokenEvent(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ event: Gdk.EventGrabBrokenRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    event

    the GdkEventGrabBroken event

    handler

    true to stop other handlers from being invoked for the event. false to propagate the event further. Run the given callback whenever the grabBrokenEvent signal is emitted

  • grabBrokenEventSignal Extension method

    Typed grab-broken-event signal for using the connect(signal:) methods

    Declaration

    Swift

    static var grabBrokenEventSignal: WidgetSignalName { get }
  • onGrabFocus(flags:handler:) Extension method

    Note

    This represents the underlying grab-focus signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    handler

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

  • grabFocusSignal Extension method

    Typed grab-focus signal for using the connect(signal:) methods

    Declaration

    Swift

    static var grabFocusSignal: WidgetSignalName { get }
  • onGrabNotify(flags:handler:) Extension method

    The grab-notify signal is emitted when a widget becomes shadowed by a GTK+ grab (not a pointer or keyboard grab) on another widget, or when it becomes unshadowed due to a grab being removed.

    A widget is shadowed by a gtk_grab_add() when the topmost grab widget in the grab stack of its window group is not its ancestor.

    Note

    This represents the underlying grab-notify signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onGrabNotify(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ wasGrabbed: Bool) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    wasGrabbed

    false if the widget becomes shadowed, true if it becomes unshadowed

    handler

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

  • grabNotifySignal Extension method

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

    Declaration

    Swift

    static var grabNotifySignal: WidgetSignalName { get }
  • onHide(flags:handler:) Extension method

    The hide signal is emitted when widget is hidden, for example with gtk_widget_hide().

    Note

    This represents the underlying hide signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    handler

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

  • hideSignal Extension method

    Typed hide signal for using the connect(signal:) methods

    Declaration

    Swift

    static var hideSignal: WidgetSignalName { get }
  • The hierarchy-changed signal is emitted when the anchored state of a widget changes. A widget is “anchored” when its toplevel ancestor is a GtkWindow. This signal is emitted when a widget changes from un-anchored to anchored or vice-versa.

    Note

    This represents the underlying hierarchy-changed signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onHierarchyChanged(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ previousToplevel: WidgetRef?) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    previousToplevel

    the previous toplevel ancestor, or nil if the widget was previously unanchored

    handler

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

  • hierarchyChangedSignal Extension method

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

    Declaration

    Swift

    static var hierarchyChangedSignal: WidgetSignalName { get }
  • The key-press-event signal is emitted when a key is pressed. The signal emission will reoccur at the key-repeat rate when the key is kept pressed.

    To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_KEY_PRESS_MASK mask.

    This signal will be sent to the grab widget if there is one.

    Note

    This represents the underlying key-press-event signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onKeyPressEvent(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ event: Gdk.EventKeyRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    event

    the GdkEventKey which triggered this signal.

    handler

    true to stop other handlers from being invoked for the event. false to propagate the event further. Run the given callback whenever the keyPressEvent signal is emitted

  • keyPressEventSignal Extension method

    Typed key-press-event signal for using the connect(signal:) methods

    Declaration

    Swift

    static var keyPressEventSignal: WidgetSignalName { get }
  • The key-release-event signal is emitted when a key is released.

    To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_KEY_RELEASE_MASK mask.

    This signal will be sent to the grab widget if there is one.

    Note

    This represents the underlying key-release-event signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onKeyReleaseEvent(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ event: Gdk.EventKeyRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    event

    the GdkEventKey which triggered this signal.

    handler

    true to stop other handlers from being invoked for the event. false to propagate the event further. Run the given callback whenever the keyReleaseEvent signal is emitted

  • keyReleaseEventSignal Extension method

    Typed key-release-event signal for using the connect(signal:) methods

    Declaration

    Swift

    static var keyReleaseEventSignal: WidgetSignalName { get }
  • Gets emitted if keyboard navigation fails. See gtk_widget_keynav_failed() for details.

    Note

    This represents the underlying keynav-failed signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onKeynavFailed(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ direction: DirectionType) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    direction

    the direction of movement

    handler

    true if stopping keyboard navigation is fine, false if the emitting widget should try to handle the keyboard navigation attempt in its parent container(s). Run the given callback whenever the keynavFailed signal is emitted

  • keynavFailedSignal Extension method

    Typed keynav-failed signal for using the connect(signal:) methods

    Declaration

    Swift

    static var keynavFailedSignal: WidgetSignalName { get }
  • The leave-notify-event will be emitted when the pointer leaves the widget‘s window.

    To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_LEAVE_NOTIFY_MASK mask.

    This signal will be sent to the grab widget if there is one.

    Note

    This represents the underlying leave-notify-event signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onLeaveNotifyEvent(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ event: Gdk.EventCrossingRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    event

    the GdkEventCrossing which triggered this signal.

    handler

    true to stop other handlers from being invoked for the event. false to propagate the event further. Run the given callback whenever the leaveNotifyEvent signal is emitted

  • leaveNotifyEventSignal Extension method

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

    Declaration

    Swift

    static var leaveNotifyEventSignal: WidgetSignalName { get }
  • onMap(flags:handler:) Extension method

    The map signal is emitted when widget is going to be mapped, that is when the widget is visible (which is controlled with gtk_widget_set_visible()) and all its parents up to the toplevel widget are also visible. Once the map has occurred, GtkWidget::map-event will be emitted.

    The map signal can be used to determine whether a widget will be drawn, for instance it can resume an animation that was stopped during the emission of GtkWidget::unmap.

    Note

    This represents the underlying map signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    handler

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

  • mapSignal Extension method

    Typed map signal for using the connect(signal:) methods

    Declaration

    Swift

    static var mapSignal: WidgetSignalName { get }
  • onMapEvent(flags:handler:) Extension method

    The map-event signal will be emitted when the widget‘s window is mapped. A window is mapped when it becomes visible on the screen.

    To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_STRUCTURE_MASK mask. GDK will enable this mask automatically for all new windows.

    Note

    This represents the underlying map-event signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onMapEvent(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ event: Gdk.EventAnyRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    event

    the GdkEventAny which triggered this signal.

    handler

    true to stop other handlers from being invoked for the event. false to propagate the event further. Run the given callback whenever the mapEvent signal is emitted

  • mapEventSignal Extension method

    Typed map-event signal for using the connect(signal:) methods

    Declaration

    Swift

    static var mapEventSignal: WidgetSignalName { get }
  • The default handler for this signal activates widget if group_cycling is false, or just makes widget grab focus if group_cycling is true.

    Note

    This represents the underlying mnemonic-activate signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onMnemonicActivate(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ groupCycling: Bool) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    groupCycling

    true if there are other widgets with the same mnemonic

    handler

    true to stop other handlers from being invoked for the event. false to propagate the event further. Run the given callback whenever the mnemonicActivate signal is emitted

  • mnemonicActivateSignal Extension method

    Typed mnemonic-activate signal for using the connect(signal:) methods

    Declaration

    Swift

    static var mnemonicActivateSignal: WidgetSignalName { get }
  • The motion-notify-event signal is emitted when the pointer moves over the widget’s GdkWindow.

    To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_POINTER_MOTION_MASK mask.

    This signal will be sent to the grab widget if there is one.

    Note

    This represents the underlying motion-notify-event signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onMotionNotifyEvent(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ event: Gdk.EventMotionRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    event

    the GdkEventMotion which triggered this signal.

    handler

    true to stop other handlers from being invoked for the event. false to propagate the event further. Run the given callback whenever the motionNotifyEvent signal is emitted

  • motionNotifyEventSignal Extension method

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

    Declaration

    Swift

    static var motionNotifyEventSignal: WidgetSignalName { get }
  • onMoveFocus(flags:handler:) Extension method

    Note

    This represents the underlying move-focus signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onMoveFocus(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ direction: DirectionType) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    direction

    none

    handler

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

  • moveFocusSignal Extension method

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

    Declaration

    Swift

    static var moveFocusSignal: WidgetSignalName { get }
  • onParentSet(flags:handler:) Extension method

    The parent-set signal is emitted when a new parent has been set on a widget.

    Note

    This represents the underlying parent-set signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onParentSet(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ oldParent: WidgetRef?) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    oldParent

    the previous parent, or nil if the widget just got its initial parent.

    handler

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

  • parentSetSignal Extension method

    Typed parent-set signal for using the connect(signal:) methods

    Declaration

    Swift

    static var parentSetSignal: WidgetSignalName { get }
  • onPopupMenu(flags:handler:) Extension method

    This signal gets emitted whenever a widget should pop up a context menu. This usually happens through the standard key binding mechanism; by pressing a certain key while a widget is focused, the user can cause the widget to pop up a menu. For example, the GtkEntry widget creates a menu with clipboard commands. See the Popup Menu Migration Checklist for an example of how to use this signal.

    Note

    This represents the underlying popup-menu signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onPopupMenu(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    handler

    true if a menu was activated Run the given callback whenever the popupMenu signal is emitted

  • popupMenuSignal Extension method

    Typed popup-menu signal for using the connect(signal:) methods

    Declaration

    Swift

    static var popupMenuSignal: WidgetSignalName { get }
  • The property-notify-event signal will be emitted when a property on the widget‘s window has been changed or deleted.

    To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_PROPERTY_CHANGE_MASK mask.

    Note

    This represents the underlying property-notify-event signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onPropertyNotifyEvent(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ event: Gdk.EventPropertyRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    event

    the GdkEventProperty which triggered this signal.

    handler

    true to stop other handlers from being invoked for the event. false to propagate the event further. Run the given callback whenever the propertyNotifyEvent signal is emitted

  • propertyNotifyEventSignal Extension method

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

    Declaration

    Swift

    static var propertyNotifyEventSignal: WidgetSignalName { get }
  • To receive this signal the GdkWindow associated to the widget needs to enable the GDK_PROXIMITY_IN_MASK mask.

    This signal will be sent to the grab widget if there is one.

    Note

    This represents the underlying proximity-in-event signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onProximityInEvent(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ event: Gdk.EventProximityRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    event

    the GdkEventProximity which triggered this signal.

    handler

    true to stop other handlers from being invoked for the event. false to propagate the event further. Run the given callback whenever the proximityInEvent signal is emitted

  • proximityInEventSignal Extension method

    Typed proximity-in-event signal for using the connect(signal:) methods

    Declaration

    Swift

    static var proximityInEventSignal: WidgetSignalName { get }
  • To receive this signal the GdkWindow associated to the widget needs to enable the GDK_PROXIMITY_OUT_MASK mask.

    This signal will be sent to the grab widget if there is one.

    Note

    This represents the underlying proximity-out-event signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onProximityOutEvent(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ event: Gdk.EventProximityRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    event

    the GdkEventProximity which triggered this signal.

    handler

    true to stop other handlers from being invoked for the event. false to propagate the event further. Run the given callback whenever the proximityOutEvent signal is emitted

  • proximityOutEventSignal Extension method

    Typed proximity-out-event signal for using the connect(signal:) methods

    Declaration

    Swift

    static var proximityOutEventSignal: WidgetSignalName { get }
  • Emitted when GtkWidget:has-tooltip is true and the hover timeout has expired with the cursor hovering “above” widget; or emitted when widget got focus in keyboard mode.

    Using the given coordinates, the signal handler should determine whether a tooltip should be shown for widget. If this is the case true should be returned, false otherwise. Note that if keyboard_mode is true, the values of x and y are undefined and should not be used.

    The signal handler is free to manipulate tooltip with the therefore destined function calls.

    Note

    This represents the underlying query-tooltip signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onQueryTooltip(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ x: Int, _ y: Int, _ keyboardMode: Bool, _ tooltip: TooltipRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    x

    the x coordinate of the cursor position where the request has been emitted, relative to widget‘s left side

    y

    the y coordinate of the cursor position where the request has been emitted, relative to widget‘s top

    keyboardMode

    true if the tooltip was triggered using the keyboard

    tooltip

    a GtkTooltip

    handler

    true if tooltip should be shown right now, false otherwise. Run the given callback whenever the queryTooltip signal is emitted

  • queryTooltipSignal Extension method

    Typed query-tooltip signal for using the connect(signal:) methods

    Declaration

    Swift

    static var queryTooltipSignal: WidgetSignalName { get }
  • onRealize(flags:handler:) Extension method

    The realize signal is emitted when widget is associated with a GdkWindow, which means that gtk_widget_realize() has been called or the widget has been mapped (that is, it is going to be drawn).

    Note

    This represents the underlying realize signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    handler

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

  • realizeSignal Extension method

    Typed realize signal for using the connect(signal:) methods

    Declaration

    Swift

    static var realizeSignal: WidgetSignalName { get }
  • The screen-changed signal gets emitted when the screen of a widget has changed.

    Note

    This represents the underlying screen-changed signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onScreenChanged(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ previousScreen: Gdk.ScreenRef?) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    previousScreen

    the previous screen, or nil if the widget was not associated with a screen before

    handler

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

  • screenChangedSignal Extension method

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

    Declaration

    Swift

    static var screenChangedSignal: WidgetSignalName { get }
  • The scroll-event signal is emitted when a button in the 4 to 7 range is pressed. Wheel mice are usually configured to generate button press events for buttons 4 and 5 when the wheel is turned.

    To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_SCROLL_MASK mask.

    This signal will be sent to the grab widget if there is one.

    Note

    This represents the underlying scroll-event signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onScrollEvent(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ event: Gdk.EventScrollRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    event

    the GdkEventScroll which triggered this signal.

    handler

    true to stop other handlers from being invoked for the event. false to propagate the event further. Run the given callback whenever the scrollEvent signal is emitted

  • scrollEventSignal Extension method

    Typed scroll-event signal for using the connect(signal:) methods

    Declaration

    Swift

    static var scrollEventSignal: WidgetSignalName { get }
  • The selection-clear-event signal will be emitted when the the widget‘s window has lost ownership of a selection.

    Note

    This represents the underlying selection-clear-event signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onSelectionClearEvent(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ event: Gdk.EventSelectionRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    event

    the GdkEventSelection which triggered this signal.

    handler

    true to stop other handlers from being invoked for the event. false to propagate the event further. Run the given callback whenever the selectionClearEvent signal is emitted

  • selectionClearEventSignal Extension method

    Typed selection-clear-event signal for using the connect(signal:) methods

    Declaration

    Swift

    static var selectionClearEventSignal: WidgetSignalName { get }
  • Note

    This represents the underlying selection-get signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onSelectionGet(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ data: SelectionDataRef, _ info: UInt, _ time: UInt) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    data

    none

    info

    none

    time

    none

    handler

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

  • selectionGetSignal Extension method

    Typed selection-get signal for using the connect(signal:) methods

    Declaration

    Swift

    static var selectionGetSignal: WidgetSignalName { get }
  • Note

    This represents the underlying selection-notify-event signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onSelectionNotifyEvent(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ event: Gdk.EventSelectionRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    event

    none

    handler

    true to stop other handlers from being invoked for the event. false to propagate the event further. Run the given callback whenever the selectionNotifyEvent signal is emitted

  • selectionNotifyEventSignal Extension method

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

    Declaration

    Swift

    static var selectionNotifyEventSignal: WidgetSignalName { get }
  • Note

    This represents the underlying selection-received signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onSelectionReceived(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ data: SelectionDataRef, _ time: UInt) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    data

    none

    time

    none

    handler

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

  • selectionReceivedSignal Extension method

    Typed selection-received signal for using the connect(signal:) methods

    Declaration

    Swift

    static var selectionReceivedSignal: WidgetSignalName { get }
  • The selection-request-event signal will be emitted when another client requests ownership of the selection owned by the widget‘s window.

    Note

    This represents the underlying selection-request-event signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onSelectionRequestEvent(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ event: Gdk.EventSelectionRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    event

    the GdkEventSelection which triggered this signal.

    handler

    true to stop other handlers from being invoked for the event. false to propagate the event further. Run the given callback whenever the selectionRequestEvent signal is emitted

  • selectionRequestEventSignal Extension method

    Typed selection-request-event signal for using the connect(signal:) methods

    Declaration

    Swift

    static var selectionRequestEventSignal: WidgetSignalName { get }
  • onShow(flags:handler:) Extension method

    The show signal is emitted when widget is shown, for example with gtk_widget_show().

    Note

    This represents the underlying show signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    handler

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

  • showSignal Extension method

    Typed show signal for using the connect(signal:) methods

    Declaration

    Swift

    static var showSignal: WidgetSignalName { get }
  • onShowHelp(flags:handler:) Extension method

    Note

    This represents the underlying show-help signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onShowHelp(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ helpType: WidgetHelpType) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    helpType

    none

    handler

    true to stop other handlers from being invoked for the event. false to propagate the event further. Run the given callback whenever the showHelp signal is emitted

  • showHelpSignal Extension method

    Typed show-help signal for using the connect(signal:) methods

    Declaration

    Swift

    static var showHelpSignal: WidgetSignalName { get }
  • The state-changed signal is emitted when the widget state changes. See gtk_widget_get_state().

    Note

    This represents the underlying state-changed signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onStateChanged(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ state: StateType) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    state

    the previous state

    handler

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

  • stateChangedSignal Extension method

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

    Declaration

    Swift

    static var stateChangedSignal: WidgetSignalName { get }
  • The state-flags-changed signal is emitted when the widget state changes, see gtk_widget_get_state_flags().

    Note

    This represents the underlying state-flags-changed signal

    Declaration

    Swift

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

    Parameters

    flags

    The previous state flags.

    unownedSelf

    Reference to instance of self

    flags

    The previous state flags.

    handler

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

  • stateFlagsChangedSignal Extension method

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

    Declaration

    Swift

    static var stateFlagsChangedSignal: WidgetSignalName { get }
  • onStyleSet(flags:handler:) Extension method

    The style-set signal is emitted when a new style has been set on a widget. Note that style-modifying functions like gtk_widget_modify_base() also cause this signal to be emitted.

    Note that this signal is emitted for changes to the deprecated GtkStyle. To track changes to the GtkStyleContext associated with a widget, use the GtkWidget::style-updated signal.

    Note

    This represents the underlying style-set signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onStyleSet(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ previousStyle: StyleRef?) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    previousStyle

    the previous style, or nil if the widget just got its initial style

    handler

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

  • styleSetSignal Extension method

    Typed style-set signal for using the connect(signal:) methods

    Declaration

    Swift

    static var styleSetSignal: WidgetSignalName { get }
  • The style-updated signal is a convenience signal that is emitted when the GtkStyleContext::changed signal is emitted on the widget‘s associated GtkStyleContext as returned by gtk_widget_get_style_context().

    Note that style-modifying functions like gtk_widget_override_color() also cause this signal to be emitted.

    Note

    This represents the underlying style-updated signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    handler

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

  • styleUpdatedSignal Extension method

    Typed style-updated signal for using the connect(signal:) methods

    Declaration

    Swift

    static var styleUpdatedSignal: WidgetSignalName { get }
  • onTouchEvent(flags:handler:) Extension method

    Note

    This represents the underlying touch-event signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onTouchEvent(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ object: Gdk.EventRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    object

    none

    handler

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

  • touchEventSignal Extension method

    Typed touch-event signal for using the connect(signal:) methods

    Declaration

    Swift

    static var touchEventSignal: WidgetSignalName { get }
  • onUnmap(flags:handler:) Extension method

    The unmap signal is emitted when widget is going to be unmapped, which means that either it or any of its parents up to the toplevel widget have been set as hidden.

    As unmap indicates that a widget will not be shown any longer, it can be used to, for example, stop an animation on the widget.

    Note

    This represents the underlying unmap signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    handler

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

  • unmapSignal Extension method

    Typed unmap signal for using the connect(signal:) methods

    Declaration

    Swift

    static var unmapSignal: WidgetSignalName { get }
  • onUnmapEvent(flags:handler:) Extension method

    The unmap-event signal will be emitted when the widget‘s window is unmapped. A window is unmapped when it becomes invisible on the screen.

    To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_STRUCTURE_MASK mask. GDK will enable this mask automatically for all new windows.

    Note

    This represents the underlying unmap-event signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onUnmapEvent(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ event: Gdk.EventAnyRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    event

    the GdkEventAny which triggered this signal

    handler

    true to stop other handlers from being invoked for the event. false to propagate the event further. Run the given callback whenever the unmapEvent signal is emitted

  • unmapEventSignal Extension method

    Typed unmap-event signal for using the connect(signal:) methods

    Declaration

    Swift

    static var unmapEventSignal: WidgetSignalName { get }
  • onUnrealize(flags:handler:) Extension method

    The unrealize signal is emitted when the GdkWindow associated with widget is destroyed, which means that gtk_widget_unrealize() has been called or the widget has been unmapped (that is, it is going to be hidden).

    Note

    This represents the underlying unrealize signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    handler

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

  • unrealizeSignal Extension method

    Typed unrealize signal for using the connect(signal:) methods

    Declaration

    Swift

    static var unrealizeSignal: WidgetSignalName { get }
  • The visibility-notify-event will be emitted when the widget‘s window is obscured or unobscured.

    To receive this signal the GdkWindow associated to the widget needs to enable the GDK_VISIBILITY_NOTIFY_MASK mask.

    Note

    This represents the underlying visibility-notify-event signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onVisibilityNotifyEvent(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ event: Gdk.EventVisibilityRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    event

    the GdkEventVisibility which triggered this signal.

    handler

    true to stop other handlers from being invoked for the event. false to propagate the event further. Run the given callback whenever the visibilityNotifyEvent signal is emitted

  • visibilityNotifyEventSignal Extension method

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

    Declaration

    Swift

    static var visibilityNotifyEventSignal: WidgetSignalName { get }
  • The window-state-event will be emitted when the state of the toplevel window associated to the widget changes.

    To receive this signal the GdkWindow associated to the widget needs to enable the GDK_STRUCTURE_MASK mask. GDK will enable this mask automatically for all new windows.

    Note

    This represents the underlying window-state-event signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onWindowStateEvent(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: WidgetRef, _ event: Gdk.EventWindowStateRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    event

    the GdkEventWindowState which triggered this signal.

    handler

    true to stop other handlers from being invoked for the event. false to propagate the event further. Run the given callback whenever the windowStateEvent signal is emitted

  • windowStateEventSignal Extension method

    Typed window-state-event signal for using the connect(signal:) methods

    Declaration

    Swift

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

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::app-paintable signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifyAppPaintableSignal Extension method

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

    Declaration

    Swift

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

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::can-default signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifyCanDefaultSignal Extension method

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

    Declaration

    Swift

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

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::can-focus signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifyCanFocusSignal Extension method

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

    Declaration

    Swift

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

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::composite-child signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifyCompositeChildSignal Extension method

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

    Declaration

    Swift

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

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::double-buffered signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifyDoubleBufferedSignal Extension method

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

    Declaration

    Swift

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

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::events signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifyEventsSignal Extension method

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

    Declaration

    Swift

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

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::expand signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifyExpandSignal Extension method

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

    Declaration

    Swift

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

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::focus-on-click signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifyFocusOnClickSignal Extension method

    Typed notify::focus-on-click signal for using the connect(signal:) methods

    Declaration

    Swift

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

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::halign signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifyHalignSignal Extension method

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

    Declaration

    Swift

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

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::has-default signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifyHasDefaultSignal Extension method

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

    Declaration

    Swift

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

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::has-focus signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifyHasFocusSignal Extension method

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

    Declaration

    Swift

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

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::has-tooltip signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifyHasTooltipSignal Extension method

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

    Declaration

    Swift

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

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::height-request signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifyHeightRequestSignal Extension method

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

    Declaration

    Swift

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

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::hexpand signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifyHexpandSignal Extension method

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

    Declaration

    Swift

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

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::hexpand-set signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifyHexpandSetSignal Extension method

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

    Declaration

    Swift

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

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::is-focus signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifyIsFocusSignal Extension method

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

    Declaration

    Swift

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

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::margin signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifyMarginSignal Extension method

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

    Declaration

    Swift

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

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::margin-bottom signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifyMarginBottomSignal Extension method

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

    Declaration

    Swift

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

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::margin-end signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifyMarginEndSignal Extension method

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

    Declaration

    Swift

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

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::margin-left signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifyMarginLeftSignal Extension method

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

    Declaration

    Swift

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

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::margin-right signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifyMarginRightSignal Extension method

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

    Declaration

    Swift

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

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::margin-start signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifyMarginStartSignal Extension method

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

    Declaration

    Swift

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

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::margin-top signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifyMarginTopSignal Extension method

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

    Declaration

    Swift

    static var notifyMarginTopSignal: WidgetSignalName { get }
  • onNotifyName(flags:handler:) Extension method

    The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::name signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifyNameSignal Extension method

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

    Declaration

    Swift

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

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::no-show-all signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifyNoShowAllSignal Extension method

    Typed notify::no-show-all signal for using the connect(signal:) methods

    Declaration

    Swift

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

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::opacity signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifyOpacitySignal Extension method

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

    Declaration

    Swift

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

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::parent signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifyParentSignal Extension method

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

    Declaration

    Swift

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

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::receives-default signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifyReceivesDefaultSignal Extension method

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

    Declaration

    Swift

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

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::scale-factor signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifyScaleFactorSignal Extension method

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

    Declaration

    Swift

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

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::sensitive signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifySensitiveSignal Extension method

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

    Declaration

    Swift

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

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::style signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifyStyleSignal Extension method

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

    Declaration

    Swift

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

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::tooltip-markup signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifyTooltipMarkupSignal Extension method

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

    Declaration

    Swift

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

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::tooltip-text signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifyTooltipTextSignal Extension method

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

    Declaration

    Swift

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

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::valign signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifyValignSignal Extension method

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

    Declaration

    Swift

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

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::vexpand signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifyVexpandSignal Extension method

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

    Declaration

    Swift

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

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::vexpand-set signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifyVexpandSetSignal Extension method

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

    Declaration

    Swift

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

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::visible signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifyVisibleSignal Extension method

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

    Declaration

    Swift

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

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::width-request signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifyWidthRequestSignal Extension method

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

    Declaration

    Swift

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

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

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

    (C Language Example):

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

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

    Note

    This represents the underlying notify::window signal

    Declaration

    Swift

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

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

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

  • notifyWindowSignal Extension method

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

    Declaration

    Swift

    static var notifyWindowSignal: WidgetSignalName { get }

Widget Class: WidgetProtocol extension (methods and fields)

  • activate() Extension method

    For widgets that can be “activated” (buttons, menu items, etc.) this function activates them. Activation is what happens when you press Enter on a widget during key navigation. If widget isn’t activatable, the function returns false.

    Declaration

    Swift

    @inlinable
    func activate() -> Bool
  • Installs an accelerator for this widget in accel_group that causes accel_signal to be emitted if the accelerator is activated. The accel_group needs to be added to the widget’s toplevel via gtk_window_add_accel_group(), and the signal must be of type G_SIGNAL_ACTION. Accelerators added through this function are not user changeable during runtime. If you want to support accelerators that can be changed by the user, use gtk_accel_map_add_entry() and gtk_widget_set_accel_path() or gtk_menu_item_set_accel_path() instead.

    Declaration

    Swift

    @inlinable
    func addAccelerator<AccelGroupT>(accelSignal: UnsafePointer<gchar>!, accelGroup: AccelGroupT, accelKey: Int, accelMods: Gdk.ModifierType, accelFlags: AccelFlags) where AccelGroupT : AccelGroupProtocol
  • Adds the device events in the bitfield events to the event mask for widget. See gtk_widget_set_device_events() for details.

    Declaration

    Swift

    @inlinable
    func addDeviceEvents<DeviceT>(device: DeviceT, events: Gdk.EventMask) where DeviceT : DeviceProtocol
  • add(events:) Extension method

    Adds the events in the bitfield events to the event mask for widget. See gtk_widget_set_events() and the input handling overview for details.

    Declaration

    Swift

    @inlinable
    func add(events: Int)
  • addMnemonic(label:) Extension method

    Adds a widget to the list of mnemonic labels for this widget. (See gtk_widget_list_mnemonic_labels()). Note the list of mnemonic labels for the widget is cleared when the widget is destroyed, so the caller must make sure to update its internal state at this point as well, by using a connection to the GtkWidget::destroy signal or a weak notifier.

    Declaration

    Swift

    @inlinable
    func addMnemonic<WidgetT>(label: WidgetT) where WidgetT : WidgetProtocol
  • Queues an animation frame update and adds a callback to be called before each frame. Until the tick callback is removed, it will be called frequently (usually at the frame rate of the output device or as quickly as the application can be repainted, whichever is slower). For this reason, is most suitable for handling graphics that change every frame or every few frames. The tick callback does not automatically imply a relayout or repaint. If you want a repaint or relayout, and aren’t changing widget properties that would trigger that (for example, changing the text of a GtkLabel), then you will have to call gtk_widget_queue_resize() or gtk_widget_queue_draw_area() yourself.

    gdk_frame_clock_get_frame_time() should generally be used for timing continuous animations and gdk_frame_timings_get_predicted_presentation_time() if you are trying to display isolated frames at particular times.

    This is a more convenient alternative to connecting directly to the GdkFrameClock::update signal of GdkFrameClock, since you don’t have to worry about when a GdkFrameClock is assigned to a widget.

    Declaration

    Swift

    @inlinable
    func addTick(callback: GtkTickCallback?, userData: gpointer! = nil, notify: GDestroyNotify?) -> Int
  • canActivateAccel(signalID:) Extension method

    Determines whether an accelerator that activates the signal identified by signal_id can currently be activated. This is done by emitting the GtkWidget::can-activate-accel signal on widget; if the signal isn’t overridden by a handler or in a derived widget, then the default check is that the widget must be sensitive, and the widget and all its ancestors mapped.

    Declaration

    Swift

    @inlinable
    func canActivateAccel(signalID: Int) -> Bool
  • childFocus(direction:) Extension method

    This function is used by custom widget implementations; if you’re writing an app, you’d use gtk_widget_grab_focus() to move the focus to a particular widget, and gtk_container_set_focus_chain() to change the focus tab order. So you may want to investigate those functions instead.

    gtk_widget_child_focus() is called by containers as the user moves around the window using keyboard shortcuts. direction indicates what kind of motion is taking place (up, down, left, right, tab forward, tab backward). gtk_widget_child_focus() emits the GtkWidget::focus signal; widgets override the default handler for this signal in order to implement appropriate focus behavior.

    The default focus handler for a widget should return true if moving in direction left the focus on a focusable location inside that widget, and false if moving in direction moved the focus outside the widget. If returning true, widgets normally call gtk_widget_grab_focus() to place the focus accordingly; if returning false, they don’t modify the current focus location.

    Declaration

    Swift

    @inlinable
    func childFocus(direction: GtkDirectionType) -> Bool
  • childNotify(childProperty:) Extension method

    Emits a GtkWidget::child-notify signal for the child property child_property on widget.

    This is the analogue of g_object_notify() for child properties.

    Also see gtk_container_child_notify().

    Declaration

    Swift

    @inlinable
    func childNotify(childProperty: UnsafePointer<gchar>!)
  • Same as gtk_widget_path(), but always uses the name of a widget’s type, never uses a custom name set with gtk_widget_set_name().

    class_path is deprecated: Use gtk_widget_get_path() instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func classPath(pathLength: UnsafeMutablePointer<guint>! = nil, path: UnsafeMutablePointer<UnsafeMutablePointer<gchar>?>! = nil, pathReversed: UnsafeMutablePointer<UnsafeMutablePointer<gchar>?>! = nil)
  • computeExpand(orientation:) Extension method

    Computes whether a container should give this widget extra space when possible. Containers should check this, rather than looking at gtk_widget_get_hexpand() or gtk_widget_get_vexpand().

    This function already checks whether the widget is visible, so visibility does not need to be checked separately. Non-visible widgets are not expanded.

    The computed expand value uses either the expand setting explicitly set on the widget itself, or, if none has been explicitly set, the widget may expand if some of its children do.

    Declaration

    Swift

    @inlinable
    func computeExpand(orientation: GtkOrientation) -> Bool
  • createPangoContext() Extension method

    Creates a new PangoContext with the appropriate font map, font options, font description, and base direction for drawing text for this widget. See also gtk_widget_get_pango_context().

    Declaration

    Swift

    @inlinable
    func createPangoContext() -> Pango.ContextRef!
  • createPangoLayout(text:) Extension method

    Creates a new PangoLayout with the appropriate font map, font description, and base direction for drawing text for this widget.

    If you keep a PangoLayout created in this way around, you need to re-create it when the widget PangoContext is replaced. This can be tracked by using the GtkWidget::screen-changed signal on the widget.

    Declaration

    Swift

    @inlinable
    func createPangoLayout(text: UnsafePointer<gchar>? = nil) -> Pango.LayoutRef!
  • destroy() Extension method

    Destroys a widget.

    When a widget is destroyed all references it holds on other objects will be released:

    • if the widget is inside a container, it will be removed from its parent
    • if the widget is a container, all its children will be destroyed, recursively
    • if the widget is a top level, it will be removed from the list of top level widgets that GTK+ maintains internally

    It’s expected that all references held on the widget will also be released; you should connect to the GtkWidget::destroy signal if you hold a reference to widget and you wish to remove it when this function is called. It is not necessary to do so if you are implementing a GtkContainer, as you’ll be able to use the GtkContainerClass.remove() virtual function for that.

    It’s important to notice that gtk_widget_destroy() will only cause the widget to be finalized if no additional references, acquired using g_object_ref(), are held on it. In case additional references are in place, the widget will be in an “inert” state after calling this function; widget will still point to valid memory, allowing you to release the references you hold, but you may not query the widget’s own state.

    You should typically call this function on top level widgets, and rarely on child widgets.

    See also: gtk_container_remove()

    Declaration

    Swift

    @inlinable
    func destroy()
  • destroyed(widgetPointer:) Extension method

    This function sets *widget_pointer to nil if widget_pointer != nil. It’s intended to be used as a callback connected to the “destroy” signal of a widget. You connect gtk_widget_destroyed() as a signal handler, and pass the address of your widget variable as user data. Then when the widget is destroyed, the variable will be set to nil. Useful for example to avoid multiple copies of the same dialog.

    Declaration

    Swift

    @inlinable
    func destroyed(widgetPointer: UnsafeMutablePointer<UnsafeMutablePointer<GtkWidget>?>!)
  • deviceIsShadowed(device:) Extension method

    Returns true if device has been shadowed by a GTK+ device grab on another widget, so it would stop sending events to widget. This may be used in the GtkWidget::grab-notify signal to check for specific devices. See gtk_device_grab_add().

    Declaration

    Swift

    @inlinable
    func deviceIsShadowed<DeviceT>(device: DeviceT) -> Bool where DeviceT : DeviceProtocol
  • Undocumented

    Declaration

    Swift

    @inlinable
    func dragBegin<EventT, TargetListT>(targets: TargetListT, actions: Gdk.DragAction, button: Int, event: EventT) -> Gdk.DragContextRef! where EventT : EventProtocol, TargetListT : TargetListProtocol
  • Undocumented

    Declaration

    Swift

    @inlinable
    func dragBeginWithCoordinates<EventT, TargetListT>(targets: TargetListT, actions: Gdk.DragAction, button: Int, event: EventT, x: Int, y: Int) -> Gdk.DragContextRef! where EventT : EventProtocol, TargetListT : TargetListProtocol
  • Undocumented

    Declaration

    Swift

    @inlinable
    func dragCheckThreshold(startX: Int, startY: Int, currentX: Int, currentY: Int) -> Bool
  • dragDestAddImageTargets() Extension method

    Undocumented

    Declaration

    Swift

    @inlinable
    func dragDestAddImageTargets()
  • dragDestAddTextTargets() Extension method

    Undocumented

    Declaration

    Swift

    @inlinable
    func dragDestAddTextTargets()
  • dragDestAddURITargets() Extension method

    Undocumented

    Declaration

    Swift

    @inlinable
    func dragDestAddURITargets()
  • Undocumented

    Declaration

    Swift

    @inlinable
    func dragDestFindTarget<DragContextT>(context: DragContextT, targetList: TargetListRef? = nil) -> GdkAtom! where DragContextT : DragContextProtocol
  • Undocumented

    Declaration

    Swift

    @inlinable
    func dragDestFindTarget<DragContextT, TargetListT>(context: DragContextT, targetList: TargetListT?) -> GdkAtom! where DragContextT : DragContextProtocol, TargetListT : TargetListProtocol
  • dragDestGetTargetList() Extension method

    Undocumented

    Declaration

    Swift

    @inlinable
    func dragDestGetTargetList() -> TargetListRef!
  • dragDestGetTrackMotion() Extension method

    Undocumented

    Declaration

    Swift

    @inlinable
    func dragDestGetTrackMotion() -> Bool
  • Undocumented

    Declaration

    Swift

    @inlinable
    func dragDestSet(flags: DestDefaults, targets: UnsafePointer<GtkTargetEntry>! = nil, nTargets: Int, actions: Gdk.DragAction)
  • Undocumented

    Declaration

    Swift

    @inlinable
    func dragDestSetProxy<WindowT>(proxyWindow: WindowT, protocol: GdkDragProtocol, useCoordinates: Bool) where WindowT : WindowProtocol
  • dragDestSet(targetList:) Extension method

    Undocumented

    Declaration

    Swift

    @inlinable
    func dragDestSet(targetList: TargetListRef? = nil)
  • dragDestSet(targetList:) Extension method

    Undocumented

    Declaration

    Swift

    @inlinable
    func dragDestSet<TargetListT>(targetList: TargetListT?) where TargetListT : TargetListProtocol
  • dragDestSet(trackMotion:) Extension method

    Undocumented

    Declaration

    Swift

    @inlinable
    func dragDestSet(trackMotion: Bool)
  • dragDestUnset() Extension method

    Undocumented

    Declaration

    Swift

    @inlinable
    func dragDestUnset()
  • Undocumented

    Declaration

    Swift

    @inlinable
    func dragGetData<DragContextT>(context: DragContextT, target: GdkAtom, time: guint32) where DragContextT : DragContextProtocol
  • dragHighlight() Extension method

    Undocumented

    Declaration

    Swift

    @inlinable
    func dragHighlight()
  • dragSourceAddImageTargets() Extension method

    Add the writable image targets supported by GtkSelectionData to the target list of the drag source. The targets are added with info = 0. If you need another value, use gtk_target_list_add_image_targets() and gtk_drag_source_set_target_list().

    Declaration

    Swift

    @inlinable
    func dragSourceAddImageTargets()
  • dragSourceAddTextTargets() Extension method

    Add the text targets supported by GtkSelectionData to the target list of the drag source. The targets are added with info = 0. If you need another value, use gtk_target_list_add_text_targets() and gtk_drag_source_set_target_list().

    Declaration

    Swift

    @inlinable
    func dragSourceAddTextTargets()
  • dragSourceAddURITargets() Extension method

    Add the URI targets supported by GtkSelectionData to the target list of the drag source. The targets are added with info = 0. If you need another value, use gtk_target_list_add_uri_targets() and gtk_drag_source_set_target_list().

    Declaration

    Swift

    @inlinable
    func dragSourceAddURITargets()
  • dragSourceGetTargetList() Extension method

    Gets the list of targets this widget can provide for drag-and-drop.

    Declaration

    Swift

    @inlinable
    func dragSourceGetTargetList() -> TargetListRef!
  • Sets up a widget so that GTK+ will start a drag operation when the user clicks and drags on the widget. The widget must have a window.

    Declaration

    Swift

    @inlinable
    func dragSourceSet(startButtonMask: Gdk.ModifierType, targets: UnsafePointer<GtkTargetEntry>! = nil, nTargets: Int, actions: Gdk.DragAction)
  • dragSourceSetIconIcon(icon:) Extension method

    Sets the icon that will be used for drags from a particular source to icon. See the docs for GtkIconTheme for more details.

    Declaration

    Swift

    @inlinable
    func dragSourceSetIconIcon<IconT>(icon: IconT) where IconT : IconProtocol
  • dragSourceSet(iconName:) Extension method

    Sets the icon that will be used for drags from a particular source to a themed icon. See the docs for GtkIconTheme for more details.

    Declaration

    Swift

    @inlinable
    func dragSourceSet(iconName: UnsafePointer<gchar>!)
  • dragSourceSetIcon(pixbuf:) Extension method

    Sets the icon that will be used for drags from a particular widget from a GdkPixbuf. GTK+ retains a reference for pixbuf and will release it when it is no longer needed.

    Declaration

    Swift

    @inlinable
    func dragSourceSetIcon<PixbufT>(pixbuf: PixbufT) where PixbufT : PixbufProtocol
  • Sets the icon that will be used for drags from a particular source to a stock icon.

    drag_source_set_icon_stock is deprecated: Use gtk_drag_source_set_icon_name() instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func dragSourceSetIconStock(stockID: UnsafePointer<gchar>!)
  • dragSourceSet(targetList:) Extension method

    Changes the target types that this widget offers for drag-and-drop. The widget must first be made into a drag source with gtk_drag_source_set().

    Declaration

    Swift

    @inlinable
    func dragSourceSet(targetList: TargetListRef? = nil)
  • dragSourceSet(targetList:) Extension method

    Changes the target types that this widget offers for drag-and-drop. The widget must first be made into a drag source with gtk_drag_source_set().

    Declaration

    Swift

    @inlinable
    func dragSourceSet<TargetListT>(targetList: TargetListT?) where TargetListT : TargetListProtocol
  • dragSourceUnset() Extension method

    Undoes the effects of gtk_drag_source_set().

    Declaration

    Swift

    @inlinable
    func dragSourceUnset()
  • dragUnhighlight() Extension method

    Undocumented

    Declaration

    Swift

    @inlinable
    func dragUnhighlight()
  • draw(cr:) Extension method

    Draws widget to cr. The top left corner of the widget will be drawn to the currently set origin point of cr.

    You should pass a cairo context as cr argument that is in an original state. Otherwise the resulting drawing is undefined. For example changing the operator using cairo_set_operator() or the line width using cairo_set_line_width() might have unwanted side effects. You may however change the context’s transform matrix - like with cairo_scale(), cairo_translate() or cairo_set_matrix() and clip region with cairo_clip() prior to calling this function. Also, it is fine to modify the context with cairo_save() and cairo_push_group() prior to calling this function.

    Note that special-purpose widgets may contain special code for rendering to the screen and might appear differently on screen and when rendered using gtk_widget_draw().

    Declaration

    Swift

    @inlinable
    func draw<ContextT>(cr: ContextT) where ContextT : ContextProtocol
  • ensureStyle() Extension method

    Ensures that widget has a style (widget->style).

    Not a very useful function; most of the time, if you want the style, the widget is realized, and realized widgets are guaranteed to have a style already.

    ensure_style is deprecated: Use #GtkStyleContext instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func ensureStyle()
  • errorBell() Extension method

    Notifies the user about an input-related error on this widget. If the GtkSettings:gtk-error-bell setting is true, it calls gdk_window_beep(), otherwise it does nothing.

    Note that the effect of gdk_window_beep() can be configured in many ways, depending on the windowing backend and the desktop environment or window manager that is used.

    Declaration

    Swift

    @inlinable
    func errorBell()
  • event(event:) Extension method

    Rarely-used function. This function is used to emit the event signals on a widget (those signals should never be emitted without using this function to do so). If you want to synthesize an event though, don’t use this function; instead, use gtk_main_do_event() so the event will behave as if it were in the event queue. Don’t synthesize expose events; instead, use gdk_window_invalidate_rect() to invalidate a region of the window.

    Declaration

    Swift

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

    Stops emission of GtkWidget::child-notify signals on widget. The signals are queued until gtk_widget_thaw_child_notify() is called on widget.

    This is the analogue of g_object_freeze_notify() for child properties.

    Declaration

    Swift

    @inlinable
    func freezeChildNotify()
  • getAccessible() Extension method

    Returns the accessible object that describes the widget to an assistive technology.

    If accessibility support is not available, this AtkObject instance may be a no-op. Likewise, if no class-specific AtkObject implementation is available for the widget instance in question, it will inherit an AtkObject implementation from the first ancestor class for which such an implementation is defined.

    The documentation of the ATK library contains more information about accessible objects and their uses.

    Declaration

    Swift

    @inlinable
    func getAccessible() -> Atk.ObjectRef!
  • getActionGroup(prefix:) Extension method

    Retrieves the GActionGroup that was registered using prefix. The resulting GActionGroup may have been registered to widget or any GtkWidget in its ancestry.

    If no action group was found matching prefix, then nil is returned.

    Declaration

    Swift

    @inlinable
    func getActionGroup(prefix: UnsafePointer<gchar>!) -> GIO.ActionGroupRef!
  • getAllocatedBaseline() Extension method

    Returns the baseline that has currently been allocated to widget. This function is intended to be used when implementing handlers for the GtkWidget::draw function, and when allocating child widgets in GtkWidget::size_allocate.

    Declaration

    Swift

    @inlinable
    func getAllocatedBaseline() -> Int
  • getAllocatedHeight() Extension method

    Returns the height that has currently been allocated to widget. This function is intended to be used when implementing handlers for the GtkWidget::draw function.

    Declaration

    Swift

    @inlinable
    func getAllocatedHeight() -> Int
  • Retrieves the widget’s allocated size.

    This function returns the last values passed to gtk_widget_size_allocate_with_baseline(). The value differs from the size returned in gtk_widget_get_allocation() in that functions like gtk_widget_set_halign() can adjust the allocation, but not the value returned by this function.

    If a widget is not visible, its allocated size is 0.

    Declaration

    Swift

    @inlinable
    func getAllocatedSize(allocation: UnsafeMutablePointer<GtkAllocation>!, baseline: UnsafeMutablePointer<gint>! = nil)
  • getAllocatedWidth() Extension method

    Returns the width that has currently been allocated to widget. This function is intended to be used when implementing handlers for the GtkWidget::draw function.

    Declaration

    Swift

    @inlinable
    func getAllocatedWidth() -> Int
  • get(allocation:) Extension method

    Retrieves the widget’s allocation.

    Note, when implementing a GtkContainer: a widget’s allocation will be its “adjusted” allocation, that is, the widget’s parent container typically calls gtk_widget_size_allocate() with an allocation, and that allocation is then adjusted (to handle margin and alignment for example) before assignment to the widget. gtk_widget_get_allocation() returns the adjusted allocation that was actually assigned to the widget. The adjusted allocation is guaranteed to be completely contained within the gtk_widget_size_allocate() allocation, however. So a GtkContainer is guaranteed that its children stay inside the assigned bounds, but not that they have exactly the bounds the container assigned. There is no way to get the original allocation assigned by gtk_widget_size_allocate(), since it isn’t stored; if a container implementation needs that information it will have to track it itself.

    Declaration

    Swift

    @inlinable
    func get(allocation: UnsafeMutablePointer<GtkAllocation>!)
  • getAncestor(widgetType:) Extension method

    Gets the first ancestor of widget with type widget_type. For example, gtk_widget_get_ancestor (widget, GTK_TYPE_BOX) gets the first GtkBox that’s an ancestor of widget. No reference will be added to the returned widget; it should not be unreferenced. See note about checking for a toplevel GtkWindow in the docs for gtk_widget_get_toplevel().

    Note that unlike gtk_widget_is_ancestor(), gtk_widget_get_ancestor() considers widget to be an ancestor of itself.

    Declaration

    Swift

    @inlinable
    func getAncestor(widgetType: GType) -> WidgetRef!
  • getAppPaintable() Extension method

    Determines whether the application intends to draw on the widget in an GtkWidget::draw handler.

    See gtk_widget_set_app_paintable()

    Declaration

    Swift

    @inlinable
    func getAppPaintable() -> Bool
  • getCanDefault() Extension method

    Determines whether widget can be a default widget. See gtk_widget_set_can_default().

    Declaration

    Swift

    @inlinable
    func getCanDefault() -> Bool
  • getCanFocus() Extension method

    Determines whether widget can own the input focus. See gtk_widget_set_can_focus().

    Declaration

    Swift

    @inlinable
    func getCanFocus() -> Bool
  • getChild(requisition:) Extension method

    This function is only for use in widget implementations. Obtains widget->requisition, unless someone has forced a particular geometry on the widget (e.g. with gtk_widget_set_size_request()), in which case it returns that geometry instead of the widget’s requisition.

    This function differs from gtk_widget_size_request() in that it retrieves the last size request value from widget->requisition, while gtk_widget_size_request() actually calls the “size_request” method on widget to compute the size request and fill in widget->requisition, and only then returns widget->requisition.

    Because this function does not call the “size_request” method, it can only be used when you know that widget->requisition is up-to-date, that is, gtk_widget_size_request() has been called since the last time a resize was queued. In general, only container implementations have this information; applications should use gtk_widget_size_request().

    get_child_requisition is deprecated: Use gtk_widget_get_preferred_size() instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getChild<RequisitionT>(requisition: RequisitionT) where RequisitionT : RequisitionProtocol
  • getChildVisible() Extension method

    Gets the value set with gtk_widget_set_child_visible(). If you feel a need to use this function, your code probably needs reorganization.

    This function is only useful for container implementations and never should be called by an application.

    Declaration

    Swift

    @inlinable
    func getChildVisible() -> Bool
  • get(clip:) Extension method

    Retrieves the widget’s clip area.

    The clip area is the area in which all of widget‘s drawing will happen. Other toolkits call it the bounding box.

    Historically, in GTK+ the clip area has been equal to the allocation retrieved via gtk_widget_get_allocation().

    Declaration

    Swift

    @inlinable
    func get(clip: UnsafeMutablePointer<GtkAllocation>!)
  • getClipboard(selection:) Extension method

    Returns the clipboard object for the given selection to be used with widget. widget must have a GdkDisplay associated with it, so must be attached to a toplevel window.

    Declaration

    Swift

    @inlinable
    func getClipboard(selection: GdkAtom) -> ClipboardRef!
  • getCompositeName() Extension method

    Obtains the composite name of a widget.

    get_composite_name is deprecated: Use gtk_widget_class_set_template(), or don’t use this API at all.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getCompositeName() -> String!
  • getDeviceEnabled(device:) Extension method

    Returns whether device can interact with widget and its children. See gtk_widget_set_device_enabled().

    Declaration

    Swift

    @inlinable
    func getDeviceEnabled<DeviceT>(device: DeviceT) -> Bool where DeviceT : DeviceProtocol
  • getDeviceEvents(device:) Extension method

    Returns the events mask for the widget corresponding to an specific device. These are the events that the widget will receive when device operates on it.

    Declaration

    Swift

    @inlinable
    func getDeviceEvents<DeviceT>(device: DeviceT) -> Gdk.EventMask where DeviceT : DeviceProtocol
  • getDirection() Extension method

    Gets the reading direction for a particular widget. See gtk_widget_set_direction().

    Declaration

    Swift

    @inlinable
    func getDirection() -> GtkTextDirection
  • getDisplay() Extension method

    Get the GdkDisplay for the toplevel window associated with this widget. This function can only be called after the widget has been added to a widget hierarchy with a GtkWindow at the top.

    In general, you should only create display specific resources when a widget has been realized, and you should free those resources when the widget is unrealized.

    Declaration

    Swift

    @inlinable
    func getDisplay() -> Gdk.DisplayRef!
  • getDoubleBuffered() Extension method

    Determines whether the widget is double buffered.

    See gtk_widget_set_double_buffered()

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getDoubleBuffered() -> Bool
  • getEvents() Extension method

    Returns the event mask (see GdkEventMask) for the widget. These are the events that the widget will receive.

    Note: Internally, the widget event mask will be the logical OR of the event mask set through gtk_widget_set_events() or gtk_widget_add_events(), and the event mask necessary to cater for every GtkEventController created for the widget.

    Declaration

    Swift

    @inlinable
    func getEvents() -> Int
  • getFocusOnClick() Extension method

    Returns whether the widget should grab focus when it is clicked with the mouse. See gtk_widget_set_focus_on_click().

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getFocusOnClick() -> Bool
  • getFontMap() Extension method

    Gets the font map that has been set with gtk_widget_set_font_map().

    Declaration

    Swift

    @inlinable
    func getFontMap() -> Pango.FontMapRef!
  • getFontOptions() Extension method

    Returns the cairo_font_options_t used for Pango rendering. When not set, the defaults font options for the GdkScreen will be used.

    Declaration

    Swift

    @inlinable
    func getFontOptions() -> Cairo.FontOptionsRef!
  • getFrameClock() Extension method

    Obtains the frame clock for a widget. The frame clock is a global “ticker” that can be used to drive animations and repaints. The most common reason to get the frame clock is to call gdk_frame_clock_get_frame_time(), in order to get a time to use for animating. For example you might record the start of the animation with an initial value from gdk_frame_clock_get_frame_time(), and then update the animation by calling gdk_frame_clock_get_frame_time() again during each repaint.

    gdk_frame_clock_request_phase() will result in a new frame on the clock, but won’t necessarily repaint any widgets. To repaint a widget, you have to use gtk_widget_queue_draw() which invalidates the widget (thus scheduling it to receive a draw on the next frame). gtk_widget_queue_draw() will also end up requesting a frame on the appropriate frame clock.

    A widget’s frame clock will not change while the widget is mapped. Reparenting a widget (which implies a temporary unmap) can change the widget’s frame clock.

    Unrealized widgets do not have a frame clock.

    Declaration

    Swift

    @inlinable
    func getFrameClock() -> Gdk.FrameClockRef!
  • getHalign() Extension method

    Gets the value of the GtkWidget:halign property.

    For backwards compatibility reasons this method will never return GTK_ALIGN_BASELINE, but instead it will convert it to GTK_ALIGN_FILL. Baselines are not supported for horizontal alignment.

    Declaration

    Swift

    @inlinable
    func getHalign() -> GtkAlign
  • getHasTooltip() Extension method

    Returns the current value of the has-tooltip property. See GtkWidget:has-tooltip for more information.

    Declaration

    Swift

    @inlinable
    func getHasTooltip() -> Bool
  • getHasWindow() Extension method

    Determines whether widget has a GdkWindow of its own. See gtk_widget_set_has_window().

    Declaration

    Swift

    @inlinable
    func getHasWindow() -> Bool
  • getHexpand() Extension method

    Gets whether the widget would like any available extra horizontal space. When a user resizes a GtkWindow, widgets with expand=TRUE generally receive the extra space. For example, a list or scrollable area or document in your window would often be set to expand.

    Containers should use gtk_widget_compute_expand() rather than this function, to see whether a widget, or any of its children, has the expand flag set. If any child of a widget wants to expand, the parent may ask to expand also.

    This function only looks at the widget’s own hexpand flag, rather than computing whether the entire widget tree rooted at this widget wants to expand.

    Declaration

    Swift

    @inlinable
    func getHexpand() -> Bool
  • getHexpandSet() Extension method

    Gets whether gtk_widget_set_hexpand() has been used to explicitly set the expand flag on this widget.

    If hexpand is set, then it overrides any computed expand value based on child widgets. If hexpand is not set, then the expand value depends on whether any children of the widget would like to expand.

    There are few reasons to use this function, but it’s here for completeness and consistency.

    Declaration

    Swift

    @inlinable
    func getHexpandSet() -> Bool
  • getMapped() Extension method

    Whether the widget is mapped.

    Declaration

    Swift

    @inlinable
    func getMapped() -> Bool
  • getMarginBottom() Extension method

    Gets the value of the GtkWidget:margin-bottom property.

    Declaration

    Swift

    @inlinable
    func getMarginBottom() -> Int
  • getMarginEnd() Extension method

    Gets the value of the GtkWidget:margin-end property.

    Declaration

    Swift

    @inlinable
    func getMarginEnd() -> Int
  • getMarginLeft() Extension method

    Gets the value of the GtkWidget:margin-left property.

    get_margin_left is deprecated: Use gtk_widget_get_margin_start() instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getMarginLeft() -> Int
  • getMarginRight() Extension method

    Gets the value of the GtkWidget:margin-right property.

    get_margin_right is deprecated: Use gtk_widget_get_margin_end() instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getMarginRight() -> Int
  • getMarginStart() Extension method

    Gets the value of the GtkWidget:margin-start property.

    Declaration

    Swift

    @inlinable
    func getMarginStart() -> Int
  • getMarginTop() Extension method

    Gets the value of the GtkWidget:margin-top property.

    Declaration

    Swift

    @inlinable
    func getMarginTop() -> Int
  • getModifierMask(intent:) Extension method

    Returns the modifier mask the widget’s windowing system backend uses for a particular purpose.

    See gdk_keymap_get_modifier_mask().

    Declaration

    Swift

    @inlinable
    func getModifierMask(intent: GdkModifierIntent) -> Gdk.ModifierType
  • getModifierStyle() Extension method

    Returns the current modifier style for the widget. (As set by gtk_widget_modify_style().) If no style has previously set, a new GtkRcStyle will be created with all values unset, and set as the modifier style for the widget. If you make changes to this rc style, you must call gtk_widget_modify_style(), passing in the returned rc style, to make sure that your changes take effect.

    Caution: passing the style back to gtk_widget_modify_style() will normally end up destroying it, because gtk_widget_modify_style() copies the passed-in style and sets the copy as the new modifier style, thus dropping any reference to the old modifier style. Add a reference to the modifier style if you want to keep it alive.

    get_modifier_style is deprecated: Use #GtkStyleContext with a custom #GtkStyleProvider instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getModifierStyle() -> RcStyleRef!
  • getName() Extension method

    Retrieves the name of a widget. See gtk_widget_set_name() for the significance of widget names.

    Declaration

    Swift

    @inlinable
    func getName() -> String!
  • getNoShowAll() Extension method

    Returns the current value of the GtkWidget:no-show-all property, which determines whether calls to gtk_widget_show_all() will affect this widget.

    Declaration

    Swift

    @inlinable
    func getNoShowAll() -> Bool
  • getOpacity() Extension method

    Fetches the requested opacity for this widget. See gtk_widget_set_opacity().

    Declaration

    Swift

    @inlinable
    func getOpacity() -> CDouble
  • getPangoContext() Extension method

    Gets a PangoContext with the appropriate font map, font description, and base direction for this widget. Unlike the context returned by gtk_widget_create_pango_context(), this context is owned by the widget (it can be used until the screen for the widget changes or the widget is removed from its toplevel), and will be updated to match any changes to the widget’s attributes. This can be tracked by using the GtkWidget::screen-changed signal on the widget.

    Declaration

    Swift

    @inlinable
    func getPangoContext() -> Pango.ContextRef!
  • getParent() Extension method

    Returns the parent container of widget.

    Declaration

    Swift

    @inlinable
    func getParent() -> WidgetRef!
  • getParentWindow() Extension method

    Gets widget’s parent window, or nil if it does not have one.

    Declaration

    Swift

    @inlinable
    func getParentWindow() -> Gdk.WindowRef!
  • getPath() Extension method

    Returns the GtkWidgetPath representing widget, if the widget is not connected to a toplevel widget, a partial path will be created.

    Declaration

    Swift

    @inlinable
    func getPath() -> WidgetPathRef!
  • getPointer(x:y:) Extension method

    Obtains the location of the mouse pointer in widget coordinates. Widget coordinates are a bit odd; for historical reasons, they are defined as widget->window coordinates for widgets that return true for gtk_widget_get_has_window(); and are relative to widget->allocation.x, widget->allocation.y otherwise.

    get_pointer is deprecated: Use gdk_window_get_device_position() instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getPointer(x: UnsafeMutablePointer<gint>! = nil, y: UnsafeMutablePointer<gint>! = nil)
  • Retrieves a widget’s initial minimum and natural height.

    This call is specific to width-for-height requests.

    The returned request will be modified by the GtkWidgetClassadjust_size_request virtual method and by any GtkSizeGroups that have been applied. That is, the returned request is the one that should be used for layout, not necessarily the one returned by the widget itself.

    Declaration

    Swift

    @inlinable
    func getPreferredHeight(minimumHeight: UnsafeMutablePointer<gint>! = nil, naturalHeight: UnsafeMutablePointer<gint>! = nil)
  • Retrieves a widget’s minimum and natural height and the corresponding baselines if it would be given the specified width, or the default height if width is -1. The baselines may be -1 which means that no baseline is requested for this widget.

    The returned request will be modified by the GtkWidgetClassadjust_size_request and GtkWidgetClassadjust_baseline_request virtual methods and by any GtkSizeGroups that have been applied. That is, the returned request is the one that should be used for layout, not necessarily the one returned by the widget itself.

    Declaration

    Swift

    @inlinable
    func getPreferredHeightAndBaselineFor(width: Int, minimumHeight: UnsafeMutablePointer<gint>! = nil, naturalHeight: UnsafeMutablePointer<gint>! = nil, minimumBaseline: UnsafeMutablePointer<gint>! = nil, naturalBaseline: UnsafeMutablePointer<gint>! = nil)
  • Retrieves a widget’s minimum and natural height if it would be given the specified width.

    The returned request will be modified by the GtkWidgetClassadjust_size_request virtual method and by any GtkSizeGroups that have been applied. That is, the returned request is the one that should be used for layout, not necessarily the one returned by the widget itself.

    Declaration

    Swift

    @inlinable
    func getPreferredHeightFor(width: Int, minimumHeight: UnsafeMutablePointer<gint>! = nil, naturalHeight: UnsafeMutablePointer<gint>! = nil)
  • Retrieves the minimum and natural size of a widget, taking into account the widget’s preference for height-for-width management.

    This is used to retrieve a suitable size by container widgets which do not impose any restrictions on the child placement. It can be used to deduce toplevel window and menu sizes as well as child widgets in free-form containers such as GtkLayout.

    Handle with care. Note that the natural height of a height-for-width widget will generally be a smaller size than the minimum height, since the required height for the natural width is generally smaller than the required height for the minimum width.

    Use gtk_widget_get_preferred_height_and_baseline_for_width() if you want to support baseline alignment.

    Declaration

    Swift

    @inlinable
    func getPreferredSize(minimumSize: RequisitionRef? = nil, naturalSize: RequisitionRef? = nil)
  • Retrieves the minimum and natural size of a widget, taking into account the widget’s preference for height-for-width management.

    This is used to retrieve a suitable size by container widgets which do not impose any restrictions on the child placement. It can be used to deduce toplevel window and menu sizes as well as child widgets in free-form containers such as GtkLayout.

    Handle with care. Note that the natural height of a height-for-width widget will generally be a smaller size than the minimum height, since the required height for the natural width is generally smaller than the required height for the minimum width.

    Use gtk_widget_get_preferred_height_and_baseline_for_width() if you want to support baseline alignment.

    Declaration

    Swift

    @inlinable
    func getPreferredSize<RequisitionT>(minimumSize: RequisitionT?, naturalSize: RequisitionT?) where RequisitionT : RequisitionProtocol
  • Retrieves a widget’s initial minimum and natural width.

    This call is specific to height-for-width requests.

    The returned request will be modified by the GtkWidgetClassadjust_size_request virtual method and by any GtkSizeGroups that have been applied. That is, the returned request is the one that should be used for layout, not necessarily the one returned by the widget itself.

    Declaration

    Swift

    @inlinable
    func getPreferredWidth(minimumWidth: UnsafeMutablePointer<gint>! = nil, naturalWidth: UnsafeMutablePointer<gint>! = nil)
  • Retrieves a widget’s minimum and natural width if it would be given the specified height.

    The returned request will be modified by the GtkWidgetClassadjust_size_request virtual method and by any GtkSizeGroups that have been applied. That is, the returned request is the one that should be used for layout, not necessarily the one returned by the widget itself.

    Declaration

    Swift

    @inlinable
    func getPreferredWidthFor(height: Int, minimumWidth: UnsafeMutablePointer<gint>! = nil, naturalWidth: UnsafeMutablePointer<gint>! = nil)
  • getRealized() Extension method

    Determines whether widget is realized.

    Declaration

    Swift

    @inlinable
    func getRealized() -> Bool
  • getReceivesDefault() Extension method

    Determines whether widget is always treated as the default widget within its toplevel when it has the focus, even if another widget is the default.

    See gtk_widget_set_receives_default().

    Declaration

    Swift

    @inlinable
    func getReceivesDefault() -> Bool
  • getRequestMode() Extension method

    Gets whether the widget prefers a height-for-width layout or a width-for-height layout.

    GtkBin widgets generally propagate the preference of their child, container widgets need to request something either in context of their children or in context of their allocation capabilities.

    Declaration

    Swift

    @inlinable
    func getRequestMode() -> GtkSizeRequestMode
  • get(requisition:) Extension method

    Retrieves the widget’s requisition.

    This function should only be used by widget implementations in order to figure whether the widget’s requisition has actually changed after some internal state change (so that they can call gtk_widget_queue_resize() instead of gtk_widget_queue_draw()).

    Normally, gtk_widget_size_request() should be used.

    get_requisition is deprecated: The #GtkRequisition cache on the widget was removed, If you need to cache sizes across requests and allocations, add an explicit cache to the widget in question instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func get<RequisitionT>(requisition: RequisitionT) where RequisitionT : RequisitionProtocol
  • getRootWindow() Extension method

    Get the root window where this widget is located. This function can only be called after the widget has been added to a widget hierarchy with GtkWindow at the top.

    The root window is useful for such purposes as creating a popup GdkWindow associated with the window. In general, you should only create display specific resources when a widget has been realized, and you should free those resources when the widget is unrealized.

    get_root_window is deprecated: Use gdk_screen_get_root_window() instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getRootWindow() -> Gdk.WindowRef!
  • getScaleFactor() Extension method

    Retrieves the internal scale factor that maps from window coordinates to the actual device pixels. On traditional systems this is 1, on high density outputs, it can be a higher value (typically 2).

    See gdk_window_get_scale_factor().

    Declaration

    Swift

    @inlinable
    func getScaleFactor() -> Int
  • getScreen() Extension method

    Get the GdkScreen from the toplevel window associated with this widget. This function can only be called after the widget has been added to a widget hierarchy with a GtkWindow at the top.

    In general, you should only create screen specific resources when a widget has been realized, and you should free those resources when the widget is unrealized.

    Declaration

    Swift

    @inlinable
    func getScreen() -> Gdk.ScreenRef!
  • getSensitive() Extension method

    Returns the widget’s sensitivity (in the sense of returning the value that has been set using gtk_widget_set_sensitive()).

    The effective sensitivity of a widget is however determined by both its own and its parent widget’s sensitivity. See gtk_widget_is_sensitive().

    Declaration

    Swift

    @inlinable
    func getSensitive() -> Bool
  • getSettings() Extension method

    Gets the settings object holding the settings used for this widget.

    Note that this function can only be called when the GtkWidget is attached to a toplevel, since the settings object is specific to a particular GdkScreen.

    Declaration

    Swift

    @inlinable
    func getSettings() -> SettingsRef!
  • Gets the size request that was explicitly set for the widget using gtk_widget_set_size_request(). A value of -1 stored in width or height indicates that that dimension has not been set explicitly and the natural requisition of the widget will be used instead. See gtk_widget_set_size_request(). To get the size a widget will actually request, call gtk_widget_get_preferred_size() instead of this function.

    Declaration

    Swift

    @inlinable
    func getSizeRequest(width: UnsafeMutablePointer<gint>! = nil, height: UnsafeMutablePointer<gint>! = nil)
  • getState() Extension method

    Returns the widget’s state. See gtk_widget_set_state().

    get_state is deprecated: Use gtk_widget_get_state_flags() instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getState() -> GtkStateType
  • getStateFlags() Extension method

    Returns the widget state as a flag set. It is worth mentioning that the effective GTK_STATE_FLAG_INSENSITIVE state will be returned, that is, also based on parent insensitivity, even if widget itself is sensitive.

    Also note that if you are looking for a way to obtain the GtkStateFlags to pass to a GtkStyleContext method, you should look at gtk_style_context_get_state().

    Declaration

    Swift

    @inlinable
    func getStateFlags() -> StateFlags
  • getStyle() Extension method

    Simply an accessor function that returns widget->style.

    get_style is deprecated: Use #GtkStyleContext instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getStyle() -> StyleRef!
  • getStyleContext() Extension method

    Returns the style context associated to widget. The returned object is guaranteed to be the same for the lifetime of widget.

    Declaration

    Swift

    @inlinable
    func getStyleContext() -> StyleContextRef!
  • getSupportMultidevice() Extension method

    Returns true if widget is multiple pointer aware. See gtk_widget_set_support_multidevice() for more information.

    Declaration

    Swift

    @inlinable
    func getSupportMultidevice() -> Bool
  • Fetch an object build from the template XML for widget_type in this widget instance.

    This will only report children which were previously declared with gtk_widget_class_bind_template_child_full() or one of its variants.

    This function is only meant to be called for code which is private to the widget_type which declared the child and is meant for language bindings which cannot easily make use of the GObject structure offsets.

    Declaration

    Swift

    @inlinable
    func getTemplateChild(widgetType: GType, name: UnsafePointer<gchar>!) -> GLibObject.ObjectRef!
  • getTooltipMarkup() Extension method

    Gets the contents of the tooltip for widget.

    Declaration

    Swift

    @inlinable
    func getTooltipMarkup() -> String!
  • getTooltipText() Extension method

    Gets the contents of the tooltip for widget.

    Declaration

    Swift

    @inlinable
    func getTooltipText() -> String!
  • getTooltipWindow() Extension method

    Returns the GtkWindow of the current tooltip. This can be the GtkWindow created by default, or the custom tooltip window set using gtk_widget_set_tooltip_window().

    Declaration

    Swift

    @inlinable
    func getTooltipWindow() -> WindowRef!
  • getToplevel() Extension method

    This function returns the topmost widget in the container hierarchy widget is a part of. If widget has no parent widgets, it will be returned as the topmost widget. No reference will be added to the returned widget; it should not be unreferenced.

    Note the difference in behavior vs. gtk_widget_get_ancestor(); gtk_widget_get_ancestor (widget, GTK_TYPE_WINDOW) would return nil if widget wasn’t inside a toplevel window, and if the window was inside a GtkWindow-derived widget which was in turn inside the toplevel GtkWindow. While the second case may seem unlikely, it actually happens when a GtkPlug is embedded inside a GtkSocket within the same application.

    To reliably find the toplevel GtkWindow, use gtk_widget_get_toplevel() and call GTK_IS_WINDOW() on the result. For instance, to get the title of a widget’s toplevel window, one might use: (C Language Example):

    static const char *
    get_widget_toplevel_title (GtkWidget *widget)
    {
      GtkWidget *toplevel = gtk_widget_get_toplevel (widget);
      if (GTK_IS_WINDOW (toplevel))
        {
          return gtk_window_get_title (GTK_WINDOW (toplevel));
        }
    
      return NULL;
    }
    

    Declaration

    Swift

    @inlinable
    func getToplevel() -> WidgetRef!
  • getValign() Extension method

    Gets the value of the GtkWidget:valign property.

    For backwards compatibility reasons this method will never return GTK_ALIGN_BASELINE, but instead it will convert it to GTK_ALIGN_FILL. If your widget want to support baseline aligned children it must use gtk_widget_get_valign_with_baseline(), or g_object_get (widget, "valign", &value, NULL), which will also report the true value.

    Declaration

    Swift

    @inlinable
    func getValign() -> GtkAlign
  • getValignWithBaseline() Extension method

    Gets the value of the GtkWidget:valign property, including GTK_ALIGN_BASELINE.

    Declaration

    Swift

    @inlinable
    func getValignWithBaseline() -> GtkAlign
  • getVexpand() Extension method

    Gets whether the widget would like any available extra vertical space.

    See gtk_widget_get_hexpand() for more detail.

    Declaration

    Swift

    @inlinable
    func getVexpand() -> Bool
  • getVexpandSet() Extension method

    Gets whether gtk_widget_set_vexpand() has been used to explicitly set the expand flag on this widget.

    See gtk_widget_get_hexpand_set() for more detail.

    Declaration

    Swift

    @inlinable
    func getVexpandSet() -> Bool
  • getVisible() Extension method

    Determines whether the widget is visible. If you want to take into account whether the widget’s parent is also marked as visible, use gtk_widget_is_visible() instead.

    This function does not check if the widget is obscured in any way.

    See gtk_widget_set_visible().

    Declaration

    Swift

    @inlinable
    func getVisible() -> Bool
  • getVisual() Extension method

    Gets the visual that will be used to render widget.

    Declaration

    Swift

    @inlinable
    func getVisual() -> Gdk.VisualRef!
  • getWindow() Extension method

    Returns the widget’s window if it is realized, nil otherwise

    Declaration

    Swift

    @inlinable
    func getWindow() -> Gdk.WindowRef!
  • grabAdd() Extension method

    Makes widget the current grabbed widget.

    This means that interaction with other widgets in the same application is blocked and mouse as well as keyboard events are delivered to this widget.

    If widget is not sensitive, it is not set as the current grabbed widget and this function does nothing.

    Declaration

    Swift

    @inlinable
    func grabAdd()
  • grabDefault() Extension method

    Causes widget to become the default widget. widget must be able to be a default widget; typically you would ensure this yourself by calling gtk_widget_set_can_default() with a true value. The default widget is activated when the user presses Enter in a window. Default widgets must be activatable, that is, gtk_widget_activate() should affect them. Note that GtkEntry widgets require the “activates-default” property set to true before they activate the default widget when Enter is pressed and the GtkEntry is focused.

    Declaration

    Swift

    @inlinable
    func grabDefault()
  • grabFocus() Extension method

    Causes widget to have the keyboard focus for the GtkWindow it’s inside. widget must be a focusable widget, such as a GtkEntry; something like GtkFrame won’t work.

    More precisely, it must have the GTK_CAN_FOCUS flag set. Use gtk_widget_set_can_focus() to modify that flag.

    The widget also needs to be realized and mapped. This is indicated by the related signals. Grabbing the focus immediately after creating the widget will likely fail and cause critical warnings.

    Declaration

    Swift

    @inlinable
    func grabFocus()
  • grabRemove() Extension method

    Removes the grab from the given widget.

    You have to pair calls to gtk_grab_add() and gtk_grab_remove().

    If widget does not have the grab, this function does nothing.

    Declaration

    Swift

    @inlinable
    func grabRemove()
  • hasDefault() Extension method

    Determines whether widget is the current default widget within its toplevel. See gtk_widget_set_can_default().

    Declaration

    Swift

    @inlinable
    func hasDefault() -> Bool
  • hasFocus() Extension method

    Determines if the widget has the global input focus. See gtk_widget_is_focus() for the difference between having the global input focus, and only having the focus within a toplevel.

    Declaration

    Swift

    @inlinable
    func hasFocus() -> Bool
  • hasGrab() Extension method

    Determines whether the widget is currently grabbing events, so it is the only widget receiving input events (keyboard and mouse).

    See also gtk_grab_add().

    Declaration

    Swift

    @inlinable
    func hasGrab() -> Bool
  • hasRcStyle() Extension method

    Determines if the widget style has been looked up through the rc mechanism.

    has_rc_style is deprecated: Use #GtkStyleContext instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func hasRcStyle() -> Bool
  • hasScreen() Extension method

    Checks whether there is a GdkScreen is associated with this widget. All toplevel widgets have an associated screen, and all widgets added into a hierarchy with a toplevel window at the top.

    Declaration

    Swift

    @inlinable
    func hasScreen() -> Bool
  • hasVisibleFocus() Extension method

    Determines if the widget should show a visible indication that it has the global input focus. This is a convenience function for use in draw handlers that takes into account whether focus indication should currently be shown in the toplevel window of widget. See gtk_window_get_focus_visible() for more information about focus indication.

    To find out if the widget has the global input focus, use gtk_widget_has_focus().

    Declaration

    Swift

    @inlinable
    func hasVisibleFocus() -> Bool
  • hide() Extension method

    Reverses the effects of gtk_widget_show(), causing the widget to be hidden (invisible to the user).

    Declaration

    Swift

    @inlinable
    func hide()
  • hideOnDelete() Extension method

    Utility function; intended to be connected to the GtkWidget::delete-event signal on a GtkWindow. The function calls gtk_widget_hide() on its argument, then returns true. If connected to delete-event, the result is that clicking the close button for a window (on the window frame, top right corner usually) will hide but not destroy the window. By default, GTK+ destroys windows when delete-event is received.

    Declaration

    Swift

    @inlinable
    func hideOnDelete() -> Bool
  • inDestruction() Extension method

    Returns whether the widget is currently being destroyed. This information can sometimes be used to avoid doing unnecessary work.

    Declaration

    Swift

    @inlinable
    func inDestruction() -> Bool
  • initTemplate() Extension method

    Creates and initializes child widgets defined in templates. This function must be called in the instance initializer for any class which assigned itself a template using gtk_widget_class_set_template()

    It is important to call this function in the instance initializer of a GtkWidget subclass and not in GLibObject.constructed() or GLibObject.constructor() for two reasons.

    One reason is that generally derived widgets will assume that parent class composite widgets have been created in their instance initializers.

    Another reason is that when calling g_object_new() on a widget with composite templates, it’s important to build the composite widgets before the construct properties are set. Properties passed to g_object_new() should take precedence over properties set in the private template XML.

    Declaration

    Swift

    @inlinable
    func initTemplate()
  • inputShapeCombine(region:) Extension method

    Sets an input shape for this widget’s GDK window. This allows for windows which react to mouse click in a nonrectangular region, see gdk_window_input_shape_combine_region() for more information.

    Declaration

    Swift

    @inlinable
    func inputShapeCombine(region: Cairo.RegionRef? = nil)
  • inputShapeCombine(region:) Extension method

    Sets an input shape for this widget’s GDK window. This allows for windows which react to mouse click in a nonrectangular region, see gdk_window_input_shape_combine_region() for more information.

    Declaration

    Swift

    @inlinable
    func inputShapeCombine<RegionT>(region: RegionT?) where RegionT : RegionProtocol
  • Inserts group into widget. Children of widget that implement GtkActionable can then be associated with actions in group by setting their “action-name” to prefix.action-name.

    If group is nil, a previously inserted group for name is removed from widget.

    Declaration

    Swift

    @inlinable
    func insertActionGroup(name: UnsafePointer<gchar>!, group: GIO.ActionGroupRef? = nil)
  • Inserts group into widget. Children of widget that implement GtkActionable can then be associated with actions in group by setting their “action-name” to prefix.action-name.

    If group is nil, a previously inserted group for name is removed from widget.

    Declaration

    Swift

    @inlinable
    func insertActionGroup<ActionGroupT>(name: UnsafePointer<gchar>!, group: ActionGroupT?) where ActionGroupT : ActionGroupProtocol
  • Computes the intersection of a widget’s area and area, storing the intersection in intersection, and returns true if there was an intersection. intersection may be nil if you’re only interested in whether there was an intersection.

    Declaration

    Swift

    @inlinable
    func intersect<RectangleT>(area: RectangleT, intersection: RectangleT?) -> Bool where RectangleT : RectangleProtocol
  • is_(ancestor:) Extension method

    Determines whether widget is somewhere inside ancestor, possibly with intermediate containers.

    Declaration

    Swift

    @inlinable
    func is_<WidgetT>(ancestor: WidgetT) -> Bool where WidgetT : WidgetProtocol
  • keynavFailed(direction:) Extension method

    This function should be called whenever keyboard navigation within a single widget hits a boundary. The function emits the GtkWidget::keynav-failed signal on the widget and its return value should be interpreted in a way similar to the return value of gtk_widget_child_focus():

    When true is returned, stay in the widget, the failed keyboard navigation is OK and/or there is nowhere we can/should move the focus to.

    When false is returned, the caller should continue with keyboard navigation outside the widget, e.g. by calling gtk_widget_child_focus() on the widget’s toplevel.

    The default keynav-failed handler returns false for GTK_DIR_TAB_FORWARD and GTK_DIR_TAB_BACKWARD. For the other values of GtkDirectionType it returns true.

    Whenever the default handler returns true, it also calls gtk_widget_error_bell() to notify the user of the failed keyboard navigation.

    A use case for providing an own implementation of keynav-failed (either by connecting to it or by overriding it) would be a row of GtkEntry widgets where the user should be able to navigate the entire row with the cursor keys, as e.g. known from user interfaces that require entering license keys.

    Declaration

    Swift

    @inlinable
    func keynavFailed(direction: GtkDirectionType) -> Bool
  • listAccelClosures() Extension method

    Lists the closures used by widget for accelerator group connections with gtk_accel_group_connect_by_path() or gtk_accel_group_connect(). The closures can be used to monitor accelerator changes on widget, by connecting to the GtkAccelGroup::accel-changed signal of the GtkAccelGroup of a closure which can be found out with gtk_accel_group_from_accel_closure().

    Declaration

    Swift

    @inlinable
    func listAccelClosures() -> GLib.ListRef!
  • listActionPrefixes() Extension method

    Retrieves a nil-terminated array of strings containing the prefixes of GActionGroup‘s available to widget.

    Declaration

    Swift

    @inlinable
    func listActionPrefixes() -> UnsafeMutablePointer<UnsafePointer<gchar>?>!
  • listMnemonicLabels() Extension method

    Returns a newly allocated list of the widgets, normally labels, for which this widget is the target of a mnemonic (see for example, gtk_label_set_mnemonic_widget()).

    The widgets in the list are not individually referenced. If you want to iterate through the list and perform actions involving callbacks that might destroy the widgets, you must call g_list_foreach (result, (GFunc)g_object_ref, NULL) first, and then unref all the widgets afterwards.

    Declaration

    Swift

    @inlinable
    func listMnemonicLabels() -> GLib.ListRef!
  • map() Extension method

    This function is only for use in widget implementations. Causes a widget to be mapped if it isn’t already.

    Declaration

    Swift

    @inlinable
    func map()
  • Emits the GtkWidget::mnemonic-activate signal.

    Declaration

    Swift

    @inlinable
    func mnemonicActivate(groupCycling: Bool) -> Bool
  • modifyBase(state:color:) Extension method

    Sets the base color for a widget in a particular state. All other style values are left untouched. The base color is the background color used along with the text color (see gtk_widget_modify_text()) for widgets such as GtkEntry and GtkTextView. See also gtk_widget_modify_style().

    > Note that “no window” widgets (which have the GTK_NO_WINDOW > flag set) draw on their parent container’s window and thus may > not draw any background themselves. This is the case for e.g. > GtkLabel. > > To modify the background of such widgets, you have to set the > base color on their parent; if you want to set the background > of a rectangular area around a label, try placing the label in > a GtkEventBox widget and setting the base color on that.

    modify_base is deprecated: Use gtk_widget_override_background_color() instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func modifyBase(state: GtkStateType, color: Gdk.ColorRef? = nil)
  • modifyBase(state:color:) Extension method

    Sets the base color for a widget in a particular state. All other style values are left untouched. The base color is the background color used along with the text color (see gtk_widget_modify_text()) for widgets such as GtkEntry and GtkTextView. See also gtk_widget_modify_style().

    > Note that “no window” widgets (which have the GTK_NO_WINDOW > flag set) draw on their parent container’s window and thus may > not draw any background themselves. This is the case for e.g. > GtkLabel. > > To modify the background of such widgets, you have to set the > base color on their parent; if you want to set the background > of a rectangular area around a label, try placing the label in > a GtkEventBox widget and setting the base color on that.

    modify_base is deprecated: Use gtk_widget_override_background_color() instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func modifyBase<ColorT>(state: GtkStateType, color: ColorT?) where ColorT : ColorProtocol
  • modifyBg(state:color:) Extension method

    Sets the background color for a widget in a particular state.

    All other style values are left untouched. See also gtk_widget_modify_style().

    > Note that “no window” widgets (which have the GTK_NO_WINDOW > flag set) draw on their parent container’s window and thus may > not draw any background themselves. This is the case for e.g. > GtkLabel. > > To modify the background of such widgets, you have to set the > background color on their parent; if you want to set the background > of a rectangular area around a label, try placing the label in > a GtkEventBox widget and setting the background color on that.

    modify_bg is deprecated: Use gtk_widget_override_background_color() instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func modifyBg(state: GtkStateType, color: Gdk.ColorRef? = nil)
  • modifyBg(state:color:) Extension method

    Sets the background color for a widget in a particular state.

    All other style values are left untouched. See also gtk_widget_modify_style().

    > Note that “no window” widgets (which have the GTK_NO_WINDOW > flag set) draw on their parent container’s window and thus may > not draw any background themselves. This is the case for e.g. > GtkLabel. > > To modify the background of such widgets, you have to set the > background color on their parent; if you want to set the background > of a rectangular area around a label, try placing the label in > a GtkEventBox widget and setting the background color on that.

    modify_bg is deprecated: Use gtk_widget_override_background_color() instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func modifyBg<ColorT>(state: GtkStateType, color: ColorT?) where ColorT : ColorProtocol
  • Sets the cursor color to use in a widget, overriding the GtkWidget cursor-color and secondary-cursor-color style properties.

    All other style values are left untouched. See also gtk_widget_modify_style().

    modify_cursor is deprecated: Use gtk_widget_override_cursor() instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func modifyCursor(primary: Gdk.ColorRef? = nil, secondary: Gdk.ColorRef? = nil)
  • Sets the cursor color to use in a widget, overriding the GtkWidget cursor-color and secondary-cursor-color style properties.

    All other style values are left untouched. See also gtk_widget_modify_style().

    modify_cursor is deprecated: Use gtk_widget_override_cursor() instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func modifyCursor<ColorT>(primary: ColorT?, secondary: ColorT?) where ColorT : ColorProtocol
  • modifyFg(state:color:) Extension method

    Sets the foreground color for a widget in a particular state.

    All other style values are left untouched. See also gtk_widget_modify_style().

    modify_fg is deprecated: Use gtk_widget_override_color() instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func modifyFg(state: GtkStateType, color: Gdk.ColorRef? = nil)
  • modifyFg(state:color:) Extension method

    Sets the foreground color for a widget in a particular state.

    All other style values are left untouched. See also gtk_widget_modify_style().

    modify_fg is deprecated: Use gtk_widget_override_color() instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func modifyFg<ColorT>(state: GtkStateType, color: ColorT?) where ColorT : ColorProtocol
  • modifyFont(fontDesc:) Extension method

    Sets the font to use for a widget.

    All other style values are left untouched. See also gtk_widget_modify_style().

    modify_font is deprecated: Use gtk_widget_override_font() instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func modifyFont(fontDesc: Pango.FontDescriptionRef? = nil)
  • modifyFont(fontDesc:) Extension method

    Sets the font to use for a widget.

    All other style values are left untouched. See also gtk_widget_modify_style().

    modify_font is deprecated: Use gtk_widget_override_font() instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func modifyFont<FontDescriptionT>(fontDesc: FontDescriptionT?) where FontDescriptionT : FontDescriptionProtocol
  • modify(style:) Extension method

    Modifies style values on the widget.

    Modifications made using this technique take precedence over style values set via an RC file, however, they will be overridden if a style is explicitly set on the widget using gtk_widget_set_style(). The GtkRcStyle-struct is designed so each field can either be set or unset, so it is possible, using this function, to modify some style values and leave the others unchanged.

    Note that modifications made with this function are not cumulative with previous calls to gtk_widget_modify_style() or with such functions as gtk_widget_modify_fg(). If you wish to retain previous values, you must first call gtk_widget_get_modifier_style(), make your modifications to the returned style, then call gtk_widget_modify_style() with that style. On the other hand, if you first call gtk_widget_modify_style(), subsequent calls to such functions gtk_widget_modify_fg() will have a cumulative effect with the initial modifications.

    modify_style is deprecated: Use #GtkStyleContext with a custom #GtkStyleProvider instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func modify<RcStyleT>(style: RcStyleT) where RcStyleT : RcStyleProtocol
  • modifyText(state:color:) Extension method

    Sets the text color for a widget in a particular state.

    All other style values are left untouched. The text color is the foreground color used along with the base color (see gtk_widget_modify_base()) for widgets such as GtkEntry and GtkTextView. See also gtk_widget_modify_style().

    modify_text is deprecated: Use gtk_widget_override_color() instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func modifyText(state: GtkStateType, color: Gdk.ColorRef? = nil)
  • modifyText(state:color:) Extension method

    Sets the text color for a widget in a particular state.

    All other style values are left untouched. The text color is the foreground color used along with the base color (see gtk_widget_modify_base()) for widgets such as GtkEntry and GtkTextView. See also gtk_widget_modify_style().

    modify_text is deprecated: Use gtk_widget_override_color() instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func modifyText<ColorT>(state: GtkStateType, color: ColorT?) where ColorT : ColorProtocol
  • Sets the background color to use for a widget.

    All other style values are left untouched. See gtk_widget_override_color().

    override_background_color is deprecated: This function is not useful in the context of CSS-based rendering. If you wish to change the way a widget renders its background you should use a custom CSS style, through an application-specific #GtkStyleProvider and a CSS style class. You can also override the default drawing of a widget through the #GtkWidget::draw signal, and use Cairo to draw a specific color, regardless of the CSS style.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func overrideBackgroundColor(state: StateFlags, color: Gdk.RGBARef? = nil)
  • Sets the background color to use for a widget.

    All other style values are left untouched. See gtk_widget_override_color().

    override_background_color is deprecated: This function is not useful in the context of CSS-based rendering. If you wish to change the way a widget renders its background you should use a custom CSS style, through an application-specific #GtkStyleProvider and a CSS style class. You can also override the default drawing of a widget through the #GtkWidget::draw signal, and use Cairo to draw a specific color, regardless of the CSS style.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func overrideBackgroundColor<RGBAT>(state: StateFlags, color: RGBAT?) where RGBAT : RGBAProtocol
  • overrideColor(state:color:) Extension method

    Sets the color to use for a widget.

    All other style values are left untouched.

    This function does not act recursively. Setting the color of a container does not affect its children. Note that some widgets that you may not think of as containers, for instance GtkButtons, are actually containers.

    This API is mostly meant as a quick way for applications to change a widget appearance. If you are developing a widgets library and intend this change to be themeable, it is better done by setting meaningful CSS classes in your widget/container implementation through gtk_style_context_add_class().

    This way, your widget library can install a GtkCssProvider with the GTK_STYLE_PROVIDER_PRIORITY_FALLBACK priority in order to provide a default styling for those widgets that need so, and this theming may fully overridden by the user’s theme.

    Note that for complex widgets this may bring in undesired results (such as uniform background color everywhere), in these cases it is better to fully style such widgets through a GtkCssProvider with the GTK_STYLE_PROVIDER_PRIORITY_APPLICATION priority.

    override_color is deprecated: Use a custom style provider and style classes instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func overrideColor(state: StateFlags, color: Gdk.RGBARef? = nil)
  • overrideColor(state:color:) Extension method

    Sets the color to use for a widget.

    All other style values are left untouched.

    This function does not act recursively. Setting the color of a container does not affect its children. Note that some widgets that you may not think of as containers, for instance GtkButtons, are actually containers.

    This API is mostly meant as a quick way for applications to change a widget appearance. If you are developing a widgets library and intend this change to be themeable, it is better done by setting meaningful CSS classes in your widget/container implementation through gtk_style_context_add_class().

    This way, your widget library can install a GtkCssProvider with the GTK_STYLE_PROVIDER_PRIORITY_FALLBACK priority in order to provide a default styling for those widgets that need so, and this theming may fully overridden by the user’s theme.

    Note that for complex widgets this may bring in undesired results (such as uniform background color everywhere), in these cases it is better to fully style such widgets through a GtkCssProvider with the GTK_STYLE_PROVIDER_PRIORITY_APPLICATION priority.

    override_color is deprecated: Use a custom style provider and style classes instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func overrideColor<RGBAT>(state: StateFlags, color: RGBAT?) where RGBAT : RGBAProtocol
  • Sets the cursor color to use in a widget, overriding the cursor-color and secondary-cursor-color style properties. All other style values are left untouched. See also gtk_widget_modify_style().

    Note that the underlying properties have the GdkColor type, so the alpha value in primary and secondary will be ignored.

    override_cursor is deprecated: This function is not useful in the context of CSS-based rendering. If you wish to change the color used to render the primary and secondary cursors you should use a custom CSS style, through an application-specific #GtkStyleProvider and a CSS style class.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func override_(cursor: Gdk.RGBARef? = nil, secondaryCursor: Gdk.RGBARef? = nil)
  • Sets the cursor color to use in a widget, overriding the cursor-color and secondary-cursor-color style properties. All other style values are left untouched. See also gtk_widget_modify_style().

    Note that the underlying properties have the GdkColor type, so the alpha value in primary and secondary will be ignored.

    override_cursor is deprecated: This function is not useful in the context of CSS-based rendering. If you wish to change the color used to render the primary and secondary cursors you should use a custom CSS style, through an application-specific #GtkStyleProvider and a CSS style class.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func override_<RGBAT>(cursor: RGBAT?, secondaryCursor: RGBAT?) where RGBAT : RGBAProtocol
  • overrideFont(fontDesc:) Extension method

    Sets the font to use for a widget. All other style values are left untouched. See gtk_widget_override_color().

    override_font is deprecated: This function is not useful in the context of CSS-based rendering. If you wish to change the font a widget uses to render its text you should use a custom CSS style, through an application-specific #GtkStyleProvider and a CSS style class.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func overrideFont(fontDesc: Pango.FontDescriptionRef? = nil)
  • overrideFont(fontDesc:) Extension method

    Sets the font to use for a widget. All other style values are left untouched. See gtk_widget_override_color().

    override_font is deprecated: This function is not useful in the context of CSS-based rendering. If you wish to change the font a widget uses to render its text you should use a custom CSS style, through an application-specific #GtkStyleProvider and a CSS style class.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func overrideFont<FontDescriptionT>(fontDesc: FontDescriptionT?) where FontDescriptionT : FontDescriptionProtocol
  • Sets a symbolic color for a widget.

    All other style values are left untouched. See gtk_widget_override_color() for overriding the foreground or background color.

    override_symbolic_color is deprecated: This function is not useful in the context of CSS-based rendering. If you wish to change the color used to render symbolic icons you should use a custom CSS style, through an application-specific #GtkStyleProvider and a CSS style class.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func overrideSymbolicColor(name: UnsafePointer<gchar>!, color: Gdk.RGBARef? = nil)
  • Sets a symbolic color for a widget.

    All other style values are left untouched. See gtk_widget_override_color() for overriding the foreground or background color.

    override_symbolic_color is deprecated: This function is not useful in the context of CSS-based rendering. If you wish to change the color used to render symbolic icons you should use a custom CSS style, through an application-specific #GtkStyleProvider and a CSS style class.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func overrideSymbolicColor<RGBAT>(name: UnsafePointer<gchar>!, color: RGBAT?) where RGBAT : RGBAProtocol
  • Obtains the full path to widget. The path is simply the name of a widget and all its parents in the container hierarchy, separated by periods. The name of a widget comes from gtk_widget_get_name(). Paths are used to apply styles to a widget in gtkrc configuration files. Widget names are the type of the widget by default (e.g. “GtkButton”) or can be set to an application-specific value with gtk_widget_set_name(). By setting the name of a widget, you allow users or theme authors to apply styles to that specific widget in their gtkrc file. path_reversed_p fills in the path in reverse order, i.e. starting with widget’s name instead of starting with the name of widget’s outermost ancestor.

    path is deprecated: Use gtk_widget_get_path() instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getPath(pathLength: UnsafeMutablePointer<guint>! = nil, path: UnsafeMutablePointer<UnsafeMutablePointer<gchar>?>! = nil, pathReversed: UnsafeMutablePointer<UnsafeMutablePointer<gchar>?>! = nil)
  • queueAllocate() Extension method

    This function is only for use in widget implementations.

    Flags the widget for a rerun of the GtkWidgetClasssize_allocate function. Use this function instead of gtk_widget_queue_resize() when the widget‘s size request didn’t change but it wants to reposition its contents.

    An example user of this function is gtk_widget_set_halign().

    Declaration

    Swift

    @inlinable
    func queueAllocate()
  • queueComputeExpand() Extension method

    Mark widget as needing to recompute its expand flags. Call this function when setting legacy expand child properties on the child of a container.

    See gtk_widget_compute_expand().

    Declaration

    Swift

    @inlinable
    func queueComputeExpand()
  • queueDraw() Extension method

    Equivalent to calling gtk_widget_queue_draw_area() for the entire area of a widget.

    Declaration

    Swift

    @inlinable
    func queueDraw()
  • Convenience function that calls gtk_widget_queue_draw_region() on the region created from the given coordinates.

    The region here is specified in widget coordinates. Widget coordinates are a bit odd; for historical reasons, they are defined as widget->window coordinates for widgets that return true for gtk_widget_get_has_window(), and are relative to widget->allocation.x, widget->allocation.y otherwise.

    width or height may be 0, in this case this function does nothing. Negative values for width and height are not allowed.

    Declaration

    Swift

    @inlinable
    func queueDrawArea(x: Int, y: Int, width: Int, height: Int)
  • queueDraw(region:) Extension method

    Invalidates the area of widget defined by region by calling gdk_window_invalidate_region() on the widget’s window and all its child windows. Once the main loop becomes idle (after the current batch of events has been processed, roughly), the window will receive expose events for the union of all regions that have been invalidated.

    Normally you would only use this function in widget implementations. You might also use it to schedule a redraw of a GtkDrawingArea or some portion thereof.

    Declaration

    Swift

    @inlinable
    func queueDraw<RegionT>(region: RegionT) where RegionT : RegionProtocol
  • queueResize() Extension method

    This function is only for use in widget implementations. Flags a widget to have its size renegotiated; should be called when a widget for some reason has a new size request. For example, when you change the text in a GtkLabel, GtkLabel queues a resize to ensure there’s enough space for the new text.

    Note that you cannot call gtk_widget_queue_resize() on a widget from inside its implementation of the GtkWidgetClasssize_allocate virtual method. Calls to gtk_widget_queue_resize() from inside GtkWidgetClasssize_allocate will be silently ignored.

    Declaration

    Swift

    @inlinable
    func queueResize()
  • queueResizeNoRedraw() Extension method

    This function works like gtk_widget_queue_resize(), except that the widget is not invalidated.

    Declaration

    Swift

    @inlinable
    func queueResizeNoRedraw()
  • realize() Extension method

    Creates the GDK (windowing system) resources associated with a widget. For example, widget->window will be created when a widget is realized. Normally realization happens implicitly; if you show a widget and all its parent containers, then the widget will be realized and mapped automatically.

    Realizing a widget requires all the widget’s parent widgets to be realized; calling gtk_widget_realize() realizes the widget’s parents in addition to widget itself. If a widget is not yet inside a toplevel window when you realize it, bad things will happen.

    This function is primarily used in widget implementations, and isn’t very useful otherwise. Many times when you think you might need it, a better approach is to connect to a signal that will be called after the widget is realized automatically, such as GtkWidget::draw. Or simply g_signal_connect () to the GtkWidget::realize signal.

    Declaration

    Swift

    @inlinable
    func realize()
  • regionIntersect(region:) Extension method

    Computes the intersection of a widget’s area and region, returning the intersection. The result may be empty, use cairo_region_is_empty() to check.

    region_intersect is deprecated: Use gtk_widget_get_allocation() and cairo_region_intersect_rectangle() to get the same behavior.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func regionIntersect<RegionT>(region: RegionT) -> Cairo.RegionRef! where RegionT : RegionProtocol
  • register(window:) Extension method

    Registers a GdkWindow with the widget and sets it up so that the widget receives events for it. Call gtk_widget_unregister_window() when destroying the window.

    Before 3.8 you needed to call gdk_window_set_user_data() directly to set this up. This is now deprecated and you should use gtk_widget_register_window() instead. Old code will keep working as is, although some new features like transparency might not work perfectly.

    Declaration

    Swift

    @inlinable
    func register<WindowT>(window: WindowT) where WindowT : WindowProtocol
  • Removes an accelerator from widget, previously installed with gtk_widget_add_accelerator().

    Declaration

    Swift

    @inlinable
    func removeAccelerator<AccelGroupT>(accelGroup: AccelGroupT, accelKey: Int, accelMods: Gdk.ModifierType) -> Bool where AccelGroupT : AccelGroupProtocol
  • removeMnemonic(label:) Extension method

    Removes a widget from the list of mnemonic labels for this widget. (See gtk_widget_list_mnemonic_labels()). The widget must have previously been added to the list with gtk_widget_add_mnemonic_label().

    Declaration

    Swift

    @inlinable
    func removeMnemonic<WidgetT>(label: WidgetT) where WidgetT : WidgetProtocol
  • removeTickCallback(id:) Extension method

    Removes a tick callback previously registered with gtk_widget_add_tick_callback().

    Declaration

    Swift

    @inlinable
    func removeTickCallback(id: Int)
  • A convenience function that uses the theme settings for widget to look up stock_id and render it to a pixbuf. stock_id should be a stock icon ID such as GTK_STOCK_OPEN or GTK_STOCK_OK. size should be a size such as GTK_ICON_SIZE_MENU. detail should be a string that identifies the widget or code doing the rendering, so that theme engines can special-case rendering for that widget or code.

    The pixels in the returned GdkPixbuf are shared with the rest of the application and should not be modified. The pixbuf should be freed after use with g_object_unref().

    render_icon is deprecated: Use gtk_widget_render_icon_pixbuf() instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func renderIcon(stockID: UnsafePointer<gchar>!, size: GtkIconSize, detail: UnsafePointer<gchar>? = nil) -> PixbufRef!
  • A convenience function that uses the theme engine and style settings for widget to look up stock_id and render it to a pixbuf. stock_id should be a stock icon ID such as GTK_STOCK_OPEN or GTK_STOCK_OK. size should be a size such as GTK_ICON_SIZE_MENU.

    The pixels in the returned GdkPixbuf are shared with the rest of the application and should not be modified. The pixbuf should be freed after use with g_object_unref().

    render_icon_pixbuf is deprecated: Use gtk_icon_theme_load_icon() instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func renderIconPixbuf(stockID: UnsafePointer<gchar>!, size: GtkIconSize) -> PixbufRef!
  • reparent(newParent:) Extension method

    Moves a widget from one GtkContainer to another, handling reference count issues to avoid destroying the widget.

    reparent is deprecated: Use gtk_container_remove() and gtk_container_add().

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func reparent<WidgetT>(newParent: WidgetT) where WidgetT : WidgetProtocol
  • resetRcStyles() Extension method

    Reset the styles of widget and all descendents, so when they are looked up again, they get the correct values for the currently loaded RC file settings.

    This function is not useful for applications.

    reset_rc_styles is deprecated: Use #GtkStyleContext instead, and gtk_widget_reset_style()

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func resetRcStyles()
  • resetStyle() Extension method

    Updates the style context of widget and all descendants by updating its widget path. GtkContainers may want to use this on a child when reordering it in a way that a different style might apply to it. See also gtk_container_get_path_for_child().

    Declaration

    Swift

    @inlinable
    func resetStyle()
  • sendExpose(event:) Extension method

    Very rarely-used function. This function is used to emit an expose event on a widget. This function is not normally used directly. The only time it is used is when propagating an expose event to a windowless child widget (gtk_widget_get_has_window() is false), and that is normally done using gtk_container_propagate_draw().

    If you want to force an area of a window to be redrawn, use gdk_window_invalidate_rect() or gdk_window_invalidate_region(). To cause the redraw to be done immediately, follow that call with a call to gdk_window_process_updates().

    send_expose is deprecated: Application and widget code should not handle expose events directly; invalidation should use the #GtkWidget API, and drawing should only happen inside #GtkWidget::draw implementations

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func sendExpose<EventT>(event: EventT) -> Int where EventT : EventProtocol
  • sendFocusChange(event:) Extension method

    Sends the focus change event to widget

    This function is not meant to be used by applications. The only time it should be used is when it is necessary for a GtkWidget to assign focus to a widget that is semantically owned by the first widget even though it’s not a direct child - for instance, a search entry in a floating window similar to the quick search in GtkTreeView.

    An example of its usage is:

    (C Language Example):

      GdkEvent *fevent = gdk_event_new (GDK_FOCUS_CHANGE);
    
      fevent->focus_change.type = GDK_FOCUS_CHANGE;
      fevent->focus_change.in = TRUE;
      fevent->focus_change.window = _gtk_widget_get_window (widget);
      if (fevent->focus_change.window != NULL)
        g_object_ref (fevent->focus_change.window);
    
      gtk_widget_send_focus_change (widget, fevent);
    
      gdk_event_free (event);
    

    Declaration

    Swift

    @inlinable
    func sendFocusChange<EventT>(event: EventT) -> Bool where EventT : EventProtocol
  • set(accelPath:accelGroup:) Extension method

    Given an accelerator group, accel_group, and an accelerator path, accel_path, sets up an accelerator in accel_group so whenever the key binding that is defined for accel_path is pressed, widget will be activated. This removes any accelerators (for any accelerator group) installed by previous calls to gtk_widget_set_accel_path(). Associating accelerators with paths allows them to be modified by the user and the modifications to be saved for future use. (See gtk_accel_map_save().)

    This function is a low level function that would most likely be used by a menu creation system like GtkUIManager. If you use GtkUIManager, setting up accelerator paths will be done automatically.

    Even when you you aren’t using GtkUIManager, if you only want to set up accelerators on menu items gtk_menu_item_set_accel_path() provides a somewhat more convenient interface.

    Note that accel_path string will be stored in a GQuark. Therefore, if you pass a static string, you can save some memory by interning it first with g_intern_static_string().

    Declaration

    Swift

    @inlinable
    func set(accelPath: UnsafePointer<gchar>? = nil, accelGroup: AccelGroupRef? = nil)
  • set(accelPath:accelGroup:) Extension method

    Given an accelerator group, accel_group, and an accelerator path, accel_path, sets up an accelerator in accel_group so whenever the key binding that is defined for accel_path is pressed, widget will be activated. This removes any accelerators (for any accelerator group) installed by previous calls to gtk_widget_set_accel_path(). Associating accelerators with paths allows them to be modified by the user and the modifications to be saved for future use. (See gtk_accel_map_save().)

    This function is a low level function that would most likely be used by a menu creation system like GtkUIManager. If you use GtkUIManager, setting up accelerator paths will be done automatically.

    Even when you you aren’t using GtkUIManager, if you only want to set up accelerators on menu items gtk_menu_item_set_accel_path() provides a somewhat more convenient interface.

    Note that accel_path string will be stored in a GQuark. Therefore, if you pass a static string, you can save some memory by interning it first with g_intern_static_string().

    Declaration

    Swift

    @inlinable
    func set<AccelGroupT>(accelPath: UnsafePointer<gchar>? = nil, accelGroup: AccelGroupT?) where AccelGroupT : AccelGroupProtocol
  • set(allocation:) Extension method

    Sets the widget’s allocation. This should not be used directly, but from within a widget’s size_allocate method.

    The allocation set should be the “adjusted” or actual allocation. If you’re implementing a GtkContainer, you want to use gtk_widget_size_allocate() instead of gtk_widget_set_allocation(). The GtkWidgetClassadjust_size_allocation virtual method adjusts the allocation inside gtk_widget_size_allocate() to create an adjusted allocation.

    Declaration

    Swift

    @inlinable
    func set(allocation: UnsafePointer<GtkAllocation>!)
  • set(appPaintable:) Extension method

    Sets whether the application intends to draw on the widget in an GtkWidget::draw handler.

    This is a hint to the widget and does not affect the behavior of the GTK+ core; many widgets ignore this flag entirely. For widgets that do pay attention to the flag, such as GtkEventBox and GtkWindow, the effect is to suppress default themed drawing of the widget’s background. (Children of the widget will still be drawn.) The application is then entirely responsible for drawing the widget background.

    Note that the background is still drawn when the widget is mapped.

    Declaration

    Swift

    @inlinable
    func set(appPaintable: Bool)
  • set(canDefault:) Extension method

    Specifies whether widget can be a default widget. See gtk_widget_grab_default() for details about the meaning of “default”.

    Declaration

    Swift

    @inlinable
    func set(canDefault: Bool)
  • set(canFocus:) Extension method

    Specifies whether widget can own the input focus. See gtk_widget_grab_focus() for actually setting the input focus on a widget.

    Declaration

    Swift

    @inlinable
    func set(canFocus: Bool)
  • setChildVisible(isVisible:) Extension method

    Sets whether widget should be mapped along with its when its parent is mapped and widget has been shown with gtk_widget_show().

    The child visibility can be set for widget before it is added to a container with gtk_widget_set_parent(), to avoid mapping children unnecessary before immediately unmapping them. However it will be reset to its default state of true when the widget is removed from a container.

    Note that changing the child visibility of a widget does not queue a resize on the widget. Most of the time, the size of a widget is computed from all visible children, whether or not they are mapped. If this is not the case, the container can queue a resize itself.

    This function is only useful for container implementations and never should be called by an application.

    Declaration

    Swift

    @inlinable
    func setChildVisible(isVisible: Bool)
  • set(clip:) Extension method

    Sets the widget’s clip. This must not be used directly, but from within a widget’s size_allocate method. It must be called after gtk_widget_set_allocation() (or after chaining up to the parent class), because that function resets the clip.

    The clip set should be the area that widget draws on. If widget is a GtkContainer, the area must contain all children’s clips.

    If this function is not called by widget during a size-allocate handler, the clip will be set to widget‘s allocation.

    Declaration

    Swift

    @inlinable
    func set(clip: UnsafePointer<GtkAllocation>!)
  • setComposite(name:) Extension method

    Sets a widgets composite name. The widget must be a composite child of its parent; see gtk_widget_push_composite_child().

    set_composite_name is deprecated: Use gtk_widget_class_set_template(), or don’t use this API at all.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func setComposite(name: UnsafePointer<gchar>!)
  • Enables or disables a GdkDevice to interact with widget and all its children.

    It does so by descending through the GdkWindow hierarchy and enabling the same mask that is has for core events (i.e. the one that gdk_window_get_events() returns).

    Declaration

    Swift

    @inlinable
    func setDeviceEnabled<DeviceT>(device: DeviceT, enabled: Bool) where DeviceT : DeviceProtocol
  • Sets the device event mask (see GdkEventMask) for a widget. The event mask determines which events a widget will receive from device. Keep in mind that different widgets have different default event masks, and by changing the event mask you may disrupt a widget’s functionality, so be careful. This function must be called while a widget is unrealized. Consider gtk_widget_add_device_events() for widgets that are already realized, or if you want to preserve the existing event mask. This function can’t be used with windowless widgets (which return false from gtk_widget_get_has_window()); to get events on those widgets, place them inside a GtkEventBox and receive events on the event box.

    Declaration

    Swift

    @inlinable
    func setDeviceEvents<DeviceT>(device: DeviceT, events: Gdk.EventMask) where DeviceT : DeviceProtocol
  • setDirection(dir:) Extension method

    Sets the reading direction on a particular widget. This direction controls the primary direction for widgets containing text, and also the direction in which the children of a container are packed. The ability to set the direction is present in order so that correct localization into languages with right-to-left reading directions can be done. Generally, applications will let the default reading direction present, except for containers where the containers are arranged in an order that is explicitly visual rather than logical (such as buttons for text justification).

    If the direction is set to GTK_TEXT_DIR_NONE, then the value set by gtk_widget_set_default_direction() will be used.

    Declaration

    Swift

    @inlinable
    func setDirection(dir: GtkTextDirection)
  • set(doubleBuffered:) Extension method

    Widgets are double buffered by default; you can use this function to turn off the buffering. “Double buffered” simply means that gdk_window_begin_draw_frame() and gdk_window_end_draw_frame() are called automatically around expose events sent to the widget. gdk_window_begin_draw_frame() diverts all drawing to a widget’s window to an offscreen buffer, and gdk_window_end_draw_frame() draws the buffer to the screen. The result is that users see the window update in one smooth step, and don’t see individual graphics primitives being rendered.

    In very simple terms, double buffered widgets don’t flicker, so you would only use this function to turn off double buffering if you had special needs and really knew what you were doing.

    Note: if you turn off double-buffering, you have to handle expose events, since even the clearing to the background color or pixmap will not happen automatically (as it is done in gdk_window_begin_draw_frame()).

    In 3.10 GTK and GDK have been restructured for translucent drawing. Since then expose events for double-buffered widgets are culled into a single event to the toplevel GDK window. If you now unset double buffering, you will cause a separate rendering pass for every widget. This will likely cause rendering problems - in particular related to stacking - and usually increases rendering times significantly.

    set_double_buffered is deprecated: This function does not work under non-X11 backends or with non-native windows. It should not be used in newly written code.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func set(doubleBuffered: Bool)
  • set(events:) Extension method

    Sets the event mask (see GdkEventMask) for a widget. The event mask determines which events a widget will receive. Keep in mind that different widgets have different default event masks, and by changing the event mask you may disrupt a widget’s functionality, so be careful. This function must be called while a widget is unrealized. Consider gtk_widget_add_events() for widgets that are already realized, or if you want to preserve the existing event mask. This function can’t be used with widgets that have no window. (See gtk_widget_get_has_window()). To get events on those widgets, place them inside a GtkEventBox and receive events on the event box.

    Declaration

    Swift

    @inlinable
    func set(events: Int)
  • set(focusOnClick:) Extension method

    Sets whether the widget should grab focus when it is clicked with the mouse. Making mouse clicks not grab focus is useful in places like toolbars where you don’t want the keyboard focus removed from the main area of the application.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func set(focusOnClick: Bool)
  • set(fontMap:) Extension method

    Sets the font map to use for Pango rendering. When not set, the widget will inherit the font map from its parent.

    Declaration

    Swift

    @inlinable
    func set(fontMap: Pango.FontMapRef? = nil)
  • set(fontMap:) Extension method

    Sets the font map to use for Pango rendering. When not set, the widget will inherit the font map from its parent.

    Declaration

    Swift

    @inlinable
    func set<FontMapT>(fontMap: FontMapT?) where FontMapT : FontMapProtocol
  • setFont(options:) Extension method

    Sets the cairo_font_options_t used for Pango rendering in this widget. When not set, the default font options for the GdkScreen will be used.

    Declaration

    Swift

    @inlinable
    func setFont(options: Cairo.FontOptionsRef? = nil)
  • setFont(options:) Extension method

    Sets the cairo_font_options_t used for Pango rendering in this widget. When not set, the default font options for the GdkScreen will be used.

    Declaration

    Swift

    @inlinable
    func setFont<FontOptionsT>(options: FontOptionsT?) where FontOptionsT : FontOptionsProtocol
  • setHalign(align:) Extension method

    Sets the horizontal alignment of widget. See the GtkWidget:halign property.

    Declaration

    Swift

    @inlinable
    func setHalign(align: GtkAlign)
  • set(hasTooltip:) Extension method

    Sets the has-tooltip property on widget to has_tooltip. See GtkWidget:has-tooltip for more information.

    Declaration

    Swift

    @inlinable
    func set(hasTooltip: Bool)
  • set(hasWindow:) Extension method

    Specifies whether widget has a GdkWindow of its own. Note that all realized widgets have a non-nil “window” pointer (gtk_widget_get_window() never returns a nil window when a widget is realized), but for many of them it’s actually the GdkWindow of one of its parent widgets. Widgets that do not create a window for themselves in GtkWidget::realize must announce this by calling this function with has_window = false.

    This function should only be called by widget implementations, and they should call it in their init() function.

    Declaration

    Swift

    @inlinable
    func set(hasWindow: Bool)
  • setHexpand(expand:) Extension method

    Sets whether the widget would like any available extra horizontal space. When a user resizes a GtkWindow, widgets with expand=TRUE generally receive the extra space. For example, a list or scrollable area or document in your window would often be set to expand.

    Call this function to set the expand flag if you would like your widget to become larger horizontally when the window has extra room.

    By default, widgets automatically expand if any of their children want to expand. (To see if a widget will automatically expand given its current children and state, call gtk_widget_compute_expand(). A container can decide how the expandability of children affects the expansion of the container by overriding the compute_expand virtual method on GtkWidget.).

    Setting hexpand explicitly with this function will override the automatic expand behavior.

    This function forces the widget to expand or not to expand, regardless of children. The override occurs because gtk_widget_set_hexpand() sets the hexpand-set property (see gtk_widget_set_hexpand_set()) which causes the widget’s hexpand value to be used, rather than looking at children and widget state.

    Declaration

    Swift

    @inlinable
    func setHexpand(expand: Bool)
  • setHexpand(set:) Extension method

    Sets whether the hexpand flag (see gtk_widget_get_hexpand()) will be used.

    The hexpand-set property will be set automatically when you call gtk_widget_set_hexpand() to set hexpand, so the most likely reason to use this function would be to unset an explicit expand flag.

    If hexpand is set, then it overrides any computed expand value based on child widgets. If hexpand is not set, then the expand value depends on whether any children of the widget would like to expand.

    There are few reasons to use this function, but it’s here for completeness and consistency.

    Declaration

    Swift

    @inlinable
    func setHexpand(set: Bool)
  • set(mapped:) Extension method

    Marks the widget as being mapped.

    This function should only ever be called in a derived widget’s “map” or “unmap” implementation.

    Declaration

    Swift

    @inlinable
    func set(mapped: Bool)
  • setMarginBottom(margin:) Extension method

    Sets the bottom margin of widget. See the GtkWidget:margin-bottom property.

    Declaration

    Swift

    @inlinable
    func setMarginBottom(margin: Int)
  • setMarginEnd(margin:) Extension method

    Sets the end margin of widget. See the GtkWidget:margin-end property.

    Declaration

    Swift

    @inlinable
    func setMarginEnd(margin: Int)
  • setMarginLeft(margin:) Extension method

    Sets the left margin of widget. See the GtkWidget:margin-left property.

    set_margin_left is deprecated: Use gtk_widget_set_margin_start() instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func setMarginLeft(margin: Int)
  • setMarginRight(margin:) Extension method

    Sets the right margin of widget. See the GtkWidget:margin-right property.

    set_margin_right is deprecated: Use gtk_widget_set_margin_end() instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func setMarginRight(margin: Int)
  • setMarginStart(margin:) Extension method

    Sets the start margin of widget. See the GtkWidget:margin-start property.

    Declaration

    Swift

    @inlinable
    func setMarginStart(margin: Int)
  • setMarginTop(margin:) Extension method

    Sets the top margin of widget. See the GtkWidget:margin-top property.

    Declaration

    Swift

    @inlinable
    func setMarginTop(margin: Int)
  • set(name:) Extension method

    Widgets can be named, which allows you to refer to them from a CSS file. You can apply a style to widgets with a particular name in the CSS file. See the documentation for the CSS syntax (on the same page as the docs for GtkStyleContext).

    Note that the CSS syntax has certain special characters to delimit and represent elements in a selector (period, #, >, *…), so using these will make your widget impossible to match by name. Any combination of alphanumeric symbols, dashes and underscores will suffice.

    Declaration

    Swift

    @inlinable
    func set(name: UnsafePointer<gchar>!)
  • set(noShowAll:) Extension method

    Sets the GtkWidget:no-show-all property, which determines whether calls to gtk_widget_show_all() will affect this widget.

    This is mostly for use in constructing widget hierarchies with externally controlled visibility, see GtkUIManager.

    Declaration

    Swift

    @inlinable
    func set(noShowAll: Bool)
  • set(opacity:) Extension method

    Request the widget to be rendered partially transparent, with opacity 0 being fully transparent and 1 fully opaque. (Opacity values are clamped to the [0,1] range.). This works on both toplevel widget, and child widgets, although there are some limitations:

    For toplevel widgets this depends on the capabilities of the windowing system. On X11 this has any effect only on X screens with a compositing manager running. See gtk_widget_is_composited(). On Windows it should work always, although setting a window’s opacity after the window has been shown causes it to flicker once on Windows.

    For child widgets it doesn’t work if any affected widget has a native window, or disables double buffering.

    Declaration

    Swift

    @inlinable
    func set(opacity: CDouble)
  • set(parent:) Extension method

    This function is useful only when implementing subclasses of GtkContainer. Sets the container as the parent of widget, and takes care of some details such as updating the state and style of the child to reflect its new location. The opposite function is gtk_widget_unparent().

    Declaration

    Swift

    @inlinable
    func set<WidgetT>(parent: WidgetT) where WidgetT : WidgetProtocol
  • set(parentWindow:) Extension method

    Sets a non default parent window for widget.

    For GtkWindow classes, setting a parent_window effects whether the window is a toplevel window or can be embedded into other widgets.

    For GtkWindow classes, this needs to be called before the window is realized.

    Declaration

    Swift

    @inlinable
    func set<WindowT>(parentWindow: WindowT) where WindowT : WindowProtocol
  • set(realized:) Extension method

    Marks the widget as being realized. This function must only be called after all GdkWindows for the widget have been created and registered.

    This function should only ever be called in a derived widget’s “realize” or “unrealize” implementation.

    Declaration

    Swift

    @inlinable
    func set(realized: Bool)
  • set(receivesDefault:) Extension method

    Specifies whether widget will be treated as the default widget within its toplevel when it has the focus, even if another widget is the default.

    See gtk_widget_grab_default() for details about the meaning of “default”.

    Declaration

    Swift

    @inlinable
    func set(receivesDefault: Bool)
  • set(redrawOnAllocate:) Extension method

    Sets whether the entire widget is queued for drawing when its size allocation changes. By default, this setting is true and the entire widget is redrawn on every size change. If your widget leaves the upper left unchanged when made bigger, turning this setting off will improve performance.

    Note that for widgets where gtk_widget_get_has_window() is false setting this flag to false turns off all allocation on resizing: the widget will not even redraw if its position changes; this is to allow containers that don’t draw anything to avoid excess invalidations. If you set this flag on a widget with no window that does draw on widget->window, you are responsible for invalidating both the old and new allocation of the widget when the widget is moved and responsible for invalidating regions newly when the widget increases size.

    Declaration

    Swift

    @inlinable
    func set(redrawOnAllocate: Bool)
  • set(sensitive:) Extension method

    Sets the sensitivity of a widget. A widget is sensitive if the user can interact with it. Insensitive widgets are “grayed out” and the user can’t interact with them. Insensitive widgets are known as “inactive”, “disabled”, or “ghosted” in some other toolkits.

    Declaration

    Swift

    @inlinable
    func set(sensitive: Bool)
  • Sets the minimum size of a widget; that is, the widget’s size request will be at least width by height. You can use this function to force a widget to be larger than it normally would be.

    In most cases, gtk_window_set_default_size() is a better choice for toplevel windows than this function; setting the default size will still allow users to shrink the window. Setting the size request will force them to leave the window at least as large as the size request. When dealing with window sizes, gtk_window_set_geometry_hints() can be a useful function as well.

    Note the inherent danger of setting any fixed size - themes, translations into other languages, different fonts, and user action can all change the appropriate size for a given widget. So, it’s basically impossible to hardcode a size that will always be correct.

    The size request of a widget is the smallest size a widget can accept while still functioning well and drawing itself correctly. However in some strange cases a widget may be allocated less than its requested size, and in many cases a widget may be allocated more space than it requested.

    If the size request in a given direction is -1 (unset), then the “natural” size request of the widget will be used instead.

    The size request set here does not include any margin from the GtkWidget properties margin-left, margin-right, margin-top, and margin-bottom, but it does include pretty much all other padding or border properties set by any subclass of GtkWidget.

    Declaration

    Swift

    @inlinable
    func setSizeRequest(width: Int, height: Int)
  • set(state:) Extension method

    This function is for use in widget implementations. Sets the state of a widget (insensitive, prelighted, etc.) Usually you should set the state using wrapper functions such as gtk_widget_set_sensitive().

    set_state is deprecated: Use gtk_widget_set_state_flags() instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func set(state: GtkStateType)
  • setState(flags:clear:) Extension method

    This function is for use in widget implementations. Turns on flag values in the current widget state (insensitive, prelighted, etc.).

    This function accepts the values GTK_STATE_FLAG_DIR_LTR and GTK_STATE_FLAG_DIR_RTL but ignores them. If you want to set the widget’s direction, use gtk_widget_set_direction().

    It is worth mentioning that any other state than GTK_STATE_FLAG_INSENSITIVE, will be propagated down to all non-internal children if widget is a GtkContainer, while GTK_STATE_FLAG_INSENSITIVE itself will be propagated down to all GtkContainer children by different means than turning on the state flag down the hierarchy, both gtk_widget_get_state_flags() and gtk_widget_is_sensitive() will make use of these.

    Declaration

    Swift

    @inlinable
    func setState(flags: StateFlags, clear: Bool)
  • set(style:) Extension method

    Used to set the GtkStyle for a widget (widget->style). Since GTK 3, this function does nothing, the passed in style is ignored.

    set_style is deprecated: Use #GtkStyleContext instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func set(style: StyleRef? = nil)
  • set(style:) Extension method

    Used to set the GtkStyle for a widget (widget->style). Since GTK 3, this function does nothing, the passed in style is ignored.

    set_style is deprecated: Use #GtkStyleContext instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func set<StyleT>(style: StyleT?) where StyleT : StyleProtocol
  • set(supportMultidevice:) Extension method

    Enables or disables multiple pointer awareness. If this setting is true, widget will start receiving multiple, per device enter/leave events. Note that if custom GdkWindows are created in GtkWidget::realize, gdk_window_set_support_multidevice() will have to be called manually on them.

    Declaration

    Swift

    @inlinable
    func set(supportMultidevice: Bool)
  • setTooltip(markup:) Extension method

    Sets markup as the contents of the tooltip, which is marked up with the Pango text markup language.

    This function will take care of setting GtkWidget:has-tooltip to true and of the default handler for the GtkWidget::query-tooltip signal.

    See also the GtkWidget:tooltip-markup property and gtk_tooltip_set_markup().

    Declaration

    Swift

    @inlinable
    func setTooltip(markup: UnsafePointer<gchar>? = nil)
  • setTooltip(text:) Extension method

    Sets text as the contents of the tooltip. This function will take care of setting GtkWidget:has-tooltip to true and of the default handler for the GtkWidget::query-tooltip signal.

    See also the GtkWidget:tooltip-text property and gtk_tooltip_set_text().

    Declaration

    Swift

    @inlinable
    func setTooltip(text: UnsafePointer<gchar>? = nil)
  • Replaces the default window used for displaying tooltips with custom_window. GTK+ will take care of showing and hiding custom_window at the right moment, to behave likewise as the default tooltip window. If custom_window is nil, the default tooltip window will be used.

    Declaration

    Swift

    @inlinable
    func setTooltipWindow(customWindow: WindowRef? = nil)
  • Replaces the default window used for displaying tooltips with custom_window. GTK+ will take care of showing and hiding custom_window at the right moment, to behave likewise as the default tooltip window. If custom_window is nil, the default tooltip window will be used.

    Declaration

    Swift

    @inlinable
    func setTooltipWindow<WindowT>(customWindow: WindowT?) where WindowT : WindowProtocol
  • setValign(align:) Extension method

    Sets the vertical alignment of widget. See the GtkWidget:valign property.

    Declaration

    Swift

    @inlinable
    func setValign(align: GtkAlign)
  • setVexpand(expand:) Extension method

    Sets whether the widget would like any available extra vertical space.

    See gtk_widget_set_hexpand() for more detail.

    Declaration

    Swift

    @inlinable
    func setVexpand(expand: Bool)
  • setVexpand(set:) Extension method

    Sets whether the vexpand flag (see gtk_widget_get_vexpand()) will be used.

    See gtk_widget_set_hexpand_set() for more detail.

    Declaration

    Swift

    @inlinable
    func setVexpand(set: Bool)
  • set(visible:) Extension method

    Sets the visibility state of widget. Note that setting this to true doesn’t mean the widget is actually viewable, see gtk_widget_get_visible().

    This function simply calls gtk_widget_show() or gtk_widget_hide() but is nicer to use when the visibility of the widget depends on some condition.

    Declaration

    Swift

    @inlinable
    func set(visible: Bool)
  • set(visual:) Extension method

    Sets the visual that should be used for by widget and its children for creating GdkWindows. The visual must be on the same GdkScreen as returned by gtk_widget_get_screen(), so handling the GtkWidget::screen-changed signal is necessary.

    Setting a new visual will not cause widget to recreate its windows, so you should call this function before widget is realized.

    Declaration

    Swift

    @inlinable
    func set(visual: Gdk.VisualRef? = nil)
  • set(visual:) Extension method

    Sets the visual that should be used for by widget and its children for creating GdkWindows. The visual must be on the same GdkScreen as returned by gtk_widget_get_screen(), so handling the GtkWidget::screen-changed signal is necessary.

    Setting a new visual will not cause widget to recreate its windows, so you should call this function before widget is realized.

    Declaration

    Swift

    @inlinable
    func set<VisualT>(visual: VisualT?) where VisualT : VisualProtocol
  • set(window:) Extension method

    Sets a widget’s window. This function should only be used in a widget’s GtkWidget::realize implementation. The window passed is usually either new window created with gdk_window_new(), or the window of its parent widget as returned by gtk_widget_get_parent_window().

    Widgets must indicate whether they will create their own GdkWindow by calling gtk_widget_set_has_window(). This is usually done in the widget’s init() function.

    Note that this function does not add any reference to window.

    Declaration

    Swift

    @inlinable
    func set<WindowT>(window: WindowT) where WindowT : WindowProtocol
  • shapeCombine(region:) Extension method

    Sets a shape for this widget’s GDK window. This allows for transparent windows etc., see gdk_window_shape_combine_region() for more information.

    Declaration

    Swift

    @inlinable
    func shapeCombine(region: Cairo.RegionRef? = nil)
  • shapeCombine(region:) Extension method

    Sets a shape for this widget’s GDK window. This allows for transparent windows etc., see gdk_window_shape_combine_region() for more information.

    Declaration

    Swift

    @inlinable
    func shapeCombine<RegionT>(region: RegionT?) where RegionT : RegionProtocol
  • show() Extension method

    Flags a widget to be displayed. Any widget that isn’t shown will not appear on the screen. If you want to show all the widgets in a container, it’s easier to call gtk_widget_show_all() on the container, instead of individually showing the widgets.

    Remember that you have to show the containers containing a widget, in addition to the widget itself, before it will appear onscreen.

    When a toplevel container is shown, it is immediately realized and mapped; other shown widgets are realized and mapped when their toplevel container is realized and mapped.

    Declaration

    Swift

    @inlinable
    func show()
  • showAll() Extension method

    Recursively shows a widget, and any child widgets (if the widget is a container).

    Declaration

    Swift

    @inlinable
    func showAll()
  • showNow() Extension method

    Shows a widget. If the widget is an unmapped toplevel widget (i.e. a GtkWindow that has not yet been shown), enter the main loop and wait for the window to actually be mapped. Be careful; because the main loop is running, anything can happen during this function.

    Declaration

    Swift

    @inlinable
    func showNow()
  • sizeAllocate(allocation:) Extension method

    This function is only used by GtkContainer subclasses, to assign a size and position to their child widgets.

    In this function, the allocation may be adjusted. It will be forced to a 1x1 minimum size, and the adjust_size_allocation virtual method on the child will be used to adjust the allocation. Standard adjustments include removing the widget’s margins, and applying the widget’s GtkWidget:halign and GtkWidget:valign properties.

    For baseline support in containers you need to use gtk_widget_size_allocate_with_baseline() instead.

    Declaration

    Swift

    @inlinable
    func sizeAllocate(allocation: UnsafeMutablePointer<GtkAllocation>!)
  • This function is only used by GtkContainer subclasses, to assign a size, position and (optionally) baseline to their child widgets.

    In this function, the allocation and baseline may be adjusted. It will be forced to a 1x1 minimum size, and the adjust_size_allocation virtual and adjust_baseline_allocation methods on the child will be used to adjust the allocation and baseline. Standard adjustments include removing the widget’s margins, and applying the widget’s GtkWidget:halign and GtkWidget:valign properties.

    If the child widget does not have a valign of GTK_ALIGN_BASELINE the baseline argument is ignored and -1 is used instead.

    Declaration

    Swift

    @inlinable
    func sizeAllocateWithBaseline(allocation: UnsafeMutablePointer<GtkAllocation>!, baseline: Int)
  • sizeRequest(requisition:) Extension method

    This function is typically used when implementing a GtkContainer subclass. Obtains the preferred size of a widget. The container uses this information to arrange its child widgets and decide what size allocations to give them with gtk_widget_size_allocate().

    You can also call this function from an application, with some caveats. Most notably, getting a size request requires the widget to be associated with a screen, because font information may be needed. Multihead-aware applications should keep this in mind.

    Also remember that the size request is not necessarily the size a widget will actually be allocated.

    size_request is deprecated: Use gtk_widget_get_preferred_size() instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func sizeRequest<RequisitionT>(requisition: RequisitionT) where RequisitionT : RequisitionProtocol
  • styleAttach() Extension method

    This function attaches the widget’s GtkStyle to the widget’s GdkWindow. It is a replacement for

    widget->style = gtk_style_attach (widget->style, widget->window);
    

    and should only ever be called in a derived widget’s “realize” implementation which does not chain up to its parent class’ “realize” implementation, because one of the parent classes (finally GtkWidget) would attach the style itself.

    style_attach is deprecated: This step is unnecessary with #GtkStyleContext.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func styleAttach()
  • Gets the value of a style property of widget.

    Declaration

    Swift

    @inlinable
    func styleGetProperty<ValueT>(propertyName: UnsafePointer<gchar>!, value: ValueT) where ValueT : ValueProtocol
  • Non-vararg variant of gtk_widget_style_get(). Used primarily by language bindings.

    Declaration

    Swift

    @inlinable
    func styleGetValist(firstPropertyName: UnsafePointer<gchar>!, varArgs: CVaListPointer)
  • thawChildNotify() Extension method

    Reverts the effect of a previous call to gtk_widget_freeze_child_notify(). This causes all queued GtkWidget::child-notify signals on widget to be emitted.

    Declaration

    Swift

    @inlinable
    func thawChildNotify()
  • Translate coordinates relative to src_widget’s allocation to coordinates relative to dest_widget’s allocations. In order to perform this operation, both widgets must be realized, and must share a common toplevel.

    Declaration

    Swift

    @inlinable
    func translateCoordinates<WidgetT>(destWidget: WidgetT, srcX: Int, srcY: Int, destX: UnsafeMutablePointer<gint>! = nil, destY: UnsafeMutablePointer<gint>! = nil) -> Bool where WidgetT : WidgetProtocol
  • triggerTooltipQuery() Extension method

    Triggers a tooltip query on the display where the toplevel of widget is located. See gtk_tooltip_trigger_tooltip_query() for more information.

    Declaration

    Swift

    @inlinable
    func triggerTooltipQuery()
  • unmap() Extension method

    This function is only for use in widget implementations. Causes a widget to be unmapped if it’s currently mapped.

    Declaration

    Swift

    @inlinable
    func unmap()
  • unparent() Extension method

    This function is only for use in widget implementations. Should be called by implementations of the remove method on GtkContainer, to dissociate a child from the container.

    Declaration

    Swift

    @inlinable
    func unparent()
  • unrealize() Extension method

    This function is only useful in widget implementations. Causes a widget to be unrealized (frees all GDK resources associated with the widget, such as widget->window).

    Declaration

    Swift

    @inlinable
    func unrealize()
  • unregister(window:) Extension method

    Unregisters a GdkWindow from the widget that was previously set up with gtk_widget_register_window(). You need to call this when the window is no longer used by the widget, such as when you destroy it.

    Declaration

    Swift

    @inlinable
    func unregister<WindowT>(window: WindowT) where WindowT : WindowProtocol
  • unsetState(flags:) Extension method

    This function is for use in widget implementations. Turns off flag values for the current widget state (insensitive, prelighted, etc.). See gtk_widget_set_state_flags().

    Declaration

    Swift

    @inlinable
    func unsetState(flags: StateFlags)
  • Transforms the given cairo context cr that from widget-relative coordinates to window-relative coordinates. If the widget’s window is not an ancestor of window, no modification will be applied.

    This is the inverse to the transformation GTK applies when preparing an expose event to be emitted with the GtkWidget::draw signal. It is intended to help porting multiwindow widgets from GTK+ 2 to the rendering architecture of GTK+ 3.

    Declaration

    Swift

    @inlinable
    func cairoTransformToWindow<ContextT, WindowT>(cr: ContextT, window: WindowT) where ContextT : ContextProtocol, WindowT : WindowProtocol
  • Adds a GTK+ grab on device, so all the events on device and its associated pointer or keyboard (if any) are delivered to widget. If the block_others parameter is true, any other devices will be unable to interact with widget during the grab.

    Declaration

    Swift

    @inlinable
    func deviceGrabAdd<DeviceT>(device: DeviceT, blockOthers: Bool) where DeviceT : DeviceProtocol
  • deviceGrabRemove(device:) Extension method

    Removes a device grab from the given widget.

    You have to pair calls to gtk_device_grab_add() and gtk_device_grab_remove().

    Declaration

    Swift

    @inlinable
    func deviceGrabRemove<DeviceT>(device: DeviceT) where DeviceT : DeviceProtocol
  • Changes the icon for a widget to a given widget. GTK+ will not destroy the icon, so if you don’t want it to persist, you should connect to the “drag-end” signal and destroy it yourself.

    Declaration

    Swift

    @inlinable
    func dragSetIconWidget<DragContextT>(context: DragContextT, hotX: Int, hotY: Int) where DragContextT : DragContextProtocol
  • Draws a text caret on cr at location. This is not a style function but merely a convenience function for drawing the standard cursor shape.

    draw_insertion_cursor is deprecated: Use gtk_render_insertion_cursor() instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func drawInsertionCursor<ContextT, RectangleT>(cr: ContextT, location: RectangleT, isPrimary: Bool, direction: GtkTextDirection, drawArrow: Bool) where ContextT : ContextProtocol, RectangleT : RectangleProtocol
  • Draws an arrow in the given rectangle on cr using the given parameters. arrow_type determines the direction of the arrow.

    paint_arrow is deprecated: Use gtk_render_arrow() instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func paintArrow<ContextT, StyleT>(style: StyleT, cr: ContextT, stateType: GtkStateType, shadowType: GtkShadowType, detail: UnsafePointer<gchar>? = nil, arrowType: GtkArrowType, fill: Bool, x: Int, y: Int, width: Int, height: Int) where ContextT : ContextProtocol, StyleT : StyleProtocol
  • Draws a box on cr with the given parameters.

    paint_box is deprecated: Use gtk_render_frame() and gtk_render_background() instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func paintBox<ContextT, StyleT>(style: StyleT, cr: ContextT, stateType: GtkStateType, shadowType: GtkShadowType, detail: UnsafePointer<gchar>? = nil, x: Int, y: Int, width: Int, height: Int) where ContextT : ContextProtocol, StyleT : StyleProtocol
  • Draws a box in cr using the given style and state and shadow type, leaving a gap in one side.

    paint_box_gap is deprecated: Use gtk_render_frame_gap() instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func paintBoxGap<ContextT, StyleT>(style: StyleT, cr: ContextT, stateType: GtkStateType, shadowType: GtkShadowType, detail: UnsafePointer<gchar>? = nil, x: Int, y: Int, width: Int, height: Int, gapSide: GtkPositionType, gapX: Int, gapWidth: Int) where ContextT : ContextProtocol, StyleT : StyleProtocol
  • Draws a check button indicator in the given rectangle on cr with the given parameters.

    paint_check is deprecated: Use gtk_render_check() instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func paintCheck<ContextT, StyleT>(style: StyleT, cr: ContextT, stateType: GtkStateType, shadowType: GtkShadowType, detail: UnsafePointer<gchar>? = nil, x: Int, y: Int, width: Int, height: Int) where ContextT : ContextProtocol, StyleT : StyleProtocol
  • Draws a diamond in the given rectangle on window using the given parameters.

    paint_diamond is deprecated: Use cairo instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func paintDiamond<ContextT, StyleT>(style: StyleT, cr: ContextT, stateType: GtkStateType, shadowType: GtkShadowType, detail: UnsafePointer<gchar>? = nil, x: Int, y: Int, width: Int, height: Int) where ContextT : ContextProtocol, StyleT : StyleProtocol
  • Draws an expander as used in GtkTreeView. x and y specify the center the expander. The size of the expander is determined by the “expander-size” style property of widget. (If widget is not specified or doesn’t have an “expander-size” property, an unspecified default size will be used, since the caller doesn’t have sufficient information to position the expander, this is likely not useful.) The expander is expander_size pixels tall in the collapsed position and expander_size pixels wide in the expanded position.

    paint_expander is deprecated: Use gtk_render_expander() instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func paintExpander<ContextT, StyleT>(style: StyleT, cr: ContextT, stateType: GtkStateType, detail: UnsafePointer<gchar>? = nil, x: Int, y: Int, expanderStyle: GtkExpanderStyle) where ContextT : ContextProtocol, StyleT : StyleProtocol
  • Draws an extension, i.e. a notebook tab.

    paint_extension is deprecated: Use gtk_render_extension() instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func paintExtension<ContextT, StyleT>(style: StyleT, cr: ContextT, stateType: GtkStateType, shadowType: GtkShadowType, detail: UnsafePointer<gchar>? = nil, x: Int, y: Int, width: Int, height: Int, gapSide: GtkPositionType) where ContextT : ContextProtocol, StyleT : StyleProtocol
  • Draws a flat box on cr with the given parameters.

    paint_flat_box is deprecated: Use gtk_render_frame() and gtk_render_background() instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func paintFlatBox<ContextT, StyleT>(style: StyleT, cr: ContextT, stateType: GtkStateType, shadowType: GtkShadowType, detail: UnsafePointer<gchar>? = nil, x: Int, y: Int, width: Int, height: Int) where ContextT : ContextProtocol, StyleT : StyleProtocol
  • Draws a focus indicator around the given rectangle on cr using the given style.

    paint_focus is deprecated: Use gtk_render_focus() instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func paintFocus<ContextT, StyleT>(style: StyleT, cr: ContextT, stateType: GtkStateType, detail: UnsafePointer<gchar>? = nil, x: Int, y: Int, width: Int, height: Int) where ContextT : ContextProtocol, StyleT : StyleProtocol
  • Draws a handle as used in GtkHandleBox and GtkPaned.

    paint_handle is deprecated: Use gtk_render_handle() instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func paintHandle<ContextT, StyleT>(style: StyleT, cr: ContextT, stateType: GtkStateType, shadowType: GtkShadowType, detail: UnsafePointer<gchar>? = nil, x: Int, y: Int, width: Int, height: Int, orientation: GtkOrientation) where ContextT : ContextProtocol, StyleT : StyleProtocol
  • Draws a horizontal line from (x1, y) to (x2, y) in cr using the given style and state.

    paint_hline is deprecated: Use gtk_render_line() instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func paintHline<ContextT, StyleT>(style: StyleT, cr: ContextT, stateType: GtkStateType, detail: UnsafePointer<gchar>? = nil, x1: Int, x2: Int, y: Int) where ContextT : ContextProtocol, StyleT : StyleProtocol
  • Draws a layout on cr using the given parameters.

    paint_layout is deprecated: Use gtk_render_layout() instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func paintLayout<ContextT, LayoutT, StyleT>(style: StyleT, cr: ContextT, stateType: GtkStateType, useText: Bool, detail: UnsafePointer<gchar>? = nil, x: Int, y: Int, layout: LayoutT) where ContextT : ContextProtocol, LayoutT : LayoutProtocol, StyleT : StyleProtocol
  • Draws a radio button indicator in the given rectangle on cr with the given parameters.

    paint_option is deprecated: Use gtk_render_option() instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func paintOption<ContextT, StyleT>(style: StyleT, cr: ContextT, stateType: GtkStateType, shadowType: GtkShadowType, detail: UnsafePointer<gchar>? = nil, x: Int, y: Int, width: Int, height: Int) where ContextT : ContextProtocol, StyleT : StyleProtocol
  • Draws a resize grip in the given rectangle on cr using the given parameters.

    paint_resize_grip is deprecated: Use gtk_render_handle() instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func paintResizeGrip<ContextT, StyleT>(style: StyleT, cr: ContextT, stateType: GtkStateType, detail: UnsafePointer<gchar>? = nil, edge: GdkWindowEdge, x: Int, y: Int, width: Int, height: Int) where ContextT : ContextProtocol, StyleT : StyleProtocol
  • Draws a shadow around the given rectangle in cr using the given style and state and shadow type.

    paint_shadow is deprecated: Use gtk_render_frame() instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func paintShadow<ContextT, StyleT>(style: StyleT, cr: ContextT, stateType: GtkStateType, shadowType: GtkShadowType, detail: UnsafePointer<gchar>? = nil, x: Int, y: Int, width: Int, height: Int) where ContextT : ContextProtocol, StyleT : StyleProtocol
  • Draws a shadow around the given rectangle in cr using the given style and state and shadow type, leaving a gap in one side.

    paint_shadow_gap is deprecated: Use gtk_render_frame_gap() instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func paintShadowGap<ContextT, StyleT>(style: StyleT, cr: ContextT, stateType: GtkStateType, shadowType: GtkShadowType, detail: UnsafePointer<gchar>? = nil, x: Int, y: Int, width: Int, height: Int, gapSide: GtkPositionType, gapX: Int, gapWidth: Int) where ContextT : ContextProtocol, StyleT : StyleProtocol
  • Draws a slider in the given rectangle on cr using the given style and orientation.

    paint_slider is deprecated: Use gtk_render_slider() instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func paintSlider<ContextT, StyleT>(style: StyleT, cr: ContextT, stateType: GtkStateType, shadowType: GtkShadowType, detail: UnsafePointer<gchar>? = nil, x: Int, y: Int, width: Int, height: Int, orientation: GtkOrientation) where ContextT : ContextProtocol, StyleT : StyleProtocol
  • Draws a spinner on window using the given parameters.

    paint_spinner is deprecated: Use gtk_render_icon() and the #GtkStyleContext you are drawing instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func paintSpinner<ContextT, StyleT>(style: StyleT, cr: ContextT, stateType: GtkStateType, detail: UnsafePointer<gchar>? = nil, step: Int, x: Int, y: Int, width: Int, height: Int) where ContextT : ContextProtocol, StyleT : StyleProtocol
  • Draws an option menu tab (i.e. the up and down pointing arrows) in the given rectangle on cr using the given parameters.

    paint_tab is deprecated: Use cairo instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func paintTab<ContextT, StyleT>(style: StyleT, cr: ContextT, stateType: GtkStateType, shadowType: GtkShadowType, detail: UnsafePointer<gchar>? = nil, x: Int, y: Int, width: Int, height: Int) where ContextT : ContextProtocol, StyleT : StyleProtocol
  • Draws a vertical line from (x, y1_) to (x, y2_) in cr using the given style and state.

    paint_vline is deprecated: Use gtk_render_line() instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func paintVline<ContextT, StyleT>(style: StyleT, cr: ContextT, stateType: GtkStateType, detail: UnsafePointer<gchar>? = nil, y1: Int, y2: Int, x: Int) where ContextT : ContextProtocol, StyleT : StyleProtocol
  • propagate(event:) Extension method

    Sends an event to a widget, propagating the event to parent widgets if the event remains unhandled.

    Events received by GTK+ from GDK normally begin in gtk_main_do_event(). Depending on the type of event, existence of modal dialogs, grabs, etc., the event may be propagated; if so, this function is used.

    gtk_propagate_event() calls gtk_widget_event() on each widget it decides to send the event to. So gtk_widget_event() is the lowest-level function; it simply emits the GtkWidget::event and possibly an event-specific signal on a widget. gtk_propagate_event() is a bit higher-level, and gtk_main_do_event() is the highest level.

    All that said, you most likely don’t want to use any of these functions; synthesizing events is rarely needed. There are almost certainly better ways to achieve your goals. For example, use gdk_window_invalidate_rect() or gtk_widget_queue_draw() instead of making up expose events.

    Declaration

    Swift

    @inlinable
    func propagate<EventT>(event: EventT) where EventT : EventProtocol
  • rcGetStyle() Extension method

    Finds all matching RC styles for a given widget, composites them together, and then creates a GtkStyle representing the composite appearance. (GTK+ actually keeps a cache of previously created styles, so a new style may not be created.)

    rc_get_style is deprecated: Use #GtkStyleContext instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func rcGetStyle() -> StyleRef!
  • Appends a specified target to the list of supported targets for a given widget and selection.

    Declaration

    Swift

    @inlinable
    func selectionAddTarget(selection: GdkAtom, target: GdkAtom, info: Int)
  • Prepends a table of targets to the list of supported targets for a given widget and selection.

    Declaration

    Swift

    @inlinable
    func selectionAddTargets(selection: GdkAtom, targets: UnsafePointer<GtkTargetEntry>!, ntargets: Int)
  • Remove all targets registered for the given selection for the widget.

    Declaration

    Swift

    @inlinable
    func selectionClearTargets(selection: GdkAtom)
  • Requests the contents of a selection. When received, a “selection-received” signal will be generated.

    Declaration

    Swift

    @inlinable
    func selectionConvert(selection: GdkAtom, target: GdkAtom, time: guint32) -> Bool
  • Claims ownership of a given selection for a particular widget, or, if widget is nil, release ownership of the selection.

    Declaration

    Swift

    @inlinable
    func selectionOwnerSet(selection: GdkAtom, time: guint32) -> Bool
  • Claim ownership of a given selection for a particular widget, or, if widget is nil, release ownership of the selection.

    Declaration

    Swift

    @inlinable
    func selectionOwnerSetFor<DisplayT>(display: DisplayT, selection: GdkAtom, time: guint32) -> Bool where DisplayT : DisplayProtocol
  • selectionRemoveAll() Extension method

    Removes all handlers and unsets ownership of all selections for a widget. Called when widget is being destroyed. This function will not generally be called by applications.

    Declaration

    Swift

    @inlinable
    func selectionRemoveAll()
  • testFindLabel(labelPattern:) Extension method

    This function will search widget and all its descendants for a GtkLabel widget with a text string matching label_pattern. The label_pattern may contain asterisks “*” and question marks “?” as placeholders, g_pattern_match() is used for the matching. Note that locales other than “C“ tend to alter (translate” label strings, so this function is genrally only useful in test programs with predetermined locales, see gtk_test_init() for more details.

    Declaration

    Swift

    @inlinable
    func testFindLabel(labelPattern: UnsafePointer<gchar>!) -> WidgetRef!
  • testFindSibling(widgetType:) Extension method

    This function will search siblings of base_widget and siblings of its ancestors for all widgets matching widget_type. Of the matching widgets, the one that is geometrically closest to base_widget will be returned. The general purpose of this function is to find the most likely “action” widget, relative to another labeling widget. Such as finding a button or text entry widget, given its corresponding label widget.

    Declaration

    Swift

    @inlinable
    func testFindSibling(widgetType: GType) -> WidgetRef!
  • This function will search the descendants of widget for a widget of type widget_type that has a label matching label_pattern next to it. This is most useful for automated GUI testing, e.g. to find the “OK” button in a dialog and synthesize clicks on it. However see gtk_test_find_label(), gtk_test_find_sibling() and gtk_test_widget_click() for possible caveats involving the search of such widgets and synthesizing widget events.

    Declaration

    Swift

    @inlinable
    func testFindWidget(labelPattern: UnsafePointer<gchar>!, widgetType: GType) -> WidgetRef!
  • testSliderGetValue() Extension method

    Retrive the literal adjustment value for GtkRange based widgets and spin buttons. Note that the value returned by this function is anything between the lower and upper bounds of the adjustment belonging to widget, and is not a percentage as passed in to gtk_test_slider_set_perc().

    test_slider_get_value is deprecated: This testing infrastructure is phased out in favor of reftests.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func testSliderGetValue() -> CDouble
  • This function will adjust the slider position of all GtkRange based widgets, such as scrollbars or scales, it’ll also adjust spin buttons. The adjustment value of these widgets is set to a value between the lower and upper limits, according to the percentage argument.

    test_slider_set_perc is deprecated: This testing infrastructure is phased out in favor of reftests.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func testSliderSetPerc(percentage: CDouble)
  • testTextGet() Extension method

    Retrive the text string of widget if it is a GtkLabel, GtkEditable (entry and text widgets) or GtkTextView.

    test_text_get is deprecated: This testing infrastructure is phased out in favor of reftests.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func testTextGet() -> String!
  • testTextSet(string:) Extension method

    Set the text string of widget to string if it is a GtkLabel, GtkEditable (entry and text widgets) or GtkTextView.

    test_text_set is deprecated: This testing infrastructure is phased out in favor of reftests.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func testTextSet(string: UnsafePointer<gchar>!)
  • This function will generate a button click (button press and button release event) in the middle of the first GdkWindow found that belongs to widget. For windowless widgets like GtkButton (which returns false from gtk_widget_get_has_window()), this will often be an input-only event window. For other widgets, this is usually widget->window. Certain caveats should be considered when using this function, in particular because the mouse pointer is warped to the button click location, see gdk_test_simulate_button() for details.

    test_widget_click is deprecated: This testing infrastructure is phased out in favor of reftests.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func testWidgetClick(button: Int, modifiers: Gdk.ModifierType) -> Bool
  • This function will generate keyboard press and release events in the middle of the first GdkWindow found that belongs to widget. For windowless widgets like GtkButton (which returns false from gtk_widget_get_has_window()), this will often be an input-only event window. For other widgets, this is usually widget->window. Certain caveats should be considered when using this function, in particular because the mouse pointer is warped to the key press location, see gdk_test_simulate_key() for details.

    Declaration

    Swift

    @inlinable
    func testWidgetSendKey(keyval: Int, modifiers: Gdk.ModifierType) -> Bool
  • testWidgetWaitForDraw() Extension method

    Enters the main loop and waits for widget to be “drawn”. In this context that means it waits for the frame clock of widget to have run a full styling, layout and drawing cycle.

    This function is intended to be used for syncing with actions that depend on widget relayouting or on interaction with the display server.

    Declaration

    Swift

    @inlinable
    func testWidgetWaitForDraw()
  • accessible Extension method

    Returns the accessible object that describes the widget to an assistive technology.

    If accessibility support is not available, this AtkObject instance may be a no-op. Likewise, if no class-specific AtkObject implementation is available for the widget instance in question, it will inherit an AtkObject implementation from the first ancestor class for which such an implementation is defined.

    The documentation of the ATK library contains more information about accessible objects and their uses.

    Declaration

    Swift

    @inlinable
    var accessible: Atk.ObjectRef! { get }
  • allocatedBaseline Extension method

    Returns the baseline that has currently been allocated to widget. This function is intended to be used when implementing handlers for the GtkWidget::draw function, and when allocating child widgets in GtkWidget::size_allocate.

    Declaration

    Swift

    @inlinable
    var allocatedBaseline: Int { get }
  • allocatedHeight Extension method

    Returns the height that has currently been allocated to widget. This function is intended to be used when implementing handlers for the GtkWidget::draw function.

    Declaration

    Swift

    @inlinable
    var allocatedHeight: Int { get }
  • allocatedWidth Extension method

    Returns the width that has currently been allocated to widget. This function is intended to be used when implementing handlers for the GtkWidget::draw function.

    Declaration

    Swift

    @inlinable
    var allocatedWidth: Int { get }
  • appPaintable Extension method

    Determines whether the application intends to draw on the widget in an GtkWidget::draw handler.

    See gtk_widget_set_app_paintable()

    Declaration

    Swift

    @inlinable
    var appPaintable: Bool { get nonmutating set }
  • canDefault Extension method

    Determines whether widget can be a default widget. See gtk_widget_set_can_default().

    Declaration

    Swift

    @inlinable
    var canDefault: Bool { get nonmutating set }
  • canFocus Extension method

    Determines whether widget can own the input focus. See gtk_widget_set_can_focus().

    Declaration

    Swift

    @inlinable
    var canFocus: Bool { get nonmutating set }
  • childVisible Extension method

    Gets the value set with gtk_widget_set_child_visible(). If you feel a need to use this function, your code probably needs reorganization.

    This function is only useful for container implementations and never should be called by an application.

    Declaration

    Swift

    @inlinable
    var childVisible: Bool { get nonmutating set }
  • compositeName Extension method

    Obtains the composite name of a widget.

    get_composite_name is deprecated: Use gtk_widget_class_set_template(), or don’t use this API at all.

    Declaration

    Swift

    @inlinable
    var compositeName: String! { get nonmutating set }
  • direction Extension method

    Gets the reading direction for a particular widget. See gtk_widget_set_direction().

    Declaration

    Swift

    @inlinable
    var direction: GtkTextDirection { get nonmutating set }
  • display Extension method

    Get the GdkDisplay for the toplevel window associated with this widget. This function can only be called after the widget has been added to a widget hierarchy with a GtkWindow at the top.

    In general, you should only create display specific resources when a widget has been realized, and you should free those resources when the widget is unrealized.

    Declaration

    Swift

    @inlinable
    var display: Gdk.DisplayRef! { get }
  • doubleBuffered Extension method

    Determines whether the widget is double buffered.

    See gtk_widget_set_double_buffered()

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    var doubleBuffered: Bool { get nonmutating set }
  • events Extension method

    Undocumented

    Declaration

    Swift

    @inlinable
    var events: Int { get nonmutating set }
  • focusOnClick Extension method

    Returns whether the widget should grab focus when it is clicked with the mouse. See gtk_widget_set_focus_on_click().

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    var focusOnClick: Bool { get nonmutating set }
  • fontMap Extension method

    Gets the font map that has been set with gtk_widget_set_font_map().

    Declaration

    Swift

    @inlinable
    var fontMap: Pango.FontMapRef! { get nonmutating set }
  • fontOptions Extension method

    Returns the cairo_font_options_t used for Pango rendering. When not set, the defaults font options for the GdkScreen will be used.

    Declaration

    Swift

    @inlinable
    var fontOptions: Cairo.FontOptionsRef! { get nonmutating set }
  • frameClock Extension method

    Obtains the frame clock for a widget. The frame clock is a global “ticker” that can be used to drive animations and repaints. The most common reason to get the frame clock is to call gdk_frame_clock_get_frame_time(), in order to get a time to use for animating. For example you might record the start of the animation with an initial value from gdk_frame_clock_get_frame_time(), and then update the animation by calling gdk_frame_clock_get_frame_time() again during each repaint.

    gdk_frame_clock_request_phase() will result in a new frame on the clock, but won’t necessarily repaint any widgets. To repaint a widget, you have to use gtk_widget_queue_draw() which invalidates the widget (thus scheduling it to receive a draw on the next frame). gtk_widget_queue_draw() will also end up requesting a frame on the appropriate frame clock.

    A widget’s frame clock will not change while the widget is mapped. Reparenting a widget (which implies a temporary unmap) can change the widget’s frame clock.

    Unrealized widgets do not have a frame clock.

    Declaration

    Swift

    @inlinable
    var frameClock: Gdk.FrameClockRef! { get }
  • halign Extension method

    How to distribute horizontal space if widget gets extra space, see GtkAlign

    Declaration

    Swift

    @inlinable
    var halign: GtkAlign { get nonmutating set }
  • hasTooltip Extension method

    Returns the current value of the has-tooltip property. See GtkWidget:has-tooltip for more information.

    Declaration

    Swift

    @inlinable
    var hasTooltip: Bool { get nonmutating set }
  • hasWindow Extension method

    Determines whether widget has a GdkWindow of its own. See gtk_widget_set_has_window().

    Declaration

    Swift

    @inlinable
    var hasWindow: Bool { get nonmutating set }
  • hexpand Extension method

    Whether to expand horizontally. See gtk_widget_set_hexpand().

    Declaration

    Swift

    @inlinable
    var hexpand: Bool { get nonmutating set }
  • hexpandSet Extension method

    Gets whether gtk_widget_set_hexpand() has been used to explicitly set the expand flag on this widget.

    If hexpand is set, then it overrides any computed expand value based on child widgets. If hexpand is not set, then the expand value depends on whether any children of the widget would like to expand.

    There are few reasons to use this function, but it’s here for completeness and consistency.

    Declaration

    Swift

    @inlinable
    var hexpandSet: Bool { get nonmutating set }
  • isComposited Extension method

    Whether widget can rely on having its alpha channel drawn correctly. On X11 this function returns whether a compositing manager is running for widget’s screen.

    Please note that the semantics of this call will change in the future if used on a widget that has a composited window in its hierarchy (as set by gdk_window_set_composited()).

    is_composited is deprecated: Use gdk_screen_is_composited() instead.

    Declaration

    Swift

    @inlinable
    var isComposited: Bool { get }
  • isDrawable Extension method

    Determines whether widget can be drawn to. A widget can be drawn to if it is mapped and visible.

    Declaration

    Swift

    @inlinable
    var isDrawable: Bool { get }
  • isFocus Extension method

    Determines if the widget is the focus widget within its toplevel. (This does not mean that the GtkWidget:has-focus property is necessarily set; GtkWidget:has-focus will only be set if the toplevel widget additionally has the global input focus.)

    Declaration

    Swift

    @inlinable
    var isFocus: Bool { get }
  • isSensitive Extension method

    Returns the widget’s effective sensitivity, which means it is sensitive itself and also its parent widget is sensitive

    Declaration

    Swift

    @inlinable
    var isSensitive: Bool { get }
  • isToplevel Extension method

    Determines whether widget is a toplevel widget.

    Currently only GtkWindow and GtkInvisible (and out-of-process GtkPlugs) are toplevel widgets. Toplevel widgets have no parent widget.

    Declaration

    Swift

    @inlinable
    var isToplevel: Bool { get }
  • isVisible Extension method

    Determines whether the widget and all its parents are marked as visible.

    This function does not check if the widget is obscured in any way.

    See also gtk_widget_get_visible() and gtk_widget_set_visible()

    Declaration

    Swift

    @inlinable
    var isVisible: Bool { get }
  • mapped Extension method

    Whether the widget is mapped.

    Declaration

    Swift

    @inlinable
    var mapped: Bool { get nonmutating set }
  • marginBottom Extension method

    Gets the value of the GtkWidget:margin-bottom property.

    Declaration

    Swift

    @inlinable
    var marginBottom: Int { get nonmutating set }
  • marginEnd Extension method

    Gets the value of the GtkWidget:margin-end property.

    Declaration

    Swift

    @inlinable
    var marginEnd: Int { get nonmutating set }
  • marginLeft Extension method

    Gets the value of the GtkWidget:margin-left property.

    get_margin_left is deprecated: Use gtk_widget_get_margin_start() instead.

    Declaration

    Swift

    @inlinable
    var marginLeft: Int { get nonmutating set }
  • marginRight Extension method

    Gets the value of the GtkWidget:margin-right property.

    get_margin_right is deprecated: Use gtk_widget_get_margin_end() instead.

    Declaration

    Swift

    @inlinable
    var marginRight: Int { get nonmutating set }
  • marginStart Extension method

    Gets the value of the GtkWidget:margin-start property.

    Declaration

    Swift

    @inlinable
    var marginStart: Int { get nonmutating set }
  • marginTop Extension method

    Gets the value of the GtkWidget:margin-top property.

    Declaration

    Swift

    @inlinable
    var marginTop: Int { get nonmutating set }
  • modifierStyle Extension method

    Returns the current modifier style for the widget. (As set by gtk_widget_modify_style().) If no style has previously set, a new GtkRcStyle will be created with all values unset, and set as the modifier style for the widget. If you make changes to this rc style, you must call gtk_widget_modify_style(), passing in the returned rc style, to make sure that your changes take effect.

    Caution: passing the style back to gtk_widget_modify_style() will normally end up destroying it, because gtk_widget_modify_style() copies the passed-in style and sets the copy as the new modifier style, thus dropping any reference to the old modifier style. Add a reference to the modifier style if you want to keep it alive.

    get_modifier_style is deprecated: Use #GtkStyleContext with a custom #GtkStyleProvider instead

    Declaration

    Swift

    @inlinable
    var modifierStyle: RcStyleRef! { get }
  • name Extension method

    Undocumented

    Declaration

    Swift

    @inlinable
    var name: String! { get nonmutating set }
  • noShowAll Extension method

    Returns the current value of the GtkWidget:no-show-all property, which determines whether calls to gtk_widget_show_all() will affect this widget.

    Declaration

    Swift

    @inlinable
    var noShowAll: Bool { get nonmutating set }
  • opacity Extension method

    The requested opacity of the widget. See gtk_widget_set_opacity() for more details about window opacity.

    Before 3.8 this was only available in GtkWindow

    Declaration

    Swift

    @inlinable
    var opacity: CDouble { get nonmutating set }
  • pangoContext Extension method

    Gets a PangoContext with the appropriate font map, font description, and base direction for this widget. Unlike the context returned by gtk_widget_create_pango_context(), this context is owned by the widget (it can be used until the screen for the widget changes or the widget is removed from its toplevel), and will be updated to match any changes to the widget’s attributes. This can be tracked by using the GtkWidget::screen-changed signal on the widget.

    Declaration

    Swift

    @inlinable
    var pangoContext: Pango.ContextRef! { get }
  • parent Extension method

    Undocumented

    Declaration

    Swift

    @inlinable
    var parent: WidgetRef! { get nonmutating set }
  • parentWindow Extension method

    Gets widget’s parent window, or nil if it does not have one.

    Declaration

    Swift

    @inlinable
    var parentWindow: Gdk.WindowRef! { get nonmutating set }
  • path Extension method

    Returns the GtkWidgetPath representing widget, if the widget is not connected to a toplevel widget, a partial path will be created.

    Declaration

    Swift

    @inlinable
    var path: WidgetPathRef! { get }
  • realized Extension method

    Determines whether widget is realized.

    Declaration

    Swift

    @inlinable
    var realized: Bool { get nonmutating set }
  • receivesDefault Extension method

    Determines whether widget is always treated as the default widget within its toplevel when it has the focus, even if another widget is the default.

    See gtk_widget_set_receives_default().

    Declaration

    Swift

    @inlinable
    var receivesDefault: Bool { get nonmutating set }
  • requestMode Extension method

    Gets whether the widget prefers a height-for-width layout or a width-for-height layout.

    GtkBin widgets generally propagate the preference of their child, container widgets need to request something either in context of their children or in context of their allocation capabilities.

    Declaration

    Swift

    @inlinable
    var requestMode: GtkSizeRequestMode { get }
  • rootWindow Extension method

    Get the root window where this widget is located. This function can only be called after the widget has been added to a widget hierarchy with GtkWindow at the top.

    The root window is useful for such purposes as creating a popup GdkWindow associated with the window. In general, you should only create display specific resources when a widget has been realized, and you should free those resources when the widget is unrealized.

    get_root_window is deprecated: Use gdk_screen_get_root_window() instead

    Declaration

    Swift

    @inlinable
    var rootWindow: Gdk.WindowRef! { get }
  • scaleFactor Extension method

    Retrieves the internal scale factor that maps from window coordinates to the actual device pixels. On traditional systems this is 1, on high density outputs, it can be a higher value (typically 2).

    See gdk_window_get_scale_factor().

    Declaration

    Swift

    @inlinable
    var scaleFactor: Int { get }
  • screen Extension method

    Get the GdkScreen from the toplevel window associated with this widget. This function can only be called after the widget has been added to a widget hierarchy with a GtkWindow at the top.

    In general, you should only create screen specific resources when a widget has been realized, and you should free those resources when the widget is unrealized.

    Declaration

    Swift

    @inlinable
    var screen: Gdk.ScreenRef! { get }
  • sensitive Extension method

    Undocumented

    Declaration

    Swift

    @inlinable
    var sensitive: Bool { get nonmutating set }
  • settings Extension method

    Gets the settings object holding the settings used for this widget.

    Note that this function can only be called when the GtkWidget is attached to a toplevel, since the settings object is specific to a particular GdkScreen.

    Declaration

    Swift

    @inlinable
    var settings: SettingsRef! { get }
  • state Extension method

    Returns the widget’s state. See gtk_widget_set_state().

    get_state is deprecated: Use gtk_widget_get_state_flags() instead.

    Declaration

    Swift

    @inlinable
    var state: GtkStateType { get nonmutating set }
  • stateFlags Extension method

    Returns the widget state as a flag set. It is worth mentioning that the effective GTK_STATE_FLAG_INSENSITIVE state will be returned, that is, also based on parent insensitivity, even if widget itself is sensitive.

    Also note that if you are looking for a way to obtain the GtkStateFlags to pass to a GtkStyleContext method, you should look at gtk_style_context_get_state().

    Declaration

    Swift

    @inlinable
    var stateFlags: StateFlags { get }
  • style Extension method

    The style of the widget, which contains information about how it will look (colors, etc).

    style is deprecated: Use #GtkStyleContext instead

    Declaration

    Swift

    @inlinable
    var style: StyleRef! { get nonmutating set }
  • styleContext Extension method

    Returns the style context associated to widget. The returned object is guaranteed to be the same for the lifetime of widget.

    Declaration

    Swift

    @inlinable
    var styleContext: StyleContextRef! { get }
  • supportMultidevice Extension method

    Returns true if widget is multiple pointer aware. See gtk_widget_set_support_multidevice() for more information.

    Declaration

    Swift

    @inlinable
    var supportMultidevice: Bool { get nonmutating set }
  • tooltipMarkup Extension method

    Gets the contents of the tooltip for widget.

    Declaration

    Swift

    @inlinable
    var tooltipMarkup: String! { get nonmutating set }
  • tooltipText Extension method

    Gets the contents of the tooltip for widget.

    Declaration

    Swift

    @inlinable
    var tooltipText: String! { get nonmutating set }
  • tooltipWindow Extension method

    Returns the GtkWindow of the current tooltip. This can be the GtkWindow created by default, or the custom tooltip window set using gtk_widget_set_tooltip_window().

    Declaration

    Swift

    @inlinable
    var tooltipWindow: WindowRef! { get nonmutating set }
  • toplevel Extension method

    This function returns the topmost widget in the container hierarchy widget is a part of. If widget has no parent widgets, it will be returned as the topmost widget. No reference will be added to the returned widget; it should not be unreferenced.

    Note the difference in behavior vs. gtk_widget_get_ancestor(); gtk_widget_get_ancestor (widget, GTK_TYPE_WINDOW) would return nil if widget wasn’t inside a toplevel window, and if the window was inside a GtkWindow-derived widget which was in turn inside the toplevel GtkWindow. While the second case may seem unlikely, it actually happens when a GtkPlug is embedded inside a GtkSocket within the same application.

    To reliably find the toplevel GtkWindow, use gtk_widget_get_toplevel() and call GTK_IS_WINDOW() on the result. For instance, to get the title of a widget’s toplevel window, one might use: (C Language Example):

    static const char *
    get_widget_toplevel_title (GtkWidget *widget)
    {
      GtkWidget *toplevel = gtk_widget_get_toplevel (widget);
      if (GTK_IS_WINDOW (toplevel))
        {
          return gtk_window_get_title (GTK_WINDOW (toplevel));
        }
    
      return NULL;
    }
    

    Declaration

    Swift

    @inlinable
    var toplevel: WidgetRef! { get }
  • valign Extension method

    How to distribute vertical space if widget gets extra space, see GtkAlign

    Declaration

    Swift

    @inlinable
    var valign: GtkAlign { get nonmutating set }
  • valignWithBaseline Extension method

    Gets the value of the GtkWidget:valign property, including GTK_ALIGN_BASELINE.

    Declaration

    Swift

    @inlinable
    var valignWithBaseline: GtkAlign { get }
  • vexpand Extension method

    Whether to expand vertically. See gtk_widget_set_vexpand().

    Declaration

    Swift

    @inlinable
    var vexpand: Bool { get nonmutating set }
  • vexpandSet Extension method

    Gets whether gtk_widget_set_vexpand() has been used to explicitly set the expand flag on this widget.

    See gtk_widget_get_hexpand_set() for more detail.

    Declaration

    Swift

    @inlinable
    var vexpandSet: Bool { get nonmutating set }
  • visible Extension method

    Undocumented

    Declaration

    Swift

    @inlinable
    var visible: Bool { get nonmutating set }
  • visual Extension method

    Gets the visual that will be used to render widget.

    Declaration

    Swift

    @inlinable
    var visual: Gdk.VisualRef! { get nonmutating set }
  • window Extension method

    The widget’s window if it is realized, nil otherwise.

    Declaration

    Swift

    @inlinable
    var window: Gdk.WindowRef! { get nonmutating set }
  • parentInstance Extension method

    Undocumented

    Declaration

    Swift

    @inlinable
    var parentInstance: GInitiallyUnowned { get }
  • add(events:) Extension method

    Adds the events in the events OptionSet to the event mask for widget. See gtk_widget_set_events() and the input handling overview for details.

    Declaration

    Swift

    @inlinable
    func add(events: EventMask)
  • styleContextRef Extension method

    Return a reference to the style context

    Declaration

    Swift

    @inlinable
    var styleContextRef: StyleContextRef { get }