-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswf_gdi.c
106 lines (77 loc) · 2.36 KB
/
swf_gdi.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#include "swf_gdi.h"
BOOL swf_rdp_gdi_dstblt(rdpContext* context, const DSTBLT_ORDER* dstblt) {
return TRUE;
}
BOOL swf_rdp_gdi_scrblt(rdpContext* context, const SCRBLT_ORDER* scrblt) {
return TRUE;
}
BOOL swf_rdp_gdi_memblt(rdpContext* context, MEMBLT_ORDER* memblt) {
int x = memblt->nLeftRect;
int y = memblt->nTopRect;
int w = memblt->nWidth;
int h = memblt->nHeight;
int x_src = memblt->nXSrc;
int y_src = memblt->nYSrc;
switch (memblt->bRop) {
}
return TRUE;
}
BOOL swf_rdp_gdi_mem3blt(rdpContext* context, MEM3BLT_ORDER* mem3blt) {
return TRUE;
}
BOOL swf_rdp_gdi_patblt(rdpContext* context, PATBLT_ORDER* patblt) {
return TRUE;
}
BOOL swf_rdp_gdi_opaque_rect(rdpContext* context,const OPAQUE_RECT_ORDER* opaque_rect) {
return TRUE;
}
BOOL swf_rdp_gdi_multi_opaque_rect(rdpContext* context, const MULTI_OPAQUE_RECT_ORDER* multi_opaque_rect) {
return TRUE;
}
BOOL swf_rdp_gdi_line_to(rdpContext* context, const LINE_TO_ORDER* line_to) {
return TRUE;
}
BOOL swf_rdp_gdi_polyline(rdpContext* context, const POLYLINE_ORDER* polyline) {
return TRUE;
}
BOOL swf_rdp_gdi_surface_frame_marker(rdpContext* context, const SURFACE_FRAME_MARKER* surface_frame_marker) {
return TRUE;
}
BOOL swf_rdp_gdi_palette_update(rdpContext* context,const PALETTE_UPDATE* palette)
{
return TRUE;
}
BOOL swf_rdp_gdi_set_bounds(rdpContext* context, const rdpBounds* bounds) {
return TRUE;
}
void swf_update_canvas_diff(swfContext* swfc)
{
RECT rc_client, rc_wnd;
int dx, dy;
GetClientRect(swfc->hwnd, &rc_client);
GetWindowRect(swfc->hwnd, &rc_wnd);
dx = (rc_wnd.right - rc_wnd.left) - rc_client.right;
dy = (rc_wnd.bottom - rc_wnd.top) - rc_client.bottom;
swfc->diff.x = dx;
swfc->diff.y = dy;
}
void swf_resize_window(swfContext* swfc)
{
rdpSettings* settings;
settings = swfc->context.settings;
SetWindowLongPtr(swfc->hwnd, GWL_STYLE,
WS_CAPTION | WS_OVERLAPPED | WS_SYSMENU | WS_MINIMIZEBOX | WS_SIZEBOX |
WS_MAXIMIZEBOX);
if (!swfc->client_height)
swfc->client_height = settings->DesktopHeight;
if (!swfc->client_width)
swfc->client_width = settings->DesktopWidth;
if (!swfc->client_x)
swfc->client_x = 10;
if (!swfc->client_y)
swfc->client_y = 10;
swf_update_canvas_diff(swfc);
SetWindowPos(swfc->hwnd, HWND_TOP, swfc->client_x, swfc->client_y,
swfc->client_width + swfc->diff.x, swfc->client_height + swfc->diff.y,
0 /*SWP_FRAMECHANGED*/);
}