All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori@us.ibm.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Stefan Weil <sw@weilnetz.de>,
	Anthony Liguori <aliguori@us.ibm.com>, Alex Graf <agraf@suse.de>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: [Qemu-devel] [PATCH 1/8] console: allow VCs to be overridden by UI
Date: Sun, 26 Feb 2012 17:46:28 -0600	[thread overview]
Message-ID: <1330299995-8688-2-git-send-email-aliguori@us.ibm.com> (raw)
In-Reply-To: <1330299995-8688-1-git-send-email-aliguori@us.ibm.com>

We want to expose VCs using a VteTerminal widget.  We need access to provide our
own CharDriverState in order to do this.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
 console.c   |   14 +++++++++++++-
 console.h   |    6 +++++-
 qemu-char.c |    2 +-
 3 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/console.c b/console.c
index 6a463f5..6434ed0 100644
--- a/console.c
+++ b/console.c
@@ -1513,7 +1513,7 @@ static void text_console_do_init(CharDriverState *chr, DisplayState *ds)
         chr->init(chr);
 }
 
-CharDriverState *text_console_init(QemuOpts *opts)
+static CharDriverState *text_console_init(QemuOpts *opts)
 {
     CharDriverState *chr;
     TextConsole *s;
@@ -1549,6 +1549,18 @@ CharDriverState *text_console_init(QemuOpts *opts)
     return chr;
 }
 
+static VcHandler *vc_handler = text_console_init;
+
+int vc_init(QemuOpts *opts, CharDriverState **_chr)
+{
+    return vc_handler(opts, _chr);
+}
+
+void register_vc_handler(VcHandler *handler)
+{
+    vc_handler = handler;
+}
+
 void text_consoles_set_display(DisplayState *ds)
 {
     int i;
diff --git a/console.h b/console.h
index a95b581..56cda3c 100644
--- a/console.h
+++ b/console.h
@@ -356,7 +356,6 @@ void vga_hw_text_update(console_ch_t *chardata);
 
 int is_graphic_console(void);
 int is_fixedsize_console(void);
-CharDriverState *text_console_init(QemuOpts *opts);
 void text_consoles_set_display(DisplayState *ds);
 void console_select(unsigned int index);
 void console_color_init(DisplayState *ds);
@@ -364,6 +363,11 @@ void qemu_console_resize(DisplayState *ds, int width, int height);
 void qemu_console_copy(DisplayState *ds, int src_x, int src_y,
                        int dst_x, int dst_y, int w, int h);
 
+typedef int (VcHandler)(QemuOpts *, CharDriverState **);
+
+int vc_init(QemuOpts *opts, CharDriverState **_chr);
+void register_vc_handler(VcHandler *handler);
+
 /* sdl.c */
 void sdl_display_init(DisplayState *ds, int full_screen, int no_frame);
 
diff --git a/qemu-char.c b/qemu-char.c
index bb9e3f5..5b2b35e 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -2707,7 +2707,7 @@ static const struct {
     { .name = "socket",    .open = qemu_chr_open_socket },
     { .name = "udp",       .open = qemu_chr_open_udp },
     { .name = "msmouse",   .open = qemu_chr_open_msmouse },
-    { .name = "vc",        .open = text_console_init },
+    { .name = "vc",        .open = vc_init },
 #ifdef _WIN32
     { .name = "file",      .open = qemu_chr_open_win_file_out },
     { .name = "pipe",      .open = qemu_chr_open_win_pipe },
-- 
1.7.4.1

  reply	other threads:[~2012-02-26 23:46 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-26 23:46 [Qemu-devel] [PATCH 0/8] Add GTK UI to enable basic accessibility (v2) Anthony Liguori
2012-02-26 23:46 ` Anthony Liguori [this message]
2012-02-26 23:46 ` [Qemu-devel] [PATCH 2/8] chr: check to see if front end has registered a read function Anthony Liguori
2012-02-26 23:46 ` [Qemu-devel] [PATCH 3/8] ui: add basic GTK gui (v2) Anthony Liguori
2012-02-26 23:46 ` [Qemu-devel] [PATCH 4/8] gtk: add virtual console support (v2) Anthony Liguori
2012-02-27 10:45   ` Kevin Wolf
2012-02-26 23:46 ` [Qemu-devel] [PATCH 5/8] gtk: add support for input grabbing Anthony Liguori
2012-02-26 23:46 ` [Qemu-devel] [PATCH 6/8] gtk: add support for screen scaling and full screen (v2) Anthony Liguori
2012-02-27 20:10   ` Stefan Weil
2012-02-27 22:01     ` Anthony Liguori
2012-02-28 14:18     ` Kevin Wolf
2012-02-26 23:46 ` [Qemu-devel] [PATCH 7/8] gtk: add translation support Anthony Liguori
2012-02-27  8:32   ` Paolo Bonzini
2012-02-27 13:11     ` Anthony Liguori
2012-02-28 15:10     ` Kevin Wolf
2012-02-27 22:09   ` Stefan Weil
2012-02-26 23:46 ` [Qemu-devel] [PATCH 8/8] gtk: make default UI Anthony Liguori
2012-02-27  7:23 ` [Qemu-devel] [PATCH 0/8] Add GTK UI to enable basic accessibility (v2) malc
2012-02-27  8:21 ` Jan Kiszka
2012-02-27 13:10   ` Anthony Liguori
2012-02-27 13:26     ` Jan Kiszka
2012-02-27 13:33       ` Anthony Liguori
2012-02-27 13:42         ` Jan Kiszka
2012-02-27 13:50           ` Anthony Liguori
2012-02-27 13:54             ` Jan Kiszka
2012-02-27 16:39         ` Gerd Hoffmann
2012-02-27 16:44           ` Anthony Liguori
2012-02-27 16:54             ` Gerd Hoffmann
2012-02-27 14:24 ` Kevin Wolf
2012-02-27 14:39   ` Anthony Liguori
2012-02-27 15:03     ` Kevin Wolf
2012-03-11 17:29 ` Stefan Weil
2012-03-11 18:24   ` François Revol
2012-03-11 18:47     ` Stefan Weil
2012-03-12  2:31     ` Anthony Liguori
2012-03-12 16:39       ` François Revol
2012-03-12 17:13         ` Anthony Liguori
2012-03-12  2:30   ` Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1330299995-8688-2-git-send-email-aliguori@us.ibm.com \
    --to=aliguori@us.ibm.com \
    --cc=agraf@suse.de \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sw@weilnetz.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.