Revision bd023f95 ui/vnc.h

b/ui/vnc.h
29 29

  
30 30
#include "qemu-common.h"
31 31
#include "qemu-queue.h"
32
#ifdef CONFIG_VNC_THREAD
33
#include "qemu-thread.h"
34
#endif
32 35
#include "console.h"
33 36
#include "monitor.h"
34 37
#include "audio/audio.h"
......
59 62
} Buffer;
60 63

  
61 64
typedef struct VncState VncState;
65
typedef struct VncJob VncJob;
66
typedef struct VncRect VncRect;
67
typedef struct VncRectEntry VncRectEntry;
62 68

  
63 69
typedef int VncReadEvent(VncState *vs, uint8_t *data, size_t len);
64 70

  
......
101 107
    DisplayState *ds;
102 108
    kbd_layout_t *kbd_layout;
103 109
    int lock_key_sync;
110
#ifdef CONFIG_VNC_THREAD
111
    QemuMutex mutex;
112
#endif
104 113

  
105 114
    QEMUCursor *cursor;
106 115
    int cursor_msize;
......
152 161
    int level;
153 162
} VncZlib;
154 163

  
164
#ifdef CONFIG_VNC_THREAD
165
struct VncRect
166
{
167
    int x;
168
    int y;
169
    int w;
170
    int h;
171
};
172

  
173
struct VncRectEntry
174
{
175
    struct VncRect rect;
176
    QLIST_ENTRY(VncRectEntry) next;
177
};
178

  
179
struct VncJob
180
{
181
    VncState *vs;
182

  
183
    QLIST_HEAD(, VncRectEntry) rectangles;
184
    QTAILQ_ENTRY(VncJob) next;
185
};
186
#else
187
struct VncJob
188
{
189
    VncState *vs;
190
    int rectangles;
191
    size_t saved_offset;
192
};
193
#endif
194

  
155 195
struct VncState
156 196
{
157 197
    int csock;
......
199 239
    uint8_t modifiers_state[256];
200 240
    QEMUPutLEDEntry *led;
201 241

  
202
    /* Encoding specific */
242
    bool abort;
243
#ifndef CONFIG_VNC_THREAD
244
    VncJob job;
245
#else
246
    QemuMutex output_mutex;
247
#endif
248

  
249
    /* Encoding specific, if you add something here, don't forget to
250
     *  update vnc_async_encoding_start()
251
     */
203 252
    VncTight tight;
204 253
    VncZlib zlib;
205 254
    VncHextile hextile;
......
431 480
void vnc_convert_pixel(VncState *vs, uint8_t *buf, uint32_t v);
432 481

  
433 482
/* Encodings */
483
int vnc_send_framebuffer_update(VncState *vs, int x, int y, int w, int h);
484

  
434 485
int vnc_raw_send_framebuffer_update(VncState *vs, int x, int y, int w, int h);
435 486

  
436 487
int vnc_hextile_send_framebuffer_update(VncState *vs, int x,

Also available in: Unified diff