aboutsummaryrefslogtreecommitdiff
path: root/include/ui
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-12-21 23:17:00 +0000
committerPeter Maydell <peter.maydell@linaro.org>2014-12-21 23:17:00 +0000
commitc95f3901b4ead79f3fe2c641fda7d2c70fc84c72 (patch)
tree5e8432183f122b82c9471d4710ae9389df84a0ba /include/ui
parent328b3b6c44c17d94df115ed1851f54a0bd59a471 (diff)
parentd3f3a0f453ea590be529079ae214c200bb5ecc1a (diff)
downloadqemu-c95f3901b4ead79f3fe2c641fda7d2c70fc84c72.zip
qemu-c95f3901b4ead79f3fe2c641fda7d2c70fc84c72.tar.gz
qemu-c95f3901b4ead79f3fe2c641fda7d2c70fc84c72.tar.bz2
Merge remote-tracking branch 'remotes/kraxel/tags/pull-sdl-20141219-1' into 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>
Diffstat (limited to 'include/ui')
-rw-r--r--include/ui/sdl2.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/ui/sdl2.h b/include/ui/sdl2.h
new file mode 100644
index 0000000..f56c596
--- /dev/null
+++ b/include/ui/sdl2.h
@@ -0,0 +1,32 @@
+#ifndef SDL2_H
+#define SDL2_H
+
+struct sdl2_console {
+ DisplayChangeListener dcl;
+ DisplaySurface *surface;
+ SDL_Texture *texture;
+ SDL_Window *real_window;
+ SDL_Renderer *real_renderer;
+ int idx;
+ int last_vm_running; /* per console for caption reasons */
+ int x, y;
+ int hidden;
+};
+
+void sdl2_window_create(struct sdl2_console *scon);
+void sdl2_window_destroy(struct sdl2_console *scon);
+void sdl2_window_resize(struct sdl2_console *scon);
+void sdl2_poll_events(struct sdl2_console *scon);
+
+void sdl2_reset_keys(struct sdl2_console *scon);
+void sdl2_process_key(struct sdl2_console *scon,
+ SDL_KeyboardEvent *ev);
+
+void sdl2_2d_update(DisplayChangeListener *dcl,
+ int x, int y, int w, int h);
+void sdl2_2d_switch(DisplayChangeListener *dcl,
+ DisplaySurface *new_surface);
+void sdl2_2d_refresh(DisplayChangeListener *dcl);
+void sdl2_2d_redraw(struct sdl2_console *scon);
+
+#endif /* SDL2_H */