21#include <winpr/synch.h>
22#include <winpr/sysinfo.h>
24#include <freerdp/log.h>
25#include <freerdp/codec/color.h>
26#include <freerdp/codec/region.h>
27#include <freerdp/server/server-common.h>
29#include "sample_shadow.h"
31#define TAG SERVER_TAG("shadow.sample")
34static BOOL sample_shadow_input_synchronize_event(WINPR_ATTR_UNUSED rdpShadowSubsystem* subsystem,
35 WINPR_ATTR_UNUSED rdpShadowClient* client,
36 WINPR_ATTR_UNUSED UINT32 flags)
38 WLog_WARN(TAG,
"TODO: Implement!");
43static BOOL sample_shadow_input_keyboard_event(WINPR_ATTR_UNUSED rdpShadowSubsystem* subsystem,
44 WINPR_ATTR_UNUSED rdpShadowClient* client,
45 WINPR_ATTR_UNUSED UINT16 flags,
46 WINPR_ATTR_UNUSED UINT8 code)
48 WLog_WARN(TAG,
"TODO: Implement!");
53static BOOL sample_shadow_input_unicode_keyboard_event(
54 WINPR_ATTR_UNUSED rdpShadowSubsystem* subsystem, WINPR_ATTR_UNUSED rdpShadowClient* client,
55 WINPR_ATTR_UNUSED UINT16 flags, WINPR_ATTR_UNUSED UINT16 code)
57 WLog_WARN(TAG,
"TODO: Implement!");
62static BOOL sample_shadow_input_mouse_event(WINPR_ATTR_UNUSED rdpShadowSubsystem* subsystem,
63 WINPR_ATTR_UNUSED rdpShadowClient* client,
64 WINPR_ATTR_UNUSED UINT16 flags,
65 WINPR_ATTR_UNUSED UINT16 x, WINPR_ATTR_UNUSED UINT16 y)
67 WLog_WARN(TAG,
"TODO: Implement!");
72static BOOL sample_shadow_input_extended_mouse_event(
73 WINPR_ATTR_UNUSED rdpShadowSubsystem* subsystem, WINPR_ATTR_UNUSED rdpShadowClient* client,
74 WINPR_ATTR_UNUSED UINT16 flags, WINPR_ATTR_UNUSED UINT16 x, WINPR_ATTR_UNUSED UINT16 y)
76 WLog_WARN(TAG,
"TODO: Implement!");
81static UINT32 sample_shadow_enum_monitors(WINPR_ATTR_UNUSED
MONITOR_DEF* monitors,
82 WINPR_ATTR_UNUSED UINT32 maxMonitors)
84 WLog_WARN(TAG,
"TODO: Implement!");
89static int sample_shadow_subsystem_init(rdpShadowSubsystem* arg)
91 sampleShadowSubsystem* subsystem = (sampleShadowSubsystem*)arg;
92 WINPR_ASSERT(subsystem);
94 subsystem->base.numMonitors = sample_shadow_enum_monitors(subsystem->base.monitors, 16);
96 WLog_WARN(TAG,
"TODO: Implement!");
98 MONITOR_DEF* virtualScreen = &(subsystem->base.virtualScreen);
99 virtualScreen->left = 0;
100 virtualScreen->top = 0;
101 virtualScreen->right = 0;
102 virtualScreen->bottom = 0;
103 virtualScreen->flags = 1;
108static int sample_shadow_subsystem_uninit(rdpShadowSubsystem* arg)
110 sampleShadowSubsystem* subsystem = (sampleShadowSubsystem*)arg;
115 WLog_WARN(TAG,
"TODO: Implement!");
120static int sample_shadow_subsystem_start(rdpShadowSubsystem* arg)
122 sampleShadowSubsystem* subsystem = (sampleShadowSubsystem*)arg;
127 WLog_WARN(TAG,
"TODO: Implement!");
133static int sample_shadow_subsystem_stop(rdpShadowSubsystem* arg)
135 sampleShadowSubsystem* subsystem = (sampleShadowSubsystem*)arg;
140 WLog_WARN(TAG,
"TODO: Implement!");
145static void sample_shadow_subsystem_free(rdpShadowSubsystem* arg)
147 sampleShadowSubsystem* subsystem = (sampleShadowSubsystem*)arg;
152 sample_shadow_subsystem_uninit(arg);
156WINPR_ATTR_MALLOC(sample_shadow_subsystem_free, 1)
158static rdpShadowSubsystem* sample_shadow_subsystem_new(
void)
160 sampleShadowSubsystem* subsystem =
161 (sampleShadowSubsystem*)calloc(1,
sizeof(sampleShadowSubsystem));
166 subsystem->base.SynchronizeEvent = sample_shadow_input_synchronize_event;
167 subsystem->base.KeyboardEvent = sample_shadow_input_keyboard_event;
168 subsystem->base.UnicodeKeyboardEvent = sample_shadow_input_unicode_keyboard_event;
169 subsystem->base.MouseEvent = sample_shadow_input_mouse_event;
170 subsystem->base.ExtendedMouseEvent = sample_shadow_input_extended_mouse_event;
171 return &subsystem->base;
174const char* ShadowSubsystemName(
void)
179int ShadowSubsystemEntry(RDP_SHADOW_ENTRY_POINTS* pEntryPoints)
181 pEntryPoints->New = sample_shadow_subsystem_new;
182 pEntryPoints->Free = sample_shadow_subsystem_free;
183 pEntryPoints->Init = sample_shadow_subsystem_init;
184 pEntryPoints->Uninit = sample_shadow_subsystem_uninit;
185 pEntryPoints->Start = sample_shadow_subsystem_start;
186 pEntryPoints->Stop = sample_shadow_subsystem_stop;
187 pEntryPoints->EnumMonitors = sample_shadow_enum_monitors;