1
0
mirror of https://github.com/simh/simh.git synced 2026-04-17 08:41:28 +00:00

display: Add ability for device code to optionally handle keyboard input events

This commit is contained in:
Mark Pizzolato
2018-12-14 01:01:35 -08:00
parent 6e7127d954
commit c2b45a26e6
2 changed files with 40 additions and 9 deletions

View File

@@ -199,6 +199,20 @@ extern t_bool vid_active;
extern uint32 vid_mono_palette[2];
void vid_set_cursor_position (int32 x, int32 y); /* cursor position (set by calling code) */
/* A device simulator can optionally set the vid_display_kb_event_process
* routine pointer to the address of a routine.
* Simulator code which uses the display library which processes window
* keyboard data with code in display/sim_ws.c can use this routine to
* explicitly get access to keyboard events that arrive in the display
* window. This routine should return 0 if it has handled the event that
* was passed, and non zero if it didn't handle it. If the routine address
* is not set or a non zero return value occurs, then the keyboard event
* will be processed by the display library which may then be handled as
* console character input if the device console code is implemented to
* accept this.
*/
extern int (*vid_display_kb_event_process)(SIM_KEY_EVENT *kev);
#define SIM_VID_DBG_MOUSE 0x01000000
#define SIM_VID_DBG_CURSOR 0x02000000
#define SIM_VID_DBG_KEY 0x04000000