ReactOS 0.4.16-dev-1537-g4e425b5
precomp.h
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS CTF
3 * LICENSE: LGPL-2.0-or-later (https://spdx.org/licenses/LGPL-2.0-or-later)
4 * PURPOSE: Precompiled header for msctf.dll
5 * COPYRIGHT: Copyright 2008 Aric Stewart, CodeWeavers
6 * Copyright 2025 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
7 */
8
9#pragma once
10
11#include <initguid.h>
12#include <windef.h>
13#include <winbase.h>
14#include <oleauto.h>
15#include <olectl.h>
16#include <cguid.h>
17#include <msctf.h>
18#include <msctf_undoc.h>
19#include <tchar.h>
20#include <strsafe.h>
21#include <wine/list.h>
22
23// Cicero
24#include <cicbase.h>
25#include <cicarray.h>
26#include <cicreg.h>
27#include <cicutb.h>
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33#define COOKIE_MAGIC_TMSINK 0x0010
34#define COOKIE_MAGIC_CONTEXTSINK 0x0020
35#define COOKIE_MAGIC_GUIDATOM 0x0030
36#define COOKIE_MAGIC_IPPSINK 0x0040
37#define COOKIE_MAGIC_EDITCOOKIE 0x0050
38#define COOKIE_MAGIC_COMPARTMENTSINK 0x0060
39#define COOKIE_MAGIC_DMSINK 0x0070
40#define COOKIE_MAGIC_THREADFOCUSSINK 0x0080
41#define COOKIE_MAGIC_KEYTRACESINK 0x0090
42#define COOKIE_MAGIC_UIELEMENTSINK 0x00a0
43#define COOKIE_MAGIC_INPUTPROCESSORPROFILEACTIVATIONSINK 0x00b0
44#define COOKIE_MAGIC_ACTIVELANGSINK 0x00c0
45
46extern DWORD g_dwTLSIndex;
49
52HRESULT Context_Constructor(TfClientId tidOwner, IUnknown *punk, ITfDocumentMgr *mgr, ITfContext **ppOut, TfEditCookie *pecTextStore);
55HRESULT Range_Constructor(ITfContext *context, DWORD anchorStart, DWORD anchorEnd, ITfRange **ppOut);
60
65
66/* cookie function */
72
73/* activated text services functions */
78
82
83typedef struct {
84 struct list entry;
85 union {
92 } interfaces;
93} Sink;
94
95#define SINK_ENTRY(cursor,type) (LIST_ENTRY(cursor,Sink,entry)->interfaces.p##type)
96#define SINK_FOR_EACH(cursor,list,type,elem) \
97 for ((cursor) = (list)->next, elem = SINK_ENTRY(cursor,type); \
98 (cursor) != (list); \
99 (cursor) = (cursor)->next, elem = SINK_ENTRY(cursor,type))
100
101HRESULT advise_sink(struct list *sink_list, REFIID riid, DWORD cookie_magic, IUnknown *unk, DWORD *cookie);
103void free_sinks(struct list *sink_list);
104
105#define szwSystemTIPKey L"SOFTWARE\\Microsoft\\CTF\\TIP"
106#define szwSystemCTFKey L"SOFTWARE\\Microsoft\\CTF"
107
110
113
114#ifdef __cplusplus
115} // extern "C"
116#endif
HRESULT __wine_unregister_resources(HMODULE module)
Definition: register.c:110
HRESULT set_textservice_sink(TfClientId tid, REFCLSID iid, IUnknown *sink)
Definition: msctf.cpp:517
HRESULT Context_Uninitialize(ITfContext *cxt)
Definition: context.cpp:985
DWORD get_Cookie_magic(DWORD id)
Definition: msctf.cpp:203
ITfCompartmentMgr * g_globalCompartmentMgr
Definition: msctf.cpp:45
HRESULT CategoryMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
HRESULT DocumentMgr_Constructor(ITfThreadMgrEventSink *, ITfDocumentMgr **ppOut)
HRESULT DisplayAttributeMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
void ThreadMgr_OnDocumentMgrDestruction(ITfThreadMgr *tm, ITfDocumentMgr *mgr)
Definition: threadmgr.cpp:1394
LPVOID remove_Cookie(DWORD id)
Definition: msctf.cpp:231
HRESULT Range_Constructor(ITfContext *context, DWORD anchorStart, DWORD anchorEnd, ITfRange **ppOut)
Definition: range.cpp:372
HRESULT get_textservice_sink(TfClientId tid, REFCLSID iid, IUnknown **sink)
Definition: msctf.cpp:497
HRESULT activate_textservices(ITfThreadMgrEx *tm)
Definition: msctf.cpp:449
HRESULT ThreadMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
Definition: threadmgr.cpp:1388
HRESULT Context_Initialize(ITfContext *cxt, ITfDocumentMgr *manager)
Definition: context.cpp:978
BOOL ProcessAttach(HINSTANCE hinstDLL)
@unimplemented
Definition: utils.cpp:766
HRESULT Context_Constructor(TfClientId tidOwner, IUnknown *punk, ITfDocumentMgr *mgr, ITfContext **ppOut, TfEditCookie *pecTextStore)
Definition: context.cpp:967
HRESULT add_active_textservice(TF_LANGUAGEPROFILE *lp)
Definition: msctf.cpp:369
HRESULT unadvise_sink(DWORD cookie)
Definition: msctf.cpp:286
BOOL get_active_textservice(REFCLSID rclsid, TF_LANGUAGEPROFILE *lp)
Definition: msctf.cpp:432
DWORD enumerate_Cookie(DWORD magic, DWORD *index)
Definition: msctf.cpp:246
void free_sinks(struct list *sink_list)
Definition: msctf.cpp:297
HRESULT InputProcessorProfiles_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
DWORD generate_Cookie(DWORD magic, LPVOID data)
Definition: msctf.cpp:157
HRESULT deactivate_textservices(void)
Definition: msctf.cpp:468
TfClientId g_processId
Definition: msctf.cpp:44
HRESULT LangBarMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
Definition: langbarmgr.cpp:248
HRESULT CompartmentMgr_Constructor(IUnknown *pUnkOuter, REFIID riid, IUnknown **ppOut)
HRESULT CompartmentMgr_Destructor(ITfCompartmentMgr *This)
VOID ProcessDetach(HINSTANCE hinstDLL)
@unimplemented
Definition: utils.cpp:840
HRESULT __wine_register_resources(HMODULE module)
Definition: register.c:98
CLSID get_textservice_clsid(TfClientId tid)
Definition: msctf.cpp:484
HRESULT advise_sink(struct list *sink_list, REFIID riid, DWORD cookie_magic, IUnknown *unk, DWORD *cookie)
Definition: msctf.cpp:259
DWORD g_dwTLSIndex
Definition: utils.cpp:33
LPVOID get_Cookie_data(DWORD id)
Definition: msctf.cpp:217
HRESULT TF_SELECTION_to_TS_SELECTION_ACP(const TF_SELECTION *tf, TS_SELECTION_ACP *tsAcp)
Definition: range.cpp:385
Definition: list.h:37
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLuint index
Definition: glext.h:6031
GLsizei GLenum GLboolean sink
Definition: glext.h:5672
HFONT tf
Definition: icontest.c:17
REFIID riid
Definition: atlbase.h:39
static TfClientId tid
uint32_t entry
Definition: isohybrid.c:63
DWORD TfClientId
Definition: msctf.idl:87
DWORD TfEditCookie
Definition: msctf.idl:86
#define REFIID
Definition: guiddef.h:118
#define REFCLSID
Definition: guiddef.h:117
Definition: precomp.h:83
ITfTextEditSink * pITfTextEditSink
Definition: precomp.h:89
ITfThreadMgrEventSink * pITfThreadMgrEventSink
Definition: precomp.h:87
IUnknown * pIUnknown
Definition: precomp.h:86
ITfTransitoryExtensionSink * pITfTransitoryExtensionSink
Definition: precomp.h:91
ITfLanguageProfileNotifySink * pITfLanguageProfileNotifySink
Definition: precomp.h:90
ITfCompartmentEventSink * pITfCompartmentEventSink
Definition: precomp.h:88
Definition: http.c:7252
Definition: cookie.c:34
Definition: time.h:68