Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
b0b2c7d6
Commit
b0b2c7d6
authored
Oct 16, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Oct 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strmbase: Get rid of the "pfnGetClassWindowStyles" callback.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
81484b24
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
48 deletions
+10
-48
videorenderer.c
dlls/quartz/videorenderer.c
+4
-14
vmr9.c
dlls/quartz/vmr9.c
+0
-12
window.c
dlls/strmbase/window.c
+6
-16
strmbase.h
include/wine/strmbase.h
+0
-6
No files found.
dlls/quartz/videorenderer.c
View file @
b0b2c7d6
...
@@ -53,6 +53,8 @@ typedef struct VideoRendererImpl
...
@@ -53,6 +53,8 @@ typedef struct VideoRendererImpl
LONG
VideoWidth
;
LONG
VideoWidth
;
LONG
VideoHeight
;
LONG
VideoHeight
;
LONG
FullScreenMode
;
LONG
FullScreenMode
;
DWORD
saved_style
;
}
VideoRendererImpl
;
}
VideoRendererImpl
;
static
inline
VideoRendererImpl
*
impl_from_BaseWindow
(
BaseWindow
*
iface
)
static
inline
VideoRendererImpl
*
impl_from_BaseWindow
(
BaseWindow
*
iface
)
...
@@ -392,17 +394,6 @@ static void video_renderer_start_stream(BaseRenderer *iface)
...
@@ -392,17 +394,6 @@ static void video_renderer_start_stream(BaseRenderer *iface)
}
}
}
}
static
LPWSTR
WINAPI
VideoRenderer_GetClassWindowStyles
(
BaseWindow
*
This
,
DWORD
*
pClassStyles
,
DWORD
*
pWindowStyles
,
DWORD
*
pWindowStylesEx
)
{
static
const
WCHAR
classnameW
[]
=
{
'W'
,
'i'
,
'n'
,
'e'
,
' '
,
'A'
,
'c'
,
't'
,
'i'
,
'v'
,
'e'
,
'M'
,
'o'
,
'v'
,
'i'
,
'e'
,
' '
,
'C'
,
'l'
,
'a'
,
's'
,
's'
,
0
};
*
pClassStyles
=
0
;
*
pWindowStyles
=
WS_SIZEBOX
;
*
pWindowStylesEx
=
0
;
return
(
LPWSTR
)
classnameW
;
}
static
RECT
WINAPI
VideoRenderer_GetDefaultRect
(
BaseWindow
*
iface
)
static
RECT
WINAPI
VideoRenderer_GetDefaultRect
(
BaseWindow
*
iface
)
{
{
VideoRendererImpl
*
This
=
impl_from_BaseWindow
(
iface
);
VideoRendererImpl
*
This
=
impl_from_BaseWindow
(
iface
);
...
@@ -441,7 +432,6 @@ static const BaseRendererFuncTable BaseFuncTable =
...
@@ -441,7 +432,6 @@ static const BaseRendererFuncTable BaseFuncTable =
};
};
static
const
BaseWindowFuncTable
renderer_BaseWindowFuncTable
=
{
static
const
BaseWindowFuncTable
renderer_BaseWindowFuncTable
=
{
VideoRenderer_GetClassWindowStyles
,
VideoRenderer_GetDefaultRect
,
VideoRenderer_GetDefaultRect
,
VideoRenderer_OnSize
VideoRenderer_OnSize
};
};
...
@@ -674,7 +664,7 @@ static HRESULT WINAPI VideoWindow_put_FullScreenMode(IVideoWindow *iface,
...
@@ -674,7 +664,7 @@ static HRESULT WINAPI VideoWindow_put_FullScreenMode(IVideoWindow *iface,
FIXME
(
"(%p/%p)->(%d): stub !!!
\n
"
,
This
,
iface
,
FullScreenMode
);
FIXME
(
"(%p/%p)->(%d): stub !!!
\n
"
,
This
,
iface
,
FullScreenMode
);
if
(
FullScreenMode
)
{
if
(
FullScreenMode
)
{
This
->
baseControlWindow
.
baseWindow
.
WindowStyles
=
GetWindowLongW
(
This
->
baseControlWindow
.
baseWindow
.
hWnd
,
GWL_STYLE
);
This
->
saved_style
=
GetWindowLongW
(
This
->
baseControlWindow
.
baseWindow
.
hWnd
,
GWL_STYLE
);
ShowWindow
(
This
->
baseControlWindow
.
baseWindow
.
hWnd
,
SW_HIDE
);
ShowWindow
(
This
->
baseControlWindow
.
baseWindow
.
hWnd
,
SW_HIDE
);
SetParent
(
This
->
baseControlWindow
.
baseWindow
.
hWnd
,
0
);
SetParent
(
This
->
baseControlWindow
.
baseWindow
.
hWnd
,
0
);
SetWindowLongW
(
This
->
baseControlWindow
.
baseWindow
.
hWnd
,
GWL_STYLE
,
WS_POPUP
);
SetWindowLongW
(
This
->
baseControlWindow
.
baseWindow
.
hWnd
,
GWL_STYLE
,
WS_POPUP
);
...
@@ -684,7 +674,7 @@ static HRESULT WINAPI VideoWindow_put_FullScreenMode(IVideoWindow *iface,
...
@@ -684,7 +674,7 @@ static HRESULT WINAPI VideoWindow_put_FullScreenMode(IVideoWindow *iface,
}
else
{
}
else
{
ShowWindow
(
This
->
baseControlWindow
.
baseWindow
.
hWnd
,
SW_HIDE
);
ShowWindow
(
This
->
baseControlWindow
.
baseWindow
.
hWnd
,
SW_HIDE
);
SetParent
(
This
->
baseControlWindow
.
baseWindow
.
hWnd
,
This
->
baseControlWindow
.
hwndOwner
);
SetParent
(
This
->
baseControlWindow
.
baseWindow
.
hWnd
,
This
->
baseControlWindow
.
hwndOwner
);
SetWindowLongW
(
This
->
baseControlWindow
.
baseWindow
.
hWnd
,
GWL_STYLE
,
This
->
baseControlWindow
.
baseWindow
.
WindowStyles
);
SetWindowLongW
(
This
->
baseControlWindow
.
baseWindow
.
hWnd
,
GWL_STYLE
,
This
->
saved_style
);
GetClientRect
(
This
->
baseControlWindow
.
baseWindow
.
hWnd
,
&
This
->
DestRect
);
GetClientRect
(
This
->
baseControlWindow
.
baseWindow
.
hWnd
,
&
This
->
DestRect
);
SetWindowPos
(
This
->
baseControlWindow
.
baseWindow
.
hWnd
,
0
,
This
->
DestRect
.
left
,
This
->
DestRect
.
top
,
This
->
DestRect
.
right
,
This
->
DestRect
.
bottom
,
SWP_NOZORDER
|
SWP_SHOWWINDOW
);
SetWindowPos
(
This
->
baseControlWindow
.
baseWindow
.
hWnd
,
0
,
This
->
DestRect
.
left
,
This
->
DestRect
.
top
,
This
->
DestRect
.
right
,
This
->
DestRect
.
bottom
,
SWP_NOZORDER
|
SWP_SHOWWINDOW
);
This
->
WindowPos
=
This
->
DestRect
;
This
->
WindowPos
=
This
->
DestRect
;
...
...
dlls/quartz/vmr9.c
View file @
b0b2c7d6
...
@@ -568,17 +568,6 @@ static const BaseRendererFuncTable BaseFuncTable =
...
@@ -568,17 +568,6 @@ static const BaseRendererFuncTable BaseFuncTable =
.
renderer_pin_query_interface
=
vmr_pin_query_interface
,
.
renderer_pin_query_interface
=
vmr_pin_query_interface
,
};
};
static
LPWSTR
WINAPI
VMR9_GetClassWindowStyles
(
BaseWindow
*
This
,
DWORD
*
pClassStyles
,
DWORD
*
pWindowStyles
,
DWORD
*
pWindowStylesEx
)
{
static
WCHAR
classnameW
[]
=
{
'I'
,
'V'
,
'M'
,
'R'
,
'9'
,
' '
,
'C'
,
'l'
,
'a'
,
's'
,
's'
,
0
};
*
pClassStyles
=
0
;
*
pWindowStyles
=
WS_SIZEBOX
;
*
pWindowStylesEx
=
0
;
return
classnameW
;
}
static
RECT
WINAPI
VMR9_GetDefaultRect
(
BaseWindow
*
This
)
static
RECT
WINAPI
VMR9_GetDefaultRect
(
BaseWindow
*
This
)
{
{
struct
quartz_vmr
*
pVMR9
=
impl_from_BaseWindow
(
This
);
struct
quartz_vmr
*
pVMR9
=
impl_from_BaseWindow
(
This
);
...
@@ -604,7 +593,6 @@ static BOOL WINAPI VMR9_OnSize(BaseWindow *This, LONG Width, LONG Height)
...
@@ -604,7 +593,6 @@ static BOOL WINAPI VMR9_OnSize(BaseWindow *This, LONG Width, LONG Height)
}
}
static
const
BaseWindowFuncTable
renderer_BaseWindowFuncTable
=
{
static
const
BaseWindowFuncTable
renderer_BaseWindowFuncTable
=
{
VMR9_GetClassWindowStyles
,
VMR9_GetDefaultRect
,
VMR9_GetDefaultRect
,
VMR9_OnSize
,
VMR9_OnSize
,
};
};
...
...
dlls/strmbase/window.c
View file @
b0b2c7d6
...
@@ -110,33 +110,24 @@ HRESULT WINAPI BaseWindow_Destroy(BaseWindow *This)
...
@@ -110,33 +110,24 @@ HRESULT WINAPI BaseWindow_Destroy(BaseWindow *This)
HRESULT
WINAPI
BaseWindowImpl_PrepareWindow
(
BaseWindow
*
This
)
HRESULT
WINAPI
BaseWindowImpl_PrepareWindow
(
BaseWindow
*
This
)
{
{
WNDCLASSW
winclass
;
static
const
WCHAR
class_nameW
[]
=
{
'w'
,
'i'
,
'n'
,
'e'
,
'_'
,
's'
,
't'
,
'r'
,
'm'
,
'b'
,
'a'
,
's'
,
'e'
,
'_'
,
'w'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
0
}
;
static
const
WCHAR
windownameW
[]
=
{
'A'
,
'c'
,
't'
,
'i'
,
'v'
,
'e'
,
'M'
,
'o'
,
'v'
,
'i'
,
'e'
,
' '
,
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
0
};
static
const
WCHAR
windownameW
[]
=
{
'A'
,
'c'
,
't'
,
'i'
,
'v'
,
'e'
,
'M'
,
'o'
,
'v'
,
'i'
,
'e'
,
' '
,
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
0
};
WNDCLASSW
winclass
=
{
0
};
This
->
pClassName
=
This
->
pFuncsTable
->
pfnGetClassWindowStyles
(
This
,
&
This
->
ClassStyles
,
&
This
->
WindowStyles
,
&
This
->
WindowStylesEx
);
winclass
.
style
=
This
->
ClassStyles
;
winclass
.
lpfnWndProc
=
WndProcW
;
winclass
.
lpfnWndProc
=
WndProcW
;
winclass
.
cbClsExtra
=
0
;
winclass
.
cbWndExtra
=
sizeof
(
BaseWindow
*
);
winclass
.
cbWndExtra
=
sizeof
(
BaseWindow
*
);
winclass
.
hInstance
=
This
->
hInstance
;
winclass
.
hInstance
=
This
->
hInstance
;
winclass
.
hIcon
=
NULL
;
winclass
.
hCursor
=
NULL
;
winclass
.
hbrBackground
=
GetStockObject
(
BLACK_BRUSH
);
winclass
.
hbrBackground
=
GetStockObject
(
BLACK_BRUSH
);
winclass
.
lpszMenuName
=
NULL
;
winclass
.
lpszClassName
=
class_nameW
;
winclass
.
lpszClassName
=
This
->
pClassName
;
if
(
!
RegisterClassW
(
&
winclass
)
&&
GetLastError
()
!=
ERROR_CLASS_ALREADY_EXISTS
)
if
(
!
RegisterClassW
(
&
winclass
)
&&
GetLastError
()
!=
ERROR_CLASS_ALREADY_EXISTS
)
{
{
ERR
(
"Unable to register window class: %u
\n
"
,
GetLastError
());
ERR
(
"Unable to register window class: %u
\n
"
,
GetLastError
());
return
E_FAIL
;
return
E_FAIL
;
}
}
This
->
hWnd
=
CreateWindowExW
(
This
->
WindowStylesEx
,
This
->
hWnd
=
CreateWindowExW
(
0
,
class_nameW
,
windownameW
,
WS_SIZEBOX
,
This
->
pClassName
,
windownameW
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
This
->
WindowStyles
,
NULL
,
NULL
,
This
->
hInstance
,
NULL
);
CW_USEDEFAULT
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
NULL
,
NULL
,
This
->
hInstance
,
NULL
);
if
(
!
This
->
hWnd
)
if
(
!
This
->
hWnd
)
{
{
...
@@ -305,7 +296,6 @@ HRESULT WINAPI BaseControlWindowImpl_put_WindowStyle(IVideoWindow *iface, LONG W
...
@@ -305,7 +296,6 @@ HRESULT WINAPI BaseControlWindowImpl_put_WindowStyle(IVideoWindow *iface, LONG W
SetWindowLongW
(
This
->
baseWindow
.
hWnd
,
GWL_STYLE
,
WindowStyle
);
SetWindowLongW
(
This
->
baseWindow
.
hWnd
,
GWL_STYLE
,
WindowStyle
);
SetWindowPos
(
This
->
baseWindow
.
hWnd
,
0
,
0
,
0
,
0
,
0
,
SetWindowPos
(
This
->
baseWindow
.
hWnd
,
0
,
0
,
0
,
0
,
0
,
SWP_NOSIZE
|
SWP_NOMOVE
|
SWP_NOZORDER
|
SWP_NOACTIVATE
|
SWP_FRAMECHANGED
);
SWP_NOSIZE
|
SWP_NOMOVE
|
SWP_NOZORDER
|
SWP_NOACTIVATE
|
SWP_FRAMECHANGED
);
This
->
baseWindow
.
WindowStyles
=
WindowStyle
;
return
S_OK
;
return
S_OK
;
}
}
...
...
include/wine/strmbase.h
View file @
b0b2c7d6
...
@@ -360,23 +360,17 @@ typedef struct tagBaseWindow
...
@@ -360,23 +360,17 @@ typedef struct tagBaseWindow
LONG
Width
;
LONG
Width
;
LONG
Height
;
LONG
Height
;
HINSTANCE
hInstance
;
HINSTANCE
hInstance
;
LPWSTR
pClassName
;
DWORD
ClassStyles
;
DWORD
WindowStyles
;
DWORD
WindowStylesEx
;
HDC
hDC
;
HDC
hDC
;
const
struct
BaseWindowFuncTable
*
pFuncsTable
;
const
struct
BaseWindowFuncTable
*
pFuncsTable
;
}
BaseWindow
;
}
BaseWindow
;
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_OnSize
)(
BaseWindow
*
This
,
LONG
Height
,
LONG
Width
);
typedef
BOOL
(
WINAPI
*
BaseWindow_OnSize
)(
BaseWindow
*
This
,
LONG
Height
,
LONG
Width
);
typedef
struct
BaseWindowFuncTable
typedef
struct
BaseWindowFuncTable
{
{
/* Required */
/* Required */
BaseWindow_GetClassWindowStyles
pfnGetClassWindowStyles
;
BaseWindow_GetDefaultRect
pfnGetDefaultRect
;
BaseWindow_GetDefaultRect
pfnGetDefaultRect
;
/* Optional, WinProc Related */
/* Optional, WinProc Related */
BaseWindow_OnSize
pfnOnSize
;
BaseWindow_OnSize
pfnOnSize
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment