mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
ui: build curses, gtk and sdl as modules.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABAgAGBQJanQRYAAoJEEy22O7T6HE46p0P/38Ux4Yd8HZUkdCFuvZ8AH7u KUe4/K6LZosvmt2nn8p7eSLLdOMWhkCd7EJfpAyjlkZTjk7VU+SFZNVajpIDy4pO mmbKu9F/au2mPzKpvGx+44OGRkY+s6l4WnSIzWHm/3M5MbKksqOqfRmcprIv+kNe z14bY8AecV47UC9/5tZu2Kfe5jlBajsVdP0ZMFM0ROgSJd7bUjyoVX7iBCyqHXuF BpKMbphTiFV2fQrAaKCooLiCD1JKqow42N8lfGg0ytxfBTBIJVuB7d6l6nVCZVxg fxogbE2ciLUx9cPm5X0jgfL+pXgSHiGCurtlWEDRb9DI1TTJlO/ssK/+vLBlKE9L qKVzDjaiXtieNZh1SK5zUOC0kDEr6LtfZLJG1o0Lqit0OV6/OS7Qq0T3/dOwmqWe 3V6HRV8CYJkUKn2QqREpE6jv2pFLuHEuoeyFfTE92pK4yS7pgZOfaKqq4FXy+cu3 wpWx/qmu1Mz5A8fnzNW+v6juhrgYxychRdkw7MWPjm0MDIaYcHV/Fp/yzlO4L1FE hEet5xXT48n/3/Cdj+ivFv6+4XELWMw09UUKEkZCHnSClA8UUZU9hbvsTXRqcAef TFO6s6t+c7Ya8tnsw4qNsk4lLVtMGp67L0Rfvh527ShxDHsRA/wl8PSyRUdQ7YlM l3MVmAnyZom8AR6EA/BG =Zc72 -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/kraxel/tags/ui-20180305-pull-request' into staging ui: build curses, gtk and sdl as modules. # gpg: Signature made Mon 05 Mar 2018 08:48:24 GMT # gpg: using RSA key 4CB6D8EED3E87138 # 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>" # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/ui-20180305-pull-request: ui/sdl: build as module audio: rename CONFIG_* to CONFIG_AUDIO_* ui/curses: build as module ui/gtk: build as module configure: opengl doesn't depend on x11 configure: add X11 vars to config-host.mak console: add ui module loading support console: add and use qemu_display_find_default egl-headless: switch over to new display registry curses: switch over to new display registry cocoa: switch over to new display registry sdl: switch over to new display registry console: add qemu display registry, add gtk Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
4ee02f53be
16 changed files with 220 additions and 176 deletions
|
@ -53,6 +53,7 @@ typedef enum {
|
|||
#define trace_init(function) module_init(function, MODULE_INIT_TRACE)
|
||||
|
||||
#define block_module_load_one(lib) module_load_one("block-", lib)
|
||||
#define ui_module_load_one(lib) module_load_one("ui-", lib)
|
||||
|
||||
void register_module_init(void (*fn)(void), module_init_type type);
|
||||
void register_dso_module_init(void (*fn)(void), module_init_type type);
|
||||
|
|
|
@ -433,36 +433,18 @@ void surface_gl_setup_viewport(QemuGLShader *gls,
|
|||
int ww, int wh);
|
||||
#endif
|
||||
|
||||
/* sdl.c */
|
||||
#ifdef CONFIG_SDL
|
||||
void sdl_display_early_init(DisplayOptions *opts);
|
||||
void sdl_display_init(DisplayState *ds, DisplayOptions *opts);
|
||||
#else
|
||||
static inline void sdl_display_early_init(DisplayOptions *opts)
|
||||
{
|
||||
/* This must never be called if CONFIG_SDL is disabled */
|
||||
error_report("SDL support is disabled");
|
||||
abort();
|
||||
}
|
||||
static inline void sdl_display_init(DisplayState *ds, DisplayOptions *opts)
|
||||
{
|
||||
/* This must never be called if CONFIG_SDL is disabled */
|
||||
error_report("SDL support is disabled");
|
||||
abort();
|
||||
}
|
||||
#endif
|
||||
typedef struct QemuDisplay QemuDisplay;
|
||||
|
||||
/* cocoa.m */
|
||||
#ifdef CONFIG_COCOA
|
||||
void cocoa_display_init(DisplayState *ds, DisplayOptions *opts);
|
||||
#else
|
||||
static inline void cocoa_display_init(DisplayState *ds, DisplayOptions *opts)
|
||||
{
|
||||
/* This must never be called if CONFIG_COCOA is disabled */
|
||||
error_report("Cocoa support is disabled");
|
||||
abort();
|
||||
}
|
||||
#endif
|
||||
struct QemuDisplay {
|
||||
DisplayType type;
|
||||
void (*early_init)(DisplayOptions *opts);
|
||||
void (*init)(DisplayState *ds, DisplayOptions *opts);
|
||||
};
|
||||
|
||||
void qemu_display_register(QemuDisplay *ui);
|
||||
bool qemu_display_find_default(DisplayOptions *opts);
|
||||
void qemu_display_early_init(DisplayOptions *opts);
|
||||
void qemu_display_init(DisplayState *ds, DisplayOptions *opts);
|
||||
|
||||
/* vnc.c */
|
||||
void vnc_display_init(const char *id);
|
||||
|
@ -473,42 +455,7 @@ int vnc_display_pw_expire(const char *id, time_t expires);
|
|||
QemuOpts *vnc_parse(const char *str, Error **errp);
|
||||
int vnc_init_func(void *opaque, QemuOpts *opts, Error **errp);
|
||||
|
||||
/* curses.c */
|
||||
#ifdef CONFIG_CURSES
|
||||
void curses_display_init(DisplayState *ds, DisplayOptions *opts);
|
||||
#else
|
||||
static inline void curses_display_init(DisplayState *ds, DisplayOptions *opts)
|
||||
{
|
||||
/* This must never be called if CONFIG_CURSES is disabled */
|
||||
error_report("curses support is disabled");
|
||||
abort();
|
||||
}
|
||||
#endif
|
||||
|
||||
/* input.c */
|
||||
int index_from_key(const char *key, size_t key_length);
|
||||
|
||||
/* gtk.c */
|
||||
#ifdef CONFIG_GTK
|
||||
void early_gtk_display_init(DisplayOptions *opts);
|
||||
void gtk_display_init(DisplayState *ds, DisplayOptions *opts);
|
||||
#else
|
||||
static inline void gtk_display_init(DisplayState *ds, DisplayOptions *opts)
|
||||
{
|
||||
/* This must never be called if CONFIG_GTK is disabled */
|
||||
error_report("GTK support is disabled");
|
||||
abort();
|
||||
}
|
||||
|
||||
static inline void early_gtk_display_init(DisplayOptions *opts)
|
||||
{
|
||||
/* This must never be called if CONFIG_GTK is disabled */
|
||||
error_report("GTK support is disabled");
|
||||
abort();
|
||||
}
|
||||
#endif
|
||||
|
||||
/* egl-headless.c */
|
||||
void egl_headless_init(DisplayOptions *opts);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue