quartz: Get rid of the BaseWindowFuncTable typedef.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2020-04-02 23:20:47 -05:00 committed by Alexandre Julliard
parent 64e33d1173
commit f9653494a9
4 changed files with 13 additions and 12 deletions

View File

@ -93,21 +93,21 @@ typedef struct tagBaseWindow
LONG Width;
LONG Height;
const struct BaseWindowFuncTable* pFuncsTable;
const struct video_window_ops *pFuncsTable;
} BaseWindow;
typedef RECT (WINAPI *BaseWindow_GetDefaultRect)(BaseWindow *This);
typedef BOOL (WINAPI *BaseWindow_OnSize)(BaseWindow *This, LONG Height, LONG Width);
typedef struct BaseWindowFuncTable
struct video_window_ops
{
/* Required */
BaseWindow_GetDefaultRect pfnGetDefaultRect;
/* Optional, WinProc Related */
BaseWindow_OnSize pfnOnSize;
} BaseWindowFuncTable;
};
HRESULT WINAPI BaseWindow_Init(BaseWindow *pBaseWindow, const BaseWindowFuncTable* pFuncsTable) DECLSPEC_HIDDEN;
HRESULT WINAPI BaseWindow_Init(BaseWindow *pBaseWindow, const struct video_window_ops *pFuncsTable) DECLSPEC_HIDDEN;
HRESULT WINAPI BaseWindow_Destroy(BaseWindow *pBaseWindow) DECLSPEC_HIDDEN;
HRESULT WINAPI BaseWindowImpl_PrepareWindow(BaseWindow *This) DECLSPEC_HIDDEN;
@ -126,7 +126,7 @@ struct video_window
};
HRESULT video_window_init(struct video_window *window, const IVideoWindowVtbl *vtbl,
struct strmbase_filter *filter, struct strmbase_pin *pin, const BaseWindowFuncTable *func_table) DECLSPEC_HIDDEN;
struct strmbase_filter *filter, struct strmbase_pin *pin, const struct video_window_ops *ops) DECLSPEC_HIDDEN;
void video_window_unregister_class(void) DECLSPEC_HIDDEN;
HRESULT WINAPI BaseControlWindow_Destroy(struct video_window *window) DECLSPEC_HIDDEN;

View File

@ -344,7 +344,8 @@ static const struct strmbase_renderer_ops renderer_ops =
.renderer_pin_query_interface = video_renderer_pin_query_interface,
};
static const BaseWindowFuncTable renderer_BaseWindowFuncTable = {
static const struct video_window_ops window_ops =
{
VideoRenderer_GetDefaultRect,
VideoRenderer_OnSize
};
@ -710,8 +711,7 @@ HRESULT video_renderer_create(IUnknown *outer, IUnknown **out)
object->IOverlay_iface.lpVtbl = &overlay_vtbl;
hr = video_window_init(&object->baseControlWindow, &IVideoWindow_VTable,
&object->renderer.filter, &object->renderer.sink.pin,
&renderer_BaseWindowFuncTable);
&object->renderer.filter, &object->renderer.sink.pin, &window_ops);
if (FAILED(hr))
goto fail;

View File

@ -689,7 +689,8 @@ static BOOL WINAPI VMR9_OnSize(BaseWindow *This, LONG Width, LONG Height)
return TRUE;
}
static const BaseWindowFuncTable renderer_BaseWindowFuncTable = {
static const struct video_window_ops window_ops =
{
VMR9_GetDefaultRect,
VMR9_OnSize,
};
@ -2319,7 +2320,7 @@ static HRESULT vmr_create(IUnknown *outer, IUnknown **out, const CLSID *clsid)
object->IOverlay_iface.lpVtbl = &overlay_vtbl;
hr = video_window_init(&object->baseControlWindow, &IVideoWindow_VTable,
&object->renderer.filter, &object->renderer.sink.pin, &renderer_BaseWindowFuncTable);
&object->renderer.filter, &object->renderer.sink.pin, &window_ops);
if (FAILED(hr))
goto fail;

View File

@ -84,7 +84,7 @@ static LRESULT CALLBACK WndProcW(HWND hwnd, UINT message, WPARAM wparam, LPARAM
return DefWindowProcW(hwnd, message, wparam, lparam);
}
HRESULT WINAPI BaseWindow_Init(BaseWindow *pBaseWindow, const BaseWindowFuncTable* pFuncsTable)
HRESULT WINAPI BaseWindow_Init(BaseWindow *pBaseWindow, const struct video_window_ops *pFuncsTable)
{
if (!pFuncsTable)
return E_INVALIDARG;
@ -153,7 +153,7 @@ HRESULT WINAPI BaseWindowImpl_DoneWithWindow(BaseWindow *This)
HRESULT video_window_init(struct video_window *pControlWindow,
const IVideoWindowVtbl *lpVtbl, struct strmbase_filter *owner,
struct strmbase_pin *pPin, const BaseWindowFuncTable *pFuncsTable)
struct strmbase_pin *pPin, const struct video_window_ops *pFuncsTable)
{
HRESULT hr;