source: rtems/cpukit/libmisc/mouse/mouse_parser.h @ b8fc260f

4.115
Last change on this file since b8fc260f was b8fc260f, checked in by Joel Sherrill <joel.sherrill@…>, on 12/28/12 at 15:48:37

Miscellaneous Doxygen clean-up

  • Property mode set to 100644
File size: 2.9 KB
Line 
1/**
2 * @file rtems/mouse_parser.h
3 *
4 * This file is the header file for the Mouse Parser Engine.
5 */
6
7/*
8 * This file is derived from a UNIX Serial Port Mouse Driver with the
9 * following notice:
10 *
11 * ==================================================================
12 * Copyright (c) 1999 Greg Haerr <greg@censoft.com>
13 * Portions Copyright (c) 1991 David I. Bell
14 * Permission is granted to use, distribute, or modify this source,
15 * provided that this copyright notice remains intact.
16 *
17 * UNIX Serial Port Mouse Driver
18 *
19 * This driver opens a serial port directly, and interprets serial data.
20 * Microsoft, PC, Logitech and PS/2 mice are supported.  The PS/2 mouse
21 * is only supported if the OS runs the mouse byte codes through the
22 * serial port.
23 *
24 * Mouse Types Supported: pc  ms, logi, ps2
25 * ==================================================================
26 *
27 * It has been modified to support the concept of being just a parser
28 * fed data from an arbitrary source.  It is independent of either
29 * a PS/2 driver or a serial port.
30 *
31 * It was moved to cpukit/libmisc/mouse by Joel Sherrill.
32 */
33
34#ifndef __MOUSE_PARSER_h__
35#define __MOUSE_PARSER_h__
36
37#include <rtems/mw_uid.h>
38
39/**
40 *  @defgroup libmisc_mouse Mouse Parser Engine
41 *
42 *  @ingroup libmisc
43 */
44/**@{*/
45#ifdef __cplusplus
46extern "C" {
47#endif
48
49/**
50 *  This is the mask for the right button.
51 *
52 *  @note Use the same definitions as the user interface.
53 */
54#define RBUTTON      MV_BUTTON_RIGHT
55
56/**
57 * This is the mask for the center button.
58 *
59 *  @note Use the same definitions as the user interface.
60 */
61#define MBUTTON      MV_BUTTON_CENTER
62
63/**
64 *  This is the mask for the left button.
65 *
66 *  @note Use the same definitions as the user interface.
67 */
68#define LBUTTON      MV_BUTTON_LEFT
69
70/**
71 *  This type is the device coordinates.
72 */
73typedef int           COORD;
74
75/**
76 *  This type is the mouse button mask.
77 */
78typedef unsigned int  BUTTON;
79
80/**
81 *  This type defines a pointer to the enqueue method.  It is
82 *  available since some device drivers keep pointers to the method
83 *  to know when to enqueue or not.
84 */
85typedef void (*mouse_parser_enqueue_handler)(unsigned char *, size_t);
86
87/**
88 *  @brief Initialize the mouse parser engine.
89 *
90 *  This method initializes the Mouse Parser Engine for the mouse
91 *  of @a type. The @a type should be one of the following strings:
92 *  pc  ms, logi, ps2.
93 *
94 *  @a param[in] type indicates the type of mouse.
95 *
96 *  @return This method returns 0 on success and -1 on error.
97 */
98int mouse_parser_initialize(const char *type);
99
100/**
101 *  @brief Enqueue input to the mouse parser engine.
102 *
103 *  This method is used to pass mouse input to the Mouse Parser Engine.
104 *
105 *  @a param[in] buffer is the data to enqueue
106 *  @a param[in] size is the amount of data to enqueue
107 */
108void mouse_parser_enqueue(
109  unsigned char *buffer,
110  size_t         size
111);
112
113#ifdef __cplusplus
114}
115#endif
116
117/**@}*/
118
119#endif
Note: See TracBrowser for help on using the repository browser.