root / ui / spice-display.h @ d2d979c6
History | View | Annotate | Download (2.1 kB)
1 | a3e22260 | Gerd Hoffmann | /*
|
---|---|---|---|
2 | a3e22260 | Gerd Hoffmann | * Copyright (C) 2010 Red Hat, Inc.
|
3 | a3e22260 | Gerd Hoffmann | *
|
4 | a3e22260 | Gerd Hoffmann | * This program is free software; you can redistribute it and/or
|
5 | a3e22260 | Gerd Hoffmann | * modify it under the terms of the GNU General Public License as
|
6 | a3e22260 | Gerd Hoffmann | * published by the Free Software Foundation; either version 2 or
|
7 | a3e22260 | Gerd Hoffmann | * (at your option) version 3 of the License.
|
8 | a3e22260 | Gerd Hoffmann | *
|
9 | a3e22260 | Gerd Hoffmann | * This program is distributed in the hope that it will be useful,
|
10 | a3e22260 | Gerd Hoffmann | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11 | a3e22260 | Gerd Hoffmann | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12 | a3e22260 | Gerd Hoffmann | * GNU General Public License for more details.
|
13 | a3e22260 | Gerd Hoffmann | *
|
14 | a3e22260 | Gerd Hoffmann | * You should have received a copy of the GNU General Public License
|
15 | a3e22260 | Gerd Hoffmann | * along with this program; if not, see <http://www.gnu.org/licenses/>.
|
16 | a3e22260 | Gerd Hoffmann | */
|
17 | a3e22260 | Gerd Hoffmann | |
18 | a3e22260 | Gerd Hoffmann | #include <spice/ipc_ring.h> |
19 | a3e22260 | Gerd Hoffmann | #include <spice/enums.h> |
20 | a3e22260 | Gerd Hoffmann | #include <spice/qxl_dev.h> |
21 | a3e22260 | Gerd Hoffmann | |
22 | a3e22260 | Gerd Hoffmann | #include "pflib.h" |
23 | a3e22260 | Gerd Hoffmann | |
24 | a3e22260 | Gerd Hoffmann | #define NUM_MEMSLOTS 8 |
25 | a3e22260 | Gerd Hoffmann | #define MEMSLOT_GENERATION_BITS 8 |
26 | a3e22260 | Gerd Hoffmann | #define MEMSLOT_SLOT_BITS 8 |
27 | a3e22260 | Gerd Hoffmann | |
28 | a3e22260 | Gerd Hoffmann | #define MEMSLOT_GROUP_HOST 0 |
29 | a3e22260 | Gerd Hoffmann | #define MEMSLOT_GROUP_GUEST 1 |
30 | a3e22260 | Gerd Hoffmann | #define NUM_MEMSLOTS_GROUPS 2 |
31 | a3e22260 | Gerd Hoffmann | |
32 | a3e22260 | Gerd Hoffmann | #define NUM_SURFACES 1024 |
33 | a3e22260 | Gerd Hoffmann | |
34 | a3e22260 | Gerd Hoffmann | typedef struct SimpleSpiceDisplay { |
35 | a3e22260 | Gerd Hoffmann | DisplayState *ds; |
36 | a3e22260 | Gerd Hoffmann | void *buf;
|
37 | a3e22260 | Gerd Hoffmann | int bufsize;
|
38 | a3e22260 | Gerd Hoffmann | QXLWorker *worker; |
39 | a3e22260 | Gerd Hoffmann | QXLInstance qxl; |
40 | a3e22260 | Gerd Hoffmann | uint32_t unique; |
41 | a3e22260 | Gerd Hoffmann | QemuPfConv *conv; |
42 | a3e22260 | Gerd Hoffmann | |
43 | a3e22260 | Gerd Hoffmann | QXLRect dirty; |
44 | a3e22260 | Gerd Hoffmann | int notify;
|
45 | a3e22260 | Gerd Hoffmann | int running;
|
46 | a3e22260 | Gerd Hoffmann | } SimpleSpiceDisplay; |
47 | a3e22260 | Gerd Hoffmann | |
48 | a3e22260 | Gerd Hoffmann | typedef struct SimpleSpiceUpdate { |
49 | a3e22260 | Gerd Hoffmann | QXLDrawable drawable; |
50 | a3e22260 | Gerd Hoffmann | QXLImage image; |
51 | a3e22260 | Gerd Hoffmann | QXLCommandExt ext; |
52 | a3e22260 | Gerd Hoffmann | uint8_t *bitmap; |
53 | a3e22260 | Gerd Hoffmann | } SimpleSpiceUpdate; |
54 | a3e22260 | Gerd Hoffmann | |
55 | a3e22260 | Gerd Hoffmann | int qemu_spice_rect_is_empty(const QXLRect* r); |
56 | a3e22260 | Gerd Hoffmann | void qemu_spice_rect_union(QXLRect *dest, const QXLRect *r); |
57 | a3e22260 | Gerd Hoffmann | |
58 | a3e22260 | Gerd Hoffmann | SimpleSpiceUpdate *qemu_spice_create_update(SimpleSpiceDisplay *sdpy); |
59 | a3e22260 | Gerd Hoffmann | void qemu_spice_destroy_update(SimpleSpiceDisplay *sdpy, SimpleSpiceUpdate *update);
|
60 | a3e22260 | Gerd Hoffmann | void qemu_spice_create_host_memslot(SimpleSpiceDisplay *ssd);
|
61 | a3e22260 | Gerd Hoffmann | void qemu_spice_create_host_primary(SimpleSpiceDisplay *ssd);
|
62 | a3e22260 | Gerd Hoffmann | void qemu_spice_destroy_host_primary(SimpleSpiceDisplay *ssd);
|
63 | a3e22260 | Gerd Hoffmann | void qemu_spice_vm_change_state_handler(void *opaque, int running, int reason); |
64 | a3e22260 | Gerd Hoffmann | |
65 | a3e22260 | Gerd Hoffmann | void qemu_spice_display_update(SimpleSpiceDisplay *ssd,
|
66 | a3e22260 | Gerd Hoffmann | int x, int y, int w, int h); |
67 | a3e22260 | Gerd Hoffmann | void qemu_spice_display_resize(SimpleSpiceDisplay *ssd);
|
68 | a3e22260 | Gerd Hoffmann | void qemu_spice_display_refresh(SimpleSpiceDisplay *ssd); |