iPXE
cursor.h
Go to the documentation of this file.
1#ifndef CURSOR_H
2#define CURSOR_H
3
4/** @file
5 *
6 * MuCurses cursor implementation specific header file
7 *
8 */
9
10FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11FILE_SECBOOT ( PERMITTED );
12
13struct cursor_pos {
14 unsigned int y, x;
15};
16
17/**
18 * Restore cursor position from encoded backup variable
19 *
20 * @v *win window on which to operate
21 * @v *pos pointer to struct in which original cursor position is stored
22 */
23static inline void _restore_curs_pos ( WINDOW *win, struct cursor_pos *pos ) {
24 wmove ( win, pos->y, pos->x );
25}
26
27/**
28 * Store cursor position for later restoration
29 *
30 * @v *win window on which to operate
31 * @v *pos pointer to struct in which to store cursor position
32 */
33static inline void _store_curs_pos ( WINDOW *win, struct cursor_pos *pos ) {
34 pos->y = win->curs_y;
35 pos->x = win->curs_x;
36}
37
38#endif /* CURSOR_H */
struct _curses_window WINDOW
Curses Window struct.
static void _store_curs_pos(WINDOW *win, struct cursor_pos *pos)
Store cursor position for later restoration.
Definition cursor.h:33
static void _restore_curs_pos(WINDOW *win, struct cursor_pos *pos)
Restore cursor position from encoded backup variable.
Definition cursor.h:23
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Definition compiler.h:926
int wmove(WINDOW *win, int y, int x) __nonnull
Move a window's cursor to the specified position.
Definition mucurses.c:136
unsigned int curs_x
window cursor position
Definition curses.h:98
unsigned int curs_y
Definition curses.h:98
unsigned int x
Definition cursor.h:14
unsigned int y
Definition cursor.h:14