Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/strmbase/window.c | 6 ------ include/wine/strmbase.h | 1 - 2 files changed, 7 deletions(-)
diff --git a/dlls/strmbase/window.c b/dlls/strmbase/window.c index 7f4dd402484..a7c2201c64e 100644 --- a/dlls/strmbase/window.c +++ b/dlls/strmbase/window.c @@ -147,12 +147,6 @@ HRESULT WINAPI BaseWindowImpl_DoneWithWindow(BaseWindow *This) return S_OK; }
-RECT WINAPI BaseWindowImpl_GetDefaultRect(BaseWindow *This) -{ - static RECT defRect = {0, 0, 800, 600}; - return defRect; -} - BOOL WINAPI BaseControlWindowImpl_PossiblyEatMessage(BaseWindow *This, UINT uMsg, WPARAM wParam, LPARAM lParam) { BaseControlWindow* pControlWindow = impl_from_BaseWindow(This); diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h index de5c875105a..518db8de3f3 100644 --- a/include/wine/strmbase.h +++ b/include/wine/strmbase.h @@ -391,7 +391,6 @@ HRESULT WINAPI BaseWindow_Destroy(BaseWindow *pBaseWindow);
HRESULT WINAPI BaseWindowImpl_PrepareWindow(BaseWindow *This); HRESULT WINAPI BaseWindowImpl_DoneWithWindow(BaseWindow *This); -RECT WINAPI BaseWindowImpl_GetDefaultRect(BaseWindow *This); LRESULT WINAPI BaseWindowImpl_OnReceiveMessage(BaseWindow *This, HWND hwnd, INT uMsg, WPARAM wParam, LPARAM lParam); BOOL WINAPI BaseWindowImpl_OnSize(BaseWindow *This, LONG Height, LONG Width);
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/videorenderer.c | 1 - dlls/quartz/vmr9.c | 1 - dlls/strmbase/window.c | 88 ++++++++++++++++--------------------- include/wine/strmbase.h | 2 - 4 files changed, 38 insertions(+), 54 deletions(-)
diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c index 43aef9ffbe7..0e49f27f151 100644 --- a/dlls/quartz/videorenderer.c +++ b/dlls/quartz/videorenderer.c @@ -444,7 +444,6 @@ static const BaseWindowFuncTable renderer_BaseWindowFuncTable = { VideoRenderer_GetClassWindowStyles, VideoRenderer_GetDefaultRect, NULL, - BaseControlWindowImpl_PossiblyEatMessage, VideoRenderer_OnSize };
diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index 0e04fef3662..413f334d99d 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -607,7 +607,6 @@ static const BaseWindowFuncTable renderer_BaseWindowFuncTable = { VMR9_GetClassWindowStyles, VMR9_GetDefaultRect, NULL, - BaseControlWindowImpl_PossiblyEatMessage, VMR9_OnSize, };
diff --git a/dlls/strmbase/window.c b/dlls/strmbase/window.c index a7c2201c64e..3d91b05eadd 100644 --- a/dlls/strmbase/window.c +++ b/dlls/strmbase/window.c @@ -45,21 +45,49 @@ static LRESULT CALLBACK WndProcW(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa 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)) - return 0; + BaseControlWindow *window = impl_from_BaseWindow(This);
- switch (uMsg) + switch (message) { - case WM_SIZE: - if (This->pFuncsTable->pfnOnSize) - return This->pFuncsTable->pfnOnSize(This, LOWORD(lParam), HIWORD(lParam)); - else - return BaseWindowImpl_OnSize(This, LOWORD(lParam), HIWORD(lParam)); + 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: + if (This->pFuncsTable->pfnOnSize) + return This->pFuncsTable->pfnOnSize(This, LOWORD(lparam), HIWORD(lparam)); + else + 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) @@ -147,46 +175,6 @@ HRESULT WINAPI BaseWindowImpl_DoneWithWindow(BaseWindow *This) 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, const IVideoWindowVtbl *lpVtbl, struct strmbase_filter *owner, CRITICAL_SECTION *lock, struct strmbase_pin *pPin, const BaseWindowFuncTable *pFuncsTable) diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h index 518db8de3f3..2213f79b975 100644 --- a/include/wine/strmbase.h +++ b/include/wine/strmbase.h @@ -371,7 +371,6 @@ typedef struct tagBaseWindow
typedef LPWSTR (WINAPI *BaseWindow_GetClassWindowStyles)(BaseWindow *This, DWORD *pClassStyles, DWORD *pWindowStyles, DWORD *pWindowStylesEx); 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 BOOL (WINAPI *BaseWindow_OnSize)(BaseWindow *This, LONG Height, LONG Width);
@@ -382,7 +381,6 @@ typedef struct BaseWindowFuncTable BaseWindow_GetDefaultRect pfnGetDefaultRect; /* Optional, WinProc Related */ BaseWindow_OnReceiveMessage pfnOnReceiveMessage; - BaseWindow_PossiblyEatMessage pfnPossiblyEatMessage; BaseWindow_OnSize pfnOnSize; } BaseWindowFuncTable;
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/strmbase/window.c | 14 ++++---------- include/wine/strmbase.h | 1 - 2 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/dlls/strmbase/window.c b/dlls/strmbase/window.c index 3d91b05eadd..fed10021286 100644 --- a/dlls/strmbase/window.c +++ b/dlls/strmbase/window.c @@ -32,22 +32,16 @@ static inline BaseControlWindow *impl_from_BaseWindow(BaseWindow *iface) return CONTAINING_RECORD(iface, BaseControlWindow, baseWindow); }
-static LRESULT CALLBACK WndProcW(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +static LRESULT CALLBACK WndProcW(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) { BaseWindow* This = (BaseWindow*)GetWindowLongPtrW(hwnd, 0); + BaseControlWindow *window = impl_from_BaseWindow(This);
if (!This) - return DefWindowProcW(hwnd, uMsg, wParam, lParam); + return DefWindowProcW(hwnd, message, wparam, lparam);
if (This->pFuncsTable->pfnOnReceiveMessage) - return This->pFuncsTable->pfnOnReceiveMessage(This, hwnd, uMsg, wParam, lParam); - else - return BaseWindowImpl_OnReceiveMessage(This, hwnd, uMsg, wParam, lParam); -} - -LRESULT WINAPI BaseWindowImpl_OnReceiveMessage(BaseWindow *This, HWND hwnd, INT message, WPARAM wparam, LPARAM lparam) -{ - BaseControlWindow *window = impl_from_BaseWindow(This); + return This->pFuncsTable->pfnOnReceiveMessage(This, hwnd, message, wparam, lparam);
switch (message) { diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h index 2213f79b975..166a60171bc 100644 --- a/include/wine/strmbase.h +++ b/include/wine/strmbase.h @@ -389,7 +389,6 @@ HRESULT WINAPI BaseWindow_Destroy(BaseWindow *pBaseWindow);
HRESULT WINAPI BaseWindowImpl_PrepareWindow(BaseWindow *This); HRESULT WINAPI BaseWindowImpl_DoneWithWindow(BaseWindow *This); -LRESULT WINAPI BaseWindowImpl_OnReceiveMessage(BaseWindow *This, HWND hwnd, INT uMsg, WPARAM wParam, LPARAM lParam); BOOL WINAPI BaseWindowImpl_OnSize(BaseWindow *This, LONG Height, LONG Width);
enum strmbase_type_id
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/videorenderer.c | 1 - dlls/quartz/vmr9.c | 1 - dlls/strmbase/window.c | 3 --- include/wine/strmbase.h | 2 -- 4 files changed, 7 deletions(-)
diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c index 0e49f27f151..87491d8851c 100644 --- a/dlls/quartz/videorenderer.c +++ b/dlls/quartz/videorenderer.c @@ -443,7 +443,6 @@ static const BaseRendererFuncTable BaseFuncTable = static const BaseWindowFuncTable renderer_BaseWindowFuncTable = { VideoRenderer_GetClassWindowStyles, VideoRenderer_GetDefaultRect, - NULL, VideoRenderer_OnSize };
diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index 413f334d99d..d3fdfb13a39 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -606,7 +606,6 @@ static BOOL WINAPI VMR9_OnSize(BaseWindow *This, LONG Width, LONG Height) static const BaseWindowFuncTable renderer_BaseWindowFuncTable = { VMR9_GetClassWindowStyles, VMR9_GetDefaultRect, - NULL, VMR9_OnSize, };
diff --git a/dlls/strmbase/window.c b/dlls/strmbase/window.c index fed10021286..3135de066a0 100644 --- a/dlls/strmbase/window.c +++ b/dlls/strmbase/window.c @@ -40,9 +40,6 @@ static LRESULT CALLBACK WndProcW(HWND hwnd, UINT message, WPARAM wparam, LPARAM if (!This) return DefWindowProcW(hwnd, message, wparam, lparam);
- if (This->pFuncsTable->pfnOnReceiveMessage) - return This->pFuncsTable->pfnOnReceiveMessage(This, hwnd, message, wparam, lparam); - switch (message) { case WM_KEYDOWN: diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h index 166a60171bc..34a558ab8e8 100644 --- a/include/wine/strmbase.h +++ b/include/wine/strmbase.h @@ -371,7 +371,6 @@ typedef struct tagBaseWindow
typedef LPWSTR (WINAPI *BaseWindow_GetClassWindowStyles)(BaseWindow *This, DWORD *pClassStyles, DWORD *pWindowStyles, DWORD *pWindowStylesEx); typedef RECT (WINAPI *BaseWindow_GetDefaultRect)(BaseWindow *This); -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 struct BaseWindowFuncTable @@ -380,7 +379,6 @@ typedef struct BaseWindowFuncTable BaseWindow_GetClassWindowStyles pfnGetClassWindowStyles; BaseWindow_GetDefaultRect pfnGetDefaultRect; /* Optional, WinProc Related */ - BaseWindow_OnReceiveMessage pfnOnReceiveMessage; BaseWindow_OnSize pfnOnSize; } BaseWindowFuncTable;
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/strmbase/window.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/strmbase/window.c b/dlls/strmbase/window.c index 3135de066a0..fbf0edc78c5 100644 --- a/dlls/strmbase/window.c +++ b/dlls/strmbase/window.c @@ -310,13 +310,13 @@ HRESULT WINAPI BaseControlWindowImpl_put_WindowStyle(IVideoWindow *iface, LONG W return S_OK; }
-HRESULT WINAPI BaseControlWindowImpl_get_WindowStyle(IVideoWindow *iface, LONG *WindowStyle) +HRESULT WINAPI BaseControlWindowImpl_get_WindowStyle(IVideoWindow *iface, LONG *style) { - BaseControlWindow* This = impl_from_IVideoWindow(iface); + BaseControlWindow *window = impl_from_IVideoWindow(iface);
- TRACE("(%p/%p)->(%p)\n", This, iface, WindowStyle); + TRACE("window %p, style %p.\n", window, style);
- *WindowStyle = This->baseWindow.WindowStyles; + *style = GetWindowLongW(window->baseWindow.hWnd, GWL_STYLE);
return S_OK; }