RTEMS  5.1
Macros | Typedefs | Functions
Mouse Parser Engine

Macros

#define RBUTTON   MV_BUTTON_RIGHT
 
#define MBUTTON   MV_BUTTON_CENTER
 
#define LBUTTON   MV_BUTTON_LEFT
 

Typedefs

typedef int COORD
 
typedef unsigned int BUTTON
 
typedef void(* mouse_parser_enqueue_handler) (unsigned char *, size_t)
 

Functions

int mouse_parser_initialize (const char *type)
 Initialize the mouse parser engine. More...
 
void mouse_parser_enqueue (unsigned char *buffer, size_t size)
 Enqueue input to the mouse parser engine. More...
 

Detailed Description

Macro Definition Documentation

◆ LBUTTON

#define LBUTTON   MV_BUTTON_LEFT

This is the mask for the left button.

Note
Use the same definitions as the user interface.

◆ MBUTTON

#define MBUTTON   MV_BUTTON_CENTER

This is the mask for the center button.

Note
Use the same definitions as the user interface.

◆ RBUTTON

#define RBUTTON   MV_BUTTON_RIGHT

This is the mask for the right button.

Note
Use the same definitions as the user interface.

Typedef Documentation

◆ BUTTON

typedef unsigned int BUTTON

This type is the mouse button mask.

◆ COORD

typedef int COORD

This type is the device coordinates.

◆ mouse_parser_enqueue_handler

typedef void(* mouse_parser_enqueue_handler) (unsigned char *, size_t)

This type defines a pointer to the enqueue method. It is available since some device drivers keep pointers to the method to know when to enqueue or not.

Function Documentation

◆ mouse_parser_enqueue()

void mouse_parser_enqueue ( unsigned char *  buffer,
size_t  size 
)

Enqueue input to the mouse parser engine.

This method is used to pass mouse input to the Mouse Parser Engine.

param[in] buffer is the data to enqueue param[in] size is the amount of data to enqueue

◆ mouse_parser_initialize()

int mouse_parser_initialize ( const char *  type)

Initialize the mouse parser engine.

This method initializes the Mouse Parser Engine for the mouse of type. The type should be one of the following strings: pc ms, logi, ps2.

param[in] type indicates the type of mouse.

Return values
Thismethod returns 0 on success and -1 on error.