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
fdbe3d18
Commit
fdbe3d18
authored
Jan 30, 2009
by
Aric Stewart
Committed by
Alexandre Julliard
Feb 02, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msctf: Add ITfDocumentMgr interface.
parent
edbea606
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
207 additions
and
3 deletions
+207
-3
Makefile.in
dlls/msctf/Makefile.in
+1
-0
documentmgr.c
dlls/msctf/documentmgr.c
+167
-0
msctf_internal.h
dlls/msctf/msctf_internal.h
+1
-0
threadmgr.c
dlls/msctf/threadmgr.c
+2
-3
msctf.idl
include/msctf.idl
+36
-0
No files found.
dlls/msctf/Makefile.in
View file @
fdbe3d18
...
...
@@ -6,6 +6,7 @@ MODULE = msctf.dll
IMPORTS
=
uuid ole32 user32 advapi32 kernel32 ntdll
C_SRCS
=
\
documentmgr.c
\
msctf.c
\
regsvr.c
\
threadmgr.c
...
...
dlls/msctf/documentmgr.c
0 → 100644
View file @
fdbe3d18
/*
* ITfDocumentMgr implementation
*
* Copyright 2009 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
tagDocumentMgr
{
const
ITfDocumentMgrVtbl
*
DocumentMgrVtbl
;
LONG
refCount
;
}
DocumentMgr
;
static
void
DocumentMgr_Destructor
(
DocumentMgr
*
This
)
{
TRACE
(
"destroying %p
\n
"
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
static
HRESULT
WINAPI
DocumentMgr_QueryInterface
(
ITfDocumentMgr
*
iface
,
REFIID
iid
,
LPVOID
*
ppvOut
)
{
DocumentMgr
*
This
=
(
DocumentMgr
*
)
iface
;
*
ppvOut
=
NULL
;
if
(
IsEqualIID
(
iid
,
&
IID_IUnknown
)
||
IsEqualIID
(
iid
,
&
IID_ITfDocumentMgr
))
{
*
ppvOut
=
This
;
}
if
(
*
ppvOut
)
{
IUnknown_AddRef
(
iface
);
return
S_OK
;
}
WARN
(
"unsupported interface: %s
\n
"
,
debugstr_guid
(
iid
));
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
DocumentMgr_AddRef
(
ITfDocumentMgr
*
iface
)
{
DocumentMgr
*
This
=
(
DocumentMgr
*
)
iface
;
return
InterlockedIncrement
(
&
This
->
refCount
);
}
static
ULONG
WINAPI
DocumentMgr_Release
(
ITfDocumentMgr
*
iface
)
{
DocumentMgr
*
This
=
(
DocumentMgr
*
)
iface
;
ULONG
ret
;
ret
=
InterlockedDecrement
(
&
This
->
refCount
);
if
(
ret
==
0
)
DocumentMgr_Destructor
(
This
);
return
ret
;
}
/*****************************************************
* ITfDocumentMgr functions
*****************************************************/
static
HRESULT
WINAPI
DocumentMgr_CreateContext
(
ITfDocumentMgr
*
iface
,
TfClientId
tidOwner
,
DWORD
dwFlags
,
IUnknown
*
punk
,
ITfContext
**
ppic
,
TfEditCookie
*
pecTextStore
)
{
DocumentMgr
*
This
=
(
DocumentMgr
*
)
iface
;
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
DocumentMgr_Push
(
ITfDocumentMgr
*
iface
,
ITfContext
*
pic
)
{
DocumentMgr
*
This
=
(
DocumentMgr
*
)
iface
;
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
DocumentMgr_Pop
(
ITfDocumentMgr
*
iface
,
DWORD
dwFlags
)
{
DocumentMgr
*
This
=
(
DocumentMgr
*
)
iface
;
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
DocumentMgr_GetTop
(
ITfDocumentMgr
*
iface
,
ITfContext
**
ppic
)
{
DocumentMgr
*
This
=
(
DocumentMgr
*
)
iface
;
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
DocumentMgr_GetBase
(
ITfDocumentMgr
*
iface
,
ITfContext
**
ppic
)
{
DocumentMgr
*
This
=
(
DocumentMgr
*
)
iface
;
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
DocumentMgr_EnumContexts
(
ITfDocumentMgr
*
iface
,
IEnumTfContexts
**
ppEnum
)
{
DocumentMgr
*
This
=
(
DocumentMgr
*
)
iface
;
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
const
ITfDocumentMgrVtbl
DocumentMgr_DocumentMgrVtbl
=
{
DocumentMgr_QueryInterface
,
DocumentMgr_AddRef
,
DocumentMgr_Release
,
DocumentMgr_CreateContext
,
DocumentMgr_Push
,
DocumentMgr_Pop
,
DocumentMgr_GetTop
,
DocumentMgr_GetBase
,
DocumentMgr_EnumContexts
};
HRESULT
DocumentMgr_Constructor
(
ITfDocumentMgr
**
ppOut
)
{
DocumentMgr
*
This
;
This
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
DocumentMgr
));
if
(
This
==
NULL
)
return
E_OUTOFMEMORY
;
This
->
DocumentMgrVtbl
=
&
DocumentMgr_DocumentMgrVtbl
;
This
->
refCount
=
1
;
TRACE
(
"returning %p
\n
"
,
This
);
*
ppOut
=
(
ITfDocumentMgr
*
)
This
;
return
S_OK
;
}
dlls/msctf/msctf_internal.h
View file @
fdbe3d18
...
...
@@ -22,5 +22,6 @@
#define __WINE_MSCTF_I_H
extern
HRESULT
ThreadMgr_Constructor
(
IUnknown
*
pUnkOuter
,
IUnknown
**
ppOut
);
extern
HRESULT
DocumentMgr_Constructor
(
ITfDocumentMgr
**
ppOut
);
#endif
/* __WINE_MSCTF_I_H */
dlls/msctf/threadmgr.c
View file @
fdbe3d18
...
...
@@ -109,9 +109,8 @@ static HRESULT WINAPI ThreadMgr_fnDeactivate( ITfThreadMgr* iface)
static
HRESULT
WINAPI
ThreadMgr_CreateDocumentMgr
(
ITfThreadMgr
*
iface
,
ITfDocumentMgr
**
ppdim
)
{
ThreadMgr
*
This
=
(
ThreadMgr
*
)
iface
;
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
TRACE
(
"(%p)
\n
"
,
iface
);
return
DocumentMgr_Constructor
(
ppdim
);
}
static
HRESULT
WINAPI
ThreadMgr_EnumDocumentMgrs
(
ITfThreadMgr
*
iface
,
IEnumTfDocumentMgrs
...
...
include/msctf.idl
View file @
fdbe3d18
...
...
@@ -25,10 +25,13 @@ import "comcat.idl";
cpp_quote
(
"EXTERN_C const CLSID CLSID_TF_ThreadMgr;"
)
typedef
[
uuid
(
7213778
c
-
7b
b0
-
4270
-
b050
-
6189
ee594e97
)
]
DWORD
TfEditCookie
;
typedef
[
uuid
(
de403c21
-
89
fd
-
4
f85
-
8b87
-
64584
d063fbc
)
]
DWORD
TfClientId
;
interface
ITfDocumentMgr
;
interface
ITfContext
;
interface
IEnumTfDocumentMgrs
;
interface
IEnumTfContexts
;
interface
ITfFunctionProvider
;
interface
IEnumTfFunctionProviders
;
interface
ITfCompartmentMgr
;
...
...
@@ -75,3 +78,36 @@ interface ITfThreadMgr: IUnknown
HRESULT
GetGlobalCompartment
(
[
out
]
ITfCompartmentMgr
**
ppCompMgr
)
;
}
;
[
object
,
uuid
(
aa80e7f4
-
2021
-
11
d2
-
93
e0
-
0060b067b86
e
),
pointer_default
(
unique
)
]
interface
ITfDocumentMgr
:
IUnknown
{
HRESULT
CreateContext
(
[
in
]
TfClientId
tidOwner
,
[
in
]
DWORD
dwFlags
,
[
in
,
unique
]
IUnknown
*
punk
,
[
out
]
ITfContext
**
ppic
,
[
out
]
TfEditCookie
*
pecTextStore
)
;
HRESULT
Push
(
[
in
]
ITfContext
*
pic
)
;
const
DWORD
TF_POPF_ALL
=
0
x0001
;
HRESULT
Pop
(
[
in
]
DWORD
dwFlags
)
;
HRESULT
GetTop
(
[
out
]
ITfContext
**
ppic
)
;
HRESULT
GetBase
(
[
out
]
ITfContext
**
ppic
)
;
HRESULT
EnumContexts
(
[
out
]
IEnumTfContexts
**
ppEnum
)
;
}
;
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