aboutsummaryrefslogtreecommitdiff
path: root/ui/vnc.h
diff options
context:
space:
mode:
authorFathi Boudra <fathi.boudra@linaro.org>2012-12-25 16:58:54 +0200
committerFathi Boudra <fathi.boudra@linaro.org>2012-12-25 16:58:54 +0200
commit17d4e9b1e2d6d32da51278a4165621af99bade02 (patch)
tree476579c2abd0da7fe508815b6bc7bcd5037193df /ui/vnc.h
parentdd55a01d2af35f5e9dabb2b745770afd008c9e24 (diff)
Imported Upstream version 1.3.0-2012.12upstream/1.3.0-2012.12
Diffstat (limited to 'ui/vnc.h')
-rw-r--r--ui/vnc.h24
1 files changed, 15 insertions, 9 deletions
diff --git a/ui/vnc.h b/ui/vnc.h
index 068c2fc..6141e88 100644
--- a/ui/vnc.h
+++ b/ui/vnc.h
@@ -69,7 +69,7 @@ typedef struct VncRectEntry VncRectEntry;
typedef int VncReadEvent(VncState *vs, uint8_t *data, size_t len);
-typedef void VncWritePixels(VncState *vs, struct PixelFormat *pf, void *data, int size);
+typedef void VncWritePixels(VncState *vs, void *data, int size);
typedef void VncSendHextileTile(VncState *vs,
int x, int y, int w, int h,
@@ -117,7 +117,8 @@ struct VncSurface
struct timeval last_freq_check;
DECLARE_BITMAP(dirty[VNC_MAX_HEIGHT], VNC_MAX_WIDTH / 16);
VncRectStat stats[VNC_STAT_ROWS][VNC_STAT_COLS];
- DisplaySurface *ds;
+ pixman_image_t *fb;
+ pixman_format_code_t format;
};
typedef enum VncShareMode {
@@ -151,7 +152,7 @@ struct VncDisplay
uint8_t *cursor_mask;
struct VncSurface guest; /* guest visible surface (aka ds->surface) */
- DisplaySurface *server; /* vnc server surface */
+ pixman_image_t *server; /* vnc server surface */
char *display;
char *password;
@@ -275,7 +276,9 @@ struct VncState
Buffer input;
/* current output mode information */
VncWritePixels *write_pixels;
- DisplaySurface clientds;
+ PixelFormat client_pf;
+ pixman_format_code_t client_format;
+ bool client_be;
CaptureVoiceOut *audio_cap;
struct audsettings as;
@@ -493,9 +496,6 @@ void vnc_read_when(VncState *vs, VncReadEvent *func, size_t expecting);
/* Buffer I/O functions */
-uint8_t read_u8(uint8_t *data, size_t offset);
-uint16_t read_u16(uint8_t *data, size_t offset);
-int32_t read_s32(uint8_t *data, size_t offset);
uint32_t read_u32(uint8_t *data, size_t offset);
/* Protocol stage functions */
@@ -507,8 +507,6 @@ void start_auth_vnc(VncState *vs);
/* Buffer management */
void buffer_reserve(Buffer *buffer, size_t len);
-int buffer_empty(Buffer *buffer);
-uint8_t *buffer_end(Buffer *buffer);
void buffer_reset(Buffer *buffer);
void buffer_free(Buffer *buffer);
void buffer_append(Buffer *buffer, const void *data, size_t len);
@@ -527,6 +525,14 @@ static inline uint32_t vnc_has_feature(VncState *vs, int feature) {
void vnc_framebuffer_update(VncState *vs, int x, int y, int w, int h,
int32_t encoding);
+/* server fb is in PIXMAN_x8r8g8b8 */
+#define VNC_SERVER_FB_FORMAT PIXMAN_FORMAT(32, PIXMAN_TYPE_ARGB, 0, 8, 8, 8)
+#define VNC_SERVER_FB_BITS (PIXMAN_FORMAT_BPP(VNC_SERVER_FB_FORMAT))
+#define VNC_SERVER_FB_BYTES ((VNC_SERVER_FB_BITS+7)/8)
+
+void *vnc_server_fb_ptr(VncDisplay *vd, int x, int y);
+int vnc_server_fb_stride(VncDisplay *vd);
+
void vnc_convert_pixel(VncState *vs, uint8_t *buf, uint32_t v);
double vnc_update_freq(VncState *vs, int x, int y, int w, int h);
void vnc_sent_lossy_rect(VncState *vs, int x, int y, int w, int h);