diff options
Diffstat (limited to 'doc/example.bnd')
-rw-r--r-- | doc/example.bnd | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/doc/example.bnd b/doc/example.bnd index 6003f0d..7caebf0 100644 --- a/doc/example.bnd +++ b/doc/example.bnd @@ -63,7 +63,24 @@ epilogue %{ */ binding jsapi_libdom { - interface Navigator; /* The WebIDL interface to generate a binding for */ + + /* Interface with specified flags + * + * global - the generated interface will be a global object + * jsapi_constructor - a c function will be generated to + * instansiate the interface (class) + * js_constructor - the interface (class) can be instnsiated from + * javascript + * + */ + interface Example { + flags global, jsapi_constructor, js_constructor; + } + + /* The WebIDL interface to generate a binding for. With no flags + * the default of jsapi_constructor is used + */ + interface Navigator; /* private members: * - stored in private context structure. @@ -246,14 +263,7 @@ api finalise %{ * By default returns JS_TRUE implying that *objp has been updated * * The minimal implementation would be "*objp = NULL;" but is - * equivalent to simply omitting this directive and using the defaul stub. + * equivalent to simply omitting this directive and using the default stub. */ api resolve %{ %} - -/* mark the generated interface as a a global object - * - * The body is discarded. - */ -api global %{ -%} |