diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2017-02-05 13:01:21 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2017-02-05 13:01:21 +0000 |
commit | 1f2942faaf00b22b58747d51c7b186a65f041606 (patch) | |
tree | 0ed97b6035332bf73d3fcb60753f41bf4ceca9a5 /src/dom/watcher.h | |
parent | 5ab8be1d772f617f505d80e06910ebdd5fdc06ab (diff) | |
download | libnslayout-1f2942faaf00b22b58747d51c7b186a65f041606.tar.gz libnslayout-1f2942faaf00b22b58747d51c7b186a65f041606.tar.bz2 |
dom watcher: Turn the dom watcher into an opaque object.
Diffstat (limited to 'src/dom/watcher.h')
-rw-r--r-- | src/dom/watcher.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/dom/watcher.h b/src/dom/watcher.h index 87f0a1b..2894db6 100644 --- a/src/dom/watcher.h +++ b/src/dom/watcher.h @@ -5,7 +5,7 @@ */ /** \file src/dom/watcher.h - * Layout object handling + * Interface to DOM mutation watching. */ #ifndef nslayout_dom_watcher_h_ @@ -13,20 +13,26 @@ #include <libnslayout/nslayout.h> +struct nsl_dom_watcher; + /** - * Add DOM change watchers to the layout's document.' + * Create DOM change watcher for a DOM document. * - * \param[in] layout nslayout_layout object to set watchers for. + * \param[out] watcher_out Returns a dom watcher object for layout. + * \param[in] document DOM document to create watcher for. * \return NSLAYOUT_OK on success, appropriate error otherwise. */ -nslayout_error nsl_dom_watcher_add_for_layout(nslayout_layout *layout); +nslayout_error nsl_dom_watcher_create( + struct nsl_dom_watcher **watcher_out, + dom_document *document); /** - * Remove DOM change watchers from the layout's document. + * Destroy a document change DOM change watcher. * - * \param[in] layout nslayout_layout object remove watchers from. + * \param[in] watcher DOM change watcher to destroy. * \return NSLAYOUT_OK on success, appropriate error otherwise. */ -nslayout_error nsl_dom_watcher_remove_for_layout(nslayout_layout *layout); +nslayout_error nsl_dom_watcher_destroy( + struct nsl_dom_watcher *watcher); #endif |