Re: little explanation about Gjs and introspection



On Mon, Apr 18, 2011 at 7:07 AM, Marcin Sporysz <msporysz06 gmail com> wrote:
> Hello,
> I did some reading about new Gjs, introspection stuff over the weekend
> and I would be grateful if someone clarify few things for me.
> As I understood, new introspection mechanism generates XML files
> (.gir) with classes, methods etc and then it is translated to various
> languages like JavaScript (Gjs), am I correct so far? If so, lets
> continue.
> Let's say i have this line of code:
>
> "const Clutter = imports.gi.Clutter;"
>
> now, I understand it imports classes/methods for Clutter support - but
> how can I know which libraries provided .gir files, which methods and
> in which languages they are available? is it tracked anywhere in my
> system, some repository perhaps?

You can find all girs available on the system in /usr/share/gir-1.0.
All methods are available except the ones marked with introspection="0"
Gjs uses a typelib directly instead of the gir, they are stored in
/usr/lib/girepository-1.0.

There's no API tracking, nor any documentation at this point.

-- 
Johan Dahlin


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