Hi guys.
I was feeling bored so I started work on a Pike binding for GLib:s object introspection repository (aka "gir").
It's still horribly incomplete, but it can already handle simple stuff like this:
---8<--- import GI.repository;
void main() { Notify.init("notifytest"); Notify.Notification.new("Hello world", "This is an example", "dialog-information")->show(); } ---8<---
The branch is available as "marcus/gobject-introspection" on the git server if you want to check it out or (*gasp*) contribute. :-)
And now, this works:
---8<--- import GI.repository;
void main(int argc, array(string) argv) { Clutter.init(argc, argv); object stage = Clutter.Stage.get_default(); stage->set_size(512, 512); object text = Clutter.Text.new_with_text("sans 24", "Hello"); stage->add_actor(text); text->show();
object timeline = Clutter.Timeline.new(3000); object alpha = Clutter.Alpha.new_full(timeline, Clutter.AnimationMode.linear); object behaviour = Clutter.BehaviourEllipse.new(alpha, 256, 256, 200, 200, Clutter.RotateDirection.cw, 0, 360); behaviour->apply(text); timeline->set_loop(1); timeline->start();
stage->show(); Clutter.main(); } ---8<---
What fun!
pike-devel@lists.lysator.liu.se