FreeRDP
x11_shadow.c File Reference
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/select.h>
#include <sys/signal.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <winpr/crt.h>
#include <winpr/assert.h>
#include <winpr/path.h>
#include <winpr/synch.h>
#include <winpr/image.h>
#include <winpr/sysinfo.h>
#include <freerdp/log.h>
#include <freerdp/codec/color.h>
#include <freerdp/codec/region.h>
#include "x11_shadow.h"

Macros

#define TAG   SERVER_TAG("shadow.x11")
 

Functions

static UINT32 x11_shadow_enum_monitors (MONITOR_DEF *monitors, UINT32 maxMonitors)
 
static BOOL x11_shadow_input_synchronize_event (rdpShadowSubsystem *subsystem, rdpShadowClient *client, UINT32 flags)
 
static BOOL x11_shadow_input_keyboard_event (rdpShadowSubsystem *subsystem, rdpShadowClient *client, UINT16 flags, UINT8 code)
 
static BOOL x11_shadow_input_unicode_keyboard_event (rdpShadowSubsystem *subsystem, rdpShadowClient *client, UINT16 flags, UINT16 code)
 
static BOOL x11_shadow_input_mouse_event (rdpShadowSubsystem *subsystem, rdpShadowClient *client, UINT16 flags, UINT16 x, UINT16 y)
 
static BOOL x11_shadow_input_extended_mouse_event (rdpShadowSubsystem *subsystem, rdpShadowClient *client, UINT16 flags, UINT16 x, UINT16 y)
 
static void x11_shadow_message_free (UINT32 id, SHADOW_MSG_OUT *msg)
 
static int x11_shadow_pointer_position_update (x11ShadowSubsystem *subsystem)
 
static int x11_shadow_pointer_alpha_update (x11ShadowSubsystem *subsystem)
 
static int x11_shadow_query_cursor (x11ShadowSubsystem *subsystem, BOOL getImage)
 
static int x11_shadow_handle_xevent (x11ShadowSubsystem *subsystem, XEvent *xevent)
 
static void x11_shadow_validate_region (x11ShadowSubsystem *subsystem, int x, int y, int width, int height)
 
static int x11_shadow_blend_cursor (x11ShadowSubsystem *subsystem)
 
static BOOL x11_shadow_check_resize (x11ShadowSubsystem *subsystem)
 
static int x11_shadow_error_handler_for_capture (Display *display, XErrorEvent *event)
 
static int x11_shadow_screen_grab (x11ShadowSubsystem *subsystem)
 
static int x11_shadow_subsystem_process_message (x11ShadowSubsystem *subsystem, wMessage *message)
 
static DWORD WINAPI x11_shadow_subsystem_thread (LPVOID arg)
 
static int x11_shadow_subsystem_base_init (x11ShadowSubsystem *subsystem)
 
static int x11_shadow_xfixes_init (x11ShadowSubsystem *subsystem)
 
static int x11_shadow_xinerama_init (x11ShadowSubsystem *subsystem)
 
static int x11_shadow_xdamage_init (x11ShadowSubsystem *subsystem)
 
static int x11_shadow_xshm_init (x11ShadowSubsystem *subsystem)
 
static int x11_shadow_subsystem_init (rdpShadowSubsystem *sub)
 
static int x11_shadow_subsystem_uninit (rdpShadowSubsystem *sub)
 
static int x11_shadow_subsystem_start (rdpShadowSubsystem *sub)
 
static int x11_shadow_subsystem_stop (rdpShadowSubsystem *sub)
 
static rdpShadowSubsystem * x11_shadow_subsystem_new (void)
 
static void x11_shadow_subsystem_free (rdpShadowSubsystem *subsystem)
 

Variables

pEntryPoints New = x11_shadow_subsystem_new
 
pEntryPoints Free = x11_shadow_subsystem_free
 
pEntryPoints Init = x11_shadow_subsystem_init
 
pEntryPoints Uninit = x11_shadow_subsystem_uninit
 
pEntryPoints Start = x11_shadow_subsystem_start
 
pEntryPoints Stop = x11_shadow_subsystem_stop
 
pEntryPoints EnumMonitors = x11_shadow_enum_monitors
 
 return
 

Macro Definition Documentation

◆ TAG

#define TAG   SERVER_TAG("shadow.x11")

FreeRDP: A Remote Desktop Protocol Implementation

Copyright 2011-2014 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com Copyright 2017 Armin Novak armin.nosp@m..nov.nosp@m.ak@th.nosp@m.inca.nosp@m.st.co.nosp@m.m Copyright 2017 Thincast Technologies GmbH

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

◆ x11_shadow_blend_cursor()

static int x11_shadow_blend_cursor ( x11ShadowSubsystem *  subsystem)
static
Here is the call graph for this function:

◆ x11_shadow_check_resize()

static BOOL x11_shadow_check_resize ( x11ShadowSubsystem *  subsystem)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ x11_shadow_enum_monitors()

UINT32 x11_shadow_enum_monitors ( MONITOR_DEF monitors,
UINT32  maxMonitors 
)
static
Here is the caller graph for this function:

◆ x11_shadow_error_handler_for_capture()

static int x11_shadow_error_handler_for_capture ( Display *  display,
XErrorEvent *  event 
)
static
Here is the caller graph for this function:

◆ x11_shadow_handle_xevent()

static int x11_shadow_handle_xevent ( x11ShadowSubsystem *  subsystem,
XEvent *  xevent 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ x11_shadow_input_extended_mouse_event()

static BOOL x11_shadow_input_extended_mouse_event ( rdpShadowSubsystem *  subsystem,
rdpShadowClient *  client,
UINT16  flags,
UINT16  x,
UINT16  y 
)
static
Here is the caller graph for this function:

◆ x11_shadow_input_keyboard_event()

static BOOL x11_shadow_input_keyboard_event ( rdpShadowSubsystem *  subsystem,
rdpShadowClient *  client,
UINT16  flags,
UINT8  code 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ x11_shadow_input_mouse_event()

static BOOL x11_shadow_input_mouse_event ( rdpShadowSubsystem *  subsystem,
rdpShadowClient *  client,
UINT16  flags,
UINT16  x,
UINT16  y 
)
static
Here is the caller graph for this function:

◆ x11_shadow_input_synchronize_event()

static BOOL x11_shadow_input_synchronize_event ( rdpShadowSubsystem *  subsystem,
rdpShadowClient *  client,
UINT32  flags 
)
static
Here is the caller graph for this function:

◆ x11_shadow_input_unicode_keyboard_event()

static BOOL x11_shadow_input_unicode_keyboard_event ( rdpShadowSubsystem *  subsystem,
rdpShadowClient *  client,
UINT16  flags,
UINT16  code 
)
static
Here is the caller graph for this function:

◆ x11_shadow_message_free()

static void x11_shadow_message_free ( UINT32  id,
SHADOW_MSG_OUT *  msg 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ x11_shadow_pointer_alpha_update()

static int x11_shadow_pointer_alpha_update ( x11ShadowSubsystem *  subsystem)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ x11_shadow_pointer_position_update()

static int x11_shadow_pointer_position_update ( x11ShadowSubsystem *  subsystem)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ x11_shadow_query_cursor()

static int x11_shadow_query_cursor ( x11ShadowSubsystem *  subsystem,
BOOL  getImage 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ x11_shadow_screen_grab()

static int x11_shadow_screen_grab ( x11ShadowSubsystem *  subsystem)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ x11_shadow_subsystem_base_init()

static int x11_shadow_subsystem_base_init ( x11ShadowSubsystem *  subsystem)
static
Here is the caller graph for this function:

◆ x11_shadow_subsystem_free()

static void x11_shadow_subsystem_free ( rdpShadowSubsystem *  subsystem)
static
Here is the call graph for this function:

◆ x11_shadow_subsystem_init()

static int x11_shadow_subsystem_init ( rdpShadowSubsystem *  sub)
static
Here is the call graph for this function:

◆ x11_shadow_subsystem_new()

static rdpShadowSubsystem* x11_shadow_subsystem_new ( void  )
static
Here is the call graph for this function:

◆ x11_shadow_subsystem_process_message()

static int x11_shadow_subsystem_process_message ( x11ShadowSubsystem *  subsystem,
wMessage *  message 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ x11_shadow_subsystem_start()

static int x11_shadow_subsystem_start ( rdpShadowSubsystem *  sub)
static
Here is the call graph for this function:

◆ x11_shadow_subsystem_stop()

static int x11_shadow_subsystem_stop ( rdpShadowSubsystem *  sub)
static
Here is the call graph for this function:

◆ x11_shadow_subsystem_thread()

static DWORD WINAPI x11_shadow_subsystem_thread ( LPVOID  arg)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ x11_shadow_subsystem_uninit()

static int x11_shadow_subsystem_uninit ( rdpShadowSubsystem *  sub)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ x11_shadow_validate_region()

static void x11_shadow_validate_region ( x11ShadowSubsystem *  subsystem,
int  x,
int  y,
int  width,
int  height 
)
static

◆ x11_shadow_xdamage_init()

static int x11_shadow_xdamage_init ( x11ShadowSubsystem *  subsystem)
static
Here is the caller graph for this function:

◆ x11_shadow_xfixes_init()

static int x11_shadow_xfixes_init ( x11ShadowSubsystem *  subsystem)
static
Here is the caller graph for this function:

◆ x11_shadow_xinerama_init()

static int x11_shadow_xinerama_init ( x11ShadowSubsystem *  subsystem)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ x11_shadow_xshm_init()

static int x11_shadow_xshm_init ( x11ShadowSubsystem *  subsystem)
static
Here is the caller graph for this function:

Variable Documentation

◆ EnumMonitors

pEntryPoints EnumMonitors = x11_shadow_enum_monitors

◆ Free

pEntryPoints Free = x11_shadow_subsystem_free

◆ Init

pEntryPoints Init = x11_shadow_subsystem_init

◆ New

pEntryPoints New = x11_shadow_subsystem_new

◆ return

return

◆ Start

pEntryPoints Start = x11_shadow_subsystem_start

◆ Stop

pEntryPoints Stop = x11_shadow_subsystem_stop

◆ Uninit

pEntryPoints Uninit = x11_shadow_subsystem_uninit