35 #ifndef __VNC_SERVER_H__
36 #define __VNC_SERVER_H__
45 struct vnc_server_update {
46 struct vnc_server_update *
next;
48 #define VNC_SERVER_UPDATE_NONE 0
49 #define VNC_SERVER_UPDATE_PARTS 1
50 #define VNC_SERVER_UPDATE_FULL 2
58 struct vnc_server_state {
64 u8_t update_requested;
67 u8_t x, y, x1, y1, x2, y2;
77 struct vnc_server_update *updates_current;
78 struct vnc_server_update *updates_pending;
79 struct vnc_server_update *updates_free;
81 #define VNC_SERVER_MAX_UPDATES 8
82 struct vnc_server_update updates_pool[VNC_SERVER_MAX_UPDATES];
86 struct vnc_server_update *
89 struct vnc_server_update *a);
91 struct vnc_server_update *a);
94 struct vnc_server_update *a);
95 struct vnc_server_update *
101 void vnc_server_init(
void);
102 void vnc_server_appcall(
struct vnc_server_state *state);
105 extern struct vnc_server_state *vs;
131 #include "contiki-net.h"
133 void vnc_server_send_data(
struct vnc_server_state *vs);
134 u8_t vnc_server_draw_rect(u8_t *ptr, u16_t x, u16_t y, u16_t w, u16_t h, u8_t c);
146 struct rfb_pixel_format {
154 u16_t red_max, green_max, blue_max;
155 u8_t red_shift, green_shift, blue_shift;
163 #define RFB_AUTH_FAILED 0
164 #define RFB_AUTH_NONE 1
165 #define RFB_AUTH_VNC 2
167 #define RFB_VNC_AUTH_OK 0
168 #define RFB_VNC_AUTH_FAILED 1
169 #define RFB_VNC_AUTH_TOOMANY 2
174 #define RFB_FB_UPDATE 0
175 #define RFB_SET_COLORMAP_ENTRIES 1
177 #define RFB_SERVER_CUT_TEXT 3
180 #define RFB_SET_PIXEL_FORMAT 0
181 #define RFB_FIX_COLORMAP_ENTRIES 1
182 #define RFB_SET_ENCODINGS 2
183 #define RFB_FB_UPDATE_REQ 3
184 #define RFB_KEY_EVENT 4
185 #define RFB_POINTER_EVENT 5
186 #define RFB_CLIENT_CUT_TEXT 6
189 #define RFB_ENC_RAW 0
190 #define RFB_ENC_COPYRECT 1
191 #define RFB_ENC_RRE 2
192 #define RFB_ENC_CORRE 3
193 #define RFB_ENC_HEXTILE 4
199 struct rfb_server_init {
202 struct rfb_pixel_format format;
207 struct rfb_fb_update {
214 struct rfb_fb_update_rect_hdr {
215 struct rfb_rect rect;
219 struct rfb_copy_rect {
230 struct rfb_rre_subrect {
232 struct rfb_rect rect;
235 struct rfb_corre_rect {
244 struct rfb_set_pixel_format {
248 struct rfb_pixel_format format;
251 struct rfb_fix_colormap_entries {
258 struct rfb_set_encoding {
264 struct rfb_fb_update_request {
273 struct rfb_key_event {
280 #define RFB_BUTTON_MASK1 1
281 #define RFB_BUTTON_MASK2 2
282 #define RFB_BUTTON_MASK3 4
283 struct rfb_pointer_event {
290 struct rfb_client_cut_text {