Skip to content

Commit 6882b1f

Browse files
committed
mfreerdp-server: initial commit
1 parent 51cd809 commit 6882b1f

File tree

22 files changed

+760
-50
lines changed

22 files changed

+760
-50
lines changed

channels/cliprdr/client/cliprdr_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ static void cliprdr_process_terminate(rdpSvcPlugin* plugin)
274274
/* cliprdr is always built-in */
275275
#define VirtualChannelEntry cliprdr_VirtualChannelEntry
276276

277-
const int VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
277+
int VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
278278
{
279279
cliprdrPlugin* _p;
280280

channels/disk/client/disk_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ void disk_register_disk_path(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints, char* na
697697
#define DeviceServiceEntry disk_DeviceServiceEntry
698698
#endif
699699

700-
const int DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints)
700+
int DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints)
701701
{
702702
char* name;
703703
char* path;

channels/drdynvc/client/drdynvc_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ static void drdynvc_process_terminate(rdpSvcPlugin* plugin)
368368
/* drdynvc is always built-in */
369369
#define VirtualChannelEntry drdynvc_VirtualChannelEntry
370370

371-
const int VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
371+
int VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
372372
{
373373
drdynvcPlugin* _p;
374374

channels/rail/client/rail_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ static void rail_process_event(rdpSvcPlugin* plugin, RDP_EVENT* event)
255255
/* rail is always built-in */
256256
#define VirtualChannelEntry rail_VirtualChannelEntry
257257

258-
const int VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
258+
int VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
259259
{
260260
railPlugin* _p;
261261

channels/rdpdr/client/rdpdr_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ static void rdpdr_process_terminate(rdpSvcPlugin* plugin)
319319
/* rdpdr is always built-in */
320320
#define VirtualChannelEntry rdpdr_VirtualChannelEntry
321321

322-
const int VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
322+
int VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
323323
{
324324
rdpdrPlugin* _p;
325325

channels/rdpsnd/client/rdpsnd_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ static void rdpsnd_process_terminate(rdpSvcPlugin* plugin)
583583
/* rdpsnd is always built-in */
584584
#define VirtualChannelEntry rdpsnd_VirtualChannelEntry
585585

586-
const int VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
586+
int VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
587587
{
588588
rdpsndPlugin* _p;
589589

channels/sample/client/sample_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ static void sample_process_terminate(rdpSvcPlugin* plugin)
136136

137137
#define VirtualChannelEntry sample_VirtualChannelEntry
138138

139-
const int VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
139+
int VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
140140
{
141141
samplePlugin* _p;
142142

channels/tsmf/client/tsmf_media.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ TSMF_PRESENTATION* tsmf_presentation_new(const BYTE* guid, IWTSVirtualChannelCal
259259

260260
if (fout)
261261
{
262-
fprintf(fout, "%d\n", (int) thid);
262+
fprintf(fout, "%d\n", (int) (size_t) thid);
263263
fclose(fout);
264264
}
265265

client/Mac/MRDPRailView.h

Lines changed: 34 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -7,54 +7,52 @@
77

88
@interface MRDPRailView : NSView
99
{
10-
freerdp * rdp_instance;
11-
rdpContext * context;
12-
NSBitmapImageRep * bmiRep;
13-
NSPoint savedDragLocation;
14-
char * pixelData;
15-
BOOL mouseInClientArea;
16-
BOOL titleBarClicked;
17-
BOOL gestureEventInProgress;
18-
int width;
19-
int height;
20-
int savedWindowId;
21-
int scrollWheelCount;
10+
freerdp* rdp_instance;
11+
rdpContext* context;
12+
NSBitmapImageRep* bmiRep;
13+
NSPoint savedDragLocation;
14+
char* pixelData;
15+
BOOL mouseInClientArea;
16+
BOOL titleBarClicked;
17+
BOOL gestureEventInProgress;
18+
int width;
19+
int height;
20+
int savedWindowId;
21+
int scrollWheelCount;
2222

23-
// store state info for some keys
24-
int kdlshift;
25-
int kdrshift;
26-
int kdlctrl;
27-
int kdrctrl;
28-
int kdlalt;
29-
int kdralt;
30-
int kdlmeta;
31-
int kdrmeta;
32-
int kdcapslock;
23+
/* store state info for some keys */
24+
int kdlshift;
25+
int kdrshift;
26+
int kdlctrl;
27+
int kdrctrl;
28+
int kdlalt;
29+
int kdralt;
30+
int kdlmeta;
31+
int kdrmeta;
32+
int kdcapslock;
3333

3434
@public
35-
BOOL isMoveSizeInProgress;
36-
BOOL saveInitialDragLoc;
37-
BOOL skipMoveWindowOnce;
38-
int localMoveType;
35+
BOOL isMoveSizeInProgress;
36+
BOOL saveInitialDragLoc;
37+
BOOL skipMoveWindowOnce;
38+
int localMoveType;
3939
}
4040

41-
@property (assign) MRDPRailWindow * mrdpRailWindow;
41+
@property (assign) MRDPRailWindow* mrdpRailWindow;
4242
@property (assign) int windowIndex;
4343
@property (assign) BOOL activateWindow;
4444

45-
- (void) windowDidMove:(NSNotification *) notification;
45+
- (void) windowDidMove:(NSNotification*) notification;
4646
- (void) updateDisplay;
47-
- (void) setRdpInstance:(freerdp *) instance width:(int) w andHeight:(int) h windowID:(int) windowID;
48-
- (BOOL) eventIsInClientArea :(NSEvent *) event :(int *) xptr :(int *) yptr;
47+
- (void) setRdpInstance:(freerdp*) instance width:(int) w andHeight:(int) h windowID:(int) windowID;
4948
- (void) setupBmiRep:(int) width :(int) height;
5049
- (void) releaseResources;
5150

52-
void mac_rail_MoveWindow(rdpRail *rail, rdpWindow *window);
53-
void apple_to_windowMove(NSRect * r, RAIL_WINDOW_MOVE_ORDER * windowMove);
54-
void mac_send_rail_client_event(rdpChannels *channels, UINT16 event_type, void *param);
55-
void windows_to_apple_cords(NSRect * r);
56-
void rail_MoveWindow(rdpRail * rail, rdpWindow * window);
51+
void mac_rail_MoveWindow(rdpRail* rail, rdpWindow* window);
52+
void apple_to_windowMove(NSRect* r, RAIL_WINDOW_MOVE_ORDER* windowMove);
53+
void mac_send_rail_client_event(rdpChannels* channels, UINT16 event_type, void* param);
54+
void windows_to_apple_cords(NSRect* r);
55+
void rail_MoveWindow(rdpRail* rail, rdpWindow* window);
5756
void mac_rail_send_activate(int window_id);
5857

5958
@end
60-

client/Mac/MRDPRailView.m

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ - (BOOL)acceptsFirstMouse:(NSEvent *)theEvent
106106
}
107107

108108
/** *********************************************************************
109-
* called when a mouse move event occurrs
109+
* called when a mouse move event occurs
110110
*
111111
* ideally we want to be called when the mouse moves over NSView client area,
112112
* but in reality we get called any time the mouse moves anywhere on the screen;
@@ -130,7 +130,7 @@ - (void) mouseMoved:(NSEvent *)event
130130

131131
y = height - y;
132132

133-
// send mouse motion event to RDP server
133+
/* send mouse motion event to RDP server */
134134
rdp_instance->input->MouseEvent(rdp_instance->input, PTR_FLAGS_MOVE, x, y);
135135
}
136136

@@ -150,7 +150,6 @@ - (void)mouseDown:(NSEvent *) event
150150

151151
y = height - y;
152152

153-
154153
if ((yPos >= 4) && (yPos <= 20))
155154
titleBarClicked = YES;
156155
else

0 commit comments

Comments
 (0)