-- 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.14


-- | Build time configuration used during code generation.
module GI.Dbusmenu.Config

-- | Overrides used when generating these bindings.
overrides :: Text

-- | Modules in this package
modules :: [Text]


module GI.Dbusmenu.Constants

-- | String to attach to signal <a>Server::layoutUpdated</a>
pattern SERVER_SIGNAL_LAYOUT_UPDATED :: Text

-- | String to attach to signal <a>Server::itemActivationRequested</a>
pattern SERVER_SIGNAL_ITEM_ACTIVATION :: Text

-- | String to attach to signal <a>Server::itemUpdated</a>
pattern SERVER_SIGNAL_ID_UPDATE :: Text

-- | String to attach to signal <a>Server::itemPropertyUpdated</a>
pattern SERVER_SIGNAL_ID_PROP_UPDATE :: Text

-- | String to access property <a>Server:version</a>
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:rootNode</a>
pattern SERVER_PROP_ROOT_NODE :: Text

-- | String to access property <a>Server:dbusObject</a>
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::rootChanged</a>
pattern CLIENT_SIGNAL_ROOT_CHANGED :: Text

-- | String to attach to signal <a>Client::newMenuitem</a>
pattern CLIENT_SIGNAL_NEW_MENUITEM :: Text

-- | String to attach to signal <a>Client::layoutUpdated</a>
pattern CLIENT_SIGNAL_LAYOUT_UPDATED :: Text

-- | String to attach to signal <a>Client::itemActivate</a>
pattern CLIENT_SIGNAL_ITEM_ACTIVATE :: Text

-- | String to attach to signal <a>Client::iconThemeDirsChanged</a>
pattern CLIENT_SIGNAL_ICON_THEME_DIRS_CHANGED :: Text

-- | String to attach to signal <a>Client::eventResult</a>
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:groupEvents</a>
pattern CLIENT_PROP_GROUP_EVENTS :: Text

-- | String to access property <a>Client:dbusObject</a>
pattern CLIENT_PROP_DBUS_OBJECT :: Text

-- | String to access property <a>Client:dbusName</a>
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.Internal.Enum.Enum GI.Dbusmenu.Enums.Status
instance GHC.Internal.Enum.Enum GI.Dbusmenu.Enums.TextDirection
instance GHC.Classes.Eq GI.Dbusmenu.Enums.Status
instance GHC.Classes.Eq GI.Dbusmenu.Enums.TextDirection
instance GHC.Classes.Ord GI.Dbusmenu.Enums.Status
instance GHC.Classes.Ord GI.Dbusmenu.Enums.TextDirection
instance GHC.Internal.Show.Show GI.Dbusmenu.Enums.Status
instance GHC.Internal.Show.Show GI.Dbusmenu.Enums.TextDirection


-- | 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, IsDescendantOf Menuitem 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

-- | 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 (Maybe 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 (Maybe 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 (Maybe 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 (Maybe 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 (Maybe 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 -> CSize -> 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, MonadIO m) => Int32 -> m (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

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

-- | Connect a signal handler for the <a>aboutToShow</a> 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>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterMenuitemAboutToShow :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemAboutToShowCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>aboutToShow</a> 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 -> ((?self :: a) => MenuitemAboutToShowCallback) -> m SignalHandlerId

-- | Signaled when the child menuitem has been added to the parent.
type MenuitemChildAddedCallback = Object -> Word32 -> IO ()

-- | Connect a signal handler for the <a>childAdded</a> 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>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterMenuitemChildAdded :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemChildAddedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>childAdded</a> 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 -> ((?self :: a) => MenuitemChildAddedCallback) -> m SignalHandlerId

-- | Signaled when the child menuitem has had its location in the list
--   change.
type MenuitemChildMovedCallback = Object -> Word32 -> Word32 -> IO ()

-- | Connect a signal handler for the <a>childMoved</a> 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>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterMenuitemChildMoved :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemChildMovedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>childMoved</a> 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 -> ((?self :: a) => MenuitemChildMovedCallback) -> m SignalHandlerId

-- | 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 -> IO ()

-- | Connect a signal handler for the <a>childRemoved</a> 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>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterMenuitemChildRemoved :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemChildRemovedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>childRemoved</a> 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 -> ((?self :: a) => MenuitemChildRemovedCallback) -> m SignalHandlerId

-- | Emitted when an event is passed through. The event is signalled after
--   handle_event is called.
type MenuitemEventCallback = Text -> GVariant -> Word32 -> IO Bool

-- | Connect a signal handler for the <a>event</a> 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>
--   
--   This signal admits a optional parameter <tt>detail</tt>. If it's not
--   <tt>Nothing</tt>, we will connect to “<tt>event::detail</tt>” 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
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterMenuitemEvent :: (IsMenuitem a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => MenuitemEventCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>event</a> 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>
--   
--   This signal admits a optional parameter <tt>detail</tt>. If it's not
--   <tt>Nothing</tt>, we will connect to “<tt>event::detail</tt>” instead.
onMenuitemEvent :: (IsMenuitem a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => MenuitemEventCallback) -> m SignalHandlerId

-- | Emitted on the objects on the server side when they are signaled on
--   the client side.
type MenuitemItemActivatedCallback = Word32 -> IO ()

-- | Connect a signal handler for the <a>itemActivated</a> 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>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterMenuitemItemActivated :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemItemActivatedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>itemActivated</a> 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 -> ((?self :: a) => MenuitemItemActivatedCallback) -> m SignalHandlerId

-- | Emitted everytime a property on a menuitem is either updated or added.
type MenuitemPropertyChangedCallback = Text -> GVariant -> IO ()

-- | Connect a signal handler for the <a>propertyChanged</a> 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>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterMenuitemPropertyChanged :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemPropertyChangedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>propertyChanged</a> 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 -> ((?self :: a) => MenuitemPropertyChangedCallback) -> m SignalHandlerId

-- | 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 <a>realized</a> 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>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterMenuitemRealized :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemRealizedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>realized</a> 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 -> ((?self :: a) => MenuitemRealizedCallback) -> m SignalHandlerId

-- | 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 -> IO ()

-- | Connect a signal handler for the <a>showToUser</a> 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>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterMenuitemShowToUser :: (IsMenuitem a, MonadIO m) => a -> ((?self :: a) => MenuitemShowToUserCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>showToUser</a> 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 -> ((?self :: a) => MenuitemShowToUserCallback) -> m SignalHandlerId
instance GHC.Classes.Eq GI.Dbusmenu.Objects.Menuitem.Menuitem
instance Data.GI.Base.BasicTypes.GObject GI.Dbusmenu.Objects.Menuitem.Menuitem
instance Data.GI.Base.Overloading.HasParentTypes GI.Dbusmenu.Objects.Menuitem.Menuitem
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Dbusmenu.Objects.Menuitem.Menuitem)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Dbusmenu.Objects.Menuitem.Menuitem o) => GI.Dbusmenu.Objects.Menuitem.IsMenuitem o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Dbusmenu.Objects.Menuitem.Menuitem
instance Data.GI.Base.BasicTypes.TypedObject GI.Dbusmenu.Objects.Menuitem.Menuitem


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 -> Menuitem -> 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 -> Menuitem -> Client -> Ptr () -> 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>GClosure</a>.
genClosure_ClientTypeHandler :: MonadIO m => ClientTypeHandler -> m (GClosure C_ClientTypeHandler)

-- | 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 -> IO ()

-- | Callback prototype for a callback that is called when the menu should
--   be shown.
type MenuitemAboutToShowCb_WithClosures = Menuitem -> Ptr () -> 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>GClosure</a>.
genClosure_MenuitemAboutToShowCb :: MonadIO m => MenuitemAboutToShowCb -> m (GClosure C_MenuitemAboutToShowCb)

-- | 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 -> Maybe Text -> IO GVariant

-- | 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>GClosure</a>.
genClosure_MenuitemBuildvariantSlotT :: MonadIO m => MenuitemBuildvariantSlotT -> m (GClosure C_MenuitemBuildvariantSlotT)

-- | 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, IsDescendantOf Client 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

-- | 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<a>newMenuitem</a>
--   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<a>newMenuitem</a>
--   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, MonadIO m) => Text -> m (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, MonadIO m) => Text -> m (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, MonadIO m) => Bool -> m (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 ()

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

-- | Connect a signal handler for the <a>eventResult</a> 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>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterClientEventResult :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientEventResultCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>eventResult</a> 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 -> ((?self :: a) => ClientEventResultCallback) -> m SignalHandlerId

-- | Signaled when the theme directories are changed by the server.
type ClientIconThemeDirsChangedCallback = Ptr () -> IO ()

-- | Connect a signal handler for the <a>iconThemeDirsChanged</a> 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>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterClientIconThemeDirsChanged :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientIconThemeDirsChangedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>iconThemeDirsChanged</a> 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 -> ((?self :: a) => ClientIconThemeDirsChangedCallback) -> m SignalHandlerId

-- | Signaled when the server wants to activate an item in order to display
--   the menu.
type ClientItemActivateCallback = Object -> Word32 -> IO ()

-- | Connect a signal handler for the <a>itemActivate</a> 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>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterClientItemActivate :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientItemActivateCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>itemActivate</a> 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 -> ((?self :: a) => ClientItemActivateCallback) -> m SignalHandlerId

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

-- | Connect a signal handler for the <a>layoutUpdated</a> 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>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterClientLayoutUpdated :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientLayoutUpdatedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>layoutUpdated</a> 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 -> ((?self :: a) => ClientLayoutUpdatedCallback) -> m SignalHandlerId

-- | 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::childAdded</a> when it gets parented.
type ClientNewMenuitemCallback = Object -> IO ()

-- | Connect a signal handler for the <a>newMenuitem</a> 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>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterClientNewMenuitem :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientNewMenuitemCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>newMenuitem</a> 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 -> ((?self :: a) => ClientNewMenuitemCallback) -> m SignalHandlerId

-- | 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 -> IO ()

-- | Connect a signal handler for the <a>rootChanged</a> 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>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterClientRootChanged :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientRootChangedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>rootChanged</a> 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 -> ((?self :: a) => ClientRootChangedCallback) -> m SignalHandlerId
instance GHC.Classes.Eq GI.Dbusmenu.Objects.Client.Client
instance Data.GI.Base.BasicTypes.GObject GI.Dbusmenu.Objects.Client.Client
instance Data.GI.Base.Overloading.HasParentTypes GI.Dbusmenu.Objects.Client.Client
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Dbusmenu.Objects.Client.Client o) => GI.Dbusmenu.Objects.Client.IsClient o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Dbusmenu.Objects.Client.Client)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Dbusmenu.Objects.Client.Client
instance Data.GI.Base.BasicTypes.TypedObject GI.Dbusmenu.Objects.Client.Client


-- | 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, IsDescendantOf MenuitemProxy 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

-- | 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, MonadIO m, IsMenuitem a) => a -> m (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 GHC.Classes.Eq GI.Dbusmenu.Objects.MenuitemProxy.MenuitemProxy
instance Data.GI.Base.BasicTypes.GObject GI.Dbusmenu.Objects.MenuitemProxy.MenuitemProxy
instance Data.GI.Base.Overloading.HasParentTypes GI.Dbusmenu.Objects.MenuitemProxy.MenuitemProxy
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Dbusmenu.Objects.MenuitemProxy.MenuitemProxy)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Dbusmenu.Objects.MenuitemProxy.MenuitemProxy o) => GI.Dbusmenu.Objects.MenuitemProxy.IsMenuitemProxy o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Dbusmenu.Objects.MenuitemProxy.MenuitemProxy
instance Data.GI.Base.BasicTypes.TypedObject 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, IsDescendantOf Server 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

-- | 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:rootNode</a> 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, MonadIO m) => Text -> m (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, MonadIO m, IsMenuitem a) => a -> m (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

-- | This is signaled when a menuitem under this server sends its activate
--   signal.
type ServerItemActivationRequestedCallback = Int32 -> Word32 -> IO ()

-- | Connect a signal handler for the <a>itemActivationRequested</a>
--   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>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterServerItemActivationRequested :: (IsServer a, MonadIO m) => a -> ((?self :: a) => ServerItemActivationRequestedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>itemActivationRequested</a>
--   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 -> ((?self :: a) => ServerItemActivationRequestedCallback) -> m SignalHandlerId

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

-- | Connect a signal handler for the <a>itemPropertyUpdated</a> 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>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterServerItemPropertyUpdated :: (IsServer a, MonadIO m) => a -> ((?self :: a) => ServerItemPropertyUpdatedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>itemPropertyUpdated</a> 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 -> ((?self :: a) => ServerItemPropertyUpdatedCallback) -> m SignalHandlerId

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

-- | Connect a signal handler for the <a>itemUpdated</a> 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>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterServerItemUpdated :: (IsServer a, MonadIO m) => a -> ((?self :: a) => ServerItemUpdatedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>itemUpdated</a> 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 -> ((?self :: a) => ServerItemUpdatedCallback) -> m SignalHandlerId

-- | This signal is emitted any time the layout of the menuitems under this
--   server is changed.
type ServerLayoutUpdatedCallback = Word32 -> Int32 -> IO ()

-- | Connect a signal handler for the <a>layoutUpdated</a> 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>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterServerLayoutUpdated :: (IsServer a, MonadIO m) => a -> ((?self :: a) => ServerLayoutUpdatedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>layoutUpdated</a> 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 -> ((?self :: a) => ServerLayoutUpdatedCallback) -> m SignalHandlerId
instance GHC.Classes.Eq GI.Dbusmenu.Objects.Server.Server
instance Data.GI.Base.BasicTypes.GObject GI.Dbusmenu.Objects.Server.Server
instance Data.GI.Base.Overloading.HasParentTypes GI.Dbusmenu.Objects.Server.Server
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Dbusmenu.Objects.Server.Server)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Dbusmenu.Objects.Server.Server o) => GI.Dbusmenu.Objects.Server.IsServer o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Dbusmenu.Objects.Server.Server
instance Data.GI.Base.BasicTypes.TypedObject GI.Dbusmenu.Objects.Server.Server


module GI.Dbusmenu.Objects


module GI.Dbusmenu
