1 |
/* cons.h - Definitions for cons helper and callback functions. |
/* cons.h - Definitions for cons helper and callback functions. |
2 |
Copyright (C) 2002, 2003 Free Software Foundation, Inc. |
Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. |
3 |
Written by Marcus Brinkmann. |
Written by Marcus Brinkmann. |
4 |
|
|
5 |
This file is part of the GNU Hurd. |
This file is part of the GNU Hurd. |
123 |
int slack; |
int slack; |
124 |
}; |
}; |
125 |
|
|
126 |
|
/* Determines if the mouse moves relatively, to an absolute location |
127 |
|
or to an absolute location expressed by a percentage. */ |
128 |
|
enum mouse_movement |
129 |
|
{ |
130 |
|
CONS_VCONS_MOUSE_MOVE_REL, |
131 |
|
CONS_VCONS_MOUSE_MOVE_ABS, |
132 |
|
CONS_VCONS_MOUSE_MOVE_ABS_PERCENT |
133 |
|
}; |
134 |
|
|
135 |
|
/* The status of a mouse button. */ |
136 |
|
enum mouse_button |
137 |
|
{ |
138 |
|
CONS_VCONS_MOUSE_BUTTON_NO_OP, |
139 |
|
CONS_VCONS_MOUSE_BUTTON_PRESSED, |
140 |
|
CONS_VCONS_MOUSE_BUTTON_RELEASED |
141 |
|
}; |
142 |
|
|
143 |
|
/* An event produced by mouse movement an button presses. */ |
144 |
|
typedef struct mouse_event |
145 |
|
{ |
146 |
|
enum mouse_movement mouse_movement; |
147 |
|
float x; |
148 |
|
float y; |
149 |
|
|
150 |
|
enum mouse_button mouse_button; |
151 |
|
int button; |
152 |
|
} *mouse_event_t; |
153 |
|
|
154 |
|
|
155 |
/* The user must define this variable. Set this to the name of the |
/* The user must define this variable. Set this to the name of the |
156 |
console client. */ |
console client. */ |
284 |
down. */ |
down. */ |
285 |
int cons_vcons_scrollback (vcons_t vcons, cons_scroll_t type, float value); |
int cons_vcons_scrollback (vcons_t vcons, cons_scroll_t type, float value); |
286 |
|
|
287 |
|
/* Set the mouse cursor position to X, Y. VCONS is locked. */ |
288 |
|
error_t cons_vcons_set_mousecursor_pos (vcons_t vcons, float x, float y); |
289 |
|
|
290 |
|
/* If STATUS is set to 0, hide the mouse cursor, otherwise show |
291 |
|
it. VCONS is locked. */ |
292 |
|
error_t cons_vcons_set_mousecursor_status (vcons_t vcons, int status); |
293 |
|
|
294 |
|
|
295 |
|
|
296 |
extern const struct argp cons_startup_argp; |
extern const struct argp cons_startup_argp; |
297 |
|
|
322 |
/* Redraw the virtual console VCONS, which is locked. */ |
/* Redraw the virtual console VCONS, which is locked. */ |
323 |
void cons_vcons_refresh (vcons_t vcons); |
void cons_vcons_refresh (vcons_t vcons); |
324 |
|
|
325 |
|
/* Handle the event EV on the virtual console VCONS. */ |
326 |
|
error_t cons_vcons_move_mouse (vcons_t vcons, mouse_event_t ev); |
327 |
|
|
328 |
#endif /* hurd/cons.h */ |
#endif /* hurd/cons.h */ |