summaryrefslogtreecommitdiff
path: root/include/dom/core
diff options
context:
space:
mode:
Diffstat (limited to 'include/dom/core')
-rw-r--r--include/dom/core/implementation.h2
-rw-r--r--include/dom/core/node.h2
-rw-r--r--include/dom/core/string.h22
3 files changed, 9 insertions, 17 deletions
diff --git a/include/dom/core/implementation.h b/include/dom/core/implementation.h
index 0094217..2577829 100644
--- a/include/dom/core/implementation.h
+++ b/include/dom/core/implementation.h
@@ -36,14 +36,12 @@ dom_exception dom_implementation_has_feature(
dom_exception dom_implementation_create_document_type(
const char *qname,
const char *public_id, const char *system_id,
- dom_alloc alloc, void *pw,
struct dom_document_type **doctype);
dom_exception dom_implementation_create_document(
uint32_t impl_type,
const char *namespace, const char *qname,
struct dom_document_type *doctype,
- dom_alloc alloc, void *pw,
dom_events_default_action_fetcher daf,
struct dom_document **doc);
diff --git a/include/dom/core/node.h b/include/dom/core/node.h
index ee1f057..fbc3ee3 100644
--- a/include/dom/core/node.h
+++ b/include/dom/core/node.h
@@ -13,6 +13,7 @@
#include <dom/core/exceptions.h>
#include <dom/core/string.h>
+#include <dom/events/event_target.h>
struct dom_document;
struct dom_nodelist;
@@ -81,6 +82,7 @@ typedef struct dom_node {
/* DOM node vtable */
typedef struct dom_node_vtable {
+ dom_event_target_vtable base;
/* The DOM level 3 node's oprations */
dom_exception (*dom_node_get_node_name)(dom_node_internal *node,
diff --git a/include/dom/core/string.h b/include/dom/core/string.h
index b671cb7..1ff4f75 100644
--- a/include/dom/core/string.h
+++ b/include/dom/core/string.h
@@ -19,26 +19,22 @@
typedef struct dom_string dom_string;
/* Claim a reference on a DOM string */
-void dom_string_ref(dom_string *str);
+dom_string *dom_string_ref(dom_string *str);
/* Release a reference on a DOM string */
void dom_string_unref(dom_string *str);
/* Create a DOM string from a string of characters */
-dom_exception dom_string_create(dom_alloc alloc, void *pw,
- const uint8_t *ptr, size_t len, dom_string **str);
+dom_exception dom_string_create(const uint8_t *ptr, size_t len,
+ dom_string **str);
-/* Clone a dom_string */
-dom_exception dom_string_clone(dom_alloc alloc, void *pw,
- dom_string *str, dom_string **ret);
-
-/* Get the internal lwc_string */
-dom_exception dom_string_get_intern(dom_string *str,
+/* Obtain an interned representation of a dom string */
+dom_exception dom_string_intern(dom_string *str,
struct lwc_string_s **lwcstr);
/* Case sensitively compare two DOM strings */
-int dom_string_cmp(dom_string *s1, dom_string *s2);
+bool dom_string_isequal(const dom_string *s1, const dom_string *s2);
/* Case insensitively compare two DOM strings */
-int dom_string_icmp(dom_string *s1, dom_string *s2);
+bool dom_string_caseless_isequal(const dom_string *s1, const dom_string *s2);
/* Get the index of the first occurrence of a character in a dom string */
uint32_t dom_string_index(dom_string *str, uint32_t chr);
@@ -72,10 +68,6 @@ dom_exception dom_string_replace(dom_string *target,
dom_string *source, uint32_t i1, uint32_t i2,
dom_string **result);
-/* Duplicate a dom string */
-dom_exception dom_string_dup(dom_string *str,
- dom_string **result);
-
/* Calculate a hash value from a dom string */
uint32_t dom_string_hash(dom_string *str);