strmbase: Get rid of the "pfnPossiblyEatMessage" callback.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
0854f67d09
commit
55b2251fef
|
@ -444,7 +444,6 @@ static const BaseWindowFuncTable renderer_BaseWindowFuncTable = {
|
||||||
VideoRenderer_GetClassWindowStyles,
|
VideoRenderer_GetClassWindowStyles,
|
||||||
VideoRenderer_GetDefaultRect,
|
VideoRenderer_GetDefaultRect,
|
||||||
NULL,
|
NULL,
|
||||||
BaseControlWindowImpl_PossiblyEatMessage,
|
|
||||||
VideoRenderer_OnSize
|
VideoRenderer_OnSize
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -607,7 +607,6 @@ static const BaseWindowFuncTable renderer_BaseWindowFuncTable = {
|
||||||
VMR9_GetClassWindowStyles,
|
VMR9_GetClassWindowStyles,
|
||||||
VMR9_GetDefaultRect,
|
VMR9_GetDefaultRect,
|
||||||
NULL,
|
NULL,
|
||||||
BaseControlWindowImpl_PossiblyEatMessage,
|
|
||||||
VMR9_OnSize,
|
VMR9_OnSize,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -45,21 +45,49 @@ static LRESULT CALLBACK WndProcW(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
|
||||||
return BaseWindowImpl_OnReceiveMessage(This, hwnd, uMsg, wParam, lParam);
|
return BaseWindowImpl_OnReceiveMessage(This, hwnd, uMsg, wParam, lParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
LRESULT WINAPI BaseWindowImpl_OnReceiveMessage(BaseWindow *This, HWND hwnd, INT uMsg, WPARAM wParam, LPARAM lParam)
|
LRESULT WINAPI BaseWindowImpl_OnReceiveMessage(BaseWindow *This, HWND hwnd, INT message, WPARAM wparam, LPARAM lparam)
|
||||||
{
|
{
|
||||||
if (This->pFuncsTable->pfnPossiblyEatMessage && This->pFuncsTable->pfnPossiblyEatMessage(This, uMsg, wParam, lParam))
|
BaseControlWindow *window = impl_from_BaseWindow(This);
|
||||||
return 0;
|
|
||||||
|
|
||||||
switch (uMsg)
|
switch (message)
|
||||||
{
|
{
|
||||||
|
case WM_KEYDOWN:
|
||||||
|
case WM_KEYUP:
|
||||||
|
case WM_LBUTTONDBLCLK:
|
||||||
|
case WM_LBUTTONDOWN:
|
||||||
|
case WM_LBUTTONUP:
|
||||||
|
case WM_MBUTTONDBLCLK:
|
||||||
|
case WM_MBUTTONDOWN:
|
||||||
|
case WM_MBUTTONUP:
|
||||||
|
case WM_MOUSEACTIVATE:
|
||||||
|
case WM_MOUSEMOVE:
|
||||||
|
case WM_NCLBUTTONDBLCLK:
|
||||||
|
case WM_NCLBUTTONDOWN:
|
||||||
|
case WM_NCLBUTTONUP:
|
||||||
|
case WM_NCMBUTTONDBLCLK:
|
||||||
|
case WM_NCMBUTTONDOWN:
|
||||||
|
case WM_NCMBUTTONUP:
|
||||||
|
case WM_NCMOUSEMOVE:
|
||||||
|
case WM_NCRBUTTONDBLCLK:
|
||||||
|
case WM_NCRBUTTONDOWN:
|
||||||
|
case WM_NCRBUTTONUP:
|
||||||
|
case WM_RBUTTONDBLCLK:
|
||||||
|
case WM_RBUTTONDOWN:
|
||||||
|
case WM_RBUTTONUP:
|
||||||
|
if (window->hwndDrain)
|
||||||
|
{
|
||||||
|
PostMessageW(window->hwndDrain, message, wparam, lparam);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case WM_SIZE:
|
case WM_SIZE:
|
||||||
if (This->pFuncsTable->pfnOnSize)
|
if (This->pFuncsTable->pfnOnSize)
|
||||||
return This->pFuncsTable->pfnOnSize(This, LOWORD(lParam), HIWORD(lParam));
|
return This->pFuncsTable->pfnOnSize(This, LOWORD(lparam), HIWORD(lparam));
|
||||||
else
|
else
|
||||||
return BaseWindowImpl_OnSize(This, LOWORD(lParam), HIWORD(lParam));
|
return BaseWindowImpl_OnSize(This, LOWORD(lparam), HIWORD(lparam));
|
||||||
}
|
}
|
||||||
|
|
||||||
return DefWindowProcW(hwnd, uMsg, wParam, lParam);
|
return DefWindowProcW(hwnd, message, wparam, lparam);
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL WINAPI BaseWindowImpl_OnSize(BaseWindow *This, LONG Width, LONG Height)
|
BOOL WINAPI BaseWindowImpl_OnSize(BaseWindow *This, LONG Width, LONG Height)
|
||||||
|
@ -147,46 +175,6 @@ HRESULT WINAPI BaseWindowImpl_DoneWithWindow(BaseWindow *This)
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL WINAPI BaseControlWindowImpl_PossiblyEatMessage(BaseWindow *This, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|
||||||
{
|
|
||||||
BaseControlWindow* pControlWindow = impl_from_BaseWindow(This);
|
|
||||||
|
|
||||||
if (pControlWindow->hwndDrain)
|
|
||||||
{
|
|
||||||
switch(uMsg)
|
|
||||||
{
|
|
||||||
case WM_KEYDOWN:
|
|
||||||
case WM_KEYUP:
|
|
||||||
case WM_LBUTTONDBLCLK:
|
|
||||||
case WM_LBUTTONDOWN:
|
|
||||||
case WM_LBUTTONUP:
|
|
||||||
case WM_MBUTTONDBLCLK:
|
|
||||||
case WM_MBUTTONDOWN:
|
|
||||||
case WM_MBUTTONUP:
|
|
||||||
case WM_MOUSEACTIVATE:
|
|
||||||
case WM_MOUSEMOVE:
|
|
||||||
case WM_NCLBUTTONDBLCLK:
|
|
||||||
case WM_NCLBUTTONDOWN:
|
|
||||||
case WM_NCLBUTTONUP:
|
|
||||||
case WM_NCMBUTTONDBLCLK:
|
|
||||||
case WM_NCMBUTTONDOWN:
|
|
||||||
case WM_NCMBUTTONUP:
|
|
||||||
case WM_NCMOUSEMOVE:
|
|
||||||
case WM_NCRBUTTONDBLCLK:
|
|
||||||
case WM_NCRBUTTONDOWN:
|
|
||||||
case WM_NCRBUTTONUP:
|
|
||||||
case WM_RBUTTONDBLCLK:
|
|
||||||
case WM_RBUTTONDOWN:
|
|
||||||
case WM_RBUTTONUP:
|
|
||||||
PostMessageW(pControlWindow->hwndDrain, uMsg, wParam, lParam);
|
|
||||||
return TRUE;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
HRESULT WINAPI BaseControlWindow_Init(BaseControlWindow *pControlWindow,
|
HRESULT WINAPI BaseControlWindow_Init(BaseControlWindow *pControlWindow,
|
||||||
const IVideoWindowVtbl *lpVtbl, struct strmbase_filter *owner,
|
const IVideoWindowVtbl *lpVtbl, struct strmbase_filter *owner,
|
||||||
CRITICAL_SECTION *lock, struct strmbase_pin *pPin, const BaseWindowFuncTable *pFuncsTable)
|
CRITICAL_SECTION *lock, struct strmbase_pin *pPin, const BaseWindowFuncTable *pFuncsTable)
|
||||||
|
|
|
@ -371,7 +371,6 @@ typedef struct tagBaseWindow
|
||||||
|
|
||||||
typedef LPWSTR (WINAPI *BaseWindow_GetClassWindowStyles)(BaseWindow *This, DWORD *pClassStyles, DWORD *pWindowStyles, DWORD *pWindowStylesEx);
|
typedef LPWSTR (WINAPI *BaseWindow_GetClassWindowStyles)(BaseWindow *This, DWORD *pClassStyles, DWORD *pWindowStyles, DWORD *pWindowStylesEx);
|
||||||
typedef RECT (WINAPI *BaseWindow_GetDefaultRect)(BaseWindow *This);
|
typedef RECT (WINAPI *BaseWindow_GetDefaultRect)(BaseWindow *This);
|
||||||
typedef BOOL (WINAPI *BaseWindow_PossiblyEatMessage)(BaseWindow *This, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
||||||
typedef LRESULT (WINAPI *BaseWindow_OnReceiveMessage)(BaseWindow *This, HWND hwnd, INT uMsg, WPARAM wParam, LPARAM lParam);
|
typedef LRESULT (WINAPI *BaseWindow_OnReceiveMessage)(BaseWindow *This, HWND hwnd, INT uMsg, WPARAM wParam, LPARAM lParam);
|
||||||
typedef BOOL (WINAPI *BaseWindow_OnSize)(BaseWindow *This, LONG Height, LONG Width);
|
typedef BOOL (WINAPI *BaseWindow_OnSize)(BaseWindow *This, LONG Height, LONG Width);
|
||||||
|
|
||||||
|
@ -382,7 +381,6 @@ typedef struct BaseWindowFuncTable
|
||||||
BaseWindow_GetDefaultRect pfnGetDefaultRect;
|
BaseWindow_GetDefaultRect pfnGetDefaultRect;
|
||||||
/* Optional, WinProc Related */
|
/* Optional, WinProc Related */
|
||||||
BaseWindow_OnReceiveMessage pfnOnReceiveMessage;
|
BaseWindow_OnReceiveMessage pfnOnReceiveMessage;
|
||||||
BaseWindow_PossiblyEatMessage pfnPossiblyEatMessage;
|
|
||||||
BaseWindow_OnSize pfnOnSize;
|
BaseWindow_OnSize pfnOnSize;
|
||||||
} BaseWindowFuncTable;
|
} BaseWindowFuncTable;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue