mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-24 17:44:19 +08:00
new type: QDWORD for a quauter of DWORD
This commit is contained in:
@@ -26,6 +26,14 @@ Please report any bugs and incompatibilities in
|
||||
* New DC attribute: BIDI flag.
|
||||
1. Enhance commlcd engint to support more pixel type and synchronously update.
|
||||
1. New USVFB IAL engine and NEWGAL engine for web display server.
|
||||
1. New type: `QDWORD` for a quauter of DWORD. This type is 16-bit long on
|
||||
64-bit architecture, and 8-bit long on 32-bit.
|
||||
1. New macros for QDWORD:
|
||||
* `MAKEDWORD`: Make a DWROD from four QDWORDs.
|
||||
* `FIRST_QDWORD`: get the first (LSB) QDWORD from a DWORD.
|
||||
* `SECOND_QDWORD`: get the second (LSB) QDWORD from a DWORD.
|
||||
* `THIRD_QDWORD`: get the third (LSB) QDWORD from a DWORD.
|
||||
* `FOURTH_QDWORD`: get the fourth (LSB) QDWORD from a DWORD.
|
||||
|
||||
* BUGFIXING:
|
||||
1. handle `PNG_COLOR_TYPE_GRAY_ALPHA` color type of PNG files.
|
||||
|
||||
@@ -587,6 +587,27 @@ typedef SDWORD_PTR SDWORD;
|
||||
*/
|
||||
typedef signed int SDWORD32;
|
||||
|
||||
#if SIZEOF_PTR == 8
|
||||
typedef unsigned short QDWORD;
|
||||
#define QDWORD_SHIFT 16
|
||||
#else
|
||||
typedef unsigned char QDWORD;
|
||||
#define QDWORD_SHIFT 8
|
||||
#endif
|
||||
|
||||
#define MAKEDWORD(q1, q2, q3, q4) \
|
||||
((DWORD)( \
|
||||
(((DWORD)(QDWORD)(q1))) | \
|
||||
(((DWORD)((QDWORD)(q2))) << QDWORD_SHIFT) | \
|
||||
(((DWORD)((QDWORD)(q3))) << (QDWORD_SHIFT*2)) | \
|
||||
(((DWORD)((QDWORD)(q4))) << (QDWORD_SHIFT*3)) \
|
||||
))
|
||||
|
||||
#define FIRST_QDWORD(dw) ((QDWORD)(((DWORD)(dw))))
|
||||
#define SECOND_QDWORD(dw) ((QDWORD)((((DWORD)(dw)) >> QDWORD_SHIFT)))
|
||||
#define THIRD_QDWORD(dw) ((QDWORD)((((DWORD)(dw)) >> (QDWORD_SHIFT*2))))
|
||||
#define FOURTH_QDWORD(dw) ((QDWORD)((((DWORD)(dw)) >> (QDWORD_SHIFT*3))))
|
||||
|
||||
/**
|
||||
* \var UINT
|
||||
* \brief A type definition for unsigned integer.
|
||||
|
||||
Reference in New Issue
Block a user