{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}
#if !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)
SvgGetFeaturesMethodInfo ,
#endif
svgGetFeatures ,
#if defined(ENABLE_OVERLOADING)
SvgGetOverflowMethodInfo ,
#endif
svgGetOverflow ,
#if defined(ENABLE_OVERLOADING)
SvgGetStateMethodInfo ,
#endif
svgGetState ,
#if defined(ENABLE_OVERLOADING)
SvgGetStateNamesMethodInfo ,
#endif
svgGetStateNames ,
#if defined(ENABLE_OVERLOADING)
SvgGetStylesheetMethodInfo ,
#endif
svgGetStylesheet ,
#if defined(ENABLE_OVERLOADING)
SvgGetWeightMethodInfo ,
#endif
svgGetWeight ,
#if defined(ENABLE_OVERLOADING)
SvgLoadFromBytesMethodInfo ,
#endif
svgLoadFromBytes ,
#if defined(ENABLE_OVERLOADING)
SvgLoadFromResourceMethodInfo ,
#endif
svgLoadFromResource ,
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)
SvgSetFeaturesMethodInfo ,
#endif
svgSetFeatures ,
#if defined(ENABLE_OVERLOADING)
SvgSetFrameClockMethodInfo ,
#endif
svgSetFrameClock ,
#if defined(ENABLE_OVERLOADING)
SvgSetOverflowMethodInfo ,
#endif
svgSetOverflow ,
#if defined(ENABLE_OVERLOADING)
SvgSetSettingsMethodInfo ,
#endif
svgSetSettings ,
#if defined(ENABLE_OVERLOADING)
SvgSetStateMethodInfo ,
#endif
svgSetState ,
#if defined(ENABLE_OVERLOADING)
SvgSetStylesheetMethodInfo ,
#endif
svgSetStylesheet ,
#if defined(ENABLE_OVERLOADING)
SvgSetWeightMethodInfo ,
#endif
svgSetWeight ,
#if defined(ENABLE_OVERLOADING)
SvgWriteToFileMethodInfo ,
#endif
svgWriteToFile ,
#if defined(ENABLE_OVERLOADING)
SvgFeaturesPropertyInfo ,
#endif
constructSvgFeatures ,
getSvgFeatures ,
setSvgFeatures ,
#if defined(ENABLE_OVERLOADING)
svgFeatures ,
#endif
#if defined(ENABLE_OVERLOADING)
SvgOverflowPropertyInfo ,
#endif
constructSvgOverflow ,
getSvgOverflow ,
setSvgOverflow ,
#if defined(ENABLE_OVERLOADING)
svgOverflow ,
#endif
#if defined(ENABLE_OVERLOADING)
SvgPlayingPropertyInfo ,
#endif
constructSvgPlaying ,
getSvgPlaying ,
setSvgPlaying ,
#if defined(ENABLE_OVERLOADING)
svgPlaying ,
#endif
#if defined(ENABLE_OVERLOADING)
SvgResourcePropertyInfo ,
#endif
clearSvgResource ,
constructSvgResource ,
getSvgResource ,
setSvgResource ,
#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)
SvgStylesheetPropertyInfo ,
#endif
clearSvgStylesheet ,
constructSvgStylesheet ,
getSvgStylesheet ,
setSvgStylesheet ,
#if defined(ENABLE_OVERLOADING)
svgStylesheet ,
#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.Display as Gdk.Display
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.Enums as Gtk.Enums
import {-# SOURCE #-} qualified GI.Gtk.Flags as Gtk.Flags
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.StyleProvider as Gtk.StyleProvider
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.SymbolicPaintable as Gtk.SymbolicPaintable
import {-# SOURCE #-} qualified GI.Gtk.Objects.Settings as Gtk.Settings
#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.Enums as Gtk.Enums
import {-# SOURCE #-} qualified GI.Gtk.Flags as Gtk.Flags
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.SymbolicPaintable as Gtk.SymbolicPaintable
import {-# SOURCE #-} qualified GI.Gtk.Objects.Settings as Gtk.Settings
#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 "loadFromResource" o = SvgLoadFromResourceMethodInfo
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 "getFeatures" o = SvgGetFeaturesMethodInfo
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 "getOverflow" o = SvgGetOverflowMethodInfo
ResolveSvgMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveSvgMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveSvgMethod "getState" o = SvgGetStateMethodInfo
ResolveSvgMethod "getStateNames" o = SvgGetStateNamesMethodInfo
ResolveSvgMethod "getStylesheet" o = SvgGetStylesheetMethodInfo
ResolveSvgMethod "getWeight" o = SvgGetWeightMethodInfo
ResolveSvgMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveSvgMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveSvgMethod "setFeatures" o = SvgSetFeaturesMethodInfo
ResolveSvgMethod "setFrameClock" o = SvgSetFrameClockMethodInfo
ResolveSvgMethod "setOverflow" o = SvgSetOverflowMethodInfo
ResolveSvgMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveSvgMethod "setSettings" o = SvgSetSettingsMethodInfo
ResolveSvgMethod "setState" o = SvgSetStateMethodInfo
ResolveSvgMethod "setStylesheet" o = SvgSetStylesheetMethodInfo
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
getSvgFeatures :: (MonadIO m, IsSvg o) => o -> m [Gtk.Flags.SvgFeatures]
getSvgFeatures :: forall (m :: * -> *) o.
(MonadIO m, IsSvg o) =>
o -> m [SvgFeatures]
getSvgFeatures o
obj = IO [SvgFeatures] -> m [SvgFeatures]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO [SvgFeatures] -> m [SvgFeatures])
-> IO [SvgFeatures] -> m [SvgFeatures]
forall a b. (a -> b) -> a -> b
$ o -> String -> IO [SvgFeatures]
forall a b.
(GObject a, IsGFlag b, BoxedFlags b) =>
a -> String -> IO [b]
B.Properties.getObjectPropertyFlags o
obj String
"features"
setSvgFeatures :: (MonadIO m, IsSvg o) => o -> [Gtk.Flags.SvgFeatures] -> m ()
setSvgFeatures :: forall (m :: * -> *) o.
(MonadIO m, IsSvg o) =>
o -> [SvgFeatures] -> m ()
setSvgFeatures o
obj [SvgFeatures]
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 -> [SvgFeatures] -> IO ()
forall a b.
(IsGFlag b, BoxedFlags b, GObject a) =>
a -> String -> [b] -> IO ()
B.Properties.setObjectPropertyFlags o
obj String
"features" [SvgFeatures]
val
constructSvgFeatures :: (IsSvg o, MIO.MonadIO m) => [Gtk.Flags.SvgFeatures] -> m (GValueConstruct o)
constructSvgFeatures :: forall o (m :: * -> *).
(IsSvg o, MonadIO m) =>
[SvgFeatures] -> m (GValueConstruct o)
constructSvgFeatures [SvgFeatures]
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 -> [SvgFeatures] -> IO (GValueConstruct o)
forall a o.
(IsGFlag a, BoxedFlags a) =>
String -> [a] -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyFlags String
"features" [SvgFeatures]
val
#if defined(ENABLE_OVERLOADING)
data SvgFeaturesPropertyInfo
instance AttrInfo SvgFeaturesPropertyInfo where
type AttrAllowedOps SvgFeaturesPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrPut]
type AttrBaseTypeConstraint SvgFeaturesPropertyInfo = IsSvg
type AttrSetTypeConstraint SvgFeaturesPropertyInfo = (~) [Gtk.Flags.SvgFeatures]
type AttrTransferTypeConstraint SvgFeaturesPropertyInfo = (~) [Gtk.Flags.SvgFeatures]
type AttrTransferType SvgFeaturesPropertyInfo = [Gtk.Flags.SvgFeatures]
type AttrGetType SvgFeaturesPropertyInfo = [Gtk.Flags.SvgFeatures]
type AttrLabel SvgFeaturesPropertyInfo = "features"
type AttrOrigin SvgFeaturesPropertyInfo = Svg
attrGet = getSvgFeatures
attrSet = setSvgFeatures
attrPut = setSvgFeatures
attrTransfer _ v = do
return v
attrConstruct = constructSvgFeatures
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Svg.features"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#g:attr:features"
})
#endif
getSvgOverflow :: (MonadIO m, IsSvg o) => o -> m Gtk.Enums.Overflow
getSvgOverflow :: forall (m :: * -> *) o. (MonadIO m, IsSvg o) => o -> m Overflow
getSvgOverflow o
obj = IO Overflow -> m Overflow
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Overflow -> m Overflow) -> IO Overflow -> m Overflow
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Overflow
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"overflow"
setSvgOverflow :: (MonadIO m, IsSvg o) => o -> Gtk.Enums.Overflow -> m ()
setSvgOverflow :: forall (m :: * -> *) o.
(MonadIO m, IsSvg o) =>
o -> Overflow -> m ()
setSvgOverflow o
obj Overflow
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 -> Overflow -> IO ()
forall a b.
(GObject a, Enum b, BoxedEnum b) =>
a -> String -> b -> IO ()
B.Properties.setObjectPropertyEnum o
obj String
"overflow" Overflow
val
constructSvgOverflow :: (IsSvg o, MIO.MonadIO m) => Gtk.Enums.Overflow -> m (GValueConstruct o)
constructSvgOverflow :: forall o (m :: * -> *).
(IsSvg o, MonadIO m) =>
Overflow -> m (GValueConstruct o)
constructSvgOverflow Overflow
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 -> Overflow -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum String
"overflow" Overflow
val
#if defined(ENABLE_OVERLOADING)
data SvgOverflowPropertyInfo
instance AttrInfo SvgOverflowPropertyInfo where
type AttrAllowedOps SvgOverflowPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrPut]
type AttrBaseTypeConstraint SvgOverflowPropertyInfo = IsSvg
type AttrSetTypeConstraint SvgOverflowPropertyInfo = (~) Gtk.Enums.Overflow
type AttrTransferTypeConstraint SvgOverflowPropertyInfo = (~) Gtk.Enums.Overflow
type AttrTransferType SvgOverflowPropertyInfo = Gtk.Enums.Overflow
type AttrGetType SvgOverflowPropertyInfo = Gtk.Enums.Overflow
type AttrLabel SvgOverflowPropertyInfo = "overflow"
type AttrOrigin SvgOverflowPropertyInfo = Svg
attrGet = getSvgOverflow
attrSet = setSvgOverflow
attrPut = setSvgOverflow
attrTransfer _ v = do
return v
attrConstruct = constructSvgOverflow
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Svg.overflow"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#g:attr:overflow"
})
#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
getSvgResource :: (MonadIO m, IsSvg o) => o -> m (Maybe T.Text)
getSvgResource :: forall (m :: * -> *) o. (MonadIO m, IsSvg o) => o -> m (Maybe Text)
getSvgResource o
obj = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"resource"
setSvgResource :: (MonadIO m, IsSvg o) => o -> T.Text -> m ()
setSvgResource :: forall (m :: * -> *) o. (MonadIO m, IsSvg o) => o -> Text -> m ()
setSvgResource o
obj Text
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 -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"resource" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)
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)
clearSvgResource :: (MonadIO m, IsSvg o) => o -> m ()
clearSvgResource :: forall (m :: * -> *) o. (MonadIO m, IsSvg o) => o -> m ()
clearSvgResource o
obj = 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
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"resource" (Maybe Text
forall a. Maybe a
Nothing :: Maybe T.Text)
#if defined(ENABLE_OVERLOADING)
data SvgResourcePropertyInfo
instance AttrInfo SvgResourcePropertyInfo where
type AttrAllowedOps SvgResourcePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint SvgResourcePropertyInfo = IsSvg
type AttrSetTypeConstraint SvgResourcePropertyInfo = (~) T.Text
type AttrTransferTypeConstraint SvgResourcePropertyInfo = (~) T.Text
type AttrTransferType SvgResourcePropertyInfo = T.Text
type AttrGetType SvgResourcePropertyInfo = (Maybe T.Text)
type AttrLabel SvgResourcePropertyInfo = "resource"
type AttrOrigin SvgResourcePropertyInfo = Svg
attrGet = getSvgResource
attrSet = setSvgResource
attrPut = undefined
attrTransfer _ v = do
return v
attrConstruct = constructSvgResource
attrClear = clearSvgResource
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
getSvgStylesheet :: (MonadIO m, IsSvg o) => o -> m (Maybe GLib.Bytes.Bytes)
getSvgStylesheet :: forall (m :: * -> *) o.
(MonadIO m, IsSvg o) =>
o -> m (Maybe Bytes)
getSvgStylesheet o
obj = IO (Maybe Bytes) -> m (Maybe Bytes)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Bytes) -> m (Maybe Bytes))
-> IO (Maybe Bytes) -> m (Maybe Bytes)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Bytes -> Bytes) -> IO (Maybe Bytes)
forall a b.
(GObject a, GBoxed b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyBoxed o
obj String
"stylesheet" ManagedPtr Bytes -> Bytes
GLib.Bytes.Bytes
setSvgStylesheet :: (MonadIO m, IsSvg o) => o -> GLib.Bytes.Bytes -> m ()
setSvgStylesheet :: forall (m :: * -> *) o. (MonadIO m, IsSvg o) => o -> Bytes -> m ()
setSvgStylesheet o
obj Bytes
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 -> Maybe Bytes -> IO ()
forall a b.
(GObject a, GBoxed b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyBoxed o
obj String
"stylesheet" (Bytes -> Maybe Bytes
forall a. a -> Maybe a
Just Bytes
val)
constructSvgStylesheet :: (IsSvg o, MIO.MonadIO m) => GLib.Bytes.Bytes -> m (GValueConstruct o)
constructSvgStylesheet :: forall o (m :: * -> *).
(IsSvg o, MonadIO m) =>
Bytes -> m (GValueConstruct o)
constructSvgStylesheet Bytes
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 Bytes -> IO (GValueConstruct o)
forall a o. GBoxed a => String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBoxed String
"stylesheet" (Bytes -> Maybe Bytes
forall a. a -> Maybe a
P.Just Bytes
val)
clearSvgStylesheet :: (MonadIO m, IsSvg o) => o -> m ()
clearSvgStylesheet :: forall (m :: * -> *) o. (MonadIO m, IsSvg o) => o -> m ()
clearSvgStylesheet o
obj = 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
$ o -> String -> Maybe Bytes -> IO ()
forall a b.
(GObject a, GBoxed b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyBoxed o
obj String
"stylesheet" (Maybe Bytes
forall a. Maybe a
Nothing :: Maybe GLib.Bytes.Bytes)
#if defined(ENABLE_OVERLOADING)
data SvgStylesheetPropertyInfo
instance AttrInfo SvgStylesheetPropertyInfo where
type AttrAllowedOps SvgStylesheetPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint SvgStylesheetPropertyInfo = IsSvg
type AttrSetTypeConstraint SvgStylesheetPropertyInfo = (~) GLib.Bytes.Bytes
type AttrTransferTypeConstraint SvgStylesheetPropertyInfo = (~) GLib.Bytes.Bytes
type AttrTransferType SvgStylesheetPropertyInfo = GLib.Bytes.Bytes
type AttrGetType SvgStylesheetPropertyInfo = (Maybe GLib.Bytes.Bytes)
type AttrLabel SvgStylesheetPropertyInfo = "stylesheet"
type AttrOrigin SvgStylesheetPropertyInfo = Svg
attrGet = getSvgStylesheet
attrSet = setSvgStylesheet
attrPut = undefined
attrTransfer _ v = do
return v
attrConstruct = constructSvgStylesheet
attrClear = clearSvgStylesheet
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Svg.stylesheet"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#g:attr:stylesheet"
})
#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 = ('[ '("features", SvgFeaturesPropertyInfo), '("overflow", SvgOverflowPropertyInfo), '("playing", SvgPlayingPropertyInfo), '("resource", SvgResourcePropertyInfo), '("state", SvgStatePropertyInfo), '("stylesheet", SvgStylesheetPropertyInfo), '("weight", SvgWeightPropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
svgFeatures :: AttrLabelProxy "features"
svgFeatures = AttrLabelProxy
svgOverflow :: AttrLabelProxy "overflow"
svgOverflow = AttrLabelProxy
svgPlaying :: AttrLabelProxy "playing"
svgPlaying = AttrLabelProxy
svgResource :: AttrLabelProxy "resource"
svgResource = AttrLabelProxy
svgState :: AttrLabelProxy "state"
svgState = AttrLabelProxy
svgStylesheet :: AttrLabelProxy "stylesheet"
svgStylesheet = 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_features" gtk_svg_get_features ::
Ptr Svg ->
IO CUInt
svgGetFeatures ::
(B.CallStack.HasCallStack, MonadIO m, IsSvg a) =>
a
-> m [Gtk.Flags.SvgFeatures]
svgGetFeatures :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSvg a) =>
a -> m [SvgFeatures]
svgGetFeatures a
self = IO [SvgFeatures] -> m [SvgFeatures]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [SvgFeatures] -> m [SvgFeatures])
-> IO [SvgFeatures] -> m [SvgFeatures]
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_features self'
let result' = CUInt -> [SvgFeatures]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
touchManagedPtr self
return result'
#if defined(ENABLE_OVERLOADING)
data SvgGetFeaturesMethodInfo
instance (signature ~ (m [Gtk.Flags.SvgFeatures]), MonadIO m, IsSvg a) => O.OverloadedMethod SvgGetFeaturesMethodInfo a signature where
overloadedMethod = svgGetFeatures
instance O.OverloadedMethodInfo SvgGetFeaturesMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Svg.svgGetFeatures",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#v:svgGetFeatures"
})
#endif
foreign import ccall "gtk_svg_get_overflow" gtk_svg_get_overflow ::
Ptr Svg ->
IO CUInt
svgGetOverflow ::
(B.CallStack.HasCallStack, MonadIO m, IsSvg a) =>
a
-> m Gtk.Enums.Overflow
svgGetOverflow :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSvg a) =>
a -> m Overflow
svgGetOverflow a
self = IO Overflow -> m Overflow
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Overflow -> m Overflow) -> IO Overflow -> m Overflow
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_overflow self'
let result' = (Int -> Overflow
forall a. Enum a => Int -> a
toEnum (Int -> Overflow) -> (CUInt -> Int) -> CUInt -> Overflow
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
touchManagedPtr self
return result'
#if defined(ENABLE_OVERLOADING)
data SvgGetOverflowMethodInfo
instance (signature ~ (m Gtk.Enums.Overflow), MonadIO m, IsSvg a) => O.OverloadedMethod SvgGetOverflowMethodInfo a signature where
overloadedMethod = svgGetOverflow
instance O.OverloadedMethodInfo SvgGetOverflowMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Svg.svgGetOverflow",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#v:svgGetOverflow"
})
#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_state_names" gtk_svg_get_state_names ::
Ptr Svg ->
Ptr Word32 ->
IO (Ptr CString)
svgGetStateNames ::
(B.CallStack.HasCallStack, MonadIO m, IsSvg a) =>
a
-> m ((Maybe [T.Text], Word32))
svgGetStateNames :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSvg a) =>
a -> m (Maybe [Text], Word32)
svgGetStateNames a
self = IO (Maybe [Text], Word32) -> m (Maybe [Text], Word32)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe [Text], Word32) -> m (Maybe [Text], Word32))
-> IO (Maybe [Text], Word32) -> m (Maybe [Text], 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
length_ <- allocMem :: IO (Ptr Word32)
result <- gtk_svg_get_state_names self' length_
maybeResult <- convertIfNonNull result $ \Ptr CString
result' -> do
result'' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
result'
return result''
length_' <- peek length_
touchManagedPtr self
freeMem length_
return (maybeResult, length_')
#if defined(ENABLE_OVERLOADING)
data SvgGetStateNamesMethodInfo
instance (signature ~ (m ((Maybe [T.Text], Word32))), MonadIO m, IsSvg a) => O.OverloadedMethod SvgGetStateNamesMethodInfo a signature where
overloadedMethod = svgGetStateNames
instance O.OverloadedMethodInfo SvgGetStateNamesMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Svg.svgGetStateNames",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#v:svgGetStateNames"
})
#endif
foreign import ccall "gtk_svg_get_stylesheet" gtk_svg_get_stylesheet ::
Ptr Svg ->
IO (Ptr GLib.Bytes.Bytes)
svgGetStylesheet ::
(B.CallStack.HasCallStack, MonadIO m, IsSvg a) =>
a
-> m (Maybe GLib.Bytes.Bytes)
svgGetStylesheet :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSvg a) =>
a -> m (Maybe Bytes)
svgGetStylesheet a
self = IO (Maybe Bytes) -> m (Maybe Bytes)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Bytes) -> m (Maybe Bytes))
-> IO (Maybe Bytes) -> m (Maybe 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_get_stylesheet self'
maybeResult <- convertIfNonNull result $ \Ptr Bytes
result' -> do
result'' <- ((ManagedPtr Bytes -> Bytes) -> Ptr Bytes -> IO Bytes
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Bytes -> Bytes
GLib.Bytes.Bytes) Ptr Bytes
result'
return result''
touchManagedPtr self
return maybeResult
#if defined(ENABLE_OVERLOADING)
data SvgGetStylesheetMethodInfo
instance (signature ~ (m (Maybe GLib.Bytes.Bytes)), MonadIO m, IsSvg a) => O.OverloadedMethod SvgGetStylesheetMethodInfo a signature where
overloadedMethod = svgGetStylesheet
instance O.OverloadedMethodInfo SvgGetStylesheetMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Svg.svgGetStylesheet",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#v:svgGetStylesheet"
})
#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_load_from_resource" gtk_svg_load_from_resource ::
Ptr Svg ->
CString ->
IO ()
svgLoadFromResource ::
(B.CallStack.HasCallStack, MonadIO m, IsSvg a) =>
a
-> T.Text
-> m ()
svgLoadFromResource :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSvg a) =>
a -> Text -> m ()
svgLoadFromResource a
self Text
path = 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
path' <- textToCString path
gtk_svg_load_from_resource self' path'
touchManagedPtr self
freeMem path'
return ()
#if defined(ENABLE_OVERLOADING)
data SvgLoadFromResourceMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsSvg a) => O.OverloadedMethod SvgLoadFromResourceMethodInfo a signature where
overloadedMethod = svgLoadFromResource
instance O.OverloadedMethodInfo SvgLoadFromResourceMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Svg.svgLoadFromResource",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#v:svgLoadFromResource"
})
#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_features" gtk_svg_set_features ::
Ptr Svg ->
CUInt ->
IO ()
svgSetFeatures ::
(B.CallStack.HasCallStack, MonadIO m, IsSvg a) =>
a
-> [Gtk.Flags.SvgFeatures]
-> m ()
svgSetFeatures :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSvg a) =>
a -> [SvgFeatures] -> m ()
svgSetFeatures a
self [SvgFeatures]
features = 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 features' = [SvgFeatures] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [SvgFeatures]
features
gtk_svg_set_features self' features'
touchManagedPtr self
return ()
#if defined(ENABLE_OVERLOADING)
data SvgSetFeaturesMethodInfo
instance (signature ~ ([Gtk.Flags.SvgFeatures] -> m ()), MonadIO m, IsSvg a) => O.OverloadedMethod SvgSetFeaturesMethodInfo a signature where
overloadedMethod = svgSetFeatures
instance O.OverloadedMethodInfo SvgSetFeaturesMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Svg.svgSetFeatures",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#v:svgSetFeatures"
})
#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_overflow" gtk_svg_set_overflow ::
Ptr Svg ->
CUInt ->
IO ()
svgSetOverflow ::
(B.CallStack.HasCallStack, MonadIO m, IsSvg a) =>
a
-> Gtk.Enums.Overflow
-> m ()
svgSetOverflow :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSvg a) =>
a -> Overflow -> m ()
svgSetOverflow a
self Overflow
overflow = 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 overflow' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (Overflow -> Int) -> Overflow -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Overflow -> Int
forall a. Enum a => a -> Int
fromEnum) Overflow
overflow
gtk_svg_set_overflow self' overflow'
touchManagedPtr self
return ()
#if defined(ENABLE_OVERLOADING)
data SvgSetOverflowMethodInfo
instance (signature ~ (Gtk.Enums.Overflow -> m ()), MonadIO m, IsSvg a) => O.OverloadedMethod SvgSetOverflowMethodInfo a signature where
overloadedMethod = svgSetOverflow
instance O.OverloadedMethodInfo SvgSetOverflowMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Svg.svgSetOverflow",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#v:svgSetOverflow"
})
#endif
foreign import ccall "gtk_svg_set_settings" gtk_svg_set_settings ::
Ptr Svg ->
Ptr Gtk.Settings.Settings ->
IO ()
svgSetSettings ::
(B.CallStack.HasCallStack, MonadIO m, IsSvg a, Gtk.Settings.IsSettings b) =>
a
-> Maybe (b)
-> m ()
svgSetSettings :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsSvg a, IsSettings b) =>
a -> Maybe b -> m ()
svgSetSettings a
self Maybe b
settings = 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
maybeSettings <- case settings of
Maybe b
Nothing -> Ptr Settings -> IO (Ptr Settings)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Settings
forall a. Ptr a
FP.nullPtr
Just b
jSettings -> do
jSettings' <- b -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jSettings
return jSettings'
gtk_svg_set_settings self' maybeSettings
touchManagedPtr self
whenJust settings touchManagedPtr
return ()
#if defined(ENABLE_OVERLOADING)
data SvgSetSettingsMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsSvg a, Gtk.Settings.IsSettings b) => O.OverloadedMethod SvgSetSettingsMethodInfo a signature where
overloadedMethod = svgSetSettings
instance O.OverloadedMethodInfo SvgSetSettingsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Svg.svgSetSettings",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#v:svgSetSettings"
})
#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_stylesheet" gtk_svg_set_stylesheet ::
Ptr Svg ->
Ptr GLib.Bytes.Bytes ->
IO ()
svgSetStylesheet ::
(B.CallStack.HasCallStack, MonadIO m, IsSvg a) =>
a
-> Maybe (GLib.Bytes.Bytes)
-> m ()
svgSetStylesheet :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSvg a) =>
a -> Maybe Bytes -> m ()
svgSetStylesheet a
self Maybe 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
maybeBytes <- case bytes of
Maybe Bytes
Nothing -> Ptr Bytes -> IO (Ptr Bytes)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Bytes
forall a. Ptr a
FP.nullPtr
Just Bytes
jBytes -> do
jBytes' <- Bytes -> IO (Ptr Bytes)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Bytes
jBytes
return jBytes'
gtk_svg_set_stylesheet self' maybeBytes
touchManagedPtr self
whenJust bytes touchManagedPtr
return ()
#if defined(ENABLE_OVERLOADING)
data SvgSetStylesheetMethodInfo
instance (signature ~ (Maybe (GLib.Bytes.Bytes) -> m ()), MonadIO m, IsSvg a) => O.OverloadedMethod SvgSetStylesheetMethodInfo a signature where
overloadedMethod = svgSetStylesheet
instance O.OverloadedMethodInfo SvgSetStylesheetMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Svg.svgSetStylesheet",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#v:svgSetStylesheet"
})
#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