Re: Gtk3

On 2011-02-15 at 00:34, Torsten Schoenfeld wrote:
On 14.02.2011 22:37, Emmanuele Bassi wrote:
Is there any plan for Gtk3?

in theory, Gtk3 should just be a thin, pure Perl wrapper around
Glib::Object::Introspection and the introspection data generated by gtk
+-3.0 itself. in practice, Glib::Object::Introspection needs to be
completed before that happens.

Yes, that's my view too: let's work on Glib::Object::Introspection.

I just spent this Saturday on G:O:I, and implemented array support and
calling methods on unions. this makes it possible to write simple
Clutter programs in Perl, complete with event handling.

I took the liberty to go ahead and commit them to master; the changes
were pretty simple, they were mostly based on existing code, and they
have been tested agains the Regress module provided by g-i.

now, the hard part:

  â length arguments for arrays:
  - currently, we do a single pass to convert arguments on the Perl
    stack into the wanted arguments to be passed to libffi and invoke
    the C code; this means that this kind of function:

       * namespace_object_method:
       * @object: an #Object
       * @len: the length of @array
       * @array: (array length=len): an array of integers
      void namespace_object_method (Object*, int len, int *array)

    event when correctly annotated (as above) will be translated into:

      $object->method(3, [ 1, 2, 3 ]);

    which isn't very Perlish.

    the theory, also followed by Gjs and PyGObject, is that the
    arguments list should be traversed twice to skip getting the "len"
    argument and implicitly fill the GIArgument to be passed to the C

  â memory usage:
  - there are a couple of FIXME's here and there that warrant going
    through the pain of Valgrind to make sure that we don't leak like a

  â overrides installation:
  - we should provide a way to fully and safely override classes and
    methods with pure Perl implementations using the same name, to
    provide Perlish (and backward compatible) APIs on top of the C one.

I should be able to devote at least a full day every week to work on



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]