ReactOS 0.4.16-dev-125-g798ea90
uimain.h
Go to the documentation of this file.
1/* -*- c-basic-offset: 8 -*-
2 rdesktop: A Remote Desktop Protocol client.
3 main ui header
4 Copyright (C) Jay Sorg 2005-2006
5
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.
10
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.
15
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.
19*/
20
21#pragma once
22
23/* in uimain.c */
24int
25ui_main(void);
26void
27ui_invalidate(int x, int y, int cx, int cy);
28int
29ui_read_wire(void);
30void
31ui_mouse_move(int x, int y);
32void
33ui_mouse_button(int button, int x, int y, int down);
34void
35ui_key_down(int key, int ext);
36void
37ui_key_up(int key, int ext);
38
39void
40
42
43#define SPLIT_COLOUR15(c, r, g, b) \
44{ \
45 r = ((c >> 7) & 0xf8) | ((c >> 12) & 0x7); \
46 g = ((c >> 2) & 0xf8) | ((c >> 8) & 0x7); \
47 b = ((c << 3) & 0xf8) | ((c >> 2) & 0x7); \
48}
49
50#define SPLIT_COLOUR16(c, r, g, b) \
51{ \
52 r = ((c >> 8) & 0xf8) | ((c >> 13) & 0x7); \
53 g = ((c >> 3) & 0xfc) | ((c >> 9) & 0x3); \
54 b = ((c << 3) & 0xf8) | ((c >> 2) & 0x7); \
55}
56
57#define MAKE_COLOUR15(c, r, g, b) \
58{ \
59 c = ( \
60 (((r & 0xff) >> 3) << 10) | \
61 (((g & 0xff) >> 3) << 5) | \
62 (((b & 0xff) >> 3) << 0) \
63 ); \
64}
65
66#define MAKE_COLOUR32(c, r, g, b) \
67{ \
68 c = ( \
69 ((r & 0xff) << 16) | \
70 ((g & 0xff) << 8) | \
71 ((b & 0xff) << 0) \
72 ); \
73}
74
75#undef UI_MAX
76#define UI_MAX(a, b) (((a) > (b)) ? (a) : (b))
77#undef UI_MIN
78#define UI_MIN(a, b) (((a) < (b)) ? (a) : (b))
static const WCHAR *const ext[]
Definition: module.c:53
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
#define down(mutex)
Definition: glue.h:29
DWORD button
Definition: button.c:166
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:586
_Out_opt_ int * cx
Definition: commctrl.h:585
Definition: inflate.c:139
Definition: copy.c:22
void ui_mouse_move(int x, int y)
Definition: uimain.c:883
void ui_key_down(int key, int ext)
Definition: uimain.c:924
void ui_invalidate(int x, int y, int cx, int cy)
Definition: uimain.c:138
int ui_main(void)
Definition: uimain.c:951
int ui_read_wire(void)
Definition: uimain.c:942
void ui_mouse_button(int button, int x, int y, int down)
Definition: uimain.c:891
void ui_key_up(int key, int ext)
Definition: uimain.c:933
void ui_set_modifier_state(int code)
Definition: uimain.c:639