[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/6] ui: add basic GTK gui
From: |
Stefan Weil |
Subject: |
Re: [Qemu-devel] [PATCH 2/6] ui: add basic GTK gui |
Date: |
Mon, 20 Feb 2012 21:45:15 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.27) Gecko/20120216 Thunderbird/3.1.19 |
Am 20.02.2012 00:45, schrieb Anthony Liguori:
This is minimalistic and just contains the basic widget
infrastructure. The GUI
consists of a menu and a GtkNotebook. To start with, the notebook has
its tabs
hidden which provides a UI that looks very similar to SDL with the
exception of
the menu bar.
The menu bar allows a user to toggle the visibility of the tabs. Cairo
is used
for rendering.
I used gtk-vnc as a reference. gtk-vnc solves the same basic problems
as QEMU
since it was originally written as a remote display for QEMU. So for
the most
part, the approach to rendering and keyboard handling should be pretty
solid for
GTK.
Signed-off-by: Anthony Liguori <address@hidden>
---
Makefile | 2 +
Makefile.objs | 1 +
configure | 25 +++-
console.h | 4 +
sysemu.h | 1 +
ui/gtk.c | 551 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 583 insertions(+), 1 deletions(-)
create mode 100644 ui/gtk.c
This patch compiles, but does not provide the minimalistic interface
because the hooks in vl.c are missing. Parts of patch 6 might be
moved to patch 2.
Patch 2 could also be improved by removing the dependency on VTE.
For some platforms (w32), providing VTE is really a big challenge.
I did not find a precompiled version and still did not succeed
in compiling it because of a large and still incomplete dependency
chain...
What about offering compilation without VTE also in the "final"
version of the GTK gui (--enable-vte, --disable-vte)?
These includes in ui/gtk.c were not needed:
+#include <vte/vte.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <sys/wait.h>
+#include <pty.h>
If the version using VTE needs them, qemu_socket.h should be
used (needed for w32 which does neither have sys/socket.h
nor pty.h). Maybe most of these includes are not needed at all
(relict from VNC?).
With a patched vl.c and ui/gtk.c, the new GUI starts on w32
but does not work stable.
After some minutes, the GUI freezes (no more updates, menu no
longer working).
The configuration support still does not work as expected:
configure should support --enable-gtk, --disable-gtk with the
usual semantic (no GTK UI if --disable-gtk was given, fail if
--enable-gtk was given and GTK is not found, provide help message).
The GTK user interface is a good starting point for a more
powerful and user friendly interface.
Nevertheless SDL should not be removed for the next few years.
I would not mind if buggy features like zooming were removed
from SDL again, but having a GUI which also works with framebuffers
(without X) and which has much less requirements than GTK+-2.0
(and perhaps also a reduced risk of security problems)
is a good feature.
Cheers,
Stefan Weil
PS: git complains about whitespace at eol in some of the patches,
and checkpatch.pl is also very noisy :-)
- [Qemu-devel] [PATCH 0/6] Add GTK UI to enable basic accessibility, Anthony Liguori, 2012/02/19
- [Qemu-devel] [PATCH 1/6] console: allow VCs to be overridden by UI, Anthony Liguori, 2012/02/19
- Re: [Qemu-devel] [PATCH 1/6] console: allow VCs to be overridden by UI, Gerd Hoffmann, 2012/02/20
- Re: [Qemu-devel] [PATCH 1/6] console: allow VCs to be overridden by UI, Anthony Liguori, 2012/02/20
- Re: [Qemu-devel] [PATCH 1/6] console: allow VCs to be overridden by UI, Gerd Hoffmann, 2012/02/20
- Re: [Qemu-devel] [PATCH 1/6] console: allow VCs to be overridden by UI, Anthony Liguori, 2012/02/20
- Re: [Qemu-devel] [PATCH 1/6] console: allow VCs to be overridden by UI, Gerd Hoffmann, 2012/02/20
- Re: [Qemu-devel] [PATCH 1/6] console: allow VCs to be overridden by UI, Anthony Liguori, 2012/02/20
[Qemu-devel] [PATCH 2/6] ui: add basic GTK gui, Anthony Liguori, 2012/02/19
- Re: [Qemu-devel] [PATCH 2/6] ui: add basic GTK gui,
Stefan Weil <=
[Qemu-devel] [PATCH 3/6] gtk: add virtual console support, Anthony Liguori, 2012/02/19
[Qemu-devel] [PATCH 4/6] gtk: add support for input grabbing, Anthony Liguori, 2012/02/19
[Qemu-devel] [PATCH 5/6] gtk: add support for screen scaling and full screen, Anthony Liguori, 2012/02/19