MiniGUI API Reference (MiniGUI-Standalone)  v5.0.0
A mature and proven cross-platform GUI system for embedded and smart IoT devices
Data Structures | Macros | Typedefs
Win32-like data types and macros

Data Structures

struct  _RECT
 
struct  _POINT
 
struct  _SIZE
 
struct  _RGB
 

Macros

#define SIZEOF_PTR   4
 The size of a pointer. 4 for 32-bit and 8 for 64-bit. More...
 
#define SIZEOF_HPTR   2
 The size of a half or pointer. 2 for 32-bit and 4 for 64-bit. More...
 
#define LOBYTE(w)   ((BYTE)(w))
 Returns the low byte of the word w. More...
 
#define HIBYTE(w)   ((BYTE)(((WORD)(w) >> NR_BITS_BYTE) & BITMASK_BYTE))
 Returns the high byte of the word w. More...
 
#define MAKEWORD(low, high)   ((WORD)(((BYTE)(low)) | (((WORD)((BYTE)(high))) << NR_BITS_BYTE)))
 Makes a word from low byte and high byte. More...
 
#define MAKEWORD16(low, high)   ((WORD16)(((BYTE)(low)) | (((WORD16)((BYTE)(high))) << 8)))
 Makes a 16-bit word from low byte and high byte. More...
 
#define MAKEDWORD32(first, second, third, fourth)
 Makes a WORD32 value with four bytes. More...
 
#define MAKEWPARAM(first, second, third, fourth)
 Makes a WPARAM value with four bytes. More...
 
#define FIRSTBYTE(w)   ((BYTE)(w))
 Returns the first byte of the WPARAM w. More...
 
#define SECONDBYTE(w)   ((BYTE)(((DWORD32)(w)) >> 8))
 Returns the second byte of the WPARAM w. More...
 
#define THIRDBYTE(w)   ((BYTE)(((DWORD32)(w)) >> 16))
 Returns the third byte of the WPARAM w. More...
 
#define FOURTHBYTE(w)   ((BYTE)(((DWORD32)(w)) >> 24))
 Returns the fourth byte of the WPARAM w. More...
 
#define LOWORD(l)   ((WORD)(DWORD)(l))
 Returns the low word of the double word l. More...
 
#define HIWORD(l)   ((WORD)((((DWORD)(l)) >> NR_BITS_WORD) & BITMASK_WORD))
 Returns the high word of the double word l. More...
 
#define LOSWORD(l)   ((SWORD)(DWORD)(l))
 Returns the low signed word of the double word l. More...
 
#define HISWORD(l)   ((SWORD)((((DWORD)(l)) >> NR_BITS_WORD) & BITMASK_WORD))
 Returns the high signed word of the double word l. More...
 
#define MAKELONG32(low, high)   ((DWORD32)(((WORD16)(low)) | (((DWORD32)((WORD16)(high))) << 16)))
 Makes a 32-bit double word from low word and high word which are both in 16-bit. More...
 
#define MAKELONG(low, high)   ((DWORD)(((WORD)(low)) | (((DWORD)((WORD)(high))) << NR_BITS_WORD)))
 Makes a double word with pointer precision from low word and high word. More...
 
#define GetRValue(rgba)   ((BYTE)(rgba))
 Get the red component from a RGBA quadruple value rgba. More...
 
#define GetGValue(rgba)   ((BYTE)(((DWORD32)(rgba)) >> 8))
 Get the green component from a RGBA quadruple value rgba. More...
 
#define GetBValue(rgba)   ((BYTE)((DWORD32)(rgba) >> 16))
 Get the blue component from a RGBA quadruple value rgba. More...
 
#define GetAValue(rgba)   ((BYTE)((DWORD32)(rgba) >> 24))
 Get the alpha component from a RGBA quadruple value rgba. More...
 
#define MakeRGBA(r, g, b, a)
 Makes a RGBA quadruple value from red r, green g, blue b and alpha components. More...
 
#define MakeRGB(r, g, b)   MakeRGBA((r), (g), (b), 255)
 Makes a RGB triple value from red r, green g, and blue b components. More...
 

Typedefs

typedef unsigned char BYTE
 A type definition for an 8-bit unsigned character (byte). More...
 
typedef signed char SBYTE
 A type definition for an 8-bit signed character. More...
 
typedef unsigned short WORD_HPTR
 An unsigned int (word) type in half pointer precision. More...
 
typedef signed short SWORD_HPTR
 An signed int type in half pointer precision. More...
 
typedef WORD_HPTR WORD
 A type definition for an unsigned integer (word). More...
 
typedef SWORD_HPTR SWORD
 A type definition for a signed integer. More...
 
typedef unsigned short WORD16
 A type definition for a 16-bit unsigned integer (word). More...
 
typedef signed short SWORD16
 A type definition for a 16-bit signed integer. More...
 
typedef long LONG_PTR
 A signed long type for pointer precision. More...
 
typedef LONG_PTR LINT
 Signed integer which has pointer precision. More...
 
typedef LONG_PTR LRESULT
 Signed result of message processing. More...
 
typedef unsigned long DWORD_PTR
 An unsigned long type for pointer precision. More...
 
typedef DWORD_PTR DWORD
 A unsigned long type definition for pointer precision. More...
 
typedef unsigned int DWORD32
 A type definition for a 32-bit unsigned integer. More...
 
typedef signed long SDWORD_PTR
 A signed long type for pointer precision. More...
 
typedef SDWORD_PTR SDWORD
 A signed long type definition for pointer precision. More...
 
typedef signed int SDWORD32
 A type definition for a 32-bit signed integer. More...
 
typedef unsigned int UINT
 A type definition for unsigned integer. More...
 
typedef int INT_PTR
 A signed integer type for pointer precision. More...
 
typedef unsigned long UINT_PTR
 A unsigned integer type for pointer precision. More...
 
typedef long LONG
 A type definition for long integer. More...
 
typedef unsigned long ULONG
 A type definition for unsigned long integer. More...
 
typedef UINT_PTR WPARAM
 A type definition for the first message paramter. More...
 
typedef UINT_PTR LPARAM
 A type definition for the second message paramter. More...
 
typedef DWORD32 RGBCOLOR
 A type definition for a RGB color value. More...
 
typedef struct _RECT RECT
 
typedef RECTPRECT
 Data type of the pointer to a RECT. More...
 
typedef struct _POINT POINT
 
typedef POINTPPOINT
 Data type of the pointer to a POINT. More...
 
typedef struct _SIZE SIZE
 
typedef SIZEPSIZE
 Data type of the pointer to a SIZE. More...
 
typedef struct _RGB RGB
 
typedef RGBPRGB
 Data type of the pointer to a RGB. More...
 

Detailed Description

Macro Definition Documentation

◆ FIRSTBYTE

#define FIRSTBYTE (   w)    ((BYTE)(w))

Returns the first byte of the WPARAM w.

See also
MAKEWPARAM

Definition at line 782 of file common.h.

◆ FOURTHBYTE

#define FOURTHBYTE (   w)    ((BYTE)(((DWORD32)(w)) >> 24))

Returns the fourth byte of the WPARAM w.

See also
MAKEWPARAM

Definition at line 806 of file common.h.

◆ GetAValue

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

Get the alpha component from a RGBA quadruple value rgba.

You can make a RGBA triple by using MakeRGBA.

See also
MakeRGBA, MakeRGB

Definition at line 897 of file common.h.

Referenced by DWORD2Pixel().

◆ GetBValue

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

Get the blue component from a RGBA quadruple value rgba.

You can make a RGBA triple by using MakeRGBA.

See also
MakeRGBA, MakeRGB

Definition at line 888 of file common.h.

Referenced by DWORD2Pixel().

◆ GetGValue

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

Get the green component from a RGBA quadruple value rgba.

You can make a RGBA triple by using MakeRGBA.

See also
MakeRGBA, MakeRGB

Definition at line 879 of file common.h.

Referenced by DWORD2Pixel().

◆ GetRValue

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

Get the red component from a RGBA quadruple value rgba.

You can make a RGBA triple by using MakeRGBA.

See also
MakeRGBA, MakeRGB

Definition at line 870 of file common.h.

Referenced by DWORD2Pixel().

◆ HIBYTE

#define HIBYTE (   w)    ((BYTE)(((WORD)(w) >> NR_BITS_BYTE) & BITMASK_BYTE))

Returns the high byte of the word w.

See also
MAKEWORD

Definition at line 728 of file common.h.

◆ HISWORD

#define HISWORD (   l)    ((SWORD)((((DWORD)(l)) >> NR_BITS_WORD) & BITMASK_WORD))

Returns the high signed word of the double word l.

See also
MAKELONG

Definition at line 837 of file common.h.

◆ HIWORD

#define HIWORD (   l)    ((WORD)((((DWORD)(l)) >> NR_BITS_WORD) & BITMASK_WORD))

Returns the high word of the double word l.

See also
MAKELONG

Definition at line 821 of file common.h.

◆ LOBYTE

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

Returns the low byte of the word w.

See also
MAKEWORD

Definition at line 720 of file common.h.

◆ LOSWORD

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

Returns the low signed word of the double word l.

See also
MAKELONG

Definition at line 830 of file common.h.

◆ LOWORD

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

Returns the low word of the double word l.

See also
MAKELONG

Definition at line 814 of file common.h.

◆ MAKEDWORD32

#define MAKEDWORD32 (   first,
  second,
  third,
  fourth 
)
Value:
((DWORD32)( \
((BYTE)(first)) | \
(((DWORD32)((BYTE)(second))) << 8) | \
(((DWORD32)((BYTE)(third))) << 16) | \
(((DWORD32)((BYTE)(fourth))) << 24) \
))
unsigned char BYTE
A type definition for an 8-bit unsigned character (byte).
Definition: common.h:460
unsigned int DWORD32
A type definition for a 32-bit unsigned integer.
Definition: common.h:610

Makes a WORD32 value with four bytes.

See also
MAKEWORD16, FIRSTBYTE, SECONDBYTE, THIRDBYTE, FOURTHBYTE

Definition at line 754 of file common.h.

◆ MAKELONG

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

Makes a double word with pointer precision from low word and high word.

See also
MAKELONG32

Definition at line 853 of file common.h.

◆ MAKELONG32

#define MAKELONG32 (   low,
  high 
)    ((DWORD32)(((WORD16)(low)) | (((DWORD32)((WORD16)(high))) << 16)))

Makes a 32-bit double word from low word and high word which are both in 16-bit.

See also
MAKELONG

Definition at line 845 of file common.h.

◆ MakeRGB

#define MakeRGB (   r,
  g,
 
)    MakeRGBA((r), (g), (b), 255)

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 32-bit double word.
See also
GetRValue, GetGValue, GetBValue, GetAValue

Definition at line 925 of file common.h.

◆ MakeRGBA

#define MakeRGBA (   r,
  g,
  b,
 
)
Value:
(((DWORD32)((BYTE)(r))) \
| ((DWORD32)((BYTE)(g)) << 8) \
| ((DWORD32)((BYTE)(b)) << 16) \
| ((DWORD32)((BYTE)(a)) << 24))
unsigned char BYTE
A type definition for an 8-bit unsigned character (byte).
Definition: common.h:460
unsigned int DWORD32
A type definition for a 32-bit unsigned integer.
Definition: common.h:610

Makes a RGBA quadruple 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 32-bit double word.
See also
GetRValue, GetGValue, GetBValue, GetAValue

Definition at line 909 of file common.h.

Referenced by Pixel2DWORD().

◆ MAKEWORD

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

Makes a word from low byte and high byte.

See also
LOBYTE, HIBYTE

Definition at line 736 of file common.h.

◆ MAKEWORD16

#define MAKEWORD16 (   low,
  high 
)    ((WORD16)(((BYTE)(low)) | (((WORD16)((BYTE)(high))) << 8)))

Makes a 16-bit word from low byte and high byte.

See also
LOBYTE, HIBYTE

Definition at line 745 of file common.h.

◆ MAKEWPARAM

#define MAKEWPARAM (   first,
  second,
  third,
  fourth 
)
Value:
((WPARAM)( \
((BYTE)(first)) | \
(((WPARAM)((BYTE)(second))) << 8) | \
(((WPARAM)((BYTE)(third))) << 16) | \
(((WPARAM)((BYTE)(fourth))) << 24) \
))
unsigned char BYTE
A type definition for an 8-bit unsigned character (byte).
Definition: common.h:460
UINT_PTR WPARAM
A type definition for the first message paramter.
Definition: common.h:706

Makes a WPARAM value with four bytes.

See also
MAKEWORD, FIRSTBYTE, SECONDBYTE, THIRDBYTE, FOURTHBYTE

Definition at line 768 of file common.h.

◆ SECONDBYTE

#define SECONDBYTE (   w)    ((BYTE)(((DWORD32)(w)) >> 8))

Returns the second byte of the WPARAM w.

See also
MAKEWPARAM

Definition at line 790 of file common.h.

◆ SIZEOF_HPTR

SIZEOF_HPTR   2

The size of a half or pointer. 2 for 32-bit and 4 for 64-bit.

Definition at line 484 of file common.h.

◆ SIZEOF_PTR

SIZEOF_PTR   4

The size of a pointer. 4 for 32-bit and 8 for 64-bit.

Definition at line 483 of file common.h.

◆ THIRDBYTE

#define THIRDBYTE (   w)    ((BYTE)(((DWORD32)(w)) >> 16))

Returns the third byte of the WPARAM w.

See also
MAKEWPARAM

Definition at line 798 of file common.h.

Typedef Documentation

◆ BYTE

A type definition for an 8-bit unsigned character (byte).

Definition at line 460 of file common.h.

◆ DWORD

A unsigned long type definition for pointer precision.

Definition at line 604 of file common.h.

◆ DWORD32

A type definition for a 32-bit unsigned integer.

Definition at line 610 of file common.h.

◆ DWORD_PTR

An unsigned long type for pointer precision.

Commonly used for general 32-bit parameters that have been extended to 64 bits in 64-bit platform.

Definition at line 597 of file common.h.

◆ INT_PTR

A signed integer type for pointer precision.

Definition at line 675 of file common.h.

◆ LINT

Signed integer which has pointer precision.

Definition at line 577 of file common.h.

◆ LONG

typedef LONG

A type definition for long integer.

Definition at line 694 of file common.h.

◆ LONG_PTR

A signed long type for pointer precision.

Definition at line 570 of file common.h.

◆ LPARAM

A type definition for the second message paramter.

Definition at line 712 of file common.h.

◆ LRESULT

Signed result of message processing.

Definition at line 583 of file common.h.

◆ POINT

typedef struct _POINT POINT

Point structure.

See also
PPOINT

◆ PPOINT

typedef POINT * PPOINT

Data type of the pointer to a POINT.

See also
POINT

Definition at line 983 of file common.h.

◆ PRECT

typedef RECT * PRECT

Data type of the pointer to a RECT.

See also
RECT

Definition at line 960 of file common.h.

◆ PRGB

typedef RGB * PRGB

Data type of the pointer to a RGB.

See also
RGB

Definition at line 1038 of file common.h.

◆ PSIZE

typedef SIZE * PSIZE

Data type of the pointer to a SIZE.

See also
SIZE

Definition at line 1006 of file common.h.

◆ RECT

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

◆ RGB

typedef struct _RGB RGB

RGB triple structure.

See also
PRGB, GAL_Color

◆ RGBCOLOR

typedef DWORD32 RGBCOLOR

A type definition for a RGB color value.

Definition at line 860 of file common.h.

◆ SBYTE

A type definition for an 8-bit signed character.

Definition at line 466 of file common.h.

◆ SDWORD

A signed long type definition for pointer precision.

Definition at line 631 of file common.h.

◆ SDWORD32

A type definition for a 32-bit signed integer.

Definition at line 637 of file common.h.

◆ SDWORD_PTR

A signed long type for pointer precision.

Commonly used for general 32-bit parameters that have been extended to 64 bits in 64-bit platform.

Definition at line 624 of file common.h.

◆ SIZE

typedef struct _SIZE SIZE

Size structure of a 2-dimension object.

See also
PSIZE

◆ SWORD

A type definition for a signed integer.

Definition at line 547 of file common.h.

◆ SWORD16

A type definition for a 16-bit signed integer.

Definition at line 559 of file common.h.

◆ SWORD_HPTR

An signed int type in half pointer precision.

Definition at line 534 of file common.h.

◆ UINT

A type definition for unsigned integer.

Definition at line 664 of file common.h.

◆ UINT_PTR

A unsigned integer type for pointer precision.

Definition at line 687 of file common.h.

◆ ULONG

A type definition for unsigned long integer.

Definition at line 700 of file common.h.

◆ WORD

A type definition for an unsigned integer (word).

Definition at line 541 of file common.h.

◆ WORD16

A type definition for a 16-bit unsigned integer (word).

Definition at line 553 of file common.h.

◆ WORD_HPTR

An unsigned int (word) type in half pointer precision.

Definition at line 522 of file common.h.

◆ WPARAM

A type definition for the first message paramter.

Definition at line 706 of file common.h.