diff options
author | Vincent Sanders <vince@kyllikki.org> | 2012-10-08 00:27:36 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2012-10-08 00:27:36 +0100 |
commit | d3b66100f5fc6459d9d466e20bf0b2054d617b85 (patch) | |
tree | cbbcc65363d46b789f884f1fe72559fa4bd68daa /src/jsapi-libdom.h | |
parent | f072d31de069e378af37a15d1e1433e5a9e15275 (diff) | |
download | nsgenbind-d3b66100f5fc6459d9d466e20bf0b2054d617b85.tar.gz nsgenbind-d3b66100f5fc6459d9d466e20bf0b2054d617b85.tar.bz2 |
split out operator body generation
Diffstat (limited to 'src/jsapi-libdom.h')
-rw-r--r-- | src/jsapi-libdom.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/jsapi-libdom.h b/src/jsapi-libdom.h index fe28723..e199ec7 100644 --- a/src/jsapi-libdom.h +++ b/src/jsapi-libdom.h @@ -9,6 +9,32 @@ #ifndef genjsbind_jsapi_libdom_h #define genjsbind_jsapi_libdom_h +struct binding { + struct genbind_node *gb_ast; + struct webidl_node *wi_ast; + const char *name; /* name of the binding */ + const char *interface; /* webidl interface binding is for */ + FILE *outfile ; /* output file */ +}; + +/* Generate jsapi native function bodys + * + * web IDL describes methods as operators + * http://www.w3.org/TR/WebIDL/#idl-operations + * + * This walks the web IDL AST to find all operator interface members + * and construct appropriate jsapi native function body to implement + * them. + * + * Function body contents can be overriden with an operator code + * block in the binding definition. + * + * @param binding The binding information + * @param interface The interface to generate operator bodys for + */ +int output_operator_body(struct binding *binding, const char *interface); + +/** Generate binding between jsapi and netsurf libdom */ int jsapi_libdom_output(char *outfile, struct genbind_node *genbind_root); #endif |