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, const WINDOW_ORDER_INFO *orderInfo, const WINDOW_STATE_ORDER *windowState)
 
static BOOL xf_rail_window_delete (rdpContext *context, const 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 BOOL convert_rail_icon (const ICON_INFO *iconInfo, xfRailIcon *railIcon)
 
static void xf_rail_set_window_icon (xfContext *xfc, xfAppWindow *railWindow, xfRailIcon *icon, BOOL replace)
 
static BOOL xf_rail_window_icon (rdpContext *context, const WINDOW_ORDER_INFO *orderInfo, const WINDOW_ICON_ORDER *windowIcon)
 
static BOOL xf_rail_window_cached_icon (rdpContext *context, const WINDOW_ORDER_INFO *orderInfo, const WINDOW_CACHED_ICON_ORDER *windowCachedIcon)
 
static BOOL xf_rail_notify_icon_common (rdpContext *context, const WINDOW_ORDER_INFO *orderInfo, const NOTIFY_ICON_STATE_ORDER *notifyIconState)
 
static BOOL xf_rail_notify_icon_create (rdpContext *context, const WINDOW_ORDER_INFO *orderInfo, const NOTIFY_ICON_STATE_ORDER *notifyIconState)
 
static BOOL xf_rail_notify_icon_update (rdpContext *context, const WINDOW_ORDER_INFO *orderInfo, const NOTIFY_ICON_STATE_ORDER *notifyIconState)
 
static BOOL xf_rail_notify_icon_delete (rdpContext *context, const WINDOW_ORDER_INFO *orderInfo)
 
static BOOL xf_rail_monitored_desktop (rdpContext *context, const WINDOW_ORDER_INFO *orderInfo, const MONITORED_DESKTOP_ORDER *monitoredDesktop)
 
static BOOL xf_rail_non_monitored_desktop (rdpContext *context, const 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_start_cmd (RailClientContext *context)
 
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)
 
xfAppWindow * xf_rail_add_window (xfContext *xfc, UINT64 id, UINT32 x, UINT32 y, UINT32 width, UINT32 height, UINT32 surfaceId)
 
BOOL xf_rail_del_window (xfContext *xfc, UINT64 id)
 
xfAppWindow * xf_rail_get_window (xfContext *xfc, UINT64 id)
 

Variables

static const char * error_code_names []
 

Macro Definition Documentation

◆ TAG

#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

◆ convert_rail_icon()

static BOOL convert_rail_icon ( const ICON_INFO *  iconInfo,
xfRailIcon *  railIcon 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rail_window_free()

static void rail_window_free ( void *  value)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rail_window_key_equals()

static BOOL rail_window_key_equals ( void *  key1,
void *  key2 
)
static
Here is the caller graph for this function:

◆ rail_window_key_hash()

static UINT32 rail_window_key_hash ( void *  key)
static
Here is the caller graph for this function:

◆ RailIconCache_Free()

static void RailIconCache_Free ( xfRailIconCache *  cache)
static
Here is the caller graph for this function:

◆ RailIconCache_Lookup()

static xfRailIcon* RailIconCache_Lookup ( xfRailIconCache *  cache,
UINT8  cacheId,
UINT16  cacheEntry 
)
static
Here is the caller graph for this function:

◆ RailIconCache_New()

static xfRailIconCache* RailIconCache_New ( rdpSettings *  settings)
static
Here is the caller graph for this function:

◆ xf_rail_add_window()

xfAppWindow* xf_rail_add_window ( xfContext *  xfc,
UINT64  id,
UINT32  x,
UINT32  y,
UINT32  width,
UINT32  height,
UINT32  surfaceId 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_rail_adjust_position()

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:

◆ xf_rail_del_window()

BOOL xf_rail_del_window ( xfContext *  xfc,
UINT64  id 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_rail_disable_remoteapp_mode()

void xf_rail_disable_remoteapp_mode ( xfContext *  xfc)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_rail_enable_remoteapp_mode()

void xf_rail_enable_remoteapp_mode ( xfContext *  xfc)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_rail_end_local_move()

void xf_rail_end_local_move ( xfContext *  xfc,
xfAppWindow *  appWindow 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_rail_get_window()

xfAppWindow* xf_rail_get_window ( xfContext *  xfc,
UINT64  id 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_rail_init()

int xf_rail_init ( xfContext *  xfc,
RailClientContext *  rail 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_rail_invalidate_region()

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:

◆ xf_rail_monitored_desktop()

static BOOL xf_rail_monitored_desktop ( rdpContext *  context,
const WINDOW_ORDER_INFO *  orderInfo,
const MONITORED_DESKTOP_ORDER *  monitoredDesktop 
)
static
Here is the caller graph for this function:

◆ xf_rail_non_monitored_desktop()

static BOOL xf_rail_non_monitored_desktop ( rdpContext *  context,
const WINDOW_ORDER_INFO *  orderInfo 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_rail_notify_icon_common()

static BOOL xf_rail_notify_icon_common ( rdpContext *  context,
const WINDOW_ORDER_INFO *  orderInfo,
const NOTIFY_ICON_STATE_ORDER *  notifyIconState 
)
static
Here is the caller graph for this function:

◆ xf_rail_notify_icon_create()

static BOOL xf_rail_notify_icon_create ( rdpContext *  context,
const WINDOW_ORDER_INFO *  orderInfo,
const NOTIFY_ICON_STATE_ORDER *  notifyIconState 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_rail_notify_icon_delete()

static BOOL xf_rail_notify_icon_delete ( rdpContext *  context,
const WINDOW_ORDER_INFO *  orderInfo 
)
static
Here is the caller graph for this function:

◆ xf_rail_notify_icon_update()

static BOOL xf_rail_notify_icon_update ( rdpContext *  context,
const WINDOW_ORDER_INFO *  orderInfo,
const NOTIFY_ICON_STATE_ORDER *  notifyIconState 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_rail_paint()

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:

◆ xf_rail_register_update_callbacks()

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:

◆ xf_rail_send_activate()

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:

◆ xf_rail_send_client_system_command()

void xf_rail_send_client_system_command ( xfContext *  xfc,
UINT32  windowId,
UINT16  command 
)
Here is the caller graph for this function:

◆ xf_rail_server_execute_result()

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:

◆ xf_rail_server_get_appid_response()

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:

◆ xf_rail_server_handshake()

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 call graph for this function:
Here is the caller graph for this function:

◆ xf_rail_server_handshake_ex()

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 call graph for this function:
Here is the caller graph for this function:

◆ xf_rail_server_language_bar_info()

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:

◆ xf_rail_server_local_move_size()

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:

◆ xf_rail_server_min_max_info()

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:

◆ xf_rail_server_start_cmd()

static UINT xf_rail_server_start_cmd ( RailClientContext *  context)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_rail_server_system_param()

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:

◆ xf_rail_set_window_icon()

static void xf_rail_set_window_icon ( xfContext *  xfc,
xfAppWindow *  railWindow,
xfRailIcon *  icon,
BOOL  replace 
)
static
Here is the caller graph for this function:

◆ xf_rail_uninit()

int xf_rail_uninit ( xfContext *  xfc,
RailClientContext *  rail 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_rail_window_cached_icon()

static BOOL xf_rail_window_cached_icon ( rdpContext *  context,
const WINDOW_ORDER_INFO *  orderInfo,
const WINDOW_CACHED_ICON_ORDER *  windowCachedIcon 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_rail_window_common()

static BOOL xf_rail_window_common ( rdpContext *  context,
const WINDOW_ORDER_INFO *  orderInfo,
const WINDOW_STATE_ORDER *  windowState 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_rail_window_delete()

static BOOL xf_rail_window_delete ( rdpContext *  context,
const WINDOW_ORDER_INFO *  orderInfo 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_rail_window_icon()

static BOOL xf_rail_window_icon ( rdpContext *  context,
const WINDOW_ORDER_INFO *  orderInfo,
const WINDOW_ICON_ORDER *  windowIcon 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ error_code_names

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" }