Ignore:
Timestamp:
Jun 26, 1999, 1:36:08 PM (26 years ago)
Author:
hugh
Message:

Include for DX6 verion of ddraw

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ddraw/OS2PALETTE.H

    r97 r211  
    1 /* $Id: OS2PALETTE.H,v 1.3 1999-06-10 17:10:56 phaller Exp $ */
    2 
    3 /*
    4  * DirectDraw Palette class
    5  *
    6  * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
    7  *
    8  * Project Odin Software License can be found in LICENSE.TXT
    9  *
    10  */
    111#ifndef __OS2PALETTE_H__
    122#define __OS2PALETTE_H__
    133
    144#include "os2ddraw.h"
     5#include <dive.h>
     6#define FAR
     7#undef THIS
     8#define THIS IDirectDrawPalette*
    159
    16 /* KSO Apr 19 1999: Set correct interface.           *
    17  * (INTERFACE is used in the THIS and THIS_ macros)  */
    18 #undef  INTERFACE
    19 #define INTERFACE   IDirectDrawPalette
     10#pragma pack(1)          /* pack on wordboundary */
     11
     12typedef struct _RGB2         /* rgb2 */
     13{
     14  BYTE bBlue;              /* Blue component of the color definition */
     15  BYTE bGreen;             /* Green component of the color definition*/
     16  BYTE bRed;               /* Red component of the color definition  */
     17  BYTE fcOptions;          /* Reserved, must be zero                 */
     18} RGB2;
     19typedef RGB2 *PRGB2;
     20#pragma pack()
    2021
    2122class OS2IDirectDrawPalette
    2223{
    2324 public:
    24     //this one has to go first!
    25     IDirectDrawPaletteVtbl *lpVtbl;
    26     IDirectDrawPaletteVtbl  Vtbl;
     25  //this one has to go first!
     26  IDirectDrawPaletteVtbl *lpVtbl;
     27  IDirectDrawPaletteVtbl  Vtbl;
    2728
    28     OS2IDirectDrawPalette(OS2IDirectDraw *lpDirectDraw, int palsize, W32_LPPALETTEENTRY lpColorTable);
    29     ~OS2IDirectDrawPalette();
     29  OS2IDirectDrawPalette( OS2IDirectDraw *lpDirectDraw,
     30                         int palsize,
     31                         LPPALETTEENTRY lpColorTable,
     32                         DWORD dwPalFlags);
     33  ~OS2IDirectDrawPalette();
    3034
    31     void          SetPhysPalette();
    32     void          RestorePhysPalette();
    33     int           Referenced;
    34     inline  HRESULT       GetLastError() { return lastError; };
     35  void          SetPhysPalette();
     36  void          RestorePhysPalette();
     37  void          SetIsPrimary(BOOL newValue);
     38  int           Referenced;
     39  inline  HRESULT       GetLastError() { return lastError; };
    3540 private:
    3641
    3742 protected:
    38     HDIVE               hDive;
    39     ULONG               nrColors;
    40     HRESULT             lastError;
    41     W32_LPPALETTEENTRY  os2pal;
    42     OS2IDirectDraw     *lpDraw;
    43 
    44                               // Linked list management
    45               OS2IDirectDrawPalette* next;                   // Next OS2IDirectDraw
    46     static    OS2IDirectDrawPalette* ddraw;                  // List of OS2IDirectDraw
    47 
    48     friend    HRESULT __stdcall PalQueryInterface(THIS, REFIID riid, LPVOID FAR * ppvObj);
    49     friend    ULONG   __stdcall PalAddRef(THIS);
    50     friend    ULONG   __stdcall PalRelease(THIS);
    51     friend    HRESULT __stdcall PalGetCaps(THIS_ LPDWORD);
    52     friend    HRESULT __stdcall PalGetEntries(THIS_ DWORD,DWORD,DWORD,W32_LPPALETTEENTRY);
    53     friend    HRESULT __stdcall PalInitialize(THIS_ LPDIRECTDRAW, DWORD,W32_LPPALETTEENTRY);
    54     friend    HRESULT __stdcall PalSetEntries(THIS_ DWORD,DWORD,DWORD,W32_LPPALETTEENTRY);
     43  HDIVE          hDive;
     44  HRESULT        lastError;
     45  LPPALETTEENTRY os2pal;
     46  OS2IDirectDraw *lpDraw;
     47  DWORD          dwCaps;
     48  DWORD          dwSize;
     49  BOOL           fAttachedToPrimary;
     50  friend    HRESULT __stdcall PalQueryInterface(THIS, REFIID riid, LPVOID FAR * ppvObj);
     51  friend    ULONG   __stdcall PalAddRef(THIS);
     52  friend    ULONG   __stdcall PalRelease(THIS);
     53  friend    HRESULT __stdcall PalGetCaps(THIS, LPDWORD);
     54  friend    HRESULT __stdcall PalGetEntries(THIS, DWORD,DWORD,DWORD,LPPALETTEENTRY);
     55  friend    HRESULT __stdcall PalInitialize(THIS, LPDIRECTDRAW, DWORD, LPPALETTEENTRY);
     56  friend    HRESULT __stdcall PalSetEntries(THIS, DWORD,DWORD,DWORD,LPPALETTEENTRY);
    5557};
    5658
     
    5961ULONG   __stdcall PalAddRef(THIS);
    6062ULONG   __stdcall PalRelease(THIS);
    61 HRESULT __stdcall PalGetCaps(THIS_ LPDWORD);
    62 HRESULT __stdcall PalGetEntries(THIS_ DWORD,DWORD,DWORD,W32_LPPALETTEENTRY);
    63 HRESULT __stdcall PalInitialize(THIS_ LPDIRECTDRAW, DWORD,W32_LPPALETTEENTRY);
    64 HRESULT __stdcall PalSetEntries(THIS_ DWORD,DWORD,DWORD,W32_LPPALETTEENTRY);
     63HRESULT __stdcall PalGetCaps(THIS, LPDWORD);
     64HRESULT __stdcall PalGetEntries(THIS, DWORD,DWORD,DWORD,LPPALETTEENTRY);
     65HRESULT __stdcall PalInitialize(THIS, LPDIRECTDRAW, DWORD, LPPALETTEENTRY);
     66HRESULT __stdcall PalSetEntries(THIS, DWORD,DWORD,DWORD,LPPALETTEENTRY);
    6567
    6668
Note: See TracChangeset for help on using the changeset viewer.