Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: AppChooserWidgetMeta

[611:14] static extends: object

Generated metadata helpers for AppChooserWidget class surfaces.

Methods

  • properties ()

    Returns property metadata for AppChooserWidget.

    • @r A list.
  • signals ()

    Returns signal metadata for AppChooserWidget.

    • @r A list.

class: AppChooserWidget

[26:7] extends: object

GtkAppChooserWidget is a widget for selecting applications. It is the main building block for [class@Gtk.AppChooserDialog]. Most applications only need to use the latter; but you can use this widget as part of a larger widget if you have special needs. GtkAppChooserWidget offers detailed control over what applications are shown, using the [property@Gtk.AppChooserWidget:show-default], [property@Gtk.AppChooserWidget:show-recommended], [property@Gtk.AppChooserWidget:show-fallback], [property@Gtk.AppChooserWidget:show-other] and [property@Gtk.AppChooserWidget:show-all] properties. See the [iface@Gtk.AppChooser] documentation for more information about these groups of applications. To keep track of the selected application, use the [signal@Gtk.AppChooserWidget::application-selected] and [signal@Gtk.AppChooserWidget::application-activated] signals. ## CSS nodes GtkAppChooserWidget has a single CSS node with name appchooser.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • AppChooserWidget (content_type = null)

    Creates a new GtkAppChooserWidget 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.
  • setOnApplicationactivated (callback Fn, UserData = null)

    Emitted when an application item is activated from the widget's list. This usually happens when the user double clicks an item, or an item is selected and the user presses one of the keys Space, Shift+Space, Return or Enter.

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

    Emitted when an application item is selected from the widget's list.

    • @p Fn is the Aussom callback.
    • @p Fn is called with (AppChooserWidget Self, AppInfo Application).
    • @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.

  • setDefaulttext (string Value)

    The text that appears in the widget when there are no applications for the given content type.

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

    If %TRUE, the app chooser presents all applications in a single list, without subsections for default, recommended or related applications.

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

    Determines whether the app chooser should show the default handler for the content type in a separate section. If %FALSE, the default handler is listed among the recommended applications.

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

    Determines whether the app chooser should show a section for fallback applications. If %FALSE, the fallback applications are listed among the other applications.

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

    Determines whether the app chooser should show a section for other applications.

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

    Determines whether the app chooser should show a section for recommended applications. If %FALSE, the recommended applications are listed among the other applications.

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

    Returns the text that is shown if there are not applications that can handle the content type.

  • get_show_all ()

    Gets whether the app chooser should show all applications in a flat list.

  • get_show_default ()

    Gets whether the app chooser should show the default handler for the content type in a separate section.

  • get_show_fallback ()

    Gets whether the app chooser should show related applications for the content type in a separate section.

  • get_show_other ()

    Gets whether the app chooser should show applications which are unrelated to the content type.

  • get_show_recommended ()

    Gets whether the app chooser should show recommended applications for the content type in a separate section.

  • set_default_text (string text)

    Sets the text that is shown if there are not applications that can handle the content type.

    • @p text is the new value for [property@Gtk.AppChooserWidget:default-text].
    • @r None.
  • set_show_all (bool setting)

    Sets whether the app chooser should show all applications in a flat list.

    • @p setting is the new value for [property@Gtk.AppChooserWidget:show-all].
    • @r None.
  • set_show_default (bool setting)

    Sets whether the app chooser should show the default handler for the content type in a separate section.

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

    Sets whether the app chooser should show related applications for the content type in a separate section.

    • @p setting is the new value for [property@Gtk.AppChooserWidget:show-fallback].
    • @r None.
  • set_show_other (bool setting)

    Sets whether the app chooser should show applications which are unrelated to the content type.

    • @p setting is the new value for [property@Gtk.AppChooserWidget:show-other].
    • @r None.
  • set_show_recommended (bool setting)

    Sets whether the app chooser should show recommended applications for the content type in a separate section.

    • @p setting is the new value for [property@Gtk.AppChooserWidget:show-recommended].
    • @r None.

class: AppChooserWidgetApplicationactivatedCallback

[469:7] extends: object

Generated low-level callback wrapper for GIR callback application-activated.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • AppChooserWidgetApplicationactivatedCallback (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, application, 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: AppChooserWidgetApplicationselectedCallback

[540:7] extends: object

Generated low-level callback wrapper for GIR callback application-selected.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • AppChooserWidgetApplicationselectedCallback (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, application, 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.