home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 October / Chip_1997-10_cd.bin / tema / sybase / powerj / hpp.z / WKEYDEFS.HPP < prev    next >
C/C++ Source or Header  |  1996-10-18  |  6KB  |  165 lines

  1. /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2.    %     Copyright (C) 1994, by WATCOM International Inc.  All rights    %
  3.    %     reserved.  No part of this software may be reproduced or        %
  4.    %     used in any form or by any means - graphic, electronic or       %
  5.    %     mechanical, including photocopying, recording, taping or        %
  6.    %     information storage and retrieval systems - except with the     %
  7.    %     written permission of WATCOM International Inc.                 %
  8.    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  9. */
  10.  
  11. #ifndef _WKEYDEFS_HPP_INCLUDED
  12. #define _WKEYDEFS_HPP_INCLUDED
  13.  
  14. #ifndef _WNO_PRAGMA_PUSH
  15. #pragma pack(push,8);
  16. #pragma enum int;
  17. #endif
  18.  
  19. enum WKeyStateValues {
  20.     WKNullState         = 0x00,
  21.     WKShiftPressed      = 0x01<<0,
  22.     WKControlPressed    = 0x01<<1,
  23.     WKAltPressed        = 0x01<<2,
  24.     WKLeftMousePressed  = 0x01<<3,
  25.     WKMiddleMousePressed= 0x01<<4,
  26.     WKRightMousePressed = 0x01<<5,
  27. };
  28. typedef WULong WKeyState;
  29.  
  30. enum WKeyPressCode {
  31.     WKeyNone                    = 0x00,
  32.     WKeyLeftMouseButton         = 0x01,
  33.     WKeyRightMouseButton        = 0x02,
  34.     WKeyCancel                  = 0x03,
  35.     WKeyMiddleMouseButton       = 0x04,
  36.     WKeyBackspace               = 0x08,
  37.     WKeyTab                     = 0x09,
  38.     WKeyClear                   = 0x0C,
  39.     WKeyReturn                  = 0x0D,
  40.     WKeyShift                   = 0x10,
  41.     WKeyControl                 = 0x11,
  42.     WKeyAlt                     = 0x12,
  43.     WKeyPause                   = 0x13,
  44.     WKeyCapsLock                = 0x14,
  45.     WKeyEscape                  = 0x1B,
  46.     WKeySpace                   = 0x20,
  47.  
  48.     WKeyPageUp                  = 0x21,
  49.     WKeyPageDn                  = 0x22,         WKeyPageDown = WKeyPageDn,
  50.     WKeyEnd                     = 0x23,
  51.     WKeyHome                    = 0x24,
  52.     WKeyLeft                    = 0x25,
  53.     WKeyUp                      = 0x26,
  54.     WKeyRight                   = 0x27,
  55.     WKeyDown                    = 0x28,
  56.  
  57.     WKeySelect                  = 0x29,
  58.     WKeyPrint                   = 0x2A,
  59.     WKeyExecute                 = 0x2B,
  60.     WKeyPrintScreen             = 0x2C,
  61.  
  62.     WKeyInsert                  = 0x2D,
  63.     WKeyDelete                  = 0x2E,
  64.     WKeyHelp                    = 0x2F,
  65.  
  66.     WKey0                       = '0',
  67.     WKey1                       = '1',
  68.     WKey2                       = '2',
  69.     WKey3                       = '3',
  70.     WKey4                       = '4',
  71.     WKey5                       = '5',
  72.     WKey6                       = '6',
  73.     WKey7                       = '7',
  74.     WKey8                       = '8',
  75.     WKey9                       = '9',
  76.  
  77.     WKeyA                       = 'A',
  78.     WKeyB                       = 'B',
  79.     WKeyC                       = 'C',
  80.     WKeyD                       = 'D',
  81.     WKeyE                       = 'E',
  82.     WKeyF                       = 'F',
  83.     WKeyG                       = 'G',
  84.     WKeyH                       = 'H',
  85.     WKeyI                       = 'I',
  86.     WKeyJ                       = 'J',
  87.     WKeyK                       = 'K',
  88.     WKeyL                       = 'L',
  89.     WKeyM                       = 'M',
  90.     WKeyN                       = 'N',
  91.     WKeyO                       = 'O',
  92.     WKeyP                       = 'P',
  93.     WKeyQ                       = 'Q',
  94.     WKeyR                       = 'R',
  95.     WKeyS                       = 'S',
  96.     WKeyT                       = 'T',
  97.     WKeyU                       = 'U',
  98.     WKeyV                       = 'V',
  99.     WKeyW                       = 'W',
  100.     WKeyX                       = 'X',
  101.     WKeyY                       = 'Y',
  102.     WKeyZ                       = 'Z',
  103.  
  104.     WKeyNumpad0                 = 0x60,
  105.     WKeyNumpad1                 = 0x61,
  106.     WKeyNumpad2                 = 0x62,
  107.     WKeyNumpad3                 = 0x63,
  108.     WKeyNumpad4                 = 0x64,
  109.     WKeyNumpad5                 = 0x65,
  110.     WKeyNumpad6                 = 0x66,
  111.     WKeyNumpad7                 = 0x67,
  112.     WKeyNumpad8                 = 0x68,
  113.     WKeyNumpad9                 = 0x69,
  114.  
  115.     WKeyStar                    = 0x6A,
  116.     WKeyPlus                    = 0x6B,
  117.     WKeySeparator               = 0x6C,
  118.     WKeyMinus                   = 0x6D,
  119.     WKeyDecimal                 = 0x6E,
  120.     WKeyDivide                  = 0x6F,
  121.  
  122.     WKeyF1                      = 0x70,
  123.     WKeyF2                      = 0x71,
  124.     WKeyF3                      = 0x72,
  125.     WKeyF4                      = 0x73,
  126.     WKeyF5                      = 0x74,
  127.     WKeyF6                      = 0x75,
  128.     WKeyF7                      = 0x76,
  129.     WKeyF8                      = 0x77,
  130.     WKeyF9                      = 0x78,
  131.     WKeyF10                     = 0x79,
  132.     WKeyF11                     = 0x7A,
  133.     WKeyF12                     = 0x7B,
  134.     WKeyF13                     = 0x7C,
  135.     WKeyF14                     = 0x7D,
  136.     WKeyF15                     = 0x7E,
  137.     WKeyF16                     = 0x7F,
  138.     WKeyF17                     = 0x80,
  139.     WKeyF18                     = 0x81,
  140.     WKeyF19                     = 0x82,
  141.     WKeyF20                     = 0x83,
  142.     WKeyF21                     = 0x84,
  143.     WKeyF22                     = 0x85,
  144.     WKeyF23                     = 0x86,
  145.     WKeyF24                     = 0x87,
  146.  
  147.     WKeyNumLock                 = 0x90,
  148.     WKeyScroll                  = 0x91,
  149. };
  150.  
  151. struct WKeyMessage {
  152.     WKeyState           state;
  153.     WBool               prevDown;
  154.     WBool               keyDown;
  155.     WUInt               scanCode;
  156.     WUInt               repeatCount;
  157. };
  158.  
  159. #ifndef _WNO_PRAGMA_PUSH
  160. #pragma enum pop;
  161. #pragma pack(pop);
  162. #endif
  163.  
  164. #endif // _WKEYDEFS_HPP_INCLUDED
  165.