win32tty keystroke handling

- Move the code for keystroke handling into its own source file.
- Compile and link it as a dynamic link library.
- Dynamically load the keystroke handler at runtime
- Add support for specifying a different handler in defaults.nh
  so that internationalization issues can be dealt with without
  rebuilding nethack, just supply alternative handlers in HACKDIR.

The following exported functions need to be present in
the keystroke handler .dll:
ProcessKeystroke - returns an ascii value to NetHack
NHkbhit  - allows peeking to see if a key/mouse press is waiting
SourceWhere - returns location for souce code for a keystroke handler
SourceAuthor  - returns author information for a keystroke handler
KeyHandlerName  - returns the full or short name of the keystroke handling dll.
This commit is contained in:
nethack.allison
2003-03-09 15:44:50 +00:00
parent daed1ff394
commit 78ce3749dc
8 changed files with 470 additions and 224 deletions

View File

@@ -2401,6 +2401,7 @@ dotravel()
#ifdef PORT_DEBUG
# ifdef WIN32CON
extern void NDECL(win32con_debug_keystrokes);
extern void NDECL(win32con_author_info);
# endif
int
@@ -2417,6 +2418,7 @@ wiz_port_debug()
} menu_selections[] = {
#ifdef WIN32CON
{"test win32 keystrokes", win32con_debug_keystrokes},
{"show keystroke handler information", win32con_handler_info},
#endif
{(char *)0, (void NDECL((*)))0} /* array terminator */
};