diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 460c52653ab0dcca6f19a4f492ed2c5e4e963ab0 (patch) | |
tree | 67208f7c145782a7e90b123b982ca78d88cc2c87 /ktnef/gui/wmfstruct.h | |
download | tdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.tar.gz tdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ktnef/gui/wmfstruct.h')
-rw-r--r-- | ktnef/gui/wmfstruct.h | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/ktnef/gui/wmfstruct.h b/ktnef/gui/wmfstruct.h new file mode 100644 index 000000000..ca4f1f7db --- /dev/null +++ b/ktnef/gui/wmfstruct.h @@ -0,0 +1,107 @@ +/* WMF Metafile Structures + * Author: Stefan Taferner <taferner@kde.org> + */ +#ifndef wmfstruct_h +#define wmfstruct_h + +typedef short WORD; +typedef int DWORD; +typedef Q_INT32 LONG; +typedef void* _HANDLE; + +typedef struct _RECT +{ + WORD left; + WORD top; + WORD right; + WORD bottom; +} RECT; + +typedef struct _RECTL +{ + LONG left; + LONG top; + LONG right; + LONG bottom; +} RECTL; + +typedef struct _SIZE +{ + WORD width; + WORD height; +} SIZE; + +typedef struct _SIZEL +{ + LONG width; + LONG height; +} SIZEL; + + +struct WmfEnhMetaHeader +{ + DWORD iType; // Record type EMR_HEADER + DWORD nSize; // Record size in bytes. This may be greater + // than the sizeof( ENHMETAHEADER ). + RECTL rclBounds; // Inclusive-inclusive bounds in device units + RECTL rclFrame; // Inclusive-inclusive Picture Frame of metafile + // in .01 mm units + DWORD dSignature; // Signature. Must be ENHMETA_SIGNATURE. + DWORD nVersion; // Version number + DWORD nBytes; // Size of the metafile in bytes + DWORD nRecords; // Number of records in the metafile + WORD nHandles; // Number of handles in the handle table + // Handle index zero is reserved. + WORD sReserved; // Reserved. Must be zero. + DWORD nDescription; // Number of chars in the unicode description string + // This is 0 if there is no description string + DWORD offDescription; // Offset to the metafile description record. + // This is 0 if there is no description string + DWORD nPalEntries; // Number of entries in the metafile palette. + SIZEL szlDevice; // Size of the reference device in pels + SIZEL szlMillimeters; // Size of the reference device in millimeters +}; +#define ENHMETA_SIGNATURE 0x464D4520 + + +struct WmfMetaHeader +{ + WORD mtType; + WORD mtHeaderSize; + WORD mtVersion; + DWORD mtSize; + WORD mtNoObjects; + DWORD mtMaxRecord; + WORD mtNoParameters; +}; + + +struct WmfPlaceableHeader +{ + DWORD key; + WORD hmf; + RECT bbox; + WORD inch; + DWORD reserved; + WORD checksum; +}; +#define APMHEADER_KEY 0x9AC6CDD7 + + +struct WmfMetaRecord +{ + DWORD rdSize; // Record size ( in words ) of the function + WORD rdFunction; // Record function number + WORD rdParm[ 1 ]; // WORD array of parameters +}; + + +struct WmfEnhMetaRecord +{ + DWORD iType; // Record type EMR_xxx + DWORD nSize; // Record size in bytes + DWORD dParm[ 1 ]; // DWORD array of parameters +}; + + +#endif /*wmfstruct_h*/ |