#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Gio.Objects.DBusActionGroup
(
DBusActionGroup(..) ,
IsDBusActionGroup ,
toDBusActionGroup ,
noDBusActionGroup ,
dBusActionGroupGet ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gio.Interfaces.ActionGroup as Gio.ActionGroup
import {-# SOURCE #-} qualified GI.Gio.Interfaces.RemoteActionGroup as Gio.RemoteActionGroup
import {-# SOURCE #-} qualified GI.Gio.Objects.DBusConnection as Gio.DBusConnection
newtype DBusActionGroup = DBusActionGroup (ManagedPtr DBusActionGroup)
foreign import ccall "g_dbus_action_group_get_type"
c_g_dbus_action_group_get_type :: IO GType
instance GObject DBusActionGroup where
gobjectType = c_g_dbus_action_group_get_type
class (GObject o, O.IsDescendantOf DBusActionGroup o) => IsDBusActionGroup o
instance (GObject o, O.IsDescendantOf DBusActionGroup o) => IsDBusActionGroup o
instance O.HasParentTypes DBusActionGroup
type instance O.ParentTypes DBusActionGroup = '[GObject.Object.Object, Gio.ActionGroup.ActionGroup, Gio.RemoteActionGroup.RemoteActionGroup]
toDBusActionGroup :: (MonadIO m, IsDBusActionGroup o) => o -> m DBusActionGroup
toDBusActionGroup = liftIO . unsafeCastTo DBusActionGroup
noDBusActionGroup :: Maybe DBusActionGroup
noDBusActionGroup = Nothing
#if ENABLE_OVERLOADING
type family ResolveDBusActionGroupMethod (t :: Symbol) (o :: *) :: * where
ResolveDBusActionGroupMethod "actionAdded" o = Gio.ActionGroup.ActionGroupActionAddedMethodInfo
ResolveDBusActionGroupMethod "actionEnabledChanged" o = Gio.ActionGroup.ActionGroupActionEnabledChangedMethodInfo
ResolveDBusActionGroupMethod "actionRemoved" o = Gio.ActionGroup.ActionGroupActionRemovedMethodInfo
ResolveDBusActionGroupMethod "actionStateChanged" o = Gio.ActionGroup.ActionGroupActionStateChangedMethodInfo
ResolveDBusActionGroupMethod "activateAction" o = Gio.ActionGroup.ActionGroupActivateActionMethodInfo
ResolveDBusActionGroupMethod "activateActionFull" o = Gio.RemoteActionGroup.RemoteActionGroupActivateActionFullMethodInfo
ResolveDBusActionGroupMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveDBusActionGroupMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveDBusActionGroupMethod "changeActionState" o = Gio.ActionGroup.ActionGroupChangeActionStateMethodInfo
ResolveDBusActionGroupMethod "changeActionStateFull" o = Gio.RemoteActionGroup.RemoteActionGroupChangeActionStateFullMethodInfo
ResolveDBusActionGroupMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveDBusActionGroupMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveDBusActionGroupMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveDBusActionGroupMethod "hasAction" o = Gio.ActionGroup.ActionGroupHasActionMethodInfo
ResolveDBusActionGroupMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveDBusActionGroupMethod "listActions" o = Gio.ActionGroup.ActionGroupListActionsMethodInfo
ResolveDBusActionGroupMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveDBusActionGroupMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveDBusActionGroupMethod "queryAction" o = Gio.ActionGroup.ActionGroupQueryActionMethodInfo
ResolveDBusActionGroupMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveDBusActionGroupMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveDBusActionGroupMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveDBusActionGroupMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveDBusActionGroupMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveDBusActionGroupMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveDBusActionGroupMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveDBusActionGroupMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveDBusActionGroupMethod "getActionEnabled" o = Gio.ActionGroup.ActionGroupGetActionEnabledMethodInfo
ResolveDBusActionGroupMethod "getActionParameterType" o = Gio.ActionGroup.ActionGroupGetActionParameterTypeMethodInfo
ResolveDBusActionGroupMethod "getActionState" o = Gio.ActionGroup.ActionGroupGetActionStateMethodInfo
ResolveDBusActionGroupMethod "getActionStateHint" o = Gio.ActionGroup.ActionGroupGetActionStateHintMethodInfo
ResolveDBusActionGroupMethod "getActionStateType" o = Gio.ActionGroup.ActionGroupGetActionStateTypeMethodInfo
ResolveDBusActionGroupMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveDBusActionGroupMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveDBusActionGroupMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveDBusActionGroupMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveDBusActionGroupMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveDBusActionGroupMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveDBusActionGroupMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDBusActionGroupMethod t DBusActionGroup, O.MethodInfo info DBusActionGroup p) => OL.IsLabel t (DBusActionGroup -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList DBusActionGroup
type instance O.AttributeList DBusActionGroup = DBusActionGroupAttributeList
type DBusActionGroupAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
#endif
#if ENABLE_OVERLOADING
type instance O.SignalList DBusActionGroup = DBusActionGroupSignalList
type DBusActionGroupSignalList = ('[ '("actionAdded", Gio.ActionGroup.ActionGroupActionAddedSignalInfo), '("actionEnabledChanged", Gio.ActionGroup.ActionGroupActionEnabledChangedSignalInfo), '("actionRemoved", Gio.ActionGroup.ActionGroupActionRemovedSignalInfo), '("actionStateChanged", Gio.ActionGroup.ActionGroupActionStateChangedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "g_dbus_action_group_get" g_dbus_action_group_get ::
Ptr Gio.DBusConnection.DBusConnection ->
CString ->
CString ->
IO (Ptr DBusActionGroup)
dBusActionGroupGet ::
(B.CallStack.HasCallStack, MonadIO m, Gio.DBusConnection.IsDBusConnection a) =>
a
-> Maybe (T.Text)
-> T.Text
-> m DBusActionGroup
dBusActionGroupGet connection busName objectPath = liftIO $ do
connection' <- unsafeManagedPtrCastPtr connection
maybeBusName <- case busName of
Nothing -> return nullPtr
Just jBusName -> do
jBusName' <- textToCString jBusName
return jBusName'
objectPath' <- textToCString objectPath
result <- g_dbus_action_group_get connection' maybeBusName objectPath'
checkUnexpectedReturnNULL "dBusActionGroupGet" result
result' <- (wrapObject DBusActionGroup) result
touchManagedPtr connection
freeMem maybeBusName
freeMem objectPath'
return result'
#if ENABLE_OVERLOADING
#endif