ReactOS  0.4.14-dev-323-g6fe6a88
palette.c File Reference
#include "rosdraw.h"
Include dependency graph for palette.c:

Go to the source code of this file.

Functions

static HRESULT WINAPI DirectDrawPalette_QueryInterface (IDirectDrawPalette *iface, REFIID refiid, void **obj)
 
static ULONG WINAPI DirectDrawPalette_AddRef (IDirectDrawPalette *iface)
 
static ULONG WINAPI DirectDrawPalette_Release (IDirectDrawPalette *iface)
 
static HRESULT WINAPI DirectDrawPalette_Initialize (LPDIRECTDRAWPALETTE iface, LPDIRECTDRAW ddraw, DWORD dwFlags, LPPALETTEENTRY palent)
 
static HRESULT WINAPI DirectDrawPalette_GetEntries (LPDIRECTDRAWPALETTE iface, DWORD dwFlags, DWORD dwStart, DWORD dwCount, LPPALETTEENTRY palent)
 
static HRESULT WINAPI DirectDrawPalette_SetEntries (LPDIRECTDRAWPALETTE iface, DWORD dwFlags, DWORD dwStart, DWORD dwCount, LPPALETTEENTRY palent)
 
static HRESULT WINAPI DirectDrawPalette_GetCaps (LPDIRECTDRAWPALETTE iface, LPDWORD lpdwCaps)
 

Variables

const IDirectDrawPaletteVtbl DirectDrawPalette_Vtable
 

Function Documentation

◆ DirectDrawPalette_AddRef()

static ULONG WINAPI DirectDrawPalette_AddRef ( IDirectDrawPalette *  iface)
static

Definition at line 55 of file palette.c.

56 {
58  ULONG ref = 0;
59 
60  _SEH2_TRY
61  {
62  ref = ++This->dwIntRefCnt;
63  }
65  {
66  }
67  _SEH2_END
68 
69  return ref;
70 }
Definition: send.c:47
_SEH2_TRY
Definition: create.c:4250
GLenum GLint ref
Definition: glext.h:6028
struct _DDRAWI_DDRAWPALETTE_INT * LPDDRAWI_DDRAWPALETTE_INT
Definition: ddrawi.h:142
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
_SEH2_END
Definition: create.c:4424
unsigned int ULONG
Definition: retypes.h:1
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:6

◆ DirectDrawPalette_GetCaps()

static HRESULT WINAPI DirectDrawPalette_GetCaps ( LPDIRECTDRAWPALETTE  iface,
LPDWORD  lpdwCaps 
)
static

Definition at line 140 of file palette.c.

142 {
143  DX_WINDBG_trace();
144  DX_STUB;
145 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
#define DX_STUB
Definition: rosdraw.h:224

◆ DirectDrawPalette_GetEntries()

static HRESULT WINAPI DirectDrawPalette_GetEntries ( LPDIRECTDRAWPALETTE  iface,
DWORD  dwFlags,
DWORD  dwStart,
DWORD  dwCount,
LPPALETTEENTRY  palent 
)
static

Definition at line 119 of file palette.c.

123 {
124  DX_WINDBG_trace();
125  DX_STUB;
126 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
#define DX_STUB
Definition: rosdraw.h:224

◆ DirectDrawPalette_Initialize()

static HRESULT WINAPI DirectDrawPalette_Initialize ( LPDIRECTDRAWPALETTE  iface,
LPDIRECTDRAW  ddraw,
DWORD  dwFlags,
LPPALETTEENTRY  palent 
)
static

Definition at line 109 of file palette.c.

113 {
114  DX_WINDBG_trace();
115  DX_STUB;
116 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
#define DX_STUB
Definition: rosdraw.h:224

◆ DirectDrawPalette_QueryInterface()

static HRESULT WINAPI DirectDrawPalette_QueryInterface ( IDirectDrawPalette *  iface,
REFIID  refiid,
void **  obj 
)
static

Definition at line 27 of file palette.c.

30 {
31  if (IsEqualGUID(refiid, &IID_IUnknown)
32  || IsEqualGUID(refiid, &IID_IDirectDrawPalette))
33  {
34  *obj = iface;
35  IDirectDrawPalette_AddRef(iface);
36  return S_OK;
37  }
38  else
39  {
40  *obj = NULL;
41  return E_NOINTERFACE;
42  }
43 }
#define E_NOINTERFACE
Definition: winerror.h:2364
smooth NULL
Definition: ftsmooth.c:416
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112

◆ DirectDrawPalette_Release()

static ULONG WINAPI DirectDrawPalette_Release ( IDirectDrawPalette *  iface)
static

Definition at line 82 of file palette.c.

83 {
85  ULONG ref = 0;
86 
87  _SEH2_TRY
88  {
89  ref = --This->dwIntRefCnt;
90  if(ref == 0)
91  {
93  if(((LPDDRAWI_DIRECTDRAW_INT)This->lpLcl->dwReserved1)->lpVtbl == &DirectDraw7_Vtable
94  || ((LPDDRAWI_DIRECTDRAW_INT)This->lpLcl->dwReserved1)->lpVtbl == &DirectDraw4_Vtable)
96  DxHeapMemFree(This); //HUGE FIXME!!!
98  }
99  }
101  {
102  }
103  _SEH2_END
104 
105  return ref;
106 }
#define DxHeapMemFree(p)
Definition: rosdraw.h:120
Definition: send.c:47
_SEH2_TRY
Definition: create.c:4250
IDirectDraw4Vtbl DirectDraw4_Vtable
Definition: ddraw_thunk.c:890
VOID WINAPI AcquireDDThreadLock()
Definition: main.c:412
GLenum GLint ref
Definition: glext.h:6028
struct _DDRAWI_DDRAWPALETTE_INT * LPDDRAWI_DDRAWPALETTE_INT
Definition: ddrawi.h:142
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
VOID WINAPI ReleaseDDThreadLock()
Definition: main.c:421
_SEH2_END
Definition: create.c:4424
unsigned int ULONG
Definition: retypes.h:1
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:6
IDirectDraw7Vtbl DirectDraw7_Vtable
ULONG WINAPI Main_DirectDraw_Release(LPDDRAWI_DIRECTDRAW_INT This)
Definition: ddraw_main.c:194

◆ DirectDrawPalette_SetEntries()

static HRESULT WINAPI DirectDrawPalette_SetEntries ( LPDIRECTDRAWPALETTE  iface,
DWORD  dwFlags,
DWORD  dwStart,
DWORD  dwCount,
LPPALETTEENTRY  palent 
)
static

Definition at line 129 of file palette.c.

134 {
135  DX_WINDBG_trace();
136  DX_STUB;
137 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
#define DX_STUB
Definition: rosdraw.h:224

Variable Documentation

◆ DirectDrawPalette_Vtable

const IDirectDrawPaletteVtbl DirectDrawPalette_Vtable
Initial value:
=
{
}
static ULONG WINAPI DirectDrawPalette_AddRef(IDirectDrawPalette *iface)
Definition: palette.c:55
static HRESULT WINAPI DirectDrawPalette_SetEntries(LPDIRECTDRAWPALETTE iface, DWORD dwFlags, DWORD dwStart, DWORD dwCount, LPPALETTEENTRY palent)
Definition: palette.c:129
static HRESULT WINAPI DirectDrawPalette_GetEntries(LPDIRECTDRAWPALETTE iface, DWORD dwFlags, DWORD dwStart, DWORD dwCount, LPPALETTEENTRY palent)
Definition: palette.c:119
static HRESULT WINAPI DirectDrawPalette_Initialize(LPDIRECTDRAWPALETTE iface, LPDIRECTDRAW ddraw, DWORD dwFlags, LPPALETTEENTRY palent)
Definition: palette.c:109
static HRESULT WINAPI DirectDrawPalette_QueryInterface(IDirectDrawPalette *iface, REFIID refiid, void **obj)
Definition: palette.c:27
static HRESULT WINAPI DirectDrawPalette_GetCaps(LPDIRECTDRAWPALETTE iface, LPDWORD lpdwCaps)
Definition: palette.c:140
static ULONG WINAPI DirectDrawPalette_Release(IDirectDrawPalette *iface)
Definition: palette.c:82

Definition at line 147 of file palette.c.

Referenced by Internal_CreatePalette().