Top Qs
Timeline
Chat
Perspective
Seed (programming)
JavaScript interpreter and library From Wikipedia, the free encyclopedia
Remove ads
Seed is a JavaScript interpreter and a library of the GNOME project to create standalone applications in JavaScript.[1] It uses the JavaScript engine JavaScriptCore of the WebKit project. It is possible to easily create modules in C.
This article needs additional citations for verification. (March 2012) |
Seed is integrated in GNOME since the 2.28 version and is used by two games in the GNOME Games package.[2] It is also used by the Web web browser for the design of its extensions. The module is also officially supported by the GTK+ project.[3]
Remove ads
Hello world in Seed
This example uses the standard output to output the string "Hello, World".
#!/usr/bin/env seed
print("Hello, world!");
A program using GTK+
This code shows an empty window named "Example".
#!/usr/bin/env seed
Gtk = imports.gi.Gtk;
Gtk.init(Seed.argv);
var window = new Gtk.Window({title: "Example"});
window.signal.hide.connect(Gtk.main_quit);
window.show_all();
Gtk.main();
Modules
To use a module, just instantiate a class having for name imports. followed by the name of the module respecting the case sensitivity.
- The modules using GObject Introspection, who starts by imports.gi.[permanent dead link] :
- Libxml
- Cairo
- DBus
- MPFR
- Os (system library)
- Canvas (using Cairo)
- multiprocessing
- readline Archived 2009-11-09 at the Wayback Machine
- ffi
- sqlite
- sandbox Archived 2009-11-09 at the Wayback Machine
List of the Seed versions
The names of the versions of Seed are albums of famous rock bands.
Remove ads
See also
References
External links
Wikiwand - on
Seamless Wikipedia browsing. On steroids.
Remove ads