Win32-like data types and macros
[Macros and data types commonly used]

Data Structures

Defines

Typedefs


Define Documentation

#define GetAValue ( rgba   )     ((BYTE)((DWORD)(rgba) >> 24))

Gets the alpha component from a RGBA triple value rgba.

You can make a RGBA triple by using MakeRGBA.

See also:
MakeRGBA, MakeRGB

Definition at line 530 of file common.h.

Referenced by DWORD2PIXEL().

#define GetBValue ( rgba   )     ((BYTE)((DWORD)(rgba) >> 16))

Gets the blue component from a RGBA triple value rgba.

You can make a RGBA triple by using MakeRGBA.

See also:
MakeRGBA, MakeRGB

Definition at line 521 of file common.h.

Referenced by DWORD2PIXEL().

#define GetGValue ( rgba   )     ((BYTE)(((DWORD)(rgba)) >> 8))

Gets the green component from a RGBA triple value rgba.

You can make a RGBA triple by using MakeRGBA.

See also:
MakeRGBA, MakeRGB

Definition at line 512 of file common.h.

Referenced by DWORD2PIXEL().

#define GetRValue ( rgba   )     ((BYTE)(rgba))

Gets the red component from a RGBA triple value rgba.

You can make a RGBA triple by using MakeRGBA.

See also:
MakeRGBA, MakeRGB

Definition at line 503 of file common.h.

Referenced by DWORD2PIXEL().

#define HIBYTE (  )     ((BYTE)(((WORD)(w) >> 8) & 0xFF))

Returns the high byte of the word w.

See also:
MAKEWORD

Definition at line 451 of file common.h.

#define HISWORD (  )     ((SWORD)((((DWORD)(l)) >> 16) & 0xFFFF))

Returns the high signed word of the double word l.

See also:
MAKELONG

Definition at line 487 of file common.h.

#define HIWORD (  )     ((WORD)((((DWORD)(l)) >> 16) & 0xFFFF))

Returns the high word of the double word l.

See also:
MAKELONG

Definition at line 472 of file common.h.

#define LOBYTE (  )     ((BYTE)(w))

Returns the low byte of the word w.

See also:
MAKEWORD

Definition at line 444 of file common.h.

#define LOSWORD (  )     ((SWORD)(DWORD)(l))

Returns the low signed word of the double word l.

See also:
MAKELONG

Definition at line 480 of file common.h.

#define LOWORD (  )     ((WORD)(DWORD)(l))

Returns the low word of the double word l.

See also:
MAKELONG

Definition at line 465 of file common.h.

#define MAKELONG ( low,
high   )     ((DWORD)(((WORD)(low)) | (((DWORD)((WORD)(high))) << 16)))

Makes a double word from low word and high word.

Definition at line 493 of file common.h.

#define MakeRGB ( r,
g,
 ) 
Value:
(((DWORD)((BYTE)(r))) | ((DWORD)((BYTE)(g)) << 8) \
                | ((DWORD)((BYTE)(b)) << 16))

Makes a RGB triple value from red r, green g, and blue b components.

Note:
The red, green, and blue components are all ranged from 0 to 255, and the returned value will be a double word.
See also:
GetRValue, GetGValue, GetBValue

Definition at line 554 of file common.h.

#define MakeRGBA ( r,
g,
b,
 ) 
Value:
(((DWORD)((BYTE)(r))) | ((DWORD)((BYTE)(g)) << 8) \
                | ((DWORD)((BYTE)(b)) << 16) | ((DWORD)((BYTE)(a)) << 24))

Makes a RGBA triple value from red r, green g, blue b and alpha components.

Note:
The red, green, blue and alpha components are all ranged from 0 to 255, and the returned value will be a double word.
See also:
GetRValue, GetGValue, GetBValue, GetAValue

Definition at line 542 of file common.h.

Referenced by Pixel2DWORD().

#define MAKEWORD ( low,
high   )     ((WORD)(((BYTE)(low)) | (((WORD)((BYTE)(high))) << 8)))

Makes a word from low byte and high byte.

Definition at line 457 of file common.h.


Typedef Documentation

typedef unsigned char BYTE

A type definition for unsigned character (byte).

Definition at line 374 of file common.h.

typedef unsigned long DWORD

A type definition for unsigned long integer (double word).

Definition at line 401 of file common.h.

typedef long LONG

A type definition for long integer.

Definition at line 423 of file common.h.

typedef unsigned long LPARAM

A type definition for the second message paramter.

Definition at line 436 of file common.h.

typedef struct _POINT POINT

Point structure.

See also:
PPOINT
typedef POINT * PPOINT

Data type of the pointer to a POINT.

See also:
POINT

Definition at line 620 of file common.h.

typedef RECT * PRECT

Data type of the pointer to a RECT.

See also:
RECT

Definition at line 597 of file common.h.

typedef RGB * PRGB

Data type of the pointer to a RGB.

See also:
RGB

Definition at line 675 of file common.h.

typedef SIZE * PSIZE

Data type of the pointer to a SIZE.

See also:
SIZE

Definition at line 643 of file common.h.

typedef struct _RECT RECT

A rectangle defined by coordinates of corners.

Note:
The lower-right corner does not belong to the rectangle, i.e. the bottom horizontal line and the right vertical line are excluded from the retangle.
See also:
PRECT, GAL_Rect
typedef struct _RGB RGB

RGB triple structure.

See also:
PRGB, GAL_Color
typedef DWORD RGBCOLOR

A type definition for a RGB color.

Definition at line 561 of file common.h.

typedef signed char SBYTE

A type definition for signed character.

Definition at line 380 of file common.h.

typedef signed long SDWORD

A type definition for signed long integer.

Definition at line 408 of file common.h.

typedef struct _SIZE SIZE

Size structure of a 2-dimension object.

See also:
PSIZE
typedef signed short SWORD

A type definition for signed short integer.

Definition at line 394 of file common.h.

typedef unsigned int UINT

A type definition for unsigned integer.

Definition at line 415 of file common.h.

typedef unsigned short WORD

A type definition for unsigned short integer (word).

Definition at line 387 of file common.h.

typedef unsigned int WPARAM

A type definition for the first message paramter.

Definition at line 430 of file common.h.

Generated on Thu Apr 7 15:58:34 2011 for MiniGUI V3.0.12 API Reference by  doxygen 1.6.3