summaryrefslogtreecommitdiffstats
path: root/ui
Commit message (Collapse)AuthorAgeFilesLines
...
* console: zap g_width + g_heightGerd Hoffmann2013-04-161-23/+9
| | | | | | | | We have a surface per QemuConsole now, so there is no need to keep track of the QemuConsole size any more as we can query the surface size directly at any time. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: simplify screendumpGerd Hoffmann2013-04-161-19/+53
| | | | | | | | | | | | | | | | | | | 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>
* console: give each QemuConsole its own DisplaySurfaceGerd Hoffmann2013-04-161-27/+69
| | | | | | | | | 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>
* console: rename vga_hw_*, add QemuConsole paramGerd Hoffmann2013-04-166-38/+49
| | | | | | | | | | | | 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>
* console: displaystate init revampGerd Hoffmann2013-04-161-39/+34
| | | | | | | | | | 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>
* console: add trace eventsGerd Hoffmann2013-04-161-0/+4
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: switch color_table_rgb to pixman_color_tGerd Hoffmann2013-04-161-16/+8
| | | | | | | Now that all text console rendering uses pixman we can easily switch the color tables to use pixman_color_t directly. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: use pixman for font renderingGerd Hoffmann2013-04-161-99/+11
| | | | | | Zap homegrown font rendering code, use pixman calls instead. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: use pixman for fill+blitGerd Hoffmann2013-04-161-55/+10
| | | | | | Zap homegrown pixel shuffeling code, use pixman calls instead. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* pixman: render vgafont glyphs into pixman imagesGerd Hoffmann2013-04-161-0/+43
| | | | | | | Add helper functions to create pixman mask images for glyphs and to render these glyphs into a pixman image. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* pixman: add qemu_pixman_color()Gerd Hoffmann2013-04-161-0/+11
| | | | | | | Helper function to map qemu colors (32bit integer + matching PixelFormat) into pixman_color_t. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* sysemu: avoid proliferation of include/ subdirectoriesPaolo Bonzini2013-04-152-2/+2
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* Merge remote-tracking branch 'luiz/queue/qmp' into stagingAnthony Liguori2013-04-021-1/+1
|\ | | | | | | | | | | | | | | | | | | # By Stefan Hajnoczi # Via Luiz Capitulino * luiz/queue/qmp: chardev: clear O_NONBLOCK on SCM_RIGHTS file descriptors qemu-socket: set passed fd non-blocking in socket_connect() net: ensure "socket" backend uses non-blocking fds oslib-posix: rename socket_set_nonblock() to qemu_set_nonblock()
| * oslib-posix: rename socket_set_nonblock() to qemu_set_nonblock()Stefan Hajnoczi2013-04-021-1/+1
| | | | | | | | | | | | | | | | | | The fcntl(fd, F_SETFL, O_NONBLOCK) flag is not specific to sockets. Rename to qemu_set_nonblock() just like qemu_set_cloexec(). Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* | ui/gtk: Set QEMU window iconStefan Weil2013-04-021-0/+13
| | | | | | | | | | | | | | | | | | The QEMU icon which is already used for SDL is now also loaded by GTK. Signed-off-by: Stefan Weil <sw@weilnetz.de> Message-id: 1364653300-26813-1-git-send-email-sw@weilnetz.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | gtk: make more messages translatableAurelien Jarno2013-04-021-2/+2
|/ | | | | | | | Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Message-id: 1364836326-8707-2-git-send-email-aurelien@aurel32.net Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qemu-char: Rename qemu_chr_generic_open to qemu_chr_be_generic_openHans de Goede2013-03-272-2/+2
| | | | | | | | To better reflect that it is for handling a backend being opened. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Message-id: 1364292483-16564-3-git-send-email-hdegoede@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* gtk: Release modifier when graphic console loses keyboard focusJan Kiszka2013-03-251-2/+51
| | | | | | | | | This solves, e.g., sticky ALT when selecting a GTK menu, switching to a different window or selecting a different virtual console. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Message-id: 514F417A.6010908@web.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* ui/cocoa.m: Fix compile failures introduced by recent console changesPeter Maydell2013-03-191-3/+6
| | | | | | | | | Fix various compilation failures introduced by the recent console changes. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1363638501-29603-1-git-send-email-peter.maydell@linaro.org Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* console: remove ds_get_* helper functionsGerd Hoffmann2013-03-181-63/+79
| | | | | | | | | | | | | 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>
* console: zap color_tableGerd Hoffmann2013-03-181-77/+6
| | | | | | | qemu_create_surface hands out 32bpp surfaces. So we can just use color_table_rgb directly. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: stop using DisplayState in gfx hardware emulationGerd Hoffmann2013-03-182-51/+53
| | | | | | | Use QemuConsole instead. Updates interfaces in console.[ch] and adapts gfx hardware emulation code. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: zap displaystate from dcl callbacksGerd Hoffmann2013-03-187-42/+20
| | | | | | | 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>
* cocoa: stop using DisplayStateGerd Hoffmann2013-03-181-25/+10
| | | | | | | Rework DisplayStateListener callbacks to not use the DisplayState any more. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* spice: stop using DisplayStateGerd Hoffmann2013-03-181-15/+16
| | | | | | | Rework DisplayStateListener callbacks to not use the DisplayState any more. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* sdl: stop using DisplayStateGerd Hoffmann2013-03-181-41/+51
| | | | | | | Rework DisplayStateListener callbacks to not use the DisplayState any more. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* vnc: stop using DisplayStateGerd Hoffmann2013-03-184-40/+48
| | | | | | | Rework DisplayStateListener callbacks to not use the DisplayState any more. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* gtk: stop using DisplayStateGerd Hoffmann2013-03-181-60/+80
| | | | | | | | | Rework DisplayStateListener callbacks to not use the DisplayState any more. Factor out the window size handling to a separate function, so the zoom callbacks can call that directly instead of abusing the gd_switch DisplayStateListener callback for that. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: rework DisplaySurface handling [dcl/ui side]Gerd Hoffmann2013-03-186-46/+33
| | | | | | | | 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>
* console: rework DisplaySurface handling [vga emu side]Gerd Hoffmann2013-03-181-42/+29
| | | | | | | | | | 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>
* sdl: drop dead codeGerd Hoffmann2013-03-181-5/+0
| | | | | | | DisplayAllocator removal (commit 187cd1d9f30d13f0d0ef682e4d91cfa3e4cbd472) made this a nop. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* spice: zap sdpy globalGerd Hoffmann2013-03-181-14/+16
| | | | | | | | DisplayChangeListener is passed now to all DisplayChangeListenerOps callbacks, so we can use that to access the spice display state and kill the sdpy global variable. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: kill DisplayState->opaqueGerd Hoffmann2013-03-183-24/+20
| | | | | | | | | | | | 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>
* console: fix displaychangelisteners interfaceGerd Hoffmann2013-03-187-65/+274
| | | | | | | | 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>
* chardev: add vc support to qapiGerd Hoffmann2013-03-132-13/+50
| | | | | | | 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>
* qemu-char: move text console init to console.cAnthony Liguori2013-03-081-0/+7
| | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Amit Shah <amit.shah@redhat.com> Message-id: 17cefde0a8d7807294bab95e93c3328a20d3f2ed.1362505276.git.amit.shah@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Add compat for GDK_KEY_XXX symbolsDaniel P. Berrange2013-02-261-0/+9
| | | | | | | | | | The GDK_KEY_XXX symbols are new in GTK3 and only the most recent GTK2 releases. Most versions of GTK2 have simply used GDK_XXX Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1361805646-6425-14-git-send-email-berrange@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Add compat macro for gtk_widget_get_realizedDaniel P. Berrange2013-02-261-0/+5
| | | | | | | | | The gtk_widget_get_realized method only arrived in GTK 2.20, so defined a compat macro for earlier GTK Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1361805646-6425-13-git-send-email-berrange@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Ensure x_keymap.o is built when GTK is enabledDaniel P. Berrange2013-02-261-1/+1
| | | | | | | | | | The x_keymap.o file is required by both GTK and SDL builds, so it must be explicitly listed as a GTK dep to ensure the linker works when SDL is disabled Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1361805646-6425-11-git-send-email-berrange@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Replace expose-event handler with draw handler in GTK3Daniel P. Berrange2013-02-261-0/+7
| | | | | | | | | | | | | In GTK3 the 'expose-event' signal has been replaced by a new 'draw' signal. The only difference is that the latter will pre-create the cairo drawing context & set the clip mask. Since the drawing code is already structured in a nice way, we can just wire up the 'gd_draw_event' method to the 'draw' signal in GTK3 Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1361805646-6425-10-git-send-email-berrange@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Conditionalize use of gtk_widget_size_requestDaniel P. Berrange2013-02-261-0/+4
| | | | | | | | | | The gtk_widget_size_request method has been replaced by the gtk_widget_get_preferred_size method in GTK3. Conditionally call the new method in GTK3 Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1361805646-6425-9-git-send-email-berrange@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Conditionalize use of gdk_display_warp_pointerDaniel P. Berrange2013-02-261-1/+6
| | | | | | | | | | In GTK3 the gdk_display_warp_pointer method is deprecated. Instead we should use gdk_device_warp on the GdkDevice instead associated with the event being processed. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1361805646-6425-8-git-send-email-berrange@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Replace gtk_menu_append with gtk_menu_shell_appendDaniel P. Berrange2013-02-261-20/+20
| | | | | | | | | | | The gtk_menu_append method has long been deprecated in favour of the gtk_menu_shell_append method. The former is now entirely gone in GTK3, so switch all code to the latter which works on both GTK2 and GTK3 Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1361805646-6425-7-git-send-email-berrange@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Remove use of GtkVBox in GTK3Daniel P. Berrange2013-02-261-0/+4
| | | | | | | | | | | The GtkVBox class is deprecated, in favour of just using the GtkBox class directly. Eventually even GtkBox will be deprecated in favour of GtkGrid, but that is a bigger fix which can wait. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1361805646-6425-6-git-send-email-berrange@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Conditionalize use of gdk_pointer_grab / gdk_pointer_ungrabDaniel P. Berrange2013-02-261-11/+65
| | | | | | | | | | | On GTK3 there is support for multiple pointer devices, so rather than using gdk_pointer_grab / gdk_pointer_ungrab we should iterate over all devices, grabbing each one in turn Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1361805646-6425-5-git-send-email-berrange@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Conditionalize use of gdk_keyboard_grab / gdk_keyboard_ungrabDaniel P. Berrange2013-02-261-1/+40
| | | | | | | | | | | On GTK3 there is support for multiple keyboard devices, so rather than using gdk_keyboard_grab / gdk_keyboard_ungrab we should iterate over all devices, grabbing each one in turn Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1361805646-6425-4-git-send-email-berrange@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Remove use of gdk_drawable_get_{screen, display}Daniel P. Berrange2013-02-261-3/+2
| | | | | | | | | | | | The gdk_drawable_get_screen and gdk_drawable_get_display methods don't exist in GDK3. Fortunately, even on GTK2 they are not required - we can call the equivalent gtk_widget_get_screen/gtk_widget_get_display methods which have existed since GTK 2.2 Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1361805646-6425-3-git-send-email-berrange@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Add compat for gdk_drawable_get_size on GTK3Daniel P. Berrange2013-02-261-0/+10
| | | | | | | | | GTK3 lacks the gdk_drawable_get_size method, so we create a stub impl which gets the get_width/get_height mehtods instead Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1361805646-6425-2-git-send-email-berrange@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* gtk: Rename File to Machine menu and add pause, reset and power down itemsJan Kiszka2013-02-221-12/+68
| | | | | | | | | | | This adds basic guest control commands to the "Machine" menu - a nice added-value for the GTK UI. We use "pause" as the term for stopping the machine here. So reword also the related caption tag. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* ui/gtk: Use menu item from stock for full screenStefan Weil2013-02-221-2/+3
| | | | | | | | | | | | | This reduces the required translations and gives a nicer menu with an icon. The full screen menu item is no longer a check menu item. A checked item is not visible in full screen mode, so it is not needed for this special menu item. Signed-off-by: Stefan Weil <sw@weilnetz.de> Message-id: 1361561614-11180-1-git-send-email-sw@weilnetz.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
OpenPOWER on IntegriCloud