mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
console: add qemu display registry, add gtk
Add a registry for user interfaces. Add qemu_display_init and qemu_display_early_init helper functions for display initialization. Hook up gtk ui as first user. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180301100547.18962-2-kraxel@redhat.com
This commit is contained in:
parent
136c67e078
commit
db71589fd9
4 changed files with 67 additions and 34 deletions
|
@ -432,6 +432,18 @@ void surface_gl_setup_viewport(QemuGLShader *gls,
|
|||
int ww, int wh);
|
||||
#endif
|
||||
|
||||
typedef struct QemuDisplay QemuDisplay;
|
||||
|
||||
struct QemuDisplay {
|
||||
DisplayType type;
|
||||
void (*early_init)(DisplayOptions *opts);
|
||||
void (*init)(DisplayState *ds, DisplayOptions *opts);
|
||||
};
|
||||
|
||||
void qemu_display_register(QemuDisplay *ui);
|
||||
void qemu_display_early_init(DisplayOptions *opts);
|
||||
void qemu_display_init(DisplayState *ds, DisplayOptions *opts);
|
||||
|
||||
/* sdl.c */
|
||||
#ifdef CONFIG_SDL
|
||||
void sdl_display_early_init(DisplayOptions *opts);
|
||||
|
@ -487,26 +499,6 @@ static inline void curses_display_init(DisplayState *ds, DisplayOptions *opts)
|
|||
/* 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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue