Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
IBusXML lists data structure and handling function for XML in IBus.
Synopsis
- newtype XML = XML (ManagedPtr XML)
- newZeroXML :: MonadIO m => m XML
- xMLCopy :: (HasCallStack, MonadIO m) => XML -> m XML
- xMLFree :: (HasCallStack, MonadIO m) => XML -> m ()
- xMLOutput :: (HasCallStack, MonadIO m) => XML -> String -> m ()
- xMLParseBuffer :: (HasCallStack, MonadIO m) => Text -> m XML
- xMLParseFile :: (HasCallStack, MonadIO m) => Text -> m XML
- clearXMLAttributes :: MonadIO m => XML -> m ()
- getXMLAttributes :: MonadIO m => XML -> m (Maybe Text)
- setXMLAttributes :: MonadIO m => XML -> CString -> m ()
- clearXMLName :: MonadIO m => XML -> m ()
- getXMLName :: MonadIO m => XML -> m (Maybe Text)
- setXMLName :: MonadIO m => XML -> CString -> m ()
- clearXMLSubNodes :: MonadIO m => XML -> m ()
- getXMLSubNodes :: MonadIO m => XML -> m [Ptr ()]
- setXMLSubNodes :: MonadIO m => XML -> Ptr (GList (Ptr ())) -> m ()
- clearXMLText :: MonadIO m => XML -> m ()
- getXMLText :: MonadIO m => XML -> m (Maybe Text)
- setXMLText :: MonadIO m => XML -> CString -> m ()
Exported types
Memory-managed wrapper type.
Instances
Eq XML Source # | |
GBoxed XML Source # | |
Defined in GI.IBus.Structs.XML | |
ManagedPtrNewtype XML Source # | |
Defined in GI.IBus.Structs.XML toManagedPtr :: XML -> ManagedPtr XML | |
TypedObject XML Source # | |
Defined in GI.IBus.Structs.XML | |
HasParentTypes XML Source # | |
Defined in GI.IBus.Structs.XML | |
tag ~ 'AttrSet => Constructible XML tag Source # | |
IsGValue (Maybe XML) Source # | Convert |
Defined in GI.IBus.Structs.XML gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe XML -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe XML) | |
type ParentTypes XML Source # | |
Defined in GI.IBus.Structs.XML |
Methods
Click to display all available methods, including inherited ones
copy
:: (HasCallStack, MonadIO m) | |
=> XML |
|
-> m XML | Returns: the newly allocated |
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
:: (HasCallStack, MonadIO m) | |
=> XML |
|
-> m () |
Free an XML tree.
output
:: (HasCallStack, MonadIO m) | |
=> XML |
|
-> String |
|
-> m () |
Output an XML tree to a GString.
parseBuffer
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> 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
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> 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 ]