{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gio.Interfaces.RemoteActionGroup
(
RemoteActionGroup(..) ,
noRemoteActionGroup ,
IsRemoteActionGroup ,
toRemoteActionGroup ,
#if defined(ENABLE_OVERLOADING)
ResolveRemoteActionGroupMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
RemoteActionGroupActivateActionFullMethodInfo,
#endif
remoteActionGroupActivateActionFull ,
#if defined(ENABLE_OVERLOADING)
RemoteActionGroupChangeActionStateFullMethodInfo,
#endif
remoteActionGroupChangeActionStateFull ,
) 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.GI.Base.Signals as B.Signals
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
newtype RemoteActionGroup = RemoteActionGroup (ManagedPtr RemoteActionGroup)
deriving (RemoteActionGroup -> RemoteActionGroup -> Bool
(RemoteActionGroup -> RemoteActionGroup -> Bool)
-> (RemoteActionGroup -> RemoteActionGroup -> Bool)
-> Eq RemoteActionGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RemoteActionGroup -> RemoteActionGroup -> Bool
$c/= :: RemoteActionGroup -> RemoteActionGroup -> Bool
== :: RemoteActionGroup -> RemoteActionGroup -> Bool
$c== :: RemoteActionGroup -> RemoteActionGroup -> Bool
Eq)
noRemoteActionGroup :: Maybe RemoteActionGroup
noRemoteActionGroup :: Maybe RemoteActionGroup
noRemoteActionGroup = Maybe RemoteActionGroup
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList RemoteActionGroup = RemoteActionGroupSignalList
type RemoteActionGroupSignalList = ('[ '("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_remote_action_group_get_type"
c_g_remote_action_group_get_type :: IO GType
instance GObject RemoteActionGroup where
gobjectType :: IO GType
gobjectType = IO GType
c_g_remote_action_group_get_type
instance B.GValue.IsGValue RemoteActionGroup where
toGValue :: RemoteActionGroup -> IO GValue
toGValue o :: RemoteActionGroup
o = do
GType
gtype <- IO GType
c_g_remote_action_group_get_type
RemoteActionGroup
-> (Ptr RemoteActionGroup -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr RemoteActionGroup
o (GType
-> (GValue -> Ptr RemoteActionGroup -> IO ())
-> Ptr RemoteActionGroup
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr RemoteActionGroup -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO RemoteActionGroup
fromGValue gv :: GValue
gv = do
Ptr RemoteActionGroup
ptr <- GValue -> IO (Ptr RemoteActionGroup)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr RemoteActionGroup)
(ManagedPtr RemoteActionGroup -> RemoteActionGroup)
-> Ptr RemoteActionGroup -> IO RemoteActionGroup
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr RemoteActionGroup -> RemoteActionGroup
RemoteActionGroup Ptr RemoteActionGroup
ptr
class (GObject o, O.IsDescendantOf RemoteActionGroup o) => IsRemoteActionGroup o
instance (GObject o, O.IsDescendantOf RemoteActionGroup o) => IsRemoteActionGroup o
instance O.HasParentTypes RemoteActionGroup
type instance O.ParentTypes RemoteActionGroup = '[Gio.ActionGroup.ActionGroup, GObject.Object.Object]
toRemoteActionGroup :: (MonadIO m, IsRemoteActionGroup o) => o -> m RemoteActionGroup
toRemoteActionGroup :: o -> m RemoteActionGroup
toRemoteActionGroup = IO RemoteActionGroup -> m RemoteActionGroup
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO RemoteActionGroup -> m RemoteActionGroup)
-> (o -> IO RemoteActionGroup) -> o -> m RemoteActionGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr RemoteActionGroup -> RemoteActionGroup)
-> o -> IO RemoteActionGroup
forall o o'.
(HasCallStack, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr RemoteActionGroup -> RemoteActionGroup
RemoteActionGroup
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList RemoteActionGroup
type instance O.AttributeList RemoteActionGroup = RemoteActionGroupAttributeList
type RemoteActionGroupAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveRemoteActionGroupMethod (t :: Symbol) (o :: *) :: * where
ResolveRemoteActionGroupMethod "actionAdded" o = Gio.ActionGroup.ActionGroupActionAddedMethodInfo
ResolveRemoteActionGroupMethod "actionEnabledChanged" o = Gio.ActionGroup.ActionGroupActionEnabledChangedMethodInfo
ResolveRemoteActionGroupMethod "actionRemoved" o = Gio.ActionGroup.ActionGroupActionRemovedMethodInfo
ResolveRemoteActionGroupMethod "actionStateChanged" o = Gio.ActionGroup.ActionGroupActionStateChangedMethodInfo
ResolveRemoteActionGroupMethod "activateAction" o = Gio.ActionGroup.ActionGroupActivateActionMethodInfo
ResolveRemoteActionGroupMethod "activateActionFull" o = RemoteActionGroupActivateActionFullMethodInfo
ResolveRemoteActionGroupMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveRemoteActionGroupMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveRemoteActionGroupMethod "changeActionState" o = Gio.ActionGroup.ActionGroupChangeActionStateMethodInfo
ResolveRemoteActionGroupMethod "changeActionStateFull" o = RemoteActionGroupChangeActionStateFullMethodInfo
ResolveRemoteActionGroupMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveRemoteActionGroupMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveRemoteActionGroupMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveRemoteActionGroupMethod "hasAction" o = Gio.ActionGroup.ActionGroupHasActionMethodInfo
ResolveRemoteActionGroupMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveRemoteActionGroupMethod "listActions" o = Gio.ActionGroup.ActionGroupListActionsMethodInfo
ResolveRemoteActionGroupMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveRemoteActionGroupMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveRemoteActionGroupMethod "queryAction" o = Gio.ActionGroup.ActionGroupQueryActionMethodInfo
ResolveRemoteActionGroupMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveRemoteActionGroupMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveRemoteActionGroupMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveRemoteActionGroupMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveRemoteActionGroupMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveRemoteActionGroupMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveRemoteActionGroupMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveRemoteActionGroupMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveRemoteActionGroupMethod "getActionEnabled" o = Gio.ActionGroup.ActionGroupGetActionEnabledMethodInfo
ResolveRemoteActionGroupMethod "getActionParameterType" o = Gio.ActionGroup.ActionGroupGetActionParameterTypeMethodInfo
ResolveRemoteActionGroupMethod "getActionState" o = Gio.ActionGroup.ActionGroupGetActionStateMethodInfo
ResolveRemoteActionGroupMethod "getActionStateHint" o = Gio.ActionGroup.ActionGroupGetActionStateHintMethodInfo
ResolveRemoteActionGroupMethod "getActionStateType" o = Gio.ActionGroup.ActionGroupGetActionStateTypeMethodInfo
ResolveRemoteActionGroupMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveRemoteActionGroupMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveRemoteActionGroupMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveRemoteActionGroupMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveRemoteActionGroupMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveRemoteActionGroupMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveRemoteActionGroupMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveRemoteActionGroupMethod t RemoteActionGroup, O.MethodInfo info RemoteActionGroup p) => OL.IsLabel t (RemoteActionGroup -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
foreign import ccall "g_remote_action_group_activate_action_full" g_remote_action_group_activate_action_full ::
Ptr RemoteActionGroup ->
CString ->
Ptr GVariant ->
Ptr GVariant ->
IO ()
remoteActionGroupActivateActionFull ::
(B.CallStack.HasCallStack, MonadIO m, IsRemoteActionGroup a) =>
a
-> T.Text
-> Maybe (GVariant)
-> GVariant
-> m ()
remoteActionGroupActivateActionFull :: a -> Text -> Maybe GVariant -> GVariant -> m ()
remoteActionGroupActivateActionFull remote :: a
remote actionName :: Text
actionName parameter :: Maybe GVariant
parameter platformData :: GVariant
platformData = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr RemoteActionGroup
remote' <- a -> IO (Ptr RemoteActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
remote
CString
actionName' <- Text -> IO CString
textToCString Text
actionName
Ptr GVariant
maybeParameter <- case Maybe GVariant
parameter of
Nothing -> Ptr GVariant -> IO (Ptr GVariant)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr GVariant
forall a. Ptr a
nullPtr
Just jParameter :: GVariant
jParameter -> do
Ptr GVariant
jParameter' <- GVariant -> IO (Ptr GVariant)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
jParameter
Ptr GVariant -> IO (Ptr GVariant)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr GVariant
jParameter'
Ptr GVariant
platformData' <- GVariant -> IO (Ptr GVariant)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
platformData
Ptr RemoteActionGroup
-> CString -> Ptr GVariant -> Ptr GVariant -> IO ()
g_remote_action_group_activate_action_full Ptr RemoteActionGroup
remote' CString
actionName' Ptr GVariant
maybeParameter Ptr GVariant
platformData'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
remote
Maybe GVariant -> (GVariant -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe GVariant
parameter GVariant -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
GVariant -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GVariant
platformData
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
actionName'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data RemoteActionGroupActivateActionFullMethodInfo
instance (signature ~ (T.Text -> Maybe (GVariant) -> GVariant -> m ()), MonadIO m, IsRemoteActionGroup a) => O.MethodInfo RemoteActionGroupActivateActionFullMethodInfo a signature where
overloadedMethod = remoteActionGroupActivateActionFull
#endif
foreign import ccall "g_remote_action_group_change_action_state_full" g_remote_action_group_change_action_state_full ::
Ptr RemoteActionGroup ->
CString ->
Ptr GVariant ->
Ptr GVariant ->
IO ()
remoteActionGroupChangeActionStateFull ::
(B.CallStack.HasCallStack, MonadIO m, IsRemoteActionGroup a) =>
a
-> T.Text
-> GVariant
-> GVariant
-> m ()
remoteActionGroupChangeActionStateFull :: a -> Text -> GVariant -> GVariant -> m ()
remoteActionGroupChangeActionStateFull remote :: a
remote actionName :: Text
actionName value :: GVariant
value platformData :: GVariant
platformData = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr RemoteActionGroup
remote' <- a -> IO (Ptr RemoteActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
remote
CString
actionName' <- Text -> IO CString
textToCString Text
actionName
Ptr GVariant
value' <- GVariant -> IO (Ptr GVariant)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
value
Ptr GVariant
platformData' <- GVariant -> IO (Ptr GVariant)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
platformData
Ptr RemoteActionGroup
-> CString -> Ptr GVariant -> Ptr GVariant -> IO ()
g_remote_action_group_change_action_state_full Ptr RemoteActionGroup
remote' CString
actionName' Ptr GVariant
value' Ptr GVariant
platformData'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
remote
GVariant -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GVariant
value
GVariant -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GVariant
platformData
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
actionName'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data RemoteActionGroupChangeActionStateFullMethodInfo
instance (signature ~ (T.Text -> GVariant -> GVariant -> m ()), MonadIO m, IsRemoteActionGroup a) => O.MethodInfo RemoteActionGroupChangeActionStateFullMethodInfo a signature where
overloadedMethod = remoteActionGroupChangeActionStateFull
#endif