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

Data structures for event handling. More...

Go to the source code of this file.

Classes

struct  event_key
 container for a keyboard event More...
 
struct  event_mouse
 container for a mouse event More...
 
struct  event_resize
 container for a resize event More...
 

Enumerations

enum  event_response {
  RESPONSE_CANCEL = -4, RESPONSE_ACCEPT = -3, RESPONSE_CLOSE = -2, RESPONSE_HANDLED = -1,
  RESPONSE_NONE = 0
}
 response More...
 
enum  mouse_state { MOUSE_BUTTON_NONE = 0, MOUSE_BUTTON_CLICKED, MOUSE_BUTTON_DRAGGING, MOUSE_BUTTON_RELEASED }
 mouse state More...
 

Detailed Description

Data structures for event handling.

Enumeration Type Documentation

◆ event_response

response

An event handler is required to respond to an event such as mouse or keyboard. The handler does not have to use the response values. Any value can be used. Consequently, it is up to the caller to intrepret and take action on the value.

The only caveat is the window manager wm_run_modal routine. This routine will evaulate the response and exit the run loop if certain conditions are met.

See also
wm_run_modal
Enumerator
RESPONSE_CANCEL 

handler requests to cancel

RESPONSE_ACCEPT 

handler accepted (closure)

RESPONSE_CLOSE 

handler requests close

RESPONSE_HANDLED 

event was handled. no more processing needed.

RESPONSE_NONE 

event was ignored/not handled

◆ mouse_state

mouse state

Enumerator
MOUSE_BUTTON_NONE 

no buttons (mouse moved)

MOUSE_BUTTON_CLICKED 

button was clicked

MOUSE_BUTTON_DRAGGING 

button is still clicked/dragging

MOUSE_BUTTON_RELEASED 

button has been released