FreeRDP/include/freerdp/rail/rail.h

70 lines
2.4 KiB
C
Raw Normal View History

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
* Remote Applications Integrated Locally (RAIL)
*
* 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-12-14 09:25:48 +04:00
#ifndef FREERDP_RAIL_H
#define FREERDP_RAIL_H
2011-08-16 07:37:43 +04:00
#include <freerdp/api.h>
2011-08-16 07:37:43 +04:00
#include <freerdp/rail.h>
#include <freerdp/types.h>
#include <freerdp/update.h>
#include <freerdp/freerdp.h>
#include <freerdp/codec/color.h>
2011-08-16 07:37:43 +04:00
#include <winpr/stream.h>
#include <freerdp/rail/icon.h>
2011-08-16 07:37:43 +04:00
#include <freerdp/rail/window.h>
#include <freerdp/rail/window_list.h>
typedef void (*railCreateWindow)(rdpRail* rail, rdpWindow* window);
2011-08-18 06:31:27 +04:00
typedef void (*railDestroyWindow)(rdpRail* rail, rdpWindow* window);
typedef void (*railMoveWindow)(rdpRail* rail, rdpWindow* window);
typedef void (*railShowWindow)(rdpRail* rail, rdpWindow* window, BYTE state);
typedef void (*railSetWindowText)(rdpRail* rail, rdpWindow* window);
typedef void (*railSetWindowIcon)(rdpRail* rail, rdpWindow* window, rdpIcon* icon);
2011-08-25 22:11:45 +04:00
typedef void (*railSetWindowRects)(rdpRail* rail, rdpWindow* window);
typedef void (*railSetWindowVisibilityRects)(rdpRail* rail, rdpWindow* window);
Multiple RAIL fixes/improvements 1. Linked Window Manager Maximize/Minimize and Restore operations to those from the Server Rail Window so that they are in sync 2. Enable things like "CTRL-ALT-DELETE" and "WindowsKey-L" to show the full desktop window again since the desktop is not actively monitored since this was still trying to draw to the rail window without updating the size of the window to accomodate the full workspace area. 3. Changed local window coordinates to be based on the visibileOffsetX/Y- while moving server window based on WindowOffsetX/Y. I have seen various issues regarding this when trying to use a maximized window where this is a disconnect between local window coordinates and remote window coordinates. This change clears these things up. 4. Commented the XShapeCombineRectangles calls - this can cause issues where the entire window is not visible and it does not currently play well with the changes from #3. The gain here is greater than the loss. 5. Draw the initial workspace correctly when running across multiple monitors. The correct size was always used, but the window was only starting on the current monitor and thus could draw the window off of the viewable area. Known Issues: Although the changes for #2 worked well in the stable branch that I developed from - the desktop window shown once the rail windows are destroyed does not respond to input unless I minimize/restore the window. Once the window starts responding to input - you can hit cancel to close the desktop window and return to your rail windows again(or launch task manager, etc.). This is still a big step in the right direction as xfreerdp is now correctly acting when the rail server stops Actively Monitoring the desktop. XShapeCombineRectangles needs to be revisited, most windows applications will give you a rectangular window anyways.
2012-08-04 02:35:17 +04:00
typedef void (*railDesktopNonMonitored) (rdpRail* rail, rdpWindow* window);
2011-08-16 07:37:43 +04:00
struct rdp_rail
{
void* extra;
2011-08-22 06:30:49 +04:00
CLRCONV* clrconv;
rdpIconCache* cache;
2011-08-16 07:37:43 +04:00
rdpWindowList* list;
rdpSettings* settings;
railCreateWindow rail_CreateWindow;
railDestroyWindow rail_DestroyWindow;
railMoveWindow rail_MoveWindow;
railShowWindow rail_ShowWindow;
railSetWindowText rail_SetWindowText;
railSetWindowIcon rail_SetWindowIcon;
railSetWindowRects rail_SetWindowRects;
railSetWindowVisibilityRects rail_SetWindowVisibilityRects;
Multiple RAIL fixes/improvements 1. Linked Window Manager Maximize/Minimize and Restore operations to those from the Server Rail Window so that they are in sync 2. Enable things like "CTRL-ALT-DELETE" and "WindowsKey-L" to show the full desktop window again since the desktop is not actively monitored since this was still trying to draw to the rail window without updating the size of the window to accomodate the full workspace area. 3. Changed local window coordinates to be based on the visibileOffsetX/Y- while moving server window based on WindowOffsetX/Y. I have seen various issues regarding this when trying to use a maximized window where this is a disconnect between local window coordinates and remote window coordinates. This change clears these things up. 4. Commented the XShapeCombineRectangles calls - this can cause issues where the entire window is not visible and it does not currently play well with the changes from #3. The gain here is greater than the loss. 5. Draw the initial workspace correctly when running across multiple monitors. The correct size was always used, but the window was only starting on the current monitor and thus could draw the window off of the viewable area. Known Issues: Although the changes for #2 worked well in the stable branch that I developed from - the desktop window shown once the rail windows are destroyed does not respond to input unless I minimize/restore the window. Once the window starts responding to input - you can hit cancel to close the desktop window and return to your rail windows again(or launch task manager, etc.). This is still a big step in the right direction as xfreerdp is now correctly acting when the rail server stops Actively Monitoring the desktop. XShapeCombineRectangles needs to be revisited, most windows applications will give you a rectangular window anyways.
2012-08-04 02:35:17 +04:00
railDesktopNonMonitored rail_DesktopNonMonitored;
2011-08-16 07:37:43 +04:00
};
FREERDP_API void rail_register_update_callbacks(rdpRail* rail, rdpUpdate* update);
FREERDP_API rdpRail* rail_new(rdpSettings* settings);
FREERDP_API void rail_free(rdpRail* rail);
2011-08-16 07:37:43 +04:00
2012-12-14 09:25:48 +04:00
#endif /* FREERDP_RAIL_H */