summaryrefslogtreecommitdiffstats
path: root/include/ui
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'remotes/spice/tags/pull-spice-20150427-1' into ↵Peter Maydell2015-04-273-6/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | staging spice: misc fixes. # gpg: Signature made Mon Apr 27 12:03:16 2015 BST using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/spice/tags/pull-spice-20150427-1: spice: learn to hide cursor spice: set pointer position on hotspot spice: fix mouse cursor position spice: fix simple display on bigendian hosts monitor: Make client_migrate_info synchronous Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * spice: set pointer position on hotspotMarc-André Lureau2015-04-271-1/+2
| | | | | | | | | | | | | | The Spice protocol uses cursor position on hotspot: the client is applying hotspot offset when drawing the cursor. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * spice: fix simple display on bigendian hostsGerd Hoffmann2015-04-271-0/+2
| | | | | | | | | | | | | | | | | | Denis Kirjanov is busy getting spice run on ppc64 and trapped into this one. Spice wire format is little endian, so we have to explicitly say we want little endian when letting pixman convert the data for us. Reported-by: Denis Kirjanov <kirjanov@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * monitor: Make client_migrate_info synchronousMarkus Armbruster2015-04-271-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Live migration with spice works like this today: (1) client_migrate_info monitor cmd (2) spice server notifies client, client connects to target host. (3) qemu waits until spice client connect is finished. (4) send over vmstate (i.e. main part of live migration). (5) spice handover to target host. (3) is implemented by making client_migrate_info a async monitor command. This is the only async monitor command we have. The original reason to implement this dance was that qemu did not accept new tcp connections while the incoming migration was running, so (2) and (4) could not be done in parallel. That issue was fixed long ago though. Qemu version 1.3.0 (released Dec 2012) and newer happily accept tcp connects while the incoming migration runs. Time to drop step (3). This patch does exactly that, by making the monitor command synchronous and removing the code needed to handle the async monitor command in ui/spice-core.c Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | console/gtk: add qemu_console_get_labelGerd Hoffmann2015-04-221-0/+1
|/ | | | | | | Add a new function to get a nice label for a given QemuConsole. Drop the labeling code in gtk.c and use the new function instead. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* pixman: add a bunch of PIXMAN_BE_* defines for 32bppGerd Hoffmann2015-03-121-0/+16
| | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
* Merge remote-tracking branch 'remotes/kraxel/tags/pull-vnc-20150310-1' into ↵Peter Maydell2015-03-101-1/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | staging vnc bugfixes. # gpg: Signature made Tue Mar 10 10:37:51 2015 GMT using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-vnc-20150310-1: Fix crash when connecting to VNC through websocket vnc: -readconfig fix vnc: set id at parse time not init time Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * vnc: set id at parse time not init timeGerd Hoffmann2015-03-101-1/+0
| | | | | | | | | | | | | | | | This way the generated id will be stored in -writeconfig cfg files. Also we can make vnc_auto_assign_id() local to vnc.c. Tested-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | ui: Removed unused functionsThomas Huth2015-03-101-3/+0
|/ | | | | | | | | | Remove qemu_console_displaystate(), qemu_remove_kbd_event_handler(), qemu_different_endianness_pixelformat() and cpkey(), since they are completely unused. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* Merge remote-tracking branch 'remotes/armbru/tags/pull-monitor-2015-02-18' ↵Peter Maydell2015-02-252-4/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into staging hmp: Normalize HMP command handler names # gpg: Signature made Wed Feb 18 10:59:44 2015 GMT using RSA key ID EB918653 # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" * remotes/armbru/tags/pull-monitor-2015-02-18: hmp: Name HMP info handler functions hmp_info_SUBCOMMAND() hmp: Name HMP command handler functions hmp_COMMAND() hmp: Clean up declarations for long-gone info handlers Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * hmp: Name HMP command handler functions hmp_COMMAND()Markus Armbruster2015-02-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some are called do_COMMAND() (old ones, usually), some hmp_COMMAND(), and sometimes COMMAND pointlessly differs in spelling. Normalize to hmp_COMMAND(), where COMMAND is exactly the command name with '-' replaced by '_'. Exceptions: * do_device_add() and client_migrate_info() *not* renamed to hmp_device_add(), hmp_client_migrate_info(), because they're also QMP handlers. They still need to be converted to QAPI. * do_memory_dump(), do_physical_memory_dump(), do_ioport_read(), do_ioport_write() renamed do hmp_* instead of hmp_x(), hmp_xp(), hmp_i(), hmp_o(), because those names are too cryptic for my taste. * do_info_help() renamed to hmp_info_help() instead of hmp_info(), because it only covers help. Signed-off-by: Markus Armbruster <armbru@redhat.com>
| * hmp: Clean up declarations for long-gone info handlersMarkus Armbruster2015-02-181-3/+0
| | | | | | | | | | | | | | | | | | Leftovers from d1f2964 qapi: Convert query-spice 791e7c8 qapi: Convert query-migrate 0fe6a7f slirp: Drop statistic code Signed-off-by: Markus Armbruster <armbru@redhat.com>
* | vnc: introduce an wrapper for auto assign vnc idGonglei2015-02-161-0/+1
|/ | | | | Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qmp hmp: Improve error messages when SPICE is not in useMarkus Armbruster2015-01-291-2/+2
| | | | | | | | | | | | | | | | | Commit 7572150 adopted QERR_DEVICE_NOT_ACTIVE for the purpose, probably because adding another error seemed cumbersome overkill. Produces "No spice device has been activated", which is awkward. We've since abandoned our quest for "rich" error objects. Time to undo the damage to this error message. Replace it by "SPICE is not in use". Keep the stupid DeviceNotActive ErrorClass for compatibility, even though Libvirt doesn't use it. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
* qmp hmp: Factor out common "using spice" testMarkus Armbruster2015-01-291-0/+10
| | | | | | | | | Into qemu_using_spice(). For want of a better place, put it next the existing monitor command handler dummies in qemu-spice.h. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
* vnc: switch to QemuOpts, allow multiple serversGerd Hoffmann2015-01-221-1/+3
| | | | | | | This patch switches vnc over to QemuOpts, and it (more or less as side effect) allows multiple vnc server instances. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* vnc: remove unused DisplayState parameter, add id instead.Gerd Hoffmann2015-01-221-8/+8
| | | | | | | | DisplayState isn't used anywhere, drop it. Add the vnc server ID as parameter instead, so it is possible to specify the server instance. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Gonglei <arei.gonglei@huawei.com>
* ui/sdl2: Support shared surface for more pixman formatsGerd Hoffmann2015-01-191-0/+2
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* ui/pixman: add qemu_pixman_check_formatGerd Hoffmann2015-01-191-0/+2
| | | | | | Convinience check_format function for UIs using pixman. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* ui: Add dpy_gfx_check_format() to check backend shared surface supportBenjamin Herrenschmidt2015-01-191-0/+4
| | | | | | | | | | | | | This allows VGA to decide whether to use a shared surface based on whether the UI backend supports the format or not. Backends that don't provide the new callback fallback to native 32 bpp which is equivalent to what was supported before. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> [ kraxel: fix console check, allow only 32 bpp as fallback ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* Merge remote-tracking branch 'remotes/kraxel/tags/pull-sdl-20141219-1' into ↵Peter Maydell2014-12-211-0/+32
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | staging sdl2: fixes, cleanups and opengl preparation. # gpg: Signature made Fri 19 Dec 2014 09:06:07 GMT using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-sdl-20141219-1: sdl2: Work around SDL2 SDL_ShowWindow() bug sdl2: Use correct sdl2_console for window events sdl2: move sdl2_2d_refresh to sdl2-2d.c sdl2: factor out sdl2_poll_events sdl2: add+use sdl2_2d_redraw function. sdl2: move sdl_switch to sdl2-2d.c sdl2: overhaul window size handling sdl2: move sdl_update to new sdl2-2d.c sdl2: turn on keyboard grabs sdl2: move keyboard input code to new sdl2-input.c sdl2: rename sdl2_state to sdl2_console, move to header file sdl: move version logic from source code to makefile Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * sdl2: move sdl2_2d_refresh to sdl2-2d.cGerd Hoffmann2014-12-171-0/+1
| | | | | | | | | | | | | | | | Now that common event handling code is split off, we can move over sdl_refresh to sdl2-2d.c, and rename it to sdl2_2d_refresh. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
| * sdl2: factor out sdl2_poll_eventsGerd Hoffmann2014-12-171-0/+1
| | | | | | | | | | | | | | | | Create a new function to poll and handle sdl2 events, which is then just called from the refresh timer. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
| * sdl2: add+use sdl2_2d_redraw function.Gerd Hoffmann2014-12-171-0/+1
| | | | | | | | | | | | | | | | | | | | Add a new sdl2_2d_redraw function for a complete screen refresh, so we can stop using graphic_hw_invalidate for that. There is no need to bother console / gfx emulation code if we are just going to re-blit the screen after window resizes. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
| * sdl2: move sdl_switch to sdl2-2d.cGerd Hoffmann2014-12-171-0/+6
| | | | | | | | | | | | | | Move sdl_switch to sdl2-2d.c file, rename to sdl2_2d_switch. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
| * sdl2: move sdl_update to new sdl2-2d.cGerd Hoffmann2014-12-171-0/+3
| | | | | | | | | | | | | | | | Create new sdl2-2d file for 2d display rendering. Move over sdl_update code, and rename to sdl2_2d_update. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
| * sdl2: move keyboard input code to new sdl2-input.cGerd Hoffmann2014-12-171-0/+4
| | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
| * sdl2: rename sdl2_state to sdl2_console, move to header fileGerd Hoffmann2014-12-171-0/+16
| | | | | | | | | | | | | | | | Create sdl2.h header file, in preparation for sdl2 code splitup. Populate it with sdl2_console struct (renamed from sdl2_state). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
* | spice: use bottom half instead of refresh timer for cursor updatesGerd Hoffmann2014-12-161-1/+2
|/ | | | | | | | | | Calling directly doesn't work due to the qxl-render code running in spice server thread context. Meanwhile bottom half scheduling is thread-safe though, so we can use that to kick a cursor update in main i/o thread context. Cc: Marc-André Lureau <marcandre.lureau@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: add graphic_console_set_hwopsGerd Hoffmann2014-09-291-0/+3
| | | | | | | | | | Add a function to allow display emulations to switch the hwops function pointers. This is useful for devices which have two completely different operation modes. Typical case is the vga compatibility mode vs. native mode in qxl and the upcoming virtio-vga device. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: Remove unused QEMU_BIG_ENDIAN_FLAGBenjamin Herrenschmidt2014-09-051-2/+1
| | | | | | | | | If we need to, we should use the pixman formats instead but for now this is unused except in commented out code so take it out to avoid further confusion about surface endianness. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: add qemu_pixman_linebuf_copyGerd Hoffmann2014-09-051-0/+2
| | | | | | | Helper function for copying data from linebuf to framebuffer using pixman, possibly converting in case src and dst formats differ. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: add dpy_gfx_update_dirtyGerd Hoffmann2014-09-051-0/+4
| | | | | | | | Calls dpy_gfx_update for all dirty scanlines. Works for DisplaySurfaces backed by guest memory (i.e. the ones created using qemu_create_displaysurface_guestmem). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: add qemu_create_displaysurface_guestmemGerd Hoffmann2014-09-051-0/+4
| | | | | | | | | This patch adds a qemu_create_displaysurface_guestmem helper function. Works simliar to qemu_create_displaysurface_from, but accepts a guest address instead of a host pointer and it handles cpu_physical_memory_{map,unmap} for you. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: stop using PixelFormatGerd Hoffmann2014-09-051-7/+7
| | | | | | | | | | | | | | | | | With this patch the qemu console core stops using PixelFormat and pixman format codes side-by-side, pixman format code is the primary way to specify the DisplaySurface format: * DisplaySurface stops carrying a PixelFormat field. * qemu_create_displaysurface_from() expects a pixman format now. Functions to convert PixelFormat to pixman_format_code_t (and back) exist for those who still use PixelFormat. As PixelFormat allows easy access to masks and shifts it will probably continue to exist. [ xenfb added by Benjamin Herrenschmidt ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: add qemu_default_pixman_formatGerd Hoffmann2014-09-051-0/+1
| | | | | | Function returning the default pixman format for a given depth. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: add qemu_pixelformat_from_pixmanGerd Hoffmann2014-09-051-0/+1
| | | | | | | | Function to convert pixman format codes to qemu PixelFormat. [ Benjamin Herrenschmidt: fix BGRA+RGBA shifts ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: move chardev declarations to sysemu/char.hMichael S. Tsirkin2014-06-231-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | move generic chardev APIs to sysemu/char.h, to make them available to callers which can not depend on the whole of ui/console.h. This fixes a build error on systems without pixman-devel: ./configure --disable-tools --disable-docs --target-list=arm-linux-user ... pixman none ... make ... In file included from /data/home/nchip/linaro/qemu/include/ui/console.h:4:0, from /data/home/nchip/linaro/qemu/stubs/vc-init.c:2: /data/home/nchip/linaro/qemu/include/ui/qemu-pixman.h:14:20: fatal error: pixman.h: No such file or directory #include <pixman.h> ^ compilation terminated. Reported-by: Riku Voipio <riku.voipio@iki.fi> Tested-by: Riku Voipio <riku.voipio@iki.fi> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Message-id: 1403508500-32691-1-git-send-email-mst@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* spice: add mouse cursor supportGerd Hoffmann2014-06-131-0/+14
| | | | | | | So you'll have a mouse pointer when running non-qxl gfx cards with mouse pointer support (virtio-gpu, IIRC vmware too). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* input: add support for kbd delaysGerd Hoffmann2014-06-041-0/+1
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: add kbd_put_string_consoleGerd Hoffmann2014-06-021-0/+1
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: add kbd_put_qcode_consoleGerd Hoffmann2014-06-021-0/+1
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* Merge remote-tracking branch 'remotes/kraxel/tags/pull-console-1' into stagingPeter Maydell2014-05-281-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | console: multiwindow support for text terminal QemuConsoles console: small fixes # gpg: Signature made Mon 26 May 2014 09:17:27 BST using RSA key ID D3E87138 # gpg: Can't check signature: public key not found * remotes/kraxel/tags/pull-console-1: console: add kbd_put_keysym_console console: rework text terminal cursor logic console: update text terminal surface unconditionally console: nicer initial screen console: Abort on property access errors Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * console: add kbd_put_keysym_consoleGerd Hoffmann2014-05-261-0/+1
| | | | | | | | | | | | So you can send keysyms to a specific (text terminal) console. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | input: bind devices and input routingGerd Hoffmann2014-05-261-0/+3
| | | | | | | | | | | | | | | | Add function to bind input devices to display devices. Implementing input routing on top of this: Events coming from the display device in question are routed to the input device bound to it (if there is one). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | input: add qemu_input_key_number_to_qcodeGerd Hoffmann2014-05-261-0/+1
|/ | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* input: add qemu_input_handler_deactivateGerd Hoffmann2014-05-161-0/+1
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* input: key mapping helpersGerd Hoffmann2014-05-161-0/+4
| | | | | | | | Add helper functions to translate KeyValue (qapi key representation) into other representations: traditional qemu key numbers, qapi key codes (Q_KEY_CODE_*) and scancode sequences. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* gtk: Allow to activate grab-on-hover from the command lineJan Kiszka2014-03-171-1/+1
| | | | | | | | | | | As long as we have no persistent GTK configuration, this allows to enable the useful grab-on-hover feature already when starting the VM. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> [ kraxel: fix warning with CONFIG_GTK=n ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: add QemuUIInfoGerd Hoffmann2014-03-051-0/+12
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
OpenPOWER on IntegriCloud