You have to check the class'es interfaces, and inheritance.
There is seed code that does this here.
https://git.gnome.org/browse/introspection-doc-generator/tree/Introspect
the core bit that extracts class info is in Class.js and Base.js
Regards
Alan
On Monday, March 21, 2016 11:25 PM, Andrea Giammarchi wrote:
I've noticed that `seed` exposes all JS "classes", properties, and both public static or prototype methods correctly.
My first attempt to have similar info in gjs was based on Proxies on the whole namespace and runtime discovery.
Thankfully, but only recently, I've realized I could introspect upfront instead of runtime.
Although, I wonder if:
- it is planned to expose static and proottype methods and prototypes in gjs "classes", similar way seed already does?
- is there some 1 => 1 description of a possible gir => JS translation?
About second point, I'm apparently able to discover pretty much everything by simply using `GIRepository.object_info_get_n_methods(info)` , loop each of them, and define it eventually wrapped or transformed in the Class (e.g. Gtk.Window) or its prototype comparing `function_info_get_flags`.
However, I've see there's much more coming out via `object_info_get_n_properties` and relative loop but I'm not sure it's needed, it makes sense ... or if I'm missing something.
TL;DR does anybody know if in order to discover a generic "Class" properties and methods a loop over all `object_info_get_n_methods` is enough?
Thank you and Best Regards
_______________________________________________ _javascript_-list mailing list _javascript_-list gnome org https://mail.gnome.org/mailman/listinfo/_javascript_-list