{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Atk.Interfaces.Document
(
Document(..) ,
noDocument ,
IsDocument ,
toDocument ,
#if defined(ENABLE_OVERLOADING)
ResolveDocumentMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
DocumentGetAttributeValueMethodInfo ,
#endif
documentGetAttributeValue ,
#if defined(ENABLE_OVERLOADING)
DocumentGetAttributesMethodInfo ,
#endif
documentGetAttributes ,
#if defined(ENABLE_OVERLOADING)
DocumentGetCurrentPageNumberMethodInfo ,
#endif
documentGetCurrentPageNumber ,
#if defined(ENABLE_OVERLOADING)
DocumentGetDocumentMethodInfo ,
#endif
documentGetDocument ,
#if defined(ENABLE_OVERLOADING)
DocumentGetDocumentTypeMethodInfo ,
#endif
documentGetDocumentType ,
#if defined(ENABLE_OVERLOADING)
DocumentGetLocaleMethodInfo ,
#endif
documentGetLocale ,
#if defined(ENABLE_OVERLOADING)
DocumentGetPageCountMethodInfo ,
#endif
documentGetPageCount ,
#if defined(ENABLE_OVERLOADING)
DocumentSetAttributeValueMethodInfo ,
#endif
documentSetAttributeValue ,
C_DocumentLoadCompleteCallback ,
DocumentLoadCompleteCallback ,
#if defined(ENABLE_OVERLOADING)
DocumentLoadCompleteSignalInfo ,
#endif
afterDocumentLoadComplete ,
genClosure_DocumentLoadComplete ,
mk_DocumentLoadCompleteCallback ,
noDocumentLoadCompleteCallback ,
onDocumentLoadComplete ,
wrap_DocumentLoadCompleteCallback ,
C_DocumentLoadStoppedCallback ,
DocumentLoadStoppedCallback ,
#if defined(ENABLE_OVERLOADING)
DocumentLoadStoppedSignalInfo ,
#endif
afterDocumentLoadStopped ,
genClosure_DocumentLoadStopped ,
mk_DocumentLoadStoppedCallback ,
noDocumentLoadStoppedCallback ,
onDocumentLoadStopped ,
wrap_DocumentLoadStoppedCallback ,
C_DocumentPageChangedCallback ,
DocumentPageChangedCallback ,
#if defined(ENABLE_OVERLOADING)
DocumentPageChangedSignalInfo ,
#endif
afterDocumentPageChanged ,
genClosure_DocumentPageChanged ,
mk_DocumentPageChangedCallback ,
noDocumentPageChangedCallback ,
onDocumentPageChanged ,
wrap_DocumentPageChangedCallback ,
C_DocumentReloadCallback ,
DocumentReloadCallback ,
#if defined(ENABLE_OVERLOADING)
DocumentReloadSignalInfo ,
#endif
afterDocumentReload ,
genClosure_DocumentReload ,
mk_DocumentReloadCallback ,
noDocumentReloadCallback ,
onDocumentReload ,
wrap_DocumentReloadCallback ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.GObject.Objects.Object as GObject.Object
newtype Document = Document (ManagedPtr Document)
deriving (Eq)
noDocument :: Maybe Document
noDocument = Nothing
type DocumentLoadCompleteCallback =
IO ()
noDocumentLoadCompleteCallback :: Maybe DocumentLoadCompleteCallback
noDocumentLoadCompleteCallback = Nothing
type C_DocumentLoadCompleteCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_DocumentLoadCompleteCallback :: C_DocumentLoadCompleteCallback -> IO (FunPtr C_DocumentLoadCompleteCallback)
genClosure_DocumentLoadComplete :: MonadIO m => DocumentLoadCompleteCallback -> m (GClosure C_DocumentLoadCompleteCallback)
genClosure_DocumentLoadComplete cb = liftIO $ do
let cb' = wrap_DocumentLoadCompleteCallback cb
mk_DocumentLoadCompleteCallback cb' >>= B.GClosure.newGClosure
wrap_DocumentLoadCompleteCallback ::
DocumentLoadCompleteCallback ->
C_DocumentLoadCompleteCallback
wrap_DocumentLoadCompleteCallback _cb _ _ = do
_cb
onDocumentLoadComplete :: (IsDocument a, MonadIO m) => a -> DocumentLoadCompleteCallback -> m SignalHandlerId
onDocumentLoadComplete obj cb = liftIO $ do
let cb' = wrap_DocumentLoadCompleteCallback cb
cb'' <- mk_DocumentLoadCompleteCallback cb'
connectSignalFunPtr obj "load-complete" cb'' SignalConnectBefore Nothing
afterDocumentLoadComplete :: (IsDocument a, MonadIO m) => a -> DocumentLoadCompleteCallback -> m SignalHandlerId
afterDocumentLoadComplete obj cb = liftIO $ do
let cb' = wrap_DocumentLoadCompleteCallback cb
cb'' <- mk_DocumentLoadCompleteCallback cb'
connectSignalFunPtr obj "load-complete" cb'' SignalConnectAfter Nothing
#if defined(ENABLE_OVERLOADING)
data DocumentLoadCompleteSignalInfo
instance SignalInfo DocumentLoadCompleteSignalInfo where
type HaskellCallbackType DocumentLoadCompleteSignalInfo = DocumentLoadCompleteCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_DocumentLoadCompleteCallback cb
cb'' <- mk_DocumentLoadCompleteCallback cb'
connectSignalFunPtr obj "load-complete" cb'' connectMode detail
#endif
type DocumentLoadStoppedCallback =
IO ()
noDocumentLoadStoppedCallback :: Maybe DocumentLoadStoppedCallback
noDocumentLoadStoppedCallback = Nothing
type C_DocumentLoadStoppedCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_DocumentLoadStoppedCallback :: C_DocumentLoadStoppedCallback -> IO (FunPtr C_DocumentLoadStoppedCallback)
genClosure_DocumentLoadStopped :: MonadIO m => DocumentLoadStoppedCallback -> m (GClosure C_DocumentLoadStoppedCallback)
genClosure_DocumentLoadStopped cb = liftIO $ do
let cb' = wrap_DocumentLoadStoppedCallback cb
mk_DocumentLoadStoppedCallback cb' >>= B.GClosure.newGClosure
wrap_DocumentLoadStoppedCallback ::
DocumentLoadStoppedCallback ->
C_DocumentLoadStoppedCallback
wrap_DocumentLoadStoppedCallback _cb _ _ = do
_cb
onDocumentLoadStopped :: (IsDocument a, MonadIO m) => a -> DocumentLoadStoppedCallback -> m SignalHandlerId
onDocumentLoadStopped obj cb = liftIO $ do
let cb' = wrap_DocumentLoadStoppedCallback cb
cb'' <- mk_DocumentLoadStoppedCallback cb'
connectSignalFunPtr obj "load-stopped" cb'' SignalConnectBefore Nothing
afterDocumentLoadStopped :: (IsDocument a, MonadIO m) => a -> DocumentLoadStoppedCallback -> m SignalHandlerId
afterDocumentLoadStopped obj cb = liftIO $ do
let cb' = wrap_DocumentLoadStoppedCallback cb
cb'' <- mk_DocumentLoadStoppedCallback cb'
connectSignalFunPtr obj "load-stopped" cb'' SignalConnectAfter Nothing
#if defined(ENABLE_OVERLOADING)
data DocumentLoadStoppedSignalInfo
instance SignalInfo DocumentLoadStoppedSignalInfo where
type HaskellCallbackType DocumentLoadStoppedSignalInfo = DocumentLoadStoppedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_DocumentLoadStoppedCallback cb
cb'' <- mk_DocumentLoadStoppedCallback cb'
connectSignalFunPtr obj "load-stopped" cb'' connectMode detail
#endif
type DocumentPageChangedCallback =
Int32
-> IO ()
noDocumentPageChangedCallback :: Maybe DocumentPageChangedCallback
noDocumentPageChangedCallback = Nothing
type C_DocumentPageChangedCallback =
Ptr () ->
Int32 ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_DocumentPageChangedCallback :: C_DocumentPageChangedCallback -> IO (FunPtr C_DocumentPageChangedCallback)
genClosure_DocumentPageChanged :: MonadIO m => DocumentPageChangedCallback -> m (GClosure C_DocumentPageChangedCallback)
genClosure_DocumentPageChanged cb = liftIO $ do
let cb' = wrap_DocumentPageChangedCallback cb
mk_DocumentPageChangedCallback cb' >>= B.GClosure.newGClosure
wrap_DocumentPageChangedCallback ::
DocumentPageChangedCallback ->
C_DocumentPageChangedCallback
wrap_DocumentPageChangedCallback _cb _ pageNumber _ = do
_cb pageNumber
onDocumentPageChanged :: (IsDocument a, MonadIO m) => a -> DocumentPageChangedCallback -> m SignalHandlerId
onDocumentPageChanged obj cb = liftIO $ do
let cb' = wrap_DocumentPageChangedCallback cb
cb'' <- mk_DocumentPageChangedCallback cb'
connectSignalFunPtr obj "page-changed" cb'' SignalConnectBefore Nothing
afterDocumentPageChanged :: (IsDocument a, MonadIO m) => a -> DocumentPageChangedCallback -> m SignalHandlerId
afterDocumentPageChanged obj cb = liftIO $ do
let cb' = wrap_DocumentPageChangedCallback cb
cb'' <- mk_DocumentPageChangedCallback cb'
connectSignalFunPtr obj "page-changed" cb'' SignalConnectAfter Nothing
#if defined(ENABLE_OVERLOADING)
data DocumentPageChangedSignalInfo
instance SignalInfo DocumentPageChangedSignalInfo where
type HaskellCallbackType DocumentPageChangedSignalInfo = DocumentPageChangedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_DocumentPageChangedCallback cb
cb'' <- mk_DocumentPageChangedCallback cb'
connectSignalFunPtr obj "page-changed" cb'' connectMode detail
#endif
type DocumentReloadCallback =
IO ()
noDocumentReloadCallback :: Maybe DocumentReloadCallback
noDocumentReloadCallback = Nothing
type C_DocumentReloadCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_DocumentReloadCallback :: C_DocumentReloadCallback -> IO (FunPtr C_DocumentReloadCallback)
genClosure_DocumentReload :: MonadIO m => DocumentReloadCallback -> m (GClosure C_DocumentReloadCallback)
genClosure_DocumentReload cb = liftIO $ do
let cb' = wrap_DocumentReloadCallback cb
mk_DocumentReloadCallback cb' >>= B.GClosure.newGClosure
wrap_DocumentReloadCallback ::
DocumentReloadCallback ->
C_DocumentReloadCallback
wrap_DocumentReloadCallback _cb _ _ = do
_cb
onDocumentReload :: (IsDocument a, MonadIO m) => a -> DocumentReloadCallback -> m SignalHandlerId
onDocumentReload obj cb = liftIO $ do
let cb' = wrap_DocumentReloadCallback cb
cb'' <- mk_DocumentReloadCallback cb'
connectSignalFunPtr obj "reload" cb'' SignalConnectBefore Nothing
afterDocumentReload :: (IsDocument a, MonadIO m) => a -> DocumentReloadCallback -> m SignalHandlerId
afterDocumentReload obj cb = liftIO $ do
let cb' = wrap_DocumentReloadCallback cb
cb'' <- mk_DocumentReloadCallback cb'
connectSignalFunPtr obj "reload" cb'' SignalConnectAfter Nothing
#if defined(ENABLE_OVERLOADING)
data DocumentReloadSignalInfo
instance SignalInfo DocumentReloadSignalInfo where
type HaskellCallbackType DocumentReloadSignalInfo = DocumentReloadCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_DocumentReloadCallback cb
cb'' <- mk_DocumentReloadCallback cb'
connectSignalFunPtr obj "reload" cb'' connectMode detail
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Document = DocumentSignalList
type DocumentSignalList = ('[ '("loadComplete", DocumentLoadCompleteSignalInfo), '("loadStopped", DocumentLoadStoppedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("pageChanged", DocumentPageChangedSignalInfo), '("reload", DocumentReloadSignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "atk_document_get_type"
c_atk_document_get_type :: IO GType
instance GObject Document where
gobjectType = c_atk_document_get_type
instance B.GValue.IsGValue Document where
toGValue o = do
gtype <- c_atk_document_get_type
B.ManagedPtr.withManagedPtr o (B.GValue.buildGValue gtype B.GValue.set_object)
fromGValue gv = do
ptr <- B.GValue.get_object gv :: IO (Ptr Document)
B.ManagedPtr.newObject Document ptr
class (GObject o, O.IsDescendantOf Document o) => IsDocument o
instance (GObject o, O.IsDescendantOf Document o) => IsDocument o
instance O.HasParentTypes Document
type instance O.ParentTypes Document = '[GObject.Object.Object]
toDocument :: (MonadIO m, IsDocument o) => o -> m Document
toDocument = liftIO . unsafeCastTo Document
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Document
type instance O.AttributeList Document = DocumentAttributeList
type DocumentAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveDocumentMethod (t :: Symbol) (o :: *) :: * where
ResolveDocumentMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveDocumentMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveDocumentMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveDocumentMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveDocumentMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveDocumentMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveDocumentMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveDocumentMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveDocumentMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveDocumentMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveDocumentMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveDocumentMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveDocumentMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveDocumentMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveDocumentMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveDocumentMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveDocumentMethod "getAttributeValue" o = DocumentGetAttributeValueMethodInfo
ResolveDocumentMethod "getAttributes" o = DocumentGetAttributesMethodInfo
ResolveDocumentMethod "getCurrentPageNumber" o = DocumentGetCurrentPageNumberMethodInfo
ResolveDocumentMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveDocumentMethod "getDocument" o = DocumentGetDocumentMethodInfo
ResolveDocumentMethod "getDocumentType" o = DocumentGetDocumentTypeMethodInfo
ResolveDocumentMethod "getLocale" o = DocumentGetLocaleMethodInfo
ResolveDocumentMethod "getPageCount" o = DocumentGetPageCountMethodInfo
ResolveDocumentMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveDocumentMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveDocumentMethod "setAttributeValue" o = DocumentSetAttributeValueMethodInfo
ResolveDocumentMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveDocumentMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveDocumentMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveDocumentMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDocumentMethod t Document, O.MethodInfo info Document p) => OL.IsLabel t (Document -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
foreign import ccall "atk_document_get_attribute_value" atk_document_get_attribute_value ::
Ptr Document ->
CString ->
IO CString
documentGetAttributeValue ::
(B.CallStack.HasCallStack, MonadIO m, IsDocument a) =>
a
-> T.Text
-> m (Maybe T.Text)
documentGetAttributeValue document attributeName = liftIO $ do
document' <- unsafeManagedPtrCastPtr document
attributeName' <- textToCString attributeName
result <- atk_document_get_attribute_value document' attributeName'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- cstringToText result'
return result''
touchManagedPtr document
freeMem attributeName'
return maybeResult
#if defined(ENABLE_OVERLOADING)
data DocumentGetAttributeValueMethodInfo
instance (signature ~ (T.Text -> m (Maybe T.Text)), MonadIO m, IsDocument a) => O.MethodInfo DocumentGetAttributeValueMethodInfo a signature where
overloadedMethod = documentGetAttributeValue
#endif
foreign import ccall "atk_document_get_attributes" atk_document_get_attributes ::
Ptr Document ->
IO (Ptr (GSList (Ptr ())))
documentGetAttributes ::
(B.CallStack.HasCallStack, MonadIO m, IsDocument a) =>
a
-> m ([Ptr ()])
documentGetAttributes document = liftIO $ do
document' <- unsafeManagedPtrCastPtr document
result <- atk_document_get_attributes document'
result' <- unpackGSList result
touchManagedPtr document
return result'
#if defined(ENABLE_OVERLOADING)
data DocumentGetAttributesMethodInfo
instance (signature ~ (m ([Ptr ()])), MonadIO m, IsDocument a) => O.MethodInfo DocumentGetAttributesMethodInfo a signature where
overloadedMethod = documentGetAttributes
#endif
foreign import ccall "atk_document_get_current_page_number" atk_document_get_current_page_number ::
Ptr Document ->
IO Int32
documentGetCurrentPageNumber ::
(B.CallStack.HasCallStack, MonadIO m, IsDocument a) =>
a
-> m Int32
documentGetCurrentPageNumber document = liftIO $ do
document' <- unsafeManagedPtrCastPtr document
result <- atk_document_get_current_page_number document'
touchManagedPtr document
return result
#if defined(ENABLE_OVERLOADING)
data DocumentGetCurrentPageNumberMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsDocument a) => O.MethodInfo DocumentGetCurrentPageNumberMethodInfo a signature where
overloadedMethod = documentGetCurrentPageNumber
#endif
foreign import ccall "atk_document_get_document" atk_document_get_document ::
Ptr Document ->
IO (Ptr ())
{-# DEPRECATED documentGetDocument ["Since 2.12. /@document@/ is already a representation of","the document. Use it directly, or one of its children, as an","instance of the DOM."] #-}
documentGetDocument ::
(B.CallStack.HasCallStack, MonadIO m, IsDocument a) =>
a
-> m (Ptr ())
documentGetDocument document = liftIO $ do
document' <- unsafeManagedPtrCastPtr document
result <- atk_document_get_document document'
touchManagedPtr document
return result
#if defined(ENABLE_OVERLOADING)
data DocumentGetDocumentMethodInfo
instance (signature ~ (m (Ptr ())), MonadIO m, IsDocument a) => O.MethodInfo DocumentGetDocumentMethodInfo a signature where
overloadedMethod = documentGetDocument
#endif
foreign import ccall "atk_document_get_document_type" atk_document_get_document_type ::
Ptr Document ->
IO CString
{-# DEPRECATED documentGetDocumentType ["Since 2.12. Please use 'GI.Atk.Interfaces.Document.documentGetAttributes' to","ask for the document type if it applies."] #-}
documentGetDocumentType ::
(B.CallStack.HasCallStack, MonadIO m, IsDocument a) =>
a
-> m T.Text
documentGetDocumentType document = liftIO $ do
document' <- unsafeManagedPtrCastPtr document
result <- atk_document_get_document_type document'
checkUnexpectedReturnNULL "documentGetDocumentType" result
result' <- cstringToText result
touchManagedPtr document
return result'
#if defined(ENABLE_OVERLOADING)
data DocumentGetDocumentTypeMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDocument a) => O.MethodInfo DocumentGetDocumentTypeMethodInfo a signature where
overloadedMethod = documentGetDocumentType
#endif
foreign import ccall "atk_document_get_locale" atk_document_get_locale ::
Ptr Document ->
IO CString
{-# DEPRECATED documentGetLocale ["(Since version 2.7.90)","Please use 'GI.Atk.Objects.Object.objectGetObjectLocale' instead."] #-}
documentGetLocale ::
(B.CallStack.HasCallStack, MonadIO m, IsDocument a) =>
a
-> m T.Text
documentGetLocale document = liftIO $ do
document' <- unsafeManagedPtrCastPtr document
result <- atk_document_get_locale document'
checkUnexpectedReturnNULL "documentGetLocale" result
result' <- cstringToText result
touchManagedPtr document
return result'
#if defined(ENABLE_OVERLOADING)
data DocumentGetLocaleMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDocument a) => O.MethodInfo DocumentGetLocaleMethodInfo a signature where
overloadedMethod = documentGetLocale
#endif
foreign import ccall "atk_document_get_page_count" atk_document_get_page_count ::
Ptr Document ->
IO Int32
documentGetPageCount ::
(B.CallStack.HasCallStack, MonadIO m, IsDocument a) =>
a
-> m Int32
documentGetPageCount document = liftIO $ do
document' <- unsafeManagedPtrCastPtr document
result <- atk_document_get_page_count document'
touchManagedPtr document
return result
#if defined(ENABLE_OVERLOADING)
data DocumentGetPageCountMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsDocument a) => O.MethodInfo DocumentGetPageCountMethodInfo a signature where
overloadedMethod = documentGetPageCount
#endif
foreign import ccall "atk_document_set_attribute_value" atk_document_set_attribute_value ::
Ptr Document ->
CString ->
CString ->
IO CInt
documentSetAttributeValue ::
(B.CallStack.HasCallStack, MonadIO m, IsDocument a) =>
a
-> T.Text
-> T.Text
-> m Bool
documentSetAttributeValue document attributeName attributeValue = liftIO $ do
document' <- unsafeManagedPtrCastPtr document
attributeName' <- textToCString attributeName
attributeValue' <- textToCString attributeValue
result <- atk_document_set_attribute_value document' attributeName' attributeValue'
let result' = (/= 0) result
touchManagedPtr document
freeMem attributeName'
freeMem attributeValue'
return result'
#if defined(ENABLE_OVERLOADING)
data DocumentSetAttributeValueMethodInfo
instance (signature ~ (T.Text -> T.Text -> m Bool), MonadIO m, IsDocument a) => O.MethodInfo DocumentSetAttributeValueMethodInfo a signature where
overloadedMethod = documentSetAttributeValue
#endif