GNOME Bugzilla – Bug 678975
Keysyms in gdk/gdkkeysyms.h should be defined not as macros, but as an enum
Last modified: 2018-05-02 15:26:47 UTC
Keysyms should be defined as an enum, not as macro constants. This has the following advantages: * Consistency with other enumerations within GTK+ * Enums follow the scoping rules * Much easier wrapping in gtkmm. Enums can be wrapped using standard gmmproc machinery This change would break the introspection ABI. Since the benefits are too small to justify the breakage, it should be applied only when IABI is going to be broken anyway. See also answers to this post in the mailing list: https://mail.gnome.org/archives/gtk-devel-list/2012-June/msg00052.html
Created attachment 217390 [details] [review] Modify gdk/gdkkeysyms-update.pl to output enum instead of #defines The attached patch updates gdk/gdkkeysyms-update.pl to output enum instead of #defines (gdk/gdkkeysyms.h would still need to be regenerated). The enum is generated in the following format: enum { GDK_KEY_*** = ***, <...> GDK_KEY_*** = *** };
> This change would break the introspection ABI. Since the benefits are too > small to justify the breakage, it should be applied only when IABI is going to > be broken anyway. Can this be implemented in gtk+4? From gtkmm's point of view, it would be better if the generated enum looked like other enums, such as typedef enum { GDK_KEY_*** = ***, ....... GDK_KEY_*** = *** } GdkKeySyms;
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/398.