ReactOS  0.4.14-dev-593-g1793dcc
msctf.c
Go to the documentation of this file.
1 /*
2  * MSCTF Server DLL
3  *
4  * Copyright 2008 Aric Stewart, CodeWeavers
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19  */
20 
21 #include <stdarg.h>
22 #include <stdio.h>
23 
24 #define COBJMACROS
25 
26 #include "wine/debug.h"
27 #include "windef.h"
28 #include "winbase.h"
29 #include "winreg.h"
30 #include "shlwapi.h"
31 #include "shlguid.h"
32 #include "comcat.h"
33 #include "olectl.h"
34 #include "rpcproxy.h"
35 #include "msctf.h"
36 #include "inputscope.h"
37 
38 #include "msctf_internal.h"
39 
41 
43 
44 typedef struct
45 {
50 
51 typedef struct {
58 
59 typedef struct
60 {
61  struct list entry;
63 } AtsEntry;
64 
66 static UINT id_last;
68 
69 static struct list AtsList = LIST_INIT(AtsList);
70 static UINT activated = 0;
71 
75 
76 const WCHAR szwSystemTIPKey[] = {'S','O','F','T','W','A','R','E','\\','M','i','c','r','o','s','o','f','t','\\','C','T','F','\\','T','I','P',0};
77 const WCHAR szwSystemCTFKey[] = {'S','O','F','T','W','A','R','E','\\','M','i','c','r','o','s','o','f','t','\\','C','T','F',0};
78 
79 typedef HRESULT (*LPFNCONSTRUCTOR)(IUnknown *pUnkOuter, IUnknown **ppvOut);
80 
81 static const struct {
84 } ClassesTable[] = {
90  {NULL, NULL}
91 };
92 
93 typedef struct tagClassFactory
94 {
98 } ClassFactory;
99 
101 {
102  return CONTAINING_RECORD(iface, ClassFactory, IClassFactory_iface);
103 }
104 
106 {
107  TRACE("Destroying class factory %p\n", This);
109 }
110 
112 {
113  *ppvOut = NULL;
115  IClassFactory_AddRef(iface);
116  *ppvOut = iface;
117  return S_OK;
118  }
119 
120  WARN("Unknown interface %s\n", debugstr_guid(riid));
121  return E_NOINTERFACE;
122 }
123 
125 {
127  return InterlockedIncrement(&This->ref);
128 }
129 
131 {
134 
135  if (ret == 0)
137  return ret;
138 }
139 
141 {
143  HRESULT ret;
144  IUnknown *obj;
145 
146  TRACE("(%p, %p, %s, %p)\n", iface, punkOuter, debugstr_guid(iid), ppvOut);
147  ret = This->ctor(punkOuter, &obj);
148  if (FAILED(ret))
149  return ret;
150  ret = IUnknown_QueryInterface(obj, iid, ppvOut);
151  IUnknown_Release(obj);
152  return ret;
153 }
154 
156 {
158 
159  TRACE("(%p)->(%x)\n", This, fLock);
160 
161  return S_OK;
162 }
163 
164 static const IClassFactoryVtbl ClassFactoryVtbl = {
165  /* IUnknown */
169 
170  /* IClassFactory*/
173 };
174 
176 {
178  This->IClassFactory_iface.lpVtbl = &ClassFactoryVtbl;
179  This->ref = 1;
180  This->ctor = ctor;
181  *ppvOut = &This->IClassFactory_iface;
182  TRACE("Created class factory %p\n", This);
183  return S_OK;
184 }
185 
186 /*************************************************************************
187  * DWORD Cookie Management
188  */
190 {
191  UINT i;
192 
193  /* try to reuse IDs if possible */
194  for (i = 0; i < id_last; i++)
195  if (cookies[i].id == 0) break;
196 
197  if (i == array_size)
198  {
199  if (!array_size)
200  {
202  if (!cookies)
203  {
204  ERR("Out of memory, Unable to alloc cookies array\n");
205  return 0;
206  }
207  array_size = 10;
208  }
209  else
210  {
212  sizeof(CookieInternal) * (array_size * 2));
213  if (!new_cookies)
214  {
215  ERR("Out of memory, Unable to realloc cookies array\n");
216  return 0;
217  }
218  cookies = new_cookies;
219  array_size *= 2;
220  }
221  }
222 
223  cookies[i].id = i + 1; /* a return of 0 is used for failure */
224  cookies[i].magic = magic;
225  cookies[i].data = data;
226 
227  if (i == id_last)
228  id_last++;
229 
230  return cookies[i].id;
231 }
232 
234 {
235  UINT index = id - 1;
236 
237  if (index >= id_last)
238  return 0;
239 
240  if (cookies[index].id == 0)
241  return 0;
242 
243  return cookies[index].magic;
244 }
245 
247 {
248  UINT index = id - 1;
249 
250  if (index >= id_last)
251  return NULL;
252 
253  if (cookies[index].id == 0)
254  return NULL;
255 
256  return cookies[index].data;
257 }
258 
260 {
261  UINT index = id - 1;
262 
263  if (index >= id_last)
264  return NULL;
265 
266  if (cookies[index].id == 0)
267  return NULL;
268 
269  cookies[index].id = 0;
270  return cookies[index].data;
271 }
272 
274 {
275  unsigned int i;
276  for (i = *index; i < id_last; i++)
277  if (cookies[i].id != 0 && cookies[i].magic == magic)
278  {
279  *index = (i+1);
280  return cookies[i].id;
281  }
282  return 0x0;
283 }
284 
285 HRESULT advise_sink(struct list *sink_list, REFIID riid, DWORD cookie_magic, IUnknown *unk, DWORD *cookie)
286 {
287  Sink *sink;
288 
289  sink = HeapAlloc(GetProcessHeap(), 0, sizeof(*sink));
290  if (!sink)
291  return E_OUTOFMEMORY;
292 
293  if (FAILED(IUnknown_QueryInterface(unk, riid, (void**)&sink->interfaces.pIUnknown)))
294  {
297  }
298 
299  list_add_head(sink_list, &sink->entry);
300  *cookie = generate_Cookie(cookie_magic, sink);
301  TRACE("cookie %x\n", *cookie);
302  return S_OK;
303 }
304 
305 static void free_sink(Sink *sink)
306 {
307  list_remove(&sink->entry);
308  IUnknown_Release(sink->interfaces.pIUnknown);
310 }
311 
313 {
314  Sink *sink;
315 
317  if (!sink)
318  return CONNECT_E_NOCONNECTION;
319 
320  free_sink(sink);
321  return S_OK;
322 }
323 
324 void free_sinks(struct list *sink_list)
325 {
326  while(!list_empty(sink_list))
327  {
328  Sink* sink = LIST_ENTRY(sink_list->next, Sink, entry);
329  free_sink(sink);
330  }
331 }
332 
333 /*****************************************************************************
334  * Active Text Service Management
335  *****************************************************************************/
337 {
338  HRESULT hr;
339 
340  /* Already Active? */
341  if (actsvr->pITfTextInputProcessor)
342  return S_OK;
343 
344  hr = CoCreateInstance (&actsvr->LanguageProfile.clsid, NULL, CLSCTX_INPROC_SERVER,
345  &IID_ITfTextInputProcessor, (void**)&actsvr->pITfTextInputProcessor);
346  if (FAILED(hr)) return hr;
347 
348  hr = ITfTextInputProcessor_Activate(actsvr->pITfTextInputProcessor, (ITfThreadMgr *)tm, actsvr->tid);
349  if (FAILED(hr))
350  {
351  ITfTextInputProcessor_Release(actsvr->pITfTextInputProcessor);
352  actsvr->pITfTextInputProcessor = NULL;
353  return hr;
354  }
355 
356  actsvr->pITfThreadMgrEx = tm;
357  ITfThreadMgrEx_AddRef(tm);
358  return hr;
359 }
360 
362 {
363  HRESULT hr = S_OK;
364 
365  if (actsvr->pITfTextInputProcessor)
366  {
367  hr = ITfTextInputProcessor_Deactivate(actsvr->pITfTextInputProcessor);
368  ITfTextInputProcessor_Release(actsvr->pITfTextInputProcessor);
369  ITfThreadMgrEx_Release(actsvr->pITfThreadMgrEx);
370  actsvr->pITfTextInputProcessor = NULL;
371  actsvr->pITfThreadMgrEx = NULL;
372  }
373 
374  return hr;
375 }
376 
378 {
379  AtsEntry *ats, *cursor2;
380 
382  {
384  {
385  deactivate_given_ts(ats->ats);
386  list_remove(&ats->entry);
387  HeapFree(GetProcessHeap(),0,ats->ats);
388  HeapFree(GetProcessHeap(),0,ats);
389  /* we are guaranteeing there is only 1 */
390  break;
391  }
392  }
393 }
394 
396 {
397  ActivatedTextService *actsvr;
398  ITfCategoryMgr *catmgr;
399  AtsEntry *entry;
401  ITfClientId *clientid;
402 
403  if (!tm) return E_UNEXPECTED;
404 
405  actsvr = HeapAlloc(GetProcessHeap(),0,sizeof(ActivatedTextService));
406  if (!actsvr) return E_OUTOFMEMORY;
407 
408  ITfThreadMgrEx_QueryInterface(tm, &IID_ITfClientId, (void **)&clientid);
409  ITfClientId_GetClientId(clientid, &lp->clsid, &actsvr->tid);
410  ITfClientId_Release(clientid);
411 
412  if (!actsvr->tid)
413  {
414  HeapFree(GetProcessHeap(),0,actsvr);
415  return E_OUTOFMEMORY;
416  }
417 
418  actsvr->pITfTextInputProcessor = NULL;
419  actsvr->LanguageProfile = *lp;
420  actsvr->pITfKeyEventSink = NULL;
421 
422  /* get TIP category */
424  {
426 
427  ITfCategoryMgr_FindClosestCategory(catmgr,
428  &actsvr->LanguageProfile.clsid, &actsvr->LanguageProfile.catid,
429  list, 3);
430 
431  ITfCategoryMgr_Release(catmgr);
432  }
433  else
434  {
435  ERR("CategoryMgr construction failed\n");
436  actsvr->LanguageProfile.catid = GUID_NULL;
437  }
438 
439  if (!IsEqualGUID(&actsvr->LanguageProfile.catid,&GUID_NULL))
441 
442  if (activated > 0)
443  activate_given_ts(actsvr, tm);
444 
445  entry = HeapAlloc(GetProcessHeap(),0,sizeof(AtsEntry));
446 
447  if (!entry)
448  {
449  HeapFree(GetProcessHeap(),0,actsvr);
450  return E_OUTOFMEMORY;
451  }
452 
453  entry->ats = actsvr;
454  list_add_head(&AtsList, &entry->entry);
455 
456  return S_OK;
457 }
458 
460 {
461  AtsEntry *ats;
462 
464  {
465  if (IsEqualCLSID(rclsid,&ats->ats->LanguageProfile.clsid))
466  {
467  if (profile)
468  *profile = ats->ats->LanguageProfile;
469  return TRUE;
470  }
471  }
472  return FALSE;
473 }
474 
476 {
477  HRESULT hr = S_OK;
478  AtsEntry *ats;
479 
480  activated ++;
481  if (activated > 1)
482  return S_OK;
483 
485  {
486  hr = activate_given_ts(ats->ats, tm);
487  if (FAILED(hr))
488  FIXME("Failed to activate text service\n");
489  }
490  return hr;
491 }
492 
494 {
495  AtsEntry *ats;
496 
497  if (activated > 0)
498  activated --;
499 
500  if (activated == 0)
502  deactivate_given_ts(ats->ats);
503 
504  return S_OK;
505 }
506 
508 {
509  AtsEntry *ats;
510 
512  if (ats->ats->tid == tid)
513  return ats->ats->LanguageProfile.clsid;
514  return GUID_NULL;
515 }
516 
518 {
519  AtsEntry *ats;
520 
521  if (!IsEqualCLSID(iid,&IID_ITfKeyEventSink))
522  return E_NOINTERFACE;
523 
525  if (ats->ats->tid == tid)
526  {
527  *sink = (IUnknown*)ats->ats->pITfKeyEventSink;
528  return S_OK;
529  }
530 
531  return E_FAIL;
532 }
533 
535 {
536  AtsEntry *ats;
537 
538  if (!IsEqualCLSID(iid,&IID_ITfKeyEventSink))
539  return E_NOINTERFACE;
540 
542  if (ats->ats->tid == tid)
543  {
545  return S_OK;
546  }
547 
548  return E_FAIL;
549 }
550 
551 /*************************************************************************
552  * MSCTF DllMain
553  */
555 {
556  TRACE("%p 0x%x %p\n", hinst, fdwReason, fImpLoad);
557  switch (fdwReason)
558  {
559  case DLL_WINE_PREATTACH:
560  return FALSE; /* prefer native version */
561  case DLL_PROCESS_ATTACH:
563  tlsIndex = TlsAlloc();
564  break;
565  case DLL_PROCESS_DETACH:
566  if (fImpLoad) break;
567  TlsFree(tlsIndex);
568  break;
569  }
570  return TRUE;
571 }
572 
573 /*************************************************************************
574  * DllCanUnloadNow (MSCTF.@)
575  */
577 {
578  return S_FALSE;
579 }
580 
581 /***********************************************************************
582  * DllGetClassObject (MSCTF.@)
583  */
585 {
586  int i;
587 
588  *ppvOut = NULL;
589  if (!IsEqualIID(iid, &IID_IUnknown) && !IsEqualIID(iid, &IID_IClassFactory))
590  return E_NOINTERFACE;
591 
592  for (i = 0; ClassesTable[i].clsid != NULL; i++)
594  return ClassFactory_Constructor(ClassesTable[i].ctor, ppvOut);
595  }
596  FIXME("CLSID %s not supported\n", debugstr_guid(clsid));
598 }
599 
600 /***********************************************************************
601  * DllRegisterServer (MSCTF.@)
602  */
604 {
606 }
607 
608 /***********************************************************************
609  * DllUnregisterServer (MSCTF.@)
610  */
612 {
614 }
615 
616 /***********************************************************************
617  * TF_CreateThreadMgr (MSCTF.@)
618  */
620 {
621  TRACE("\n");
622  return ThreadMgr_Constructor(NULL,(IUnknown**)pptim);
623 }
624 
625 /***********************************************************************
626  * TF_GetThreadMgr (MSCTF.@)
627  */
629 {
630  TRACE("\n");
631  *pptim = TlsGetValue(tlsIndex);
632 
633  if (*pptim)
634  ITfThreadMgr_AddRef(*pptim);
635 
636  return S_OK;
637 }
638 
639 /***********************************************************************
640  * SetInputScope(MSCTF.@)
641  */
643 {
644  FIXME("STUB: %p %i\n",hwnd,inputscope);
645  return S_OK;
646 }
647 
648 /***********************************************************************
649  * SetInputScopes(MSCTF.@)
650  */
652  UINT cInputScopes, WCHAR **ppszPhraseList,
653  UINT cPhrases, WCHAR *pszRegExp, WCHAR *pszSRGS)
654 {
655  UINT i;
656  FIXME("STUB: %p ... %s %s\n",hwnd, debugstr_w(pszRegExp), debugstr_w(pszSRGS));
657  for (i = 0; i < cInputScopes; i++)
658  TRACE("\tScope[%u] = %i\n",i,pInputScopes[i]);
659  for (i = 0; i < cPhrases; i++)
660  TRACE("\tPhrase[%u] = %s\n",i,debugstr_w(ppszPhraseList[i]));
661 
662  return S_OK;
663 }
664 
665 /***********************************************************************
666  * TF_CreateInputProcessorProfiles(MSCTF.@)
667  */
669  ITfInputProcessorProfiles **ppipr)
670 {
672 }
673 
674 /***********************************************************************
675  * TF_InvalidAssemblyListCacheIfExist(MSCTF.@)
676  */
678 {
679  FIXME("Stub\n");
680  return S_OK;
681 }
682 
683 /***********************************************************************
684  * TF_CreateLangBarMgr (MSCTF.@)
685  */
687 {
688  TRACE("\n");
689  return LangBarMgr_Constructor(NULL,(IUnknown**)pppbm);
690 }
691 
693 {
694  FIXME("stub %p\n", pplbim);
695  *pplbim = NULL;
696 
697  return E_NOTIMPL;
698 }
699 
700 /***********************************************************************
701  * TF_InitMlngInfo (MSCTF.@)
702  */
704 {
705  FIXME("stub\n");
706  return S_OK;
707 }
static UINT activated
Definition: msctf.c:70
static HINSTANCE MSCTF_hinstance
Definition: msctf.c:42
HRESULT WINAPI TF_CreateInputProcessorProfiles(ITfInputProcessorProfiles **ppipr)
Definition: msctf.c:668
const WCHAR szwSystemTIPKey[]
Definition: msctf.c:76
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define HRESULT
Definition: msvc.h:7
HRESULT WINAPI TF_CreateLangBarItemMgr(ITfLangBarItemMgr **pplbim)
Definition: msctf.c:692
HRESULT add_active_textservice(TF_LANGUAGEPROFILE *lp)
Definition: msctf.c:395
LPVOID get_Cookie_data(DWORD id)
Definition: msctf.c:246
HRESULT DisplayAttributeMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
#define REFIID
Definition: guiddef.h:118
#define TRUE
Definition: types.h:120
DWORD enumerate_Cookie(DWORD magic, DWORD *index)
Definition: msctf.c:273
#define E_NOINTERFACE
Definition: winerror.h:2364
const WCHAR szwSystemCTFKey[]
Definition: msctf.c:77
HRESULT LangBarMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
Definition: langbarmgr.c:182
static void ClassFactory_Destructor(ClassFactory *This)
Definition: msctf.c:105
HRESULT hr
Definition: shlfolder.c:183
HRESULT __wine_register_resources(HMODULE module) DECLSPEC_HIDDEN
Definition: register.c:98
static void deactivate_remove_conflicting_ts(REFCLSID catid)
Definition: msctf.c:377
HRESULT WINAPI TF_GetThreadMgr(ITfThreadMgr **pptim)
Definition: msctf.c:628
LPVOID data
Definition: msctf.c:48
HRESULT WINAPI TF_InvalidAssemblyListCacheIfExist(void)
Definition: msctf.c:677
#define CONNECT_E_CANNOTCONNECT
Definition: olectl.h:253
TfClientId processId
Definition: msctf.c:73
REFIID riid
Definition: precomp.h:44
EXTERN_C const GUID GUID_TFCAT_TIP_SPEECH
Definition: msctf.idl:63
HRESULT activate_textservices(ITfThreadMgrEx *tm)
Definition: msctf.c:475
#define REFCLSID
Definition: guiddef.h:117
LPFNCONSTRUCTOR ctor
Definition: msctf.c:97
BOOL WINAPI DllMain(HINSTANCE hinst, DWORD fdwReason, LPVOID fImpLoad)
Definition: msctf.c:554
void free_sinks(struct list *sink_list)
Definition: msctf.c:324
static ClassFactory * impl_from_IClassFactory(IClassFactory *iface)
Definition: msctf.c:100
#define WARN(fmt,...)
Definition: debug.h:111
#define CONNECT_E_NOCONNECTION
Definition: olectl.h:251
__WINE_SERVER_LIST_INLINE void list_add_head(struct list *list, struct list *elem)
Definition: list.h:96
static UINT id_last
Definition: msctf.c:66
HRESULT advise_sink(struct list *sink_list, REFIID riid, DWORD cookie_magic, IUnknown *unk, DWORD *cookie)
Definition: msctf.c:285
static HRESULT deactivate_given_ts(ActivatedTextService *actsvr)
Definition: msctf.c:361
u32_t magic(void)
#define DLL_PROCESS_ATTACH
Definition: compat.h:120
DWORD get_Cookie_magic(DWORD id)
Definition: msctf.c:233
LPFNCONSTRUCTOR ctor
Definition: msctf.c:83
#define E_FAIL
Definition: ddrawi.h:102
#define CLASS_E_CLASSNOTAVAILABLE
Definition: winerror.h:2663
HRESULT deactivate_textservices(void)
Definition: msctf.c:493
GLsizei GLenum GLboolean sink
Definition: glext.h:5672
static UINT array_size
Definition: msctf.c:67
static HRESULT ClassFactory_Constructor(LPFNCONSTRUCTOR ctor, LPVOID *ppvOut)
Definition: msctf.c:175
DWORD tlsIndex
Definition: msctf.c:72
GLsizei GLsizei GLuint * obj
Definition: glext.h:6042
HRESULT WINAPI SetInputScope(HWND hwnd, InputScope inputscope)
Definition: msctf.c:642
HRESULT WINAPI DllCanUnloadNow(void)
Definition: msctf.c:576
CLSID get_textservice_clsid(TfClientId tid)
Definition: msctf.c:507
DWORD magic
Definition: msctf.c:47
EXTERN_C const CLSID CLSID_TF_CategoryMgr
Definition: msctf.idl:47
ITfCompartmentMgr * globalCompartmentMgr
Definition: msctf.c:74
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
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 E_OUTOFMEMORY
Definition: ddrawi.h:100
LPVOID remove_Cookie(DWORD id)
Definition: msctf.c:259
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
HRESULT get_textservice_sink(TfClientId tid, REFCLSID iid, IUnknown **sink)
Definition: msctf.c:517
ITfThreadMgrEx * pITfThreadMgrEx
Definition: msctf.c:54
#define debugstr_w
Definition: kernel32.h:32
static HRESULT activate_given_ts(ActivatedTextService *actsvr, ITfThreadMgrEx *tm)
Definition: msctf.c:336
#define FIXME(fmt,...)
Definition: debug.h:110
EXTERN_C const GUID GUID_TFCAT_TIP_HANDWRITING
Definition: msctf.idl:64
HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, LPVOID *ppvOut)
Definition: msctf.c:584
#define S_FALSE
Definition: winerror.h:2357
smooth NULL
Definition: ftsmooth.c:416
static struct list AtsList
Definition: msctf.c:69
struct list entry
Definition: msctf.c:61
GUID catid
Definition: msctf.idl:608
HRESULT WINAPI TF_CreateLangBarMgr(ITfLangBarMgr **pppbm)
Definition: msctf.c:686
GLuint index
Definition: glext.h:6031
static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
Definition: msctf.c:124
#define debugstr_guid
Definition: kernel32.h:35
static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL fLock)
Definition: msctf.c:155
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
EXTERN_C const CLSID CLSID_TF_InputProcessorProfiles
Definition: msctf.idl:45
#define DLL_PROCESS_DETACH
Definition: compat.h:119
HRESULT WINAPI SetInputScopes(HWND hwnd, const InputScope *pInputScopes, UINT cInputScopes, WCHAR **ppszPhraseList, UINT cPhrases, WCHAR *pszRegExp, WCHAR *pszSRGS)
Definition: msctf.c:651
LONG ref
Definition: msctf.c:96
ActivatedTextService * ats
Definition: msctf.c:62
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
HRESULT CategoryMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
Definition: categorymgr.c:413
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
BOOL WINAPI TlsFree(IN DWORD Index)
Definition: thread.c:1154
#define LIST_INIT(head)
Definition: queue.h:197
__wchar_t WCHAR
Definition: xmlstorage.h:180
TfClientId tid
Definition: msctf.c:56
LONG HRESULT
Definition: typedefs.h:77
IClassFactory IClassFactory_iface
Definition: msctf.c:95
const GUID IID_IUnknown
#define WINAPI
Definition: msvc.h:6
EXTERN_C const CLSID CLSID_TF_ThreadMgr
Definition: msctf.idl:44
struct list * next
Definition: list.h:38
ITfKeyEventSink * pITfKeyEventSink
Definition: msctf.c:55
static void free_sink(Sink *sink)
Definition: msctf.c:305
unsigned long DWORD
Definition: ntddk_ex.h:95
HRESULT WINAPI TF_CreateThreadMgr(ITfThreadMgr **pptim)
Definition: msctf.c:619
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, LPVOID *ppvOut)
Definition: msctf.c:111
static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
Definition: msctf.c:130
EXTERN_C const CLSID CLSID_TF_DisplayAttributeMgr
Definition: msctf.idl:48
int ret
REFCLSID clsid
Definition: msctf.c:82
static CookieInternal * cookies
Definition: msctf.c:65
#define index(s, c)
Definition: various.h:29
#define InterlockedDecrement
Definition: armddk.h:52
HRESULT __wine_unregister_resources(HMODULE module) DECLSPEC_HIDDEN
Definition: register.c:110
uint32_t entry
Definition: isohybrid.c:63
#define GUID_NULL
Definition: ks.h:106
HRESULT WINAPI DllRegisterServer(void)
Definition: msctf.c:603
Definition: _list.h:228
DWORD WINAPI TlsAlloc(VOID)
Definition: thread.c:1088
Definition: time.h:76
HRESULT WINAPI DllUnregisterServer(void)
Definition: msctf.c:611
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
#define ERR(fmt,...)
Definition: debug.h:109
Definition: msctf.c:59
__WINE_SERVER_LIST_INLINE int list_empty(const struct list *list)
Definition: list.h:143
#define S_OK
Definition: intsafe.h:59
HRESULT set_textservice_sink(TfClientId tid, REFCLSID iid, IUnknown *sink)
Definition: msctf.c:534
ITfTextInputProcessor * pITfTextInputProcessor
Definition: msctf.c:53
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
#define InterlockedIncrement
Definition: armddk.h:53
DWORD LPVOID fImpLoad
Definition: misc.cpp:155
HRESULT InputProcessorProfiles_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
WINE_DEFAULT_DEBUG_CHANNEL(msctf)
#define HeapReAlloc
Definition: compat.h:401
#define E_NOTIMPL
Definition: ddrawi.h:99
Definition: cookie.c:33
BOOL get_active_textservice(REFCLSID rclsid, TF_LANGUAGEPROFILE *profile)
Definition: msctf.c:459
EXTERN_C const GUID GUID_TFCAT_TIP_KEYBOARD
Definition: msctf.idl:62
HRESULT ThreadMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut) DECLSPEC_HIDDEN
Definition: threadmgr.c:1342
unsigned int UINT
Definition: ndis.h:50
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
HRESULT WINAPI TF_InitMlngInfo(void)
Definition: msctf.c:703
#define E_UNEXPECTED
Definition: winerror.h:2456
HRESULT(* LPFNCONSTRUCTOR)(IUnknown *pUnkOuter, IUnknown **ppvOut)
Definition: msctf.c:79
LPVOID WINAPI TlsGetValue(IN DWORD Index)
Definition: thread.c:1228
HRESULT unadvise_sink(DWORD cookie)
Definition: msctf.c:312
struct tagClassFactory ClassFactory
static const IClassFactoryVtbl ClassFactoryVtbl
Definition: msctf.c:164
unsigned int ULONG
Definition: retypes.h:1
static HINSTANCE hinst
Definition: edit.c:551
#define profile
Definition: kernel32.h:12
DWORD TfClientId
Definition: msctf.idl:68
EXTERN_C const CLSID CLSID_TF_LangBarMgr
Definition: msctf.idl:46
#define LIST_ENTRY(type)
Definition: queue.h:175
const GUID IID_IClassFactory
TF_LANGUAGEPROFILE LanguageProfile
Definition: msctf.c:52
#define IsEqualCLSID(rclsid1, rclsid2)
Definition: guiddef.h:96
static TfClientId tid
#define HeapFree(x, y, z)
Definition: compat.h:402
static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface, IUnknown *punkOuter, REFIID iid, LPVOID *ppvOut)
Definition: msctf.c:140
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define SUCCEEDED(hr)
Definition: intsafe.h:57
DWORD generate_Cookie(DWORD magic, LPVOID data)
Definition: msctf.c:189
static const struct @468 ClassesTable[]
InputScope
Definition: inputscope.idl:10
DWORD id
Definition: msctf.c:46