home *** CD-ROM | disk | FTP | other *** search
/ Dream 48 / Amiga_Dream_48.iso / Atari / c / libs / nkcc-293.lzh / HEADERS / NKCC.I < prev   
Text File  |  1995-11-09  |  12KB  |  293 lines

  1. ********************************************************************************
  2. *
  3. *  Project name : NORMALIZED KEY CODE CONVERTER (NKCC)
  4. *  Header name  : Global definitions
  5. *  Symbol prefix: nkc
  6. *
  7. *  Author       : Harald Siegmund (HS)
  8. *  Co-Authors   : -
  9. *  Write access : HS
  10. *
  11. *  Notes        : -
  12. *-------------------------------------------------------------------------------
  13. *  Things to do : -
  14. *
  15. *-------------------------------------------------------------------------------
  16. *  History:
  17. *
  18. *  1990:
  19. *     May 23-24/26: creation of file
  20. *     Jul 09: nkc_kstate()
  21. *     Aug 03: nkc_cmp();NK_MASK
  22. *     Sep 15: BE_...
  23. *     Sep 16: nkc_timer()
  24. *     Oct 03: nkc_vlink()/vunlink(); NKXM_...
  25. *     Oct 07: removing NK_MASK (use nkc_cmp() for key code comparism!)
  26. *     Oct 13: NK_LEFT and NK_RIGHT exchanged
  27. *     Dec 11: MU_XTIMER
  28. *  1991:
  29. *     Apr 13: nkc_conv() renamed to nkc_tconv()
  30. *             nkc_gconv()
  31. *     May 29: nkc_toupper, nkc_tolower
  32. *     Aug 22: NKS_DEADKEY changed
  33. *             NKS_D_...
  34. *     Aug 26: NK_INVALID
  35. *     Sep 07: NK_TERM
  36. *     Sep 14: NKF?_IGNUM
  37. *     Nov 16: NKS?_CTRL
  38. *     Dec 29: NK_RVD...
  39. *             source documentation syntax now in extra file
  40. *  1992:
  41. *     Jan 03: redefining BE_...
  42. *             NKI_...
  43. *             first parameter of nkc_init() is now of type 'unsigned long'
  44. *     Feb 28: NKCOWNPB switch
  45. *  1993:
  46. *     Dec 11: new file header
  47. *             keys NKCNOGEM and NKCOWNPB replaced by key NKCGEM
  48. *     Dec 12: new: nkc_n2tos, nkc_n2gem
  49. *  1995:
  50. *     Nov 09: some of the reserved key codes are defined now; they are used for
  51. *              the additional keys on the Macintosh keyboard
  52. *
  53. ********************************************************************************
  54. *KEY _NAME="Global NKCC definitions (assembly language)"
  55. *END
  56.  
  57.  
  58.  
  59. *START
  60. ****************************************************************************
  61. *                         ASSEMBLER CONTROL SECTION                        *
  62. ****************************************************************************
  63.  
  64. *KEY &NKCGEM
  65. *     define this symbol on the assembler's command line
  66. *     =0    create TOS-version of NKCC (without GEM part)
  67. *     =1    create GEM-version of NKCC
  68. *
  69. * For details consult the header of the file NKCC.S
  70.  
  71. *END
  72. *KEY _END
  73.  
  74.  
  75.  
  76. ****************************************************************************
  77. *                                  IMPORT                                  *
  78. ****************************************************************************
  79.  
  80.                                              ; functions
  81.                .globl   nkc_init             ; init NKCC
  82.                .globl   nkc_exit             ; exit NKCC
  83.                .globl   nkc_set              ; set special key flags
  84.                .globl   nkc_conin            ; NKCC key input via GEMDOS
  85.                .globl   nkc_cstat            ; console input status via GEMDOS
  86.                .globl   nkc_tconv            ; TOS key code converter
  87.                .globl   nkc_gconv            ; GEM key code converter
  88.                .globl   nkc_n2tos            ; NKC to TOS key code converter
  89.                .globl   nkc_n2gem            ; NKC to GEM key code converter
  90.                .globl   nkc_kstate           ; return shift key state
  91.                .globl   nkc_timer            ; return 200 Hz system clock
  92.                .globl   nkc_cmp              ; compare two key codes
  93.                .globl   nkc_vlink            ; link function to XBRA vector list
  94.                .globl   nkc_vunlink          ; unlink function from XBRA list
  95.                .globl   nkc_toupper          ; convert character to upper case
  96.                .globl   nkc_tolower          ; convert character to lower case
  97.  
  98.                .if      NKCGEM=1
  99.  
  100.                 .globl  nkc_multi            ; NKCC multi event handler
  101.                 .globl  nkc_amulti           ; multi event, assembler binding
  102.                 .globl  nkc_contrl           ; GEM parameter arrays
  103.                 .globl  nkc_intin
  104.                 .globl  nkc_intout
  105.                 .globl  nkc_adrin
  106.                 .globl  nkc_adrout
  107.                 .globl  nkc_ptsin
  108.                 .globl  nkc_ptsout
  109.  
  110.                .endif   ; .if NKCGEM=1
  111.  
  112.  
  113.  
  114. ****************************************************************************
  115. *                                 EQUATES                                  *
  116. ****************************************************************************
  117.  
  118. *              flags for NKCC initialization
  119.  
  120. NKIb_BUTHND    =        0                    ; install button event handler
  121. NKIb_BHTOS     =        1                    ; additional flag: only if TOS has
  122.                                              ;  mouse click bug
  123. NKIb_NO200HZ   =        2                    ; don't install 200 Hz clock
  124.                                              ;  interrupt (this flag is ignored
  125.                                              ;  if the button event handler is
  126.                                              ;  being activated)
  127.  
  128. NKIf_BUTHND    =        $00000001
  129. NKIf_BHTOS     =        $00000002
  130. NKIf_NO200HZ   =        $00000004
  131.  
  132.  
  133.  
  134. *              flag combinations for compatibility with old versions of NKCC
  135.  
  136. BE_ON          =        NKIf_BUTHND
  137. BE_OFF         =        0
  138. BE_TOS         =        (NKIf_BUTHND|NKIf_BHTOS)
  139.  
  140.  
  141.  
  142. *              flags for special key code handling
  143.  
  144. NKSb_ALTNUM    =        0                    ; Alt + numeric pad -> ASCII
  145. NKSb_CTRL      =        1                    ; Control key emulation
  146.                                              ; deadkey management:
  147. NKSb_D_CIRCUM  =        16                   ; ^  accent circumflex
  148. NKSb_D_TILDE   =        17                   ; ~  accent tilde
  149. NKSb_D_AGUI    =        18                   ; '  accent agui
  150. NKSb_D_GRAVE   =        19                   ; `  accent grave
  151. NKSb_D_UMLAUT  =        20                   ; ╣  umlaut
  152. NKSb_D_QUOTE   =        21                   ; "  quote, synonym for umlaut
  153. NKSb_D_SMOERE  =        22                   ; °  smoerebroed
  154. NKSb_D_CEDIL   =        23                   ; ,  cedil
  155. NKSb_D_SLASH   =        24                   ; /  slash, for scandinavian chars
  156.  
  157. NKSf_ALTNUM    =        $00000001
  158. NKSf_CTRL      =        $00000002
  159. NKSf_D_CIRCUM  =        $00010000
  160. NKSf_D_TILDE   =        $00020000
  161. NKSf_D_AGUI    =        $00040000
  162. NKSf_D_GRAVE   =        $00080000
  163. NKSf_D_UMLAUT  =        $00100000
  164. NKSf_D_QUOTE   =        $00200000
  165. NKSf_D_SMOERE  =        $00400000
  166. NKSf_D_CEDIL   =        $00800000
  167. NKSf_D_SLASH   =        $01000000
  168.  
  169. NKSf_DEADKEY   =        $ffff0000            ; all deadkeys
  170.  
  171.  
  172.  
  173. *              NKCC key flags
  174.  
  175. NKFb_FUNC      =        15                   ; function
  176. NKFb_RESVD     =        14                   ; reserved, ignore it!
  177. NKFb_NUM       =        13                   ; numeric pad
  178. NKFb_CAPS      =        12                   ; CapsLock
  179. NKFb_ALT       =        11                   ; Alternate
  180. NKFb_CTRL      =        10                   ; Control
  181. NKFb_LSH       =        9                    ; left Shift key
  182. NKFb_RSH       =        8                    ; right Shift key
  183.  
  184. NKFb_IGNUM     =        NKFb_RESVD           ; special flag for nkc_cmp()
  185.  
  186. NKFf_FUNC      =        $8000
  187. NKFf_RESVD     =        $4000
  188. NKFf_NUM       =        $2000
  189. NKFf_CAPS      =        $1000
  190. NKFf_ALT       =        $0800
  191. NKFf_CTRL      =        $0400
  192. NKFf_LSH       =        $0200
  193. NKFf_RSH       =        $0100
  194.  
  195. NKFf_IGNUM     =        NKFf_RESVD
  196.  
  197. NKFf_SHIFT     =        $0300                ; both shift keys
  198.  
  199.  
  200.  
  201. * Special key codes for keys performing a function
  202.  
  203. NK_INVALID     =        $00                  ; invalid key code
  204. NK_UP          =        $01                  ; cursor up
  205. NK_DOWN        =        $02                  ; cursor down
  206. NK_RIGHT       =        $03                  ; cursor right
  207. NK_LEFT        =        $04                  ; cursor left
  208. NK_M_PGUP      =        $05                  ; Mac: page up
  209. NK_M_PGDOWN    =        $06                  ; Mac: page down
  210. NK_M_END       =        $07                  ; Mac: end
  211. NK_BS          =        $08                  ; Backspace
  212. NK_TAB         =        $09                  ; Tab
  213. NK_ENTER       =        $0a                  ; Enter
  214. NK_INS         =        $0b                  ; Insert
  215. NK_CLRHOME     =        $0c                  ; Clr/Home
  216. NK_RET         =        $0d                  ; Return
  217. NK_HELP        =        $0e                  ; Help
  218. NK_UNDO        =        $0f                  ; Undo
  219. NK_F1          =        $10                  ; function key #1
  220. NK_F2          =        $11                  ; function key #2
  221. NK_F3          =        $12                  ; function key #3
  222. NK_F4          =        $13                  ; function key #4
  223. NK_F5          =        $14                  ; function key #5
  224. NK_F6          =        $15                  ; function key #6
  225. NK_F7          =        $16                  ; function key #7
  226. NK_F8          =        $17                  ; function key #8
  227. NK_F9          =        $18                  ; function key #9
  228. NK_F10         =        $19                  ; function key #10
  229. NK_M_F11       =        $1a                  ; Mac: function key #11
  230. NK_ESC         =        $1b                  ; Esc
  231. NK_M_F12       =        $1c                  ; Mac: function key #12
  232. NK_M_F14       =        $1d                  ; Mac: function key #14
  233. NK_RVD1E       =        $1e                  ; reserved!
  234. NK_DEL         =        $1f                  ; Delete
  235.  
  236.                                              ; terminator for key code tables
  237. NK_TERM        =        (NKFf_FUNC|NK_INVALID)
  238.  
  239.  
  240.  
  241. * ASCII codes less than 32
  242.  
  243. NUL            =        $00                  ; Null
  244. SOH            =        $01                  ; Start Of Header
  245. STX            =        $02                  ; Start Of Text
  246. ETX            =        $03                  ; End Of Text
  247. EOT            =        $04                  ; End Of Transmission
  248. ENQ            =        $05                  ; Enquiry
  249. ACK            =        $06                  ; positive Acknowledgement
  250. BEL            =        $07                  ; Bell
  251. BS             =        $08                  ; BackSpace
  252. HT             =        $09                  ; Horizontal Tab
  253. LF             =        $0a                  ; Line Feed
  254. VT             =        $0b                  ; Vertical Tab
  255. FF             =        $0c                  ; Form Feed
  256. CR             =        $0d                  ; Carriage Return
  257. SO             =        $0e                  ; Shift Out
  258. SI             =        $0f                  ; Shift In
  259. DLE            =        $10                  ; Data Link Escape
  260. DC1            =        $11                  ; Device Control 1
  261. XON            =        $11                  ; XON: same as DC1
  262. DC2            =        $12                  ; Device Control 2
  263. DC3            =        $13                  ; Device Control 3
  264. XOFF           =        $13                  ; XOFF: same as DC3
  265. DC4            =        $14                  ; Device Control 4
  266. NAK            =        $15                  ; Negative Acknowledgement
  267. SYN            =        $16                  ; Synchronize
  268. ETB            =        $17                  ; End of Transmission Block
  269. CAN            =        $18                  ; Cancel
  270. EM             =        $19                  ; End of Medium
  271. SUB            =        $1a                  ; Substitute
  272. ESC            =        $1b                  ; Escape
  273. FS             =        $1c                  ; Form Separator
  274. GS             =        $1d                  ; Group Separator
  275. RS             =        $1e                  ; Record Separator
  276. US             =        $1f                  ; Unit Separator
  277.  
  278.  
  279.  
  280. * XBRA vector link/unlink modes
  281.  
  282. NKXM_NUM       =        0                    ; by vector number
  283. NKXM_ADR       =        1                    ; by vector address
  284.  
  285.  
  286.  
  287. * additional flag in event mask
  288.  
  289. MU_XTIMER      =        $100
  290.  
  291.  
  292. * End Of File
  293.