gi-gtk-3.0.24: 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.Interfaces.RecentChooser

Contents

Description

RecentChooser is an interface that can be implemented by widgets displaying the list of recently used files. In GTK+, the main objects that implement this interface are RecentChooserWidget, RecentChooserDialog and RecentChooserMenu.

Recently used files are supported since GTK+ 2.10.

Synopsis

Exported types

newtype RecentChooser Source #

Memory-managed wrapper type.

toRecentChooser :: (MonadIO m, IsRecentChooser o) => o -> m RecentChooser Source #

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

Methods

addFilter

recentChooserAddFilter Source #

Arguments

:: (HasCallStack, MonadIO m, IsRecentChooser a, IsRecentFilter b) 
=> a

chooser: a RecentChooser

-> b

filter: a RecentFilter

-> m () 

Adds filter to the list of RecentFilter objects held by chooser.

If no previous filter objects were defined, this function will call recentChooserSetFilter.

Since: 2.10

getCurrentItem

recentChooserGetCurrentItem Source #

Arguments

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

chooser: a RecentChooser

-> m RecentInfo

Returns: a RecentInfo. Use recentInfoUnref when when you have finished using it.

Gets the RecentInfo currently selected by chooser.

Since: 2.10

getCurrentUri

recentChooserGetCurrentUri Source #

Arguments

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

chooser: a RecentChooser

-> m Text

Returns: a newly allocated string holding a URI.

Gets the URI currently selected by chooser.

Since: 2.10

getFilter

recentChooserGetFilter Source #

Arguments

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

chooser: a RecentChooser

-> m RecentFilter

Returns: a RecentFilter object.

Gets the RecentFilter object currently used by chooser to affect the display of the recently used resources.

Since: 2.10

getItems

recentChooserGetItems Source #

Arguments

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

chooser: a RecentChooser

-> m [RecentInfo]

Returns: A newly allocated list of RecentInfo objects. You should use recentInfoUnref on every item of the list, and then free the list itself using g_list_free().

Gets the list of recently used resources in form of RecentInfo objects.

The return value of this function is affected by the “sort-type” and “limit” properties of chooser.

Since: 2.10

getLimit

recentChooserGetLimit Source #

Arguments

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

chooser: a RecentChooser

-> m Int32

Returns: A positive integer, or -1 meaning that all items are returned.

Gets the number of items returned by recentChooserGetItems and recentChooserGetUris.

Since: 2.10

getLocalOnly

recentChooserGetLocalOnly Source #

Arguments

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

chooser: a RecentChooser

-> m Bool

Returns: True if only local resources should be shown.

Gets whether only local resources should be shown in the recently used resources selector. See recentChooserSetLocalOnly

Since: 2.10

getSelectMultiple

recentChooserGetSelectMultiple Source #

Arguments

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

chooser: a RecentChooser

-> m Bool

Returns: True if chooser can select more than one item.

Gets whether chooser can select multiple items.

Since: 2.10

getShowIcons

recentChooserGetShowIcons Source #

Arguments

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

chooser: a RecentChooser

-> m Bool

Returns: True if the icons should be displayed, False otherwise.

Retrieves whether chooser should show an icon near the resource.

Since: 2.10

getShowNotFound

recentChooserGetShowNotFound Source #

Arguments

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

chooser: a RecentChooser

-> m Bool

Returns: True if the resources not found should be displayed, and False otheriwse.

Retrieves whether chooser should show the recently used resources that were not found.

Since: 2.10

getShowPrivate

recentChooserGetShowPrivate Source #

Arguments

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

chooser: a RecentChooser

-> m Bool

Returns: True if the recent chooser should show private items, False otherwise.

Returns whether chooser should display recently used resources registered as private.

Since: 2.10

getShowTips

recentChooserGetShowTips Source #

Arguments

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

chooser: a RecentChooser

-> m Bool

Returns: True if the recent chooser should show tooltips, False otherwise.

Gets whether chooser should display tooltips containing the full path of a recently user resource.

Since: 2.10

getSortType

recentChooserGetSortType Source #

Arguments

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

chooser: a RecentChooser

-> m RecentSortType

Returns: the sorting order of the chooser.

Gets the value set by recentChooserSetSortType.

Since: 2.10

getUris

recentChooserGetUris Source #

Arguments

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

chooser: a RecentChooser

-> m ([Text], Word64)

Returns: A newly allocated, Nothing-terminated array of strings. Use strfreev to free it.

Gets the URI of the recently used resources.

The return value of this function is affected by the “sort-type” and “limit” properties of chooser.

Since the returned array is Nothing terminated, length may be Nothing.

Since: 2.10

listFilters

recentChooserListFilters Source #

Arguments

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

chooser: a RecentChooser

-> m [RecentFilter]

Returns: A singly linked list of RecentFilter objects. You should just free the returned list using g_slist_free().

Gets the RecentFilter objects held by chooser.

Since: 2.10

removeFilter

recentChooserRemoveFilter Source #

Arguments

:: (HasCallStack, MonadIO m, IsRecentChooser a, IsRecentFilter b) 
=> a

chooser: a RecentChooser

-> b

filter: a RecentFilter

-> m () 

Removes filter from the list of RecentFilter objects held by chooser.

Since: 2.10

selectAll

recentChooserSelectAll Source #

Arguments

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

chooser: a RecentChooser

-> m () 

Selects all the items inside chooser, if the chooser supports multiple selection.

Since: 2.10

selectUri

recentChooserSelectUri Source #

Arguments

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

chooser: a RecentChooser

-> Text

uri: a URI

-> m ()

(Can throw GError)

Selects uri inside chooser.

Since: 2.10

setCurrentUri

recentChooserSetCurrentUri Source #

Arguments

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

chooser: a RecentChooser

-> Text

uri: a URI

-> m ()

(Can throw GError)

Sets uri as the current URI for chooser.

Since: 2.10

setFilter

recentChooserSetFilter Source #

Arguments

:: (HasCallStack, MonadIO m, IsRecentChooser a, IsRecentFilter b) 
=> a

chooser: a RecentChooser

-> Maybe b

filter: a RecentFilter

-> m () 

Sets filter as the current RecentFilter object used by chooser to affect the displayed recently used resources.

Since: 2.10

setLimit

recentChooserSetLimit Source #

Arguments

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

chooser: a RecentChooser

-> Int32

limit: a positive integer, or -1 for all items

-> m () 

Sets the number of items that should be returned by recentChooserGetItems and recentChooserGetUris.

Since: 2.10

setLocalOnly

recentChooserSetLocalOnly Source #

Arguments

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

chooser: a RecentChooser

-> Bool

localOnly: True if only local files can be shown

-> m () 

Sets whether only local resources, that is resources using the file:// URI scheme, should be shown in the recently used resources selector. If localOnly is True (the default) then the shown resources are guaranteed to be accessible through the operating system native file system.

Since: 2.10

setSelectMultiple

recentChooserSetSelectMultiple Source #

Arguments

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

chooser: a RecentChooser

-> Bool

selectMultiple: True if chooser can select more than one item

-> m () 

Sets whether chooser can select multiple items.

Since: 2.10

setShowIcons

recentChooserSetShowIcons Source #

Arguments

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

chooser: a RecentChooser

-> Bool

showIcons: whether to show an icon near the resource

-> m () 

Sets whether chooser should show an icon near the resource when displaying it.

Since: 2.10

setShowNotFound

recentChooserSetShowNotFound Source #

Arguments

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

chooser: a RecentChooser

-> Bool

showNotFound: whether to show the local items we didn’t find

-> m () 

Sets whether chooser should display the recently used resources that it didn’t find. This only applies to local resources.

Since: 2.10

setShowPrivate

recentChooserSetShowPrivate Source #

Arguments

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

chooser: a RecentChooser

-> Bool

showPrivate: True to show private items, False otherwise

-> m () 

Whether to show recently used resources marked registered as private.

Since: 2.10

setShowTips

recentChooserSetShowTips Source #

Arguments

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

chooser: a RecentChooser

-> Bool

showTips: True if tooltips should be shown

-> m () 

Sets whether to show a tooltips containing the full path of each recently used resource in a RecentChooser widget.

Since: 2.10

setSortFunc

recentChooserSetSortFunc Source #

Arguments

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

chooser: a RecentChooser

-> RecentSortFunc

sortFunc: the comparison function

-> m () 

Sets the comparison function used when sorting to be sortFunc. If the chooser has the sort type set to GTK_RECENT_SORT_CUSTOM then the chooser will sort using this function.

To the comparison function will be passed two RecentInfo structs and sortData; sortFunc should return a positive integer if the first item comes before the second, zero if the two items are equal and a negative integer if the first item comes after the second.

Since: 2.10

setSortType

recentChooserSetSortType Source #

Arguments

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

chooser: a RecentChooser

-> RecentSortType

sortType: sort order that the chooser should use

-> m () 

Changes the sorting order of the recently used resources list displayed by chooser.

Since: 2.10

unselectAll

recentChooserUnselectAll Source #

Arguments

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

chooser: a RecentChooser

-> m () 

Unselects all the items inside chooser.

Since: 2.10

unselectUri

recentChooserUnselectUri Source #

Arguments

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

chooser: a RecentChooser

-> Text

uri: a URI

-> m () 

Unselects uri inside chooser.

Since: 2.10

Properties

filter

The RecentFilter object to be used when displaying the recently used resources.

Since: 2.10

clearRecentChooserFilter :: (MonadIO m, IsRecentChooser o) => o -> m () Source #

Set the value of the “filter” property to Nothing. When overloading is enabled, this is equivalent to

clear #filter

constructRecentChooserFilter :: (IsRecentChooser o, IsRecentFilter a) => a -> IO (GValueConstruct o) Source #

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

getRecentChooserFilter :: (MonadIO m, IsRecentChooser o) => o -> m RecentFilter Source #

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

get recentChooser #filter

setRecentChooserFilter :: (MonadIO m, IsRecentChooser o, IsRecentFilter a) => o -> a -> m () Source #

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

set recentChooser [ #filter := value ]

limit

The maximum number of recently used resources to be displayed, or -1 to display all items.

Since: 2.10

constructRecentChooserLimit :: IsRecentChooser o => Int32 -> IO (GValueConstruct o) Source #

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

getRecentChooserLimit :: (MonadIO m, IsRecentChooser o) => o -> m Int32 Source #

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

get recentChooser #limit

setRecentChooserLimit :: (MonadIO m, IsRecentChooser o) => o -> Int32 -> m () Source #

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

set recentChooser [ #limit := value ]

localOnly

Whether this RecentChooser should display only local (file:) resources.

Since: 2.10

constructRecentChooserLocalOnly :: IsRecentChooser o => Bool -> IO (GValueConstruct o) Source #

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

getRecentChooserLocalOnly :: (MonadIO m, IsRecentChooser o) => o -> m Bool Source #

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

get recentChooser #localOnly

setRecentChooserLocalOnly :: (MonadIO m, IsRecentChooser o) => o -> Bool -> m () Source #

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

set recentChooser [ #localOnly := value ]

recentManager

The RecentManager instance used by the RecentChooser to display the list of recently used resources.

Since: 2.10

constructRecentChooserRecentManager :: (IsRecentChooser o, IsRecentManager a) => a -> IO (GValueConstruct o) Source #

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

selectMultiple

Allow the user to select multiple resources.

Since: 2.10

constructRecentChooserSelectMultiple :: IsRecentChooser o => Bool -> IO (GValueConstruct o) Source #

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

getRecentChooserSelectMultiple :: (MonadIO m, IsRecentChooser o) => o -> m Bool Source #

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

get recentChooser #selectMultiple

setRecentChooserSelectMultiple :: (MonadIO m, IsRecentChooser o) => o -> Bool -> m () Source #

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

set recentChooser [ #selectMultiple := value ]

showIcons

Whether this RecentChooser should display an icon near the item.

Since: 2.10

constructRecentChooserShowIcons :: IsRecentChooser o => Bool -> IO (GValueConstruct o) Source #

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

getRecentChooserShowIcons :: (MonadIO m, IsRecentChooser o) => o -> m Bool Source #

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

get recentChooser #showIcons

setRecentChooserShowIcons :: (MonadIO m, IsRecentChooser o) => o -> Bool -> m () Source #

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

set recentChooser [ #showIcons := value ]

showNotFound

Whether this RecentChooser should display the recently used resources even if not present anymore. Setting this to False will perform a potentially expensive check on every local resource (every remote resource will always be displayed).

Since: 2.10

constructRecentChooserShowNotFound :: IsRecentChooser o => Bool -> IO (GValueConstruct o) Source #

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

getRecentChooserShowNotFound :: (MonadIO m, IsRecentChooser o) => o -> m Bool Source #

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

get recentChooser #showNotFound

setRecentChooserShowNotFound :: (MonadIO m, IsRecentChooser o) => o -> Bool -> m () Source #

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

set recentChooser [ #showNotFound := value ]

showPrivate

No description available in the introspection data.

constructRecentChooserShowPrivate :: IsRecentChooser o => Bool -> IO (GValueConstruct o) Source #

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

getRecentChooserShowPrivate :: (MonadIO m, IsRecentChooser o) => o -> m Bool Source #

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

get recentChooser #showPrivate

setRecentChooserShowPrivate :: (MonadIO m, IsRecentChooser o) => o -> Bool -> m () Source #

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

set recentChooser [ #showPrivate := value ]

showTips

Whether this RecentChooser should display a tooltip containing the full path of the recently used resources.

Since: 2.10

constructRecentChooserShowTips :: IsRecentChooser o => Bool -> IO (GValueConstruct o) Source #

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

getRecentChooserShowTips :: (MonadIO m, IsRecentChooser o) => o -> m Bool Source #

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

get recentChooser #showTips

setRecentChooserShowTips :: (MonadIO m, IsRecentChooser o) => o -> Bool -> m () Source #

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

set recentChooser [ #showTips := value ]

sortType

Sorting order to be used when displaying the recently used resources.

Since: 2.10

constructRecentChooserSortType :: IsRecentChooser o => RecentSortType -> IO (GValueConstruct o) Source #

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

getRecentChooserSortType :: (MonadIO m, IsRecentChooser o) => o -> m RecentSortType Source #

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

get recentChooser #sortType

setRecentChooserSortType :: (MonadIO m, IsRecentChooser o) => o -> RecentSortType -> m () Source #

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

set recentChooser [ #sortType := value ]

Signals

itemActivated

type C_RecentChooserItemActivatedCallback = Ptr () -> Ptr () -> IO () Source #

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

type RecentChooserItemActivatedCallback = IO () Source #

This signal is emitted when the user "activates" a recent item in the recent chooser. This can happen by double-clicking on an item in the recently used resources list, or by pressing Enter.

Since: 2.10

afterRecentChooserItemActivated :: (IsRecentChooser a, MonadIO m) => a -> RecentChooserItemActivatedCallback -> m SignalHandlerId Source #

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

after recentChooser #itemActivated callback

onRecentChooserItemActivated :: (IsRecentChooser a, MonadIO m) => a -> RecentChooserItemActivatedCallback -> m SignalHandlerId Source #

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

on recentChooser #itemActivated callback

selectionChanged

type C_RecentChooserSelectionChangedCallback = Ptr () -> Ptr () -> IO () Source #

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

type RecentChooserSelectionChangedCallback = IO () Source #

This signal is emitted when there is a change in the set of selected recently used resources. This can happen when a user modifies the selection with the mouse or the keyboard, or when explicitly calling functions to change the selection.

Since: 2.10

afterRecentChooserSelectionChanged :: (IsRecentChooser a, MonadIO m) => a -> RecentChooserSelectionChangedCallback -> m SignalHandlerId Source #

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

after recentChooser #selectionChanged callback

onRecentChooserSelectionChanged :: (IsRecentChooser a, MonadIO m) => a -> RecentChooserSelectionChangedCallback -> m SignalHandlerId Source #

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

on recentChooser #selectionChanged callback