2014-02-04

Vala 0.23.2 released

A new development version of the Vala programming language has been released.

Changes

  • Bind GDK event structures as compact classes.
  • Switch gdk-x11-3.0 bindings to .gir.
  • Switch librsvg-2.0 bindings to .gir.
  • Bug fixes and binding updates.

    First I'd like to thank Rico for the great effort put on updating bindings.

    Then, Gdk.EventKey & co have been converted from structs to classes, and this probably broke your code, but that's for a good reason (see this bug comment).
    We're aware of this kind of breakage:
    Gdk.EventMotion *e = (Gdk.EventMotion *) (&event);

    This could be fixed as:
    Gdk.EventMotion e = (Gdk.EventMotion) event;

    For more information please visit the Vala homepage.

    3 comments:

    1. How is it possible to create now a Gdk.EventKey? I need it in gui testing.

      ReplyDelete
      Replies
      1. Try with Gdk.Event* foo = (Gdk.Event*) Memory.alloc (sizeof (Gdk.Event)); or such, hope fully that will work. Otherwise, please report a bug and we'll think of a solution.

        Delete
      2. Gdk.EventKey* eventkey = (Gdk.EventKey*) GLib.malloc (sizeof (Gdk.EventKey));
        eventkey->keyval = (uint)Gdk.Key.k;
        GLib.free(eventkey);

        causes:
        free(): invalid next size (fast): 0x0000000002d33190 ***

        Without the "eventkey->keyval=.." line, it works.
        Do I use wrong syntax?

        Delete