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")
33static BOOL sample_shadow_input_synchronize_event(WINPR_ATTR_UNUSED rdpShadowSubsystem* subsystem,
34 WINPR_ATTR_UNUSED rdpShadowClient* client,
35 WINPR_ATTR_UNUSED UINT32 flags)
37 WLog_WARN(TAG,
"TODO: Implement!");
41static BOOL sample_shadow_input_keyboard_event(WINPR_ATTR_UNUSED rdpShadowSubsystem* subsystem,
42 WINPR_ATTR_UNUSED rdpShadowClient* client,
43 WINPR_ATTR_UNUSED UINT16 flags,
44 WINPR_ATTR_UNUSED UINT8 code)
46 WLog_WARN(TAG,
"TODO: Implement!");
50static BOOL sample_shadow_input_unicode_keyboard_event(
51 WINPR_ATTR_UNUSED rdpShadowSubsystem* subsystem, WINPR_ATTR_UNUSED rdpShadowClient* client,
52 WINPR_ATTR_UNUSED UINT16 flags, WINPR_ATTR_UNUSED UINT16 code)
54 WLog_WARN(TAG,
"TODO: Implement!");
58static BOOL sample_shadow_input_mouse_event(WINPR_ATTR_UNUSED rdpShadowSubsystem* subsystem,
59 WINPR_ATTR_UNUSED rdpShadowClient* client,
60 WINPR_ATTR_UNUSED UINT16 flags,
61 WINPR_ATTR_UNUSED UINT16 x, WINPR_ATTR_UNUSED UINT16 y)
63 WLog_WARN(TAG,
"TODO: Implement!");
67static BOOL sample_shadow_input_extended_mouse_event(
68 WINPR_ATTR_UNUSED rdpShadowSubsystem* subsystem, WINPR_ATTR_UNUSED rdpShadowClient* client,
69 WINPR_ATTR_UNUSED UINT16 flags, WINPR_ATTR_UNUSED UINT16 x, WINPR_ATTR_UNUSED UINT16 y)
71 WLog_WARN(TAG,
"TODO: Implement!");
75static UINT32 sample_shadow_enum_monitors(WINPR_ATTR_UNUSED
MONITOR_DEF* monitors,
76 WINPR_ATTR_UNUSED UINT32 maxMonitors)
78 WLog_WARN(TAG,
"TODO: Implement!");
82static int sample_shadow_subsystem_init(rdpShadowSubsystem* arg)
84 sampleShadowSubsystem* subsystem = (sampleShadowSubsystem*)arg;
85 WINPR_ASSERT(subsystem);
87 subsystem->base.numMonitors = sample_shadow_enum_monitors(subsystem->base.monitors, 16);
89 WLog_WARN(TAG,
"TODO: Implement!");
91 MONITOR_DEF* virtualScreen = &(subsystem->base.virtualScreen);
92 virtualScreen->left = 0;
93 virtualScreen->top = 0;
94 virtualScreen->right = 0;
95 virtualScreen->bottom = 0;
96 virtualScreen->flags = 1;
100static int sample_shadow_subsystem_uninit(rdpShadowSubsystem* arg)
102 sampleShadowSubsystem* subsystem = (sampleShadowSubsystem*)arg;
107 WLog_WARN(TAG,
"TODO: Implement!");
111static int sample_shadow_subsystem_start(rdpShadowSubsystem* arg)
113 sampleShadowSubsystem* subsystem = (sampleShadowSubsystem*)arg;
118 WLog_WARN(TAG,
"TODO: Implement!");
123static int sample_shadow_subsystem_stop(rdpShadowSubsystem* arg)
125 sampleShadowSubsystem* subsystem = (sampleShadowSubsystem*)arg;
130 WLog_WARN(TAG,
"TODO: Implement!");
135static void sample_shadow_subsystem_free(rdpShadowSubsystem* arg)
137 sampleShadowSubsystem* subsystem = (sampleShadowSubsystem*)arg;
142 sample_shadow_subsystem_uninit(arg);
146static rdpShadowSubsystem* sample_shadow_subsystem_new(
void)
148 sampleShadowSubsystem* subsystem =
149 (sampleShadowSubsystem*)calloc(1,
sizeof(sampleShadowSubsystem));
154 subsystem->base.SynchronizeEvent = sample_shadow_input_synchronize_event;
155 subsystem->base.KeyboardEvent = sample_shadow_input_keyboard_event;
156 subsystem->base.UnicodeKeyboardEvent = sample_shadow_input_unicode_keyboard_event;
157 subsystem->base.MouseEvent = sample_shadow_input_mouse_event;
158 subsystem->base.ExtendedMouseEvent = sample_shadow_input_extended_mouse_event;
159 return &subsystem->base;
162const char* ShadowSubsystemName(
void)
167int ShadowSubsystemEntry(RDP_SHADOW_ENTRY_POINTS* pEntryPoints)
169 pEntryPoints->New = sample_shadow_subsystem_new;
170 pEntryPoints->Free = sample_shadow_subsystem_free;
171 pEntryPoints->Init = sample_shadow_subsystem_init;
172 pEntryPoints->Uninit = sample_shadow_subsystem_uninit;
173 pEntryPoints->Start = sample_shadow_subsystem_start;
174 pEntryPoints->Stop = sample_shadow_subsystem_stop;
175 pEntryPoints->EnumMonitors = sample_shadow_enum_monitors;