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:
parent
64e33d1173
commit
f9653494a9
|
@ -93,21 +93,21 @@ typedef struct tagBaseWindow
|
||||||
LONG Width;
|
LONG Width;
|
||||||
LONG Height;
|
LONG Height;
|
||||||
|
|
||||||
const struct BaseWindowFuncTable* pFuncsTable;
|
const struct video_window_ops *pFuncsTable;
|
||||||
} BaseWindow;
|
} BaseWindow;
|
||||||
|
|
||||||
typedef RECT (WINAPI *BaseWindow_GetDefaultRect)(BaseWindow *This);
|
typedef RECT (WINAPI *BaseWindow_GetDefaultRect)(BaseWindow *This);
|
||||||
typedef BOOL (WINAPI *BaseWindow_OnSize)(BaseWindow *This, LONG Height, LONG Width);
|
typedef BOOL (WINAPI *BaseWindow_OnSize)(BaseWindow *This, LONG Height, LONG Width);
|
||||||
|
|
||||||
typedef struct BaseWindowFuncTable
|
struct video_window_ops
|
||||||
{
|
{
|
||||||
/* Required */
|
/* Required */
|
||||||
BaseWindow_GetDefaultRect pfnGetDefaultRect;
|
BaseWindow_GetDefaultRect pfnGetDefaultRect;
|
||||||
/* Optional, WinProc Related */
|
/* Optional, WinProc Related */
|
||||||
BaseWindow_OnSize pfnOnSize;
|
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 BaseWindow_Destroy(BaseWindow *pBaseWindow) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
HRESULT WINAPI BaseWindowImpl_PrepareWindow(BaseWindow *This) 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,
|
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;
|
void video_window_unregister_class(void) DECLSPEC_HIDDEN;
|
||||||
HRESULT WINAPI BaseControlWindow_Destroy(struct video_window *window) DECLSPEC_HIDDEN;
|
HRESULT WINAPI BaseControlWindow_Destroy(struct video_window *window) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
|
|
|
@ -344,7 +344,8 @@ static const struct strmbase_renderer_ops renderer_ops =
|
||||||
.renderer_pin_query_interface = video_renderer_pin_query_interface,
|
.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_GetDefaultRect,
|
||||||
VideoRenderer_OnSize
|
VideoRenderer_OnSize
|
||||||
};
|
};
|
||||||
|
@ -710,8 +711,7 @@ HRESULT video_renderer_create(IUnknown *outer, IUnknown **out)
|
||||||
object->IOverlay_iface.lpVtbl = &overlay_vtbl;
|
object->IOverlay_iface.lpVtbl = &overlay_vtbl;
|
||||||
|
|
||||||
hr = video_window_init(&object->baseControlWindow, &IVideoWindow_VTable,
|
hr = video_window_init(&object->baseControlWindow, &IVideoWindow_VTable,
|
||||||
&object->renderer.filter, &object->renderer.sink.pin,
|
&object->renderer.filter, &object->renderer.sink.pin, &window_ops);
|
||||||
&renderer_BaseWindowFuncTable);
|
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
|
|
@ -689,7 +689,8 @@ static BOOL WINAPI VMR9_OnSize(BaseWindow *This, LONG Width, LONG Height)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const BaseWindowFuncTable renderer_BaseWindowFuncTable = {
|
static const struct video_window_ops window_ops =
|
||||||
|
{
|
||||||
VMR9_GetDefaultRect,
|
VMR9_GetDefaultRect,
|
||||||
VMR9_OnSize,
|
VMR9_OnSize,
|
||||||
};
|
};
|
||||||
|
@ -2319,7 +2320,7 @@ static HRESULT vmr_create(IUnknown *outer, IUnknown **out, const CLSID *clsid)
|
||||||
object->IOverlay_iface.lpVtbl = &overlay_vtbl;
|
object->IOverlay_iface.lpVtbl = &overlay_vtbl;
|
||||||
|
|
||||||
hr = video_window_init(&object->baseControlWindow, &IVideoWindow_VTable,
|
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))
|
if (FAILED(hr))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ static LRESULT CALLBACK WndProcW(HWND hwnd, UINT message, WPARAM wparam, LPARAM
|
||||||
return DefWindowProcW(hwnd, message, 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)
|
if (!pFuncsTable)
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
|
@ -153,7 +153,7 @@ HRESULT WINAPI BaseWindowImpl_DoneWithWindow(BaseWindow *This)
|
||||||
|
|
||||||
HRESULT video_window_init(struct video_window *pControlWindow,
|
HRESULT video_window_init(struct video_window *pControlWindow,
|
||||||
const IVideoWindowVtbl *lpVtbl, struct strmbase_filter *owner,
|
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;
|
HRESULT hr;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue