summaryrefslogtreecommitdiff
path: root/console.h
diff options
context:
space:
mode:
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2008-02-10 16:33:14 +0000
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2008-02-10 16:33:14 +0000
commit4d3b6f6e126553107a78999bd1070b086ae3c023 (patch)
tree53efc029b509407306b900d509256fdaabd6f49f /console.h
parentc0be16d39fd7187764dcd3d65a63167c92e48142 (diff)
downloadqemu-4d3b6f6e126553107a78999bd1070b086ae3c023.tar.gz
Add an ncurses UI.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3976 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'console.h')
-rw-r--r--console.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/console.h b/console.h
index 1ac74fad3f..b8a5c6d22a 100644
--- a/console.h
+++ b/console.h
@@ -79,6 +79,7 @@ struct DisplayState {
int dst_x, int dst_y, int w, int h);
void (*dpy_fill)(struct DisplayState *s, int x, int y,
int w, int h, uint32_t c);
+ void (*dpy_text_cursor)(struct DisplayState *s, int x, int y);
void (*mouse_set)(int x, int y, int on);
void (*cursor_define)(int width, int height, int bpp, int hot_x, int hot_y,
uint8_t *image, uint8_t *mask);
@@ -94,17 +95,32 @@ static inline void dpy_resize(DisplayState *s, int w, int h)
s->dpy_resize(s, w, h);
}
+static inline void dpy_cursor(DisplayState *s, int x, int y)
+{
+ if (s->dpy_text_cursor)
+ s->dpy_text_cursor(s, x, y);
+}
+
+typedef unsigned long console_ch_t;
+static inline void console_write_ch(console_ch_t *dest, uint32_t ch)
+{
+ cpu_to_le32wu((uint32_t *) dest, ch);
+}
+
typedef void (*vga_hw_update_ptr)(void *);
typedef void (*vga_hw_invalidate_ptr)(void *);
typedef void (*vga_hw_screen_dump_ptr)(void *, const char *);
+typedef void (*vga_hw_text_update_ptr)(void *, console_ch_t *);
TextConsole *graphic_console_init(DisplayState *ds, vga_hw_update_ptr update,
vga_hw_invalidate_ptr invalidate,
vga_hw_screen_dump_ptr screen_dump,
+ vga_hw_text_update_ptr text_update,
void *opaque);
void vga_hw_update(void);
void vga_hw_invalidate(void);
void vga_hw_screen_dump(const char *filename);
+void vga_hw_text_update(console_ch_t *chardata);
int is_graphic_console(void);
CharDriverState *text_console_init(DisplayState *ds, const char *p);
@@ -124,6 +140,9 @@ int vnc_display_open(DisplayState *ds, const char *display);
int vnc_display_password(DisplayState *ds, const char *password);
void do_info_vnc(void);
+/* curses.c */
+void curses_display_init(DisplayState *ds, int full_screen);
+
/* x_keymap.c */
extern uint8_t _translate_keycode(const int key);