libxklavier should use glib-mkenums so that language bindings and introspection utilities can use the enums (XklEngineStateChange, XklEngineFeatures, etc). I'm working on Python bindings, and I cannot wrap the enums via the usual way unless this is done.
Created attachment 25511 [details] [review] Proposed patch
Something is wrong: In file included from xklavier_private.h:27, from xklavier.c:28: ../libxklavier/xklavier.h:33:40: error: libxklavier/xkl-enum-types.h: No such file or directory xklavier.c: In function ‘xkl_engine_class_init’: xklavier.c:833: error: ‘XKL_TYPE_ENGINE_FEATURES’ undeclared (first use in this function) xklavier.c:833: error: (Each undeclared identifier is reported only once xklavier.c:833: error: for each function it appears in.) xklavier.c:774: warning: unused variable ‘feature_flags’
Fixed in CVS. Please check.
Thanks so much for this :-)
Created attachment 27308 [details] [review] Use bitmask for XklEngineFeatures It looks like glib-mkenums expects a bitmask for flag types, and was wrongly XklEngineFeatures as a static enumeration type instead of a static flag type. The attached patch fixes this. I'm not sure how libxklavier uses the values of the XklEngineFeatures flags internally, so I am not sure how valid this patch is.
Reopening, since with the initial patch a warning is being generated, and XklEngineFeatures related stuff may be broken.
I do not quite understand what is the difference, from C POV it is essentially same code. Anyway, committed.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.