Interface

Adw-1AdwTabViewSignalSignatures

interface SignalSignatures {
    "close-page": (arg0: Adw.TabPage) => boolean | void;
    "create-window": () => Adw.TabView;
    destroy: () => void;
    "direction-changed": (arg0: Gtk.TextDirection) => void;
    hide: () => void;
    "indicator-activated": (arg0: Adw.TabPage) => void;
    "keynav-failed": (arg0: Gtk.DirectionType) => boolean | void;
    map: () => void;
    "mnemonic-activate": (arg0: boolean) => boolean | void;
    "move-focus": (arg0: Gtk.DirectionType) => void;
    notify: (arg0: GObject.ParamSpec) => void;
    "notify::accessible-role": (pspec: GObject.ParamSpec) => void;
    "notify::can-focus": (pspec: GObject.ParamSpec) => void;
    "notify::can-target": (pspec: GObject.ParamSpec) => void;
    "notify::css-classes": (pspec: GObject.ParamSpec) => void;
    "notify::css-name": (pspec: GObject.ParamSpec) => void;
    "notify::cursor": (pspec: GObject.ParamSpec) => void;
    "notify::default-icon": (pspec: GObject.ParamSpec) => void;
    "notify::focus-on-click": (pspec: GObject.ParamSpec) => void;
    "notify::focusable": (pspec: GObject.ParamSpec) => void;
    "notify::halign": (pspec: GObject.ParamSpec) => void;
    "notify::has-default": (pspec: GObject.ParamSpec) => void;
    "notify::has-focus": (pspec: GObject.ParamSpec) => void;
    "notify::has-tooltip": (pspec: GObject.ParamSpec) => void;
    "notify::height-request": (pspec: GObject.ParamSpec) => void;
    "notify::hexpand": (pspec: GObject.ParamSpec) => void;
    "notify::hexpand-set": (pspec: GObject.ParamSpec) => void;
    "notify::is-transferring-page": (pspec: GObject.ParamSpec) => void;
    "notify::layout-manager": (pspec: GObject.ParamSpec) => void;
    "notify::limit-events": (pspec: GObject.ParamSpec) => void;
    "notify::margin-bottom": (pspec: GObject.ParamSpec) => void;
    "notify::margin-end": (pspec: GObject.ParamSpec) => void;
    "notify::margin-start": (pspec: GObject.ParamSpec) => void;
    "notify::margin-top": (pspec: GObject.ParamSpec) => void;
    "notify::menu-model": (pspec: GObject.ParamSpec) => void;
    "notify::n-pages": (pspec: GObject.ParamSpec) => void;
    "notify::n-pinned-pages": (pspec: GObject.ParamSpec) => void;
    "notify::name": (pspec: GObject.ParamSpec) => void;
    "notify::opacity": (pspec: GObject.ParamSpec) => void;
    "notify::overflow": (pspec: GObject.ParamSpec) => void;
    "notify::pages": (pspec: GObject.ParamSpec) => void;
    "notify::parent": (pspec: GObject.ParamSpec) => void;
    "notify::receives-default": (pspec: GObject.ParamSpec) => void;
    "notify::root": (pspec: GObject.ParamSpec) => void;
    "notify::scale-factor": (pspec: GObject.ParamSpec) => void;
    "notify::selected-page": (pspec: GObject.ParamSpec) => void;
    "notify::sensitive": (pspec: GObject.ParamSpec) => void;
    "notify::shortcuts": (pspec: GObject.ParamSpec) => void;
    "notify::tooltip-markup": (pspec: GObject.ParamSpec) => void;
    "notify::tooltip-text": (pspec: GObject.ParamSpec) => void;
    "notify::valign": (pspec: GObject.ParamSpec) => void;
    "notify::vexpand": (pspec: GObject.ParamSpec) => void;
    "notify::vexpand-set": (pspec: GObject.ParamSpec) => void;
    "notify::visible": (pspec: GObject.ParamSpec) => void;
    "notify::width-request": (pspec: GObject.ParamSpec) => void;
    "page-attached": (arg0: Adw.TabPage, arg1: number) => void;
    "page-detached": (arg0: Adw.TabPage, arg1: number) => void;
    "page-reordered": (arg0: Adw.TabPage, arg1: number) => void;
    "query-tooltip": (
        arg0: number,
        arg1: number,
        arg2: boolean,
        arg3: Gtk.Tooltip,
    ) => boolean | void;
    realize: () => void;
    "setup-menu": (arg0: Adw.TabPage) => void;
    show: () => void;
    "state-flags-changed": (arg0: Gtk.StateFlags) => void;
    unmap: () => void;
    unrealize: () => void;
}

Hierarchy (View Summary)

Index

Properties

"close-page": (arg0: Adw.TabPage) => boolean | void

Emitted after TabView.close_page has been called for page.

The handler is expected to call TabView.close_page_finish to confirm or reject the closing.

The default handler will immediately confirm closing for non-pinned pages, or reject it for pinned pages, equivalent to the following example:

static gboolean
close_page_cb (AdwTabView *view,
AdwTabPage *page,
gpointer user_data)
{
adw_tab_view_close_page_finish (view, page, !adw_tab_page_get_pinned (page));

return GDK_EVENT_STOP;
}

The TabView.close_page_finish call doesn't have to happen inside the handler, so can be used to do asynchronous checks before confirming the closing.

A typical reason to connect to this signal is to show a confirmation dialog for closing a tab.

The signal handler should return Gdk.EVENT_STOP to stop propagation or Gdk.EVENT_PROPAGATE to invoke the default handler.

"create-window": () => Adw.TabView

Emitted when a tab should be transferred into a new window.

This can happen after a tab has been dropped on desktop.

The signal handler is expected to create a new window, position it as needed and return its Adw.TabView that the page will be transferred into.

"indicator-activated": (arg0: Adw.TabPage) => void

Emitted after the indicator icon on page has been activated.

See TabPage.indicator_icon and TabPage.indicator_activatable.

"notify::accessible-role": (pspec: GObject.ParamSpec) => void
"notify::can-focus": (pspec: GObject.ParamSpec) => void
"notify::can-target": (pspec: GObject.ParamSpec) => void
"notify::css-classes": (pspec: GObject.ParamSpec) => void
"notify::css-name": (pspec: GObject.ParamSpec) => void
"notify::cursor": (pspec: GObject.ParamSpec) => void
"notify::default-icon": (pspec: GObject.ParamSpec) => void
"notify::focus-on-click": (pspec: GObject.ParamSpec) => void
"notify::focusable": (pspec: GObject.ParamSpec) => void
"notify::halign": (pspec: GObject.ParamSpec) => void
"notify::has-default": (pspec: GObject.ParamSpec) => void
"notify::has-focus": (pspec: GObject.ParamSpec) => void
"notify::has-tooltip": (pspec: GObject.ParamSpec) => void
"notify::height-request": (pspec: GObject.ParamSpec) => void
"notify::hexpand": (pspec: GObject.ParamSpec) => void
"notify::hexpand-set": (pspec: GObject.ParamSpec) => void
"notify::is-transferring-page": (pspec: GObject.ParamSpec) => void
"notify::layout-manager": (pspec: GObject.ParamSpec) => void
"notify::limit-events": (pspec: GObject.ParamSpec) => void
"notify::margin-bottom": (pspec: GObject.ParamSpec) => void
"notify::margin-end": (pspec: GObject.ParamSpec) => void
"notify::margin-start": (pspec: GObject.ParamSpec) => void
"notify::margin-top": (pspec: GObject.ParamSpec) => void
"notify::menu-model": (pspec: GObject.ParamSpec) => void
"notify::n-pages": (pspec: GObject.ParamSpec) => void
"notify::n-pinned-pages": (pspec: GObject.ParamSpec) => void
"notify::name": (pspec: GObject.ParamSpec) => void
"notify::opacity": (pspec: GObject.ParamSpec) => void
"notify::overflow": (pspec: GObject.ParamSpec) => void
"notify::pages": (pspec: GObject.ParamSpec) => void
"notify::parent": (pspec: GObject.ParamSpec) => void
"notify::receives-default": (pspec: GObject.ParamSpec) => void
"notify::root": (pspec: GObject.ParamSpec) => void
"notify::scale-factor": (pspec: GObject.ParamSpec) => void
"notify::selected-page": (pspec: GObject.ParamSpec) => void
"notify::sensitive": (pspec: GObject.ParamSpec) => void
"notify::shortcuts": (pspec: GObject.ParamSpec) => void
"notify::tooltip-markup": (pspec: GObject.ParamSpec) => void
"notify::tooltip-text": (pspec: GObject.ParamSpec) => void
"notify::valign": (pspec: GObject.ParamSpec) => void
"notify::vexpand": (pspec: GObject.ParamSpec) => void
"notify::vexpand-set": (pspec: GObject.ParamSpec) => void
"notify::visible": (pspec: GObject.ParamSpec) => void
"notify::width-request": (pspec: GObject.ParamSpec) => void
"page-attached": (arg0: Adw.TabPage, arg1: number) => void

Emitted when a page has been created or transferred to self.

A typical reason to connect to this signal would be to connect to page signals for things such as updating window title.

"page-detached": (arg0: Adw.TabPage, arg1: number) => void

Emitted when a page has been removed or transferred to another view.

A typical reason to connect to this signal would be to disconnect signal handlers connected in the Adw.TabView::page-attached handler.

It is important not to try and destroy the page child in the handler of this function as the child might merely be moved to another window; use child dispose handler for that or do it in sync with your TabView.close_page_finish calls.

"page-reordered": (arg0: Adw.TabPage, arg1: number) => void

Emitted after page has been reordered to position.

"setup-menu": (arg0: Adw.TabPage) => void

Emitted when a context menu is opened or closed for page.

If the menu has been closed, page will be set to NULL.

It can be used to set up menu actions before showing the menu, for example disable actions not applicable to page.

Properties - Inherited from Gtk

destroy: () => void

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.

"direction-changed": (arg0: Gtk.TextDirection) => void

Emitted when the text direction of a widget changes.

hide: () => void

Emitted when widget is hidden.

"keynav-failed": (arg0: Gtk.DirectionType) => boolean | void

Emitted if keyboard navigation fails.

See Gtk.Widget.keynav_failed for details.

map: () => void

Emitted when widget is going to be mapped.

A widget is mapped when the widget is visible (which is controlled with Gtk.Widget.visible) and all its parents up to the toplevel widget are also visible.

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 Gtk.Widget::unmap.

"mnemonic-activate": (arg0: boolean) => boolean | void

Emitted when a widget is activated via a mnemonic.

The default handler for this signal activates widget if group_cycling is false, or just makes widget grab focus if group_cycling is true.

"move-focus": (arg0: Gtk.DirectionType) => void

Emitted when the focus is moved.

The ::move-focus signal is a keybinding signal.

The default bindings for this signal are Tab to move forward, and Shift+Tab to move backward.

notify: (arg0: GObject.ParamSpec) => void

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 GObject.ParamFlags.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 GObject.ParamFlags.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:

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][class@GObject.ParamSpec#parameter-names] as detail strings for the notify signal.

"query-tooltip": (
    arg0: number,
    arg1: number,
    arg2: boolean,
    arg3: Gtk.Tooltip,
) => boolean | void

Emitted when the widget’s tooltip is about to be shown.

This happens when the Gtk.Widget.has_tooltip property 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.

realize: () => void

Emitted when widget is associated with a Gdk.Surface.

This means that Gtk.Widget.realize has been called or the widget has been mapped (that is, it is going to be drawn).

show: () => void

Emitted when widget is shown.

"state-flags-changed": (arg0: Gtk.StateFlags) => void

Emitted when the widget state changes.

See Gtk.Widget.get_state_flags.

unmap: () => void

Emitted when widget is going to be unmapped.

A widget is unmapped when 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.

unrealize: () => void

Emitted when the Gdk.Surface associated with widget is destroyed.

This means that Gtk.Widget.unrealize has been called or the widget has been unmapped (that is, it is going to be hidden).