{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gdk.Objects.Snapshot
(
Snapshot(..) ,
IsSnapshot ,
toSnapshot ,
noSnapshot ,
#if defined(ENABLE_OVERLOADING)
ResolveSnapshotMethod ,
#endif
) 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
newtype Snapshot = Snapshot (ManagedPtr Snapshot)
deriving (Snapshot -> Snapshot -> Bool
(Snapshot -> Snapshot -> Bool)
-> (Snapshot -> Snapshot -> Bool) -> Eq Snapshot
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Snapshot -> Snapshot -> Bool
$c/= :: Snapshot -> Snapshot -> Bool
== :: Snapshot -> Snapshot -> Bool
$c== :: Snapshot -> Snapshot -> Bool
Eq)
foreign import ccall "gdk_snapshot_get_type"
c_gdk_snapshot_get_type :: IO GType
instance GObject Snapshot where
gobjectType :: IO GType
gobjectType = IO GType
c_gdk_snapshot_get_type
instance B.GValue.IsGValue Snapshot where
toGValue :: Snapshot -> IO GValue
toGValue o :: Snapshot
o = do
GType
gtype <- IO GType
c_gdk_snapshot_get_type
Snapshot -> (Ptr Snapshot -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Snapshot
o (GType
-> (GValue -> Ptr Snapshot -> IO ()) -> Ptr Snapshot -> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr Snapshot -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO Snapshot
fromGValue gv :: GValue
gv = do
Ptr Snapshot
ptr <- GValue -> IO (Ptr Snapshot)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr Snapshot)
(ManagedPtr Snapshot -> Snapshot) -> Ptr Snapshot -> IO Snapshot
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Snapshot -> Snapshot
Snapshot Ptr Snapshot
ptr
class (GObject o, O.IsDescendantOf Snapshot o) => IsSnapshot o
instance (GObject o, O.IsDescendantOf Snapshot o) => IsSnapshot o
instance O.HasParentTypes Snapshot
type instance O.ParentTypes Snapshot = '[GObject.Object.Object]
toSnapshot :: (MonadIO m, IsSnapshot o) => o -> m Snapshot
toSnapshot :: o -> m Snapshot
toSnapshot = IO Snapshot -> m Snapshot
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Snapshot -> m Snapshot)
-> (o -> IO Snapshot) -> o -> m Snapshot
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Snapshot -> Snapshot) -> o -> IO Snapshot
forall o o'.
(HasCallStack, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr Snapshot -> Snapshot
Snapshot
noSnapshot :: Maybe Snapshot
noSnapshot :: Maybe Snapshot
noSnapshot = Maybe Snapshot
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveSnapshotMethod (t :: Symbol) (o :: *) :: * where
ResolveSnapshotMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveSnapshotMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveSnapshotMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveSnapshotMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveSnapshotMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveSnapshotMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveSnapshotMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveSnapshotMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveSnapshotMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveSnapshotMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveSnapshotMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveSnapshotMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveSnapshotMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveSnapshotMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveSnapshotMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveSnapshotMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveSnapshotMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveSnapshotMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveSnapshotMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveSnapshotMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveSnapshotMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveSnapshotMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveSnapshotMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveSnapshotMethod t Snapshot, O.MethodInfo info Snapshot p) => OL.IsLabel t (Snapshot -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Snapshot
type instance O.AttributeList Snapshot = SnapshotAttributeList
type SnapshotAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Snapshot = SnapshotSignalList
type SnapshotSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif