RTEMS: Mouse Parser Engine

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
Macros | Typedefs | Functions
Mouse Parser Engine
Device Drivers » Serial Mouse

## 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.
void | mouse_parser_enqueue (unsigned char *buffer, size_t size)
| Enqueue input to the mouse parser engine.

## 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

  This | method returns 0 on success and -1 on error.