MiniGUI API Reference (MiniGUI-Standalone)  v3.2.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 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))
 Gets the red component from a RGBA triple value rgba. More...
 
#define GetGValue(rgba)   ((BYTE)(((DWORD32)(rgba)) >> 8))
 Gets the green component from a RGBA triple value rgba. More...
 
#define GetBValue(rgba)   ((BYTE)((DWORD32)(rgba) >> 16))
 Gets the blue component from a RGBA triple value rgba. More...
 
#define GetAValue(rgba)   ((BYTE)((DWORD32)(rgba) >> 24))
 Gets the alpha component from a RGBA triple value rgba. More...
 
#define MakeRGBA(r, g, b, a)
 Makes a RGBA triple value from red r, green g, blue b and alpha components. More...
 
#define MakeRGB(r, g, b)
 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. 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

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

Returns the first byte of the WPARAM w.

See also
MAKEWPARAM

Definition at line 696 of file common.h.

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

Returns the fourth byte of the WPARAM w.

See also
MAKEWPARAM

Definition at line 720 of file common.h.

#define GetAValue (   rgba)    ((BYTE)((DWORD32)(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 807 of file common.h.

Referenced by DWORD2Pixel().

#define GetBValue (   rgba)    ((BYTE)((DWORD32)(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 798 of file common.h.

Referenced by DWORD2Pixel().

#define GetGValue (   rgba)    ((BYTE)(((DWORD32)(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 789 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 780 of file common.h.

Referenced by DWORD2Pixel().

#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 658 of file common.h.

#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 750 of file common.h.

#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 735 of file common.h.

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

Returns the low byte of the word w.

See also
MAKEWORD

Definition at line 650 of file common.h.

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

Returns the low signed word of the double word l.

See also
MAKELONG

Definition at line 743 of file common.h.

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

Returns the low word of the double word l.

See also
MAKELONG

Definition at line 728 of file common.h.

#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 764 of file common.h.

#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 757 of file common.h.

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

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 831 of file common.h.

#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:411
unsigned int DWORD32
A type definition for a 32-bit unsigned integer.
Definition: common.h:561

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 819 of file common.h.

Referenced by Pixel2DWORD().

#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 666 of file common.h.

#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 674 of file common.h.

#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:411
UINT_PTR WPARAM
A type definition for the first message paramter.
Definition: common.h:636

Makes a WPARAM value with four bytes.

See also
MAKEWORD, FIRSTBYTE, SECONDBYTE, THIRDBYTE, FOURTHBYTE

Definition at line 682 of file common.h.

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

Returns the second byte of the WPARAM w.

See also
MAKEWPARAM

Definition at line 704 of file common.h.

SIZEOF_HPTR   2

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

Definition at line 435 of file common.h.

SIZEOF_PTR   4

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

Definition at line 434 of file common.h.

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

Returns the third byte of the WPARAM w.

See also
MAKEWPARAM

Definition at line 712 of file common.h.

Typedef Documentation

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

Definition at line 411 of file common.h.

A unsigned long type definition for pointer precision.

Definition at line 555 of file common.h.

A type definition for a 32-bit unsigned integer.

Definition at line 561 of file common.h.

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 548 of file common.h.

A signed integer type for pointer precision.

Definition at line 605 of file common.h.

Signed integer which has pointer precision.

Definition at line 528 of file common.h.

typedef LONG

A type definition for long integer.

Definition at line 624 of file common.h.

A signed long type for pointer precision.

Definition at line 521 of file common.h.

A type definition for the second message paramter.

Definition at line 642 of file common.h.

Signed result of message processing.

Definition at line 534 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 891 of file common.h.

typedef RECT * PRECT

Data type of the pointer to a RECT.

See also
RECT

Definition at line 868 of file common.h.

typedef RGB * PRGB

Data type of the pointer to a RGB.

See also
RGB

Definition at line 946 of file common.h.

typedef SIZE * PSIZE

Data type of the pointer to a SIZE.

See also
SIZE

Definition at line 914 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 770 of file common.h.

A type definition for an 8-bit signed character.

Definition at line 417 of file common.h.

A signed long type definition for pointer precision.

Definition at line 582 of file common.h.

A type definition for a 32-bit signed integer.

Definition at line 588 of file common.h.

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 575 of file common.h.

typedef struct _SIZE SIZE

Size structure of a 2-dimension object.

See also
PSIZE

A type definition for a signed integer.

Definition at line 498 of file common.h.

A type definition for a 16-bit signed integer.

Definition at line 510 of file common.h.

An signed int type in half pointer precision.

Definition at line 485 of file common.h.

A type definition for unsigned integer.

Definition at line 594 of file common.h.

A unsigned integer type for pointer precision.

Definition at line 617 of file common.h.

A type definition for unsigned long integer.

Definition at line 630 of file common.h.

A type definition for an unsigned integer (word).

Definition at line 492 of file common.h.

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

Definition at line 504 of file common.h.

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

Definition at line 473 of file common.h.

A type definition for the first message paramter.

Definition at line 636 of file common.h.