mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
ui/console: Add placeholder flag to message surface
The surfaces created with former qemu_create_message_surface did not display the content from the guest and always contained simple messages describing the reason. A display backend may want to hide the window showing such a surface. This change renames the function to qemu_create_placeholder_surface, and adds "placeholder" flag; the display can check the flag to decide to do anything special like hiding the window. Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com> Message-Id: <20210225101316.83940-1-akihiko.odaki@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
4313739a57
commit
b5a087b071
5 changed files with 20 additions and 13 deletions
|
@ -106,6 +106,7 @@ struct QemuConsoleClass {
|
|||
};
|
||||
|
||||
#define QEMU_ALLOCATED_FLAG 0x01
|
||||
#define QEMU_PLACEHOLDER_FLAG 0x02
|
||||
|
||||
typedef struct DisplaySurface {
|
||||
pixman_format_code_t format;
|
||||
|
@ -259,8 +260,8 @@ DisplaySurface *qemu_create_displaysurface_from(int width, int height,
|
|||
pixman_format_code_t format,
|
||||
int linesize, uint8_t *data);
|
||||
DisplaySurface *qemu_create_displaysurface_pixman(pixman_image_t *image);
|
||||
DisplaySurface *qemu_create_message_surface(int w, int h,
|
||||
const char *msg);
|
||||
DisplaySurface *qemu_create_placeholder_surface(int w, int h,
|
||||
const char *msg);
|
||||
PixelFormat qemu_default_pixelformat(int bpp);
|
||||
|
||||
DisplaySurface *qemu_create_displaysurface(int width, int height);
|
||||
|
@ -281,6 +282,11 @@ static inline int is_buffer_shared(DisplaySurface *surface)
|
|||
return !(surface->flags & QEMU_ALLOCATED_FLAG);
|
||||
}
|
||||
|
||||
static inline int is_placeholder(DisplaySurface *surface)
|
||||
{
|
||||
return surface->flags & QEMU_PLACEHOLDER_FLAG;
|
||||
}
|
||||
|
||||
void register_displaychangelistener(DisplayChangeListener *dcl);
|
||||
void update_displaychangelistener(DisplayChangeListener *dcl,
|
||||
uint64_t interval);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue