You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef CURSOR_H
  2. #define CURSOR_H
  3. /** @file
  4. *
  5. * MuCurses cursor implementation specific header file
  6. *
  7. */
  8. FILE_LICENCE ( GPL2_OR_LATER );
  9. struct cursor_pos {
  10. unsigned int y, x;
  11. };
  12. /**
  13. * Restore cursor position from encoded backup variable
  14. *
  15. * @v *win window on which to operate
  16. * @v *pos pointer to struct in which original cursor position is stored
  17. */
  18. static inline void _restore_curs_pos ( WINDOW *win, struct cursor_pos *pos ) {
  19. wmove ( win, pos->y, pos->x );
  20. }
  21. /**
  22. * Store cursor position for later restoration
  23. *
  24. * @v *win window on which to operate
  25. * @v *pos pointer to struct in which to store cursor position
  26. */
  27. static inline void _store_curs_pos ( WINDOW *win, struct cursor_pos *pos ) {
  28. pos->y = win->curs_y;
  29. pos->x = win->curs_x;
  30. }
  31. #endif /* CURSOR_H */