Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
02986df0
Commit
02986df0
authored
Dec 03, 2010
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Dec 03, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Make video renderer use unicode calls.
parent
70b31cf0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
21 deletions
+24
-21
videorenderer.c
dlls/quartz/videorenderer.c
+24
-21
No files found.
dlls/quartz/videorenderer.c
View file @
02986df0
...
@@ -98,7 +98,7 @@ typedef struct VideoRendererImpl
...
@@ -98,7 +98,7 @@ typedef struct VideoRendererImpl
IMediaSample
*
sample_held
;
IMediaSample
*
sample_held
;
}
VideoRendererImpl
;
}
VideoRendererImpl
;
static
LRESULT
CALLBACK
VideoWndProc
A
(
HWND
hwnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
static
LRESULT
CALLBACK
VideoWndProc
W
(
HWND
hwnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
{
VideoRendererImpl
*
pVideoRenderer
=
(
VideoRendererImpl
*
)
GetWindowLongPtrW
(
hwnd
,
0
);
VideoRendererImpl
*
pVideoRenderer
=
(
VideoRendererImpl
*
)
GetWindowLongPtrW
(
hwnd
,
0
);
LPRECT
lprect
=
(
LPRECT
)
lParam
;
LPRECT
lprect
=
(
LPRECT
)
lParam
;
...
@@ -130,7 +130,7 @@ static LRESULT CALLBACK VideoWndProcA(HWND hwnd, UINT uMsg, WPARAM wParam, LPARA
...
@@ -130,7 +130,7 @@ static LRESULT CALLBACK VideoWndProcA(HWND hwnd, UINT uMsg, WPARAM wParam, LPARA
case
WM_RBUTTONDBLCLK
:
case
WM_RBUTTONDBLCLK
:
case
WM_RBUTTONDOWN
:
case
WM_RBUTTONDOWN
:
case
WM_RBUTTONUP
:
case
WM_RBUTTONUP
:
PostMessage
A
(
pVideoRenderer
->
hWndMsgDrain
,
uMsg
,
wParam
,
lParam
);
PostMessage
W
(
pVideoRenderer
->
hWndMsgDrain
,
uMsg
,
wParam
,
lParam
);
break
;
break
;
default:
default:
break
;
break
;
...
@@ -159,18 +159,21 @@ static LRESULT CALLBACK VideoWndProcA(HWND hwnd, UINT uMsg, WPARAM wParam, LPARA
...
@@ -159,18 +159,21 @@ static LRESULT CALLBACK VideoWndProcA(HWND hwnd, UINT uMsg, WPARAM wParam, LPARA
pVideoRenderer
->
DestRect
.
bottom
-
pVideoRenderer
->
DestRect
.
top
);
pVideoRenderer
->
DestRect
.
bottom
-
pVideoRenderer
->
DestRect
.
top
);
return
TRUE
;
return
TRUE
;
default:
default:
return
DefWindowProc
A
(
hwnd
,
uMsg
,
wParam
,
lParam
);
return
DefWindowProc
W
(
hwnd
,
uMsg
,
wParam
,
lParam
);
}
}
return
0
;
return
0
;
}
}
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
};
static
const
WCHAR
windownameW
[]
=
{
'A'
,
'c'
,
't'
,
'i'
,
'v'
,
'e'
,
'M'
,
'o'
,
'v'
,
'i'
,
'e'
,
' '
,
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
0
};
static
BOOL
video_register_windowclass
(
void
)
{
static
BOOL
video_register_windowclass
(
void
)
{
WNDCLASS
A
winclass
;
WNDCLASS
W
winclass
;
if
(
wnd_class_registered
)
if
(
wnd_class_registered
)
return
1
;
return
1
;
winclass
.
style
=
0
;
winclass
.
style
=
0
;
winclass
.
lpfnWndProc
=
VideoWndProc
A
;
winclass
.
lpfnWndProc
=
VideoWndProc
W
;
winclass
.
cbClsExtra
=
0
;
winclass
.
cbClsExtra
=
0
;
winclass
.
cbWndExtra
=
sizeof
(
VideoRendererImpl
*
);
winclass
.
cbWndExtra
=
sizeof
(
VideoRendererImpl
*
);
winclass
.
hInstance
=
NULL
;
winclass
.
hInstance
=
NULL
;
...
@@ -178,8 +181,8 @@ static BOOL video_register_windowclass(void) {
...
@@ -178,8 +181,8 @@ static BOOL video_register_windowclass(void) {
winclass
.
hCursor
=
NULL
;
winclass
.
hCursor
=
NULL
;
winclass
.
hbrBackground
=
GetStockObject
(
BLACK_BRUSH
);
winclass
.
hbrBackground
=
GetStockObject
(
BLACK_BRUSH
);
winclass
.
lpszMenuName
=
NULL
;
winclass
.
lpszMenuName
=
NULL
;
winclass
.
lpszClassName
=
"Wine ActiveMovie Class"
;
winclass
.
lpszClassName
=
classnameW
;
if
(
!
RegisterClass
A
(
&
winclass
))
if
(
!
RegisterClass
W
(
&
winclass
))
{
{
ERR
(
"Unable to register window class: %u
\n
"
,
GetLastError
());
ERR
(
"Unable to register window class: %u
\n
"
,
GetLastError
());
return
FALSE
;
return
FALSE
;
...
@@ -191,7 +194,7 @@ static BOOL video_register_windowclass(void) {
...
@@ -191,7 +194,7 @@ static BOOL video_register_windowclass(void) {
void
video_unregister_windowclass
(
void
)
{
void
video_unregister_windowclass
(
void
)
{
if
(
!
wnd_class_registered
)
if
(
!
wnd_class_registered
)
return
;
return
;
UnregisterClass
A
(
"Wine ActiveMovie Class"
,
NULL
);
UnregisterClass
W
(
classnameW
,
NULL
);
}
}
static
BOOL
CreateRenderingWindow
(
VideoRendererImpl
*
This
)
static
BOOL
CreateRenderingWindow
(
VideoRendererImpl
*
This
)
...
@@ -199,7 +202,7 @@ static BOOL CreateRenderingWindow(VideoRendererImpl* This)
...
@@ -199,7 +202,7 @@ static BOOL CreateRenderingWindow(VideoRendererImpl* This)
TRACE
(
"(%p)->()
\n
"
,
This
);
TRACE
(
"(%p)->()
\n
"
,
This
);
if
(
!
video_register_windowclass
())
if
(
!
video_register_windowclass
())
return
FALSE
;
return
FALSE
;
This
->
hWnd
=
CreateWindowEx
A
(
0
,
"Wine ActiveMovie Class"
,
"Wine ActiveMovie Window"
,
WS_SIZEBOX
,
This
->
hWnd
=
CreateWindowEx
W
(
0
,
classnameW
,
windownameW
,
WS_SIZEBOX
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
NULL
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
NULL
,
NULL
,
NULL
,
NULL
);
NULL
,
NULL
,
NULL
);
...
@@ -232,10 +235,10 @@ static DWORD WINAPI MessageLoop(LPVOID lpParameter)
...
@@ -232,10 +235,10 @@ static DWORD WINAPI MessageLoop(LPVOID lpParameter)
This
->
ThreadResult
=
TRUE
;
This
->
ThreadResult
=
TRUE
;
SetEvent
(
This
->
hEvent
);
SetEvent
(
This
->
hEvent
);
while
((
fGotMessage
=
GetMessage
A
(
&
msg
,
NULL
,
0
,
0
))
!=
0
&&
fGotMessage
!=
-
1
)
while
((
fGotMessage
=
GetMessage
W
(
&
msg
,
NULL
,
0
,
0
))
!=
0
&&
fGotMessage
!=
-
1
)
{
{
TranslateMessage
(
&
msg
);
TranslateMessage
(
&
msg
);
DispatchMessage
A
(
&
msg
);
DispatchMessage
W
(
&
msg
);
}
}
TRACE
(
"End of message loop
\n
"
);
TRACE
(
"End of message loop
\n
"
);
...
@@ -680,7 +683,7 @@ static ULONG WINAPI VideoRendererInner_Release(IUnknown * iface)
...
@@ -680,7 +683,7 @@ static ULONG WINAPI VideoRendererInner_Release(IUnknown * iface)
if
(
This
->
hWnd
)
if
(
This
->
hWnd
)
SendMessageW
(
This
->
hWnd
,
WM_CLOSE
,
0
,
0
);
SendMessageW
(
This
->
hWnd
,
WM_CLOSE
,
0
,
0
);
PostThreadMessage
A
(
This
->
ThreadID
,
WM_QUIT
,
0
,
0
);
PostThreadMessage
W
(
This
->
ThreadID
,
WM_QUIT
,
0
,
0
);
WaitForSingleObject
(
This
->
hThread
,
INFINITE
);
WaitForSingleObject
(
This
->
hThread
,
INFINITE
);
CloseHandle
(
This
->
hThread
);
CloseHandle
(
This
->
hThread
);
CloseHandle
(
This
->
hEvent
);
CloseHandle
(
This
->
hEvent
);
...
@@ -1662,14 +1665,14 @@ static HRESULT WINAPI Videowindow_put_WindowStyle(IVideoWindow *iface,
...
@@ -1662,14 +1665,14 @@ static HRESULT WINAPI Videowindow_put_WindowStyle(IVideoWindow *iface,
ICOM_THIS_MULTI
(
VideoRendererImpl
,
IVideoWindow_vtbl
,
iface
);
ICOM_THIS_MULTI
(
VideoRendererImpl
,
IVideoWindow_vtbl
,
iface
);
LONG
old
;
LONG
old
;
old
=
GetWindowLong
A
(
This
->
hWnd
,
GWL_STYLE
);
old
=
GetWindowLong
W
(
This
->
hWnd
,
GWL_STYLE
);
TRACE
(
"(%p/%p)->(%x -> %x)
\n
"
,
This
,
iface
,
old
,
WindowStyle
);
TRACE
(
"(%p/%p)->(%x -> %x)
\n
"
,
This
,
iface
,
old
,
WindowStyle
);
if
(
WindowStyle
&
(
WS_DISABLED
|
WS_HSCROLL
|
WS_ICONIC
|
WS_MAXIMIZE
|
WS_MINIMIZE
|
WS_VSCROLL
))
if
(
WindowStyle
&
(
WS_DISABLED
|
WS_HSCROLL
|
WS_ICONIC
|
WS_MAXIMIZE
|
WS_MINIMIZE
|
WS_VSCROLL
))
return
E_INVALIDARG
;
return
E_INVALIDARG
;
SetWindowLong
A
(
This
->
hWnd
,
GWL_STYLE
,
WindowStyle
);
SetWindowLong
W
(
This
->
hWnd
,
GWL_STYLE
,
WindowStyle
);
SetWindowPos
(
This
->
hWnd
,
0
,
0
,
0
,
0
,
0
,
SWP_FRAMECHANGED
|
SWP_NOSIZE
|
SWP_NOZORDER
);
SetWindowPos
(
This
->
hWnd
,
0
,
0
,
0
,
0
,
0
,
SWP_FRAMECHANGED
|
SWP_NOSIZE
|
SWP_NOZORDER
);
This
->
WindowStyle
=
WindowStyle
;
This
->
WindowStyle
=
WindowStyle
;
...
@@ -1693,7 +1696,7 @@ static HRESULT WINAPI Videowindow_put_WindowStyleEx(IVideoWindow *iface,
...
@@ -1693,7 +1696,7 @@ static HRESULT WINAPI Videowindow_put_WindowStyleEx(IVideoWindow *iface,
TRACE
(
"(%p/%p)->(%d)
\n
"
,
This
,
iface
,
WindowStyleEx
);
TRACE
(
"(%p/%p)->(%d)
\n
"
,
This
,
iface
,
WindowStyleEx
);
if
(
!
SetWindowLong
A
(
This
->
hWnd
,
GWL_EXSTYLE
,
WindowStyleEx
))
if
(
!
SetWindowLong
W
(
This
->
hWnd
,
GWL_EXSTYLE
,
WindowStyleEx
))
return
E_FAIL
;
return
E_FAIL
;
return
S_OK
;
return
S_OK
;
...
@@ -1705,7 +1708,7 @@ static HRESULT WINAPI Videowindow_get_WindowStyleEx(IVideoWindow *iface,
...
@@ -1705,7 +1708,7 @@ static HRESULT WINAPI Videowindow_get_WindowStyleEx(IVideoWindow *iface,
TRACE
(
"(%p/%p)->(%p)
\n
"
,
This
,
iface
,
WindowStyleEx
);
TRACE
(
"(%p/%p)->(%p)
\n
"
,
This
,
iface
,
WindowStyleEx
);
*
WindowStyleEx
=
GetWindowLong
A
(
This
->
hWnd
,
GWL_EXSTYLE
);
*
WindowStyleEx
=
GetWindowLong
W
(
This
->
hWnd
,
GWL_EXSTYLE
);
return
S_OK
;
return
S_OK
;
}
}
...
@@ -1904,10 +1907,10 @@ static HRESULT WINAPI Videowindow_put_Owner(IVideoWindow *iface,
...
@@ -1904,10 +1907,10 @@ static HRESULT WINAPI Videowindow_put_Owner(IVideoWindow *iface,
SetParent
(
This
->
hWnd
,
This
->
hWndOwner
);
SetParent
(
This
->
hWnd
,
This
->
hWndOwner
);
if
(
This
->
WindowStyle
&
WS_CHILD
)
if
(
This
->
WindowStyle
&
WS_CHILD
)
{
{
LONG
old
=
GetWindowLong
A
(
This
->
hWnd
,
GWL_STYLE
);
LONG
old
=
GetWindowLong
W
(
This
->
hWnd
,
GWL_STYLE
);
if
(
old
!=
This
->
WindowStyle
)
if
(
old
!=
This
->
WindowStyle
)
{
{
SetWindowLong
A
(
This
->
hWnd
,
GWL_STYLE
,
This
->
WindowStyle
);
SetWindowLong
W
(
This
->
hWnd
,
GWL_STYLE
,
This
->
WindowStyle
);
SetWindowPos
(
This
->
hWnd
,
0
,
0
,
0
,
0
,
0
,
SWP_FRAMECHANGED
|
SWP_NOSIZE
|
SWP_NOZORDER
);
SetWindowPos
(
This
->
hWnd
,
0
,
0
,
0
,
0
,
0
,
SWP_FRAMECHANGED
|
SWP_NOSIZE
|
SWP_NOZORDER
);
}
}
}
}
...
@@ -1984,14 +1987,14 @@ static HRESULT WINAPI Videowindow_put_FullScreenMode(IVideoWindow *iface,
...
@@ -1984,14 +1987,14 @@ static HRESULT WINAPI Videowindow_put_FullScreenMode(IVideoWindow *iface,
if
(
FullScreenMode
)
{
if
(
FullScreenMode
)
{
ShowWindow
(
This
->
hWnd
,
SW_HIDE
);
ShowWindow
(
This
->
hWnd
,
SW_HIDE
);
SetParent
(
This
->
hWnd
,
0
);
SetParent
(
This
->
hWnd
,
0
);
SetWindowLong
A
(
This
->
hWnd
,
GWL_STYLE
,
WS_POPUP
);
SetWindowLong
W
(
This
->
hWnd
,
GWL_STYLE
,
WS_POPUP
);
SetWindowPos
(
This
->
hWnd
,
HWND_TOP
,
0
,
0
,
GetSystemMetrics
(
SM_CXSCREEN
),
GetSystemMetrics
(
SM_CYSCREEN
),
SWP_SHOWWINDOW
);
SetWindowPos
(
This
->
hWnd
,
HWND_TOP
,
0
,
0
,
GetSystemMetrics
(
SM_CXSCREEN
),
GetSystemMetrics
(
SM_CYSCREEN
),
SWP_SHOWWINDOW
);
GetWindowRect
(
This
->
hWnd
,
&
This
->
DestRect
);
GetWindowRect
(
This
->
hWnd
,
&
This
->
DestRect
);
This
->
WindowPos
=
This
->
DestRect
;
This
->
WindowPos
=
This
->
DestRect
;
}
else
{
}
else
{
ShowWindow
(
This
->
hWnd
,
SW_HIDE
);
ShowWindow
(
This
->
hWnd
,
SW_HIDE
);
SetParent
(
This
->
hWnd
,
This
->
hWndOwner
);
SetParent
(
This
->
hWnd
,
This
->
hWndOwner
);
SetWindowLong
A
(
This
->
hWnd
,
GWL_STYLE
,
This
->
WindowStyle
);
SetWindowLong
W
(
This
->
hWnd
,
GWL_STYLE
,
This
->
WindowStyle
);
GetClientRect
(
This
->
hWnd
,
&
This
->
DestRect
);
GetClientRect
(
This
->
hWnd
,
&
This
->
DestRect
);
SetWindowPos
(
This
->
hWnd
,
0
,
This
->
DestRect
.
left
,
This
->
DestRect
.
top
,
This
->
DestRect
.
right
,
This
->
DestRect
.
bottom
,
SWP_NOZORDER
|
SWP_SHOWWINDOW
);
SetWindowPos
(
This
->
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
;
...
@@ -2036,7 +2039,7 @@ static HRESULT WINAPI Videowindow_NotifyOwnerMessage(IVideoWindow *iface,
...
@@ -2036,7 +2039,7 @@ static HRESULT WINAPI Videowindow_NotifyOwnerMessage(IVideoWindow *iface,
TRACE
(
"(%p/%p)->(%08lx, %d, %08lx, %08lx)
\n
"
,
This
,
iface
,
hwnd
,
uMsg
,
wParam
,
lParam
);
TRACE
(
"(%p/%p)->(%08lx, %d, %08lx, %08lx)
\n
"
,
This
,
iface
,
hwnd
,
uMsg
,
wParam
,
lParam
);
if
(
!
PostMessage
A
(
This
->
hWnd
,
uMsg
,
wParam
,
lParam
))
if
(
!
PostMessage
W
(
This
->
hWnd
,
uMsg
,
wParam
,
lParam
))
return
E_FAIL
;
return
E_FAIL
;
return
S_OK
;
return
S_OK
;
...
...
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