diff options
Diffstat (limited to 'xrdp/xrdp_types.h')
| -rw-r--r-- | xrdp/xrdp_types.h | 259 |
1 files changed, 253 insertions, 6 deletions
diff --git a/xrdp/xrdp_types.h b/xrdp/xrdp_types.h index 30cf16a4..a429c5a0 100644 --- a/xrdp/xrdp_types.h +++ b/xrdp/xrdp_types.h @@ -19,13 +19,81 @@ */ +/* for memory debugging */ +struct xrdp_mem +{ + int size; + int id; +}; + +/* header for bmp file */ +struct xrdp_bmp_header +{ + long size; + long image_width; + long image_height; + short planes; + short bit_count; + long compression; + long image_size; + long x_pels_per_meter; + long y_pels_per_meter; + long clr_used; + long clr_important; +}; + +/* list */ +struct xrdp_list +{ + int* items; + int count; + int alloc_size; + int grow_by; + int auto_free; +}; + +/* rect */ +struct xrdp_rect +{ + int left; + int top; + int right; + int bottom; +}; + +/* bounds */ +struct xrdp_bounds +{ + int x; + int y; + int cx; + int cy; +}; + +/* brush */ +struct xrdp_brush +{ + int x_orgin; + int y_orgin; + int style; + char pattern[8]; +}; + +/* pen */ +struct xrdp_pen +{ + int style; + int width; + int color; +}; + /* tcp */ struct xrdp_tcp { int sck; struct stream* in_s; struct stream* out_s; - struct xrdp_iso* iso_layer; + struct xrdp_iso* iso_layer; /* owner */ }; /* iso */ @@ -33,7 +101,7 @@ struct xrdp_iso { struct stream* in_s; struct stream* out_s; - struct xrdp_mcs* mcs_layer; + struct xrdp_mcs* mcs_layer; /* owner */ struct xrdp_tcp* tcp_layer; }; @@ -42,7 +110,7 @@ struct xrdp_mcs { struct stream* in_s; struct stream* out_s; - struct xrdp_sec* sec_layer; + struct xrdp_sec* sec_layer; /* owner */ struct xrdp_iso* iso_layer; int userid; int chanid; @@ -55,7 +123,7 @@ struct xrdp_sec { struct stream* in_s; struct stream* out_s; - struct xrdp_rdp* rdp_layer; + struct xrdp_rdp* rdp_layer; /* owner */ struct xrdp_mcs* mcs_layer; char server_random[32]; char client_random[64]; @@ -80,7 +148,7 @@ struct xrdp_rdp { struct stream* in_s; struct stream* out_s; - struct xrdp_process* pro_layer; + struct xrdp_process* pro_layer; /* owner */ struct xrdp_sec* sec_layer; char* next_packet; int share_id; @@ -88,6 +156,137 @@ struct xrdp_rdp int bpp; int width; int height; + int up_and_running; +}; + +/* orders */ +struct xrdp_orders +{ + struct stream* out_s; + struct xrdp_rdp* rdp_layer; + struct xrdp_process* pro_layer; /* owner */ + + char* order_count_ptr; /* pointer to count, set when sending */ + int order_count; + int order_level; /* inc for every call to xrdp_orders_init */ + + int last_order; /* last order sent */ + + int clip_left; /* RDP_ORDER_BOUNDS, RDP_ORDER_LASTBOUNDS */ + int clip_top; + int clip_right; + int clip_bottom; + + int rect_x; /* RDP_ORDER_RECT */ + int rect_y; + int rect_cx; + int rect_cy; + int rect_color; + + int scr_blt_x; /* RDP_ORDER_SCREENBLT */ + int scr_blt_y; + int scr_blt_cx; + int scr_blt_cy; + int scr_blt_rop; + int scr_blt_srcx; + int scr_blt_srcy; + + int pat_blt_x; /* RDP_ORDER_PATBLT */ + int pat_blt_y; + int pat_blt_cx; + int pat_blt_cy; + int pat_blt_rop; + int pat_blt_bg_color; + int pat_blt_fg_color; + struct xrdp_brush pat_blt_brush; + + int dest_blt_x; /* RDP_ORDER_DESTBLT */ + int dest_blt_y; + int dest_blt_cx; + int dest_blt_cy; + int dest_blt_rop; + + int line_mix_mode; /* RDP_ORDER_LINE */ + int line_startx; + int line_starty; + int line_endx; + int line_endy; + int line_bg_color; + int line_rop; + + int mem_blt_color_table; /* RDP_ORDER_MEMBLT */ + int mem_blt_cache_id; + int mem_blt_x; + int mem_blt_y; + int mem_blt_cx; + int mem_blt_cy; + int mem_blt_rop; + int mem_blt_srcx; + int mem_blt_srcy; + int mem_blt_cache_idx; + + struct xrdp_pen line_pen; + +}; + +struct xrdp_palette_item +{ + int use_count; + int palette[256]; +}; + +struct xrdp_bitmap_item +{ + int use_count; + struct xrdp_bitmap* bitmap; +}; + +/* differnce caches */ +struct xrdp_cache +{ + struct xrdp_wm* wm; /* owner */ + struct xrdp_orders* orders; + struct xrdp_palette_item palette_items[6]; + struct xrdp_bitmap_item bitmap_items[3][600]; +}; + +/* the window manager */ +struct xrdp_wm +{ + struct xrdp_process* pro_layer; /* owner */ + struct xrdp_bitmap* screen; + struct xrdp_orders* orders; + struct xrdp_painter* painter; + struct stream* out_s; + struct xrdp_rdp* rdp_layer; + struct xrdp_cache* cache; + int palette[256]; + struct xrdp_bitmap* login_window; + /* generic colors */ + int black; + int grey; + int dark_grey; + int blue; + int white; + int red; + int green; + /* dragging info */ + int dragging; + int draggingx; + int draggingy; + int draggingcx; + int draggingcy; + int draggingdx; + int draggingdy; + int draggingorgx; + int draggingorgy; + struct xrdp_bitmap* dragging_window; + /* the down(clicked) button */ + struct xrdp_bitmap* button_down; + /* focused window */ + struct xrdp_bitmap* focused_window; + /* cursor */ + int current_cursor; }; /* rdp process */ @@ -98,8 +297,11 @@ struct xrdp_process int term; struct stream in_s; struct stream out_s; - struct xrdp_listen* lis_layer; + struct xrdp_listen* lis_layer; /* owner */ struct xrdp_rdp* rdp_layer; + /* create these when up and running */ + struct xrdp_orders* orders; + struct xrdp_wm* wm; }; /* rdp listener */ @@ -112,3 +314,48 @@ struct xrdp_listen int process_list_count; int process_list_max; }; + +/* region */ +struct xrdp_region +{ + struct xrdp_wm* wm; /* owner */ + struct xrdp_list* rects; +}; + +/* painter */ +struct xrdp_painter +{ + int rop; + int use_clip; + struct xrdp_rect clip; + int bg_color; + int fg_color; + struct xrdp_brush brush; + struct xrdp_orders* orders; + struct xrdp_wm* wm; /* owner */ +}; + +/* window or bitmap */ +struct xrdp_bitmap +{ + int type; /* 0 = bitmap 1 = window 2 = screen 3 = button 4 = image 5 = edit */ + int state; /* for button 0 = normal 1 = down */ + int id; + char* data; + int width; + int height; + int bpp; + int left; + int top; + int bg_color; + int line_size; /* in bytes */ + int focused; + struct xrdp_bitmap* modal_dialog; + struct xrdp_bitmap* owner; /* window that created us */ + struct xrdp_bitmap* parent; /* window contained in */ + struct xrdp_list* child_list; + struct xrdp_wm* wm; + int cursor; + int (*notify)(struct xrdp_bitmap* wnd, struct xrdp_bitmap* sender, + int msg, int param1, int param2); +}; |
