mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07: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:
+12
-20
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user