aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/tbi/win.c11
-rw-r--r--lib/tbi/win.h11
2 files changed, 22 insertions, 0 deletions
diff --git a/lib/tbi/win.c b/lib/tbi/win.c
index bf674a2..9129403 100644
--- a/lib/tbi/win.c
+++ b/lib/tbi/win.c
@@ -106,3 +106,14 @@ VOID wattroff(struct window *w)
w->cur_attr = w->scr->attr;
}
+
+BOOLEAN wmove(struct window *w, INT32 x, INT32 y)
+{
+ ASSERT(w != NULL);
+ CHECK_POSITION(w, x, y);
+
+ w->curx = x;
+ w->cury = y;
+ return TRUE;
+}
+
diff --git a/lib/tbi/win.h b/lib/tbi/win.h
index 1539877..9057369 100644
--- a/lib/tbi/win.h
+++ b/lib/tbi/win.h
@@ -74,4 +74,15 @@ VOID wattrset(struct window *w, INT32 attr);
*/
VOID wattroff(struct window *w);
+/*
+ * Moves cursor position to specified coordinates
+ *
+ * w: the window on which to operate
+ * x: the X(column) coordinate
+ * y: the Y(row) coordinate
+ *
+ * return: FALSE upon failure and TRUE upon successful completion
+*/
+BOOLEAN wmove(struct window *w, INT32 x, INT32 y);
+
#endif /* UFM_TBI_WINDOW_H */