gi-dbusmenugtk3-0.4.16: DbusmenuGtk bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.DbusmenuGtk3.Objects.Client

Contents

- Exported types
- Methods
  - getAccelGroup
  - menuitemGet
  - menuitemGetSubmenu
  - new
  - newitemBase
  - setAccelGroup

Description

A subclass of `Client` to add functionality with regarding building GTK items out of the abstract tree.

Synopsis

- newtype Client = Client (ManagedPtr Client)
- class (GObject o, IsDescendantOf Client o) => IsClient o
- toClient :: (MonadIO m, IsClient o) => o -> m Client
- clientGetAccelGroup :: (HasCallStack, MonadIO m, IsClient a) => a -> m AccelGroup
- clientMenuitemGet :: (HasCallStack, MonadIO m, IsClient a, IsMenuitem b) => a -> b -> m MenuItem
- clientMenuitemGetSubmenu :: (HasCallStack, MonadIO m, IsClient a, IsMenuitem b) => a -> b -> m Menu
- clientNew :: (HasCallStack, MonadIO m) => Text -> Text -> m Client
- clientNewitemBase :: (HasCallStack, MonadIO m, IsClient a, IsMenuitem b, IsMenuItem c, IsMenuitem d) => a -> b -> c -> d -> m ()
- clientSetAccelGroup :: (HasCallStack, MonadIO m, IsClient a, IsAccelGroup b) => a -> b -> m ()

# Exported types

newtype Client Source #

Memory-managed wrapper type.

Constructors

Client (ManagedPtr Client) |

#### Instances

Instances details

Eq Client Source # |
Instance details Defined in GI.DbusmenuGtk3.Objects.Client Methods (==) :: Client -> Client -> Bool Source # (/=) :: Client -> Client -> Bool Source #
GObject Client Source # |
Instance details Defined in GI.DbusmenuGtk3.Objects.Client
ManagedPtrNewtype Client Source # |
Instance details Defined in GI.DbusmenuGtk3.Objects.Client Methods toManagedPtr :: Client -> ManagedPtr Client Source #
TypedObject Client Source # |
Instance details Defined in GI.DbusmenuGtk3.Objects.Client Methods glibType :: IO GType Source #
HasParentTypes Client Source # |
Instance details Defined in GI.DbusmenuGtk3.Objects.Client
IsGValue (Maybe Client) Source # | Convert `Client` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.DbusmenuGtk3.Objects.Client Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe Client -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe Client) Source #
type ParentTypes Client Source # |
Instance details Defined in GI.DbusmenuGtk3.Objects.Client type ParentTypes Client = '[Client, Object]

class (GObject o, IsDescendantOf Client o) => IsClient o Source #

Type class for types which can be safely cast to `Client`, for instance with `toClient`.

#### Instances

Instances details

(GObject o, IsDescendantOf Client o) => IsClient o Source # |
Instance details Defined in GI.DbusmenuGtk3.Objects.Client

toClient :: (MonadIO m, IsClient o) => o -> m Client Source #

Cast to `Client`, for types for which this is known to be safe. For general casts, use `castTo`.

# Methods

### Click to display all available methods, including inherited ones

Expand

#### Methods

addTypeHandler, addTypeHandlerFull, bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, menuitemGet, menuitemGetSubmenu, newitemBase, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.

#### Getters

getAccelGroup, getData, getIconPaths, getProperty, getQdata, getRoot, getStatus, getTextDirection.

#### Setters

setAccelGroup, setData, setDataFull, setProperty.

## getAccelGroup

clientGetAccelGroup Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) |
=> a | `client`: Client to query for an accelerator group
-> m AccelGroup | Returns: Either a valid group or `NULL` on error or none set.

Gets the accel group for this client.

## menuitemGet

clientMenuitemGet Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsMenuitem b) |
=> a | `client`: A `Client` with the item in it.
-> b | `item`: `Menuitem` to get associated `MenuItem` on.
-> m MenuItem | Returns: The `MenuItem` that can be played with.

This grabs the `MenuItem` that is associated with the `Menuitem`.

## menuitemGetSubmenu

clientMenuitemGetSubmenu Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsMenuitem b) |
=> a | `client`: A `Client` with the item in it.
-> b | `item`: `Menuitem` to get associated `Menu` on.
-> m Menu | Returns: The `Menu` if there is one.

This grabs the submenu associated with the menuitem.

## new

clientNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Text | `dbusName`: Name of the `Server` on DBus
-> Text | `dbusObject`: Name of the object on the `Server`
-> m Client | Returns: A new `Client` sync'd with a server

Creates a new `Client` object and creates a `Client` that connects across DBus to a `Server`.

## newitemBase

clientNewitemBase Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsMenuitem b, IsMenuItem c, IsMenuitem d) |
=> a | `client`: The client handling everything on this connection
-> b | `item`: The `Menuitem` to attach the GTK-isms to
-> c | `gmi`: A `MenuItem` representing the GTK world's view of this menuitem
-> d | `parent`: The parent `Menuitem`
-> m () |

This function provides some of the basic connectivity for being in the GTK world. Things like visibility and sensitivity of the item are handled here so that the subclasses don't have to. If you're building your on GTK menu item you can use this function to apply those basic attributes so that you don't have to deal with them either.

This also handles passing the "activate" signal back to the `Menuitem` side of thing.

## setAccelGroup

clientSetAccelGroup Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsAccelGroup b) |
=> a | `client`: To set the group on
-> b | `agroup`: The new acceleration group
-> m () |

Sets the acceleration group for the menu items with accelerators on this client.