diff options
Diffstat (limited to 'src/layout.c')
-rw-r--r-- | src/layout.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/layout.c b/src/layout.c index e4824bf..0c11660 100644 --- a/src/layout.c +++ b/src/layout.c @@ -22,11 +22,11 @@ /** * The layout object for a DOM document */ -struct nslayout_layout { +struct nsl_layout { dom_document *document; css_select_ctx *css_ctx; css_media_type *media; - nslayout_callback cb; + nsl_callback cb; void *pw; struct nsl_dom_watcher *watcher; @@ -34,14 +34,14 @@ struct nslayout_layout { /* Publically exported function, documented in include/libnslayout/nslayout.h */ -nslayout_error nslayout_init(void) +nsl_error nsl_init(void) { return nsl_dom_str_init(); } /* Publically exported function, documented in include/libnslayout/nslayout.h */ -nslayout_error nslayout_fini(void) +nsl_error nsl_fini(void) { return nsl_dom_str_fini(); } @@ -54,15 +54,15 @@ nslayout_error nslayout_fini(void) * \param[in] node The target node. (Caller yields ownership.) * \param[in] node_type The type of node. * \param[in] pw The layout object. - * \return NSLAYOUT_OK on success, appropriate error otherwise. + * \return NSL_OK on success, appropriate error otherwise. */ -static nslayout_error nsl_layout_dom_watcher_cb( +static nsl_error nsl_layout_dom_watcher_cb( enum nsl_dom_watcher_type type, dom_event_target *node, dom_node_type node_type, void *pw) { - nslayout_layout *layout = pw; + nsl_layout *layout = pw; UNUSED(type); UNUSED(layout); @@ -77,30 +77,30 @@ static nslayout_error nsl_layout_dom_watcher_cb( dom_node_unref(node); - return NSLAYOUT_OK; + return NSL_OK; } /* Publically exported function, documented in include/libnslayout/nslayout.h */ -nslayout_error nslayout_layout_create( +nsl_error nsl_layout_create( dom_document *doc, css_select_ctx *css_ctx, css_media_type *media, - nslayout_callback cb, + nsl_callback cb, void *pw, - nslayout_layout **layout) + nsl_layout **layout) { - nslayout_layout *l = NULL; - nslayout_error err; + nsl_layout *l = NULL; + nsl_error err; assert(doc != NULL); assert(css_ctx != NULL); assert(media != NULL); assert(cb != NULL); - l = calloc(1, sizeof(nslayout_layout)); + l = calloc(1, sizeof(nsl_layout)); if (l == NULL) { - return NSLAYOUT_NO_MEM; + return NSL_NO_MEM; } /* TODO: Decide: ownership will probably be passed to libnslayout */ @@ -112,29 +112,29 @@ nslayout_error nslayout_layout_create( err = nsl_dom_watcher_create(&l->watcher, l->document, nsl_layout_dom_watcher_cb, l); - if (err != NSLAYOUT_OK) { + if (err != NSL_OK) { return err; } *layout = l; - return NSLAYOUT_OK; + return NSL_OK; } /* Publically exported function, documented in include/libnslayout/nslayout.h */ -nslayout_error nslayout_layout_destroy( - nslayout_layout *layout) +nsl_error nsl_layout_destroy( + nsl_layout *layout) { - nslayout_error err; + nsl_error err; assert(layout != NULL); /* TODO: free/unref the stuff we own in the layout */ err = nsl_dom_watcher_destroy(layout->watcher); - if (err != NSLAYOUT_OK) { + if (err != NSL_OK) { return err; } free(layout); - return NSLAYOUT_OK; + return NSL_OK; } |