1 /* -*- c-basic-offset: 8 -*-
2 rdesktop: A Remote Desktop Protocol client.
4 Copyright (C) Jay Sorg 2005-2006
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License along
17 with this program; if not, write to the Free Software Foundation, Inc.,
18 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 #ifndef __UIMAIN_MSTSC_H
22 #define __UIMAIN_MSTSC_H
28 ui_invalidate(int x
, int y
, int cx
, int cy
);
32 ui_mouse_move(int x
, int y
);
34 ui_mouse_button(int button
, int x
, int y
, int down
);
36 ui_key_down(int key
, int ext
);
38 ui_key_up(int key
, int ext
);
42 ui_set_modifier_state(int code
);
44 #define SPLIT_COLOUR15(c, r, g, b) \
46 r = ((c >> 7) & 0xf8) | ((c >> 12) & 0x7); \
47 g = ((c >> 2) & 0xf8) | ((c >> 8) & 0x7); \
48 b = ((c << 3) & 0xf8) | ((c >> 2) & 0x7); \
51 #define SPLIT_COLOUR16(c, r, g, b) \
53 r = ((c >> 8) & 0xf8) | ((c >> 13) & 0x7); \
54 g = ((c >> 3) & 0xfc) | ((c >> 9) & 0x3); \
55 b = ((c << 3) & 0xf8) | ((c >> 2) & 0x7); \
58 #define MAKE_COLOUR15(c, r, g, b) \
61 (((r & 0xff) >> 3) << 10) | \
62 (((g & 0xff) >> 3) << 5) | \
63 (((b & 0xff) >> 3) << 0) \
67 #define MAKE_COLOUR32(c, r, g, b) \
70 ((r & 0xff) << 16) | \
77 #define UI_MAX(a, b) (((a) > (b)) ? (a) : (b))
79 #define UI_MIN(a, b) (((a) < (b)) ? (a) : (b))
81 #endif /* __UIMAIN_MSTSC_H */