Changeset 211 for trunk/src/ddraw/OS2PALETTE.H
- Timestamp:
- Jun 26, 1999, 1:36:08 PM (26 years ago)
- File:
-
- 1 edited
-
trunk/src/ddraw/OS2PALETTE.H (modified) (2 diffs)
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 class5 *6 * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)7 *8 * Project Odin Software License can be found in LICENSE.TXT9 *10 */11 1 #ifndef __OS2PALETTE_H__ 12 2 #define __OS2PALETTE_H__ 13 3 14 4 #include "os2ddraw.h" 5 #include <dive.h> 6 #define FAR 7 #undef THIS 8 #define THIS IDirectDrawPalette* 15 9 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 12 typedef 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; 19 typedef RGB2 *PRGB2; 20 #pragma pack() 20 21 21 22 class OS2IDirectDrawPalette 22 23 { 23 24 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; 27 28 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(); 30 34 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; }; 35 40 private: 36 41 37 42 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); 55 57 }; 56 58 … … 59 61 ULONG __stdcall PalAddRef(THIS); 60 62 ULONG __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);63 HRESULT __stdcall PalGetCaps(THIS, LPDWORD); 64 HRESULT __stdcall PalGetEntries(THIS, DWORD,DWORD,DWORD,LPPALETTEENTRY); 65 HRESULT __stdcall PalInitialize(THIS, LPDIRECTDRAW, DWORD, LPPALETTEENTRY); 66 HRESULT __stdcall PalSetEntries(THIS, DWORD,DWORD,DWORD,LPPALETTEENTRY); 65 67 66 68
Note:
See TracChangeset
for help on using the changeset viewer.
