GSJ GIRepository VS Seed



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:
  1. it is planned to expose static and proottype methods and prototypes in gjs "classes", similar way seed already does?
  2. 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


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