diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-03-26 16:25:35 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-03-26 16:25:35 -0700 |
commit | 9eddd22a7b53b1d02fbae0d987df8af122924248 (patch) | |
tree | 882f5152880b0b1aa2d7a0619d30065acc69fb16 /gpxe/src/hci/mucurses/cursor.h | |
parent | bbb8f15936b851e6a0ef6f7bb2c95197bff35994 (diff) | |
download | syslinux-9eddd22a7b53b1d02fbae0d987df8af122924248.tar.gz |
Add gPXE into the source tree; build unified imagesyslinux-3.70-pre7
Diffstat (limited to 'gpxe/src/hci/mucurses/cursor.h')
-rw-r--r-- | gpxe/src/hci/mucurses/cursor.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/gpxe/src/hci/mucurses/cursor.h b/gpxe/src/hci/mucurses/cursor.h new file mode 100644 index 00000000..af86519c --- /dev/null +++ b/gpxe/src/hci/mucurses/cursor.h @@ -0,0 +1,35 @@ +#ifndef CURSOR_H +#define CURSOR_H + +/** @file + * + * MuCurses cursor implementation specific header file + * + */ + +struct cursor_pos { + unsigned int y, x; +}; + +/** + * Restore cursor position from encoded backup variable + * + * @v *win window on which to operate + * @v *pos pointer to struct in which original cursor position is stored + */ +static inline void _restore_curs_pos ( WINDOW *win, struct cursor_pos *pos ) { + wmove ( win, pos->y, pos->x ); +} + +/** + * Store cursor position for later restoration + * + * @v *win window on which to operate + * @v *pos pointer to struct in which to store cursor position + */ +static inline void _store_curs_pos ( WINDOW *win, struct cursor_pos *pos ) { + pos->y = win->curs_y; + pos->x = win->curs_x; +} + +#endif /* CURSOR_H */ |