FDOSTUI
FreeDOS Text User Interface
Classes | Enumerations | Functions
poll.h File Reference

keyboard and mouse polling routines More...

Go to the source code of this file.

Classes

union  poll_event_record
 continaer to hold an event record More...
 
struct  poll_event
 structure to hold event More...
 

Enumerations

enum  poll_event_type { EVENT_KEY, EVENT_MOUSE, EVENT_SCREEN_RESIZE }
 indicator of the type of event that occurred More...
 

Functions

void poll_keyboard_unget (struct event_key const *const i_event)
 put back a key event into queue More...
 
int poll_block (struct poll_event *const o_event)
 polls event queue More...
 

Detailed Description

keyboard and mouse polling routines

Enumeration Type Documentation

◆ poll_event_type

indicator of the type of event that occurred

Enumerator
EVENT_KEY 

key event

EVENT_MOUSE 

mouse event

EVENT_SCREEN_RESIZE 

screen resize event

Function Documentation

◆ poll_block()

int poll_block ( struct poll_event *const  o_event)

polls event queue

Parameters
[out]o_eventevent object
Returns
0 internal error - no event has occurred
!0 event has occurred

Waits (blocks) in an infinite cycle for a key event to occur. Once an event has occurred the event is returned.

◆ poll_keyboard_unget()

void poll_keyboard_unget ( struct event_key const *const  i_event)

put back a key event into queue

Parameters
[in]i_eventevent to place in queue
Returns
none

The quueue can only hold one event record.