{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Structs.BuildableParser
(
BuildableParser(..) ,
newZeroBuildableParser ,
#if defined(ENABLE_OVERLOADING)
ResolveBuildableParserMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
buildableParser_endElement ,
#endif
clearBuildableParserEndElement ,
getBuildableParserEndElement ,
setBuildableParserEndElement ,
#if defined(ENABLE_OVERLOADING)
buildableParser_error ,
#endif
clearBuildableParserError ,
getBuildableParserError ,
setBuildableParserError ,
#if defined(ENABLE_OVERLOADING)
buildableParser_startElement ,
#endif
clearBuildableParserStartElement ,
getBuildableParserStartElement ,
setBuildableParserStartElement ,
#if defined(ENABLE_OVERLOADING)
buildableParser_text ,
#endif
clearBuildableParserText ,
getBuildableParserText ,
setBuildableParserText ,
) 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.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.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import qualified GI.Gtk.Callbacks as Gtk.Callbacks
newtype BuildableParser = BuildableParser (SP.ManagedPtr BuildableParser)
deriving (BuildableParser -> BuildableParser -> Bool
(BuildableParser -> BuildableParser -> Bool)
-> (BuildableParser -> BuildableParser -> Bool)
-> Eq BuildableParser
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BuildableParser -> BuildableParser -> Bool
$c/= :: BuildableParser -> BuildableParser -> Bool
== :: BuildableParser -> BuildableParser -> Bool
$c== :: BuildableParser -> BuildableParser -> Bool
Eq)
instance SP.ManagedPtrNewtype BuildableParser where
toManagedPtr :: BuildableParser -> ManagedPtr BuildableParser
toManagedPtr (BuildableParser ManagedPtr BuildableParser
p) = ManagedPtr BuildableParser
p
instance BoxedPtr BuildableParser where
boxedPtrCopy :: BuildableParser -> IO BuildableParser
boxedPtrCopy = \BuildableParser
p -> BuildableParser
-> (Ptr BuildableParser -> IO BuildableParser)
-> IO BuildableParser
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr BuildableParser
p (Int -> Ptr BuildableParser -> IO (Ptr BuildableParser)
forall a. (HasCallStack, CallocPtr a) => Int -> Ptr a -> IO (Ptr a)
copyBytes Int
64 (Ptr BuildableParser -> IO (Ptr BuildableParser))
-> (Ptr BuildableParser -> IO BuildableParser)
-> Ptr BuildableParser
-> IO BuildableParser
forall (m :: * -> *) a b c.
Monad m =>
(a -> m b) -> (b -> m c) -> a -> m c
>=> (ManagedPtr BuildableParser -> BuildableParser)
-> Ptr BuildableParser -> IO BuildableParser
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.wrapPtr ManagedPtr BuildableParser -> BuildableParser
BuildableParser)
boxedPtrFree :: BuildableParser -> IO ()
boxedPtrFree = \BuildableParser
x -> BuildableParser -> (Ptr BuildableParser -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
SP.withManagedPtr BuildableParser
x Ptr BuildableParser -> IO ()
forall a. Ptr a -> IO ()
SP.freeMem
instance CallocPtr BuildableParser where
boxedPtrCalloc :: IO (Ptr BuildableParser)
boxedPtrCalloc = Int -> IO (Ptr BuildableParser)
forall a. Int -> IO (Ptr a)
callocBytes Int
64
newZeroBuildableParser :: MonadIO m => m BuildableParser
newZeroBuildableParser :: forall (m :: * -> *). MonadIO m => m BuildableParser
newZeroBuildableParser = IO BuildableParser -> m BuildableParser
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO BuildableParser -> m BuildableParser)
-> IO BuildableParser -> m BuildableParser
forall a b. (a -> b) -> a -> b
$ IO (Ptr BuildableParser)
forall a. CallocPtr a => IO (Ptr a)
boxedPtrCalloc IO (Ptr BuildableParser)
-> (Ptr BuildableParser -> IO BuildableParser)
-> IO BuildableParser
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr BuildableParser -> BuildableParser)
-> Ptr BuildableParser -> IO BuildableParser
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr BuildableParser -> BuildableParser
BuildableParser
instance tag ~ 'AttrSet => Constructible BuildableParser tag where
new :: forall (m :: * -> *).
MonadIO m =>
(ManagedPtr BuildableParser -> BuildableParser)
-> [AttrOp BuildableParser tag] -> m BuildableParser
new ManagedPtr BuildableParser -> BuildableParser
_ [AttrOp BuildableParser tag]
attrs = do
BuildableParser
o <- m BuildableParser
forall (m :: * -> *). MonadIO m => m BuildableParser
newZeroBuildableParser
BuildableParser -> [AttrOp BuildableParser 'AttrSet] -> m ()
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set BuildableParser
o [AttrOp BuildableParser tag]
[AttrOp BuildableParser 'AttrSet]
attrs
BuildableParser -> m BuildableParser
forall (m :: * -> *) a. Monad m => a -> m a
return BuildableParser
o
getBuildableParserStartElement :: MonadIO m => BuildableParser -> m (Maybe Gtk.Callbacks.BuildableParserStartElementFieldCallback_WithClosures)
getBuildableParserStartElement :: forall (m :: * -> *).
MonadIO m =>
BuildableParser
-> m (Maybe BuildableParserStartElementFieldCallback_WithClosures)
getBuildableParserStartElement BuildableParser
s = IO (Maybe BuildableParserStartElementFieldCallback_WithClosures)
-> m (Maybe BuildableParserStartElementFieldCallback_WithClosures)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe BuildableParserStartElementFieldCallback_WithClosures)
-> m (Maybe BuildableParserStartElementFieldCallback_WithClosures))
-> IO (Maybe BuildableParserStartElementFieldCallback_WithClosures)
-> m (Maybe BuildableParserStartElementFieldCallback_WithClosures)
forall a b. (a -> b) -> a -> b
$ BuildableParser
-> (Ptr BuildableParser
-> IO
(Maybe BuildableParserStartElementFieldCallback_WithClosures))
-> IO (Maybe BuildableParserStartElementFieldCallback_WithClosures)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BuildableParser
s ((Ptr BuildableParser
-> IO
(Maybe BuildableParserStartElementFieldCallback_WithClosures))
-> IO
(Maybe BuildableParserStartElementFieldCallback_WithClosures))
-> (Ptr BuildableParser
-> IO
(Maybe BuildableParserStartElementFieldCallback_WithClosures))
-> IO (Maybe BuildableParserStartElementFieldCallback_WithClosures)
forall a b. (a -> b) -> a -> b
$ \Ptr BuildableParser
ptr -> do
FunPtr C_BuildableParserStartElementFieldCallback
val <- Ptr (FunPtr C_BuildableParserStartElementFieldCallback)
-> IO (FunPtr C_BuildableParserStartElementFieldCallback)
forall a. Storable a => Ptr a -> IO a
peek (Ptr BuildableParser
ptr Ptr BuildableParser
-> Int -> Ptr (FunPtr C_BuildableParserStartElementFieldCallback)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) :: IO (FunPtr Gtk.Callbacks.C_BuildableParserStartElementFieldCallback)
Maybe BuildableParserStartElementFieldCallback_WithClosures
result <- FunPtr C_BuildableParserStartElementFieldCallback
-> (FunPtr C_BuildableParserStartElementFieldCallback
-> IO BuildableParserStartElementFieldCallback_WithClosures)
-> IO (Maybe BuildableParserStartElementFieldCallback_WithClosures)
forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
SP.convertFunPtrIfNonNull FunPtr C_BuildableParserStartElementFieldCallback
val ((FunPtr C_BuildableParserStartElementFieldCallback
-> IO BuildableParserStartElementFieldCallback_WithClosures)
-> IO
(Maybe BuildableParserStartElementFieldCallback_WithClosures))
-> (FunPtr C_BuildableParserStartElementFieldCallback
-> IO BuildableParserStartElementFieldCallback_WithClosures)
-> IO (Maybe BuildableParserStartElementFieldCallback_WithClosures)
forall a b. (a -> b) -> a -> b
$ \FunPtr C_BuildableParserStartElementFieldCallback
val' -> do
let val'' :: BuildableParserStartElementFieldCallback_WithClosures
val'' = FunPtr C_BuildableParserStartElementFieldCallback
-> BuildableParserStartElementFieldCallback_WithClosures
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_BuildableParserStartElementFieldCallback
-> BuildableParseContext -> Text -> Text -> Text -> Ptr () -> m ()
Gtk.Callbacks.dynamic_BuildableParserStartElementFieldCallback FunPtr C_BuildableParserStartElementFieldCallback
val'
BuildableParserStartElementFieldCallback_WithClosures
-> IO BuildableParserStartElementFieldCallback_WithClosures
forall (m :: * -> *) a. Monad m => a -> m a
return BuildableParserStartElementFieldCallback_WithClosures
val''
Maybe BuildableParserStartElementFieldCallback_WithClosures
-> IO (Maybe BuildableParserStartElementFieldCallback_WithClosures)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe BuildableParserStartElementFieldCallback_WithClosures
result
setBuildableParserStartElement :: MonadIO m => BuildableParser -> FunPtr Gtk.Callbacks.C_BuildableParserStartElementFieldCallback -> m ()
setBuildableParserStartElement :: forall (m :: * -> *).
MonadIO m =>
BuildableParser
-> FunPtr C_BuildableParserStartElementFieldCallback -> m ()
setBuildableParserStartElement BuildableParser
s FunPtr C_BuildableParserStartElementFieldCallback
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ BuildableParser -> (Ptr BuildableParser -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BuildableParser
s ((Ptr BuildableParser -> IO ()) -> IO ())
-> (Ptr BuildableParser -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr BuildableParser
ptr -> do
Ptr (FunPtr C_BuildableParserStartElementFieldCallback)
-> FunPtr C_BuildableParserStartElementFieldCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr BuildableParser
ptr Ptr BuildableParser
-> Int -> Ptr (FunPtr C_BuildableParserStartElementFieldCallback)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) (FunPtr C_BuildableParserStartElementFieldCallback
val :: FunPtr Gtk.Callbacks.C_BuildableParserStartElementFieldCallback)
clearBuildableParserStartElement :: MonadIO m => BuildableParser -> m ()
clearBuildableParserStartElement :: forall (m :: * -> *). MonadIO m => BuildableParser -> m ()
clearBuildableParserStartElement BuildableParser
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ BuildableParser -> (Ptr BuildableParser -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BuildableParser
s ((Ptr BuildableParser -> IO ()) -> IO ())
-> (Ptr BuildableParser -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr BuildableParser
ptr -> do
Ptr (FunPtr C_BuildableParserStartElementFieldCallback)
-> FunPtr C_BuildableParserStartElementFieldCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr BuildableParser
ptr Ptr BuildableParser
-> Int -> Ptr (FunPtr C_BuildableParserStartElementFieldCallback)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) (FunPtr C_BuildableParserStartElementFieldCallback
forall a. FunPtr a
FP.nullFunPtr :: FunPtr Gtk.Callbacks.C_BuildableParserStartElementFieldCallback)
#if defined(ENABLE_OVERLOADING)
data BuildableParserStartElementFieldInfo
instance AttrInfo BuildableParserStartElementFieldInfo where
type AttrBaseTypeConstraint BuildableParserStartElementFieldInfo = (~) BuildableParser
type AttrAllowedOps BuildableParserStartElementFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint BuildableParserStartElementFieldInfo = (~) (FunPtr Gtk.Callbacks.C_BuildableParserStartElementFieldCallback)
type AttrTransferTypeConstraint BuildableParserStartElementFieldInfo = (~)(FunPtr Gtk.Callbacks.C_BuildableParserStartElementFieldCallback)
type AttrTransferType BuildableParserStartElementFieldInfo = (FunPtr Gtk.Callbacks.C_BuildableParserStartElementFieldCallback)
type AttrGetType BuildableParserStartElementFieldInfo = Maybe Gtk.Callbacks.BuildableParserStartElementFieldCallback_WithClosures
type AttrLabel BuildableParserStartElementFieldInfo = "start_element"
type AttrOrigin BuildableParserStartElementFieldInfo = BuildableParser
attrGet = getBuildableParserStartElement
attrSet = setBuildableParserStartElement
attrConstruct = undefined
attrClear = clearBuildableParserStartElement
attrTransfer _ v = do
return v
buildableParser_startElement :: AttrLabelProxy "startElement"
buildableParser_startElement = AttrLabelProxy
#endif
getBuildableParserEndElement :: MonadIO m => BuildableParser -> m (Maybe Gtk.Callbacks.BuildableParserEndElementFieldCallback_WithClosures)
getBuildableParserEndElement :: forall (m :: * -> *).
MonadIO m =>
BuildableParser
-> m (Maybe BuildableParserEndElementFieldCallback_WithClosures)
getBuildableParserEndElement BuildableParser
s = IO (Maybe BuildableParserEndElementFieldCallback_WithClosures)
-> m (Maybe BuildableParserEndElementFieldCallback_WithClosures)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe BuildableParserEndElementFieldCallback_WithClosures)
-> m (Maybe BuildableParserEndElementFieldCallback_WithClosures))
-> IO (Maybe BuildableParserEndElementFieldCallback_WithClosures)
-> m (Maybe BuildableParserEndElementFieldCallback_WithClosures)
forall a b. (a -> b) -> a -> b
$ BuildableParser
-> (Ptr BuildableParser
-> IO (Maybe BuildableParserEndElementFieldCallback_WithClosures))
-> IO (Maybe BuildableParserEndElementFieldCallback_WithClosures)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BuildableParser
s ((Ptr BuildableParser
-> IO (Maybe BuildableParserEndElementFieldCallback_WithClosures))
-> IO (Maybe BuildableParserEndElementFieldCallback_WithClosures))
-> (Ptr BuildableParser
-> IO (Maybe BuildableParserEndElementFieldCallback_WithClosures))
-> IO (Maybe BuildableParserEndElementFieldCallback_WithClosures)
forall a b. (a -> b) -> a -> b
$ \Ptr BuildableParser
ptr -> do
FunPtr C_BuildableParserEndElementFieldCallback
val <- Ptr (FunPtr C_BuildableParserEndElementFieldCallback)
-> IO (FunPtr C_BuildableParserEndElementFieldCallback)
forall a. Storable a => Ptr a -> IO a
peek (Ptr BuildableParser
ptr Ptr BuildableParser
-> Int -> Ptr (FunPtr C_BuildableParserEndElementFieldCallback)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) :: IO (FunPtr Gtk.Callbacks.C_BuildableParserEndElementFieldCallback)
Maybe BuildableParserEndElementFieldCallback_WithClosures
result <- FunPtr C_BuildableParserEndElementFieldCallback
-> (FunPtr C_BuildableParserEndElementFieldCallback
-> IO BuildableParserEndElementFieldCallback_WithClosures)
-> IO (Maybe BuildableParserEndElementFieldCallback_WithClosures)
forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
SP.convertFunPtrIfNonNull FunPtr C_BuildableParserEndElementFieldCallback
val ((FunPtr C_BuildableParserEndElementFieldCallback
-> IO BuildableParserEndElementFieldCallback_WithClosures)
-> IO (Maybe BuildableParserEndElementFieldCallback_WithClosures))
-> (FunPtr C_BuildableParserEndElementFieldCallback
-> IO BuildableParserEndElementFieldCallback_WithClosures)
-> IO (Maybe BuildableParserEndElementFieldCallback_WithClosures)
forall a b. (a -> b) -> a -> b
$ \FunPtr C_BuildableParserEndElementFieldCallback
val' -> do
let val'' :: BuildableParserEndElementFieldCallback_WithClosures
val'' = FunPtr C_BuildableParserEndElementFieldCallback
-> BuildableParserEndElementFieldCallback_WithClosures
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_BuildableParserEndElementFieldCallback
-> BuildableParseContext -> Text -> Ptr () -> m ()
Gtk.Callbacks.dynamic_BuildableParserEndElementFieldCallback FunPtr C_BuildableParserEndElementFieldCallback
val'
BuildableParserEndElementFieldCallback_WithClosures
-> IO BuildableParserEndElementFieldCallback_WithClosures
forall (m :: * -> *) a. Monad m => a -> m a
return BuildableParserEndElementFieldCallback_WithClosures
val''
Maybe BuildableParserEndElementFieldCallback_WithClosures
-> IO (Maybe BuildableParserEndElementFieldCallback_WithClosures)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe BuildableParserEndElementFieldCallback_WithClosures
result
setBuildableParserEndElement :: MonadIO m => BuildableParser -> FunPtr Gtk.Callbacks.C_BuildableParserEndElementFieldCallback -> m ()
setBuildableParserEndElement :: forall (m :: * -> *).
MonadIO m =>
BuildableParser
-> FunPtr C_BuildableParserEndElementFieldCallback -> m ()
setBuildableParserEndElement BuildableParser
s FunPtr C_BuildableParserEndElementFieldCallback
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ BuildableParser -> (Ptr BuildableParser -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BuildableParser
s ((Ptr BuildableParser -> IO ()) -> IO ())
-> (Ptr BuildableParser -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr BuildableParser
ptr -> do
Ptr (FunPtr C_BuildableParserEndElementFieldCallback)
-> FunPtr C_BuildableParserEndElementFieldCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr BuildableParser
ptr Ptr BuildableParser
-> Int -> Ptr (FunPtr C_BuildableParserEndElementFieldCallback)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) (FunPtr C_BuildableParserEndElementFieldCallback
val :: FunPtr Gtk.Callbacks.C_BuildableParserEndElementFieldCallback)
clearBuildableParserEndElement :: MonadIO m => BuildableParser -> m ()
clearBuildableParserEndElement :: forall (m :: * -> *). MonadIO m => BuildableParser -> m ()
clearBuildableParserEndElement BuildableParser
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ BuildableParser -> (Ptr BuildableParser -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BuildableParser
s ((Ptr BuildableParser -> IO ()) -> IO ())
-> (Ptr BuildableParser -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr BuildableParser
ptr -> do
Ptr (FunPtr C_BuildableParserEndElementFieldCallback)
-> FunPtr C_BuildableParserEndElementFieldCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr BuildableParser
ptr Ptr BuildableParser
-> Int -> Ptr (FunPtr C_BuildableParserEndElementFieldCallback)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) (FunPtr C_BuildableParserEndElementFieldCallback
forall a. FunPtr a
FP.nullFunPtr :: FunPtr Gtk.Callbacks.C_BuildableParserEndElementFieldCallback)
#if defined(ENABLE_OVERLOADING)
data BuildableParserEndElementFieldInfo
instance AttrInfo BuildableParserEndElementFieldInfo where
type AttrBaseTypeConstraint BuildableParserEndElementFieldInfo = (~) BuildableParser
type AttrAllowedOps BuildableParserEndElementFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint BuildableParserEndElementFieldInfo = (~) (FunPtr Gtk.Callbacks.C_BuildableParserEndElementFieldCallback)
type AttrTransferTypeConstraint BuildableParserEndElementFieldInfo = (~)(FunPtr Gtk.Callbacks.C_BuildableParserEndElementFieldCallback)
type AttrTransferType BuildableParserEndElementFieldInfo = (FunPtr Gtk.Callbacks.C_BuildableParserEndElementFieldCallback)
type AttrGetType BuildableParserEndElementFieldInfo = Maybe Gtk.Callbacks.BuildableParserEndElementFieldCallback_WithClosures
type AttrLabel BuildableParserEndElementFieldInfo = "end_element"
type AttrOrigin BuildableParserEndElementFieldInfo = BuildableParser
attrGet = getBuildableParserEndElement
attrSet = setBuildableParserEndElement
attrConstruct = undefined
attrClear = clearBuildableParserEndElement
attrTransfer _ v = do
return v
buildableParser_endElement :: AttrLabelProxy "endElement"
buildableParser_endElement = AttrLabelProxy
#endif
getBuildableParserText :: MonadIO m => BuildableParser -> m (Maybe Gtk.Callbacks.BuildableParserTextFieldCallback_WithClosures)
getBuildableParserText :: forall (m :: * -> *).
MonadIO m =>
BuildableParser
-> m (Maybe BuildableParserTextFieldCallback_WithClosures)
getBuildableParserText BuildableParser
s = IO (Maybe BuildableParserTextFieldCallback_WithClosures)
-> m (Maybe BuildableParserTextFieldCallback_WithClosures)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe BuildableParserTextFieldCallback_WithClosures)
-> m (Maybe BuildableParserTextFieldCallback_WithClosures))
-> IO (Maybe BuildableParserTextFieldCallback_WithClosures)
-> m (Maybe BuildableParserTextFieldCallback_WithClosures)
forall a b. (a -> b) -> a -> b
$ BuildableParser
-> (Ptr BuildableParser
-> IO (Maybe BuildableParserTextFieldCallback_WithClosures))
-> IO (Maybe BuildableParserTextFieldCallback_WithClosures)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BuildableParser
s ((Ptr BuildableParser
-> IO (Maybe BuildableParserTextFieldCallback_WithClosures))
-> IO (Maybe BuildableParserTextFieldCallback_WithClosures))
-> (Ptr BuildableParser
-> IO (Maybe BuildableParserTextFieldCallback_WithClosures))
-> IO (Maybe BuildableParserTextFieldCallback_WithClosures)
forall a b. (a -> b) -> a -> b
$ \Ptr BuildableParser
ptr -> do
FunPtr C_BuildableParserTextFieldCallback
val <- Ptr (FunPtr C_BuildableParserTextFieldCallback)
-> IO (FunPtr C_BuildableParserTextFieldCallback)
forall a. Storable a => Ptr a -> IO a
peek (Ptr BuildableParser
ptr Ptr BuildableParser
-> Int -> Ptr (FunPtr C_BuildableParserTextFieldCallback)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) :: IO (FunPtr Gtk.Callbacks.C_BuildableParserTextFieldCallback)
Maybe BuildableParserTextFieldCallback_WithClosures
result <- FunPtr C_BuildableParserTextFieldCallback
-> (FunPtr C_BuildableParserTextFieldCallback
-> IO BuildableParserTextFieldCallback_WithClosures)
-> IO (Maybe BuildableParserTextFieldCallback_WithClosures)
forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
SP.convertFunPtrIfNonNull FunPtr C_BuildableParserTextFieldCallback
val ((FunPtr C_BuildableParserTextFieldCallback
-> IO BuildableParserTextFieldCallback_WithClosures)
-> IO (Maybe BuildableParserTextFieldCallback_WithClosures))
-> (FunPtr C_BuildableParserTextFieldCallback
-> IO BuildableParserTextFieldCallback_WithClosures)
-> IO (Maybe BuildableParserTextFieldCallback_WithClosures)
forall a b. (a -> b) -> a -> b
$ \FunPtr C_BuildableParserTextFieldCallback
val' -> do
let val'' :: BuildableParserTextFieldCallback_WithClosures
val'' = FunPtr C_BuildableParserTextFieldCallback
-> BuildableParserTextFieldCallback_WithClosures
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_BuildableParserTextFieldCallback
-> BuildableParseContext -> Text -> Word64 -> Ptr () -> m ()
Gtk.Callbacks.dynamic_BuildableParserTextFieldCallback FunPtr C_BuildableParserTextFieldCallback
val'
BuildableParserTextFieldCallback_WithClosures
-> IO BuildableParserTextFieldCallback_WithClosures
forall (m :: * -> *) a. Monad m => a -> m a
return BuildableParserTextFieldCallback_WithClosures
val''
Maybe BuildableParserTextFieldCallback_WithClosures
-> IO (Maybe BuildableParserTextFieldCallback_WithClosures)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe BuildableParserTextFieldCallback_WithClosures
result
setBuildableParserText :: MonadIO m => BuildableParser -> FunPtr Gtk.Callbacks.C_BuildableParserTextFieldCallback -> m ()
setBuildableParserText :: forall (m :: * -> *).
MonadIO m =>
BuildableParser
-> FunPtr C_BuildableParserTextFieldCallback -> m ()
setBuildableParserText BuildableParser
s FunPtr C_BuildableParserTextFieldCallback
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ BuildableParser -> (Ptr BuildableParser -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BuildableParser
s ((Ptr BuildableParser -> IO ()) -> IO ())
-> (Ptr BuildableParser -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr BuildableParser
ptr -> do
Ptr (FunPtr C_BuildableParserTextFieldCallback)
-> FunPtr C_BuildableParserTextFieldCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr BuildableParser
ptr Ptr BuildableParser
-> Int -> Ptr (FunPtr C_BuildableParserTextFieldCallback)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) (FunPtr C_BuildableParserTextFieldCallback
val :: FunPtr Gtk.Callbacks.C_BuildableParserTextFieldCallback)
clearBuildableParserText :: MonadIO m => BuildableParser -> m ()
clearBuildableParserText :: forall (m :: * -> *). MonadIO m => BuildableParser -> m ()
clearBuildableParserText BuildableParser
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ BuildableParser -> (Ptr BuildableParser -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BuildableParser
s ((Ptr BuildableParser -> IO ()) -> IO ())
-> (Ptr BuildableParser -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr BuildableParser
ptr -> do
Ptr (FunPtr C_BuildableParserTextFieldCallback)
-> FunPtr C_BuildableParserTextFieldCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr BuildableParser
ptr Ptr BuildableParser
-> Int -> Ptr (FunPtr C_BuildableParserTextFieldCallback)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) (FunPtr C_BuildableParserTextFieldCallback
forall a. FunPtr a
FP.nullFunPtr :: FunPtr Gtk.Callbacks.C_BuildableParserTextFieldCallback)
#if defined(ENABLE_OVERLOADING)
data BuildableParserTextFieldInfo
instance AttrInfo BuildableParserTextFieldInfo where
type AttrBaseTypeConstraint BuildableParserTextFieldInfo = (~) BuildableParser
type AttrAllowedOps BuildableParserTextFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint BuildableParserTextFieldInfo = (~) (FunPtr Gtk.Callbacks.C_BuildableParserTextFieldCallback)
type AttrTransferTypeConstraint BuildableParserTextFieldInfo = (~)(FunPtr Gtk.Callbacks.C_BuildableParserTextFieldCallback)
type AttrTransferType BuildableParserTextFieldInfo = (FunPtr Gtk.Callbacks.C_BuildableParserTextFieldCallback)
type AttrGetType BuildableParserTextFieldInfo = Maybe Gtk.Callbacks.BuildableParserTextFieldCallback_WithClosures
type AttrLabel BuildableParserTextFieldInfo = "text"
type AttrOrigin BuildableParserTextFieldInfo = BuildableParser
attrGet = getBuildableParserText
attrSet = setBuildableParserText
attrConstruct = undefined
attrClear = clearBuildableParserText
attrTransfer _ v = do
return v
buildableParser_text :: AttrLabelProxy "text"
buildableParser_text = AttrLabelProxy
#endif
getBuildableParserError :: MonadIO m => BuildableParser -> m (Maybe Gtk.Callbacks.BuildableParserErrorFieldCallback_WithClosures)
getBuildableParserError :: forall (m :: * -> *).
MonadIO m =>
BuildableParser
-> m (Maybe BuildableParserErrorFieldCallback_WithClosures)
getBuildableParserError BuildableParser
s = IO (Maybe BuildableParserErrorFieldCallback_WithClosures)
-> m (Maybe BuildableParserErrorFieldCallback_WithClosures)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe BuildableParserErrorFieldCallback_WithClosures)
-> m (Maybe BuildableParserErrorFieldCallback_WithClosures))
-> IO (Maybe BuildableParserErrorFieldCallback_WithClosures)
-> m (Maybe BuildableParserErrorFieldCallback_WithClosures)
forall a b. (a -> b) -> a -> b
$ BuildableParser
-> (Ptr BuildableParser
-> IO (Maybe BuildableParserErrorFieldCallback_WithClosures))
-> IO (Maybe BuildableParserErrorFieldCallback_WithClosures)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BuildableParser
s ((Ptr BuildableParser
-> IO (Maybe BuildableParserErrorFieldCallback_WithClosures))
-> IO (Maybe BuildableParserErrorFieldCallback_WithClosures))
-> (Ptr BuildableParser
-> IO (Maybe BuildableParserErrorFieldCallback_WithClosures))
-> IO (Maybe BuildableParserErrorFieldCallback_WithClosures)
forall a b. (a -> b) -> a -> b
$ \Ptr BuildableParser
ptr -> do
FunPtr C_BuildableParserErrorFieldCallback
val <- Ptr (FunPtr C_BuildableParserErrorFieldCallback)
-> IO (FunPtr C_BuildableParserErrorFieldCallback)
forall a. Storable a => Ptr a -> IO a
peek (Ptr BuildableParser
ptr Ptr BuildableParser
-> Int -> Ptr (FunPtr C_BuildableParserErrorFieldCallback)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) :: IO (FunPtr Gtk.Callbacks.C_BuildableParserErrorFieldCallback)
Maybe BuildableParserErrorFieldCallback_WithClosures
result <- FunPtr C_BuildableParserErrorFieldCallback
-> (FunPtr C_BuildableParserErrorFieldCallback
-> IO BuildableParserErrorFieldCallback_WithClosures)
-> IO (Maybe BuildableParserErrorFieldCallback_WithClosures)
forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
SP.convertFunPtrIfNonNull FunPtr C_BuildableParserErrorFieldCallback
val ((FunPtr C_BuildableParserErrorFieldCallback
-> IO BuildableParserErrorFieldCallback_WithClosures)
-> IO (Maybe BuildableParserErrorFieldCallback_WithClosures))
-> (FunPtr C_BuildableParserErrorFieldCallback
-> IO BuildableParserErrorFieldCallback_WithClosures)
-> IO (Maybe BuildableParserErrorFieldCallback_WithClosures)
forall a b. (a -> b) -> a -> b
$ \FunPtr C_BuildableParserErrorFieldCallback
val' -> do
let val'' :: BuildableParserErrorFieldCallback_WithClosures
val'' = FunPtr C_BuildableParserErrorFieldCallback
-> BuildableParserErrorFieldCallback_WithClosures
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_BuildableParserErrorFieldCallback
-> BuildableParseContext -> GError -> Ptr () -> m ()
Gtk.Callbacks.dynamic_BuildableParserErrorFieldCallback FunPtr C_BuildableParserErrorFieldCallback
val'
BuildableParserErrorFieldCallback_WithClosures
-> IO BuildableParserErrorFieldCallback_WithClosures
forall (m :: * -> *) a. Monad m => a -> m a
return BuildableParserErrorFieldCallback_WithClosures
val''
Maybe BuildableParserErrorFieldCallback_WithClosures
-> IO (Maybe BuildableParserErrorFieldCallback_WithClosures)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe BuildableParserErrorFieldCallback_WithClosures
result
setBuildableParserError :: MonadIO m => BuildableParser -> FunPtr Gtk.Callbacks.C_BuildableParserErrorFieldCallback -> m ()
setBuildableParserError :: forall (m :: * -> *).
MonadIO m =>
BuildableParser
-> FunPtr C_BuildableParserErrorFieldCallback -> m ()
setBuildableParserError BuildableParser
s FunPtr C_BuildableParserErrorFieldCallback
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ BuildableParser -> (Ptr BuildableParser -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BuildableParser
s ((Ptr BuildableParser -> IO ()) -> IO ())
-> (Ptr BuildableParser -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr BuildableParser
ptr -> do
Ptr (FunPtr C_BuildableParserErrorFieldCallback)
-> FunPtr C_BuildableParserErrorFieldCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr BuildableParser
ptr Ptr BuildableParser
-> Int -> Ptr (FunPtr C_BuildableParserErrorFieldCallback)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) (FunPtr C_BuildableParserErrorFieldCallback
val :: FunPtr Gtk.Callbacks.C_BuildableParserErrorFieldCallback)
clearBuildableParserError :: MonadIO m => BuildableParser -> m ()
clearBuildableParserError :: forall (m :: * -> *). MonadIO m => BuildableParser -> m ()
clearBuildableParserError BuildableParser
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ BuildableParser -> (Ptr BuildableParser -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BuildableParser
s ((Ptr BuildableParser -> IO ()) -> IO ())
-> (Ptr BuildableParser -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr BuildableParser
ptr -> do
Ptr (FunPtr C_BuildableParserErrorFieldCallback)
-> FunPtr C_BuildableParserErrorFieldCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr BuildableParser
ptr Ptr BuildableParser
-> Int -> Ptr (FunPtr C_BuildableParserErrorFieldCallback)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) (FunPtr C_BuildableParserErrorFieldCallback
forall a. FunPtr a
FP.nullFunPtr :: FunPtr Gtk.Callbacks.C_BuildableParserErrorFieldCallback)
#if defined(ENABLE_OVERLOADING)
data BuildableParserErrorFieldInfo
instance AttrInfo BuildableParserErrorFieldInfo where
type AttrBaseTypeConstraint BuildableParserErrorFieldInfo = (~) BuildableParser
type AttrAllowedOps BuildableParserErrorFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint BuildableParserErrorFieldInfo = (~) (FunPtr Gtk.Callbacks.C_BuildableParserErrorFieldCallback)
type AttrTransferTypeConstraint BuildableParserErrorFieldInfo = (~)Gtk.Callbacks.BuildableParserErrorFieldCallback_WithClosures
type AttrTransferType BuildableParserErrorFieldInfo = (FunPtr Gtk.Callbacks.C_BuildableParserErrorFieldCallback)
type AttrGetType BuildableParserErrorFieldInfo = Maybe Gtk.Callbacks.BuildableParserErrorFieldCallback_WithClosures
type AttrLabel BuildableParserErrorFieldInfo = "error"
type AttrOrigin BuildableParserErrorFieldInfo = BuildableParser
attrGet = getBuildableParserError
attrSet = setBuildableParserError
attrConstruct = undefined
attrClear = clearBuildableParserError
attrTransfer _ v = do
Gtk.Callbacks.mk_BuildableParserErrorFieldCallback (Gtk.Callbacks.wrap_BuildableParserErrorFieldCallback Nothing v)
buildableParser_error :: AttrLabelProxy "error"
buildableParser_error = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList BuildableParser
type instance O.AttributeList BuildableParser = BuildableParserAttributeList
type BuildableParserAttributeList = ('[ '("startElement", BuildableParserStartElementFieldInfo), '("endElement", BuildableParserEndElementFieldInfo), '("text", BuildableParserTextFieldInfo), '("error", BuildableParserErrorFieldInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveBuildableParserMethod (t :: Symbol) (o :: *) :: * where
ResolveBuildableParserMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveBuildableParserMethod t BuildableParser, O.OverloadedMethod info BuildableParser p) => OL.IsLabel t (BuildableParser -> 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 ~ ResolveBuildableParserMethod t BuildableParser, O.OverloadedMethod info BuildableParser p, R.HasField t BuildableParser p) => R.HasField t BuildableParser p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveBuildableParserMethod t BuildableParser, O.OverloadedMethodInfo info BuildableParser) => OL.IsLabel t (O.MethodProxy info BuildableParser) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif