[Xcb] enum MapIndex with numeric names
Uli Schlachter
psychon at znc.in
Fri Jul 26 15:32:35 UTC 2019
Hi,
On 26.07.19 17:24, Sascha Ziemann wrote:
> xproto.xml defines the following enum:
>
> <enum name="MapIndex">
> <item name="Shift"> <value>0</value></item>
> <item name="Lock"> <value>1</value></item>
> <item name="Control"><value>2</value></item>
> <item name="1"> <value>3</value></item>
> <item name="2"> <value>4</value></item>
> <item name="3"> <value>5</value></item>
> <item name="4"> <value>6</value></item>
> <item name="5"> <value>7</value></item>
> </enum>
>
> What sens does it make to have numeric names?
Well, how would you call them?
And why is the current name a problem?
Looking at the protocol documentation, I guess one could call them Mod1
etc, but they are still essentially numeric:
> KEYMASK {Shift, Lock, Control, Mod1, Mod2, Mod3, Mod4, Mod5}
https://www.x.org/releases/X11R7.5/doc/x11proto/proto.html
Calling them Mod1 in the XML would lead to XCB generating
XCB_MAP_INDEX_MOD1 instead of XCB_MAP_INDEX_1, which is not really better...
Hope this helps a bit,
Uli
--
“Cold. Cold. Cold. Cold. Cold. Cold. Cold. Cold. Cold. Cold.” – Anna
More information about the Xcb
mailing list