ReactOS 0.4.16-dev-1541-g7e1d9ef
msctf.cpp File Reference
#include "precomp.h"
#include <wine/debug.h>
Include dependency graph for msctf.cpp:

Go to the source code of this file.

Classes

struct  CookieInternal
 
struct  ActivatedTextService
 
struct  AtsEntry
 
class  CClassFactory
 

Typedefs

typedef HRESULT(* LPFNCONSTRUCTOR) (IUnknown *pUnkOuter, IUnknown **ppvOut)
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (msctf)
 
 STDMETHODIMP_ (ULONG) CClassFactory
 
static HRESULT ClassFactory_Constructor (LPFNCONSTRUCTOR ctor, LPVOID *ppvOut)
 
EXTERN_C DWORD generate_Cookie (DWORD magic, LPVOID data)
 
EXTERN_C DWORD get_Cookie_magic (DWORD id)
 
EXTERN_C LPVOID get_Cookie_data (DWORD id)
 
EXTERN_C LPVOID remove_Cookie (DWORD id)
 
EXTERN_C DWORD enumerate_Cookie (DWORD magic, DWORD *index)
 
EXTERN_C HRESULT advise_sink (struct list *sink_list, REFIID riid, DWORD cookie_magic, IUnknown *unk, DWORD *cookie)
 
static void free_sink (Sink *sink)
 
EXTERN_C HRESULT unadvise_sink (DWORD cookie)
 
EXTERN_C void free_sinks (struct list *sink_list)
 
static HRESULT activate_given_ts (ActivatedTextService *actsvr, ITfThreadMgrEx *tm)
 
static HRESULT deactivate_given_ts (ActivatedTextService *actsvr)
 
static void deactivate_remove_conflicting_ts (REFCLSID catid)
 
EXTERN_C HRESULT add_active_textservice (TF_LANGUAGEPROFILE *lp)
 
EXTERN_C BOOL get_active_textservice (REFCLSID rclsid, TF_LANGUAGEPROFILE *profile)
 
EXTERN_C HRESULT activate_textservices (ITfThreadMgrEx *tm)
 
EXTERN_C HRESULT deactivate_textservices (void)
 
EXTERN_C CLSID get_textservice_clsid (TfClientId tid)
 
EXTERN_C HRESULT get_textservice_sink (TfClientId tid, REFCLSID iid, IUnknown **sink)
 
EXTERN_C HRESULT set_textservice_sink (TfClientId tid, REFCLSID iid, IUnknown *sink)
 
BOOL WINAPI DllMain (HINSTANCE hinst, DWORD fdwReason, LPVOID fImpLoad)
 
HRESULT WINAPI DllCanUnloadNow (void)
 
HRESULT WINAPI DllGetClassObject (REFCLSID clsid, REFIID iid, LPVOID *ppvOut)
 
HRESULT WINAPI DllRegisterServer (void)
 
HRESULT WINAPI DllUnregisterServer (void)
 
HRESULT WINAPI TF_CreateThreadMgr (ITfThreadMgr **pptim)
 
HRESULT WINAPI TF_GetThreadMgr (ITfThreadMgr **pptim)
 
HRESULT WINAPI SetInputScope (HWND hwnd, InputScope inputscope)
 
HRESULT WINAPI SetInputScopes (HWND hwnd, const InputScope *pInputScopes, UINT cInputScopes, WCHAR **ppszPhraseList, UINT cPhrases, WCHAR *pszRegExp, WCHAR *pszSRGS)
 
HRESULT WINAPI TF_CreateInputProcessorProfiles (ITfInputProcessorProfiles **ppipr)
 
HRESULT WINAPI TF_InvalidAssemblyListCacheIfExist (void)
 
HRESULT WINAPI TF_CreateLangBarMgr (ITfLangBarMgr **pppbm)
 
HRESULT WINAPI TF_CreateLangBarItemMgr (ITfLangBarItemMgr **pplbim)
 

Variables

static HINSTANCE MSCTF_hinstance
 
static CookieInternalcookies
 
static UINT id_last
 
static UINT array_size
 
static struct list AtsList = LIST_INIT(AtsList)
 
static UINT activated = 0
 
TfClientId g_processId = 0
 
ITfCompartmentMgrg_globalCompartmentMgr = NULL
 
struct {
   const CLSID *   clsid
 
   LPFNCONSTRUCTOR   ctor
 
ClassesTable []
 

Typedef Documentation

◆ LPFNCONSTRUCTOR

typedef HRESULT(* LPFNCONSTRUCTOR) (IUnknown *pUnkOuter, IUnknown **ppvOut)

Definition at line 47 of file msctf.cpp.

Function Documentation

◆ activate_given_ts()

static HRESULT activate_given_ts ( ActivatedTextService actsvr,
ITfThreadMgrEx tm 
)
static

Definition at line 309 of file msctf.cpp.

310{
311 HRESULT hr;
312
313 /* Already Active? */
314 if (actsvr->pITfTextInputProcessor)
315 return S_OK;
316
317 hr = CoCreateInstance(actsvr->LanguageProfile.clsid, NULL, CLSCTX_INPROC_SERVER,
318 IID_ITfTextInputProcessor, (void **)&actsvr->pITfTextInputProcessor);
319 if (FAILED(hr)) return hr;
320
321 hr = actsvr->pITfTextInputProcessor->Activate((ITfThreadMgr *)tm, actsvr->tid);
322 if (FAILED(hr))
323 {
326 return hr;
327 }
328
329 actsvr->pITfThreadMgrEx = tm;
330 tm->AddRef();
331 return hr;
332}
#define NULL
Definition: types.h:112
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
HRESULT Activate([in] ITfThreadMgr *ptim, [in] TfClientId tid)
ULONG Release()
#define S_OK
Definition: intsafe.h:52
#define FAILED(hr)
Definition: intsafe.h:51
HRESULT hr
Definition: shlfolder.c:183
TF_LANGUAGEPROFILE LanguageProfile
Definition: msctf.cpp:24
ITfTextInputProcessor * pITfTextInputProcessor
Definition: msctf.cpp:25
TfClientId tid
Definition: msctf.cpp:28
ITfThreadMgrEx * pITfThreadMgrEx
Definition: msctf.cpp:26
Definition: time.h:68

Referenced by activate_textservices(), and add_active_textservice().

◆ activate_textservices()

EXTERN_C HRESULT activate_textservices ( ITfThreadMgrEx tm)

Definition at line 449 of file msctf.cpp.

450{
451 HRESULT hr = S_OK;
452 AtsEntry *ats;
453
454 activated ++;
455 if (activated > 1)
456 return S_OK;
457
459 {
460 hr = activate_given_ts(ats->ats, tm);
461 if (FAILED(hr))
462 FIXME("Failed to activate text service\n");
463 }
464 return hr;
465}
#define FIXME(fmt,...)
Definition: precomp.h:53
uint32_t entry
Definition: isohybrid.c:63
static UINT activated
Definition: msctf.cpp:42
static struct list AtsList
Definition: msctf.cpp:41
static HRESULT activate_given_ts(ActivatedTextService *actsvr, ITfThreadMgrEx *tm)
Definition: msctf.cpp:309
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
ActivatedTextService * ats
Definition: msctf.cpp:34

Referenced by CThreadMgr::ActivateEx().

◆ add_active_textservice()

EXTERN_C HRESULT add_active_textservice ( TF_LANGUAGEPROFILE lp)

Definition at line 369 of file msctf.cpp.

370{
371 ActivatedTextService *actsvr;
372 ITfCategoryMgr *catmgr;
375 ITfClientId *clientid;
376
377 if (!tm)
378 return E_UNEXPECTED;
379
381 if (!actsvr)
382 return E_OUTOFMEMORY;
383
384 tm->QueryInterface(IID_ITfClientId, (void **)&clientid);
385 clientid->GetClientId(lp->clsid, &actsvr->tid);
386 clientid->Release();
387
388 if (!actsvr->tid)
389 {
390 cicMemFree(actsvr);
391 return E_OUTOFMEMORY;
392 }
393
395 actsvr->LanguageProfile = *lp;
396 actsvr->pITfKeyEventSink = NULL;
397
398 /* get TIP category */
400 {
402
403 catmgr->FindClosestCategory(actsvr->LanguageProfile.clsid, &actsvr->LanguageProfile.catid, list, 3);
404 catmgr->Release();
405 }
406 else
407 {
408 ERR("CategoryMgr construction failed\n");
410 }
411
412 if (actsvr->LanguageProfile.catid != GUID_NULL)
414
415 if (activated > 0)
416 activate_given_ts(actsvr, tm);
417
418 entry = (AtsEntry *)cicMemAlloc(sizeof(AtsEntry));
419 if (!entry)
420 {
421 cicMemFree(actsvr);
422 return E_OUTOFMEMORY;
423 }
424
425 entry->ats = actsvr;
426 list_add_head(&AtsList, &entry->entry);
427
428 return S_OK;
429}
DWORD g_dwTLSIndex
Definition: utils.cpp:33
static void list_add_head(struct list_entry *head, struct list_entry *entry)
Definition: list.h:76
#define ERR(fmt,...)
Definition: precomp.h:57
EXTERN_C HRESULT CategoryMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
static LPVOID cicMemAlloc(SIZE_T size)
Definition: cicbase.h:10
static void cicMemFree(LPVOID ptr)
Definition: cicbase.h:20
Definition: list.h:37
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
LPVOID WINAPI TlsGetValue(IN DWORD Index)
Definition: thread.c:1240
HRESULT GetClientId([in] REFCLSID rclsid, [out] TfClientId *ptid)
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define GUID_NULL
Definition: ks.h:106
static void deactivate_remove_conflicting_ts(REFCLSID catid)
Definition: msctf.cpp:350
EXTERN_C const GUID GUID_TFCAT_TIP_KEYBOARD
Definition: msctf.idl:81
EXTERN_C const GUID GUID_TFCAT_TIP_SPEECH
Definition: msctf.idl:82
EXTERN_C const GUID GUID_TFCAT_TIP_HANDWRITING
Definition: msctf.idl:83
ITfKeyEventSink * pITfKeyEventSink
Definition: msctf.cpp:27
#define E_UNEXPECTED
Definition: winerror.h:3529

Referenced by CInputProcessorProfiles::ActivateLanguageProfile().

◆ advise_sink()

EXTERN_C HRESULT advise_sink ( struct list sink_list,
REFIID  riid,
DWORD  cookie_magic,
IUnknown unk,
DWORD cookie 
)

Definition at line 259 of file msctf.cpp.

260{
261 Sink *sink = (Sink *)cicMemAlloc(sizeof(*sink));
262 if (!sink)
263 return E_OUTOFMEMORY;
264
265 HRESULT hr = unk->QueryInterface(riid, (void **)&sink->interfaces.pIUnknown);
266 if (FAILED(hr))
267 {
270 }
271
272 list_add_head(sink_list, &sink->entry);
273 *cookie = generate_Cookie(cookie_magic, sink);
274 TRACE("cookie %x\n", *cookie);
275 return S_OK;
276}
GLsizei GLenum GLboolean sink
Definition: glext.h:5672
REFIID riid
Definition: atlbase.h:39
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
EXTERN_C DWORD generate_Cookie(DWORD magic, LPVOID data)
Definition: msctf.cpp:157
#define CONNECT_E_CANNOTCONNECT
Definition: olectl.h:253
#define TRACE(s)
Definition: solgame.cpp:4
Definition: precomp.h:83
Definition: cookie.c:34

Referenced by CCompartment::AdviseSink(), CContext::AdviseSink(), CInputProcessorProfiles::AdviseSink(), CThreadMgr::AdviseSink(), and CDocumentMgr::AdviseSink().

◆ ClassFactory_Constructor()

static HRESULT ClassFactory_Constructor ( LPFNCONSTRUCTOR  ctor,
LPVOID ppvOut 
)
static

Definition at line 145 of file msctf.cpp.

146{
148 *ppvOut = static_cast<IClassFactory *>(This);
149 TRACE("Created class factory %p\n", This);
150 return S_OK;
151}
#define cicNoThrow
Definition: cicbase.h:46
LPFNCONSTRUCTOR ctor
Definition: msctf.cpp:51

Referenced by DllGetClassObject().

◆ deactivate_given_ts()

static HRESULT deactivate_given_ts ( ActivatedTextService actsvr)
static

Definition at line 334 of file msctf.cpp.

335{
336 HRESULT hr = S_OK;
337
338 if (actsvr->pITfTextInputProcessor)
339 {
342 actsvr->pITfThreadMgrEx->Release();
344 actsvr->pITfThreadMgrEx = NULL;
345 }
346
347 return hr;
348}

Referenced by deactivate_remove_conflicting_ts(), and deactivate_textservices().

◆ deactivate_remove_conflicting_ts()

static void deactivate_remove_conflicting_ts ( REFCLSID  catid)
static

Definition at line 350 of file msctf.cpp.

351{
352 AtsEntry *ats, *cursor2;
353
355 {
356 if (catid == ats->ats->LanguageProfile.catid)
357 {
359 list_remove(&ats->entry);
360 cicMemFree(ats->ats);
361 cicMemFree(ats);
362 /* we are guaranteeing there is only 1 */
363 break;
364 }
365 }
366}
static void list_remove(struct list_entry *entry)
Definition: list.h:90
static HRESULT deactivate_given_ts(ActivatedTextService *actsvr)
Definition: msctf.cpp:334
GUID catid
Definition: msctf.idl:629
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
struct list entry
Definition: msctf.cpp:33

Referenced by add_active_textservice().

◆ deactivate_textservices()

EXTERN_C HRESULT deactivate_textservices ( void  )

Definition at line 468 of file msctf.cpp.

469{
470 AtsEntry *ats;
471
472 if (activated > 0)
473 activated --;
474
475 if (activated == 0)
476 {
479 }
480 return S_OK;
481}

Referenced by CThreadMgr::Deactivate().

◆ DllCanUnloadNow()

HRESULT WINAPI DllCanUnloadNow ( void  )

Definition at line 558 of file msctf.cpp.

559{
560 return S_FALSE;
561}
#define S_FALSE
Definition: winerror.h:3452

Referenced by COMPOBJ_DllList_Add().

◆ DllGetClassObject()

HRESULT WINAPI DllGetClassObject ( REFCLSID  clsid,
REFIID  iid,
LPVOID ppvOut 
)

Definition at line 566 of file msctf.cpp.

567{
568 int i;
569
570 *ppvOut = NULL;
571 if (iid != IID_IUnknown && iid != IID_IClassFactory)
572 return E_NOINTERFACE;
573
574 for (i = 0; ClassesTable[i].clsid; i++)
575 {
576 if (*ClassesTable[i].clsid == clsid)
578 }
579 FIXME("CLSID %s not supported\n", debugstr_guid(&clsid));
581}
const GUID IID_IUnknown
const GUID IID_IClassFactory
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define debugstr_guid
Definition: kernel32.h:35
const CLSID * clsid
Definition: msctf.cpp:50
static const struct @38 ClassesTable[]
static HRESULT ClassFactory_Constructor(LPFNCONSTRUCTOR ctor, LPVOID *ppvOut)
Definition: msctf.cpp:145
#define E_NOINTERFACE
Definition: winerror.h:3480
#define CLASS_E_CLASSNOTAVAILABLE
Definition: winerror.h:3773

Referenced by apartment_getclassobject(), COMPOBJ_DllList_Add(), and TestManualInstantiation().

◆ DllMain()

BOOL WINAPI DllMain ( HINSTANCE  hinst,
DWORD  fdwReason,
LPVOID  fImpLoad 
)

Definition at line 539 of file msctf.cpp.

540{
541 TRACE("%p 0x%x %p\n", hinst, fdwReason, fImpLoad);
542 switch (fdwReason)
543 {
546 return ProcessAttach(hinst);
547
550 break;
551 }
552 return TRUE;
553}
static DWORD const fdwReason
BOOL ProcessAttach(HINSTANCE hinstDLL)
@unimplemented
Definition: utils.cpp:766
VOID ProcessDetach(HINSTANCE hinstDLL)
@unimplemented
Definition: utils.cpp:840
DWORD LPVOID fImpLoad
Definition: misc.cpp:136
#define TRUE
Definition: types.h:120
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
#define DLL_PROCESS_DETACH
Definition: compat.h:130
static HINSTANCE hinst
Definition: edit.c:551
static HINSTANCE MSCTF_hinstance
Definition: msctf.cpp:14

◆ DllRegisterServer()

HRESULT WINAPI DllRegisterServer ( void  )

Definition at line 586 of file msctf.cpp.

587{
589}
HRESULT __wine_register_resources(HMODULE module)
Definition: register.c:98

◆ DllUnregisterServer()

HRESULT WINAPI DllUnregisterServer ( void  )

Definition at line 594 of file msctf.cpp.

595{
597}
HRESULT __wine_unregister_resources(HMODULE module)
Definition: register.c:110

◆ enumerate_Cookie()

EXTERN_C DWORD enumerate_Cookie ( DWORD  magic,
DWORD index 
)

Definition at line 246 of file msctf.cpp.

247{
248 unsigned int i;
249 for (i = *index; i < id_last; i++)
250 if (cookies[i].id != 0 && cookies[i].magic == magic)
251 {
252 *index = (i+1);
253 return cookies[i].id;
254 }
255 return 0x0;
256}
GLuint index
Definition: glext.h:6031
static UINT id_last
Definition: msctf.cpp:38
static CookieInternal * cookies
Definition: msctf.cpp:37
DWORD id
Definition: msctf.cpp:18

Referenced by CCategoryMgr::RegisterGUID().

◆ free_sink()

static void free_sink ( Sink sink)
static

Definition at line 278 of file msctf.cpp.

279{
280 list_remove(&sink->entry);
281 sink->interfaces.pIUnknown->Release();
283}

Referenced by free_sinks(), and unadvise_sink().

◆ free_sinks()

EXTERN_C void free_sinks ( struct list sink_list)

Definition at line 297 of file msctf.cpp.

298{
299 while(!list_empty(sink_list))
300 {
301 Sink* sink = LIST_ENTRY(sink_list->next, Sink, entry);
303 }
304}
static int list_empty(struct list_entry *head)
Definition: list.h:58
struct list * next
Definition: list.h:38
static void free_sink(Sink *sink)
Definition: msctf.cpp:278
#define LIST_ENTRY(type)
Definition: queue.h:175

Referenced by CCompartment::~CCompartment(), CContext::~CContext(), CDocumentMgr::~CDocumentMgr(), CInputProcessorProfiles::~CInputProcessorProfiles(), and CThreadMgr::~CThreadMgr().

◆ generate_Cookie()

EXTERN_C DWORD generate_Cookie ( DWORD  magic,
LPVOID  data 
)

Definition at line 157 of file msctf.cpp.

158{
159 UINT i;
160
161 /* try to reuse IDs if possible */
162 for (i = 0; i < id_last; i++)
163 if (cookies[i].id == 0) break;
164
165 if (i == array_size)
166 {
167 if (!array_size)
168 {
170 if (!cookies)
171 {
172 ERR("Out of memory, Unable to alloc cookies array\n");
173 return 0;
174 }
175 array_size = 10;
176 }
177 else
178 {
179 ERR("cookies: %p, array_size: %d\n", cookies, array_size);
180 CookieInternal *new_cookies = (CookieInternal *)
182 if (!new_cookies)
183 {
184 ERR("Out of memory, Unable to realloc cookies array\n");
185 return 0;
186 }
187 cookies = new_cookies;
188 array_size *= 2;
189 }
190 }
191
192 cookies[i].id = i + 1; /* a return of 0 is used for failure */
193 cookies[i].magic = magic;
194 cookies[i].data = data;
195
196 if (i == id_last)
197 id_last++;
198
199 return cookies[i].id;
200}
LPVOID cicMemReCalloc(LPVOID mem, SIZE_T num, SIZE_T size) noexcept
Definition: cicbase.cpp:41
static LPVOID cicMemAllocClear(SIZE_T size)
Definition: cicbase.h:15
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
static UINT array_size
Definition: msctf.cpp:39
unsigned int UINT
Definition: ndis.h:50
LPVOID data
Definition: msctf.cpp:20
DWORD magic
Definition: msctf.cpp:19

Referenced by advise_sink(), CContext::CreateInstance(), CContext::OnLockGranted(), and CCategoryMgr::RegisterGUID().

◆ get_active_textservice()

EXTERN_C BOOL get_active_textservice ( REFCLSID  rclsid,
TF_LANGUAGEPROFILE profile 
)

Definition at line 432 of file msctf.cpp.

433{
434 AtsEntry *ats;
435
437 {
438 if (rclsid == ats->ats->LanguageProfile.clsid)
439 {
440 if (profile)
441 *profile = ats->ats->LanguageProfile;
442 return TRUE;
443 }
444 }
445 return FALSE;
446}
#define FALSE
Definition: types.h:117
#define profile
Definition: kernel32.h:12

Referenced by CInputProcessorProfiles::ActivateLanguageProfile(), CInputProcessorProfiles::GetActiveLanguageProfile(), and CEnumTfLanguageProfiles::next_LanguageProfile().

◆ get_Cookie_data()

EXTERN_C LPVOID get_Cookie_data ( DWORD  id)

Definition at line 217 of file msctf.cpp.

218{
219 UINT index = id - 1;
220
221 if (index >= id_last)
222 return NULL;
223
224 if (cookies[index].id == 0)
225 return NULL;
226
227 return cookies[index].data;
228}
#define index(s, c)
Definition: various.h:29

Referenced by CCategoryMgr::GetGUID(), CContext::InsertTextAtSelection(), CCategoryMgr::IsEqualTfGuidAtom(), and CCategoryMgr::RegisterGUID().

◆ get_Cookie_magic()

◆ get_textservice_clsid()

EXTERN_C CLSID get_textservice_clsid ( TfClientId  tid)

Definition at line 484 of file msctf.cpp.

485{
486 AtsEntry *ats;
487
489 {
490 if (ats->ats->tid == tid)
491 return ats->ats->LanguageProfile.clsid;
492 }
493 return GUID_NULL;
494}
static TfClientId tid

Referenced by CThreadMgr::AdviseKeyEventSink(), and CThreadMgr::UnadviseKeyEventSink().

◆ get_textservice_sink()

EXTERN_C HRESULT get_textservice_sink ( TfClientId  tid,
REFCLSID  iid,
IUnknown **  sink 
)

Definition at line 497 of file msctf.cpp.

498{
499 AtsEntry *ats;
500
501 if (iid != IID_ITfKeyEventSink)
502 return E_NOINTERFACE;
503
505 {
506 if (ats->ats->tid == tid)
507 {
509 return S_OK;
510 }
511 }
512
513 return E_FAIL;
514}
#define E_FAIL
Definition: ddrawi.h:102

Referenced by CThreadMgr::AdviseKeyEventSink(), and CThreadMgr::UnadviseKeyEventSink().

◆ remove_Cookie()

EXTERN_C LPVOID remove_Cookie ( DWORD  id)

Definition at line 231 of file msctf.cpp.

232{
233 UINT index = id - 1;
234
235 if (index >= id_last)
236 return NULL;
237
238 if (cookies[index].id == 0)
239 return NULL;
240
241 cookies[index].id = 0;
242 return cookies[index].data;
243}

Referenced by CContext::OnLockGranted(), unadvise_sink(), and CContext::~CContext().

◆ set_textservice_sink()

EXTERN_C HRESULT set_textservice_sink ( TfClientId  tid,
REFCLSID  iid,
IUnknown sink 
)

Definition at line 517 of file msctf.cpp.

518{
519 AtsEntry *ats;
520
521 if (iid != IID_ITfKeyEventSink)
522 return E_NOINTERFACE;
523
525 {
526 if (ats->ats->tid == tid)
527 {
529 return S_OK;
530 }
531 }
532
533 return E_FAIL;
534}

Referenced by CThreadMgr::AdviseKeyEventSink(), and CThreadMgr::UnadviseKeyEventSink().

◆ SetInputScope()

HRESULT WINAPI SetInputScope ( HWND  hwnd,
InputScope  inputscope 
)

Definition at line 625 of file msctf.cpp.

626{
627 FIXME("STUB: %p %i\n", hwnd, inputscope);
628 return S_OK;
629}
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023

◆ SetInputScopes()

HRESULT WINAPI SetInputScopes ( HWND  hwnd,
const InputScope pInputScopes,
UINT  cInputScopes,
WCHAR **  ppszPhraseList,
UINT  cPhrases,
WCHAR pszRegExp,
WCHAR pszSRGS 
)

Definition at line 634 of file msctf.cpp.

637{
638 UINT i;
639 FIXME("STUB: %p ... %s %s\n", hwnd, debugstr_w(pszRegExp), debugstr_w(pszSRGS));
640 for (i = 0; i < cInputScopes; i++)
641 TRACE("\tScope[%u] = %i\n", i, pInputScopes[i]);
642 for (i = 0; i < cPhrases; i++)
643 TRACE("\tPhrase[%u] = %s\n", i, debugstr_w(ppszPhraseList[i]));
644
645 return S_OK;
646}
#define debugstr_w
Definition: kernel32.h:32

◆ STDMETHODIMP_()

STDMETHODIMP_ ( ULONG  )

Definition at line 110 of file msctf.cpp.

111{
112 return ::InterlockedIncrement(&m_cRefs);
113}

◆ TF_CreateInputProcessorProfiles()

HRESULT WINAPI TF_CreateInputProcessorProfiles ( ITfInputProcessorProfiles **  ppipr)

Definition at line 651 of file msctf.cpp.

653{
655}
EXTERN_C HRESULT InputProcessorProfiles_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)

Referenced by CheckCloseMenuAvailable(), and CicProfile::InitProfileInstance().

◆ TF_CreateLangBarItemMgr()

HRESULT WINAPI TF_CreateLangBarItemMgr ( ITfLangBarItemMgr **  pplbim)

Definition at line 678 of file msctf.cpp.

679{
680 FIXME("stub %p\n", pplbim);
681 *pplbim = NULL;
682
683 return E_NOTIMPL;
684}
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ TF_CreateLangBarMgr()

HRESULT WINAPI TF_CreateLangBarMgr ( ITfLangBarMgr **  pppbm)

Definition at line 669 of file msctf.cpp.

670{
671 TRACE("\n");
672 return LangBarMgr_Constructor(NULL, (IUnknown**)pppbm);
673}
EXTERN_C HRESULT LangBarMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
Definition: langbarmgr.cpp:248

Referenced by CTipbarWnd::CTipbarWnd(), DoCloseLangbar(), and Imm32TF_CreateLangBarMgr().

◆ TF_CreateThreadMgr()

HRESULT WINAPI TF_CreateThreadMgr ( ITfThreadMgr **  pptim)

Definition at line 602 of file msctf.cpp.

603{
604 TRACE("\n");
605 return ThreadMgr_Constructor(NULL, (IUnknown**)pptim);
606}
HRESULT ThreadMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
Definition: threadmgr.cpp:1388

Referenced by CicBridge::InitIMMX().

◆ TF_GetThreadMgr()

HRESULT WINAPI TF_GetThreadMgr ( ITfThreadMgr **  pptim)

Definition at line 611 of file msctf.cpp.

612{
613 TRACE("\n");
615
616 if (*pptim)
617 (*pptim)->AddRef();
618
619 return S_OK;
620}
nsrefcnt AddRef()

Referenced by CtfImeProcessCicHotkey(), and CDocumentMgr::~CDocumentMgr().

◆ TF_InvalidAssemblyListCacheIfExist()

HRESULT WINAPI TF_InvalidAssemblyListCacheIfExist ( void  )

Definition at line 660 of file msctf.cpp.

661{
662 FIXME("Stub\n");
663 return S_OK;
664}

Referenced by Imm32TF_InvalidAssemblyListCacheIfExist(), and CRegWatcher::UpdateSpTip().

◆ unadvise_sink()

EXTERN_C HRESULT unadvise_sink ( DWORD  cookie)

Definition at line 286 of file msctf.cpp.

287{
289 if (!sink)
291
293 return S_OK;
294}
EXTERN_C LPVOID remove_Cookie(DWORD id)
Definition: msctf.cpp:231
#define CONNECT_E_NOCONNECTION
Definition: olectl.h:251

Referenced by CCompartment::UnadviseSink(), CContext::UnadviseSink(), CInputProcessorProfiles::UnadviseSink(), CThreadMgr::UnadviseSink(), and CDocumentMgr::UnadviseSink().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( msctf  )

Variable Documentation

◆ activated

◆ array_size

◆ AtsList

◆ 

const struct { ... } ClassesTable[]
Initial value:
= {
}
EXTERN_C HRESULT DisplayAttributeMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
EXTERN_C const CLSID CLSID_TF_InputProcessorProfiles
Definition: msctf.idl:64
EXTERN_C const CLSID CLSID_TF_LangBarMgr
Definition: msctf.idl:65
EXTERN_C const CLSID CLSID_TF_ThreadMgr
Definition: msctf.idl:63
EXTERN_C const CLSID CLSID_TF_CategoryMgr
Definition: msctf.idl:66
EXTERN_C const CLSID CLSID_TF_DisplayAttributeMgr
Definition: msctf.idl:67

Referenced by DllGetClassObject().

◆ clsid

const CLSID* clsid

Definition at line 50 of file msctf.cpp.

Referenced by _create_object(), CFSFolder::_CreateExtensionUIObject(), CFSFolder::_GetDropTarget(), CFSFolder::_GetIconHandler(), _ILCreatePrinters(), CRegFolder::_IsInNameSpace(), actctx_get_miscstatus(), ACTION_PublishFeatures(), CInputProcessorProfiles::ActivateProfile(), add_icon_to_control(), add_progid_record(), AddClsidKeyToArray(), AddPropSheetHandlerPages(), AssocCreate(), AssocQ(), AtlComModuleRegisterServer(), ATL::AtlComModuleRegisterServer(), ATL::AtlComModuleUnregisterServer(), AtlGetObjectSourceInterface(), AtlModuleRegisterServer(), AtlModuleUnregisterServer(), ATL::AtlRegisterClassCategoriesHelper(), AtlRegisterClassCategoriesHelper(), AVIFILE_CreateClassFactory(), BindProtocol_StartEx(), BitmapDecoderInfo_Constructor(), BitmapEncoderInfo_Constructor(), CShellBrowser::BrowseToPIDL(), call_script(), ClassMoniker_CreateFromDisplayName(), ClassMoniker_IsEqual(), CLRCreateInstance(), clsid_from_string_reg(), CLSIDEnumGUID_Next(), CLSIDFromProgID(), CLSIDFromProgIDEx(), ATL::CComPtr< T >::CoCreateInstance(), CoCreateInstanceEx(), CoGetInstanceFromFile(), CoIsOle1Class(), COM_OpenKeyForAppIdFromCLSID(), COM_OpenKeyForCLSID(), create_activex_object(), create_automatic_entry(), IPCtrlWindow< BASE, SMARTPTR >::create_control(), create_engine(), create_instance(), create_mime_object(), create_object(), create_plugin_host(), create_proxy(), create_stub(), CreateComponentEnumerator(), CreateComponentInfo(), CreateFilterInstanceAndLoadFile(), SIfacePtr< T >::CreateInstance(), CreateRegItem(), CustomMarshal_GetUnmarshalClass(), d3drm1_CreateObject(), d3drm2_CreateObject(), d3drm3_CreateObject(), DataCache_Construct(), DataCache_GetClassID(), DataCache_InitNew(), DataCache_Load(), db_initialize(), DCIA_AddShellExSubkey(), DCMA_InsertMenuItems(), CInputProcessorProfiles::DeactivateProfile(), DECLARE_INTERFACE_(), DefaultHandler_Construct(), DefaultHandler_IPersistStorage_GetClassID(), DEVENUM_IEnumMoniker_Next(), DEVENUM_IMediaCatMoniker_IsEqual(), DllGetClassObject(), dochost_object_available(), DOMClassFactory_Create(), dump_template(), CDefaultContextMenu::EnumerateDynamicContextHandlerForKey(), FileMonikerImpl_IsEqual(), FilterGraph2_Connect(), FilterMapper_EnumMatchingFilters(), FilterMapper_RegisterFilter(), FilterMapper_RegisterFilterInstance(), FindExeCplClass(), FM2_WriteClsid(), format_clsid(), FormatConverterInfo_Constructor(), GdipSaveImageToStream(), get_component_info(), get_decoder_info(), get_default_source(), get_elem_clsid(), get_encoder_clsid(), get_engine_clsid(), get_facbuf_for_iid(), get_mime_clsid(), get_mime_filter(), get_moniker_comparison_data(), get_moniker_for_progid_display_name(), get_msxml_version(), get_protocol_cf(), get_protocol_handler(), get_storage(), CSearchBar::GetAddressEditBoxLocations(), CDefView::GetDefaultViewStream(), CRegFolder::GetDetailsOf(), CRegFolder::GetDisplayNameOf(), GetFileSourceFilter(), COpenControlPanel::GetPath(), CInputProcessorProfiles::GetProfile(), GetRegItemOrder(), CSearchBar::GetSearchResultsFolder(), CRegTreeOptions::GetSetState(), GetSplitter(), CQueryAssociations::GetString(), HasCLSIDShellFolderValue(), implicit_mta_proc(), init_session(), CCleanupHandler::Initialize(), CRShellClassFactory::Initialize(), InitIconOverlays(), InitPropVariantFromCLSID(), InitShellServices(), insert_static_object(), CSearchBar::Invoke(), CDefaultContextMenu::InvokeRegVerb(), IPropertyStorage_fnSetClass(), is_clsid_supported(), IsEqualPersistClassID(), CImageDx::IsExtensionSupported(), IsRegItem(), CDefaultContextMenu::IsShellExtensionAlreadyLoaded(), ItemMonikerImpl_IsEqual(), iterate_all_classes(), IUnknown_GetClassID(), CLangBarItemList::Load(), CDefaultContextMenu::LoadDynamicContextMenuHandler(), local_server_GetClassID(), MediaStreamFilterImpl_GetClassID(), MetadataReaderInfo_Constructor(), MetadataReaderInfo_GetCLSID(), MkProtocol_StartEx(), msi_create_component_advertise_string(), NdrDllRegisterProxy(), NdrDllUnregisterProxy(), CEnumTfLanguageProfiles::Next(), CEnumTfLanguageProfiles::next_LanguageProfile(), olecb_expect_QueryInsertObject(), OLECONVERT_GetOLE10ProgID(), OleCreateDefaultHandler(), OleCreateEmbeddingHelper(), OleCreateFromFile(), OleCreateFromFileEx(), OleCreateStaticFromData(), OleDoAutoConvert(), OleLoadFromStream(), OleRegEnumFormatEtc(), OleRegEnumVerbs(), OleRegGetMiscStatus(), OleRegGetUserType(), OleSaveToStream(), CActiveLanguageProfileNotifySink::OnActivated(), CTrayBandSite::OnLoad(), COpenControlPanel::Open(), parse_add_interface_class(), parse_classid(), CRegFolder::ParseDisplayName(), PixelFormatInfo_Constructor(), pointer_default(), process_data(), ProfileActivationSink_OnActivated(), ProgIDFromCLSID(), PropertyStorage_ReadHeaderFromStream(), ReadFmtUserTypeStg(), reg_context_menu_handler(), reg_icon_overlay(), reg_prop_sheet_handler(), register_clsid(), register_codec(), register_dsound_devices(), register_legacy_filters(), register_namespace(), register_progid(), register_ps_clsid_thread(), RegisterComponent(), reolecb_obj_QueryInsertObject(), RPC_StartLocalServer(), SSOThread::Run(), run_script(), RuntimeHost_GetInterface(), ATL::CImage::Save(), CImageDx::SaveDx(), CRegFolder::SetNameOf(), setup_edit_mode(), SetupRegisterClass(), SHCreatePropSheetExtArrayEx(), SHELL32_BindToSF(), SHELL32_CoCreateInitSF(), SHELL32_OpenPropSheet(), SHELL_GetRegCLSID(), SHELL_InitializeExtension(), SHELL_QueryCLSIDValue(), SHGetObjectCompatFlags(), CShellDispatch::ShowBrowserBar(), SHSimulateDropOnClsid(), SHSkipJunction(), START_TEST(), statusclb_OnProgress(), statusclb_OnStartBinding(), statusclb_OnStopBinding(), StgCreatePropStg(), Storage_SetClass(), STORAGE_WriteCompObj(), StorageBaseImpl_SetClass(), SxsLookupClrGuid(), test1_GetClassID(), test_CLSIDFromProgID(), test_CLSIDFromProgIDWrap(), test_CLSIDFromString(), test_CoGetInstanceFromFile(), test_CoGetPSClsid(), test_CoGetStandardMarshal(), test_com_aggregation(), test_CoRegisterPSClsid(), test_CreateBody(), test_CreateMetadataWriter(), test_data_cache(), test_data_cache_init(), test_data_cache_initnew(), test_data_cache_save_data(), test_decoder_info(), test_default_handler(), test_delegated_methods(), test_desktop_IPersist(), test_destroy_callback(), test_devenum(), test_early_abort(), test_find_com_redirection(), test_find_progid_redirection(), test_find_surrogate(), test_FolderShortcut(), test_freethreadedmarshaler(), test_iface_ptr(), test_InitPropVariantFromCLSID(), test_IUnknown_GetClassID(), test_IWinHttpRequest_Invoke(), test_legacy_filter_registration(), test_local_server(), test_marshal_channel_buffer(), test_media_streams(), test_metadata_APE(), test_metadata_GIF_comment(), test_object(), test_OleCreateStaticFromData(), test_OleDoAutoConvert(), test_pack_FILEDESCRIPTORA(), test_pack_FILEDESCRIPTORW(), test_pack_SHDESCRIPTIONID(), test_persist_GetClassId(), test_persiststream(), test_PropVariantCompareEx(), test_proxybuffer(), test_ReadClassStm(), test_reader_info(), test_SHGetObjectCompatFlags(), test_ShortcutFolder(), test_stub(), test_stubbuffer(), test_supported_encoders(), TestModuleRegistry(), testoleobj_IOleObject_GetUserClassID(), testpersist_GetClassID(), UIINSERTOBJECTDLG_OnOpen(), UIINSERTOBJECTDLG_PopulateObjectTypes(), unregister_clsid(), UnregisterComponent(), URLMoniker_IsEqual(), vmr_create(), WriteFmtUserTypeStg(), and wWinMain().

◆ cookies

◆ ctor

◆ g_globalCompartmentMgr

ITfCompartmentMgr* g_globalCompartmentMgr = NULL

Definition at line 45 of file msctf.cpp.

Referenced by CThreadMgr::GetGlobalCompartment().

◆ g_processId

TfClientId g_processId = 0

Definition at line 44 of file msctf.cpp.

Referenced by CThreadMgr::ActivateEx(), and CDocumentMgr::CDocumentMgr().

◆ id_last

UINT id_last
static

◆ MSCTF_hinstance

HINSTANCE MSCTF_hinstance
static

Definition at line 14 of file msctf.cpp.

Referenced by DllMain(), DllRegisterServer(), and DllUnregisterServer().