summaryrefslogtreecommitdiffstats
path: root/src/include/curses.h
diff options
context:
space:
mode:
authorMichael Brown2006-05-15 11:51:18 +0200
committerMichael Brown2006-05-15 11:51:18 +0200
commit6b514393d3bb77b509e98685b62cc9fe4b254da1 (patch)
tree10d6744dd933ad65a5c57f6c30b4f66b3f6187e2 /src/include/curses.h
parentfixed build error (danjlynch, repeat: this is *not* perl, this is *not* perl...) (diff)
downloadipxe-6b514393d3bb77b509e98685b62cc9fe4b254da1.tar.gz
ipxe-6b514393d3bb77b509e98685b62cc9fe4b254da1.tar.xz
ipxe-6b514393d3bb77b509e98685b62cc9fe4b254da1.zip
Change movetoyx(), putc() and getc() to methods of the screen.
Diffstat (limited to 'src/include/curses.h')
-rw-r--r--src/include/curses.h49
1 files changed, 23 insertions, 26 deletions
diff --git a/src/include/curses.h b/src/include/curses.h
index 6cffb542..911c51aa 100644
--- a/src/include/curses.h
+++ b/src/include/curses.h
@@ -28,6 +28,29 @@ typedef chtype attr_t;
/** Curses SCREEN object */
typedef struct _curses_screen {
+ /**
+ * Move cursor to position specified by x,y coords
+ *
+ * @v scr screen on which to operate
+ * @v y Y position
+ * @v x X position
+ */
+ void ( * movetoyx ) ( struct _curses_screen *scr,
+ unsigned int y, unsigned int x );
+ /**
+ * Write character to current cursor position
+ *
+ * @v scr screen on which to operate
+ * @v c character to be written
+ */
+ void ( * putc ) ( struct _curses_screen *scr, chtype c );
+ /**
+ * Read a character
+ *
+ * @v scr screen on which to operate
+ * @ret c character
+ */
+ int ( * getc ) ( struct _curses_screen *scr );
} SCREEN;
/** Curses Window struct */
@@ -813,32 +836,6 @@ static inline int waddstr ( WINDOW *win, const char *str ) {
* Primitives
*/
/**
- * Move cursor to position specified by x,y coords
- *
- * @v *scr screen on which to operate
- * @v y Y position
- * @v x X position
- * @ret rc void function
- */
-void _movetoyx ( struct _curses_screen *scr, unsigned int y, unsigned int x );
-/**
- * Write character (c) to current cursor position
- *
- * @v *scr screen on which to operate
- * @v c character to be written
- * @ret rc void function
- */
-void _putc ( struct _curses_screen *scr, unsigned int c );
-/**
- * Retrieve a character from current cursor position and store
- * it in c
- *
- * @v *scr screen on which to operate
- * @v *c char ptr where retrieved character is to be stored
- * @ret rc void function
- */
-void _getc ( struct _curses_screen *scr, unsigned int *c );
-/**
* Advance cursor (wrap text)
*
* @v *win window in which to advance