libdom
|
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <dom/core/element.h>
#include <dom/core/nodelist.h>
#include <dom/core/tokenlist.h>
#include <dom/core/string.h>
#include <dom/events/event.h>
#include <dom/events/event_target.h>
#include <dom/events/event_listener.h>
#include <dom/events/mutation_event.h>
#include "core/element.h"
#include "core/document.h"
#include "utils/utils.h"
Classes | |
struct | dom_tokenlist |
Macros | |
#define | DOM_TOKENLIST_GROW_INCREMENT 4 |
Functions | |
dom_exception | dom_tokenlist_create (dom_element *ele, dom_string *attr, dom_tokenlist **list) |
void | dom_tokenlist_ref (dom_tokenlist *list) |
void | dom_tokenlist_unref (dom_tokenlist *list) |
dom_exception | dom_tokenlist_get_length (dom_tokenlist *list, uint32_t *length) |
dom_exception | _dom_tokenlist_item (dom_tokenlist *list, uint32_t index, dom_string **value) |
dom_exception | dom_tokenlist_get_value (dom_tokenlist *list, dom_string **value) |
dom_exception | dom_tokenlist_set_value (dom_tokenlist *list, dom_string *value) |
dom_exception | dom_tokenlist_contains (dom_tokenlist *list, dom_string *value, bool *contains) |
dom_exception | dom_tokenlist_add (dom_tokenlist *list, dom_string *value) |
dom_exception | dom_tokenlist_remove (dom_tokenlist *list, dom_string *value) |
#define DOM_TOKENLIST_GROW_INCREMENT 4 |
dom_exception _dom_tokenlist_item | ( | dom_tokenlist * | list, |
uint32_t | index, | ||
dom_string ** | value ) |
Get a particular item from the tokenlist
list | The list to retrieve the item from |
index | The index of the item to retrieve |
value | The value of the item returns here |
dom_exception dom_tokenlist_add | ( | dom_tokenlist * | list, |
dom_string * | value ) |
Add the given value to the tokenlist
list | The list to add to |
value | The value to add |
dom_exception dom_tokenlist_contains | ( | dom_tokenlist * | list, |
dom_string * | value, | ||
bool * | contains ) |
Check if the given value is in the tokenlist
list | The list to scan for the given value |
value | The value to look for in the token list |
contains | This will be set based on whether or not the value is present |
dom_exception dom_tokenlist_create | ( | dom_element * | ele, |
dom_string * | attr, | ||
dom_tokenlist ** | list ) |
Create a tokenlist
ele | The element which owns the tokenlist attribute |
attr | The name of the attribute we are treating as a tokenlist |
list | The tokenlist output which is set on success |
The returned list will already be referenced, so the client need not do so explicitly. The client must unref the list once finished with it.
This list will take its own references to ::ele and ::attr
dom_exception dom_tokenlist_get_length | ( | dom_tokenlist * | list, |
uint32_t * | length ) |
Get the length of the tokenlist
list | The list to get the length of |
length | Length of the list outputs here |
dom_exception dom_tokenlist_get_value | ( | dom_tokenlist * | list, |
dom_string ** | value ) |
Retrieve the value of the tokenlist as a string
list | The list to retrieve the value of |
value | The value of the list returns here |
void dom_tokenlist_ref | ( | dom_tokenlist * | list | ) |
Claim a ref on a tokenlist
list | The tokenlist to claim a ref on |
dom_exception dom_tokenlist_remove | ( | dom_tokenlist * | list, |
dom_string * | value ) |
Remove the given value from the tokenlist
list | The list to remove from |
value | The value to remove |
dom_exception dom_tokenlist_set_value | ( | dom_tokenlist * | list, |
dom_string * | value ) |
Set the value of the tokenlist as a string
list | The list to set the value of |
value | The value to set |
void dom_tokenlist_unref | ( | dom_tokenlist * | list | ) |
Release a ref on a tokenlist
list | The list to release the reference of |
If you release the last ref, this cleans up the tokenlist