FreeRDP
wf_mirage.h
1 
21 #ifndef FREERDP_SERVER_WIN_MIRAGE_H
22 #define FREERDP_SERVER_WIN_MIRAGE_H
23 
24 #include "wf_interface.h"
25 
26 enum
27 {
28  MIRROR_LOAD = 0,
29  MIRROR_UNLOAD = 1
30 };
31 
32 enum
33 {
34  DMF_ESCAPE_BASE_1_VB = 1030,
35  DMF_ESCAPE_BASE_2_VB = 1026,
36  DMF_ESCAPE_BASE_3_VB = 24
37 };
38 
39 #ifdef _WIN64
40 
41 #define CLIENT_64BIT 0x8000
42 
43 enum
44 {
45  DMF_ESCAPE_BASE_1 = CLIENT_64BIT | DMF_ESCAPE_BASE_1_VB,
46  DMF_ESCAPE_BASE_2 = CLIENT_64BIT | DMF_ESCAPE_BASE_2_VB,
47  DMF_ESCAPE_BASE_3 = CLIENT_64BIT | DMF_ESCAPE_BASE_3_VB,
48 };
49 
50 #else
51 
52 enum
53 {
54  DMF_ESCAPE_BASE_1 = DMF_ESCAPE_BASE_1_VB,
55  DMF_ESCAPE_BASE_2 = DMF_ESCAPE_BASE_2_VB,
56  DMF_ESCAPE_BASE_3 = DMF_ESCAPE_BASE_3_VB,
57 };
58 
59 #endif
60 
61 typedef enum
62 {
63  dmf_esc_qry_ver_info = DMF_ESCAPE_BASE_2 + 0,
64  dmf_esc_usm_pipe_map = DMF_ESCAPE_BASE_1 + 0,
65  dmf_esc_usm_pipe_unmap = DMF_ESCAPE_BASE_1 + 1,
66  dmf_esc_test = DMF_ESCAPE_BASE_1 + 20,
67  dmf_esc_usm_pipe_mapping_test = DMF_ESCAPE_BASE_1 + 21,
68  dmf_esc_pointer_shape_get = DMF_ESCAPE_BASE_3,
69 
70 } dmf_escape;
71 
72 #define CLIP_LIMIT 50
73 #define MAXCHANGES_BUF 20000
74 
75 typedef enum
76 {
77  dmf_dfo_IGNORE = 0,
78  dmf_dfo_FROM_SCREEN = 1,
79  dmf_dfo_FROM_DIB = 2,
80  dmf_dfo_TO_SCREEN = 3,
81  dmf_dfo_SCREEN_SCREEN = 11,
82  dmf_dfo_BLIT = 12,
83  dmf_dfo_SOLIDFILL = 13,
84  dmf_dfo_BLEND = 14,
85  dmf_dfo_TRANS = 15,
86  dmf_dfo_PLG = 17,
87  dmf_dfo_TEXTOUT = 18,
88  dmf_dfo_Ptr_Shape = 19,
89  dmf_dfo_Ptr_Engage = 48,
90  dmf_dfo_Ptr_Avert = 49,
91  dmf_dfn_assert_on = 64,
92  dmf_dfn_assert_off = 65,
93 } dmf_UpdEvent;
94 
95 #define NOCACHE 1
96 #define OLDCACHE 2
97 #define NEWCACHE 3
98 
99 typedef struct
100 {
101  ULONG type;
102  RECT rect;
103 #ifndef DFMIRAGE_LEAN
104  RECT origrect;
105  POINT point;
106  ULONG color;
107  ULONG refcolor;
108 #endif
110 
112 
113 typedef struct
114 {
115  ULONG counter;
116  CHANGES_RECORD pointrect[MAXCHANGES_BUF];
117 } CHANGES_BUF;
118 
119 #define EXT_DEVMODE_SIZE_MAX 3072
120 #define DMF_PIPE_SEC_SIZE_DEFAULT ALIGN64K(sizeof(CHANGES_BUF))
121 
122 typedef struct
123 {
124  CHANGES_BUF* buffer;
125  PVOID Userbuffer;
126 } GETCHANGESBUF;
127 
128 #define dmf_sprb_ERRORMASK 0x07FF
129 #define dmf_sprb_STRICTSESSION_AFF 0x1FFF
130 
131 typedef enum
132 {
133  dmf_sprb_internal_error = 0x0001,
134  dmf_sprb_miniport_gen_error = 0x0004,
135  dmf_sprb_memory_alloc_failed = 0x0008,
136  dmf_sprb_pipe_buff_overflow = 0x0010,
137  dmf_sprb_pipe_buff_insufficient = 0x0020,
138  dmf_sprb_pipe_not_ready = 0x0040,
139  dmf_sprb_gdi_err = 0x0100,
140  dmf_sprb_owner_died = 0x0400,
141  dmf_sprb_tgtwnd_gone = 0x0800,
142  dmf_sprb_pdev_detached = 0x2000,
143 } dmf_session_prob_status;
144 
145 #define DMF_ESC_RET_FAILF 0x80000000
146 #define DMF_ESC_RET_SSTMASK 0x0000FFFF
147 #define DMF_ESC_RET_IMMMASK 0x7FFF0000
148 
149 typedef enum
150 {
151  dmf_escret_generic_ok = 0x00010000,
152  dmf_escret_bad_state = 0x00100000,
153  dmf_escret_access_denied = 0x00200000,
154  dmf_escret_bad_buffer_size = 0x00400000,
155  dmf_escret_internal_err = 0x00800000,
156  dmf_escret_out_of_memory = 0x02000000,
157  dmf_escret_already_connected = 0x04000000,
158  dmf_escret_oh_boy_too_late = 0x08000000,
159  dmf_escret_bad_window = 0x10000000,
160  dmf_escret_drv_ver_higher = 0x20000000,
161  dmf_escret_drv_ver_lower = 0x40000000,
162 } dmf_esc_retcode;
163 
164 typedef struct
165 {
166  ULONG cbSize;
167  ULONG app_actual_version;
168  ULONG display_minreq_version;
169  ULONG connect_options;
171 
172 enum
173 {
174  esc_qvi_prod_name_max = 16,
175 };
176 
177 #define ESC_QVI_PROD_MIRAGE "MIRAGE"
178 #define ESC_QVI_PROD_QUASAR "QUASAR"
179 
180 typedef struct
181 {
182  ULONG cbSize;
183  ULONG display_actual_version;
184  ULONG miniport_actual_version;
185  ULONG app_minreq_version;
186  ULONG display_buildno;
187  ULONG miniport_buildno;
188  char prod_name[esc_qvi_prod_name_max];
190 
191 typedef struct
192 {
193  ULONG cbSize;
194  char* pDstBmBuf;
195  ULONG nDstBmBufSize;
197 
198 typedef struct
199 {
200  ULONG cbSize;
201  POINTL BmSize;
202  char* pMaskBm;
203  ULONG nMaskBmSize;
204  char* pColorBm;
205  ULONG nColorBmSize;
206  char* pColorBmPal;
207  ULONG nColorBmPalEntries;
209 
210 BOOL wf_mirror_driver_find_display_device(wfInfo* wfi);
211 BOOL wf_mirror_driver_display_device_attach(wfInfo* wfi, DWORD mode);
212 BOOL wf_mirror_driver_update(wfInfo* wfi, int mode);
213 BOOL wf_mirror_driver_map_memory(wfInfo* wfi);
214 BOOL wf_mirror_driver_cleanup(wfInfo* wfi);
215 
216 BOOL wf_mirror_driver_activate(wfInfo* wfi);
217 void wf_mirror_driver_deactivate(wfInfo* wfi);
218 
219 #endif /* FREERDP_SERVER_WIN_MIRAGE_H */