eeda95f98bc0f7f268ff992b405564273884d58e
[libguac-client-rdp.git] / include / rdp_handlers.h
1
2 /* ***** BEGIN LICENSE BLOCK *****
3  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4  *
5  * The contents of this file are subject to the Mozilla Public License Version
6  * 1.1 (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  * http://www.mozilla.org/MPL/
9  *
10  * Software distributed under the License is distributed on an "AS IS" basis,
11  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12  * for the specific language governing rights and limitations under the
13  * License.
14  *
15  * The Original Code is libguac-client-rdp.
16  *
17  * The Initial Developer of the Original Code is
18  * Michael Jumper.
19  * Portions created by the Initial Developer are Copyright (C) 2011
20  * the Initial Developer. All Rights Reserved.
21  *
22  * Contributor(s):
23  *
24  * Alternatively, the contents of this file may be used under the terms of
25  * either the GNU General Public License Version 2 or later (the "GPL"), or
26  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27  * in which case the provisions of the GPL or the LGPL are applicable instead
28  * of those above. If you wish to allow use of your version of this file only
29  * under the terms of either the GPL or the LGPL, and not to allow others to
30  * use your version of this file under the terms of the MPL, indicate your
31  * decision by deleting the provisions above and replace them with the notice
32  * and other provisions required by the GPL or the LGPL. If you do not delete
33  * the provisions above, a recipient may use your version of this file under
34  * the terms of any one of the MPL, the GPL or the LGPL.
35  *
36  * ***** END LICENSE BLOCK ***** */
37
38 #ifndef _GUAC_CLIENT_RDP_HANDLERS
39 #define _GUAC_CLIENT_RDP_HANDLERS
40
41 #include <freerdp/freerdp.h>
42
43 void guac_rdp_ui_error(rdpInst* inst, char* text);
44 void guac_rdp_ui_warning(rdpInst* inst, char* text);
45 void guac_rdp_ui_unimpl(rdpInst* inst, char* text);
46 void guac_rdp_ui_begin_update(rdpInst* inst);
47 void guac_rdp_ui_end_update(rdpInst* inst);
48 void guac_rdp_ui_desktop_save(rdpInst* inst, int offset, int x, int y, int cx, int cy);
49 void guac_rdp_ui_desktop_restore(rdpInst* inst, int offset, int x, int y, int cx, int cy);
50 RD_HBITMAP guac_rdp_ui_create_bitmap(rdpInst* inst, int width, int height, uint8* data);
51 void guac_rdp_ui_paint_bitmap(rdpInst* inst, int x, int y, int cx, int cy, int width, int height, uint8* data);
52 void guac_rdp_ui_destroy_bitmap(rdpInst* inst, RD_HBITMAP bmp);
53 void guac_rdp_ui_line(rdpInst* inst, uint8 opcode, int startx, int starty, int endx, int endy, RD_PEN* pen);
54 void guac_rdp_ui_rect(rdpInst* inst, int x, int y, int cx, int cy, int colour);
55 void guac_rdp_ui_polygon(rdpInst* inst, uint8 opcode, uint8 fillmode, RD_POINT* point, int npoints, RD_BRUSH* brush, int bgcolour, int fgcolour);
56 void guac_rdp_ui_polyline(rdpInst* inst, uint8 opcode, RD_POINT* points, int npoints, RD_PEN* pen);
57 void guac_rdp_ui_ellipse(rdpInst* inst, uint8 opcode, uint8 fillmode, int x, int y, int cx, int cy, RD_BRUSH* brush, int bgcolour, int fgcolour);
58 void guac_rdp_ui_start_draw_glyphs(rdpInst* inst, int bgcolour, int fgcolour);
59 void guac_rdp_ui_draw_glyph(rdpInst* inst, int x, int y, int cx, int cy, RD_HGLYPH glyph);
60 void guac_rdp_ui_end_draw_glyphs(rdpInst* inst, int x, int y, int cx, int cy);
61 uint32 guac_rdp_ui_get_toggle_keys_state(rdpInst* inst);
62 void guac_rdp_ui_bell(rdpInst* inst);
63 void guac_rdp_ui_destblt(rdpInst* inst, uint8 opcode, int x, int y, int cx, int cy);
64 void guac_rdp_ui_patblt(rdpInst* inst, uint8 opcode, int x, int y, int cx, int cy, RD_BRUSH* brush, int bgcolour, int fgcolour);
65 void guac_rdp_ui_screenblt(rdpInst* inst, uint8 opcode, int x, int y, int cx, int cy, int srcx, int srcy);
66 void guac_rdp_ui_memblt(rdpInst* inst, uint8 opcode, int x, int y, int cx, int cy, RD_HBITMAP src, int srcx, int srcy);
67 void guac_rdp_ui_triblt(rdpInst* inst, uint8 opcode, int x, int y, int cx, int cy, RD_HBITMAP src, int srcx, int srcy, RD_BRUSH* brush, int bgcolour,  int fgcolour);
68 RD_HGLYPH guac_rdp_ui_create_glyph(rdpInst* inst, int width, int height, uint8* data);
69 void guac_rdp_ui_destroy_glyph(rdpInst* inst, RD_HGLYPH glyph);
70 int guac_rdp_ui_select(rdpInst* inst, int rdp_socket);
71 void guac_rdp_ui_set_clip(rdpInst* inst, int x, int y, int cx, int cy);
72 void guac_rdp_ui_reset_clip(rdpInst* inst);
73 void guac_rdp_ui_resize_window(rdpInst* inst);
74 void guac_rdp_ui_set_cursor(rdpInst* inst, RD_HCURSOR cursor);
75 void guac_rdp_ui_destroy_cursor(rdpInst* inst, RD_HCURSOR cursor);
76 RD_HCURSOR guac_rdp_ui_create_cursor(rdpInst* inst, unsigned int x, unsigned int y, int width, int height, uint8* andmask, uint8* xormask, int bpp);
77 void guac_rdp_ui_set_null_cursor(rdpInst* inst);
78 void guac_rdp_ui_set_default_cursor(rdpInst* inst);
79 RD_HCOLOURMAP guac_rdp_ui_create_colourmap(rdpInst* inst, RD_COLOURMAP* colours);
80 void guac_rdp_ui_move_pointer(rdpInst* inst, int x, int y);
81 void guac_rdp_ui_set_colourmap(rdpInst* inst, RD_HCOLOURMAP map);
82 RD_HBITMAP guac_rdp_ui_create_surface(rdpInst* inst, int width, int height, RD_HBITMAP old);
83 void guac_rdp_ui_set_surface(rdpInst* inst, RD_HBITMAP surface);
84 void guac_rdp_ui_destroy_surface(rdpInst* inst, RD_HBITMAP surface);
85 void guac_rdp_ui_channel_data(rdpInst* inst, int chan_id, char* data, int data_size, int flags, int total_size);
86
87 #endif
88