Changeset 581 for trunk/include


Ignore:
Timestamp:
Aug 19, 1999, 4:19:15 PM (26 years ago)
Author:
sandervl
Message:

PE loader resource convertion changes

Location:
trunk/include
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/winicon.h

    r575 r581  
    1 /* $Id: winicon.h,v 1.1 1999-08-19 12:52:48 sandervl Exp $ */
     1/* $Id: winicon.h,v 1.2 1999-08-19 14:18:24 sandervl Exp $ */
    22
    33/*
     
    2020
    2121#pragma pack(1)
     22
     23/* Win v4.0 bitmap structs */
     24/* Image Color Matching color definitions */
     25
     26typedef LONG   LCSCSTYPE;
     27
     28#define LCS_CALIBRATED_RGB              0x00000000L
     29#define LCS_DEVICE_RGB                  0x00000001L
     30#define LCS_DEVICE_CMYK                 0x00000002L
     31typedef LONG    LCSGAMUTMATCH;
     32
     33#define LCS_GM_BUSINESS                 0x00000001L
     34#define LCS_GM_GRAPHICS                 0x00000002L
     35#define LCS_GM_IMAGES                   0x00000004L
     36
     37/* ICM Defines for results from CheckColorInGamut() */
     38#define CM_OUT_OF_GAMUT         255
     39#define CM_IN_GAMUT                     0
     40
     41/* Macros to retrieve CMYK values from a COLORREF */
     42#define GetKValue(cmyk)      ((BYTE)(cmyk))
     43#define GetYValue(cmyk)      ((BYTE)((cmyk)>> 8))
     44#define GetMValue(cmyk)      ((BYTE)((cmyk)>>16))
     45#define GetCValue(cmyk)      ((BYTE)((cmyk)>>24))
     46#define CMYK(c,m,y,k)       ((COLORREF)((((BYTE)(k)|((WORD)((BYTE)(y))<<8))|(((DWORD)(BYTE)(m))<<16))|(((DWORD)(BYTE)(c))<<24)))
     47
     48typedef long            FXPT16DOT16, FAR *LPFXPT16DOT16;
     49typedef long            FXPT2DOT30, FAR *LPFXPT2DOT30;
     50
     51/* ICM Color Definitions */
     52// The following two structures are used for defining RGB's in terms of
     53// CIEXYZ. The values are fixed point 16.16.
     54typedef struct tagCIEXYZ
     55{
     56        FXPT2DOT30 ciexyzX;
     57        FXPT2DOT30 ciexyzY;
     58        FXPT2DOT30 ciexyzZ;
     59} CIEXYZ;
     60typedef CIEXYZ  FAR *LPCIEXYZ;
     61
     62typedef struct tagICEXYZTRIPLE
     63{
     64        CIEXYZ  ciexyzRed;
     65        CIEXYZ  ciexyzGreen;
     66        CIEXYZ  ciexyzBlue;
     67} CIEXYZTRIPLE;
     68typedef CIEXYZTRIPLE    FAR *LPCIEXYZTRIPLE;
     69
     70#ifndef MAX_PATH
     71        #define MAX_PATH CCHMAXPATH
     72#endif
     73// The next structures the logical color space. Unlike pens and brushes,
     74// but like palettes, there is only one way to create a LogColorSpace.
     75// A pointer to it must be passed, its elements can't be pushed as
     76// arguments.
     77
     78typedef struct tagLOGCOLORSPACEA
     79{
     80        DWORD lcsSignature;
     81        DWORD lcsVersion;
     82        DWORD lcsSize;
     83        LCSCSTYPE lcsCSType;
     84        LCSGAMUTMATCH lcsIntent;
     85        CIEXYZTRIPLE lcsEndpoints;
     86        DWORD lcsGammaRed;
     87        DWORD lcsGammaGreen;
     88        DWORD lcsGammaBlue;
     89        CHAR   lcsFilename[MAX_PATH];
     90} LOGCOLORSPACEA, *LPLOGCOLORSPACEA;
     91
     92typedef struct tagLOGCOLORSPACEW
     93{
     94        DWORD lcsSignature;
     95        DWORD lcsVersion;
     96        DWORD lcsSize;
     97        LCSCSTYPE lcsCSType;
     98        LCSGAMUTMATCH lcsIntent;
     99        CIEXYZTRIPLE lcsEndpoints;
     100        DWORD lcsGammaRed;
     101        DWORD lcsGammaGreen;
     102        DWORD lcsGammaBlue;
     103        WCHAR  lcsFilename[MAX_PATH];
     104} LOGCOLORSPACEW, *LPLOGCOLORSPACEW;
     105
     106#ifdef UNICODE
     107typedef LOGCOLORSPACEW LOGCOLORSPACE;
     108typedef LPLOGCOLORSPACEW LPLOGCOLORSPACE;
     109#else
     110typedef LOGCOLORSPACEA LOGCOLORSPACE;
     111typedef LPLOGCOLORSPACEA LPLOGCOLORSPACE;
     112#endif // UNICODE
     113
     114typedef struct
     115{
     116        DWORD        bV4Size;
     117        LONG         bV4Width;
     118        LONG         bV4Height;
     119        WORD         bV4Planes;
     120        WORD         bV4BitCount;
     121        DWORD        bV4V4Compression;
     122        DWORD        bV4SizeImage;
     123        LONG         bV4XPelsPerMeter;
     124        LONG         bV4YPelsPerMeter;
     125        DWORD        bV4ClrUsed;
     126        DWORD        bV4ClrImportant;
     127        DWORD        bV4RedMask;
     128        DWORD        bV4GreenMask;
     129        DWORD        bV4BlueMask;
     130        DWORD        bV4AlphaMask;
     131        DWORD        bV4CSType;
     132        CIEXYZTRIPLE bV4Endpoints;
     133        DWORD        bV4GammaRed;
     134        DWORD        bV4GammaGreen;
     135        DWORD        bV4GammaBlue;
     136} BITMAPV4HEADER,       /*FAR *LPBITMAPV4HEADER,*/ *PBITMAPV4HEADER;
     137
     138/* constants for the biCompression field */
     139#define BI_RGB        0L
     140#define BI_RLE8       1L
     141#define BI_RLE4       2L
     142#define BI_BITFIELDS  3L
    22143
    23144typedef struct {
  • trunk/include/winres.h

    r575 r581  
    1 /* $Id: winres.h,v 1.4 1999-08-19 12:52:49 sandervl Exp $ */
     1/* $Id: winres.h,v 1.5 1999-08-19 14:18:24 sandervl Exp $ */
    22
    33/*
     
    1313#define __WINRES_H__
    1414
    15 #ifdef INCL_WINRES
    16 
    17  typedef struct tagWINBITMAPINFOHEADER{
    18         DWORD      biSize;
    19         LONG       biWidth;
    20         LONG       biHeight;
    21         WORD       biPlanes;
    22         WORD       biBitCount;
    23         DWORD      biCompression;
    24         DWORD      biSizeImage;
    25         LONG       biXPelsPerMeter;
    26         LONG       biYPelsPerMeter;
    27         DWORD      biClrUsed;
    28         DWORD      biClrImportant;
    29  } WINBITMAPINFOHEADER;
    30 
    31  typedef struct
    32  {
    33    BYTE                      blue;
    34    BYTE                      green;
    35    BYTE                      red;
    36    BYTE                      res;
    37  }  RGBQUAD;
    38 
    39  /*
    40   * Defines for the fVirt field of the Accelerator table structure.
    41   */
    42  #define FVIRTKEY  TRUE          /* Assumed to be == TRUE */
    43  #define FNOINVERT 0x02
    44  #define FSHIFT    0x04
    45  #define FCONTROL  0x08
    46  #define FALT      0x10
    47 
    48  //TODO: Aligned at 8 byte boundary or not??
    49  #pragma pack(1)
    50  typedef struct tagWINACCEL {
    51      BYTE   fVirt;               /* Also called the flags field */
    52      WORD   key;
    53      WORD   cmd;
    54      BYTE   align[3];
    55  } WINACCEL, *LPWINACCEL;
    56  #pragma pack()
    57 
    58 #endif
    59 
    60 #ifdef __cplusplus
    6115class Win32Image;
    6216
     
    8842
    8943private:
    90              PVOID ConvertBitmap(void *bmpdata);
     44             PVOID convertOS2Bitmap(void *bmpdata);
     45
     46             PVOID convertResource(void *win32res);
    9147
    9248       Win32Image *module;
     
    11167};
    11268
    113 #endif // __cplusplus
    11469
    11570    #define    NTRT_NEWRESOURCE      0x2000
Note: See TracChangeset for help on using the changeset viewer.