Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (inaki@blueleaf.cc) |
Safe Haskell | None |
Language | Haskell2010 |
No description available in the introspection data.
Synopsis
- newtype OptionMenu = OptionMenu (ManagedPtr OptionMenu)
- class (GObject o, IsDescendantOf OptionMenu o) => IsOptionMenu o
- toOptionMenu :: (MonadIO m, IsOptionMenu o) => o -> m OptionMenu
- noOptionMenu :: Maybe OptionMenu
- optionMenuActivateItem :: (HasCallStack, MonadIO m, IsOptionMenu a) => a -> Word32 -> m ()
- optionMenuClose :: (HasCallStack, MonadIO m, IsOptionMenu a) => a -> m ()
- optionMenuGetItem :: (HasCallStack, MonadIO m, IsOptionMenu a) => a -> Word32 -> m (Maybe OptionMenuItem)
- optionMenuGetNItems :: (HasCallStack, MonadIO m, IsOptionMenu a) => a -> m Word32
- optionMenuSelectItem :: (HasCallStack, MonadIO m, IsOptionMenu a) => a -> Word32 -> m ()
- type C_OptionMenuCloseCallback = Ptr () -> Ptr () -> IO ()
- type OptionMenuCloseCallback = IO ()
- afterOptionMenuClose :: (IsOptionMenu a, MonadIO m) => a -> OptionMenuCloseCallback -> m SignalHandlerId
- genClosure_OptionMenuClose :: MonadIO m => OptionMenuCloseCallback -> m (GClosure C_OptionMenuCloseCallback)
- mk_OptionMenuCloseCallback :: C_OptionMenuCloseCallback -> IO (FunPtr C_OptionMenuCloseCallback)
- noOptionMenuCloseCallback :: Maybe OptionMenuCloseCallback
- onOptionMenuClose :: (IsOptionMenu a, MonadIO m) => a -> OptionMenuCloseCallback -> m SignalHandlerId
- wrap_OptionMenuCloseCallback :: OptionMenuCloseCallback -> C_OptionMenuCloseCallback
Exported types
newtype OptionMenu Source #
Memory-managed wrapper type.
Instances
GObject OptionMenu Source # | |
Defined in GI.WebKit2.Objects.OptionMenu gobjectType :: IO GType # | |
HasParentTypes OptionMenu Source # | |
Defined in GI.WebKit2.Objects.OptionMenu | |
type ParentTypes OptionMenu Source # | |
Defined in GI.WebKit2.Objects.OptionMenu |
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 # | |
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
.
noOptionMenu :: Maybe OptionMenu Source #
A convenience alias for Nothing
:: Maybe
OptionMenu
.
Methods
activateItem
optionMenuActivateItem Source #
:: (HasCallStack, MonadIO m, IsOptionMenu a) | |
=> a |
|
-> Word32 |
|
-> 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
:: (HasCallStack, MonadIO m, IsOptionMenu a) | |
=> a |
|
-> 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
:: (HasCallStack, MonadIO m, IsOptionMenu a) | |
=> a |
|
-> Word32 |
|
-> m (Maybe OptionMenuItem) | Returns: a |
Returns the OptionMenuItem
at index
in menu
.
Since: 2.18
getNItems
:: (HasCallStack, MonadIO m, IsOptionMenu a) | |
=> a |
|
-> m Word32 | Returns: the number of |
Gets the length of the menu
.
Since: 2.18
selectItem
:: (HasCallStack, MonadIO m, IsOptionMenu a) | |
=> a |
|
-> Word32 |
|
-> 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
genClosure_OptionMenuClose :: MonadIO m => OptionMenuCloseCallback -> m (GClosure C_OptionMenuCloseCallback) Source #
Wrap the callback into a GClosure
.
mk_OptionMenuCloseCallback :: C_OptionMenuCloseCallback -> IO (FunPtr C_OptionMenuCloseCallback) Source #
Generate a function pointer callable from C code, from a C_OptionMenuCloseCallback
.
noOptionMenuCloseCallback :: Maybe OptionMenuCloseCallback Source #
A convenience synonym for
.Nothing
:: Maybe
OptionMenuCloseCallback
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