On 09/06/2012 09:31 AM, Simon Schampijer wrote:
On 09/05/2012 07:29 PM, Simon Schampijer wrote:
On 09/03/2012 11:29 PM, Simon Schampijer wrote:
Hi,

we made quite some good progress last week with the port. Most of the
open items have been fixed. I do rebase now on master to start merging
and keep on working on the master branches. I uploaded the current
patches at [1], the rest coming. Feel free to start commenting while
going.

Regards,
    Simon

[1] http://dev.laptop.org/~erikos/shell_port/

I just updated the repo, nearly all of the patches have been rebased,
cleaned and the description prettied up. Now only the Journal patches
are missing and one or two Palette patches. But the existing ones can be
looked at already, most of this is straight forward looking at the
exercise we did with the toolkit port. I will merge in the next days.

Regards,
    Simon

Had great feedback from Manuel on the patches and incorporated those,
updated the repo. One main thing that came up was that we use the
dynamic bindings of cairo in the shell as we use "cairo.RectangleInt()"
which is only available in the dynamic bindings. The current situation
of cairo introspection is mainly that: "The code existing in
gobject-introspection is just the minimum required to make GTK
introspection work." [1] You can see that if you look at the gir file [2].

In the toolkit-gtk3 we use the static bindings as we do want to access
things like cairo.OPERATOR_SOURCE, cairo.ImageSurface,
cairo.ImageSurface.create_from_png etc. Same we do in activities like
Browse when we want to use cairo for drawing operations.

Even mixing static and dynamic bindings seems to work fine, at the
moment there is no case where we need to, though.

Some more background info on the cairo case:

In order to find out why cairo does only support a small subset in introspection, I got the following reply from Tomeu:

"Cairo's types use inheritance, but don't use gobject for that so g-i doesn't know that a method can be applied to a structure, because it doesn't know that the structure inherits from another".

And he advised me to use the static bindings always. Currently we are missing the RectangleInt, luckily this has just been added to pycairo [1][2]. This is the Python3 version, so when we switch over we can use it.

Regards,
   Simon

[1] http://cgit.freedesktop.org/pycairo/commit/?id=75e82a1b3f495a3abbc78e50a5c66356d320fb15
[2] https://bugs.freedesktop.org/show_bug.cgi?id=44336

_______________________________________________
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel

Reply via email to