gi-gio-2.0.24: Gio bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (inaki@blueleaf.cc)
Safe HaskellNone
LanguageHaskell2010

GI.Gio.Objects.MenuLinkIter

Contents

Description

MenuLinkIter is an opaque structure type. You must access it using the functions below.

Since: 2.32

Synopsis

Exported types

newtype MenuLinkIter Source #

Memory-managed wrapper type.

Instances
GObject MenuLinkIter Source # 
Instance details

Defined in GI.Gio.Objects.MenuLinkIter

Methods

gobjectType :: IO GType #

HasParentTypes MenuLinkIter Source # 
Instance details

Defined in GI.Gio.Objects.MenuLinkIter

type ParentTypes MenuLinkIter Source # 
Instance details

Defined in GI.Gio.Objects.MenuLinkIter

type ParentTypes MenuLinkIter = Object ': ([] :: [Type])

class (GObject o, IsDescendantOf MenuLinkIter o) => IsMenuLinkIter o Source #

Type class for types which can be safely cast to MenuLinkIter, for instance with toMenuLinkIter.

Instances
(GObject o, IsDescendantOf MenuLinkIter o) => IsMenuLinkIter o Source # 
Instance details

Defined in GI.Gio.Objects.MenuLinkIter

toMenuLinkIter :: (MonadIO m, IsMenuLinkIter o) => o -> m MenuLinkIter Source #

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

Methods

getName

menuLinkIterGetName Source #

Arguments

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

iter: a MenuLinkIter

-> m Text

Returns: the type of the link

Gets the name of the link at the current iterator position.

The iterator is not advanced.

Since: 2.32

getNext

menuLinkIterGetNext Source #

Arguments

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

iter: a MenuLinkIter

-> m (Bool, Text, MenuModel)

Returns: True on success, or False if there is no additional link

This function combines menuLinkIterNext with menuLinkIterGetName and menuLinkIterGetValue.

First the iterator is advanced to the next (possibly first) link. If that fails, then False is returned and there are no other effects.

If successful, outLink and value are set to the name and MenuModel of the link that has just been advanced to. At this point, menuLinkIterGetName and menuLinkIterGetValue will return the same values again.

The value returned in outLink remains valid for as long as the iterator remains at the current position. The value returned in value must be unreffed using objectUnref when it is no longer in use.

Since: 2.32

getValue

menuLinkIterGetValue Source #

Arguments

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

iter: a MenuLinkIter

-> m MenuModel

Returns: the MenuModel that is linked to

Gets the linked MenuModel at the current iterator position.

The iterator is not advanced.

Since: 2.32

next

menuLinkIterNext Source #

Arguments

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

iter: a MenuLinkIter

-> m Bool

Returns: True on success, or False when there are no more links

Attempts to advance the iterator to the next (possibly first) link.

True is returned on success, or False if there are no more links.

You must call this function when you first acquire the iterator to advance it to the first link (and determine if the first link exists at all).

Since: 2.32