gi-webkit2-4.0.21: WebKit2 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.WebKit2.Objects.OptionMenu

Contents

Description

No description available in the introspection data.

Synopsis

Exported types

newtype OptionMenu Source #

Memory-managed wrapper type.

Instances
GObject OptionMenu Source # 
Instance details

Defined in GI.WebKit2.Objects.OptionMenu

Methods

gobjectType :: IO GType #

HasParentTypes OptionMenu Source # 
Instance details

Defined in GI.WebKit2.Objects.OptionMenu

type ParentTypes OptionMenu Source # 
Instance details

Defined in GI.WebKit2.Objects.OptionMenu

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

class (GObject o, IsDescendantOf OptionMenu o) => IsOptionMenu o Source #

Type class for types which can be safely cast to OptionMenu, for instance with toOptionMenu.

Instances
(GObject o, IsDescendantOf OptionMenu o) => IsOptionMenu o Source # 
Instance details

Defined in GI.WebKit2.Objects.OptionMenu

toOptionMenu :: (MonadIO m, IsOptionMenu o) => o -> m OptionMenu Source #

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

Methods

activateItem

optionMenuActivateItem Source #

Arguments

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

menu: a OptionMenu

-> Word32

index: the index of the item

-> m () 

Activates the OptionMenuItem at index in menu. Activating an item changes the value of the element making the item the active one. You are expected to close the menu with optionMenuClose after activating an item, calling this function again will have no effect.

Since: 2.18

close

optionMenuClose Source #

Arguments

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

menu: a OptionMenu

-> m () 

Request to close a OptionMenu. This emits WebKitOptionMenu::close signal. This function should always be called to notify WebKit that the associated menu has been closed. If the menu is closed and neither optionMenuSelectItem nor optionMenuActivateItem have been called, the element value remains unchanged.

Since: 2.18

getItem

optionMenuGetItem Source #

Arguments

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

menu: a OptionMenu

-> Word32

index: the index of the item

-> m (Maybe OptionMenuItem)

Returns: a OptionMenuItem of menu.

Returns the OptionMenuItem at index in menu.

Since: 2.18

getNItems

optionMenuGetNItems Source #

Arguments

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

menu: a OptionMenu

-> m Word32

Returns: the number of OptionMenuItem<!-- -->s in menu

Gets the length of the menu.

Since: 2.18

selectItem

optionMenuSelectItem Source #

Arguments

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

menu: a OptionMenu

-> Word32

index: the index of the item

-> m () 

Selects the OptionMenuItem at index in menu. Selecting an item changes the text shown by the combo button, but it doesn't change the value of the element. You need to explicitly activate the item with optionMenuSelectItem or close the menu with optionMenuClose in which case the currently selected item will be activated.

Since: 2.18

Signals

close

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

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

type OptionMenuCloseCallback = IO () Source #

Emitted when closing a OptionMenu is requested. This can happen when the user explicitly calls optionMenuClose or when the element is detached from the current page.

Since: 2.18

afterOptionMenuClose :: (IsOptionMenu a, MonadIO m) => a -> OptionMenuCloseCallback -> m SignalHandlerId Source #

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

after optionMenu #close callback

onOptionMenuClose :: (IsOptionMenu a, MonadIO m) => a -> OptionMenuCloseCallback -> m SignalHandlerId Source #

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

on optionMenu #close callback