ReactOS  0.4.12-dev-43-g63b00d8
uimain.c File Reference
#include "precomp.h"
#include "bsops.h"
Include dependency graph for uimain.c:

Go to the source code of this file.

Classes

struct  bitmap
 

Macros

#define DO_GLYPH(ttext, idx)
 

Functions

int mi_create_window (void)
 
int mi_main_loop (void)
 
void mi_error (char *msg)
 
void mi_warning (char *msg)
 
void mi_paint_rect (char *data, int width, int height, int x, int y, int cx, int cy)
 
void mi_begin_update (void)
 
void mi_end_update (void)
 
void mi_fill_rect (int x, int y, int cx, int cy, int colour)
 
void mi_screen_copy (int x, int y, int cx, int cy, int srcx, int srcy)
 
void mi_set_clip (int x, int y, int cx, int cy)
 
void mi_reset_clip (void)
 
void mi_line (int x1, int y1, int x2, int y2, int colour)
 
voidmi_create_cursor (unsigned int x, unsigned int y, int width, int height, unsigned char *andmask, unsigned char *xormask)
 
void mi_destroy_cursor (void *cursor)
 
void mi_set_cursor (void *cursor)
 
void mi_set_null_cursor (void)
 
int mi_read_keyboard_state (void)
 
void ui_invalidate (int x, int y, int cx, int cy)
 
void ui_bell (void)
 
int ui_select (int in)
 
voidui_create_cursor (unsigned int x, unsigned int y, int width, int height, uint8 *andmask, uint8 *xormask, int xor_bpp)
 
void ui_destroy_cursor (void *cursor)
 
void ui_set_cursor (void *cursor)
 
void ui_set_null_cursor (void)
 
voidui_create_glyph (int width, int height, uint8 *data)
 
void ui_destroy_glyph (void *glyph)
 
voidui_create_bitmap (int width, int height, uint8 *data)
 
void ui_destroy_bitmap (void *bmp)
 
void ui_paint_bitmap (int x, int y, int cx, int cy, int width, int height, uint8 *data)
 
void ui_set_clip (int x, int y, int cx, int cy)
 
void ui_reset_clip (void)
 
voidui_create_colourmap (COLOURMAP *colours)
 
void ui_set_colourmap (void *map)
 
static void draw_glyph (int x, int y, void *glyph, int fgcolor)
 
void 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)
 
void ui_line (uint8 opcode, int startx, int starty, int endx, int endy, PEN *pen)
 
void ui_triblt (uint8 opcode, int x, int y, int cx, int cy, void *src, int srcx, int srcy, BRUSH *brush, int bgcolour, int fgcolour)
 
void ui_memblt (uint8 opcode, int x, int y, int cx, int cy, void *src, int srcx, int srcy)
 
void ui_desktop_restore (uint32 offset, int x, int y, int cx, int cy)
 
void ui_desktop_save (uint32 offset, int x, int y, int cx, int cy)
 
void ui_rect (int x, int y, int cx, int cy, int colour)
 
void ui_screenblt (uint8 opcode, int x, int y, int cx, int cy, int srcx, int srcy)
 
void ui_patblt (uint8 opcode, int x, int y, int cx, int cy, BRUSH *brush, int bgcolour, int fgcolour)
 
void ui_destblt (uint8 opcode, int x, int y, int cx, int cy)
 
void ui_move_pointer (int x, int y)
 
uint16 ui_get_numlock_state (uint32 state)
 
uint32 read_keyboard_state (void)
 
void ui_set_modifier_state (int code)
 
void ui_resize_window (void)
 
void ui_begin_update (void)
 
void ui_end_update (void)
 
void ui_polygon (uint8 opcode, uint8 fillmode, RD_POINT *point, int npoints, BRUSH *brush, int bgcolour, int fgcolour)
 
void ui_polyline (uint8 opcode, RD_POINT *points, int npoints, PEN *pen)
 
void ui_ellipse (uint8 opcode, uint8 fillmode, int x, int y, int cx, int cy, BRUSH *brush, int bgcolour, int fgcolour)
 
void generate_random (uint8 *random)
 
void save_licence (uint8 *data, int length)
 
int load_licence (uint8 **data)
 
voidxrealloc (void *in, size_t size)
 
voidxmalloc (int size)
 
void xfree (void *in)
 
charxstrdup (const char *s)
 
void warning (char *format,...)
 
void unimpl (char *format,...)
 
void error (char *format,...)
 
BOOL rd_pstcache_mkdir (void)
 
int rd_open_file (char *filename)
 
void rd_close_file (int fd)
 
int rd_read_file (int fd, void *ptr, int len)
 
int rd_write_file (int fd, void *ptr, int len)
 
int rd_lseek_file (int fd, int offset)
 
BOOL rd_lock_file (int fd, int start, int len)
 
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)
 
int ui_read_wire (void)
 
int ui_main (void)
 
void hexdump (uint8 *p, uint32 len)
 

Variables

char g_username [256] = ""
 
char g_hostname [256] = ""
 
char g_servername [256] = ""
 
char g_password [256] = ""
 
char g_shell [256] = ""
 
char g_directory [256] = ""
 
char g_domain [256] = ""
 
RD_BOOL g_desktop_save = False
 
RD_BOOL g_polygon_ellipse_orders = False
 
RD_BOOL g_bitmap_compression = True
 
uint32 g_rdp5_performanceflags
 
RD_BOOL g_bitmap_cache_persist_enable = False
 
RD_BOOL g_bitmap_cache_precache = True
 
RD_BOOL g_bitmap_cache = True
 
RD_BOOL g_encryption = True
 
int g_server_depth = 16
 
int g_width = 800
 
int g_height = 600
 
uint32 g_keylayout = 0x409
 
int g_keyboard_type = 0x4
 
int g_keyboard_subtype = 0x0
 
int g_keyboard_functionkeys = 0xc
 
RD_BOOL g_console_session = False
 
int g_tcp_sck = 0
 
int pal_entries [256]
 
RD_BOOL g_redirect = False
 
char g_redirect_server [256]
 
uint32 g_redirect_server_len
 
char g_redirect_domain [256]
 
uint32 g_redirect_domain_len
 
char g_redirect_username [256]
 
uint32 g_redirect_username_len
 
uint8 g_redirect_lb_info [256]
 
uint32 g_redirect_lb_info_len
 
uint8 g_redirect_cookie [256]
 
uint32 g_redirect_cookie_len
 
uint32 g_redirect_flags = 0
 
uint32 g_redirect_session_id = 0
 
int g_tcp_port_rdp
 
static int g_deactivated = 0
 
static uint32 g_ext_disc_reason = 0
 
RDP_VERSION g_rdp_version = RDP_V5
 
RD_BOOL g_encryption_initial = True
 
RD_BOOL g_user_quit = False
 
RD_BOOL g_network_error = False
 
uint8 g_client_random [SEC_RANDOM_SIZE]
 
RD_BOOL g_pending_resize = False
 
RD_BOOL g_numlock_sync = False
 
uint32 g_reconnect_logonid = 0
 
char g_reconnect_random [16]
 
time_t g_reconnect_random_ts
 
RD_BOOL g_has_reconnect_random = False
 
RD_BOOL g_reconnect_loop = False
 

Macro Definition Documentation

◆ DO_GLYPH

#define DO_GLYPH (   ttext,
  idx 
)

Definition at line 369 of file uimain.c.

Referenced by ui_draw_text().

Function Documentation

◆ draw_glyph()

static void draw_glyph ( int  x,
int  y,
void glyph,
int  fgcolor 
)
static

Definition at line 360 of file uimain.c.

361 {
362  struct bitmap * b;
363 
364  b = glyph;
365  bs_draw_glyph(x, y, (char *)b->data, b->width, b->height, fgcolor);
366 }
uint32 width
Definition: uimain.c:91
void bs_draw_glyph(int x, int y, char *glyph_data, int glyph_width, int glyph_height, int fgcolour)
Definition: bsops.c:640
uint8 * data
Definition: uimain.c:90
INT INT y
Definition: msvc.h:62
#define b
Definition: ke_i.h:79
Definition: uimain.c:88
uint32 height
Definition: uimain.c:92
INT x
Definition: msvc.h:62

◆ error()

void error ( char format,
  ... 
)

Definition at line 817 of file uimain.c.

Referenced by ui_draw_text().

818 {
819  va_list ap;
820  char text[512];
821  char text1[512];
822 
823  sprintf(text1, "ERROR: ");
824  va_start(ap, format);
825  vsprintf(text, format, ap);
826  va_end(ap);
827  strcat(text1, text);
828  mi_error(text1);
829 }
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
const WCHAR * text
Definition: package.c:1827
void mi_error(char *msg)
Definition: win32.c:131
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define sprintf(buf, format,...)
Definition: sprintf.c:55
#define va_end(ap)
Definition: acmsvcex.h:90
char * va_list
Definition: acmsvcex.h:78
int __cdecl vsprintf(char *_Dest, const char *_Format, va_list _Args)
Definition: sprintf.c:733
#define va_start(ap, A)
Definition: acmsvcex.h:91
void int int ULONGLONG int va_list * ap
Definition: winesup.h:32

◆ generate_random()

void generate_random ( uint8 random)

Definition at line 709 of file uimain.c.

710 {
711  int i;
712 
713  rand();
714  rand();
715  for (i = 0; i < 32; i++)
716  {
717  random[i] = rand(); /* higher bits are more random */
718  }
719 }
GLenum GLclampf GLint i
Definition: glfuncs.h:14
_Check_return_ int __cdecl rand(void)
Definition: rand.c:10
#define random
Definition: rosdhcp.h:81

◆ hexdump()

void hexdump ( uint8 p,
uint32  len 
)

Definition at line 980 of file uimain.c.

981 {
982  uint8 * line = p;
983  int i, thisline, offset = 0;
984 
985  while (offset < (int)len)
986  {
987  printf("%04x ", offset);
988  thisline = len - offset;
989  if (thisline > 16)
990  thisline = 16;
991 
992  for (i = 0; i < thisline; i++)
993  printf("%02x ", line[i]);
994 
995  for (; i < 16; i++)
996  printf(" ");
997 
998  for (i = 0; i < thisline; i++)
999  printf("%c", (line[i] >= 0x20 && line[i] < 0x7f) ? line[i] : '.');
1000 
1001  printf("\n");
1002  offset += thisline;
1003  line += thisline;
1004  }
1005 }
GLintptr offset
Definition: glext.h:5920
GLenum GLclampf GLint i
Definition: glfuncs.h:14
Definition: parser.c:48
unsigned char uint8
Definition: types.h:28
GLenum GLsizei len
Definition: glext.h:6722
GLfloat GLfloat p
Definition: glext.h:8902
#define printf
Definition: config.h:203

◆ load_licence()

int load_licence ( uint8 **  data)

Definition at line 729 of file uimain.c.

730 {
731  return 0;
732 }

◆ mi_begin_update()

void mi_begin_update ( void  )

Definition at line 1182 of file win32.c.

Referenced by ui_begin_update().

1183 {
1184 }

◆ mi_create_cursor()

void* mi_create_cursor ( unsigned int  x,
unsigned int  y,
int  width,
int  height,
unsigned char andmask,
unsigned char xormask 
)

Definition at line 1345 of file win32.c.

Referenced by ui_create_cursor().

1348 {
1349  HCURSOR hCur;
1350 
1351  hCur = CreateCursor(g_Instance, x, y, width, height, andmask, xormask);
1352  if (hCur == 0)
1353  {
1354  hCur = LoadCursor(NULL, IDC_ARROW);
1355  }
1356  return hCur;
1357 }
GLint GLint GLsizei width
Definition: gl.h:1546
HICON HCURSOR
Definition: windef.h:289
INT INT y
Definition: msvc.h:62
smooth NULL
Definition: ftsmooth.c:416
HCURSOR WINAPI CreateCursor(_In_opt_ HINSTANCE, _In_ int, _In_ int, _In_ int, _In_ int, _In_ CONST VOID *, _In_ CONST VOID *)
#define LoadCursor
Definition: winuser.h:5678
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
INT x
Definition: msvc.h:62
#define IDC_ARROW
Definition: winuser.h:682
static HINSTANCE g_Instance
Definition: win32.c:40

◆ mi_create_window()

int mi_create_window ( void  )

Definition at line 754 of file win32.c.

Referenced by ui_main().

755 {
756  RECT rc;
757  WNDCLASS wc;
758  TCHAR classname[512];
759  TCHAR caption[512];
760  DWORD style;
761  int x;
762  int y;
763  int w;
764  int h;
765 
766  if (g_Wnd != 0 || g_Instance != 0)
767  {
768  return 0;
769  }
771  ZeroMemory(&wc, sizeof(wc));
772  wc.lpfnWndProc = WndProc; /* points to window procedure */
773  /* name of window class */
774  str_to_uni(classname, "rdesktop");
776  str_to_uni(caption, "ReactOS Remote Desktop");
779  /* Register the window class. */
780  if (!RegisterClass(&wc))
781  {
782  return 0; /* Failed to register window class */
783  }
784  rc.left = 0;
785  rc.right = rc.left + UI_MIN(g_width, g_screen_width);
786  rc.top = 0;
788 
789  if (g_fullscreen)
790  {
791  style = WS_POPUP;
792  }
793  else
794  {
797  }
799  {
800  style |= WS_HSCROLL | WS_VSCROLL;
801  }
802  AdjustWindowRectEx(&rc, style, 0, 0);
803  x = CW_USEDEFAULT;
804  y = CW_USEDEFAULT;
805  w = rc.right - rc.left;
806  h = rc.bottom - rc.top;
807 
808  g_Wnd = CreateWindow(wc.lpszClassName, caption,
809  style, x, y, w, h,
810  (HWND) NULL, (HMENU) NULL, g_Instance,
811  (LPVOID) NULL);
812  g_clip_left = 0;
813  g_clip_top = 0;
816  if (g_workarea)
817  {
819  }
820  else
821  {
823  }
825 
827  SetTimer(g_Wnd, 1, 333, 0);
828 
829  return 1;
830 }
#define MAKEINTRESOURCE
Definition: winuser.h:591
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6102
#define CreateWindow
Definition: winuser.h:5620
static int g_clip_top
Definition: win32.c:58
static int g_workarea
Definition: win32.c:52
#define SW_SHOWMAXIMIZED
Definition: winuser.h:767
static int g_clip_bottom
Definition: win32.c:60
int g_width
Definition: uimain.c:42
BOOL WINAPI UpdateWindow(_In_ HWND)
LONG top
Definition: windef.h:297
#define IDI_MSTSC
Definition: resource.h:33
BOOL WINAPI AdjustWindowRectEx(_Inout_ LPRECT, _In_ DWORD, _In_ BOOL, _In_ DWORD)
#define ZeroMemory
Definition: winbase.h:1635
#define WS_SIZEBOX
Definition: pedump.c:642
#define FD_READ
Definition: winsock.h:405
WCHAR classname[128]
Definition: startup.c:15
LONG left
Definition: windef.h:296
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
LONG right
Definition: windef.h:298
static HWND g_Wnd
Definition: win32.c:39
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
INT INT y
Definition: msvc.h:62
#define UI_MIN(a, b)
Definition: uimain.h:78
#define CW_USEDEFAULT
Definition: winuser.h:225
smooth NULL
Definition: ftsmooth.c:416
static void str_to_uni(TCHAR *sizex, char *size1)
Definition: win32.c:66
INT WSAAPI WSAAsyncSelect(IN SOCKET s, IN HWND hWnd, IN UINT wMsg, IN LONG lEvent)
Definition: select.c:134
static int g_screen_height
Definition: win32.c:48
#define WS_MAXIMIZEBOX
Definition: pedump.c:632
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
int g_height
Definition: uimain.c:43
#define WS_CAPTION
Definition: pedump.c:624
char TCHAR
Definition: xmlstorage.h:189
#define WS_OVERLAPPED
Definition: pedump.c:615
static int g_screen_width
Definition: win32.c:47
unsigned long DWORD
Definition: ntddk_ex.h:95
#define WS_HSCROLL
Definition: pedump.c:628
static int g_clip_right
Definition: win32.c:59
#define WM_APP
Definition: eventvwr.h:70
LPCSTR lpszClassName
Definition: winuser.h:3125
static int g_clip_left
Definition: win32.c:57
#define SW_SHOWNORMAL
Definition: winuser.h:764
#define GetModuleHandle
Definition: winbase.h:3641
#define WS_MINIMIZEBOX
Definition: pedump.c:631
INT x
Definition: msvc.h:62
#define WS_POPUP
Definition: pedump.c:616
#define WS_VSCROLL
Definition: pedump.c:627
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: win32.c:674
static int g_fullscreen
Definition: win32.c:51
WNDPROC lpfnWndProc
Definition: winuser.h:3117
LONG bottom
Definition: windef.h:299
#define RegisterClass
Definition: winuser.h:5702
#define LoadIcon
Definition: winuser.h:5679
static HINSTANCE g_Instance
Definition: win32.c:40
Arabic default style
Definition: afstyles.h:93
#define WS_SYSMENU
Definition: pedump.c:629
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
HICON hIcon
Definition: winuser.h:3121
int g_tcp_sck
Definition: uimain.c:51

◆ mi_destroy_cursor()

void mi_destroy_cursor ( void cursor)

Definition at line 1361 of file win32.c.

Referenced by ui_destroy_cursor().

1362 {
1363  if (g_cursor == cursor)
1364  {
1365  g_cursor = 0;
1366  }
1367  DestroyCursor(cursor);
1368 }
BOOL WINAPI DestroyCursor(_In_ HCURSOR)
Definition: cursoricon.c:2654
static HCURSOR g_cursor
Definition: win32.c:41

◆ mi_end_update()

void mi_end_update ( void  )

Definition at line 1188 of file win32.c.

Referenced by ui_end_update().

1189 {
1190 }

◆ mi_error()

void mi_error ( char msg)

Definition at line 131 of file win32.c.

Referenced by error().

132 {
133 #ifdef WITH_DEBUG
134  printf(msg);
135 #else /* WITH_DEBUG */
136  TCHAR lmsg[512];
137  TCHAR ltitle[512];
138 
139  str_to_uni(lmsg, msg);
140  str_to_uni(ltitle, "Error");
141  MessageBox(g_Wnd, lmsg, ltitle, MB_OK);
142 #endif /* WITH_DEBUG */
143 }
static HWND g_Wnd
Definition: win32.c:39
UINT msg
Definition: msvc.h:92
static void str_to_uni(TCHAR *sizex, char *size1)
Definition: win32.c:66
char TCHAR
Definition: xmlstorage.h:189
#define MessageBox
Definition: winuser.h:5688
#define MB_OK
Definition: winuser.h:784
#define printf
Definition: config.h:203

◆ mi_fill_rect()

void mi_fill_rect ( int  x,
int  y,
int  cx,
int  cy,
int  colour 
)

Definition at line 1194 of file win32.c.

Referenced by ui_rect().

1195 {
1196  HBRUSH brush;
1197  RECT rect;
1198  HDC maindc;
1199  HRGN rgn;
1200  int red;
1201  int green;
1202  int blue;
1203 
1204  if (g_server_depth == 8)
1205  {
1206  red = (pal_entries[colour & 0xff] & 0xff0000) >> 16;
1207  green = (pal_entries[colour & 0xff] & 0xff00) >> 8;
1208  blue = pal_entries[colour & 0xff] & 0xff;
1209  }
1210  else if (g_server_depth == 15)
1211  {
1212  SPLIT_COLOUR15(colour, red, green, blue);
1213  }
1214  else if (g_server_depth == 16)
1215  {
1216  SPLIT_COLOUR16(colour, red, green, blue);
1217  }
1218  else if (g_server_depth == 24 || g_server_depth == 32)
1219  {
1220  red = (colour>>16)&0xff;
1221  green = (colour>>8)&0xff;
1222  blue = colour&0xff;
1223  }
1224  maindc = GetWindowDC(g_Wnd);
1225  rgn = mi_clip(maindc);
1226  brush = CreateSolidBrush(RGB(red, green, blue));
1227  rect.left = x + g_xoff - g_xscroll;
1228  rect.top = y + g_yoff - g_yscroll;
1229  rect.right = rect.left + cx;
1230  rect.bottom = rect.top + cy;
1231  FillRect(maindc, &rect, brush);
1232  DeleteObject(brush);
1233  ReleaseDC(g_Wnd, maindc);
1234  DeleteObject(rgn);
1235 }
#define HDC
Definition: msvc.h:22
static int g_xoff
Definition: win32.c:43
#define SPLIT_COLOUR16(c, r, g, b)
Definition: uimain.h:50
int g_server_depth
Definition: uimain.c:41
#define HRGN
Definition: msvc.h:39
LONG top
Definition: windef.h:297
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
LONG left
Definition: windef.h:296
LONG right
Definition: windef.h:298
& rect
Definition: startmenu.cpp:1413
static HWND g_Wnd
Definition: win32.c:39
INT INT y
Definition: msvc.h:62
static HRGN mi_clip(HDC dc)
Definition: win32.c:737
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:570
GLclampf GLclampf blue
Definition: gl.h:1740
#define red
Definition: linetest.c:67
int pal_entries[]
Definition: uimain.c:52
#define RGB(r, g, b)
Definition: wingdi.h:2917
GLclampf green
Definition: gl.h:1740
static int g_yscroll
Definition: win32.c:46
INT x
Definition: msvc.h:62
HDC WINAPI GetWindowDC(_In_opt_ HWND)
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
static int g_xscroll
Definition: win32.c:45
_Out_opt_ int * cx
Definition: commctrl.h:570
static int g_yoff
Definition: win32.c:44
LONG bottom
Definition: windef.h:299
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
#define SPLIT_COLOUR15(c, r, g, b)
Definition: uimain.h:43

◆ mi_line()

void mi_line ( int  x1,
int  y1,
int  x2,
int  y2,
int  colour 
)

Definition at line 1239 of file win32.c.

Referenced by ui_line().

1240 {
1241  HPEN pen;
1242  HDC maindc;
1243  HGDIOBJ save;
1244  HRGN rgn;
1245  int red;
1246  int green;
1247  int blue;
1248 
1249  if (g_server_depth == 8)
1250  {
1251  red = (pal_entries[colour & 0xff] & 0xff0000) >> 16;
1252  green = (pal_entries[colour & 0xff] & 0xff00) >> 8;
1253  blue = pal_entries[colour & 0xff] & 0xff;
1254  }
1255  else if (g_server_depth == 15)
1256  {
1257  SPLIT_COLOUR15(colour, red, green, blue);
1258  }
1259  else if (g_server_depth == 16)
1260  {
1261  SPLIT_COLOUR16(colour, red, green, blue);
1262  }
1263  else if (g_server_depth == 24 || g_server_depth == 32)
1264  {
1265  red = (colour>>16)&0xff;
1266  green = (colour>>8)&0xff;
1267  blue = colour&0xff;
1268  }
1269  maindc = GetWindowDC(g_Wnd);
1270  rgn = mi_clip(maindc);
1271  pen = CreatePen(PS_SOLID, 0, RGB(red, green, blue));
1272  save = SelectObject(maindc, pen);
1273  MoveToEx(maindc, x1 + g_xoff - g_xscroll, y1 + g_yoff - g_yscroll, 0);
1274  LineTo(maindc, x2 + g_xoff - g_xscroll, y2 + g_yoff - g_yscroll);
1275  SelectObject(maindc, save);
1276  DeleteObject(pen);
1277  ReleaseDC(g_Wnd, maindc);
1278  DeleteObject(rgn);
1279 }
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG y1
Definition: winddi.h:3706
#define HDC
Definition: msvc.h:22
static int g_xoff
Definition: win32.c:43
HPEN WINAPI CreatePen(_In_ int, _In_ int, _In_ COLORREF)
#define SPLIT_COLOUR16(c, r, g, b)
Definition: uimain.h:50
int g_server_depth
Definition: uimain.c:41
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
Definition: winddi.h:3706
#define HRGN
Definition: msvc.h:39
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1497
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
BOOL WINAPI LineTo(_In_ HDC, _In_ int, _In_ int)
static HWND g_Wnd
Definition: win32.c:39
BOOL WINAPI MoveToEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
#define PS_SOLID
Definition: wingdi.h:584
static HRGN mi_clip(HDC dc)
Definition: win32.c:737
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
GLclampf GLclampf blue
Definition: gl.h:1740
#define red
Definition: linetest.c:67
int pal_entries[]
Definition: uimain.c:52
#define RGB(r, g, b)
Definition: wingdi.h:2917
GLclampf green
Definition: gl.h:1740
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG _In_ LONG y2
Definition: winddi.h:3706
static int g_yscroll
Definition: win32.c:46
HDC WINAPI GetWindowDC(_In_opt_ HWND)
static int g_xscroll
Definition: win32.c:45
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
Definition: winddi.h:3706
static int g_yoff
Definition: win32.c:44
#define SPLIT_COLOUR15(c, r, g, b)
Definition: uimain.h:43

◆ mi_main_loop()

int mi_main_loop ( void  )

Definition at line 834 of file win32.c.

Referenced by ui_main().

835 {
836  MSG msg;
837 
838  while (GetMessage(&msg, NULL, 0, 0))
839  {
840  TranslateMessage(&msg);
841  DispatchMessage(&msg);
842  }
843  return msg.wParam;
844 }
#define DispatchMessage
Definition: winuser.h:5631
BOOL WINAPI TranslateMessage(_In_ const MSG *)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
smooth NULL
Definition: ftsmooth.c:416
#define GetMessage
Definition: winuser.h:5656
#define msg(x)
Definition: auth_time.c:54

◆ mi_paint_rect()

void mi_paint_rect ( char data,
int  width,
int  height,
int  x,
int  y,
int  cx,
int  cy 
)

Definition at line 874 of file win32.c.

Referenced by ui_invalidate().

875 {
876  HBITMAP bitmap;
877  BITMAPINFO bi;
878  HDC dc;
879  HDC maindc;
880  HGDIOBJ save;
881  HRGN rgn;
882  void * bits;
883  int i;
884  int j;
885  int colour;
886  int red;
887  int green;
888  int blue;
889  int index;
890 
891  ZeroMemory(&bi, sizeof(bi));
892  bi.bmiHeader.biSize = sizeof(bi.bmiHeader);
893  bi.bmiHeader.biWidth = width;
894  bi.bmiHeader.biHeight = -height;
895  bi.bmiHeader.biPlanes = 1;
896  bi.bmiHeader.biBitCount = 32;
898  maindc = GetWindowDC(g_Wnd);
899  bitmap = CreateDIBSection(maindc, &bi, DIB_RGB_COLORS, (void **) &bits, 0, 0);
900  if (bitmap == 0)
901  {
902  mi_show_error("CreateDIBSection failed");
903  }
904 
905  if (g_server_depth == 8)
906  {
907  for (i = cy - 1; i >= 0; i--)
908  {
909  for (j = cx - 1; j >= 0; j--)
910  {
911  colour = ((unsigned char*)data)[i * cx + j];
912  red = (pal_entries[colour & 0xff] & 0xff0000) >> 16;
913  green = (pal_entries[colour & 0xff] & 0xff00) >> 8;
914  blue = pal_entries[colour & 0xff] & 0xff;
915  MAKE_COLOUR32(colour, red, green, blue);
916  ((unsigned int*)bits)[i * cx + j] = colour;
917  }
918  }
919  }
920  else if (g_server_depth == 15)
921  {
922  for (i = cy - 1; i >= 0; i--)
923  {
924  for (j = cx - 1; j >= 0; j--)
925  {
926  colour = ((unsigned short*)data)[i * cx + j];
927  SPLIT_COLOUR15(colour, red, green, blue);
928  MAKE_COLOUR32(colour, red, green, blue);
929  ((unsigned int*)bits)[i * cx + j] = colour;
930  }
931  }
932  }
933  else if (g_server_depth == 16)
934  {
935  for (i = cy - 1; i >= 0; i--)
936  {
937  for (j = cx - 1; j >= 0; j--)
938  {
939  colour = ((unsigned short*)data)[i * cx + j];
940  SPLIT_COLOUR16(colour, red, green, blue);
941  MAKE_COLOUR32(colour, red, green, blue);
942  ((unsigned int*)bits)[i * cx + j] = colour;
943  }
944  }
945  }
946  else if (g_server_depth == 24)
947  {
948  for (i = cy - 1; i >= 0; i--)
949  {
950  for (j = cx - 1; j >= 0; j--)
951  {
952  index = (i * cx + j) * 3;
953  red = ((unsigned char*)data)[index + 2];
954  green = ((unsigned char*)data)[index + 1];
955  blue = ((unsigned char*)data)[index];
956  MAKE_COLOUR32(colour, red, green, blue);
957  ((unsigned int*)bits)[i * cx + j] = colour;
958  }
959  }
960  }
961  else if (g_server_depth == 32)
962  {
963  memcpy(bits, data, cx*cy*4);
964  }
965  dc = CreateCompatibleDC(maindc);
966  if (dc == 0)
967  {
968  mi_show_error("CreateCompatibleDC failed");
969  }
970  save = SelectObject(dc, bitmap);
971  rgn = mi_clip(maindc);
972  BitBlt(maindc, x + g_xoff - g_xscroll, y + g_yoff - g_yscroll, cx, cy, dc,
973  0, 0, SRCCOPY);
974  SelectObject(dc, save);
975  DeleteObject(bitmap);
976  DeleteDC(dc);
977  ReleaseDC(g_Wnd, maindc);
978  DeleteObject(rgn);
979 
980 }
#define HDC
Definition: msvc.h:22
static int g_xoff
Definition: win32.c:43
GLint GLint GLsizei width
Definition: gl.h:1546
GLenum GLclampf GLint GLenum GLuint GLenum GLenum GLsizei GLenum const GLvoid GLfloat GLfloat GLfloat GLfloat GLclampd GLint GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean GLboolean GLboolean GLboolean GLint GLenum GLsizei const GLvoid GLenum GLint GLenum GLint GLint GLsizei GLint GLenum GLint GLint GLint GLint GLsizei GLenum GLsizei const GLuint GLboolean GLenum GLenum GLint GLsizei GLenum GLsizei GLenum const GLvoid GLboolean const GLboolean GLenum const GLdouble const GLfloat const GLdouble const GLfloat GLenum GLint GLint GLint GLint GLint GLint j
Definition: glfuncs.h:98
#define SPLIT_COLOUR16(c, r, g, b)
Definition: uimain.h:50
#define MAKE_COLOUR32(c, r, g, b)
Definition: uimain.h:66
#define HBITMAP
Definition: msvc.h:28
BITMAPINFOHEADER bmiHeader
Definition: wingdi.h:1453
int g_server_depth
Definition: uimain.c:41
#define HRGN
Definition: msvc.h:39
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1497
#define ZeroMemory
Definition: winbase.h:1635
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
HDC dc
Definition: cylfrac.c:34
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
static VOID NTAPI BitBlt(IN ULONG Left, IN ULONG Top, IN ULONG Width, IN ULONG Height, IN PUCHAR Buffer, IN ULONG BitsPerPixel, IN ULONG Delta)
Definition: vga.c:416
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
Definition: glext.h:10929
static HWND g_Wnd
Definition: win32.c:39
INT INT y
Definition: msvc.h:62
static HRGN mi_clip(HDC dc)
Definition: win32.c:737
GLenum GLclampf GLint i
Definition: glfuncs.h:14
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
DWORD biCompression
Definition: amvideo.idl:35
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:570
GLclampf GLclampf blue
Definition: gl.h:1740
#define red
Definition: linetest.c:67
int pal_entries[]
Definition: uimain.c:52
GLclampf green
Definition: gl.h:1740
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define index(s, c)
Definition: various.h:29
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
static int g_yscroll
Definition: win32.c:46
BOOL WINAPI DeleteDC(_In_ HDC)
INT x
Definition: msvc.h:62
HBITMAP WINAPI CreateDIBSection(HDC hDC, CONST BITMAPINFO *BitmapInfo, UINT Usage, VOID **Bits, HANDLE hSection, DWORD dwOffset)
Definition: bitmap.c:197
HDC WINAPI GetWindowDC(_In_opt_ HWND)
static int g_xscroll
Definition: win32.c:45
static void mi_show_error(char *caption)
Definition: win32.c:854
_Out_opt_ int * cx
Definition: commctrl.h:570
static int g_yoff
Definition: win32.c:44
static HBITMAP bitmap
Definition: clipboard.c:1344
#define DIB_RGB_COLORS
Definition: wingdi.h:365
#define BI_RGB
Definition: precomp.h:35
#define SRCCOPY
Definition: wingdi.h:331
#define SPLIT_COLOUR15(c, r, g, b)
Definition: uimain.h:43

◆ mi_read_keyboard_state()

int mi_read_keyboard_state ( void  )

Definition at line 232 of file win32.c.

Referenced by mi_check_modifier(), and read_keyboard_state().

233 {
234  short keydata;
235  int code;
236 
237  code = 0;
238  keydata = GetKeyState(VK_SCROLL);
239  if (keydata & 0x0001)
240  {
241  code |= 1;
242  }
243  keydata = GetKeyState(VK_NUMLOCK);
244  if (keydata & 0x0001)
245  {
246  code |= 2;
247  }
248  keydata = GetKeyState(VK_CAPITAL);
249  if (keydata & 0x0001)
250  {
251  code |= 4;
252  }
253  return code;
254 }
SHORT WINAPI GetKeyState(_In_ int)
int code
Definition: i386-dis.c:3591
#define VK_SCROLL
Definition: winuser.h:2234
#define VK_NUMLOCK
Definition: winuser.h:2233
#define VK_CAPITAL
Definition: winuser.h:2160

◆ mi_reset_clip()

void mi_reset_clip ( void  )

Definition at line 1335 of file win32.c.

Referenced by ui_reset_clip().

1336 {
1337  g_clip_left = 0;
1338  g_clip_top = 0;
1341 }
static int g_clip_top
Definition: win32.c:58
static int g_clip_bottom
Definition: win32.c:60
int g_width
Definition: uimain.c:42
int g_height
Definition: uimain.c:43
static int g_clip_right
Definition: win32.c:59
static int g_clip_left
Definition: win32.c:57

◆ mi_screen_copy()

void mi_screen_copy ( int  x,
int  y,
int  cx,
int  cy,
int  srcx,
int  srcy 
)

Definition at line 1283 of file win32.c.

Referenced by ui_screenblt().

1284 {
1285  RECT rect;
1286  RECT clip_rect;
1287  RECT draw_rect;
1288  HRGN rgn;
1289  int ok_to_ScrollWindowEx;
1290 
1291  ok_to_ScrollWindowEx = 1;
1292 
1293  if (!ok_to_ScrollWindowEx)
1294  {
1295  rgn = CreateRectRgn(x - g_xscroll, y - g_yscroll,
1296  (x - g_xscroll) + cx,
1297  (y - g_yscroll) + cy);
1298  InvalidateRgn(g_Wnd, rgn, 0);
1299  DeleteObject(rgn);
1300  }
1301  else
1302  {
1303  /* this is all in client coords */
1304  rect.left = srcx - g_xscroll;
1305  rect.top = srcy - g_yscroll;
1306  rect.right = rect.left + cx;
1307  rect.bottom = rect.top + cy;
1308  clip_rect.left = g_clip_left - g_xscroll;
1309  clip_rect.top = g_clip_top - g_yscroll;
1310  clip_rect.right = g_clip_right - g_xscroll;
1311  clip_rect.bottom = g_clip_bottom - g_yscroll;
1312  if (IntersectRect(&draw_rect, &clip_rect, &g_wnd_clip))
1313  {
1314  rgn = CreateRectRgn(0, 0, 0, 0);
1315  ScrollWindowEx(g_Wnd, x - srcx, y - srcy, &rect, &draw_rect,
1316  rgn, 0, SW_ERASE);
1317  InvalidateRgn(g_Wnd, rgn, 0);
1318  DeleteObject(rgn);
1319  }
1320  }
1321 }
static int g_clip_top
Definition: win32.c:58
static int g_clip_bottom
Definition: win32.c:60
#define HRGN
Definition: msvc.h:39
static RECT g_wnd_clip
Definition: win32.c:61
LONG top
Definition: windef.h:297
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
LONG left
Definition: windef.h:296
LONG right
Definition: windef.h:298
& rect
Definition: startmenu.cpp:1413
static HWND g_Wnd
Definition: win32.c:39
INT INT y
Definition: msvc.h:62
#define SW_ERASE
Definition: winuser.h:2534
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:570
int WINAPI ScrollWindowEx(_In_ HWND, _In_ int, _In_ int, _In_opt_ LPCRECT, _In_opt_ LPCRECT, _In_opt_ HRGN, _Out_opt_ LPRECT, _In_ UINT)
BOOL WINAPI InvalidateRgn(_In_ HWND, _In_opt_ HRGN, _In_ BOOL)
HRGN WINAPI CreateRectRgn(_In_ int, _In_ int, _In_ int, _In_ int)
static int g_clip_right
Definition: win32.c:59
BOOL WINAPI IntersectRect(_Out_ LPRECT, _In_ LPCRECT, _In_ LPCRECT)
static int g_clip_left
Definition: win32.c:57
static int g_yscroll
Definition: win32.c:46
INT x
Definition: msvc.h:62
static int g_xscroll
Definition: win32.c:45
_Out_opt_ int * cx
Definition: commctrl.h:570
LONG bottom
Definition: windef.h:299

◆ mi_set_clip()

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

Definition at line 1325 of file win32.c.

Referenced by ui_set_clip().

1326 {
1327  g_clip_left = x;
1328  g_clip_top = y;
1331 }
static int g_clip_top
Definition: win32.c:58
static int g_clip_bottom
Definition: win32.c:60
INT INT y
Definition: msvc.h:62
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:570
static int g_clip_right
Definition: win32.c:59
static int g_clip_left
Definition: win32.c:57
INT x
Definition: msvc.h:62
_Out_opt_ int * cx
Definition: commctrl.h:570

◆ mi_set_cursor()

void mi_set_cursor ( void cursor)

Definition at line 1372 of file win32.c.

Referenced by ui_set_cursor().

1373 {
1374  g_cursor = cursor;
1376 }
static HCURSOR g_cursor
Definition: win32.c:41
const char cursor[]
Definition: icontest.c:13
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)

◆ mi_set_null_cursor()

void mi_set_null_cursor ( void  )

Definition at line 1380 of file win32.c.

Referenced by ui_set_null_cursor().

1381 {
1382 }

◆ mi_warning()

void mi_warning ( char msg)

Definition at line 848 of file win32.c.

Referenced by unimpl(), and warning().

849 {
850 }

◆ rd_close_file()

void rd_close_file ( int  fd)

Definition at line 847 of file uimain.c.

848 {
849  return;
850 }

◆ rd_lock_file()

BOOL rd_lock_file ( int  fd,
int  start,
int  len 
)

Definition at line 875 of file uimain.c.

876 {
877  return False;
878 }
#define False
Definition: types.h:25

◆ rd_lseek_file()

int rd_lseek_file ( int  fd,
int  offset 
)

Definition at line 868 of file uimain.c.

869 {
870  return 0;
871 }

◆ rd_open_file()

int rd_open_file ( char filename)

Definition at line 840 of file uimain.c.

841 {
842  return 0;
843 }

◆ rd_pstcache_mkdir()

BOOL rd_pstcache_mkdir ( void  )

Definition at line 833 of file uimain.c.

834 {
835  return 0;
836 }

◆ rd_read_file()

int rd_read_file ( int  fd,
void ptr,
int  len 
)

Definition at line 854 of file uimain.c.

855 {
856  return 0;
857 }

◆ rd_write_file()

int rd_write_file ( int  fd,
void ptr,
int  len 
)

Definition at line 861 of file uimain.c.

862 {
863  return 0;
864 }

◆ read_keyboard_state()

uint32 read_keyboard_state ( void  )

Definition at line 632 of file uimain.c.

633 {
634  return (uint32) mi_read_keyboard_state();
635 }
int mi_read_keyboard_state(void)
Definition: win32.c:232
unsigned int uint32
Definition: types.h:32

◆ save_licence()

void save_licence ( uint8 data,
int  length 
)

Definition at line 723 of file uimain.c.

724 {
725 }

◆ ui_begin_update()

void ui_begin_update ( void  )

Definition at line 657 of file uimain.c.

658 {
659  mi_begin_update();
660 }
void mi_begin_update(void)
Definition: win32.c:1182

◆ ui_bell()

void ui_bell ( void  )

Definition at line 158 of file uimain.c.

159 {
160 }

◆ ui_create_bitmap()

void* ui_create_bitmap ( int  width,
int  height,
uint8 data 
)

Definition at line 277 of file uimain.c.

278 {
279  struct bitmap * b;
280  int size;
281 
282  size = width * height * ((g_server_depth + 7) / 8);
283  b = (struct bitmap *) xmalloc(sizeof(struct bitmap));
284  b->data = (uint8 *) xmalloc(size);
285  memcpy(b->data, data, size);
286  b->width = width;
287  b->height = height;
288  return b;
289 }
GLint GLint GLsizei width
Definition: gl.h:1546
int g_server_depth
Definition: uimain.c:41
#define b
Definition: ke_i.h:79
Definition: uimain.c:88
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLsizeiptr size
Definition: glext.h:5919
unsigned char uint8
Definition: types.h:28
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
void * xmalloc(int size)
Definition: uimain.c:747
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546

◆ ui_create_colourmap()

void* ui_create_colourmap ( COLOURMAP colours)

Definition at line 336 of file uimain.c.

337 {
338  int i;
339  int n;
340 
341  n = MIN(256, colours->ncolours);
342  memset(pal_entries, 0, sizeof(pal_entries));
343  for (i = 0; i < n; i++)
344  {
345  pal_entries[i] = (colours->colours[i].red << 16) |
346  (colours->colours[i].green << 8) |
347  colours->colours[i].blue;
348  }
349  return 0;
350 }
uint16 ncolours
Definition: types.h:66
T MIN(T a, T b)
Definition: polytest.cpp:79
GLuint n
Definition: s_context.h:57
GLenum GLclampf GLint i
Definition: glfuncs.h:14
uint8 blue
Definition: types.h:59
COLOURENTRY * colours
Definition: types.h:67
uint8 green
Definition: types.h:58
int pal_entries[256]
Definition: uimain.c:52
uint8 red
Definition: types.h:57
#define memset(x, y, z)
Definition: compat.h:39

◆ ui_create_cursor()

void* ui_create_cursor ( unsigned int  x,
unsigned int  y,
int  width,
int  height,
uint8 andmask,
uint8 xormask,
int  xor_bpp 
)

Definition at line 175 of file uimain.c.

Referenced by process_colour_pointer_common(), and process_colour_pointer_pdu().

178 {
179  int i;
180  int j;
181  char am[32 * 4];
182  char xm[32 * 4];
183 
184  if (width != 32 || height != 32)
185  {
186  return NULL;
187  }
188  if (xor_bpp==1)
189  {
190  return (void *) mi_create_cursor(x, y, width, height, (unsigned char *)andmask, (unsigned char *)xormask);
191  }
192  memset(am, 0, 32 * 4);
193  memset(xm, 0, 32 * 4);
194  for (i = 0; i < 32; i++)
195  {
196  for (j = 0; j < 32; j++)
197  {
198  if (bs_is_pixel_on((char *)andmask, j, i, 32, 1))
199  {
200  bs_set_pixel_on(am, j, 31 - i, 32, 1, 1);
201  }
202  if (bs_is_pixel_on((char *)xormask, j, i, 32, xor_bpp))
203  {
204  bs_set_pixel_on(xm, j, 31 - i, 32, 1, 1);
205  }
206  }
207  }
208  return (void *) mi_create_cursor(x, y, width, height, (unsigned char *)am, (unsigned char *)xm);
209 }
GLint GLint GLsizei width
Definition: gl.h:1546
GLenum GLclampf GLint GLenum GLuint GLenum GLenum GLsizei GLenum const GLvoid GLfloat GLfloat GLfloat GLfloat GLclampd GLint GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean GLboolean GLboolean GLboolean GLint GLenum GLsizei const GLvoid GLenum GLint GLenum GLint GLint GLsizei GLint GLenum GLint GLint GLint GLint GLsizei GLenum GLsizei const GLuint GLboolean GLenum GLenum GLint GLsizei GLenum GLsizei GLenum const GLvoid GLboolean const GLboolean GLenum const GLdouble const GLfloat const GLdouble const GLfloat GLenum GLint GLint GLint GLint GLint GLint j
Definition: glfuncs.h:98
INT INT y
Definition: msvc.h:62
GLenum GLclampf GLint i
Definition: glfuncs.h:14
int bs_is_pixel_on(char *data, int x, int y, int width, int bpp)
Definition: bsops.c:210
smooth NULL
Definition: ftsmooth.c:416
void bs_set_pixel_on(char *data, int x, int y, int width, int bpp, int pixel)
Definition: bsops.c:246
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
INT x
Definition: msvc.h:62
void * mi_create_cursor(unsigned int x, unsigned int y, int width, int height, unsigned char *andmask, unsigned char *xormask)
Definition: win32.c:1345
#define memset(x, y, z)
Definition: compat.h:39

◆ ui_create_glyph()

void* ui_create_glyph ( int  width,
int  height,
uint8 data 
)

Definition at line 234 of file uimain.c.

235 {
236  int i;
237  int j;
238  char * glyph_data;
239  struct bitmap * the_glyph;
240 
241  glyph_data = (char *) xmalloc(width * height);
242  memset(glyph_data, 0, width * height);
243  the_glyph = (struct bitmap *) xmalloc(sizeof(struct bitmap));
244  memset(the_glyph, 0, sizeof(struct bitmap));
245  the_glyph->width = width;
246  the_glyph->height = height;
247  the_glyph->data = (uint8 *)glyph_data;
248  for (i = 0; i < height; i++)
249  {
250  for (j = 0; j < width; j++)
251  {
252  if (bs_is_pixel_on((char *)data, j, i, width, 1))
253  {
254  bs_set_pixel_on(glyph_data, j, i, width, 8, 255);
255  }
256  }
257  }
258  return the_glyph;
259 }
GLint GLint GLsizei width
Definition: gl.h:1546
GLenum GLclampf GLint GLenum GLuint GLenum GLenum GLsizei GLenum const GLvoid GLfloat GLfloat GLfloat GLfloat GLclampd GLint GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean GLboolean GLboolean GLboolean GLint GLenum GLsizei const GLvoid GLenum GLint GLenum GLint GLint GLsizei GLint GLenum GLint GLint GLint GLint GLsizei GLenum GLsizei const GLuint GLboolean GLenum GLenum GLint GLsizei GLenum GLsizei GLenum const GLvoid GLboolean const GLboolean GLenum const GLdouble const GLfloat const GLdouble const GLfloat GLenum GLint GLint GLint GLint GLint GLint j
Definition: glfuncs.h:98
uint32 width
Definition: uimain.c:91
uint8 * data
Definition: uimain.c:90
GLenum GLclampf GLint i
Definition: glfuncs.h:14
int bs_is_pixel_on(char *data, int x, int y, int width, int bpp)
Definition: bsops.c:210
Definition: uimain.c:88
unsigned char uint8
Definition: types.h:28
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
void * xmalloc(int size)
Definition: uimain.c:747
void bs_set_pixel_on(char *data, int x, int y, int width, int bpp, int pixel)
Definition: bsops.c:246
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
uint32 height
Definition: uimain.c:92
#define memset(x, y, z)
Definition: compat.h:39

◆ ui_desktop_restore()

void ui_desktop_restore ( uint32  offset,
int  x,
int  y,
int  cx,
int  cy 
)

Definition at line 561 of file uimain.c.

562 {
563 }

◆ ui_desktop_save()

void ui_desktop_save ( uint32  offset,
int  x,
int  y,
int  cx,
int  cy 
)

Definition at line 567 of file uimain.c.

568 {
569 }

◆ ui_destblt()

void ui_destblt ( uint8  opcode,
int  x,
int  y,
int  cx,
int  cy 
)

Definition at line 607 of file uimain.c.

608 {
609  bs_rect(x, y, cx, cy, 0, opcode);
610  ui_invalidate(x, y, cx, cy);
611  /* todo */
612 }
GLenum GLclampf GLint GLenum GLuint GLenum GLenum GLsizei GLenum const GLvoid GLfloat GLfloat GLfloat GLfloat GLclampd GLint GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean GLboolean GLboolean GLboolean GLint GLenum GLsizei const GLvoid GLenum GLint GLenum GLint GLint GLsizei GLint GLenum GLint GLint GLint GLint GLsizei GLenum GLsizei const GLuint GLboolean GLenum GLenum GLint GLsizei GLenum GLsizei GLenum const GLvoid GLboolean const GLboolean GLenum const GLdouble const GLfloat const GLdouble const GLfloat GLenum GLint GLint GLint GLint GLint GLint GLenum GLfloat GLenum GLint GLenum GLsizei GLenum GLboolean GLenum GLdouble GLenum GLfloat GLenum GLenum GLfloat GLenum GLenum GLdouble GLenum GLenum GLint GLenum GLenum GLint GLenum GLuint GLenum GLvoid const GLubyte GLenum GLenum GLenum GLint GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLvoid GLenum GLint GLenum GLint GLenum GLenum GLint GLuint GLdouble GLfloat GLint GLshort GLubyte GLenum GLuint GLenum const GLfloat GLenum const GLint GLenum GLenum const GLfloat GLenum GLenum const GLint GLfloat const GLfloat GLenum opcode
Definition: glfuncs.h:172
INT INT y
Definition: msvc.h:62
void bs_rect(int x, int y, int cx, int cy, int colour, int rop)
Definition: bsops.c:386
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:570
INT x
Definition: msvc.h:62
void ui_invalidate(int x, int y, int cx, int cy)
Definition: uimain.c:138
_Out_opt_ int * cx
Definition: commctrl.h:570

◆ ui_destroy_bitmap()

void ui_destroy_bitmap ( void bmp)

Definition at line 293 of file uimain.c.

294 {
295  struct bitmap * b;
296 
297  b = (struct bitmap *) bmp;
298  if (b != 0)
299  {
300  xfree(b->data);
301  }
302  xfree(b);
303 }
uint8 * data
Definition: uimain.c:90
void xfree(void *in)
Definition: uimain.c:758
#define b
Definition: ke_i.h:79
Definition: uimain.c:88

◆ ui_destroy_cursor()

void ui_destroy_cursor ( void cursor)

Definition at line 213 of file uimain.c.

214 {
215  mi_destroy_cursor(cursor);
216 }
void mi_destroy_cursor(void *cursor)
Definition: win32.c:1361

◆ ui_destroy_glyph()

void ui_destroy_glyph ( void glyph)

Definition at line 263 of file uimain.c.

264 {
265  struct bitmap * the_glyph;
266 
267  the_glyph = glyph;
268  if (the_glyph != 0)
269  {
270  xfree(the_glyph->data);
271  }
272  xfree(the_glyph);
273 }
uint8 * data
Definition: uimain.c:90
void xfree(void *in)
Definition: uimain.c:758
Definition: uimain.c:88

◆ ui_draw_text()

void 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 
)

Definition at line 412 of file uimain.c.

417 {
418  int i;
419  int j;
420  int xyoffset;
421  DATABLOB * entry;
422  FONTGLYPH * glyph;
423 
424  if (boxx + boxcx > g_width)
425  {
426  boxcx = g_width - boxx;
427  }
428  if (boxcx > 1)
429  {
430  bs_rect(boxx, boxy, boxcx, boxcy, bgcolour, 0xc);
431  }
432  else
433  {
434  if (mixmode == MIX_OPAQUE)
435  {
436  bs_rect(clipx, clipy, clipcx, clipcy, bgcolour, 0xc);
437  }
438  }
439  /* Paint text, character by character */
440  for (i = 0; i < length;)
441  {
442  switch (text[i])
443  {
444  case 0xff:
445  if (i + 2 < length)
446  {
447  cache_put_text(text[i + 1], text, text[i + 2]);
448  }
449  else
450  {
451  error("this shouldn't be happening\n");
452  exit(1);
453  }
454  /* this will move pointer from start to first character after */
455  /* FF command */
456  length -= i + 3;
457  text = &(text[i + 3]);
458  i = 0;
459  break;
460  case 0xfe:
461  entry = cache_get_text(text[i + 1]);
462  if (entry != NULL)
463  {
464  if ((((uint8 *) (entry->data))[1] == 0) &&
465  (!(flags & TEXT2_IMPLICIT_X)))
466  {
467  if (flags & TEXT2_VERTICAL)
468  {
469  y += text[i + 2];
470  }
471  else
472  {
473  x += text[i + 2];
474  }
475  }
476  for (j = 0; j < entry->size; j++)
477  {
478  DO_GLYPH(((uint8 *) (entry->data)), j);
479  }
480  }
481  if (i + 2 < length)
482  {
483  i += 3;
484  }
485  else
486  {
487  i += 2;
488  }
489  length -= i;
490  /* this will move pointer from start to first character after */
491  /* FE command */
492  text = &(text[i]);
493  i = 0;
494  break;
495  default:
496  DO_GLYPH(text, i);
497  i++;
498  break;
499  }
500  }
501  if (boxcx > 1)
502  {
503  ui_invalidate(boxx, boxy, boxcx, boxcy);
504  }
505  else
506  {
507  ui_invalidate(clipx, clipy, clipcx, clipcy);
508  }
509 }
GLenum GLclampf GLint GLenum GLuint GLenum GLenum GLsizei GLenum const GLvoid GLfloat GLfloat GLfloat GLfloat GLclampd GLint GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean GLboolean GLboolean GLboolean GLint GLenum GLsizei const GLvoid GLenum GLint GLenum GLint GLint GLsizei GLint GLenum GLint GLint GLint GLint GLsizei GLenum GLsizei const GLuint GLboolean GLenum GLenum GLint GLsizei GLenum GLsizei GLenum const GLvoid GLboolean const GLboolean GLenum const GLdouble const GLfloat const GLdouble const GLfloat GLenum GLint GLint GLint GLint GLint GLint j
Definition: glfuncs.h:98
#define DO_GLYPH(ttext, idx)
Definition: uimain.c:369
int g_width
Definition: uimain.c:42
int size
Definition: types.h:124
#define TEXT2_IMPLICIT_X
Definition: constants.h:276
const WCHAR * text
Definition: package.c:1827
uint8_t entry
Definition: isohybrid.c:63
#define MIX_OPAQUE
Definition: constants.h:273
INT INT y
Definition: msvc.h:62
GLenum GLclampf GLint i
Definition: glfuncs.h:14
void bs_rect(int x, int y, int cx, int cy, int colour, int rop)
Definition: bsops.c:386
void cache_put_text(uint8 cache_id, void *data, int length)
Definition: cache.c:335
smooth NULL
Definition: ftsmooth.c:416
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
unsigned char uint8
Definition: types.h:28
GLbitfield flags
Definition: glext.h:7161
void * data
Definition: types.h:123
INT x
Definition: msvc.h:62
void ui_invalidate(int x, int y, int cx, int cy)
Definition: uimain.c:138
void error(char *format,...)
Definition: uimain.c:817
DATABLOB * cache_get_text(uint8 cache_id)
Definition: cache.c:325
void exit(int exitcode)
Definition: _exit.c:33
#define TEXT2_VERTICAL
Definition: constants.h:275

◆ ui_ellipse()

void ui_ellipse ( uint8  opcode,
uint8  fillmode,
int  x,
int  y,
int  cx,
int  cy,
BRUSH brush,
int  bgcolour,
int  fgcolour 
)

Definition at line 699 of file uimain.c.

702 {
703  /* not used */
704 }

◆ ui_end_update()

void ui_end_update ( void  )

Definition at line 664 of file uimain.c.

665 {
666  mi_end_update();
667 }
void mi_end_update(void)
Definition: win32.c:1188

◆ ui_get_numlock_state()

uint16 ui_get_numlock_state ( uint32  state)

Definition at line 622 of file uimain.c.

623 {
624  return (uint16) state;
625 }
static int state
Definition: maze.c:121
unsigned short uint16
Definition: types.h:30

◆ ui_invalidate()

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

Definition at line 138 of file uimain.c.

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

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
void mi_paint_rect(char *data, int width, int height, int x, int y, int cx, int cy)
Definition: win32.c:874
INT INT y
Definition: msvc.h:62
void xfree(void *in)
Definition: uimain.c:758
int g_server_depth
Definition: uimain.c:41
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:570
int bs_warp_coords(int *x, int *y, int *cx, int *cy, int *srcx, int *srcy)
Definition: bsops.c:331
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
void * xmalloc(int size)
Definition: uimain.c:747
INT x
Definition: msvc.h:62
_Out_opt_ int * cx
Definition: commctrl.h:570

◆ ui_key_down()

void ui_key_down ( int  key,
int  ext 
)

Definition at line 924 of file uimain.c.

Referenced by handle_WM_KEY().

926 {
928  (uint16) key, 0);
929 }
#define RDP_KEYPRESS
Definition: constants.h:251
char ext[3]
Definition: mkdosfs.c:358
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
Definition: path.c:42

◆ ui_key_up()

void ui_key_up ( int  key,
int  ext 
)

Definition at line 933 of file uimain.c.

Referenced by handle_WM_KEY().

934 {
936  (uint16) key, 0);
937 }
char ext[3]
Definition: mkdosfs.c:358
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
#define RDP_KEYRELEASE
Definition: constants.h:252
Definition: path.c:42

◆ ui_line()

void ui_line ( uint8  opcode,
int  startx,
int  starty,
int  endx,
int  endy,
PEN pen 
)

Definition at line 513 of file uimain.c.

Referenced by ui_polyline().

515 {
516  int x;
517  int y;
518  int cx;
519  int cy;
520 
521  bs_line(opcode, startx, starty, endx, endy, pen->width, pen->style,
522  pen->colour);
523  if (pen->style == 0 && pen->width < 2 && opcode == 12)
524  {
525  mi_line(startx, starty, endx, endy, pen->colour);
526  }
527  else
528  {
529  x = MIN(startx, endx);
530  y = MIN(starty, endy);
531  cx = (MAX(startx, endx) + 1) - x;
532  cy = (MAX(starty, endy) + 1) - y;
533  ui_invalidate(x, y, cx, cy);
534  }
535 }
GLenum GLclampf GLint GLenum GLuint GLenum GLenum GLsizei GLenum const GLvoid GLfloat GLfloat GLfloat GLfloat GLclampd GLint GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean GLboolean GLboolean GLboolean GLint GLenum GLsizei const GLvoid GLenum GLint GLenum GLint GLint GLsizei GLint GLenum GLint GLint GLint GLint GLsizei GLenum GLsizei const GLuint GLboolean GLenum GLenum GLint GLsizei GLenum GLsizei GLenum const GLvoid GLboolean const GLboolean GLenum const GLdouble const GLfloat const GLdouble const GLfloat GLenum GLint GLint GLint GLint GLint GLint GLenum GLfloat GLenum GLint GLenum GLsizei GLenum GLboolean GLenum GLdouble GLenum GLfloat GLenum GLenum GLfloat GLenum GLenum GLdouble GLenum GLenum GLint GLenum GLenum GLint GLenum GLuint GLenum GLvoid const GLubyte GLenum GLenum GLenum GLint GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLvoid GLenum GLint GLenum GLint GLenum GLenum GLint GLuint GLdouble GLfloat GLint GLshort GLubyte GLenum GLuint GLenum const GLfloat GLenum const GLint GLenum GLenum const GLfloat GLenum GLenum const GLint GLfloat const GLfloat GLenum opcode
Definition: glfuncs.h:172
void mi_line(int x1, int y1, int x2, int y2, int colour)
Definition: win32.c:1239
T MIN(T a, T b)
Definition: polytest.cpp:79
INT INT y
Definition: msvc.h:62
uint8 width
Definition: types.h:85
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:570
void bs_line(int opcode, int startx, int starty, int endx, int endy, int pen_width, int pen_style, int pen_colour)
Definition: bsops.c:661
uint32 colour
Definition: types.h:86
T MAX(T a, T b)
Definition: polytest.cpp:85
INT x
Definition: msvc.h:62
uint8 style
Definition: types.h:84
void ui_invalidate(int x, int y, int cx, int cy)
Definition: uimain.c:138
_Out_opt_ int * cx
Definition: commctrl.h:570

◆ ui_main()

int ui_main ( void  )

Definition at line 951 of file uimain.c.

Referenced by wWinMain().

952 {
953  uint32 flags;
954 
955  /* try to connect */
956  flags = RDP_LOGON_NORMAL;
957  if (g_password[0] != 0)
958  {
959  flags |= RDP_INFO_AUTOLOGON;
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 }
int mi_create_window(void)
Definition: win32.c:754
#define RDP_LOGON_NORMAL
Definition: precomp.h:24
char g_password[256]
Definition: uimain.c:28
int g_width
Definition: uimain.c:42
unsigned int uint32
Definition: types.h:32
char g_domain[256]
Definition: uimain.c:31
char g_shell[256]
Definition: uimain.c:29
char g_directory[256]
Definition: uimain.c:30
RD_BOOL rdp_connect(char *server, uint32 flags, char *domain, char *password, char *command, char *directory, RD_BOOL reconnect)
Definition: rdp.c:1742
int g_server_depth
Definition: uimain.c:41
int g_height
Definition: uimain.c:43
GLbitfield flags
Definition: glext.h:7161
char g_servername[256]
Definition: uimain.c:27
void bs_init(int width, int height, int bpp)
Definition: bsops.c:158
int mi_main_loop(void)
Definition: win32.c:834
#define RDP_INFO_AUTOLOGON
Definition: constants.h:335

◆ ui_memblt()

void ui_memblt ( uint8  opcode,
int  x,
int  y,
int  cx,
int  cy,
void src,
int  srcx,
int  srcy 
)

Definition at line 548 of file uimain.c.

Referenced by ui_paint_bitmap().

550 {
551  struct bitmap* b;
552 
553  b = (struct bitmap*)src;
554  bs_memblt(opcode, x, y, cx, cy, b->data, b->width, b->height,
555  srcx, srcy);
556  ui_invalidate(x, y, cx, cy);
557 }
void bs_memblt(int opcode, int x, int y, int cx, int cy, void *srcdata, int srcwidth, int srcheight, int srcx, int srcy)
Definition: bsops.c:560
uint32 width
Definition: uimain.c:91
GLenum GLclampf GLint GLenum GLuint GLenum GLenum GLsizei GLenum const GLvoid GLfloat GLfloat GLfloat GLfloat GLclampd GLint GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean GLboolean GLboolean GLboolean GLint GLenum GLsizei const GLvoid GLenum GLint GLenum GLint GLint GLsizei GLint GLenum GLint GLint GLint GLint GLsizei GLenum GLsizei const GLuint GLboolean GLenum GLenum GLint GLsizei GLenum GLsizei GLenum const GLvoid GLboolean const GLboolean GLenum const GLdouble const GLfloat const GLdouble const GLfloat GLenum GLint GLint GLint GLint GLint GLint GLenum GLfloat GLenum GLint GLenum GLsizei GLenum GLboolean GLenum GLdouble GLenum GLfloat GLenum GLenum GLfloat GLenum GLenum GLdouble GLenum GLenum GLint GLenum GLenum GLint GLenum GLuint GLenum GLvoid const GLubyte GLenum GLenum GLenum GLint GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLvoid GLenum GLint GLenum GLint GLenum GLenum GLint GLuint GLdouble GLfloat GLint GLshort GLubyte GLenum GLuint GLenum const GLfloat GLenum const GLint GLenum GLenum const GLfloat GLenum GLenum const GLint GLfloat const GLfloat GLenum opcode
Definition: glfuncs.h:172
uint8 * data
Definition: uimain.c:90
INT INT y
Definition: msvc.h:62
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:570
#define b
Definition: ke_i.h:79
Definition: uimain.c:88
uint32 height
Definition: uimain.c:92
INT x
Definition: msvc.h:62
void ui_invalidate(int x, int y, int cx, int cy)
Definition: uimain.c:138
_Out_opt_ int * cx
Definition: commctrl.h:570

◆ ui_mouse_button()

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

Definition at line 891 of file uimain.c.

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

892 {
893  uint16 flags;
894 
895  flags = 0;
896  if (down)
897  {
898  flags |= MOUSE_FLAG_DOWN;
899  }
900  switch (button)
901  {
902  case 1:
903  flags |= MOUSE_FLAG_BUTTON1;
904  break;
905  case 2:
906  flags |= MOUSE_FLAG_BUTTON2;
907  break;
908  case 3:
909  flags |= MOUSE_FLAG_BUTTON3;
910  break;
911  case 4:
912  flags |= MOUSE_FLAG_BUTTON4;
913  break;
914  case 5:
915  flags |= MOUSE_FLAG_BUTTON5;
916  break;
917  }
918  rdp_send_input(0, RDP_INPUT_MOUSE, flags, (uint16) x, (uint16) y);
919 }
#define MOUSE_FLAG_BUTTON1
Definition: constants.h:255
#define MOUSE_FLAG_BUTTON4
Definition: constants.h:258
#define down(mutex)
Definition: glue.h:29
INT INT y
Definition: msvc.h:62
#define MOUSE_FLAG_DOWN
Definition: constants.h:260
#define MOUSE_FLAG_BUTTON3
Definition: constants.h:257
void rdp_send_input(uint32 time, uint16 message_type, uint16 device_flags, uint16 param1, uint16 param2)
Definition: rdp.c:551
GLbitfield flags
Definition: glext.h:7161
#define MOUSE_FLAG_BUTTON5
Definition: constants.h:259
INT x
Definition: msvc.h:62
unsigned short uint16
Definition: types.h:30
#define MOUSE_FLAG_BUTTON2
Definition: constants.h:256

◆ ui_mouse_move()

void ui_mouse_move ( int  x,
int  y 
)

Definition at line 883 of file uimain.c.

Referenced by handle_WM_MOUSEMOVE().

884 {
886 }
INT INT y
Definition: msvc.h:62
void rdp_send_input(uint32 time, uint16 message_type, uint16 device_flags, uint16 param1, uint16 param2)
Definition: rdp.c:551
#define MOUSE_FLAG_MOVE
Definition: constants.h:254
INT x
Definition: msvc.h:62
unsigned short uint16
Definition: types.h:30

◆ ui_move_pointer()

void ui_move_pointer ( int  x,
int  y 
)

Definition at line 616 of file uimain.c.

617 {
618 }

◆ ui_paint_bitmap()

void ui_paint_bitmap ( int  x,
int  y,
int  cx,
int  cy,
int  width,
int  height,
uint8 data 
)

Definition at line 307 of file uimain.c.

309 {
310  struct bitmap b;
311 
312  b.width = width;
313  b.height = height;
314  b.data = data;
315  ui_memblt(12, x, y, cx, cy, &b, 0, 0);
316 }
GLint GLint GLsizei width
Definition: gl.h:1546
uint32 width
Definition: uimain.c:91
INT INT y
Definition: msvc.h:62
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:570
Definition: uimain.c:88
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
void ui_memblt(uint8 opcode, int x, int y, int cx, int cy, void *src, int srcx, int srcy)
Definition: uimain.c:548
INT x
Definition: msvc.h:62
_Out_opt_ int * cx
Definition: commctrl.h:570

◆ ui_patblt()

void ui_patblt ( uint8  opcode,
int  x,
int  y,
int  cx,
int  cy,
BRUSH brush,
int  bgcolour,
int  fgcolour 
)

Definition at line 597 of file uimain.c.

599 {
600  bs_patblt(opcode, x, y, cx, cy, brush->style, (char *)brush->pattern,
601  brush->xorigin, brush->yorigin, bgcolour, fgcolour);
602  ui_invalidate(x, y, cx, cy);
603 }
GLenum GLclampf GLint GLenum GLuint GLenum GLenum GLsizei GLenum const GLvoid GLfloat GLfloat GLfloat GLfloat GLclampd GLint GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean GLboolean GLboolean GLboolean GLint GLenum GLsizei const GLvoid GLenum GLint GLenum GLint GLint GLsizei GLint GLenum GLint GLint GLint GLint GLsizei GLenum GLsizei const GLuint GLboolean GLenum GLenum GLint GLsizei GLenum GLsizei GLenum const GLvoid GLboolean const GLboolean GLenum const GLdouble const GLfloat const GLdouble const GLfloat GLenum GLint GLint GLint GLint GLint GLint GLenum GLfloat GLenum GLint GLenum GLsizei GLenum GLboolean GLenum GLdouble GLenum GLfloat GLenum GLenum GLfloat GLenum GLenum GLdouble GLenum GLenum GLint GLenum GLenum GLint GLenum GLuint GLenum GLvoid const GLubyte GLenum GLenum GLenum GLint GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLvoid GLenum GLint GLenum GLint GLenum GLenum GLint GLuint GLdouble GLfloat GLint GLshort GLubyte GLenum GLuint GLenum const GLfloat GLenum const GLint GLenum GLenum const GLfloat GLenum GLenum const GLint GLfloat const GLfloat GLenum opcode
Definition: glfuncs.h:172
INT INT y
Definition: msvc.h:62
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:570
void bs_patblt(int opcode, int x, int y, int cx, int cy, int brush_style, char *brush_pattern, int brush_x_org, int brush_y_org, int bgcolour, int fgcolour)
Definition: bsops.c:744
INT x
Definition: msvc.h:62
void ui_invalidate(int x, int y, int cx, int cy)
Definition: uimain.c:138
_Out_opt_ int * cx
Definition: commctrl.h:570

◆ ui_polygon()

void ui_polygon ( uint8  opcode,
uint8  fillmode,
RD_POINT point,
int  npoints,
BRUSH brush,
int  bgcolour,
int  fgcolour 
)

Definition at line 671 of file uimain.c.

Referenced by process_polygon(), and process_polygon2().

673 {
674  /* not used */
675 }

◆ ui_polyline()

void ui_polyline ( uint8  opcode,
RD_POINT points,
int  npoints,
PEN pen 
)

Definition at line 679 of file uimain.c.

Referenced by process_polyline().

680 {
681  int i, x, y, dx, dy;
682  if (npoints > 0)
683  {
684  x = points[0].x;
685  y = points[0].y;
686  for (i = 1; i < npoints; i++)
687  {
688  dx = points[i].x;
689  dy = points[i].y;
690  ui_line(opcode, x, y, x + dx, y + dy, pen);
691  x = x + dx;
692  y = y + dy;
693  }
694  }
695 }
GLenum GLclampf GLint GLenum GLuint GLenum GLenum GLsizei GLenum const GLvoid GLfloat GLfloat GLfloat GLfloat GLclampd GLint GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean GLboolean GLboolean GLboolean GLint GLenum GLsizei const GLvoid GLenum GLint GLenum GLint GLint GLsizei GLint GLenum GLint GLint GLint GLint GLsizei GLenum GLsizei const GLuint GLboolean GLenum GLenum GLint GLsizei GLenum GLsizei GLenum const GLvoid GLboolean const GLboolean GLenum const GLdouble const GLfloat const GLdouble const GLfloat GLenum GLint GLint GLint GLint GLint GLint GLenum GLfloat GLenum GLint GLenum GLsizei GLenum GLboolean GLenum GLdouble GLenum GLfloat GLenum GLenum GLfloat GLenum GLenum GLdouble GLenum GLenum GLint GLenum GLenum GLint GLenum GLuint GLenum GLvoid const GLubyte GLenum GLenum GLenum GLint GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLvoid GLenum GLint GLenum GLint GLenum GLenum GLint GLuint GLdouble GLfloat GLint GLshort GLubyte GLenum GLuint GLenum const GLfloat GLenum const GLint GLenum GLenum const GLfloat GLenum GLenum const GLint GLfloat const GLfloat GLenum opcode
Definition: glfuncs.h:172
INT INT y
Definition: msvc.h:62
sint16 x
Definition: types.h:51
GLenum GLclampf GLint i
Definition: glfuncs.h:14
void ui_line(uint8 opcode, int startx, int starty, int endx, int endy, PEN *pen)
Definition: uimain.c:513
INT INT dy
Definition: msvc.h:65
INT x
Definition: msvc.h:62
sint16 y
Definition: types.h:51
INT dx
Definition: msvc.h:65

◆ ui_read_wire()

int ui_read_wire ( void  )

Definition at line 942 of file uimain.c.

Referenced by check_sck().

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

◆ ui_rect()

void ui_rect ( int  x,
int  y,
int  cx,
int  cy,
int  colour 
)

Definition at line 573 of file uimain.c.

574 {
575  bs_rect(x, y, cx, cy, colour, 12);
576  mi_fill_rect(x, y, cx, cy, colour);
577 }
INT INT y
Definition: msvc.h:62
void bs_rect(int x, int y, int cx, int cy, int colour, int rop)
Definition: bsops.c:386
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:570
INT x
Definition: msvc.h:62
_Out_opt_ int * cx
Definition: commctrl.h:570
void mi_fill_rect(int x, int y, int cx, int cy, int colour)
Definition: win32.c:1194

◆ ui_reset_clip()

void ui_reset_clip ( void  )

Definition at line 328 of file uimain.c.

329 {
330  bs_reset_clip();
331  mi_reset_clip();
332 }
void mi_reset_clip(void)
Definition: win32.c:1335
void bs_reset_clip(void)
Definition: bsops.c:199

◆ ui_resize_window()

void ui_resize_window ( void  )

Definition at line 651 of file uimain.c.

652 {
653 }

◆ ui_screenblt()

void ui_screenblt ( uint8  opcode,
int  x,
int  y,
int  cx,
int  cy,
int  srcx,
int  srcy 
)

Definition at line 581 of file uimain.c.

583 {
584  bs_screenblt(opcode, x, y, cx, cy, srcx, srcy);
585  if (opcode == 12)
586  {
587  mi_screen_copy(x, y, cx, cy, srcx, srcy);
588  }
589  else
590  {
591  ui_invalidate(x, y, cx, cy);
592  }
593 }
GLenum GLclampf GLint GLenum GLuint GLenum GLenum GLsizei GLenum const GLvoid GLfloat GLfloat GLfloat GLfloat GLclampd GLint GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean GLboolean GLboolean GLboolean GLint GLenum GLsizei const GLvoid GLenum GLint GLenum GLint GLint GLsizei GLint GLenum GLint GLint GLint GLint GLsizei GLenum GLsizei const GLuint GLboolean GLenum GLenum GLint GLsizei GLenum GLsizei GLenum const GLvoid GLboolean const GLboolean GLenum const GLdouble const GLfloat const GLdouble const GLfloat GLenum GLint GLint GLint GLint GLint GLint GLenum GLfloat GLenum GLint GLenum GLsizei GLenum GLboolean GLenum GLdouble GLenum GLfloat GLenum GLenum GLfloat GLenum GLenum GLdouble GLenum GLenum GLint GLenum GLenum GLint GLenum GLuint GLenum GLvoid const GLubyte GLenum GLenum GLenum GLint GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLvoid GLenum GLint GLenum GLint GLenum GLenum GLint GLuint GLdouble GLfloat GLint GLshort GLubyte GLenum GLuint GLenum const GLfloat GLenum const GLint GLenum GLenum const GLfloat GLenum GLenum const GLint GLfloat const GLfloat GLenum opcode
Definition: glfuncs.h:172
INT INT y
Definition: msvc.h:62
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:570
void mi_screen_copy(int x, int y, int cx, int cy, int srcx, int srcy)
Definition: win32.c:1283
INT x
Definition: msvc.h:62
void ui_invalidate(int x, int y, int cx, int cy)
Definition: uimain.c:138
_Out_opt_ int * cx
Definition: commctrl.h:570
void bs_screenblt(int rop, int x, int y, int cx, int cy, int srcx, int srcy)
Definition: bsops.c:469

◆ ui_select()

int ui_select ( int  in)

Definition at line 164 of file uimain.c.

165 {
166  if (g_tcp_sck == 0)
167  {
168  g_tcp_sck = in;
169  }
170  return 1;
171 }
int g_tcp_sck
Definition: uimain.c:51
GLfloat CONST GLvector4f * in
Definition: m_xform.h:122

◆ ui_set_clip()

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

Definition at line 320 of file uimain.c.

321 {
322  bs_set_clip(x, y, cx, cy);
323  mi_set_clip(x, y, cx, cy);
324 }
void mi_set_clip(int x, int y, int cx, int cy)
Definition: win32.c:1325
INT INT y
Definition: msvc.h:62
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:570
INT x
Definition: msvc.h:62
void bs_set_clip(int x, int y, int cx, int cy)
Definition: bsops.c:189
_Out_opt_ int * cx
Definition: commctrl.h:570

◆ ui_set_colourmap()

void ui_set_colourmap ( void map)

Definition at line 354 of file uimain.c.

355 {
356 }

◆ ui_set_cursor()

void ui_set_cursor ( void cursor)

Definition at line 220 of file uimain.c.

221 {
222  mi_set_cursor(cursor);
223 }
void mi_set_cursor(void *cursor)
Definition: win32.c:1372

◆ ui_set_modifier_state()

void ui_set_modifier_state ( int  code)

Definition at line 639 of file uimain.c.

Referenced by mi_check_modifier().

641 {
642 
643  //error("%8.8x", code);
644 
646 
647 }
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

◆ ui_set_null_cursor()

void ui_set_null_cursor ( void  )

Definition at line 227 of file uimain.c.

228 {
230 }
void mi_set_null_cursor(void)
Definition: win32.c:1380

◆ ui_triblt()

void ui_triblt ( uint8  opcode,
int  x,
int  y,
int  cx,
int  cy,
void src,
int  srcx,
int  srcy,
BRUSH brush,
int  bgcolour,
int  fgcolour 
)

Definition at line 539 of file uimain.c.

542 {
543  /* not used */
544 }

◆ unimpl()

void unimpl ( char format,
  ... 
)

Definition at line 801 of file uimain.c.

802 {
803  va_list ap;
804  char text[512];
805  char text1[512];
806 
807  sprintf(text1, "UNIMPL: ");
808  va_start(ap, format);
809  vsprintf(text, format, ap);
810  va_end(ap);
811  strcat(text1, text);
812  mi_warning(text1);
813 }
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
const WCHAR * text
Definition: package.c:1827
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define sprintf(buf, format,...)
Definition: sprintf.c:55
#define va_end(ap)
Definition: acmsvcex.h:90
char * va_list
Definition: acmsvcex.h:78
int __cdecl vsprintf(char *_Dest, const char *_Format, va_list _Args)
Definition: sprintf.c:733
#define va_start(ap, A)
Definition: acmsvcex.h:91
void int int ULONGLONG int va_list * ap
Definition: winesup.h:32
void mi_warning(char *msg)
Definition: win32.c:848

◆ warning()

void warning ( char format,
  ... 
)

Definition at line 785 of file uimain.c.

786 {
787  va_list ap;
788  char text[512];
789  char text1[512];
790 
791  sprintf(text1, "WARNING: ");
792  va_start(ap, format);
793  vsprintf(text, format, ap);
794  va_end(ap);
795  strcat(text1, text);
796  mi_warning(text1);
797 }
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
const WCHAR * text
Definition: package.c:1827
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define sprintf(buf, format,...)
Definition: sprintf.c:55
#define va_end(ap)
Definition: acmsvcex.h:90
char * va_list
Definition: acmsvcex.h:78
int __cdecl vsprintf(char *_Dest, const char *_Format, va_list _Args)
Definition: sprintf.c:733
#define va_start(ap, A)
Definition: acmsvcex.h:91
void int int ULONGLONG int va_list * ap
Definition: winesup.h:32
void mi_warning(char *msg)
Definition: win32.c:848

◆ xfree()

void xfree ( void in)

Definition at line 758 of file uimain.c.

Referenced by ui_destroy_bitmap(), ui_destroy_glyph(), and ui_invalidate().

759 {
760  if (in != 0)
761  {
762  free(in);
763  }
764 }
#define free
Definition: debug_ros.c:5

◆ xmalloc()

void* xmalloc ( int  size)

Definition at line 747 of file uimain.c.

Referenced by ui_create_bitmap(), ui_create_glyph(), ui_invalidate(), and xstrdup().

748 {
749  if (size < 1)
750  {
751  size = 1;
752  }
753  return malloc(size);
754 }
GLsizeiptr size
Definition: glext.h:5919
#define malloc
Definition: debug_ros.c:4

◆ xrealloc()

void* xrealloc ( void in,
size_t  size 
)

Definition at line 736 of file uimain.c.

737 {
738  if (size < 1)
739  {
740  size = 1;
741  }
742  return realloc(in, size);
743 }
#define realloc
Definition: debug_ros.c:6
GLsizeiptr size
Definition: glext.h:5919

◆ xstrdup()

char* xstrdup ( const char s)

Definition at line 768 of file uimain.c.

769 {
770  int len;
771  char * p;
772 
773  if (s == 0)
774  {
775  return 0;
776  }
777  len = strlen(s);
778  p = (char *) xmalloc(len + 1);
779  strcpy(p, s);
780  return p;
781 }
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
GLenum GLsizei len
Definition: glext.h:6722
GLdouble s
Definition: gl.h:2039
void * xmalloc(int size)
Definition: uimain.c:747
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
GLfloat GLfloat p
Definition: glext.h:8902

Variable Documentation

◆ g_bitmap_cache

RD_BOOL g_bitmap_cache = True

Definition at line 39 of file uimain.c.

◆ g_bitmap_cache_persist_enable

RD_BOOL g_bitmap_cache_persist_enable = False

Definition at line 37 of file uimain.c.

◆ g_bitmap_cache_precache

RD_BOOL g_bitmap_cache_precache = True

Definition at line 38 of file uimain.c.

◆ g_bitmap_compression

RD_BOOL g_bitmap_compression = True

Definition at line 34 of file uimain.c.

◆ g_client_random

uint8 g_client_random[SEC_RANDOM_SIZE]

Definition at line 78 of file uimain.c.

Referenced by rdp_send_logon_info(), and sec_process_crypt_info().

◆ g_console_session

RD_BOOL g_console_session = False

Definition at line 48 of file uimain.c.

◆ g_deactivated

int g_deactivated = 0
static

Definition at line 71 of file uimain.c.

Referenced by ui_read_wire().

◆ g_desktop_save

RD_BOOL g_desktop_save = False

Definition at line 32 of file uimain.c.

◆ g_directory

char g_directory[256] = ""

Definition at line 30 of file uimain.c.

Referenced by ui_main().

◆ g_domain

char g_domain[256] = ""

Definition at line 31 of file uimain.c.

Referenced by SetDomainAndUsername(), and ui_main().

◆ g_encryption

RD_BOOL g_encryption = True

Definition at line 40 of file uimain.c.

◆ g_encryption_initial

RD_BOOL g_encryption_initial = True

Definition at line 75 of file uimain.c.

Referenced by iso_reset_state().

◆ g_ext_disc_reason

uint32 g_ext_disc_reason = 0
static

Definition at line 72 of file uimain.c.

Referenced by ui_read_wire().

◆ g_has_reconnect_random

RD_BOOL g_has_reconnect_random = False

Definition at line 85 of file uimain.c.

Referenced by process_pdu_logon(), and rdp_send_logon_info().

◆ g_height

int g_height = 600

Definition at line 43 of file uimain.c.

Referenced by ui_main().

◆ g_hostname

char g_hostname[256] = ""

Definition at line 26 of file uimain.c.

◆ g_keyboard_functionkeys

int g_keyboard_functionkeys = 0xc

Definition at line 47 of file uimain.c.

◆ g_keyboard_subtype

int g_keyboard_subtype = 0x0

Definition at line 46 of file uimain.c.

◆ g_keyboard_type

int g_keyboard_type = 0x4

Definition at line 45 of file uimain.c.

◆ g_keylayout

uint32 g_keylayout = 0x409

Definition at line 44 of file uimain.c.

◆ g_network_error

RD_BOOL g_network_error = False

Definition at line 77 of file uimain.c.

Referenced by rdp_connect(), tcp_recv(), and tcp_send().

◆ g_numlock_sync

RD_BOOL g_numlock_sync = False

Definition at line 80 of file uimain.c.

Referenced by process_demand_active().

◆ g_password

char g_password[256] = ""

Definition at line 28 of file uimain.c.

Referenced by rdp_loop(), ui_main(), and wWinMain().

◆ g_pending_resize

RD_BOOL g_pending_resize = False

Definition at line 79 of file uimain.c.

Referenced by rdp_main_loop().

◆ g_polygon_ellipse_orders

RD_BOOL g_polygon_ellipse_orders = False

Definition at line 33 of file uimain.c.

◆ g_rdp5_performanceflags

uint32 g_rdp5_performanceflags
Initial value:
=
#define PERF_DISABLE_CURSOR_SHADOW
Definition: constants.h:349
#define PERF_DISABLE_FULLWINDOWDRAG
Definition: constants.h:346
#define PERF_DISABLE_MENUANIMATIONS
Definition: constants.h:347
#define PERF_DISABLE_WALLPAPER
Definition: constants.h:345

Definition at line 35 of file uimain.c.

◆ g_rdp_version

◆ g_reconnect_logonid

uint32 g_reconnect_logonid = 0

Definition at line 82 of file uimain.c.

Referenced by process_pdu_logon(), and rdp_send_logon_info().

◆ g_reconnect_loop

RD_BOOL g_reconnect_loop = False

Definition at line 86 of file uimain.c.

Referenced by tcp_connect().

◆ g_reconnect_random

char g_reconnect_random[16]

Definition at line 83 of file uimain.c.

Referenced by process_pdu_logon(), and rdp_send_logon_info().

◆ g_reconnect_random_ts

time_t g_reconnect_random_ts

Definition at line 84 of file uimain.c.

Referenced by process_pdu_logon().

◆ g_redirect

RD_BOOL g_redirect = False

Definition at line 55 of file uimain.c.

◆ g_redirect_cookie

uint8 g_redirect_cookie[256]

Definition at line 64 of file uimain.c.

◆ g_redirect_cookie_len

uint32 g_redirect_cookie_len

Definition at line 65 of file uimain.c.

Referenced by process_redirect_pdu(), and rdp_send_logon_info().

◆ g_redirect_domain

char g_redirect_domain[256]

Definition at line 58 of file uimain.c.

◆ g_redirect_domain_len

uint32 g_redirect_domain_len

Definition at line 59 of file uimain.c.

Referenced by process_redirect_pdu().

◆ g_redirect_flags

uint32 g_redirect_flags = 0

Definition at line 66 of file uimain.c.

◆ g_redirect_lb_info

uint8 g_redirect_lb_info[256]

Definition at line 62 of file uimain.c.

Referenced by process_redirect_pdu().

◆ g_redirect_lb_info_len

uint32 g_redirect_lb_info_len

Definition at line 63 of file uimain.c.

Referenced by process_redirect_pdu().

◆ g_redirect_server

char g_redirect_server[256]

Definition at line 56 of file uimain.c.

◆ g_redirect_server_len

uint32 g_redirect_server_len

Definition at line 57 of file uimain.c.

Referenced by process_redirect_pdu().

◆ g_redirect_session_id

uint32 g_redirect_session_id = 0

Definition at line 67 of file uimain.c.

Referenced by process_redirect_pdu(), and sec_out_mcs_data().

◆ g_redirect_username

char g_redirect_username[256]

Definition at line 60 of file uimain.c.

◆ g_redirect_username_len

uint32 g_redirect_username_len

Definition at line 61 of file uimain.c.

Referenced by process_redirect_pdu().

◆ g_server_depth

int g_server_depth = 16

Definition at line 41 of file uimain.c.

Referenced by ui_create_bitmap(), ui_invalidate(), and ui_main().

◆ g_servername

char g_servername[256] = ""

Definition at line 27 of file uimain.c.

Referenced by ui_main().

◆ g_shell

char g_shell[256] = ""

Definition at line 29 of file uimain.c.

Referenced by ui_main().

◆ g_tcp_port_rdp

int g_tcp_port_rdp

Definition at line 75 of file tcp.c.

◆ g_tcp_sck

int g_tcp_sck = 0

Definition at line 51 of file uimain.c.

Referenced by check_sck(), mi_create_window(), and ui_select().

◆ g_user_quit

RD_BOOL g_user_quit = False

Definition at line 76 of file uimain.c.

Referenced by tcp_recv().

◆ g_username

char g_username[256] = ""

Definition at line 25 of file uimain.c.

◆ g_width

int g_width = 800

Definition at line 42 of file uimain.c.

Referenced by ui_draw_text(), and ui_main().

◆ pal_entries

int pal_entries[256]

Definition at line 52 of file uimain.c.

Referenced by IntAnimatePalette(), mi_fill_rect(), mi_line(), mi_paint_rect(), and ui_create_colourmap().