diff options
Diffstat (limited to 'src/dom')
-rw-r--r-- | src/dom/debug.h | 4 | ||||
-rw-r--r-- | src/dom/watcher.c | 26 | ||||
-rw-r--r-- | src/dom/watcher.h | 16 |
3 files changed, 23 insertions, 23 deletions
diff --git a/src/dom/debug.h b/src/dom/debug.h index 7d6b186..cbe8559 100644 --- a/src/dom/debug.h +++ b/src/dom/debug.h @@ -8,8 +8,8 @@ * DOM debug */ -#ifndef nslayout_dom_debug_h_ -#define nslayout_dom_debug_h_ +#ifndef nsl_dom_debug_h_ +#define nsl_dom_debug_h_ /** Define to enable DOM trace debug output */ #undef NSL_DOM_TRACE diff --git a/src/dom/watcher.c b/src/dom/watcher.c index d515cf6..db1f8a9 100644 --- a/src/dom/watcher.c +++ b/src/dom/watcher.c @@ -113,9 +113,9 @@ fail: * * \param[in] listener The listener to destroy * \param[in] document The document that the listener was registerd for. - * \return NSLAYOUT_OK on success, appropriate error otherwise. + * \return NSL_OK on success, appropriate error otherwise. */ -static nslayout_error nsl__dom_listener_destroy( +static nsl_error nsl__dom_listener_destroy( dom_event_listener *listener, dom_document *document) { @@ -130,7 +130,7 @@ static nslayout_error nsl__dom_listener_destroy( dom_event_listener_unref(listener); - return NSLAYOUT_OK; + return NSL_OK; } @@ -139,9 +139,9 @@ static nslayout_error nsl__dom_listener_destroy( * * \param[out] listener_out Returns a dom listener for watcher's document. * \param[in] watcher DOM watcher object that listener is used for. - * \return NSLAYOUT_OK on success, appropriate error otherwise. + * \return NSL_OK on success, appropriate error otherwise. */ -static nslayout_error nsl__dom_listener_create( +static nsl_error nsl__dom_listener_create( dom_event_listener **listener_out, const struct nsl_dom_watcher *watcher) { @@ -183,7 +183,7 @@ static nslayout_error nsl__dom_listener_create( } *listener_out = listener; - return NSLAYOUT_OK; + return NSL_OK; error: nsl__dom_listener_destroy(listener, watcher->document); @@ -192,18 +192,18 @@ error: } /* Exported function, documented in src/dom/watcher.h */ -nslayout_error nsl_dom_watcher_create( +nsl_error nsl_dom_watcher_create( struct nsl_dom_watcher **watcher_out, dom_document *document, nsl_dom_watcher_cb watcher_cb, void *pw) { struct nsl_dom_watcher *watcher; - nslayout_error err; + nsl_error err; watcher = malloc(sizeof(*watcher)); if (watcher == NULL) { - return NSLAYOUT_NO_MEM; + return NSL_NO_MEM; } watcher->document = document; @@ -211,21 +211,21 @@ nslayout_error nsl_dom_watcher_create( watcher->pw = pw; err = nsl__dom_listener_create(&watcher->listener, watcher); - if (err != NSLAYOUT_OK) { + if (err != NSL_OK) { free(watcher); return err; } *watcher_out = watcher; - return NSLAYOUT_OK; + return NSL_OK; } /* Exported function, documented in src/dom/watcher.h */ -nslayout_error nsl_dom_watcher_destroy( +nsl_error nsl_dom_watcher_destroy( struct nsl_dom_watcher *watcher) { nsl__dom_listener_destroy(watcher->listener, watcher->document); free(watcher); - return NSLAYOUT_OK; + return NSL_OK; } diff --git a/src/dom/watcher.h b/src/dom/watcher.h index 0883fd2..2cfa26e 100644 --- a/src/dom/watcher.h +++ b/src/dom/watcher.h @@ -8,8 +8,8 @@ * Interface to DOM mutation watching. */ -#ifndef nslayout_dom_watcher_h_ -#define nslayout_dom_watcher_h_ +#ifndef nsl_dom_watcher_h_ +#define nsl_dom_watcher_h_ struct dom_document; struct nsl_dom_watcher; @@ -34,9 +34,9 @@ enum nsl_dom_watcher_type { * \param[in] node The target node. (Caller yields ownership.) * \param[in] node_type The type of node. * \param[in] pw The dom watcher owner's private data. - * \return NSLAYOUT_OK on success, appropriate error otherwise. + * \return NSL_OK on success, appropriate error otherwise. */ -typedef nslayout_error (*nsl_dom_watcher_cb)( +typedef nsl_error (*nsl_dom_watcher_cb)( enum nsl_dom_watcher_type type, dom_event_target *node, dom_node_type node_type, @@ -50,9 +50,9 @@ typedef nslayout_error (*nsl_dom_watcher_cb)( * \param[in] document DOM document to create watcher for. * \param[in] watcher_cb Function to call when dom modification happens. * \param[in] pw Private data passed back to `watcher_cb`. - * \return NSLAYOUT_OK on success, appropriate error otherwise. + * \return NSL_OK on success, appropriate error otherwise. */ -nslayout_error nsl_dom_watcher_create( +nsl_error nsl_dom_watcher_create( struct nsl_dom_watcher **watcher_out, dom_document *document, nsl_dom_watcher_cb watcher_cb, @@ -63,9 +63,9 @@ nslayout_error nsl_dom_watcher_create( * Destroy a document change DOM change watcher. * * \param[in] watcher DOM change watcher to destroy. - * \return NSLAYOUT_OK on success, appropriate error otherwise. + * \return NSL_OK on success, appropriate error otherwise. */ -nslayout_error nsl_dom_watcher_destroy( +nsl_error nsl_dom_watcher_destroy( struct nsl_dom_watcher *watcher); #endif |