FreeRDP
xf_rail.c File Reference
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <X11/Xutil.h>
#include <winpr/wlog.h>
#include <winpr/print.h>
#include "xf_window.h"
#include "xf_rail.h"

Macros

#define TAG   CLIENT_TAG("x11")
 

Functions

void xf_rail_enable_remoteapp_mode (xfContext *xfc)
 
void xf_rail_disable_remoteapp_mode (xfContext *xfc)
 
void xf_rail_send_activate (xfContext *xfc, Window xwindow, BOOL enabled)
 
void xf_rail_send_client_system_command (xfContext *xfc, UINT32 windowId, UINT16 command)
 
void xf_rail_adjust_position (xfContext *xfc, xfAppWindow *appWindow)
 
void xf_rail_end_local_move (xfContext *xfc, xfAppWindow *appWindow)
 
static void xf_rail_invalidate_region (xfContext *xfc, REGION16 *invalidRegion)
 
void xf_rail_paint (xfContext *xfc, INT32 uleft, INT32 utop, UINT32 uright, UINT32 ubottom)
 
static BOOL xf_rail_window_common (rdpContext *context, WINDOW_ORDER_INFO *orderInfo, WINDOW_STATE_ORDER *windowState)
 
static BOOL xf_rail_window_delete (rdpContext *context, WINDOW_ORDER_INFO *orderInfo)
 
static xfRailIconCache * RailIconCache_New (rdpSettings *settings)
 
static void RailIconCache_Free (xfRailIconCache *cache)
 
static xfRailIcon * RailIconCache_Lookup (xfRailIconCache *cache, UINT8 cacheId, UINT16 cacheEntry)
 
static void fill_gdi_palette_for_icon (ICON_INFO *iconInfo, gdiPalette *palette)
 
static BOOL convert_icon_color_to_argb (ICON_INFO *iconInfo, BYTE *argbPixels)
 
static UINT32 div_ceil (UINT32 a, UINT32 b)
 
static UINT32 round_up (UINT32 a, UINT32 b)
 
static void apply_icon_alpha_mask (ICON_INFO *iconInfo, BYTE *argbPixels)
 
static BOOL convert_rail_icon (ICON_INFO *iconInfo, xfRailIcon *railIcon)
 
static void xf_rail_set_window_icon (xfContext *xfc, xfAppWindow *railWindow, xfRailIcon *icon, BOOL replace)
 
static xfAppWindow * xf_rail_get_window_by_id (xfContext *xfc, UINT32 windowId)
 
static BOOL xf_rail_window_icon (rdpContext *context, WINDOW_ORDER_INFO *orderInfo, WINDOW_ICON_ORDER *windowIcon)
 
static BOOL xf_rail_window_cached_icon (rdpContext *context, WINDOW_ORDER_INFO *orderInfo, WINDOW_CACHED_ICON_ORDER *windowCachedIcon)
 
static BOOL xf_rail_notify_icon_common (rdpContext *context, WINDOW_ORDER_INFO *orderInfo, NOTIFY_ICON_STATE_ORDER *notifyIconState)
 
static BOOL xf_rail_notify_icon_create (rdpContext *context, WINDOW_ORDER_INFO *orderInfo, NOTIFY_ICON_STATE_ORDER *notifyIconState)
 
static BOOL xf_rail_notify_icon_update (rdpContext *context, WINDOW_ORDER_INFO *orderInfo, NOTIFY_ICON_STATE_ORDER *notifyIconState)
 
static BOOL xf_rail_notify_icon_delete (rdpContext *context, WINDOW_ORDER_INFO *orderInfo)
 
static BOOL xf_rail_monitored_desktop (rdpContext *context, WINDOW_ORDER_INFO *orderInfo, MONITORED_DESKTOP_ORDER *monitoredDesktop)
 
static BOOL xf_rail_non_monitored_desktop (rdpContext *context, WINDOW_ORDER_INFO *orderInfo)
 
static void xf_rail_register_update_callbacks (rdpUpdate *update)
 
static UINT xf_rail_server_execute_result (RailClientContext *context, const RAIL_EXEC_RESULT_ORDER *execResult)
 
static UINT xf_rail_server_system_param (RailClientContext *context, const RAIL_SYSPARAM_ORDER *sysparam)
 
static UINT xf_rail_server_handshake (RailClientContext *context, const RAIL_HANDSHAKE_ORDER *handshake)
 
static UINT xf_rail_server_handshake_ex (RailClientContext *context, const RAIL_HANDSHAKE_EX_ORDER *handshakeEx)
 
static UINT xf_rail_server_local_move_size (RailClientContext *context, const RAIL_LOCALMOVESIZE_ORDER *localMoveSize)
 
static UINT xf_rail_server_min_max_info (RailClientContext *context, const RAIL_MINMAXINFO_ORDER *minMaxInfo)
 
static UINT xf_rail_server_language_bar_info (RailClientContext *context, const RAIL_LANGBAR_INFO_ORDER *langBarInfo)
 
static UINT xf_rail_server_get_appid_response (RailClientContext *context, const RAIL_GET_APPID_RESP_ORDER *getAppIdResp)
 
static BOOL rail_window_key_equals (void *key1, void *key2)
 
static UINT32 rail_window_key_hash (void *key)
 
static void rail_window_free (void *value)
 
int xf_rail_init (xfContext *xfc, RailClientContext *rail)
 
int xf_rail_uninit (xfContext *xfc, RailClientContext *rail)
 

Variables

static const char * error_code_names []
 

Macro Definition Documentation

#define TAG   CLIENT_TAG("x11")

FreeRDP: A Remote Desktop Protocol Implementation X11 RAIL

Copyright 2011 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.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.

Function Documentation

static void apply_icon_alpha_mask ( ICON_INFO *  iconInfo,
BYTE argbPixels 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL convert_icon_color_to_argb ( ICON_INFO *  iconInfo,
BYTE argbPixels 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL convert_rail_icon ( ICON_INFO *  iconInfo,
xfRailIcon *  railIcon 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT32 div_ceil ( UINT32  a,
UINT32  b 
)
inlinestatic

Here is the caller graph for this function:

static void fill_gdi_palette_for_icon ( ICON_INFO *  iconInfo,
gdiPalette *  palette 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void rail_window_free ( void value)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL rail_window_key_equals ( void key1,
void key2 
)
static

Here is the caller graph for this function:

static UINT32 rail_window_key_hash ( void key)
static

Here is the caller graph for this function:

static void RailIconCache_Free ( xfRailIconCache *  cache)
static

Here is the caller graph for this function:

static xfRailIcon* RailIconCache_Lookup ( xfRailIconCache *  cache,
UINT8  cacheId,
UINT16  cacheEntry 
)
static

Here is the caller graph for this function:

static xfRailIconCache* RailIconCache_New ( rdpSettings *  settings)
static

Here is the caller graph for this function:

static UINT32 round_up ( UINT32  a,
UINT32  b 
)
inlinestatic

Here is the call graph for this function:

Here is the caller graph for this function:

void xf_rail_adjust_position ( xfContext *  xfc,
xfAppWindow *  appWindow 
)

The position of the X window can become out of sync with the RDP window if the X window is moved locally by the window manager. In this event send an update to the RDP server informing it of the new window position and size.

Here is the caller graph for this function:

void xf_rail_disable_remoteapp_mode ( xfContext *  xfc)

Here is the call graph for this function:

Here is the caller graph for this function:

void xf_rail_enable_remoteapp_mode ( xfContext *  xfc)

Here is the call graph for this function:

Here is the caller graph for this function:

void xf_rail_end_local_move ( xfContext *  xfc,
xfAppWindow *  appWindow 
)

Here is the caller graph for this function:

static xfAppWindow* xf_rail_get_window_by_id ( xfContext *  xfc,
UINT32  windowId 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

int xf_rail_init ( xfContext *  xfc,
RailClientContext *  rail 
)

Here is the call graph for this function:

Here is the caller graph for this function:

static void xf_rail_invalidate_region ( xfContext *  xfc,
REGION16 *  invalidRegion 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL xf_rail_monitored_desktop ( rdpContext *  context,
WINDOW_ORDER_INFO *  orderInfo,
MONITORED_DESKTOP_ORDER *  monitoredDesktop 
)
static

Here is the caller graph for this function:

static BOOL xf_rail_non_monitored_desktop ( rdpContext *  context,
WINDOW_ORDER_INFO *  orderInfo 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL xf_rail_notify_icon_common ( rdpContext *  context,
WINDOW_ORDER_INFO *  orderInfo,
NOTIFY_ICON_STATE_ORDER *  notifyIconState 
)
static

Here is the caller graph for this function:

static BOOL xf_rail_notify_icon_create ( rdpContext *  context,
WINDOW_ORDER_INFO *  orderInfo,
NOTIFY_ICON_STATE_ORDER *  notifyIconState 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL xf_rail_notify_icon_delete ( rdpContext *  context,
WINDOW_ORDER_INFO *  orderInfo 
)
static

Here is the caller graph for this function:

static BOOL xf_rail_notify_icon_update ( rdpContext *  context,
WINDOW_ORDER_INFO *  orderInfo,
NOTIFY_ICON_STATE_ORDER *  notifyIconState 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

void xf_rail_paint ( xfContext *  xfc,
INT32  uleft,
INT32  utop,
UINT32  uright,
UINT32  ubottom 
)

FreeRDP: A Remote Desktop Protocol Implementation X11 RAIL

Copyright 2011 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.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.

Here is the call graph for this function:

Here is the caller graph for this function:

static void xf_rail_register_update_callbacks ( rdpUpdate *  update)
static

Here is the call graph for this function:

Here is the caller graph for this function:

void xf_rail_send_activate ( xfContext *  xfc,
Window  xwindow,
BOOL  enabled 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void xf_rail_send_client_system_command ( xfContext *  xfc,
UINT32  windowId,
UINT16  command 
)

Here is the caller graph for this function:

static UINT xf_rail_server_execute_result ( RailClientContext *  context,
const RAIL_EXEC_RESULT_ORDER *  execResult 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT xf_rail_server_get_appid_response ( RailClientContext *  context,
const RAIL_GET_APPID_RESP_ORDER *  getAppIdResp 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the caller graph for this function:

static UINT xf_rail_server_handshake ( RailClientContext *  context,
const RAIL_HANDSHAKE_ORDER *  handshake 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the caller graph for this function:

static UINT xf_rail_server_handshake_ex ( RailClientContext *  context,
const RAIL_HANDSHAKE_EX_ORDER *  handshakeEx 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the caller graph for this function:

static UINT xf_rail_server_language_bar_info ( RailClientContext *  context,
const RAIL_LANGBAR_INFO_ORDER *  langBarInfo 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the caller graph for this function:

static UINT xf_rail_server_local_move_size ( RailClientContext *  context,
const RAIL_LOCALMOVESIZE_ORDER *  localMoveSize 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT xf_rail_server_min_max_info ( RailClientContext *  context,
const RAIL_MINMAXINFO_ORDER *  minMaxInfo 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT xf_rail_server_system_param ( RailClientContext *  context,
const RAIL_SYSPARAM_ORDER *  sysparam 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the caller graph for this function:

static void xf_rail_set_window_icon ( xfContext *  xfc,
xfAppWindow *  railWindow,
xfRailIcon *  icon,
BOOL  replace 
)
static

Here is the caller graph for this function:

int xf_rail_uninit ( xfContext *  xfc,
RailClientContext *  rail 
)

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL xf_rail_window_cached_icon ( rdpContext *  context,
WINDOW_ORDER_INFO *  orderInfo,
WINDOW_CACHED_ICON_ORDER *  windowCachedIcon 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL xf_rail_window_common ( rdpContext *  context,
WINDOW_ORDER_INFO *  orderInfo,
WINDOW_STATE_ORDER *  windowState 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL xf_rail_window_delete ( rdpContext *  context,
WINDOW_ORDER_INFO *  orderInfo 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL xf_rail_window_icon ( rdpContext *  context,
WINDOW_ORDER_INFO *  orderInfo,
WINDOW_ICON_ORDER *  windowIcon 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

const char* error_code_names[]
static
Initial value:
=
{
"RAIL_EXEC_S_OK",
"RAIL_EXEC_E_HOOK_NOT_LOADED",
"RAIL_EXEC_E_DECODE_FAILED",
"RAIL_EXEC_E_NOT_IN_ALLOWLIST",
"RAIL_EXEC_E_FILE_NOT_FOUND",
"RAIL_EXEC_E_FAIL",
"RAIL_EXEC_E_SESSION_LOCKED"
}