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
645cdf9d
Commit
645cdf9d
authored
May 15, 2014
by
Jacek Caban
Committed by
Alexandre Julliard
May 15, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msctf: Added IEnumTfInputProcessorProfiles interface stub implementation.
parent
8cb42d41
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
119 additions
and
5 deletions
+119
-5
inputprocessor.c
dlls/msctf/inputprocessor.c
+111
-2
inputprocessor.c
dlls/msctf/tests/inputprocessor.c
+8
-3
No files found.
dlls/msctf/inputprocessor.c
View file @
645cdf9d
...
...
@@ -97,9 +97,107 @@ typedef struct tagEnumTfLanguageProfiles {
ITfCategoryMgr
*
catmgr
;
}
EnumTfLanguageProfiles
;
typedef
struct
{
IEnumTfInputProcessorProfiles
IEnumTfInputProcessorProfiles_iface
;
LONG
ref
;
}
EnumTfInputProcessorProfiles
;
static
HRESULT
ProfilesEnumGuid_Constructor
(
IEnumGUID
**
ppOut
);
static
HRESULT
EnumTfLanguageProfiles_Constructor
(
LANGID
langid
,
IEnumTfLanguageProfiles
**
ppOut
);
static
inline
EnumTfInputProcessorProfiles
*
impl_from_IEnumTfInputProcessorProfiles
(
IEnumTfInputProcessorProfiles
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
EnumTfInputProcessorProfiles
,
IEnumTfInputProcessorProfiles_iface
);
}
static
HRESULT
WINAPI
EnumTfInputProcessorProfiles_QueryInterface
(
IEnumTfInputProcessorProfiles
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
EnumTfInputProcessorProfiles
*
This
=
impl_from_IEnumTfInputProcessorProfiles
(
iface
);
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
{
TRACE
(
"(%p)->(IID_IUnknown %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
This
->
IEnumTfInputProcessorProfiles_iface
;
}
else
if
(
IsEqualGUID
(
riid
,
&
IID_IEnumTfInputProcessorProfiles
))
{
TRACE
(
"(%p)->(IID_IEnumTfInputProcessorProfiles %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
This
->
IEnumTfInputProcessorProfiles_iface
;
}
else
{
*
ppv
=
NULL
;
WARN
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
return
E_NOINTERFACE
;
}
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
}
static
ULONG
WINAPI
EnumTfInputProcessorProfiles_AddRef
(
IEnumTfInputProcessorProfiles
*
iface
)
{
EnumTfInputProcessorProfiles
*
This
=
impl_from_IEnumTfInputProcessorProfiles
(
iface
);
LONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
EnumTfInputProcessorProfiles_Release
(
IEnumTfInputProcessorProfiles
*
iface
)
{
EnumTfInputProcessorProfiles
*
This
=
impl_from_IEnumTfInputProcessorProfiles
(
iface
);
LONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
if
(
!
ref
)
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
ref
;
}
static
HRESULT
WINAPI
EnumTfInputProcessorProfiles_Clone
(
IEnumTfInputProcessorProfiles
*
iface
,
IEnumTfInputProcessorProfiles
**
ret
)
{
EnumTfInputProcessorProfiles
*
This
=
impl_from_IEnumTfInputProcessorProfiles
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
ret
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
EnumTfInputProcessorProfiles_Next
(
IEnumTfInputProcessorProfiles
*
iface
,
ULONG
count
,
TF_INPUTPROCESSORPROFILE
*
profile
,
ULONG
*
fetch
)
{
EnumTfInputProcessorProfiles
*
This
=
impl_from_IEnumTfInputProcessorProfiles
(
iface
);
FIXME
(
"(%p)->(%u %p %p)
\n
"
,
This
,
count
,
profile
,
fetch
);
if
(
fetch
)
*
fetch
=
0
;
return
S_FALSE
;
}
static
HRESULT
WINAPI
EnumTfInputProcessorProfiles_Reset
(
IEnumTfInputProcessorProfiles
*
iface
)
{
EnumTfInputProcessorProfiles
*
This
=
impl_from_IEnumTfInputProcessorProfiles
(
iface
);
FIXME
(
"(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
EnumTfInputProcessorProfiles_Skip
(
IEnumTfInputProcessorProfiles
*
iface
,
ULONG
count
)
{
EnumTfInputProcessorProfiles
*
This
=
impl_from_IEnumTfInputProcessorProfiles
(
iface
);
FIXME
(
"(%p)->(%u)
\n
"
,
This
,
count
);
return
E_NOTIMPL
;
}
static
const
IEnumTfInputProcessorProfilesVtbl
EnumTfInputProcessorProfilesVtbl
=
{
EnumTfInputProcessorProfiles_QueryInterface
,
EnumTfInputProcessorProfiles_AddRef
,
EnumTfInputProcessorProfiles_Release
,
EnumTfInputProcessorProfiles_Clone
,
EnumTfInputProcessorProfiles_Next
,
EnumTfInputProcessorProfiles_Reset
,
EnumTfInputProcessorProfiles_Skip
};
static
inline
InputProcessorProfiles
*
impl_from_ITfInputProcessorProfiles
(
ITfInputProcessorProfiles
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
InputProcessorProfiles
,
ITfInputProcessorProfiles_iface
);
...
...
@@ -742,8 +840,19 @@ static HRESULT WINAPI InputProcessorProfileMgr_EnumProfiles(ITfInputProcessorPro
IEnumTfInputProcessorProfiles
**
ppEnum
)
{
InputProcessorProfiles
*
This
=
impl_from_ITfInputProcessorProfileMgr
(
iface
);
FIXME
(
"(%p)->(%x %p)
\n
"
,
This
,
langid
,
ppEnum
);
return
E_NOTIMPL
;
EnumTfInputProcessorProfiles
*
enum_profiles
;
TRACE
(
"(%p)->(%x %p)
\n
"
,
This
,
langid
,
ppEnum
);
enum_profiles
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
enum_profiles
));
if
(
!
enum_profiles
)
return
E_OUTOFMEMORY
;
enum_profiles
->
IEnumTfInputProcessorProfiles_iface
.
lpVtbl
=
&
EnumTfInputProcessorProfilesVtbl
;
enum_profiles
->
ref
=
1
;
*
ppEnum
=
&
enum_profiles
->
IEnumTfInputProcessorProfiles_iface
;
return
S_OK
;
}
static
HRESULT
WINAPI
InputProcessorProfileMgr_ReleaseInputProcessor
(
ITfInputProcessorProfileMgr
*
iface
,
REFCLSID
rclsid
,
...
...
dlls/msctf/tests/inputprocessor.c
View file @
645cdf9d
...
...
@@ -2186,15 +2186,20 @@ static void test_AssociateFocus(void)
sink_check_ok
(
&
test_OnPopContext
,
"OnPopContext"
);
}
static
void
test_
QI
(
void
)
static
void
test_
profile_mgr
(
void
)
{
IEnumTfInputProcessorProfiles
*
enum_profiles
;
ITfInputProcessorProfileMgr
*
ipp_mgr
;
HRESULT
hres
;
/* A trivial test, probably worth moving once more will be added. */
hres
=
ITfInputProcessorProfiles_QueryInterface
(
g_ipp
,
&
IID_ITfInputProcessorProfileMgr
,
(
void
**
)
&
ipp_mgr
);
ok
(
hres
==
S_OK
,
"Could not get ITfInputProcessorProfileMgr iface: %08x
\n
"
,
hres
);
hres
=
ITfInputProcessorProfileMgr_EnumProfiles
(
ipp_mgr
,
0
,
&
enum_profiles
);
ok
(
hres
==
S_OK
,
"EnumProfiles failed: %08x
\n
"
,
hres
);
IEnumTfInputProcessorProfiles_Release
(
enum_profiles
);
ITfInputProcessorProfileMgr_Release
(
ipp_mgr
);
}
...
...
@@ -2224,7 +2229,7 @@ START_TEST(inputprocessor)
test_ThreadMgrUnadviseSinks
();
test_UnregisterCategory
();
test_Unregister
();
test_
QI
();
test_
profile_mgr
();
}
else
skip
(
"Unable to create InputProcessor
\n
"
);
...
...
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