nsgenbind
Loading...
Searching...
No Matches
jsapi-libdom.h
Go to the documentation of this file.
1/* binding generator output
2 *
3 * This file is part of nsgenbind.
4 * Licensed under the MIT License,
5 * http://www.opensource.org/licenses/mit-license.php
6 * Copyright 2012 Vincent Sanders <vince@netsurf-browser.org>
7 */
8
9#ifndef nsgenbind_jsapi_libdom_h
10#define nsgenbind_jsapi_libdom_h
11
12struct options;
13
36
37struct binding {
38 struct genbind_node *gb_ast; /* root node of binding AST */
39 struct webidl_node *wi_ast; /* root node of webidl AST */
40
41 const char *name; /* Name of binding (first interface name by default) */
42 int interfacec; /* numer of interfaces in the interface map */
43 struct binding_interface *interfaces; /* binding interface map */
44
45 const char *interface; /* webidl interface binding is for */
46
47 bool has_private; /* true if the binding requires a private structure */
48 struct genbind_node *binding_list; /* node list of the binding */
49
50 struct genbind_node *addproperty; /* binding api add property node or NULL */
51 struct genbind_node *delproperty; /* binding api delete property node or NULL */
52 struct genbind_node *getproperty; /* binding api get property node or NULL */
53 struct genbind_node *setproperty; /* binding api set property node or NULL */
54 struct genbind_node *enumerate; /* binding api enumerate node or NULL */
55 struct genbind_node *resolve; /* binding api resolve node or NULL */
56 struct genbind_node *finalise; /* binding api finalise node or NULL */
57 struct genbind_node *mark; /* binding api mark node or NULL */
58
59 const char *hdrguard; /* header file guard name */
60
61 FILE *outfile ; /* file handle output should be written to,
62 * allows reuse of callback routines to output
63 * to headers and source files
64 */
65 FILE *srcfile ; /* output source file */
66 FILE *hdrfile ; /* output header file */
67};
68
70int jsapi_libdom_output(struct options *options, struct genbind_node *genbind_ast, struct genbind_node *binding_node);
71
86int build_interface_map(struct genbind_node *binding_node,
87 struct webidl_node *webidl_ast,
88 int *interfacec_out,
89 struct binding_interface **interfaces_out);
90
91
93void output_code_block(struct binding *binding, struct genbind_node *codelist);
94
97
98/* Generate jsapi native function specifiers */
100
117
120
123
126
129
132
133
134#endif
int build_interface_map(struct genbind_node *binding_node, struct webidl_node *webidl_ast, int *interfacec_out, struct binding_interface **interfaces_out)
void output_code_block(struct binding *binding, struct genbind_node *codelist)
int output_function_bodies(struct binding *binding)
int output_class_init(struct binding *binding)
int output_class_new(struct binding *binding)
int output_function_spec(struct binding *binding)
int output_property_tinyid(struct binding *binding)
int output_property_body(struct binding *binding)
int jsapi_libdom_output(struct options *options, struct genbind_node *genbind_ast, struct genbind_node *binding_node)
int output_property_spec(struct binding *binding)
int output_jsclasses(struct binding *binding)
struct webidl_node * widl_node
struct genbind_node * node
const char * name
const char * inherit_name
struct genbind_node * mark
struct genbind_node * setproperty
struct webidl_node * wi_ast
FILE * hdrfile
struct genbind_node * addproperty
struct genbind_node * gb_ast
const char * hdrguard
struct genbind_node * finalise
int interfacec
FILE * srcfile
struct genbind_node * enumerate
struct genbind_node * getproperty
const char * name
FILE * outfile
struct genbind_node * resolve
struct genbind_node * delproperty
bool has_private
const char * interface
struct genbind_node * binding_list
struct binding_interface * interfaces