mirror of https://github.com/neutrinolabs/xrdp
added clipping functions to the mod interface
This commit is contained in:
parent
ef1be2c6d3
commit
7ad0525527
|
@ -50,6 +50,8 @@ struct vnc
|
|||
int (*server_palette)(struct vnc* v, int* palette);
|
||||
int (*server_msg)(struct vnc* v, char* msg);
|
||||
int (*server_is_term)(struct vnc* v);
|
||||
int (*server_set_clip)(struct vnc* v, int x, int y, int cx, int cy);
|
||||
int (*server_reset_clip)(struct vnc* v);
|
||||
/* common */
|
||||
long handle; /* pointer to self as long */
|
||||
long wm;
|
||||
|
|
|
@ -288,3 +288,7 @@ int DEFAULT_CC
|
|||
server_msg(struct xrdp_mod* mod, char* msg);
|
||||
int DEFAULT_CC
|
||||
server_is_term(struct xrdp_mod* mod);
|
||||
int DEFAULT_CC
|
||||
server_set_clip(struct xrdp_mod* mod, int x, int y, int cx, int cy);
|
||||
int DEFAULT_CC
|
||||
server_reset_clip(struct xrdp_mod* mod);
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
/*****************************************************************************/
|
||||
/* this is the log windows nofity function */
|
||||
int
|
||||
int DEFAULT_CC
|
||||
xrdp_wm_log_wnd_notify(struct xrdp_bitmap* wnd,
|
||||
struct xrdp_bitmap* sender,
|
||||
int msg, long param1, long param2)
|
||||
|
@ -79,7 +79,7 @@ xrdp_wm_log_wnd_notify(struct xrdp_bitmap* wnd,
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
int
|
||||
int DEFAULT_CC
|
||||
server_begin_update(struct xrdp_mod* mod)
|
||||
{
|
||||
struct xrdp_wm* wm;
|
||||
|
@ -93,7 +93,7 @@ server_begin_update(struct xrdp_mod* mod)
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
int
|
||||
int DEFAULT_CC
|
||||
server_end_update(struct xrdp_mod* mod)
|
||||
{
|
||||
struct xrdp_painter* p;
|
||||
|
@ -106,7 +106,7 @@ server_end_update(struct xrdp_mod* mod)
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
int
|
||||
int DEFAULT_CC
|
||||
server_fill_rect(struct xrdp_mod* mod, int x, int y, int cx, int cy,
|
||||
int color)
|
||||
{
|
||||
|
@ -121,7 +121,7 @@ server_fill_rect(struct xrdp_mod* mod, int x, int y, int cx, int cy,
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
int
|
||||
int DEFAULT_CC
|
||||
server_screen_blt(struct xrdp_mod* mod, int x, int y, int cx, int cy,
|
||||
int srcx, int srcy)
|
||||
{
|
||||
|
@ -136,7 +136,7 @@ server_screen_blt(struct xrdp_mod* mod, int x, int y, int cx, int cy,
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
int
|
||||
int DEFAULT_CC
|
||||
server_paint_rect(struct xrdp_mod* mod, int x, int y, int cx, int cy,
|
||||
char* data)
|
||||
{
|
||||
|
@ -153,7 +153,7 @@ server_paint_rect(struct xrdp_mod* mod, int x, int y, int cx, int cy,
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
int
|
||||
int DEFAULT_CC
|
||||
server_set_pointer(struct xrdp_mod* mod, int x, int y,
|
||||
char* data, char* mask)
|
||||
{
|
||||
|
@ -165,7 +165,7 @@ server_set_pointer(struct xrdp_mod* mod, int x, int y,
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
int
|
||||
int DEFAULT_CC
|
||||
server_palette(struct xrdp_mod* mod, int* palette)
|
||||
{
|
||||
struct xrdp_wm* wm;
|
||||
|
@ -180,7 +180,7 @@ server_palette(struct xrdp_mod* mod, int* palette)
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
int
|
||||
int DEFAULT_CC
|
||||
server_msg(struct xrdp_mod* mod, char* msg)
|
||||
{
|
||||
struct xrdp_wm* wm;
|
||||
|
@ -219,8 +219,28 @@ server_msg(struct xrdp_mod* mod, char* msg)
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
int
|
||||
int DEFAULT_CC
|
||||
server_is_term(struct xrdp_mod* mod)
|
||||
{
|
||||
return g_is_term();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
int DEFAULT_CC
|
||||
server_set_clip(struct xrdp_mod* mod, int x, int y, int cx, int cy)
|
||||
{
|
||||
struct xrdp_painter* p;
|
||||
|
||||
p = (struct xrdp_painter*)mod->painter;
|
||||
return xrdp_painter_set_clip(p, x, y, cx, cy);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
int DEFAULT_CC
|
||||
server_reset_clip(struct xrdp_mod* mod)
|
||||
{
|
||||
struct xrdp_painter* p;
|
||||
|
||||
p = (struct xrdp_painter*)mod->painter;
|
||||
return xrdp_painter_clr_clip(p);
|
||||
}
|
||||
|
|
|
@ -148,6 +148,10 @@ xrdp_listen_main_loop(struct xrdp_listen* self)
|
|||
g_tcp_set_non_blocking(self->sck);
|
||||
error = g_tcp_bind(self->sck, "3389");
|
||||
if (error != 0)
|
||||
{
|
||||
error = g_tcp_bind(self->sck, "3390");
|
||||
}
|
||||
if (error != 0)
|
||||
{
|
||||
g_printf("bind error in xrdp_listen_main_loop\n\r");
|
||||
g_tcp_close(self->sck);
|
||||
|
|
|
@ -124,6 +124,8 @@ xrdp_wm_setup_mod(struct xrdp_wm* self,
|
|||
self->mod->server_palette = server_palette;
|
||||
self->mod->server_msg = server_msg;
|
||||
self->mod->server_is_term = server_is_term;
|
||||
self->mod->server_set_clip = server_set_clip;
|
||||
self->mod->server_reset_clip = server_reset_clip;
|
||||
}
|
||||
}
|
||||
/* id self->mod is null, there must be a problem */
|
||||
|
|
|
@ -45,6 +45,8 @@ struct xrdp_mod
|
|||
int (*server_palette)(struct xrdp_mod* v, int* palette);
|
||||
int (*server_msg)(struct xrdp_mod* v, char* msg);
|
||||
int (*server_is_term)(struct xrdp_mod* v);
|
||||
int (*server_set_clip)(struct xrdp_mod* v, int x, int y, int cx, int cy);
|
||||
int (*server_reset_clip)(struct xrdp_mod* v);
|
||||
/* common */
|
||||
long handle; /* pointer to self as int */
|
||||
long wm; /* struct xrdp_wm* */
|
||||
|
|
Loading…
Reference in New Issue