diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2013-03-13 14:04:18 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2013-04-16 09:03:49 +0200 |
commit | 380cd056ec0e7fc8bbd553cdcb061d3ca612bb82 (patch) | |
tree | e8097697817029ca6d545b8f68ba9761fb0f8164 /include/ui | |
parent | 27be55872dd747c733a42a3d90864d9f59272d26 (diff) | |
download | qemu-380cd056ec0e7fc8bbd553cdcb061d3ca612bb82.zip |
console: add GraphicHwOps
Pass a single GraphicHwOps struct pointer to graphic_console_init,
instead of a bunch of function pointers.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'include/ui')
-rw-r--r-- | include/ui/console.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/ui/console.h b/include/ui/console.h index 50cd7b0560..f3e779193c 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -267,13 +267,13 @@ static inline void console_write_ch(console_ch_t *dest, uint32_t ch) *dest = ch; } -typedef void (*graphic_hw_update_ptr)(void *); -typedef void (*graphic_hw_invalidate_ptr)(void *); -typedef void (*graphic_hw_text_update_ptr)(void *, console_ch_t *); +typedef struct GraphicHwOps { + void (*invalidate)(void *opaque); + void (*gfx_update)(void *opaque); + void (*text_update)(void *opaque, console_ch_t *text); +} GraphicHwOps; -QemuConsole *graphic_console_init(graphic_hw_update_ptr update, - graphic_hw_invalidate_ptr invalidate, - graphic_hw_text_update_ptr text_update, +QemuConsole *graphic_console_init(const GraphicHwOps *ops, void *opaque); void graphic_hw_update(QemuConsole *con); |