{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gdk.Objects.DmabufTexture
(
DmabufTexture(..) ,
IsDmabufTexture ,
toDmabufTexture ,
#if defined(ENABLE_OVERLOADING)
ResolveDmabufTextureMethod ,
#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.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.Structs.Bytes as GLib.Bytes
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gdk.Enums as Gdk.Enums
import {-# SOURCE #-} qualified GI.Gdk.Flags as Gdk.Flags
import {-# SOURCE #-} qualified GI.Gdk.Interfaces.Paintable as Gdk.Paintable
import {-# SOURCE #-} qualified GI.Gdk.Objects.Snapshot as Gdk.Snapshot
import {-# SOURCE #-} qualified GI.Gdk.Objects.Texture as Gdk.Texture
import qualified GI.GdkPixbuf.Objects.Pixbuf as GdkPixbuf.Pixbuf
import qualified GI.Gio.Interfaces.File as Gio.File
import qualified GI.Gio.Interfaces.Icon as Gio.Icon
import qualified GI.Gio.Interfaces.LoadableIcon as Gio.LoadableIcon
#else
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gdk.Interfaces.Paintable as Gdk.Paintable
import {-# SOURCE #-} qualified GI.Gdk.Objects.Texture as Gdk.Texture
import qualified GI.Gio.Interfaces.Icon as Gio.Icon
import qualified GI.Gio.Interfaces.LoadableIcon as Gio.LoadableIcon
#endif
newtype DmabufTexture = DmabufTexture (SP.ManagedPtr DmabufTexture)
deriving (DmabufTexture -> DmabufTexture -> Bool
(DmabufTexture -> DmabufTexture -> Bool)
-> (DmabufTexture -> DmabufTexture -> Bool) -> Eq DmabufTexture
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DmabufTexture -> DmabufTexture -> Bool
== :: DmabufTexture -> DmabufTexture -> Bool
$c/= :: DmabufTexture -> DmabufTexture -> Bool
/= :: DmabufTexture -> DmabufTexture -> Bool
Eq)
instance SP.ManagedPtrNewtype DmabufTexture where
toManagedPtr :: DmabufTexture -> ManagedPtr DmabufTexture
toManagedPtr (DmabufTexture ManagedPtr DmabufTexture
p) = ManagedPtr DmabufTexture
p
foreign import ccall "gdk_dmabuf_texture_get_type"
c_gdk_dmabuf_texture_get_type :: IO B.Types.GType
instance B.Types.TypedObject DmabufTexture where
glibType :: IO GType
glibType = IO GType
c_gdk_dmabuf_texture_get_type
instance B.Types.GObject DmabufTexture
class (SP.GObject o, O.IsDescendantOf DmabufTexture o) => IsDmabufTexture o
instance (SP.GObject o, O.IsDescendantOf DmabufTexture o) => IsDmabufTexture o
instance O.HasParentTypes DmabufTexture
type instance O.ParentTypes DmabufTexture = '[Gdk.Texture.Texture, GObject.Object.Object, Gdk.Paintable.Paintable, Gio.Icon.Icon, Gio.LoadableIcon.LoadableIcon]
toDmabufTexture :: (MIO.MonadIO m, IsDmabufTexture o) => o -> m DmabufTexture
toDmabufTexture :: forall (m :: * -> *) o.
(MonadIO m, IsDmabufTexture o) =>
o -> m DmabufTexture
toDmabufTexture = IO DmabufTexture -> m DmabufTexture
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO DmabufTexture -> m DmabufTexture)
-> (o -> IO DmabufTexture) -> o -> m DmabufTexture
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr DmabufTexture -> DmabufTexture)
-> o -> IO DmabufTexture
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr DmabufTexture -> DmabufTexture
DmabufTexture
instance B.GValue.IsGValue (Maybe DmabufTexture) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gdk_dmabuf_texture_get_type
gvalueSet_ :: Ptr GValue -> Maybe DmabufTexture -> IO ()
gvalueSet_ Ptr GValue
gv Maybe DmabufTexture
P.Nothing = Ptr GValue -> Ptr DmabufTexture -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr DmabufTexture
forall a. Ptr a
FP.nullPtr :: FP.Ptr DmabufTexture)
gvalueSet_ Ptr GValue
gv (P.Just DmabufTexture
obj) = DmabufTexture -> (Ptr DmabufTexture -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr DmabufTexture
obj (Ptr GValue -> Ptr DmabufTexture -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe DmabufTexture)
gvalueGet_ Ptr GValue
gv = do
ptr <- Ptr GValue -> IO (Ptr DmabufTexture)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr DmabufTexture)
if ptr /= FP.nullPtr
then P.Just <$> B.ManagedPtr.newObject DmabufTexture ptr
else return P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveDmabufTextureMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveDmabufTextureMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveDmabufTextureMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveDmabufTextureMethod "computeConcreteSize" o = Gdk.Paintable.PaintableComputeConcreteSizeMethodInfo
ResolveDmabufTextureMethod "download" o = Gdk.Texture.TextureDownloadMethodInfo
ResolveDmabufTextureMethod "equal" o = Gio.Icon.IconEqualMethodInfo
ResolveDmabufTextureMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveDmabufTextureMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveDmabufTextureMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveDmabufTextureMethod "hash" o = Gio.Icon.IconHashMethodInfo
ResolveDmabufTextureMethod "invalidateContents" o = Gdk.Paintable.PaintableInvalidateContentsMethodInfo
ResolveDmabufTextureMethod "invalidateSize" o = Gdk.Paintable.PaintableInvalidateSizeMethodInfo
ResolveDmabufTextureMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveDmabufTextureMethod "load" o = Gio.LoadableIcon.LoadableIconLoadMethodInfo
ResolveDmabufTextureMethod "loadAsync" o = Gio.LoadableIcon.LoadableIconLoadAsyncMethodInfo
ResolveDmabufTextureMethod "loadFinish" o = Gio.LoadableIcon.LoadableIconLoadFinishMethodInfo
ResolveDmabufTextureMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveDmabufTextureMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveDmabufTextureMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveDmabufTextureMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveDmabufTextureMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveDmabufTextureMethod "saveToPng" o = Gdk.Texture.TextureSaveToPngMethodInfo
ResolveDmabufTextureMethod "saveToPngBytes" o = Gdk.Texture.TextureSaveToPngBytesMethodInfo
ResolveDmabufTextureMethod "saveToTiff" o = Gdk.Texture.TextureSaveToTiffMethodInfo
ResolveDmabufTextureMethod "saveToTiffBytes" o = Gdk.Texture.TextureSaveToTiffBytesMethodInfo
ResolveDmabufTextureMethod "serialize" o = Gio.Icon.IconSerializeMethodInfo
ResolveDmabufTextureMethod "snapshot" o = Gdk.Paintable.PaintableSnapshotMethodInfo
ResolveDmabufTextureMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveDmabufTextureMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveDmabufTextureMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveDmabufTextureMethod "toString" o = Gio.Icon.IconToStringMethodInfo
ResolveDmabufTextureMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveDmabufTextureMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveDmabufTextureMethod "getCurrentImage" o = Gdk.Paintable.PaintableGetCurrentImageMethodInfo
ResolveDmabufTextureMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveDmabufTextureMethod "getFlags" o = Gdk.Paintable.PaintableGetFlagsMethodInfo
ResolveDmabufTextureMethod "getFormat" o = Gdk.Texture.TextureGetFormatMethodInfo
ResolveDmabufTextureMethod "getHeight" o = Gdk.Texture.TextureGetHeightMethodInfo
ResolveDmabufTextureMethod "getIntrinsicAspectRatio" o = Gdk.Paintable.PaintableGetIntrinsicAspectRatioMethodInfo
ResolveDmabufTextureMethod "getIntrinsicHeight" o = Gdk.Paintable.PaintableGetIntrinsicHeightMethodInfo
ResolveDmabufTextureMethod "getIntrinsicWidth" o = Gdk.Paintable.PaintableGetIntrinsicWidthMethodInfo
ResolveDmabufTextureMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveDmabufTextureMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveDmabufTextureMethod "getWidth" o = Gdk.Texture.TextureGetWidthMethodInfo
ResolveDmabufTextureMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveDmabufTextureMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveDmabufTextureMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveDmabufTextureMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDmabufTextureMethod t DmabufTexture, O.OverloadedMethod info DmabufTexture p) => OL.IsLabel t (DmabufTexture -> 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 ~ ResolveDmabufTextureMethod t DmabufTexture, O.OverloadedMethod info DmabufTexture p, R.HasField t DmabufTexture p) => R.HasField t DmabufTexture p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveDmabufTextureMethod t DmabufTexture, O.OverloadedMethodInfo info DmabufTexture) => OL.IsLabel t (O.MethodProxy info DmabufTexture) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList DmabufTexture
type instance O.AttributeList DmabufTexture = DmabufTextureAttributeList
type DmabufTextureAttributeList = ('[ '("height", Gdk.Texture.TextureHeightPropertyInfo), '("width", Gdk.Texture.TextureWidthPropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList DmabufTexture = DmabufTextureSignalList
type DmabufTextureSignalList = ('[ '("invalidateContents", Gdk.Paintable.PaintableInvalidateContentsSignalInfo), '("invalidateSize", Gdk.Paintable.PaintableInvalidateSizeSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])
#endif