XkbAllocControls(3)

πŸŽ€ NAME πŸŽ€

okay bestie, this is the XkbAllocControls(3) page from the XKB FUNCTIONS manual, and we're about to allocate an XkbControlsRec structure inside the XkbDescRec. slay.

  • XkbAllocControls β€” allocates an XkbControlsRec structure in the XkbDescRec

✨ SYNOPSIS ✨

Status XkbAllocControls (XkbDescPtr xkb, unsigned int which);

🌸 ARGUMENTS 🌸

  • xkb β€” Xkb description in which to allocate the ctrls rec
  • which β€” mask of components of ctrls to allocate

πŸ’– DESCRIPTION πŸ’–

The need to allocate an XkbControlsRec structure seldom arises; Xkb creates one when an application calls XkbGetControls or a related function. For those situations where there is not an XkbControlsRec structure allocated in the XkbDescRec, allocate one by calling XkbAllocControls.

XkbAllocControls allocates the ctrls field of the xkb parameter, initializes all fields to zero, and returns Success. If the ctrls field is not NULL, XkbAllocControls simply returns Success. If xkb is NULL, XkbAllocControls reports a BadMatch error. If the ctrls field could not be allocated, it reports a BadAlloc error.

The which mask specifies the individual fields of the ctrls structure to be allocated and can contain any of the valid masks defined in Table 1. The original literally has a (SHOULD THIS COMMENT BE LEFT IN????) note right here, and yes, bestie, I'm leaving it in because the rule is keep every detail 😭. Because none of the currently existing controls have any structures associated with them, which is currently of little practical value in this call.

Table 1 shows the actual values for the individual mask bits used to select controls for modification and to enable and disable the control. Note that the same mask bit is used to specify general modifications to the parameters used to configure the control (which), and to enable and disable the control (enabled_ctrls). The anomalies in the table (no ok in column) are for controls that have no configurable attributes; and for controls that are not boolean controls and therefore cannot be enabled or disabled.

πŸ¦‹ Table 1 Controls Mask Bits πŸ¦‹

  • XkbRepeatKeysMask β€” which or changed_ctrls: ok; enabled_ctrls: ok; value: (1L<<0)
  • XkbSlowKeysMask β€” which or changed_ctrls: ok; enabled_ctrls: ok; value: (1L<<1)
  • XkbBounceKeysMask β€” which or changed_ctrls: ok; enabled_ctrls: ok; value: (1L<<2)
  • XkbStickyKeysMask β€” which or changed_ctrls: ok; enabled_ctrls: ok; value: (1L<<3)
  • XkbMouseKeysMask β€” which or changed_ctrls: ok; enabled_ctrls: ok; value: (1L<<4)
  • XkbMouseKeysAccelMask β€” which or changed_ctrls: ok; enabled_ctrls: ok; value: (1L<<5)
  • XkbAccessXKeysMask β€” which or changed_ctrls: ok; enabled_ctrls: ok; value: (1L<<6)
  • XkbAccessXTimeoutMask β€” which or changed_ctrls: ok; enabled_ctrls: ok; value: (1L<<7)
  • XkbAccessXFeedbackMask β€” which or changed_ctrls: ok; enabled_ctrls: ok; value: (1L<<8)
  • XkbAudibleBellMask β€” which or changed_ctrls: (blank); enabled_ctrls: ok; value: (1L<<9)
  • XkbOverlay1Mask β€” which or changed_ctrls: (blank); enabled_ctrls: ok; value: (1L<<10)
  • XkbOverlay2Mask β€” which or changed_ctrls: (blank); enabled_ctrls: ok; value: (1L<<11)
  • XkbIgnoreGroupLockMask β€” which or changed_ctrls: (blank); enabled_ctrls: ok; value: (1L<<12)
  • XkbGroupsWrapMask β€” which or changed_ctrls: ok; enabled_ctrls: (blank); value: (1L<<27)
  • XkbInternalModsMask β€” which or changed_ctrls: ok; enabled_ctrls: (blank); value: (1L<<28)
  • XkbIgnoreLockModsMask β€” which or changed_ctrls: ok; enabled_ctrls: (blank); value: (1L<<29)
  • XkbPerKeyRepeatMask β€” which or changed_ctrls: ok; enabled_ctrls: (blank); value: (1L<<30)
  • XkbControlsEnabledMask β€” which or changed_ctrls: ok; enabled_ctrls: (blank); value: (1L<<31)
  • XkbAccessXOptionsMask β€” which or changed_ctrls: ok; enabled_ctrls: ok; value: (XkbStickyKeysMask | XkbAccessXFeedbackMask)
  • XkbAllBooleanCtrlsMask β€” which or changed_ctrls: (blank); enabled_ctrls: ok; value: (0x00001FFF)
  • XkbAllControlsMask β€” which or changed_ctrls: ok; enabled_ctrls: (blank); value: (0xF8001FFF)

πŸ”₯ RETURN VALUES πŸ”₯

  • SUCCESS β€” allocates the ctrls field of the xkb parameter, initializes all fields to zero
  • the ctrls field is not NULL β€” the other return case listed

πŸ’€ 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

πŸ‘‘ SEE ALSO πŸ‘‘


that's the whole page, bestie! this footer moment is brought to you by X Version 11 and libX11 1.8.14 β€” mwah πŸ’‹πŸ«Ά

πŸ“¦ where this page comes from