diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2013-09-26 11:28:07 -0700 |
---|---|---|
committer | Jay Sorg <jay.sorg@gmail.com> | 2013-09-26 11:28:07 -0700 |
commit | c1b7cbd6571b5cb71ddf59014273a189ffa32f66 (patch) | |
tree | 1c8363f3f6521aaa1d83a262e3ce2c75bce63477 /xup | |
parent | 5e005bf26ce965350cac7f942678031d5482d867 (diff) | |
parent | b857a69332933244838fcbcfdfe4688953d149f9 (diff) | |
download | xrdp-proprietary-c1b7cbd6571b5cb71ddf59014273a189ffa32f66.tar.gz xrdp-proprietary-c1b7cbd6571b5cb71ddf59014273a189ffa32f66.zip |
merges from authentic8
Diffstat (limited to 'xup')
-rw-r--r-- | xup/xup.c | 148 | ||||
-rw-r--r-- | xup/xup.h | 18 |
2 files changed, 164 insertions, 2 deletions
@@ -23,6 +23,12 @@ #include <sys/ipc.h> #include <sys/shm.h> +#define LOG_LEVEL 1 +#define LLOG(_level, _args) \ + do { if (_level < LOG_LEVEL) { g_write _args ; } } while (0) +#define LLOGLN(_level, _args) \ + do { if (_level < LOG_LEVEL) { g_writeln _args ; } } while (0) + /******************************************************************************/ /* returns error */ int DEFAULT_CC @@ -479,6 +485,25 @@ process_server_window_new_update(struct mod *mod, struct stream *s) /******************************************************************************/ /* return error */ static int APP_CC +process_server_window_show(struct mod* mod, struct stream* s) +{ + int window_id; + int rv; + int flags; + struct rail_window_state_order rwso; + + g_memset(&rwso, 0, sizeof(rwso)); + in_uint32_le(s, window_id); + in_uint32_le(s, flags); + in_uint32_le(s, rwso.show_state); + mod->server_window_new_update(mod, window_id, &rwso, flags); + rv = 0; + return rv; +} + +/******************************************************************************/ +/* return error */ +static int APP_CC process_server_window_delete(struct mod *mod, struct stream *s) { int window_id; @@ -553,12 +578,17 @@ lib_mod_process_orders(struct mod *mod, int type, struct stream *s) int cy; int srcx; int srcy; + int mskx; + int msky; + int dstx; + int dsty; int len_bmpdata; int style; int x1; int y1; int x2; int y2; + int bpp; int rdpid; int hints; int mask; @@ -571,6 +601,29 @@ lib_mod_process_orders(struct mod *mod, int type, struct stream *s) int shmem_id; int shmem_offset; int frame_id; + int charactor; + int font; + int mixmode; + int clip_left; + int clip_top; + int clip_right; + int clip_bottom; + int box_left; + int box_top; + int box_right; + int box_bottom; + int srcrepeat; + int srcidx; + int srcformat; + int srcwidth; + int mskflags; + int mskidx; + int mskformat; + int mskwidth; + int mskrepeat; + int dstformat; + int op; + int transform[10]; char *bmpdata; char cur_data[32 * (32 * 3)]; char cur_mask[32 * (32 / 8)]; @@ -693,6 +746,101 @@ lib_mod_process_orders(struct mod *mod, int type, struct stream *s) case 26: /* server_window_delete */ rv = process_server_window_delete(mod, s); break; + case 27: /* server_window_new_update - show */ + rv = process_server_window_show(mod, s); + break; + case 28: /* server_add_char */ + in_uint16_le(s, font); + in_uint16_le(s, charactor); + in_sint16_le(s, x); + in_sint16_le(s, y); + in_uint16_le(s, cx); + in_uint16_le(s, cy); + in_uint16_le(s, len_bmpdata); + in_uint8p(s, bmpdata, len_bmpdata); + rv = mod->server_add_char(mod, font, charactor, x, y, cx, cy, bmpdata); + break; + case 29: /* server_add_char_alpha */ + in_uint16_le(s, font); + in_uint16_le(s, charactor); + in_sint16_le(s, x); + in_sint16_le(s, y); + in_uint16_le(s, cx); + in_uint16_le(s, cy); + in_uint16_le(s, len_bmpdata); + in_uint8p(s, bmpdata, len_bmpdata); + rv = mod->server_add_char_alpha(mod, font, charactor, x, y, cx, cy, bmpdata); + break; + case 30: /* server_draw_text */ + in_uint16_le(s, font); + in_uint16_le(s, flags); + in_uint16_le(s, mixmode); + in_sint16_le(s, clip_left); + in_sint16_le(s, clip_top); + in_sint16_le(s, clip_right); + in_sint16_le(s, clip_bottom); + in_sint16_le(s, box_left); + in_sint16_le(s, box_top); + in_sint16_le(s, box_right); + in_sint16_le(s, box_bottom); + in_sint16_le(s, x); + in_sint16_le(s, y); + in_uint16_le(s, len_bmpdata); + in_uint8p(s, bmpdata, len_bmpdata); + rv = mod->server_draw_text(mod, font, flags, mixmode, clip_left, clip_top, + clip_right, clip_bottom, box_left, box_top, + box_right, box_bottom, x, y, bmpdata, len_bmpdata); + break; + case 31: /* server_create_os_surface_bpp */ + in_uint32_le(s, rdpid); + in_uint16_le(s, width); + in_uint16_le(s, height); + in_uint8(s, bpp); + rv = mod->server_create_os_surface_bpp(mod, rdpid, width, height, bpp); + break; + case 32: /* server_paint_rect_bpp */ + in_sint16_le(s, x); + in_sint16_le(s, y); + in_uint16_le(s, cx); + in_uint16_le(s, cy); + in_uint32_le(s, len_bmpdata); + in_uint8p(s, bmpdata, len_bmpdata); + in_uint16_le(s, width); + in_uint16_le(s, height); + in_sint16_le(s, srcx); + in_sint16_le(s, srcy); + in_uint8(s, bpp); + rv = mod->server_paint_rect_bpp(mod, x, y, cx, cy, + bmpdata, width, height, + srcx, srcy, bpp); + break; + case 33: + in_uint16_le(s, srcidx); + in_uint32_le(s, srcformat); + in_uint16_le(s, srcwidth); + in_uint8(s, srcrepeat); + g_memcpy(transform, s->p, 40); + in_uint8s(s, 40); + in_uint8(s, mskflags); + in_uint16_le(s, mskidx); + in_uint32_le(s, mskformat); + in_uint16_le(s, mskwidth); + in_uint8(s, mskrepeat); + in_uint8(s, op); + in_sint16_le(s, srcx); + in_sint16_le(s, srcy); + in_sint16_le(s, mskx); + in_sint16_le(s, msky); + in_sint16_le(s, dstx); + in_sint16_le(s, dsty); + in_uint16_le(s, width); + in_uint16_le(s, height); + in_uint32_le(s, dstformat); + rv = mod->server_composite(mod, srcidx, srcformat, srcwidth, srcrepeat, + transform, mskflags, mskidx, mskformat, + mskwidth, mskrepeat, op, srcx, srcy, mskx, msky, + dstx, dsty, width, height, dstformat); + break; case 51: /* server_set_pointer_ex */ rv = process_server_set_pointer_ex(mod, s); break; @@ -53,7 +53,8 @@ struct mod int (*server_screen_blt)(struct mod* v, int x, int y, int cx, int cy, int srcx, int srcy); int (*server_paint_rect)(struct mod* v, int x, int y, int cx, int cy, - char* data, int width, int height, int srcx, int srcy); + char* data, int width, int height, + int srcx, int srcy); int (*server_set_cursor)(struct mod* v, int x, int y, char* data, char* mask); int (*server_palette)(struct mod* v, int* palette); int (*server_msg)(struct mod* v, char* msg, int code); @@ -119,8 +120,21 @@ struct mod int flags); int (*server_set_cursor_ex)(struct mod* v, int x, int y, char* data, char* mask, int bpp); + int (*server_add_char_alpha)(struct mod* v, int font, int charactor, + int offset, int baseline, + int width, int height, char* data); + int (*server_create_os_surface_bpp)(struct mod* v, int rdpindex, + int width, int height, int bpp); + int (*server_paint_rect_bpp)(struct mod* v, int x, int y, int cx, int cy, + char* data, int width, int height, + int srcx, int srcy, int bpp); + int (*server_composite)(struct mod* v, int srcidx, int srcformat, int srcwidth, + int srcrepeat, int* srctransform, int mskflags, int mskidx, + int mskformat, int mskwidth, int mskrepeat, int op, + int srcx, int srcy, int mskx, int msky, + int dstx, int dsty, int width, int height, int dstformat); - tbus server_dumby[100 - 38]; /* align, 100 minus the number of server + tbus server_dumby[100 - 42]; /* align, 100 minus the number of server functions above */ /* common */ tbus handle; /* pointer to self as long */ |