From 081cf689356ef9138b67da2c687883b9c3354a63 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Tue, 19 Feb 2013 23:27:10 +0000 Subject: add context for default action function --- src/html/html_document.c | 8 +++++--- src/html/html_document.h | 7 +++++-- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'src/html') diff --git a/src/html/html_document.c b/src/html/html_document.c index cec4526..e248e17 100644 --- a/src/html/html_document.c +++ b/src/html/html_document.c @@ -50,6 +50,7 @@ static struct dom_node_protect_vtable html_document_protect_vtable = { /* Create a HTMLDocument */ dom_exception _dom_html_document_create( dom_events_default_action_fetcher daf, + void *daf_ctx, dom_html_document **doc) { dom_exception error; @@ -62,7 +63,7 @@ dom_exception _dom_html_document_create( result->base.base.base.vtable = &html_document_vtable; result->base.base.vtable = &html_document_protect_vtable; - error = _dom_html_document_initialise(result, daf); + error = _dom_html_document_initialise(result, daf, daf_ctx); if (error != DOM_NO_ERR) { free(result); return error; @@ -74,12 +75,13 @@ dom_exception _dom_html_document_create( /* Initialise a HTMLDocument */ dom_exception _dom_html_document_initialise(dom_html_document *doc, - dom_events_default_action_fetcher daf) + dom_events_default_action_fetcher daf, + void *daf_ctx) { dom_exception error; int sidx; - error = _dom_document_initialise(&doc->base, daf); + error = _dom_document_initialise(&doc->base, daf, daf_ctx); if (error != DOM_NO_ERR) return error; diff --git a/src/html/html_document.h b/src/html/html_document.h index ecc6236..67250f5 100644 --- a/src/html/html_document.h +++ b/src/html/html_document.h @@ -33,10 +33,13 @@ struct dom_html_document { /* Create a HTMLDocument */ dom_exception _dom_html_document_create( dom_events_default_action_fetcher daf, + void *daf_ctx, dom_html_document **doc); /* Initialise a HTMLDocument */ -dom_exception _dom_html_document_initialise(dom_html_document *doc, - dom_events_default_action_fetcher daf); +dom_exception _dom_html_document_initialise( + dom_html_document *doc, + dom_events_default_action_fetcher daf, + void *daf_ctx); /* Finalise a HTMLDocument */ bool _dom_html_document_finalise(dom_html_document *doc); -- cgit v1.2.3