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
2fe3b64f
Commit
2fe3b64f
authored
Feb 03, 2009
by
Aric Stewart
Committed by
Alexandre Julliard
Feb 04, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msctf: Stub implementation of ITfCategoryMgr.
parent
3680bdcc
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
320 additions
and
0 deletions
+320
-0
Makefile.in
dlls/msctf/Makefile.in
+1
-0
categorymgr.c
dlls/msctf/categorymgr.c
+248
-0
msctf.c
dlls/msctf/msctf.c
+1
-0
msctf_internal.h
dlls/msctf/msctf_internal.h
+1
-0
regsvr.c
dlls/msctf/regsvr.c
+7
-0
uuid.c
dlls/uuid/uuid.c
+1
-0
msctf.idl
include/msctf.idl
+61
-0
No files found.
dlls/msctf/Makefile.in
View file @
2fe3b64f
...
...
@@ -6,6 +6,7 @@ MODULE = msctf.dll
IMPORTS
=
uuid ole32 user32 advapi32 kernel32 ntdll
C_SRCS
=
\
categorymgr.c
\
context.c
\
documentmgr.c
\
inputprocessor.c
\
...
...
dlls/msctf/categorymgr.c
0 → 100644
View file @
2fe3b64f
/*
* ITfCategoryMgr 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
tagCategoryMgr
{
const
ITfCategoryMgrVtbl
*
CategoryMgrVtbl
;
LONG
refCount
;
}
CategoryMgr
;
static
void
CategoryMgr_Destructor
(
CategoryMgr
*
This
)
{
TRACE
(
"destroying %p
\n
"
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
static
HRESULT
WINAPI
CategoryMgr_QueryInterface
(
ITfCategoryMgr
*
iface
,
REFIID
iid
,
LPVOID
*
ppvOut
)
{
CategoryMgr
*
This
=
(
CategoryMgr
*
)
iface
;
*
ppvOut
=
NULL
;
if
(
IsEqualIID
(
iid
,
&
IID_IUnknown
)
||
IsEqualIID
(
iid
,
&
IID_ITfCategoryMgr
))
{
*
ppvOut
=
This
;
}
if
(
*
ppvOut
)
{
IUnknown_AddRef
(
iface
);
return
S_OK
;
}
WARN
(
"unsupported interface: %s
\n
"
,
debugstr_guid
(
iid
));
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
CategoryMgr_AddRef
(
ITfCategoryMgr
*
iface
)
{
CategoryMgr
*
This
=
(
CategoryMgr
*
)
iface
;
return
InterlockedIncrement
(
&
This
->
refCount
);
}
static
ULONG
WINAPI
CategoryMgr_Release
(
ITfCategoryMgr
*
iface
)
{
CategoryMgr
*
This
=
(
CategoryMgr
*
)
iface
;
ULONG
ret
;
ret
=
InterlockedDecrement
(
&
This
->
refCount
);
if
(
ret
==
0
)
CategoryMgr_Destructor
(
This
);
return
ret
;
}
/*****************************************************
* ITfCategoryMgr functions
*****************************************************/
static
HRESULT
WINAPI
CategoryMgr_RegisterCategory
(
ITfCategoryMgr
*
iface
,
REFCLSID
rclsid
,
REFGUID
rcatid
,
REFGUID
rguid
)
{
CategoryMgr
*
This
=
(
CategoryMgr
*
)
iface
;
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
CategoryMgr_UnregisterCategory
(
ITfCategoryMgr
*
iface
,
REFCLSID
rclsid
,
REFGUID
rcatid
,
REFGUID
rguid
)
{
CategoryMgr
*
This
=
(
CategoryMgr
*
)
iface
;
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
CategoryMgr_EnumCategoriesInItem
(
ITfCategoryMgr
*
iface
,
REFGUID
rguid
,
IEnumGUID
**
ppEnum
)
{
CategoryMgr
*
This
=
(
CategoryMgr
*
)
iface
;
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
CategoryMgr_EnumItemsInCategory
(
ITfCategoryMgr
*
iface
,
REFGUID
rcatid
,
IEnumGUID
**
ppEnum
)
{
CategoryMgr
*
This
=
(
CategoryMgr
*
)
iface
;
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
CategoryMgr_FindClosestCategory
(
ITfCategoryMgr
*
iface
,
REFGUID
rguid
,
GUID
*
pcatid
,
const
GUID
**
ppcatidList
,
ULONG
ulCount
)
{
CategoryMgr
*
This
=
(
CategoryMgr
*
)
iface
;
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
CategoryMgr_RegisterGUIDDescription
(
ITfCategoryMgr
*
iface
,
REFCLSID
rclsid
,
REFGUID
rguid
,
const
WCHAR
*
pchDesc
,
ULONG
cch
)
{
CategoryMgr
*
This
=
(
CategoryMgr
*
)
iface
;
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
CategoryMgr_UnregisterGUIDDescription
(
ITfCategoryMgr
*
iface
,
REFCLSID
rclsid
,
REFGUID
rguid
)
{
CategoryMgr
*
This
=
(
CategoryMgr
*
)
iface
;
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
CategoryMgr_GetGUIDDescription
(
ITfCategoryMgr
*
iface
,
REFGUID
rguid
,
BSTR
*
pbstrDesc
)
{
CategoryMgr
*
This
=
(
CategoryMgr
*
)
iface
;
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
CategoryMgr_RegisterGUIDDWORD
(
ITfCategoryMgr
*
iface
,
REFCLSID
rclsid
,
REFGUID
rguid
,
DWORD
dw
)
{
CategoryMgr
*
This
=
(
CategoryMgr
*
)
iface
;
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
CategoryMgr_UnregisterGUIDDWORD
(
ITfCategoryMgr
*
iface
,
REFCLSID
rclsid
,
REFGUID
rguid
)
{
CategoryMgr
*
This
=
(
CategoryMgr
*
)
iface
;
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
CategoryMgr_GetGUIDDWORD
(
ITfCategoryMgr
*
iface
,
REFGUID
rguid
,
DWORD
*
pdw
)
{
CategoryMgr
*
This
=
(
CategoryMgr
*
)
iface
;
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
CategoryMgr_RegisterGUID
(
ITfCategoryMgr
*
iface
,
REFGUID
rguid
,
TfGuidAtom
*
pguidatom
)
{
CategoryMgr
*
This
=
(
CategoryMgr
*
)
iface
;
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
CategoryMgr_GetGUID
(
ITfCategoryMgr
*
iface
,
TfGuidAtom
guidatom
,
GUID
*
pguid
)
{
CategoryMgr
*
This
=
(
CategoryMgr
*
)
iface
;
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
CategoryMgr_IsEqualTfGuidAtom
(
ITfCategoryMgr
*
iface
,
TfGuidAtom
guidatom
,
REFGUID
rguid
,
BOOL
*
pfEqual
)
{
CategoryMgr
*
This
=
(
CategoryMgr
*
)
iface
;
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
const
ITfCategoryMgrVtbl
CategoryMgr_CategoryMgrVtbl
=
{
CategoryMgr_QueryInterface
,
CategoryMgr_AddRef
,
CategoryMgr_Release
,
CategoryMgr_RegisterCategory
,
CategoryMgr_UnregisterCategory
,
CategoryMgr_EnumCategoriesInItem
,
CategoryMgr_EnumItemsInCategory
,
CategoryMgr_FindClosestCategory
,
CategoryMgr_RegisterGUIDDescription
,
CategoryMgr_UnregisterGUIDDescription
,
CategoryMgr_GetGUIDDescription
,
CategoryMgr_RegisterGUIDDWORD
,
CategoryMgr_UnregisterGUIDDWORD
,
CategoryMgr_GetGUIDDWORD
,
CategoryMgr_RegisterGUID
,
CategoryMgr_GetGUID
,
CategoryMgr_IsEqualTfGuidAtom
};
HRESULT
CategoryMgr_Constructor
(
IUnknown
*
pUnkOuter
,
IUnknown
**
ppOut
)
{
CategoryMgr
*
This
;
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
This
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
CategoryMgr
));
if
(
This
==
NULL
)
return
E_OUTOFMEMORY
;
This
->
CategoryMgrVtbl
=
&
CategoryMgr_CategoryMgrVtbl
;
This
->
refCount
=
1
;
TRACE
(
"returning %p
\n
"
,
This
);
*
ppOut
=
(
IUnknown
*
)
This
;
return
S_OK
;
}
dlls/msctf/msctf.c
View file @
2fe3b64f
...
...
@@ -55,6 +55,7 @@ static const struct {
}
ClassesTable
[]
=
{
{
&
CLSID_TF_ThreadMgr
,
ThreadMgr_Constructor
},
{
&
CLSID_TF_InputProcessorProfiles
,
InputProcessorProfiles_Constructor
},
{
&
CLSID_TF_CategoryMgr
,
CategoryMgr_Constructor
},
{
NULL
,
NULL
}
};
...
...
dlls/msctf/msctf_internal.h
View file @
2fe3b64f
...
...
@@ -26,6 +26,7 @@ extern HRESULT ThreadMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut);
extern
HRESULT
DocumentMgr_Constructor
(
ITfDocumentMgr
**
ppOut
);
extern
HRESULT
Context_Constructor
(
TfClientId
tidOwner
,
IUnknown
*
punk
,
ITfContext
**
ppOut
,
TfEditCookie
*
pecTextStore
);
extern
HRESULT
InputProcessorProfiles_Constructor
(
IUnknown
*
pUnkOuter
,
IUnknown
**
ppOut
);
extern
HRESULT
CategoryMgr_Constructor
(
IUnknown
*
pUnkOuter
,
IUnknown
**
ppOut
);
extern
const
WCHAR
szwSystemTIPKey
[];
#endif
/* __WINE_MSCTF_I_H */
dlls/msctf/regsvr.c
View file @
2fe3b64f
...
...
@@ -455,6 +455,13 @@ static struct regsvr_coclass const coclass_list[] = {
"msctf.dll"
,
"Apartment"
},
{
&
CLSID_TF_CategoryMgr
,
"TF_CategoryMgr"
,
NULL
,
"msctf.dll"
,
"Apartment"
},
{
NULL
}
/* list terminator */
};
...
...
dlls/uuid/uuid.c
View file @
2fe3b64f
...
...
@@ -111,3 +111,4 @@ DEFINE_GUID(CLSID_SynchronizeContainer, 0x0000032d,0x0000,0x0000,0xc0,0x00,0x0
DEFINE_GUID
(
CLSID_InProcFreeMarshaler
,
0x0000033a
,
0x0000
,
0x0000
,
0xc0
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x46
);
DEFINE_GUID
(
CLSID_TF_ThreadMgr
,
0x529a9e6b
,
0x6587
,
0x4f23
,
0xab
,
0x9e
,
0x9c
,
0x7d
,
0x68
,
0x3e
,
0x3c
,
0x50
);
DEFINE_GUID
(
CLSID_TF_InputProcessorProfiles
,
0x33c53a50
,
0xf456
,
0x4884
,
0xb0
,
0x49
,
0x85
,
0xfd
,
0x64
,
0x3e
,
0xcf
,
0xed
);
DEFINE_GUID
(
CLSID_TF_CategoryMgr
,
0xA4B544A1
,
0x438D
,
0x4B41
,
0x93
,
0x25
,
0x86
,
0x95
,
0x23
,
0xE2
,
0xD6
,
0xC7
);
include/msctf.idl
View file @
2fe3b64f
...
...
@@ -26,9 +26,11 @@ import "textstor.idl";
cpp_quote
(
"#define TF_E_STACKFULL MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0501)"
)
cpp_quote
(
"EXTERN_C const CLSID CLSID_TF_ThreadMgr;"
)
cpp_quote
(
"EXTERN_C const CLSID CLSID_TF_InputProcessorProfiles;"
)
cpp_quote
(
"EXTERN_C const CLSID CLSID_TF_CategoryMgr;"
)
typedef
[
uuid
(
7213778
c
-
7b
b0
-
4270
-
b050
-
6189
ee594e97
)
]
DWORD
TfEditCookie
;
typedef
[
uuid
(
de403c21
-
89
fd
-
4
f85
-
8b87
-
64584
d063fbc
)
]
DWORD
TfClientId
;
typedef
[
uuid
(
88
a9c478
-
f3ec
-
4763
-
8345
-
cd9250443f8d
)
]
DWORD
TfGuidAtom
;
interface
ITfDocumentMgr
;
interface
ITfContext
;
...
...
@@ -340,3 +342,62 @@ interface ITfInputProcessorProfiles : IUnknown
[
in
]
REFGUID
guidProfile
,
[
in
]
HKL
hKL
)
;
}
;
[
object
,
local
,
uuid
(
c3acefb5
-
f69d
-
4905
-
938
f
-
fcadcf4be830
),
pointer_default
(
unique
)
]
interface
ITfCategoryMgr
:
IUnknown
{
HRESULT
RegisterCategory
(
[
in
]
REFCLSID
rclsid
,
[
in
]
REFGUID
rcatid
,
[
in
]
REFGUID
rguid
)
;
HRESULT
UnregisterCategory
(
[
in
]
REFCLSID
rclsid
,
[
in
]
REFGUID
rcatid
,
[
in
]
REFGUID
rguid
)
;
HRESULT
EnumCategoriesInItem
(
[
in
]
REFGUID
rguid
,
[
out
]
IEnumGUID
**
ppEnum
)
;
HRESULT
EnumItemsInCategory
(
[
in
]
REFGUID
rcatid
,
[
out
]
IEnumGUID
**
ppEnum
)
;
HRESULT
FindClosestCategory
(
[
in
]
REFGUID
rguid
,
[
out
]
GUID
*
pcatid
,
[
in
,
size_is
(
ulCount
)
]
const
GUID
**
ppcatidList
,
[
in
]
ULONG
ulCount
)
;
HRESULT
RegisterGUIDDescription
(
[
in
]
REFCLSID
rclsid
,
[
in
]
REFGUID
rguid
,
[
in
,
size_is
(
cch
)
]
const
WCHAR
*
pchDesc
,
[
in
]
ULONG
cch
)
;
HRESULT
UnregisterGUIDDescription
(
[
in
]
REFCLSID
rclsid
,
[
in
]
REFGUID
rguid
)
;
HRESULT
GetGUIDDescription
(
[
in
]
REFGUID
rguid
,
[
out
]
BSTR
*
pbstrDesc
)
;
HRESULT
RegisterGUIDDWORD
(
[
in
]
REFCLSID
rclsid
,
[
in
]
REFGUID
rguid
,
[
in
]
DWORD
dw
)
;
HRESULT
UnregisterGUIDDWORD
(
[
in
]
REFCLSID
rclsid
,
[
in
]
REFGUID
rguid
)
;
HRESULT
GetGUIDDWORD
(
[
in
]
REFGUID
rguid
,
[
out
]
DWORD
*
pdw
)
;
HRESULT
RegisterGUID
(
[
in
]
REFGUID
rguid
,
[
out
]
TfGuidAtom
*
pguidatom
)
;
HRESULT
GetGUID
(
[
in
]
TfGuidAtom
guidatom
,
[
out
]
GUID
*
pguid
)
;
HRESULT
IsEqualTfGuidAtom
(
[
in
]
TfGuidAtom
guidatom
,
[
in
]
REFGUID
rguid
,
[
out
]
BOOL
*
pfEqual
)
;
}
;
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