XkbGetIndicatorChanges - Updates a local copy of the keyboard description with the actual values of one or more calls to XkbNoteIndicatorChanges


Status XkbGetIndicatorChanges (Display * dpy , XkbDescPtr xkb , XkbIndicatorChangesPtr changes , unsigned int state );


  • - dpy
        connection to the X server
  • - xkb
        keyboard description to hold the new values
  • - changes
        indicator maps/state to be obtained from the server
  • - state
        backfilled with the state of the indicators


Whenever an indicator changes state, the server sends XkbIndicatorStateNotify events to all interested clients. Similarly, whenever an indicator's map changes, the server sends XkbIndicatorMapNotify events to all interested clients. To receive XkbIndicatorStateNotify events, use XkbSelectEventswith both the bits_to_changeand values_for_bitsparameters containing XkbIndicatorStateNotifyMask. To receive XkbIndicatorMapNotify events, use XkbSelectEventswith XkbIndicatorMapNotifyMask. To receive events for only specific indicators, use XkbSelectEventDetails.Set the event_typeparameter to XkbIndicatorStateNotify or XkbIndicatorMapNotify, and set both the bits_to_changeand values_for_bitsdetail parameters to a mask where each bit specifies one indicator, turning on those bits that specify the indicators for which you want to receive events. Both types of indicator events use the same structure:

typedef struct _XkbIndicatorNotify {
  int            type;       /(** Xkb extension base event code */
  unsigned long  serial;     /(** X server serial number for event */
  Bool           send_event; /(** True => synthetically generated */
  Display *      display;    /(** server connection where event generated */
  Time           time;       /(** server time when event generated */
  int            xkb_type;   /(** specifies state or map notify */
  int            device;     /(** Xkb device ID, will not be XkbUseCoreKbd */
  unsigned int   changed;    /(** mask of indicators with new state or map */
  unsigned int   state;      /(** current state of all indicators */
} XkbIndicatorNotifyEvent;

xkb_typeis either XkbIndicatorStateNotify or XkbIndicatorMapNotify, depending on whether the event is a kbIndicatorStateNotify event or kbIndicatorMapNotify event. The changedparameter is a mask that is the bitwise inclusive OR of the indicators that have changed. If the event is of type XkbIndicatorMapNotify, changedreports the maps that changed. If the event is of type XkbIndicatorStateNotify, changedreports the indicators that have changed state. stateis a mask that specifies the current state of all indicators, whether they have changed or not, for both XkbIndicatorStateNotify and IndicatorMapNotify events. When your client application receives either a XkbIndicatorStateNotify event or XkbIndicatorMapNotify event, you can note the changes in a changes structure by calling XkbNoteIndicatorChanges. XkbGetIndicatorChangesexamines the changesparameter, pulls over the necessary information from the server, and copies the results into the xkbkeyboard description. If any bits are set in the state_changesfield of changes, XkbGetIndicatorChangesalso places the state of those indicators in state.If the indicatorsfield of xkbis NULL, XkbGetIndicatorChangesallocates and initializes it. To free the indicatorsfield, use XkbFreeIndicators.



               Unable to allocate storage


               Invalid reply from server


               A compatible version of Xkb was not available in the server or an argument has correct type and range, but is otherwise invalid


R XkbFreeIndicators (3),

R XkbGetIndicatorChanges (3),

R XkbNoteIndicatorChanges (3),

R XkbSelectEvents (3),

R XkbSelectEventDetail (3)