Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
- Exported types
- Methods
- childAddPosition
- childAppend
- childDelete
- childFind
- childPrepend
- childReorder
- findId
- foreach
- getChildren
- getId
- getParent
- getPosition
- getPositionRealized
- getRoot
- handleEvent
- new
- newWithId
- propertiesCopy
- propertiesList
- propertyExist
- propertyGet
- propertyGetBool
- propertyGetByteArray
- propertyGetInt
- propertyGetVariant
- propertyRemove
- propertySet
- propertySetBool
- propertySetByteArray
- propertySetInt
- propertySetVariant
- sendAboutToShow
- setParent
- setRoot
- showToUser
- takeChildren
- unparent
- Properties
- Signals
This is the Object
based object that represents a menu
item. It gets created the same on both the client and
the server side and libdbusmenu-glib does the work of making
this object model appear on both sides of DBus. Simple
really, though through updates and people coming on and off
the bus it can lead to lots of fun complex scenarios.
Synopsis
- newtype Menuitem = Menuitem (ManagedPtr Menuitem)
- class (GObject o, IsDescendantOf Menuitem o) => IsMenuitem o
- toMenuitem :: (MonadIO m, IsMenuitem o) => o -> m Menuitem
- menuitemChildAddPosition :: (HasCallStack, MonadIO m, IsMenuitem a, IsMenuitem b) => a -> b -> Word32 -> m Bool
- menuitemChildAppend :: (HasCallStack, MonadIO m, IsMenuitem a, IsMenuitem b) => a -> b -> m Bool
- menuitemChildDelete :: (HasCallStack, MonadIO m, IsMenuitem a, IsMenuitem b) => a -> b -> m Bool
- menuitemChildFind :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> Int32 -> m (Maybe Menuitem)
- menuitemChildPrepend :: (HasCallStack, MonadIO m, IsMenuitem a, IsMenuitem b) => a -> b -> m Bool
- menuitemChildReorder :: (HasCallStack, MonadIO m, IsMenuitem a, IsMenuitem b) => a -> b -> Word32 -> m Bool
- menuitemFindId :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> Int32 -> m (Maybe Menuitem)
- menuitemForeach :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> Ptr () -> Ptr () -> m ()
- menuitemGetChildren :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> m [Menuitem]
- menuitemGetId :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> m Int32
- menuitemGetParent :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> m Menuitem
- menuitemGetPosition :: (HasCallStack, MonadIO m, IsMenuitem a, IsMenuitem b) => a -> b -> m Word32
- menuitemGetPositionRealized :: (HasCallStack, MonadIO m, IsMenuitem a, IsMenuitem b) => a -> b -> m Word32
- menuitemGetRoot :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> m Bool
- menuitemHandleEvent :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> Text -> GVariant -> Word32 -> m ()
- menuitemNew :: (HasCallStack, MonadIO m) => m Menuitem
- menuitemNewWithId :: (HasCallStack, MonadIO m) => Int32 -> m Menuitem
- menuitemPropertiesCopy :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> m (Map (Ptr ()) (Ptr ()))
- menuitemPropertiesList :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> m [Text]
- menuitemPropertyExist :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> Text -> m Bool
- menuitemPropertyGet :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> Text -> m (Maybe Text)
- menuitemPropertyGetBool :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> Text -> m Bool
- menuitemPropertyGetByteArray :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> Text -> m (Maybe ByteString)
- menuitemPropertyGetInt :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> Text -> m Int32
- menuitemPropertyGetVariant :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> Text -> m (Maybe GVariant)
- menuitemPropertyRemove :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> Text -> m ()
- menuitemPropertySet :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> Text -> Text -> m Bool
- menuitemPropertySetBool :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> Text -> Bool -> m Bool
- menuitemPropertySetByteArray :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> Text -> Word8 -> Word64 -> m Bool
- menuitemPropertySetInt :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> Text -> Int32 -> m Bool
- menuitemPropertySetVariant :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> Text -> GVariant -> m Bool
- menuitemSendAboutToShow :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> Ptr () -> Ptr () -> m ()
- menuitemSetParent :: (HasCallStack, MonadIO m, IsMenuitem a, IsMenuitem b) => a -> b -> m Bool
- menuitemSetRoot :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> Bool -> m ()
- menuitemShowToUser :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> Word32 -> m ()
- menuitemTakeChildren :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> m [Menuitem]
- menuitemUnparent :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> m Bool
- constructMenuitemId :: (IsMenuitem o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getMenuitemId :: (MonadIO m, IsMenuitem o) => o -> m Int32
- type MenuitemAboutToShowCallback = IO Bool
- afterMenuitemAboutToShow :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemAboutToShowCallback) -> m SignalHandlerId
- onMenuitemAboutToShow :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemAboutToShowCallback) -> m SignalHandlerId
- type MenuitemChildAddedCallback = Object -> Word32 -> IO ()
- afterMenuitemChildAdded :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemChildAddedCallback) -> m SignalHandlerId
- onMenuitemChildAdded :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemChildAddedCallback) -> m SignalHandlerId
- type MenuitemChildMovedCallback = Object -> Word32 -> Word32 -> IO ()
- afterMenuitemChildMoved :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemChildMovedCallback) -> m SignalHandlerId
- onMenuitemChildMoved :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemChildMovedCallback) -> m SignalHandlerId
- type MenuitemChildRemovedCallback = Object -> IO ()
- afterMenuitemChildRemoved :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemChildRemovedCallback) -> m SignalHandlerId
- onMenuitemChildRemoved :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemChildRemovedCallback) -> m SignalHandlerId
- type MenuitemEventCallback = Text -> GVariant -> Word32 -> IO Bool
- afterMenuitemEvent :: (IsMenuitem a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => MenuitemEventCallback) -> m SignalHandlerId
- onMenuitemEvent :: (IsMenuitem a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => MenuitemEventCallback) -> m SignalHandlerId
- type MenuitemItemActivatedCallback = Word32 -> IO ()
- afterMenuitemItemActivated :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemItemActivatedCallback) -> m SignalHandlerId
- onMenuitemItemActivated :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemItemActivatedCallback) -> m SignalHandlerId
- type MenuitemPropertyChangedCallback = Text -> GVariant -> IO ()
- afterMenuitemPropertyChanged :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemPropertyChangedCallback) -> m SignalHandlerId
- onMenuitemPropertyChanged :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemPropertyChangedCallback) -> m SignalHandlerId
- type MenuitemRealizedCallback = IO ()
- afterMenuitemRealized :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemRealizedCallback) -> m SignalHandlerId
- onMenuitemRealized :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemRealizedCallback) -> m SignalHandlerId
- type MenuitemShowToUserCallback = Word32 -> IO ()
- afterMenuitemShowToUser :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemShowToUserCallback) -> m SignalHandlerId
- onMenuitemShowToUser :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemShowToUserCallback) -> m SignalHandlerId
Exported types
Memory-managed wrapper type.
Instances
Eq Menuitem Source # | |
GObject Menuitem Source # | |
Defined in GI.Dbusmenu.Objects.Menuitem | |
ManagedPtrNewtype Menuitem Source # | |
Defined in GI.Dbusmenu.Objects.Menuitem toManagedPtr :: Menuitem -> ManagedPtr Menuitem | |
TypedObject Menuitem Source # | |
Defined in GI.Dbusmenu.Objects.Menuitem | |
HasParentTypes Menuitem Source # | |
Defined in GI.Dbusmenu.Objects.Menuitem | |
IsGValue (Maybe Menuitem) Source # | Convert |
Defined in GI.Dbusmenu.Objects.Menuitem gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Menuitem -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Menuitem) | |
type ParentTypes Menuitem Source # | |
Defined in GI.Dbusmenu.Objects.Menuitem type ParentTypes Menuitem = '[Object] |
class (GObject o, IsDescendantOf Menuitem o) => IsMenuitem o Source #
Type class for types which can be safely cast to Menuitem
, for instance with toMenuitem
.
Instances
(GObject o, IsDescendantOf Menuitem o) => IsMenuitem o Source # | |
Defined in GI.Dbusmenu.Objects.Menuitem |
toMenuitem :: (MonadIO m, IsMenuitem o) => o -> m Menuitem Source #
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, childAddPosition, childAppend, childDelete, childFind, childPrepend, childReorder, findId, forceFloating, foreach, freezeNotify, getv, handleEvent, isFloating, notify, notifyByPspec, propertiesCopy, propertiesList, propertyExist, propertyGet, propertyGetBool, propertyGetByteArray, propertyGetInt, propertyGetVariant, propertyRemove, propertySet, propertySetBool, propertySetByteArray, propertySetInt, propertySetVariant, ref, refSink, runDispose, sendAboutToShow, showToUser, stealData, stealQdata, takeChildren, thawNotify, unparent, unref, watchClosure.
Getters
getChildren, getData, getId, getParent, getPosition, getPositionRealized, getProperty, getQdata, getRoot.
Setters
childAddPosition
menuitemChildAddPosition Source #
:: (HasCallStack, MonadIO m, IsMenuitem a, IsMenuitem b) | |
=> a |
|
-> b |
|
-> Word32 |
|
-> m Bool | Returns: Whether |
Puts child
in the list of children for mi
at the location
specified in position
. If there is not enough entires available
then child
will be placed at the end of the list.
childAppend
:: (HasCallStack, MonadIO m, IsMenuitem a, IsMenuitem b) | |
=> a |
|
-> b |
|
-> m Bool | Returns: Whether the child has been added successfully. |
This function adds child
to the list of children on mi
at
the end of that list.
childDelete
:: (HasCallStack, MonadIO m, IsMenuitem a, IsMenuitem b) | |
=> a |
|
-> b |
|
-> m Bool | Returns: If we were able to delete |
This function removes child
from the children list of mi
. It does
not call g_object_unref
on child
.
childFind
:: (HasCallStack, MonadIO m, IsMenuitem a) | |
=> a |
|
-> Int32 |
|
-> m (Maybe Menuitem) | Returns: The menu item with the ID |
Search the children of mi
to find one with the ID of id
.
If it doesn't exist then we return NULL
.
childPrepend
:: (HasCallStack, MonadIO m, IsMenuitem a, IsMenuitem b) | |
=> a |
|
-> b |
|
-> m Bool | Returns: Whether the child has been added successfully. |
This function adds child
to the list of children on mi
at
the beginning of that list.
childReorder
:: (HasCallStack, MonadIO m, IsMenuitem a, IsMenuitem b) | |
=> a |
|
-> b |
|
-> Word32 |
|
-> m Bool | Returns: Whether the move was successful. |
This function moves a child on the list of children. It is for a child that is already in the list, but simply needs a new location.
findId
:: (HasCallStack, MonadIO m, IsMenuitem a) | |
=> a |
|
-> Int32 |
|
-> m (Maybe Menuitem) | Returns: The |
This function searchs the whole tree of children that
are attached to mi
. This could be quite a few nodes, all
the way down the tree. It is a depth first search.
foreach
:: (HasCallStack, MonadIO m, IsMenuitem a) | |
=> a |
|
-> Ptr () |
|
-> Ptr () |
|
-> m () |
This calls the function func
on this menu item and all
of the children of this item. And their children. And
their children. And... you get the point. It will get
called on the whole tree.
getChildren
:: (HasCallStack, MonadIO m, IsMenuitem a) | |
=> a |
|
-> m [Menuitem] |
Returns simply the list of children that this menu item has. The list is valid until another child related function is called, where it might be changed.
getId
:: (HasCallStack, MonadIO m, IsMenuitem a) | |
=> a |
|
-> m Int32 | Returns: The ID of the |
Gets the unique ID for mi
.
getParent
:: (HasCallStack, MonadIO m, IsMenuitem a) | |
=> a |
|
-> m Menuitem | Returns: The parent of this menu item |
This function looks up the parent of mi
getPosition
:: (HasCallStack, MonadIO m, IsMenuitem a, IsMenuitem b) | |
=> a |
|
-> b |
|
-> m Word32 | Returns: The position of |
This function returns the position of the menu item mi
in the children of parent
. It will return zero if the
menu item can't be found.
getPositionRealized
menuitemGetPositionRealized Source #
:: (HasCallStack, MonadIO m, IsMenuitem a, IsMenuitem b) | |
=> a |
|
-> b |
|
-> m Word32 | Returns: The position of |
This function is very similar to dbusmenu_menuitem_get_position
except that it only counts in the children that have been realized.
getRoot
:: (HasCallStack, MonadIO m, IsMenuitem a) | |
=> a |
|
-> m Bool | Returns: |
This function returns the internal value of whether this is a root node or not.
handleEvent
:: (HasCallStack, MonadIO m, IsMenuitem a) | |
=> a |
|
-> Text |
|
-> GVariant |
|
-> Word32 |
|
-> m () |
This function is called to create an event. It is likely to be overrided by subclasses. The default menu item will respond to the activate signal and do:
Emits the Menuitem
::item-activate
signal on this
menu item. Called by server objects when they get the
appropriate DBus signals from the client.
If you subclass this function you should really think about calling the parent function unless you have a good reason not to.
new
:: (HasCallStack, MonadIO m) | |
=> m Menuitem | Returns: A newly allocated |
Create a new Menuitem
with all default values.
newWithId
:: (HasCallStack, MonadIO m) | |
=> Int32 |
|
-> m Menuitem | Returns: A newly allocated |
This creates a blank Menuitem
with a specific ID.
propertiesCopy
menuitemPropertiesCopy Source #
:: (HasCallStack, MonadIO m, IsMenuitem a) | |
=> a |
|
-> m (Map (Ptr ()) (Ptr ())) | Returns: A brand new |
This function takes the properties of a Menuitem
and puts them into a HashTable
that is referenced by the
key of a string and has the value of a string. The hash
table may not have any entries if there aren't any or there
is an error in processing. It is the caller's responsibility
to destroy the created HashTable
.
propertiesList
menuitemPropertiesList Source #
:: (HasCallStack, MonadIO m, IsMenuitem a) | |
=> a |
|
-> m [Text] | Returns: A list of strings or NULL if there are none. |
This functiong gets a list of the names of all the properties
that are set on this menu item. This data on the list is owned
by the menuitem but the list is not and should be freed using
g_list_free()
when the calling function is done with it.
propertyExist
menuitemPropertyExist Source #
:: (HasCallStack, MonadIO m, IsMenuitem a) | |
=> a |
|
-> Text |
|
-> m Bool | Returns: A boolean checking to see if the property is available |
Checkes to see if a particular property exists on mi
and
returns TRUE
if so.
propertyGet
:: (HasCallStack, MonadIO m, IsMenuitem a) | |
=> a |
|
-> Text |
|
-> m (Maybe Text) | Returns: A string with the value of the property
that shouldn't be free'd. Or |
Look up a property on mi
and return the value of it if
it exits. NULL
will be returned if the property doesn't
exist.
propertyGetBool
menuitemPropertyGetBool Source #
:: (HasCallStack, MonadIO m, IsMenuitem a) | |
=> a |
|
-> Text |
|
-> m Bool | Returns: The value of the property or |
Look up a property on mi
and return the value of it if
it exits. Returns FALSE
if the property doesn't exist.
propertyGetByteArray
menuitemPropertyGetByteArray Source #
:: (HasCallStack, MonadIO m, IsMenuitem a) | |
=> a |
|
-> Text |
|
-> m (Maybe ByteString) | Returns: A byte array with the
value of the property that shouldn't be free'd. Or |
Look up a property on mi
and return the value of it if
it exits. NULL
will be returned if the property doesn't
exist.
propertyGetInt
menuitemPropertyGetInt Source #
:: (HasCallStack, MonadIO m, IsMenuitem a) | |
=> a |
|
-> Text |
|
-> m Int32 | Returns: The value of the property or zero. |
Look up a property on mi
and return the value of it if
it exits. Returns zero if the property doesn't exist.
propertyGetVariant
menuitemPropertyGetVariant Source #
:: (HasCallStack, MonadIO m, IsMenuitem a) | |
=> a |
|
-> Text |
|
-> m (Maybe GVariant) | Returns: A GVariant for the property. |
Look up a property on mi
and return the value of it if
it exits. NULL
will be returned if the property doesn't
exist.
propertyRemove
menuitemPropertyRemove Source #
:: (HasCallStack, MonadIO m, IsMenuitem a) | |
=> a |
|
-> Text |
|
-> m () |
Removes a property from the menuitem.
propertySet
:: (HasCallStack, MonadIO m, IsMenuitem a) | |
=> a |
|
-> Text |
|
-> Text |
|
-> m Bool | Returns: A boolean representing if the property value was set. |
Takes the pair of property
and value
and places them as a
property on mi
. If a property already exists by that name,
then the value is set to the new value. If not, the property
is added. If the value is changed or the property was previously
unset then the signal Menuitem
::prop-changed
will be
emitted by this function.
propertySetBool
menuitemPropertySetBool Source #
:: (HasCallStack, MonadIO m, IsMenuitem a) | |
=> a |
|
-> Text |
|
-> Bool |
|
-> m Bool | Returns: A boolean representing if the property value was set. |
Takes a boolean value
and sets it on property
as a
property on mi
. If a property already exists by that name,
then the value is set to the new value. If not, the property
is added. If the value is changed or the property was previously
unset then the signal Menuitem
::prop-changed
will be
emitted by this function.
propertySetByteArray
menuitemPropertySetByteArray Source #
:: (HasCallStack, MonadIO m, IsMenuitem a) | |
=> a |
|
-> Text |
|
-> Word8 |
|
-> Word64 |
|
-> m Bool | Returns: A boolean representing if the property value was set. |
Takes a byte array value
and sets it on property
as a
property on mi
. If a property already exists by that name,
then the value is set to the new value. If not, the property
is added. If the value is changed or the property was previously
unset then the signal Menuitem
::prop-changed
will be
emitted by this function.
propertySetInt
menuitemPropertySetInt Source #
:: (HasCallStack, MonadIO m, IsMenuitem a) | |
=> a |
|
-> Text |
|
-> Int32 |
|
-> m Bool | Returns: A boolean representing if the property value was set. |
Takes a boolean value
and sets it on property
as a
property on mi
. If a property already exists by that name,
then the value is set to the new value. If not, the property
is added. If the value is changed or the property was previously
unset then the signal Menuitem
::prop-changed
will be
emitted by this function.
propertySetVariant
menuitemPropertySetVariant Source #
:: (HasCallStack, MonadIO m, IsMenuitem a) | |
=> a |
|
-> Text |
|
-> GVariant |
|
-> m Bool | Returns: A boolean representing if the property value was set. |
Takes the pair of property
and value
and places them as a
property on mi
. If a property already exists by that name,
then the value is set to the new value. If not, the property
is added. If the value is changed or the property was previously
unset then the signal Menuitem
::prop-changed
will be
emitted by this function.
sendAboutToShow
menuitemSendAboutToShow Source #
:: (HasCallStack, MonadIO m, IsMenuitem a) | |
=> a |
|
-> Ptr () |
|
-> Ptr () |
|
-> m () |
This function is used to send the even that the submenu of this item is about to be shown. Callers to this event should delay showing the menu until their callback is called if possible.
setParent
:: (HasCallStack, MonadIO m, IsMenuitem a, IsMenuitem b) | |
=> a |
|
-> b |
|
-> m Bool | Returns: Whether the parent was set successfully |
Sets the parent of mi
to parent
. If mi
already
has a parent, then this call will fail. The parent will
be set automatically when using the usual methods to add a
child menuitem, so this function should not normally be
called directly
setRoot
:: (HasCallStack, MonadIO m, IsMenuitem a) | |
=> a |
|
-> Bool |
|
-> m () |
This function sets the internal value of whether this is a root node or not.
showToUser
:: (HasCallStack, MonadIO m, IsMenuitem a) | |
=> a |
|
-> Word32 |
|
-> m () |
Signals that this menu item should be shown to the user. If this is server side the server will then take it and send it over the bus.
takeChildren
:: (HasCallStack, MonadIO m, IsMenuitem a) | |
=> a |
|
-> m [Menuitem] |
While the name sounds devious that's exactly what this function
does. It takes the list of children from the mi
and clears the
internal list. The calling function is now in charge of the ref's
on the children it has taken. A lot of responsibility involved
in taking children.
unparent
:: (HasCallStack, MonadIO m, IsMenuitem a) | |
=> a |
|
-> m Bool | Returns: Whether the menu item was unparented successfully |
Unparents the menu item mi
. If mi
doesn't have a
parent, then this call will fail. The menuitem will
be unparented automatically when using the usual methods
to delete a child menuitem, so this function should not
normally be called directly
Properties
id
No description available in the introspection data.
constructMenuitemId :: (IsMenuitem o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “id
” property. This is rarely needed directly, but it is used by new
.
getMenuitemId :: (MonadIO m, IsMenuitem o) => o -> m Int32 Source #
Get the value of the “id
” property.
When overloading is enabled, this is equivalent to
get
menuitem #id
Signals
aboutToShow
type MenuitemAboutToShowCallback = IO Bool Source #
Emitted when the submenu for this item is about to be shown
afterMenuitemAboutToShow :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemAboutToShowCallback) -> m SignalHandlerId Source #
Connect a signal handler for the aboutToShow signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
menuitem #aboutToShow callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onMenuitemAboutToShow :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemAboutToShowCallback) -> m SignalHandlerId Source #
Connect a signal handler for the aboutToShow signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
menuitem #aboutToShow callback
childAdded
type MenuitemChildAddedCallback Source #
= Object |
|
-> Word32 |
|
-> IO () |
Signaled when the child menuitem has been added to the parent.
afterMenuitemChildAdded :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemChildAddedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the childAdded signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
menuitem #childAdded callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onMenuitemChildAdded :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemChildAddedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the childAdded signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
menuitem #childAdded callback
childMoved
type MenuitemChildMovedCallback Source #
= Object |
|
-> Word32 |
|
-> Word32 |
|
-> IO () |
Signaled when the child menuitem has had its location in the list change.
afterMenuitemChildMoved :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemChildMovedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the childMoved signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
menuitem #childMoved callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onMenuitemChildMoved :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemChildMovedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the childMoved signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
menuitem #childMoved callback
childRemoved
type MenuitemChildRemovedCallback Source #
Signaled when the child menuitem has been requested to
be removed from the parent. This signal is called when
it has been removed from the list but not yet had
g_object_unref
called on it.
afterMenuitemChildRemoved :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemChildRemovedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the childRemoved signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
menuitem #childRemoved callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onMenuitemChildRemoved :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemChildRemovedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the childRemoved signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
menuitem #childRemoved callback
event
type MenuitemEventCallback Source #
= Text |
|
-> GVariant |
|
-> Word32 |
|
-> IO Bool |
Emitted when an event is passed through. The event is signalled after handle_event is called.
afterMenuitemEvent :: (IsMenuitem a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => MenuitemEventCallback) -> m SignalHandlerId Source #
Connect a signal handler for the event signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
menuitem #event callback
This signal admits a optional parameter detail
.
If it's not Nothing
, we will connect to “event::detail
” instead.
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onMenuitemEvent :: (IsMenuitem a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => MenuitemEventCallback) -> m SignalHandlerId Source #
Connect a signal handler for the event signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
menuitem #event callback
This signal admits a optional parameter detail
.
If it's not Nothing
, we will connect to “event::detail
” instead.
itemActivated
type MenuitemItemActivatedCallback Source #
Emitted on the objects on the server side when they are signaled on the client side.
afterMenuitemItemActivated :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemItemActivatedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the itemActivated signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
menuitem #itemActivated callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onMenuitemItemActivated :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemItemActivatedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the itemActivated signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
menuitem #itemActivated callback
propertyChanged
type MenuitemPropertyChangedCallback Source #
= Text |
|
-> GVariant |
|
-> IO () |
Emitted everytime a property on a menuitem is either updated or added.
afterMenuitemPropertyChanged :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemPropertyChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the propertyChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
menuitem #propertyChanged callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onMenuitemPropertyChanged :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemPropertyChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the propertyChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
menuitem #propertyChanged callback
realized
type MenuitemRealizedCallback = IO () Source #
Emitted when the initial request for properties is complete on the item. If there is a type handler configured for the "type" parameter that will be executed before this is signaled.
afterMenuitemRealized :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemRealizedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the realized signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
menuitem #realized callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onMenuitemRealized :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemRealizedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the realized signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
menuitem #realized callback
showToUser
type MenuitemShowToUserCallback Source #
Signaled when the application would like the visualization of this menu item shown to the user. This usually requires going over the bus to get it done.
afterMenuitemShowToUser :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemShowToUserCallback) -> m SignalHandlerId Source #
Connect a signal handler for the showToUser signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
menuitem #showToUser callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onMenuitemShowToUser :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemShowToUserCallback) -> m SignalHandlerId Source #
Connect a signal handler for the showToUser signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
menuitem #showToUser callback