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

Last change on this file since 478 was 422, checked in by hugh, 26 years ago

Created DIVEWRAp.h to presewrve FS selector

File size: 2.2 KB
Line 
1#ifndef __OS2PALETTE_H__
2#define __OS2PALETTE_H__
3
4#include "os2ddraw.h"
5#include "divewrap.h"
6#define FAR
7#undef THIS
8#define THIS IDirectDrawPalette*
9
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()
21
22class OS2IDirectDrawPalette
23{
24 public:
25 //this one has to go first!
26 IDirectDrawPaletteVtbl *lpVtbl;
27 IDirectDrawPaletteVtbl Vtbl;
28
29 OS2IDirectDrawPalette( OS2IDirectDraw *lpDirectDraw,
30 int palsize,
31 LPPALETTEENTRY lpColorTable,
32 DWORD dwPalFlags);
33 ~OS2IDirectDrawPalette();
34
35 void SetPhysPalette();
36 void RestorePhysPalette();
37 void SetIsPrimary(BOOL newValue);
38 int Referenced;
39 inline HRESULT GetLastError() { return lastError; };
40 private:
41
42 protected:
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);
57};
58
59
60HRESULT __stdcall PalQueryInterface(THIS, REFIID riid, LPVOID FAR * ppvObj);
61ULONG __stdcall PalAddRef(THIS);
62ULONG __stdcall PalRelease(THIS);
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);
67
68
69#endif
Note: See TracBrowser for help on using the repository browser.