[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: gtk2 driver
From: |
Jim C. Brown |
Subject: |
[Qemu-devel] Re: gtk2 driver |
Date: |
Fri, 27 May 2005 11:28:33 -0400 |
User-agent: |
Mutt/1.4i |
On Fri, May 27, 2005 at 12:59:32PM +0200, Sebastien Bechet wrote:
> Hello Jim,
>
> As fabrice know, i have done some work about it, but no time to debug.
> Nevertheless, I think the code is near to work.
>
> Maybe it can help you or someone to finish gtk2 driver...
> (you can apply it directly on CVS, see TODO on gtk.c top for bugs)
>
> Bye.
>
> --
> Sebastien Bechet <address@hidden>
> av7.net
Wow...your code looks almost identical to mine. I suppose that shouldnt be
surprising, considering that they are both based off of sdl.c ... still I wish
I had known about this before I spent 10 hours writing a gtk2.c from scratch.
I fixed the segfault, so ... the code is ready for release. Apply Makefile.diff
to the Makefile in i386-softmmu - you may need to change the include dirs or
library flags. Check 'gtk-config --cflags' and 'gtk-config --libs' to be sure.
Note that the patched Makefile compiles gtk2.c into sdl.o, I plan on fixing
that very soon. Bugs:
- kludged Makefile - I do plan to merge in your configure and Makefile patches,
but this kludge allowed me to write/debug gtkqemu a lot faster
- modifier detection isnt working, so its difficult to get a grab and not
possible to ungrab - this is why the no-sdl-grab patch is included
- it is a bad idea to resize the window manually
- you cant close the GTK window normally - must use 'quit' in qemu monitor if
the OS doesnt close qemu thru APM
- GDK grab/ungrab code untested
- full screen mode untested
- need to use "-monitor stdio" because changing virtual consoles doesnt work
- probably a few more that I haven't noticed yet
However, it boots and runs fine with Minix, Windows 98, and KNOPPIX V3.7.
The major difference between your code and mine is that you use GdkPixbuf
while I paint a GdkImage directly on the window. I decided against GdkPixbuf
because it was too high level, and I wasn't sure how to convert the pixel
buffer into the format needed by vga.c
Personally, I think GTK is a bad way to go for something like this (SDL is a
better choice but ideally you'd want something like OpenGL). I only wrote this
because A) Fabrice continues to insist on GTK for linux but wont explain why
B) I wanted to see if it was possible and how it could be done and C) I had
a day off.
gtk2.c
Description: Text document
gdk_keysym.h
Description: Text document
Makefile.diff
Description: Text document
- [Qemu-devel] [PATCH] Embed QEmu screen on a custom window, Miguel Angel Fraile, 2005/05/26
- Re: [Qemu-devel] [PATCH] Embed QEmu screen on a custom window, Christian MICHON, 2005/05/26
- Re: [Qemu-devel] [PATCH] Embed QEmu screen on a custom window, Oliver Gerlich, 2005/05/26
- Re: [Qemu-devel] [PATCH] Embed QEmu screen on a custom window, Fabrice Bellard, 2005/05/26
- Re: gtk [was Re: [Qemu-devel] [PATCH] Embed QEmu screen on a custom window], Jim C. Brown, 2005/05/27
- [Qemu-devel] gtk2 driver, Sebastien Bechet, 2005/05/27
- [Qemu-devel] Re: gtk2 driver,
Jim C. Brown <=
- Re: [Qemu-devel] Re: gtk2 driver, Jim C. Brown, 2005/05/27
- Re: [Qemu-devel] Re: gtk2 driver, Jim C. Brown, 2005/05/27
- Re: [Qemu-devel] [PATCH] Embed QEmu screen on a custom window, Christian MICHON, 2005/05/26
- Re: [Qemu-devel] [PATCH] Embed QEmu screen on a custom window, Fabrice Bellard, 2005/05/26
- Re: [Qemu-devel] [PATCH] Embed QEmu screen on a custom window, Pierre d'Herbemont, 2005/05/27
- Re: [Qemu-devel] [PATCH] Embed QEmu screen on a custom window, Christian MICHON, 2005/05/28
- Re: [Qemu-devel] [PATCH] Embed QEmu screen on a custom window, Oliver Gerlich, 2005/05/28
- Re: [Qemu-devel] [PATCH] Embed QEmu screen on a custom window, Joe Batt, 2005/05/28
- Re: [Qemu-devel] [PATCH] Embed QEmu screen on a custom window, Jernej Simončič, 2005/05/26