| Top |
| SeedValue | (*SeedFunctionCallback) () |
| SeedObject | seed_make_function () |
| void | seed_create_function () |
SeedValue (*SeedFunctionCallback) (SeedContext ctx,SeedObject function,SeedObject this_object,gsize argument_count,const SeedValue arguments[],SeedException *exception);
All native C function callbacks should use the prototype of SeedFunctionCallback.
ctx |
||
function |
The SeedObject representing the function |
|
this_object |
The SeedObject representing the "this" object in the caller |
|
argument_count |
The number of arguments passed into the callback |
|
arguments |
An array of SeedValues; the value of the arguments passed in |
|
exception |
A reference to a SeedException; use |
SeedObject seed_make_function (SeedContext ctx,SeedFunctionCallback func,const gchar *name);
Creates a JavaScript object representing a first-class function; when
the function is called from JavaScript, func
will be called.
ctx |
A valid SeedContext |
|
func |
A SeedFunctionCallback to implement the function. |
|
name |
The name of the function (used in exceptions). |
void seed_create_function (SeedContext ctx,gchar *name,SeedFunctionCallback func,SeedObject obj);
Creates a JavaScript object representing a first-class function; when
the function is called from JavaScript, func
will be called. Places
the created function as the property name
on obj
.
ctx |
A valid SeedContext |
|
name |
The name of the function (used in exceptions). |
|
func |
A SeedFunctionCallback to implement the function. |
|
obj |
The SeedObject on which to put the function. |