Update module interfaces with new calls for resizing
This commit DOES NOT compile. This change alters these module interface calls:- 1) mod_server_monitor_resize() (Call from xrdp to module). Updated. 2) server_reset() (Call from module to xrdp). Replaced. The mod_server_monitor_resize() call is updated :- 1) to allow a monitor list to be passed in for a multimon resize 2) with an 'in_progress' return value which tells the caller whether or not to expect a callback. The server_reset() call served two purposes up until now:- 1) To allow a module to resize a single monitor session. There is no way to request a multi-monitor resize from the module 2) (with bpp == 0) To signal to the mm resize state machine that a server screen resize hsa finished. This is split into two calls:- 1) client_monitor_resize() to allow a mdule to request a multimon resize. 2) server_monitor_resize_done(). This is called by a module when a resize is completed.
This commit is contained in:
parent
b0a30a3581
commit
bfecd1887b
10
mc/mc.h
10
mc/mc.h
@ -31,6 +31,9 @@
|
||||
|
||||
struct source_info;
|
||||
|
||||
/* Defined in xrdp_client_info.h */
|
||||
struct monitor_info;
|
||||
|
||||
struct mod
|
||||
{
|
||||
int size; /* size of this struct */
|
||||
@ -81,7 +84,10 @@ struct mod
|
||||
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);
|
||||
int (*client_monitor_resize)(struct mod *v, int width, int height,
|
||||
int num_monitors,
|
||||
const struct monitor_info *monitors);
|
||||
int (*server_monitor_resize_done)(struct mod *v);
|
||||
int (*server_get_channel_count)(struct mod *v);
|
||||
int (*server_query_channel)(struct mod *v, int index,
|
||||
char *channel_name,
|
||||
@ -92,7 +98,7 @@ struct mod
|
||||
int total_data_len, int flags);
|
||||
int (*server_bell_trigger)(struct mod *v);
|
||||
int (*server_chansrv_in_use)(struct mod *v);
|
||||
tintptr server_dumby[100 - 27]; /* align, 100 minus the number of server
|
||||
tintptr server_dumby[100 - 28]; /* align, 100 minus the number of server
|
||||
functions above */
|
||||
/* common */
|
||||
tintptr handle; /* pointer to self as long */
|
||||
|
@ -88,7 +88,10 @@ struct mod
|
||||
int (*mod_suppress_output)(struct mod *mod, int suppress,
|
||||
int left, int top, int right, int bottom);
|
||||
int (*mod_server_monitor_resize)(struct mod *mod,
|
||||
int width, int height);
|
||||
int width, int height,
|
||||
int num_monitors,
|
||||
const struct monitor_info *monitors,
|
||||
int *in_progress);
|
||||
int (*mod_server_monitor_full_invalidate)(struct mod *mod,
|
||||
int width, int height);
|
||||
int (*mod_server_version_message)(struct mod *mod);
|
||||
@ -126,7 +129,10 @@ struct mod
|
||||
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);
|
||||
int (*client_monitor_resize)(struct mod *v, int width, int height,
|
||||
int num_monitors,
|
||||
const struct monitor_info *monitors);
|
||||
int (*server_monitor_resize_done)(struct mod *v);
|
||||
int (*server_get_channel_count)(struct mod *v);
|
||||
int (*server_query_channel)(struct mod *v, int index,
|
||||
char *channel_name,
|
||||
@ -191,7 +197,7 @@ struct mod
|
||||
int flags, int frame_id);
|
||||
int (*server_session_info)(struct mod *v, const char *data,
|
||||
int data_bytes);
|
||||
tintptr server_dumby[100 - 46]; /* align, 100 minus the number of server
|
||||
tintptr server_dumby[100 - 47]; /* align, 100 minus the number of server
|
||||
functions above */
|
||||
/* common */
|
||||
tintptr handle; /* pointer to self as long */
|
||||
|
30
vnc/vnc.h
30
vnc/vnc.h
@ -27,6 +27,7 @@
|
||||
#include "os_calls.h"
|
||||
#include "defines.h"
|
||||
#include "guid.h"
|
||||
#include "ms-rdpbcgr.h"
|
||||
|
||||
#define CURRENT_MOD_VER 4
|
||||
|
||||
@ -47,7 +48,7 @@ struct vnc_screen_layout
|
||||
int total_height;
|
||||
unsigned int count;
|
||||
/* For comparison, screens are sorted in increasing order of ID */
|
||||
struct vnc_screen *s;
|
||||
struct vnc_screen s[CLIENT_MONITOR_DATA_MAXIMUM_MONITORS];
|
||||
};
|
||||
|
||||
/**
|
||||
@ -60,11 +61,21 @@ enum vnc_resize_status
|
||||
VRS_DONE
|
||||
};
|
||||
|
||||
enum vnc_resize_support_status
|
||||
{
|
||||
VRSS_NOT_SUPPORTED,
|
||||
VRSS_SUPPORTED,
|
||||
VRSS_UNKNOWN
|
||||
};
|
||||
|
||||
struct source_info;
|
||||
|
||||
/* Defined in vnc_clip.c */
|
||||
struct vnc_clipboard_data;
|
||||
|
||||
/* Defined in xrdp_client_info.h */
|
||||
struct monitor_info;
|
||||
|
||||
struct vnc
|
||||
{
|
||||
int size; /* size of this struct */
|
||||
@ -85,7 +96,10 @@ struct vnc
|
||||
int (*mod_suppress_output)(struct vnc *v, int suppress,
|
||||
int left, int top, int right, int bottom);
|
||||
int (*mod_server_monitor_resize)(struct vnc *v,
|
||||
int width, int height);
|
||||
int width, int height,
|
||||
int num_monitors,
|
||||
const struct monitor_info *monitors,
|
||||
int *in_progress);
|
||||
int (*mod_server_monitor_full_invalidate)(struct vnc *v,
|
||||
int width, int height);
|
||||
int (*mod_server_version_message)(struct vnc *v);
|
||||
@ -123,7 +137,10 @@ struct vnc
|
||||
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 vnc *v, int width, int height, int bpp);
|
||||
int (*client_monitor_resize)(struct vnc *v, int width, int height,
|
||||
int num_monitors,
|
||||
const struct monitor_info *monitors);
|
||||
int (*server_monitor_resize_done)(struct vnc *v);
|
||||
int (*server_get_channel_count)(struct vnc *v);
|
||||
int (*server_query_channel)(struct vnc *v, int index,
|
||||
char *channel_name,
|
||||
@ -134,7 +151,7 @@ struct vnc
|
||||
int total_data_len, int flags);
|
||||
int (*server_bell_trigger)(struct vnc *v);
|
||||
int (*server_chansrv_in_use)(struct vnc *v);
|
||||
tintptr server_dumby[100 - 27]; /* align, 100 minus the number of server
|
||||
tintptr server_dumby[100 - 28]; /* align, 100 minus the number of server
|
||||
functions above */
|
||||
/* common */
|
||||
tintptr handle; /* pointer to self as long */
|
||||
@ -142,8 +159,6 @@ struct vnc
|
||||
tintptr painter;
|
||||
struct source_info *si;
|
||||
/* mod data */
|
||||
int server_width;
|
||||
int server_height;
|
||||
int server_bpp;
|
||||
char mod_name[256];
|
||||
int mod_mouse_state;
|
||||
@ -164,8 +179,11 @@ struct vnc
|
||||
int suppress_output;
|
||||
unsigned int enabled_encodings_mask;
|
||||
/* Resizeable support */
|
||||
int multimon_configured;
|
||||
struct vnc_screen_layout client_layout;
|
||||
struct vnc_screen_layout server_layout;
|
||||
enum vnc_resize_status resize_status;
|
||||
enum vnc_resize_support_status resize_supported;
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -64,7 +64,10 @@ struct xrdp_mod
|
||||
int (*mod_suppress_output)(struct xrdp_mod *v, int suppress,
|
||||
int left, int top, int right, int bottom);
|
||||
int (*mod_server_monitor_resize)(struct xrdp_mod *v,
|
||||
int width, int height);
|
||||
int width, int height,
|
||||
int num_monitors,
|
||||
const struct monitor_info *monitors,
|
||||
int *in_progress);
|
||||
int (*mod_server_monitor_full_invalidate)(struct xrdp_mod *v,
|
||||
int width, int height);
|
||||
int (*mod_server_version_message)(struct xrdp_mod *v);
|
||||
@ -106,7 +109,10 @@ struct xrdp_mod
|
||||
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 xrdp_mod *v, int width, int height, int bpp);
|
||||
int (*client_monitor_resize)(struct xrdp_mod *v, int width, int height,
|
||||
int num_monitors,
|
||||
const struct monitor_info *monitors);
|
||||
int (*server_monitor_resize_done)(struct xrdp_mod *v);
|
||||
int (*server_get_channel_count)(struct xrdp_mod *v);
|
||||
int (*server_query_channel)(struct xrdp_mod *v, int index,
|
||||
char *channel_name,
|
||||
@ -185,7 +191,7 @@ struct xrdp_mod
|
||||
int (*server_egfx_cmd)(struct xrdp_mod *v,
|
||||
char *cmd, int cmd_bytes,
|
||||
char *data, int data_bytes);
|
||||
tintptr server_dumby[100 - 49]; /* align, 100 minus the number of server
|
||||
tintptr server_dumby[100 - 50]; /* align, 100 minus the number of server
|
||||
functions above */
|
||||
/* common */
|
||||
tintptr handle; /* pointer to self as int */
|
||||
|
12
xup/xup.h
12
xup/xup.h
@ -55,7 +55,10 @@ struct mod
|
||||
int (*mod_suppress_output)(struct mod *v, int suppress,
|
||||
int left, int top, int right, int bottom);
|
||||
int (*mod_server_monitor_resize)(struct mod *v,
|
||||
int width, int height);
|
||||
int width, int height,
|
||||
int num_monitors,
|
||||
const struct monitor_info *monitors,
|
||||
int *in_progress);
|
||||
int (*mod_server_monitor_full_invalidate)(struct mod *v,
|
||||
int width, int height);
|
||||
int (*mod_server_version_message)(struct mod *v);
|
||||
@ -94,7 +97,10 @@ struct mod
|
||||
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);
|
||||
int (*client_monitor_resize)(struct mod *v, int width, int height,
|
||||
int num_monitors,
|
||||
const struct monitor_info *monitors);
|
||||
int (*server_monitor_resize_done)(struct mod *v);
|
||||
int (*server_get_channel_count)(struct mod *v);
|
||||
int (*server_query_channel)(struct mod *v, int index,
|
||||
char *channel_name,
|
||||
@ -170,7 +176,7 @@ struct mod
|
||||
int (*server_egfx_cmd)(struct mod *v,
|
||||
char *cmd, int cmd_bytes,
|
||||
char *data, int data_bytes);
|
||||
tintptr server_dumby[100 - 49]; /* align, 100 minus the number of server
|
||||
tintptr server_dumby[100 - 50]; /* align, 100 minus the number of server
|
||||
functions above */
|
||||
/* common */
|
||||
tintptr handle; /* pointer to self as long */
|
||||
|
Loading…
Reference in New Issue
Block a user