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
c0913c34
Commit
c0913c34
authored
Nov 12, 2022
by
Mohamad Al-Jaf
Committed by
Alexandre Julliard
Nov 21, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windows.media: Stub IClosedCaptionPropertiesStatics interface.
Needed by Chromium-based browsers.
parent
e0aca838
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
158 additions
and
0 deletions
+158
-0
captions.c
dlls/windows.media/captions.c
+107
-0
private.h
dlls/windows.media/private.h
+40
-0
captions.c
dlls/windows.media/tests/captions.c
+11
-0
No files found.
dlls/windows.media/captions.c
View file @
c0913c34
...
@@ -35,6 +35,7 @@ const char *debugstr_hstring( HSTRING hstr )
...
@@ -35,6 +35,7 @@ const char *debugstr_hstring( HSTRING hstr )
struct
captions_statics
struct
captions_statics
{
{
IActivationFactory
IActivationFactory_iface
;
IActivationFactory
IActivationFactory_iface
;
IClosedCaptionPropertiesStatics
IClosedCaptionPropertiesStatics_iface
;
LONG
ref
;
LONG
ref
;
};
};
...
@@ -58,6 +59,13 @@ static HRESULT WINAPI factory_QueryInterface( IActivationFactory *iface, REFIID
...
@@ -58,6 +59,13 @@ static HRESULT WINAPI factory_QueryInterface( IActivationFactory *iface, REFIID
return
S_OK
;
return
S_OK
;
}
}
if
(
IsEqualGUID
(
iid
,
&
IID_IClosedCaptionPropertiesStatics
))
{
*
out
=
&
impl
->
IClosedCaptionPropertiesStatics_iface
;
IInspectable_AddRef
(
*
out
);
return
S_OK
;
}
FIXME
(
"%s not implemented, returning E_NOINTERFACE.
\n
"
,
debugstr_guid
(
iid
)
);
FIXME
(
"%s not implemented, returning E_NOINTERFACE.
\n
"
,
debugstr_guid
(
iid
)
);
*
out
=
NULL
;
*
out
=
NULL
;
return
E_NOINTERFACE
;
return
E_NOINTERFACE
;
...
@@ -116,9 +124,108 @@ static const struct IActivationFactoryVtbl factory_vtbl =
...
@@ -116,9 +124,108 @@ static const struct IActivationFactoryVtbl factory_vtbl =
factory_ActivateInstance
,
factory_ActivateInstance
,
};
};
DEFINE_IINSPECTABLE
(
captions
,
IClosedCaptionPropertiesStatics
,
struct
captions_statics
,
IActivationFactory_iface
)
static
HRESULT
WINAPI
captions_get_FontColor
(
IClosedCaptionPropertiesStatics
*
iface
,
ClosedCaptionColor
*
value
)
{
FIXME
(
"iface %p, value %p stub!
\n
"
,
iface
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
captions_get_ComputedFontColor
(
IClosedCaptionPropertiesStatics
*
iface
,
Color
*
value
)
{
FIXME
(
"iface %p, value %p stub!
\n
"
,
iface
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
captions_get_FontOpacity
(
IClosedCaptionPropertiesStatics
*
iface
,
ClosedCaptionOpacity
*
value
)
{
FIXME
(
"iface %p, value %p stub!
\n
"
,
iface
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
captions_get_FontSize
(
IClosedCaptionPropertiesStatics
*
iface
,
ClosedCaptionSize
*
value
)
{
FIXME
(
"iface %p, value %p stub!
\n
"
,
iface
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
captions_get_FontStyle
(
IClosedCaptionPropertiesStatics
*
iface
,
ClosedCaptionStyle
*
value
)
{
FIXME
(
"iface %p, value %p stub!
\n
"
,
iface
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
captions_get_FontEffect
(
IClosedCaptionPropertiesStatics
*
iface
,
ClosedCaptionEdgeEffect
*
value
)
{
FIXME
(
"iface %p, value %p stub!
\n
"
,
iface
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
captions_get_BackgroundColor
(
IClosedCaptionPropertiesStatics
*
iface
,
ClosedCaptionColor
*
value
)
{
FIXME
(
"iface %p, value %p stub!
\n
"
,
iface
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
captions_get_ComputedBackgroundColor
(
IClosedCaptionPropertiesStatics
*
iface
,
Color
*
value
)
{
FIXME
(
"iface %p, value %p stub!
\n
"
,
iface
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
captions_get_BackgroundOpacity
(
IClosedCaptionPropertiesStatics
*
iface
,
ClosedCaptionOpacity
*
value
)
{
FIXME
(
"iface %p, value %p stub!
\n
"
,
iface
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
captions_get_RegionColor
(
IClosedCaptionPropertiesStatics
*
iface
,
ClosedCaptionColor
*
value
)
{
FIXME
(
"iface %p, value %p stub!
\n
"
,
iface
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
captions_get_ComputedRegionColor
(
IClosedCaptionPropertiesStatics
*
iface
,
Color
*
value
)
{
FIXME
(
"iface %p, value %p stub!
\n
"
,
iface
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
captions_get_RegionOpacity
(
IClosedCaptionPropertiesStatics
*
iface
,
ClosedCaptionOpacity
*
value
)
{
FIXME
(
"iface %p, value %p stub!
\n
"
,
iface
,
value
);
return
E_NOTIMPL
;
}
static
const
struct
IClosedCaptionPropertiesStaticsVtbl
captions_statics_vtbl
=
{
captions_QueryInterface
,
captions_AddRef
,
captions_Release
,
/* IInspectable methods */
captions_GetIids
,
captions_GetRuntimeClassName
,
captions_GetTrustLevel
,
/* IClosedCaptionPropertiesStatics methods */
captions_get_FontColor
,
captions_get_ComputedFontColor
,
captions_get_FontOpacity
,
captions_get_FontSize
,
captions_get_FontStyle
,
captions_get_FontEffect
,
captions_get_BackgroundColor
,
captions_get_ComputedBackgroundColor
,
captions_get_BackgroundOpacity
,
captions_get_RegionColor
,
captions_get_ComputedRegionColor
,
captions_get_RegionOpacity
,
};
static
struct
captions_statics
captions_statics
=
static
struct
captions_statics
captions_statics
=
{
{
{
&
factory_vtbl
},
{
&
factory_vtbl
},
{
&
captions_statics_vtbl
},
1
,
1
,
};
};
...
...
dlls/windows.media/private.h
View file @
c0913c34
...
@@ -32,6 +32,8 @@
...
@@ -32,6 +32,8 @@
#define WIDL_using_Windows_Foundation
#define WIDL_using_Windows_Foundation
#define WIDL_using_Windows_Foundation_Collections
#define WIDL_using_Windows_Foundation_Collections
#include "windows.foundation.h"
#include "windows.foundation.h"
#define WIDL_using_Windows_UI
#include "windows.ui.h"
#define WIDL_using_Windows_Media_ClosedCaptioning
#define WIDL_using_Windows_Media_ClosedCaptioning
#include "windows.media.closedcaptioning.h"
#include "windows.media.closedcaptioning.h"
...
@@ -39,4 +41,42 @@ extern const char *debugstr_hstring( HSTRING hstr );
...
@@ -39,4 +41,42 @@ extern const char *debugstr_hstring( HSTRING hstr );
extern
IActivationFactory
*
captions_factory
;
extern
IActivationFactory
*
captions_factory
;
#define DEFINE_IINSPECTABLE_( pfx, iface_type, impl_type, impl_from, iface_mem, expr ) \
static inline impl_type *impl_from( iface_type *iface ) \
{ \
return CONTAINING_RECORD( iface, impl_type, iface_mem ); \
} \
static HRESULT WINAPI pfx##_QueryInterface( iface_type *iface, REFIID iid, void **out ) \
{ \
impl_type *impl = impl_from( iface ); \
return IInspectable_QueryInterface( (IInspectable *)(expr), iid, out ); \
} \
static ULONG WINAPI pfx##_AddRef( iface_type *iface ) \
{ \
impl_type *impl = impl_from( iface ); \
return IInspectable_AddRef( (IInspectable *)(expr) ); \
} \
static ULONG WINAPI pfx##_Release( iface_type *iface ) \
{ \
impl_type *impl = impl_from( iface ); \
return IInspectable_Release( (IInspectable *)(expr) ); \
} \
static HRESULT WINAPI pfx##_GetIids( iface_type *iface, ULONG *iid_count, IID **iids ) \
{ \
impl_type *impl = impl_from( iface ); \
return IInspectable_GetIids( (IInspectable *)(expr), iid_count, iids ); \
} \
static HRESULT WINAPI pfx##_GetRuntimeClassName( iface_type *iface, HSTRING *class_name ) \
{ \
impl_type *impl = impl_from( iface ); \
return IInspectable_GetRuntimeClassName( (IInspectable *)(expr), class_name ); \
} \
static HRESULT WINAPI pfx##_GetTrustLevel( iface_type *iface, TrustLevel *trust_level ) \
{ \
impl_type *impl = impl_from( iface ); \
return IInspectable_GetTrustLevel( (IInspectable *)(expr), trust_level ); \
}
#define DEFINE_IINSPECTABLE( pfx, iface_type, impl_type, base_iface ) \
DEFINE_IINSPECTABLE_( pfx, iface_type, impl_type, impl_from_##iface_type, iface_type##_iface, &impl->base_iface )
#endif
#endif
dlls/windows.media/tests/captions.c
View file @
c0913c34
...
@@ -25,6 +25,11 @@
...
@@ -25,6 +25,11 @@
#include "roapi.h"
#include "roapi.h"
#define WIDL_using_Windows_Foundation
#include "windows.foundation.h"
#define WIDL_using_Windows_Media_ClosedCaptioning
#include "windows.media.closedcaptioning.h"
#include "wine/test.h"
#include "wine/test.h"
#define check_interface( obj, iid, exp ) check_interface_( __LINE__, obj, iid, exp )
#define check_interface( obj, iid, exp ) check_interface_( __LINE__, obj, iid, exp )
...
@@ -45,6 +50,7 @@ static void check_interface_( unsigned int line, void *obj, const IID *iid, BOOL
...
@@ -45,6 +50,7 @@ static void check_interface_( unsigned int line, void *obj, const IID *iid, BOOL
static
void
test_CaptionStatics
(
void
)
static
void
test_CaptionStatics
(
void
)
{
{
static
const
WCHAR
*
caption_properties_name
=
L"Windows.Media.ClosedCaptioning.ClosedCaptionProperties"
;
static
const
WCHAR
*
caption_properties_name
=
L"Windows.Media.ClosedCaptioning.ClosedCaptionProperties"
;
IClosedCaptionPropertiesStatics
*
caption_statics
;
IActivationFactory
*
factory
;
IActivationFactory
*
factory
;
HSTRING
str
;
HSTRING
str
;
HRESULT
hr
;
HRESULT
hr
;
...
@@ -66,6 +72,11 @@ static void test_CaptionStatics(void)
...
@@ -66,6 +72,11 @@ static void test_CaptionStatics(void)
check_interface
(
factory
,
&
IID_IInspectable
,
TRUE
);
check_interface
(
factory
,
&
IID_IInspectable
,
TRUE
);
check_interface
(
factory
,
&
IID_IAgileObject
,
FALSE
);
check_interface
(
factory
,
&
IID_IAgileObject
,
FALSE
);
hr
=
IActivationFactory_QueryInterface
(
factory
,
&
IID_IClosedCaptionPropertiesStatics
,
(
void
**
)
&
caption_statics
);
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
ref
=
IClosedCaptionPropertiesStatics_Release
(
caption_statics
);
ok
(
ref
==
2
,
"got ref %ld.
\n
"
,
ref
);
ref
=
IActivationFactory_Release
(
factory
);
ref
=
IActivationFactory_Release
(
factory
);
ok
(
ref
==
1
,
"got ref %ld.
\n
"
,
ref
);
ok
(
ref
==
1
,
"got ref %ld.
\n
"
,
ref
);
}
}
...
...
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