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 
10 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11 FILE_SECBOOT ( PERMITTED );
12 
13 struct 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  */
23 static 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  */
33 static 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 */
int wmove(WINDOW *win, int y, int x) __nonnull
Move a window's cursor to the specified position.
Definition: mucurses.c:136
Curses Window struct.
Definition: curses.h:90
unsigned int curs_y
Definition: curses.h:98
unsigned int y
Definition: cursor.h:14
FILE_SECBOOT(PERMITTED)
static void _restore_curs_pos(WINDOW *win, struct cursor_pos *pos)
Restore cursor position from encoded backup variable.
Definition: cursor.h:23
unsigned int x
Definition: cursor.h:14
static void _store_curs_pos(WINDOW *win, struct cursor_pos *pos)
Store cursor position for later restoration.
Definition: cursor.h:33
unsigned int curs_x
window cursor position
Definition: curses.h:98
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)