您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

cursor.h 754B

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