home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / cbm / os-include.lha / os-include / libraries / lowlevel.h < prev    next >
C/C++ Source or Header  |  1993-10-15  |  8KB  |  249 lines

  1. #ifndef LIBRARIES_LOWLEVEL_H
  2. #define LIBRARIES_LOWLEVEL_H
  3.  
  4. /*
  5. **    $VER: lowlevel.h 40.6 (30.7.93)
  6. **    Includes Release 40.15
  7. **
  8. **    lowlevel.library interface structures and definitions.
  9. **
  10. **    (C) Copyright 1993 Commodore-Amiga, Inc.
  11. **    All Rights Reserved
  12. */
  13.  
  14. /*****************************************************************************/
  15.  
  16.  
  17. #ifndef EXEC_TYPES_H
  18. #include <exec/types.h>
  19. #endif
  20.  
  21. #ifndef UTILITY_TAGITEM_H
  22. #include <utility/tagitem.h>
  23. #endif
  24.  
  25.  
  26. /*****************************************************************************/
  27.  
  28.  
  29. /* structure for use with QueryKeys() */
  30. struct KeyQuery
  31. {
  32.     UWORD kq_KeyCode;
  33.     BOOL  kq_Pressed;
  34. };
  35.  
  36.  
  37. /*****************************************************************************/
  38.  
  39.  
  40. /* bits in the return value of GetKey() */
  41. #define LLKB_LSHIFT    16
  42. #define LLKB_RSHIFT    17
  43. #define LLKB_CAPSLOCK    18
  44. #define LLKB_CONTROL    19
  45. #define LLKB_LALT    20
  46. #define LLKB_RALT    21
  47. #define LLKB_LAMIGA    22
  48. #define LLKB_RAMIGA    23
  49.  
  50. #define LLKF_LSHIFT    (1<<LLKB_LSHIFT)
  51. #define LLKF_RSHIFT    (1<<LLKB_RSHIFT)
  52. #define LLKF_CAPSLOCK    (1<<LLKB_CAPSLOCK)
  53. #define LLKF_CONTROL    (1<<LLKB_CONTROL)
  54. #define LLKF_LALT    (1<<LLKB_LALT)
  55. #define LLKF_RALT    (1<<LLKB_RALT)
  56. #define LLKF_LAMIGA    (1<<LLKB_LAMIGA)
  57. #define LLKF_RAMIGA    (1<<LLKB_RAMIGA)
  58.  
  59.  
  60. /*****************************************************************************/
  61.  
  62.  
  63. /* Tags for SetJoyPortAttrs() */
  64. #define SJA_Dummy     (TAG_USER+0xc00100)
  65. #define SJA_Type     (SJA_Dummy+1) /* force type to mouse, joy, game cntrlr */
  66. #define SJA_Reinitialize (SJA_Dummy+2) /* free potgo bits, reset to autosense    */
  67.  
  68. /* Controller types for SJA_Type tag */
  69. #define SJA_TYPE_AUTOSENSE 0
  70. #define SJA_TYPE_GAMECTLR  1
  71. #define SJA_TYPE_MOUSE       2
  72. #define SJA_TYPE_JOYSTK    3
  73.  
  74.  
  75. /*****************************************************************************/
  76.  
  77.  
  78. /* ReadJoyPort() return value definitions */
  79.  
  80. /* Port types */
  81. #define JP_TYPE_NOTAVAIL  (00<<28)      /* port data unavailable    */
  82. #define JP_TYPE_GAMECTLR  (01<<28)      /* port has game controller */
  83. #define JP_TYPE_MOUSE      (02<<28)      /* port has mouse          */
  84. #define JP_TYPE_JOYSTK      (03<<28)      /* port has joystick          */
  85. #define JP_TYPE_UNKNOWN   (04<<28)      /* port has unknown device  */
  86. #define JP_TYPE_MASK      (15<<28)      /* controller type          */
  87.  
  88. /* Button types, valid for all types except JP_TYPE_NOTAVAIL */
  89. #define JPB_BUTTON_BLUE    23      /* Blue - Stop; Right Mouse             */
  90. #define JPB_BUTTON_RED       22      /* Red - Select; Left Mouse; Joystick Fire */
  91. #define JPB_BUTTON_YELLOW  21      /* Yellow - Repeat                 */
  92. #define JPB_BUTTON_GREEN   20      /* Green - Shuffle                 */
  93. #define JPB_BUTTON_FORWARD 19      /* Charcoal - Forward             */
  94. #define JPB_BUTTON_REVERSE 18      /* Charcoal - Reverse             */
  95. #define JPB_BUTTON_PLAY    17      /* Grey - Play/Pause; Middle Mouse         */
  96. #define JPF_BUTTON_BLUE    (1<<JPB_BUTTON_BLUE)
  97. #define JPF_BUTTON_RED       (1<<JPB_BUTTON_RED)
  98. #define JPF_BUTTON_YELLOW  (1<<JPB_BUTTON_YELLOW)
  99. #define JPF_BUTTON_GREEN   (1<<JPB_BUTTON_GREEN)
  100. #define JPF_BUTTON_FORWARD (1<<JPB_BUTTON_FORWARD)
  101. #define JPF_BUTTON_REVERSE (1<<JPB_BUTTON_REVERSE)
  102. #define JPF_BUTTON_PLAY    (1<<JPB_BUTTON_PLAY)
  103. #define JP_BUTTON_MASK       (JPF_BUTTON_BLUE|JPF_BUTTON_RED|JPF_BUTTON_YELLOW|JPF_BUTTON_GREEN|JPF_BUTTON_FORWARD|JPF_BUTTON_REVERSE|JPF_BUTTON_PLAY)
  104.  
  105. /* Direction types, valid for JP_TYPE_GAMECTLR and JP_TYPE_JOYSTK */
  106. #define JPB_JOY_UP      3
  107. #define JPB_JOY_DOWN      2
  108. #define JPB_JOY_LEFT      1
  109. #define JPB_JOY_RIGHT      0
  110. #define JPF_JOY_UP      (1<<JPB_JOY_UP)
  111. #define JPF_JOY_DOWN      (1<<JPB_JOY_DOWN)
  112. #define JPF_JOY_LEFT      (1<<JPB_JOY_LEFT)
  113. #define JPF_JOY_RIGHT      (1<<JPB_JOY_RIGHT)
  114. #define JP_DIRECTION_MASK (JPF_JOY_UP|JPF_JOY_DOWN|JPF_JOY_LEFT|JPF_JOY_RIGHT)
  115.  
  116. /* Mouse position reports, valid for JP_TYPE_MOUSE */
  117. #define JP_MHORZ_MASK    (255<<0)    /* horzizontal position */
  118. #define JP_MVERT_MASK    (255<<8)    /* vertical position    */
  119. #define JP_MOUSE_MASK    (JP_MHORZ_MASK|JP_MVERT_MASK)
  120.  
  121. /* Obsolete ReadJoyPort() definitions, here for source code compatibility only.
  122.  * Please do NOT use in new code.
  123.  */
  124. #define JPB_BTN1  JPB_BUTTON_BLUE
  125. #define JPF_BTN1  JPF_BUTTON_BLUE
  126. #define JPB_BTN2  JPB_BUTTON_RED
  127. #define JPF_BTN2  JPF_BUTTON_RED
  128. #define JPB_BTN3  JPB_BUTTON_YELLOW
  129. #define JPF_BTN3  JPF_BUTTON_YELLOW
  130. #define JPB_BTN4  JPB_BUTTON_GREEN
  131. #define JPF_BTN4  JPF_BUTTON_GREEN
  132. #define JPB_BTN5  JPB_BUTTON_FORWARD
  133. #define JPF_BTN5  JPF_BUTTON_FORWARD
  134. #define JPB_BTN6  JPB_BUTTON_REVERSE
  135. #define JPF_BTN6  JPF_BUTTON_REVERSE
  136. #define JPB_BTN7  JPB_BUTTON_PLAY
  137. #define JPF_BTN7  JPF_BUTTON_PLAY
  138. #define JPB_UP      JPB_JOY_UP
  139. #define JPF_UP      JPF_JOY_UP
  140. #define JPB_DOWN  JPB_JOY_DOWN
  141. #define JPF_DOWN  JPF_JOY_DOWN
  142. #define JPB_LEFT  JPB_JOY_LEFT
  143. #define JPF_LEFT  JPF_JOY_LEFT
  144. #define JPB_RIGHT JPB_JOY_RIGHT
  145. #define JPF_RIGHT JPF_JOY_RIGHT
  146.  
  147.  
  148. /*****************************************************************************/
  149.  
  150.  
  151. /* Tags for SystemControl() */
  152. #define SCON_Dummy       (TAG_USER+0x00C00000)
  153. #define SCON_TakeOverSys   (SCON_Dummy+0)
  154. #define SCON_KillReq       (SCON_Dummy+1)
  155. #define SCON_CDReboot       (SCON_Dummy+2)
  156. #define SCON_StopInput       (SCON_Dummy+3)
  157. #define SCON_AddCreateKeys (SCON_Dummy+4)
  158. #define SCON_RemCreateKeys (SCON_Dummy+5)
  159.  
  160. /* Reboot control values for use with SCON_CDReboot tag */
  161. #define CDReboot_On        1
  162. #define CDReboot_Off        0
  163. #define CDReboot_Default    2
  164.  
  165.  
  166. /*****************************************************************************/
  167.  
  168.  
  169. /* Rawkey codes returned when using SCON_AddCreateKeys with SystemControl() */
  170.  
  171. #define RAWKEY_PORT0_BUTTON_BLUE    0x72
  172. #define RAWKEY_PORT0_BUTTON_RED    0x78
  173. #define RAWKEY_PORT0_BUTTON_YELLOW    0x77
  174. #define RAWKEY_PORT0_BUTTON_GREEN    0x76
  175. #define RAWKEY_PORT0_BUTTON_FORWARD    0x75
  176. #define RAWKEY_PORT0_BUTTON_REVERSE    0x74
  177. #define RAWKEY_PORT0_BUTTON_PLAY    0x73
  178. #define RAWKEY_PORT0_JOY_UP        0x79
  179. #define RAWKEY_PORT0_JOY_DOWN        0x7A
  180. #define RAWKEY_PORT0_JOY_LEFT        0x7C
  181. #define RAWKEY_PORT0_JOY_RIGHT        0x7B
  182.  
  183. #define RAWKEY_PORT1_BUTTON_BLUE    0x172
  184. #define RAWKEY_PORT1_BUTTON_RED    0x178
  185. #define RAWKEY_PORT1_BUTTON_YELLOW    0x177
  186. #define RAWKEY_PORT1_BUTTON_GREEN    0x176
  187. #define RAWKEY_PORT1_BUTTON_FORWARD    0x175
  188. #define RAWKEY_PORT1_BUTTON_REVERSE    0x174
  189. #define RAWKEY_PORT1_BUTTON_PLAY    0x173
  190. #define RAWKEY_PORT1_JOY_UP        0x179
  191. #define RAWKEY_PORT1_JOY_DOWN        0x17A
  192. #define RAWKEY_PORT1_JOY_LEFT        0x17C
  193. #define RAWKEY_PORT1_JOY_RIGHT        0x17B
  194.  
  195. #define RAWKEY_PORT2_BUTTON_BLUE    0x272
  196. #define RAWKEY_PORT2_BUTTON_RED    0x278
  197. #define RAWKEY_PORT2_BUTTON_YELLOW    0x277
  198. #define RAWKEY_PORT2_BUTTON_GREEN    0x276
  199. #define RAWKEY_PORT2_BUTTON_FORWARD    0x275
  200. #define RAWKEY_PORT2_BUTTON_REVERSE    0x274
  201. #define RAWKEY_PORT2_BUTTON_PLAY    0x273
  202. #define RAWKEY_PORT2_JOY_UP        0x279
  203. #define RAWKEY_PORT2_JOY_DOWN        0x27A
  204. #define RAWKEY_PORT2_JOY_LEFT        0x27C
  205. #define RAWKEY_PORT2_JOY_RIGHT        0x27B
  206.  
  207. #define RAWKEY_PORT3_BUTTON_BLUE    0x372
  208. #define RAWKEY_PORT3_BUTTON_RED    0x378
  209. #define RAWKEY_PORT3_BUTTON_YELLOW    0x377
  210. #define RAWKEY_PORT3_BUTTON_GREEN    0x376
  211. #define RAWKEY_PORT3_BUTTON_FORWARD    0x375
  212. #define RAWKEY_PORT3_BUTTON_REVERSE    0x374
  213. #define RAWKEY_PORT3_BUTTON_PLAY    0x373
  214. #define RAWKEY_PORT3_JOY_UP        0x379
  215. #define RAWKEY_PORT3_JOY_DOWN        0x37A
  216. #define RAWKEY_PORT3_JOY_LEFT        0x37C
  217. #define RAWKEY_PORT3_JOY_RIGHT        0x37B
  218.  
  219.  
  220. /*****************************************************************************/
  221.  
  222.  
  223. /* Return values for GetLanguageSelection() */
  224. #define LANG_UNKNOWN    0
  225. #define LANG_AMERICAN    1    /* American English */
  226. #define LANG_ENGLISH    2    /* British English  */
  227. #define LANG_GERMAN    3
  228. #define LANG_FRENCH    4
  229. #define LANG_SPANISH    5
  230. #define LANG_ITALIAN    6
  231. #define LANG_PORTUGUESE 7
  232. #define LANG_DANISH    8
  233. #define LANG_DUTCH    9
  234. #define LANG_NORWEGIAN    10
  235. #define LANG_FINNISH    11
  236. #define LANG_SWEDISH    12
  237. #define LANG_JAPANESE    13
  238. #define LANG_CHINESE    14
  239. #define LANG_ARABIC    15
  240. #define LANG_GREEK    16
  241. #define LANG_HEBREW    17
  242. #define LANG_KOREAN    18
  243.  
  244.  
  245. /*****************************************************************************/
  246.  
  247.  
  248. #endif /* LIBRARIES_LOWLEVEL_H */
  249.