summaryrefslogtreecommitdiff
path: root/include/ui/console.h
AgeCommit message (Collapse)AuthorFilesLines
2014-03-05console: add QemuUIInfoGerd Hoffmann1-0/+12
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05console: add head to index to qemu consoles.Gerd Hoffmann1-2/+3
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05input: remove index_from_keycode (no users)Gerd Hoffmann1-1/+0
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05input: move mouse mode notifier to new coreGerd Hoffmann1-4/+0
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05input-legacy: remove kbd_mouse_eventGerd Hoffmann1-1/+0
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05input-legacy: remove kbd_mouse_is_absoluteGerd Hoffmann1-1/+0
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05input-legacy: remove kbd_mouse_has_absoluteGerd Hoffmann1-3/+0
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05input-legacy: remove kbd_put_keycodeGerd Hoffmann1-1/+0
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05input: mouse: switch cocoa ui to new coreGerd Hoffmann1-0/+2
Build fixes by Peter Maydell. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05console: export QemuConsole index,width,heightGerd Hoffmann1-0/+3
Add functions to query QemuConsole properties. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-12-02trace: Remove trace.h from console.h (less dependencies)Stefan Weil1-1/+0
This reduces the dependencies on trace.h. Only two source files which need console.h also need trace.h. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-21vnc: use booleans for vnc_connect, vnc_listen_read and vnc_display_add_clientMichael Tokarev1-1/+1
Some arguments to these functions are booleans - either by declaration, or by actual usage, but sometimes value of 0 or 1 is passed for a bool, and sometimes it is declared as int but a bool value, or true/false, is passed to it instead. Clean it up a bit. Cc: liguang <lig.fnst@cn.fujitsu.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-11gtk: implement -full-screenPeter Wu1-1/+1
Aiming for GTK as replacement for SDL, a feature like -full-screen should also be implemented. Bringing the window into full-screen mode is done by activating the "Fullscreen" menu item. This is done after showing the windows to make the cursor and menu hidden. v2: drop -no-frame implementation, use booleans instead of ints and ensure consistency between ui state and menu. Signed-off-by: Peter Wu <lekensteyn@gmail.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-04-25console: zap ds arg from register_displaychangelistenerGerd Hoffmann1-2/+1
We don't have multiple DisplayStates any more, so passing it in as argument is not needed. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-04-25console: add qemu_console_lookup_by_deviceGerd Hoffmann1-0/+1
Look up the QemuConsole for a given device, using the new link. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-04-25console: add device link to QemuConsolesGerd Hoffmann1-1/+2
So it is possible to figure which qemu console displays which device. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-04-25console: qom-ify QemuConsoleGerd Hoffmann1-0/+15
Just the minimal bits to turn QemuConsoles into Objects. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-04-24input: introduce keyboard handler listGerd Hoffmann1-2/+4
Add a linked list of keyboard handlers. Added handlers will go to the head of the list. Removed handlers will be zapped from the list. The head of the list will be used for events. This fixes the keyboard-dead-after-usb-kbd-unplug issue, key events will be re-routed to the ps/2 kbd instead of being discarded. [ v2: fix cut+paste bug found my Markus ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 1366798118-3248-3-git-send-email-kraxel@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-24input: make QEMUPutLEDEntry + QEMUPutMouseEntry privateGerd Hoffmann1-17/+2
There is no need for anybody outside ui/input.c to access the struct elements. Move the definitions, leaving only the typedefs in the header files. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 1366798118-3248-2-git-send-email-kraxel@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-16console: allow pinning displaychangelisteners to consolesGerd Hoffmann1-0/+2
DisplayChangeListener gets a new QemuConsole field, which can be set to non-NULL before registering. This will pin the QemuConsole, so that particular DisplayChangeListener will not follow console switches. spice+gtk (which don't support text console input anyway) are switched over to be pinned to console 0, which usually is the graphical display. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-04-16console: add qemu_console_is_*Gerd Hoffmann1-2/+4
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-04-16xen: re-enable refresh interval reporting for xenfbGerd Hoffmann1-0/+1
xenfb informs the guest about the gui refresh interval so it can avoid pointless work. That logic was temporarely disabled for the DisplayState reorganization. Restore it now, with a proper interface for it. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-04-16console: gui timer fixesGerd Hoffmann1-4/+5
Make gui update rate adaption code in gui_update() actually work. Sprinkle in a tracepoint so you can see the code at work. Remove the update rate adaption code in vnc and make vnc simply use the generic bits instead. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-04-16console: add GraphicHwOpsGerd Hoffmann1-6/+6
Pass a single GraphicHwOps struct pointer to graphic_console_init, instead of a bunch of function pointers. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-04-16console: make DisplayState private to console.cGerd Hoffmann1-8/+0
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>
2013-04-16console: move gui_update+gui_setup_refresh from vl.c into console.cGerd Hoffmann1-2/+0
Pure code motion, no functional changes. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-04-16console: simplify screendumpGerd Hoffmann1-3/+0
Screendumps are alot simpler as we can update non-active QemuConsoles now. So we only need to update the QemuConsole we want write out, then dump the DisplaySurface content into a ppm file. Done. No console switching needed. No special support code in the gfx card emulation needed. Zap it all. Also move ppm_save out of the vga code and next to the qmp_screendump function. For now screen dumping is limited to console #0 (like it used to be), even though it is dead simple to extend it to other consoles. I wanna finish the console cleanup before setting new qapi interfaces into stone. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Tested-by: Igor Mitsyanko <i.mitsyanko@gmail.com>
2013-04-16console: give each QemuConsole its own DisplaySurfaceGerd Hoffmann1-1/+0
Go away from the global DisplaySurface, give one to each QemuConsole instead. With this patch applied it is possible to call graphics_hw_* functions with qemu consoles which are not the current foreground console. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-04-16console: rename vga_hw_*, add QemuConsole paramGerd Hoffmann1-11/+11
Add QemuConsole parameter to vga_hw_*, so the interface allows to update non-active consoles (the actual code can't handle this yet, see next patch). Passing NULL is allowed and updates the active console, like the functions do today. While touching all vga_hw_* calls anyway rename that to the functions to hardware-neutral graphics_hw_* Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-04-16console: displaystate init revampGerd Hoffmann1-4/+1
We have only one DisplayState, so there is no need for the "next" linking, rip it. Also consolidate all displaystate initialization into init_displaystate(). This function is called by vl.c after creating the devices (and thus all QemuConsoles) and before initializing DisplayChangeListensers (aka gtk/sdl/vnc/spice ui). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-03-18console: remove ds_get_* helper functionsGerd Hoffmann1-60/+0
Switch the few remaining ds_get_* uses in console.c over to the new surface_* accessors. While doing so tripped over a few leftovers from commit a93a4a226a2afba147ba5df688b85d844f537c68 (code using depth == 0 as indicator for textmode rendering). Fixed them up. Finally dropped ds_get_* helper helpers. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-03-18console: stop using DisplayState in gfx hardware emulationGerd Hoffmann1-16/+18
Use QemuConsole instead. Updates interfaces in console.[ch] and adapts gfx hardware emulation code. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-03-18console: zap displaystate from dcl callbacksGerd Hoffmann1-10/+2
Now that nobody depends on DisplayState in DisplayChangeListener callbacks any more we can remove the parameter from all callbacks. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-03-18console: add surface_*() gettersGerd Hoffmann1-8/+38
Add convinence wrappers to query DisplaySurface properties. Simliar to ds_get_*, but operating in the DisplaySurface not the DisplayState. With this patch in place ui frontents can stop using DisplayState in the rendering code paths, they can simply operate using the DisplaySurface passed in via dpy_gfx_switch callback. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-03-18console: rework DisplaySurface handling [dcl/ui side]Gerd Hoffmann1-4/+3
Replace the dpy_gfx_resize and dpy_gfx_setdata DisplayChangeListener callbacks with a dpy_gfx_switch callback which notifies the ui code when the framebuffer backing storage changes. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-03-18console: rework DisplaySurface handling [vga emu side]Gerd Hoffmann1-7/+4
Decouple DisplaySurface allocation & deallocation from DisplayState. Replace dpy_gfx_resize + dpy_gfx_setdata with a dpy_gfx_replace_surface function. This handles the graphic hardware emulation. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-03-18console: kill DisplayState->opaqueGerd Hoffmann1-1/+0
It's broken by design. There can be multiple DisplayChangeListener instances, so they simply can't store state in the (single) DisplayState struct. Try 'qemu -display gtk -vnc :0', watch it crash & burn. With DisplayChangeListenerOps having a more sane interface now we can simply use the DisplayChangeListener pointer to get access to our private data instead. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-03-18console: fix displaychangelisteners interfaceGerd Hoffmann1-154/+53
Split callbacks into separate Ops struct. Pass DisplayChangeListener pointer as first argument to all callbacks. Uninline a bunch of display functions and move them from console.h to console.c Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-03-13chardev: add vc support to qapiGerd Hoffmann1-2/+2
This patch adds 'vc' support to qapi and also switches over the vc chardev initialization to the new qapi code path. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-02-21ui: add basic GTK gui (v5)Anthony Liguori1-0/+4
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 <aliguori@us.ibm.com> Message-id: 1361367806-4599-4-git-send-email-aliguori@us.ibm.com
2013-02-21console: allow VCs to be overridden by UIAnthony Liguori1-1/+5
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> Message-id: 1361367806-4599-3-git-send-email-aliguori@us.ibm.com
2013-02-21vga: fix byteswapping.Gerd Hoffmann1-1/+2
In case host and guest endianness differ the vga code first creates a shared surface (using qemu_create_displaysurface_from), then goes patch the surface format to indicate that the bytes must be swapped. The switch to pixman broke that hack as the format patching isn't propagated into the pixman image, so ui code using the pixman image directly (such as vnc) uses the wrong format. Fix that by adding a byteswap parameter to qemu_create_displaysurface_from, so we'll use the correct format when creating the surface (and the pixman image) and don't have to patch the format afterwards. [ v2: unbreak xen build ] Cc: qemu-stable@nongnu.org Cc: mark.cave-ayland@ilande.co.uk Cc: agraf@suse.de Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 1361349432-23884-1-git-send-email-kraxel@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-12-19misc: move include files to include/qemu/Paolo Bonzini1-1/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19monitor: move include files to include/monitor/Paolo Bonzini1-1/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19qapi: move include files to include/qobject/Paolo Bonzini1-2/+2
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19ui: move files to ui/ and include/ui/Paolo Bonzini1-0/+485
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>