[Xcb] enum MapIndex with numeric names

Bart Massey bart at cs.pdx.edu
Fri Jul 26 22:39:44 UTC 2019


Honestly, "Mod1" et al would have been better, but I don't see it being
worth changing at this point.

On Fri, Jul 26, 2019 at 8:41 AM Uli Schlachter <psychon at znc.in> wrote:

> 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
> _______________________________________________
> Xcb mailing list
> Xcb at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/xcb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/xcb/attachments/20190726/f2457f8e/attachment.html>


More information about the Xcb mailing list