{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gio.Objects.DebugControllerDBus
(
DebugControllerDBus(..) ,
IsDebugControllerDBus ,
toDebugControllerDBus ,
#if defined(ENABLE_OVERLOADING)
ResolveDebugControllerDBusMethod ,
#endif
debugControllerDBusNew ,
#if defined(ENABLE_OVERLOADING)
DebugControllerDBusStopMethodInfo ,
#endif
debugControllerDBusStop ,
#if defined(ENABLE_OVERLOADING)
DebugControllerDBusConnectionPropertyInfo,
#endif
constructDebugControllerDBusConnection ,
#if defined(ENABLE_OVERLOADING)
debugControllerDBusConnection ,
#endif
getDebugControllerDBusConnection ,
DebugControllerDBusAuthorizeCallback ,
#if defined(ENABLE_OVERLOADING)
DebugControllerDBusAuthorizeSignalInfo ,
#endif
afterDebugControllerDBusAuthorize ,
onDebugControllerDBusAuthorize ,
) 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.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
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 Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
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 GHC.Records as R
import qualified Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT
#if MIN_VERSION_base(4,18,0)
import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GLib.Structs.Bytes as GLib.Bytes
import qualified GI.GLib.Structs.PollFD as GLib.PollFD
import qualified GI.GLib.Structs.Source as GLib.Source
import qualified GI.GLib.Structs.String as GLib.String
import qualified GI.GLib.Structs.VariantType as GLib.VariantType
import qualified GI.GObject.Callbacks as GObject.Callbacks
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.GObject.Structs.Parameter as GObject.Parameter
import qualified GI.Gio.Callbacks as Gio.Callbacks
import {-# SOURCE #-} qualified GI.Gio.Enums as Gio.Enums
import {-# SOURCE #-} qualified GI.Gio.Flags as Gio.Flags
import {-# SOURCE #-} qualified GI.Gio.Interfaces.ActionGroup as Gio.ActionGroup
import {-# SOURCE #-} qualified GI.Gio.Interfaces.AsyncInitable as Gio.AsyncInitable
import {-# SOURCE #-} qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import {-# SOURCE #-} qualified GI.Gio.Interfaces.DebugController as Gio.DebugController
import {-# SOURCE #-} qualified GI.Gio.Interfaces.Initable as Gio.Initable
import {-# SOURCE #-} qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import {-# SOURCE #-} qualified GI.Gio.Objects.Credentials as Gio.Credentials
import {-# SOURCE #-} qualified GI.Gio.Objects.DBusAuthObserver as Gio.DBusAuthObserver
import {-# SOURCE #-} qualified GI.Gio.Objects.DBusConnection as Gio.DBusConnection
import {-# SOURCE #-} qualified GI.Gio.Objects.DBusMessage as Gio.DBusMessage
import {-# SOURCE #-} qualified GI.Gio.Objects.DBusMethodInvocation as Gio.DBusMethodInvocation
import {-# SOURCE #-} qualified GI.Gio.Objects.IOStream as Gio.IOStream
import {-# SOURCE #-} qualified GI.Gio.Objects.InputStream as Gio.InputStream
import {-# SOURCE #-} qualified GI.Gio.Objects.MenuAttributeIter as Gio.MenuAttributeIter
import {-# SOURCE #-} qualified GI.Gio.Objects.MenuLinkIter as Gio.MenuLinkIter
import {-# SOURCE #-} qualified GI.Gio.Objects.MenuModel as Gio.MenuModel
import {-# SOURCE #-} qualified GI.Gio.Objects.OutputStream as Gio.OutputStream
import {-# SOURCE #-} qualified GI.Gio.Objects.UnixFDList as Gio.UnixFDList
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusAnnotationInfo as Gio.DBusAnnotationInfo
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusArgInfo as Gio.DBusArgInfo
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusInterfaceInfo as Gio.DBusInterfaceInfo
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusMethodInfo as Gio.DBusMethodInfo
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusPropertyInfo as Gio.DBusPropertyInfo
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusSignalInfo as Gio.DBusSignalInfo
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusSubtreeVTable as Gio.DBusSubtreeVTable
import {-# SOURCE #-} qualified GI.Gio.Structs.OutputVector as Gio.OutputVector
#else
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gio.Interfaces.DebugController as Gio.DebugController
import {-# SOURCE #-} qualified GI.Gio.Interfaces.Initable as Gio.Initable
import {-# SOURCE #-} qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import {-# SOURCE #-} qualified GI.Gio.Objects.DBusConnection as Gio.DBusConnection
import {-# SOURCE #-} qualified GI.Gio.Objects.DBusMethodInvocation as Gio.DBusMethodInvocation
#endif
newtype DebugControllerDBus = DebugControllerDBus (SP.ManagedPtr DebugControllerDBus)
deriving (DebugControllerDBus -> DebugControllerDBus -> Bool
(DebugControllerDBus -> DebugControllerDBus -> Bool)
-> (DebugControllerDBus -> DebugControllerDBus -> Bool)
-> Eq DebugControllerDBus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DebugControllerDBus -> DebugControllerDBus -> Bool
== :: DebugControllerDBus -> DebugControllerDBus -> Bool
$c/= :: DebugControllerDBus -> DebugControllerDBus -> Bool
/= :: DebugControllerDBus -> DebugControllerDBus -> Bool
Eq)
instance SP.ManagedPtrNewtype DebugControllerDBus where
toManagedPtr :: DebugControllerDBus -> ManagedPtr DebugControllerDBus
toManagedPtr (DebugControllerDBus ManagedPtr DebugControllerDBus
p) = ManagedPtr DebugControllerDBus
p
foreign import ccall "g_debug_controller_dbus_get_type"
c_g_debug_controller_dbus_get_type :: IO B.Types.GType
instance B.Types.TypedObject DebugControllerDBus where
glibType :: IO GType
glibType = IO GType
c_g_debug_controller_dbus_get_type
instance B.Types.GObject DebugControllerDBus
class (SP.GObject o, O.IsDescendantOf DebugControllerDBus o) => IsDebugControllerDBus o
instance (SP.GObject o, O.IsDescendantOf DebugControllerDBus o) => IsDebugControllerDBus o
instance O.HasParentTypes DebugControllerDBus
type instance O.ParentTypes DebugControllerDBus = '[GObject.Object.Object, Gio.DebugController.DebugController, Gio.Initable.Initable]
toDebugControllerDBus :: (MIO.MonadIO m, IsDebugControllerDBus o) => o -> m DebugControllerDBus
toDebugControllerDBus :: forall (m :: * -> *) o.
(MonadIO m, IsDebugControllerDBus o) =>
o -> m DebugControllerDBus
toDebugControllerDBus = IO DebugControllerDBus -> m DebugControllerDBus
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO DebugControllerDBus -> m DebugControllerDBus)
-> (o -> IO DebugControllerDBus) -> o -> m DebugControllerDBus
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr DebugControllerDBus -> DebugControllerDBus)
-> o -> IO DebugControllerDBus
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr DebugControllerDBus -> DebugControllerDBus
DebugControllerDBus
instance B.GValue.IsGValue (Maybe DebugControllerDBus) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_g_debug_controller_dbus_get_type
gvalueSet_ :: Ptr GValue -> Maybe DebugControllerDBus -> IO ()
gvalueSet_ Ptr GValue
gv Maybe DebugControllerDBus
P.Nothing = Ptr GValue -> Ptr DebugControllerDBus -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr DebugControllerDBus
forall a. Ptr a
FP.nullPtr :: FP.Ptr DebugControllerDBus)
gvalueSet_ Ptr GValue
gv (P.Just DebugControllerDBus
obj) = DebugControllerDBus -> (Ptr DebugControllerDBus -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr DebugControllerDBus
obj (Ptr GValue -> Ptr DebugControllerDBus -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe DebugControllerDBus)
gvalueGet_ Ptr GValue
gv = do
ptr <- Ptr GValue -> IO (Ptr DebugControllerDBus)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr DebugControllerDBus)
if ptr /= FP.nullPtr
then P.Just <$> B.ManagedPtr.newObject DebugControllerDBus ptr
else return P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveDebugControllerDBusMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveDebugControllerDBusMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveDebugControllerDBusMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveDebugControllerDBusMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveDebugControllerDBusMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveDebugControllerDBusMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveDebugControllerDBusMethod "init" o = Gio.Initable.InitableInitMethodInfo
ResolveDebugControllerDBusMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveDebugControllerDBusMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveDebugControllerDBusMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveDebugControllerDBusMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveDebugControllerDBusMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveDebugControllerDBusMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveDebugControllerDBusMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveDebugControllerDBusMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveDebugControllerDBusMethod "stop" o = DebugControllerDBusStopMethodInfo
ResolveDebugControllerDBusMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveDebugControllerDBusMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveDebugControllerDBusMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveDebugControllerDBusMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveDebugControllerDBusMethod "getDebugEnabled" o = Gio.DebugController.DebugControllerGetDebugEnabledMethodInfo
ResolveDebugControllerDBusMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveDebugControllerDBusMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveDebugControllerDBusMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveDebugControllerDBusMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveDebugControllerDBusMethod "setDebugEnabled" o = Gio.DebugController.DebugControllerSetDebugEnabledMethodInfo
ResolveDebugControllerDBusMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveDebugControllerDBusMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDebugControllerDBusMethod t DebugControllerDBus, O.OverloadedMethod info DebugControllerDBus p) => OL.IsLabel t (DebugControllerDBus -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveDebugControllerDBusMethod t DebugControllerDBus, O.OverloadedMethod info DebugControllerDBus p, R.HasField t DebugControllerDBus p) => R.HasField t DebugControllerDBus p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveDebugControllerDBusMethod t DebugControllerDBus, O.OverloadedMethodInfo info DebugControllerDBus) => OL.IsLabel t (O.MethodProxy info DebugControllerDBus) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
type DebugControllerDBusAuthorizeCallback =
Gio.DBusMethodInvocation.DBusMethodInvocation
-> IO Bool
type C_DebugControllerDBusAuthorizeCallback =
Ptr DebugControllerDBus ->
Ptr Gio.DBusMethodInvocation.DBusMethodInvocation ->
Ptr () ->
IO CInt
foreign import ccall "wrapper"
mk_DebugControllerDBusAuthorizeCallback :: C_DebugControllerDBusAuthorizeCallback -> IO (FunPtr C_DebugControllerDBusAuthorizeCallback)
wrap_DebugControllerDBusAuthorizeCallback ::
GObject a => (a -> DebugControllerDBusAuthorizeCallback) ->
C_DebugControllerDBusAuthorizeCallback
wrap_DebugControllerDBusAuthorizeCallback :: forall a.
GObject a =>
(a -> DebugControllerDBusAuthorizeCallback)
-> C_DebugControllerDBusAuthorizeCallback
wrap_DebugControllerDBusAuthorizeCallback a -> DebugControllerDBusAuthorizeCallback
gi'cb Ptr DebugControllerDBus
gi'selfPtr Ptr DBusMethodInvocation
invocation Ptr ()
_ = do
invocation' <- ((ManagedPtr DBusMethodInvocation -> DBusMethodInvocation)
-> Ptr DBusMethodInvocation -> IO DBusMethodInvocation
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DBusMethodInvocation -> DBusMethodInvocation
Gio.DBusMethodInvocation.DBusMethodInvocation) Ptr DBusMethodInvocation
invocation
result <- B.ManagedPtr.withNewObject gi'selfPtr $ \DebugControllerDBus
gi'self -> a -> DebugControllerDBusAuthorizeCallback
gi'cb (DebugControllerDBus -> a
forall a b. Coercible a b => a -> b
Coerce.coerce DebugControllerDBus
gi'self) DBusMethodInvocation
invocation'
let result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
result
return result'
onDebugControllerDBusAuthorize :: (IsDebugControllerDBus a, MonadIO m) => a -> ((?self :: a) => DebugControllerDBusAuthorizeCallback) -> m SignalHandlerId
onDebugControllerDBusAuthorize :: forall a (m :: * -> *).
(IsDebugControllerDBus a, MonadIO m) =>
a
-> ((?self::a) => DebugControllerDBusAuthorizeCallback)
-> m SignalHandlerId
onDebugControllerDBusAuthorize a
obj (?self::a) => DebugControllerDBusAuthorizeCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> DebugControllerDBusAuthorizeCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => DebugControllerDBusAuthorizeCallback
DebugControllerDBusAuthorizeCallback
cb
let wrapped' :: C_DebugControllerDBusAuthorizeCallback
wrapped' = (a -> DebugControllerDBusAuthorizeCallback)
-> C_DebugControllerDBusAuthorizeCallback
forall a.
GObject a =>
(a -> DebugControllerDBusAuthorizeCallback)
-> C_DebugControllerDBusAuthorizeCallback
wrap_DebugControllerDBusAuthorizeCallback a -> DebugControllerDBusAuthorizeCallback
wrapped
wrapped'' <- C_DebugControllerDBusAuthorizeCallback
-> IO (FunPtr C_DebugControllerDBusAuthorizeCallback)
mk_DebugControllerDBusAuthorizeCallback C_DebugControllerDBusAuthorizeCallback
wrapped'
connectSignalFunPtr obj "authorize" wrapped'' SignalConnectBefore Nothing
afterDebugControllerDBusAuthorize :: (IsDebugControllerDBus a, MonadIO m) => a -> ((?self :: a) => DebugControllerDBusAuthorizeCallback) -> m SignalHandlerId
afterDebugControllerDBusAuthorize :: forall a (m :: * -> *).
(IsDebugControllerDBus a, MonadIO m) =>
a
-> ((?self::a) => DebugControllerDBusAuthorizeCallback)
-> m SignalHandlerId
afterDebugControllerDBusAuthorize a
obj (?self::a) => DebugControllerDBusAuthorizeCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> DebugControllerDBusAuthorizeCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => DebugControllerDBusAuthorizeCallback
DebugControllerDBusAuthorizeCallback
cb
let wrapped' :: C_DebugControllerDBusAuthorizeCallback
wrapped' = (a -> DebugControllerDBusAuthorizeCallback)
-> C_DebugControllerDBusAuthorizeCallback
forall a.
GObject a =>
(a -> DebugControllerDBusAuthorizeCallback)
-> C_DebugControllerDBusAuthorizeCallback
wrap_DebugControllerDBusAuthorizeCallback a -> DebugControllerDBusAuthorizeCallback
wrapped
wrapped'' <- C_DebugControllerDBusAuthorizeCallback
-> IO (FunPtr C_DebugControllerDBusAuthorizeCallback)
mk_DebugControllerDBusAuthorizeCallback C_DebugControllerDBusAuthorizeCallback
wrapped'
connectSignalFunPtr obj "authorize" wrapped'' SignalConnectAfter Nothing
#if defined(ENABLE_OVERLOADING)
data DebugControllerDBusAuthorizeSignalInfo
instance SignalInfo DebugControllerDBusAuthorizeSignalInfo where
type HaskellCallbackType DebugControllerDBusAuthorizeSignalInfo = DebugControllerDBusAuthorizeCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_DebugControllerDBusAuthorizeCallback cb
cb'' <- mk_DebugControllerDBusAuthorizeCallback cb'
connectSignalFunPtr obj "authorize" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DebugControllerDBus::authorize"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DebugControllerDBus.html#g:signal:authorize"})
#endif
getDebugControllerDBusConnection :: (MonadIO m, IsDebugControllerDBus o) => o -> m (Maybe Gio.DBusConnection.DBusConnection)
getDebugControllerDBusConnection :: forall (m :: * -> *) o.
(MonadIO m, IsDebugControllerDBus o) =>
o -> m (Maybe DBusConnection)
getDebugControllerDBusConnection o
obj = IO (Maybe DBusConnection) -> m (Maybe DBusConnection)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe DBusConnection) -> m (Maybe DBusConnection))
-> IO (Maybe DBusConnection) -> m (Maybe DBusConnection)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr DBusConnection -> DBusConnection)
-> IO (Maybe DBusConnection)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"connection" ManagedPtr DBusConnection -> DBusConnection
Gio.DBusConnection.DBusConnection
constructDebugControllerDBusConnection :: (IsDebugControllerDBus o, MIO.MonadIO m, Gio.DBusConnection.IsDBusConnection a) => a -> m (GValueConstruct o)
constructDebugControllerDBusConnection :: forall o (m :: * -> *) a.
(IsDebugControllerDBus o, MonadIO m, IsDBusConnection a) =>
a -> m (GValueConstruct o)
constructDebugControllerDBusConnection a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"connection" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
#if defined(ENABLE_OVERLOADING)
data DebugControllerDBusConnectionPropertyInfo
instance AttrInfo DebugControllerDBusConnectionPropertyInfo where
type AttrAllowedOps DebugControllerDBusConnectionPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DebugControllerDBusConnectionPropertyInfo = IsDebugControllerDBus
type AttrSetTypeConstraint DebugControllerDBusConnectionPropertyInfo = Gio.DBusConnection.IsDBusConnection
type AttrTransferTypeConstraint DebugControllerDBusConnectionPropertyInfo = Gio.DBusConnection.IsDBusConnection
type AttrTransferType DebugControllerDBusConnectionPropertyInfo = Gio.DBusConnection.DBusConnection
type AttrGetType DebugControllerDBusConnectionPropertyInfo = (Maybe Gio.DBusConnection.DBusConnection)
type AttrLabel DebugControllerDBusConnectionPropertyInfo = "connection"
type AttrOrigin DebugControllerDBusConnectionPropertyInfo = DebugControllerDBus
attrGet = getDebugControllerDBusConnection
attrSet = undefined
attrTransfer _ v = do
unsafeCastTo Gio.DBusConnection.DBusConnection v
attrConstruct = constructDebugControllerDBusConnection
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DebugControllerDBus.connection"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DebugControllerDBus.html#g:attr:connection"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList DebugControllerDBus
type instance O.AttributeList DebugControllerDBus = DebugControllerDBusAttributeList
type DebugControllerDBusAttributeList = ('[ '("connection", DebugControllerDBusConnectionPropertyInfo), '("debugEnabled", Gio.DebugController.DebugControllerDebugEnabledPropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
debugControllerDBusConnection :: AttrLabelProxy "connection"
debugControllerDBusConnection = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList DebugControllerDBus = DebugControllerDBusSignalList
type DebugControllerDBusSignalList = ('[ '("authorize", DebugControllerDBusAuthorizeSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "g_debug_controller_dbus_new" g_debug_controller_dbus_new ::
Ptr Gio.DBusConnection.DBusConnection ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO (Ptr DebugControllerDBus)
debugControllerDBusNew ::
(B.CallStack.HasCallStack, MonadIO m, Gio.DBusConnection.IsDBusConnection a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (b)
-> m (Maybe DebugControllerDBus)
debugControllerDBusNew :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) =>
a -> Maybe b -> m (Maybe DebugControllerDBus)
debugControllerDBusNew a
connection Maybe b
cancellable = IO (Maybe DebugControllerDBus) -> m (Maybe DebugControllerDBus)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe DebugControllerDBus) -> m (Maybe DebugControllerDBus))
-> IO (Maybe DebugControllerDBus) -> m (Maybe DebugControllerDBus)
forall a b. (a -> b) -> a -> b
$ do
connection' <- a -> IO (Ptr DBusConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
connection
maybeCancellable <- case cancellable of
Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just b
jCancellable -> do
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
return jCancellable'
onException (do
result <- propagateGError $ g_debug_controller_dbus_new connection' maybeCancellable
maybeResult <- convertIfNonNull result $ \Ptr DebugControllerDBus
result' -> do
result'' <- ((ManagedPtr DebugControllerDBus -> DebugControllerDBus)
-> Ptr DebugControllerDBus -> IO DebugControllerDBus
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr DebugControllerDBus -> DebugControllerDBus
DebugControllerDBus) Ptr DebugControllerDBus
result'
return result''
touchManagedPtr connection
whenJust cancellable touchManagedPtr
return maybeResult
) (do
return ()
)
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_debug_controller_dbus_stop" g_debug_controller_dbus_stop ::
Ptr DebugControllerDBus ->
IO ()
debugControllerDBusStop ::
(B.CallStack.HasCallStack, MonadIO m, IsDebugControllerDBus a) =>
a
-> m ()
debugControllerDBusStop :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDebugControllerDBus a) =>
a -> m ()
debugControllerDBusStop a
self = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr DebugControllerDBus)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
g_debug_controller_dbus_stop self'
touchManagedPtr self
return ()
#if defined(ENABLE_OVERLOADING)
data DebugControllerDBusStopMethodInfo
instance (signature ~ (m ()), MonadIO m, IsDebugControllerDBus a) => O.OverloadedMethod DebugControllerDBusStopMethodInfo a signature where
overloadedMethod = debugControllerDBusStop
instance O.OverloadedMethodInfo DebugControllerDBusStopMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DebugControllerDBus.debugControllerDBusStop",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DebugControllerDBus.html#v:debugControllerDBusStop"
})
#endif