Reformatted file.

This commit is contained in:
Armin Novak 2016-10-04 09:00:00 +02:00
parent 14ed7743ed
commit a4014b4182
1 changed files with 145 additions and 145 deletions

View File

@ -130,7 +130,7 @@ void PrintExtendedWindowStyles(UINT32 style)
if (EXTENDED_WINDOW_STYLES[i].multi) if (EXTENDED_WINDOW_STYLES[i].multi)
{ {
if ((style & EXTENDED_WINDOW_STYLES[i].style) != if ((style & EXTENDED_WINDOW_STYLES[i].style) !=
EXTENDED_WINDOW_STYLES[i].style) EXTENDED_WINDOW_STYLES[i].style)
continue; continue;
} }
@ -140,7 +140,7 @@ void PrintExtendedWindowStyles(UINT32 style)
} }
void PrintRailWindowState(WINDOW_ORDER_INFO* orderInfo, void PrintRailWindowState(WINDOW_ORDER_INFO* orderInfo,
WINDOW_STATE_ORDER* windowState) WINDOW_STATE_ORDER* windowState)
{ {
if (orderInfo->fieldFlags & WINDOW_ORDER_STATE_NEW) if (orderInfo->fieldFlags & WINDOW_ORDER_STATE_NEW)
WLog_INFO(TAG, "WindowCreate: WindowId: 0x%04X", orderInfo->windowId); WLog_INFO(TAG, "WindowCreate: WindowId: 0x%04X", orderInfo->windowId);
@ -157,7 +157,7 @@ void PrintRailWindowState(WINDOW_ORDER_INFO* orderInfo,
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_STYLE) if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_STYLE)
{ {
WLog_INFO(TAG, "\tStyle: 0x%04X ExtendedStyle: 0x%04X", WLog_INFO(TAG, "\tStyle: 0x%04X ExtendedStyle: 0x%04X",
windowState->style, windowState->extendedStyle); windowState->style, windowState->extendedStyle);
PrintWindowStyles(windowState->style); PrintWindowStyles(windowState->style);
PrintExtendedWindowStyles(windowState->extendedStyle); PrintExtendedWindowStyles(windowState->extendedStyle);
} }
@ -171,22 +171,22 @@ void PrintRailWindowState(WINDOW_ORDER_INFO* orderInfo,
{ {
char* title = NULL; char* title = NULL;
ConvertFromUnicode(CP_UTF8, 0, (WCHAR*) windowState->titleInfo.string, ConvertFromUnicode(CP_UTF8, 0, (WCHAR*) windowState->titleInfo.string,
windowState->titleInfo.length / 2, &title, 0, NULL, NULL); windowState->titleInfo.length / 2, &title, 0, NULL, NULL);
WLog_INFO(TAG, "\tTitleInfo: %s (length = %d)", title, WLog_INFO(TAG, "\tTitleInfo: %s (length = %d)", title,
windowState->titleInfo.length); windowState->titleInfo.length);
free(title); free(title);
} }
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_CLIENT_AREA_OFFSET) if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_CLIENT_AREA_OFFSET)
{ {
WLog_INFO(TAG, "\tClientOffsetX: %d ClientOffsetY: %d", WLog_INFO(TAG, "\tClientOffsetX: %d ClientOffsetY: %d",
windowState->clientOffsetX, windowState->clientOffsetY); windowState->clientOffsetX, windowState->clientOffsetY);
} }
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_CLIENT_AREA_SIZE) if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_CLIENT_AREA_SIZE)
{ {
WLog_INFO(TAG, "\tClientAreaWidth: %d ClientAreaHeight: %d", WLog_INFO(TAG, "\tClientAreaWidth: %d ClientAreaHeight: %d",
windowState->clientAreaWidth, windowState->clientAreaHeight); windowState->clientAreaWidth, windowState->clientAreaHeight);
} }
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_RP_CONTENT) if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_RP_CONTENT)
@ -202,19 +202,19 @@ void PrintRailWindowState(WINDOW_ORDER_INFO* orderInfo,
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_WND_OFFSET) if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_WND_OFFSET)
{ {
WLog_INFO(TAG, "\tWindowOffsetX: %d WindowOffsetY: %d", WLog_INFO(TAG, "\tWindowOffsetX: %d WindowOffsetY: %d",
windowState->windowOffsetX, windowState->windowOffsetY); windowState->windowOffsetX, windowState->windowOffsetY);
} }
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_WND_CLIENT_DELTA) if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_WND_CLIENT_DELTA)
{ {
WLog_INFO(TAG, "\tWindowClientDeltaX: %d WindowClientDeltaY: %d", WLog_INFO(TAG, "\tWindowClientDeltaX: %d WindowClientDeltaY: %d",
windowState->windowClientDeltaX, windowState->windowClientDeltaY); windowState->windowClientDeltaX, windowState->windowClientDeltaY);
} }
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_WND_SIZE) if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_WND_SIZE)
{ {
WLog_INFO(TAG, "\tWindowWidth: %d WindowHeight: %d", WLog_INFO(TAG, "\tWindowWidth: %d WindowHeight: %d",
windowState->windowWidth, windowState->windowHeight); windowState->windowWidth, windowState->windowHeight);
} }
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_WND_RECTS) if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_WND_RECTS)
@ -227,14 +227,14 @@ void PrintRailWindowState(WINDOW_ORDER_INFO* orderInfo,
{ {
rect = &windowState->windowRects[index]; rect = &windowState->windowRects[index];
WLog_INFO(TAG, "\twindowRect[%d]: left: %d top: %d right: %d bottom: %d", WLog_INFO(TAG, "\twindowRect[%d]: left: %d top: %d right: %d bottom: %d",
index, rect->left, rect->top, rect->right, rect->bottom); index, rect->left, rect->top, rect->right, rect->bottom);
} }
} }
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_VIS_OFFSET) if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_VIS_OFFSET)
{ {
WLog_INFO(TAG, "\tvisibileOffsetX: %d visibleOffsetY: %d", WLog_INFO(TAG, "\tvisibileOffsetX: %d visibleOffsetY: %d",
windowState->visibleOffsetX, windowState->visibleOffsetY); windowState->visibleOffsetX, windowState->visibleOffsetY);
} }
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_VISIBILITY) if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_VISIBILITY)
@ -247,7 +247,7 @@ void PrintRailWindowState(WINDOW_ORDER_INFO* orderInfo,
{ {
rect = &windowState->visibilityRects[index]; rect = &windowState->visibilityRects[index];
WLog_INFO(TAG, "\tvisibilityRect[%d]: left: %d top: %d right: %d bottom: %d", WLog_INFO(TAG, "\tvisibilityRect[%d]: left: %d top: %d right: %d bottom: %d",
index, rect->left, rect->top, rect->right, rect->bottom); index, rect->left, rect->top, rect->right, rect->bottom);
} }
} }
@ -259,7 +259,7 @@ static void PrintRailIconInfo(WINDOW_ORDER_INFO* orderInfo, ICON_INFO* iconInfo)
WLog_INFO(TAG, "ICON_INFO"); WLog_INFO(TAG, "ICON_INFO");
WLog_INFO(TAG, "{"); WLog_INFO(TAG, "{");
WLog_INFO(TAG, "\tbigIcon: %s", WLog_INFO(TAG, "\tbigIcon: %s",
(orderInfo->fieldFlags & WINDOW_ORDER_FIELD_ICON_BIG) ? "true" : "false"); (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_ICON_BIG) ? "true" : "false");
WLog_INFO(TAG, "\tcacheEntry; 0x%04X", iconInfo->cacheEntry); WLog_INFO(TAG, "\tcacheEntry; 0x%04X", iconInfo->cacheEntry);
WLog_INFO(TAG, "\tcacheId: 0x%04X", iconInfo->cacheId); WLog_INFO(TAG, "\tcacheId: 0x%04X", iconInfo->cacheId);
WLog_INFO(TAG, "\tbpp: %d", iconInfo->bpp); WLog_INFO(TAG, "\tbpp: %d", iconInfo->bpp);
@ -275,7 +275,7 @@ static void PrintRailIconInfo(WINDOW_ORDER_INFO* orderInfo, ICON_INFO* iconInfo)
} }
LRESULT CALLBACK wf_RailWndProc(HWND hWnd, UINT msg, WPARAM wParam, LRESULT CALLBACK wf_RailWndProc(HWND hWnd, UINT msg, WPARAM wParam,
LPARAM lParam) LPARAM lParam)
{ {
HDC hDC; HDC hDC;
int x, y; int x, y;
@ -302,116 +302,116 @@ LRESULT CALLBACK wf_RailWndProc(HWND hWnd, UINT msg, WPARAM wParam,
switch (msg) switch (msg)
{ {
case WM_PAINT: case WM_PAINT:
{ {
if (!wfc) if (!wfc)
return 0; return 0;
hDC = BeginPaint(hWnd, &ps); hDC = BeginPaint(hWnd, &ps);
x = ps.rcPaint.left; x = ps.rcPaint.left;
y = ps.rcPaint.top; y = ps.rcPaint.top;
width = ps.rcPaint.right - ps.rcPaint.left + 1; width = ps.rcPaint.right - ps.rcPaint.left + 1;
height = ps.rcPaint.bottom - ps.rcPaint.top + 1; height = ps.rcPaint.bottom - ps.rcPaint.top + 1;
BitBlt(hDC, x, y, width, height, wfc->primary->hdc, BitBlt(hDC, x, y, width, height, wfc->primary->hdc,
railWindow->x + x, railWindow->y + y, SRCCOPY); railWindow->x + x, railWindow->y + y, SRCCOPY);
EndPaint(hWnd, &ps); EndPaint(hWnd, &ps);
} }
break; break;
case WM_LBUTTONDOWN: case WM_LBUTTONDOWN:
{ {
if (!railWindow || !input) if (!railWindow || !input)
return 0; return 0;
xPos = GET_X_LPARAM(lParam) + railWindow->x; xPos = GET_X_LPARAM(lParam) + railWindow->x;
yPos = GET_Y_LPARAM(lParam) + railWindow->y; yPos = GET_Y_LPARAM(lParam) + railWindow->y;
inputFlags = PTR_FLAGS_DOWN | PTR_FLAGS_BUTTON1; inputFlags = PTR_FLAGS_DOWN | PTR_FLAGS_BUTTON1;
if (input) if (input)
input->MouseEvent(input, inputFlags, xPos, yPos); input->MouseEvent(input, inputFlags, xPos, yPos);
} }
break; break;
case WM_LBUTTONUP: case WM_LBUTTONUP:
{ {
if (!railWindow || !input) if (!railWindow || !input)
return 0; return 0;
xPos = GET_X_LPARAM(lParam) + railWindow->x; xPos = GET_X_LPARAM(lParam) + railWindow->x;
yPos = GET_Y_LPARAM(lParam) + railWindow->y; yPos = GET_Y_LPARAM(lParam) + railWindow->y;
inputFlags = PTR_FLAGS_BUTTON1; inputFlags = PTR_FLAGS_BUTTON1;
if (input) if (input)
input->MouseEvent(input, inputFlags, xPos, yPos); input->MouseEvent(input, inputFlags, xPos, yPos);
} }
break; break;
case WM_RBUTTONDOWN: case WM_RBUTTONDOWN:
{ {
if (!railWindow || !input) if (!railWindow || !input)
return 0; return 0;
xPos = GET_X_LPARAM(lParam) + railWindow->x; xPos = GET_X_LPARAM(lParam) + railWindow->x;
yPos = GET_Y_LPARAM(lParam) + railWindow->y; yPos = GET_Y_LPARAM(lParam) + railWindow->y;
inputFlags = PTR_FLAGS_DOWN | PTR_FLAGS_BUTTON2; inputFlags = PTR_FLAGS_DOWN | PTR_FLAGS_BUTTON2;
if (input) if (input)
input->MouseEvent(input, inputFlags, xPos, yPos); input->MouseEvent(input, inputFlags, xPos, yPos);
} }
break; break;
case WM_RBUTTONUP: case WM_RBUTTONUP:
{ {
if (!railWindow || !input) if (!railWindow || !input)
return 0; return 0;
xPos = GET_X_LPARAM(lParam) + railWindow->x; xPos = GET_X_LPARAM(lParam) + railWindow->x;
yPos = GET_Y_LPARAM(lParam) + railWindow->y; yPos = GET_Y_LPARAM(lParam) + railWindow->y;
inputFlags = PTR_FLAGS_BUTTON2; inputFlags = PTR_FLAGS_BUTTON2;
if (input) if (input)
input->MouseEvent(input, inputFlags, xPos, yPos); input->MouseEvent(input, inputFlags, xPos, yPos);
} }
break; break;
case WM_MOUSEMOVE: case WM_MOUSEMOVE:
{ {
if (!railWindow || !input) if (!railWindow || !input)
return 0; return 0;
xPos = GET_X_LPARAM(lParam) + railWindow->x; xPos = GET_X_LPARAM(lParam) + railWindow->x;
yPos = GET_Y_LPARAM(lParam) + railWindow->y; yPos = GET_Y_LPARAM(lParam) + railWindow->y;
inputFlags = PTR_FLAGS_MOVE; inputFlags = PTR_FLAGS_MOVE;
if (input) if (input)
input->MouseEvent(input, inputFlags, xPos, yPos); input->MouseEvent(input, inputFlags, xPos, yPos);
} }
break; break;
case WM_MOUSEWHEEL: case WM_MOUSEWHEEL:
break; break;
case WM_CLOSE: case WM_CLOSE:
DestroyWindow(hWnd); DestroyWindow(hWnd);
break; break;
case WM_DESTROY: case WM_DESTROY:
PostQuitMessage(0); PostQuitMessage(0);
break; break;
default: default:
return DefWindowProc(hWnd, msg, wParam, lParam); return DefWindowProc(hWnd, msg, wParam, lParam);
} }
return 0; return 0;
} }
#define RAIL_DISABLED_WINDOW_STYLES (WS_BORDER | WS_THICKFRAME | WS_DLGFRAME | WS_CAPTION | \ #define RAIL_DISABLED_WINDOW_STYLES (WS_BORDER | WS_THICKFRAME | WS_DLGFRAME | WS_CAPTION | \
WS_OVERLAPPED | WS_VSCROLL | WS_HSCROLL | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX) WS_OVERLAPPED | WS_VSCROLL | WS_HSCROLL | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX)
#define RAIL_DISABLED_EXTENDED_WINDOW_STYLES (WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE | WS_EX_STATICEDGE | WS_EX_WINDOWEDGE) #define RAIL_DISABLED_EXTENDED_WINDOW_STYLES (WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE | WS_EX_STATICEDGE | WS_EX_WINDOWEDGE)
static BOOL wf_rail_window_common(rdpContext* context, static BOOL wf_rail_window_common(rdpContext* context,
WINDOW_ORDER_INFO* orderInfo, WINDOW_STATE_ORDER* windowState) WINDOW_ORDER_INFO* orderInfo, WINDOW_STATE_ORDER* windowState)
{ {
wfRailWindow* railWindow = NULL; wfRailWindow* railWindow = NULL;
wfContext* wfc = (wfContext*) context; wfContext* wfc = (wfContext*) context;
@ -452,7 +452,7 @@ static BOOL wf_rail_window_common(rdpContext* context,
} }
} }
else if (ConvertFromUnicode(CP_UTF8, 0, (WCHAR*) windowState->titleInfo.string, else if (ConvertFromUnicode(CP_UTF8, 0, (WCHAR*) windowState->titleInfo.string,
windowState->titleInfo.length / 2, &title, 0, NULL, NULL) < 1) windowState->titleInfo.length / 2, &title, 0, NULL, NULL) < 1)
{ {
WLog_ERR(TAG, "failed to convert window title"); WLog_ERR(TAG, "failed to convert window title");
/* error handled below */ /* error handled below */
@ -489,22 +489,22 @@ static BOOL wf_rail_window_common(rdpContext* context,
wndClassEx.hIconSm = NULL; wndClassEx.hIconSm = NULL;
RegisterClassEx(&wndClassEx); RegisterClassEx(&wndClassEx);
railWindow->hWnd = CreateWindowExW( railWindow->hWnd = CreateWindowExW(
railWindow->dwExStyle, /* dwExStyle */ railWindow->dwExStyle, /* dwExStyle */
_T("RdpRailWindow"), /* lpClassName */ _T("RdpRailWindow"), /* lpClassName */
titleW, /* lpWindowName */ titleW, /* lpWindowName */
railWindow->dwStyle, /* dwStyle */ railWindow->dwStyle, /* dwStyle */
railWindow->x, /* x */ railWindow->x, /* x */
railWindow->y, /* y */ railWindow->y, /* y */
railWindow->width, /* nWidth */ railWindow->width, /* nWidth */
railWindow->height, /* nHeight */ railWindow->height, /* nHeight */
NULL, /* hWndParent */ NULL, /* hWndParent */
NULL, /* hMenu */ NULL, /* hMenu */
hInstance, /* hInstance */ hInstance, /* hInstance */
NULL /* lpParam */ NULL /* lpParam */
); );
SetWindowLongPtr(railWindow->hWnd, GWLP_USERDATA, (LONG_PTR) railWindow); SetWindowLongPtr(railWindow->hWnd, GWLP_USERDATA, (LONG_PTR) railWindow);
HashTable_Add(wfc->railWindows, (void*)(UINT_PTR) orderInfo->windowId, HashTable_Add(wfc->railWindows, (void*)(UINT_PTR) orderInfo->windowId,
(void*) railWindow); (void*) railWindow);
free(titleW); free(titleW);
UpdateWindow(railWindow->hWnd); UpdateWindow(railWindow->hWnd);
return TRUE; return TRUE;
@ -512,14 +512,14 @@ static BOOL wf_rail_window_common(rdpContext* context,
else else
{ {
railWindow = (wfRailWindow*) HashTable_GetItemValue(wfc->railWindows, railWindow = (wfRailWindow*) HashTable_GetItemValue(wfc->railWindows,
(void*)(UINT_PTR) orderInfo->windowId); (void*)(UINT_PTR) orderInfo->windowId);
} }
if (!railWindow) if (!railWindow)
return TRUE; return TRUE;
if ((fieldFlags & WINDOW_ORDER_FIELD_WND_OFFSET) || if ((fieldFlags & WINDOW_ORDER_FIELD_WND_OFFSET) ||
(fieldFlags & WINDOW_ORDER_FIELD_WND_SIZE)) (fieldFlags & WINDOW_ORDER_FIELD_WND_SIZE))
{ {
if (fieldFlags & WINDOW_ORDER_FIELD_WND_OFFSET) if (fieldFlags & WINDOW_ORDER_FIELD_WND_OFFSET)
{ {
@ -534,11 +534,11 @@ static BOOL wf_rail_window_common(rdpContext* context,
} }
SetWindowPos(railWindow->hWnd, NULL, SetWindowPos(railWindow->hWnd, NULL,
railWindow->x, railWindow->x,
railWindow->y, railWindow->y,
railWindow->width, railWindow->width,
railWindow->height, railWindow->height,
0); 0);
} }
if (fieldFlags & WINDOW_ORDER_FIELD_OWNER) if (fieldFlags & WINDOW_ORDER_FIELD_OWNER)
@ -574,7 +574,7 @@ static BOOL wf_rail_window_common(rdpContext* context,
} }
} }
else if (ConvertFromUnicode(CP_UTF8, 0, (WCHAR*) windowState->titleInfo.string, else if (ConvertFromUnicode(CP_UTF8, 0, (WCHAR*) windowState->titleInfo.string,
windowState->titleInfo.length / 2, &title, 0, NULL, NULL) < 1) windowState->titleInfo.length / 2, &title, 0, NULL, NULL) < 1)
{ {
WLog_ERR(TAG, "failed to convert window title"); WLog_ERR(TAG, "failed to convert window title");
return FALSE; return FALSE;
@ -645,14 +645,14 @@ static BOOL wf_rail_window_common(rdpContext* context,
} }
static BOOL wf_rail_window_delete(rdpContext* context, static BOOL wf_rail_window_delete(rdpContext* context,
WINDOW_ORDER_INFO* orderInfo) WINDOW_ORDER_INFO* orderInfo)
{ {
wfRailWindow* railWindow = NULL; wfRailWindow* railWindow = NULL;
wfContext* wfc = (wfContext*) context; wfContext* wfc = (wfContext*) context;
RailClientContext* rail = wfc->rail; RailClientContext* rail = wfc->rail;
WLog_DBG(TAG, "RailWindowDelete"); WLog_DBG(TAG, "RailWindowDelete");
railWindow = (wfRailWindow*) HashTable_GetItemValue(wfc->railWindows, railWindow = (wfRailWindow*) HashTable_GetItemValue(wfc->railWindows,
(void*)(UINT_PTR) orderInfo->windowId); (void*)(UINT_PTR) orderInfo->windowId);
if (!railWindow) if (!railWindow)
return TRUE; return TRUE;
@ -664,7 +664,7 @@ static BOOL wf_rail_window_delete(rdpContext* context,
} }
static BOOL wf_rail_window_icon(rdpContext* context, static BOOL wf_rail_window_icon(rdpContext* context,
WINDOW_ORDER_INFO* orderInfo, WINDOW_ICON_ORDER* windowIcon) WINDOW_ORDER_INFO* orderInfo, WINDOW_ICON_ORDER* windowIcon)
{ {
HDC hDC; HDC hDC;
int bpp; int bpp;
@ -681,7 +681,7 @@ static BOOL wf_rail_window_icon(rdpContext* context,
WLog_DBG(TAG, "RailWindowIcon"); WLog_DBG(TAG, "RailWindowIcon");
PrintRailIconInfo(orderInfo, windowIcon->iconInfo); PrintRailIconInfo(orderInfo, windowIcon->iconInfo);
railWindow = (wfRailWindow*) HashTable_GetItemValue(wfc->railWindows, railWindow = (wfRailWindow*) HashTable_GetItemValue(wfc->railWindows,
(void*)(UINT_PTR) orderInfo->windowId); (void*)(UINT_PTR) orderInfo->windowId);
if (!railWindow) if (!railWindow)
return TRUE; return TRUE;
@ -708,13 +708,13 @@ static BOOL wf_rail_window_icon(rdpContext* context,
bitmapInfoHeader->biClrUsed = 0; bitmapInfoHeader->biClrUsed = 0;
bitmapInfoHeader->biClrImportant = 0; bitmapInfoHeader->biClrImportant = 0;
iconInfo.hbmMask = CreateDIBitmap(hDC, iconInfo.hbmMask = CreateDIBitmap(hDC,
bitmapInfoHeader, CBM_INIT, bitmapInfoHeader, CBM_INIT,
windowIcon->iconInfo->bitsMask, windowIcon->iconInfo->bitsMask,
&bitmapInfo, DIB_RGB_COLORS); &bitmapInfo, DIB_RGB_COLORS);
iconInfo.hbmColor = CreateDIBitmap(hDC, iconInfo.hbmColor = CreateDIBitmap(hDC,
bitmapInfoHeader, CBM_INIT, bitmapInfoHeader, CBM_INIT,
windowIcon->iconInfo->bitsColor, windowIcon->iconInfo->bitsColor,
&bitmapInfo, DIB_RGB_COLORS); &bitmapInfo, DIB_RGB_COLORS);
hIcon = CreateIconIndirect(&iconInfo); hIcon = CreateIconIndirect(&iconInfo);
if (hIcon) if (hIcon)
@ -737,14 +737,14 @@ static BOOL wf_rail_window_icon(rdpContext* context,
} }
static BOOL wf_rail_window_cached_icon(rdpContext* context, static BOOL wf_rail_window_cached_icon(rdpContext* context,
WINDOW_ORDER_INFO* orderInfo, WINDOW_CACHED_ICON_ORDER* windowCachedIcon) WINDOW_ORDER_INFO* orderInfo, WINDOW_CACHED_ICON_ORDER* windowCachedIcon)
{ {
WLog_DBG(TAG, "RailWindowCachedIcon"); WLog_DBG(TAG, "RailWindowCachedIcon");
return TRUE; return TRUE;
} }
static void wf_rail_notify_icon_common(rdpContext* context, static void wf_rail_notify_icon_common(rdpContext* context,
WINDOW_ORDER_INFO* orderInfo, NOTIFY_ICON_STATE_ORDER* notifyIconState) WINDOW_ORDER_INFO* orderInfo, NOTIFY_ICON_STATE_ORDER* notifyIconState)
{ {
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_NOTIFY_VERSION) if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_NOTIFY_VERSION)
{ {
@ -774,7 +774,7 @@ static void wf_rail_notify_icon_common(rdpContext* context,
} }
static BOOL wf_rail_notify_icon_create(rdpContext* context, static BOOL wf_rail_notify_icon_create(rdpContext* context,
WINDOW_ORDER_INFO* orderInfo, NOTIFY_ICON_STATE_ORDER* notifyIconState) WINDOW_ORDER_INFO* orderInfo, NOTIFY_ICON_STATE_ORDER* notifyIconState)
{ {
wfContext* wfc = (wfContext*) context; wfContext* wfc = (wfContext*) context;
RailClientContext* rail = wfc->rail; RailClientContext* rail = wfc->rail;
@ -784,7 +784,7 @@ static BOOL wf_rail_notify_icon_create(rdpContext* context,
} }
static BOOL wf_rail_notify_icon_update(rdpContext* context, static BOOL wf_rail_notify_icon_update(rdpContext* context,
WINDOW_ORDER_INFO* orderInfo, NOTIFY_ICON_STATE_ORDER* notifyIconState) WINDOW_ORDER_INFO* orderInfo, NOTIFY_ICON_STATE_ORDER* notifyIconState)
{ {
wfContext* wfc = (wfContext*) context; wfContext* wfc = (wfContext*) context;
RailClientContext* rail = wfc->rail; RailClientContext* rail = wfc->rail;
@ -794,7 +794,7 @@ static BOOL wf_rail_notify_icon_update(rdpContext* context,
} }
static BOOL wf_rail_notify_icon_delete(rdpContext* context, static BOOL wf_rail_notify_icon_delete(rdpContext* context,
WINDOW_ORDER_INFO* orderInfo) WINDOW_ORDER_INFO* orderInfo)
{ {
wfContext* wfc = (wfContext*) context; wfContext* wfc = (wfContext*) context;
RailClientContext* rail = wfc->rail; RailClientContext* rail = wfc->rail;
@ -803,7 +803,7 @@ static BOOL wf_rail_notify_icon_delete(rdpContext* context,
} }
static BOOL wf_rail_monitored_desktop(rdpContext* context, static BOOL wf_rail_monitored_desktop(rdpContext* context,
WINDOW_ORDER_INFO* orderInfo, MONITORED_DESKTOP_ORDER* monitoredDesktop) WINDOW_ORDER_INFO* orderInfo, MONITORED_DESKTOP_ORDER* monitoredDesktop)
{ {
wfContext* wfc = (wfContext*) context; wfContext* wfc = (wfContext*) context;
RailClientContext* rail = wfc->rail; RailClientContext* rail = wfc->rail;
@ -812,7 +812,7 @@ static BOOL wf_rail_monitored_desktop(rdpContext* context,
} }
static BOOL wf_rail_non_monitored_desktop(rdpContext* context, static BOOL wf_rail_non_monitored_desktop(rdpContext* context,
WINDOW_ORDER_INFO* orderInfo) WINDOW_ORDER_INFO* orderInfo)
{ {
wfContext* wfc = (wfContext*) context; wfContext* wfc = (wfContext*) context;
RailClientContext* rail = wfc->rail; RailClientContext* rail = wfc->rail;
@ -843,7 +843,7 @@ void wf_rail_register_update_callbacks(rdpUpdate* update)
* @return 0 on success, otherwise a Win32 error code * @return 0 on success, otherwise a Win32 error code
*/ */
static UINT wf_rail_server_execute_result(RailClientContext* context, static UINT wf_rail_server_execute_result(RailClientContext* context,
RAIL_EXEC_RESULT_ORDER* execResult) RAIL_EXEC_RESULT_ORDER* execResult)
{ {
WLog_DBG(TAG, "RailServerExecuteResult: 0x%04X", execResult->rawResult); WLog_DBG(TAG, "RailServerExecuteResult: 0x%04X", execResult->rawResult);
return CHANNEL_RC_OK; return CHANNEL_RC_OK;
@ -855,7 +855,7 @@ static UINT wf_rail_server_execute_result(RailClientContext* context,
* @return 0 on success, otherwise a Win32 error code * @return 0 on success, otherwise a Win32 error code
*/ */
static UINT wf_rail_server_system_param(RailClientContext* context, static UINT wf_rail_server_system_param(RailClientContext* context,
RAIL_SYSPARAM_ORDER* sysparam) RAIL_SYSPARAM_ORDER* sysparam)
{ {
return CHANNEL_RC_OK; return CHANNEL_RC_OK;
} }
@ -866,7 +866,7 @@ static UINT wf_rail_server_system_param(RailClientContext* context,
* @return 0 on success, otherwise a Win32 error code * @return 0 on success, otherwise a Win32 error code
*/ */
static UINT wf_rail_server_handshake(RailClientContext* context, static UINT wf_rail_server_handshake(RailClientContext* context,
RAIL_HANDSHAKE_ORDER* handshake) RAIL_HANDSHAKE_ORDER* handshake)
{ {
RAIL_EXEC_ORDER exec; RAIL_EXEC_ORDER exec;
RAIL_SYSPARAM_ORDER sysparam; RAIL_SYSPARAM_ORDER sysparam;
@ -922,7 +922,7 @@ static UINT wf_rail_server_handshake(RailClientContext* context,
* @return 0 on success, otherwise a Win32 error code * @return 0 on success, otherwise a Win32 error code
*/ */
static UINT wf_rail_server_handshake_ex(RailClientContext* context, static UINT wf_rail_server_handshake_ex(RailClientContext* context,
RAIL_HANDSHAKE_EX_ORDER* handshakeEx) RAIL_HANDSHAKE_EX_ORDER* handshakeEx)
{ {
return CHANNEL_RC_OK; return CHANNEL_RC_OK;
} }
@ -933,7 +933,7 @@ static UINT wf_rail_server_handshake_ex(RailClientContext* context,
* @return 0 on success, otherwise a Win32 error code * @return 0 on success, otherwise a Win32 error code
*/ */
static UINT wf_rail_server_local_move_size(RailClientContext* context, static UINT wf_rail_server_local_move_size(RailClientContext* context,
RAIL_LOCALMOVESIZE_ORDER* localMoveSize) RAIL_LOCALMOVESIZE_ORDER* localMoveSize)
{ {
return CHANNEL_RC_OK; return CHANNEL_RC_OK;
} }
@ -944,7 +944,7 @@ static UINT wf_rail_server_local_move_size(RailClientContext* context,
* @return 0 on success, otherwise a Win32 error code * @return 0 on success, otherwise a Win32 error code
*/ */
static UINT wf_rail_server_min_max_info(RailClientContext* context, static UINT wf_rail_server_min_max_info(RailClientContext* context,
RAIL_MINMAXINFO_ORDER* minMaxInfo) RAIL_MINMAXINFO_ORDER* minMaxInfo)
{ {
return CHANNEL_RC_OK; return CHANNEL_RC_OK;
} }
@ -955,7 +955,7 @@ static UINT wf_rail_server_min_max_info(RailClientContext* context,
* @return 0 on success, otherwise a Win32 error code * @return 0 on success, otherwise a Win32 error code
*/ */
static UINT wf_rail_server_language_bar_info(RailClientContext* context, static UINT wf_rail_server_language_bar_info(RailClientContext* context,
RAIL_LANGBAR_INFO_ORDER* langBarInfo) RAIL_LANGBAR_INFO_ORDER* langBarInfo)
{ {
return CHANNEL_RC_OK; return CHANNEL_RC_OK;
} }
@ -966,7 +966,7 @@ static UINT wf_rail_server_language_bar_info(RailClientContext* context,
* @return 0 on success, otherwise a Win32 error code * @return 0 on success, otherwise a Win32 error code
*/ */
static UINT wf_rail_server_get_appid_response(RailClientContext* context, static UINT wf_rail_server_get_appid_response(RailClientContext* context,
RAIL_GET_APPID_RESP_ORDER* getAppIdResp) RAIL_GET_APPID_RESP_ORDER* getAppIdResp)
{ {
return CHANNEL_RC_OK; return CHANNEL_RC_OK;
} }
@ -987,7 +987,7 @@ void wf_rail_invalidate_region(wfContext* wfc, REGION16* invalidRegion)
for (index = 0; index < count; index++) for (index = 0; index < count; index++)
{ {
railWindow = (wfRailWindow*) HashTable_GetItemValue(wfc->railWindows, railWindow = (wfRailWindow*) HashTable_GetItemValue(wfc->railWindows,
(void*) pKeys[index]); (void*) pKeys[index]);
if (railWindow) if (railWindow)
{ {