-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Dbusmenu bindings
--   
--   Bindings for libdbusmenu, autogenerated by haskell-gi.
@package gi-dbusmenu
@version 0.4.1


module GI.Dbusmenu.Constants

-- | String to attach to signal
--   <a>Server</a>::<tt><i>layout-updated</i></tt>
pattern SERVER_SIGNAL_LAYOUT_UPDATED :: () => () => Text

-- | String to attach to signal
--   <a>Server</a>::<tt><i>item-activation-requested</i></tt>
pattern SERVER_SIGNAL_ITEM_ACTIVATION :: () => () => Text

-- | String to attach to signal <a>Server</a>::<tt><i>item-updated</i></tt>
pattern SERVER_SIGNAL_ID_UPDATE :: () => () => Text

-- | String to attach to signal
--   <a>Server</a>::<tt><i>item-property-updated</i></tt>
pattern SERVER_SIGNAL_ID_PROP_UPDATE :: () => () => Text

-- | String to access property <a>Server</a>:<tt><i>version</i></tt>
pattern SERVER_PROP_VERSION :: () => () => Text

-- | String to access property <a>Server</a>:<tt><i>text-direction</i></tt>
pattern SERVER_PROP_TEXT_DIRECTION :: () => () => Text

-- | String to access property <a>Server</a>:<tt><i>status</i></tt>
pattern SERVER_PROP_STATUS :: () => () => Text

-- | String to access property <a>Server</a>:<tt><i>root-node</i></tt>
pattern SERVER_PROP_ROOT_NODE :: () => () => Text

-- | String to access property <a>Server</a>:<tt><i>dbus-object</i></tt>
pattern SERVER_PROP_DBUS_OBJECT :: () => () => Text

-- | Used to set <a>MENUITEM_PROP_TOGGLE_STATE</a> so that the menu's
--   toggle item is undecided.
pattern MENUITEM_TOGGLE_STATE_UNKNOWN :: () => () => Int32

-- | Used to set <a>MENUITEM_PROP_TOGGLE_STATE</a> so that the menu's
--   toggle item is empty.
pattern MENUITEM_TOGGLE_STATE_UNCHECKED :: () => () => Int32

-- | Used to set <a>MENUITEM_PROP_TOGGLE_STATE</a> so that the menu's
--   toggle item is filled.
pattern MENUITEM_TOGGLE_STATE_CHECKED :: () => () => Int32

-- | Used to set <a>MENUITEM_PROP_TOGGLE_TYPE</a> to be a standard radio
--   item.
pattern MENUITEM_TOGGLE_RADIO :: () => () => Text

-- | Used to set <a>MENUITEM_PROP_TOGGLE_TYPE</a> to be a standard check
--   mark item.
pattern MENUITEM_TOGGLE_CHECK :: () => () => Text

-- | String to attach to signal <a>Server</a>::<tt><i>show-to-user</i></tt>
pattern MENUITEM_SIGNAL_SHOW_TO_USER :: () => () => Text

-- | String to attach to signal <a>Server</a>::<tt><i>realized</i></tt>
pattern MENUITEM_SIGNAL_REALIZED :: () => () => Text

-- | String to attach to signal
--   <a>Server</a>::<tt><i>property-changed</i></tt>
pattern MENUITEM_SIGNAL_PROPERTY_CHANGED :: () => () => Text

-- | String to attach to signal
--   <a>Server</a>::<tt><i>item-activated</i></tt>
pattern MENUITEM_SIGNAL_ITEM_ACTIVATED :: () => () => Text

-- | String to attach to signal <a>Server</a>::<tt><i>event</i></tt>
pattern MENUITEM_SIGNAL_EVENT :: () => () => Text

-- | String to attach to signal
--   <a>Server</a>::<tt><i>child-removed</i></tt>
pattern MENUITEM_SIGNAL_CHILD_REMOVED :: () => () => Text

-- | String to attach to signal <a>Server</a>::<tt><i>child-moved</i></tt>
pattern MENUITEM_SIGNAL_CHILD_MOVED :: () => () => Text

-- | String to attach to signal <a>Server</a>::<tt><i>child-added</i></tt>
pattern MENUITEM_SIGNAL_CHILD_ADDED :: () => () => Text

-- | String to attach to signal
--   <a>Server</a>::<tt><i>about-to-show</i></tt>
pattern MENUITEM_SIGNAL_ABOUT_TO_SHOW :: () => () => Text

-- | Used in <a>MENUITEM_PROP_SHORTCUT</a> to represent the super key.
pattern MENUITEM_SHORTCUT_SUPER :: () => () => Text

-- | Used in <a>MENUITEM_PROP_SHORTCUT</a> to represent the shift key.
pattern MENUITEM_SHORTCUT_SHIFT :: () => () => Text

-- | Used in <a>MENUITEM_PROP_SHORTCUT</a> to represent the control key.
pattern MENUITEM_SHORTCUT_CONTROL :: () => () => Text

-- | Used in <a>MENUITEM_PROP_SHORTCUT</a> to represent the alternate key.
pattern MENUITEM_SHORTCUT_ALT :: () => () => Text

-- | <a>Menuitem</a> property used to represent whether the menuitem should
--   be shown or not. Type: <tt><i>G_VARIANT_TYPE_BOOLEAN</i></tt>.
pattern MENUITEM_PROP_VISIBLE :: () => () => Text

-- | <a>Menuitem</a> property used to represent what type of menuitem this
--   object represents. Type: <tt><i>G_VARIANT_TYPE_STRING</i></tt>.
pattern MENUITEM_PROP_TYPE :: () => () => Text

-- | <a>Menuitem</a> property that says what type of toggle entry should be
--   shown in the menu. Should be either <a>MENUITEM_TOGGLE_CHECK</a> or
--   <a>MENUITEM_TOGGLE_RADIO</a>. Type:
--   <tt><i>G_VARIANT_TYPE_STRING</i></tt>
pattern MENUITEM_PROP_TOGGLE_TYPE :: () => () => Text

-- | <a>Menuitem</a> property that says what state a toggle entry should be
--   shown as the menu. Should be either
--   <a>MENUITEM_TOGGLE_STATE_UNCHECKED</a>
--   <a>MENUITEM_TOGGLE_STATE_CHECKED</a> or
--   <tt><i>DBUSMENU_MENUITEM_TOGGLE_STATUE_UNKNOWN</i></tt>.
pattern MENUITEM_PROP_TOGGLE_STATE :: () => () => Text

-- | <a>Menuitem</a> property that is the entries that represent a shortcut
--   to activate the menuitem. It is an array of arrays of strings.
--   
--   It is recommended that this is not set directly but instead the
--   libdbusmenu-gtk library is used with the function
--   <tt><i>dbusmenu_menuitem_property_set_shortcut()</i></tt>
pattern MENUITEM_PROP_SHORTCUT :: () => () => Text

-- | <a>Menuitem</a> property used for the text on the menu item.
pattern MENUITEM_PROP_LABEL :: () => () => Text

-- | <a>Menuitem</a> property that is the name of the icon under the
--   Freedesktop.org icon naming spec. Type:
--   <tt><i>G_VARIANT_TYPE_STRING</i></tt>
pattern MENUITEM_PROP_ICON_NAME :: () => () => Text

-- | <a>Menuitem</a> property that is the raw data of a custom icon used in
--   the application. Type: <tt><i>G_VARIANT_TYPE_VARIANT</i></tt>
--   
--   It is recommended that this is not set directly but instead the
--   libdbusmenu-gtk library is used with the function
--   <tt><i>dbusmenu_menuitem_property_set_image()</i></tt>
pattern MENUITEM_PROP_ICON_DATA :: () => () => Text

-- | <a>Menuitem</a> property used to represent whether the menuitem is
--   clickable or not. Type: <tt><i>G_VARIANT_TYPE_BOOLEAN</i></tt>.
pattern MENUITEM_PROP_ENABLED :: () => () => Text

-- | <a>Menuitem</a> property to tell what type of information that the
--   menu item is displaying to the user. Type:
--   <tt><i>G_VARIANT_TYPE_STRING</i></tt>
pattern MENUITEM_PROP_DISPOSITION :: () => () => Text

-- | <a>Menuitem</a> property that tells how the children of this menuitem
--   should be displayed. Most likely this will be unset or of the value
--   <a>MENUITEM_CHILD_DISPLAY_SUBMENU</a>. Type:
--   <tt><i>G_VARIANT_TYPE_STRING</i></tt>
pattern MENUITEM_PROP_CHILD_DISPLAY :: () => () => Text

-- | <a>Menuitem</a> property used to provide a textual description of any
--   information that the icon may convey. The contents of this property
--   are passed through to assistive technologies such as the Orca screen
--   reader. The contents of this property will not be visible in the menu
--   item. If this property is set, Orca will use this property instead of
--   the label property.
pattern MENUITEM_PROP_ACCESSIBLE_DESC :: () => () => Text

-- | Used to set <a>MENUITEM_PROP_TOGGLE_STATE</a> so that the menu's
--   toggle item is undecided.
pattern MENUITEM_ICON_NAME_BLANK :: () => () => Text

-- | String for the event identifier when a menu is opened and displayed to
--   the user. Only valid for items that contain submenus.
pattern MENUITEM_EVENT_OPENED :: () => () => Text

-- | String for the event identifier when a menu is closed and displayed to
--   the user. Only valid for items that contain submenus.
pattern MENUITEM_EVENT_CLOSED :: () => () => Text

-- | String for the event identifier when a menu item is clicked on by the
--   user.
pattern MENUITEM_EVENT_ACTIVATED :: () => () => Text

-- | Used in <a>MENUITEM_PROP_DISPOSITION</a> to have a menu item displayed
--   in a way that conveys it's giving a warning to the user.
pattern MENUITEM_DISPOSITION_WARNING :: () => () => Text

-- | Used in <a>MENUITEM_PROP_DISPOSITION</a> to have a menu item displayed
--   in the normal manner. Default value.
pattern MENUITEM_DISPOSITION_NORMAL :: () => () => Text

-- | Used in <a>MENUITEM_PROP_DISPOSITION</a> to have a menu item displayed
--   in a way that conveys it's giving additional information to the user.
pattern MENUITEM_DISPOSITION_INFORMATIVE :: () => () => Text

-- | Used in <a>MENUITEM_PROP_DISPOSITION</a> to have a menu item displayed
--   in a way that conveys it's giving an alert to the user.
pattern MENUITEM_DISPOSITION_ALERT :: () => () => Text

-- | Used in <a>MENUITEM_PROP_CHILD_DISPLAY</a> to have the subitems
--   displayed as a submenu.
pattern MENUITEM_CHILD_DISPLAY_SUBMENU :: () => () => Text

-- | Used to set the 'type' property on a menu item to create a separator
--   menu item.
pattern CLIENT_TYPES_SEPARATOR :: () => () => Text

-- | Used to set the 'type' property on a menu item to create an image menu
--   item. Deprecated as standard menu items now support images as well.
pattern CLIENT_TYPES_IMAGE :: () => () => Text

-- | Used to set the 'type' property on a menu item to create a standard
--   menu item.
pattern CLIENT_TYPES_DEFAULT :: () => () => Text

-- | String to attach to signal <a>Client</a>::<tt><i>root-changed</i></tt>
pattern CLIENT_SIGNAL_ROOT_CHANGED :: () => () => Text

-- | String to attach to signal <a>Client</a>::<tt><i>new-menuitem</i></tt>
pattern CLIENT_SIGNAL_NEW_MENUITEM :: () => () => Text

-- | String to attach to signal
--   <a>Client</a>::<tt><i>layout-updated</i></tt>
pattern CLIENT_SIGNAL_LAYOUT_UPDATED :: () => () => Text

-- | String to attach to signal
--   <a>Client</a>::<tt><i>item-activate</i></tt>
pattern CLIENT_SIGNAL_ITEM_ACTIVATE :: () => () => Text

-- | String to attach to signal
--   <a>Client</a>::<tt><i>icon-theme-dirs-changed</i></tt>
pattern CLIENT_SIGNAL_ICON_THEME_DIRS_CHANGED :: () => () => Text

-- | String to attach to signal <a>Client</a>::<tt><i>event-result</i></tt>
pattern CLIENT_SIGNAL_EVENT_RESULT :: () => () => Text

-- | String to access property <a>Client</a>:<tt><i>text-direction</i></tt>
pattern CLIENT_PROP_TEXT_DIRECTION :: () => () => Text

-- | String to access property <a>Client</a>:<tt><i>status</i></tt>
pattern CLIENT_PROP_STATUS :: () => () => Text

-- | String to access property <a>Client</a>:<tt><i>group-events</i></tt>
pattern CLIENT_PROP_GROUP_EVENTS :: () => () => Text

-- | String to access property <a>Client</a>:<tt><i>dbus-object</i></tt>
pattern CLIENT_PROP_DBUS_OBJECT :: () => () => Text

-- | String to access property <a>Client</a>:<tt><i>dbus-name</i></tt>
pattern CLIENT_PROP_DBUS_NAME :: () => () => Text


module GI.Dbusmenu.Enums

-- | Tracks how the menus should be presented to the user.
data Status

-- | Everything is normal
StatusNormal :: Status

-- | The menus should be shown at a higher priority
StatusNotice :: Status

-- | Catch-all for unknown values
AnotherStatus :: Int -> Status

-- | The direction of text that the strings that this server will be
--   sending strings as.
data TextDirection

-- | Unspecified text direction
TextDirectionNone :: TextDirection

-- | Left-to-right text direction
TextDirectionLtr :: TextDirection

-- | Right-to-left text direction
TextDirectionRtl :: TextDirection

-- | Catch-all for unknown values
AnotherTextDirection :: Int -> TextDirection
instance GHC.Classes.Eq GI.Dbusmenu.Enums.Status
instance GHC.Show.Show GI.Dbusmenu.Enums.Status
instance GHC.Classes.Eq GI.Dbusmenu.Enums.TextDirection
instance GHC.Show.Show GI.Dbusmenu.Enums.TextDirection
instance GHC.Enum.Enum GI.Dbusmenu.Enums.Status
instance GHC.Classes.Ord GI.Dbusmenu.Enums.Status
instance GHC.Enum.Enum GI.Dbusmenu.Enums.TextDirection
instance GHC.Classes.Ord GI.Dbusmenu.Enums.TextDirection


module GI.Dbusmenu.Callbacks

-- | Type for the callback on the (unwrapped) C side.
type C_ClientTypeHandler = Ptr Menuitem -> Ptr Menuitem -> Ptr Client -> Ptr () -> IO CInt

-- | The type handler is called when a dbusmenu item is created with a
--   matching type as setup in
--   <tt><i>dbusmenu_client_add_type_handler</i></tt>
--   
--   Return value: <tt><i>TRUE</i></tt> if the type has been handled.
--   <tt><i>FALSE</i></tt> if this function was somehow unable to handle
--   it.
type ClientTypeHandler = Menuitem " /@newitem@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' that was created " -> Menuitem " /@parent@/: The parent of /@newitem@/ or @/NULL/@ if none " -> Client " /@client@/: A pointer to the 'GI.Dbusmenu.Objects.Client.Client' " -> IO Bool

-- | The type handler is called when a dbusmenu item is created with a
--   matching type as setup in
--   <tt><i>dbusmenu_client_add_type_handler</i></tt>
--   
--   Return value: <tt><i>TRUE</i></tt> if the type has been handled.
--   <tt><i>FALSE</i></tt> if this function was somehow unable to handle
--   it.
type ClientTypeHandler_WithClosures = Menuitem " /@newitem@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' that was created " -> Menuitem " /@parent@/: The parent of /@newitem@/ or @/NULL/@ if none " -> Client " /@client@/: A pointer to the 'GI.Dbusmenu.Objects.Client.Client' " -> Ptr () " /@userData@/: The data you gave us " -> IO Bool

-- | A simple wrapper that ignores the closure arguments.
drop_closures_ClientTypeHandler :: ClientTypeHandler -> ClientTypeHandler_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_ClientTypeHandler :: (HasCallStack, MonadIO m, IsMenuitem a, IsMenuitem b, IsClient c) => FunPtr C_ClientTypeHandler -> a -> b -> c -> Ptr () -> m Bool

-- | Wrap the callback into a <a>Closure</a>.
genClosure_ClientTypeHandler :: ClientTypeHandler -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   <a>C_ClientTypeHandler</a>.
mk_ClientTypeHandler :: C_ClientTypeHandler -> IO (FunPtr C_ClientTypeHandler)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>ClientTypeHandler</a></tt>.
noClientTypeHandler :: Maybe ClientTypeHandler

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>ClientTypeHandler_WithClosures</a></tt>.
noClientTypeHandler_WithClosures :: Maybe ClientTypeHandler_WithClosures

-- | Wrap a <a>ClientTypeHandler</a> into a <a>C_ClientTypeHandler</a>.
wrap_ClientTypeHandler :: Maybe (Ptr (FunPtr C_ClientTypeHandler)) -> ClientTypeHandler_WithClosures -> C_ClientTypeHandler

-- | Type for the callback on the (unwrapped) C side.
type C_MenuitemAboutToShowCb = Ptr Menuitem -> Ptr () -> IO ()

-- | Callback prototype for a callback that is called when the menu should
--   be shown.
type MenuitemAboutToShowCb = Menuitem " /@mi@/: Menu item that should be shown " -> IO ()

-- | Callback prototype for a callback that is called when the menu should
--   be shown.
type MenuitemAboutToShowCb_WithClosures = Menuitem " /@mi@/: Menu item that should be shown " -> Ptr () " /@userData@/: Extra user data sent with the function " -> IO ()

-- | A simple wrapper that ignores the closure arguments.
drop_closures_MenuitemAboutToShowCb :: MenuitemAboutToShowCb -> MenuitemAboutToShowCb_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_MenuitemAboutToShowCb :: (HasCallStack, MonadIO m, IsMenuitem a) => FunPtr C_MenuitemAboutToShowCb -> a -> Ptr () -> m ()

-- | Wrap the callback into a <a>Closure</a>.
genClosure_MenuitemAboutToShowCb :: MenuitemAboutToShowCb -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   <a>C_MenuitemAboutToShowCb</a>.
mk_MenuitemAboutToShowCb :: C_MenuitemAboutToShowCb -> IO (FunPtr C_MenuitemAboutToShowCb)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>MenuitemAboutToShowCb</a></tt>.
noMenuitemAboutToShowCb :: Maybe MenuitemAboutToShowCb

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>MenuitemAboutToShowCb_WithClosures</a></tt>.
noMenuitemAboutToShowCb_WithClosures :: Maybe MenuitemAboutToShowCb_WithClosures

-- | Wrap a <a>MenuitemAboutToShowCb</a> into a
--   <a>C_MenuitemAboutToShowCb</a>.
wrap_MenuitemAboutToShowCb :: Maybe (Ptr (FunPtr C_MenuitemAboutToShowCb)) -> MenuitemAboutToShowCb_WithClosures -> C_MenuitemAboutToShowCb

-- | Type for the callback on the (unwrapped) C side.
type C_MenuitemBuildvariantSlotT = Ptr Menuitem -> CString -> IO (Ptr GVariant)

-- | This is the function that is called to represent this menu item as a
--   variant. Should call its own children.
type MenuitemBuildvariantSlotT = Menuitem " /@mi@/: Menu item that should be built from " -> Maybe Text " /@properties@/: A list of properties that should be the only ones in the resulting variant structure " -> IO GVariant " __Returns:__ A variant representing this item and its children "

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_MenuitemBuildvariantSlotT :: (HasCallStack, MonadIO m, IsMenuitem a) => FunPtr C_MenuitemBuildvariantSlotT -> a -> Maybe Text -> m GVariant

-- | Wrap the callback into a <a>Closure</a>.
genClosure_MenuitemBuildvariantSlotT :: MenuitemBuildvariantSlotT -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   <a>C_MenuitemBuildvariantSlotT</a>.
mk_MenuitemBuildvariantSlotT :: C_MenuitemBuildvariantSlotT -> IO (FunPtr C_MenuitemBuildvariantSlotT)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>MenuitemBuildvariantSlotT</a></tt>.
noMenuitemBuildvariantSlotT :: Maybe MenuitemBuildvariantSlotT

-- | Wrap a <a>MenuitemBuildvariantSlotT</a> into a
--   <a>C_MenuitemBuildvariantSlotT</a>.
wrap_MenuitemBuildvariantSlotT :: Maybe (Ptr (FunPtr C_MenuitemBuildvariantSlotT)) -> MenuitemBuildvariantSlotT -> C_MenuitemBuildvariantSlotT


-- | The client for a <a>Server</a> creating a shared object set of
--   <a>Menuitem</a> objects.
module GI.Dbusmenu.Objects.Client

-- | Memory-managed wrapper type.
newtype Client
Client :: ManagedPtr Client -> Client

-- | Type class for types which can be safely cast to <a>Client</a>, for
--   instance with <a>toClient</a>.
class GObject o => IsClient o

-- | Cast to <a>Client</a>, for types for which this is known to be safe.
--   For general casts, use <a>castTo</a>.
toClient :: (MonadIO m, IsClient o) => o -> m Client

-- | A convenience alias for <a>Nothing</a> :: <a>Maybe</a> <a>Client</a>.
noClient :: Maybe Client

-- | This function connects into the type handling of the <a>Client</a>.
--   Every new menuitem that comes in immediately gets asked for its
--   properties. When we get those properties we check the 'type' property
--   and look to see if it matches a handler that is known by the client.
--   If so, the <i><tt>newfunc</tt></i> function is executed on that
--   <a>Menuitem</a>. If not, then the DbusmenuClient::new-menuitem signal
--   is sent.
--   
--   In the future the known types will be sent to the server so that it
--   can make choices about the menu item types availble.
clientAddTypeHandler :: (HasCallStack, MonadIO m, IsClient a) => a -> Text -> ClientTypeHandler -> m Bool

-- | This function connects into the type handling of the <a>Client</a>.
--   Every new menuitem that comes in immediately gets asked for its
--   properties. When we get those properties we check the 'type' property
--   and look to see if it matches a handler that is known by the client.
--   If so, the <i><tt>newfunc</tt></i> function is executed on that
--   <a>Menuitem</a>. If not, then the DbusmenuClient::new-menuitem signal
--   is sent.
--   
--   In the future the known types will be sent to the server so that it
--   can make choices about the menu item types availble.
clientAddTypeHandlerFull :: (HasCallStack, MonadIO m, IsClient a) => a -> Text -> ClientTypeHandler -> m Bool

-- | Gets the stored and exported icon paths from the client.
clientGetIconPaths :: (HasCallStack, MonadIO m, IsClient a) => a -> m [Text]

-- | Grabs the root node for the specified client <i><tt>client</tt></i>.
--   This function may block. It will block if there is currently a call to
--   update the layout, it will block on that layout updated and then
--   return the newly updated layout. Chances are that this update is in
--   the queue for the mainloop as it would have been requested some time
--   ago, but in theory it could block longer.
clientGetRoot :: (HasCallStack, MonadIO m, IsClient a) => a -> m Menuitem

-- | Gets the recommended current status that the server is exporting for
--   the menus. In situtations where the value is
--   <tt><i>DBUSMENU_STATUS_NOTICE</i></tt> it is recommended that the
--   client show the menus to the user an a more noticible way.
--   
--   Return value: Status being exported.
clientGetStatus :: (HasCallStack, MonadIO m, IsClient a) => a -> m Status

-- | Gets the text direction that the server is exporting. If the server is
--   not exporting a direction then the value
--   <tt><i>DBUSMENU_TEXT_DIRECTION_NONE</i></tt> will be returned.
--   
--   Return value: Text direction being exported.
clientGetTextDirection :: (HasCallStack, MonadIO m, IsClient a) => a -> m TextDirection

-- | This function creates a new client that connects to a specific server
--   on DBus. That server is at a specific location sharing a known object.
--   The interface is assumed by the code to be the DBus menu interface.
--   The newly created client will start sending out events as it syncs up
--   with the server.
clientNew :: (HasCallStack, MonadIO m) => Text -> Text -> m Client

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>dbus-name</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructClientDbusName :: IsClient o => Text -> IO (GValueConstruct o)

-- | Get the value of the “<tt>dbus-name</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> client #dbusName
--   </pre>
getClientDbusName :: (MonadIO m, IsClient o) => o -> m (Maybe Text)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>dbus-object</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructClientDbusObject :: IsClient o => Text -> IO (GValueConstruct o)

-- | Get the value of the “<tt>dbus-object</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> client #dbusObject
--   </pre>
getClientDbusObject :: (MonadIO m, IsClient o) => o -> m (Maybe Text)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>group-events</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructClientGroupEvents :: IsClient o => Bool -> IO (GValueConstruct o)

-- | Get the value of the “<tt>group-events</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> client #groupEvents
--   </pre>
getClientGroupEvents :: (MonadIO m, IsClient o) => o -> m Bool

-- | Set the value of the “<tt>group-events</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> client [ #groupEvents <a>:=</a> value ]
--   </pre>
setClientGroupEvents :: (MonadIO m, IsClient o) => o -> Bool -> m ()

-- | Type for the callback on the (unwrapped) C side.
type C_ClientEventResultCallback = Ptr () -> Ptr Object -> CString -> Ptr GVariant -> Word32 -> Ptr () -> Ptr () -> IO ()

-- | <i>No description available in the introspection data.</i>
type ClientEventResultCallback = Object -> Text -> GVariant -> Word32 -> Ptr () -> IO ()

-- | Connect a signal handler for the “<tt>event-result</tt>” signal, to be
--   run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> client #eventResult callback
--   </pre>
afterClientEventResult :: (IsClient a, MonadIO m) => a -> ClientEventResultCallback -> m SignalHandlerId

-- | Wrap the callback into a <a>Closure</a>.
genClosure_ClientEventResult :: ClientEventResultCallback -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   <a>C_ClientEventResultCallback</a>.
mk_ClientEventResultCallback :: C_ClientEventResultCallback -> IO (FunPtr C_ClientEventResultCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>ClientEventResultCallback</a></tt>.
noClientEventResultCallback :: Maybe ClientEventResultCallback

-- | Connect a signal handler for the “<tt>event-result</tt>” signal, to be
--   run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> client #eventResult callback
--   </pre>
onClientEventResult :: (IsClient a, MonadIO m) => a -> ClientEventResultCallback -> m SignalHandlerId

-- | Wrap a <a>ClientEventResultCallback</a> into a
--   <a>C_ClientEventResultCallback</a>.
wrap_ClientEventResultCallback :: ClientEventResultCallback -> C_ClientEventResultCallback

-- | Type for the callback on the (unwrapped) C side.
type C_ClientIconThemeDirsChangedCallback = Ptr () -> Ptr () -> Ptr () -> IO ()

-- | Signaled when the theme directories are changed by the server.
type ClientIconThemeDirsChangedCallback = Ptr () " /@arg1@/: A @/GStrv/@ of theme directories " -> IO ()

-- | Connect a signal handler for the “<tt>icon-theme-dirs-changed</tt>”
--   signal, to be run after the default handler. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>after</a> client #iconThemeDirsChanged callback
--   </pre>
afterClientIconThemeDirsChanged :: (IsClient a, MonadIO m) => a -> ClientIconThemeDirsChangedCallback -> m SignalHandlerId

-- | Wrap the callback into a <a>Closure</a>.
genClosure_ClientIconThemeDirsChanged :: ClientIconThemeDirsChangedCallback -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   <a>C_ClientIconThemeDirsChangedCallback</a>.
mk_ClientIconThemeDirsChangedCallback :: C_ClientIconThemeDirsChangedCallback -> IO (FunPtr C_ClientIconThemeDirsChangedCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>ClientIconThemeDirsChangedCallback</a></tt>.
noClientIconThemeDirsChangedCallback :: Maybe ClientIconThemeDirsChangedCallback

-- | Connect a signal handler for the “<tt>icon-theme-dirs-changed</tt>”
--   signal, to be run before the default handler. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>on</a> client #iconThemeDirsChanged callback
--   </pre>
onClientIconThemeDirsChanged :: (IsClient a, MonadIO m) => a -> ClientIconThemeDirsChangedCallback -> m SignalHandlerId

-- | Wrap a <a>ClientIconThemeDirsChangedCallback</a> into a
--   <a>C_ClientIconThemeDirsChangedCallback</a>.
wrap_ClientIconThemeDirsChangedCallback :: ClientIconThemeDirsChangedCallback -> C_ClientIconThemeDirsChangedCallback

-- | Type for the callback on the (unwrapped) C side.
type C_ClientItemActivateCallback = Ptr () -> Ptr Object -> Word32 -> Ptr () -> IO ()

-- | Signaled when the server wants to activate an item in order to display
--   the menu.
type ClientItemActivateCallback = Object " /@arg1@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' activated " -> Word32 " /@arg2@/: A timestamp that the event happened at " -> IO ()

-- | Connect a signal handler for the “<tt>item-activate</tt>” signal, to
--   be run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> client #itemActivate callback
--   </pre>
afterClientItemActivate :: (IsClient a, MonadIO m) => a -> ClientItemActivateCallback -> m SignalHandlerId

-- | Wrap the callback into a <a>Closure</a>.
genClosure_ClientItemActivate :: ClientItemActivateCallback -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   <a>C_ClientItemActivateCallback</a>.
mk_ClientItemActivateCallback :: C_ClientItemActivateCallback -> IO (FunPtr C_ClientItemActivateCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>ClientItemActivateCallback</a></tt>.
noClientItemActivateCallback :: Maybe ClientItemActivateCallback

-- | Connect a signal handler for the “<tt>item-activate</tt>” signal, to
--   be run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> client #itemActivate callback
--   </pre>
onClientItemActivate :: (IsClient a, MonadIO m) => a -> ClientItemActivateCallback -> m SignalHandlerId

-- | Wrap a <a>ClientItemActivateCallback</a> into a
--   <a>C_ClientItemActivateCallback</a>.
wrap_ClientItemActivateCallback :: ClientItemActivateCallback -> C_ClientItemActivateCallback

-- | Type for the callback on the (unwrapped) C side.
type C_ClientLayoutUpdatedCallback = Ptr () -> Ptr () -> IO ()

-- | <i>No description available in the introspection data.</i>
type ClientLayoutUpdatedCallback = IO ()

-- | Connect a signal handler for the “<tt>layout-updated</tt>” signal, to
--   be run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> client #layoutUpdated callback
--   </pre>
afterClientLayoutUpdated :: (IsClient a, MonadIO m) => a -> ClientLayoutUpdatedCallback -> m SignalHandlerId

-- | Wrap the callback into a <a>Closure</a>.
genClosure_ClientLayoutUpdated :: ClientLayoutUpdatedCallback -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   <a>C_ClientLayoutUpdatedCallback</a>.
mk_ClientLayoutUpdatedCallback :: C_ClientLayoutUpdatedCallback -> IO (FunPtr C_ClientLayoutUpdatedCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>ClientLayoutUpdatedCallback</a></tt>.
noClientLayoutUpdatedCallback :: Maybe ClientLayoutUpdatedCallback

-- | Connect a signal handler for the “<tt>layout-updated</tt>” signal, to
--   be run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> client #layoutUpdated callback
--   </pre>
onClientLayoutUpdated :: (IsClient a, MonadIO m) => a -> ClientLayoutUpdatedCallback -> m SignalHandlerId

-- | Wrap a <a>ClientLayoutUpdatedCallback</a> into a
--   <a>C_ClientLayoutUpdatedCallback</a>.
wrap_ClientLayoutUpdatedCallback :: ClientLayoutUpdatedCallback -> C_ClientLayoutUpdatedCallback

-- | Type for the callback on the (unwrapped) C side.
type C_ClientNewMenuitemCallback = Ptr () -> Ptr Object -> Ptr () -> IO ()

-- | Signaled when the client creates a new menuitem. This doesn't mean
--   that it's placed anywhere. The parent that it's applied to will signal
--   <a>Menuitem</a>::<tt><i>child-added</i></tt> when it gets parented.
type ClientNewMenuitemCallback = Object " /@arg1@/: The new 'GI.Dbusmenu.Objects.Menuitem.Menuitem' created " -> IO ()

-- | Connect a signal handler for the “<tt>new-menuitem</tt>” signal, to be
--   run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> client #newMenuitem callback
--   </pre>
afterClientNewMenuitem :: (IsClient a, MonadIO m) => a -> ClientNewMenuitemCallback -> m SignalHandlerId

-- | Wrap the callback into a <a>Closure</a>.
genClosure_ClientNewMenuitem :: ClientNewMenuitemCallback -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   <a>C_ClientNewMenuitemCallback</a>.
mk_ClientNewMenuitemCallback :: C_ClientNewMenuitemCallback -> IO (FunPtr C_ClientNewMenuitemCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>ClientNewMenuitemCallback</a></tt>.
noClientNewMenuitemCallback :: Maybe ClientNewMenuitemCallback

-- | Connect a signal handler for the “<tt>new-menuitem</tt>” signal, to be
--   run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> client #newMenuitem callback
--   </pre>
onClientNewMenuitem :: (IsClient a, MonadIO m) => a -> ClientNewMenuitemCallback -> m SignalHandlerId

-- | Wrap a <a>ClientNewMenuitemCallback</a> into a
--   <a>C_ClientNewMenuitemCallback</a>.
wrap_ClientNewMenuitemCallback :: ClientNewMenuitemCallback -> C_ClientNewMenuitemCallback

-- | Type for the callback on the (unwrapped) C side.
type C_ClientRootChangedCallback = Ptr () -> Ptr Object -> Ptr () -> IO ()

-- | The layout has changed in a way that can not be represented by the
--   individual items changing as the root of this client has changed.
type ClientRootChangedCallback = Object " /@arg1@/: The new root 'GI.Dbusmenu.Objects.Menuitem.Menuitem' " -> IO ()

-- | Connect a signal handler for the “<tt>root-changed</tt>” signal, to be
--   run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> client #rootChanged callback
--   </pre>
afterClientRootChanged :: (IsClient a, MonadIO m) => a -> ClientRootChangedCallback -> m SignalHandlerId

-- | Wrap the callback into a <a>Closure</a>.
genClosure_ClientRootChanged :: ClientRootChangedCallback -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   <a>C_ClientRootChangedCallback</a>.
mk_ClientRootChangedCallback :: C_ClientRootChangedCallback -> IO (FunPtr C_ClientRootChangedCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>ClientRootChangedCallback</a></tt>.
noClientRootChangedCallback :: Maybe ClientRootChangedCallback

-- | Connect a signal handler for the “<tt>root-changed</tt>” signal, to be
--   run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> client #rootChanged callback
--   </pre>
onClientRootChanged :: (IsClient a, MonadIO m) => a -> ClientRootChangedCallback -> m SignalHandlerId

-- | Wrap a <a>ClientRootChangedCallback</a> into a
--   <a>C_ClientRootChangedCallback</a>.
wrap_ClientRootChangedCallback :: ClientRootChangedCallback -> C_ClientRootChangedCallback
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Dbusmenu.Objects.Client.Client a) => GI.Dbusmenu.Objects.Client.IsClient a
instance GI.Dbusmenu.Objects.Client.IsClient GI.Dbusmenu.Objects.Client.Client
instance Data.GI.Base.BasicTypes.GObject GI.Dbusmenu.Objects.Client.Client
instance GI.GObject.Objects.Object.IsObject GI.Dbusmenu.Objects.Client.Client


-- | This is the <a>Object</a> 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.
module GI.Dbusmenu.Objects.Menuitem

-- | Memory-managed wrapper type.
newtype Menuitem
Menuitem :: ManagedPtr Menuitem -> Menuitem

-- | Type class for types which can be safely cast to <a>Menuitem</a>, for
--   instance with <a>toMenuitem</a>.
class GObject o => IsMenuitem o

-- | Cast to <a>Menuitem</a>, for types for which this is known to be safe.
--   For general casts, use <a>castTo</a>.
toMenuitem :: (MonadIO m, IsMenuitem o) => o -> m Menuitem

-- | A convenience alias for <a>Nothing</a> :: <a>Maybe</a>
--   <a>Menuitem</a>.
noMenuitem :: Maybe Menuitem

-- | Puts <i><tt>child</tt></i> in the list of children for
--   <i><tt>mi</tt></i> at the location specified in
--   <i><tt>position</tt></i>. If there is not enough entires available
--   then <i><tt>child</tt></i> will be placed at the end of the list.
menuitemChildAddPosition :: (HasCallStack, MonadIO m, IsMenuitem a, IsMenuitem b) => a -> b -> Word32 -> m Bool

-- | This function adds <i><tt>child</tt></i> to the list of children on
--   <i><tt>mi</tt></i> at the end of that list.
menuitemChildAppend :: (HasCallStack, MonadIO m, IsMenuitem a, IsMenuitem b) => a -> b -> m Bool

-- | This function removes <i><tt>child</tt></i> from the children list of
--   <i><tt>mi</tt></i>. It does not call <tt><i>g_object_unref</i></tt> on
--   <i><tt>child</tt></i>.
menuitemChildDelete :: (HasCallStack, MonadIO m, IsMenuitem a, IsMenuitem b) => a -> b -> m Bool

-- | Search the children of <i><tt>mi</tt></i> to find one with the ID of
--   <i><tt>id</tt></i>. If it doesn't exist then we return
--   <tt><i>NULL</i></tt>.
menuitemChildFind :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> Int32 -> m Menuitem

-- | This function adds <i><tt>child</tt></i> to the list of children on
--   <i><tt>mi</tt></i> at the beginning of that list.
menuitemChildPrepend :: (HasCallStack, MonadIO m, IsMenuitem a, IsMenuitem b) => a -> b -> m Bool

-- | 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.
menuitemChildReorder :: (HasCallStack, MonadIO m, IsMenuitem a, IsMenuitem b) => a -> b -> Word32 -> m Bool

-- | This function searchs the whole tree of children that are attached to
--   <i><tt>mi</tt></i>. This could be quite a few nodes, all the way down
--   the tree. It is a depth first search.
menuitemFindId :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> Int32 -> m Menuitem

-- | This calls the function <i><tt>func</tt></i> 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.
menuitemForeach :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> Ptr () -> Ptr () -> m ()

-- | 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.
menuitemGetChildren :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> m [Menuitem]

-- | Gets the unique ID for <i><tt>mi</tt></i>.
menuitemGetId :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> m Int32

-- | This function looks up the parent of <i><tt>mi</tt></i>
menuitemGetParent :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> m Menuitem

-- | This function returns the position of the menu item <i><tt>mi</tt></i>
--   in the children of <i><tt>parent</tt></i>. It will return zero if the
--   menu item can't be found.
menuitemGetPosition :: (HasCallStack, MonadIO m, IsMenuitem a, IsMenuitem b) => a -> b -> m Word32

-- | This function is very similar to
--   <tt><i>dbusmenu_menuitem_get_position</i></tt> except that it only
--   counts in the children that have been realized.
menuitemGetPositionRealized :: (HasCallStack, MonadIO m, IsMenuitem a, IsMenuitem b) => a -> b -> m Word32

-- | This function returns the internal value of whether this is a root
--   node or not.
menuitemGetRoot :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> m Bool

-- | 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 <a>Menuitem</a>::<tt><i>item-activate</i></tt> 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.
menuitemHandleEvent :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> Text -> GVariant -> Word32 -> m ()

-- | Create a new <a>Menuitem</a> with all default values.
menuitemNew :: (HasCallStack, MonadIO m) => m Menuitem

-- | This creates a blank <a>Menuitem</a> with a specific ID.
menuitemNewWithId :: (HasCallStack, MonadIO m) => Int32 -> m Menuitem

-- | This function takes the properties of a <a>Menuitem</a> and puts them
--   into a <a>HashTable</a> 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 <a>HashTable</a>.
menuitemPropertiesCopy :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> m (Map (Ptr ()) (Ptr ()))

-- | 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
--   <tt><i>g_list_free()</i></tt> when the calling function is done with
--   it.
menuitemPropertiesList :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> m [Text]

-- | Checkes to see if a particular property exists on <i><tt>mi</tt></i>
--   and returns <tt><i>TRUE</i></tt> if so.
menuitemPropertyExist :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> Text -> m Bool

-- | Look up a property on <i><tt>mi</tt></i> and return the value of it if
--   it exits. <tt><i>NULL</i></tt> will be returned if the property
--   doesn't exist.
menuitemPropertyGet :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> Text -> m Text

-- | Look up a property on <i><tt>mi</tt></i> and return the value of it if
--   it exits. Returns <tt><i>FALSE</i></tt> if the property doesn't exist.
menuitemPropertyGetBool :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> Text -> m Bool

-- | Look up a property on <i><tt>mi</tt></i> and return the value of it if
--   it exits. <tt><i>NULL</i></tt> will be returned if the property
--   doesn't exist.
menuitemPropertyGetByteArray :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> Text -> m ByteString

-- | Look up a property on <i><tt>mi</tt></i> and return the value of it if
--   it exits. Returns zero if the property doesn't exist.
menuitemPropertyGetInt :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> Text -> m Int32

-- | Look up a property on <i><tt>mi</tt></i> and return the value of it if
--   it exits. <tt><i>NULL</i></tt> will be returned if the property
--   doesn't exist.
menuitemPropertyGetVariant :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> Text -> m GVariant

-- | Removes a property from the menuitem.
menuitemPropertyRemove :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> Text -> m ()

-- | Takes the pair of <i><tt>property</tt></i> and <i><tt>value</tt></i>
--   and places them as a property on <i><tt>mi</tt></i>. 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
--   <a>Menuitem</a>::<tt><i>prop-changed</i></tt> will be emitted by this
--   function.
menuitemPropertySet :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> Text -> Text -> m Bool

-- | Takes a boolean <i><tt>value</tt></i> and sets it on
--   <i><tt>property</tt></i> as a property on <i><tt>mi</tt></i>. 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
--   <a>Menuitem</a>::<tt><i>prop-changed</i></tt> will be emitted by this
--   function.
menuitemPropertySetBool :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> Text -> Bool -> m Bool

-- | Takes a byte array <i><tt>value</tt></i> and sets it on
--   <i><tt>property</tt></i> as a property on <i><tt>mi</tt></i>. 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
--   <a>Menuitem</a>::<tt><i>prop-changed</i></tt> will be emitted by this
--   function.
menuitemPropertySetByteArray :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> Text -> Word8 -> Word64 -> m Bool

-- | Takes a boolean <i><tt>value</tt></i> and sets it on
--   <i><tt>property</tt></i> as a property on <i><tt>mi</tt></i>. 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
--   <a>Menuitem</a>::<tt><i>prop-changed</i></tt> will be emitted by this
--   function.
menuitemPropertySetInt :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> Text -> Int32 -> m Bool

-- | Takes the pair of <i><tt>property</tt></i> and <i><tt>value</tt></i>
--   and places them as a property on <i><tt>mi</tt></i>. 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
--   <a>Menuitem</a>::<tt><i>prop-changed</i></tt> will be emitted by this
--   function.
menuitemPropertySetVariant :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> Text -> GVariant -> m Bool

-- | 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.
menuitemSendAboutToShow :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> Ptr () -> Ptr () -> m ()

-- | Sets the parent of <i><tt>mi</tt></i> to <i><tt>parent</tt></i>. If
--   <i><tt>mi</tt></i> 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
menuitemSetParent :: (HasCallStack, MonadIO m, IsMenuitem a, IsMenuitem b) => a -> b -> m Bool

-- | This function sets the internal value of whether this is a root node
--   or not.
menuitemSetRoot :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> Bool -> 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.
menuitemShowToUser :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> Word32 -> m ()

-- | While the name sounds devious that's exactly what this function does.
--   It takes the list of children from the <i><tt>mi</tt></i> 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.
menuitemTakeChildren :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> m [Menuitem]

-- | Unparents the menu item <i><tt>mi</tt></i>. If <i><tt>mi</tt></i>
--   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
menuitemUnparent :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> m Bool

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>id</tt>” property. This is rarely needed directly, but it is used
--   by <a>new</a>.
constructMenuitemId :: IsMenuitem o => Int32 -> IO (GValueConstruct o)

-- | Get the value of the “<tt>id</tt>” property. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> menuitem #id
--   </pre>
getMenuitemId :: (MonadIO m, IsMenuitem o) => o -> m Int32

-- | Type for the callback on the (unwrapped) C side.
type C_MenuitemAboutToShowCallback = Ptr () -> Ptr () -> IO CInt

-- | Emitted when the submenu for this item is about to be shown
type MenuitemAboutToShowCallback = IO Bool

-- | Connect a signal handler for the “<tt>about-to-show</tt>” signal, to
--   be run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> menuitem #aboutToShow callback
--   </pre>
afterMenuitemAboutToShow :: (IsMenuitem a, MonadIO m) => a -> MenuitemAboutToShowCallback -> m SignalHandlerId

-- | Wrap the callback into a <a>Closure</a>.
genClosure_MenuitemAboutToShow :: MenuitemAboutToShowCallback -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   <a>C_MenuitemAboutToShowCallback</a>.
mk_MenuitemAboutToShowCallback :: C_MenuitemAboutToShowCallback -> IO (FunPtr C_MenuitemAboutToShowCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>MenuitemAboutToShowCallback</a></tt>.
noMenuitemAboutToShowCallback :: Maybe MenuitemAboutToShowCallback

-- | Connect a signal handler for the “<tt>about-to-show</tt>” signal, to
--   be run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> menuitem #aboutToShow callback
--   </pre>
onMenuitemAboutToShow :: (IsMenuitem a, MonadIO m) => a -> MenuitemAboutToShowCallback -> m SignalHandlerId

-- | Wrap a <a>MenuitemAboutToShowCallback</a> into a
--   <a>C_MenuitemAboutToShowCallback</a>.
wrap_MenuitemAboutToShowCallback :: MenuitemAboutToShowCallback -> C_MenuitemAboutToShowCallback

-- | Type for the callback on the (unwrapped) C side.
type C_MenuitemChildAddedCallback = Ptr () -> Ptr Object -> Word32 -> Ptr () -> IO ()

-- | Signaled when the child menuitem has been added to the parent.
type MenuitemChildAddedCallback = Object " /@arg1@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' which is the child. " -> Word32 " /@arg2@/: The position that the child is being added in. " -> IO ()

-- | Connect a signal handler for the “<tt>child-added</tt>” signal, to be
--   run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> menuitem #childAdded callback
--   </pre>
afterMenuitemChildAdded :: (IsMenuitem a, MonadIO m) => a -> MenuitemChildAddedCallback -> m SignalHandlerId

-- | Wrap the callback into a <a>Closure</a>.
genClosure_MenuitemChildAdded :: MenuitemChildAddedCallback -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   <a>C_MenuitemChildAddedCallback</a>.
mk_MenuitemChildAddedCallback :: C_MenuitemChildAddedCallback -> IO (FunPtr C_MenuitemChildAddedCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>MenuitemChildAddedCallback</a></tt>.
noMenuitemChildAddedCallback :: Maybe MenuitemChildAddedCallback

-- | Connect a signal handler for the “<tt>child-added</tt>” signal, to be
--   run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> menuitem #childAdded callback
--   </pre>
onMenuitemChildAdded :: (IsMenuitem a, MonadIO m) => a -> MenuitemChildAddedCallback -> m SignalHandlerId

-- | Wrap a <a>MenuitemChildAddedCallback</a> into a
--   <a>C_MenuitemChildAddedCallback</a>.
wrap_MenuitemChildAddedCallback :: MenuitemChildAddedCallback -> C_MenuitemChildAddedCallback

-- | Type for the callback on the (unwrapped) C side.
type C_MenuitemChildMovedCallback = Ptr () -> Ptr Object -> Word32 -> Word32 -> Ptr () -> IO ()

-- | Signaled when the child menuitem has had its location in the list
--   change.
type MenuitemChildMovedCallback = Object " /@arg1@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' which is the child. " -> Word32 " /@arg2@/: The position that the child is being moved to. " -> Word32 " /@arg3@/: The position that the child is was in. " -> IO ()

-- | Connect a signal handler for the “<tt>child-moved</tt>” signal, to be
--   run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> menuitem #childMoved callback
--   </pre>
afterMenuitemChildMoved :: (IsMenuitem a, MonadIO m) => a -> MenuitemChildMovedCallback -> m SignalHandlerId

-- | Wrap the callback into a <a>Closure</a>.
genClosure_MenuitemChildMoved :: MenuitemChildMovedCallback -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   <a>C_MenuitemChildMovedCallback</a>.
mk_MenuitemChildMovedCallback :: C_MenuitemChildMovedCallback -> IO (FunPtr C_MenuitemChildMovedCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>MenuitemChildMovedCallback</a></tt>.
noMenuitemChildMovedCallback :: Maybe MenuitemChildMovedCallback

-- | Connect a signal handler for the “<tt>child-moved</tt>” signal, to be
--   run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> menuitem #childMoved callback
--   </pre>
onMenuitemChildMoved :: (IsMenuitem a, MonadIO m) => a -> MenuitemChildMovedCallback -> m SignalHandlerId

-- | Wrap a <a>MenuitemChildMovedCallback</a> into a
--   <a>C_MenuitemChildMovedCallback</a>.
wrap_MenuitemChildMovedCallback :: MenuitemChildMovedCallback -> C_MenuitemChildMovedCallback

-- | Type for the callback on the (unwrapped) C side.
type C_MenuitemChildRemovedCallback = Ptr () -> Ptr Object -> Ptr () -> IO ()

-- | 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 <tt><i>g_object_unref</i></tt> called on it.
type MenuitemChildRemovedCallback = Object " /@arg1@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' which was the child. " -> IO ()

-- | Connect a signal handler for the “<tt>child-removed</tt>” signal, to
--   be run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> menuitem #childRemoved callback
--   </pre>
afterMenuitemChildRemoved :: (IsMenuitem a, MonadIO m) => a -> MenuitemChildRemovedCallback -> m SignalHandlerId

-- | Wrap the callback into a <a>Closure</a>.
genClosure_MenuitemChildRemoved :: MenuitemChildRemovedCallback -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   <a>C_MenuitemChildRemovedCallback</a>.
mk_MenuitemChildRemovedCallback :: C_MenuitemChildRemovedCallback -> IO (FunPtr C_MenuitemChildRemovedCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>MenuitemChildRemovedCallback</a></tt>.
noMenuitemChildRemovedCallback :: Maybe MenuitemChildRemovedCallback

-- | Connect a signal handler for the “<tt>child-removed</tt>” signal, to
--   be run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> menuitem #childRemoved callback
--   </pre>
onMenuitemChildRemoved :: (IsMenuitem a, MonadIO m) => a -> MenuitemChildRemovedCallback -> m SignalHandlerId

-- | Wrap a <a>MenuitemChildRemovedCallback</a> into a
--   <a>C_MenuitemChildRemovedCallback</a>.
wrap_MenuitemChildRemovedCallback :: MenuitemChildRemovedCallback -> C_MenuitemChildRemovedCallback

-- | Type for the callback on the (unwrapped) C side.
type C_MenuitemEventCallback = Ptr () -> CString -> Ptr GVariant -> Word32 -> Ptr () -> IO CInt

-- | Emitted when an event is passed through. The event is signalled after
--   handle_event is called.
type MenuitemEventCallback = Text " /@arg1@/: Name of the event " -> GVariant " /@arg2@/: Information passed along with the event " -> Word32 " /@arg3@/: X11 timestamp of when the event happened " -> IO Bool

-- | Connect a signal handler for the “<tt>event</tt>” signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> menuitem #event callback
--   </pre>
afterMenuitemEvent :: (IsMenuitem a, MonadIO m) => a -> MenuitemEventCallback -> m SignalHandlerId

-- | Wrap the callback into a <a>Closure</a>.
genClosure_MenuitemEvent :: MenuitemEventCallback -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   <a>C_MenuitemEventCallback</a>.
mk_MenuitemEventCallback :: C_MenuitemEventCallback -> IO (FunPtr C_MenuitemEventCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>MenuitemEventCallback</a></tt>.
noMenuitemEventCallback :: Maybe MenuitemEventCallback

-- | Connect a signal handler for the “<tt>event</tt>” signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> menuitem #event callback
--   </pre>
onMenuitemEvent :: (IsMenuitem a, MonadIO m) => a -> MenuitemEventCallback -> m SignalHandlerId

-- | Wrap a <a>MenuitemEventCallback</a> into a
--   <a>C_MenuitemEventCallback</a>.
wrap_MenuitemEventCallback :: MenuitemEventCallback -> C_MenuitemEventCallback

-- | Type for the callback on the (unwrapped) C side.
type C_MenuitemItemActivatedCallback = Ptr () -> Word32 -> Ptr () -> IO ()

-- | Emitted on the objects on the server side when they are signaled on
--   the client side.
type MenuitemItemActivatedCallback = Word32 " /@arg1@/: The timestamp of when it was activated " -> IO ()

-- | Connect a signal handler for the “<tt>item-activated</tt>” signal, to
--   be run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> menuitem #itemActivated callback
--   </pre>
afterMenuitemItemActivated :: (IsMenuitem a, MonadIO m) => a -> MenuitemItemActivatedCallback -> m SignalHandlerId

-- | Wrap the callback into a <a>Closure</a>.
genClosure_MenuitemItemActivated :: MenuitemItemActivatedCallback -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   <a>C_MenuitemItemActivatedCallback</a>.
mk_MenuitemItemActivatedCallback :: C_MenuitemItemActivatedCallback -> IO (FunPtr C_MenuitemItemActivatedCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>MenuitemItemActivatedCallback</a></tt>.
noMenuitemItemActivatedCallback :: Maybe MenuitemItemActivatedCallback

-- | Connect a signal handler for the “<tt>item-activated</tt>” signal, to
--   be run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> menuitem #itemActivated callback
--   </pre>
onMenuitemItemActivated :: (IsMenuitem a, MonadIO m) => a -> MenuitemItemActivatedCallback -> m SignalHandlerId

-- | Wrap a <a>MenuitemItemActivatedCallback</a> into a
--   <a>C_MenuitemItemActivatedCallback</a>.
wrap_MenuitemItemActivatedCallback :: MenuitemItemActivatedCallback -> C_MenuitemItemActivatedCallback

-- | Type for the callback on the (unwrapped) C side.
type C_MenuitemPropertyChangedCallback = Ptr () -> CString -> Ptr GVariant -> Ptr () -> IO ()

-- | Emitted everytime a property on a menuitem is either updated or added.
type MenuitemPropertyChangedCallback = Text " /@arg1@/: The name of the property that changed " -> GVariant " /@arg2@/: The new value of the property " -> IO ()

-- | Connect a signal handler for the “<tt>property-changed</tt>” signal,
--   to be run after the default handler. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>after</a> menuitem #propertyChanged callback
--   </pre>
afterMenuitemPropertyChanged :: (IsMenuitem a, MonadIO m) => a -> MenuitemPropertyChangedCallback -> m SignalHandlerId

-- | Wrap the callback into a <a>Closure</a>.
genClosure_MenuitemPropertyChanged :: MenuitemPropertyChangedCallback -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   <a>C_MenuitemPropertyChangedCallback</a>.
mk_MenuitemPropertyChangedCallback :: C_MenuitemPropertyChangedCallback -> IO (FunPtr C_MenuitemPropertyChangedCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>MenuitemPropertyChangedCallback</a></tt>.
noMenuitemPropertyChangedCallback :: Maybe MenuitemPropertyChangedCallback

-- | Connect a signal handler for the “<tt>property-changed</tt>” signal,
--   to be run before the default handler. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>on</a> menuitem #propertyChanged callback
--   </pre>
onMenuitemPropertyChanged :: (IsMenuitem a, MonadIO m) => a -> MenuitemPropertyChangedCallback -> m SignalHandlerId

-- | Wrap a <a>MenuitemPropertyChangedCallback</a> into a
--   <a>C_MenuitemPropertyChangedCallback</a>.
wrap_MenuitemPropertyChangedCallback :: MenuitemPropertyChangedCallback -> C_MenuitemPropertyChangedCallback

-- | Type for the callback on the (unwrapped) C side.
type C_MenuitemRealizedCallback = Ptr () -> Ptr () -> IO ()

-- | 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.
type MenuitemRealizedCallback = IO ()

-- | Connect a signal handler for the “<tt>realized</tt>” signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> menuitem #realized callback
--   </pre>
afterMenuitemRealized :: (IsMenuitem a, MonadIO m) => a -> MenuitemRealizedCallback -> m SignalHandlerId

-- | Wrap the callback into a <a>Closure</a>.
genClosure_MenuitemRealized :: MenuitemRealizedCallback -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   <a>C_MenuitemRealizedCallback</a>.
mk_MenuitemRealizedCallback :: C_MenuitemRealizedCallback -> IO (FunPtr C_MenuitemRealizedCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>MenuitemRealizedCallback</a></tt>.
noMenuitemRealizedCallback :: Maybe MenuitemRealizedCallback

-- | Connect a signal handler for the “<tt>realized</tt>” signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> menuitem #realized callback
--   </pre>
onMenuitemRealized :: (IsMenuitem a, MonadIO m) => a -> MenuitemRealizedCallback -> m SignalHandlerId

-- | Wrap a <a>MenuitemRealizedCallback</a> into a
--   <a>C_MenuitemRealizedCallback</a>.
wrap_MenuitemRealizedCallback :: MenuitemRealizedCallback -> C_MenuitemRealizedCallback

-- | Type for the callback on the (unwrapped) C side.
type C_MenuitemShowToUserCallback = Ptr () -> Word32 -> Ptr () -> IO ()

-- | 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.
type MenuitemShowToUserCallback = Word32 " /@arg1@/: Timestamp the event happened at " -> IO ()

-- | Connect a signal handler for the “<tt>show-to-user</tt>” signal, to be
--   run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> menuitem #showToUser callback
--   </pre>
afterMenuitemShowToUser :: (IsMenuitem a, MonadIO m) => a -> MenuitemShowToUserCallback -> m SignalHandlerId

-- | Wrap the callback into a <a>Closure</a>.
genClosure_MenuitemShowToUser :: MenuitemShowToUserCallback -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   <a>C_MenuitemShowToUserCallback</a>.
mk_MenuitemShowToUserCallback :: C_MenuitemShowToUserCallback -> IO (FunPtr C_MenuitemShowToUserCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>MenuitemShowToUserCallback</a></tt>.
noMenuitemShowToUserCallback :: Maybe MenuitemShowToUserCallback

-- | Connect a signal handler for the “<tt>show-to-user</tt>” signal, to be
--   run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> menuitem #showToUser callback
--   </pre>
onMenuitemShowToUser :: (IsMenuitem a, MonadIO m) => a -> MenuitemShowToUserCallback -> m SignalHandlerId

-- | Wrap a <a>MenuitemShowToUserCallback</a> into a
--   <a>C_MenuitemShowToUserCallback</a>.
wrap_MenuitemShowToUserCallback :: MenuitemShowToUserCallback -> C_MenuitemShowToUserCallback
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Dbusmenu.Objects.Menuitem.Menuitem a) => GI.Dbusmenu.Objects.Menuitem.IsMenuitem a
instance GI.Dbusmenu.Objects.Menuitem.IsMenuitem GI.Dbusmenu.Objects.Menuitem.Menuitem
instance Data.GI.Base.BasicTypes.GObject GI.Dbusmenu.Objects.Menuitem.Menuitem
instance GI.GObject.Objects.Object.IsObject GI.Dbusmenu.Objects.Menuitem.Menuitem


-- | Public instance data for a <a>MenuitemProxy</a>.
module GI.Dbusmenu.Objects.MenuitemProxy

-- | Memory-managed wrapper type.
newtype MenuitemProxy
MenuitemProxy :: ManagedPtr MenuitemProxy -> MenuitemProxy

-- | Type class for types which can be safely cast to <a>MenuitemProxy</a>,
--   for instance with <a>toMenuitemProxy</a>.
class GObject o => IsMenuitemProxy o

-- | Cast to <a>MenuitemProxy</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toMenuitemProxy :: (MonadIO m, IsMenuitemProxy o) => o -> m MenuitemProxy

-- | A convenience alias for <a>Nothing</a> :: <a>Maybe</a>
--   <a>MenuitemProxy</a>.
noMenuitemProxy :: Maybe MenuitemProxy

-- | Accesses the private variable of which <a>Menuitem</a> we are doing
--   the proxying for.
menuitemProxyGetWrapped :: (HasCallStack, MonadIO m, IsMenuitemProxy a) => a -> m Menuitem

-- | Builds a new <a>MenuitemProxy</a> object that proxies all of the
--   values for <i><tt>mi</tt></i>.
menuitemProxyNew :: (HasCallStack, MonadIO m, IsMenuitem a) => a -> m MenuitemProxy

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>menu-item</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructMenuitemProxyMenuItem :: (IsMenuitemProxy o, IsMenuitem a) => a -> IO (GValueConstruct o)

-- | Get the value of the “<tt>menu-item</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> menuitemProxy #menuItem
--   </pre>
getMenuitemProxyMenuItem :: (MonadIO m, IsMenuitemProxy o) => o -> m (Maybe Menuitem)
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Dbusmenu.Objects.MenuitemProxy.MenuitemProxy a) => GI.Dbusmenu.Objects.MenuitemProxy.IsMenuitemProxy a
instance GI.Dbusmenu.Objects.MenuitemProxy.IsMenuitemProxy GI.Dbusmenu.Objects.MenuitemProxy.MenuitemProxy
instance Data.GI.Base.BasicTypes.GObject GI.Dbusmenu.Objects.MenuitemProxy.MenuitemProxy
instance GI.Dbusmenu.Objects.Menuitem.IsMenuitem GI.Dbusmenu.Objects.MenuitemProxy.MenuitemProxy
instance GI.GObject.Objects.Object.IsObject GI.Dbusmenu.Objects.MenuitemProxy.MenuitemProxy


-- | A server which represents a sharing of a set of
--   <tt><i>DbusmenuMenuitems</i></tt> across DBus to a <a>Client</a>.
module GI.Dbusmenu.Objects.Server

-- | Memory-managed wrapper type.
newtype Server
Server :: ManagedPtr Server -> Server

-- | Type class for types which can be safely cast to <a>Server</a>, for
--   instance with <a>toServer</a>.
class GObject o => IsServer o

-- | Cast to <a>Server</a>, for types for which this is known to be safe.
--   For general casts, use <a>castTo</a>.
toServer :: (MonadIO m, IsServer o) => o -> m Server

-- | A convenience alias for <a>Nothing</a> :: <a>Maybe</a> <a>Server</a>.
noServer :: Maybe Server

-- | Gets the stored and exported icon paths from the server.
serverGetIconPaths :: (HasCallStack, MonadIO m, IsServer a) => a -> m [Text]

-- | Gets the current statust hat the server is sending out over DBus.
--   
--   Return value: The current status the server is sending
serverGetStatus :: (HasCallStack, MonadIO m, IsServer a) => a -> m Status

-- | Returns the value of the text direction that is being exported over
--   DBus for this server. It should relate to the direction of the labels
--   and other text fields that are being exported by this server.
--   
--   Return value: Text direction exported for this server.
serverGetTextDirection :: (HasCallStack, MonadIO m, IsServer a) => a -> m TextDirection

-- | Creates a new <a>Server</a> object with a specific object path on
--   DBus. If <i><tt>object</tt></i> is set to NULL the default object name
--   of "/com/canonical/dbusmenu" will be used.
--   
--   Return value: A brand new <a>Server</a>
serverNew :: (HasCallStack, MonadIO m) => Text -> m Server

-- | Sets the icon paths for the server. This will replace previously set
--   icon theme paths.
serverSetIconPaths :: (HasCallStack, MonadIO m, IsServer a) => a -> [Text] -> m ()

-- | This function contains all of the <a>Value</a> wrapping required to
--   set the property <a>Server</a>:<tt><i>root-node</i></tt> on the server
--   <i><tt>self</tt></i>.
serverSetRoot :: (HasCallStack, MonadIO m, IsServer a, IsMenuitem b) => a -> b -> m ()

-- | Changes the status of the server.
serverSetStatus :: (HasCallStack, MonadIO m, IsServer a) => a -> Status -> m ()

-- | Sets the text direction that should be exported over DBus for this
--   server. If the value is set to
--   <tt><i>DBUSMENU_TEXT_DIRECTION_NONE</i></tt> the default detection
--   will be used for setting the value and exported over DBus.
serverSetTextDirection :: (HasCallStack, MonadIO m, IsServer a) => a -> TextDirection -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>dbus-object</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructServerDbusObject :: IsServer o => Text -> IO (GValueConstruct o)

-- | Get the value of the “<tt>dbus-object</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> server #dbusObject
--   </pre>
getServerDbusObject :: (MonadIO m, IsServer o) => o -> m (Maybe Text)

-- | Set the value of the “<tt>root-node</tt>” property to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #rootNode
--   </pre>
clearServerRootNode :: (MonadIO m, IsServer o) => o -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>root-node</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructServerRootNode :: (IsServer o, IsMenuitem a) => a -> IO (GValueConstruct o)

-- | Get the value of the “<tt>root-node</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> server #rootNode
--   </pre>
getServerRootNode :: (MonadIO m, IsServer o) => o -> m (Maybe Menuitem)

-- | Set the value of the “<tt>root-node</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> server [ #rootNode <a>:=</a> value ]
--   </pre>
setServerRootNode :: (MonadIO m, IsServer o, IsMenuitem a) => o -> a -> m ()

-- | Get the value of the “<tt>version</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> server #version
--   </pre>
getServerVersion :: (MonadIO m, IsServer o) => o -> m Word32

-- | Type for the callback on the (unwrapped) C side.
type C_ServerItemActivationRequestedCallback = Ptr () -> Int32 -> Word32 -> Ptr () -> IO ()

-- | This is signaled when a menuitem under this server sends its activate
--   signal.
type ServerItemActivationRequestedCallback = Int32 " /@arg1@/: The ID of the parent for this update. " -> Word32 " /@arg2@/: The timestamp of when the event happened " -> IO ()

-- | Connect a signal handler for the “<tt>item-activation-requested</tt>”
--   signal, to be run after the default handler. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>after</a> server #itemActivationRequested callback
--   </pre>
afterServerItemActivationRequested :: (IsServer a, MonadIO m) => a -> ServerItemActivationRequestedCallback -> m SignalHandlerId

-- | Wrap the callback into a <a>Closure</a>.
genClosure_ServerItemActivationRequested :: ServerItemActivationRequestedCallback -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   <a>C_ServerItemActivationRequestedCallback</a>.
mk_ServerItemActivationRequestedCallback :: C_ServerItemActivationRequestedCallback -> IO (FunPtr C_ServerItemActivationRequestedCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>ServerItemActivationRequestedCallback</a></tt>.
noServerItemActivationRequestedCallback :: Maybe ServerItemActivationRequestedCallback

-- | Connect a signal handler for the “<tt>item-activation-requested</tt>”
--   signal, to be run before the default handler. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>on</a> server #itemActivationRequested callback
--   </pre>
onServerItemActivationRequested :: (IsServer a, MonadIO m) => a -> ServerItemActivationRequestedCallback -> m SignalHandlerId

-- | Wrap a <a>ServerItemActivationRequestedCallback</a> into a
--   <a>C_ServerItemActivationRequestedCallback</a>.
wrap_ServerItemActivationRequestedCallback :: ServerItemActivationRequestedCallback -> C_ServerItemActivationRequestedCallback

-- | Type for the callback on the (unwrapped) C side.
type C_ServerItemPropertyUpdatedCallback = Ptr () -> Int32 -> CString -> Ptr GVariant -> Ptr () -> IO ()

-- | <i>No description available in the introspection data.</i>
type ServerItemPropertyUpdatedCallback = Int32 -> Text -> GVariant -> IO ()

-- | Connect a signal handler for the “<tt>item-property-updated</tt>”
--   signal, to be run after the default handler. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>after</a> server #itemPropertyUpdated callback
--   </pre>
afterServerItemPropertyUpdated :: (IsServer a, MonadIO m) => a -> ServerItemPropertyUpdatedCallback -> m SignalHandlerId

-- | Wrap the callback into a <a>Closure</a>.
genClosure_ServerItemPropertyUpdated :: ServerItemPropertyUpdatedCallback -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   <a>C_ServerItemPropertyUpdatedCallback</a>.
mk_ServerItemPropertyUpdatedCallback :: C_ServerItemPropertyUpdatedCallback -> IO (FunPtr C_ServerItemPropertyUpdatedCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>ServerItemPropertyUpdatedCallback</a></tt>.
noServerItemPropertyUpdatedCallback :: Maybe ServerItemPropertyUpdatedCallback

-- | Connect a signal handler for the “<tt>item-property-updated</tt>”
--   signal, to be run before the default handler. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>on</a> server #itemPropertyUpdated callback
--   </pre>
onServerItemPropertyUpdated :: (IsServer a, MonadIO m) => a -> ServerItemPropertyUpdatedCallback -> m SignalHandlerId

-- | Wrap a <a>ServerItemPropertyUpdatedCallback</a> into a
--   <a>C_ServerItemPropertyUpdatedCallback</a>.
wrap_ServerItemPropertyUpdatedCallback :: ServerItemPropertyUpdatedCallback -> C_ServerItemPropertyUpdatedCallback

-- | Type for the callback on the (unwrapped) C side.
type C_ServerItemUpdatedCallback = Ptr () -> Int32 -> Ptr () -> IO ()

-- | <i>No description available in the introspection data.</i>
type ServerItemUpdatedCallback = Int32 -> IO ()

-- | Connect a signal handler for the “<tt>item-updated</tt>” signal, to be
--   run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> server #itemUpdated callback
--   </pre>
afterServerItemUpdated :: (IsServer a, MonadIO m) => a -> ServerItemUpdatedCallback -> m SignalHandlerId

-- | Wrap the callback into a <a>Closure</a>.
genClosure_ServerItemUpdated :: ServerItemUpdatedCallback -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   <a>C_ServerItemUpdatedCallback</a>.
mk_ServerItemUpdatedCallback :: C_ServerItemUpdatedCallback -> IO (FunPtr C_ServerItemUpdatedCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>ServerItemUpdatedCallback</a></tt>.
noServerItemUpdatedCallback :: Maybe ServerItemUpdatedCallback

-- | Connect a signal handler for the “<tt>item-updated</tt>” signal, to be
--   run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> server #itemUpdated callback
--   </pre>
onServerItemUpdated :: (IsServer a, MonadIO m) => a -> ServerItemUpdatedCallback -> m SignalHandlerId

-- | Wrap a <a>ServerItemUpdatedCallback</a> into a
--   <a>C_ServerItemUpdatedCallback</a>.
wrap_ServerItemUpdatedCallback :: ServerItemUpdatedCallback -> C_ServerItemUpdatedCallback

-- | Type for the callback on the (unwrapped) C side.
type C_ServerLayoutUpdatedCallback = Ptr () -> Word32 -> Int32 -> Ptr () -> IO ()

-- | This signal is emitted any time the layout of the menuitems under this
--   server is changed.
type ServerLayoutUpdatedCallback = Word32 " /@arg1@/: A revision number representing which revision the update represents itself as. " -> Int32 " /@arg2@/: The ID of the parent for this update. " -> IO ()

-- | Connect a signal handler for the “<tt>layout-updated</tt>” signal, to
--   be run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> server #layoutUpdated callback
--   </pre>
afterServerLayoutUpdated :: (IsServer a, MonadIO m) => a -> ServerLayoutUpdatedCallback -> m SignalHandlerId

-- | Wrap the callback into a <a>Closure</a>.
genClosure_ServerLayoutUpdated :: ServerLayoutUpdatedCallback -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   <a>C_ServerLayoutUpdatedCallback</a>.
mk_ServerLayoutUpdatedCallback :: C_ServerLayoutUpdatedCallback -> IO (FunPtr C_ServerLayoutUpdatedCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>ServerLayoutUpdatedCallback</a></tt>.
noServerLayoutUpdatedCallback :: Maybe ServerLayoutUpdatedCallback

-- | Connect a signal handler for the “<tt>layout-updated</tt>” signal, to
--   be run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> server #layoutUpdated callback
--   </pre>
onServerLayoutUpdated :: (IsServer a, MonadIO m) => a -> ServerLayoutUpdatedCallback -> m SignalHandlerId

-- | Wrap a <a>ServerLayoutUpdatedCallback</a> into a
--   <a>C_ServerLayoutUpdatedCallback</a>.
wrap_ServerLayoutUpdatedCallback :: ServerLayoutUpdatedCallback -> C_ServerLayoutUpdatedCallback
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Dbusmenu.Objects.Server.Server a) => GI.Dbusmenu.Objects.Server.IsServer a
instance GI.Dbusmenu.Objects.Server.IsServer GI.Dbusmenu.Objects.Server.Server
instance Data.GI.Base.BasicTypes.GObject GI.Dbusmenu.Objects.Server.Server
instance GI.GObject.Objects.Object.IsObject GI.Dbusmenu.Objects.Server.Server


module GI.Dbusmenu.Objects


module GI.Dbusmenu
