Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: AppChooserButtonMeta

[663:14] static extends: object

Generated metadata helpers for AppChooserButton class surfaces.

Methods

  • properties ()

    Returns property metadata for AppChooserButton.

    • @r A list.
  • signals ()

    Returns signal metadata for AppChooserButton.

    • @r A list.

class: AppChooserButtonCustomitemactivatedCallback

[593:7] extends: object

Generated low-level callback wrapper for GIR callback custom-item-activated.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • AppChooserButtonCustomitemactivatedCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (nativeSelf, item_name, nativeUserData)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: AppChooserButton

[29:7] extends: object

The GtkAppChooserButton lets the user select an application. An example GtkAppChooserButton Initially, a GtkAppChooserButton selects the first application in its list, which will either be the most-recently used application or, if [property@Gtk.AppChooserButton:show-default-item] is %TRUE, the default application. The list of applications shown in a GtkAppChooserButton includes the recommended applications for the given content type. When [property@Gtk.AppChooserButton:show-default-item] is set, the default application is also included. To let the user chooser other applications, you can set the [property@Gtk.AppChooserButton:show-dialog-item] property, which allows to open a full [class@Gtk.AppChooserDialog]. It is possible to add custom items to the list, using [method@Gtk.AppChooserButton.append_custom_item]. These items cause the [signal@Gtk.AppChooserButton::custom-item-activated] signal to be emitted when they are selected. To track changes in the selected application, use the [signal@Gtk.AppChooserButton::changed] signal. ## CSS nodes GtkAppChooserButton has a single CSS node with the name “appchooserbutton”.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • AppChooserButton (content_type = null)

    Creates a new GtkAppChooserButton for applications that can handle content of the given type.

    • @p content_type is the content type to show applications for.
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • asWidget ()

    Wraps this handle as Widget.

    • @r A Widget object.
  • asAccessible ()

    Wraps this handle as Accessible.

    • @r A Accessible object.
  • asAppChooser ()

    Wraps this handle as AppChooser.

    • @r A AppChooser object.
  • asBuildable ()

    Wraps this handle as Buildable.

    • @r A Buildable object.
  • asConstraintTarget ()

    Wraps this handle as ConstraintTarget.

    • @r A ConstraintTarget object.
  • connectSignal (string Name, CallbackObj)

    Connects one generated callback wrapper to a named signal.

    • @p Name is the signal name.
    • @p CallbackObj is the generated callback wrapper to connect.
    • @r The connected handler id.
  • disconnectSignalHandler (int HandlerId)

    Disconnects one retained signal handler id.

    • @p HandlerId is the signal handler id to disconnect.
    • @r None.
  • setOnActivate (callback Fn, UserData = null)

    Emitted to when the button is activated. The ::activate signal on GtkAppChooserButton is an action signal and emitting it causes the button to pop up its dialog.

    • @p Fn is the Aussom callback.
    • @p Fn is called with (AppChooserButton Self).
    • @p UserData is retained and passed through to the generated callback wrapper when provided.
    • @r The connected handler id.
  • setOnChanged (callback Fn, UserData = null)

    Emitted when the active application changes.

    • @p Fn is the Aussom callback.
    • @p Fn is called with (AppChooserButton Self).
    • @p UserData is retained and passed through to the generated callback wrapper when provided.
    • @r The connected handler id.
  • setOnCustomitemactivated (callback Fn, UserData = null)

    Emitted when a custom item is activated. Use [method@Gtk.AppChooserButton.append_custom_item], to add custom items.

    • @p Fn is the Aussom callback.
    • @p Fn is called with (AppChooserButton Self, string Item_name).
    • @p UserData is retained and passed through to the generated callback wrapper when provided.
    • @r The connected handler id.
  • getProperty (string Name)

    Reads one generated property by name.

  • setProperty (string Name, Value)

    Writes one generated property by name.

  • setHeading (string Value)

    The text to show at the top of the dialog that can be opened from the button. The string may contain Pango markup.

    • @p Value is the new property value.
    • @r None.
  • setModal (bool Value)

    Whether the app chooser dialog should be modal.

    • @p Value is the new property value.
    • @r None.
  • setShowdefaultitem (bool Value)

    Determines whether the dropdown menu shows the default application on top for the provided content type.

    • @p Value is the new property value.
    • @r None.
  • setShowdialogitem (bool Value)

    Determines whether the dropdown menu shows an item to open a GtkAppChooserDialog.

    • @p Value is the new property value.
    • @r None.
  • append_custom_item (string name, string label, object icon)

    Appends a custom item to the list of applications that is shown in the popup. The item name must be unique per-widget. Clients can use the provided name as a detail for the [signal@Gtk.AppChooserButton::custom-item-activated] signal, to add a callback for the activation of a particular custom item in the list. See also [method@Gtk.AppChooserButton.append_separator].

    • @p name is the name of the custom item.
    • @p label is the label for the custom item.
    • @p icon is the icon for the custom item.
    • @r None.
  • append_separator ()

    Appends a separator to the list of applications that is shown in the popup.

    • @r None.
  • get_heading ()

    Returns the text to display at the top of the dialog.

  • get_modal ()

    Gets whether the dialog is modal.

  • get_show_default_item ()

    Returns whether the dropdown menu should show the default application at the top.

  • get_show_dialog_item ()

    Returns whether the dropdown menu shows an item for a GtkAppChooserDialog.

  • set_active_custom_item (string name)

    Selects a custom item. See [method@Gtk.AppChooserButton.append_custom_item]. Use [method@Gtk.AppChooser.refresh] to bring the selection to its initial state.

    • @p name is the name of the custom item.
    • @r None.
  • set_heading (string heading)

    Sets the text to display at the top of the dialog. If the heading is not set, the dialog displays a default text.

    • @p heading is a string containing Pango markup.
    • @r None.
  • set_modal (bool modal)

    Sets whether the dialog should be modal.

    • @p modal is %TRUE to make the dialog modal.
    • @r None.
  • set_show_default_item (bool setting)

    Sets whether the dropdown menu of this button should show the default application for the given content type at top.

    • @p setting is the new value for [property@Gtk.AppChooserButton:show-default-item].
    • @r None.
  • set_show_dialog_item (bool setting)

    Sets whether the dropdown menu of this button should show an entry to trigger a GtkAppChooserDialog.

    • @p setting is the new value for [property@Gtk.AppChooserButton:show-dialog-item].
    • @r None.

class: AppChooserButtonActivateCallback

[452:7] extends: object

Generated low-level callback wrapper for GIR callback activate.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • AppChooserButtonActivateCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (nativeSelf, nativeUserData)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: AppChooserButtonChangedCallback

[522:7] extends: object

Generated low-level callback wrapper for GIR callback changed.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • AppChooserButtonChangedCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (nativeSelf, nativeUserData)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.