![]() |
![]() |
![]() |
Seed Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
Using JavaScript closuresUsing JavaScript closures — Creating and invoking closures over JavaScript functions using GClosure |
#include <seed/seed.h> struct SeedClosure; GClosure * seed_closure_new (SeedContext ctx, SeedObject function, SeedObject user_data, const gchar *description); SeedObject seed_closure_get_callable (GClosure *c); SeedValue seed_closure_invoke (GClosure *closure, SeedValue *args, guint argc, SeedException *exception); SeedValue seed_closure_invoke_with_context (SeedContext ctx, GClosure *closure, SeedValue *args, guint argc, SeedException *exception); void seed_closure_warn_exception (GClosure *c, SeedContext ctx, SeedException exception);
struct SeedClosure { GClosure closure; JSObjectRef function; JSValueRef user_data; GType return_type; gchar *description; };
GClosure * seed_closure_new (SeedContext ctx, SeedObject function, SeedObject user_data, const gchar *description);
|
|
|
|
|
|
|
|
Returns : |
SeedValue seed_closure_invoke (GClosure *closure, SeedValue *args, guint argc, SeedException *exception);
|
|
|
|
|
|
|
|
Returns : |
SeedValue seed_closure_invoke_with_context (SeedContext ctx, GClosure *closure, SeedValue *args, guint argc, SeedException *exception);
|
|
|
|
|
|
|
|
|
|
Returns : |
void seed_closure_warn_exception (GClosure *c, SeedContext ctx, SeedException exception);
|
|
|
|
|