diff options
author | Vincent Sanders <vince@kyllikki.org> | 2013-12-16 00:08:27 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2014-05-16 14:38:56 +0100 |
commit | abec5defbb553588dce1c317b74570061705f6d0 (patch) | |
tree | a88c2e25cf45358355219a6f832d227cebeffe9e /doc/example.bnd | |
parent | 5755930ae93b6305b40620fff0e90bc2e4c64b46 (diff) | |
download | nsgenbind-abec5defbb553588dce1c317b74570061705f6d0.tar.gz nsgenbind-abec5defbb553588dce1c317b74570061705f6d0.tar.bz2 |
add flags to interface within binding
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 %{ -%} |