diff --git a/reactos/dll/directx/ddraw/color.c b/reactos/dll/directx/ddraw/color.c new file mode 100644 index 00000000000..9e9ef031d0d --- /dev/null +++ b/reactos/dll/directx/ddraw/color.c @@ -0,0 +1,88 @@ +/* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS + * FILE: lib/ddraw/main/color.c + * PURPOSE: IDirectDrawColorControl Implementation + * PROGRAMMER: Maarten Bosma + * + */ + +#include "rosdraw.h" + +ULONG WINAPI +DirectDrawColorControl_AddRef( LPDIRECTDRAWCOLORCONTROL iface) +{ + DX_WINDBG_trace(); + + IDirectDrawColorImpl * This = (IDirectDrawColorImpl*)iface; + + ULONG ref=0; + + if (iface!=NULL) + { + ref = InterlockedIncrement( (PLONG) &This->ref); + } + return ref; +} + +ULONG WINAPI +DirectDrawColorControl_Release( LPDIRECTDRAWCOLORCONTROL iface) +{ + DX_WINDBG_trace(); + + IDirectDrawColorImpl* This = (IDirectDrawColorImpl*)iface; + ULONG ref=0; + + if (iface!=NULL) + { + ref = InterlockedDecrement( (PLONG) &This->ref); + + if (ref == 0) + { + /* Add here if we need releae some memory pointer before + * exists + */ + + if (This!=NULL) + { + HeapFree(GetProcessHeap(), 0, This); + } + } + } + return ref; +} + +HRESULT WINAPI +DirectDrawColorControl_QueryInterface( LPDIRECTDRAWCOLORCONTROL iface, + REFIID riid, + LPVOID* ppvObj) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +HRESULT WINAPI +DirectDrawColorControl_GetColorControls( LPDIRECTDRAWCOLORCONTROL iface, + LPDDCOLORCONTROL lpColorControl) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +HRESULT WINAPI +DirectDrawColorControl_SetColorControls( LPDIRECTDRAWCOLORCONTROL iface, + LPDDCOLORCONTROL lpColorControl) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +IDirectDrawColorControlVtbl DirectDrawColorControl_Vtable = +{ + DirectDrawColorControl_QueryInterface, + DirectDrawColorControl_AddRef, + DirectDrawColorControl_Release, + DirectDrawColorControl_GetColorControls, + DirectDrawColorControl_SetColorControls +}; diff --git a/reactos/dll/directx/ddraw/ddraw.rbuild b/reactos/dll/directx/ddraw/ddraw.rbuild index 9cb7224efb8..f85f32d01c7 100644 --- a/reactos/dll/directx/ddraw/ddraw.rbuild +++ b/reactos/dll/directx/ddraw/ddraw.rbuild @@ -19,6 +19,11 @@ regsvr.c clipper.c + color.c + gamma.c + palette.c + videoport.c + kernel.c ddraw_hal.c @@ -27,12 +32,7 @@ ddraw_main.c - surface_main.c - color_main.c - gamma_main.c - palette_main.c - videoport_main.c - kernel_main.c + surface_main.c diff --git a/reactos/dll/directx/ddraw/gamma.c b/reactos/dll/directx/ddraw/gamma.c new file mode 100644 index 00000000000..c9321daa582 --- /dev/null +++ b/reactos/dll/directx/ddraw/gamma.c @@ -0,0 +1,90 @@ +/* $Id: gamma_main.c 21434 2006-04-01 19:12:56Z greatlrd $ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS + * FILE: lib/ddraw/main/gamma.c + * PURPOSE: IDirectDrawGamma Implementation + * PROGRAMMER: Maarten Bosma + * + */ + +#include "rosdraw.h" + +ULONG WINAPI +DirectDrawGammaControl_AddRef( LPDIRECTDRAWGAMMACONTROL iface) +{ + DX_WINDBG_trace(); + + IDirectDrawGammaImpl * This = (IDirectDrawGammaImpl*)iface; + + ULONG ref=0; + + if (iface!=NULL) + { + ref = InterlockedIncrement( (PLONG) &This->ref); + } + return ref; +} + +ULONG WINAPI +DirectDrawGammaControl_Release( LPDIRECTDRAWGAMMACONTROL iface) +{ + DX_WINDBG_trace(); + + IDirectDrawGammaImpl* This = (IDirectDrawGammaImpl*)iface; + ULONG ref=0; + + if (iface!=NULL) + { + ref = InterlockedDecrement( (PLONG) &This->ref); + + if (ref == 0) + { + /* Add here if we need releae some memory pointer before + * exists + */ + + if (This!=NULL) + { + HeapFree(GetProcessHeap(), 0, This); + } + } + } + return ref; +} + +HRESULT WINAPI +DirectDrawGammaControl_QueryInterface( LPDIRECTDRAWGAMMACONTROL iface, + REFIID riid, + LPVOID *ppObj) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +HRESULT WINAPI +DirectDrawGammaControl_GetGammaRamp( LPDIRECTDRAWGAMMACONTROL iface, + DWORD dwFlags, + LPDDGAMMARAMP lpGammaRamp) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +HRESULT WINAPI +DirectDrawGammaControl_SetGammaRamp( LPDIRECTDRAWGAMMACONTROL iface, + DWORD dwFlags, + LPDDGAMMARAMP lpGammaRamp) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +IDirectDrawGammaControlVtbl DirectDrawGammaControl_Vtable = +{ + DirectDrawGammaControl_QueryInterface, + DirectDrawGammaControl_AddRef, + DirectDrawGammaControl_Release, + DirectDrawGammaControl_GetGammaRamp, + DirectDrawGammaControl_SetGammaRamp +}; diff --git a/reactos/dll/directx/ddraw/kernel.c b/reactos/dll/directx/ddraw/kernel.c new file mode 100644 index 00000000000..a0c8ed6fe27 --- /dev/null +++ b/reactos/dll/directx/ddraw/kernel.c @@ -0,0 +1,168 @@ +/* $Id: kernel_main.c 21434 2006-04-01 19:12:56Z greatlrd $ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS + * FILE: lib/ddraw/main/kernel.c + * PURPOSE: IDirectDrawKernel and IDirectDrawSurfaceKernel Implementation + * PROGRAMMER: Maarten Bosma + * + */ + +#include "rosdraw.h" + + +/***** IDirectDrawKernel ****/ + +ULONG WINAPI +DirectDrawKernel_AddRef ( LPDIRECTDRAWKERNEL iface) +{ + DX_WINDBG_trace(); + + IDirectDrawKernelImpl * This = (IDirectDrawKernelImpl*)iface; + + ULONG ref=0; + + if (iface!=NULL) + { + ref = InterlockedIncrement( (PLONG) &This->ref); + } + return ref; +} + +ULONG WINAPI +DirectDrawKernel_Release ( LPDIRECTDRAWKERNEL iface) +{ + DX_WINDBG_trace(); + + IDirectDrawKernelImpl* This = (IDirectDrawKernelImpl*)iface; + ULONG ref=0; + + if (iface!=NULL) + { + ref = InterlockedDecrement( (PLONG) &This->ref); + + if (ref == 0) + { + /* Add here if we need releae some memory pointer before + * exists + */ + + if (This!=NULL) + { + HeapFree(GetProcessHeap(), 0, This); + } + } + } + return ref; +} + +HRESULT WINAPI +DirectDrawKernel_QueryInterface ( LPDIRECTDRAWKERNEL iface, + REFIID riid, + LPVOID* ppvObj) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +HRESULT WINAPI +DirectDrawKernel_GetKernelHandle ( LPDIRECTDRAWKERNEL iface, + ULONG* handle) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +HRESULT WINAPI +DirectDrawKernel_ReleaseKernelHandle ( LPDIRECTDRAWKERNEL iface) +{ + DX_WINDBG_trace(); + DX_STUB; +} + + +ULONG WINAPI +DDSurfaceKernel_AddRef ( LPDIRECTDRAWSURFACEKERNEL iface) +{ + DX_WINDBG_trace(); + + IDirectDrawSurfaceKernelImpl * This = (IDirectDrawSurfaceKernelImpl*)iface; + + ULONG ref=0; + + if (iface!=NULL) + { + ref = InterlockedIncrement( (PLONG) &This->ref); + } + return ref; +} + +ULONG WINAPI +DDSurfaceKernel_Release ( LPDIRECTDRAWSURFACEKERNEL iface) +{ + DX_WINDBG_trace(); + + IDirectDrawSurfaceKernelImpl* This = (IDirectDrawSurfaceKernelImpl*)iface; + ULONG ref=0; + + if (iface!=NULL) + { + ref = InterlockedDecrement( (PLONG) &This->ref); + + if (ref == 0) + { + /* Add here if we need releae some memory pointer before + * exists + */ + + if (This!=NULL) + { + HeapFree(GetProcessHeap(), 0, This); + } + } + } + return ref; +} + +HRESULT WINAPI +DDSurfaceKernel_QueryInterface ( LPDIRECTDRAWSURFACEKERNEL iface, + REFIID riid, + LPVOID* ppvObj) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +HRESULT WINAPI +DDSurfaceKernel_GetKernelHandle ( LPDIRECTDRAWSURFACEKERNEL iface, + ULONG* handle) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +HRESULT WINAPI +DDSurfaceKernel_ReleaseKernelHandle ( LPDIRECTDRAWSURFACEKERNEL iface) +{ + DX_WINDBG_trace(); + DX_STUB; +} + + +IDirectDrawKernelVtbl DirectDrawKernel_Vtable = +{ + DirectDrawKernel_QueryInterface, + DirectDrawKernel_AddRef, + DirectDrawKernel_Release, + DirectDrawKernel_GetKernelHandle, + DirectDrawKernel_ReleaseKernelHandle +}; + +IDirectDrawSurfaceKernelVtbl DirectDrawSurfaceKernel_Vtable = +{ + DDSurfaceKernel_QueryInterface, + DDSurfaceKernel_AddRef, + DDSurfaceKernel_Release, + DDSurfaceKernel_GetKernelHandle, + DDSurfaceKernel_ReleaseKernelHandle +}; diff --git a/reactos/dll/directx/ddraw/palette.c b/reactos/dll/directx/ddraw/palette.c new file mode 100644 index 00000000000..61718e5a3a3 --- /dev/null +++ b/reactos/dll/directx/ddraw/palette.c @@ -0,0 +1,112 @@ +/* $Id: palette_main.c 21434 2006-04-01 19:12:56Z greatlrd $ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS + * FILE: lib/ddraw/main/palette.c + * PURPOSE: IDirectDrawPalette Implementation + * PROGRAMMER: Maarten Bosma + * + */ + +#include "rosdraw.h" + +ULONG WINAPI +DirectDrawPalette_Release( LPDIRECTDRAWPALETTE iface) +{ + DX_WINDBG_trace(); + + IDirectDrawPaletteImpl* This = (IDirectDrawPaletteImpl*)iface; + ULONG ref=0; + + if (iface!=NULL) + { + ref = InterlockedDecrement( (PLONG) &This->ref); + + if (ref == 0) + { + /* Add here if we need releae some memory pointer before + * exists + */ + + if (This!=NULL) + { + HeapFree(GetProcessHeap(), 0, This); + } + } + } + return ref; +} + +ULONG WINAPI +DirectDrawPalette_AddRef( LPDIRECTDRAWPALETTE iface) +{ + DX_WINDBG_trace(); + + IDirectDrawPaletteImpl * This = (IDirectDrawPaletteImpl*)iface; + + ULONG ref=0; + + if (iface!=NULL) + { + ref = InterlockedIncrement( (PLONG) &This->ref); + } + return ref; +} + +HRESULT WINAPI +DirectDrawPalette_Initialize( LPDIRECTDRAWPALETTE iface, + LPDIRECTDRAW ddraw, + DWORD dwFlags, + LPPALETTEENTRY palent) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +HRESULT WINAPI +DirectDrawPalette_GetEntries( LPDIRECTDRAWPALETTE iface, + DWORD dwFlags, + DWORD dwStart, DWORD dwCount, + LPPALETTEENTRY palent) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +HRESULT WINAPI +DirectDrawPalette_SetEntries( LPDIRECTDRAWPALETTE iface, + DWORD dwFlags, + DWORD dwStart, + DWORD dwCount, + LPPALETTEENTRY palent) +{ + DX_WINDBG_trace(); + DX_STUB; +} +HRESULT WINAPI +DirectDrawPalette_GetCaps( LPDIRECTDRAWPALETTE iface, + LPDWORD lpdwCaps) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +HRESULT WINAPI +DirectDrawPalette_QueryInterface( LPDIRECTDRAWPALETTE iface, + REFIID refiid, + LPVOID *obj) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +IDirectDrawPaletteVtbl DirectDrawPalette_Vtable = +{ + DirectDrawPalette_QueryInterface, + DirectDrawPalette_AddRef, + DirectDrawPalette_Release, + DirectDrawPalette_GetCaps, + DirectDrawPalette_GetEntries, + DirectDrawPalette_Initialize, + DirectDrawPalette_SetEntries +}; diff --git a/reactos/dll/directx/ddraw/videoport.c b/reactos/dll/directx/ddraw/videoport.c new file mode 100644 index 00000000000..88e94897e39 --- /dev/null +++ b/reactos/dll/directx/ddraw/videoport.c @@ -0,0 +1,260 @@ +/* $Id: videoport_main.c 21434 2006-04-01 19:12:56Z greatlrd $ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS + * FILE: lib/ddraw/main/videoport.c + * PURPOSE: IDirectDrawVideoPort, DDVideoPortContainer and IDirectDrawVideoPortNotify Implementation + * PROGRAMMER: Maarten Bosma + * + */ + +#include "rosdraw.h" + + +/************* IDirectDrawVideoPort *************/ + +HRESULT WINAPI +Main_DirectDrawVideoPort_QueryInterface (LPDIRECTDRAWVIDEOPORT iface, REFIID riid, LPVOID* ppvObj) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +ULONG WINAPI +Main_DirectDrawVideoPort_AddRef (LPDIRECTDRAWVIDEOPORT iface) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +ULONG WINAPI +Main_DirectDrawVideoPort_Release (LPDIRECTDRAWVIDEOPORT iface) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +HRESULT WINAPI +Main_DirectDrawVideoPort_Flip (LPDIRECTDRAWVIDEOPORT iface, LPDIRECTDRAWSURFACE lpDDSurface, DWORD dwFlags) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +HRESULT WINAPI +Main_DirectDrawVideoPort_GetBandwidthInfo (LPDIRECTDRAWVIDEOPORT iface, LPDDPIXELFORMAT lpddpfFormat, DWORD dwWidth, + DWORD dwHeight, DWORD dwFlags, LPDDVIDEOPORTBANDWIDTH lpBandwidth) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +HRESULT WINAPI +Main_DirectDrawVideoPort_GetColorControls (LPDIRECTDRAWVIDEOPORT iface, LPDDCOLORCONTROL lpColorControl) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +HRESULT WINAPI Main_DirectDrawVideoPort_GetInputFormats (LPDIRECTDRAWVIDEOPORT iface, LPDWORD lpNumFormats, + LPDDPIXELFORMAT lpFormats, DWORD dwFlags) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +HRESULT WINAPI Main_DirectDrawVideoPort_GetOutputFormats (LPDIRECTDRAWVIDEOPORT iface, LPDDPIXELFORMAT lpInputFormat, + LPDWORD lpNumFormats, LPDDPIXELFORMAT lpFormats, DWORD dwFlags) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +HRESULT WINAPI Main_DirectDrawVideoPort_GetFieldPolarity (LPDIRECTDRAWVIDEOPORT iface, LPBOOL lpbFieldPolarity) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +HRESULT WINAPI Main_DirectDrawVideoPort_GetVideoLine (LPDIRECTDRAWVIDEOPORT This, LPDWORD lpdwLine) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +HRESULT WINAPI Main_DirectDrawVideoPort_GetVideoSignalStatus (LPDIRECTDRAWVIDEOPORT iface, LPDWORD lpdwStatus) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +HRESULT WINAPI Main_DirectDrawVideoPort_SetColorControls (LPDIRECTDRAWVIDEOPORT iface, LPDDCOLORCONTROL lpColorControl) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +HRESULT WINAPI Main_DirectDrawVideoPort_SetTargetSurface (LPDIRECTDRAWVIDEOPORT iface, LPDIRECTDRAWSURFACE lpDDSurface, + DWORD dwFlags) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +HRESULT WINAPI Main_DirectDrawVideoPort_StartVideo (LPDIRECTDRAWVIDEOPORT iface, LPDDVIDEOPORTINFO dwFlags) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +HRESULT WINAPI Main_DirectDrawVideoPort_StopVideo (LPDIRECTDRAWVIDEOPORT iface) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +HRESULT WINAPI Main_DirectDrawVideoPort_UpdateVideo (LPDIRECTDRAWVIDEOPORT iface, LPDDVIDEOPORTINFO dwFlags) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +HRESULT WINAPI Main_DirectDrawVideoPort_WaitForSync (LPDIRECTDRAWVIDEOPORT iface, DWORD dwFlags, DWORD dwLine, + DWORD dwTimeout) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +/************* IDDVideoPortContainer *************/ + +HRESULT WINAPI Main_DDVideoPortContainer_QueryInterface (LPDDVIDEOPORTCONTAINER iface, REFIID riid, LPVOID* ppvObj) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +ULONG WINAPI Main_DDVideoPortContainer_AddRef (LPDDVIDEOPORTCONTAINER iface) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +ULONG WINAPI Main_DDVideoPortContainer_Release (LPDDVIDEOPORTCONTAINER iface) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +HRESULT WINAPI Main_DDVideoPortContainer_CreateVideoPort (LPDDVIDEOPORTCONTAINER iface, DWORD dwFlags, LPDDVIDEOPORTDESC pPortDesc, + LPDIRECTDRAWVIDEOPORT* DDVideoPort, IUnknown* pUnkOuter) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +HRESULT WINAPI +Main_DDVideoPortContainer_EnumVideoPorts (LPDDVIDEOPORTCONTAINER iface, + DWORD dwFlags, + LPDDVIDEOPORTCAPS pCaps, + LPVOID pContext, + LPDDENUMVIDEOCALLBACK pEnumVideoCallback) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +HRESULT WINAPI +Main_DDVideoPortContainer_GetVideoPortConnectInfo (LPDDVIDEOPORTCONTAINER iface, + DWORD PortId, DWORD* pNumEntries, + LPDDVIDEOPORTCONNECT pConnectInfo) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +HRESULT WINAPI +Main_DDVideoPortContainer_QueryVideoPortStatus (LPDDVIDEOPORTCONTAINER iface, + DWORD PortId, + LPDDVIDEOPORTSTATUS pStatus) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +/************* IDirectDrawVideoPortNotify *************/ + +HRESULT WINAPI +Main_DDVideoPortNotify_QueryInterface (LPDIRECTDRAWVIDEOPORTNOTIFY iface, REFIID + riid, LPVOID* ppvObj) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +ULONG WINAPI +Main_DDVideoPortNotify_AddRef (LPDIRECTDRAWVIDEOPORTNOTIFY iface) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +ULONG WINAPI +Main_DDVideoPortNotify_Release (LPDIRECTDRAWVIDEOPORTNOTIFY iface) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +HRESULT WINAPI Main_DDVideoPortNotify_AcquireNotification (LPDIRECTDRAWVIDEOPORTNOTIFY iface, HANDLE* h, LPDDVIDEOPORTNOTIFY pVideoPortNotify) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +HRESULT WINAPI Main_DDVideoPortNotify_ReleaseNotification (LPDIRECTDRAWVIDEOPORTNOTIFY iface, HANDLE h) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +IDirectDrawVideoPortVtbl DirectDrawVideoPort_Vtable = +{ + Main_DirectDrawVideoPort_QueryInterface, + Main_DirectDrawVideoPort_AddRef, + Main_DirectDrawVideoPort_Release, + Main_DirectDrawVideoPort_Flip, + Main_DirectDrawVideoPort_GetBandwidthInfo, + Main_DirectDrawVideoPort_GetColorControls, + Main_DirectDrawVideoPort_GetInputFormats, + Main_DirectDrawVideoPort_GetOutputFormats, + Main_DirectDrawVideoPort_GetFieldPolarity, + Main_DirectDrawVideoPort_GetVideoLine, + Main_DirectDrawVideoPort_GetVideoSignalStatus, + Main_DirectDrawVideoPort_SetColorControls, + Main_DirectDrawVideoPort_SetTargetSurface, + Main_DirectDrawVideoPort_StartVideo, + Main_DirectDrawVideoPort_StopVideo, + Main_DirectDrawVideoPort_UpdateVideo, + Main_DirectDrawVideoPort_WaitForSync +}; + +IDDVideoPortContainerVtbl DDVideoPortContainer_Vtable = +{ + Main_DDVideoPortContainer_QueryInterface, + Main_DDVideoPortContainer_AddRef, + Main_DDVideoPortContainer_Release, + Main_DDVideoPortContainer_CreateVideoPort, + Main_DDVideoPortContainer_EnumVideoPorts, + Main_DDVideoPortContainer_GetVideoPortConnectInfo, + Main_DDVideoPortContainer_QueryVideoPortStatus +}; + +IDirectDrawVideoPortNotifyVtbl DDVideoPortNotify_Vtable = +{ + Main_DDVideoPortNotify_QueryInterface, + Main_DDVideoPortNotify_AddRef, + Main_DDVideoPortNotify_Release, + Main_DDVideoPortNotify_AcquireNotification, + Main_DDVideoPortNotify_ReleaseNotification +};