Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
A MenuShell
is the abstract base class used to derive the
Menu
and MenuBar
subclasses.
A MenuShell
is a container of MenuItem
objects arranged
in a list which can be navigated, selected, and activated by the
user to perform application functions. A MenuItem
can have a
submenu associated with it, allowing for nested hierarchical menus.
Terminology
A menu item can be “selected”, this means that it is displayed in the prelight state, and if it has a submenu, that submenu will be popped up.
A menu is “active” when it is visible onscreen and the user is selecting from it. A menubar is not active until the user clicks on one of its menuitems. When a menu is active, passing the mouse over a submenu will pop it up.
There is also is a concept of the current menu and a current menu item. The current menu item is the selected menu item that is furthest down in the hierarchy. (Every active menu shell does not necessarily contain a selected menu item, but if it does, then the parent menu shell must also contain a selected menu item.) The current menu is the menu that contains the current menu item. It will always have a GTK grab and receive all key presses.
Synopsis
- newtype MenuShell = MenuShell (ManagedPtr MenuShell)
- class (GObject o, IsDescendantOf MenuShell o) => IsMenuShell o
- toMenuShell :: (MonadIO m, IsMenuShell o) => o -> m MenuShell
- noMenuShell :: Maybe MenuShell
- menuShellActivateItem :: (HasCallStack, MonadIO m, IsMenuShell a, IsWidget b) => a -> b -> Bool -> m ()
- menuShellAppend :: (HasCallStack, MonadIO m, IsMenuShell a, IsMenuItem b) => a -> b -> m ()
- menuShellBindModel :: (HasCallStack, MonadIO m, IsMenuShell a, IsMenuModel b) => a -> Maybe b -> Maybe Text -> Bool -> m ()
- menuShellCancel :: (HasCallStack, MonadIO m, IsMenuShell a) => a -> m ()
- menuShellDeactivate :: (HasCallStack, MonadIO m, IsMenuShell a) => a -> m ()
- menuShellDeselect :: (HasCallStack, MonadIO m, IsMenuShell a) => a -> m ()
- menuShellGetParentShell :: (HasCallStack, MonadIO m, IsMenuShell a) => a -> m Widget
- menuShellGetSelectedItem :: (HasCallStack, MonadIO m, IsMenuShell a) => a -> m Widget
- menuShellGetTakeFocus :: (HasCallStack, MonadIO m, IsMenuShell a) => a -> m Bool
- menuShellInsert :: (HasCallStack, MonadIO m, IsMenuShell a, IsWidget b) => a -> b -> Int32 -> m ()
- menuShellPrepend :: (HasCallStack, MonadIO m, IsMenuShell a, IsWidget b) => a -> b -> m ()
- menuShellSelectFirst :: (HasCallStack, MonadIO m, IsMenuShell a) => a -> Bool -> m ()
- menuShellSelectItem :: (HasCallStack, MonadIO m, IsMenuShell a, IsWidget b) => a -> b -> m ()
- menuShellSetTakeFocus :: (HasCallStack, MonadIO m, IsMenuShell a) => a -> Bool -> m ()
- constructMenuShellTakeFocus :: IsMenuShell o => Bool -> IO (GValueConstruct o)
- getMenuShellTakeFocus :: (MonadIO m, IsMenuShell o) => o -> m Bool
- setMenuShellTakeFocus :: (MonadIO m, IsMenuShell o) => o -> Bool -> m ()
- type C_MenuShellActivateCurrentCallback = Ptr () -> CInt -> Ptr () -> IO ()
- type MenuShellActivateCurrentCallback = Bool -> IO ()
- afterMenuShellActivateCurrent :: (IsMenuShell a, MonadIO m) => a -> MenuShellActivateCurrentCallback -> m SignalHandlerId
- genClosure_MenuShellActivateCurrent :: MonadIO m => MenuShellActivateCurrentCallback -> m (GClosure C_MenuShellActivateCurrentCallback)
- mk_MenuShellActivateCurrentCallback :: C_MenuShellActivateCurrentCallback -> IO (FunPtr C_MenuShellActivateCurrentCallback)
- noMenuShellActivateCurrentCallback :: Maybe MenuShellActivateCurrentCallback
- onMenuShellActivateCurrent :: (IsMenuShell a, MonadIO m) => a -> MenuShellActivateCurrentCallback -> m SignalHandlerId
- wrap_MenuShellActivateCurrentCallback :: MenuShellActivateCurrentCallback -> C_MenuShellActivateCurrentCallback
- type C_MenuShellCancelCallback = Ptr () -> Ptr () -> IO ()
- type MenuShellCancelCallback = IO ()
- afterMenuShellCancel :: (IsMenuShell a, MonadIO m) => a -> MenuShellCancelCallback -> m SignalHandlerId
- genClosure_MenuShellCancel :: MonadIO m => MenuShellCancelCallback -> m (GClosure C_MenuShellCancelCallback)
- mk_MenuShellCancelCallback :: C_MenuShellCancelCallback -> IO (FunPtr C_MenuShellCancelCallback)
- noMenuShellCancelCallback :: Maybe MenuShellCancelCallback
- onMenuShellCancel :: (IsMenuShell a, MonadIO m) => a -> MenuShellCancelCallback -> m SignalHandlerId
- wrap_MenuShellCancelCallback :: MenuShellCancelCallback -> C_MenuShellCancelCallback
- type C_MenuShellCycleFocusCallback = Ptr () -> CUInt -> Ptr () -> IO ()
- type MenuShellCycleFocusCallback = DirectionType -> IO ()
- afterMenuShellCycleFocus :: (IsMenuShell a, MonadIO m) => a -> MenuShellCycleFocusCallback -> m SignalHandlerId
- genClosure_MenuShellCycleFocus :: MonadIO m => MenuShellCycleFocusCallback -> m (GClosure C_MenuShellCycleFocusCallback)
- mk_MenuShellCycleFocusCallback :: C_MenuShellCycleFocusCallback -> IO (FunPtr C_MenuShellCycleFocusCallback)
- noMenuShellCycleFocusCallback :: Maybe MenuShellCycleFocusCallback
- onMenuShellCycleFocus :: (IsMenuShell a, MonadIO m) => a -> MenuShellCycleFocusCallback -> m SignalHandlerId
- wrap_MenuShellCycleFocusCallback :: MenuShellCycleFocusCallback -> C_MenuShellCycleFocusCallback
- type C_MenuShellDeactivateCallback = Ptr () -> Ptr () -> IO ()
- type MenuShellDeactivateCallback = IO ()
- afterMenuShellDeactivate :: (IsMenuShell a, MonadIO m) => a -> MenuShellDeactivateCallback -> m SignalHandlerId
- genClosure_MenuShellDeactivate :: MonadIO m => MenuShellDeactivateCallback -> m (GClosure C_MenuShellDeactivateCallback)
- mk_MenuShellDeactivateCallback :: C_MenuShellDeactivateCallback -> IO (FunPtr C_MenuShellDeactivateCallback)
- noMenuShellDeactivateCallback :: Maybe MenuShellDeactivateCallback
- onMenuShellDeactivate :: (IsMenuShell a, MonadIO m) => a -> MenuShellDeactivateCallback -> m SignalHandlerId
- wrap_MenuShellDeactivateCallback :: MenuShellDeactivateCallback -> C_MenuShellDeactivateCallback
- type C_MenuShellInsertCallback = Ptr () -> Ptr Widget -> Int32 -> Ptr () -> IO ()
- type MenuShellInsertCallback = Widget -> Int32 -> IO ()
- afterMenuShellInsert :: (IsMenuShell a, MonadIO m) => a -> MenuShellInsertCallback -> m SignalHandlerId
- genClosure_MenuShellInsert :: MonadIO m => MenuShellInsertCallback -> m (GClosure C_MenuShellInsertCallback)
- mk_MenuShellInsertCallback :: C_MenuShellInsertCallback -> IO (FunPtr C_MenuShellInsertCallback)
- noMenuShellInsertCallback :: Maybe MenuShellInsertCallback
- onMenuShellInsert :: (IsMenuShell a, MonadIO m) => a -> MenuShellInsertCallback -> m SignalHandlerId
- wrap_MenuShellInsertCallback :: MenuShellInsertCallback -> C_MenuShellInsertCallback
- type C_MenuShellMoveCurrentCallback = Ptr () -> CUInt -> Ptr () -> IO ()
- type MenuShellMoveCurrentCallback = MenuDirectionType -> IO ()
- afterMenuShellMoveCurrent :: (IsMenuShell a, MonadIO m) => a -> MenuShellMoveCurrentCallback -> m SignalHandlerId
- genClosure_MenuShellMoveCurrent :: MonadIO m => MenuShellMoveCurrentCallback -> m (GClosure C_MenuShellMoveCurrentCallback)
- mk_MenuShellMoveCurrentCallback :: C_MenuShellMoveCurrentCallback -> IO (FunPtr C_MenuShellMoveCurrentCallback)
- noMenuShellMoveCurrentCallback :: Maybe MenuShellMoveCurrentCallback
- onMenuShellMoveCurrent :: (IsMenuShell a, MonadIO m) => a -> MenuShellMoveCurrentCallback -> m SignalHandlerId
- wrap_MenuShellMoveCurrentCallback :: MenuShellMoveCurrentCallback -> C_MenuShellMoveCurrentCallback
- type C_MenuShellMoveSelectedCallback = Ptr () -> Int32 -> Ptr () -> IO CInt
- type MenuShellMoveSelectedCallback = Int32 -> IO Bool
- afterMenuShellMoveSelected :: (IsMenuShell a, MonadIO m) => a -> MenuShellMoveSelectedCallback -> m SignalHandlerId
- genClosure_MenuShellMoveSelected :: MonadIO m => MenuShellMoveSelectedCallback -> m (GClosure C_MenuShellMoveSelectedCallback)
- mk_MenuShellMoveSelectedCallback :: C_MenuShellMoveSelectedCallback -> IO (FunPtr C_MenuShellMoveSelectedCallback)
- noMenuShellMoveSelectedCallback :: Maybe MenuShellMoveSelectedCallback
- onMenuShellMoveSelected :: (IsMenuShell a, MonadIO m) => a -> MenuShellMoveSelectedCallback -> m SignalHandlerId
- wrap_MenuShellMoveSelectedCallback :: MenuShellMoveSelectedCallback -> C_MenuShellMoveSelectedCallback
- type C_MenuShellSelectionDoneCallback = Ptr () -> Ptr () -> IO ()
- type MenuShellSelectionDoneCallback = IO ()
- afterMenuShellSelectionDone :: (IsMenuShell a, MonadIO m) => a -> MenuShellSelectionDoneCallback -> m SignalHandlerId
- genClosure_MenuShellSelectionDone :: MonadIO m => MenuShellSelectionDoneCallback -> m (GClosure C_MenuShellSelectionDoneCallback)
- mk_MenuShellSelectionDoneCallback :: C_MenuShellSelectionDoneCallback -> IO (FunPtr C_MenuShellSelectionDoneCallback)
- noMenuShellSelectionDoneCallback :: Maybe MenuShellSelectionDoneCallback
- onMenuShellSelectionDone :: (IsMenuShell a, MonadIO m) => a -> MenuShellSelectionDoneCallback -> m SignalHandlerId
- wrap_MenuShellSelectionDoneCallback :: MenuShellSelectionDoneCallback -> C_MenuShellSelectionDoneCallback
Exported types
Memory-managed wrapper type.
Instances
Eq MenuShell Source # | |
IsGValue MenuShell Source # | Convert |
GObject MenuShell Source # | |
Defined in GI.Gtk.Objects.MenuShell gobjectType :: IO GType # | |
HasParentTypes MenuShell Source # | |
Defined in GI.Gtk.Objects.MenuShell | |
type ParentTypes MenuShell Source # | |
Defined in GI.Gtk.Objects.MenuShell |
class (GObject o, IsDescendantOf MenuShell o) => IsMenuShell o Source #
Type class for types which can be safely cast to MenuShell
, for instance with toMenuShell
.
Instances
(GObject o, IsDescendantOf MenuShell o) => IsMenuShell o Source # | |
Defined in GI.Gtk.Objects.MenuShell |
toMenuShell :: (MonadIO m, IsMenuShell o) => o -> m MenuShell Source #
Methods
Overloaded methods
activateItem
menuShellActivateItem Source #
:: (HasCallStack, MonadIO m, IsMenuShell a, IsWidget b) | |
=> a |
|
-> b |
|
-> Bool |
|
-> m () |
Activates the menu item within the menu shell.
append
:: (HasCallStack, MonadIO m, IsMenuShell a, IsMenuItem b) | |
=> a |
|
-> b |
|
-> m () |
Adds a new MenuItem
to the end of the menu shell's
item list.
bindModel
:: (HasCallStack, MonadIO m, IsMenuShell a, IsMenuModel b) | |
=> a |
|
-> Maybe b |
|
-> Maybe Text |
|
-> Bool |
|
-> m () |
Establishes a binding between a MenuShell
and a MenuModel
.
The contents of shell
are removed and then refilled with menu items
according to model
. When model
changes, shell
is updated.
Calling this function twice on shell
with different model
will
cause the first binding to be replaced with a binding to the new
model. If model
is Nothing
then any previous binding is undone and
all children are removed.
withSeparators
determines if toplevel items (eg: sections) have
separators inserted between them. This is typically desired for
menus but doesn’t make sense for menubars.
If actionNamespace
is non-Nothing
then the effect is as if all
actions mentioned in the model
have their names prefixed with the
namespace, plus a dot. For example, if the action “quit” is
mentioned and actionNamespace
is “app” then the effective action
name is “app.quit”.
This function uses Actionable
to define the action name and
target values on the created menu items. If you want to use an
action group other than “app” and “win”, or if you want to use a
MenuShell
outside of a ApplicationWindow
, then you will need
to attach your own action group to the widget hierarchy using
widgetInsertActionGroup
. As an example, if you created a
group with a “quit” action and inserted it with the name “mygroup”
then you would use the action name “mygroup.quit” in your
MenuModel
.
For most cases you are probably better off using
menuNewFromModel
or menuBarNewFromModel
or just
directly passing the MenuModel
to applicationSetAppMenu
or
applicationSetMenubar
.
Since: 3.6
cancel
:: (HasCallStack, MonadIO m, IsMenuShell a) | |
=> a |
|
-> m () |
Cancels the selection within the menu shell.
Since: 2.4
deactivate
:: (HasCallStack, MonadIO m, IsMenuShell a) | |
=> a |
|
-> m () |
Deactivates the menu shell.
Typically this results in the menu shell being erased from the screen.
deselect
:: (HasCallStack, MonadIO m, IsMenuShell a) | |
=> a |
|
-> m () |
Deselects the currently selected item from the menu shell, if any.
getParentShell
menuShellGetParentShell Source #
:: (HasCallStack, MonadIO m, IsMenuShell a) | |
=> a |
|
-> m Widget | Returns: the parent |
getSelectedItem
menuShellGetSelectedItem Source #
:: (HasCallStack, MonadIO m, IsMenuShell a) | |
=> a |
|
-> m Widget | Returns: the currently selected item |
Gets the currently selected item.
Since: 3.0
getTakeFocus
menuShellGetTakeFocus Source #
:: (HasCallStack, MonadIO m, IsMenuShell a) | |
=> a |
|
-> m Bool | Returns: |
Returns True
if the menu shell will take the keyboard focus on popup.
Since: 2.8
insert
:: (HasCallStack, MonadIO m, IsMenuShell a, IsWidget b) | |
=> a |
|
-> b |
|
-> Int32 |
|
-> m () |
Adds a new MenuItem
to the menu shell’s item list
at the position indicated by position
.
prepend
:: (HasCallStack, MonadIO m, IsMenuShell a, IsWidget b) | |
=> a |
|
-> b |
|
-> m () |
Adds a new MenuItem
to the beginning of the menu shell's
item list.
selectFirst
:: (HasCallStack, MonadIO m, IsMenuShell a) | |
=> a |
|
-> Bool |
|
-> m () |
Select the first visible or selectable child of the menu shell; don’t select tearoff items unless the only item is a tearoff item.
Since: 2.2
selectItem
:: (HasCallStack, MonadIO m, IsMenuShell a, IsWidget b) | |
=> a |
|
-> b |
|
-> m () |
Selects the menu item from the menu shell.
setTakeFocus
menuShellSetTakeFocus Source #
:: (HasCallStack, MonadIO m, IsMenuShell a) | |
=> a |
|
-> Bool |
|
-> m () |
If takeFocus
is True
(the default) the menu shell will take
the keyboard focus so that it will receive all keyboard events
which is needed to enable keyboard navigation in menus.
Setting takeFocus
to False
is useful only for special applications
like virtual keyboard implementations which should not take keyboard
focus.
The takeFocus
state of a menu or menu bar is automatically
propagated to submenus whenever a submenu is popped up, so you
don’t have to worry about recursively setting it for your entire
menu hierarchy. Only when programmatically picking a submenu and
popping it up manually, the takeFocus
property of the submenu
needs to be set explicitly.
Note that setting it to False
has side-effects:
If the focus is in some other app, it keeps the focus and keynav in the menu doesn’t work. Consequently, keynav on the menu will only work if the focus is on some toplevel owned by the onscreen keyboard.
To avoid confusing the user, menus with takeFocus
set to False
should not display mnemonics or accelerators, since it cannot be
guaranteed that they will work.
See also keyboardGrab
Since: 2.8
Properties
takeFocus
A boolean that determines whether the menu and its submenus grab the
keyboard focus. See menuShellSetTakeFocus
and
menuShellGetTakeFocus
.
Since: 2.8
constructMenuShellTakeFocus :: IsMenuShell o => Bool -> IO (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “take-focus
” property. This is rarely needed directly, but it is used by new
.
getMenuShellTakeFocus :: (MonadIO m, IsMenuShell o) => o -> m Bool Source #
Get the value of the “take-focus
” property.
When overloading is enabled, this is equivalent to
get
menuShell #takeFocus
setMenuShellTakeFocus :: (MonadIO m, IsMenuShell o) => o -> Bool -> m () Source #
Set the value of the “take-focus
” property.
When overloading is enabled, this is equivalent to
set
menuShell [ #takeFocus:=
value ]
Signals
activateCurrent
type C_MenuShellActivateCurrentCallback = Ptr () -> CInt -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type MenuShellActivateCurrentCallback Source #
An action signal that activates the current menu item within the menu shell.
afterMenuShellActivateCurrent :: (IsMenuShell a, MonadIO m) => a -> MenuShellActivateCurrentCallback -> m SignalHandlerId Source #
Connect a signal handler for the activateCurrent signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
menuShell #activateCurrent callback
genClosure_MenuShellActivateCurrent :: MonadIO m => MenuShellActivateCurrentCallback -> m (GClosure C_MenuShellActivateCurrentCallback) Source #
Wrap the callback into a GClosure
.
mk_MenuShellActivateCurrentCallback :: C_MenuShellActivateCurrentCallback -> IO (FunPtr C_MenuShellActivateCurrentCallback) Source #
Generate a function pointer callable from C code, from a C_MenuShellActivateCurrentCallback
.
noMenuShellActivateCurrentCallback :: Maybe MenuShellActivateCurrentCallback Source #
A convenience synonym for
.Nothing
:: Maybe
MenuShellActivateCurrentCallback
onMenuShellActivateCurrent :: (IsMenuShell a, MonadIO m) => a -> MenuShellActivateCurrentCallback -> m SignalHandlerId Source #
Connect a signal handler for the activateCurrent signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
menuShell #activateCurrent callback
wrap_MenuShellActivateCurrentCallback :: MenuShellActivateCurrentCallback -> C_MenuShellActivateCurrentCallback Source #
cancel
type C_MenuShellCancelCallback = Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type MenuShellCancelCallback = IO () Source #
An action signal which cancels the selection within the menu shell. Causes the selectionDone signal to be emitted.
afterMenuShellCancel :: (IsMenuShell a, MonadIO m) => a -> MenuShellCancelCallback -> m SignalHandlerId Source #
Connect a signal handler for the cancel signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
menuShell #cancel callback
genClosure_MenuShellCancel :: MonadIO m => MenuShellCancelCallback -> m (GClosure C_MenuShellCancelCallback) Source #
Wrap the callback into a GClosure
.
mk_MenuShellCancelCallback :: C_MenuShellCancelCallback -> IO (FunPtr C_MenuShellCancelCallback) Source #
Generate a function pointer callable from C code, from a C_MenuShellCancelCallback
.
noMenuShellCancelCallback :: Maybe MenuShellCancelCallback Source #
A convenience synonym for
.Nothing
:: Maybe
MenuShellCancelCallback
onMenuShellCancel :: (IsMenuShell a, MonadIO m) => a -> MenuShellCancelCallback -> m SignalHandlerId Source #
Connect a signal handler for the cancel signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
menuShell #cancel callback
wrap_MenuShellCancelCallback :: MenuShellCancelCallback -> C_MenuShellCancelCallback Source #
Wrap a MenuShellCancelCallback
into a C_MenuShellCancelCallback
.
cycleFocus
type C_MenuShellCycleFocusCallback = Ptr () -> CUInt -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type MenuShellCycleFocusCallback Source #
= DirectionType |
|
-> IO () |
A keybinding signal which moves the focus in the
given direction
.
afterMenuShellCycleFocus :: (IsMenuShell a, MonadIO m) => a -> MenuShellCycleFocusCallback -> m SignalHandlerId Source #
Connect a signal handler for the cycleFocus signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
menuShell #cycleFocus callback
genClosure_MenuShellCycleFocus :: MonadIO m => MenuShellCycleFocusCallback -> m (GClosure C_MenuShellCycleFocusCallback) Source #
Wrap the callback into a GClosure
.
mk_MenuShellCycleFocusCallback :: C_MenuShellCycleFocusCallback -> IO (FunPtr C_MenuShellCycleFocusCallback) Source #
Generate a function pointer callable from C code, from a C_MenuShellCycleFocusCallback
.
noMenuShellCycleFocusCallback :: Maybe MenuShellCycleFocusCallback Source #
A convenience synonym for
.Nothing
:: Maybe
MenuShellCycleFocusCallback
onMenuShellCycleFocus :: (IsMenuShell a, MonadIO m) => a -> MenuShellCycleFocusCallback -> m SignalHandlerId Source #
Connect a signal handler for the cycleFocus signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
menuShell #cycleFocus callback
wrap_MenuShellCycleFocusCallback :: MenuShellCycleFocusCallback -> C_MenuShellCycleFocusCallback Source #
Wrap a MenuShellCycleFocusCallback
into a C_MenuShellCycleFocusCallback
.
deactivate
type C_MenuShellDeactivateCallback = Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type MenuShellDeactivateCallback = IO () Source #
This signal is emitted when a menu shell is deactivated.
afterMenuShellDeactivate :: (IsMenuShell a, MonadIO m) => a -> MenuShellDeactivateCallback -> m SignalHandlerId Source #
Connect a signal handler for the deactivate signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
menuShell #deactivate callback
genClosure_MenuShellDeactivate :: MonadIO m => MenuShellDeactivateCallback -> m (GClosure C_MenuShellDeactivateCallback) Source #
Wrap the callback into a GClosure
.
mk_MenuShellDeactivateCallback :: C_MenuShellDeactivateCallback -> IO (FunPtr C_MenuShellDeactivateCallback) Source #
Generate a function pointer callable from C code, from a C_MenuShellDeactivateCallback
.
noMenuShellDeactivateCallback :: Maybe MenuShellDeactivateCallback Source #
A convenience synonym for
.Nothing
:: Maybe
MenuShellDeactivateCallback
onMenuShellDeactivate :: (IsMenuShell a, MonadIO m) => a -> MenuShellDeactivateCallback -> m SignalHandlerId Source #
Connect a signal handler for the deactivate signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
menuShell #deactivate callback
wrap_MenuShellDeactivateCallback :: MenuShellDeactivateCallback -> C_MenuShellDeactivateCallback Source #
Wrap a MenuShellDeactivateCallback
into a C_MenuShellDeactivateCallback
.
insert
type C_MenuShellInsertCallback = Ptr () -> Ptr Widget -> Int32 -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
afterMenuShellInsert :: (IsMenuShell a, MonadIO m) => a -> MenuShellInsertCallback -> m SignalHandlerId Source #
Connect a signal handler for the insert signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
menuShell #insert callback
genClosure_MenuShellInsert :: MonadIO m => MenuShellInsertCallback -> m (GClosure C_MenuShellInsertCallback) Source #
Wrap the callback into a GClosure
.
mk_MenuShellInsertCallback :: C_MenuShellInsertCallback -> IO (FunPtr C_MenuShellInsertCallback) Source #
Generate a function pointer callable from C code, from a C_MenuShellInsertCallback
.
noMenuShellInsertCallback :: Maybe MenuShellInsertCallback Source #
A convenience synonym for
.Nothing
:: Maybe
MenuShellInsertCallback
onMenuShellInsert :: (IsMenuShell a, MonadIO m) => a -> MenuShellInsertCallback -> m SignalHandlerId Source #
Connect a signal handler for the insert signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
menuShell #insert callback
wrap_MenuShellInsertCallback :: MenuShellInsertCallback -> C_MenuShellInsertCallback Source #
Wrap a MenuShellInsertCallback
into a C_MenuShellInsertCallback
.
moveCurrent
type C_MenuShellMoveCurrentCallback = Ptr () -> CUInt -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type MenuShellMoveCurrentCallback Source #
= MenuDirectionType |
|
-> IO () |
An keybinding signal which moves the current menu item
in the direction specified by direction
.
afterMenuShellMoveCurrent :: (IsMenuShell a, MonadIO m) => a -> MenuShellMoveCurrentCallback -> m SignalHandlerId Source #
Connect a signal handler for the moveCurrent signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
menuShell #moveCurrent callback
genClosure_MenuShellMoveCurrent :: MonadIO m => MenuShellMoveCurrentCallback -> m (GClosure C_MenuShellMoveCurrentCallback) Source #
Wrap the callback into a GClosure
.
mk_MenuShellMoveCurrentCallback :: C_MenuShellMoveCurrentCallback -> IO (FunPtr C_MenuShellMoveCurrentCallback) Source #
Generate a function pointer callable from C code, from a C_MenuShellMoveCurrentCallback
.
noMenuShellMoveCurrentCallback :: Maybe MenuShellMoveCurrentCallback Source #
A convenience synonym for
.Nothing
:: Maybe
MenuShellMoveCurrentCallback
onMenuShellMoveCurrent :: (IsMenuShell a, MonadIO m) => a -> MenuShellMoveCurrentCallback -> m SignalHandlerId Source #
Connect a signal handler for the moveCurrent signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
menuShell #moveCurrent callback
wrap_MenuShellMoveCurrentCallback :: MenuShellMoveCurrentCallback -> C_MenuShellMoveCurrentCallback Source #
Wrap a MenuShellMoveCurrentCallback
into a C_MenuShellMoveCurrentCallback
.
moveSelected
type C_MenuShellMoveSelectedCallback = Ptr () -> Int32 -> Ptr () -> IO CInt Source #
Type for the callback on the (unwrapped) C side.
type MenuShellMoveSelectedCallback Source #
= Int32 |
|
-> IO Bool | Returns: |
The moveSelected signal is emitted to move the selection to another item.
Since: 2.12
afterMenuShellMoveSelected :: (IsMenuShell a, MonadIO m) => a -> MenuShellMoveSelectedCallback -> m SignalHandlerId Source #
Connect a signal handler for the moveSelected signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
menuShell #moveSelected callback
genClosure_MenuShellMoveSelected :: MonadIO m => MenuShellMoveSelectedCallback -> m (GClosure C_MenuShellMoveSelectedCallback) Source #
Wrap the callback into a GClosure
.
mk_MenuShellMoveSelectedCallback :: C_MenuShellMoveSelectedCallback -> IO (FunPtr C_MenuShellMoveSelectedCallback) Source #
Generate a function pointer callable from C code, from a C_MenuShellMoveSelectedCallback
.
noMenuShellMoveSelectedCallback :: Maybe MenuShellMoveSelectedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
MenuShellMoveSelectedCallback
onMenuShellMoveSelected :: (IsMenuShell a, MonadIO m) => a -> MenuShellMoveSelectedCallback -> m SignalHandlerId Source #
Connect a signal handler for the moveSelected signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
menuShell #moveSelected callback
wrap_MenuShellMoveSelectedCallback :: MenuShellMoveSelectedCallback -> C_MenuShellMoveSelectedCallback Source #
Wrap a MenuShellMoveSelectedCallback
into a C_MenuShellMoveSelectedCallback
.
selectionDone
type C_MenuShellSelectionDoneCallback = Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type MenuShellSelectionDoneCallback = IO () Source #
This signal is emitted when a selection has been completed within a menu shell.
afterMenuShellSelectionDone :: (IsMenuShell a, MonadIO m) => a -> MenuShellSelectionDoneCallback -> m SignalHandlerId Source #
Connect a signal handler for the selectionDone signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
menuShell #selectionDone callback
genClosure_MenuShellSelectionDone :: MonadIO m => MenuShellSelectionDoneCallback -> m (GClosure C_MenuShellSelectionDoneCallback) Source #
Wrap the callback into a GClosure
.
mk_MenuShellSelectionDoneCallback :: C_MenuShellSelectionDoneCallback -> IO (FunPtr C_MenuShellSelectionDoneCallback) Source #
Generate a function pointer callable from C code, from a C_MenuShellSelectionDoneCallback
.
noMenuShellSelectionDoneCallback :: Maybe MenuShellSelectionDoneCallback Source #
A convenience synonym for
.Nothing
:: Maybe
MenuShellSelectionDoneCallback
onMenuShellSelectionDone :: (IsMenuShell a, MonadIO m) => a -> MenuShellSelectionDoneCallback -> m SignalHandlerId Source #
Connect a signal handler for the selectionDone signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
menuShell #selectionDone callback