2011-08-16 07:37:43 +04:00
|
|
|
/**
|
2012-10-09 07:02:04 +04:00
|
|
|
* FreeRDP: A Remote Desktop Protocol Implementation
|
2011-08-16 07:37:43 +04:00
|
|
|
* RAIL Windows
|
|
|
|
*
|
|
|
|
* Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2012-08-15 01:09:01 +04:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
|
|
|
|
2012-11-22 06:22:06 +04:00
|
|
|
#include <winpr/crt.h>
|
2012-12-17 19:20:25 +04:00
|
|
|
#include <winpr/print.h>
|
2012-05-05 03:36:35 +04:00
|
|
|
#include <winpr/windows.h>
|
2012-08-15 01:09:01 +04:00
|
|
|
|
2013-03-22 00:45:25 +04:00
|
|
|
#include <winpr/stream.h>
|
2011-08-16 07:37:43 +04:00
|
|
|
|
2011-09-02 21:29:17 +04:00
|
|
|
#include "librail.h"
|
|
|
|
|
2011-08-16 07:37:43 +04:00
|
|
|
#include <freerdp/rail/window.h>
|
|
|
|
|
2011-08-22 18:46:00 +04:00
|
|
|
struct _WINDOW_STYLE
|
|
|
|
{
|
2012-10-09 11:26:39 +04:00
|
|
|
UINT32 style;
|
2011-12-01 03:56:10 +04:00
|
|
|
const char* name;
|
2012-10-09 10:38:39 +04:00
|
|
|
BOOL multi;
|
2011-08-22 18:46:00 +04:00
|
|
|
};
|
|
|
|
typedef struct _WINDOW_STYLE WINDOW_STYLE;
|
|
|
|
|
2011-12-01 03:56:10 +04:00
|
|
|
static const WINDOW_STYLE WINDOW_STYLES[] =
|
2011-08-22 18:46:00 +04:00
|
|
|
{
|
2012-10-09 10:31:28 +04:00
|
|
|
{ WS_BORDER, "WS_BORDER", FALSE },
|
|
|
|
{ WS_CAPTION, "WS_CAPTION", FALSE },
|
|
|
|
{ WS_CHILD, "WS_CHILD", FALSE },
|
|
|
|
{ WS_CLIPCHILDREN, "WS_CLIPCHILDREN", FALSE },
|
|
|
|
{ WS_CLIPSIBLINGS, "WS_CLIPSIBLINGS", FALSE },
|
|
|
|
{ WS_DISABLED, "WS_DISABLED", FALSE },
|
|
|
|
{ WS_DLGFRAME, "WS_DLGFRAME", FALSE },
|
|
|
|
{ WS_GROUP, "WS_GROUP", FALSE },
|
|
|
|
{ WS_HSCROLL, "WS_HSCROLL", FALSE },
|
|
|
|
{ WS_ICONIC, "WS_ICONIC", FALSE },
|
|
|
|
{ WS_MAXIMIZE, "WS_MAXIMIZE", FALSE },
|
|
|
|
{ WS_MAXIMIZEBOX, "WS_MAXIMIZEBOX", FALSE },
|
|
|
|
{ WS_MINIMIZE, "WS_MINIMIZE", FALSE },
|
|
|
|
{ WS_MINIMIZEBOX, "WS_MINIMIZEBOX", FALSE },
|
|
|
|
{ WS_OVERLAPPED, "WS_OVERLAPPED", FALSE },
|
|
|
|
{ WS_OVERLAPPEDWINDOW, "WS_OVERLAPPEDWINDOW", TRUE },
|
|
|
|
{ WS_POPUP, "WS_POPUP", FALSE },
|
|
|
|
{ WS_POPUPWINDOW, "WS_POPUPWINDOW", TRUE },
|
|
|
|
{ WS_SIZEBOX, "WS_SIZEBOX", FALSE },
|
|
|
|
{ WS_SYSMENU, "WS_SYSMENU", FALSE },
|
|
|
|
{ WS_TABSTOP, "WS_TABSTOP", FALSE },
|
|
|
|
{ WS_THICKFRAME, "WS_THICKFRAME", FALSE },
|
|
|
|
{ WS_VISIBLE, "WS_VISIBLE", FALSE }
|
2011-08-22 18:46:00 +04:00
|
|
|
};
|
|
|
|
|
2011-12-01 03:56:10 +04:00
|
|
|
static const WINDOW_STYLE EXTENDED_WINDOW_STYLES[] =
|
2011-08-22 18:46:00 +04:00
|
|
|
{
|
2012-10-09 10:31:28 +04:00
|
|
|
{ WS_EX_ACCEPTFILES, "WS_EX_ACCEPTFILES", FALSE },
|
|
|
|
{ WS_EX_APPWINDOW, "WS_EX_APPWINDOW", FALSE },
|
|
|
|
{ WS_EX_CLIENTEDGE, "WS_EX_CLIENTEDGE", FALSE },
|
|
|
|
{ WS_EX_COMPOSITED, "WS_EX_COMPOSITED", FALSE },
|
|
|
|
{ WS_EX_CONTEXTHELP, "WS_EX_CONTEXTHELP", FALSE },
|
|
|
|
{ WS_EX_CONTROLPARENT, "WS_EX_CONTROLPARENT", FALSE },
|
|
|
|
{ WS_EX_DLGMODALFRAME, "WS_EX_DLGMODALFRAME", FALSE },
|
|
|
|
{ WS_EX_LAYERED, "WS_EX_LAYERED", FALSE },
|
|
|
|
{ WS_EX_LAYOUTRTL, "WS_EX_LAYOUTRTL", FALSE },
|
|
|
|
{ WS_EX_LEFT, "WS_EX_LEFT", FALSE },
|
|
|
|
{ WS_EX_LEFTSCROLLBAR, "WS_EX_LEFTSCROLLBAR", FALSE },
|
|
|
|
{ WS_EX_LTRREADING, "WS_EX_LTRREADING", FALSE },
|
|
|
|
{ WS_EX_MDICHILD, "WS_EX_MDICHILD", FALSE },
|
|
|
|
{ WS_EX_NOACTIVATE, "WS_EX_NOACTIVATE", FALSE },
|
|
|
|
{ WS_EX_NOINHERITLAYOUT, "WS_EX_NOINHERITLAYOUT", FALSE },
|
|
|
|
{ WS_EX_NOPARENTNOTIFY, "WS_EX_NOPARENTNOTIFY", FALSE },
|
|
|
|
{ WS_EX_OVERLAPPEDWINDOW, "WS_EX_OVERLAPPEDWINDOW", TRUE },
|
|
|
|
{ WS_EX_PALETTEWINDOW, "WS_EX_PALETTEWINDOW", TRUE },
|
|
|
|
{ WS_EX_RIGHT, "WS_EX_RIGHT", FALSE },
|
|
|
|
{ WS_EX_RIGHTSCROLLBAR, "WS_EX_RIGHTSCROLLBAR", FALSE },
|
|
|
|
{ WS_EX_RTLREADING, "WS_EX_RTLREADING", FALSE },
|
|
|
|
{ WS_EX_STATICEDGE, "WS_EX_STATICEDGE", FALSE },
|
|
|
|
{ WS_EX_TOOLWINDOW, "WS_EX_TOOLWINDOW", FALSE },
|
|
|
|
{ WS_EX_TOPMOST, "WS_EX_TOPMOST", FALSE },
|
|
|
|
{ WS_EX_TRANSPARENT, "WS_EX_TRANSPARENT", FALSE },
|
|
|
|
{ WS_EX_WINDOWEDGE, "WS_EX_WINDOWEDGE", FALSE }
|
2011-08-22 18:46:00 +04:00
|
|
|
};
|
|
|
|
|
2012-10-09 11:26:39 +04:00
|
|
|
void print_window_styles(UINT32 style)
|
2011-08-22 18:46:00 +04:00
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
2013-03-29 02:06:34 +04:00
|
|
|
fprintf(stderr, "Window Styles:\n{\n");
|
2012-11-22 05:50:28 +04:00
|
|
|
for (i = 0; i < ARRAYSIZE(WINDOW_STYLES); i++)
|
2011-08-22 18:46:00 +04:00
|
|
|
{
|
|
|
|
if (style & WINDOW_STYLES[i].style)
|
2011-08-22 19:09:24 +04:00
|
|
|
{
|
|
|
|
if (WINDOW_STYLES[i].multi)
|
|
|
|
{
|
|
|
|
if ((style & WINDOW_STYLES[i].style) != WINDOW_STYLES[i].style)
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2013-03-29 02:06:34 +04:00
|
|
|
fprintf(stderr, "\t%s\n", WINDOW_STYLES[i].name);
|
2011-08-22 19:09:24 +04:00
|
|
|
}
|
2011-08-22 18:46:00 +04:00
|
|
|
}
|
2013-03-29 02:06:34 +04:00
|
|
|
fprintf(stderr, "}\n");
|
2011-08-22 18:46:00 +04:00
|
|
|
}
|
|
|
|
|
2012-10-09 11:26:39 +04:00
|
|
|
void print_extended_window_styles(UINT32 style)
|
2011-08-22 18:46:00 +04:00
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
2013-03-29 02:06:34 +04:00
|
|
|
fprintf(stderr, "Extended Window Styles:\n{\n");
|
2012-11-22 05:50:28 +04:00
|
|
|
for (i = 0; i < ARRAYSIZE(EXTENDED_WINDOW_STYLES); i++)
|
2011-08-22 18:46:00 +04:00
|
|
|
{
|
|
|
|
if (style & EXTENDED_WINDOW_STYLES[i].style)
|
2011-08-22 19:09:24 +04:00
|
|
|
{
|
|
|
|
if (EXTENDED_WINDOW_STYLES[i].multi)
|
|
|
|
{
|
|
|
|
if ((style & EXTENDED_WINDOW_STYLES[i].style) != EXTENDED_WINDOW_STYLES[i].style)
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2013-03-29 02:06:34 +04:00
|
|
|
fprintf(stderr, "\t%s\n", EXTENDED_WINDOW_STYLES[i].name);
|
2011-08-22 19:09:24 +04:00
|
|
|
}
|
2011-08-22 18:46:00 +04:00
|
|
|
}
|
2013-03-29 02:06:34 +04:00
|
|
|
fprintf(stderr, "}\n");
|
2011-08-22 18:46:00 +04:00
|
|
|
}
|
|
|
|
|
2011-08-16 08:22:00 +04:00
|
|
|
void window_state_update(rdpWindow* window, WINDOW_ORDER_INFO* orderInfo, WINDOW_STATE_ORDER* window_state)
|
|
|
|
{
|
2011-08-18 06:50:49 +04:00
|
|
|
window->fieldFlags = orderInfo->fieldFlags;
|
|
|
|
|
2011-08-16 08:22:00 +04:00
|
|
|
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_OWNER)
|
|
|
|
{
|
|
|
|
window->ownerWindowId = window_state->ownerWindowId;
|
2011-09-02 21:29:17 +04:00
|
|
|
DEBUG_RAIL("ownerWindowId:0x%08X", window->ownerWindowId);
|
2011-08-16 08:22:00 +04:00
|
|
|
}
|
|
|
|
|
2011-09-03 20:50:26 +04:00
|
|
|
DEBUG_RAIL("windowId=0x%X ownerWindowId=0x%X",
|
2011-09-01 02:04:18 +04:00
|
|
|
window->windowId, window->ownerWindowId);
|
|
|
|
|
2011-08-16 08:22:00 +04:00
|
|
|
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_STYLE)
|
|
|
|
{
|
|
|
|
window->style = window_state->style;
|
|
|
|
window->extendedStyle = window_state->extendedStyle;
|
2011-08-22 18:46:00 +04:00
|
|
|
|
2011-09-02 21:29:17 +04:00
|
|
|
#ifdef WITH_DEBUG_RAIL
|
2011-08-22 18:46:00 +04:00
|
|
|
print_window_styles(window->style);
|
|
|
|
print_extended_window_styles(window->extendedStyle);
|
2011-09-02 21:29:17 +04:00
|
|
|
#endif
|
2011-08-16 08:22:00 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_SHOW)
|
|
|
|
{
|
|
|
|
window->showState = window_state->showState;
|
2011-09-02 21:29:17 +04:00
|
|
|
DEBUG_RAIL("ShowState:%d", window->showState);
|
2011-08-16 08:22:00 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_TITLE)
|
|
|
|
{
|
2011-08-18 06:31:27 +04:00
|
|
|
window->titleInfo.length = window_state->titleInfo.length;
|
2012-10-09 07:21:26 +04:00
|
|
|
window->titleInfo.string = malloc(window_state->titleInfo.length);
|
2011-08-18 06:31:27 +04:00
|
|
|
memcpy(window->titleInfo.string, window_state->titleInfo.string, window->titleInfo.length);
|
2011-09-02 21:29:17 +04:00
|
|
|
|
|
|
|
#ifdef WITH_DEBUG_RAIL
|
2012-12-14 08:54:54 +04:00
|
|
|
winpr_HexDump(window->titleInfo.string, window->titleInfo.length);
|
2011-09-02 21:29:17 +04:00
|
|
|
#endif
|
2011-08-16 08:22:00 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_CLIENT_AREA_OFFSET)
|
|
|
|
{
|
|
|
|
window->clientOffsetX = window_state->clientOffsetX;
|
|
|
|
window->clientOffsetY = window_state->clientOffsetY;
|
2011-08-17 22:13:44 +04:00
|
|
|
|
2011-09-02 21:29:17 +04:00
|
|
|
DEBUG_RAIL("Client Area Offset: (%d, %d)",
|
2011-08-17 22:13:44 +04:00
|
|
|
window->clientOffsetX, window->clientOffsetY);
|
2011-08-16 08:22:00 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_CLIENT_AREA_SIZE)
|
|
|
|
{
|
|
|
|
window->clientAreaWidth = window_state->clientAreaWidth;
|
|
|
|
window->clientAreaHeight = window_state->clientAreaHeight;
|
2011-08-17 22:13:44 +04:00
|
|
|
|
2011-09-02 21:29:17 +04:00
|
|
|
DEBUG_RAIL("Client Area Size: (%d, %d)",
|
2011-08-17 22:13:44 +04:00
|
|
|
window->clientAreaWidth, window->clientAreaHeight);
|
2011-08-16 08:22:00 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_RP_CONTENT)
|
|
|
|
{
|
|
|
|
window->RPContent = window_state->RPContent;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_ROOT_PARENT)
|
|
|
|
{
|
|
|
|
window->rootParentHandle = window_state->rootParentHandle;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_WND_OFFSET)
|
|
|
|
{
|
|
|
|
window->windowOffsetX = window_state->windowOffsetX;
|
|
|
|
window->windowOffsetY = window_state->windowOffsetY;
|
2011-08-17 22:13:44 +04:00
|
|
|
|
2011-09-02 21:29:17 +04:00
|
|
|
DEBUG_RAIL("Window Offset: (%d, %d)",
|
2011-08-17 22:13:44 +04:00
|
|
|
window->windowOffsetX, window->windowOffsetY);
|
2011-08-16 08:22:00 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_WND_CLIENT_DELTA)
|
|
|
|
{
|
|
|
|
window->windowClientDeltaX = window_state->windowClientDeltaX;
|
|
|
|
window->windowClientDeltaY = window_state->windowClientDeltaY;
|
2011-08-17 22:13:44 +04:00
|
|
|
|
2011-09-02 21:29:17 +04:00
|
|
|
DEBUG_RAIL("Window Client Delta: (%d, %d)",
|
2011-08-17 22:13:44 +04:00
|
|
|
window->windowClientDeltaX, window->windowClientDeltaY);
|
2011-08-16 08:22:00 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_WND_SIZE)
|
|
|
|
{
|
|
|
|
window->windowWidth = window_state->windowWidth;
|
|
|
|
window->windowHeight = window_state->windowHeight;
|
2011-08-17 22:13:44 +04:00
|
|
|
|
2011-09-02 21:29:17 +04:00
|
|
|
DEBUG_RAIL("Window Size: (%d, %d)",
|
2011-08-17 22:13:44 +04:00
|
|
|
window->windowWidth, window->windowHeight);
|
2011-08-16 08:22:00 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_WND_RECTS)
|
|
|
|
{
|
2011-08-22 01:32:18 +04:00
|
|
|
int i;
|
2011-08-16 08:22:00 +04:00
|
|
|
|
2011-08-23 00:06:12 +04:00
|
|
|
if (window->windowRects != NULL)
|
2012-10-09 07:21:26 +04:00
|
|
|
free(window->windowRects);
|
2011-08-23 00:06:12 +04:00
|
|
|
|
|
|
|
window->windowRects = window_state->windowRects;
|
|
|
|
window->numWindowRects = window_state->numWindowRects;
|
|
|
|
|
2011-12-04 02:24:18 +04:00
|
|
|
for (i = 0; i < (int) window_state->numWindowRects; i++)
|
2011-08-22 01:32:18 +04:00
|
|
|
{
|
2011-09-02 21:29:17 +04:00
|
|
|
DEBUG_RAIL("Window Rect #%d: left:%d top:%d right:%d bottom:%d", i,
|
2011-08-22 22:51:10 +04:00
|
|
|
window_state->windowRects[i].left, window_state->windowRects[i].top,
|
|
|
|
window_state->windowRects[i].right, window_state->windowRects[i].bottom);
|
2011-08-22 01:32:18 +04:00
|
|
|
}
|
2011-08-16 08:22:00 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_VIS_OFFSET)
|
|
|
|
{
|
|
|
|
window->visibleOffsetX = window_state->visibleOffsetX;
|
|
|
|
window->visibleOffsetY = window_state->visibleOffsetY;
|
2011-08-17 22:13:44 +04:00
|
|
|
|
2011-09-02 21:29:17 +04:00
|
|
|
DEBUG_RAIL("Window Visible Offset: (%d, %d)",
|
2011-08-17 22:13:44 +04:00
|
|
|
window->visibleOffsetX, window->visibleOffsetY);
|
2011-08-16 08:22:00 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_VISIBILITY)
|
|
|
|
{
|
2011-08-22 01:32:18 +04:00
|
|
|
int i;
|
2011-08-16 08:22:00 +04:00
|
|
|
|
2011-08-23 00:06:12 +04:00
|
|
|
if (window->visibilityRects != NULL)
|
2012-10-09 07:21:26 +04:00
|
|
|
free(window->visibilityRects);
|
2011-08-23 00:06:12 +04:00
|
|
|
|
|
|
|
window->visibilityRects = window_state->visibilityRects;
|
|
|
|
window->numVisibilityRects = window_state->numVisibilityRects;
|
|
|
|
|
2011-12-04 02:24:18 +04:00
|
|
|
for (i = 0; i < (int) window_state->numVisibilityRects; i++)
|
2011-08-22 01:32:18 +04:00
|
|
|
{
|
2011-09-02 21:29:17 +04:00
|
|
|
DEBUG_RAIL("Visibility Rect #%d: left:%d top:%d right:%d bottom:%d", i,
|
2011-08-22 22:51:10 +04:00
|
|
|
window_state->visibilityRects[i].left, window_state->visibilityRects[i].top,
|
|
|
|
window_state->visibilityRects[i].right, window_state->visibilityRects[i].bottom);
|
2011-08-22 01:32:18 +04:00
|
|
|
}
|
2011-08-16 08:22:00 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-08-17 10:14:02 +04:00
|
|
|
void rail_CreateWindow(rdpRail* rail, rdpWindow* window)
|
2011-08-16 07:37:43 +04:00
|
|
|
{
|
2011-08-18 06:31:27 +04:00
|
|
|
if (window->titleInfo.length > 0)
|
|
|
|
{
|
2012-12-17 08:34:07 +04:00
|
|
|
ConvertFromUnicode(CP_UTF8, 0, (WCHAR*) window->titleInfo.string, window->titleInfo.length / 2,
|
|
|
|
&window->title, 0, NULL, NULL);
|
2011-08-18 06:31:27 +04:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2012-10-09 07:21:26 +04:00
|
|
|
window->title = (char*) malloc(sizeof("RAIL"));
|
2011-08-18 06:31:27 +04:00
|
|
|
memcpy(window->title, "RAIL", sizeof("RAIL"));
|
|
|
|
}
|
|
|
|
|
2011-08-31 12:35:50 +04:00
|
|
|
IFCALL(rail->rail_CreateWindow, rail, window);
|
2011-08-23 00:06:12 +04:00
|
|
|
|
2011-08-25 22:11:45 +04:00
|
|
|
if (window->fieldFlags & WINDOW_ORDER_FIELD_WND_RECTS)
|
2011-08-23 00:06:12 +04:00
|
|
|
{
|
2011-08-31 12:35:50 +04:00
|
|
|
IFCALL(rail->rail_SetWindowRects, rail, window);
|
2011-08-23 00:06:12 +04:00
|
|
|
}
|
2011-08-30 22:21:16 +04:00
|
|
|
if (window->fieldFlags & WINDOW_ORDER_FIELD_VISIBILITY)
|
|
|
|
{
|
2011-08-31 12:35:50 +04:00
|
|
|
IFCALL(rail->rail_SetWindowVisibilityRects, rail, window);
|
2011-08-30 22:21:16 +04:00
|
|
|
}
|
2011-08-16 07:37:43 +04:00
|
|
|
}
|
|
|
|
|
2011-08-18 06:50:49 +04:00
|
|
|
void rail_UpdateWindow(rdpRail* rail, rdpWindow* window)
|
2011-08-16 07:37:43 +04:00
|
|
|
{
|
2011-08-18 06:50:49 +04:00
|
|
|
if (window->fieldFlags & WINDOW_ORDER_FIELD_OWNER)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (window->fieldFlags & WINDOW_ORDER_FIELD_STYLE)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (window->fieldFlags & WINDOW_ORDER_FIELD_SHOW)
|
|
|
|
{
|
2011-08-31 12:35:50 +04:00
|
|
|
IFCALL(rail->rail_ShowWindow, rail, window, window->showState);
|
2011-08-18 06:50:49 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
if (window->fieldFlags & WINDOW_ORDER_FIELD_TITLE)
|
|
|
|
{
|
2011-08-20 06:21:09 +04:00
|
|
|
if (window->title != NULL)
|
2013-01-16 04:14:03 +04:00
|
|
|
{
|
2012-10-09 07:21:26 +04:00
|
|
|
free(window->title);
|
2013-01-16 04:14:03 +04:00
|
|
|
window->title = NULL;
|
|
|
|
}
|
2011-08-20 06:21:09 +04:00
|
|
|
|
2012-12-17 08:34:07 +04:00
|
|
|
ConvertFromUnicode(CP_UTF8, 0, (WCHAR*) window->titleInfo.string, window->titleInfo.length / 2,
|
|
|
|
&window->title, 0, NULL, NULL);
|
2011-08-20 06:21:09 +04:00
|
|
|
|
2011-08-31 12:35:50 +04:00
|
|
|
IFCALL(rail->rail_SetWindowText, rail, window);
|
2011-08-18 06:50:49 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
if (window->fieldFlags & WINDOW_ORDER_FIELD_CLIENT_AREA_OFFSET)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
2011-08-18 06:31:27 +04:00
|
|
|
|
2011-08-18 06:50:49 +04:00
|
|
|
if (window->fieldFlags & WINDOW_ORDER_FIELD_CLIENT_AREA_SIZE)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (window->fieldFlags & WINDOW_ORDER_FIELD_RP_CONTENT)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (window->fieldFlags & WINDOW_ORDER_FIELD_ROOT_PARENT)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if ((window->fieldFlags & WINDOW_ORDER_FIELD_WND_OFFSET) ||
|
|
|
|
(window->fieldFlags & WINDOW_ORDER_FIELD_WND_SIZE))
|
|
|
|
{
|
2011-08-31 12:35:50 +04:00
|
|
|
IFCALL(rail->rail_MoveWindow, rail, window);
|
2011-08-18 06:50:49 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
if (window->fieldFlags & WINDOW_ORDER_FIELD_WND_CLIENT_DELTA)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (window->fieldFlags & WINDOW_ORDER_FIELD_WND_RECTS)
|
|
|
|
{
|
2011-08-31 12:35:50 +04:00
|
|
|
IFCALL(rail->rail_SetWindowRects, rail, window);
|
2011-08-18 06:50:49 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
if (window->fieldFlags & WINDOW_ORDER_FIELD_VIS_OFFSET)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (window->fieldFlags & WINDOW_ORDER_FIELD_VISIBILITY)
|
|
|
|
{
|
2011-08-31 12:35:50 +04:00
|
|
|
IFCALL(rail->rail_SetWindowVisibilityRects, rail, window);
|
2011-08-18 06:50:49 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void rail_DestroyWindow(rdpRail* rail, rdpWindow* window)
|
|
|
|
{
|
2011-08-31 12:35:50 +04:00
|
|
|
IFCALL(rail->rail_DestroyWindow, rail, window);
|
2011-08-18 06:31:27 +04:00
|
|
|
|
2011-08-16 07:37:43 +04:00
|
|
|
if (window != NULL)
|
|
|
|
{
|
2012-10-09 07:21:26 +04:00
|
|
|
free(window);
|
2011-08-16 07:37:43 +04:00
|
|
|
}
|
|
|
|
}
|