ReactOS 0.4.15-dev-7968-g24a56f8
uimain.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SPLIT_COLOUR15(c, r, g, b)
 
#define SPLIT_COLOUR16(c, r, g, b)
 
#define MAKE_COLOUR15(c, r, g, b)
 
#define MAKE_COLOUR32(c, r, g, b)
 
#define UI_MAX(a, b)   (((a) > (b)) ? (a) : (b))
 
#define UI_MIN(a, b)   (((a) < (b)) ? (a) : (b))
 

Functions

int ui_main (void)
 
void ui_invalidate (int x, int y, int cx, int cy)
 
int ui_read_wire (void)
 
void ui_mouse_move (int x, int y)
 
void ui_mouse_button (int button, int x, int y, int down)
 
void ui_key_down (int key, int ext)
 
void ui_key_up (int key, int ext)
 
void ui_set_modifier_state (int code)
 

Macro Definition Documentation

◆ MAKE_COLOUR15

#define MAKE_COLOUR15 (   c,
  r,
  g,
  b 
)
Value:
{ \
c = ( \
(((r & 0xff) >> 3) << 10) | \
(((g & 0xff) >> 3) << 5) | \
(((b & 0xff) >> 3) << 0) \
); \
}
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
const GLubyte * c
Definition: glext.h:8905
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLboolean GLboolean g
Definition: glext.h:6204

Definition at line 57 of file uimain.h.

◆ MAKE_COLOUR32

#define MAKE_COLOUR32 (   c,
  r,
  g,
  b 
)
Value:
{ \
c = ( \
((r & 0xff) << 16) | \
((g & 0xff) << 8) | \
((b & 0xff) << 0) \
); \
}

Definition at line 66 of file uimain.h.

◆ SPLIT_COLOUR15

#define SPLIT_COLOUR15 (   c,
  r,
  g,
  b 
)
Value:
{ \
r = ((c >> 7) & 0xf8) | ((c >> 12) & 0x7); \
g = ((c >> 2) & 0xf8) | ((c >> 8) & 0x7); \
b = ((c << 3) & 0xf8) | ((c >> 2) & 0x7); \
}

Definition at line 43 of file uimain.h.

◆ SPLIT_COLOUR16

#define SPLIT_COLOUR16 (   c,
  r,
  g,
  b 
)
Value:
{ \
r = ((c >> 8) & 0xf8) | ((c >> 13) & 0x7); \
g = ((c >> 3) & 0xfc) | ((c >> 9) & 0x3); \
b = ((c << 3) & 0xf8) | ((c >> 2) & 0x7); \
}

Definition at line 50 of file uimain.h.

◆ UI_MAX

#define UI_MAX (   a,
  b 
)    (((a) > (b)) ? (a) : (b))

Definition at line 76 of file uimain.h.

◆ UI_MIN

#define UI_MIN (   a,
  b 
)    (((a) < (b)) ? (a) : (b))

Definition at line 78 of file uimain.h.

Function Documentation

◆ ui_invalidate()

void ui_invalidate ( int  x,
int  y,
int  cx,
int  cy 
)

Definition at line 138 of file uimain.c.

139{
140 char * data;
141
142 if (cx < 1 || cy < 1)
143 {
144 return;
145 }
146 if (bs_warp_coords(&x, &y, &cx, &cy, 0, 0))
147 {
148 cx = (cx + 3) & ~3;
149 data = (char *) xmalloc(cx * cy * 4);
150 bs_copy_box(data, x, y, cx, cy, cx * ((g_server_depth + 7) / 8));
151 mi_paint_rect(data, cx, cy, x, y, cx, cy);
152 xfree(data);
153 }
154}
void bs_copy_box(char *dst, int x, int y, int cx, int cy, int line_size)
Definition: bsops.c:793
int bs_warp_coords(int *x, int *y, int *cx, int *cy, int *srcx, int *srcy)
Definition: bsops.c:331
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:586
_Out_opt_ int * cx
Definition: commctrl.h:585
int g_server_depth
Definition: uimain.c:41
void xfree(void *in)
Definition: uimain.c:758
void mi_paint_rect(char *data, int width, int height, int x, int y, int cx, int cy)
Definition: win32.c:874
void * xmalloc(int size)
Definition: uimain.c:747

Referenced by handle_WM_PAINT(), ui_destblt(), ui_draw_text(), ui_line(), ui_memblt(), ui_patblt(), and ui_screenblt().

◆ ui_key_down()

void ui_key_down ( int  key,
int  ext 
)

Definition at line 924 of file uimain.c.

926{
928 (uint16) key, 0);
929}
#define RDP_KEYPRESS
Definition: constants.h:251
@ RDP_INPUT_SCANCODE
Definition: constants.h:234
void rdp_send_input(uint32 time, uint16 message_type, uint16 device_flags, uint16 param1, uint16 param2)
Definition: rdp.c:551
unsigned short uint16
Definition: types.h:30
static const WCHAR *const ext[]
Definition: module.c:53
Definition: copy.c:22

Referenced by handle_WM_KEY().

◆ ui_key_up()

void ui_key_up ( int  key,
int  ext 
)

Definition at line 933 of file uimain.c.

934{
936 (uint16) key, 0);
937}
#define RDP_KEYRELEASE
Definition: constants.h:252

Referenced by handle_WM_KEY().

◆ ui_main()

int ui_main ( void  )

Definition at line 951 of file uimain.c.

952{
954
955 /* try to connect */
957 if (g_password[0] != 0)
958 {
960 }
963 {
964 return 0;
965 }
966 /* init backingstore */
968 /* create the window */
969 if (!mi_create_window())
970 {
971 return 0;
972 }
973 /* if all ok, enter main loop */
974 return mi_main_loop();
975}
#define RDP_INFO_AUTOLOGON
Definition: constants.h:335
#define RDP_LOGON_NORMAL
Definition: precomp.h:24
RD_BOOL rdp_connect(char *server, uint32 flags, char *domain, char *password, char *command, char *directory, RD_BOOL reconnect)
Definition: rdp.c:1742
unsigned int uint32
Definition: types.h:32
void bs_init(int width, int height, int bpp)
Definition: bsops.c:158
#define FALSE
Definition: types.h:117
GLbitfield flags
Definition: glext.h:7161
int g_width
Definition: uimain.c:42
int mi_create_window(void)
Definition: win32.c:754
int g_height
Definition: uimain.c:43
char g_shell[256]
Definition: uimain.c:29
char g_servername[256]
Definition: uimain.c:27
char g_directory[256]
Definition: uimain.c:30
int mi_main_loop(void)
Definition: win32.c:834
char g_password[256]
Definition: uimain.c:28
char g_domain[256]
Definition: uimain.c:31

Referenced by wWinMain().

◆ ui_mouse_button()

void ui_mouse_button ( int  button,
int  x,
int  y,
int  down 
)

Definition at line 891 of file uimain.c.

892{
894
895 flags = 0;
896 if (down)
897 {
899 }
900 switch (button)
901 {
902 case 1:
904 break;
905 case 2:
907 break;
908 case 3:
910 break;
911 case 4:
913 break;
914 case 5:
916 break;
917 }
919}
#define MOUSE_FLAG_BUTTON5
Definition: constants.h:259
#define MOUSE_FLAG_DOWN
Definition: constants.h:260
#define MOUSE_FLAG_BUTTON1
Definition: constants.h:255
#define MOUSE_FLAG_BUTTON2
Definition: constants.h:256
#define MOUSE_FLAG_BUTTON4
Definition: constants.h:258
#define MOUSE_FLAG_BUTTON3
Definition: constants.h:257
@ RDP_INPUT_MOUSE
Definition: constants.h:235
#define down(mutex)
Definition: glue.h:29
DWORD button
Definition: button.c:166

Referenced by handle_WM_LBUTTONDOWN(), handle_WM_LBUTTONUP(), handle_WM_MBUTTONDOWN(), handle_WM_MBUTTONUP(), handle_WM_MOUSEWHEEL(), handle_WM_RBUTTONDOWN(), and handle_WM_RBUTTONUP().

◆ ui_mouse_move()

void ui_mouse_move ( int  x,
int  y 
)

Definition at line 883 of file uimain.c.

884{
886}
#define MOUSE_FLAG_MOVE
Definition: constants.h:254

Referenced by handle_WM_MOUSEMOVE().

◆ ui_read_wire()

int ui_read_wire ( void  )

Definition at line 942 of file uimain.c.

943{
945}
RD_BOOL rdp_loop(RD_BOOL *deactivated, uint32 *ext_disc_reason)
Definition: rdp.c:1695
static uint32 g_ext_disc_reason
Definition: uimain.c:72
static int g_deactivated
Definition: uimain.c:71

Referenced by check_sck().

◆ ui_set_modifier_state()

void ui_set_modifier_state ( int  code)

Definition at line 639 of file uimain.c.

641{
642
643 //error("%8.8x", code);
644
646
647}
@ RDP_INPUT_SYNCHRONIZE
Definition: constants.h:231
Definition: inflate.c:139

Referenced by mi_check_modifier().