libdom
Loading...
Searching...
No Matches
custom_event.h File Reference
#include <stdbool.h>
#include <dom/core/exceptions.h>
#include <dom/core/string.h>

Go to the source code of this file.

Macros

#define dom_custom_event_get_detail(e, d)
 
#define dom_custom_event_init_ns(e, n, t, b, c, d)
 

Typedefs

typedef struct dom_custom_event dom_custom_event
 

Functions

dom_exception _dom_custom_event_get_detail (dom_custom_event *evt, void **detail)
 
dom_exception _dom_custom_event_init_ns (dom_custom_event *evt, dom_string *namespace, dom_string *type, bool bubble, bool cancelable, void *detail)
 

Macro Definition Documentation

◆ dom_custom_event_get_detail

#define dom_custom_event_get_detail ( e,
d )
Value:
(void **) (d))
dom_exception _dom_custom_event_get_detail(dom_custom_event *evt, void **detail)
Definition custom_event.c:70
Definition custom_event.h:15

◆ dom_custom_event_init_ns

#define dom_custom_event_init_ns ( e,
n,
t,
b,
c,
d )
Value:
(dom_string *) (n), (dom_string *) (t), \
(bool) (b), (bool) (c), (void *) (d))
dom_exception _dom_custom_event_init_ns(dom_custom_event *evt, dom_string *namespace, dom_string *type, bool bubble, bool cancelable, void *detail)
Definition custom_event.c:89
Definition string.h:19

Typedef Documentation

◆ dom_custom_event

typedef struct dom_custom_event dom_custom_event

Function Documentation

◆ _dom_custom_event_get_detail()

dom_exception _dom_custom_event_get_detail ( dom_custom_event * evt,
void ** detail )

Get the detail object of this custom event

Parameters
evtThe Event object
detailThe returned detail object
Returns
DOM_NO_ERR on success, appropriate dom_exception on failure.

◆ _dom_custom_event_init_ns()

dom_exception _dom_custom_event_init_ns ( dom_custom_event * evt,
dom_string * namespace,
dom_string * type,
bool bubble,
bool cancelable,
void * detail )

Initialise this custom event

Parameters
evtThe Event object
namespaceThe namespace of this new Event
typeThe Event type
bubbleWhether this event can bubble
cancelableWhether this event is cancelable
detailThe detail object of this custom event
Returns
DOM_NO_ERR on success, appropriate dom_exception on failure.