root / console.h @ 7e581fb3
History | View | Annotate | Download (10.7 kB)
1 | 87ecb68b | pbrook | #ifndef CONSOLE_H
|
---|---|---|---|
2 | 87ecb68b | pbrook | #define CONSOLE_H
|
3 | 87ecb68b | pbrook | |
4 | 87ecb68b | pbrook | #include "qemu-char.h" |
5 | d54908a5 | Luiz Capitulino | #include "qdict.h" |
6 | 7e581fb3 | Anthony Liguori | #include "notify.h" |
7 | 87ecb68b | pbrook | |
8 | 87ecb68b | pbrook | /* keyboard/mouse support */
|
9 | 87ecb68b | pbrook | |
10 | 87ecb68b | pbrook | #define MOUSE_EVENT_LBUTTON 0x01 |
11 | 87ecb68b | pbrook | #define MOUSE_EVENT_RBUTTON 0x02 |
12 | 87ecb68b | pbrook | #define MOUSE_EVENT_MBUTTON 0x04 |
13 | 87ecb68b | pbrook | |
14 | 03a23a85 | Gerd Hoffmann | /* identical to the ps/2 keyboard bits */
|
15 | 03a23a85 | Gerd Hoffmann | #define QEMU_SCROLL_LOCK_LED (1 << 0) |
16 | 03a23a85 | Gerd Hoffmann | #define QEMU_NUM_LOCK_LED (1 << 1) |
17 | 03a23a85 | Gerd Hoffmann | #define QEMU_CAPS_LOCK_LED (1 << 2) |
18 | 03a23a85 | Gerd Hoffmann | |
19 | 7ed9eba3 | aliguori | /* in ms */
|
20 | 7ed9eba3 | aliguori | #define GUI_REFRESH_INTERVAL 30 |
21 | 7ed9eba3 | aliguori | |
22 | 87ecb68b | pbrook | typedef void QEMUPutKBDEvent(void *opaque, int keycode); |
23 | 03a23a85 | Gerd Hoffmann | typedef void QEMUPutLEDEvent(void *opaque, int ledstate); |
24 | 87ecb68b | pbrook | typedef void QEMUPutMouseEvent(void *opaque, int dx, int dy, int dz, int buttons_state); |
25 | 87ecb68b | pbrook | |
26 | 87ecb68b | pbrook | typedef struct QEMUPutMouseEntry { |
27 | 87ecb68b | pbrook | QEMUPutMouseEvent *qemu_put_mouse_event; |
28 | 87ecb68b | pbrook | void *qemu_put_mouse_event_opaque;
|
29 | 87ecb68b | pbrook | int qemu_put_mouse_event_absolute;
|
30 | 87ecb68b | pbrook | char *qemu_put_mouse_event_name;
|
31 | 87ecb68b | pbrook | |
32 | 6fef28ee | Anthony Liguori | int index;
|
33 | 6fef28ee | Anthony Liguori | |
34 | 87ecb68b | pbrook | /* used internally by qemu for handling mice */
|
35 | 6fef28ee | Anthony Liguori | QTAILQ_ENTRY(QEMUPutMouseEntry) node; |
36 | 87ecb68b | pbrook | } QEMUPutMouseEntry; |
37 | 87ecb68b | pbrook | |
38 | 03a23a85 | Gerd Hoffmann | typedef struct QEMUPutLEDEntry { |
39 | 03a23a85 | Gerd Hoffmann | QEMUPutLEDEvent *put_led; |
40 | 03a23a85 | Gerd Hoffmann | void *opaque;
|
41 | 03a23a85 | Gerd Hoffmann | QTAILQ_ENTRY(QEMUPutLEDEntry) next; |
42 | 03a23a85 | Gerd Hoffmann | } QEMUPutLEDEntry; |
43 | 03a23a85 | Gerd Hoffmann | |
44 | 87ecb68b | pbrook | void qemu_add_kbd_event_handler(QEMUPutKBDEvent *func, void *opaque); |
45 | 87ecb68b | pbrook | QEMUPutMouseEntry *qemu_add_mouse_event_handler(QEMUPutMouseEvent *func, |
46 | 87ecb68b | pbrook | void *opaque, int absolute, |
47 | 87ecb68b | pbrook | const char *name); |
48 | 87ecb68b | pbrook | void qemu_remove_mouse_event_handler(QEMUPutMouseEntry *entry);
|
49 | 6fef28ee | Anthony Liguori | void qemu_activate_mouse_event_handler(QEMUPutMouseEntry *entry);
|
50 | 6fef28ee | Anthony Liguori | |
51 | 03a23a85 | Gerd Hoffmann | QEMUPutLEDEntry *qemu_add_led_event_handler(QEMUPutLEDEvent *func, void *opaque);
|
52 | 03a23a85 | Gerd Hoffmann | void qemu_remove_led_event_handler(QEMUPutLEDEntry *entry);
|
53 | 87ecb68b | pbrook | |
54 | 87ecb68b | pbrook | void kbd_put_keycode(int keycode); |
55 | 03a23a85 | Gerd Hoffmann | void kbd_put_ledstate(int ledstate); |
56 | 87ecb68b | pbrook | void kbd_mouse_event(int dx, int dy, int dz, int buttons_state); |
57 | eb2e259d | Anthony Liguori | |
58 | eb2e259d | Anthony Liguori | /* Does the current mouse generate absolute events */
|
59 | 87ecb68b | pbrook | int kbd_mouse_is_absolute(void); |
60 | 7e581fb3 | Anthony Liguori | void qemu_add_mouse_mode_change_notifier(Notifier *notify);
|
61 | 7e581fb3 | Anthony Liguori | void qemu_remove_mouse_mode_change_notifier(Notifier *notify);
|
62 | 87ecb68b | pbrook | |
63 | eb2e259d | Anthony Liguori | /* Of all the mice, is there one that generates absolute events */
|
64 | eb2e259d | Anthony Liguori | int kbd_mouse_has_absolute(void); |
65 | eb2e259d | Anthony Liguori | |
66 | bc24a225 | Paul Brook | struct MouseTransformInfo {
|
67 | a5d7eb65 | balrog | /* Touchscreen resolution */
|
68 | a5d7eb65 | balrog | int x;
|
69 | a5d7eb65 | balrog | int y;
|
70 | a5d7eb65 | balrog | /* Calibration values as used/generated by tslib */
|
71 | a5d7eb65 | balrog | int a[7]; |
72 | a5d7eb65 | balrog | }; |
73 | a5d7eb65 | balrog | |
74 | e78c48ec | Luiz Capitulino | void do_info_mice_print(Monitor *mon, const QObject *data); |
75 | e78c48ec | Luiz Capitulino | void do_info_mice(Monitor *mon, QObject **ret_data);
|
76 | d54908a5 | Luiz Capitulino | void do_mouse_set(Monitor *mon, const QDict *qdict); |
77 | 87ecb68b | pbrook | |
78 | 87ecb68b | pbrook | /* keysym is a unicode code except for special keys (see QEMU_KEY_xxx
|
79 | 87ecb68b | pbrook | constants) */
|
80 | 87ecb68b | pbrook | #define QEMU_KEY_ESC1(c) ((c) | 0xe100) |
81 | 87ecb68b | pbrook | #define QEMU_KEY_BACKSPACE 0x007f |
82 | 87ecb68b | pbrook | #define QEMU_KEY_UP QEMU_KEY_ESC1('A') |
83 | 87ecb68b | pbrook | #define QEMU_KEY_DOWN QEMU_KEY_ESC1('B') |
84 | 87ecb68b | pbrook | #define QEMU_KEY_RIGHT QEMU_KEY_ESC1('C') |
85 | 87ecb68b | pbrook | #define QEMU_KEY_LEFT QEMU_KEY_ESC1('D') |
86 | 87ecb68b | pbrook | #define QEMU_KEY_HOME QEMU_KEY_ESC1(1) |
87 | 87ecb68b | pbrook | #define QEMU_KEY_END QEMU_KEY_ESC1(4) |
88 | 87ecb68b | pbrook | #define QEMU_KEY_PAGEUP QEMU_KEY_ESC1(5) |
89 | 87ecb68b | pbrook | #define QEMU_KEY_PAGEDOWN QEMU_KEY_ESC1(6) |
90 | 87ecb68b | pbrook | #define QEMU_KEY_DELETE QEMU_KEY_ESC1(3) |
91 | 87ecb68b | pbrook | |
92 | 87ecb68b | pbrook | #define QEMU_KEY_CTRL_UP 0xe400 |
93 | 87ecb68b | pbrook | #define QEMU_KEY_CTRL_DOWN 0xe401 |
94 | 87ecb68b | pbrook | #define QEMU_KEY_CTRL_LEFT 0xe402 |
95 | 87ecb68b | pbrook | #define QEMU_KEY_CTRL_RIGHT 0xe403 |
96 | 87ecb68b | pbrook | #define QEMU_KEY_CTRL_HOME 0xe404 |
97 | 87ecb68b | pbrook | #define QEMU_KEY_CTRL_END 0xe405 |
98 | 87ecb68b | pbrook | #define QEMU_KEY_CTRL_PAGEUP 0xe406 |
99 | 87ecb68b | pbrook | #define QEMU_KEY_CTRL_PAGEDOWN 0xe407 |
100 | 87ecb68b | pbrook | |
101 | 87ecb68b | pbrook | void kbd_put_keysym(int keysym); |
102 | 87ecb68b | pbrook | |
103 | 87ecb68b | pbrook | /* consoles */
|
104 | 87ecb68b | pbrook | |
105 | 7d957bd8 | aliguori | #define QEMU_BIG_ENDIAN_FLAG 0x01 |
106 | 7d957bd8 | aliguori | #define QEMU_ALLOCATED_FLAG 0x02 |
107 | c18a2c36 | Stefano Stabellini | #define QEMU_REALPIXELS_FLAG 0x04 |
108 | 7d957bd8 | aliguori | |
109 | 7d957bd8 | aliguori | struct PixelFormat {
|
110 | 7d957bd8 | aliguori | uint8_t bits_per_pixel; |
111 | 7d957bd8 | aliguori | uint8_t bytes_per_pixel; |
112 | 7d957bd8 | aliguori | uint8_t depth; /* color depth in bits */
|
113 | 7d957bd8 | aliguori | uint32_t rmask, gmask, bmask, amask; |
114 | 7d957bd8 | aliguori | uint8_t rshift, gshift, bshift, ashift; |
115 | 7d957bd8 | aliguori | uint8_t rmax, gmax, bmax, amax; |
116 | 90a1e3c0 | aliguori | uint8_t rbits, gbits, bbits, abits; |
117 | 7d957bd8 | aliguori | }; |
118 | 7d957bd8 | aliguori | |
119 | 7d957bd8 | aliguori | struct DisplaySurface {
|
120 | 7d957bd8 | aliguori | uint8_t flags; |
121 | 87ecb68b | pbrook | int width;
|
122 | 87ecb68b | pbrook | int height;
|
123 | 7d957bd8 | aliguori | int linesize; /* bytes per line */ |
124 | 7d957bd8 | aliguori | uint8_t *data; |
125 | 7d957bd8 | aliguori | |
126 | 7d957bd8 | aliguori | struct PixelFormat pf;
|
127 | 7d957bd8 | aliguori | }; |
128 | 7d957bd8 | aliguori | |
129 | 7d957bd8 | aliguori | struct DisplayChangeListener {
|
130 | 7d957bd8 | aliguori | int idle;
|
131 | f442e08b | aurel32 | uint64_t gui_timer_interval; |
132 | 87ecb68b | pbrook | |
133 | 87ecb68b | pbrook | void (*dpy_update)(struct DisplayState *s, int x, int y, int w, int h); |
134 | 7d957bd8 | aliguori | void (*dpy_resize)(struct DisplayState *s); |
135 | 7d957bd8 | aliguori | void (*dpy_setdata)(struct DisplayState *s); |
136 | 87ecb68b | pbrook | void (*dpy_refresh)(struct DisplayState *s); |
137 | 87ecb68b | pbrook | void (*dpy_copy)(struct DisplayState *s, int src_x, int src_y, |
138 | 87ecb68b | pbrook | int dst_x, int dst_y, int w, int h); |
139 | 87ecb68b | pbrook | void (*dpy_fill)(struct DisplayState *s, int x, int y, |
140 | 87ecb68b | pbrook | int w, int h, uint32_t c); |
141 | 4d3b6f6e | balrog | void (*dpy_text_cursor)(struct DisplayState *s, int x, int y); |
142 | 7d957bd8 | aliguori | |
143 | 7d957bd8 | aliguori | struct DisplayChangeListener *next;
|
144 | 7d957bd8 | aliguori | }; |
145 | 7d957bd8 | aliguori | |
146 | 7b5d76da | aliguori | struct DisplayAllocator {
|
147 | 7b5d76da | aliguori | DisplaySurface* (*create_displaysurface)(int width, int height); |
148 | 7b5d76da | aliguori | DisplaySurface* (*resize_displaysurface)(DisplaySurface *surface, int width, int height); |
149 | 7b5d76da | aliguori | void (*free_displaysurface)(DisplaySurface *surface);
|
150 | 7b5d76da | aliguori | }; |
151 | 7b5d76da | aliguori | |
152 | 7d957bd8 | aliguori | struct DisplayState {
|
153 | 7d957bd8 | aliguori | struct DisplaySurface *surface;
|
154 | 7d957bd8 | aliguori | void *opaque;
|
155 | 7d957bd8 | aliguori | struct QEMUTimer *gui_timer;
|
156 | 7d957bd8 | aliguori | |
157 | 7b5d76da | aliguori | struct DisplayAllocator* allocator;
|
158 | 7d957bd8 | aliguori | struct DisplayChangeListener* listeners;
|
159 | 7d957bd8 | aliguori | |
160 | 87ecb68b | pbrook | void (*mouse_set)(int x, int y, int on); |
161 | 87ecb68b | pbrook | void (*cursor_define)(int width, int height, int bpp, int hot_x, int hot_y, |
162 | 87ecb68b | pbrook | uint8_t *image, uint8_t *mask); |
163 | 3023f332 | aliguori | |
164 | 3023f332 | aliguori | struct DisplayState *next;
|
165 | 87ecb68b | pbrook | }; |
166 | 87ecb68b | pbrook | |
167 | 3023f332 | aliguori | void register_displaystate(DisplayState *ds);
|
168 | 3023f332 | aliguori | DisplayState *get_displaystate(void);
|
169 | 7d957bd8 | aliguori | DisplaySurface* qemu_create_displaysurface_from(int width, int height, int bpp, |
170 | 7d957bd8 | aliguori | int linesize, uint8_t *data);
|
171 | 0da2ea1b | malc | PixelFormat qemu_different_endianness_pixelformat(int bpp);
|
172 | 0da2ea1b | malc | PixelFormat qemu_default_pixelformat(int bpp);
|
173 | 7d957bd8 | aliguori | |
174 | 7b5d76da | aliguori | DisplayAllocator *register_displayallocator(DisplayState *ds, DisplayAllocator *da); |
175 | 7b5d76da | aliguori | |
176 | 7b5d76da | aliguori | static inline DisplaySurface* qemu_create_displaysurface(DisplayState *ds, int width, int height) |
177 | 7b5d76da | aliguori | { |
178 | 7b5d76da | aliguori | return ds->allocator->create_displaysurface(width, height);
|
179 | 7b5d76da | aliguori | } |
180 | 7b5d76da | aliguori | |
181 | 7b5d76da | aliguori | static inline DisplaySurface* qemu_resize_displaysurface(DisplayState *ds, int width, int height) |
182 | 7b5d76da | aliguori | { |
183 | 7b5d76da | aliguori | return ds->allocator->resize_displaysurface(ds->surface, width, height);
|
184 | 7b5d76da | aliguori | } |
185 | 7b5d76da | aliguori | |
186 | 7b5d76da | aliguori | static inline void qemu_free_displaysurface(DisplayState *ds) |
187 | 7b5d76da | aliguori | { |
188 | 7b5d76da | aliguori | ds->allocator->free_displaysurface(ds->surface); |
189 | 7b5d76da | aliguori | } |
190 | 7b5d76da | aliguori | |
191 | 7b5d76da | aliguori | static inline int is_surface_bgr(DisplaySurface *surface) |
192 | 7b5d76da | aliguori | { |
193 | 7b5d76da | aliguori | if (surface->pf.bits_per_pixel == 32 && surface->pf.rshift == 0) |
194 | 7b5d76da | aliguori | return 1; |
195 | 7b5d76da | aliguori | else
|
196 | 7b5d76da | aliguori | return 0; |
197 | 7b5d76da | aliguori | } |
198 | 7b5d76da | aliguori | |
199 | 7d957bd8 | aliguori | static inline int is_buffer_shared(DisplaySurface *surface) |
200 | 7d957bd8 | aliguori | { |
201 | c18a2c36 | Stefano Stabellini | return (!(surface->flags & QEMU_ALLOCATED_FLAG) &&
|
202 | c18a2c36 | Stefano Stabellini | !(surface->flags & QEMU_REALPIXELS_FLAG)); |
203 | 7d957bd8 | aliguori | } |
204 | 7d957bd8 | aliguori | |
205 | 7d957bd8 | aliguori | static inline void register_displaychangelistener(DisplayState *ds, DisplayChangeListener *dcl) |
206 | 7d957bd8 | aliguori | { |
207 | 7d957bd8 | aliguori | dcl->next = ds->listeners; |
208 | 7d957bd8 | aliguori | ds->listeners = dcl; |
209 | 7d957bd8 | aliguori | } |
210 | 7d957bd8 | aliguori | |
211 | 87ecb68b | pbrook | static inline void dpy_update(DisplayState *s, int x, int y, int w, int h) |
212 | 87ecb68b | pbrook | { |
213 | 7d957bd8 | aliguori | struct DisplayChangeListener *dcl = s->listeners;
|
214 | 7d957bd8 | aliguori | while (dcl != NULL) { |
215 | 7d957bd8 | aliguori | dcl->dpy_update(s, x, y, w, h); |
216 | 7d957bd8 | aliguori | dcl = dcl->next; |
217 | 7d957bd8 | aliguori | } |
218 | 87ecb68b | pbrook | } |
219 | 87ecb68b | pbrook | |
220 | 7d957bd8 | aliguori | static inline void dpy_resize(DisplayState *s) |
221 | 87ecb68b | pbrook | { |
222 | 7d957bd8 | aliguori | struct DisplayChangeListener *dcl = s->listeners;
|
223 | 7d957bd8 | aliguori | while (dcl != NULL) { |
224 | 7d957bd8 | aliguori | dcl->dpy_resize(s); |
225 | 7d957bd8 | aliguori | dcl = dcl->next; |
226 | 7d957bd8 | aliguori | } |
227 | 87ecb68b | pbrook | } |
228 | 87ecb68b | pbrook | |
229 | 7d957bd8 | aliguori | static inline void dpy_setdata(DisplayState *s) |
230 | 4d3b6f6e | balrog | { |
231 | 7d957bd8 | aliguori | struct DisplayChangeListener *dcl = s->listeners;
|
232 | 7d957bd8 | aliguori | while (dcl != NULL) { |
233 | 7d957bd8 | aliguori | if (dcl->dpy_setdata) dcl->dpy_setdata(s);
|
234 | 7d957bd8 | aliguori | dcl = dcl->next; |
235 | 7d957bd8 | aliguori | } |
236 | 7d957bd8 | aliguori | } |
237 | 7d957bd8 | aliguori | |
238 | 7d957bd8 | aliguori | static inline void dpy_refresh(DisplayState *s) |
239 | 7d957bd8 | aliguori | { |
240 | 7d957bd8 | aliguori | struct DisplayChangeListener *dcl = s->listeners;
|
241 | 7d957bd8 | aliguori | while (dcl != NULL) { |
242 | 7d957bd8 | aliguori | if (dcl->dpy_refresh) dcl->dpy_refresh(s);
|
243 | 7d957bd8 | aliguori | dcl = dcl->next; |
244 | 7d957bd8 | aliguori | } |
245 | 7d957bd8 | aliguori | } |
246 | 7d957bd8 | aliguori | |
247 | 7d957bd8 | aliguori | static inline void dpy_copy(struct DisplayState *s, int src_x, int src_y, |
248 | 7d957bd8 | aliguori | int dst_x, int dst_y, int w, int h) { |
249 | 7d957bd8 | aliguori | struct DisplayChangeListener *dcl = s->listeners;
|
250 | 7d957bd8 | aliguori | while (dcl != NULL) { |
251 | 7d957bd8 | aliguori | if (dcl->dpy_copy)
|
252 | 7d957bd8 | aliguori | dcl->dpy_copy(s, src_x, src_y, dst_x, dst_y, w, h); |
253 | 7d957bd8 | aliguori | else /* TODO */ |
254 | 7d957bd8 | aliguori | dcl->dpy_update(s, dst_x, dst_y, w, h); |
255 | 7d957bd8 | aliguori | dcl = dcl->next; |
256 | 7d957bd8 | aliguori | } |
257 | 7d957bd8 | aliguori | } |
258 | 7d957bd8 | aliguori | |
259 | 7d957bd8 | aliguori | static inline void dpy_fill(struct DisplayState *s, int x, int y, |
260 | 7d957bd8 | aliguori | int w, int h, uint32_t c) { |
261 | 7d957bd8 | aliguori | struct DisplayChangeListener *dcl = s->listeners;
|
262 | 7d957bd8 | aliguori | while (dcl != NULL) { |
263 | 7d957bd8 | aliguori | if (dcl->dpy_fill) dcl->dpy_fill(s, x, y, w, h, c);
|
264 | 7d957bd8 | aliguori | dcl = dcl->next; |
265 | 7d957bd8 | aliguori | } |
266 | 7d957bd8 | aliguori | } |
267 | 7d957bd8 | aliguori | |
268 | 7d957bd8 | aliguori | static inline void dpy_cursor(struct DisplayState *s, int x, int y) { |
269 | 7d957bd8 | aliguori | struct DisplayChangeListener *dcl = s->listeners;
|
270 | 7d957bd8 | aliguori | while (dcl != NULL) { |
271 | 7d957bd8 | aliguori | if (dcl->dpy_text_cursor) dcl->dpy_text_cursor(s, x, y);
|
272 | 7d957bd8 | aliguori | dcl = dcl->next; |
273 | 7d957bd8 | aliguori | } |
274 | 4d3b6f6e | balrog | } |
275 | 4d3b6f6e | balrog | |
276 | 0e1f5a0c | aliguori | static inline int ds_get_linesize(DisplayState *ds) |
277 | 0e1f5a0c | aliguori | { |
278 | 7d957bd8 | aliguori | return ds->surface->linesize;
|
279 | 0e1f5a0c | aliguori | } |
280 | 0e1f5a0c | aliguori | |
281 | 0e1f5a0c | aliguori | static inline uint8_t* ds_get_data(DisplayState *ds) |
282 | 0e1f5a0c | aliguori | { |
283 | 7d957bd8 | aliguori | return ds->surface->data;
|
284 | 0e1f5a0c | aliguori | } |
285 | 0e1f5a0c | aliguori | |
286 | 0e1f5a0c | aliguori | static inline int ds_get_width(DisplayState *ds) |
287 | 0e1f5a0c | aliguori | { |
288 | 7d957bd8 | aliguori | return ds->surface->width;
|
289 | 0e1f5a0c | aliguori | } |
290 | 0e1f5a0c | aliguori | |
291 | 0e1f5a0c | aliguori | static inline int ds_get_height(DisplayState *ds) |
292 | 0e1f5a0c | aliguori | { |
293 | 7d957bd8 | aliguori | return ds->surface->height;
|
294 | 0e1f5a0c | aliguori | } |
295 | 0e1f5a0c | aliguori | |
296 | 0e1f5a0c | aliguori | static inline int ds_get_bits_per_pixel(DisplayState *ds) |
297 | 0e1f5a0c | aliguori | { |
298 | 7d957bd8 | aliguori | return ds->surface->pf.bits_per_pixel;
|
299 | 0e1f5a0c | aliguori | } |
300 | 0e1f5a0c | aliguori | |
301 | 8927bcfd | aliguori | static inline int ds_get_bytes_per_pixel(DisplayState *ds) |
302 | 8927bcfd | aliguori | { |
303 | 7d957bd8 | aliguori | return ds->surface->pf.bytes_per_pixel;
|
304 | 8927bcfd | aliguori | } |
305 | 8927bcfd | aliguori | |
306 | c227f099 | Anthony Liguori | typedef unsigned long console_ch_t; |
307 | c227f099 | Anthony Liguori | static inline void console_write_ch(console_ch_t *dest, uint32_t ch) |
308 | 4d3b6f6e | balrog | { |
309 | 4d3b6f6e | balrog | cpu_to_le32wu((uint32_t *) dest, ch); |
310 | 4d3b6f6e | balrog | } |
311 | 4d3b6f6e | balrog | |
312 | 87ecb68b | pbrook | typedef void (*vga_hw_update_ptr)(void *); |
313 | 87ecb68b | pbrook | typedef void (*vga_hw_invalidate_ptr)(void *); |
314 | 87ecb68b | pbrook | typedef void (*vga_hw_screen_dump_ptr)(void *, const char *); |
315 | c227f099 | Anthony Liguori | typedef void (*vga_hw_text_update_ptr)(void *, console_ch_t *); |
316 | 87ecb68b | pbrook | |
317 | 3023f332 | aliguori | DisplayState *graphic_console_init(vga_hw_update_ptr update, |
318 | 3023f332 | aliguori | vga_hw_invalidate_ptr invalidate, |
319 | 3023f332 | aliguori | vga_hw_screen_dump_ptr screen_dump, |
320 | 3023f332 | aliguori | vga_hw_text_update_ptr text_update, |
321 | 3023f332 | aliguori | void *opaque);
|
322 | 3023f332 | aliguori | |
323 | 87ecb68b | pbrook | void vga_hw_update(void); |
324 | 87ecb68b | pbrook | void vga_hw_invalidate(void); |
325 | 87ecb68b | pbrook | void vga_hw_screen_dump(const char *filename); |
326 | c227f099 | Anthony Liguori | void vga_hw_text_update(console_ch_t *chardata);
|
327 | 87ecb68b | pbrook | |
328 | 87ecb68b | pbrook | int is_graphic_console(void); |
329 | c21bbcfa | balrog | int is_fixedsize_console(void); |
330 | 6ea314d9 | Gerd Hoffmann | CharDriverState *text_console_init(QemuOpts *opts); |
331 | 2796dae0 | aliguori | void text_consoles_set_display(DisplayState *ds);
|
332 | 87ecb68b | pbrook | void console_select(unsigned int index); |
333 | 87ecb68b | pbrook | void console_color_init(DisplayState *ds);
|
334 | 3023f332 | aliguori | void qemu_console_resize(DisplayState *ds, int width, int height); |
335 | 3023f332 | aliguori | void qemu_console_copy(DisplayState *ds, int src_x, int src_y, |
336 | 3023f332 | aliguori | int dst_x, int dst_y, int w, int h); |
337 | 87ecb68b | pbrook | |
338 | 87ecb68b | pbrook | /* sdl.c */
|
339 | 87ecb68b | pbrook | void sdl_display_init(DisplayState *ds, int full_screen, int no_frame); |
340 | 87ecb68b | pbrook | |
341 | 87ecb68b | pbrook | /* cocoa.m */
|
342 | 87ecb68b | pbrook | void cocoa_display_init(DisplayState *ds, int full_screen); |
343 | 87ecb68b | pbrook | |
344 | 87ecb68b | pbrook | /* vnc.c */
|
345 | 87ecb68b | pbrook | void vnc_display_init(DisplayState *ds);
|
346 | 87ecb68b | pbrook | void vnc_display_close(DisplayState *ds);
|
347 | 87ecb68b | pbrook | int vnc_display_open(DisplayState *ds, const char *display); |
348 | 87ecb68b | pbrook | int vnc_display_password(DisplayState *ds, const char *password); |
349 | d96fd29c | Luiz Capitulino | void do_info_vnc_print(Monitor *mon, const QObject *data); |
350 | d96fd29c | Luiz Capitulino | void do_info_vnc(Monitor *mon, QObject **ret_data);
|
351 | f92f8afe | Anthony Liguori | char *vnc_display_local_addr(DisplayState *ds);
|
352 | 87ecb68b | pbrook | |
353 | 4d3b6f6e | balrog | /* curses.c */
|
354 | 4d3b6f6e | balrog | void curses_display_init(DisplayState *ds, int full_screen); |
355 | 4d3b6f6e | balrog | |
356 | 87ecb68b | pbrook | #endif |