Seed 2.27.90 - quite the jump!

2009.08.10 in gnome and summer of code

I just pushed the tarballs/tag of Seed 2.27.90; Robb and Matt and I decided to jump to match the GNOME release number, to reduce confusion now that we're a module. Not sure that was a good idea because people might expect that we've passed "1.0" now, which we most certainly haven't done!

This is the first release to come with the FFI module, so you can do stuff like this:

var app = new ffi.Library();
var strcmp = app.strcmp;

strcmp.signature = {arguments: [GObject.TYPE_STRING, GObject.TYPE_STRING], returns: GObject.TYPE_INT};

print(strcmp("Hi", "Hi")); print(strcmp("Boo", "Foo")); print(strcmp("Foo", "Boo"));

(but please, only do that if you're really crazy... there are more useful applications; Robb has an example that calls out to XLib, too... which is a little longer but a good bit less silly...)

It also comes with a much more attractive way to install properties on GTypes. I haven't yet written documentation for this, but will in the next cycle. For now, I'll just note that it lets you do things like this:

OscillatorWidget = new GType({
    parent: Gtk.VBox.type,
    name: "OscillatorWidget",
    properties: [
          name: "frequency",
          type: GObject.TYPE_INT,
          default_value: 1000,
          minimum_value: 0,
          maximum_value: 3000

The property's flags default to readable/writable, but you can mark them as construct properties and then set them with the JSON construction notation. As I said before, documentation and polish are forthcoming.

And, for your reading pleasure, the Seed 2.27.90 complete ChangeLog:
  • Expanded and updated documentation; also available at
  • All JavaScript contexts now have a __script_path__ property, which exposes the absolute, canonical path to the evaluated script
  • Add __init__.js functionality; if an imported folder contains __init__.js, it will be evaluated with the imported context as the 'this' object
  • Fix bug which caused inheritance from a GType created in Seed to fail
  • Add "pretty" property installation, see gtype-property-nice.js
  • New FFI module, provides an interface for calling non-introspected native C functions from JavaScript

Comments (legacy)

Alberto Ruiz

Why do you need that list around the property dictionary? The dicionary should be enough for the "property" object, shouldn't it?

Alberto Ruiz

I mean this:

properties: {
"frequency": {type: GObject.TYPE_INT,
default_value: 10000