diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2012-07-31 11:12:00 -0700 |
---|---|---|
committer | Jay Sorg <jay.sorg@gmail.com> | 2012-07-31 11:12:00 -0700 |
commit | 2c3b4c4e5c7428e2e4a4921e0347e363063c7ac8 (patch) | |
tree | 204add13d4a604e127c15b2f6e31378ff2693044 | |
parent | 05bb56b676c4727719179aa9bae14a7862bd1075 (diff) | |
download | xrdp-proprietary-2c3b4c4e5c7428e2e4a4921e0347e363063c7ac8.tar.gz xrdp-proprietary-2c3b4c4e5c7428e2e4a4921e0347e363063c7ac8.zip |
xup: add some rail messages to the interface
-rw-r--r-- | xup/xup.c | 95 | ||||
-rw-r--r-- | xup/xup.h | 25 |
2 files changed, 119 insertions, 1 deletions
@@ -361,6 +361,95 @@ lib_mod_event(struct mod* mod, int msg, tbus param1, tbus param2, /******************************************************************************/ /* return error */ +static int APP_CC +process_server_window_new_update(struct mod* mod, struct stream* s) +{ + int flags; + int window_id; + int title_bytes; + int index; + int bytes; + int rv; + struct rail_window_state_order rwso; + + g_memset(&rwso, 0, sizeof(rwso)); + in_uint32_le(s, window_id); + in_uint32_le(s, rwso.owner_window_id); + in_uint32_le(s, rwso.style); + in_uint32_le(s, rwso.extended_style); + in_uint32_le(s, rwso.show_state); + in_uint16_le(s, title_bytes); + if (title_bytes > 0) + { + rwso.title_info = g_malloc(title_bytes + 1, 0); + in_uint8a(s, rwso.title_info, title_bytes); + rwso.title_info[title_bytes] = 0; + } + in_uint32_le(s, rwso.client_offset_x); + in_uint32_le(s, rwso.client_offset_y); + in_uint32_le(s, rwso.client_area_width); + in_uint32_le(s, rwso.client_area_height); + in_uint32_le(s, rwso.rp_content); + in_uint32_le(s, rwso.root_parent_handle); + in_uint32_le(s, rwso.window_offset_x); + in_uint32_le(s, rwso.window_offset_y); + in_uint32_le(s, rwso.window_client_delta_x); + in_uint32_le(s, rwso.window_client_delta_y); + in_uint32_le(s, rwso.window_width); + in_uint32_le(s, rwso.window_height); + in_uint16_le(s, rwso.num_window_rects); + if (rwso.num_window_rects > 0) + { + bytes = sizeof(struct rail_window_rect) * rwso.num_window_rects; + rwso.window_rects = (struct rail_window_rect*)g_malloc(bytes, 0); + for (index = 0; index < rwso.num_window_rects; index++) + { + in_uint16_le(s, rwso.window_rects[index].left); + in_uint16_le(s, rwso.window_rects[index].top); + in_uint16_le(s, rwso.window_rects[index].right); + in_uint16_le(s, rwso.window_rects[index].bottom); + } + } + in_uint32_le(s, rwso.visible_offset_x); + in_uint32_le(s, rwso.visible_offset_y); + in_uint16_le(s, rwso.num_visibility_rects); + if (rwso.num_visibility_rects > 0) + { + bytes = sizeof(struct rail_window_rect) * rwso.num_visibility_rects; + rwso.visibility_rects = (struct rail_window_rect*)g_malloc(bytes, 0); + for (index = 0; index < rwso.num_visibility_rects; index++) + { + in_uint16_le(s, rwso.visibility_rects[index].left); + in_uint16_le(s, rwso.visibility_rects[index].top); + in_uint16_le(s, rwso.visibility_rects[index].right); + in_uint16_le(s, rwso.visibility_rects[index].bottom); + } + } + in_uint32_le(s, flags); + mod->server_window_new_update(mod, window_id, &rwso, flags); + rv = 0; + g_free(rwso.title_info); + g_free(rwso.window_rects); + g_free(rwso.visibility_rects); + return rv; +} + +/******************************************************************************/ +/* return error */ +static int APP_CC +process_server_window_delete(struct mod* mod, struct stream* s) +{ + int window_id; + int rv; + + in_uint32_le(s, window_id); + mod->server_window_delete(mod, window_id); + rv = 0; + return rv; +} + +/******************************************************************************/ +/* return error */ static int lib_mod_process_orders(struct mod* mod, int type, struct stream* s) { @@ -495,6 +584,12 @@ lib_mod_process_orders(struct mod* mod, int type, struct stream* s) in_uint32_le(s, mask); rv = mod->server_set_hints(mod, hints, mask); break; + case 25: /* server_window_new_update */ + rv = process_server_window_new_update(mod, s); + break; + case 26: /* server_window_delete */ + rv = process_server_window_delete(mod, s); + break; default: g_writeln("lib_mod_process_orders: unknown order type %d", type); rv = 0; @@ -26,6 +26,7 @@ #include "os_calls.h" #include "defines.h" #include "xrdp_client_info.h" +#include "xrdp_rail.h" #define CURRENT_MOD_VER 2 @@ -88,6 +89,7 @@ struct mod char* data, int data_len, int total_data_len, int flags); int (*server_bell_trigger)(struct mod* v); + /* off screen bitmaps */ int (*server_create_os_surface)(struct mod* v, int rdpindex, int width, int height); int (*server_switch_os_surface)(struct mod* v, int rdpindex); @@ -96,7 +98,28 @@ struct mod int cx, int cy, int rdpindex, int srcx, int srcy); int (*server_set_hints)(struct mod* v, int hints, int mask); - tbus server_dumby[100 - 30]; /* align, 100 minus the number of server + /* rail */ + int (*server_window_new_update)(struct mod* v, int window_id, + struct rail_window_state_order* window_state, + int flags); + int (*server_window_delete)(struct mod* v, int window_id); + int (*server_window_icon)(struct mod* v, + int window_id, int cache_entry, int cache_id, + struct rail_icon_info* icon_info, + int flags); + int (*server_window_cached_icon)(struct mod* v, + int window_id, int cache_entry, + int cache_id, int flags); + int (*server_notify_new_update)(struct mod* v, + int window_id, int notify_id, + struct rail_notify_state_order* notify_state, + int flags); + int (*server_notify_delete)(struct mod* v, int window_id, + int notify_id); + int (*server_monitored_desktop)(struct mod* v, + struct rail_monitored_desktop_order* mdo, + int flags); + tbus server_dumby[100 - 37]; /* align, 100 minus the number of server functions above */ /* common */ tbus handle; /* pointer to self as long */ |