gi-gtk4-4.0.12: Gtk 4.x bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gtk.Objects.BookmarkList

Contents

- Exported types
- Methods
  - getAttributes
  - getFilename
  - getIoPriority
  - isLoading
  - new
  - setAttributes
  - setIoPriority
- Properties
  - attributes
  - filename
  - ioPriority
  - itemType
  - loading
  - nItems

Description

A list model that wraps `GBookmarkFile`.

It presents a `GListModel` and fills it asynchronously with the `GFileInfo`s returned from that function.

The `GFileInfo`s in the list have some attributes in the recent namespace added: `recent::private` (boolean) and `recent:applications` (stringv). They also have the `GFile` referred by the URI in `standard::file` attribute.

Synopsis

- newtype BookmarkList = BookmarkList (ManagedPtr BookmarkList)
- class (GObject o, IsDescendantOf BookmarkList o) => IsBookmarkList o
- toBookmarkList :: (MonadIO m, IsBookmarkList o) => o -> m BookmarkList
- bookmarkListGetAttributes :: (HasCallStack, MonadIO m, IsBookmarkList a) => a -> m (Maybe Text)
- bookmarkListGetFilename :: (HasCallStack, MonadIO m, IsBookmarkList a) => a -> m [Char]
- bookmarkListGetIoPriority :: (HasCallStack, MonadIO m, IsBookmarkList a) => a -> m Int32
- bookmarkListIsLoading :: (HasCallStack, MonadIO m, IsBookmarkList a) => a -> m Bool
- bookmarkListNew :: (HasCallStack, MonadIO m) => Maybe [Char] -> Maybe Text -> m BookmarkList
- bookmarkListSetAttributes :: (HasCallStack, MonadIO m, IsBookmarkList a) => a -> Maybe Text -> m ()
- bookmarkListSetIoPriority :: (HasCallStack, MonadIO m, IsBookmarkList a) => a -> Int32 -> m ()
- clearBookmarkListAttributes :: (MonadIO m, IsBookmarkList o) => o -> m ()
- constructBookmarkListAttributes :: (IsBookmarkList o, MonadIO m) => Text -> m (GValueConstruct o)
- getBookmarkListAttributes :: (MonadIO m, IsBookmarkList o) => o -> m (Maybe Text)
- setBookmarkListAttributes :: (MonadIO m, IsBookmarkList o) => o -> Text -> m ()
- constructBookmarkListFilename :: (IsBookmarkList o, MonadIO m) => Text -> m (GValueConstruct o)
- getBookmarkListFilename :: (MonadIO m, IsBookmarkList o) => o -> m (Maybe Text)
- constructBookmarkListIoPriority :: (IsBookmarkList o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getBookmarkListIoPriority :: (MonadIO m, IsBookmarkList o) => o -> m Int32
- setBookmarkListIoPriority :: (MonadIO m, IsBookmarkList o) => o -> Int32 -> m ()
- getBookmarkListItemType :: (MonadIO m, IsBookmarkList o) => o -> m GType
- getBookmarkListLoading :: (MonadIO m, IsBookmarkList o) => o -> m Bool
- getBookmarkListNItems :: (MonadIO m, IsBookmarkList o) => o -> m Word32

# Exported types

newtype BookmarkList Source #

Memory-managed wrapper type.

Constructors

BookmarkList (ManagedPtr BookmarkList) |

#### Instances

Instances details

Eq BookmarkList Source # |
Instance details Defined in GI.Gtk.Objects.BookmarkList Methods (==) :: BookmarkList -> BookmarkList -> Bool Source # (/=) :: BookmarkList -> BookmarkList -> Bool Source #
GObject BookmarkList Source # |
Instance details Defined in GI.Gtk.Objects.BookmarkList
ManagedPtrNewtype BookmarkList Source # |
Instance details Defined in GI.Gtk.Objects.BookmarkList Methods toManagedPtr :: BookmarkList -> ManagedPtr BookmarkList Source #
TypedObject BookmarkList Source # |
Instance details Defined in GI.Gtk.Objects.BookmarkList Methods glibType :: IO GType Source #
HasParentTypes BookmarkList Source # |
Instance details Defined in GI.Gtk.Objects.BookmarkList
IsGValue (Maybe BookmarkList) Source # | Convert `BookmarkList` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gtk.Objects.BookmarkList Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe BookmarkList -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe BookmarkList) Source #
type ParentTypes BookmarkList Source # |
Instance details Defined in GI.Gtk.Objects.BookmarkList type ParentTypes BookmarkList = '[Object, ListModel]

class (GObject o, IsDescendantOf BookmarkList o) => IsBookmarkList o Source #

Type class for types which can be safely cast to `BookmarkList`, for instance with `toBookmarkList`.

#### Instances

Instances details

(GObject o, IsDescendantOf BookmarkList o) => IsBookmarkList o Source # |
Instance details Defined in GI.Gtk.Objects.BookmarkList

toBookmarkList :: (MonadIO m, IsBookmarkList o) => o -> m BookmarkList Source #

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

# Methods

### Click to display all available methods, including inherited ones

Expand

#### Methods

bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, isLoading, itemsChanged, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.

#### Getters

getAttributes, getData, getFilename, getIoPriority, getItem, getItemType, getNItems, getProperty, getQdata.

#### Setters

setAttributes, setData, setDataFull, setIoPriority, setProperty.

## getAttributes

bookmarkListGetAttributes Source #

Arguments

:: (HasCallStack, MonadIO m, IsBookmarkList a) |
=> a | `self`: a `GtkBookmarkList`
-> m (Maybe Text) | Returns: The queried attributes

Gets the attributes queried on the children.

## getFilename

bookmarkListGetFilename Source #

Arguments

:: (HasCallStack, MonadIO m, IsBookmarkList a) |
=> a | `self`: a `GtkBookmarkList`
-> m [Char] | Returns: the filename of the .xbel file

Returns the filename of the bookmark file that this list is loading.

## getIoPriority

bookmarkListGetIoPriority Source #

Arguments

:: (HasCallStack, MonadIO m, IsBookmarkList a) |
=> a | `self`: a `GtkBookmarkList`
-> m Int32 | Returns: The IO priority.

Gets the IO priority to use while loading file.

## isLoading

bookmarkListIsLoading Source #

Arguments

:: (HasCallStack, MonadIO m, IsBookmarkList a) |
=> a | `self`: a `GtkBookmarkList`
-> m Bool | Returns: `True` if `self` is loading

Returns `True` if the files are currently being loaded.

Files will be added to `self` from time to time while loading is going on. The order in which are added is undefined and may change in between runs.

## new

bookmarkListNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Maybe [Char] | `filename`: The bookmark file to load
-> Maybe Text | `attributes`: The attributes to query
-> m BookmarkList | Returns: a new `GtkBookmarkList`

Creates a new `GtkBookmarkList` with the given `attributes`.

## setAttributes

bookmarkListSetAttributes Source #

Arguments

:: (HasCallStack, MonadIO m, IsBookmarkList a) |
=> a | `self`: a `GtkBookmarkList`
-> Maybe Text | `attributes`: the attributes to enumerate
-> m () |

Sets the `attributes` to be enumerated and starts the enumeration.

If `attributes` is `Nothing`, no attributes will be queried, but a list of `GFileInfo`s will still be created.

## setIoPriority

bookmarkListSetIoPriority Source #

Arguments

:: (HasCallStack, MonadIO m, IsBookmarkList a) |
=> a | `self`: a `GtkBookmarkList`
-> Int32 | `ioPriority`: IO priority to use
-> m () |

Sets the IO priority to use while loading files.

The default IO priority is `PRIORITY_DEFAULT`.

# Properties

## attributes

The attributes to query.

clearBookmarkListAttributes :: (MonadIO m, IsBookmarkList o) => o -> m () Source #

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

    clear #attributes

constructBookmarkListAttributes :: (IsBookmarkList o, MonadIO m) => Text -> m (GValueConstruct o) Source #

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

getBookmarkListAttributes :: (MonadIO m, IsBookmarkList o) => o -> m (Maybe Text) Source #

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

    get bookmarkList #attributes

setBookmarkListAttributes :: (MonadIO m, IsBookmarkList o) => o -> Text -> m () Source #

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

    set bookmarkList [ #attributes := value ]

## filename

The bookmark file to load.

constructBookmarkListFilename :: (IsBookmarkList o, MonadIO m) => Text -> m (GValueConstruct o) Source #

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

getBookmarkListFilename :: (MonadIO m, IsBookmarkList o) => o -> m (Maybe Text) Source #

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

    get bookmarkList #filename

## ioPriority

Priority used when loading.

constructBookmarkListIoPriority :: (IsBookmarkList o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

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

getBookmarkListIoPriority :: (MonadIO m, IsBookmarkList o) => o -> m Int32 Source #

Get the value of the “`io-priority`” property. When overloading is enabled, this is equivalent to

    get bookmarkList #ioPriority

setBookmarkListIoPriority :: (MonadIO m, IsBookmarkList o) => o -> Int32 -> m () Source #

Set the value of the “`io-priority`” property. When overloading is enabled, this is equivalent to

    set bookmarkList [ #ioPriority := value ]

## itemType

The type of items. See `listModelGetItemType`.

Since: 4.8

getBookmarkListItemType :: (MonadIO m, IsBookmarkList o) => o -> m GType Source #

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

    get bookmarkList #itemType

## loading

`True` if files are being loaded.

getBookmarkListLoading :: (MonadIO m, IsBookmarkList o) => o -> m Bool Source #

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

    get bookmarkList #loading

## nItems

The number of items. See `listModelGetNItems`.

Since: 4.8

getBookmarkListNItems :: (MonadIO m, IsBookmarkList o) => o -> m Word32 Source #

Get the value of the “`n-items`” property. When overloading is enabled, this is equivalent to

    get bookmarkList #nItems