ReactOS  0.4.14-dev-57-g333b8f1
msctf.c File Reference
#include "config.h"
#include <stdarg.h>
#include <stdio.h>
#include "wine/debug.h"
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
#include "shlwapi.h"
#include "shlguid.h"
#include "comcat.h"
#include "olectl.h"
#include "rpcproxy.h"
#include "msctf.h"
#include "inputscope.h"
#include "msctf_internal.h"
Include dependency graph for msctf.c:

Go to the source code of this file.

Classes

struct  CookieInternal
 
struct  ActivatedTextService
 
struct  AtsEntry
 
struct  tagClassFactory
 

Macros

#define COBJMACROS
 

Typedefs

typedef HRESULT(* LPFNCONSTRUCTOR) (IUnknown *pUnkOuter, IUnknown **ppvOut)
 
typedef struct tagClassFactory ClassFactory
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (msctf)
 
static ClassFactoryimpl_from_IClassFactory (IClassFactory *iface)
 
static void ClassFactory_Destructor (ClassFactory *This)
 
static HRESULT WINAPI ClassFactory_QueryInterface (IClassFactory *iface, REFIID riid, LPVOID *ppvOut)
 
static ULONG WINAPI ClassFactory_AddRef (IClassFactory *iface)
 
static ULONG WINAPI ClassFactory_Release (IClassFactory *iface)
 
static HRESULT WINAPI ClassFactory_CreateInstance (IClassFactory *iface, IUnknown *punkOuter, REFIID iid, LPVOID *ppvOut)
 
static HRESULT WINAPI ClassFactory_LockServer (IClassFactory *iface, BOOL fLock)
 
static HRESULT ClassFactory_Constructor (LPFNCONSTRUCTOR ctor, LPVOID *ppvOut)
 
DWORD generate_Cookie (DWORD magic, LPVOID data)
 
DWORD get_Cookie_magic (DWORD id)
 
LPVOID get_Cookie_data (DWORD id)
 
LPVOID remove_Cookie (DWORD id)
 
DWORD enumerate_Cookie (DWORD magic, DWORD *index)
 
HRESULT advise_sink (struct list *sink_list, REFIID riid, DWORD cookie_magic, IUnknown *unk, DWORD *cookie)
 
static void free_sink (Sink *sink)
 
HRESULT unadvise_sink (DWORD cookie)
 
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)
 
HRESULT add_active_textservice (TF_LANGUAGEPROFILE *lp)
 
BOOL get_active_textservice (REFCLSID rclsid, TF_LANGUAGEPROFILE *profile)
 
HRESULT activate_textservices (ITfThreadMgrEx *tm)
 
HRESULT deactivate_textservices (void)
 
CLSID get_textservice_clsid (TfClientId tid)
 
HRESULT get_textservice_sink (TfClientId tid, REFCLSID iid, IUnknown **sink)
 
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)
 
HRESULT WINAPI TF_InitMlngInfo (void)
 

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
 
DWORD tlsIndex = 0
 
TfClientId processId = 0
 
ITfCompartmentMgrglobalCompartmentMgr = NULL
 
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}
 
const WCHAR szwSystemCTFKey [] = {'S','O','F','T','W','A','R','E','\\','M','i','c','r','o','s','o','f','t','\\','C','T','F',0}
 
struct {
   REFCLSID   clsid
 
   LPFNCONSTRUCTOR   ctor
 
ClassesTable []
 
static const IClassFactoryVtbl ClassFactoryVtbl
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 26 of file msctf.c.

Typedef Documentation

◆ ClassFactory

◆ LPFNCONSTRUCTOR

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

Definition at line 81 of file msctf.c.

Function Documentation

◆ activate_given_ts()

static HRESULT activate_given_ts ( ActivatedTextService actsvr,
ITfThreadMgrEx tm 
)
static

Definition at line 338 of file msctf.c.

339 {
340  HRESULT hr;
341 
342  /* Already Active? */
343  if (actsvr->pITfTextInputProcessor)
344  return S_OK;
345 
346  hr = CoCreateInstance (&actsvr->LanguageProfile.clsid, NULL, CLSCTX_INPROC_SERVER,
347  &IID_ITfTextInputProcessor, (void**)&actsvr->pITfTextInputProcessor);
348  if (FAILED(hr)) return hr;
349 
350  hr = ITfTextInputProcessor_Activate(actsvr->pITfTextInputProcessor, (ITfThreadMgr *)tm, actsvr->tid);
351  if (FAILED(hr))
352  {
353  ITfTextInputProcessor_Release(actsvr->pITfTextInputProcessor);
354  actsvr->pITfTextInputProcessor = NULL;
355  return hr;
356  }
357 
358  actsvr->pITfThreadMgrEx = tm;
359  ITfThreadMgrEx_AddRef(tm);
360  return hr;
361 }
HRESULT hr
Definition: shlfolder.c:183
ITfThreadMgrEx * pITfThreadMgrEx
Definition: msctf.c:56
smooth NULL
Definition: ftsmooth.c:416
TfClientId tid
Definition: msctf.c:58
LONG HRESULT
Definition: typedefs.h:77
Definition: time.h:76
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3234
#define S_OK
Definition: intsafe.h:59
ITfTextInputProcessor * pITfTextInputProcessor
Definition: msctf.c:55
TF_LANGUAGEPROFILE LanguageProfile
Definition: msctf.c:54

Referenced by activate_textservices(), and add_active_textservice().

◆ activate_textservices()

HRESULT activate_textservices ( ITfThreadMgrEx tm)

Definition at line 477 of file msctf.c.

478 {
479  HRESULT hr = S_OK;
480  AtsEntry *ats;
481 
482  activated ++;
483  if (activated > 1)
484  return S_OK;
485 
487  {
488  hr = activate_given_ts(ats->ats, tm);
489  if (FAILED(hr))
490  FIXME("Failed to activate text service\n");
491  }
492  return hr;
493 }
static UINT activated
Definition: msctf.c:72
HRESULT hr
Definition: shlfolder.c:183
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
static HRESULT activate_given_ts(ActivatedTextService *actsvr, ITfThreadMgrEx *tm)
Definition: msctf.c:338
#define FIXME(fmt,...)
Definition: debug.h:110
static struct list AtsList
Definition: msctf.c:71
ActivatedTextService * ats
Definition: msctf.c:64
LONG HRESULT
Definition: typedefs.h:77
uint32_t entry
Definition: isohybrid.c:63
Definition: time.h:76
Definition: msctf.c:61
#define S_OK
Definition: intsafe.h:59

Referenced by ThreadMgr_ActivateEx().

◆ add_active_textservice()

HRESULT add_active_textservice ( TF_LANGUAGEPROFILE lp)

Definition at line 397 of file msctf.c.

398 {
399  ActivatedTextService *actsvr;
400  ITfCategoryMgr *catmgr;
401  AtsEntry *entry;
403  ITfClientId *clientid;
404 
405  if (!tm) return E_UNEXPECTED;
406 
407  actsvr = HeapAlloc(GetProcessHeap(),0,sizeof(ActivatedTextService));
408  if (!actsvr) return E_OUTOFMEMORY;
409 
410  ITfThreadMgrEx_QueryInterface(tm, &IID_ITfClientId, (void **)&clientid);
411  ITfClientId_GetClientId(clientid, &lp->clsid, &actsvr->tid);
412  ITfClientId_Release(clientid);
413 
414  if (!actsvr->tid)
415  {
416  HeapFree(GetProcessHeap(),0,actsvr);
417  return E_OUTOFMEMORY;
418  }
419 
420  actsvr->pITfTextInputProcessor = NULL;
421  actsvr->LanguageProfile = *lp;
422  actsvr->pITfKeyEventSink = NULL;
423 
424  /* get TIP category */
426  {
428 
429  ITfCategoryMgr_FindClosestCategory(catmgr,
430  &actsvr->LanguageProfile.clsid, &actsvr->LanguageProfile.catid,
431  list, 3);
432 
433  ITfCategoryMgr_Release(catmgr);
434  }
435  else
436  {
437  ERR("CategoryMgr construction failed\n");
438  actsvr->LanguageProfile.catid = GUID_NULL;
439  }
440 
441  if (!IsEqualGUID(&actsvr->LanguageProfile.catid,&GUID_NULL))
443 
444  if (activated > 0)
445  activate_given_ts(actsvr, tm);
446 
447  entry = HeapAlloc(GetProcessHeap(),0,sizeof(AtsEntry));
448 
449  if (!entry)
450  {
451  HeapFree(GetProcessHeap(),0,actsvr);
452  return E_OUTOFMEMORY;
453  }
454 
455  entry->ats = actsvr;
456  list_add_head(&AtsList, &entry->entry);
457 
458  return S_OK;
459 }
static UINT activated
Definition: msctf.c:72
static void deactivate_remove_conflicting_ts(REFCLSID catid)
Definition: msctf.c:379
EXTERN_C const GUID GUID_TFCAT_TIP_SPEECH
Definition: msctf.idl:63
__WINE_SERVER_LIST_INLINE void list_add_head(struct list *list, struct list *elem)
Definition: list.h:96
DWORD tlsIndex
Definition: msctf.c:74
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static HRESULT activate_given_ts(ActivatedTextService *actsvr, ITfThreadMgrEx *tm)
Definition: msctf.c:338
EXTERN_C const GUID GUID_TFCAT_TIP_HANDWRITING
Definition: msctf.idl:64
smooth NULL
Definition: ftsmooth.c:416
static struct list AtsList
Definition: msctf.c:71
HRESULT CategoryMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
Definition: categorymgr.c:415
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
TfClientId tid
Definition: msctf.c:58
ITfKeyEventSink * pITfKeyEventSink
Definition: msctf.c:57
uint32_t entry
Definition: isohybrid.c:63
#define GUID_NULL
Definition: ks.h:106
Definition: _list.h:228
Definition: time.h:76
#define ERR(fmt,...)
Definition: debug.h:109
Definition: msctf.c:61
#define S_OK
Definition: intsafe.h:59
ITfTextInputProcessor * pITfTextInputProcessor
Definition: msctf.c:55
EXTERN_C const GUID GUID_TFCAT_TIP_KEYBOARD
Definition: msctf.idl:62
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021
#define E_UNEXPECTED
Definition: winerror.h:2456
LPVOID WINAPI TlsGetValue(IN DWORD Index)
Definition: thread.c:1228
TF_LANGUAGEPROFILE LanguageProfile
Definition: msctf.c:54
#define HeapFree(x, y, z)
Definition: compat.h:394
#define SUCCEEDED(hr)
Definition: intsafe.h:57

Referenced by InputProcessorProfiles_ActivateLanguageProfile().

◆ advise_sink()

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

Definition at line 287 of file msctf.c.

288 {
289  Sink *sink;
290 
291  sink = HeapAlloc(GetProcessHeap(), 0, sizeof(*sink));
292  if (!sink)
293  return E_OUTOFMEMORY;
294 
295  if (FAILED(IUnknown_QueryInterface(unk, riid, (void**)&sink->interfaces.pIUnknown)))
296  {
299  }
300 
301  list_add_head(sink_list, &sink->entry);
302  *cookie = generate_Cookie(cookie_magic, sink);
303  TRACE("cookie %x\n", *cookie);
304  return S_OK;
305 }
#define CONNECT_E_CANNOTCONNECT
Definition: olectl.h:253
REFIID riid
Definition: precomp.h:44
__WINE_SERVER_LIST_INLINE void list_add_head(struct list *list, struct list *elem)
Definition: list.h:96
GLsizei GLenum GLboolean sink
Definition: glext.h:5672
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define S_OK
Definition: intsafe.h:59
#define HeapFree(x, y, z)
Definition: compat.h:394
DWORD generate_Cookie(DWORD magic, LPVOID data)
Definition: msctf.c:191

Referenced by CompartmentSource_AdviseSink(), ContextSource_AdviseSink(), DocumentMgrSource_AdviseSink(), IPPSource_AdviseSink(), and ThreadMgrSource_AdviseSink().

◆ ClassFactory_AddRef()

static ULONG WINAPI ClassFactory_AddRef ( IClassFactory iface)
static

Definition at line 126 of file msctf.c.

127 {
129  return InterlockedIncrement(&This->ref);
130 }
static ClassFactory * impl_from_IClassFactory(IClassFactory *iface)
Definition: msctf.c:102
#define InterlockedIncrement
Definition: armddk.h:53

◆ ClassFactory_Constructor()

static HRESULT ClassFactory_Constructor ( LPFNCONSTRUCTOR  ctor,
LPVOID ppvOut 
)
static

Definition at line 177 of file msctf.c.

178 {
180  This->IClassFactory_iface.lpVtbl = &ClassFactoryVtbl;
181  This->ref = 1;
182  This->ctor = ctor;
183  *ppvOut = &This->IClassFactory_iface;
184  TRACE("Created class factory %p\n", This);
185  return S_OK;
186 }
LPFNCONSTRUCTOR ctor
Definition: msctf.c:85
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define S_OK
Definition: intsafe.h:59
static const IClassFactoryVtbl ClassFactoryVtbl
Definition: msctf.c:166

Referenced by DllGetClassObject().

◆ ClassFactory_CreateInstance()

static HRESULT WINAPI ClassFactory_CreateInstance ( IClassFactory iface,
IUnknown punkOuter,
REFIID  iid,
LPVOID ppvOut 
)
static

Definition at line 142 of file msctf.c.

143 {
145  HRESULT ret;
146  IUnknown *obj;
147 
148  TRACE("(%p, %p, %s, %p)\n", iface, punkOuter, debugstr_guid(iid), ppvOut);
149  ret = This->ctor(punkOuter, &obj);
150  if (FAILED(ret))
151  return ret;
152  ret = IUnknown_QueryInterface(obj, iid, ppvOut);
153  IUnknown_Release(obj);
154  return ret;
155 }
static ClassFactory * impl_from_IClassFactory(IClassFactory *iface)
Definition: msctf.c:102
GLsizei GLsizei GLuint * obj
Definition: glext.h:6042
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
int ret

◆ ClassFactory_Destructor()

static void ClassFactory_Destructor ( ClassFactory This)
static

Definition at line 107 of file msctf.c.

108 {
109  TRACE("Destroying class factory %p\n", This);
111 }
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
#define HeapFree(x, y, z)
Definition: compat.h:394

Referenced by ClassFactory_Release().

◆ ClassFactory_LockServer()

static HRESULT WINAPI ClassFactory_LockServer ( IClassFactory iface,
BOOL  fLock 
)
static

Definition at line 157 of file msctf.c.

158 {
160 
161  TRACE("(%p)->(%x)\n", This, fLock);
162 
163  return S_OK;
164 }
static ClassFactory * impl_from_IClassFactory(IClassFactory *iface)
Definition: msctf.c:102
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59

◆ ClassFactory_QueryInterface()

static HRESULT WINAPI ClassFactory_QueryInterface ( IClassFactory iface,
REFIID  riid,
LPVOID ppvOut 
)
static

Definition at line 113 of file msctf.c.

114 {
115  *ppvOut = NULL;
117  IClassFactory_AddRef(iface);
118  *ppvOut = iface;
119  return S_OK;
120  }
121 
122  WARN("Unknown interface %s\n", debugstr_guid(riid));
123  return E_NOINTERFACE;
124 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
#define WARN(fmt,...)
Definition: debug.h:111
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:59
const GUID IID_IClassFactory
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ ClassFactory_Release()

static ULONG WINAPI ClassFactory_Release ( IClassFactory iface)
static

Definition at line 132 of file msctf.c.

133 {
136 
137  if (ret == 0)
139  return ret;
140 }
static void ClassFactory_Destructor(ClassFactory *This)
Definition: msctf.c:107
static ClassFactory * impl_from_IClassFactory(IClassFactory *iface)
Definition: msctf.c:102
int ret
#define InterlockedDecrement
Definition: armddk.h:52
unsigned int ULONG
Definition: retypes.h:1

◆ deactivate_given_ts()

static HRESULT deactivate_given_ts ( ActivatedTextService actsvr)
static

Definition at line 363 of file msctf.c.

364 {
365  HRESULT hr = S_OK;
366 
367  if (actsvr->pITfTextInputProcessor)
368  {
369  hr = ITfTextInputProcessor_Deactivate(actsvr->pITfTextInputProcessor);
370  ITfTextInputProcessor_Release(actsvr->pITfTextInputProcessor);
371  ITfThreadMgrEx_Release(actsvr->pITfThreadMgrEx);
372  actsvr->pITfTextInputProcessor = NULL;
373  actsvr->pITfThreadMgrEx = NULL;
374  }
375 
376  return hr;
377 }
HRESULT hr
Definition: shlfolder.c:183
ITfThreadMgrEx * pITfThreadMgrEx
Definition: msctf.c:56
smooth NULL
Definition: ftsmooth.c:416
LONG HRESULT
Definition: typedefs.h:77
#define S_OK
Definition: intsafe.h:59
ITfTextInputProcessor * pITfTextInputProcessor
Definition: msctf.c:55

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 379 of file msctf.c.

380 {
381  AtsEntry *ats, *cursor2;
382 
384  {
386  {
387  deactivate_given_ts(ats->ats);
388  list_remove(&ats->entry);
389  HeapFree(GetProcessHeap(),0,ats->ats);
390  HeapFree(GetProcessHeap(),0,ats);
391  /* we are guaranteeing there is only 1 */
392  break;
393  }
394  }
395 }
static HRESULT deactivate_given_ts(ActivatedTextService *actsvr)
Definition: msctf.c:363
static struct list AtsList
Definition: msctf.c:71
struct list entry
Definition: msctf.c:63
GUID catid
Definition: msctf.idl:608
ActivatedTextService * ats
Definition: msctf.c:64
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
#define GetProcessHeap()
Definition: compat.h:395
uint32_t entry
Definition: isohybrid.c:63
Definition: msctf.c:61
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
TF_LANGUAGEPROFILE LanguageProfile
Definition: msctf.c:54
#define IsEqualCLSID(rclsid1, rclsid2)
Definition: guiddef.h:96
#define HeapFree(x, y, z)
Definition: compat.h:394

Referenced by add_active_textservice().

◆ deactivate_textservices()

HRESULT deactivate_textservices ( void  )

Definition at line 495 of file msctf.c.

496 {
497  AtsEntry *ats;
498 
499  if (activated > 0)
500  activated --;
501 
502  if (activated == 0)
504  deactivate_given_ts(ats->ats);
505 
506  return S_OK;
507 }
static UINT activated
Definition: msctf.c:72
static HRESULT deactivate_given_ts(ActivatedTextService *actsvr)
Definition: msctf.c:363
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
static struct list AtsList
Definition: msctf.c:71
ActivatedTextService * ats
Definition: msctf.c:64
uint32_t entry
Definition: isohybrid.c:63
Definition: msctf.c:61
#define S_OK
Definition: intsafe.h:59

Referenced by ThreadMgr_Deactivate().

◆ DllCanUnloadNow()

HRESULT WINAPI DllCanUnloadNow ( void  )

Definition at line 578 of file msctf.c.

579 {
580  return S_FALSE;
581 }
#define S_FALSE
Definition: winerror.h:2357

◆ DllGetClassObject()

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

Definition at line 586 of file msctf.c.

587 {
588  int i;
589 
590  *ppvOut = NULL;
591  if (!IsEqualIID(iid, &IID_IUnknown) && !IsEqualIID(iid, &IID_IClassFactory))
592  return E_NOINTERFACE;
593 
594  for (i = 0; ClassesTable[i].clsid != NULL; i++)
596  return ClassFactory_Constructor(ClassesTable[i].ctor, ppvOut);
597  }
598  FIXME("CLSID %s not supported\n", debugstr_guid(clsid));
600 }
#define E_NOINTERFACE
Definition: winerror.h:2364
static const struct @463 ClassesTable[]
LPFNCONSTRUCTOR ctor
Definition: msctf.c:85
#define CLASS_E_CLASSNOTAVAILABLE
Definition: winerror.h:2663
static HRESULT ClassFactory_Constructor(LPFNCONSTRUCTOR ctor, LPVOID *ppvOut)
Definition: msctf.c:177
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 FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
const GUID IID_IUnknown
REFCLSID clsid
Definition: msctf.c:84
const GUID IID_IClassFactory
#define IsEqualCLSID(rclsid1, rclsid2)
Definition: guiddef.h:96
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ DllMain()

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

Definition at line 556 of file msctf.c.

557 {
558  TRACE("%p 0x%x %p\n", hinst, fdwReason, fImpLoad);
559  switch (fdwReason)
560  {
561  case DLL_WINE_PREATTACH:
562  return FALSE; /* prefer native version */
563  case DLL_PROCESS_ATTACH:
565  tlsIndex = TlsAlloc();
566  break;
567  case DLL_PROCESS_DETACH:
568  if (fImpLoad) break;
569  TlsFree(tlsIndex);
570  break;
571  }
572  return TRUE;
573 }
static HINSTANCE MSCTF_hinstance
Definition: msctf.c:44
#define TRUE
Definition: types.h:120
#define DLL_PROCESS_ATTACH
Definition: compat.h:120
DWORD tlsIndex
Definition: msctf.c:74
#define DLL_PROCESS_DETACH
Definition: compat.h:119
#define TRACE(s)
Definition: solgame.cpp:4
BOOL WINAPI TlsFree(IN DWORD Index)
Definition: thread.c:1154
DWORD WINAPI TlsAlloc(VOID)
Definition: thread.c:1088
DWORD LPVOID fImpLoad
Definition: misc.cpp:155
static HINSTANCE hinst
Definition: edit.c:551

◆ DllRegisterServer()

HRESULT WINAPI DllRegisterServer ( void  )

Definition at line 605 of file msctf.c.

606 {
608 }
static HINSTANCE MSCTF_hinstance
Definition: msctf.c:44
HRESULT __wine_register_resources(HMODULE module) DECLSPEC_HIDDEN
Definition: register.c:98

◆ DllUnregisterServer()

HRESULT WINAPI DllUnregisterServer ( void  )

Definition at line 613 of file msctf.c.

614 {
616 }
static HINSTANCE MSCTF_hinstance
Definition: msctf.c:44
HRESULT __wine_unregister_resources(HMODULE module) DECLSPEC_HIDDEN
Definition: register.c:110

◆ enumerate_Cookie()

DWORD enumerate_Cookie ( DWORD  magic,
DWORD index 
)

Definition at line 275 of file msctf.c.

276 {
277  unsigned int i;
278  for (i = *index; i < id_last; i++)
279  if (cookies[i].id != 0 && cookies[i].magic == magic)
280  {
281  *index = (i+1);
282  return cookies[i].id;
283  }
284  return 0x0;
285 }
static UINT id_last
Definition: msctf.c:68
u32_t magic(void)
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
GLuint index
Definition: glext.h:6031
static CookieInternal * cookies
Definition: msctf.c:67
DWORD id
Definition: msctf.c:48

Referenced by CategoryMgr_RegisterGUID().

◆ free_sink()

static void free_sink ( Sink sink)
static

Definition at line 307 of file msctf.c.

308 {
309  list_remove(&sink->entry);
310  IUnknown_Release(sink->interfaces.pIUnknown);
312 }
GLsizei GLenum GLboolean sink
Definition: glext.h:5672
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
#define GetProcessHeap()
Definition: compat.h:395
#define HeapFree(x, y, z)
Definition: compat.h:394

Referenced by free_sinks(), and unadvise_sink().

◆ free_sinks()

void free_sinks ( struct list sink_list)

Definition at line 326 of file msctf.c.

327 {
328  while(!list_empty(sink_list))
329  {
330  Sink* sink = LIST_ENTRY(sink_list->next, Sink, entry);
331  free_sink(sink);
332  }
333 }
GLsizei GLenum GLboolean sink
Definition: glext.h:5672
struct list * next
Definition: list.h:38
static void free_sink(Sink *sink)
Definition: msctf.c:307
uint32_t entry
Definition: isohybrid.c:63
__WINE_SERVER_LIST_INLINE int list_empty(const struct list *list)
Definition: list.h:143
#define LIST_ENTRY(type)
Definition: queue.h:175

Referenced by Compartment_Destructor(), Context_Destructor(), DocumentMgr_Destructor(), InputProcessorProfiles_Destructor(), and ThreadMgr_Destructor().

◆ generate_Cookie()

DWORD generate_Cookie ( DWORD  magic,
LPVOID  data 
)

Definition at line 191 of file msctf.c.

192 {
193  UINT i;
194 
195  /* try to reuse IDs if possible */
196  for (i = 0; i < id_last; i++)
197  if (cookies[i].id == 0) break;
198 
199  if (i == array_size)
200  {
201  if (!array_size)
202  {
204  if (!cookies)
205  {
206  ERR("Out of memory, Unable to alloc cookies array\n");
207  return 0;
208  }
209  array_size = 10;
210  }
211  else
212  {
214  sizeof(CookieInternal) * (array_size * 2));
215  if (!new_cookies)
216  {
217  ERR("Out of memory, Unable to realloc cookies array\n");
218  return 0;
219  }
220  cookies = new_cookies;
221  array_size *= 2;
222  }
223  }
224 
225  cookies[i].id = i + 1; /* a return of 0 is used for failure */
226  cookies[i].magic = magic;
227  cookies[i].data = data;
228 
229  if (i == id_last)
230  id_last++;
231 
232  return cookies[i].id;
233 }
LPVOID data
Definition: msctf.c:50
static UINT id_last
Definition: msctf.c:68
u32_t magic(void)
static UINT array_size
Definition: msctf.c:69
DWORD magic
Definition: msctf.c:49
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 GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
static CookieInternal * cookies
Definition: msctf.c:67
#define ERR(fmt,...)
Definition: debug.h:109
#define HeapReAlloc
Definition: compat.h:393
unsigned int UINT
Definition: ndis.h:50
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
DWORD id
Definition: msctf.c:48

Referenced by advise_sink(), CategoryMgr_RegisterGUID(), Context_Constructor(), and TextStoreACPSink_OnLockGranted().

◆ get_active_textservice()

BOOL get_active_textservice ( REFCLSID  rclsid,
TF_LANGUAGEPROFILE profile 
)

Definition at line 461 of file msctf.c.

462 {
463  AtsEntry *ats;
464 
466  {
467  if (IsEqualCLSID(rclsid,&ats->ats->LanguageProfile.clsid))
468  {
469  if (profile)
470  *profile = ats->ats->LanguageProfile;
471  return TRUE;
472  }
473  }
474  return FALSE;
475 }
#define TRUE
Definition: types.h:120
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
static struct list AtsList
Definition: msctf.c:71
ActivatedTextService * ats
Definition: msctf.c:64
uint32_t entry
Definition: isohybrid.c:63
Definition: msctf.c:61
#define profile
Definition: kernel32.h:12
TF_LANGUAGEPROFILE LanguageProfile
Definition: msctf.c:54
#define IsEqualCLSID(rclsid1, rclsid2)
Definition: guiddef.h:96

Referenced by InputProcessorProfiles_ActivateLanguageProfile(), InputProcessorProfiles_GetActiveLanguageProfile(), and next_LanguageProfile().

◆ get_Cookie_data()

LPVOID get_Cookie_data ( DWORD  id)

Definition at line 248 of file msctf.c.

249 {
250  UINT index = id - 1;
251 
252  if (index >= id_last)
253  return NULL;
254 
255  if (cookies[index].id == 0)
256  return NULL;
257 
258  return cookies[index].data;
259 }
LPVOID data
Definition: msctf.c:50
static UINT id_last
Definition: msctf.c:68
smooth NULL
Definition: ftsmooth.c:416
GLuint index
Definition: glext.h:6031
static CookieInternal * cookies
Definition: msctf.c:67
#define index(s, c)
Definition: various.h:29
unsigned int UINT
Definition: ndis.h:50

Referenced by CategoryMgr_GetGUID(), CategoryMgr_IsEqualTfGuidAtom(), CategoryMgr_RegisterGUID(), Context_GetEnd(), Context_GetSelection(), Context_GetStart(), and InsertAtSelection_InsertTextAtSelection().

◆ get_Cookie_magic()

DWORD get_Cookie_magic ( DWORD  id)

Definition at line 235 of file msctf.c.

236 {
237  UINT index = id - 1;
238 
239  if (index >= id_last)
240  return 0;
241 
242  if (cookies[index].id == 0)
243  return 0;
244 
245  return cookies[index].magic;
246 }
static UINT id_last
Definition: msctf.c:68
DWORD magic
Definition: msctf.c:49
GLuint index
Definition: glext.h:6031
static CookieInternal * cookies
Definition: msctf.c:67
#define index(s, c)
Definition: various.h:29
unsigned int UINT
Definition: ndis.h:50

Referenced by CategoryMgr_GetGUID(), CategoryMgr_IsEqualTfGuidAtom(), CompartmentSource_UnadviseSink(), Context_GetEnd(), Context_GetSelection(), Context_GetStart(), Context_SetSelection(), ContextSource_UnadviseSink(), DocumentMgrSource_UnadviseSink(), InsertAtSelection_InsertTextAtSelection(), IPPSource_UnadviseSink(), and ThreadMgrSource_UnadviseSink().

◆ get_textservice_clsid()

CLSID get_textservice_clsid ( TfClientId  tid)

Definition at line 509 of file msctf.c.

510 {
511  AtsEntry *ats;
512 
514  if (ats->ats->tid == tid)
515  return ats->ats->LanguageProfile.clsid;
516  return GUID_NULL;
517 }
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
static struct list AtsList
Definition: msctf.c:71
ActivatedTextService * ats
Definition: msctf.c:64
TfClientId tid
Definition: msctf.c:58
uint32_t entry
Definition: isohybrid.c:63
#define GUID_NULL
Definition: ks.h:106
Definition: msctf.c:61
TF_LANGUAGEPROFILE LanguageProfile
Definition: msctf.c:54
static TfClientId tid

Referenced by KeystrokeMgr_AdviseKeyEventSink(), and KeystrokeMgr_UnadviseKeyEventSink().

◆ get_textservice_sink()

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

Definition at line 519 of file msctf.c.

520 {
521  AtsEntry *ats;
522 
523  if (!IsEqualCLSID(iid,&IID_ITfKeyEventSink))
524  return E_NOINTERFACE;
525 
527  if (ats->ats->tid == tid)
528  {
529  *sink = (IUnknown*)ats->ats->pITfKeyEventSink;
530  return S_OK;
531  }
532 
533  return E_FAIL;
534 }
#define E_NOINTERFACE
Definition: winerror.h:2364
#define E_FAIL
Definition: ddrawi.h:102
GLsizei GLenum GLboolean sink
Definition: glext.h:5672
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
static struct list AtsList
Definition: msctf.c:71
ActivatedTextService * ats
Definition: msctf.c:64
TfClientId tid
Definition: msctf.c:58
ITfKeyEventSink * pITfKeyEventSink
Definition: msctf.c:57
uint32_t entry
Definition: isohybrid.c:63
Definition: msctf.c:61
#define S_OK
Definition: intsafe.h:59
#define IsEqualCLSID(rclsid1, rclsid2)
Definition: guiddef.h:96
static TfClientId tid

Referenced by KeystrokeMgr_AdviseKeyEventSink(), and KeystrokeMgr_UnadviseKeyEventSink().

◆ impl_from_IClassFactory()

static ClassFactory* impl_from_IClassFactory ( IClassFactory iface)
inlinestatic

Definition at line 102 of file msctf.c.

103 {
104  return CONTAINING_RECORD(iface, ClassFactory, IClassFactory_iface);
105 }
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

Referenced by ClassFactory_AddRef(), ClassFactory_CreateInstance(), ClassFactory_LockServer(), and ClassFactory_Release().

◆ remove_Cookie()

LPVOID remove_Cookie ( DWORD  id)

Definition at line 261 of file msctf.c.

262 {
263  UINT index = id - 1;
264 
265  if (index >= id_last)
266  return NULL;
267 
268  if (cookies[index].id == 0)
269  return NULL;
270 
271  cookies[index].id = 0;
272  return cookies[index].data;
273 }
LPVOID data
Definition: msctf.c:50
static UINT id_last
Definition: msctf.c:68
smooth NULL
Definition: ftsmooth.c:416
GLuint index
Definition: glext.h:6031
static CookieInternal * cookies
Definition: msctf.c:67
#define index(s, c)
Definition: various.h:29
unsigned int UINT
Definition: ndis.h:50
DWORD id
Definition: msctf.c:48

Referenced by Context_Destructor(), TextStoreACPSink_OnLockGranted(), and unadvise_sink().

◆ set_textservice_sink()

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

Definition at line 536 of file msctf.c.

537 {
538  AtsEntry *ats;
539 
540  if (!IsEqualCLSID(iid,&IID_ITfKeyEventSink))
541  return E_NOINTERFACE;
542 
544  if (ats->ats->tid == tid)
545  {
547  return S_OK;
548  }
549 
550  return E_FAIL;
551 }
#define E_NOINTERFACE
Definition: winerror.h:2364
#define E_FAIL
Definition: ddrawi.h:102
GLsizei GLenum GLboolean sink
Definition: glext.h:5672
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
static struct list AtsList
Definition: msctf.c:71
ActivatedTextService * ats
Definition: msctf.c:64
TfClientId tid
Definition: msctf.c:58
ITfKeyEventSink * pITfKeyEventSink
Definition: msctf.c:57
uint32_t entry
Definition: isohybrid.c:63
Definition: msctf.c:61
#define S_OK
Definition: intsafe.h:59
#define IsEqualCLSID(rclsid1, rclsid2)
Definition: guiddef.h:96
static TfClientId tid

Referenced by KeystrokeMgr_AdviseKeyEventSink(), and KeystrokeMgr_UnadviseKeyEventSink().

◆ SetInputScope()

HRESULT WINAPI SetInputScope ( HWND  hwnd,
InputScope  inputscope 
)

Definition at line 644 of file msctf.c.

645 {
646  FIXME("STUB: %p %i\n",hwnd,inputscope);
647  return S_OK;
648 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define FIXME(fmt,...)
Definition: debug.h:110
#define S_OK
Definition: intsafe.h:59

◆ SetInputScopes()

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

Definition at line 653 of file msctf.c.

656 {
657  UINT i;
658  FIXME("STUB: %p ... %s %s\n",hwnd, debugstr_w(pszRegExp), debugstr_w(pszSRGS));
659  for (i = 0; i < cInputScopes; i++)
660  TRACE("\tScope[%u] = %i\n",i,pInputScopes[i]);
661  for (i = 0; i < cPhrases; i++)
662  TRACE("\tPhrase[%u] = %s\n",i,debugstr_w(ppszPhraseList[i]));
663 
664  return S_OK;
665 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
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_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
unsigned int UINT
Definition: ndis.h:50

◆ TF_CreateInputProcessorProfiles()

HRESULT WINAPI TF_CreateInputProcessorProfiles ( ITfInputProcessorProfiles **  ppipr)

Definition at line 670 of file msctf.c.

672 {
674 }
smooth NULL
Definition: ftsmooth.c:416
HRESULT InputProcessorProfiles_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)

◆ TF_CreateLangBarItemMgr()

HRESULT WINAPI TF_CreateLangBarItemMgr ( ITfLangBarItemMgr **  pplbim)

Definition at line 694 of file msctf.c.

695 {
696  FIXME("stub %p\n", pplbim);
697  *pplbim = NULL;
698 
699  return E_NOTIMPL;
700 }
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ TF_CreateLangBarMgr()

HRESULT WINAPI TF_CreateLangBarMgr ( ITfLangBarMgr **  pppbm)

Definition at line 688 of file msctf.c.

689 {
690  TRACE("\n");
691  return LangBarMgr_Constructor(NULL,(IUnknown**)pppbm);
692 }
HRESULT LangBarMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
Definition: langbarmgr.c:182
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4

◆ TF_CreateThreadMgr()

HRESULT WINAPI TF_CreateThreadMgr ( ITfThreadMgr **  pptim)

Definition at line 621 of file msctf.c.

622 {
623  TRACE("\n");
624  return ThreadMgr_Constructor(NULL,(IUnknown**)pptim);
625 }
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT ThreadMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut) DECLSPEC_HIDDEN
Definition: threadmgr.c:1319

◆ TF_GetThreadMgr()

HRESULT WINAPI TF_GetThreadMgr ( ITfThreadMgr **  pptim)

Definition at line 630 of file msctf.c.

631 {
632  TRACE("\n");
633  *pptim = TlsGetValue(tlsIndex);
634 
635  if (*pptim)
636  ITfThreadMgr_AddRef(*pptim);
637 
638  return S_OK;
639 }
DWORD tlsIndex
Definition: msctf.c:74
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
LPVOID WINAPI TlsGetValue(IN DWORD Index)
Definition: thread.c:1228

Referenced by DocumentMgr_Destructor().

◆ TF_InitMlngInfo()

HRESULT WINAPI TF_InitMlngInfo ( void  )

Definition at line 705 of file msctf.c.

706 {
707  FIXME("stub\n");
708  return S_OK;
709 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define S_OK
Definition: intsafe.h:59

◆ TF_InvalidAssemblyListCacheIfExist()

HRESULT WINAPI TF_InvalidAssemblyListCacheIfExist ( void  )

Definition at line 679 of file msctf.c.

680 {
681  FIXME("Stub\n");
682  return S_OK;
683 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define S_OK
Definition: intsafe.h:59

◆ unadvise_sink()

HRESULT unadvise_sink ( DWORD  cookie)

Definition at line 314 of file msctf.c.

315 {
316  Sink *sink;
317 
318  sink = remove_Cookie(cookie);
319  if (!sink)
320  return CONNECT_E_NOCONNECTION;
321 
322  free_sink(sink);
323  return S_OK;
324 }
#define CONNECT_E_NOCONNECTION
Definition: olectl.h:251
GLsizei GLenum GLboolean sink
Definition: glext.h:5672
LPVOID remove_Cookie(DWORD id)
Definition: msctf.c:261
static void free_sink(Sink *sink)
Definition: msctf.c:307
#define S_OK
Definition: intsafe.h:59

Referenced by CompartmentSource_UnadviseSink(), ContextSource_UnadviseSink(), DocumentMgrSource_UnadviseSink(), IPPSource_UnadviseSink(), and ThreadMgrSource_UnadviseSink().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( msctf  )

Variable Documentation

◆ activated

◆ array_size

◆ AtsList

◆ ClassesTable

const { ... } ClassesTable[]
Initial value:
= {
}
HRESULT DisplayAttributeMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
HRESULT LangBarMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
Definition: langbarmgr.c:182
EXTERN_C const CLSID CLSID_TF_CategoryMgr
Definition: msctf.idl:47
smooth NULL
Definition: ftsmooth.c:416
EXTERN_C const CLSID CLSID_TF_InputProcessorProfiles
Definition: msctf.idl:45
HRESULT CategoryMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
Definition: categorymgr.c:415
EXTERN_C const CLSID CLSID_TF_ThreadMgr
Definition: msctf.idl:44
EXTERN_C const CLSID CLSID_TF_DisplayAttributeMgr
Definition: msctf.idl:48
HRESULT InputProcessorProfiles_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
HRESULT ThreadMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut) DECLSPEC_HIDDEN
Definition: threadmgr.c:1319
EXTERN_C const CLSID CLSID_TF_LangBarMgr
Definition: msctf.idl:46

Referenced by DllGetClassObject().

◆ ClassFactoryVtbl

const IClassFactoryVtbl ClassFactoryVtbl
static
Initial value:
= {
}
static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
Definition: msctf.c:126
static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL fLock)
Definition: msctf.c:157
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, LPVOID *ppvOut)
Definition: msctf.c:113
static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
Definition: msctf.c:132
static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface, IUnknown *punkOuter, REFIID iid, LPVOID *ppvOut)
Definition: msctf.c:142

Definition at line 166 of file msctf.c.

Referenced by ClassFactory_Constructor().

◆ clsid

REFCLSID clsid

Definition at line 84 of file msctf.c.

Referenced by _create_object(), CFSFolder::_CreateExtensionUIObject(), CFSFolder::_GetDropTarget(), CFSFolder::_GetIconHandler(), actctx_get_miscstatus(), ACTION_PublishFeatures(), add_icon_to_control(), add_progid_record(), AssocCreate(), AtlComModuleRegisterServer(), ATL::AtlComModuleRegisterServer(), ATL::AtlComModuleUnregisterServer(), AtlGetObjectSourceInterface(), AtlModuleRegisterServer(), AtlModuleUnregisterServer(), AtlRegisterClassCategoriesHelper(), ATL::AtlRegisterClassCategoriesHelper(), AVIFILE_CreateClassFactory(), BindProtocol_StartEx(), BitmapDecoderInfo_Constructor(), BitmapEncoderInfo_Constructor(), call_script(), ClassMoniker_CreateFromDisplayName(), ClassMoniker_IsEqual(), CLRCreateInstance(), clsid_from_string_reg(), CLSIDEnumGUID_Next(), CLSIDFromProgID(), CLSIDFromProgIDEx(), CoCreateInstanceEx(), CoGetInstanceFromFile(), CoIsOle1Class(), COM_OpenKeyForAppIdFromCLSID(), COM_OpenKeyForCLSID(), create_activex_object(), create_automatic_entry(), IPCtrlWindow< ChildWindow, SIfacePtr< IWebBrowser2 > >::create_control(), create_engine(), create_instance(), create_mime_object(), create_object(), create_plugin_host(), create_proxy(), create_stub(), CreateComponentEnumerator(), CreateComponentInfo(), CreateFilterInstanceAndLoadFile(), SIfacePtr< IShellLink >::CreateInstance(), CustomMarshal_GetUnmarshalClass(), d3drm1_CreateObject(), d3drm2_CreateObject(), d3drm3_CreateObject(), DataCache_Construct(), DataCache_GetClassID(), DataCache_InitNew(), DataCache_Load(), db_initialize(), DECLARE_INTERFACE_(), DefaultHandler_Construct(), DefaultHandler_IPersistStorage_GetClassID(), DEVENUM_IMediaCatMoniker_IsEqual(), DllGetClassObject(), dochost_object_available(), DOMClassFactory_Create(), dump_template(), CDefaultContextMenu::EnumerateDynamicContextHandlerForKey(), EnumTfLanguageProfiles_Next(), FileMonikerImpl_IsEqual(), FilterGraph2_Connect(), FilterMapper_EnumMatchingFilters(), FilterMapper_RegisterFilter(), FilterMapper_RegisterFilterInstance(), 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(), ATL::CImage::GetClsidFromFileType(), CRegFolder::GetDetailsOf(), CRegFolder::GetDisplayNameOf(), ATL::CImage::GetEncoderClsid(), GetFileSourceFilter(), getIconLocationForFolder(), CSearchBar::GetSearchResultsFolder(), GetSplitter(), CQueryAssociations::GetString(), implicit_mta_proc(), init_session(), CRShellClassFactory::Initialize(), InitIconOverlays(), InitPropVariantFromCLSID(), InitShellServices(), InputProcessorProfileMgr_ActivateProfile(), InputProcessorProfileMgr_DeactivateProfile(), InputProcessorProfileMgr_GetProfile(), insert_static_object(), CSearchBar::Invoke(), IPropertyStorage_fnSetClass(), is_clsid_supported(), IsNamespaceExtensionHidden(), ItemMonikerImpl_IsEqual(), iterate_all_classes(), IUnknown_GetClassID(), local_server_GetClassID(), MediaStreamFilterImpl_GetClassID(), MetadataReaderInfo_Constructor(), MetadataReaderInfo_GetCLSID(), MkProtocol_StartEx(), msi_create_component_advertise_string(), NdrDllRegisterProxy(), NdrDllUnregisterProxy(), next_LanguageProfile(), OLECONVERT_GetOLE10ProgID(), OleCreateDefaultHandler(), OleCreateEmbeddingHelper(), OleCreateFromFile(), OleCreateFromFileEx(), OleCreateStaticFromData(), OleDoAutoConvert(), OleLoadFromStream(), OleRegEnumFormatEtc(), OleRegEnumVerbs(), OleRegGetMiscStatus(), OleRegGetUserType(), OleSaveToStream(), CTrayBandSite::OnLoad(), parse_classid(), PixelFormatInfo_Constructor(), pointer_default(), ProgIDFromCLSID(), PropertyStorage_ReadHeaderFromStream(), ReadFmtUserTypeStg(), reg_context_menu_handler(), reg_icon_overlay(), reg_prop_sheet_handler(), register_clsid(), register_dsound_devices(), register_midiout_devices(), register_namespace(), register_progid(), register_ps_clsid_thread(), register_vfw_codecs(), register_wavein_devices(), register_waveout_devices(), RegisterComponent(), RPC_StartLocalServer(), SSOThread::Run(), run_script(), RuntimeHost_GetInterface(), ATL::CImage::Save(), CRegFolder::SetNameOf(), setup_edit_mode(), SetupRegisterClass(), SHCreatePropSheetExtArrayEx(), SHELL32_BindToSF(), SHELL32_CoCreateInitSF(), SHGetObjectCompatFlags(), CShellDispatch::ShowBrowserBar(), SHSkipJunction(), START_TEST(), statusclb_OnProgress(), statusclb_OnStartBinding(), statusclb_OnStopBinding(), StgCreatePropStg(), Storage_SetClass(), STORAGE_WriteCompObj(), StorageBaseImpl_SetClass(), test1_GetClassID(), test_CLSIDFromProgID(), test_CLSIDFromProgIDWrap(), test_CLSIDFromString(), test_CoGetInstanceFromFile(), test_CoGetPSClsid(), test_CoGetStandardMarshal(), test_com_aggregation(), test_CoRegisterPSClsid(), test_CreateBody(), 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_multi_encoder(), test_object(), test_OleCreateStaticFromData(), test_OleDoAutoConvert(), test_pack_FILEDESCRIPTORA(), test_pack_FILEDESCRIPTORW(), test_pack_SHDESCRIPTIONID(), test_persist_GetClassId(), test_persiststream(), test_proxybuffer(), test_ReadClassStm(), test_reader_info(), test_SHGetObjectCompatFlags(), test_ShortcutFolder(), test_stub(), test_stubbuffer(), test_supported_encoders(), TestModuleRegistry(), testpersist_GetClassID(), UIINSERTOBJECTDLG_OnOpen(), UIINSERTOBJECTDLG_PopulateObjectTypes(), unregister_clsid(), UnregisterComponent(), URLMoniker_IsEqual(), vmr_create(), WriteFmtUserTypeStg(), and wWinMain().

◆ cookies

◆ ctor

◆ globalCompartmentMgr

ITfCompartmentMgr* globalCompartmentMgr = NULL

Definition at line 76 of file msctf.c.

Referenced by ThreadMgr_GetGlobalCompartment().

◆ id_last

UINT id_last
static

◆ MSCTF_hinstance

HINSTANCE MSCTF_hinstance
static

Definition at line 44 of file msctf.c.

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

◆ processId

TfClientId processId = 0

Definition at line 75 of file msctf.c.

Referenced by ThreadMgr_ActivateEx().

◆ szwSystemCTFKey

const WCHAR szwSystemCTFKey = {'S','O','F','T','W','A','R','E','\\','M','i','c','r','o','s','o','f','t','\\','C','T','F',0}

◆ szwSystemTIPKey

◆ tlsIndex