home *** CD-ROM | disk | FTP | other *** search
/ Millennium Time Capsule / AC2000.BIN / disks / ac13disk / clock.237 / source / jclkcook.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-21  |  2.3 KB  |  82 lines

  1. /* Joy Clocky CookieJar public interface header file */
  2.  
  3. #define CLOCKY_IDENT        'JCLK'
  4. #define CLOCKY_VERSION        0x230
  5.  
  6. #ifdef CLOCKY_CONFIG
  7. #define UBYTE                unsigned char
  8. #define KBDLEN                384
  9. #define PRNTBLLEN            128
  10. #define DEADTBLLEN            30
  11. #define HOTKEYS                11
  12. #endif
  13.  
  14. struct    _jclkstruct {
  15.     long    name;        /* compare with CLOCKY_IDENT, must be equal */
  16.     short    version;    /* compare with CLOCKY_VERSION, it must be equal or higher! */
  17.     struct {
  18.         unsigned ShowTime:1;    /* 31 */
  19.         unsigned ShowKuk:1;        /* 30 */
  20.         unsigned Showdate:1;    /* 29 */
  21.         unsigned Showday:1;        /* 28 */
  22.         unsigned Showyear:1;    /* 27 */
  23.         unsigned ShowCaps:1;    /* 26 */
  24.  
  25.         unsigned Unused1:3;        /* 23-25 */
  26.  
  27.         unsigned KbdEHC:1;        /* 22 */
  28.         unsigned Kbddead:1;        /* 21 */
  29.         unsigned Kbdasci:1;        /* 20 */
  30.         unsigned Kbdcink:1;        /* 19 */
  31.         unsigned Kbdbell:1;        /* 18 */
  32.         unsigned Kbdlayo:2;        /* 16-17 */
  33.  
  34.         unsigned Misc4x:1;        /* 15 */
  35.         unsigned Miscmys:1;        /* 14 */
  36.         unsigned Miscprnt:1;    /* 13 */
  37.         unsigned Miscturb:1;    /* 12 */
  38.         unsigned Miscinv:1;        /* 11 */
  39.         unsigned Misctut:1;        /* 10 */
  40.         unsigned MiscEng:1;        /* 9 */
  41.         unsigned Unused2:1;        /* 8 */
  42.  
  43.         unsigned Saveron:1;        /* 7 */
  44.         unsigned SaveMod1:1;    /* 6 */
  45.         unsigned SaveMod2:1;    /* 5 */
  46.         unsigned Saveact1:1;    /* 4 */
  47.         unsigned Saveact2:1;    /* 3 */
  48.         unsigned Unused3:3;        /* 0-2 */
  49.     }parametry;
  50.     short    saverlen;
  51.     short    savecount;
  52.     char    hotshift;            /* bits 0..3 */
  53.     char    hottime;            /* bits 0..3 */
  54.     char    unused_yet;            /* currently unused */
  55.     char    actual_key;            /* scancode: 1..127 */
  56.     char    *ehc_table;            /* ptr to char ehc_table[128] */
  57. #ifdef CLOCKY_CONFIG
  58.     UBYTE    normal_kbd[KBDLEN];
  59.     UBYTE    ceska_kbd[KBDLEN];
  60.     UBYTE    prntable[PRNTBLLEN];
  61.     UBYTE    deadkeys_defined;    /* max DEADTABLELEN */
  62.     UBYTE    deadtbl1[DEADTBLLEN];
  63.     UBYTE    deadtbl2[DEADTBLLEN];
  64.     UBYTE    deadtbl3[DEADTBLLEN];
  65.     char    hotkeys[HOTKEYS];
  66. #endif
  67. };
  68.  
  69. typedef struct _jclkstruct JCLKSTRUCT;
  70.  
  71. /*
  72.  * Pri pouziti struktur je vzdycky dobre zkontrolovat, jestli
  73.  * zvoleny kompiler neco neudelal s rozmistenim polozek v pameti!
  74. */
  75.  
  76. #include <assert.h>
  77. #ifdef CLOCKY_CONFIG
  78. #define CHECK_CLOCKY_STRUCT    assert( sizeof(JCLKSTRUCT) == (22 + 2*KBDLEN + PRNTBLLEN + 1 + 3*DEADTBLLEN + HOTKEYS) );
  79. #else
  80. #define CHECK_CLOCKY_STRUCT    assert( sizeof(JCLKSTRUCT) == 22 );
  81. #endif
  82.