[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/7] console: Add graphic_hw_set_orientation()
From: |
John Baboval |
Subject: |
[Qemu-devel] [PATCH 2/7] console: Add graphic_hw_set_orientation() |
Date: |
Thu, 19 Dec 2013 13:40:12 -0500 |
From: "John V. Baboval" <address@hidden>
Add a hook in GraphicHwOps for the ui to inform the hw of display orientation
changes
Signed-off-by: John V. Baboval <address@hidden>
---
include/ui/console.h | 2 ++
ui/console.c | 10 ++++++++++
2 files changed, 12 insertions(+)
diff --git a/include/ui/console.h b/include/ui/console.h
index 9c928fa..61455d6 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -275,6 +275,7 @@ typedef struct GraphicHwOps {
void (*text_update)(void *opaque, console_ch_t *text);
void (*update_interval)(void *opaque, uint64_t interval);
void (*store_edid)(void *opaque, uint8_t *edid, size_t edid_size);
+ void (*set_orientation)(void *opaque, uint32_t x, uint32_t y, uint32_t r);
} GraphicHwOps;
QemuConsole *graphic_console_init(DeviceState *dev,
@@ -283,6 +284,8 @@ QemuConsole *graphic_console_init(DeviceState *dev,
void graphic_hw_update(QemuConsole *con);
void graphic_hw_store_edid(QemuConsole *con, uint8_t *edid, size_t edid_size);
+void graphic_hw_set_orientation(QemuConsole *con, uint32_t x, uint32_t y,
+ uint32_t r);
void graphic_hw_invalidate(QemuConsole *con);
void graphic_hw_text_update(QemuConsole *con, console_ch_t *chardata);
diff --git a/ui/console.c b/ui/console.c
index 1f6c840..22de32c 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -255,6 +255,17 @@ void graphic_hw_store_edid(QemuConsole *con, uint8_t
*edid, size_t edid_size)
}
}
+void graphic_hw_set_orientation(QemuConsole *con, uint32_t x, uint32_t y,
+ uint32_t r)
+{
+ if (!con) {
+ con = active_console;
+ }
+ if (con && con->hw_ops->set_orientation) {
+ con->hw_ops->set_orientation(con->hw, x, y, r);
+ }
+}
+
void graphic_hw_update(QemuConsole *con)
{
if (!con) {
--
1.7.9.5
- [Qemu-devel] [PATCH 0/7] Multi-head support infrastructure, John Baboval, 2013/12/19
- [Qemu-devel] [PATCH 6/7] ui: Add dpy_cursor_enable(), John Baboval, 2013/12/19
- [Qemu-devel] [PATCH 4/7] console: Add graphic_hw_notify(), John Baboval, 2013/12/19
- [Qemu-devel] [PATCH 7/7] ui: Add an opaque pointer to the DisplayChangeListener, John Baboval, 2013/12/19
- [Qemu-devel] [PATCH 5/7] ui: Add dpy_reset(), John Baboval, 2013/12/19
- [Qemu-devel] [PATCH 1/7] console: Add graphic_hw_store_edid(), John Baboval, 2013/12/19
- [Qemu-devel] [PATCH 2/7] console: Add graphic_hw_set_orientation(),
John Baboval <=
- [Qemu-devel] [PATCH 3/7] console: Add graphic_hw_add_display(), John Baboval, 2013/12/19