iPXE
cursor.h
Go to the documentation of this file.
00001 #ifndef CURSOR_H
00002 #define CURSOR_H
00003 
00004 /** @file
00005  *
00006  * MuCurses cursor implementation specific header file
00007  *
00008  */
00009 
00010 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
00011 
00012 struct cursor_pos {
00013         unsigned int y, x;
00014 };
00015 
00016 /**
00017  * Restore cursor position from encoded backup variable
00018  *
00019  * @v *win      window on which to operate
00020  * @v *pos      pointer to struct in which original cursor position is stored
00021  */
00022 static inline void _restore_curs_pos ( WINDOW *win, struct cursor_pos *pos ) {
00023         wmove ( win, pos->y, pos->x );
00024 }
00025 
00026 /**
00027  * Store cursor position for later restoration
00028  *
00029  * @v *win      window on which to operate
00030  * @v *pos      pointer to struct in which to store cursor position
00031  */
00032 static inline void _store_curs_pos ( WINDOW *win, struct cursor_pos *pos ) {
00033         pos->y = win->curs_y;
00034         pos->x = win->curs_x;
00035 }
00036 
00037 #endif /* CURSOR_H */