Re: enum MapIndex with numeric names
Bart Massey <[email protected]> Fri, 26 Jul 2019 15:39:44 -0700
| Newsgroups | gmane.comp.freedesktop.xcb |
|---|---|
| Message-ID | <CAA6gtpk2Tbx_hinw-jKeL5ebu8vseFTT3+Ss+39Yvtkn=wn=JQ@mail.gmail.com> |
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 <[email protected]> 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 > [email protected] > https://lists.freedesktop.org/mailman/listinfo/xcb _______________________________________________ Xcb mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/xcb