ReactOS 0.4.15-dev-7924-g5949c20
RdpClientUI Class Reference
Collaboration diagram for RdpClientUI:

Public Member Functions

HRESULT Initialize (HWND hwndParent)
 
void Display_SetClip (int x, int y, int cx, int cy)
 
void Display_ResetClip ()
 
void Display_PaintBitmap (int x, int y, int cx, int cy, int width, int height, uint8 *data)
 
void Display_DestBlt (uint8 opcode, int x, int y, int cx, int cy)
 
void Display_PatBlt (uint8 opcode, int x, int y, int cx, int cy, BRUSH *brush, int bgcolour, int fgcolour)
 
void Display_ScreenBlt (uint8 opcode, int x, int y, int cx, int cy, int srcx, int srcy)
 
void Display_MemBlt (uint8 opcode, int x, int y, int cx, int cy, HBITMAP src, int srcx, int srcy)
 
void Display_TriBlt (uint8 opcode, int x, int y, int cx, int cy, HBITMAP src, int srcx, int srcy, BRUSH *brush, int bgcolour, int fgcolour)
 
void Display_Line (uint8 opcode, int startx, int starty, int endx, int endy, PEN *pen)
 
void Display_Rect (int x, int y, int cx, int cy, int colour)
 
void Display_Polygon (uint8 opcode, uint8 fillmode, POINT *point, int npoints, BRUSH *brush, int bgcolour, int fgcolour)
 
void Display_Polyline (uint8 opcode, POINT *points, int npoints, PEN *pen)
 
void Display_Ellypse (uint8 opcode, uint8 fillmode, int x, int y, int cx, int cy, BRUSH *brush, int bgcolour, int fgcolour)
 
void Display_DrawGlyph (int mixmode, int x, int y, int cx, int cy, HGLYPH glyph, int srcx, int srcy, int bgcolour, int fgcolour)
 
void Display_DoGlyph (uint8 font, uint8 flags, int mixmode, int &x, int &y, int bgcolour, int fgcolour, const uint8 *ttext, int &idx)
 
void Display_DrawText (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 Display_SaveDesktop (uint32 offset, int x, int y, int cx, int cy)
 
void Display_RestoreDesktop (uint32 offset, int x, int y, int cx, int cy)
 
void Display_BeginUpdate ()
 
void Display_EndUpdate ()
 
LRESULT InputWindowProc (UINT uMsg, WPARAM wParam, LPARAM lParam)
 

Static Public Member Functions

static BOOL Startup ()
 
static void Shutdown ()
 

Public Attributes

HWND m_inputWindow
 
HCURSOR m_inputCursor
 

Private Member Functions

LRESULT UIWindowProc (UINT uMsg, WPARAM wParam, LPARAM lParam)
 
LRESULT ConsoleWindowProc (UINT uMsg, WPARAM wParam, LPARAM lParam)
 
LRESULT DisplayWindowProc (UINT uMsg, WPARAM wParam, LPARAM lParam)
 
void Display_RepaintRect (const RECT *lprc)
 
void Display_RepaintArea (int x, int y, int cx, int cy)
 
void Display_RepaintPolygon (POINT *point, int npoints, int linewidth)
 
void Display_RepaintAll ()
 

Private Attributes

HWND m_uiWindow
 
LONG m_scrollHPos
 
LONG m_scrollVPos
 
HWND m_fullScreenBarWindow
 
HWND m_consoleWindow
 
LONG m_consoleX
 
LONG m_consoleY
 
LONG m_consoleWidth
 
LONG m_consoleHeight
 
bool m_smartSizing
 
HWND m_displayWindow
 
LONG m_displayBufferWidth
 
LONG m_displayBufferHeight
 
HDC m_displayBuffer
 
voidm_displayBufferRaw
 
int m_displayBufferSave
 
int m_displayBufferBitDepth
 
int m_displayBufferByteDepth
 
int m_displayBufferStride
 
RECT m_displayBufferClip
 
CRITICAL_SECTION m_displayBufferMutex
 

Detailed Description

Definition at line 300 of file activex.cpp.

Member Function Documentation

◆ ConsoleWindowProc()

LRESULT RdpClientUI::ConsoleWindowProc ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
inlineprivate

Definition at line 485 of file activex.cpp.

486 {
487 switch(uMsg)
488 {
489 case WM_SIZE:
490 {
491 RECT rcClient;
492 GetClientRect(m_consoleWindow, &rcClient);
493
494 MoveWindow(m_inputWindow, 0, 0, rcClient.right, rcClient.bottom, TRUE);
495 MoveWindow(m_displayWindow, 0, 0, rcClient.right, rcClient.bottom, TRUE);
496 }
497
498 return 0;
499
500 default:
501 break;
502 }
503
505 }
HWND m_displayWindow
Definition: activex.cpp:513
HWND m_consoleWindow
Definition: activex.cpp:478
HWND m_inputWindow
Definition: activex.cpp:1163
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define TRUE
Definition: types.h:120
#define DefWindowProc
Definition: ros2win.h:31
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
#define WM_SIZE
Definition: winuser.h:1611
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)

◆ Display_BeginUpdate()

void RdpClientUI::Display_BeginUpdate ( )
inline

Definition at line 1144 of file activex.cpp.

1145 {
1148 }
int m_displayBufferSave
Definition: activex.cpp:518
HDC m_displayBuffer
Definition: activex.cpp:516
CRITICAL_SECTION m_displayBufferMutex
Definition: activex.cpp:523
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
int WINAPI SaveDC(_In_ HDC)

◆ Display_DestBlt()

void RdpClientUI::Display_DestBlt ( uint8  opcode,
int  x,
int  y,
int  cx,
int  cy 
)
inline

Definition at line 711 of file activex.cpp.

712 {
713 int dcsave = SaveDC(m_displayBuffer);
715 PatBlt(m_displayBuffer, x, y, cx, cy, MAKELONG(0, opcode));
716 RestoreDC(m_displayBuffer, dcsave);
718 }
void Display_RepaintArea(int x, int y, int cx, int cy)
Definition: activex.cpp:616
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:586
_Out_opt_ int * cx
Definition: commctrl.h:585
#define MAKELONG(a, b)
Definition: typedefs.h:249
HGDIOBJ WINAPI GetStockObject(_In_ int)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1539
BOOL WINAPI RestoreDC(_In_ HDC, _In_ int)
BOOL WINAPI PatBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
#define BLACK_BRUSH
Definition: wingdi.h:896

◆ Display_DoGlyph()

void RdpClientUI::Display_DoGlyph ( uint8  font,
uint8  flags,
int  mixmode,
int x,
int y,
int  bgcolour,
int  fgcolour,
const uint8 ttext,
int idx 
)
inline

Definition at line 938 of file activex.cpp.

939 {
940 FONTGLYPH * glyph;
941
942 glyph = cache_get_font(/*This*/NULL, font, ttext[idx]);
943
944 if(!(flags & TEXT2_IMPLICIT_X))
945 {
946 int xyoffset = ttext[++ idx];
947
948 if((xyoffset & 0x80))
949 {
950 if (flags & TEXT2_VERTICAL)
951 y += ttext[idx + 1] | (ttext[idx + 2] << 8);
952 else
953 x += ttext[idx + 1] | (ttext[idx + 2] << 8);
954
955 idx += 2;
956 }
957 else
958 {
959 if (flags & TEXT2_VERTICAL)
960 y += xyoffset;
961 else
962 x += xyoffset;
963 }
964 }
965
966 if(glyph)
967 {
969 (
970 mixmode,
971 x + (short)glyph->offset,
972 y + (short)glyph->baseline,
973 glyph->width,
974 glyph->height,
975 glyph->pixmap,
976 0,
977 0,
978 bgcolour,
979 fgcolour
980 );
981
983 x += glyph->width;
984 }
985 }
FONTGLYPH * cache_get_font(uint8 font, uint16 character)
Definition: cache.c:279
#define TEXT2_IMPLICIT_X
Definition: constants.h:276
#define TEXT2_VERTICAL
Definition: constants.h:275
void Display_DrawGlyph(int mixmode, int x, int y, int cx, int cy, HGLYPH glyph, int srcx, int srcy, int bgcolour, int fgcolour)
Definition: activex.cpp:892
#define NULL
Definition: types.h:112
unsigned int idx
Definition: utils.c:41
GLbitfield flags
Definition: glext.h:7161
Definition: mk_font.cpp:20
uint16 width
Definition: types.h:114
sint16 baseline
Definition: types.h:113
uint16 height
Definition: types.h:115
sint16 offset
Definition: types.h:112
RD_HBITMAP pixmap
Definition: types.h:116

Referenced by Display_DrawText().

◆ Display_DrawGlyph()

void RdpClientUI::Display_DrawGlyph ( int  mixmode,
int  x,
int  y,
int  cx,
int  cy,
HGLYPH  glyph,
int  srcx,
int  srcy,
int  bgcolour,
int  fgcolour 
)
inline

Definition at line 892 of file activex.cpp.

893 {
894 HBITMAP hbmGlyph = (HBITMAP)glyph;
896 HGDIOBJ hOld = SelectObject(hdcGlyph, hbmGlyph);
897
898 int dcsave = SaveDC(m_displayBuffer);
899
900 switch(mixmode)
901 {
902 case MIX_TRANSPARENT:
903 {
904 /*
905 ROP is DSPDxax:
906 - where the glyph (S) is white, D is set to the foreground color (P)
907 - where the glyph (S) is black, D is left untouched
908
909 This paints a transparent glyph in the specified color
910 */
911 HBRUSH hbr = CreateSolidBrush(fgcolour);
913 BitBlt(m_displayBuffer, x, y, cx, cy, hdcGlyph, srcx, srcy, MAKELONG(0, 0xe2));
914 DeleteObject(hbr);
915 }
916
917 break;
918
919 case MIX_OPAQUE:
920 {
921 /* Curiously, glyphs are inverted (white-on-black) */
922 SetBkColor(m_displayBuffer, fgcolour);
923 SetTextColor(m_displayBuffer, bgcolour);
924 BitBlt(m_displayBuffer, x, y, cx, cy, hdcGlyph, srcx, srcy, SRCCOPY);
925 }
926
927 break;
928 }
929
930 RestoreDC(m_displayBuffer, dcsave);
931
932 SelectObject(hdcGlyph, hOld);
933 DeleteDC(hdcGlyph);
934
936 }
#define MIX_TRANSPARENT
Definition: constants.h:272
#define MIX_OPAQUE
Definition: constants.h:273
static VOID BitBlt(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Width, _In_ ULONG Height, _In_reads_bytes_(Delta *Height) PUCHAR Buffer, _In_ ULONG BitsPerPixel, _In_ ULONG Delta)
Definition: common.c:57
pKey DeleteObject()
static HBITMAP
Definition: button.c:44
static HDC
Definition: imagelist.c:92
COLORREF WINAPI SetBkColor(_In_ HDC, _In_ COLORREF)
Definition: dc.c:999
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
#define SRCCOPY
Definition: wingdi.h:333
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
Definition: text.c:918
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
BOOL WINAPI DeleteDC(_In_ HDC)

Referenced by Display_DoGlyph().

◆ Display_DrawText()

void RdpClientUI::Display_DrawText ( 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 
)
inline

Definition at line 987 of file activex.cpp.

1009 {
1010 int i, j;
1011 DATABLOB *entry;
1012
1013 HBRUSH hbr = CreateSolidBrush(bgcolour);
1014 HGDIOBJ holdbrush = SelectObject(m_displayBuffer, hbr);
1016
1017 if (boxcx > 1)
1018 Rectangle(m_displayBuffer, boxx, boxy, boxx + boxcx + 1, boxy + boxcy + 1);
1019 else if (mixmode == MIX_OPAQUE)
1020 Rectangle(m_displayBuffer, clipx, clipy, clipx + clipcx + 1, clipy + clipcy + 1);
1021
1022 SelectObject(m_displayBuffer, holdpen);
1023 SelectObject(m_displayBuffer, holdbrush);
1024
1025 DeleteObject(hbr);
1026
1027 if(boxcx > 1)
1028 Display_RepaintArea(boxx, boxy, boxcx, boxcy);
1029 else
1030 Display_RepaintArea(clipx, clipy, clipcx, clipcy);
1031
1032 /* Paint text, character by character */
1033 for (i = 0; i < length;)
1034 {
1035 switch (text[i])
1036 {
1037 case 0xff:
1038 /* At least two bytes needs to follow */
1039 if (i + 3 > length)
1040 {
1041 warning("Skipping short 0xff command:");
1042 for (j = 0; j < length; j++)
1043 fprintf(stderr, "%02x ", text[j]);
1044 fprintf(stderr, "\n");
1045 i = length = 0;
1046 break;
1047 }
1048 cache_put_text(NULL /* TODO */, text[i + 1], text, text[i + 2]);
1049 i += 3;
1050 length -= i;
1051 /* this will move pointer from start to first character after FF command */
1052 text = &(text[i]);
1053 i = 0;
1054 break;
1055
1056 case 0xfe:
1057 /* At least one byte needs to follow */
1058 if (i + 2 > length)
1059 {
1060 warning("Skipping short 0xfe command:");
1061 for (j = 0; j < length; j++)
1062 fprintf(stderr, "%02x ", text[j]);
1063 fprintf(stderr, "\n");
1064 i = length = 0;
1065 break;
1066 }
1067 entry = cache_get_text(/*This*/NULL, text[i + 1]);
1068 if (entry->data != NULL)
1069 {
1070 if ((((uint8 *) (entry->data))[1] == 0)
1071 && (!(flags & TEXT2_IMPLICIT_X)) && (i + 2 < length))
1072 {
1073 if (flags & TEXT2_VERTICAL)
1074 y += text[i + 2];
1075 else
1076 x += text[i + 2];
1077 }
1078 for (j = 0; j < entry->size; j++)
1079 Display_DoGlyph(font, flags, mixmode, x, y, bgcolour, fgcolour, ((uint8 *) (entry->data)), j);
1080 }
1081 if (i + 2 < length)
1082 i += 3;
1083 else
1084 i += 2;
1085 length -= i;
1086 /* this will move pointer from start to first character after FE command */
1087 text = &(text[i]);
1088 i = 0;
1089 break;
1090
1091 default:
1092 Display_DoGlyph(font, flags, mixmode, x, y, bgcolour, fgcolour, text, i);
1093 i++;
1094 break;
1095 }
1096 }
1097 }
void cache_put_text(uint8 cache_id, void *data, int length)
Definition: cache.c:335
DATABLOB * cache_get_text(uint8 cache_id)
Definition: cache.c:325
unsigned char uint8
Definition: types.h:28
void Display_DoGlyph(uint8 font, uint8 flags, int mixmode, int &x, int &y, int bgcolour, int fgcolour, const uint8 *ttext, int &idx)
Definition: activex.cpp:938
const WCHAR * text
Definition: package.c:1799
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
GLsizei GLenum const GLvoid GLsizei GLenum 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 const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLsizei GLenum const GLvoid GLsizei GLenum 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 const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
#define stderr
Definition: stdio.h:100
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
uint32_t entry
Definition: isohybrid.c:63
#define warning(s)
Definition: debug.h:83
#define NULL_PEN
Definition: wingdi.h:904
BOOL WINAPI Rectangle(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)

◆ Display_Ellypse()

void RdpClientUI::Display_Ellypse ( uint8  opcode,
uint8  fillmode,
int  x,
int  y,
int  cx,
int  cy,
BRUSH brush,
int  bgcolour,
int  fgcolour 
)
inline

Definition at line 884 of file activex.cpp.

885 {
886 // TODO
887
889 }

◆ Display_EndUpdate()

void RdpClientUI::Display_EndUpdate ( )
inline

Definition at line 1150 of file activex.cpp.

1151 {
1154 }
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)

◆ Display_Line()

void RdpClientUI::Display_Line ( uint8  opcode,
int  startx,
int  starty,
int  endx,
int  endy,
PEN pen 
)
inline

Definition at line 777 of file activex.cpp.

778 {
779 HPEN hpen = CreatePen(pen->style, pen->width, pen->colour);
780
781 int dcsave = SaveDC(m_displayBuffer);
782
783 SetROP2(m_displayBuffer, opcode);
785 MoveToEx(m_displayBuffer, startx, starty, NULL);
786
787 LineTo(m_displayBuffer, endx, endy);
788
789 RestoreDC(m_displayBuffer, dcsave);
790
792
793 RECT rcDamage;
794
795 if(startx < endx)
796 {
797 rcDamage.left = startx;
798 rcDamage.right = endx;
799 }
800 else
801 {
802 rcDamage.left = endx;
803 rcDamage.right = startx;
804 }
805
806 if(starty < endy)
807 {
808 rcDamage.top = starty;
809 rcDamage.bottom = endy;
810 }
811 else
812 {
813 rcDamage.top = endy;
814 rcDamage.bottom = starty;
815 }
816
817 InflateRect(&rcDamage, pen->width, pen->width);
818 Display_RepaintRect(&rcDamage);
819 }
static HPEN hpen
void Display_RepaintRect(const RECT *lprc)
Definition: activex.cpp:606
uint8 style
Definition: types.h:84
uint8 width
Definition: types.h:85
uint32 colour
Definition: types.h:86
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
BOOL WINAPI MoveToEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
int WINAPI SetROP2(_In_ HDC, _In_ int)
Definition: dc.c:1107
HPEN WINAPI CreatePen(_In_ int, _In_ int, _In_ COLORREF)
BOOL WINAPI LineTo(_In_ HDC, _In_ int, _In_ int)
BOOL WINAPI InflateRect(_Inout_ LPRECT, _In_ int, _In_ int)

◆ Display_MemBlt()

void RdpClientUI::Display_MemBlt ( uint8  opcode,
int  x,
int  y,
int  cx,
int  cy,
HBITMAP  src,
int  srcx,
int  srcy 
)
inline

Definition at line 746 of file activex.cpp.

747 {
750
751 BitBlt(m_displayBuffer, x, y, cx, cy, hdcSrc, srcx, srcy, MAKELONG(0, opcode));
752
753 SelectObject(hdcSrc, hOld);
755
757 }
GLenum src
Definition: glext.h:6340
static HDC hdcSrc
Definition: xlate.c:32

◆ Display_PaintBitmap()

void RdpClientUI::Display_PaintBitmap ( int  x,
int  y,
int  cx,
int  cy,
int  width,
int  height,
uint8 data 
)
inline

Definition at line 687 of file activex.cpp.

688 {
689 GdiFlush();
690
691 int fromstride = alignup(width * m_displayBufferByteDepth, 4);
692 int sizex = cx * m_displayBufferByteDepth;
693
694 const uint8 * src = data;
695
696 uint8 * dst =
700
701 for(int i = 0; i < cy; ++ i)
702 {
703 memcpy(dst, src, sizex);
704 src += fromstride;
706 }
707
709 }
LONG m_displayBufferHeight
Definition: activex.cpp:515
int m_displayBufferByteDepth
Definition: activex.cpp:520
void * m_displayBufferRaw
Definition: activex.cpp:517
int m_displayBufferStride
Definition: activex.cpp:521
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLint GLint GLsizei width
Definition: gl.h:1546
GLenum GLenum dst
Definition: glext.h:6340
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
T alignup(const T &X, const U &align)
Definition: activex.cpp:135
BOOL WINAPI GdiFlush(void)
Definition: misc.c:44

◆ Display_PatBlt()

void RdpClientUI::Display_PatBlt ( uint8  opcode,
int  x,
int  y,
int  cx,
int  cy,
BRUSH brush,
int  bgcolour,
int  fgcolour 
)
inline

Definition at line 720 of file activex.cpp.

721 {
722 HBRUSH hbr = win32_create_brush(brush, fgcolour);
723
724 int dcsave = SaveDC(m_displayBuffer);
725
726 SetBkColor(m_displayBuffer, bgcolour);
727 SetTextColor(m_displayBuffer, fgcolour);
728 SetBrushOrgEx(m_displayBuffer, brush->xorigin, brush->yorigin, NULL);
730
731 PatBlt(m_displayBuffer, x, y, cx, cy, MAKELONG(0, opcode));
732
733 RestoreDC(m_displayBuffer, dcsave);
734
735 DeleteObject(hbr);
736
738 }
HBRUSH win32_create_brush(BRUSH *brush, COLORREF fgcolour)
Definition: activex.cpp:240
BOOL WINAPI SetBrushOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)

◆ Display_Polygon()

void RdpClientUI::Display_Polygon ( uint8  opcode,
uint8  fillmode,
POINT point,
int  npoints,
BRUSH brush,
int  bgcolour,
int  fgcolour 
)
inline

Definition at line 839 of file activex.cpp.

840 {
841 HBRUSH hbr = win32_create_brush(brush, fgcolour);
842
843 int dcsave = SaveDC(m_displayBuffer);
844
845 SetBkColor(m_displayBuffer, bgcolour);
846 SetTextColor(m_displayBuffer, fgcolour);
849
850 Polygon(m_displayBuffer, point, npoints);
851
852 RestoreDC(m_displayBuffer, dcsave);
853
854 Display_RepaintPolygon(point, npoints, 0);
855 }
void Display_RepaintPolygon(POINT *point, int npoints, int linewidth)
Definition: activex.cpp:629
POINTL point
Definition: edittest.c:50
BOOL Polygon(CONST PPOINT UnsafePoints, int Count, int polyFillMode)
Definition: polytest.cpp:730
int WINAPI SetPolyFillMode(_In_ HDC, _In_ int)
Definition: dc.c:1167

◆ Display_Polyline()

void RdpClientUI::Display_Polyline ( uint8  opcode,
POINT points,
int  npoints,
PEN pen 
)
inline

Definition at line 857 of file activex.cpp.

858 {
859 POINT last = points[0];
860
861 for(int i = 1; i < npoints; ++ i)
862 {
863 points[i].x += last.x;
864 points[i].y += last.y;
865 last = points[i];
866 }
867
868 HPEN hpen = CreatePen(pen->style, pen->width, pen->colour);
869
870 int dcsave = SaveDC(m_displayBuffer);
871
872 SetROP2(m_displayBuffer, opcode);
874
876
877 RestoreDC(m_displayBuffer, dcsave);
878
880
881 Display_RepaintPolygon(points, npoints, pen->width);
882 }
GLsizei const GLfloat * points
Definition: glext.h:8112
static UINT UINT last
Definition: font.c:45
BOOL WINAPI Polyline(_In_ HDC hdc, _In_reads_(cpt) const POINT *apt, _In_ int cpt)

◆ Display_Rect()

void RdpClientUI::Display_Rect ( int  x,
int  y,
int  cx,
int  cy,
int  colour 
)
inline

Definition at line 821 of file activex.cpp.

822 {
823 HBRUSH hbr = CreateSolidBrush(colour);
824
825 int dcsave = SaveDC(m_displayBuffer);
826
829
830 Rectangle(m_displayBuffer, x, y, x + cx + 1, y + cy + 1);
831
832 RestoreDC(m_displayBuffer, dcsave);
833
834 DeleteObject(hbr);
835
837 }

◆ Display_RepaintAll()

void RdpClientUI::Display_RepaintAll ( )
inlineprivate

Definition at line 660 of file activex.cpp.

661 {
663 }
#define FALSE
Definition: types.h:117
BOOL WINAPI InvalidateRgn(_In_ HWND, _In_opt_ HRGN, _In_ BOOL)

Referenced by Display_RepaintArea(), Display_RepaintPolygon(), and Display_RepaintRect().

◆ Display_RepaintArea()

void RdpClientUI::Display_RepaintArea ( int  x,
int  y,
int  cx,
int  cy 
)
inlineprivate

Definition at line 616 of file activex.cpp.

617 {
618 if(m_smartSizing)
619 return Display_RepaintAll();
620
621 RECT rcDamage;
622 rcDamage.left = x;
623 rcDamage.top = y;
624 rcDamage.right = x + cx;
625 rcDamage.bottom = y + cy;
626 Display_RepaintRect(&rcDamage);
627 }
bool m_smartSizing
Definition: activex.cpp:483
void Display_RepaintAll()
Definition: activex.cpp:660

Referenced by Display_DestBlt(), Display_DrawGlyph(), Display_DrawText(), Display_Ellypse(), Display_MemBlt(), Display_PaintBitmap(), Display_PatBlt(), Display_Rect(), Display_RestoreDesktop(), Display_ScreenBlt(), and Display_TriBlt().

◆ Display_RepaintPolygon()

void RdpClientUI::Display_RepaintPolygon ( POINT point,
int  npoints,
int  linewidth 
)
inlineprivate

Definition at line 629 of file activex.cpp.

630 {
631 if(m_smartSizing)
632 return Display_RepaintAll();
633
634 RECT rcDamage;
635
636 rcDamage.left = MAXLONG;
637 rcDamage.top = MAXLONG;
638 rcDamage.right = 0;
639 rcDamage.bottom = 0;
640
641 for(int i = 0; i < npoints; ++ i)
642 {
643 if(point[i].x < rcDamage.left)
644 rcDamage.left = point[i].x;
645
646 if(point[i].y < rcDamage.top)
647 rcDamage.top = point[i].y;
648
649 if(point[i].x > rcDamage.right)
650 rcDamage.right = point[i].x;
651
652 if(point[i].y > rcDamage.bottom)
653 rcDamage.bottom = point[i].y;
654 }
655
656 InflateRect(&rcDamage, linewidth, linewidth);
657 Display_RepaintRect(&rcDamage);
658 }
LONG y
Definition: windef.h:330
LONG x
Definition: windef.h:329
#define MAXLONG
Definition: umtypes.h:116

Referenced by Display_Polygon(), and Display_Polyline().

◆ Display_RepaintRect()

void RdpClientUI::Display_RepaintRect ( const RECT lprc)
inlineprivate

Definition at line 606 of file activex.cpp.

607 {
608 if(m_smartSizing)
609 return Display_RepaintAll();
610
611 RECT rcDamage;
614 }
RECT m_displayBufferClip
Definition: activex.cpp:522
BOOL WINAPI IntersectRect(_Out_ LPRECT, _In_ LPCRECT, _In_ LPCRECT)
_In_ int _Inout_ LPRECT lprc
Definition: winuser.h:4466
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)

Referenced by Display_Line(), Display_RepaintArea(), and Display_RepaintPolygon().

◆ Display_ResetClip()

void RdpClientUI::Display_ResetClip ( )
inline

Definition at line 678 of file activex.cpp.

679 {
685 }
LONG m_displayBufferWidth
Definition: activex.cpp:514
int WINAPI SelectClipRgn(_In_ HDC, _In_opt_ HRGN)

◆ Display_RestoreDesktop()

void RdpClientUI::Display_RestoreDesktop ( uint32  offset,
int  x,
int  y,
int  cx,
int  cy 
)
inline

Definition at line 1120 of file activex.cpp.

1121 {
1122 int fromstride = cx * m_displayBufferByteDepth;
1123
1125
1126 uint8 * dst =
1130
1131 GdiFlush();
1132
1133 for(int i = 0; i < cy; ++ i)
1134 {
1135 memcpy(dst, src, fromstride);
1136 src += fromstride;
1138 }
1139
1141 }
uint8 * cache_get_desktop(uint32 offset, int cx, int cy, int bytes_per_pixel)
Definition: cache.c:353
GLintptr offset
Definition: glext.h:5920

◆ Display_SaveDesktop()

void RdpClientUI::Display_SaveDesktop ( uint32  offset,
int  x,
int  y,
int  cx,
int  cy 
)
inline

Definition at line 1099 of file activex.cpp.

1100 {
1101 GdiFlush();
1102
1103 uint8 * data =
1107
1109 (
1110 /*This*/NULL,
1112 cx,
1113 cy,
1116 data
1117 );
1118 }
void cache_put_desktop(uint32 offset, int cx, int cy, int scanline, int bytes_per_pixel, uint8 *data)
Definition: cache.c:371

◆ Display_ScreenBlt()

void RdpClientUI::Display_ScreenBlt ( uint8  opcode,
int  x,
int  y,
int  cx,
int  cy,
int  srcx,
int  srcy 
)
inline

Definition at line 740 of file activex.cpp.

741 {
742 BitBlt(m_displayBuffer, x, y, cx, cy, m_displayBuffer, srcx, srcy, MAKELONG(0, opcode));
744 }

◆ Display_SetClip()

void RdpClientUI::Display_SetClip ( int  x,
int  y,
int  cx,
int  cy 
)
inline

Definition at line 666 of file activex.cpp.

667 {
672
676 }
static HRGN hrgn
HRGN WINAPI CreateRectRgnIndirect(_In_ LPCRECT)

◆ Display_TriBlt()

void RdpClientUI::Display_TriBlt ( uint8  opcode,
int  x,
int  y,
int  cx,
int  cy,
HBITMAP  src,
int  srcx,
int  srcy,
BRUSH brush,
int  bgcolour,
int  fgcolour 
)
inline

Definition at line 759 of file activex.cpp.

760 {
761 // TODO
764
765 //SELECT_BRUSH(brush, bgcolour, fgcolour);
766
767 BitBlt(m_displayBuffer, x, y, cx, cy, hdcSrc, srcx, srcy, MAKELONG(0, opcode));
768
769 //RESET_BRUSH();
770
771 SelectObject(hdcSrc, hOld);
773
775 }

◆ DisplayWindowProc()

LRESULT RdpClientUI::DisplayWindowProc ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
inlineprivate

Definition at line 525 of file activex.cpp.

526 {
527 switch(uMsg)
528 {
529 case WM_DESTROY:
531 return 0;
532
533 case WM_PRINTCLIENT:
534 if(wParam == 0)
535 break;
536
537 case WM_PAINT:
538 {
539 HDC hdc = (HDC)wParam;
540
542
543 if(hdc)
544 {
545 RECT rc;
547 BitBlt(hdc, 0, 0, rc.right, rc.bottom, m_displayBuffer, 0, 0, SRCCOPY);
548 }
549 else
550 {
551 PAINTSTRUCT ps;
553
554 if(!m_smartSizing)
555 {
556 BitBlt
557 (
558 hdc,
559 ps.rcPaint.left,
560 ps.rcPaint.top,
561 ps.rcPaint.right - ps.rcPaint.left,
562 ps.rcPaint.bottom - ps.rcPaint.top,
564 ps.rcPaint.left,
565 ps.rcPaint.top,
566 SRCCOPY
567 );
568 }
569 else
570 {
571 // bleh. There has to be a better way
573
575 (
576 hdc,
577 0,
578 0,
582 0,
583 0,
586 SRCCOPY
587 );
588 }
589
591 }
592
594 }
595
596 return 0;
597
598 default:
599 break;
600 }
601
603 }
LONG m_consoleHeight
Definition: activex.cpp:482
LONG m_consoleWidth
Definition: activex.cpp:481
HDC hdc
Definition: main.c:9
#define WM_PRINTCLIENT
Definition: richedit.h:70
BOOL WINAPI StretchBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_opt_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
#define HALFTONE
Definition: wingdi.h:955
int WINAPI SetStretchBltMode(_In_ HDC, _In_ int)
Definition: dc.c:1366
#define WM_PAINT
Definition: winuser.h:1620
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
#define WM_DESTROY
Definition: winuser.h:1609
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)

◆ Initialize()

HRESULT RdpClientUI::Initialize ( HWND  hwndParent)
inline

Definition at line 304 of file activex.cpp.

305 {
306 // TODO: create the various windows
307 // TODO: create display window thread
308 // TODO: create input thread
309 return E_FAIL;
310 }
#define E_FAIL
Definition: ddrawi.h:102

Referenced by SEALED_::IMsTscAx::Connect().

◆ InputWindowProc()

LRESULT RdpClientUI::InputWindowProc ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
inline

Definition at line 1166 of file activex.cpp.

1167 {
1168 switch(uMsg)
1169 {
1170 case WM_DESTROY:
1171 PostQuitMessage(0);
1172 return 0;
1173
1174 /* Keyboard stuff */
1175 // TODO: we need a good way to post output cross-thread
1176 case WM_SYSKEYDOWN:
1177 case WM_KEYDOWN:
1178 //rdp_send_input(This, GetMessageTime(), RDP_INPUT_SCANCODE, RDP_KEYPRESS | (lparam & 0x1000000 ? KBD_FLAG_EXT : 0), LOBYTE(HIWORD(lparam)), 0);
1179 break;
1180
1181 case WM_SYSKEYUP:
1182 case WM_KEYUP:
1183 //rdp_send_input(This, GetMessageTime(), RDP_INPUT_SCANCODE, RDP_KEYRELEASE | (lparam & 0x1000000 ? KBD_FLAG_EXT : 0), LOBYTE(HIWORD(lparam)), 0);
1184 break;
1185
1186 /* Mouse stuff */
1187 // Cursor shape
1188 case WM_SETCURSOR:
1189 if(LOWORD(lParam) == HTCLIENT)
1190 {
1192 return TRUE;
1193 }
1194
1195 break;
1196
1197 // Movement
1198 case WM_MOUSEMOVE:
1199 //rdp_send_input(This, GetMessageTime(), RDP_INPUT_MOUSE, MOUSE_FLAG_MOVE, LOWORD(lparam), HIWORD(lparam));
1200 break;
1201
1202 // Buttons
1203 // TODO: X buttons
1204 case WM_LBUTTONDOWN:
1205 //rdp_send_input(This, GetMessageTime(), RDP_INPUT_MOUSE, MOUSE_FLAG_BUTTON1 | MOUSE_FLAG_DOWN, LOWORD(lparam), HIWORD(lparam));
1206 break;
1207
1208 case WM_RBUTTONDOWN:
1209 //rdp_send_input(This, GetMessageTime(), RDP_INPUT_MOUSE, MOUSE_FLAG_BUTTON2 | MOUSE_FLAG_DOWN, LOWORD(lparam), HIWORD(lparam));
1210 break;
1211
1212 case WM_MBUTTONDOWN:
1213 //rdp_send_input(This, GetMessageTime(), RDP_INPUT_MOUSE, MOUSE_FLAG_BUTTON3 | MOUSE_FLAG_DOWN, LOWORD(lparam), HIWORD(lparam));
1214 break;
1215
1216 case WM_LBUTTONUP:
1217 //rdp_send_input(This, GetMessageTime(), RDP_INPUT_MOUSE, MOUSE_FLAG_BUTTON1, LOWORD(lparam), HIWORD(lparam));
1218 break;
1219
1220 case WM_RBUTTONUP:
1221 //rdp_send_input(This, GetMessageTime(), RDP_INPUT_MOUSE, MOUSE_FLAG_BUTTON2, LOWORD(lparam), HIWORD(lparam));
1222 break;
1223
1224 case WM_MBUTTONUP:
1225 //rdp_send_input(This, GetMessageTime(), RDP_INPUT_MOUSE, MOUSE_FLAG_BUTTON3, LOWORD(lparam), HIWORD(lparam));
1226 break;
1227
1228 // Wheel
1229 case WM_MOUSEWHEEL:
1230 //mstsc_mousewheel(This, (SHORT)HIWORD(wparam), lparam);
1231 break;
1232 }
1233
1234 return DefWindowProc(m_inputWindow, uMsg, wParam, lParam);
1235 }
HCURSOR m_inputCursor
Definition: activex.cpp:1164
#define LOWORD(l)
Definition: pedump.c:82
#define WM_MOUSEWHEEL
Definition: treelist.c:96
#define WM_KEYUP
Definition: winuser.h:1716
#define WM_RBUTTONUP
Definition: winuser.h:1780
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
#define WM_MOUSEMOVE
Definition: winuser.h:1775
#define WM_LBUTTONDOWN
Definition: winuser.h:1776
#define WM_RBUTTONDOWN
Definition: winuser.h:1779
#define HTCLIENT
Definition: winuser.h:2475
#define WM_SYSKEYUP
Definition: winuser.h:1720
#define WM_LBUTTONUP
Definition: winuser.h:1777
#define WM_SETCURSOR
Definition: winuser.h:1636
#define WM_KEYDOWN
Definition: winuser.h:1715
#define WM_MBUTTONUP
Definition: winuser.h:1783
#define WM_SYSKEYDOWN
Definition: winuser.h:1719
#define WM_MBUTTONDOWN
Definition: winuser.h:1782

◆ Shutdown()

static void RdpClientUI::Shutdown ( )
inlinestatic

Definition at line 356 of file activex.cpp.

357 {
358 // TODO
359 }

◆ Startup()

static BOOL RdpClientUI::Startup ( )
inlinestatic

Definition at line 313 of file activex.cpp.

314 {
315 WNDCLASSEX wcexUI = { sizeof(wcexUI) };
316 WNDCLASSEX wcexConsole = { sizeof(wcexConsole) };
317 WNDCLASSEX wcexDisplay = { sizeof(wcexDisplay) };
318 WNDCLASSEX wcexInput = { sizeof(wcexInput) };
319
320 HBRUSH nullBrush = (HBRUSH)GetStockObject(HOLLOW_BRUSH);
321
322 wcexUI.lpfnWndProc = NULL; // TODO
323 wcexUI.hInstance = GetCurrentModule();
324 wcexUI.hCursor = LoadCursor(NULL, IDC_ARROW);
325 wcexUI.hbrBackground = nullBrush;
326 wcexUI.lpszClassName = TEXT("MissTosca_UI");
327
328 wcexConsole.style = CS_VREDRAW | CS_HREDRAW;
329 wcexConsole.lpfnWndProc = NULL; // TODO
330 wcexConsole.hInstance = GetCurrentModule();
331 wcexConsole.hCursor = LoadCursor(NULL, IDC_ARROW);
332 wcexConsole.hbrBackground = nullBrush;
333 wcexConsole.lpszClassName = TEXT("MissTosca_Console");
334
335 wcexDisplay.style = CS_VREDRAW | CS_HREDRAW;
336 wcexDisplay.lpfnWndProc = NULL; // TODO
337 wcexDisplay.hInstance = GetCurrentModule();
338 wcexDisplay.hCursor = LoadCursor(NULL, IDC_ARROW);
339 wcexDisplay.hbrBackground = nullBrush;
340 wcexDisplay.lpszClassName = TEXT("MissTosca_Display");
341
342 wcexInput.style = CS_VREDRAW | CS_HREDRAW;
343 wcexInput.lpfnWndProc = NULL; // TODO
344 wcexInput.hInstance = GetCurrentModule();
345 wcexInput.hCursor = NULL;
346 wcexInput.hbrBackground = nullBrush;
347 wcexInput.lpszClassName = TEXT("MissTosca_Input");
348
349 return
350 RegisterClassEx(&wcexUI) &&
351 RegisterClassEx(&wcexConsole) &&
352 RegisterClassEx(&wcexDisplay) &&
353 RegisterClassEx(&wcexInput);
354 }
#define TEXT(s)
Definition: k32.h:26
HINSTANCE hInstance
Definition: winuser.h:3206
HCURSOR hCursor
Definition: winuser.h:3208
UINT style
Definition: winuser.h:3202
WNDPROC lpfnWndProc
Definition: winuser.h:3203
LPCSTR lpszClassName
Definition: winuser.h:3211
HBRUSH hbrBackground
Definition: winuser.h:3209
#define HOLLOW_BRUSH
Definition: wingdi.h:899
#define CS_VREDRAW
Definition: winuser.h:658
#define CS_HREDRAW
Definition: winuser.h:653
#define IDC_ARROW
Definition: winuser.h:687
#define RegisterClassEx
Definition: winuser.h:5837
#define LoadCursor
Definition: winuser.h:5812

Referenced by SEALED_::Startup().

◆ UIWindowProc()

LRESULT RdpClientUI::UIWindowProc ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
inlineprivate

Definition at line 371 of file activex.cpp.

372 {
373 switch(uMsg)
374 {
375 // Keep the keyboard focus on the input window
376 case WM_ACTIVATE:
377 switch(LOWORD(wParam))
378 {
379 case WA_INACTIVE:
380 break;
381
382 case WA_ACTIVE:
383 case WA_CLICKACTIVE:
384 if(!HIWORD(wParam))
386 }
387
388 return 0;
389
390 // Resized: rearrange children windows, adjust scrollbars
391 case WM_SIZE:
392 {
394 break;
395
396 RECT rcClient;
397 GetWindowRect(m_uiWindow, &rcClient);
398
399 if(m_smartSizing)
400 {
401 // we are not supposed to maintain aspect ratio. Container has to do that
402 m_consoleX = 0;
403 m_consoleY = 0;
404 m_consoleWidth = rcClient.right;
405 m_consoleHeight = rcClient.bottom;
406 }
407 else
408 {
409 // center horizontally, no horizontal scrollbar
410 if(rcClient.right >= m_consoleWidth)
411 m_consoleX = (m_consoleWidth - rcClient.right) / 2;
412
413 // center vertically, no vertical scrollbar
414 if(rcClient.bottom >= m_consoleHeight)
415 m_consoleY = (m_consoleHeight - rcClient.right) / 2;
416 }
417
418 SCROLLINFO scroll = { sizeof(scroll), SIF_ALL, 0 };
419
420 // update the horizontal scrollbar
421 scroll.nMax = m_consoleWidth;
422 scroll.nPage = rcClient.right;
423 scroll.nPos = 0 - m_consoleX;
425
426 // update the vertical scrollbar
427 scroll.nMax = m_consoleHeight;
428 scroll.nPage = rcClient.bottom;
429 scroll.nPos = 0 - m_consoleY;
431
432 // move/resize the console window
434 }
435
436 return 0;
437
438 case WM_HSCROLL:
439 {
440 SCROLLINFO scroll = { sizeof(scroll), SIF_TRACKPOS };
442 m_consoleX = - scroll.nTrackPos;
444 }
445
446 return 0;
447
448 case WM_VSCROLL:
449 {
450 SCROLLINFO scroll = { sizeof(scroll), SIF_TRACKPOS };
452 m_consoleY = - scroll.nTrackPos;
454 }
455
456 return 0;
457
458 default:
459 break;
460 }
461
462 return DefWindowProc(m_uiWindow, uMsg, wParam, lParam);
463 }
LONG m_consoleX
Definition: activex.cpp:479
HWND m_uiWindow
Definition: activex.cpp:367
LONG m_consoleY
Definition: activex.cpp:480
#define HIWORD(l)
Definition: typedefs.h:247
#define WM_HSCROLL
Definition: winuser.h:1743
#define WM_VSCROLL
Definition: winuser.h:1744
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define SB_VERT
Definition: winuser.h:553
#define WA_INACTIVE
Definition: winuser.h:2622
#define SIF_TRACKPOS
Definition: winuser.h:1237
BOOL WINAPI IsIconic(_In_ HWND)
#define WM_ACTIVATE
Definition: winuser.h:1612
HWND WINAPI SetFocus(_In_opt_ HWND)
#define SIF_ALL
Definition: winuser.h:1232
#define WA_ACTIVE
Definition: winuser.h:2623
#define WA_CLICKACTIVE
Definition: winuser.h:2624
int WINAPI SetScrollInfo(_In_ HWND, _In_ int, _In_ LPCSCROLLINFO, _In_ BOOL)
BOOL WINAPI GetScrollInfo(_In_ HWND, _In_ int, _Inout_ LPSCROLLINFO)
#define SB_HORZ
Definition: winuser.h:552

Member Data Documentation

◆ m_consoleHeight

LONG RdpClientUI::m_consoleHeight
private

Definition at line 482 of file activex.cpp.

Referenced by DisplayWindowProc(), and UIWindowProc().

◆ m_consoleWidth

LONG RdpClientUI::m_consoleWidth
private

Definition at line 481 of file activex.cpp.

Referenced by DisplayWindowProc(), and UIWindowProc().

◆ m_consoleWindow

HWND RdpClientUI::m_consoleWindow
private

Definition at line 478 of file activex.cpp.

Referenced by ConsoleWindowProc(), and UIWindowProc().

◆ m_consoleX

LONG RdpClientUI::m_consoleX
private

Definition at line 479 of file activex.cpp.

Referenced by UIWindowProc().

◆ m_consoleY

LONG RdpClientUI::m_consoleY
private

Definition at line 480 of file activex.cpp.

Referenced by UIWindowProc().

◆ m_displayBuffer

◆ m_displayBufferBitDepth

int RdpClientUI::m_displayBufferBitDepth
private

Definition at line 519 of file activex.cpp.

◆ m_displayBufferByteDepth

int RdpClientUI::m_displayBufferByteDepth
private

Definition at line 520 of file activex.cpp.

Referenced by Display_PaintBitmap(), Display_RestoreDesktop(), and Display_SaveDesktop().

◆ m_displayBufferClip

RECT RdpClientUI::m_displayBufferClip
private

Definition at line 522 of file activex.cpp.

Referenced by Display_RepaintRect(), Display_ResetClip(), and Display_SetClip().

◆ m_displayBufferHeight

LONG RdpClientUI::m_displayBufferHeight
private

◆ m_displayBufferMutex

CRITICAL_SECTION RdpClientUI::m_displayBufferMutex
private

Definition at line 523 of file activex.cpp.

Referenced by Display_BeginUpdate(), Display_EndUpdate(), and DisplayWindowProc().

◆ m_displayBufferRaw

void* RdpClientUI::m_displayBufferRaw
private

Definition at line 517 of file activex.cpp.

Referenced by Display_PaintBitmap(), Display_RestoreDesktop(), and Display_SaveDesktop().

◆ m_displayBufferSave

int RdpClientUI::m_displayBufferSave
private

Definition at line 518 of file activex.cpp.

Referenced by Display_BeginUpdate(), and Display_EndUpdate().

◆ m_displayBufferStride

int RdpClientUI::m_displayBufferStride
private

Definition at line 521 of file activex.cpp.

Referenced by Display_PaintBitmap(), Display_RestoreDesktop(), and Display_SaveDesktop().

◆ m_displayBufferWidth

LONG RdpClientUI::m_displayBufferWidth
private

Definition at line 514 of file activex.cpp.

Referenced by Display_ResetClip(), and DisplayWindowProc().

◆ m_displayWindow

HWND RdpClientUI::m_displayWindow
private

◆ m_fullScreenBarWindow

HWND RdpClientUI::m_fullScreenBarWindow
private

Definition at line 470 of file activex.cpp.

◆ m_inputCursor

HCURSOR RdpClientUI::m_inputCursor

Definition at line 1164 of file activex.cpp.

Referenced by InputWindowProc().

◆ m_inputWindow

HWND RdpClientUI::m_inputWindow

Definition at line 1163 of file activex.cpp.

Referenced by ConsoleWindowProc(), InputWindowProc(), and UIWindowProc().

◆ m_scrollHPos

LONG RdpClientUI::m_scrollHPos
private

Definition at line 368 of file activex.cpp.

◆ m_scrollVPos

LONG RdpClientUI::m_scrollVPos
private

Definition at line 369 of file activex.cpp.

◆ m_smartSizing

bool RdpClientUI::m_smartSizing
private

◆ m_uiWindow

HWND RdpClientUI::m_uiWindow
private

Definition at line 367 of file activex.cpp.

Referenced by UIWindowProc().


The documentation for this class was generated from the following file: