home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / gnu / djgpp / contrib / dvx / inc / x11 / xkeymap.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-15  |  1.9 KB  |  54 lines

  1. #include "copyright.h"
  2.  
  3. /* $XConsortium: Xkeymap.h,v 11.5 88/09/06 16:11:27 jim Exp $ */
  4. /* Copyright 1985, Massachusetts Institute of Technology */
  5.  
  6. #define X_KEYMAP_MAGIC 0373  /* magic number which must be first byte
  7.                                 of a keymap file (was 0372 in V10) */
  8.  
  9. /* KeyMap: contains single-byte character bindings, or indications
  10.    that a keycode is actually bound in the extension or runtime table */
  11.  
  12. typedef short KeyMapEntry [8];
  13. typedef unsigned char KeyMapElt [16];
  14.  
  15. #define UNBOUND (unsigned char)'\377'
  16. #define EXTENSION_BOUND (unsigned char)'\376'
  17. #define RUNTIME_TABLE_BOUND (unsigned char)'\375'
  18. #define SingleCharBound(c) ((unsigned char)c < (unsigned char)'\375')
  19.  
  20. /* Extension: contains multiple-byte character bindings from
  21.    the keymap file.  Not modified at runtime.  */
  22.  
  23. typedef struct _ExtensionHeader { /* Tagged. POHC 90/10/08 */
  24.     unsigned char keycode;
  25.     unsigned char metabits;
  26.     unsigned char length;
  27.     } ExtensionHeader;
  28.  
  29. #define ExtensionHeaderSize 3
  30.     /* since sizeof (ExtensionHeader) is 4 on some machines, e.g. Sun */
  31.  
  32. /* macro used to iterate through the extension */
  33. #define NextExtension(this) \
  34.   this = (ExtensionHeader *) ((char *)this + ExtensionHeaderSize + this->length)
  35.  
  36. /* Compose: contains bindings from sequence of single-byte chars to single- or 
  37.    multiple-byte character. */
  38.  
  39. typedef struct _ComposeHeader { /* Tagged. POHC 90/10/08 */
  40.     unsigned char source_length;
  41.     unsigned char result_length;    
  42.     } ComposeHeader;
  43.  
  44. #define ComposeHeaderSize 2
  45.  
  46. /* macro used to iterate through the compose sequences */
  47. #define NextCompose(this) \
  48.   this = (ComposeHeader *) ((char *)this + ComposeHeaderSize + \
  49.      this->source_length + this->result_length)
  50.  
  51. #define DontCareMetaBits 0377
  52.   /* appears in extension whenever the binding applies to all possible
  53.      combinations of shift/lock/meta/control keys */
  54.