ReactOS  0.4.14-dev-293-g2b39b42
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,
411  hwndParent,
412  0,
413  GetModuleHandle(0),
414  0
415  );
416 }
#define WS_CHILD
Definition: pedump.c:617
& rect
Definition: startmenu.cpp:1413
#define CreateWindowEx
Definition: winuser.h:5656
static HWND hwndParent
Definition: cryptui.c:300
unsigned long DWORD
Definition: ntddk_ex.h:95
#define WS_EX_TOPMOST
Definition: pedump.c:647
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define GetModuleHandle
Definition: winbase.h:3651
#define WS_POPUP
Definition: pedump.c:616
#define APPNAME
Definition: 3dtext.c:40
#define WS_VISIBLE
Definition: pedump.c:620

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 }
int GlyphIntensity(GLYPH glyph)
Definition: matrix.c:30
GLuint GLenum matrix
Definition: glext.h:9407
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:410
#define GLYPH_WIDTH
Definition: globals.h:17
HDC hdc
Definition: main.c:9
#define GLYPH_HEIGHT
Definition: globals.h:18
#define SRCCOPY
Definition: wingdi.h:332

Referenced by DrawMatrixMessage(), and RedrawMatrixColumn().

◆ InitScreenSaveClass()

void InitScreenSaveClass ( )

◆ 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 GLYPH_REDRAW
Definition: matrix.h:20
#define NUM_GLYPHS
Definition: globals.h:16
int crc_rand()
Definition: matrix.c:18

Referenced by DrawMatrixMessage(), and ScrollMatrixColumn().