Class AppChooserWidget

All Implemented Interfaces:
Accessible, AppChooser, Buildable, ConstraintTarget, Proxy

@Generated("org.javagi.JavaGI") @Deprecated public class AppChooserWidget extends Widget implements Accessible, AppChooser, Buildable, ConstraintTarget
Deprecated.
The application selection widgets should be implemented according to the design of each platform and/or application requiring them.

GtkAppChooserWidget is a widget for selecting applications.

It is the main building block for 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 Gtk.AppChooserWidget:show-default, Gtk.AppChooserWidget:show-recommended, Gtk.AppChooserWidget:show-fallback, Gtk.AppChooserWidget:show-other and Gtk.AppChooserWidget:show-all properties. See the AppChooser documentation for more information about these groups of applications.

To keep track of the selected application, use the Gtk.AppChooserWidget::application-selected and Gtk.AppChooserWidget::application-activated signals.

CSS nodes

GtkAppChooserWidget has a single CSS node with name appchooser.

  • Constructor Details

    • AppChooserWidget

      public AppChooserWidget(MemorySegment address)
      Deprecated.
      Create a AppChooserWidget instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • AppChooserWidget

      @Deprecated public AppChooserWidget(String contentType)
      Deprecated.
      This widget will be removed in GTK 5
      Creates a new GtkAppChooserWidget for applications that can handle content of the given type.
      Parameters:
      contentType - the content type to show applications for
    • AppChooserWidget

      public AppChooserWidget()
      Deprecated.
      Create a new AppChooserWidget.
  • Method Details

    • getType

      public static @Nullable Type getType()
      Deprecated.
      Get the GType of the AppChooserWidget class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      Deprecated.
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected AppChooserWidget asParent()
      Deprecated.
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class Widget
      Returns:
      the instance as if it were its parent type
    • getDefaultText

      @Deprecated public @Nullable String getDefaultText()
      Deprecated.
      This widget will be removed in GTK 5
      Returns the text that is shown if there are not applications that can handle the content type.
      Returns:
      the value of Gtk.AppChooserWidget:default-text
    • getShowAll

      @Deprecated public boolean getShowAll()
      Deprecated.
      This widget will be removed in GTK 5
      Gets whether the app chooser should show all applications in a flat list.
      Returns:
      the value of Gtk.AppChooserWidget:show-all
    • getShowDefault

      @Deprecated public boolean getShowDefault()
      Deprecated.
      This widget will be removed in GTK 5
      Gets whether the app chooser should show the default handler for the content type in a separate section.
      Returns:
      the value of Gtk.AppChooserWidget:show-default
    • getShowFallback

      @Deprecated public boolean getShowFallback()
      Deprecated.
      This widget will be removed in GTK 5
      Gets whether the app chooser should show related applications for the content type in a separate section.
      Returns:
      the value of Gtk.AppChooserWidget:show-fallback
    • getShowOther

      @Deprecated public boolean getShowOther()
      Deprecated.
      This widget will be removed in GTK 5
      Gets whether the app chooser should show applications which are unrelated to the content type.
      Returns:
      the value of Gtk.AppChooserWidget:show-other
    • getShowRecommended

      @Deprecated public boolean getShowRecommended()
      Deprecated.
      This widget will be removed in GTK 5
      Gets whether the app chooser should show recommended applications for the content type in a separate section.
      Returns:
      the value of Gtk.AppChooserWidget:show-recommended
    • setDefaultText

      @Deprecated public void setDefaultText(String text)
      Deprecated.
      This widget will be removed in GTK 5
      Sets the text that is shown if there are not applications that can handle the content type.
      Parameters:
      text - the new value for Gtk.AppChooserWidget:default-text
    • setShowAll

      @Deprecated public void setShowAll(boolean setting)
      Deprecated.
      This widget will be removed in GTK 5
      Sets whether the app chooser should show all applications in a flat list.
      Parameters:
      setting - the new value for Gtk.AppChooserWidget:show-all
    • setShowDefault

      @Deprecated public void setShowDefault(boolean setting)
      Deprecated.
      This widget will be removed in GTK 5
      Sets whether the app chooser should show the default handler for the content type in a separate section.
      Parameters:
      setting - the new value for Gtk.AppChooserWidget:show-default
    • setShowFallback

      @Deprecated public void setShowFallback(boolean setting)
      Deprecated.
      This widget will be removed in GTK 5
      Sets whether the app chooser should show related applications for the content type in a separate section.
      Parameters:
      setting - the new value for Gtk.AppChooserWidget:show-fallback
    • setShowOther

      @Deprecated public void setShowOther(boolean setting)
      Deprecated.
      This widget will be removed in GTK 5
      Sets whether the app chooser should show applications which are unrelated to the content type.
      Parameters:
      setting - the new value for Gtk.AppChooserWidget:show-other
    • setShowRecommended

      @Deprecated public void setShowRecommended(boolean setting)
      Deprecated.
      This widget will be removed in GTK 5
      Sets whether the app chooser should show recommended applications for the content type in a separate section.
      Parameters:
      setting - the new value for Gtk.AppChooserWidget:show-recommended
    • onApplicationActivated

      Deprecated.

      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.

      Parameters:
      handler - the signal handler
      Returns:
      a signal handler ID to keep track of the signal connection
      See Also:
    • emitApplicationActivated

      public void emitApplicationActivated(@Nullable AppInfo application)
      Deprecated.
      Emits the "application-activated" signal. See onApplicationActivated(AppChooserWidget.ApplicationActivatedCallback).
    • onApplicationSelected

      Deprecated.
      Emitted when an application item is selected from the widget's list.
      Parameters:
      handler - the signal handler
      Returns:
      a signal handler ID to keep track of the signal connection
      See Also:
    • emitApplicationSelected

      public void emitApplicationSelected(@Nullable AppInfo application)
      Deprecated.
      Emits the "application-selected" signal. See onApplicationSelected(AppChooserWidget.ApplicationSelectedCallback).
    • builder

      public static AppChooserWidget.Builder<? extends AppChooserWidget.Builder> builder()
      Deprecated.
      A AppChooserWidget.Builder object constructs a AppChooserWidget with the specified properties. Use the various set...() methods to set properties, and finish construction with AppChooserWidget.Builder.build().
      Returns:
      the builder object