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
43db8477
Commit
43db8477
authored
Jan 27, 2009
by
Aric Stewart
Committed by
Alexandre Julliard
Jan 28, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msctf: Add stub ITfThreadMgr interface.
parent
b8416b9c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
298 additions
and
1 deletion
+298
-1
Makefile.in
dlls/msctf/Makefile.in
+2
-1
msctf.c
dlls/msctf/msctf.c
+5
-0
msctf_internal.h
dlls/msctf/msctf_internal.h
+26
-0
threadmgr.c
dlls/msctf/threadmgr.c
+214
-0
msctf.idl
include/msctf.idl
+51
-0
No files found.
dlls/msctf/Makefile.in
View file @
43db8477
...
...
@@ -7,7 +7,8 @@ IMPORTS = uuid ole32 user32 advapi32 kernel32 ntdll
C_SRCS
=
\
msctf.c
\
regsvr.c
regsvr.c
\
threadmgr.c
@MAKE_DLL_RULES@
...
...
dlls/msctf/msctf.c
View file @
43db8477
...
...
@@ -31,7 +31,11 @@
#include "winreg.h"
#include "shlwapi.h"
#include "shlguid.h"
#include "comcat.h"
#include "initguid.h"
#include "msctf.h"
#include "msctf_internal.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
msctf
);
...
...
@@ -45,6 +49,7 @@ static const struct {
REFCLSID
clsid
;
LPFNCONSTRUCTOR
ctor
;
}
ClassesTable
[]
=
{
{
&
CLSID_TF_ThreadMgr
,
ThreadMgr_Constructor
},
{
NULL
,
NULL
}
};
...
...
dlls/msctf/msctf_internal.h
0 → 100644
View file @
43db8477
/*
* Internal header for msctf.dll
*
* Copyright 2008 Aric Stewart, CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __WINE_MSCTF_I_H
#define __WINE_MSCTF_I_H
extern
HRESULT
ThreadMgr_Constructor
(
IUnknown
*
pUnkOuter
,
IUnknown
**
ppOut
);
#endif
/* __WINE_MSCTF_I_H */
dlls/msctf/threadmgr.c
0 → 100644
View file @
43db8477
/*
* ITfThreadMgr implementation
*
* Copyright 2008 Aric Stewart, CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#define COBJMACROS
#include "wine/debug.h"
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
#include "winuser.h"
#include "shlwapi.h"
#include "winerror.h"
#include "objbase.h"
#include "wine/unicode.h"
#include "msctf.h"
#include "msctf_internal.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
msctf
);
typedef
struct
tagACLMulti
{
const
ITfThreadMgrVtbl
*
ThreadMgrVtbl
;
LONG
refCount
;
}
ThreadMgr
;
static
void
ThreadMgr_Destructor
(
ThreadMgr
*
This
)
{
TRACE
(
"destroying %p
\n
"
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
static
HRESULT
WINAPI
ThreadMgr_QueryInterface
(
ITfThreadMgr
*
iface
,
REFIID
iid
,
LPVOID
*
ppvOut
)
{
ThreadMgr
*
This
=
(
ThreadMgr
*
)
iface
;
*
ppvOut
=
NULL
;
if
(
IsEqualIID
(
iid
,
&
IID_IUnknown
)
||
IsEqualIID
(
iid
,
&
IID_ITfThreadMgr
))
{
*
ppvOut
=
This
;
}
if
(
*
ppvOut
)
{
IUnknown_AddRef
(
iface
);
return
S_OK
;
}
WARN
(
"unsupported interface: %s
\n
"
,
debugstr_guid
(
iid
));
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
ThreadMgr_AddRef
(
ITfThreadMgr
*
iface
)
{
ThreadMgr
*
This
=
(
ThreadMgr
*
)
iface
;
return
InterlockedIncrement
(
&
This
->
refCount
);
}
static
ULONG
WINAPI
ThreadMgr_Release
(
ITfThreadMgr
*
iface
)
{
ThreadMgr
*
This
=
(
ThreadMgr
*
)
iface
;
ULONG
ret
;
ret
=
InterlockedDecrement
(
&
This
->
refCount
);
if
(
ret
==
0
)
ThreadMgr_Destructor
(
This
);
return
ret
;
}
/*****************************************************
* ITfThreadMgr functions
*****************************************************/
static
HRESULT
WINAPI
ThreadMgr_fnActivate
(
ITfThreadMgr
*
iface
,
TfClientId
*
ptid
)
{
ThreadMgr
*
This
=
(
ThreadMgr
*
)
iface
;
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ThreadMgr_fnDeactivate
(
ITfThreadMgr
*
iface
)
{
ThreadMgr
*
This
=
(
ThreadMgr
*
)
iface
;
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ThreadMgr_CreateDocumentMgr
(
ITfThreadMgr
*
iface
,
ITfDocumentMgr
**
ppdim
)
{
ThreadMgr
*
This
=
(
ThreadMgr
*
)
iface
;
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ThreadMgr_EnumDocumentMgrs
(
ITfThreadMgr
*
iface
,
IEnumTfDocumentMgrs
**
ppEnum
)
{
ThreadMgr
*
This
=
(
ThreadMgr
*
)
iface
;
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ThreadMgr_GetFocus
(
ITfThreadMgr
*
iface
,
ITfDocumentMgr
**
ppdimFocus
)
{
ThreadMgr
*
This
=
(
ThreadMgr
*
)
iface
;
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ThreadMgr_SetFocus
(
ITfThreadMgr
*
iface
,
ITfDocumentMgr
*
pdimFocus
)
{
ThreadMgr
*
This
=
(
ThreadMgr
*
)
iface
;
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ThreadMgr_AssociateFocus
(
ITfThreadMgr
*
iface
,
HWND
hwnd
,
ITfDocumentMgr
*
pdimNew
,
ITfDocumentMgr
**
ppdimPrev
)
{
ThreadMgr
*
This
=
(
ThreadMgr
*
)
iface
;
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ThreadMgr_IsThreadFocus
(
ITfThreadMgr
*
iface
,
BOOL
*
pfThreadFocus
)
{
ThreadMgr
*
This
=
(
ThreadMgr
*
)
iface
;
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ThreadMgr_GetFunctionProvider
(
ITfThreadMgr
*
iface
,
REFCLSID
clsid
,
ITfFunctionProvider
**
ppFuncProv
)
{
ThreadMgr
*
This
=
(
ThreadMgr
*
)
iface
;
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ThreadMgr_EnumFunctionProviders
(
ITfThreadMgr
*
iface
,
IEnumTfFunctionProviders
**
ppEnum
)
{
ThreadMgr
*
This
=
(
ThreadMgr
*
)
iface
;
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ThreadMgr_GetGlobalCompartment
(
ITfThreadMgr
*
iface
,
ITfCompartmentMgr
**
ppCompMgr
)
{
ThreadMgr
*
This
=
(
ThreadMgr
*
)
iface
;
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
const
ITfThreadMgrVtbl
ThreadMgr_ThreadMgrVtbl
=
{
ThreadMgr_QueryInterface
,
ThreadMgr_AddRef
,
ThreadMgr_Release
,
ThreadMgr_fnActivate
,
ThreadMgr_fnDeactivate
,
ThreadMgr_CreateDocumentMgr
,
ThreadMgr_EnumDocumentMgrs
,
ThreadMgr_GetFocus
,
ThreadMgr_SetFocus
,
ThreadMgr_AssociateFocus
,
ThreadMgr_IsThreadFocus
,
ThreadMgr_GetFunctionProvider
,
ThreadMgr_EnumFunctionProviders
,
ThreadMgr_GetGlobalCompartment
};
HRESULT
ThreadMgr_Constructor
(
IUnknown
*
pUnkOuter
,
IUnknown
**
ppOut
)
{
ThreadMgr
*
This
;
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
This
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
ThreadMgr
));
if
(
This
==
NULL
)
return
E_OUTOFMEMORY
;
This
->
ThreadMgrVtbl
=
&
ThreadMgr_ThreadMgrVtbl
;
This
->
refCount
=
1
;
TRACE
(
"returning %p
\n
"
,
This
);
*
ppOut
=
(
IUnknown
*
)
This
;
return
S_OK
;
}
include/msctf.idl
View file @
43db8477
...
...
@@ -24,3 +24,54 @@ import "comcat.idl";
#
endif
cpp_quote
(
"EXTERN_C const CLSID CLSID_TF_ThreadMgr;"
)
typedef
[
uuid
(
de403c21
-
89
fd
-
4
f85
-
8b87
-
64584
d063fbc
)
]
DWORD
TfClientId
;
interface
ITfDocumentMgr
;
interface
IEnumTfDocumentMgrs
;
interface
ITfFunctionProvider
;
interface
IEnumTfFunctionProviders
;
interface
ITfCompartmentMgr
;
[
object
,
uuid
(
aa80e801
-
2021
-
11
d2
-
93
e0
-
0060b067b86
e
),
pointer_default
(
unique
)
]
interface
ITfThreadMgr
:
IUnknown
{
HRESULT
Activate
(
[
out
]
TfClientId
*
ptid
)
;
HRESULT
Deactivate
()
;
HRESULT
CreateDocumentMgr
(
[
out
]
ITfDocumentMgr
**
ppdim
)
;
HRESULT
EnumDocumentMgrs
(
[
out
]
IEnumTfDocumentMgrs
**
ppEnum
)
;
HRESULT
GetFocus
(
[
out
]
ITfDocumentMgr
**
ppdimFocus
)
;
HRESULT
SetFocus
(
[
in
]
ITfDocumentMgr
*
pdimFocus
)
;
HRESULT
AssociateFocus
(
[
in
]
HWND
hwnd
,
[
in
,
unique
]
ITfDocumentMgr
*
pdimNew
,
[
out
]
ITfDocumentMgr
**
ppdimPrev
)
;
HRESULT
IsThreadFocus
(
[
out
]
BOOL
*
pfThreadFocus
)
;
HRESULT
GetFunctionProvider
(
[
in
]
REFCLSID
clsid
,
[
out
]
ITfFunctionProvider
**
ppFuncProv
)
;
HRESULT
EnumFunctionProviders
(
[
out
]
IEnumTfFunctionProviders
**
ppEnum
)
;
HRESULT
GetGlobalCompartment
(
[
out
]
ITfCompartmentMgr
**
ppCompMgr
)
;
}
;
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