Initialization

Initialization

Functions

Types and Values

struct SeedEngine

Includes

#include <seed/seed.h>

Description

Functions

seed_init ()

SeedEngine *
seed_init (gint *argc,
           gchar ***argv);

Initializes a new SeedEngine. This involves initializing GLib, creating an initial context with all of the default globals, and initializing various internal parts of Seed.

This function should only be called once within a single Seed application.

Parameters

argc

A reference to the number of arguments remaining to parse.

 

argv

A reference to an array of string arguments remaining to parse.

 

Returns

The newly created and initialized SeedEngine.


seed_init_with_context_group ()

SeedEngine *
seed_init_with_context_group (gint *argc,
                              gchar ***argv,
                              SeedContextGroup group);

Initializes a new SeedEngine. This involves initializing GLib, creating an initial context (in group) with all of the default globals, and initializing various internal parts of Seed.

This function should only be called once within a single Seed application.

Parameters

argc

A reference to the number of arguments remaining to parse.

 

argv

A reference to an array of string arguments remaining to parse.

 

group

A SeedContextGroup within which to create the initial context.

 

Returns

The newly created and initialized SeedEngine.


seed_engine_set_search_path ()

void
seed_engine_set_search_path (SeedEngine *eng,
                             const gchar *path);

Sets the search path for the imports system.

Parameters

eng

A SeedEngine, on which to set the path.

 

path

A const gchar*, a colon separated string containing the path to set

 

seed_engine_get_search_path ()

gchar **
seed_engine_get_search_path (SeedEngine *eng);

Retrieves the search path for the imports system. The returned value is owned by the SeedEngine, and shouldn't be freed by the application writer.

Parameters

eng

A SeedEngine, to get the currently set search path.

 

Returns

A null-terminated array of strings containing the paths.

Types and Values

struct SeedEngine

struct SeedEngine {
	JSGlobalContextRef context;
	JSObjectRef global;
	gchar **search_path;

	JSContextGroupRef group;
};