{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Objects.Svg
(
Svg(..) ,
IsSvg ,
toSvg ,
#if defined(ENABLE_OVERLOADING)
ResolveSvgMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
SvgGetNStatesMethodInfo ,
#endif
svgGetNStates ,
#if defined(ENABLE_OVERLOADING)
SvgGetStateMethodInfo ,
#endif
svgGetState ,
#if defined(ENABLE_OVERLOADING)
SvgGetWeightMethodInfo ,
#endif
svgGetWeight ,
#if defined(ENABLE_OVERLOADING)
SvgLoadFromBytesMethodInfo ,
#endif
svgLoadFromBytes ,
svgNew ,
svgNewFromBytes ,
svgNewFromResource ,
#if defined(ENABLE_OVERLOADING)
SvgPauseMethodInfo ,
#endif
svgPause ,
#if defined(ENABLE_OVERLOADING)
SvgPlayMethodInfo ,
#endif
svgPlay ,
#if defined(ENABLE_OVERLOADING)
SvgSerializeMethodInfo ,
#endif
svgSerialize ,
#if defined(ENABLE_OVERLOADING)
SvgSetFrameClockMethodInfo ,
#endif
svgSetFrameClock ,
#if defined(ENABLE_OVERLOADING)
SvgSetStateMethodInfo ,
#endif
svgSetState ,
#if defined(ENABLE_OVERLOADING)
SvgSetWeightMethodInfo ,
#endif
svgSetWeight ,
#if defined(ENABLE_OVERLOADING)
SvgWriteToFileMethodInfo ,
#endif
svgWriteToFile ,
#if defined(ENABLE_OVERLOADING)
SvgPlayingPropertyInfo ,
#endif
constructSvgPlaying ,
getSvgPlaying ,
setSvgPlaying ,
#if defined(ENABLE_OVERLOADING)
svgPlaying ,
#endif
#if defined(ENABLE_OVERLOADING)
SvgResourcePropertyInfo ,
#endif
constructSvgResource ,
#if defined(ENABLE_OVERLOADING)
svgResource ,
#endif
#if defined(ENABLE_OVERLOADING)
SvgStatePropertyInfo ,
#endif
constructSvgState ,
getSvgState ,
setSvgState ,
#if defined(ENABLE_OVERLOADING)
svgState ,
#endif
#if defined(ENABLE_OVERLOADING)
SvgWeightPropertyInfo ,
#endif
constructSvgWeight ,
getSvgWeight ,
setSvgWeight ,
#if defined(ENABLE_OVERLOADING)
svgWeight ,
#endif
SvgErrorCallback ,
#if defined(ENABLE_OVERLOADING)
SvgErrorSignalInfo ,
#endif
afterSvgError ,
onSvgError ,
) 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 qualified GI.Gdk.Interfaces.Paintable as Gdk.Paintable
import qualified GI.Gdk.Objects.FrameClock as Gdk.FrameClock
import qualified GI.Gdk.Objects.Snapshot as Gdk.Snapshot
import qualified GI.Gdk.Structs.RGBA as Gdk.RGBA
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.SymbolicPaintable as Gtk.SymbolicPaintable
#else
import qualified GI.GLib.Structs.Bytes as GLib.Bytes
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gdk.Interfaces.Paintable as Gdk.Paintable
import qualified GI.Gdk.Objects.FrameClock as Gdk.FrameClock
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.SymbolicPaintable as Gtk.SymbolicPaintable
#endif
newtype Svg = Svg (SP.ManagedPtr Svg)
deriving (Svg -> Svg -> Bool
(Svg -> Svg -> Bool) -> (Svg -> Svg -> Bool) -> Eq Svg
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Svg -> Svg -> Bool
== :: Svg -> Svg -> Bool
$c/= :: Svg -> Svg -> Bool
/= :: Svg -> Svg -> Bool
Eq)
instance SP.ManagedPtrNewtype Svg where
toManagedPtr :: Svg -> ManagedPtr Svg
toManagedPtr (Svg ManagedPtr Svg
p) = ManagedPtr Svg
p
foreign import ccall "gtk_svg_get_type"
c_gtk_svg_get_type :: IO B.Types.GType
instance B.Types.TypedObject Svg where
glibType :: IO GType
glibType = IO GType
c_gtk_svg_get_type
instance B.Types.GObject Svg
class (SP.GObject o, O.IsDescendantOf Svg o) => IsSvg o
instance (SP.GObject o, O.IsDescendantOf Svg o) => IsSvg o
instance O.HasParentTypes Svg
type instance O.ParentTypes Svg = '[GObject.Object.Object, Gdk.Paintable.Paintable, Gtk.SymbolicPaintable.SymbolicPaintable]
toSvg :: (MIO.MonadIO m, IsSvg o) => o -> m Svg
toSvg :: forall (m :: * -> *) o. (MonadIO m, IsSvg o) => o -> m Svg
toSvg = IO Svg -> m Svg
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Svg -> m Svg) -> (o -> IO Svg) -> o -> m Svg
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Svg -> Svg) -> o -> IO Svg
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr Svg -> Svg
Svg
instance B.GValue.IsGValue (Maybe Svg) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_svg_get_type
gvalueSet_ :: Ptr GValue -> Maybe Svg -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Svg
P.Nothing = Ptr GValue -> Ptr Svg -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr Svg
forall a. Ptr a
FP.nullPtr :: FP.Ptr Svg)
gvalueSet_ Ptr GValue
gv (P.Just Svg
obj) = Svg -> (Ptr Svg -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Svg
obj (Ptr GValue -> Ptr Svg -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe Svg)
gvalueGet_ Ptr GValue
gv = do
ptr <- Ptr GValue -> IO (Ptr Svg)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr Svg)
if ptr /= FP.nullPtr
then P.Just <$> B.ManagedPtr.newObject Svg ptr
else return P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveSvgMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveSvgMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveSvgMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveSvgMethod "computeConcreteSize" o = Gdk.Paintable.PaintableComputeConcreteSizeMethodInfo
ResolveSvgMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveSvgMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveSvgMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveSvgMethod "invalidateContents" o = Gdk.Paintable.PaintableInvalidateContentsMethodInfo
ResolveSvgMethod "invalidateSize" o = Gdk.Paintable.PaintableInvalidateSizeMethodInfo
ResolveSvgMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveSvgMethod "loadFromBytes" o = SvgLoadFromBytesMethodInfo
ResolveSvgMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveSvgMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveSvgMethod "pause" o = SvgPauseMethodInfo
ResolveSvgMethod "play" o = SvgPlayMethodInfo
ResolveSvgMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveSvgMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveSvgMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveSvgMethod "serialize" o = SvgSerializeMethodInfo
ResolveSvgMethod "snapshot" o = Gdk.Paintable.PaintableSnapshotMethodInfo
ResolveSvgMethod "snapshotSymbolic" o = Gtk.SymbolicPaintable.SymbolicPaintableSnapshotSymbolicMethodInfo
ResolveSvgMethod "snapshotWithWeight" o = Gtk.SymbolicPaintable.SymbolicPaintableSnapshotWithWeightMethodInfo
ResolveSvgMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveSvgMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveSvgMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveSvgMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveSvgMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveSvgMethod "writeToFile" o = SvgWriteToFileMethodInfo
ResolveSvgMethod "getCurrentImage" o = Gdk.Paintable.PaintableGetCurrentImageMethodInfo
ResolveSvgMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveSvgMethod "getFlags" o = Gdk.Paintable.PaintableGetFlagsMethodInfo
ResolveSvgMethod "getIntrinsicAspectRatio" o = Gdk.Paintable.PaintableGetIntrinsicAspectRatioMethodInfo
ResolveSvgMethod "getIntrinsicHeight" o = Gdk.Paintable.PaintableGetIntrinsicHeightMethodInfo
ResolveSvgMethod "getIntrinsicWidth" o = Gdk.Paintable.PaintableGetIntrinsicWidthMethodInfo
ResolveSvgMethod "getNStates" o = SvgGetNStatesMethodInfo
ResolveSvgMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveSvgMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveSvgMethod "getState" o = SvgGetStateMethodInfo
ResolveSvgMethod "getWeight" o = SvgGetWeightMethodInfo
ResolveSvgMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveSvgMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveSvgMethod "setFrameClock" o = SvgSetFrameClockMethodInfo
ResolveSvgMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveSvgMethod "setState" o = SvgSetStateMethodInfo
ResolveSvgMethod "setWeight" o = SvgSetWeightMethodInfo
ResolveSvgMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveSvgMethod t Svg, O.OverloadedMethod info Svg p) => OL.IsLabel t (Svg -> 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 ~ ResolveSvgMethod t Svg, O.OverloadedMethod info Svg p, R.HasField t Svg p) => R.HasField t Svg p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveSvgMethod t Svg, O.OverloadedMethodInfo info Svg) => OL.IsLabel t (O.MethodProxy info Svg) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
type SvgErrorCallback =
GError
-> IO ()
type C_SvgErrorCallback =
Ptr Svg ->
Ptr GError ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_SvgErrorCallback :: C_SvgErrorCallback -> IO (FunPtr C_SvgErrorCallback)
wrap_SvgErrorCallback ::
GObject a => (a -> SvgErrorCallback) ->
C_SvgErrorCallback
wrap_SvgErrorCallback :: forall a.
GObject a =>
(a -> SvgErrorCallback) -> C_SvgErrorCallback
wrap_SvgErrorCallback a -> SvgErrorCallback
gi'cb Ptr Svg
gi'selfPtr Ptr GError
error_ Ptr ()
_ = do
error_' <- ((ManagedPtr GError -> GError) -> Ptr GError -> IO GError
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr GError -> GError
GError) Ptr GError
error_
B.ManagedPtr.withNewObject gi'selfPtr $ \Svg
gi'self -> a -> SvgErrorCallback
gi'cb (Svg -> a
forall a b. Coercible a b => a -> b
Coerce.coerce Svg
gi'self) GError
error_'
onSvgError :: (IsSvg a, MonadIO m) => a -> ((?self :: a) => SvgErrorCallback) -> m SignalHandlerId
onSvgError :: forall a (m :: * -> *).
(IsSvg a, MonadIO m) =>
a -> ((?self::a) => SvgErrorCallback) -> m SignalHandlerId
onSvgError a
obj (?self::a) => SvgErrorCallback
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 -> SvgErrorCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => SvgErrorCallback
SvgErrorCallback
cb
let wrapped' :: C_SvgErrorCallback
wrapped' = (a -> SvgErrorCallback) -> C_SvgErrorCallback
forall a.
GObject a =>
(a -> SvgErrorCallback) -> C_SvgErrorCallback
wrap_SvgErrorCallback a -> SvgErrorCallback
wrapped
wrapped'' <- C_SvgErrorCallback -> IO (FunPtr C_SvgErrorCallback)
mk_SvgErrorCallback C_SvgErrorCallback
wrapped'
connectSignalFunPtr obj "error" wrapped'' SignalConnectBefore Nothing
afterSvgError :: (IsSvg a, MonadIO m) => a -> ((?self :: a) => SvgErrorCallback) -> m SignalHandlerId
afterSvgError :: forall a (m :: * -> *).
(IsSvg a, MonadIO m) =>
a -> ((?self::a) => SvgErrorCallback) -> m SignalHandlerId
afterSvgError a
obj (?self::a) => SvgErrorCallback
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 -> SvgErrorCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => SvgErrorCallback
SvgErrorCallback
cb
let wrapped' :: C_SvgErrorCallback
wrapped' = (a -> SvgErrorCallback) -> C_SvgErrorCallback
forall a.
GObject a =>
(a -> SvgErrorCallback) -> C_SvgErrorCallback
wrap_SvgErrorCallback a -> SvgErrorCallback
wrapped
wrapped'' <- C_SvgErrorCallback -> IO (FunPtr C_SvgErrorCallback)
mk_SvgErrorCallback C_SvgErrorCallback
wrapped'
connectSignalFunPtr obj "error" wrapped'' SignalConnectAfter Nothing
#if defined(ENABLE_OVERLOADING)
data SvgErrorSignalInfo
instance SignalInfo SvgErrorSignalInfo where
type HaskellCallbackType SvgErrorSignalInfo = SvgErrorCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_SvgErrorCallback cb
cb'' <- mk_SvgErrorCallback cb'
connectSignalFunPtr obj "error" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Svg::error"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#g:signal:error"})
#endif
getSvgPlaying :: (MonadIO m, IsSvg o) => o -> m Bool
getSvgPlaying :: forall (m :: * -> *) o. (MonadIO m, IsSvg o) => o -> m Bool
getSvgPlaying o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"playing"
setSvgPlaying :: (MonadIO m, IsSvg o) => o -> Bool -> m ()
setSvgPlaying :: forall (m :: * -> *) o. (MonadIO m, IsSvg o) => o -> Bool -> m ()
setSvgPlaying o
obj Bool
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"playing" Bool
val
constructSvgPlaying :: (IsSvg o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructSvgPlaying :: forall o (m :: * -> *).
(IsSvg o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructSvgPlaying Bool
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 -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"playing" Bool
val
#if defined(ENABLE_OVERLOADING)
data SvgPlayingPropertyInfo
instance AttrInfo SvgPlayingPropertyInfo where
type AttrAllowedOps SvgPlayingPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrPut]
type AttrBaseTypeConstraint SvgPlayingPropertyInfo = IsSvg
type AttrSetTypeConstraint SvgPlayingPropertyInfo = (~) Bool
type AttrTransferTypeConstraint SvgPlayingPropertyInfo = (~) Bool
type AttrTransferType SvgPlayingPropertyInfo = Bool
type AttrGetType SvgPlayingPropertyInfo = Bool
type AttrLabel SvgPlayingPropertyInfo = "playing"
type AttrOrigin SvgPlayingPropertyInfo = Svg
attrGet = getSvgPlaying
attrSet = setSvgPlaying
attrPut = setSvgPlaying
attrTransfer _ v = do
return v
attrConstruct = constructSvgPlaying
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Svg.playing"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#g:attr:playing"
})
#endif
constructSvgResource :: (IsSvg o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructSvgResource :: forall o (m :: * -> *).
(IsSvg o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructSvgResource Text
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 Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"resource" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data SvgResourcePropertyInfo
instance AttrInfo SvgResourcePropertyInfo where
type AttrAllowedOps SvgResourcePropertyInfo = '[ 'AttrConstruct, 'AttrClear]
type AttrBaseTypeConstraint SvgResourcePropertyInfo = IsSvg
type AttrSetTypeConstraint SvgResourcePropertyInfo = (~) T.Text
type AttrTransferTypeConstraint SvgResourcePropertyInfo = (~) T.Text
type AttrTransferType SvgResourcePropertyInfo = T.Text
type AttrGetType SvgResourcePropertyInfo = ()
type AttrLabel SvgResourcePropertyInfo = "resource"
type AttrOrigin SvgResourcePropertyInfo = Svg
attrGet = undefined
attrSet = undefined
attrPut = undefined
attrTransfer _ v = do
return v
attrConstruct = constructSvgResource
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Svg.resource"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#g:attr:resource"
})
#endif
getSvgState :: (MonadIO m, IsSvg o) => o -> m Word32
getSvgState :: forall (m :: * -> *) o. (MonadIO m, IsSvg o) => o -> m Word32
getSvgState o
obj = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Word32
forall a. GObject a => a -> String -> IO Word32
B.Properties.getObjectPropertyUInt32 o
obj String
"state"
setSvgState :: (MonadIO m, IsSvg o) => o -> Word32 -> m ()
setSvgState :: forall (m :: * -> *) o. (MonadIO m, IsSvg o) => o -> Word32 -> m ()
setSvgState o
obj Word32
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Word32 -> IO ()
forall a. GObject a => a -> String -> Word32 -> IO ()
B.Properties.setObjectPropertyUInt32 o
obj String
"state" Word32
val
constructSvgState :: (IsSvg o, MIO.MonadIO m) => Word32 -> m (GValueConstruct o)
constructSvgState :: forall o (m :: * -> *).
(IsSvg o, MonadIO m) =>
Word32 -> m (GValueConstruct o)
constructSvgState Word32
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 -> Word32 -> IO (GValueConstruct o)
forall o. String -> Word32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyUInt32 String
"state" Word32
val
#if defined(ENABLE_OVERLOADING)
data SvgStatePropertyInfo
instance AttrInfo SvgStatePropertyInfo where
type AttrAllowedOps SvgStatePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrPut]
type AttrBaseTypeConstraint SvgStatePropertyInfo = IsSvg
type AttrSetTypeConstraint SvgStatePropertyInfo = (~) Word32
type AttrTransferTypeConstraint SvgStatePropertyInfo = (~) Word32
type AttrTransferType SvgStatePropertyInfo = Word32
type AttrGetType SvgStatePropertyInfo = Word32
type AttrLabel SvgStatePropertyInfo = "state"
type AttrOrigin SvgStatePropertyInfo = Svg
attrGet = getSvgState
attrSet = setSvgState
attrPut = setSvgState
attrTransfer _ v = do
return v
attrConstruct = constructSvgState
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Svg.state"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#g:attr:state"
})
#endif
getSvgWeight :: (MonadIO m, IsSvg o) => o -> m Double
getSvgWeight :: forall (m :: * -> *) o. (MonadIO m, IsSvg o) => o -> m Double
getSvgWeight o
obj = IO Double -> m Double
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Double
forall a. GObject a => a -> String -> IO Double
B.Properties.getObjectPropertyDouble o
obj String
"weight"
setSvgWeight :: (MonadIO m, IsSvg o) => o -> Double -> m ()
setSvgWeight :: forall (m :: * -> *) o. (MonadIO m, IsSvg o) => o -> Double -> m ()
setSvgWeight o
obj Double
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Double -> IO ()
forall a. GObject a => a -> String -> Double -> IO ()
B.Properties.setObjectPropertyDouble o
obj String
"weight" Double
val
constructSvgWeight :: (IsSvg o, MIO.MonadIO m) => Double -> m (GValueConstruct o)
constructSvgWeight :: forall o (m :: * -> *).
(IsSvg o, MonadIO m) =>
Double -> m (GValueConstruct o)
constructSvgWeight Double
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 -> Double -> IO (GValueConstruct o)
forall o. String -> Double -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyDouble String
"weight" Double
val
#if defined(ENABLE_OVERLOADING)
data SvgWeightPropertyInfo
instance AttrInfo SvgWeightPropertyInfo where
type AttrAllowedOps SvgWeightPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrPut]
type AttrBaseTypeConstraint SvgWeightPropertyInfo = IsSvg
type AttrSetTypeConstraint SvgWeightPropertyInfo = (~) Double
type AttrTransferTypeConstraint SvgWeightPropertyInfo = (~) Double
type AttrTransferType SvgWeightPropertyInfo = Double
type AttrGetType SvgWeightPropertyInfo = Double
type AttrLabel SvgWeightPropertyInfo = "weight"
type AttrOrigin SvgWeightPropertyInfo = Svg
attrGet = getSvgWeight
attrSet = setSvgWeight
attrPut = setSvgWeight
attrTransfer _ v = do
return v
attrConstruct = constructSvgWeight
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Svg.weight"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#g:attr:weight"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Svg
type instance O.AttributeList Svg = SvgAttributeList
type SvgAttributeList = ('[ '("playing", SvgPlayingPropertyInfo), '("resource", SvgResourcePropertyInfo), '("state", SvgStatePropertyInfo), '("weight", SvgWeightPropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
svgPlaying :: AttrLabelProxy "playing"
svgPlaying = AttrLabelProxy
svgResource :: AttrLabelProxy "resource"
svgResource = AttrLabelProxy
svgState :: AttrLabelProxy "state"
svgState = AttrLabelProxy
svgWeight :: AttrLabelProxy "weight"
svgWeight = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Svg = SvgSignalList
type SvgSignalList = ('[ '("error", SvgErrorSignalInfo), '("invalidateContents", Gdk.Paintable.PaintableInvalidateContentsSignalInfo), '("invalidateSize", Gdk.Paintable.PaintableInvalidateSizeSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "gtk_svg_new" gtk_svg_new ::
IO (Ptr Svg)
svgNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m Svg
svgNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Svg
svgNew = IO Svg -> m Svg
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Svg -> m Svg) -> IO Svg -> m Svg
forall a b. (a -> b) -> a -> b
$ do
result <- IO (Ptr Svg)
gtk_svg_new
checkUnexpectedReturnNULL "svgNew" result
result' <- (wrapObject Svg) result
return result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_svg_new_from_bytes" gtk_svg_new_from_bytes ::
Ptr GLib.Bytes.Bytes ->
IO (Ptr Svg)
svgNewFromBytes ::
(B.CallStack.HasCallStack, MonadIO m) =>
GLib.Bytes.Bytes
-> m Svg
svgNewFromBytes :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Bytes -> m Svg
svgNewFromBytes Bytes
bytes = IO Svg -> m Svg
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Svg -> m Svg) -> IO Svg -> m Svg
forall a b. (a -> b) -> a -> b
$ do
bytes' <- Bytes -> IO (Ptr Bytes)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Bytes
bytes
result <- gtk_svg_new_from_bytes bytes'
checkUnexpectedReturnNULL "svgNewFromBytes" result
result' <- (wrapObject Svg) result
touchManagedPtr bytes
return result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_svg_new_from_resource" gtk_svg_new_from_resource ::
CString ->
IO (Ptr Svg)
svgNewFromResource ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m Svg
svgNewFromResource :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Text -> m Svg
svgNewFromResource Text
path = IO Svg -> m Svg
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Svg -> m Svg) -> IO Svg -> m Svg
forall a b. (a -> b) -> a -> b
$ do
path' <- Text -> IO CString
textToCString Text
path
result <- gtk_svg_new_from_resource path'
checkUnexpectedReturnNULL "svgNewFromResource" result
result' <- (wrapObject Svg) result
freeMem path'
return result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_svg_get_n_states" gtk_svg_get_n_states ::
Ptr Svg ->
IO Word32
svgGetNStates ::
(B.CallStack.HasCallStack, MonadIO m, IsSvg a) =>
a
-> m Word32
svgGetNStates :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSvg a) =>
a -> m Word32
svgGetNStates a
self = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Svg)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
result <- gtk_svg_get_n_states self'
touchManagedPtr self
return result
#if defined(ENABLE_OVERLOADING)
data SvgGetNStatesMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsSvg a) => O.OverloadedMethod SvgGetNStatesMethodInfo a signature where
overloadedMethod = svgGetNStates
instance O.OverloadedMethodInfo SvgGetNStatesMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Svg.svgGetNStates",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#v:svgGetNStates"
})
#endif
foreign import ccall "gtk_svg_get_state" gtk_svg_get_state ::
Ptr Svg ->
IO Word32
svgGetState ::
(B.CallStack.HasCallStack, MonadIO m, IsSvg a) =>
a
-> m Word32
svgGetState :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSvg a) =>
a -> m Word32
svgGetState a
self = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Svg)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
result <- gtk_svg_get_state self'
touchManagedPtr self
return result
#if defined(ENABLE_OVERLOADING)
data SvgGetStateMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsSvg a) => O.OverloadedMethod SvgGetStateMethodInfo a signature where
overloadedMethod = svgGetState
instance O.OverloadedMethodInfo SvgGetStateMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Svg.svgGetState",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#v:svgGetState"
})
#endif
foreign import ccall "gtk_svg_get_weight" gtk_svg_get_weight ::
Ptr Svg ->
IO CDouble
svgGetWeight ::
(B.CallStack.HasCallStack, MonadIO m, IsSvg a) =>
a
-> m Double
svgGetWeight :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSvg a) =>
a -> m Double
svgGetWeight a
self = IO Double -> m Double
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Svg)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
result <- gtk_svg_get_weight self'
let result' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
result
touchManagedPtr self
return result'
#if defined(ENABLE_OVERLOADING)
data SvgGetWeightMethodInfo
instance (signature ~ (m Double), MonadIO m, IsSvg a) => O.OverloadedMethod SvgGetWeightMethodInfo a signature where
overloadedMethod = svgGetWeight
instance O.OverloadedMethodInfo SvgGetWeightMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Svg.svgGetWeight",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#v:svgGetWeight"
})
#endif
foreign import ccall "gtk_svg_load_from_bytes" gtk_svg_load_from_bytes ::
Ptr Svg ->
Ptr GLib.Bytes.Bytes ->
IO ()
svgLoadFromBytes ::
(B.CallStack.HasCallStack, MonadIO m, IsSvg a) =>
a
-> GLib.Bytes.Bytes
-> m ()
svgLoadFromBytes :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSvg a) =>
a -> Bytes -> m ()
svgLoadFromBytes a
self Bytes
bytes = 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 Svg)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
bytes' <- unsafeManagedPtrGetPtr bytes
gtk_svg_load_from_bytes self' bytes'
touchManagedPtr self
touchManagedPtr bytes
return ()
#if defined(ENABLE_OVERLOADING)
data SvgLoadFromBytesMethodInfo
instance (signature ~ (GLib.Bytes.Bytes -> m ()), MonadIO m, IsSvg a) => O.OverloadedMethod SvgLoadFromBytesMethodInfo a signature where
overloadedMethod = svgLoadFromBytes
instance O.OverloadedMethodInfo SvgLoadFromBytesMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Svg.svgLoadFromBytes",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#v:svgLoadFromBytes"
})
#endif
foreign import ccall "gtk_svg_pause" gtk_svg_pause ::
Ptr Svg ->
IO ()
svgPause ::
(B.CallStack.HasCallStack, MonadIO m, IsSvg a) =>
a
-> m ()
svgPause :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSvg a) =>
a -> m ()
svgPause 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 Svg)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
gtk_svg_pause self'
touchManagedPtr self
return ()
#if defined(ENABLE_OVERLOADING)
data SvgPauseMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSvg a) => O.OverloadedMethod SvgPauseMethodInfo a signature where
overloadedMethod = svgPause
instance O.OverloadedMethodInfo SvgPauseMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Svg.svgPause",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#v:svgPause"
})
#endif
foreign import ccall "gtk_svg_play" gtk_svg_play ::
Ptr Svg ->
IO ()
svgPlay ::
(B.CallStack.HasCallStack, MonadIO m, IsSvg a) =>
a
-> m ()
svgPlay :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSvg a) =>
a -> m ()
svgPlay 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 Svg)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
gtk_svg_play self'
touchManagedPtr self
return ()
#if defined(ENABLE_OVERLOADING)
data SvgPlayMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSvg a) => O.OverloadedMethod SvgPlayMethodInfo a signature where
overloadedMethod = svgPlay
instance O.OverloadedMethodInfo SvgPlayMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Svg.svgPlay",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#v:svgPlay"
})
#endif
foreign import ccall "gtk_svg_serialize" gtk_svg_serialize ::
Ptr Svg ->
IO (Ptr GLib.Bytes.Bytes)
svgSerialize ::
(B.CallStack.HasCallStack, MonadIO m, IsSvg a) =>
a
-> m GLib.Bytes.Bytes
svgSerialize :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSvg a) =>
a -> m Bytes
svgSerialize a
self = IO Bytes -> m Bytes
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bytes -> m Bytes) -> IO Bytes -> m Bytes
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr Svg)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
result <- gtk_svg_serialize self'
checkUnexpectedReturnNULL "svgSerialize" result
result' <- (wrapBoxed GLib.Bytes.Bytes) result
touchManagedPtr self
return result'
#if defined(ENABLE_OVERLOADING)
data SvgSerializeMethodInfo
instance (signature ~ (m GLib.Bytes.Bytes), MonadIO m, IsSvg a) => O.OverloadedMethod SvgSerializeMethodInfo a signature where
overloadedMethod = svgSerialize
instance O.OverloadedMethodInfo SvgSerializeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Svg.svgSerialize",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#v:svgSerialize"
})
#endif
foreign import ccall "gtk_svg_set_frame_clock" gtk_svg_set_frame_clock ::
Ptr Svg ->
Ptr Gdk.FrameClock.FrameClock ->
IO ()
svgSetFrameClock ::
(B.CallStack.HasCallStack, MonadIO m, IsSvg a, Gdk.FrameClock.IsFrameClock b) =>
a
-> b
-> m ()
svgSetFrameClock :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsSvg a, IsFrameClock b) =>
a -> b -> m ()
svgSetFrameClock a
self b
clock = 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 Svg)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
clock' <- unsafeManagedPtrCastPtr clock
gtk_svg_set_frame_clock self' clock'
touchManagedPtr self
touchManagedPtr clock
return ()
#if defined(ENABLE_OVERLOADING)
data SvgSetFrameClockMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsSvg a, Gdk.FrameClock.IsFrameClock b) => O.OverloadedMethod SvgSetFrameClockMethodInfo a signature where
overloadedMethod = svgSetFrameClock
instance O.OverloadedMethodInfo SvgSetFrameClockMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Svg.svgSetFrameClock",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#v:svgSetFrameClock"
})
#endif
foreign import ccall "gtk_svg_set_state" gtk_svg_set_state ::
Ptr Svg ->
Word32 ->
IO ()
svgSetState ::
(B.CallStack.HasCallStack, MonadIO m, IsSvg a) =>
a
-> Word32
-> m ()
svgSetState :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSvg a) =>
a -> Word32 -> m ()
svgSetState a
self Word32
state = 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 Svg)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
gtk_svg_set_state self' state
touchManagedPtr self
return ()
#if defined(ENABLE_OVERLOADING)
data SvgSetStateMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsSvg a) => O.OverloadedMethod SvgSetStateMethodInfo a signature where
overloadedMethod = svgSetState
instance O.OverloadedMethodInfo SvgSetStateMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Svg.svgSetState",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#v:svgSetState"
})
#endif
foreign import ccall "gtk_svg_set_weight" gtk_svg_set_weight ::
Ptr Svg ->
CDouble ->
IO ()
svgSetWeight ::
(B.CallStack.HasCallStack, MonadIO m, IsSvg a) =>
a
-> Double
-> m ()
svgSetWeight :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSvg a) =>
a -> Double -> m ()
svgSetWeight a
self Double
weight = 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 Svg)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
let weight' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
weight
gtk_svg_set_weight self' weight'
touchManagedPtr self
return ()
#if defined(ENABLE_OVERLOADING)
data SvgSetWeightMethodInfo
instance (signature ~ (Double -> m ()), MonadIO m, IsSvg a) => O.OverloadedMethod SvgSetWeightMethodInfo a signature where
overloadedMethod = svgSetWeight
instance O.OverloadedMethodInfo SvgSetWeightMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Svg.svgSetWeight",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#v:svgSetWeight"
})
#endif
foreign import ccall "gtk_svg_write_to_file" gtk_svg_write_to_file ::
Ptr Svg ->
CString ->
Ptr (Ptr GError) ->
IO CInt
svgWriteToFile ::
(B.CallStack.HasCallStack, MonadIO m, IsSvg a) =>
a
-> T.Text
-> m ()
svgWriteToFile :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSvg a) =>
a -> Text -> m ()
svgWriteToFile a
self Text
filename = 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 Svg)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
filename' <- textToCString filename
onException (do
_ <- propagateGError $ gtk_svg_write_to_file self' filename'
touchManagedPtr self
freeMem filename'
return ()
) (do
freeMem filename'
)
#if defined(ENABLE_OVERLOADING)
data SvgWriteToFileMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsSvg a) => O.OverloadedMethod SvgWriteToFileMethodInfo a signature where
overloadedMethod = svgWriteToFile
instance O.OverloadedMethodInfo SvgWriteToFileMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Svg.svgWriteToFile",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#v:svgWriteToFile"
})
#endif