{- | Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria (garetxe@gmail.com) -} module GI.Gio.Objects.DBusActionGroup ( -- * Exported types DBusActionGroup(..) , DBusActionGroupK , toDBusActionGroup , noDBusActionGroup , -- * Methods -- ** dBusActionGroupGet dBusActionGroupGet , ) where import Prelude () import Data.GI.Base.ShortPrelude import qualified Data.Text as T import qualified Data.ByteString.Char8 as B import qualified Data.Map as Map import GI.Gio.Types import GI.Gio.Callbacks import qualified GI.GObject as GObject newtype DBusActionGroup = DBusActionGroup (ForeignPtr DBusActionGroup) foreign import ccall "g_dbus_action_group_get_type" c_g_dbus_action_group_get_type :: IO GType type instance ParentTypes DBusActionGroup = DBusActionGroupParentTypes type DBusActionGroupParentTypes = '[GObject.Object, ActionGroup, RemoteActionGroup] instance GObject DBusActionGroup where gobjectIsInitiallyUnowned _ = False gobjectType _ = c_g_dbus_action_group_get_type class GObject o => DBusActionGroupK o instance (GObject o, IsDescendantOf DBusActionGroup o) => DBusActionGroupK o toDBusActionGroup :: DBusActionGroupK o => o -> IO DBusActionGroup toDBusActionGroup = unsafeCastTo DBusActionGroup noDBusActionGroup :: Maybe DBusActionGroup noDBusActionGroup = Nothing type instance AttributeList DBusActionGroup = DBusActionGroupAttributeList type DBusActionGroupAttributeList = ('[ ] :: [(Symbol, *)]) type instance SignalList DBusActionGroup = DBusActionGroupSignalList type DBusActionGroupSignalList = ('[ '("action-added", ActionGroupActionAddedSignalInfo), '("action-enabled-changed", ActionGroupActionEnabledChangedSignalInfo), '("action-removed", ActionGroupActionRemovedSignalInfo), '("action-state-changed", ActionGroupActionStateChangedSignalInfo), '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)]) -- method DBusActionGroup::get -- method type : MemberFunction -- Args : [Arg {argName = "connection", argType = TInterface "Gio" "DBusConnection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "bus_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "object_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "connection", argType = TInterface "Gio" "DBusConnection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "bus_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "object_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Gio" "DBusActionGroup" -- throws : False -- Skip return : False foreign import ccall "g_dbus_action_group_get" g_dbus_action_group_get :: Ptr DBusConnection -> -- connection : TInterface "Gio" "DBusConnection" CString -> -- bus_name : TBasicType TUTF8 CString -> -- object_path : TBasicType TUTF8 IO (Ptr DBusActionGroup) dBusActionGroupGet :: (MonadIO m, DBusConnectionK a) => a -> -- connection T.Text -> -- bus_name T.Text -> -- object_path m DBusActionGroup dBusActionGroupGet connection bus_name object_path = liftIO $ do let connection' = unsafeManagedPtrCastPtr connection bus_name' <- textToCString bus_name object_path' <- textToCString object_path result <- g_dbus_action_group_get connection' bus_name' object_path' checkUnexpectedReturnNULL "g_dbus_action_group_get" result result' <- (wrapObject DBusActionGroup) result touchManagedPtr connection freeMem bus_name' freeMem object_path' return result'