Patchwork [17/24] console: make DisplayState private to console.c

login
register
mail settings
Submitter Gerd Hoffmann
Date April 4, 2013, 7:28 a.m.
Message ID <1365060546-24638-18-git-send-email-kraxel@redhat.com>
Download mbox | patch
Permalink /patch/233671/
State New
Headers show

Comments

Gerd Hoffmann - April 4, 2013, 7:28 a.m.
With gui_* being moved to console.c nobody outside console.c needs
access to DisplayState fields any more.  Make the struct private.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 include/ui/console.h |    8 --------
 ui/console.c         |    8 ++++++++
 2 files changed, 8 insertions(+), 8 deletions(-)

Patch

diff --git a/include/ui/console.h b/include/ui/console.h
index d92626b..50cd7b0 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -182,14 +182,6 @@  struct DisplayChangeListener {
     QLIST_ENTRY(DisplayChangeListener) next;
 };
 
-struct DisplayState {
-    struct QEMUTimer *gui_timer;
-    bool have_gfx;
-    bool have_text;
-
-    QLIST_HEAD(, DisplayChangeListener) listeners;
-};
-
 DisplayState *init_displaystate(void);
 DisplaySurface* qemu_create_displaysurface_from(int width, int height, int bpp,
                                                 int linesize, uint8_t *data,
diff --git a/ui/console.c b/ui/console.c
index 1ca50fc..ea8c218 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -157,6 +157,14 @@  struct QemuConsole {
     QEMUTimer *kbd_timer;
 };
 
+struct DisplayState {
+    struct QEMUTimer *gui_timer;
+    bool have_gfx;
+    bool have_text;
+
+    QLIST_HEAD(, DisplayChangeListener) listeners;
+};
+
 static DisplayState *display_state;
 static QemuConsole *active_console;
 static QemuConsole *consoles[MAX_CONSOLES];