2012-09-20 07:51:34 +04:00
|
|
|
/**
|
|
|
|
* xrdp: A Remote Desktop Protocol server.
|
|
|
|
*
|
2015-07-12 11:06:04 +03:00
|
|
|
* Copyright (C) Jay Sorg 2004-2015
|
2012-09-20 07:51:34 +04:00
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*
|
|
|
|
* libxup main header file
|
|
|
|
*/
|
2006-02-04 22:00:34 +03:00
|
|
|
|
|
|
|
/* include other h files */
|
|
|
|
#include "arch.h"
|
|
|
|
#include "parse.h"
|
|
|
|
#include "os_calls.h"
|
|
|
|
#include "defines.h"
|
2012-05-14 00:56:15 +04:00
|
|
|
#include "xrdp_client_info.h"
|
2020-08-05 18:12:16 +03:00
|
|
|
#include "xrdp_constants.h"
|
2012-07-31 22:12:00 +04:00
|
|
|
#include "xrdp_rail.h"
|
2006-02-04 22:00:34 +03:00
|
|
|
|
2019-04-10 09:55:02 +03:00
|
|
|
#define CURRENT_MOD_VER 4
|
2009-08-15 06:49:13 +04:00
|
|
|
|
2006-02-04 22:00:34 +03:00
|
|
|
struct mod
|
|
|
|
{
|
|
|
|
int size; /* size of this struct */
|
2006-12-30 08:04:13 +03:00
|
|
|
int version; /* internal version */
|
2006-02-04 22:00:34 +03:00
|
|
|
/* client functions */
|
|
|
|
int (*mod_start)(struct mod* v, int w, int h, int bpp);
|
|
|
|
int (*mod_connect)(struct mod* v);
|
2008-06-30 09:02:47 +04:00
|
|
|
int (*mod_event)(struct mod* v, int msg, tbus param1, tbus param2,
|
|
|
|
tbus param3, tbus param4);
|
2006-02-04 22:00:34 +03:00
|
|
|
int (*mod_signal)(struct mod* v);
|
|
|
|
int (*mod_end)(struct mod* v);
|
2016-11-20 20:55:32 +03:00
|
|
|
int (*mod_set_param)(struct mod *v, const char *name, const char *value);
|
2008-04-03 10:43:30 +04:00
|
|
|
int (*mod_session_change)(struct mod* v, int, int);
|
|
|
|
int (*mod_get_wait_objs)(struct mod* v, tbus* read_objs, int* rcount,
|
|
|
|
tbus* write_objs, int* wcount, int* timeout);
|
|
|
|
int (*mod_check_wait_objs)(struct mod* v);
|
2014-03-23 03:51:30 +04:00
|
|
|
int (*mod_frame_ack)(struct mod* v, int flags, int frame_id);
|
2019-04-08 03:56:05 +03:00
|
|
|
int (*mod_suppress_output)(struct mod* v, int suppress,
|
|
|
|
int left, int top, int right, int bottom);
|
|
|
|
tintptr mod_dumby[100 - 11]; /* align, 100 minus the number of mod
|
2015-07-11 07:57:04 +03:00
|
|
|
functions above */
|
2006-02-04 22:00:34 +03:00
|
|
|
/* server functions */
|
|
|
|
int (*server_begin_update)(struct mod* v);
|
|
|
|
int (*server_end_update)(struct mod* v);
|
|
|
|
int (*server_fill_rect)(struct mod* v, int x, int y, int cx, int cy);
|
|
|
|
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,
|
2013-07-07 08:03:58 +04:00
|
|
|
char* data, int width, int height,
|
|
|
|
int srcx, int srcy);
|
2006-02-04 22:00:34 +03:00
|
|
|
int (*server_set_cursor)(struct mod* v, int x, int y, char* data, char* mask);
|
|
|
|
int (*server_palette)(struct mod* v, int* palette);
|
2016-06-22 02:30:17 +03:00
|
|
|
int (*server_msg)(struct mod* v, const char *msg, int code);
|
2006-02-04 22:00:34 +03:00
|
|
|
int (*server_is_term)(struct mod* v);
|
|
|
|
int (*server_set_clip)(struct mod* v, int x, int y, int cx, int cy);
|
|
|
|
int (*server_reset_clip)(struct mod* v);
|
|
|
|
int (*server_set_fgcolor)(struct mod* v, int fgcolor);
|
|
|
|
int (*server_set_bgcolor)(struct mod* v, int bgcolor);
|
|
|
|
int (*server_set_opcode)(struct mod* v, int opcode);
|
|
|
|
int (*server_set_mixmode)(struct mod* v, int mixmode);
|
2016-05-03 23:07:13 +03:00
|
|
|
int (*server_set_brush)(struct mod* v, int x_origin, int y_origin,
|
2006-02-04 22:00:34 +03:00
|
|
|
int style, char* pattern);
|
|
|
|
int (*server_set_pen)(struct mod* v, int style,
|
|
|
|
int width);
|
|
|
|
int (*server_draw_line)(struct mod* v, int x1, int y1, int x2, int y2);
|
2016-01-31 04:33:04 +03:00
|
|
|
int (*server_add_char)(struct mod* v, int font, int character,
|
2006-02-04 22:00:34 +03:00
|
|
|
int offset, int baseline,
|
|
|
|
int width, int height, char* data);
|
|
|
|
int (*server_draw_text)(struct mod* v, int font,
|
|
|
|
int flags, 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 x, int y, char* data, int data_len);
|
|
|
|
int (*server_reset)(struct mod* v, int width, int height, int bpp);
|
2006-12-30 08:04:13 +03:00
|
|
|
int (*server_query_channel)(struct mod* v, int index,
|
|
|
|
char* channel_name,
|
|
|
|
int* channel_flags);
|
2016-06-22 02:30:17 +03:00
|
|
|
int (*server_get_channel_id)(struct mod* v, const char *name);
|
2006-12-30 08:04:13 +03:00
|
|
|
int (*server_send_to_channel)(struct mod* v, int channel_id,
|
2009-08-15 06:49:13 +04:00
|
|
|
char* data, int data_len,
|
|
|
|
int total_data_len, int flags);
|
2010-11-20 16:33:54 +03:00
|
|
|
int (*server_bell_trigger)(struct mod* v);
|
2012-07-31 22:12:00 +04:00
|
|
|
/* off screen bitmaps */
|
2012-05-20 06:25:08 +04:00
|
|
|
int (*server_create_os_surface)(struct mod* v, int rdpindex,
|
2012-05-18 05:48:28 +04:00
|
|
|
int width, int height);
|
2012-05-20 06:25:08 +04:00
|
|
|
int (*server_switch_os_surface)(struct mod* v, int rdpindex);
|
|
|
|
int (*server_delete_os_surface)(struct mod* v, int rdpindex);
|
2012-05-18 05:48:28 +04:00
|
|
|
int (*server_paint_rect_os)(struct mod* v, int x, int y,
|
|
|
|
int cx, int cy,
|
2012-05-20 06:25:08 +04:00
|
|
|
int rdpindex, int srcx, int srcy);
|
2012-05-18 05:48:28 +04:00
|
|
|
int (*server_set_hints)(struct mod* v, int hints, int mask);
|
2012-07-31 22:12:00 +04:00
|
|
|
/* 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);
|
2013-03-19 10:43:17 +04:00
|
|
|
int (*server_set_cursor_ex)(struct mod* v, int x, int y, char* data,
|
|
|
|
char* mask, int bpp);
|
2016-01-31 04:33:04 +03:00
|
|
|
int (*server_add_char_alpha)(struct mod* v, int font, int character,
|
2013-07-04 02:57:00 +04:00
|
|
|
int offset, int baseline,
|
|
|
|
int width, int height, char* data);
|
2013-07-07 08:03:58 +04:00
|
|
|
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);
|
2014-02-19 00:10:05 +04:00
|
|
|
int (*server_paint_rects)(struct mod* v,
|
|
|
|
int num_drects, short *drects,
|
|
|
|
int num_crects, short *crects,
|
2014-03-23 03:51:30 +04:00
|
|
|
char *data, int width, int height,
|
|
|
|
int flags, int frame_id);
|
2013-03-19 10:43:17 +04:00
|
|
|
|
2015-07-11 07:57:04 +03:00
|
|
|
tintptr server_dumby[100 - 43]; /* align, 100 minus the number of server
|
|
|
|
functions above */
|
2006-02-04 22:00:34 +03:00
|
|
|
/* common */
|
2015-07-11 07:57:04 +03:00
|
|
|
tintptr handle; /* pointer to self as long */
|
|
|
|
tintptr wm;
|
|
|
|
tintptr painter;
|
|
|
|
tintptr si;
|
2006-02-04 22:00:34 +03:00
|
|
|
/* mod data */
|
|
|
|
int width;
|
|
|
|
int height;
|
2006-02-05 08:45:52 +03:00
|
|
|
int bpp;
|
2006-02-04 22:00:34 +03:00
|
|
|
int sck_closed;
|
2020-08-05 18:12:16 +03:00
|
|
|
char username[INFO_CLIENT_MAX_CB_LEN];
|
|
|
|
char password[INFO_CLIENT_MAX_CB_LEN];
|
2006-02-04 22:00:34 +03:00
|
|
|
char ip[256];
|
|
|
|
char port[256];
|
2011-11-13 04:40:08 +04:00
|
|
|
int shift_state;
|
2012-05-14 00:56:15 +04:00
|
|
|
struct xrdp_client_info client_info;
|
2013-08-19 09:36:18 +04:00
|
|
|
int screen_shmem_id;
|
2015-02-10 06:26:04 +03:00
|
|
|
int screen_shmem_id_mapped; /* boolean */
|
2013-08-19 09:36:18 +04:00
|
|
|
char *screen_shmem_pixels;
|
2015-07-11 06:38:27 +03:00
|
|
|
struct trans *trans;
|
2006-02-04 22:00:34 +03:00
|
|
|
};
|