FDOSTUI
FreeDOS Text User Interface
Classes | Functions | Variables
mouse.h File Reference

mouse routines More...

Go to the source code of this file.

Classes

struct  mouse_event
 contianer for mouse event More...
 

Functions

int mouse_get_event (struct mouse_event __FAR *o_event)
 retrieves a mouse event from the queue More...
 
int mouse_init ()
 initializes the mouse More...
 
void mouse_deinit ()
 clean up the mouse handler More...
 
void mouse_show ()
 shows the mouse cursor
 
void mouse_hide ()
 hides the mouse cursor More...
 

Variables

short int mouse_initialized
 

Detailed Description

mouse routines

Function Documentation

◆ mouse_deinit()

void mouse_deinit ( )

clean up the mouse handler

Returns
none

This routine can safely be called after a failed call to mouse_init. It checks the mouse_initialized flag, and if set will uninstall the handler and clean up the queue.

◆ mouse_get_event()

int mouse_get_event ( struct mouse_event __FAR *  o_event)

retrieves a mouse event from the queue

Parameters
[out]o_eventevent structure to fill
Returns
0 mouse event not available
!0 mouse event has been filled

◆ mouse_hide()

void mouse_hide ( )

hides the mouse cursor

Returns
none

◆ mouse_init()

int mouse_init ( )

initializes the mouse

Returns
-1 mouse is not supported (driver not installed)
0 success mouse has been initialized

This routine initializes the mouse handler and queue. It must only be called once. Equally important is to invoke mouse_deinit when finished. This removes the interrupt handler. Otherwise, after the application exists, and a mouse event occurs it will crash the system.

Variable Documentation

◆ mouse_initialized

mouse_initialized

indicator if mouse has been initialized