XkbGetIndicatorMap(3)

πŸ’… XkbGetIndicatorMap β€” XKB FUNCTIONS πŸ’…

okay so bestie, welcome to XkbGetIndicatorMap from the XKB FUNCTIONS manual. this is the function that gets the map for one or more indicators, using a mask to specify the indicators. no cap, it's giving "indicator data, but make it masked." ✨


πŸŽ€ NAME πŸŽ€

XkbGetIndicatorMap β€” gets the map for one or more indicators, using a mask to specify the indicators πŸ’–

πŸ“œ SYNOPSIS πŸ“œ

       Status XkbGetIndicatorMap (Display *dpy, unsigned int which, XkbDescPtr
              desc);

🫢 ARGUMENTS 🫢

  • dpy β€” connection to the X server πŸ”Œ
  • which β€” mask of indicators for which maps should be returned 🎯
  • desc β€” keyboard description to be updated πŸ’–

🌈 DESCRIPTION 🌈

okay so Xkb lets applications obtain information about indicators using two different methods, and both are valid, bestie.

  1. the first method is similar to the core X implementation: it uses a mask to specify the indicators. very classic, very "we've been doing this." πŸ’…
  2. the second method is more suitable for applications concerned with interoperability: it uses indicator names. cute, portable, socially aware. πŸ¦‹

the correspondence between the indicator name and the bit position in masks is as follows: one of the parameters returned from XkbGetNamedIndicators is an index that is the bit position to use in any function call that requires a mask of indicator bits, as well as the indicator's index into the XkbIndicatorRec array of indicator maps. iykyk β€” that index is doing double duty. ✨

XkbGetIndicatorMap obtains the maps from the server for only those indicators specified by the which mask and copies the values into the keyboard description specified by desc. only the ones you asked for, no overfetching, we love boundaries. 🫢

if the indicators field of the desc parameter is NULL, XkbGetIndicatorMap allocates and initializes it. so it's like "oh, no container? i got you, bestie." πŸŽ€

to free the indicator maps, use XkbFreeIndicatorMaps. clean up after yourself, periodt. 🧹

πŸ’€ DIAGNOSTICS πŸ’€

  • BadAlloc β€” unable to allocate storage 😭
  • BadMatch β€” a compatible version of Xkb was not available in the server or an argument has correct type and range, but is otherwise invalid πŸ’€
  • BadImplementation β€” invalid reply from server πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘


xoxo, from X Version 11 and libX11 1.8.14 β€” this page is XkbGetIndicatorMap(3) πŸ’‹βœ¨

πŸ“¦ where this page comes from