Contexts

Contexts

Functions

Types and Values

Includes

#include <seed/seed.h>

Description

Functions

seed_context_create ()

SeedGlobalContext
seed_context_create (SeedContextGroup group,
                     SeedClass global_class);

Create a new SeedContext. By default, this creates a new context which has no global objects; you can add the default set using seed_prepare_global_context().

Parameters

group

A SeedContextGroup in which to create the new context, or NULL to create it in the default context group.

 

global_class

The SeedClass to use to create the global object, or NULL to create it with the default class.

 

Returns

A new SeedContext.


seed_context_ref ()

SeedGlobalContext
seed_context_ref (SeedGlobalContext ctx);

Increments the reference count of ctx .

Parameters

ctx

A SeedContext.

 

Returns

ctx


seed_context_unref ()

void
seed_context_unref (SeedGlobalContext ctx);

Decrements the reference count of ctx .

Parameters

ctx

A SeedContext.

 

seed_context_collect ()

void
seed_context_collect (SeedGlobalContext ctx);

Instructs JavaScriptCore to make a garbage collection pass. The context parameter is currently unused, and a pass is made through all contexts.

Parameters

ctx

A SeedContext.

 

seed_context_get_global_object ()

SeedObject
seed_context_get_global_object (SeedContext ctx);

Parameters

ctx

A valid SeedContext

 

Returns

The global object for ctx .


seed_prepare_global_context ()

void
seed_prepare_global_context (SeedContext ctx);

Adds the default set of global objects (imports, GType, Seed, and print) to a fresh SeedContext.

Parameters

ctx

A SeedContext on which to add the default set of global objects.

 

seed_importer_add_global ()

void
seed_importer_add_global (SeedContext ctx,
                          gchar *name);

seed_importer_set_search_path ()

void
seed_importer_set_search_path (SeedContext ctx,
                               gchar **search_path);

Types and Values

SeedContext

typedef gpointer SeedContext;

SeedGlobalContext

typedef gpointer SeedGlobalContext;

SeedContextGroup

typedef gpointer SeedContextGroup;