|
@@ -11,7 +11,25 @@ struct cursor_pos {
|
11
|
11
|
unsigned int y, x;
|
12
|
12
|
};
|
13
|
13
|
|
14
|
|
-void _restore_curs_pos ( WINDOW *win, struct cursor_pos *pos );
|
15
|
|
-void _store_curs_pos ( WINDOW *win, struct cursor_pos *pos );
|
|
14
|
+/**
|
|
15
|
+ * Restore cursor position from encoded backup variable
|
|
16
|
+ *
|
|
17
|
+ * @v *win window on which to operate
|
|
18
|
+ * @v *pos pointer to struct in which original cursor position is stored
|
|
19
|
+ */
|
|
20
|
+static inline void _restore_curs_pos ( WINDOW *win, struct cursor_pos *pos ) {
|
|
21
|
+ wmove ( win, pos->y, pos->x );
|
|
22
|
+}
|
|
23
|
+
|
|
24
|
+/**
|
|
25
|
+ * Store cursor position for later restoration
|
|
26
|
+ *
|
|
27
|
+ * @v *win window on which to operate
|
|
28
|
+ * @v *pos pointer to struct in which to store cursor position
|
|
29
|
+ */
|
|
30
|
+static inline void _store_curs_pos ( WINDOW *win, struct cursor_pos *pos ) {
|
|
31
|
+ pos->y = win->curs_y;
|
|
32
|
+ pos->x = win->curs_x;
|
|
33
|
+}
|
16
|
34
|
|
17
|
35
|
#endif /* CURSOR_H */
|