source: trunk/src/ddraw/OS2PALETTE.H@ 54

Last change on this file since 54 was 46, checked in by sandervl, 26 years ago

* empty log message *

File size: 2.2 KB
Line 
1/*
2 * DirectDraw Palette class
3 *
4 * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
5 *
6 * Project Odin Software License can be found in LICENSE.TXT
7 *
8 */
9#ifndef __OS2PALETTE_H__
10#define __OS2PALETTE_H__
11
12#include "os2ddraw.h"
13
14/* KSO Apr 19 1999: Set correct interface. *
15 * (INTERFACE is used in the THIS and THIS_ macros) */
16#undef INTERFACE
17#define INTERFACE IDirectDrawPalette
18
19class OS2IDirectDrawPalette
20{
21 public:
22 //this one has to go first!
23 IDirectDrawPaletteVtbl *lpVtbl;
24 IDirectDrawPaletteVtbl Vtbl;
25
26 OS2IDirectDrawPalette(OS2IDirectDraw *lpDirectDraw, int palsize, W32_LPPALETTEENTRY lpColorTable);
27 ~OS2IDirectDrawPalette();
28
29 void SetPhysPalette();
30 void RestorePhysPalette();
31 int Referenced;
32 inline HRESULT GetLastError() { return lastError; };
33 private:
34
35 protected:
36 HDIVE hDive;
37 ULONG nrColors;
38 HRESULT lastError;
39 W32_LPPALETTEENTRY os2pal;
40 OS2IDirectDraw *lpDraw;
41
42 // Linked list management
43 OS2IDirectDrawPalette* next; // Next OS2IDirectDraw
44 static OS2IDirectDrawPalette* ddraw; // List of OS2IDirectDraw
45
46 friend HRESULT __stdcall PalQueryInterface(THIS, REFIID riid, LPVOID FAR * ppvObj);
47 friend ULONG __stdcall PalAddRef(THIS);
48 friend ULONG __stdcall PalRelease(THIS);
49 friend HRESULT __stdcall PalGetCaps(THIS_ LPDWORD);
50 friend HRESULT __stdcall PalGetEntries(THIS_ DWORD,DWORD,DWORD,W32_LPPALETTEENTRY);
51 friend HRESULT __stdcall PalInitialize(THIS_ LPDIRECTDRAW, DWORD,W32_LPPALETTEENTRY);
52 friend HRESULT __stdcall PalSetEntries(THIS_ DWORD,DWORD,DWORD,W32_LPPALETTEENTRY);
53};
54
55
56HRESULT __stdcall PalQueryInterface(THIS, REFIID riid, LPVOID FAR * ppvObj);
57ULONG __stdcall PalAddRef(THIS);
58ULONG __stdcall PalRelease(THIS);
59HRESULT __stdcall PalGetCaps(THIS_ LPDWORD);
60HRESULT __stdcall PalGetEntries(THIS_ DWORD,DWORD,DWORD,W32_LPPALETTEENTRY);
61HRESULT __stdcall PalInitialize(THIS_ LPDIRECTDRAW, DWORD,W32_LPPALETTEENTRY);
62HRESULT __stdcall PalSetEntries(THIS_ DWORD,DWORD,DWORD,W32_LPPALETTEENTRY);
63
64
65#endif
Note: See TracBrowser for help on using the repository browser.