[Sugar-devel] Native GTK activities with Javascript?

James Cameron quozl at laptop.org
Thu Sep 21 16:16:12 EDT 2017


On Thu, Sep 21, 2017 at 02:29:22PM -0500, Sebastian Silva wrote:
> From my research yesterday it would appear we would need to find a
> way to generate a GIR file but I don't know how it all couples
> together.

Yes, use the GObject introspection framework.

Port the sugar-toolkit-gtk3 to the framework.  Once ported, all the
needed sugar3 modules would be available as "from gi.repository import
Sugar", and so any other client of GObject introspection such as gjs
would have equal access to the API.

For learning how .gir files are produced, find some small .gir files
on an installed Debian system, list the binary package names that
produced them, list the source package names, find the smallest source
package, and reverse engineer the build process.  Repeat for the next
source package until you feel you can reproduce the effect.

I most recently worked through this when I fixed the AbiWord flicker
problem which was causing trouble for the Write activity.  An AbiWord
package contains a .gir file.

-- 
James Cameron
http://quozl.netrek.org/


More information about the Sugar-devel mailing list