gi-ibus-1.5.7: IBus bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.IBus.Structs.XML

Description

IBusXML lists data structure and handling function for XML in IBus.

Synopsis

Exported types

newtype XML Source #

Memory-managed wrapper type.

Constructors

XML (ManagedPtr XML) 

Instances

Instances details
Eq XML Source # 
Instance details

Defined in GI.IBus.Structs.XML

Methods

(==) :: XML -> XML -> Bool #

(/=) :: XML -> XML -> Bool #

GBoxed XML Source # 
Instance details

Defined in GI.IBus.Structs.XML

ManagedPtrNewtype XML Source # 
Instance details

Defined in GI.IBus.Structs.XML

Methods

toManagedPtr :: XML -> ManagedPtr XML

TypedObject XML Source # 
Instance details

Defined in GI.IBus.Structs.XML

Methods

glibType :: IO GType

HasParentTypes XML Source # 
Instance details

Defined in GI.IBus.Structs.XML

tag ~ 'AttrSet => Constructible XML tag Source # 
Instance details

Defined in GI.IBus.Structs.XML

Methods

new :: MonadIO m => (ManagedPtr XML -> XML) -> [AttrOp XML tag] -> m XML

IsGValue (Maybe XML) Source #

Convert XML to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.IBus.Structs.XML

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe XML -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe XML)

type ParentTypes XML Source # 
Instance details

Defined in GI.IBus.Structs.XML

type ParentTypes XML = '[] :: [Type]

newZeroXML :: MonadIO m => m XML Source #

Construct a XML struct initialized to zero.

Methods

Click to display all available methods, including inherited ones

Expand

Methods

copy, free, output.

Getters

None.

Setters

None.

copy

xMLCopy Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> XML

node: Root node of an XML tree.

-> m XML

Returns: the newly allocated XML, which should be freed with xMLFree, or Nothing if node was Nothing.

Creates a copy of node, which should be freed with xMLFree. Primarily used by language bindings, not that useful otherwise (since node can just be copied by assignment in C).

free

xMLFree Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> XML

node: Root node of an XML tree.

-> m () 

Free an XML tree.

output

xMLOutput Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> XML

node: Root node of an XML tree.

-> String

output: GString which stores the output.

-> m () 

Output an XML tree to a GString.

parseBuffer

xMLParseBuffer Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

buffer: Buffer to be parsed.

-> m XML

Returns: Root node of parsed XML tree.

Parse a string buffer which contains an XML-formatted string, and return a corresponding XML tree.

parseFile

xMLParseFile Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: File name to be parsed.

-> m XML

Returns: Root node of parsed XML tree.

Parse an XML file and return a corresponding XML tree.

Properties

attributes

Attributes of the XML node.

clearXMLAttributes :: MonadIO m => XML -> m () Source #

Set the value of the “attributes” field to Nothing. When overloading is enabled, this is equivalent to

clear #attributes

getXMLAttributes :: MonadIO m => XML -> m (Maybe Text) Source #

Get the value of the “attributes” field. When overloading is enabled, this is equivalent to

get xML #attributes

setXMLAttributes :: MonadIO m => XML -> CString -> m () Source #

Set the value of the “attributes” field. When overloading is enabled, this is equivalent to

set xML [ #attributes := value ]

name

Name of XML tag.

clearXMLName :: MonadIO m => XML -> m () Source #

Set the value of the “name” field to Nothing. When overloading is enabled, this is equivalent to

clear #name

getXMLName :: MonadIO m => XML -> m (Maybe Text) Source #

Get the value of the “name” field. When overloading is enabled, this is equivalent to

get xML #name

setXMLName :: MonadIO m => XML -> CString -> m () Source #

Set the value of the “name” field. When overloading is enabled, this is equivalent to

set xML [ #name := value ]

subNodes

Children node of this XML node.

clearXMLSubNodes :: MonadIO m => XML -> m () Source #

Set the value of the “sub_nodes” field to Nothing. When overloading is enabled, this is equivalent to

clear #subNodes

getXMLSubNodes :: MonadIO m => XML -> m [Ptr ()] Source #

Get the value of the “sub_nodes” field. When overloading is enabled, this is equivalent to

get xML #subNodes

setXMLSubNodes :: MonadIO m => XML -> Ptr (GList (Ptr ())) -> m () Source #

Set the value of the “sub_nodes” field. When overloading is enabled, this is equivalent to

set xML [ #subNodes := value ]

text

Text enclosed by XML start tag and end tag. i.e. <tag>text</tag>.

clearXMLText :: MonadIO m => XML -> m () Source #

Set the value of the “text” field to Nothing. When overloading is enabled, this is equivalent to

clear #text

getXMLText :: MonadIO m => XML -> m (Maybe Text) Source #

Get the value of the “text” field. When overloading is enabled, this is equivalent to

get xML #text

setXMLText :: MonadIO m => XML -> CString -> m () Source #

Set the value of the “text” field. When overloading is enabled, this is equivalent to

set xML [ #text := value ]