ReactOS 0.4.16-dev-197-g92996da
matrix.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  MATRIX_COLUMN
 
struct  MATRIX
 

Macros

#define GLYPH_REDRAW   0x8000
 
#define GLYPH_BLANK   0x4000
 

Typedefs

typedef unsigned short GLYPH
 

Functions

GLYPH RandomGlyph (int intensity)
 
void DrawGlyph (MATRIX *matrix, HDC hdc, int xpos, int ypos, GLYPH glyph)
 
HWND CreateScreenSaveWnd (HWND hwndParent, RECT *rect)
 
void InitScreenSaveClass ()
 

Macro Definition Documentation

◆ GLYPH_BLANK

#define GLYPH_BLANK   0x4000

Definition at line 21 of file matrix.h.

◆ GLYPH_REDRAW

#define GLYPH_REDRAW   0x8000

Definition at line 20 of file matrix.h.

Typedef Documentation

◆ GLYPH

typedef unsigned short GLYPH

Definition at line 18 of file matrix.h.

Function Documentation

◆ CreateScreenSaveWnd()

HWND CreateScreenSaveWnd ( HWND  hwndParent,
RECT rect 
)

Definition at line 390 of file matrix.c.

391{
392 DWORD dwStyle = hwndParent ? WS_CHILD : WS_POPUP;
393
394#ifdef _DEBUG
395 DWORD dwStyleEx = 0;
396#else
397 DWORD dwStyleEx = WS_EX_TOPMOST;
398#endif
399
400 if(hwndParent)
402
403 return CreateWindowEx( dwStyleEx,
404 APPNAME,
405 0,
406 WS_VISIBLE | dwStyle,
407 rect->left,
408 rect->top,
409 rect->right - rect->left,
410 rect->bottom - rect->top,
412 0,
414 0
415 );
416}
#define APPNAME
Definition: 3dtext.c:40
static HWND hwndParent
Definition: cryptui.c:300
unsigned long DWORD
Definition: ntddk_ex.h:95
#define WS_CHILD
Definition: pedump.c:617
#define WS_POPUP
Definition: pedump.c:616
#define WS_VISIBLE
Definition: pedump.c:620
#define WS_EX_TOPMOST
Definition: pedump.c:647
& rect
Definition: startmenu.cpp:1413
#define GetModuleHandle
Definition: winbase.h:3851
#define CreateWindowEx
Definition: winuser.h:5767
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)

Referenced by MonitorEnumProc().

◆ DrawGlyph()

void DrawGlyph ( MATRIX matrix,
HDC  hdc,
int  xpos,
int  ypos,
GLYPH  glyph 
)

Definition at line 167 of file matrix.c.

168{
169 int intensity = GlyphIntensity(glyph);
170 int glyphidx = glyph & 0xff;
171
172 BitBlt(hdc, xpos, ypos, GLYPH_WIDTH, GLYPH_HEIGHT, matrix->hdcBitmap,
173 glyphidx * GLYPH_WIDTH, intensity * GLYPH_HEIGHT, SRCCOPY);
174}
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
GLuint GLenum matrix
Definition: glext.h:9407
#define GLYPH_HEIGHT
Definition: globals.h:18
#define GLYPH_WIDTH
Definition: globals.h:17
int GlyphIntensity(GLYPH glyph)
Definition: matrix.c:30
HDC hdc
Definition: main.c:9
#define SRCCOPY
Definition: wingdi.h:333

Referenced by DrawMatrixMessage(), and RedrawMatrixColumn().

◆ InitScreenSaveClass()

void InitScreenSaveClass ( )

Referenced by ScreenSaver().

◆ RandomGlyph()

GLYPH RandomGlyph ( int  intensity)

Definition at line 45 of file matrix.c.

46{
47 return GLYPH_REDRAW | (intensity << 8) | (crc_rand() % NUM_GLYPHS);
48}
#define NUM_GLYPHS
Definition: globals.h:16
int crc_rand()
Definition: matrix.c:18
#define GLYPH_REDRAW
Definition: matrix.h:20

Referenced by DrawMatrixMessage(), and ScrollMatrixColumn().