Skip to content

Export all functions and variables in the gir file

Ghost User requested to merge (removed):gir-fixes into master

Summary:

  • Added brief descriptions for all public functions
  • Added wp.h to the list of introspected sources
  • Added a somewhat hacky solution to get the scanner to notice static const variables like WP_OBJECT_FEATURES_ALL as constant definitions. The scanner only considers #define statements to be constants, and ignores global variables, so I did some trickery by adding a #define/#undef pair to wp-gtkdoc.h for these variables. It would probably be nicer if g-ir-scanner was able to recognize constant variables at some point...

I was testing by installing the gir and typelib and then looking at the output from this type of gjs call to verify the symbols were there:

gjs -c 'print(Object.keys(imports.gi.Wp))'
gjs -c 'print(Object.keys(imports.gi.Wp.Core.prototype))'
gjs -c 'print(Object.keys(imports.gi.Wp.Object.prototype))'
gjs -c 'print(Object.keys(imports.gi.Wp.Iterator.prototype))'
......

Fixes #31 (closed)

Edited by Ghost User

Merge request reports