gi-gtk-3.0.27: Gtk bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.AppChooserWidget

Contents

Description

AppChooserWidget 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.

AppChooserWidget offers detailed control over what applications are shown, using the AppChooserWidget:show-default, AppChooserWidget:show-recommended, AppChooserWidget:show-fallback, AppChooserWidget:show-other and 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 AppChooserWidget::application-selected and AppChooserWidget::application-activated signals.

CSS nodes

GtkAppChooserWidget has a single CSS node with name appchooser.

Synopsis

Exported types

class GObject o => IsAppChooserWidget o Source #

Type class for types which can be safely cast to AppChooserWidget, for instance with toAppChooserWidget.

toAppChooserWidget :: (MonadIO m, IsAppChooserWidget o) => o -> m AppChooserWidget Source #

Cast to AppChooserWidget, for types for which this is known to be safe. For general casts, use castTo.

Methods

getDefaultText

appChooserWidgetGetDefaultText Source #

Arguments

:: (HasCallStack, MonadIO m, IsAppChooserWidget a) 
=> a

self: a AppChooserWidget

-> m Text

Returns: the value of AppChooserWidget:default-text

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

Since: 3.0

getShowAll

appChooserWidgetGetShowAll Source #

Arguments

:: (HasCallStack, MonadIO m, IsAppChooserWidget a) 
=> a

self: a AppChooserWidget

-> m Bool

Returns: the value of AppChooserWidget:show-all

Returns the current value of the AppChooserWidget:show-all property.

Since: 3.0

getShowDefault

appChooserWidgetGetShowDefault Source #

Arguments

:: (HasCallStack, MonadIO m, IsAppChooserWidget a) 
=> a

self: a AppChooserWidget

-> m Bool

Returns: the value of AppChooserWidget:show-default

Returns the current value of the AppChooserWidget:show-default property.

Since: 3.0

getShowFallback

appChooserWidgetGetShowFallback Source #

Arguments

:: (HasCallStack, MonadIO m, IsAppChooserWidget a) 
=> a

self: a AppChooserWidget

-> m Bool

Returns: the value of AppChooserWidget:show-fallback

Returns the current value of the AppChooserWidget:show-fallback property.

Since: 3.0

getShowOther

appChooserWidgetGetShowOther Source #

Arguments

:: (HasCallStack, MonadIO m, IsAppChooserWidget a) 
=> a

self: a AppChooserWidget

-> m Bool

Returns: the value of AppChooserWidget:show-other

Returns the current value of the AppChooserWidget:show-other property.

Since: 3.0

getShowRecommended

appChooserWidgetGetShowRecommended Source #

Arguments

:: (HasCallStack, MonadIO m, IsAppChooserWidget a) 
=> a

self: a AppChooserWidget

-> m Bool

Returns: the value of AppChooserWidget:show-recommended

Returns the current value of the AppChooserWidget:show-recommended property.

Since: 3.0

new

appChooserWidgetNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

contentType: the content type to show applications for

-> m AppChooserWidget

Returns: a newly created AppChooserWidget

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

Since: 3.0

setDefaultText

appChooserWidgetSetDefaultText Source #

Arguments

:: (HasCallStack, MonadIO m, IsAppChooserWidget a) 
=> a

self: a AppChooserWidget

-> Text

text: the new value for AppChooserWidget:default-text

-> m () 

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

setShowAll

appChooserWidgetSetShowAll Source #

Arguments

:: (HasCallStack, MonadIO m, IsAppChooserWidget a) 
=> a

self: a AppChooserWidget

-> Bool

setting: the new value for AppChooserWidget:show-all

-> m () 

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

Since: 3.0

setShowDefault

appChooserWidgetSetShowDefault Source #

Arguments

:: (HasCallStack, MonadIO m, IsAppChooserWidget a) 
=> a

self: a AppChooserWidget

-> Bool

setting: the new value for AppChooserWidget:show-default

-> m () 

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

Since: 3.0

setShowFallback

appChooserWidgetSetShowFallback Source #

Arguments

:: (HasCallStack, MonadIO m, IsAppChooserWidget a) 
=> a

self: a AppChooserWidget

-> Bool

setting: the new value for AppChooserWidget:show-fallback

-> m () 

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

Since: 3.0

setShowOther

appChooserWidgetSetShowOther Source #

Arguments

:: (HasCallStack, MonadIO m, IsAppChooserWidget a) 
=> a

self: a AppChooserWidget

-> Bool

setting: the new value for AppChooserWidget:show-other

-> m () 

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

Since: 3.0

setShowRecommended

appChooserWidgetSetShowRecommended Source #

Arguments

:: (HasCallStack, MonadIO m, IsAppChooserWidget a) 
=> a

self: a AppChooserWidget

-> Bool

setting: the new value for AppChooserWidget:show-recommended

-> m () 

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

Since: 3.0

Properties

defaultText

The AppChooserWidget:default-text property determines the text that appears in the widget when there are no applications for the given content type. See also appChooserWidgetSetDefaultText.

constructAppChooserWidgetDefaultText :: IsAppChooserWidget o => Text -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “default-text” property. This is rarely needed directly, but it is used by new.

getAppChooserWidgetDefaultText :: (MonadIO m, IsAppChooserWidget o) => o -> m Text Source #

Get the value of the “default-text” property. When overloading is enabled, this is equivalent to

get appChooserWidget #defaultText

setAppChooserWidgetDefaultText :: (MonadIO m, IsAppChooserWidget o) => o -> Text -> m () Source #

Set the value of the “default-text” property. When overloading is enabled, this is equivalent to

set appChooserWidget [ #defaultText := value ]

showAll

If the AppChooserWidget:show-all property is True, the app chooser presents all applications in a single list, without subsections for default, recommended or related applications.

constructAppChooserWidgetShowAll :: IsAppChooserWidget o => Bool -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “show-all” property. This is rarely needed directly, but it is used by new.

getAppChooserWidgetShowAll :: (MonadIO m, IsAppChooserWidget o) => o -> m Bool Source #

Get the value of the “show-all” property. When overloading is enabled, this is equivalent to

get appChooserWidget #showAll

setAppChooserWidgetShowAll :: (MonadIO m, IsAppChooserWidget o) => o -> Bool -> m () Source #

Set the value of the “show-all” property. When overloading is enabled, this is equivalent to

set appChooserWidget [ #showAll := value ]

showDefault

The ::show-default property 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.

constructAppChooserWidgetShowDefault :: IsAppChooserWidget o => Bool -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “show-default” property. This is rarely needed directly, but it is used by new.

getAppChooserWidgetShowDefault :: (MonadIO m, IsAppChooserWidget o) => o -> m Bool Source #

Get the value of the “show-default” property. When overloading is enabled, this is equivalent to

get appChooserWidget #showDefault

setAppChooserWidgetShowDefault :: (MonadIO m, IsAppChooserWidget o) => o -> Bool -> m () Source #

Set the value of the “show-default” property. When overloading is enabled, this is equivalent to

set appChooserWidget [ #showDefault := value ]

showFallback

The AppChooserWidget:show-fallback property determines whether the app chooser should show a section for fallback applications. If False, the fallback applications are listed among the other applications.

constructAppChooserWidgetShowFallback :: IsAppChooserWidget o => Bool -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “show-fallback” property. This is rarely needed directly, but it is used by new.

getAppChooserWidgetShowFallback :: (MonadIO m, IsAppChooserWidget o) => o -> m Bool Source #

Get the value of the “show-fallback” property. When overloading is enabled, this is equivalent to

get appChooserWidget #showFallback

setAppChooserWidgetShowFallback :: (MonadIO m, IsAppChooserWidget o) => o -> Bool -> m () Source #

Set the value of the “show-fallback” property. When overloading is enabled, this is equivalent to

set appChooserWidget [ #showFallback := value ]

showOther

The AppChooserWidget:show-other property determines whether the app chooser should show a section for other applications.

constructAppChooserWidgetShowOther :: IsAppChooserWidget o => Bool -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “show-other” property. This is rarely needed directly, but it is used by new.

getAppChooserWidgetShowOther :: (MonadIO m, IsAppChooserWidget o) => o -> m Bool Source #

Get the value of the “show-other” property. When overloading is enabled, this is equivalent to

get appChooserWidget #showOther

setAppChooserWidgetShowOther :: (MonadIO m, IsAppChooserWidget o) => o -> Bool -> m () Source #

Set the value of the “show-other” property. When overloading is enabled, this is equivalent to

set appChooserWidget [ #showOther := value ]

showRecommended

The AppChooserWidget:show-recommended property determines whether the app chooser should show a section for recommended applications. If False, the recommended applications are listed among the other applications.

constructAppChooserWidgetShowRecommended :: IsAppChooserWidget o => Bool -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “show-recommended” property. This is rarely needed directly, but it is used by new.

getAppChooserWidgetShowRecommended :: (MonadIO m, IsAppChooserWidget o) => o -> m Bool Source #

Get the value of the “show-recommended” property. When overloading is enabled, this is equivalent to

get appChooserWidget #showRecommended

setAppChooserWidgetShowRecommended :: (MonadIO m, IsAppChooserWidget o) => o -> Bool -> m () Source #

Set the value of the “show-recommended” property. When overloading is enabled, this is equivalent to

set appChooserWidget [ #showRecommended := value ]

Signals

applicationActivated

type AppChooserWidgetApplicationActivatedCallback Source #

Arguments

 = AppInfo

application: the activated AppInfo

-> IO () 

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.

type C_AppChooserWidgetApplicationActivatedCallback = Ptr () -> Ptr AppInfo -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

afterAppChooserWidgetApplicationActivated :: (IsAppChooserWidget a, MonadIO m) => a -> AppChooserWidgetApplicationActivatedCallback -> m SignalHandlerId Source #

Connect a signal handler for the “application-activated” signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after appChooserWidget #applicationActivated callback

onAppChooserWidgetApplicationActivated :: (IsAppChooserWidget a, MonadIO m) => a -> AppChooserWidgetApplicationActivatedCallback -> m SignalHandlerId Source #

Connect a signal handler for the “application-activated” signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on appChooserWidget #applicationActivated callback

applicationSelected

type AppChooserWidgetApplicationSelectedCallback Source #

Arguments

 = AppInfo

application: the selected AppInfo

-> IO () 

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

type C_AppChooserWidgetApplicationSelectedCallback = Ptr () -> Ptr AppInfo -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

afterAppChooserWidgetApplicationSelected :: (IsAppChooserWidget a, MonadIO m) => a -> AppChooserWidgetApplicationSelectedCallback -> m SignalHandlerId Source #

Connect a signal handler for the “application-selected” signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after appChooserWidget #applicationSelected callback

onAppChooserWidgetApplicationSelected :: (IsAppChooserWidget a, MonadIO m) => a -> AppChooserWidgetApplicationSelectedCallback -> m SignalHandlerId Source #

Connect a signal handler for the “application-selected” signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on appChooserWidget #applicationSelected callback

populatePopup

type AppChooserWidgetPopulatePopupCallback Source #

Arguments

 = Menu

menu: the Menu to populate

-> AppInfo

application: the current AppInfo

-> IO () 

Emitted when a context menu is about to popup over an application item. Clients can insert menu items into the provided Menu object in the callback of this signal; the context menu will be shown over the item if at least one item has been added to the menu.

type C_AppChooserWidgetPopulatePopupCallback = Ptr () -> Ptr Menu -> Ptr AppInfo -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

afterAppChooserWidgetPopulatePopup :: (IsAppChooserWidget a, MonadIO m) => a -> AppChooserWidgetPopulatePopupCallback -> m SignalHandlerId Source #

Connect a signal handler for the “populate-popup” signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after appChooserWidget #populatePopup callback

onAppChooserWidgetPopulatePopup :: (IsAppChooserWidget a, MonadIO m) => a -> AppChooserWidgetPopulatePopupCallback -> m SignalHandlerId Source #

Connect a signal handler for the “populate-popup” signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on appChooserWidget #populatePopup callback