Gdome2 Reference Manual
<<< Previous Page | Home | Up | Next Page >>>

# GdomeText

## Name

GdomeText -- Interface Text implementation

## Synopsis

    struct      GdomeText;
    GdomeText*  gdome_t_splitText               (GdomeText *self,
                                                 gulong offset,
                                                 GdomeException *exc);
    GdomeDOMString* gdome_t_data                (GdomeText *self,
                                                 GdomeException *exc);
    void        gdome_t_set_data                (GdomeText *self,
                                                 GdomeDOMString *data,
                                                 GdomeException *exc);
    gulong      gdome_t_length                  (GdomeText *self,
                                                 GdomeException *exc);
    GdomeDOMString* gdome_t_substringData       (GdomeText *self,
                                                 gulong offset,
                                                 gulong count,
                                                 GdomeException *exc);
    void        gdome_t_appendData              (GdomeText *self,
                                                 GdomeDOMString *arg,
                                                 GdomeException *exc);
    void        gdome_t_insertData              (GdomeText *self,
                                                 gulong offset,
                                                 GdomeDOMString *arg,
                                                 GdomeException *exc);
    void        gdome_t_deleteData              (GdomeText *self,
                                                 gulong offset,
                                                 gulong count,
                                                 GdomeException *exc);
    void        gdome_t_replaceData             (GdomeText *self,
                                                 gulong offset,
                                                 gulong count,
                                                 GdomeDOMString *arg,
                                                 GdomeException *exc);
    void        gdome_t_ref                     (GdomeText *self,
                                                 GdomeException *exc);
    void        gdome_t_unref                   (GdomeText *self,
                                                 GdomeException *exc);
    gpointer    gdome_t_query_interface         (GdomeText *self,
                                                 const char *interface,
                                                 GdomeException *exc);
    GdomeDOMString* gdome_t_nodeName            (GdomeText *self,
                                                 GdomeException *exc);
    GdomeDOMString* gdome_t_nodeValue           (GdomeText *self,
                                                 GdomeException *exc);
    void        gdome_t_set_nodeValue           (GdomeText *self,
                                                 GdomeDOMString *nodeValue,
                                                 GdomeException *exc);
    unsigned short gdome_t_nodeType             (GdomeText *self,
                                                 GdomeException *exc);
    GdomeNode*  gdome_t_parentNode              (GdomeText *self,
                                                 GdomeException *exc);
    GdomeNodeList* gdome_t_childNodes           (GdomeText *self,
                                                 GdomeException *exc);
    GdomeNode*  gdome_t_firstChild              (GdomeText *self,
                                                 GdomeException *exc);
    GdomeNode*  gdome_t_lastChild               (GdomeText *self,
                                                 GdomeException *exc);
    GdomeNode*  gdome_t_previousSibling         (GdomeText *self,
                                                 GdomeException *exc);
    GdomeNode*  gdome_t_nextSibling             (GdomeText *self,
                                                 GdomeException *exc);
    GdomeNamedNodeMap* gdome_t_attributes       (GdomeText *self,
                                                 GdomeException *exc);
    GdomeDocument* gdome_t_ownerDocument        (GdomeText *self,
                                                 GdomeException *exc);
    GdomeNode*  gdome_t_insertBefore            (GdomeText *self,
                                                 GdomeNode *newChild,
                                                 GdomeNode *refChild,
                                                 GdomeException *exc);
    GdomeNode*  gdome_t_replaceChild            (GdomeText *self,
                                                 GdomeNode *newChild,
                                                 GdomeNode *oldChild,
                                                 GdomeException *exc);
    GdomeNode*  gdome_t_removeChild             (GdomeText *self,
                                                 GdomeNode *oldChild,
                                                 GdomeException *exc);
    GdomeNode*  gdome_t_appendChild             (GdomeText *self,
                                                 GdomeNode *newChild,
                                                 GdomeException *exc);
    GdomeBoolean gdome_t_hasChildNodes          (GdomeText *self,
                                                 GdomeException *exc);
    GdomeNode*  gdome_t_cloneNode               (GdomeText *self,
                                                 GdomeBoolean deep,
                                                 GdomeException *exc);
    void        gdome_t_normalize               (GdomeText *self,
                                                 GdomeException *exc);
    GdomeBoolean gdome_t_isSupported            (GdomeText *self,
                                                 GdomeDOMString *feature,
                                                 GdomeDOMString *version,
                                                 GdomeException *exc);
    GdomeDOMString* gdome_t_namespaceURI        (GdomeText *self,
                                                 GdomeException *exc);
    GdomeDOMString* gdome_t_prefix              (GdomeText *self,
                                                 GdomeException *exc);
    void        gdome_t_set_prefix              (GdomeText *self,
                                                 GdomeDOMString *prefix,
                                                 GdomeException *exc);
    GdomeDOMString* gdome_t_localName           (GdomeText *self,
                                                 GdomeException *exc);
    GdomeBoolean gdome_t_hasAttributes          (GdomeText *self,
                                                 GdomeException *exc);
    void        gdome_t_addEventListener        (GdomeText *self,
                                                 GdomeDOMString *type,
                                                 GdomeEventListener *listener,
                                                 GdomeBoolean useCapture,
                                                 GdomeException *exc);
    void        gdome_t_removeEventListener     (GdomeText *self,
                                                 GdomeDOMString *type,
                                                 GdomeEventListener *listener,
                                                 GdomeBoolean useCapture,
                                                 GdomeException *exc);
    GdomeBoolean gdome_t_dispatchEvent          (GdomeText *self,
                                                 GdomeEvent *evt,
                                                 GdomeException *exc);
    void        gdome_t_subTreeDispatchEvent    (GdomeText *self,
                                                 GdomeEvent *evt,
                                                 GdomeException *exc);
    GdomeBoolean gdome_t_canAppend              (GdomeText *self,
                                                 GdomeNode *newChild,
                                                 GdomeException *exc);

## Description

The GdomeText interface inherits from GdomeCharacterData and represents the textual content (termed character data in XML) of an GdomeElement or GdomeAttr. If there is no markup inside an element's content, the text is contained in a single object implementing the GdomeText interface that is the only child of the element. If there is markup, it is parsed into the information items (elements, comments, etc.) and GdomeText nodes that form the list of children of the element.

When a document is first made available via the Gdome2, there is only one GdomeText node for each block of text. Users may create adjacent GdomeText nodes that represent the contents of a given element without any intervening markup, but should be aware that there is no way to represent the separations between these nodes in XML or HTML, so they will not (in general) persist between DOM editing sessions. The gdome_n_normalize() method on GdomeNode merges any such adjacent GdomeText objects into a single node for each block of text.

## Details

### struct GdomeText

    struct GdomeText {
    	gpointer user_data;
    };

### gdome_t_splitText ()

    GdomeText*  gdome_t_splitText               (GdomeText *self,
                                                 gulong offset,
                                                 GdomeException *exc);

Breaks this node into two nodes at the specified `offset`, keeping both in the tree as siblings. After being split, this node will contain all the content up to the `offset` point. A new node of the same type, which contains all the content at and after the `offset` point, is returned. If the original node had a parent node, the new node is inserted as the next sibling of the original node. When the `offset` is equal to the length of this node, the new node has no data.

`GDOME_INDEX_SIZE_ERR`: Raised if the specified `offset` is greater than the number of 16-bit units in data. `GDOME_NO_MODIFICATION_ALLOWED_ERR`: Raised if this node is readonly.

`self` : | The Text Object ref
`offset` : | The 16-bit unit offset at which to split, starting from 0
`exc` : | The GdomeException Object ref
Returns : | the new node, of the same type as this node.

### gdome_t_data ()

    GdomeDOMString* gdome_t_data                (GdomeText *self,
                                                 GdomeException *exc);

`self` : | The CharacterData Object ref
`exc` : | The Exception Object ref
Returns : | the character data of the node that implements this interface.

### gdome_t_set_data ()

    void        gdome_t_set_data                (GdomeText *self,
                                                 GdomeDOMString *data,
                                                 GdomeException *exc);

Sets the data value of this node.

`GDOME_NO_MODIFICATION_ALLOWED_ERR`: Raised when the node is readonly.

`self` : | The CharacterData Object ref
`data` : | The data value for this node
`exc` : | The Exception Object ref

### gdome_t_length ()

    gulong      gdome_t_length                  (GdomeText *self,
                                                 GdomeException *exc);

`self` : | The CharacterData Object ref
`exc` : | The GdomeException Object ref
Returns : | The number of 16-bit units that are available. This may have the value zero, i.e., CharacterData nodes may be empty.

### gdome_t_substringData ()

    GdomeDOMString* gdome_t_substringData       (GdomeText *self,
                                                 gulong offset,
                                                 gulong count,
                                                 GdomeException *exc);

Extracts a range of data from the node.

`GDOME_INDEX_SIZE_ERR`: Raised if the specified `offset` is greater than the number of 16-bit units in data.

`self` : | The CharacterData Object ref
`offset` : | Start offset of substring to extract
`count` : | The number of 16-bit units to extract
`exc` : | The Exception Object ref
Returns : | The specified substring. If the sum of `offset` and `count` exceeds the length, then all 16-bit units to the end of the data are returned.

### gdome_t_appendData ()

    void        gdome_t_appendData              (GdomeText *self,
                                                 GdomeDOMString *arg,
                                                 GdomeException *exc);

Append the string to the end of the character data of the node. Upon success, data provides access to the concatenation of data and the string specified.

`GDOME_NO_MODIFICATION_ALLOWED_ERR`: Raised when the node is readonly.

`self` : | The CharacterData Object ref
`arg` : | The string to append
`exc` : | The Exception Object ref

### gdome_t_insertData ()

    void        gdome_t_insertData              (GdomeText *self,
                                                 gulong offset,
                                                 GdomeDOMString *arg,
                                                 GdomeException *exc);

Insert a string at the specified 16-bit unit offset.

`GDOME_INDEX_SIZE_ERR`: Raised if the specified offset is greater than the number of 16-bit units in data. `GDOME_NO_MODIFICATION_ALLOWED_ERR`: Raised when the node is readonly.

`self` : | The CharacterData Object ref
`offset` : | The character offset at which to insert
`arg` : | The string to insert
`exc` : | The Exception Object ref

### gdome_t_deleteData ()

    void        gdome_t_deleteData              (GdomeText *self,
                                                 gulong offset,
                                                 gulong count,
                                                 GdomeException *exc);

Remove a range of 16-bit units from the node. If the sum of `offset` and `count` exceeds length then all 16-bit units from `offset` to the end of the data are deleted. Upon success, data and length reflect the change.

`GDOME_INDEX_SIZE_ERR`: Raised if the specified offset is greater than the number of 16-bit units in data. `GDOME_NO_MODIFICATION_ALLOWED_ERR`: Raised when the node is readonly.

`self` : | The CharacterData Object ref
`offset` : | The offset from which to start removing
`count` : | The number of 16-bit units to delete.
`exc` : | The Exception Object ref

### gdome_t_replaceData ()

    void        gdome_t_replaceData             (GdomeText *self,
                                                 gulong offset,
                                                 gulong count,
                                                 GdomeDOMString *arg,
                                                 GdomeException *exc);

Replace the characters starting at the specified 16-bit unit `offset` with the specified string. If the sum of `offset` and `count` exceeds length, then all 16-bit units to the end of the data are replaced;

`GDOME_INDEX_SIZE_ERR`: Raised if the specified `offset` is greater than the number of 16-bit units in data. `GDOME_NO_MODIFICATION_ALLOWED_ERR`: Raised when the node is readonly.

`self` : | The CharacterData Object ref
`offset` : | The offset from which to start replacing
`count` : | The number of 16-bit units to replace.
`arg` : | The String with which the range must be replaced
`exc` : | The GdomeException Object ref

### gdome_t_ref ()

    void        gdome_t_ref                     (GdomeText *self,
                                                 GdomeException *exc);

Increase the reference count of the specified Node.

`self` : | Node Object ref
`exc` : | Exception Object ref

### gdome_t_unref ()

    void        gdome_t_unref                   (GdomeText *self,
                                                 GdomeException *exc);

Decrease the reference count of the specified Node. Free the Node structure if the Node will have zero reference.

`self` : | Node Object ref
`exc` : | Exception Object ref

### gdome_t_query_interface ()

    gpointer    gdome_t_query_interface         (GdomeText *self,
                                                 const char *interface,
                                                 GdomeException *exc);

`self` : | Node Object ref
`interface` : | interface needed
`exc` : | Exception Object ref
Returns : | a reference to this object that implements the `interface` needed, or `NULL` if the `interface` is not supported by this Object.

### gdome_t_nodeName ()

    GdomeDOMString* gdome_t_nodeName            (GdomeText *self,
                                                 GdomeException *exc);

`self` : | Node Object ref
`exc` : | Exception Object ref
Returns : | the name of this node, depending on its type.

### gdome_t_nodeValue ()

    GdomeDOMString* gdome_t_nodeValue           (GdomeText *self,
                                                 GdomeException *exc);

`self` : | Node Object ref
`exc` : | Exception Object ref
Returns : | the value of this node, depending on its type.

### gdome_t_set_nodeValue ()

    void        gdome_t_set_nodeValue           (GdomeText *self,
                                                 GdomeDOMString *nodeValue,
                                                 GdomeException *exc);

Sets The value of this node, depending on its type.

`GDOME_NO_MODIFICATION_ALLOWED_ERR`: Raised when the node is readonly.

`self` : | Node Object ref
`nodeValue` : | The new value for this node.
`exc` : | Exception Object ref

### gdome_t_nodeType ()

    unsigned short gdome_t_nodeType             (GdomeText *self,
                                                 GdomeException *exc);

`self` : | Node Object ref
`exc` : | Exception Object ref
Returns : | an integer bigger than `0` representing the type of the underlying object or `0` on error.

### gdome_t_parentNode ()

    GdomeNode*  gdome_t_parentNode              (GdomeText *self,
                                                 GdomeException *exc);

`self` : | Node Object ref
`exc` : | Exception Object ref
Returns : | the parent of this node. All nodes, except Attr, Document, DocumentFragment, Entity, and Notation may have a parent. However, if a node has just been created and not yet added to the tree, or if it has been removed from the tree, this is `NULL`.

### gdome_t_childNodes ()

    GdomeNodeList* gdome_t_childNodes           (GdomeText *self,
                                                 GdomeException *exc);

`self` : | Node Object ref
`exc` : | Exception Object ref
Returns : | a NodeList that contains all children of this node. If there are no children, this is a NodeList containing no nodes. Note that attributes are not considered to be children of element nodes - use gdome_n_attributes to obtain the attributes.

### gdome_t_firstChild ()

    GdomeNode*  gdome_t_firstChild              (GdomeText *self,
                                                 GdomeException *exc);

`self` : | Node Object ref
`exc` : | Exception Object ref
Returns : | the first child of this node. If there is no such node, this returns `NULL`.

### gdome_t_lastChild ()

    GdomeNode*  gdome_t_lastChild               (GdomeText *self,
                                                 GdomeException *exc);

`self` : | Node Object ref
`exc` : | Exception Object ref
Returns : | the last child of this node. If there is no such node, this returns `NULL`.

### gdome_t_previousSibling ()

    GdomeNode*  gdome_t_previousSibling         (GdomeText *self,
                                                 GdomeException *exc);

`self` : | Node Object ref
`exc` : | Exception Object ref
Returns : | the node immediately preceding this node. If there is no such node, this returns `NULL`.

### gdome_t_nextSibling ()

    GdomeNode*  gdome_t_nextSibling             (GdomeText *self,
                                                 GdomeException *exc);

`self` : | Node Object ref
`exc` : | Exception Object ref
Returns : | the node immediately following this node. If there is no such node, this returns `NULL`.

### gdome_t_attributes ()

    GdomeNamedNodeMap* gdome_t_attributes       (GdomeText *self,
                                                 GdomeException *exc);

`self` : | Node Object ref
`exc` : | Exception Object ref
Returns : | a NamedNodeMap containing the attributes of this node (if it is an Element) or `NULL` otherwise.

### gdome_t_ownerDocument ()

    GdomeDocument* gdome_t_ownerDocument        (GdomeText *self,
                                                 GdomeException *exc);

`self` : | Node Objects ref
`exc` : | Exception Object ref
Returns : | the documment object associated with this node. This is also the Document object used to create new nodes. When this node is a Document or a DocumentType which is not used with any Document yet, this is `NULL`.

### gdome_t_insertBefore ()

    GdomeNode*  gdome_t_insertBefore            (GdomeText *self,
                                                 GdomeNode *newChild,
                                                 GdomeNode *refChild,
                                                 GdomeException *exc);

Inserts the node `newChild` before the existing child node `refChild`. If `refChild` is `NULL`, insert `newChild` at the end of the list of children. If `newChild` is a DocumentFragment node, all of its children are inserted, in the same order, before `refChild`. If the `newChild` is already in the tree, it is first removed.

`GDOME_HIERARCHY_REQUEST_ERR`: Raised if this node is of a type that does not allow children of the type of the `newChild` node, or if the node to insert is one of this node's ancestors or this node itself. `GDOME_WRONG_DOCUMENT_ERR`: Raised if `newChild` was created from a different document than the one that created this node. `GDOME_NOT_FOUND_ERR`: Raised if `refChild` is not a child of this node. `GDOME_NO_MODIFICATION_ALLOWED_ERR`: Raised when the node is readonly.

`self` : | Node Object ref
`newChild` : | The new node to put in the child list
`refChild` : | the reference node, i.e., the node before which the new node must be inserted.
`exc` : | Exception Object ref
Returns : | the node being inserted.

### gdome_t_replaceChild ()

    GdomeNode*  gdome_t_replaceChild            (GdomeText *self,
                                                 GdomeNode *newChild,
                                                 GdomeNode *oldChild,
                                                 GdomeException *exc);

Replaces the child node `oldChild` with `newChild` in the list of children, and returns the `oldChild` node. If `newChild` is a DocumentFragment object, `oldChild` is replaced by all of the DocumentFragment children, which are inserted in the same order. If the `newChild` is already in the tree, it is first removed.

`GDOME_HIERARCHY_REQUEST_ERR`: Raised if this node is of a type that does not allow children of the type of the `newChild` node, or if the node to put in is one of this node's ancestors or this node itself. `GDOME_WRONG_DOCUMENT_ERR`: Raised if `newChild` was created from a different document than the one that created this node. `GDOME_NOT_FOUND_ERR`: Raised if `oldChild` is not a child of this node. `GDOME_NO_MODIFICATION_ALLOWED_ERR`: Raised when the node is readonly.

`self` : | Node Object ref
`newChild` : | The new node to put in the child list
`oldChild` : | The node being replaced in the list
`exc` : | Exception Object ref
Returns : | the node replaced.

### gdome_t_removeChild ()

    GdomeNode*  gdome_t_removeChild             (GdomeText *self,
                                                 GdomeNode *oldChild,
                                                 GdomeException *exc);

Removes the child node indicated by `oldChild` from the list of children, and returns it.

`GDOME_NOT_FOUND_ERR`: Raised if `oldChild` is not a child of this node. `GDOME_NO_MODIFICATION_ALLOWED_ERR`: Raised when the node is readonly.

`self` : | Node Object ref
`oldChild` : | The node being removed
`exc` : | Exception Object ref
Returns : | the node removed.

### gdome_t_appendChild ()

    GdomeNode*  gdome_t_appendChild             (GdomeText *self,
                                                 GdomeNode *newChild,
                                                 GdomeException *exc);

Adds the node `newChild` to the end of the list of children of this node. If the `newChild` is already in the tree, it is first removed. If it is a DocumentFragment node, the entire contents of the document fragment are moved into the child list of this node

`GDOME_HIERARCHY_REQUEST_ERR`: Raised if this node is of a type that does not allow children of the type of the `newChild` node, or if the node to append is one of this node's ancestors or this node itself. `GDOME_WRONG_DOCUMENT_ERR`: Raised if `newChild` was created from a different document than the one that created this node. `GDOME_NO_MODIFICATION_ALLOWED_ERR`: Raised when the node is readonly.

`self` : | Node Object ref
`newChild` : | The node to add
`exc` : | Exception Object ref
Returns : | the node added.

### gdome_t_hasChildNodes ()

    GdomeBoolean gdome_t_hasChildNodes          (GdomeText *self,
                                                 GdomeException *exc);

`self` : | Node Object ref
`exc` : | Exception Object ref
Returns : | `TRUE` if this node has any children, `FALSE` otherwise.

### gdome_t_cloneNode ()

    GdomeNode*  gdome_t_cloneNode               (GdomeText *self,
                                                 GdomeBoolean deep,
                                                 GdomeException *exc);

Makes a duplicate of this node, i.e., serves as a generic copy constructor for nodes. The duplicate node has no parent; (parentNode is `NULL`). `GDOME_DOCUMENT_TYPE_NODE`, `GDOME_NOTATION_NODE` and `GDOME_ENTITY_NODE` nodes are not supported.

`GDOME_NOT_SUPPORTED_ERR`: Raised if the type of node being cloned is not supported.

`self` : | Node Object ref
`deep` : | If true, recursively clone the subtree under the specified node; if false, clone only the node itself (and its attributes, if it is an Element).
`exc` : | Exception Object ref
Returns : | the duplicate node.

### gdome_t_normalize ()

    void        gdome_t_normalize               (GdomeText *self,
                                                 GdomeException *exc);

Puts all Text nodes in the full depth of the sub-tree underneath this Node, including attribute nodes, into a "normal" form where only structure (e.g., elements, comments, processing instructions, CDATA sections, and entity references) separates Text nodes, i.e., there are neither adjacent Text nodes nor empty Text nodes.

`self` : | Node Object ref
`exc` : | Exception Object ref

### gdome_t_isSupported ()

    GdomeBoolean gdome_t_isSupported            (GdomeText *self,
                                                 GdomeDOMString *feature,
                                                 GdomeDOMString *version,
                                                 GdomeException *exc);

Tests whether the DOM implementation implements a specific feature and that feature is supported by this node.

`self` : | Node Object ref
`feature` : | The name of the feature to test.
`version` : | This is the version number of the feature to test. In Level 2, version 1, this is the string "2.0". If the version is not specified, supporting any version of the feature will cause the method to return `TRUE`.
`exc` : | Exception Object ref
Returns : | `TRUE` if the specified feature is supported on this node, `FALSE` otherwise.

### gdome_t_namespaceURI ()

    GdomeDOMString* gdome_t_namespaceURI        (GdomeText *self,
                                                 GdomeException *exc);

`self` : | Node Objects ref
`exc` : | Exception Object ref
Returns : | the namespace URI of this node, or `NULL` if it is unspecified. For nodes of any type other than `GDOME_ELEMENT_NODE` and `GDOME_ATTRIBUTE_NODE` and nodes created with a DOM Level 1 method, this is always `NULL`.

### gdome_t_prefix ()

    GdomeDOMString* gdome_t_prefix              (GdomeText *self,
                                                 GdomeException *exc);

`self` : | Node Objects ref
`exc` : | Exception Object ref
Returns : | the namespace prefix of this node, or `NULL` if it is unspecified. For nodes of any type other than `GDOME_ELEMENT_NODE` and `GDOME_ATTRIBUTE_NODE` and nodes created with a DOM Level 1 method, this is always `NULL`.

### gdome_t_set_prefix ()

    void        gdome_t_set_prefix              (GdomeText *self,
                                                 GdomeDOMString *prefix,
                                                 GdomeException *exc);

Sets a new nemaspace prefix for this node.

`GDOME_NO_MODIFICATION_ALLOWED_ERR`: Raised when the node is readonly. `GDOME_NAMESPACE_ERR`: Raised if the specified `prefix` is malformed per the Namespaces in XML specification, if the namespaceURI of this node is `NULL`, if the specified prefix is "xml" and the namespaceURI of this node is different from "http://www.w3.org/XML/1998/namespace", if this node is an attribute and the specified prefix is "xmlns" and the namespaceURI of this node is different from "http://www.w3.org/2000/xmlns/", or if this node is an attribute and the qualifiedName of this node is "xmlns".

`self` : | Node Object ref
`prefix` : | The new prefix for this node.
`exc` : | Exception Object ref

### gdome_t_localName ()

    GdomeDOMString* gdome_t_localName           (GdomeText *self,
                                                 GdomeException *exc);

`self` : | Node Objects ref
`exc` : | Exception Object ref
Returns : | the local part of the qualified name of this node. For nodes of any type other than `GDOME_ELEMENT_NODE` and `GDOME_ATTRIBUTE_NODE` and nodes created with a DOM Level 1 method, this is always `NULL`.

### gdome_t_hasAttributes ()

    GdomeBoolean gdome_t_hasAttributes          (GdomeText *self,
                                                 GdomeException *exc);

`self` : | Node Object ref
`exc` : | Exception Object ref
Returns : | `TRUE` if this node has any attributes, `FALSE` otherwise.

### gdome_t_addEventListener ()

    void        gdome_t_addEventListener        (GdomeText *self,
                                                 GdomeDOMString *type,
                                                 GdomeEventListener *listener,
                                                 GdomeBoolean useCapture,
                                                 GdomeException *exc);

This method allows the registration of event listeners on the event target. If an EventListener is added to an EventTarget while it is processing an event, it will not be triggered by the current actions but may be triggered during a later stage of event flow, such as the bubbling phase. If multiple identical EventListeners are registered on the same EventTarget with the same parameters the duplicate instances are discarded. They do not cause the EventListener to be called twice and since they are discarded they do not need to be removed with the removeEventListener method.

`self` : | Node Object ref
`type` : | the event type for which the user is registering
`listener` : | the listener parameter takes an interface implemented by the user which contains the methods to be called when the event occurs.
`useCapture` : | if `TRUE`, useCapture indicates that the user wishes to initiate capture. After initiating capture, all events of the specified type will be dispatched to the registered EventListener before being dispatched to any EventTargets beneath them in the tree. Events which are bubbling upward through the tree will not trigger an EventListener designated to use capture.
`exc` : | Exception Object ref

### gdome_t_removeEventListener ()

    void        gdome_t_removeEventListener     (GdomeText *self,
                                                 GdomeDOMString *type,
                                                 GdomeEventListener *listener,
                                                 GdomeBoolean useCapture,
                                                 GdomeException *exc);

This method allows the removal of event listeners from the event target. If an EventListener is removed from an EventTarget while it is processing an event, it will not be triggered by the current actions. EventListeners can never be invoked after being removed. Calling removeEventListener with arguments which do not identify any currently registered EventListener on the EventTarget has no effect.

`self` : | Node Object ref
`type` : | Specifies the event type of the EventListener being removed.
`listener` : | The EventListener parameter indicates the EventListener to be removed.
`useCapture` : | Specifies whether the EventListener being removed was registered as a capturing listener or not. If a listener was registered twice, one with capture and one without, each must be removed separately. Removal of a capturing listener does not affect a non-capturing version of the same listener, and vice versa.
`exc` : | Exception Object ref

### gdome_t_dispatchEvent ()

    GdomeBoolean gdome_t_dispatchEvent          (GdomeText *self,
                                                 GdomeEvent *evt,
                                                 GdomeException *exc);

This method allows the dispatch of events into the implementations event model. Events dispatched in this manner will have the same capturing and bubbling behavior as events dispatched directly by the implementation. The target of the event is the EventTarget on which dispatchEvent is called.

GDOME_UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was not specified by initializing the event before dispatchEvent was called. Specification of the Event's type as `NULL` or an empty string will also trigger this exception.

`self` : | Node Object ref
`evt` : | Specifies the event type, behavior, and contextual information to be used in processing the event.
`exc` : | Exception Object ref
Returns : | if preventDefault was called the value is `FALSE`, else the value is `TRUE`.

### gdome_t_subTreeDispatchEvent ()

    void        gdome_t_subTreeDispatchEvent    (GdomeText *self,
                                                 GdomeEvent *evt,
                                                 GdomeException *exc);

This method allows the dispatch of events into the implementations event model. Events dispatched in this manner will have the same capturing and bubbling behavior as events dispatched directly by the implementation. The target of the event is any nodes in the subtree of the EventTarget on which dispatchEvent is called.

GDOME_UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was not specified by initializing the event before dispatchEvent was called. Specification of the Event's type as `NULL` or an empty string will also trigger this exception.

`self` : | Node Object ref
`evt` : | Specifies the event type, behavior, and contextual information to be used in processing the event.
`exc` : | Exception Object ref

### gdome_t_canAppend ()

    GdomeBoolean gdome_t_canAppend              (GdomeText *self,
                                                 GdomeNode *newChild,
                                                 GdomeException *exc);

Tests if a `newChild` can be added in the child list of this node.

`self` : | Node Object ref
`newChild` : | The Node Object ref of the node to test
`exc` : | Exception Object ref
Returns : | `TRUE` if `newChild` can be added, `FALSE` otherwise.

<<< Previous Page | Home | Up | Next Page >>>
GdomeElement | GdomeComment