diff options
author | Bo Yang <struggleyb.nku@gmail.com> | 2009-08-13 09:33:24 +0000 |
---|---|---|
committer | Bo Yang <struggleyb.nku@gmail.com> | 2009-08-13 09:33:24 +0000 |
commit | 13fadb12fb400818e0ccb4c38b3bfce70ccfdad2 (patch) | |
tree | 19c55b39d97567a37b88b49aaaac13b21b9f24ee /include/dom/core | |
parent | bf6bc398bd40e39a016725550f5b8446a01ee2d1 (diff) | |
download | libdom-13fadb12fb400818e0ccb4c38b3bfce70ccfdad2.tar.gz libdom-13fadb12fb400818e0ccb4c38b3bfce70ccfdad2.tar.bz2 |
Merge the Events module (branches/struggleyb/libdom-events) back to trunk. :)
svn path=/trunk/dom/; revision=9236
Diffstat (limited to 'include/dom/core')
-rw-r--r-- | include/dom/core/exceptions.h | 18 | ||||
-rw-r--r-- | include/dom/core/implementation.h | 2 |
2 files changed, 19 insertions, 1 deletions
diff --git a/include/dom/core/exceptions.h b/include/dom/core/exceptions.h index fc5e247..e128016 100644 --- a/include/dom/core/exceptions.h +++ b/include/dom/core/exceptions.h @@ -8,6 +8,18 @@ #ifndef dom_core_exceptions_h_ #define dom_core_exceptions_h_ +/** + * Class of a DOM exception. + * + * The top 16 bits of a dom_exception are a bitfield + * indicating which class the exception belongs to. + */ +typedef enum { + DOM_EXCEPTION_CLASS_NORMAL = 0, + DOM_EXCEPTION_CLASS_EVENT = (1<<30), + DOM_EXCEPTION_CLASS_INTERNAL = (1<<31) +} dom_exception_class; + /* The DOM spec says that this is actually an unsigned short */ typedef enum { DOM_NO_ERR = 0, @@ -28,7 +40,11 @@ typedef enum { DOM_INVALID_ACCESS_ERR = 15, DOM_VALIDATION_ERR = 16, DOM_TYPE_MISMATCH_ERR = 17, - DOM_NO_MEM_ERR = (1<<16) + + DOM_UNSPECIFIED_EVENT_TYPE_ERR = DOM_EXCEPTION_CLASS_EVENT + 0, + DOM_DISPATCH_REQUEST_ERR = DOM_EXCEPTION_CLASS_EVENT + 1, + + DOM_NO_MEM_ERR = DOM_EXCEPTION_CLASS_INTERNAL + 0 /* our own internal error */ } dom_exception; diff --git a/include/dom/core/implementation.h b/include/dom/core/implementation.h index cb95f84..92cce99 100644 --- a/include/dom/core/implementation.h +++ b/include/dom/core/implementation.h @@ -11,6 +11,7 @@ #include <stdbool.h> #include <dom/core/exceptions.h> +#include <dom/events/document_event.h> #include <dom/functypes.h> #include <dom/core/string.h> @@ -38,6 +39,7 @@ dom_exception dom_implementation_create_document( struct dom_string *namespace, struct dom_string *qname, struct dom_document_type *doctype, dom_alloc alloc, void *pw, struct lwc_context_s *ctx, + dom_events_default_action_fetcher daf, struct dom_document **doc); dom_exception dom_implementation_get_feature( |