neutrinordp: indentation fixes
This commit is contained in:
parent
a42cb4842c
commit
80b91c0a7b
@ -20,10 +20,10 @@
|
||||
#ifndef __XRDP_COLOR_H
|
||||
#define __XRDP_COLOR_H
|
||||
|
||||
char* APP_CC
|
||||
convert_bitmap(int in_bpp, int out_bpp, char* bmpdata,
|
||||
int width, int height, int* palette);
|
||||
char *APP_CC
|
||||
convert_bitmap(int in_bpp, int out_bpp, char *bmpdata,
|
||||
int width, int height, int *palette);
|
||||
int APP_CC
|
||||
convert_color(int in_bpp, int out_bpp, int in_color, int* palette);
|
||||
convert_color(int in_bpp, int out_bpp, int in_color, int *palette);
|
||||
|
||||
#endif
|
||||
|
@ -48,13 +48,14 @@ verifyColorMap(struct mod *mod)
|
||||
{
|
||||
int i;
|
||||
|
||||
for(i = 0; i < 255; i++)
|
||||
for (i = 0; i < 255; i++)
|
||||
{
|
||||
if (mod->colormap[i] != 0)
|
||||
{
|
||||
return ;
|
||||
}
|
||||
}
|
||||
|
||||
LLOGLN(0, ("The colormap is all NULL"));
|
||||
}
|
||||
|
||||
@ -114,47 +115,58 @@ lxrdp_connect(struct mod *mod)
|
||||
{
|
||||
case PREECONNECTERROR:
|
||||
g_snprintf(buf, 128, "The error code from connect is "
|
||||
"PREECONNECTERROR");
|
||||
"PREECONNECTERROR");
|
||||
break;
|
||||
|
||||
case UNDEFINEDCONNECTERROR:
|
||||
g_snprintf(buf, 128, "The error code from connect is "
|
||||
"UNDEFINEDCONNECTERROR");
|
||||
"UNDEFINEDCONNECTERROR");
|
||||
break;
|
||||
|
||||
case POSTCONNECTERROR:
|
||||
g_snprintf(buf, 128, "The error code from connect is "
|
||||
"POSTCONNECTERROR");
|
||||
"POSTCONNECTERROR");
|
||||
break;
|
||||
|
||||
case DNSERROR:
|
||||
g_snprintf(buf, 128, "The DNS system generated an error");
|
||||
break;
|
||||
|
||||
case DNSNAMENOTFOUND:
|
||||
g_snprintf(buf, 128, "The DNS system could not find the "
|
||||
"specified name");
|
||||
"specified name");
|
||||
break;
|
||||
|
||||
case CONNECTERROR:
|
||||
g_snprintf(buf, 128, "A general connect error was returned");
|
||||
break;
|
||||
|
||||
case MCSCONNECTINITIALERROR:
|
||||
g_snprintf(buf, 128, "The error code from connect is "
|
||||
"MCSCONNECTINITIALERROR");
|
||||
"MCSCONNECTINITIALERROR");
|
||||
break;
|
||||
|
||||
case TLSCONNECTERROR:
|
||||
g_snprintf(buf, 128, "Error in TLS handshake");
|
||||
break;
|
||||
|
||||
case AUTHENTICATIONERROR:
|
||||
g_snprintf(buf, 128, "Authentication error check your password "
|
||||
"and username");
|
||||
"and username");
|
||||
break;
|
||||
|
||||
case INSUFFICIENTPRIVILEGESERROR:
|
||||
g_snprintf(buf, 128, "Insufficent privileges on target server");
|
||||
break;
|
||||
g_snprintf(buf, 128, "Insufficent privileges on target server");
|
||||
break;
|
||||
|
||||
default:
|
||||
g_snprintf(buf, 128, "Unhandled Errorcode from connect : %d",
|
||||
connectErrorCode);
|
||||
connectErrorCode);
|
||||
break;
|
||||
}
|
||||
}
|
||||
log_message(LOG_LEVEL_INFO,buf);
|
||||
|
||||
log_message(LOG_LEVEL_INFO, buf);
|
||||
mod->server_msg(mod, buf, 0);
|
||||
}
|
||||
|
||||
@ -198,6 +210,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
||||
switch (msg)
|
||||
{
|
||||
case 15: /* key down */
|
||||
|
||||
/* Before we handle the first character we synchronize
|
||||
capslock and numlock. */
|
||||
/* We collect the state during the first synchronize
|
||||
@ -208,24 +221,30 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
||||
mod->inst->input->SynchronizeEvent(mod->inst->input, mod->keyBoardLockInfo);
|
||||
mod->bool_keyBoardSynced = 1;
|
||||
}
|
||||
|
||||
mod->inst->input->KeyboardEvent(mod->inst->input, param4, param3);
|
||||
break;
|
||||
|
||||
case 16: /* key up */
|
||||
mod->inst->input->KeyboardEvent(mod->inst->input, param4, param3);
|
||||
break;
|
||||
|
||||
case 17: /* Synchronize */
|
||||
LLOGLN(11, ("Synchronized event handled : %d",param1));
|
||||
LLOGLN(11, ("Synchronized event handled : %d", param1));
|
||||
/* In some situations the Synchronize event come to early.
|
||||
Therefore we store this information and use it when we
|
||||
receive the first keyboard event
|
||||
Without this fix numlock and capslock can come
|
||||
out of sync. */
|
||||
mod->inst->input->SynchronizeEvent(mod->inst->input, param1);
|
||||
|
||||
if (!mod->bool_keyBoardSynced)
|
||||
{
|
||||
mod->keyBoardLockInfo = param1;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 100: /* mouse move */
|
||||
LLOGLN(12, ("mouse move %d %d", param1, param2));
|
||||
x = param1;
|
||||
@ -233,6 +252,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
||||
flags = PTR_FLAGS_MOVE;
|
||||
mod->inst->input->MouseEvent(mod->inst->input, flags, x, y);
|
||||
break;
|
||||
|
||||
case 101: /* left button up */
|
||||
LLOGLN(12, ("left button up %d %d", param1, param2));
|
||||
x = param1;
|
||||
@ -240,6 +260,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
||||
flags = PTR_FLAGS_BUTTON1;
|
||||
mod->inst->input->MouseEvent(mod->inst->input, flags, x, y);
|
||||
break;
|
||||
|
||||
case 102: /* left button down */
|
||||
LLOGLN(12, ("left button down %d %d", param1, param2));
|
||||
x = param1;
|
||||
@ -247,6 +268,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
||||
flags = PTR_FLAGS_BUTTON1 | PTR_FLAGS_DOWN;
|
||||
mod->inst->input->MouseEvent(mod->inst->input, flags, x, y);
|
||||
break;
|
||||
|
||||
case 103: /* right button up */
|
||||
LLOGLN(12, ("right button up %d %d", param1, param2));
|
||||
x = param1;
|
||||
@ -254,6 +276,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
||||
flags = PTR_FLAGS_BUTTON2;
|
||||
mod->inst->input->MouseEvent(mod->inst->input, flags, x, y);
|
||||
break;
|
||||
|
||||
case 104: /* right button down */
|
||||
LLOGLN(12, ("right button down %d %d", param1, param2));
|
||||
x = param1;
|
||||
@ -261,6 +284,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
||||
flags = PTR_FLAGS_BUTTON2 | PTR_FLAGS_DOWN;
|
||||
mod->inst->input->MouseEvent(mod->inst->input, flags, x, y);
|
||||
break;
|
||||
|
||||
case 105: /* middle button up */
|
||||
LLOGLN(12, ("middle button up %d %d", param1, param2));
|
||||
x = param1;
|
||||
@ -268,6 +292,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
||||
flags = PTR_FLAGS_BUTTON3;
|
||||
mod->inst->input->MouseEvent(mod->inst->input, flags, x, y);
|
||||
break;
|
||||
|
||||
case 106: /* middle button down */
|
||||
LLOGLN(12, ("middle button down %d %d", param1, param2));
|
||||
x = param1;
|
||||
@ -275,18 +300,23 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
||||
flags = PTR_FLAGS_BUTTON3 | PTR_FLAGS_DOWN;
|
||||
mod->inst->input->MouseEvent(mod->inst->input, flags, x, y);
|
||||
break;
|
||||
|
||||
case 107: /* wheel up */
|
||||
flags = PTR_FLAGS_WHEEL | 0x0078;
|
||||
mod->inst->input->MouseEvent(mod->inst->input, flags, 0, 0);
|
||||
break;
|
||||
|
||||
case 108:
|
||||
break;
|
||||
|
||||
case 109: /* wheel down */
|
||||
flags = PTR_FLAGS_WHEEL | PTR_FLAGS_WHEEL_NEGATIVE | 0x0088;
|
||||
mod->inst->input->MouseEvent(mod->inst->input, flags, 0, 0);
|
||||
break;
|
||||
|
||||
case 110:
|
||||
break;
|
||||
|
||||
case 200:
|
||||
LLOGLN(10, ("Invalidate request sent from client"));
|
||||
x = (param1 >> 16) & 0xffff;
|
||||
@ -295,6 +325,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
||||
cy = (param2 >> 0) & 0xffff;
|
||||
mod->inst->SendInvalidate(mod->inst, -1, x, y, cx, cy);
|
||||
break;
|
||||
|
||||
case 0x5555:
|
||||
chanid = LOWORD(param1);
|
||||
flags = HIWORD(param1);
|
||||
@ -303,6 +334,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
||||
total_size = (int)param4;
|
||||
|
||||
LLOGLN(12, ("lxrdp_event: client to server ,chanid= %d flags= %d", chanid, flags));
|
||||
|
||||
if ((chanid < 0) || (chanid >= mod->inst->settings->num_channels))
|
||||
{
|
||||
LLOGLN(0, ("lxrdp_event: error chanid %d", chanid));
|
||||
@ -316,6 +348,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
||||
case 3:
|
||||
mod->inst->SendChannelData(mod->inst, lchid, (tui8 *)data, total_size);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
/* end */
|
||||
g_memcpy(mod->chan_buf + mod->chan_buf_valid, data, size);
|
||||
@ -327,6 +360,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
||||
mod->chan_buf_bytes = 0;
|
||||
mod->chan_buf_valid = 0;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
/* start */
|
||||
g_free(mod->chan_buf);
|
||||
@ -336,6 +370,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
||||
g_memcpy(mod->chan_buf + mod->chan_buf_valid, data, size);
|
||||
mod->chan_buf_valid += size;
|
||||
break;
|
||||
|
||||
default:
|
||||
/* middle */
|
||||
g_memcpy(mod->chan_buf + mod->chan_buf_valid, data, size);
|
||||
@ -344,6 +379,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
LLOGLN(0, ("Unhandled message type in eventhandler %d", msg));
|
||||
break;
|
||||
@ -587,16 +623,18 @@ lfreerdp_bitmap_update(rdpContext *context, BITMAP_UPDATE *bitmap)
|
||||
|
||||
if (bd->compressed)
|
||||
{
|
||||
LLOGLN(20,("decompress size : %d",bd->bitmapLength));
|
||||
if(!bitmap_decompress(bd->bitmapDataStream, (tui8 *)dst_data, bd->width,
|
||||
bd->height, bd->bitmapLength, server_bpp, server_bpp)){
|
||||
LLOGLN(0,("Failure to decompress the bitmap"));
|
||||
LLOGLN(20, ("decompress size : %d", bd->bitmapLength));
|
||||
|
||||
if (!bitmap_decompress(bd->bitmapDataStream, (tui8 *)dst_data, bd->width,
|
||||
bd->height, bd->bitmapLength, server_bpp, server_bpp))
|
||||
{
|
||||
LLOGLN(0, ("Failure to decompress the bitmap"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* bitmap is upside down */
|
||||
LLOGLN(10,("bitmap upside down"));
|
||||
LLOGLN(10, ("bitmap upside down"));
|
||||
src = (char *)(bd->bitmapDataStream);
|
||||
dst = dst_data + bd->height * line_bytes;
|
||||
|
||||
@ -661,14 +699,15 @@ lfreerdp_pat_blt(rdpContext *context, PATBLT_ORDER *patblt)
|
||||
patblt->backColor, mod->colormap);
|
||||
|
||||
LLOGLN(10, ("lfreerdp_pat_blt: nLeftRect %d nTopRect %d "
|
||||
"nWidth %d nHeight %d fgcolor 0x%8.8x bgcolor 0x%8.8x",
|
||||
patblt->nLeftRect, patblt->nTopRect,
|
||||
patblt->nWidth, patblt->nHeight, fgcolor, bgcolor));
|
||||
"nWidth %d nHeight %d fgcolor 0x%8.8x bgcolor 0x%8.8x",
|
||||
patblt->nLeftRect, patblt->nTopRect,
|
||||
patblt->nWidth, patblt->nHeight, fgcolor, bgcolor));
|
||||
|
||||
if (fgcolor == bgcolor)
|
||||
{
|
||||
LLOGLN(0, ("Warning same color on both bg and fg"));
|
||||
}
|
||||
|
||||
mod->server_set_mixmode(mod, 1);
|
||||
mod->server_set_opcode(mod, patblt->bRop);
|
||||
mod->server_set_fgcolor(mod, fgcolor);
|
||||
@ -733,9 +772,9 @@ lfreerdp_opaque_rect(rdpContext *context, OPAQUE_RECT_ORDER *opaque_rect)
|
||||
fgcolor = convert_color(server_bpp, client_bpp,
|
||||
opaque_rect->color, mod->colormap);
|
||||
LLOGLN(10, ("lfreerdp_opaque_rect: nLeftRect %d nTopRect %d "
|
||||
"nWidth %d nHeight %d fgcolor 0x%8.8x",
|
||||
opaque_rect->nLeftRect, opaque_rect->nTopRect,
|
||||
opaque_rect->nWidth, opaque_rect->nHeight, fgcolor));
|
||||
"nWidth %d nHeight %d fgcolor 0x%8.8x",
|
||||
opaque_rect->nLeftRect, opaque_rect->nTopRect,
|
||||
opaque_rect->nWidth, opaque_rect->nHeight, fgcolor));
|
||||
mod->server_set_fgcolor(mod, fgcolor);
|
||||
mod->server_fill_rect(mod, opaque_rect->nLeftRect, opaque_rect->nTopRect,
|
||||
opaque_rect->nWidth, opaque_rect->nHeight);
|
||||
@ -808,16 +847,16 @@ lfreerdp_glyph_index(rdpContext *context, GLYPH_INDEX_ORDER *glyph_index)
|
||||
bgcolor = convert_color(server_bpp, client_bpp,
|
||||
glyph_index->backColor, mod->colormap);
|
||||
LLOGLN(10, ("lfreerdp_glyph_index: "
|
||||
"bkLeft %d bkTop %d width %d height %d "
|
||||
"opLeft %d opTop %d width %d height %d "
|
||||
"cbData %d fgcolor 0x%8.8x bgcolor 0x%8.8x fOpRedundant %d",
|
||||
glyph_index->bkLeft, glyph_index->bkTop,
|
||||
glyph_index->bkRight - glyph_index->bkLeft,
|
||||
glyph_index->bkBottom - glyph_index->bkTop,
|
||||
glyph_index->opLeft, glyph_index->opTop,
|
||||
glyph_index->opRight - glyph_index->opLeft,
|
||||
glyph_index->opBottom - glyph_index->opTop,
|
||||
glyph_index->cbData, fgcolor, bgcolor, glyph_index->fOpRedundant));
|
||||
"bkLeft %d bkTop %d width %d height %d "
|
||||
"opLeft %d opTop %d width %d height %d "
|
||||
"cbData %d fgcolor 0x%8.8x bgcolor 0x%8.8x fOpRedundant %d",
|
||||
glyph_index->bkLeft, glyph_index->bkTop,
|
||||
glyph_index->bkRight - glyph_index->bkLeft,
|
||||
glyph_index->bkBottom - glyph_index->bkTop,
|
||||
glyph_index->opLeft, glyph_index->opTop,
|
||||
glyph_index->opRight - glyph_index->opLeft,
|
||||
glyph_index->opBottom - glyph_index->opTop,
|
||||
glyph_index->cbData, fgcolor, bgcolor, glyph_index->fOpRedundant));
|
||||
mod->server_set_bgcolor(mod, fgcolor);
|
||||
mod->server_set_fgcolor(mod, bgcolor);
|
||||
opLeft = glyph_index->opLeft;
|
||||
@ -825,6 +864,7 @@ lfreerdp_glyph_index(rdpContext *context, GLYPH_INDEX_ORDER *glyph_index)
|
||||
opRight = glyph_index->opRight;
|
||||
opBottom = glyph_index->opBottom;
|
||||
#if 1
|
||||
|
||||
/* workarounds for freerdp not using fOpRedundant in
|
||||
glyph.c::update_gdi_glyph_index */
|
||||
if (glyph_index->fOpRedundant)
|
||||
@ -832,8 +872,9 @@ lfreerdp_glyph_index(rdpContext *context, GLYPH_INDEX_ORDER *glyph_index)
|
||||
opLeft = glyph_index->bkLeft;
|
||||
opTop = glyph_index->bkTop;
|
||||
opRight = glyph_index->bkRight;
|
||||
opBottom =glyph_index->bkBottom;
|
||||
opBottom = glyph_index->bkBottom;
|
||||
}
|
||||
|
||||
#endif
|
||||
mod->server_draw_text(mod, glyph_index->cacheId, glyph_index->flAccel,
|
||||
glyph_index->fOpRedundant,
|
||||
@ -881,7 +922,7 @@ lfreerdp_cache_bitmap(rdpContext *context, CACHE_BITMAP_ORDER *cache_bitmap_orde
|
||||
/******************************************************************************/
|
||||
/* Turn the bitmap upside down*/
|
||||
static void DEFAULT_CC
|
||||
lfreerdp_upsidedown(uint8* destination, CACHE_BITMAP_V2_ORDER* cache_bitmap_v2_order, int server_Bpp)
|
||||
lfreerdp_upsidedown(uint8 *destination, CACHE_BITMAP_V2_ORDER *cache_bitmap_v2_order, int server_Bpp)
|
||||
{
|
||||
tui8 *src;
|
||||
tui8 *dst;
|
||||
@ -1094,7 +1135,7 @@ static void DEFAULT_CC
|
||||
lfreerdp_pointer_system(rdpContext *context,
|
||||
POINTER_SYSTEM_UPDATE *pointer_system)
|
||||
{
|
||||
LLOGLN(0, ("lfreerdp_pointer_system: - no code here type value = %d",pointer_system->type));
|
||||
LLOGLN(0, ("lfreerdp_pointer_system: - no code here type value = %d", pointer_system->type));
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
@ -1127,7 +1168,7 @@ lfreerdp_get_pixel(void *bits, int width, int height, int bpp,
|
||||
{
|
||||
src8 = (tui8 *)bits;
|
||||
src8 += y * delta + x * 4;
|
||||
pixel = ((int*)(src8))[0];
|
||||
pixel = ((int *)(src8))[0];
|
||||
return pixel;
|
||||
}
|
||||
else
|
||||
@ -1174,7 +1215,7 @@ lfreerdp_set_pixel(int pixel, void *bits, int width, int height, int bpp,
|
||||
{
|
||||
dst8 = (tui8 *)bits;
|
||||
dst8 += y * delta + x * 4;
|
||||
((int*)(dst8))[0] = pixel;
|
||||
((int *)(dst8))[0] = pixel;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1225,21 +1266,23 @@ lfreerdp_pointer_new(rdpContext *context,
|
||||
LLOGLN(20, ("lfreerdp_pointer_new:"));
|
||||
LLOGLN(20, (" bpp %d", pointer_new->xorBpp));
|
||||
LLOGLN(20, (" width %d height %d", pointer_new->colorPtrAttr.width,
|
||||
pointer_new->colorPtrAttr.height));
|
||||
pointer_new->colorPtrAttr.height));
|
||||
|
||||
LLOGLN(20, (" lengthXorMask %d lengthAndMask %d",
|
||||
pointer_new->colorPtrAttr.lengthXorMask,
|
||||
pointer_new->colorPtrAttr.lengthAndMask));
|
||||
pointer_new->colorPtrAttr.lengthXorMask,
|
||||
pointer_new->colorPtrAttr.lengthAndMask));
|
||||
|
||||
index = pointer_new->colorPtrAttr.cacheIndex;
|
||||
|
||||
if (index >= 32)
|
||||
{
|
||||
LLOGLN(0, ("lfreerdp_pointer_new: pointer index too big"));
|
||||
return ;
|
||||
}
|
||||
|
||||
if (pointer_new->xorBpp == 1 &&
|
||||
pointer_new->colorPtrAttr.width == 32 &&
|
||||
pointer_new->colorPtrAttr.height == 32)
|
||||
pointer_new->colorPtrAttr.width == 32 &&
|
||||
pointer_new->colorPtrAttr.height == 32)
|
||||
{
|
||||
LLOGLN(10, ("lfreerdp_pointer_new:"));
|
||||
mod->pointer_cache[index].hotx = pointer_new->colorPtrAttr.xPos;
|
||||
@ -1256,14 +1299,14 @@ lfreerdp_pointer_new(rdpContext *context,
|
||||
lfreerdp_convert_color_image(dst, 32, 32, 1, 32 / -8,
|
||||
src, 32, 32, 1, 32 / 8);
|
||||
}
|
||||
else if(pointer_new->xorBpp >= 8 &&
|
||||
pointer_new->colorPtrAttr.width == 32 &&
|
||||
pointer_new->colorPtrAttr.height == 32)
|
||||
else if (pointer_new->xorBpp >= 8 &&
|
||||
pointer_new->colorPtrAttr.width == 32 &&
|
||||
pointer_new->colorPtrAttr.height == 32)
|
||||
{
|
||||
bytes_per_pixel = (pointer_new->xorBpp + 7) / 8;
|
||||
bits_per_pixel = pointer_new->xorBpp;
|
||||
LLOGLN(10, ("lfreerdp_pointer_new: bpp %d Bpp %d", bits_per_pixel,
|
||||
bytes_per_pixel));
|
||||
bytes_per_pixel));
|
||||
mod->pointer_cache[index].hotx = pointer_new->colorPtrAttr.xPos;
|
||||
mod->pointer_cache[index].hoty = pointer_new->colorPtrAttr.yPos;
|
||||
mod->pointer_cache[index].bpp = bits_per_pixel;
|
||||
@ -1278,7 +1321,7 @@ lfreerdp_pointer_new(rdpContext *context,
|
||||
{
|
||||
LLOGLN(0, ("lfreerdp_pointer_new: error bpp %d width %d height %d index: %d",
|
||||
pointer_new->xorBpp, pointer_new->colorPtrAttr.width,
|
||||
pointer_new->colorPtrAttr.height,index));
|
||||
pointer_new->colorPtrAttr.height, index));
|
||||
}
|
||||
|
||||
mod->server_set_pointer_ex(mod, mod->pointer_cache[index].hotx,
|
||||
@ -1314,14 +1357,14 @@ lfreerdp_pointer_cached(rdpContext *context,
|
||||
|
||||
/******************************************************************************/
|
||||
static void DEFAULT_CC
|
||||
lfreerdp_polygon_cb(rdpContext* context, POLYGON_CB_ORDER* polygon_cb)
|
||||
lfreerdp_polygon_cb(rdpContext *context, POLYGON_CB_ORDER *polygon_cb)
|
||||
{
|
||||
LLOGLN(0, ("lfreerdp_polygon_sc called:- not supported!!!!!!!!!!!!!!!!!!!!"));
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
static void DEFAULT_CC
|
||||
lfreerdp_polygon_sc(rdpContext* context, POLYGON_SC_ORDER* polygon_sc)
|
||||
lfreerdp_polygon_sc(rdpContext *context, POLYGON_SC_ORDER *polygon_sc)
|
||||
{
|
||||
struct mod *mod;
|
||||
int i, npoints;
|
||||
@ -1331,11 +1374,12 @@ lfreerdp_polygon_sc(rdpContext* context, POLYGON_SC_ORDER* polygon_sc)
|
||||
|
||||
mod = ((struct mod_context *)context)->modi;
|
||||
LLOGLN(10, ("lfreerdp_polygon_sc :%d(points) %d(color) %d(fillmode) "
|
||||
"%d(bRop) %d(cbData) %d(x) %d(y)",
|
||||
polygon_sc->nDeltaEntries, polygon_sc->brushColor,
|
||||
polygon_sc->fillMode, polygon_sc->bRop2,
|
||||
polygon_sc->cbData, polygon_sc->xStart,
|
||||
polygon_sc->yStart));
|
||||
"%d(bRop) %d(cbData) %d(x) %d(y)",
|
||||
polygon_sc->nDeltaEntries, polygon_sc->brushColor,
|
||||
polygon_sc->fillMode, polygon_sc->bRop2,
|
||||
polygon_sc->cbData, polygon_sc->xStart,
|
||||
polygon_sc->yStart));
|
||||
|
||||
if (polygon_sc->nDeltaEntries == 3)
|
||||
{
|
||||
server_bpp = mod->inst->settings->color_depth;
|
||||
@ -1349,6 +1393,7 @@ lfreerdp_polygon_sc(rdpContext* context, POLYGON_SC_ORDER* polygon_sc)
|
||||
points[i + 1].x = 0; // polygon_sc->points[i].x;
|
||||
points[i + 1].y = 0; // polygon_sc->points[i].y;
|
||||
}
|
||||
|
||||
fgcolor = convert_color(server_bpp, client_bpp,
|
||||
polygon_sc->brushColor, mod->colormap);
|
||||
|
||||
@ -1358,10 +1403,10 @@ lfreerdp_polygon_sc(rdpContext* context, POLYGON_SC_ORDER* polygon_sc)
|
||||
mod->server_set_pen(mod, 1, 1); // style, width
|
||||
// TODO replace with correct brush; this is a workaround
|
||||
// This workaround handles the text cursor in microsoft word.
|
||||
mod->server_draw_line(mod,polygon_sc->xStart,polygon_sc->yStart,polygon_sc->xStart,polygon_sc->yStart+points[2].y);
|
||||
// mod->server_fill_rect(mod, points[0].x, points[0].y,
|
||||
// points[0].x-points[3].x, points[0].y-points[2].y);
|
||||
// mod->server_set_brush(mod,); // howto use this on our indata??
|
||||
mod->server_draw_line(mod, polygon_sc->xStart, polygon_sc->yStart, polygon_sc->xStart, polygon_sc->yStart + points[2].y);
|
||||
// mod->server_fill_rect(mod, points[0].x, points[0].y,
|
||||
// points[0].x-points[3].x, points[0].y-points[2].y);
|
||||
// mod->server_set_brush(mod,); // howto use this on our indata??
|
||||
mod->server_set_opcode(mod, 0xcc);
|
||||
}
|
||||
else
|
||||
@ -1372,7 +1417,7 @@ lfreerdp_polygon_sc(rdpContext* context, POLYGON_SC_ORDER* polygon_sc)
|
||||
|
||||
/******************************************************************************/
|
||||
static void DEFAULT_CC
|
||||
lfreerdp_synchronize(rdpContext* context)
|
||||
lfreerdp_synchronize(rdpContext *context)
|
||||
{
|
||||
struct mod *mod;
|
||||
mod = ((struct mod_context *)context)->modi;
|
||||
@ -1488,22 +1533,24 @@ lfreerdp_pre_connect(freerdp *instance)
|
||||
{
|
||||
LLOGLN(10, ("Special PerformanceFlags changed"));
|
||||
instance->settings->performance_flags = PERF_DISABLE_WALLPAPER |
|
||||
PERF_DISABLE_FULLWINDOWDRAG | PERF_DISABLE_MENUANIMATIONS |
|
||||
PERF_DISABLE_THEMING;
|
||||
// | PERF_DISABLE_CURSOR_SHADOW | PERF_DISABLE_CURSORSETTINGS;
|
||||
PERF_DISABLE_FULLWINDOWDRAG | PERF_DISABLE_MENUANIMATIONS |
|
||||
PERF_DISABLE_THEMING;
|
||||
// | PERF_DISABLE_CURSOR_SHADOW | PERF_DISABLE_CURSORSETTINGS;
|
||||
}
|
||||
|
||||
instance->settings->compression = 0;
|
||||
instance->settings->ignore_certificate = 1;
|
||||
|
||||
// Multi Monitor Settings
|
||||
instance->settings->num_monitors = mod->client_info.monitorCount;
|
||||
|
||||
for (index = 0; index < mod->client_info.monitorCount; index++)
|
||||
{
|
||||
instance->settings->monitors[index].x = mod->client_info.minfo[index].left;
|
||||
instance->settings->monitors[index].y = mod->client_info.minfo[index].top;
|
||||
instance->settings->monitors[index].width = mod->client_info.minfo[index].right;
|
||||
instance->settings->monitors[index].height = mod->client_info.minfo[index].bottom;
|
||||
instance->settings->monitors[index].is_primary = mod->client_info.minfo[index].is_primary;
|
||||
instance->settings->monitors[index].x = mod->client_info.minfo[index].left;
|
||||
instance->settings->monitors[index].y = mod->client_info.minfo[index].top;
|
||||
instance->settings->monitors[index].width = mod->client_info.minfo[index].right;
|
||||
instance->settings->monitors[index].height = mod->client_info.minfo[index].bottom;
|
||||
instance->settings->monitors[index].is_primary = mod->client_info.minfo[index].is_primary;
|
||||
}
|
||||
|
||||
instance->update->BeginPaint = lfreerdp_begin_paint;
|
||||
@ -1552,7 +1599,7 @@ lrail_WindowCreate(rdpContext *context, WINDOW_ORDER_INFO *orderInfo,
|
||||
int index;
|
||||
struct mod *mod;
|
||||
struct rail_window_state_order wso;
|
||||
UNICONV* uniconv;
|
||||
UNICONV *uniconv;
|
||||
|
||||
LLOGLN(10, ("lrail_WindowCreate:"));
|
||||
uniconv = freerdp_uniconv_new();
|
||||
@ -1567,7 +1614,7 @@ lrail_WindowCreate(rdpContext *context, WINDOW_ORDER_INFO *orderInfo,
|
||||
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_TITLE)
|
||||
{
|
||||
wso.title_info = freerdp_uniconv_in(uniconv,
|
||||
window_state->titleInfo.string, window_state->titleInfo.length);
|
||||
window_state->titleInfo.string, window_state->titleInfo.length);
|
||||
}
|
||||
|
||||
LLOGLN(10, ("lrail_WindowCreate: %s", wso.title_info));
|
||||
@ -1693,7 +1740,7 @@ lrail_NotifyIconCreate(rdpContext *context, WINDOW_ORDER_INFO *orderInfo,
|
||||
{
|
||||
struct mod *mod;
|
||||
struct rail_notify_state_order rnso;
|
||||
UNICONV* uniconv;
|
||||
UNICONV *uniconv;
|
||||
|
||||
LLOGLN(10, ("lrail_NotifyIconCreate:"));
|
||||
uniconv = freerdp_uniconv_new();
|
||||
@ -1704,19 +1751,20 @@ lrail_NotifyIconCreate(rdpContext *context, WINDOW_ORDER_INFO *orderInfo,
|
||||
|
||||
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_NOTIFY_TIP)
|
||||
{
|
||||
rnso.tool_tip = freerdp_uniconv_in(uniconv,
|
||||
notify_icon_state->toolTip.string, notify_icon_state->toolTip.length);
|
||||
rnso.tool_tip = freerdp_uniconv_in(uniconv,
|
||||
notify_icon_state->toolTip.string, notify_icon_state->toolTip.length);
|
||||
}
|
||||
|
||||
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_NOTIFY_INFO_TIP)
|
||||
{
|
||||
rnso.infotip.timeout = notify_icon_state->infoTip.timeout;
|
||||
rnso.infotip.flags = notify_icon_state->infoTip.flags;
|
||||
rnso.infotip.text = freerdp_uniconv_in(uniconv,
|
||||
notify_icon_state->infoTip.text.string,
|
||||
notify_icon_state->infoTip.text.length);
|
||||
rnso.infotip.title = freerdp_uniconv_in(uniconv,
|
||||
notify_icon_state->infoTip.title.string,
|
||||
notify_icon_state->infoTip.title.length);
|
||||
rnso.infotip.timeout = notify_icon_state->infoTip.timeout;
|
||||
rnso.infotip.flags = notify_icon_state->infoTip.flags;
|
||||
rnso.infotip.text = freerdp_uniconv_in(uniconv,
|
||||
notify_icon_state->infoTip.text.string,
|
||||
notify_icon_state->infoTip.text.length);
|
||||
rnso.infotip.title = freerdp_uniconv_in(uniconv,
|
||||
notify_icon_state->infoTip.title.string,
|
||||
notify_icon_state->infoTip.title.length);
|
||||
}
|
||||
|
||||
rnso.state = notify_icon_state->state;
|
||||
|
@ -35,154 +35,154 @@
|
||||
|
||||
struct bitmap_item
|
||||
{
|
||||
int width;
|
||||
int height;
|
||||
char* data;
|
||||
int width;
|
||||
int height;
|
||||
char *data;
|
||||
};
|
||||
|
||||
struct brush_item
|
||||
{
|
||||
int bpp;
|
||||
int width;
|
||||
int height;
|
||||
char* data;
|
||||
char b8x8[8];
|
||||
int bpp;
|
||||
int width;
|
||||
int height;
|
||||
char *data;
|
||||
char b8x8[8];
|
||||
};
|
||||
|
||||
struct pointer_item
|
||||
{
|
||||
int hotx;
|
||||
int hoty;
|
||||
char data[32 * 32 * 4];
|
||||
char mask[32 * 32 / 8];
|
||||
int bpp;
|
||||
int hotx;
|
||||
int hoty;
|
||||
char data[32 * 32 * 4];
|
||||
char mask[32 * 32 / 8];
|
||||
int bpp;
|
||||
};
|
||||
|
||||
#define CURRENT_MOD_VER 3
|
||||
|
||||
struct mod
|
||||
{
|
||||
int size; /* size of this struct */
|
||||
int version; /* internal version */
|
||||
/* client functions */
|
||||
int (*mod_start)(struct mod* v, int w, int h, int bpp);
|
||||
int (*mod_connect)(struct mod* v);
|
||||
int (*mod_event)(struct mod* v, int msg, long param1, long param2,
|
||||
long param3, long param4);
|
||||
int (*mod_signal)(struct mod* v);
|
||||
int (*mod_end)(struct mod* v);
|
||||
int (*mod_set_param)(struct mod* v, char* name, char* value);
|
||||
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);
|
||||
tintptr mod_dumby[100 - 9]; /* align, 100 minus the number of mod
|
||||
int size; /* size of this struct */
|
||||
int version; /* internal version */
|
||||
/* client functions */
|
||||
int (*mod_start)(struct mod *v, int w, int h, int bpp);
|
||||
int (*mod_connect)(struct mod *v);
|
||||
int (*mod_event)(struct mod *v, int msg, long param1, long param2,
|
||||
long param3, long param4);
|
||||
int (*mod_signal)(struct mod *v);
|
||||
int (*mod_end)(struct mod *v);
|
||||
int (*mod_set_param)(struct mod *v, char *name, char *value);
|
||||
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);
|
||||
tintptr mod_dumby[100 - 9]; /* align, 100 minus the number of mod
|
||||
functions above */
|
||||
/* 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,
|
||||
char* data, int width, int height, int srcx, int srcy);
|
||||
int (*server_set_pointer)(struct mod* v, int x, int y, char* data, char* mask);
|
||||
int (*server_palette)(struct mod* v, int* palette);
|
||||
int (*server_msg)(struct mod* v, char* msg, int code);
|
||||
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);
|
||||
int (*server_set_brush)(struct mod* v, int x_origin, int y_origin,
|
||||
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);
|
||||
int (*server_add_char)(struct mod* v, int font, int character,
|
||||
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);
|
||||
int (*server_query_channel)(struct mod* v, int index,
|
||||
char* channel_name,
|
||||
int* channel_flags);
|
||||
int (*server_get_channel_id)(struct mod* v, char* name);
|
||||
int (*server_send_to_channel)(struct mod* v, int channel_id,
|
||||
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);
|
||||
int (*server_delete_os_surface)(struct mod* v, int rdpindex);
|
||||
int (*server_paint_rect_os)(struct mod* mod, int x, int y,
|
||||
int cx, int cy,
|
||||
int rdpindex, int srcx, int srcy);
|
||||
int (*server_set_hints)(struct mod* mod, int hints, int mask);
|
||||
/* rail */
|
||||
int (*server_window_new_update)(struct mod* mod, int window_id,
|
||||
struct rail_window_state_order* window_state,
|
||||
int flags);
|
||||
int (*server_window_delete)(struct mod* mod, int window_id);
|
||||
int (*server_window_icon)(struct mod* mod,
|
||||
int window_id, int cache_entry, int cache_id,
|
||||
struct rail_icon_info* icon_info,
|
||||
int flags);
|
||||
int (*server_window_cached_icon)(struct mod* mod,
|
||||
int window_id, int cache_entry,
|
||||
int cache_id, int flags);
|
||||
int (*server_notify_new_update)(struct mod* mod,
|
||||
int window_id, int notify_id,
|
||||
struct rail_notify_state_order* notify_state,
|
||||
int flags);
|
||||
int (*server_notify_delete)(struct mod* mod, int window_id,
|
||||
int notify_id);
|
||||
int (*server_monitored_desktop)(struct mod* mod,
|
||||
struct rail_monitored_desktop_order* mdo,
|
||||
int flags);
|
||||
int (*server_set_pointer_ex)(struct mod* mod, int x, int y, char* data,
|
||||
char* mask, int bpp);
|
||||
/* 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,
|
||||
char *data, int width, int height, int srcx, int srcy);
|
||||
int (*server_set_pointer)(struct mod *v, int x, int y, char *data, char *mask);
|
||||
int (*server_palette)(struct mod *v, int *palette);
|
||||
int (*server_msg)(struct mod *v, char *msg, int code);
|
||||
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);
|
||||
int (*server_set_brush)(struct mod *v, int x_origin, int y_origin,
|
||||
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);
|
||||
int (*server_add_char)(struct mod *v, int font, int character,
|
||||
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);
|
||||
int (*server_query_channel)(struct mod *v, int index,
|
||||
char *channel_name,
|
||||
int *channel_flags);
|
||||
int (*server_get_channel_id)(struct mod *v, char *name);
|
||||
int (*server_send_to_channel)(struct mod *v, int channel_id,
|
||||
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);
|
||||
int (*server_delete_os_surface)(struct mod *v, int rdpindex);
|
||||
int (*server_paint_rect_os)(struct mod *mod, int x, int y,
|
||||
int cx, int cy,
|
||||
int rdpindex, int srcx, int srcy);
|
||||
int (*server_set_hints)(struct mod *mod, int hints, int mask);
|
||||
/* rail */
|
||||
int (*server_window_new_update)(struct mod *mod, int window_id,
|
||||
struct rail_window_state_order *window_state,
|
||||
int flags);
|
||||
int (*server_window_delete)(struct mod *mod, int window_id);
|
||||
int (*server_window_icon)(struct mod *mod,
|
||||
int window_id, int cache_entry, int cache_id,
|
||||
struct rail_icon_info *icon_info,
|
||||
int flags);
|
||||
int (*server_window_cached_icon)(struct mod *mod,
|
||||
int window_id, int cache_entry,
|
||||
int cache_id, int flags);
|
||||
int (*server_notify_new_update)(struct mod *mod,
|
||||
int window_id, int notify_id,
|
||||
struct rail_notify_state_order *notify_state,
|
||||
int flags);
|
||||
int (*server_notify_delete)(struct mod *mod, int window_id,
|
||||
int notify_id);
|
||||
int (*server_monitored_desktop)(struct mod *mod,
|
||||
struct rail_monitored_desktop_order *mdo,
|
||||
int flags);
|
||||
int (*server_set_pointer_ex)(struct mod *mod, int x, int y, char *data,
|
||||
char *mask, int bpp);
|
||||
|
||||
tintptr server_dumby[100 - 37]; /* align, 100 minus the number of server
|
||||
tintptr server_dumby[100 - 37]; /* align, 100 minus the number of server
|
||||
functions above */
|
||||
/* common */
|
||||
tintptr handle; /* pointer to self as long */
|
||||
tintptr wm;
|
||||
tintptr painter;
|
||||
tintptr si;
|
||||
/* common */
|
||||
tintptr handle; /* pointer to self as long */
|
||||
tintptr wm;
|
||||
tintptr painter;
|
||||
tintptr si;
|
||||
|
||||
/* mod data */
|
||||
int sck;
|
||||
int width;
|
||||
int height;
|
||||
int bpp;
|
||||
int colormap[256];
|
||||
char* chan_buf;
|
||||
int chan_buf_valid;
|
||||
int chan_buf_bytes;
|
||||
int vmaj;
|
||||
int vmin;
|
||||
int vrev;
|
||||
char username[256];
|
||||
char password[256];
|
||||
char domain[256];
|
||||
int bool_keyBoardSynced ; /* Numlock can be out of sync, we hold state here to resolve */
|
||||
int keyBoardLockInfo ; /* Holds initial numlock capslock state */
|
||||
/* mod data */
|
||||
int sck;
|
||||
int width;
|
||||
int height;
|
||||
int bpp;
|
||||
int colormap[256];
|
||||
char *chan_buf;
|
||||
int chan_buf_valid;
|
||||
int chan_buf_bytes;
|
||||
int vmaj;
|
||||
int vmin;
|
||||
int vrev;
|
||||
char username[256];
|
||||
char password[256];
|
||||
char domain[256];
|
||||
int bool_keyBoardSynced ; /* Numlock can be out of sync, we hold state here to resolve */
|
||||
int keyBoardLockInfo ; /* Holds initial numlock capslock state */
|
||||
|
||||
struct xrdp_client_info client_info;
|
||||
struct xrdp_client_info client_info;
|
||||
|
||||
struct rdp_freerdp* inst;
|
||||
struct bitmap_item bitmap_cache[4][4096];
|
||||
struct brush_item brush_cache[64];
|
||||
struct pointer_item pointer_cache[32];
|
||||
struct rdp_freerdp *inst;
|
||||
struct bitmap_item bitmap_cache[4][4096];
|
||||
struct brush_item brush_cache[64];
|
||||
struct pointer_item pointer_cache[32];
|
||||
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user