1*c2c66affSColin Finck /* -*- c-basic-offset: 8 -*-
2*c2c66affSColin Finck rdesktop: A Remote Desktop Protocol client.
3*c2c66affSColin Finck User interface services - Generic
4*c2c66affSColin Finck Copyright (C) Jay Sorg 2004-2006
5*c2c66affSColin Finck
6*c2c66affSColin Finck This program is free software; you can redistribute it and/or modify
7*c2c66affSColin Finck it under the terms of the GNU General Public License as published by
8*c2c66affSColin Finck the Free Software Foundation; either version 2 of the License, or
9*c2c66affSColin Finck (at your option) any later version.
10*c2c66affSColin Finck
11*c2c66affSColin Finck This program is distributed in the hope that it will be useful,
12*c2c66affSColin Finck but WITHOUT ANY WARRANTY; without even the implied warranty of
13*c2c66affSColin Finck MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14*c2c66affSColin Finck GNU General Public License for more details.
15*c2c66affSColin Finck
16*c2c66affSColin Finck You should have received a copy of the GNU General Public License along
17*c2c66affSColin Finck with this program; if not, write to the Free Software Foundation, Inc.,
18*c2c66affSColin Finck 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*c2c66affSColin Finck */
20*c2c66affSColin Finck
21*c2c66affSColin Finck #include "../rdesktop.h"
22*c2c66affSColin Finck
23*c2c66affSColin Finck extern int g_tcp_port_rdp;
24*c2c66affSColin Finck int g_use_rdp5 = 0;
25*c2c66affSColin Finck char g_hostname[16];
26*c2c66affSColin Finck char g_username[64];
27*c2c66affSColin Finck int g_height = 600;
28*c2c66affSColin Finck int g_width = 800;
29*c2c66affSColin Finck int g_server_depth = 8;
30*c2c66affSColin Finck int g_encryption = 1;
31*c2c66affSColin Finck int g_desktop_save = 1;
32*c2c66affSColin Finck int g_polygon_ellipse_orders = 0;
33*c2c66affSColin Finck int g_bitmap_cache = 1;
34*c2c66affSColin Finck int g_bitmap_cache_persist_enable = False;
35*c2c66affSColin Finck int g_bitmap_cache_precache = True;
36*c2c66affSColin Finck int g_bitmap_compression = 1;
37*c2c66affSColin Finck int g_rdp5_performanceflags = 0;
38*c2c66affSColin Finck int g_console_session = 0;
39*c2c66affSColin Finck int g_keylayout = 0x409; /* Defaults to US keyboard layout */
40*c2c66affSColin Finck int g_keyboard_type = 0x4; /* Defaults to US keyboard layout */
41*c2c66affSColin Finck int g_keyboard_subtype = 0x0; /* Defaults to US keyboard layout */
42*c2c66affSColin Finck int g_keyboard_functionkeys = 0xc; /* Defaults to US keyboard layout */
43*c2c66affSColin Finck /* Session Directory redirection */
44*c2c66affSColin Finck BOOL g_redirect = False;
45*c2c66affSColin Finck char g_redirect_server[64];
46*c2c66affSColin Finck char g_redirect_domain[16];
47*c2c66affSColin Finck char g_redirect_password[64];
48*c2c66affSColin Finck char g_redirect_username[64];
49*c2c66affSColin Finck char g_redirect_cookie[128];
50*c2c66affSColin Finck uint32 g_redirect_flags = 0;
51*c2c66affSColin Finck
52*c2c66affSColin Finck /*****************************************************************************/
ui_bell(void)53*c2c66affSColin Finck void ui_bell(void)
54*c2c66affSColin Finck {
55*c2c66affSColin Finck }
56*c2c66affSColin Finck
57*c2c66affSColin Finck /*****************************************************************************/
ui_select(int in)58*c2c66affSColin Finck int ui_select(int in)
59*c2c66affSColin Finck {
60*c2c66affSColin Finck return 1;
61*c2c66affSColin Finck }
62*c2c66affSColin Finck
63*c2c66affSColin Finck /*****************************************************************************/
ui_destroy_cursor(void * cursor)64*c2c66affSColin Finck void ui_destroy_cursor(void* cursor)
65*c2c66affSColin Finck {
66*c2c66affSColin Finck }
67*c2c66affSColin Finck
68*c2c66affSColin Finck /*****************************************************************************/
ui_create_glyph(int width,int height,uint8 * data)69*c2c66affSColin Finck void* ui_create_glyph(int width, int height, uint8* data)
70*c2c66affSColin Finck {
71*c2c66affSColin Finck return 0;
72*c2c66affSColin Finck }
73*c2c66affSColin Finck
74*c2c66affSColin Finck /*****************************************************************************/
ui_destroy_glyph(void * glyph)75*c2c66affSColin Finck void ui_destroy_glyph(void* glyph)
76*c2c66affSColin Finck {
77*c2c66affSColin Finck }
78*c2c66affSColin Finck
79*c2c66affSColin Finck /*****************************************************************************/
ui_destroy_bitmap(void * bmp)80*c2c66affSColin Finck void ui_destroy_bitmap(void* bmp)
81*c2c66affSColin Finck {
82*c2c66affSColin Finck }
83*c2c66affSColin Finck
84*c2c66affSColin Finck /*****************************************************************************/
ui_reset_clip(void)85*c2c66affSColin Finck void ui_reset_clip(void)
86*c2c66affSColin Finck {
87*c2c66affSColin Finck }
88*c2c66affSColin Finck
89*c2c66affSColin Finck /*****************************************************************************/
ui_set_clip(int x,int y,int cx,int cy)90*c2c66affSColin Finck void ui_set_clip(int x, int y, int cx, int cy)
91*c2c66affSColin Finck {
92*c2c66affSColin Finck }
93*c2c66affSColin Finck
94*c2c66affSColin Finck /*****************************************************************************/
ui_create_colourmap(COLOURMAP * colours)95*c2c66affSColin Finck void* ui_create_colourmap(COLOURMAP * colours)
96*c2c66affSColin Finck {
97*c2c66affSColin Finck return 0;
98*c2c66affSColin Finck }
99*c2c66affSColin Finck
100*c2c66affSColin Finck /*****************************************************************************/
ui_set_colourmap(void * map)101*c2c66affSColin Finck void ui_set_colourmap(void* map)
102*c2c66affSColin Finck {
103*c2c66affSColin Finck }
104*c2c66affSColin Finck
105*c2c66affSColin Finck /*****************************************************************************/
ui_create_bitmap(int width,int height,uint8 * data)106*c2c66affSColin Finck HBITMAP ui_create_bitmap(int width, int height, uint8* data)
107*c2c66affSColin Finck {
108*c2c66affSColin Finck return 0;
109*c2c66affSColin Finck }
110*c2c66affSColin Finck
111*c2c66affSColin Finck /*****************************************************************************/
ui_draw_text(uint8 font,uint8 flags,uint8 opcode,int mixmode,int x,int y,int clipx,int clipy,int clipcx,int clipcy,int boxx,int boxy,int boxcx,int boxcy,BRUSH * brush,int bgcolour,int fgcolour,uint8 * text,uint8 length)112*c2c66affSColin Finck void ui_draw_text(uint8 font, uint8 flags, uint8 opcode, int mixmode,
113*c2c66affSColin Finck int x, int y,
114*c2c66affSColin Finck int clipx, int clipy, int clipcx, int clipcy,
115*c2c66affSColin Finck int boxx, int boxy, int boxcx, int boxcy, BRUSH * brush,
116*c2c66affSColin Finck int bgcolour, int fgcolour, uint8* text, uint8 length)
117*c2c66affSColin Finck {
118*c2c66affSColin Finck }
119*c2c66affSColin Finck
120*c2c66affSColin Finck /*****************************************************************************/
ui_line(uint8 opcode,int startx,int starty,int endx,int endy,PEN * pen)121*c2c66affSColin Finck void ui_line(uint8 opcode, int startx, int starty, int endx, int endy,
122*c2c66affSColin Finck PEN * pen)
123*c2c66affSColin Finck {
124*c2c66affSColin Finck }
125*c2c66affSColin Finck
126*c2c66affSColin Finck /*****************************************************************************/
ui_triblt(uint8 opcode,int x,int y,int cx,int cy,HBITMAP src,int srcx,int srcy,BRUSH * brush,int bgcolour,int fgcolour)127*c2c66affSColin Finck void ui_triblt(uint8 opcode, int x, int y, int cx, int cy,
128*c2c66affSColin Finck HBITMAP src, int srcx, int srcy,
129*c2c66affSColin Finck BRUSH* brush, int bgcolour, int fgcolour)
130*c2c66affSColin Finck {
131*c2c66affSColin Finck }
132*c2c66affSColin Finck
133*c2c66affSColin Finck /*****************************************************************************/
ui_memblt(uint8 opcode,int x,int y,int cx,int cy,HBITMAP src,int srcx,int srcy)134*c2c66affSColin Finck void ui_memblt(uint8 opcode, int x, int y, int cx, int cy,
135*c2c66affSColin Finck HBITMAP src, int srcx, int srcy)
136*c2c66affSColin Finck {
137*c2c66affSColin Finck }
138*c2c66affSColin Finck
139*c2c66affSColin Finck /*****************************************************************************/
ui_desktop_restore(uint32 offset,int x,int y,int cx,int cy)140*c2c66affSColin Finck void ui_desktop_restore(uint32 offset, int x, int y, int cx, int cy)
141*c2c66affSColin Finck {
142*c2c66affSColin Finck }
143*c2c66affSColin Finck
144*c2c66affSColin Finck /*****************************************************************************/
ui_desktop_save(uint32 offset,int x,int y,int cx,int cy)145*c2c66affSColin Finck void ui_desktop_save(uint32 offset, int x, int y, int cx, int cy)
146*c2c66affSColin Finck {
147*c2c66affSColin Finck }
148*c2c66affSColin Finck
149*c2c66affSColin Finck /*****************************************************************************/
ui_rect(int x,int y,int cx,int cy,int colour)150*c2c66affSColin Finck void ui_rect(int x, int y, int cx, int cy, int colour)
151*c2c66affSColin Finck {
152*c2c66affSColin Finck }
153*c2c66affSColin Finck
154*c2c66affSColin Finck /*****************************************************************************/
ui_screenblt(uint8 opcode,int x,int y,int cx,int cy,int srcx,int srcy)155*c2c66affSColin Finck void ui_screenblt(uint8 opcode, int x, int y, int cx, int cy,
156*c2c66affSColin Finck int srcx, int srcy)
157*c2c66affSColin Finck {
158*c2c66affSColin Finck }
159*c2c66affSColin Finck
160*c2c66affSColin Finck /*****************************************************************************/
ui_patblt(uint8 opcode,int x,int y,int cx,int cy,BRUSH * brush,int bgcolour,int fgcolour)161*c2c66affSColin Finck void ui_patblt(uint8 opcode, int x, int y, int cx, int cy,
162*c2c66affSColin Finck BRUSH * brush, int bgcolour, int fgcolour)
163*c2c66affSColin Finck {
164*c2c66affSColin Finck }
165*c2c66affSColin Finck
166*c2c66affSColin Finck /*****************************************************************************/
ui_destblt(uint8 opcode,int x,int y,int cx,int cy)167*c2c66affSColin Finck void ui_destblt(uint8 opcode, int x, int y, int cx, int cy)
168*c2c66affSColin Finck {
169*c2c66affSColin Finck }
170*c2c66affSColin Finck
171*c2c66affSColin Finck /*****************************************************************************/
ui_move_pointer(int x,int y)172*c2c66affSColin Finck void ui_move_pointer(int x, int y)
173*c2c66affSColin Finck {
174*c2c66affSColin Finck }
175*c2c66affSColin Finck
176*c2c66affSColin Finck /*****************************************************************************/
ui_set_null_cursor(void)177*c2c66affSColin Finck void ui_set_null_cursor(void)
178*c2c66affSColin Finck {
179*c2c66affSColin Finck }
180*c2c66affSColin Finck
181*c2c66affSColin Finck /*****************************************************************************/
ui_paint_bitmap(int x,int y,int cx,int cy,int width,int height,uint8 * data)182*c2c66affSColin Finck void ui_paint_bitmap(int x, int y, int cx, int cy,
183*c2c66affSColin Finck int width, int height, uint8* data)
184*c2c66affSColin Finck {
185*c2c66affSColin Finck }
186*c2c66affSColin Finck
187*c2c66affSColin Finck /*****************************************************************************/
ui_set_cursor(HCURSOR cursor)188*c2c66affSColin Finck void ui_set_cursor(HCURSOR cursor)
189*c2c66affSColin Finck {
190*c2c66affSColin Finck }
191*c2c66affSColin Finck
192*c2c66affSColin Finck /*****************************************************************************/
ui_create_cursor(unsigned int x,unsigned int y,int width,int height,uint8 * andmask,uint8 * xormask)193*c2c66affSColin Finck HCURSOR ui_create_cursor(unsigned int x, unsigned int y,
194*c2c66affSColin Finck int width, int height,
195*c2c66affSColin Finck uint8* andmask, uint8* xormask)
196*c2c66affSColin Finck {
197*c2c66affSColin Finck return 0;
198*c2c66affSColin Finck }
199*c2c66affSColin Finck
200*c2c66affSColin Finck /*****************************************************************************/
ui_get_numlock_state(unsigned int state)201*c2c66affSColin Finck uint16 ui_get_numlock_state(unsigned int state)
202*c2c66affSColin Finck {
203*c2c66affSColin Finck return 0;
204*c2c66affSColin Finck }
205*c2c66affSColin Finck
206*c2c66affSColin Finck /*****************************************************************************/
read_keyboard_state(void)207*c2c66affSColin Finck unsigned int read_keyboard_state(void)
208*c2c66affSColin Finck {
209*c2c66affSColin Finck return 0;
210*c2c66affSColin Finck }
211*c2c66affSColin Finck
212*c2c66affSColin Finck /*****************************************************************************/
ui_resize_window(void)213*c2c66affSColin Finck void ui_resize_window(void)
214*c2c66affSColin Finck {
215*c2c66affSColin Finck }
216*c2c66affSColin Finck
217*c2c66affSColin Finck /*****************************************************************************/
ui_begin_update(void)218*c2c66affSColin Finck void ui_begin_update(void)
219*c2c66affSColin Finck {
220*c2c66affSColin Finck }
221*c2c66affSColin Finck
222*c2c66affSColin Finck /*****************************************************************************/
ui_end_update(void)223*c2c66affSColin Finck void ui_end_update(void)
224*c2c66affSColin Finck {
225*c2c66affSColin Finck }
226*c2c66affSColin Finck
227*c2c66affSColin Finck /*****************************************************************************/
ui_polygon(uint8 opcode,uint8 fillmode,POINT * point,int npoints,BRUSH * brush,int bgcolour,int fgcolour)228*c2c66affSColin Finck void ui_polygon(uint8 opcode, uint8 fillmode, POINT * point, int npoints,
229*c2c66affSColin Finck BRUSH * brush, int bgcolour, int fgcolour)
230*c2c66affSColin Finck {
231*c2c66affSColin Finck }
232*c2c66affSColin Finck
233*c2c66affSColin Finck /*****************************************************************************/
234*c2c66affSColin Finck /* todo, use qt function for this (QPainter::drawPolyline) */
ui_polyline(uint8 opcode,POINT * points,int npoints,PEN * pen)235*c2c66affSColin Finck void ui_polyline(uint8 opcode, POINT * points, int npoints, PEN * pen)
236*c2c66affSColin Finck {
237*c2c66affSColin Finck int i, x, y, dx, dy;
238*c2c66affSColin Finck if (npoints > 0)
239*c2c66affSColin Finck {
240*c2c66affSColin Finck x = points[0].x;
241*c2c66affSColin Finck y = points[0].y;
242*c2c66affSColin Finck for (i = 1; i < npoints; i++)
243*c2c66affSColin Finck {
244*c2c66affSColin Finck dx = points[i].x;
245*c2c66affSColin Finck dy = points[i].y;
246*c2c66affSColin Finck ui_line(opcode, x, y, x + dx, y + dy, pen);
247*c2c66affSColin Finck x = x + dx;
248*c2c66affSColin Finck y = y + dy;
249*c2c66affSColin Finck }
250*c2c66affSColin Finck }
251*c2c66affSColin Finck }
252*c2c66affSColin Finck
253*c2c66affSColin Finck /*****************************************************************************/
ui_ellipse(uint8 opcode,uint8 fillmode,int x,int y,int cx,int cy,BRUSH * brush,int bgcolour,int fgcolour)254*c2c66affSColin Finck void ui_ellipse(uint8 opcode, uint8 fillmode,
255*c2c66affSColin Finck int x, int y, int cx, int cy,
256*c2c66affSColin Finck BRUSH * brush, int bgcolour, int fgcolour)
257*c2c66affSColin Finck {
258*c2c66affSColin Finck }
259*c2c66affSColin Finck
260*c2c66affSColin Finck /*****************************************************************************/
generate_random(uint8 * random)261*c2c66affSColin Finck void generate_random(uint8* random)
262*c2c66affSColin Finck {
263*c2c66affSColin Finck }
264*c2c66affSColin Finck
265*c2c66affSColin Finck /*****************************************************************************/
save_licence(uint8 * data,int length)266*c2c66affSColin Finck void save_licence(uint8* data, int length)
267*c2c66affSColin Finck {
268*c2c66affSColin Finck }
269*c2c66affSColin Finck
270*c2c66affSColin Finck /*****************************************************************************/
load_licence(uint8 ** data)271*c2c66affSColin Finck int load_licence(uint8** data)
272*c2c66affSColin Finck {
273*c2c66affSColin Finck return 0;
274*c2c66affSColin Finck }
275*c2c66affSColin Finck
276*c2c66affSColin Finck /*****************************************************************************/
xrealloc(void * in,int size)277*c2c66affSColin Finck void* xrealloc(void* in, int size)
278*c2c66affSColin Finck {
279*c2c66affSColin Finck return 0;
280*c2c66affSColin Finck }
281*c2c66affSColin Finck
282*c2c66affSColin Finck /*****************************************************************************/
xmalloc(int size)283*c2c66affSColin Finck void* xmalloc(int size)
284*c2c66affSColin Finck {
285*c2c66affSColin Finck return 0;
286*c2c66affSColin Finck }
287*c2c66affSColin Finck
288*c2c66affSColin Finck /*****************************************************************************/
xfree(void * in)289*c2c66affSColin Finck void xfree(void* in)
290*c2c66affSColin Finck {
291*c2c66affSColin Finck }
292*c2c66affSColin Finck
293*c2c66affSColin Finck /*****************************************************************************/
xstrdup(const char * s)294*c2c66affSColin Finck char * xstrdup(const char * s)
295*c2c66affSColin Finck {
296*c2c66affSColin Finck char * mem = strdup(s);
297*c2c66affSColin Finck if (mem == NULL)
298*c2c66affSColin Finck {
299*c2c66affSColin Finck perror("strdup");
300*c2c66affSColin Finck exit(1);
301*c2c66affSColin Finck }
302*c2c66affSColin Finck return mem;
303*c2c66affSColin Finck }
304*c2c66affSColin Finck /*****************************************************************************/
warning(char * format,...)305*c2c66affSColin Finck void warning(char* format, ...)
306*c2c66affSColin Finck {
307*c2c66affSColin Finck }
308*c2c66affSColin Finck
309*c2c66affSColin Finck /*****************************************************************************/
unimpl(char * format,...)310*c2c66affSColin Finck void unimpl(char* format, ...)
311*c2c66affSColin Finck {
312*c2c66affSColin Finck }
313*c2c66affSColin Finck
314*c2c66affSColin Finck /*****************************************************************************/
error(char * format,...)315*c2c66affSColin Finck void error(char* format, ...)
316*c2c66affSColin Finck {
317*c2c66affSColin Finck }
318*c2c66affSColin Finck
319*c2c66affSColin Finck /*****************************************************************************/
rd_pstcache_mkdir(void)320*c2c66affSColin Finck BOOL rd_pstcache_mkdir(void)
321*c2c66affSColin Finck {
322*c2c66affSColin Finck return 0;
323*c2c66affSColin Finck }
324*c2c66affSColin Finck
325*c2c66affSColin Finck /*****************************************************************************/
rd_open_file(char * filename)326*c2c66affSColin Finck int rd_open_file(char *filename)
327*c2c66affSColin Finck {
328*c2c66affSColin Finck return 0;
329*c2c66affSColin Finck }
330*c2c66affSColin Finck
331*c2c66affSColin Finck /*****************************************************************************/
rd_close_file(int fd)332*c2c66affSColin Finck void rd_close_file(int fd)
333*c2c66affSColin Finck {
334*c2c66affSColin Finck return;
335*c2c66affSColin Finck }
336*c2c66affSColin Finck
337*c2c66affSColin Finck /*****************************************************************************/
rd_read_file(int fd,void * ptr,int len)338*c2c66affSColin Finck int rd_read_file(int fd, void *ptr, int len)
339*c2c66affSColin Finck {
340*c2c66affSColin Finck return 0;
341*c2c66affSColin Finck }
342*c2c66affSColin Finck
343*c2c66affSColin Finck /*****************************************************************************/
rd_write_file(int fd,void * ptr,int len)344*c2c66affSColin Finck int rd_write_file(int fd, void* ptr, int len)
345*c2c66affSColin Finck {
346*c2c66affSColin Finck return 0;
347*c2c66affSColin Finck }
348*c2c66affSColin Finck
349*c2c66affSColin Finck /*****************************************************************************/
rd_lseek_file(int fd,int offset)350*c2c66affSColin Finck int rd_lseek_file(int fd, int offset)
351*c2c66affSColin Finck {
352*c2c66affSColin Finck return 0;
353*c2c66affSColin Finck }
354*c2c66affSColin Finck
355*c2c66affSColin Finck /*****************************************************************************/
rd_lock_file(int fd,int start,int len)356*c2c66affSColin Finck BOOL rd_lock_file(int fd, int start, int len)
357*c2c66affSColin Finck {
358*c2c66affSColin Finck return False;
359*c2c66affSColin Finck }
360*c2c66affSColin Finck
361*c2c66affSColin Finck /*****************************************************************************/
main(int c,char ** p)362*c2c66affSColin Finck int main(int c, char** p)
363*c2c66affSColin Finck {
364*c2c66affSColin Finck return 0;
365*c2c66affSColin Finck }
366