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
73db91c2
Commit
73db91c2
authored
Sep 28, 2023
by
Mohamad Al-Jaf
Committed by
Alexandre Julliard
Oct 17, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windows.media.mediacontrol: Add IMusicDisplayProperties2 stub interface.
parent
8a91ff18
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
0 deletions
+63
-0
main.c
dlls/windows.media.mediacontrol/main.c
+58
-0
mediacontrol.c
dlls/windows.media.mediacontrol/tests/mediacontrol.c
+5
-0
No files found.
dlls/windows.media.mediacontrol/main.c
View file @
73db91c2
...
...
@@ -120,6 +120,7 @@ static const struct IActivationFactoryVtbl factory_vtbl =
struct
music_properties
{
IMusicDisplayProperties
IMusicDisplayProperties_iface
;
IMusicDisplayProperties2
IMusicDisplayProperties2_iface
;
LONG
ref
;
HSTRING
artist
;
...
...
@@ -147,6 +148,13 @@ static HRESULT WINAPI music_properties_QueryInterface( IMusicDisplayProperties *
return
S_OK
;
}
if
(
IsEqualGUID
(
iid
,
&
IID_IMusicDisplayProperties2
))
{
*
out
=
&
impl
->
IMusicDisplayProperties2_iface
;
IInspectable_AddRef
(
*
out
);
return
S_OK
;
}
FIXME
(
"%s not implemented, returning E_NOINTERFACE.
\n
"
,
debugstr_guid
(
iid
)
);
*
out
=
NULL
;
return
E_NOINTERFACE
;
...
...
@@ -254,6 +262,55 @@ static const IMusicDisplayPropertiesVtbl music_properties_vtbl =
music_properties_put_Artist
,
};
DEFINE_IINSPECTABLE
(
music_properties2
,
IMusicDisplayProperties2
,
struct
music_properties
,
IMusicDisplayProperties_iface
)
static
HRESULT
STDMETHODCALLTYPE
music_properties2_get_AlbumTitle
(
IMusicDisplayProperties2
*
iface
,
HSTRING
*
value
)
{
FIXME
(
"iface %p, value %p stub
\n
"
,
iface
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
STDMETHODCALLTYPE
music_properties2_put_AlbumTitle
(
IMusicDisplayProperties2
*
iface
,
HSTRING
value
)
{
FIXME
(
"iface %p, value %s stub
\n
"
,
iface
,
debugstr_hstring
(
value
)
);
return
E_NOTIMPL
;
}
static
HRESULT
STDMETHODCALLTYPE
music_properties2_get_TrackNumber
(
IMusicDisplayProperties2
*
iface
,
UINT32
*
value
)
{
FIXME
(
"iface %p, value %p stub
\n
"
,
iface
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
STDMETHODCALLTYPE
music_properties2_put_TrackNumber
(
IMusicDisplayProperties2
*
iface
,
UINT32
value
)
{
FIXME
(
"iface %p, value %u stub
\n
"
,
iface
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
STDMETHODCALLTYPE
music_properties2_get_Genres
(
IMusicDisplayProperties2
*
iface
,
IVector_HSTRING
**
value
)
{
FIXME
(
"iface %p, value %p stub
\n
"
,
iface
,
value
);
return
E_NOTIMPL
;
}
static
const
struct
IMusicDisplayProperties2Vtbl
music_properties2_vtbl
=
{
music_properties2_QueryInterface
,
music_properties2_AddRef
,
music_properties2_Release
,
/* IInspectable methods */
music_properties2_GetIids
,
music_properties2_GetRuntimeClassName
,
music_properties2_GetTrustLevel
,
/* IMusicDisplayProperties2 methods */
music_properties2_get_AlbumTitle
,
music_properties2_put_AlbumTitle
,
music_properties2_get_TrackNumber
,
music_properties2_put_TrackNumber
,
music_properties2_get_Genres
,
};
struct
display_updater
{
ISystemMediaTransportControlsDisplayUpdater
ISystemMediaTransportControlsDisplayUpdater_iface
;
...
...
@@ -379,6 +436,7 @@ static HRESULT WINAPI display_updater_get_MusicProperties( ISystemMediaTransport
if
(
!
(
impl
=
calloc
(
1
,
sizeof
(
*
impl
)
)))
return
E_OUTOFMEMORY
;
impl
->
IMusicDisplayProperties_iface
.
lpVtbl
=
&
music_properties_vtbl
;
impl
->
IMusicDisplayProperties2_iface
.
lpVtbl
=
&
music_properties2_vtbl
;
impl
->
ref
=
1
;
*
value
=
&
impl
->
IMusicDisplayProperties_iface
;
...
...
dlls/windows.media.mediacontrol/tests/mediacontrol.c
View file @
73db91c2
...
...
@@ -62,6 +62,7 @@ static void test_MediaControlStatics(void)
ISystemMediaTransportControlsInterop
*
media_control_interop_statics
=
NULL
;
ISystemMediaTransportControlsDisplayUpdater
*
display_updater
=
NULL
;
ISystemMediaTransportControls
*
media_control_statics
=
NULL
;
IMusicDisplayProperties2
*
music_properties2
=
NULL
;
IMusicDisplayProperties
*
music_properties
=
NULL
;
MediaPlaybackType
playback_type
;
IActivationFactory
*
factory
;
...
...
@@ -207,6 +208,10 @@ static void test_MediaControlStatics(void)
WindowsDeleteString
(
str
);
WindowsDeleteString
(
ret_str
);
hr
=
IMusicDisplayProperties_QueryInterface
(
music_properties
,
&
IID_IMusicDisplayProperties2
,
(
void
**
)
&
music_properties2
);
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
IMusicDisplayProperties2_Release
(
music_properties2
);
IMusicDisplayProperties_Release
(
music_properties
);
ISystemMediaTransportControlsDisplayUpdater_Release
(
display_updater
);
ISystemMediaTransportControls_Release
(
media_control_statics
);
...
...
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