summaryrefslogtreecommitdiffstats
path: root/include/ui
Commit message (Collapse)AuthorAgeFilesLines
...
| * 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>
* console: add head to index to qemu consoles.Gerd Hoffmann2014-03-051-2/+3
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* input: remove index_from_keycode (no users)Gerd Hoffmann2014-03-051-1/+0
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* input: move mouse mode notifier to new coreGerd Hoffmann2014-03-052-4/+4
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* input-legacy: remove kbd_mouse_eventGerd Hoffmann2014-03-051-1/+0
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* input-legacy: remove kbd_mouse_is_absoluteGerd Hoffmann2014-03-051-1/+0
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* input-legacy: remove kbd_mouse_has_absoluteGerd Hoffmann2014-03-051-3/+0
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* input-legacy: remove kbd_put_keycodeGerd Hoffmann2014-03-051-1/+0
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* input: mouse: switch cocoa ui to new coreGerd Hoffmann2014-03-051-0/+2
| | | | | | Build fixes by Peter Maydell. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* input: mouse: add qemu_input_is_absolute()Gerd Hoffmann2014-03-051-0/+1
| | | | | | Same as kbd_mouse_is_absolute(), but using new input core. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* input: mouse: add helpers functions to coreGerd Hoffmann2014-03-051-0/+14
| | | | | | | Likewise a bunch of helper functions to manage mouse button and movement events, again to make life easier for the ui code. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* input: keyboard: add helper functions to coreGerd Hoffmann2014-03-051-0/+5
| | | | | | | | A bunch of helper functions to manage keyboard events, to make life simpler for the ui code when submitting keyboard events. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* input: add core bits of the new input layerGerd Hoffmann2014-03-051-0/+32
| | | | | | | Register and unregister handlers. Event dispatcher code. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: export QemuConsole index,width,heightGerd Hoffmann2014-03-051-0/+3
| | | | | | Add functions to query QemuConsole properties. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* include: add missing config-host.h includeMarc-André Lureau2013-12-161-0/+2
| | | | | Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* trace: Remove trace.h from console.h (less dependencies)Stefan Weil2013-12-021-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>
* spice: fix multihead supportGerd Hoffmann2013-10-171-2/+3
| | | | | | | | | | | | | | | | | | | | This patch fixes spice display initialization to handle multihead properly. spice-core now keeps track of which QemuConsole has a spice display channel attached to it and which has not. It also manages display channel ids. spice-display looks at all QemuConsoles and will pick up any graphic console not yet bound to a spice channel (which in practice are all non-qxl graphic devices). Result is that (a) you'll get a spice client window for each graphical device now (first only without this patch), and (b) mixing qxl and non-qxl vga cards works properly. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* spice: fix display initializationGerd Hoffmann2013-07-301-0/+2
| | | | | | | | | | | | | | | Spice has two display interface implementations: One integrated into the qxl graphics card, and one generic which can operate with every qemu-emulated graphics card. The generic one is activated in case spice is used without qxl. The logic for that only caught the "-vga qxl" case, "-device qxl-vga" goes unnoticed. Fix that by adding a check in the spice interface registration so we'll notice the qxl card no matter how it is created. https://bugzilla.redhat.com/show_bug.cgi?id=981094 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* vnc: use booleans for vnc_connect, vnc_listen_read and vnc_display_add_clientMichael Tokarev2013-06-211-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>
* gtk: implement -full-screenPeter Wu2013-06-111-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>
* console: zap ds arg from register_displaychangelistenerGerd Hoffmann2013-04-251-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>
* console: add qemu_console_lookup_by_deviceGerd Hoffmann2013-04-251-0/+1
| | | | | | Look up the QemuConsole for a given device, using the new link. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: add device link to QemuConsolesGerd Hoffmann2013-04-251-1/+2
| | | | | | So it is possible to figure which qemu console displays which device. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: qom-ify QemuConsoleGerd Hoffmann2013-04-251-0/+15
| | | | | | Just the minimal bits to turn QemuConsoles into Objects. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* input: introduce keyboard handler listGerd Hoffmann2013-04-241-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>
* input: make QEMUPutLEDEntry + QEMUPutMouseEntry privateGerd Hoffmann2013-04-241-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>
* Fix warnings suppressors to honor --disable-werrorMarkus Armbruster2013-04-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | Replace #pragma GCC diagnostic ignored FOO [Troublesome code...] #pragma GCC diagnostic error FOO by #pragma GCC diagnostic push #pragma GCC diagnostic ignored FOO [Troublesome code...] #pragma GCC diagnostic pop Broken in commit 3f4349d, commit 092bb30, and commit c95e308. Signed-off-by: Markus Armbruster <armbru@redhat.com> Tested-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1366113066-1340-1-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
OpenPOWER on IntegriCloud