ReactOS  0.4.12-dev-945-g5a2911d
context.c File Reference
#include "config.h"
#include <stdarg.h>
#include "wine/debug.h"
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
#include "winuser.h"
#include "shlwapi.h"
#include "winerror.h"
#include "objbase.h"
#include "olectl.h"
#include "wine/unicode.h"
#include "msctf.h"
#include "msctf_internal.h"
Include dependency graph for context.c:

Go to the source code of this file.

Classes

struct  tagContext
 
struct  tagEditCookie
 

Macros

#define COBJMACROS
 

Typedefs

typedef struct tagContext Context = Context
 
typedef struct tagEditCookie EditCookie
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (msctf)
 
static Contextimpl_from_ITfContext (ITfContext *iface)
 
static Contextimpl_from_ITfSource (ITfSource *iface)
 
static Contextimpl_from_ITfInsertAtSelection (ITfInsertAtSelection *iface)
 
static Contextimpl_from_ITfSourceSingle (ITfSourceSingle *iface)
 
static Contextimpl_from_ITextStoreACPSink (ITextStoreACPSink *iface)
 
static Contextimpl_from_ITextStoreACPServices (ITextStoreACPServices *iface)
 
static void Context_Destructor (Context *This)
 
static HRESULT WINAPI Context_QueryInterface (ITfContext *iface, REFIID iid, LPVOID *ppvOut)
 
static ULONG WINAPI Context_AddRef (ITfContext *iface)
 
static ULONG WINAPI Context_Release (ITfContext *iface)
 
static HRESULT WINAPI Context_RequestEditSession (ITfContext *iface, TfClientId tid, ITfEditSession *pes, DWORD dwFlags, HRESULT *phrSession)
 
static HRESULT WINAPI Context_InWriteSession (ITfContext *iface, TfClientId tid, BOOL *pfWriteSession)
 
static HRESULT WINAPI Context_GetSelection (ITfContext *iface, TfEditCookie ec, ULONG ulIndex, ULONG ulCount, TF_SELECTION *pSelection, ULONG *pcFetched)
 
static HRESULT WINAPI Context_SetSelection (ITfContext *iface, TfEditCookie ec, ULONG ulCount, const TF_SELECTION *pSelection)
 
static HRESULT WINAPI Context_GetStart (ITfContext *iface, TfEditCookie ec, ITfRange **ppStart)
 
static HRESULT WINAPI Context_GetEnd (ITfContext *iface, TfEditCookie ec, ITfRange **ppEnd)
 
static HRESULT WINAPI Context_GetActiveView (ITfContext *iface, ITfContextView **ppView)
 
static HRESULT WINAPI Context_EnumViews (ITfContext *iface, IEnumTfContextViews **ppEnum)
 
static HRESULT WINAPI Context_GetStatus (ITfContext *iface, TF_STATUS *pdcs)
 
static HRESULT WINAPI Context_GetProperty (ITfContext *iface, REFGUID guidProp, ITfProperty **ppProp)
 
static HRESULT WINAPI Context_GetAppProperty (ITfContext *iface, REFGUID guidProp, ITfReadOnlyProperty **ppProp)
 
static HRESULT WINAPI Context_TrackProperties (ITfContext *iface, const GUID **prgProp, ULONG cProp, const GUID **prgAppProp, ULONG cAppProp, ITfReadOnlyProperty **ppProperty)
 
static HRESULT WINAPI Context_EnumProperties (ITfContext *iface, IEnumTfProperties **ppEnum)
 
static HRESULT WINAPI Context_GetDocumentMgr (ITfContext *iface, ITfDocumentMgr **ppDm)
 
static HRESULT WINAPI Context_CreateRangeBackup (ITfContext *iface, TfEditCookie ec, ITfRange *pRange, ITfRangeBackup **ppBackup)
 
static HRESULT WINAPI ContextSource_QueryInterface (ITfSource *iface, REFIID iid, LPVOID *ppvOut)
 
static ULONG WINAPI ContextSource_AddRef (ITfSource *iface)
 
static ULONG WINAPI ContextSource_Release (ITfSource *iface)
 
static HRESULT WINAPI ContextSource_AdviseSink (ITfSource *iface, REFIID riid, IUnknown *punk, DWORD *pdwCookie)
 
static HRESULT WINAPI ContextSource_UnadviseSink (ITfSource *iface, DWORD pdwCookie)
 
static HRESULT WINAPI InsertAtSelection_QueryInterface (ITfInsertAtSelection *iface, REFIID iid, LPVOID *ppvOut)
 
static ULONG WINAPI InsertAtSelection_AddRef (ITfInsertAtSelection *iface)
 
static ULONG WINAPI InsertAtSelection_Release (ITfInsertAtSelection *iface)
 
static HRESULT WINAPI InsertAtSelection_InsertTextAtSelection (ITfInsertAtSelection *iface, TfEditCookie ec, DWORD dwFlags, const WCHAR *pchText, LONG cch, ITfRange **ppRange)
 
static HRESULT WINAPI InsertAtSelection_InsertEmbeddedAtSelection (ITfInsertAtSelection *iface, TfEditCookie ec, DWORD dwFlags, IDataObject *pDataObject, ITfRange **ppRange)
 
static HRESULT WINAPI SourceSingle_QueryInterface (ITfSourceSingle *iface, REFIID iid, LPVOID *ppvOut)
 
static ULONG WINAPI SourceSingle_AddRef (ITfSourceSingle *iface)
 
static ULONG WINAPI SourceSingle_Release (ITfSourceSingle *iface)
 
static HRESULT WINAPI SourceSingle_AdviseSingleSink (ITfSourceSingle *iface, TfClientId tid, REFIID riid, IUnknown *punk)
 
static HRESULT WINAPI SourceSingle_UnadviseSingleSink (ITfSourceSingle *iface, TfClientId tid, REFIID riid)
 
static HRESULT WINAPI TextStoreACPSink_QueryInterface (ITextStoreACPSink *iface, REFIID iid, LPVOID *ppvOut)
 
static ULONG WINAPI TextStoreACPSink_AddRef (ITextStoreACPSink *iface)
 
static ULONG WINAPI TextStoreACPSink_Release (ITextStoreACPSink *iface)
 
static HRESULT WINAPI TextStoreACPSink_OnTextChange (ITextStoreACPSink *iface, DWORD dwFlags, const TS_TEXTCHANGE *pChange)
 
static HRESULT WINAPI TextStoreACPSink_OnSelectionChange (ITextStoreACPSink *iface)
 
static HRESULT WINAPI TextStoreACPSink_OnLayoutChange (ITextStoreACPSink *iface, TsLayoutCode lcode, TsViewCookie vcView)
 
static HRESULT WINAPI TextStoreACPSink_OnStatusChange (ITextStoreACPSink *iface, DWORD dwFlags)
 
static HRESULT WINAPI TextStoreACPSink_OnAttrsChange (ITextStoreACPSink *iface, LONG acpStart, LONG acpEnd, ULONG cAttrs, const TS_ATTRID *paAttrs)
 
static HRESULT WINAPI TextStoreACPSink_OnLockGranted (ITextStoreACPSink *iface, DWORD dwLockFlags)
 
static HRESULT WINAPI TextStoreACPSink_OnStartEditTransaction (ITextStoreACPSink *iface)
 
static HRESULT WINAPI TextStoreACPSink_OnEndEditTransaction (ITextStoreACPSink *iface)
 
static HRESULT WINAPI TextStoreACPServices_QueryInterface (ITextStoreACPServices *iface, REFIID riid, void **obj)
 
static ULONG WINAPI TextStoreACPServices_AddRef (ITextStoreACPServices *iface)
 
static ULONG WINAPI TextStoreACPServices_Release (ITextStoreACPServices *iface)
 
static HRESULT WINAPI TextStoreACPServices_Serialize (ITextStoreACPServices *iface, ITfProperty *prop, ITfRange *range, TF_PERSISTENT_PROPERTY_HEADER_ACP *header, IStream *stream)
 
static HRESULT WINAPI TextStoreACPServices_Unserialize (ITextStoreACPServices *iface, ITfProperty *prop, const TF_PERSISTENT_PROPERTY_HEADER_ACP *header, IStream *stream, ITfPersistentPropertyLoaderACP *loader)
 
static HRESULT WINAPI TextStoreACPServices_ForceLoadProperty (ITextStoreACPServices *iface, ITfProperty *prop)
 
static HRESULT WINAPI TextStoreACPServices_CreateRange (ITextStoreACPServices *iface, LONG start, LONG end, ITfRangeACP **range)
 
HRESULT Context_Constructor (TfClientId tidOwner, IUnknown *punk, ITfDocumentMgr *mgr, ITfContext **ppOut, TfEditCookie *pecTextStore)
 
HRESULT Context_Initialize (ITfContext *iface, ITfDocumentMgr *manager)
 
HRESULT Context_Uninitialize (ITfContext *iface)
 

Variables

static const ITfContextVtbl ContextVtbl
 
static const ITfSourceVtbl ContextSourceVtbl
 
static const ITfInsertAtSelectionVtbl InsertAtSelectionVtbl
 
static const ITfSourceSingleVtbl ContextSourceSingleVtbl
 
static const ITextStoreACPSinkVtbl TextStoreACPSinkVtbl
 
static const ITextStoreACPServicesVtbl TextStoreACPServicesVtbl
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 25 of file context.c.

Typedef Documentation

◆ Context

Definition at line 1012 of file acpixf.h.

◆ EditCookie

Function Documentation

◆ Context_AddRef()

static ULONG WINAPI Context_AddRef ( ITfContext iface)
static

Definition at line 180 of file context.c.

181 {
183  return InterlockedIncrement(&This->refCount);
184 }
static Context * impl_from_ITfContext(ITfContext *iface)
Definition: context.c:86
#define InterlockedIncrement
Definition: armddk.h:53

◆ Context_Constructor()

HRESULT Context_Constructor ( TfClientId  tidOwner,
IUnknown punk,
ITfDocumentMgr mgr,
ITfContext **  ppOut,
TfEditCookie pecTextStore 
)

Definition at line 968 of file context.c.

969 {
970  Context *This;
971  EditCookie *cookie;
972 
974  if (This == NULL)
975  return E_OUTOFMEMORY;
976 
977  cookie = HeapAlloc(GetProcessHeap(),0,sizeof(EditCookie));
978  if (cookie == NULL)
979  {
981  return E_OUTOFMEMORY;
982  }
983 
984  TRACE("(%p) %x %p %p %p\n",This, tidOwner, punk, ppOut, pecTextStore);
985 
986  This->ITfContext_iface.lpVtbl= &ContextVtbl;
987  This->ITfSource_iface.lpVtbl = &ContextSourceVtbl;
988  This->ITfInsertAtSelection_iface.lpVtbl = &InsertAtSelectionVtbl;
989  This->ITfSourceSingle_iface.lpVtbl = &ContextSourceSingleVtbl;
990  This->ITextStoreACPSink_iface.lpVtbl = &TextStoreACPSinkVtbl;
991  This->ITextStoreACPServices_iface.lpVtbl = &TextStoreACPServicesVtbl;
992  This->refCount = 1;
993  This->tidOwner = tidOwner;
994  This->connected = FALSE;
995  This->manager = mgr;
996 
997  CompartmentMgr_Constructor((IUnknown*)&This->ITfContext_iface, &IID_IUnknown, (IUnknown**)&This->CompartmentMgr);
998 
999  cookie->lockType = TF_ES_READ;
1000  cookie->pOwningContext = This;
1001 
1002  if (punk)
1003  {
1004  IUnknown_QueryInterface(punk, &IID_ITextStoreACP,
1005  (LPVOID*)&This->pITextStoreACP);
1006 
1007  IUnknown_QueryInterface(punk, &IID_ITfContextOwnerCompositionSink,
1008  (LPVOID*)&This->pITfContextOwnerCompositionSink);
1009 
1010  if (!This->pITextStoreACP && !This->pITfContextOwnerCompositionSink)
1011  FIXME("Unhandled pUnk\n");
1012  }
1013 
1014  This->defaultCookie = generate_Cookie(COOKIE_MAGIC_EDITCOOKIE,cookie);
1015  *pecTextStore = This->defaultCookie;
1016 
1017  list_init(&This->pContextKeyEventSink);
1018  list_init(&This->pEditTransactionSink);
1019  list_init(&This->pStatusSink);
1020  list_init(&This->pTextEditSink);
1021  list_init(&This->pTextLayoutSink);
1022 
1023  *ppOut = &This->ITfContext_iface;
1024  TRACE("returning %p\n", *ppOut);
1025 
1026  return S_OK;
1027 }
DWORD lockType
Definition: context.c:82
static const ITextStoreACPServicesVtbl TextStoreACPServicesVtbl
Definition: context.c:957
static const ITfSourceVtbl ContextSourceVtbl
Definition: context.c:583
static const ITfContextVtbl ContextVtbl
Definition: context.c:511
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
static const ITfInsertAtSelectionVtbl InsertAtSelectionVtbl
Definition: context.c:658
Context * pOwningContext
Definition: context.c:83
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
const GUID IID_IUnknown
#define COOKIE_MAGIC_EDITCOOKIE
#define S_OK
Definition: intsafe.h:59
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
__WINE_SERVER_LIST_INLINE void list_init(struct list *list)
Definition: list.h:149
HRESULT CompartmentMgr_Constructor(IUnknown *pUnkOuter, REFIID riid, IUnknown **ppOut)
static const ITfSourceSingleVtbl ContextSourceSingleVtbl
Definition: context.c:704
#define HeapFree(x, y, z)
Definition: compat.h:394
DWORD generate_Cookie(DWORD magic, LPVOID data)
Definition: msctf.c:191
static const ITextStoreACPSinkVtbl TextStoreACPSinkVtbl
Definition: context.c:885

Referenced by DocumentMgr_CreateContext().

◆ Context_CreateRangeBackup()

static HRESULT WINAPI Context_CreateRangeBackup ( ITfContext iface,
TfEditCookie  ec,
ITfRange pRange,
ITfRangeBackup **  ppBackup 
)
static

Definition at line 503 of file context.c.

505 {
507  FIXME("STUB:(%p)\n",This);
508  return E_NOTIMPL;
509 }
static Context * impl_from_ITfContext(ITfContext *iface)
Definition: context.c:86
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ Context_Destructor()

static void Context_Destructor ( Context This)
static

Definition at line 116 of file context.c.

117 {
118  EditCookie *cookie;
119  TRACE("destroying %p\n", This);
120 
121  if (This->pITextStoreACP)
122  ITextStoreACP_Release(This->pITextStoreACP);
123 
124  if (This->pITfContextOwnerCompositionSink)
125  ITfContextOwnerCompositionSink_Release(This->pITfContextOwnerCompositionSink);
126 
127  if (This->defaultCookie)
128  {
129  cookie = remove_Cookie(This->defaultCookie);
130  HeapFree(GetProcessHeap(),0,cookie);
131  This->defaultCookie = 0;
132  }
133 
134  free_sinks(&This->pContextKeyEventSink);
135  free_sinks(&This->pEditTransactionSink);
136  free_sinks(&This->pStatusSink);
137  free_sinks(&This->pTextEditSink);
138  free_sinks(&This->pTextLayoutSink);
139 
140  CompartmentMgr_Destructor(This->CompartmentMgr);
142 }
void free_sinks(struct list *sink_list)
Definition: msctf.c:326
LPVOID remove_Cookie(DWORD id)
Definition: msctf.c:261
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
HRESULT CompartmentMgr_Destructor(ITfCompartmentMgr *iface)
#define HeapFree(x, y, z)
Definition: compat.h:394

Referenced by Context_Release().

◆ Context_EnumProperties()

static HRESULT WINAPI Context_EnumProperties ( ITfContext iface,
IEnumTfProperties **  ppEnum 
)
static

Definition at line 477 of file context.c.

479 {
481  FIXME("STUB:(%p)\n",This);
482  return E_NOTIMPL;
483 }
static Context * impl_from_ITfContext(ITfContext *iface)
Definition: context.c:86
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ Context_EnumViews()

static HRESULT WINAPI Context_EnumViews ( ITfContext iface,
IEnumTfContextViews **  ppEnum 
)
static

Definition at line 419 of file context.c.

421 {
423  FIXME("STUB:(%p)\n",This);
424  return E_NOTIMPL;
425 }
static Context * impl_from_ITfContext(ITfContext *iface)
Definition: context.c:86
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ Context_GetActiveView()

static HRESULT WINAPI Context_GetActiveView ( ITfContext iface,
ITfContextView **  ppView 
)
static

Definition at line 411 of file context.c.

413 {
415  FIXME("STUB:(%p)\n",This);
416  return E_NOTIMPL;
417 }
static Context * impl_from_ITfContext(ITfContext *iface)
Definition: context.c:86
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ Context_GetAppProperty()

static HRESULT WINAPI Context_GetAppProperty ( ITfContext iface,
REFGUID  guidProp,
ITfReadOnlyProperty **  ppProp 
)
static

Definition at line 460 of file context.c.

462 {
464  FIXME("STUB:(%p)\n",This);
465  return E_NOTIMPL;
466 }
static Context * impl_from_ITfContext(ITfContext *iface)
Definition: context.c:86
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ Context_GetDocumentMgr()

static HRESULT WINAPI Context_GetDocumentMgr ( ITfContext iface,
ITfDocumentMgr **  ppDm 
)
static

Definition at line 485 of file context.c.

487 {
489  TRACE("(%p) %p\n",This,ppDm);
490 
491  if (!ppDm)
492  return E_INVALIDARG;
493 
494  *ppDm = This->manager;
495  if (!This->manager)
496  return S_FALSE;
497 
498  ITfDocumentMgr_AddRef(This->manager);
499 
500  return S_OK;
501 }
static Context * impl_from_ITfContext(ITfContext *iface)
Definition: context.c:86
#define S_FALSE
Definition: winerror.h:2357
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59

◆ Context_GetEnd()

static HRESULT WINAPI Context_GetEnd ( ITfContext iface,
TfEditCookie  ec,
ITfRange **  ppEnd 
)
static

Definition at line 380 of file context.c.

382 {
384  EditCookie *cookie;
385  LONG end;
386  TRACE("(%p) %i %p\n",This,ec,ppEnd);
387 
388  if (!ppEnd)
389  return E_INVALIDARG;
390 
391  *ppEnd = NULL;
392 
393  if (!This->connected)
394  return TF_E_DISCONNECTED;
395 
397  return TF_E_NOLOCK;
398 
399  if (!This->pITextStoreACP)
400  {
401  FIXME("Context does not have a ITextStoreACP\n");
402  return E_NOTIMPL;
403  }
404 
405  cookie = get_Cookie_data(ec);
406  ITextStoreACP_GetEndACP(This->pITextStoreACP,&end);
407 
408  return Range_Constructor(iface, This->pITextStoreACP, cookie->lockType, end, end, ppEnd);
409 }
LPVOID get_Cookie_data(DWORD id)
Definition: msctf.c:248
DWORD lockType
Definition: context.c:82
GLuint GLuint end
Definition: gl.h:1545
DWORD get_Cookie_magic(DWORD id)
Definition: msctf.c:235
long LONG
Definition: pedump.c:60
static Context * impl_from_ITfContext(ITfContext *iface)
Definition: context.c:86
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
HRESULT Range_Constructor(ITfContext *context, ITextStoreACP *textstore, DWORD lockType, DWORD anchorStart, DWORD anchorEnd, ITfRange **ppOut) DECLSPEC_HIDDEN
Definition: range.c:329
#define TRACE(s)
Definition: solgame.cpp:4
#define COOKIE_MAGIC_EDITCOOKIE
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ Context_GetProperty()

static HRESULT WINAPI Context_GetProperty ( ITfContext iface,
REFGUID  guidProp,
ITfProperty **  ppProp 
)
static

Definition at line 452 of file context.c.

454 {
456  FIXME("STUB:(%p)\n",This);
457  return E_NOTIMPL;
458 }
static Context * impl_from_ITfContext(ITfContext *iface)
Definition: context.c:86
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ Context_GetSelection()

static HRESULT WINAPI Context_GetSelection ( ITfContext iface,
TfEditCookie  ec,
ULONG  ulIndex,
ULONG  ulCount,
TF_SELECTION *  pSelection,
ULONG pcFetched 
)
static

Definition at line 260 of file context.c.

263 {
265  EditCookie *cookie;
266  ULONG count, i;
267  ULONG totalFetched = 0;
268  HRESULT hr = S_OK;
269 
270  if (!pSelection || !pcFetched)
271  return E_INVALIDARG;
272 
273  *pcFetched = 0;
274 
275  if (!This->connected)
276  return TF_E_DISCONNECTED;
277 
279  return TF_E_NOLOCK;
280 
281  if (!This->pITextStoreACP)
282  {
283  FIXME("Context does not have a ITextStoreACP\n");
284  return E_NOTIMPL;
285  }
286 
287  cookie = get_Cookie_data(ec);
288 
289  if (ulIndex == TF_DEFAULT_SELECTION)
290  count = 1;
291  else
292  count = ulCount;
293 
294  for (i = 0; i < count; i++)
295  {
296  DWORD fetched;
297  TS_SELECTION_ACP acps;
298 
299  hr = ITextStoreACP_GetSelection(This->pITextStoreACP, ulIndex + i,
300  1, &acps, &fetched);
301 
302  if (hr == TS_E_NOLOCK)
303  return TF_E_NOLOCK;
304  else if (SUCCEEDED(hr))
305  {
306  pSelection[totalFetched].style.ase = acps.style.ase;
307  pSelection[totalFetched].style.fInterimChar = acps.style.fInterimChar;
308  Range_Constructor(iface, This->pITextStoreACP, cookie->lockType, acps.acpStart, acps.acpEnd, &pSelection[totalFetched].range);
309  totalFetched ++;
310  }
311  else
312  break;
313  }
314 
315  *pcFetched = totalFetched;
316 
317  return hr;
318 }
TS_SELECTIONSTYLE style
Definition: textstor.idl:94
LPVOID get_Cookie_data(DWORD id)
Definition: msctf.c:248
DWORD lockType
Definition: context.c:82
HRESULT hr
Definition: shlfolder.c:183
GLuint GLuint GLsizei count
Definition: gl.h:1545
DWORD get_Cookie_magic(DWORD id)
Definition: msctf.c:235
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
static Context * impl_from_ITfContext(ITfContext *iface)
Definition: context.c:86
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_INVALIDARG
Definition: ddrawi.h:101
HRESULT Range_Constructor(ITfContext *context, ITextStoreACP *textstore, DWORD lockType, DWORD anchorStart, DWORD anchorEnd, ITfRange **ppOut) DECLSPEC_HIDDEN
Definition: range.c:329
LONG HRESULT
Definition: typedefs.h:77
#define COOKIE_MAGIC_EDITCOOKIE
unsigned long DWORD
Definition: ntddk_ex.h:95
ULONG ulIndex
Definition: symbols.c:92
#define S_OK
Definition: intsafe.h:59
TsActiveSelEnd ase
Definition: textstor.idl:86
#define E_NOTIMPL
Definition: ddrawi.h:99
unsigned int ULONG
Definition: retypes.h:1
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ Context_GetStart()

static HRESULT WINAPI Context_GetStart ( ITfContext iface,
TfEditCookie  ec,
ITfRange **  ppStart 
)
static

Definition at line 358 of file context.c.

360 {
362  EditCookie *cookie;
363  TRACE("(%p) %i %p\n",This,ec,ppStart);
364 
365  if (!ppStart)
366  return E_INVALIDARG;
367 
368  *ppStart = NULL;
369 
370  if (!This->connected)
371  return TF_E_DISCONNECTED;
372 
374  return TF_E_NOLOCK;
375 
376  cookie = get_Cookie_data(ec);
377  return Range_Constructor(iface, This->pITextStoreACP, cookie->lockType, 0, 0, ppStart);
378 }
LPVOID get_Cookie_data(DWORD id)
Definition: msctf.c:248
DWORD lockType
Definition: context.c:82
DWORD get_Cookie_magic(DWORD id)
Definition: msctf.c:235
static Context * impl_from_ITfContext(ITfContext *iface)
Definition: context.c:86
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
HRESULT Range_Constructor(ITfContext *context, ITextStoreACP *textstore, DWORD lockType, DWORD anchorStart, DWORD anchorEnd, ITfRange **ppOut) DECLSPEC_HIDDEN
Definition: range.c:329
#define TRACE(s)
Definition: solgame.cpp:4
#define COOKIE_MAGIC_EDITCOOKIE

◆ Context_GetStatus()

static HRESULT WINAPI Context_GetStatus ( ITfContext iface,
TF_STATUS *  pdcs 
)
static

Definition at line 427 of file context.c.

429 {
431  TRACE("(%p) %p\n",This,pdcs);
432 
433  if (!This->connected)
434  return TF_E_DISCONNECTED;
435 
436  if (!pdcs)
437  return E_INVALIDARG;
438 
439  if (!This->pITextStoreACP)
440  {
441  FIXME("Context does not have a ITextStoreACP\n");
442  return E_NOTIMPL;
443  }
444 
445  ITextStoreACP_GetStatus(This->pITextStoreACP, &This->documentStatus);
446 
447  *pdcs = This->documentStatus;
448 
449  return S_OK;
450 }
static Context * impl_from_ITfContext(ITfContext *iface)
Definition: context.c:86
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ Context_Initialize()

HRESULT Context_Initialize ( ITfContext iface,
ITfDocumentMgr manager 
)

Definition at line 1029 of file context.c.

1030 {
1031  Context *This = impl_from_ITfContext(iface);
1032 
1033  if (This->pITextStoreACP)
1034  ITextStoreACP_AdviseSink(This->pITextStoreACP, &IID_ITextStoreACPSink,
1035  (IUnknown*)&This->ITextStoreACPSink_iface, TS_AS_ALL_SINKS);
1036  This->connected = TRUE;
1037  This->manager = manager;
1038  return S_OK;
1039 }
#define TRUE
Definition: types.h:120
static Context * impl_from_ITfContext(ITfContext *iface)
Definition: context.c:86
const DWORD TS_AS_ALL_SINKS
Definition: textstor.idl:54
#define S_OK
Definition: intsafe.h:59

Referenced by DocumentMgr_Push().

◆ Context_InWriteSession()

static HRESULT WINAPI Context_InWriteSession ( ITfContext iface,
TfClientId  tid,
BOOL pfWriteSession 
)
static

Definition at line 251 of file context.c.

254 {
256  FIXME("STUB:(%p)\n",This);
257  return E_NOTIMPL;
258 }
static Context * impl_from_ITfContext(ITfContext *iface)
Definition: context.c:86
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ Context_QueryInterface()

static HRESULT WINAPI Context_QueryInterface ( ITfContext iface,
REFIID  iid,
LPVOID ppvOut 
)
static

Definition at line 144 of file context.c.

145 {
147  *ppvOut = NULL;
148 
149  if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_ITfContext))
150  {
151  *ppvOut = &This->ITfContext_iface;
152  }
153  else if (IsEqualIID(iid, &IID_ITfSource))
154  {
155  *ppvOut = &This->ITfSource_iface;
156  }
157  else if (IsEqualIID(iid, &IID_ITfInsertAtSelection))
158  {
159  *ppvOut = &This->ITfInsertAtSelection_iface;
160  }
161  else if (IsEqualIID(iid, &IID_ITfCompartmentMgr))
162  {
163  *ppvOut = This->CompartmentMgr;
164  }
165  else if (IsEqualIID(iid, &IID_ITfSourceSingle))
166  {
167  *ppvOut = &This->ITfSourceSingle_iface;
168  }
169 
170  if (*ppvOut)
171  {
172  ITfContext_AddRef(iface);
173  return S_OK;
174  }
175 
176  WARN("unsupported interface: %s\n", debugstr_guid(iid));
177  return E_NOINTERFACE;
178 }
#define E_NOINTERFACE
Definition: winerror.h:2364
#define WARN(fmt,...)
Definition: debug.h:111
static Context * impl_from_ITfContext(ITfContext *iface)
Definition: context.c:86
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:59
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:90

◆ Context_Release()

static ULONG WINAPI Context_Release ( ITfContext iface)
static

Definition at line 186 of file context.c.

187 {
189  ULONG ret;
190 
191  ret = InterlockedDecrement(&This->refCount);
192  if (ret == 0)
194  return ret;
195 }
static Context * impl_from_ITfContext(ITfContext *iface)
Definition: context.c:86
int ret
#define InterlockedDecrement
Definition: armddk.h:52
static void Context_Destructor(Context *This)
Definition: context.c:116
unsigned int ULONG
Definition: retypes.h:1

◆ Context_RequestEditSession()

static HRESULT WINAPI Context_RequestEditSession ( ITfContext iface,
TfClientId  tid,
ITfEditSession pes,
DWORD  dwFlags,
HRESULT phrSession 
)
static

Definition at line 200 of file context.c.

203 {
205  HRESULT hr;
206  DWORD dwLockFlags = 0x0;
207 
208  TRACE("(%p) %i %p %x %p\n",This, tid, pes, dwFlags, phrSession);
209 
210  if (!(dwFlags & TF_ES_READ) && !(dwFlags & TF_ES_READWRITE))
211  {
212  *phrSession = E_FAIL;
213  return E_INVALIDARG;
214  }
215 
216  if (!This->pITextStoreACP)
217  {
218  FIXME("No ITextStoreACP available\n");
219  *phrSession = E_FAIL;
220  return E_FAIL;
221  }
222 
223  if (!(dwFlags & TF_ES_ASYNC))
224  dwLockFlags |= TS_LF_SYNC;
225 
226  if ((dwFlags & TF_ES_READWRITE) == TF_ES_READWRITE)
227  dwLockFlags |= TS_LF_READWRITE;
228  else if (dwFlags & TF_ES_READ)
229  dwLockFlags |= TS_LF_READ;
230 
231  if (!This->documentStatus.dwDynamicFlags)
232  ITextStoreACP_GetStatus(This->pITextStoreACP, &This->documentStatus);
233 
234  if (((dwFlags & TF_ES_READWRITE) == TF_ES_READWRITE) && (This->documentStatus.dwDynamicFlags & TS_SD_READONLY))
235  {
236  *phrSession = TS_E_READONLY;
237  return S_OK;
238  }
239 
240  if (FAILED (ITfEditSession_QueryInterface(pes, &IID_ITfEditSession, (LPVOID*)&This->currentEditSession)))
241  {
242  *phrSession = E_FAIL;
243  return E_INVALIDARG;
244  }
245 
246  hr = ITextStoreACP_RequestLock(This->pITextStoreACP, dwLockFlags, phrSession);
247 
248  return hr;
249 }
HRESULT hr
Definition: shlfolder.c:183
const DWORD TS_LF_READWRITE
Definition: textstor.idl:58
#define E_FAIL
Definition: ddrawi.h:102
static Context * impl_from_ITfContext(ITfContext *iface)
Definition: context.c:86
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
unsigned long DWORD
Definition: ntddk_ex.h:95
const DWORD TS_LF_READ
Definition: textstor.idl:57
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
const DWORD TS_LF_SYNC
Definition: textstor.idl:56
#define S_OK
Definition: intsafe.h:59
const DWORD TS_SD_READONLY
Definition: textstor.idl:40
static TfClientId tid

◆ Context_SetSelection()

static HRESULT WINAPI Context_SetSelection ( ITfContext iface,
TfEditCookie  ec,
ULONG  ulCount,
const TF_SELECTION *  pSelection 
)
static

Definition at line 320 of file context.c.

322 {
324  TS_SELECTION_ACP *acp;
325  ULONG i;
326  HRESULT hr;
327 
328  TRACE("(%p) %i %i %p\n",This,ec,ulCount,pSelection);
329 
330  if (!This->pITextStoreACP)
331  {
332  FIXME("Context does not have a ITextStoreACP\n");
333  return E_NOTIMPL;
334  }
335 
337  return TF_E_NOLOCK;
338 
339  acp = HeapAlloc(GetProcessHeap(), 0, sizeof(TS_SELECTION_ACP) * ulCount);
340  if (!acp)
341  return E_OUTOFMEMORY;
342 
343  for (i = 0; i < ulCount; i++)
344  if (FAILED(TF_SELECTION_to_TS_SELECTION_ACP(&pSelection[i], &acp[i])))
345  {
346  TRACE("Selection Conversion Failed\n");
347  HeapFree(GetProcessHeap(), 0 , acp);
348  return E_FAIL;
349  }
350 
351  hr = ITextStoreACP_SetSelection(This->pITextStoreACP, ulCount, acp);
352 
353  HeapFree(GetProcessHeap(), 0, acp);
354 
355  return hr;
356 }
HRESULT hr
Definition: shlfolder.c:183
DWORD get_Cookie_magic(DWORD id)
Definition: msctf.c:235
#define E_FAIL
Definition: ddrawi.h:102
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
static Context * impl_from_ITfContext(ITfContext *iface)
Definition: context.c:86
#define FIXME(fmt,...)
Definition: debug.h:110
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
LONG HRESULT
Definition: typedefs.h:77
#define COOKIE_MAGIC_EDITCOOKIE
#define E_NOTIMPL
Definition: ddrawi.h:99
unsigned int ULONG
Definition: retypes.h:1
HRESULT TF_SELECTION_to_TS_SELECTION_ACP(const TF_SELECTION *tf, TS_SELECTION_ACP *tsAcp) DECLSPEC_HIDDEN
Definition: range.c:355
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ Context_TrackProperties()

static HRESULT WINAPI Context_TrackProperties ( ITfContext iface,
const GUID **  prgProp,
ULONG  cProp,
const GUID **  prgAppProp,
ULONG  cAppProp,
ITfReadOnlyProperty **  ppProperty 
)
static

Definition at line 468 of file context.c.

471 {
473  FIXME("STUB:(%p)\n",This);
474  return E_NOTIMPL;
475 }
static Context * impl_from_ITfContext(ITfContext *iface)
Definition: context.c:86
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ Context_Uninitialize()

HRESULT Context_Uninitialize ( ITfContext iface)

Definition at line 1041 of file context.c.

1042 {
1043  Context *This = impl_from_ITfContext(iface);
1044 
1045  if (This->pITextStoreACP)
1046  ITextStoreACP_UnadviseSink(This->pITextStoreACP, (IUnknown*)&This->ITextStoreACPSink_iface);
1047  This->connected = FALSE;
1048  This->manager = NULL;
1049  return S_OK;
1050 }
static Context * impl_from_ITfContext(ITfContext *iface)
Definition: context.c:86
smooth NULL
Definition: ftsmooth.c:416
#define S_OK
Definition: intsafe.h:59

Referenced by DocumentMgr_Pop().

◆ ContextSource_AddRef()

static ULONG WINAPI ContextSource_AddRef ( ITfSource iface)
static

Definition at line 539 of file context.c.

540 {
541  Context *This = impl_from_ITfSource(iface);
542  return ITfContext_AddRef(&This->ITfContext_iface);
543 }
static Context * impl_from_ITfSource(ITfSource *iface)
Definition: context.c:91

◆ ContextSource_AdviseSink()

static HRESULT WINAPI ContextSource_AdviseSink ( ITfSource iface,
REFIID  riid,
IUnknown punk,
DWORD pdwCookie 
)
static

Definition at line 554 of file context.c.

556 {
557  Context *This = impl_from_ITfSource(iface);
558 
559  TRACE("(%p) %s %p %p\n",This,debugstr_guid(riid),punk,pdwCookie);
560 
561  if (!riid || !punk || !pdwCookie)
562  return E_INVALIDARG;
563 
564  if (IsEqualIID(riid, &IID_ITfTextEditSink))
565  return advise_sink(&This->pTextEditSink, &IID_ITfTextEditSink, COOKIE_MAGIC_CONTEXTSINK, punk, pdwCookie);
566 
567  FIXME("(%p) Unhandled Sink: %s\n",This,debugstr_guid(riid));
568  return E_NOTIMPL;
569 }
REFIID riid
Definition: precomp.h:44
HRESULT advise_sink(struct list *sink_list, REFIID riid, DWORD cookie_magic, IUnknown *unk, DWORD *cookie)
Definition: msctf.c:287
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_INVALIDARG
Definition: ddrawi.h:101
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
static Context * impl_from_ITfSource(ITfSource *iface)
Definition: context.c:91
#define COOKIE_MAGIC_CONTEXTSINK
#define E_NOTIMPL
Definition: ddrawi.h:99
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:90

◆ ContextSource_QueryInterface()

static HRESULT WINAPI ContextSource_QueryInterface ( ITfSource iface,
REFIID  iid,
LPVOID ppvOut 
)
static

Definition at line 533 of file context.c.

534 {
535  Context *This = impl_from_ITfSource(iface);
536  return ITfContext_QueryInterface(&This->ITfContext_iface, iid, ppvOut);
537 }
static Context * impl_from_ITfSource(ITfSource *iface)
Definition: context.c:91

◆ ContextSource_Release()

static ULONG WINAPI ContextSource_Release ( ITfSource iface)
static

Definition at line 545 of file context.c.

546 {
547  Context *This = impl_from_ITfSource(iface);
548  return ITfContext_Release(&This->ITfContext_iface);
549 }
static Context * impl_from_ITfSource(ITfSource *iface)
Definition: context.c:91

◆ ContextSource_UnadviseSink()

static HRESULT WINAPI ContextSource_UnadviseSink ( ITfSource iface,
DWORD  pdwCookie 
)
static

Definition at line 571 of file context.c.

572 {
573  Context *This = impl_from_ITfSource(iface);
574 
575  TRACE("(%p) %x\n",This,pdwCookie);
576 
578  return E_INVALIDARG;
579 
580  return unadvise_sink(pdwCookie);
581 }
DWORD get_Cookie_magic(DWORD id)
Definition: msctf.c:235
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
static Context * impl_from_ITfSource(ITfSource *iface)
Definition: context.c:91
#define COOKIE_MAGIC_CONTEXTSINK
HRESULT unadvise_sink(DWORD cookie)
Definition: msctf.c:314

◆ impl_from_ITextStoreACPServices()

static Context* impl_from_ITextStoreACPServices ( ITextStoreACPServices iface)
inlinestatic

Definition at line 111 of file context.c.

112 {
113  return CONTAINING_RECORD(iface, Context, ITextStoreACPServices_iface);
114 }
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 TextStoreACPServices_AddRef(), TextStoreACPServices_CreateRange(), TextStoreACPServices_ForceLoadProperty(), TextStoreACPServices_QueryInterface(), TextStoreACPServices_Release(), TextStoreACPServices_Serialize(), and TextStoreACPServices_Unserialize().

◆ impl_from_ITextStoreACPSink()

static Context* impl_from_ITextStoreACPSink ( ITextStoreACPSink iface)
inlinestatic

Definition at line 106 of file context.c.

107 {
108  return CONTAINING_RECORD(iface, Context, ITextStoreACPSink_iface);
109 }
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 TextStoreACPSink_AddRef(), TextStoreACPSink_OnAttrsChange(), TextStoreACPSink_OnEndEditTransaction(), TextStoreACPSink_OnLayoutChange(), TextStoreACPSink_OnLockGranted(), TextStoreACPSink_OnSelectionChange(), TextStoreACPSink_OnStartEditTransaction(), TextStoreACPSink_OnStatusChange(), TextStoreACPSink_OnTextChange(), TextStoreACPSink_QueryInterface(), and TextStoreACPSink_Release().

◆ impl_from_ITfContext()

static Context* impl_from_ITfContext ( ITfContext iface)
inlinestatic

Definition at line 86 of file context.c.

87 {
88  return CONTAINING_RECORD(iface, Context, ITfContext_iface);
89 }
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 Context_AddRef(), Context_CreateRangeBackup(), Context_EnumProperties(), Context_EnumViews(), Context_GetActiveView(), Context_GetAppProperty(), Context_GetDocumentMgr(), Context_GetEnd(), Context_GetProperty(), Context_GetSelection(), Context_GetStart(), Context_GetStatus(), Context_Initialize(), Context_InWriteSession(), Context_QueryInterface(), Context_Release(), Context_RequestEditSession(), Context_SetSelection(), Context_TrackProperties(), and Context_Uninitialize().

◆ impl_from_ITfInsertAtSelection()

static Context* impl_from_ITfInsertAtSelection ( ITfInsertAtSelection iface)
inlinestatic

Definition at line 96 of file context.c.

97 {
98  return CONTAINING_RECORD(iface, Context, ITfInsertAtSelection_iface);
99 }
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 InsertAtSelection_AddRef(), InsertAtSelection_InsertEmbeddedAtSelection(), InsertAtSelection_InsertTextAtSelection(), InsertAtSelection_QueryInterface(), and InsertAtSelection_Release().

◆ impl_from_ITfSource()

static Context* impl_from_ITfSource ( ITfSource iface)
inlinestatic

Definition at line 91 of file context.c.

92 {
93  return CONTAINING_RECORD(iface, Context, ITfSource_iface);
94 }
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 ContextSource_AddRef(), ContextSource_AdviseSink(), ContextSource_QueryInterface(), ContextSource_Release(), and ContextSource_UnadviseSink().

◆ impl_from_ITfSourceSingle()

static Context* impl_from_ITfSourceSingle ( ITfSourceSingle iface)
inlinestatic

Definition at line 101 of file context.c.

102 {
103  return CONTAINING_RECORD(iface, Context, ITfSourceSingle_iface);
104 }
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 SourceSingle_AddRef(), SourceSingle_AdviseSingleSink(), SourceSingle_QueryInterface(), SourceSingle_Release(), and SourceSingle_UnadviseSingleSink().

◆ InsertAtSelection_AddRef()

static ULONG WINAPI InsertAtSelection_AddRef ( ITfInsertAtSelection iface)
static

Definition at line 601 of file context.c.

602 {
604  return ITfContext_AddRef(&This->ITfContext_iface);
605 }
static Context * impl_from_ITfInsertAtSelection(ITfInsertAtSelection *iface)
Definition: context.c:96

◆ InsertAtSelection_InsertEmbeddedAtSelection()

static HRESULT WINAPI InsertAtSelection_InsertEmbeddedAtSelection ( ITfInsertAtSelection iface,
TfEditCookie  ec,
DWORD  dwFlags,
IDataObject pDataObject,
ITfRange **  ppRange 
)
static

Definition at line 649 of file context.c.

652 {
654  FIXME("STUB:(%p)\n",This);
655  return E_NOTIMPL;
656 }
#define FIXME(fmt,...)
Definition: debug.h:110
static Context * impl_from_ITfInsertAtSelection(ITfInsertAtSelection *iface)
Definition: context.c:96
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ InsertAtSelection_InsertTextAtSelection()

static HRESULT WINAPI InsertAtSelection_InsertTextAtSelection ( ITfInsertAtSelection iface,
TfEditCookie  ec,
DWORD  dwFlags,
const WCHAR pchText,
LONG  cch,
ITfRange **  ppRange 
)
static

Definition at line 613 of file context.c.

616 {
618  EditCookie *cookie;
619  LONG acpStart, acpEnd;
620  TS_TEXTCHANGE change;
621  HRESULT hr;
622 
623  TRACE("(%p) %i %x %s %p\n",This, ec, dwFlags, debugstr_wn(pchText,cch), ppRange);
624 
625  if (!This->connected)
626  return TF_E_DISCONNECTED;
627 
629  return TF_E_NOLOCK;
630 
631  cookie = get_Cookie_data(ec);
632 
633  if ((cookie->lockType & TS_LF_READWRITE) != TS_LF_READWRITE )
634  return TS_E_READONLY;
635 
636  if (!This->pITextStoreACP)
637  {
638  FIXME("Context does not have a ITextStoreACP\n");
639  return E_NOTIMPL;
640  }
641 
642  hr = ITextStoreACP_InsertTextAtSelection(This->pITextStoreACP, dwFlags, pchText, cch, &acpStart, &acpEnd, &change);
643  if (SUCCEEDED(hr))
644  Range_Constructor(&This->ITfContext_iface, This->pITextStoreACP, cookie->lockType, change.acpStart, change.acpNewEnd, ppRange);
645 
646  return hr;
647 }
LPVOID get_Cookie_data(DWORD id)
Definition: msctf.c:248
DWORD lockType
Definition: context.c:82
HRESULT hr
Definition: shlfolder.c:183
const DWORD TS_LF_READWRITE
Definition: textstor.idl:58
DWORD get_Cookie_magic(DWORD id)
Definition: msctf.c:235
LONG acpNewEnd
Definition: textstor.idl:81
long LONG
Definition: pedump.c:60
#define FIXME(fmt,...)
Definition: debug.h:110
static DWORD DWORD void LPSTR DWORD cch
Definition: str.c:201
static Context * impl_from_ITfInsertAtSelection(ITfInsertAtSelection *iface)
Definition: context.c:96
HRESULT Range_Constructor(ITfContext *context, ITextStoreACP *textstore, DWORD lockType, DWORD anchorStart, DWORD anchorEnd, ITfRange **ppOut) DECLSPEC_HIDDEN
Definition: range.c:329
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
#define COOKIE_MAGIC_EDITCOOKIE
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define debugstr_wn
Definition: kernel32.h:33
#define E_NOTIMPL
Definition: ddrawi.h:99
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ InsertAtSelection_QueryInterface()

static HRESULT WINAPI InsertAtSelection_QueryInterface ( ITfInsertAtSelection iface,
REFIID  iid,
LPVOID ppvOut 
)
static

Definition at line 595 of file context.c.

596 {
598  return ITfContext_QueryInterface(&This->ITfContext_iface, iid, ppvOut);
599 }
static Context * impl_from_ITfInsertAtSelection(ITfInsertAtSelection *iface)
Definition: context.c:96

◆ InsertAtSelection_Release()

static ULONG WINAPI InsertAtSelection_Release ( ITfInsertAtSelection iface)
static

Definition at line 607 of file context.c.

608 {
610  return ITfContext_Release(&This->ITfContext_iface);
611 }
static Context * impl_from_ITfInsertAtSelection(ITfInsertAtSelection *iface)
Definition: context.c:96

◆ SourceSingle_AddRef()

static ULONG WINAPI SourceSingle_AddRef ( ITfSourceSingle iface)
static

Definition at line 676 of file context.c.

677 {
679  return ITfContext_AddRef(&This->ITfContext_iface);
680 }
static Context * impl_from_ITfSourceSingle(ITfSourceSingle *iface)
Definition: context.c:101

◆ SourceSingle_AdviseSingleSink()

static HRESULT WINAPI SourceSingle_AdviseSingleSink ( ITfSourceSingle iface,
TfClientId  tid,
REFIID  riid,
IUnknown punk 
)
static

Definition at line 688 of file context.c.

690 {
692  FIXME("STUB:(%p) %i %s %p\n",This, tid, debugstr_guid(riid),punk);
693  return E_NOTIMPL;
694 }
static Context * impl_from_ITfSourceSingle(ITfSourceSingle *iface)
Definition: context.c:101
REFIID riid
Definition: precomp.h:44
#define FIXME(fmt,...)
Definition: debug.h:110
#define debugstr_guid
Definition: kernel32.h:35
#define E_NOTIMPL
Definition: ddrawi.h:99
static TfClientId tid

◆ SourceSingle_QueryInterface()

static HRESULT WINAPI SourceSingle_QueryInterface ( ITfSourceSingle iface,
REFIID  iid,
LPVOID ppvOut 
)
static

Definition at line 670 of file context.c.

671 {
673  return ITfContext_QueryInterface(&This->ITfContext_iface, iid, ppvOut);
674 }
static Context * impl_from_ITfSourceSingle(ITfSourceSingle *iface)
Definition: context.c:101

◆ SourceSingle_Release()

static ULONG WINAPI SourceSingle_Release ( ITfSourceSingle iface)
static

Definition at line 682 of file context.c.

683 {
685  return ITfContext_Release(&This->ITfContext_iface);
686 }
static Context * impl_from_ITfSourceSingle(ITfSourceSingle *iface)
Definition: context.c:101

◆ SourceSingle_UnadviseSingleSink()

static HRESULT WINAPI SourceSingle_UnadviseSingleSink ( ITfSourceSingle iface,
TfClientId  tid,
REFIID  riid 
)
static

Definition at line 696 of file context.c.

698 {
700  FIXME("STUB:(%p) %i %s\n",This, tid, debugstr_guid(riid));
701  return E_NOTIMPL;
702 }
static Context * impl_from_ITfSourceSingle(ITfSourceSingle *iface)
Definition: context.c:101
REFIID riid
Definition: precomp.h:44
#define FIXME(fmt,...)
Definition: debug.h:110
#define debugstr_guid
Definition: kernel32.h:35
#define E_NOTIMPL
Definition: ddrawi.h:99
static TfClientId tid

◆ TextStoreACPServices_AddRef()

static ULONG WINAPI TextStoreACPServices_AddRef ( ITextStoreACPServices iface)
static

Definition at line 906 of file context.c.

907 {
909  return ITextStoreACPSink_AddRef(&This->ITextStoreACPSink_iface);
910 }
static Context * impl_from_ITextStoreACPServices(ITextStoreACPServices *iface)
Definition: context.c:111

◆ TextStoreACPServices_CreateRange()

static HRESULT WINAPI TextStoreACPServices_CreateRange ( ITextStoreACPServices iface,
LONG  start,
LONG  end,
ITfRangeACP **  range 
)
static

Definition at line 947 of file context.c.

949 {
951 
952  FIXME("stub: %p %d %d %p\n", This, start, end, range);
953 
954  return S_OK;
955 }
static Context * impl_from_ITextStoreACPServices(ITextStoreACPServices *iface)
Definition: context.c:111
GLuint GLuint end
Definition: gl.h:1545
#define FIXME(fmt,...)
Definition: debug.h:110
GLenum GLint * range
Definition: glext.h:7539
#define S_OK
Definition: intsafe.h:59
GLuint start
Definition: gl.h:1545

◆ TextStoreACPServices_ForceLoadProperty()

static HRESULT WINAPI TextStoreACPServices_ForceLoadProperty ( ITextStoreACPServices iface,
ITfProperty prop 
)
static

Definition at line 938 of file context.c.

939 {
941 
942  FIXME("stub: %p %p\n", This, prop);
943 
944  return E_NOTIMPL;
945 }
static Context * impl_from_ITextStoreACPServices(ITextStoreACPServices *iface)
Definition: context.c:111
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ TextStoreACPServices_QueryInterface()

static HRESULT WINAPI TextStoreACPServices_QueryInterface ( ITextStoreACPServices iface,
REFIID  riid,
void **  obj 
)
static

Definition at line 900 of file context.c.

901 {
903  return ITextStoreACPSink_QueryInterface(&This->ITextStoreACPSink_iface, riid, obj);
904 }
REFIID riid
Definition: precomp.h:44
static Context * impl_from_ITextStoreACPServices(ITextStoreACPServices *iface)
Definition: context.c:111

◆ TextStoreACPServices_Release()

static ULONG WINAPI TextStoreACPServices_Release ( ITextStoreACPServices iface)
static

Definition at line 912 of file context.c.

913 {
915  return ITextStoreACPSink_Release(&This->ITextStoreACPSink_iface);
916 }
static Context * impl_from_ITextStoreACPServices(ITextStoreACPServices *iface)
Definition: context.c:111

◆ TextStoreACPServices_Serialize()

static HRESULT WINAPI TextStoreACPServices_Serialize ( ITextStoreACPServices iface,
ITfProperty prop,
ITfRange range,
TF_PERSISTENT_PROPERTY_HEADER_ACP header,
IStream stream 
)
static

Definition at line 918 of file context.c.

920 {
922 
923  FIXME("stub: %p %p %p %p %p\n", This, prop, range, header, stream);
924 
925  return E_NOTIMPL;
926 }
static Context * impl_from_ITextStoreACPServices(ITextStoreACPServices *iface)
Definition: context.c:111
#define FIXME(fmt,...)
Definition: debug.h:110
Definition: parse.h:22
GLenum GLint * range
Definition: glext.h:7539
#define E_NOTIMPL
Definition: ddrawi.h:99
struct CFHEADER header
Definition: fdi.c:109

◆ TextStoreACPServices_Unserialize()

static HRESULT WINAPI TextStoreACPServices_Unserialize ( ITextStoreACPServices iface,
ITfProperty prop,
const TF_PERSISTENT_PROPERTY_HEADER_ACP header,
IStream stream,
ITfPersistentPropertyLoaderACP loader 
)
static

Definition at line 928 of file context.c.

930 {
932 
933  FIXME("stub: %p %p %p %p %p\n", This, prop, header, stream, loader);
934 
935  return E_NOTIMPL;
936 }
static Context * impl_from_ITextStoreACPServices(ITextStoreACPServices *iface)
Definition: context.c:111
#define FIXME(fmt,...)
Definition: debug.h:110
Definition: parse.h:22
#define E_NOTIMPL
Definition: ddrawi.h:99
struct CFHEADER header
Definition: fdi.c:109

◆ TextStoreACPSink_AddRef()

static ULONG WINAPI TextStoreACPSink_AddRef ( ITextStoreACPSink iface)
static

Definition at line 740 of file context.c.

741 {
743  return ITfContext_AddRef(&This->ITfContext_iface);
744 }
static Context * impl_from_ITextStoreACPSink(ITextStoreACPSink *iface)
Definition: context.c:106

◆ TextStoreACPSink_OnAttrsChange()

static HRESULT WINAPI TextStoreACPSink_OnAttrsChange ( ITextStoreACPSink iface,
LONG  acpStart,
LONG  acpEnd,
ULONG  cAttrs,
const TS_ATTRID paAttrs 
)
static

Definition at line 801 of file context.c.

803 {
805  FIXME("STUB:(%p)\n",This);
806  return E_NOTIMPL;
807 }
#define FIXME(fmt,...)
Definition: debug.h:110
static Context * impl_from_ITextStoreACPSink(ITextStoreACPSink *iface)
Definition: context.c:106
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ TextStoreACPSink_OnEndEditTransaction()

static HRESULT WINAPI TextStoreACPSink_OnEndEditTransaction ( ITextStoreACPSink iface)
static

Definition at line 878 of file context.c.

879 {
881  FIXME("STUB:(%p)\n",This);
882  return E_NOTIMPL;
883 }
#define FIXME(fmt,...)
Definition: debug.h:110
static Context * impl_from_ITextStoreACPSink(ITextStoreACPSink *iface)
Definition: context.c:106
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ TextStoreACPSink_OnLayoutChange()

static HRESULT WINAPI TextStoreACPSink_OnLayoutChange ( ITextStoreACPSink iface,
TsLayoutCode  lcode,
TsViewCookie  vcView 
)
static

Definition at line 771 of file context.c.

773 {
775  FIXME("STUB:(%p)\n",This);
776  return S_OK;
777 }
#define FIXME(fmt,...)
Definition: debug.h:110
static Context * impl_from_ITextStoreACPSink(ITextStoreACPSink *iface)
Definition: context.c:106
#define S_OK
Definition: intsafe.h:59

◆ TextStoreACPSink_OnLockGranted()

static HRESULT WINAPI TextStoreACPSink_OnLockGranted ( ITextStoreACPSink iface,
DWORD  dwLockFlags 
)
static

Definition at line 809 of file context.c.

811 {
813  HRESULT hr;
814  EditCookie *cookie,*sinkcookie;
815  TfEditCookie ec;
816  struct list *cursor;
817 
818  TRACE("(%p) %x\n",This, dwLockFlags);
819 
820  if (!This->currentEditSession)
821  {
822  FIXME("OnLockGranted called for something other than an EditSession\n");
823  return S_OK;
824  }
825 
826  cookie = HeapAlloc(GetProcessHeap(),0,sizeof(EditCookie));
827  if (!cookie)
828  return E_OUTOFMEMORY;
829 
830  sinkcookie = HeapAlloc(GetProcessHeap(),0,sizeof(EditCookie));
831  if (!sinkcookie)
832  {
833  HeapFree(GetProcessHeap(), 0, cookie);
834  return E_OUTOFMEMORY;
835  }
836 
837  cookie->lockType = dwLockFlags;
838  cookie->pOwningContext = This;
840 
841  hr = ITfEditSession_DoEditSession(This->currentEditSession, ec);
842 
843  if ((dwLockFlags&TS_LF_READWRITE) == TS_LF_READWRITE)
844  {
846  TfEditCookie sc;
847 
848  sinkcookie->lockType = TS_LF_READ;
849  sinkcookie->pOwningContext = This;
850  sc = generate_Cookie(COOKIE_MAGIC_EDITCOOKIE, sinkcookie);
851 
852  /*TODO: implement ITfEditRecord */
853  SINK_FOR_EACH(cursor, &This->pTextEditSink, ITfTextEditSink, sink)
854  {
855  ITfTextEditSink_OnEndEdit(sink, (ITfContext*) &This->ITfContext_iface, sc, NULL);
856  }
857  sinkcookie = remove_Cookie(sc);
858  }
859  HeapFree(GetProcessHeap(),0,sinkcookie);
860 
861  ITfEditSession_Release(This->currentEditSession);
862  This->currentEditSession = NULL;
863 
864  /* Edit Cookie is only valid during the edit session */
865  cookie = remove_Cookie(ec);
866  HeapFree(GetProcessHeap(),0,cookie);
867 
868  return hr;
869 }
DWORD lockType
Definition: context.c:82
HRESULT hr
Definition: shlfolder.c:183
DWORD TfEditCookie
Definition: msctf.idl:67
#define SINK_FOR_EACH(cursor, list, type, elem)
const DWORD TS_LF_READWRITE
Definition: textstor.idl:58
GLsizei GLenum GLboolean sink
Definition: glext.h:5672
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
LPVOID remove_Cookie(DWORD id)
Definition: msctf.c:261
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
Context * pOwningContext
Definition: context.c:83
static Context * impl_from_ITextStoreACPSink(ITextStoreACPSink *iface)
Definition: context.c:106
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
LONG HRESULT
Definition: typedefs.h:77
#define COOKIE_MAGIC_EDITCOOKIE
const DWORD TS_LF_READ
Definition: textstor.idl:57
Definition: _list.h:228
#define S_OK
Definition: intsafe.h:59
const char cursor[]
Definition: icontest.c:13
#define HeapFree(x, y, z)
Definition: compat.h:394
DWORD generate_Cookie(DWORD magic, LPVOID data)
Definition: msctf.c:191

◆ TextStoreACPSink_OnSelectionChange()

static HRESULT WINAPI TextStoreACPSink_OnSelectionChange ( ITextStoreACPSink iface)
static

Definition at line 764 of file context.c.

765 {
767  FIXME("STUB:(%p)\n",This);
768  return S_OK;
769 }
#define FIXME(fmt,...)
Definition: debug.h:110
static Context * impl_from_ITextStoreACPSink(ITextStoreACPSink *iface)
Definition: context.c:106
#define S_OK
Definition: intsafe.h:59

◆ TextStoreACPSink_OnStartEditTransaction()

static HRESULT WINAPI TextStoreACPSink_OnStartEditTransaction ( ITextStoreACPSink iface)
static

Definition at line 871 of file context.c.

872 {
874  FIXME("STUB:(%p)\n",This);
875  return E_NOTIMPL;
876 }
#define FIXME(fmt,...)
Definition: debug.h:110
static Context * impl_from_ITextStoreACPSink(ITextStoreACPSink *iface)
Definition: context.c:106
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ TextStoreACPSink_OnStatusChange()

static HRESULT WINAPI TextStoreACPSink_OnStatusChange ( ITextStoreACPSink iface,
DWORD  dwFlags 
)
static

Definition at line 779 of file context.c.

781 {
783  HRESULT hr, hrSession;
784 
785  TRACE("(%p) %x\n",This, dwFlags);
786 
787  if (!This->pITextStoreACP)
788  {
789  FIXME("Context does not have a ITextStoreACP\n");
790  return E_NOTIMPL;
791  }
792 
793  hr = ITextStoreACP_RequestLock(This->pITextStoreACP, TS_LF_READ, &hrSession);
794 
795  if(SUCCEEDED(hr) && SUCCEEDED(hrSession))
796  This->documentStatus.dwDynamicFlags = dwFlags;
797 
798  return S_OK;
799 }
HRESULT hr
Definition: shlfolder.c:183
#define FIXME(fmt,...)
Definition: debug.h:110
static Context * impl_from_ITextStoreACPSink(ITextStoreACPSink *iface)
Definition: context.c:106
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
const DWORD TS_LF_READ
Definition: textstor.idl:57
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define S_OK
Definition: intsafe.h:59
#define E_NOTIMPL
Definition: ddrawi.h:99
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ TextStoreACPSink_OnTextChange()

static HRESULT WINAPI TextStoreACPSink_OnTextChange ( ITextStoreACPSink iface,
DWORD  dwFlags,
const TS_TEXTCHANGE pChange 
)
static

Definition at line 756 of file context.c.

758 {
760  FIXME("STUB:(%p)\n",This);
761  return S_OK;
762 }
#define FIXME(fmt,...)
Definition: debug.h:110
static Context * impl_from_ITextStoreACPSink(ITextStoreACPSink *iface)
Definition: context.c:106
#define S_OK
Definition: intsafe.h:59

◆ TextStoreACPSink_QueryInterface()

static HRESULT WINAPI TextStoreACPSink_QueryInterface ( ITextStoreACPSink iface,
REFIID  iid,
LPVOID ppvOut 
)
static

Definition at line 717 of file context.c.

718 {
720 
721  *ppvOut = NULL;
722 
723  if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_ITextStoreACPSink))
724  {
725  *ppvOut = &This->ITextStoreACPSink_iface;
726  }
727  else if (IsEqualIID(iid, &IID_ITextStoreACPServices))
728  *ppvOut = &This->ITextStoreACPServices_iface;
729 
730  if (*ppvOut)
731  {
732  ITextStoreACPSink_AddRef(iface);
733  return S_OK;
734  }
735 
736  WARN("unsupported interface: %s\n", debugstr_guid(iid));
737  return E_NOINTERFACE;
738 }
#define E_NOINTERFACE
Definition: winerror.h:2364
#define WARN(fmt,...)
Definition: debug.h:111
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
static Context * impl_from_ITextStoreACPSink(ITextStoreACPSink *iface)
Definition: context.c:106
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:59
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:90

◆ TextStoreACPSink_Release()

static ULONG WINAPI TextStoreACPSink_Release ( ITextStoreACPSink iface)
static

Definition at line 746 of file context.c.

747 {
749  return ITfContext_Release(&This->ITfContext_iface);
750 }
static Context * impl_from_ITextStoreACPSink(ITextStoreACPSink *iface)
Definition: context.c:106

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( msctf  )

Variable Documentation

◆ ContextSourceSingleVtbl

const ITfSourceSingleVtbl ContextSourceSingleVtbl
static
Initial value:
=
{
}
static HRESULT WINAPI SourceSingle_AdviseSingleSink(ITfSourceSingle *iface, TfClientId tid, REFIID riid, IUnknown *punk)
Definition: context.c:688
static ULONG WINAPI SourceSingle_Release(ITfSourceSingle *iface)
Definition: context.c:682
static HRESULT WINAPI SourceSingle_UnadviseSingleSink(ITfSourceSingle *iface, TfClientId tid, REFIID riid)
Definition: context.c:696
static ULONG WINAPI SourceSingle_AddRef(ITfSourceSingle *iface)
Definition: context.c:676
static HRESULT WINAPI SourceSingle_QueryInterface(ITfSourceSingle *iface, REFIID iid, LPVOID *ppvOut)
Definition: context.c:670

Definition at line 704 of file context.c.

Referenced by Context_Constructor().

◆ ContextSourceVtbl

const ITfSourceVtbl ContextSourceVtbl
static
Initial value:
=
{
}
static HRESULT WINAPI ContextSource_AdviseSink(ITfSource *iface, REFIID riid, IUnknown *punk, DWORD *pdwCookie)
Definition: context.c:554
static HRESULT WINAPI ContextSource_QueryInterface(ITfSource *iface, REFIID iid, LPVOID *ppvOut)
Definition: context.c:533
static ULONG WINAPI ContextSource_Release(ITfSource *iface)
Definition: context.c:545
static HRESULT WINAPI ContextSource_UnadviseSink(ITfSource *iface, DWORD pdwCookie)
Definition: context.c:571
static ULONG WINAPI ContextSource_AddRef(ITfSource *iface)
Definition: context.c:539

Definition at line 583 of file context.c.

Referenced by Context_Constructor().

◆ ContextVtbl

const ITfContextVtbl ContextVtbl
static
Initial value:
=
{
}
static HRESULT WINAPI Context_TrackProperties(ITfContext *iface, const GUID **prgProp, ULONG cProp, const GUID **prgAppProp, ULONG cAppProp, ITfReadOnlyProperty **ppProperty)
Definition: context.c:468
static HRESULT WINAPI Context_RequestEditSession(ITfContext *iface, TfClientId tid, ITfEditSession *pes, DWORD dwFlags, HRESULT *phrSession)
Definition: context.c:200
static HRESULT WINAPI Context_CreateRangeBackup(ITfContext *iface, TfEditCookie ec, ITfRange *pRange, ITfRangeBackup **ppBackup)
Definition: context.c:503
static HRESULT WINAPI Context_GetDocumentMgr(ITfContext *iface, ITfDocumentMgr **ppDm)
Definition: context.c:485
static HRESULT WINAPI Context_EnumViews(ITfContext *iface, IEnumTfContextViews **ppEnum)
Definition: context.c:419
static HRESULT WINAPI Context_SetSelection(ITfContext *iface, TfEditCookie ec, ULONG ulCount, const TF_SELECTION *pSelection)
Definition: context.c:320
static HRESULT WINAPI Context_GetStatus(ITfContext *iface, TF_STATUS *pdcs)
Definition: context.c:427
void Context_AddRef(context_t *context)
Definition: context.c:78
void Context_Release(context_t *context)
Definition: context.c:106
static HRESULT WINAPI Context_GetProperty(ITfContext *iface, REFGUID guidProp, ITfProperty **ppProp)
Definition: context.c:452
static HRESULT WINAPI Context_GetSelection(ITfContext *iface, TfEditCookie ec, ULONG ulIndex, ULONG ulCount, TF_SELECTION *pSelection, ULONG *pcFetched)
Definition: context.c:260
static HRESULT WINAPI Context_GetStart(ITfContext *iface, TfEditCookie ec, ITfRange **ppStart)
Definition: context.c:358
static HRESULT WINAPI Context_EnumProperties(ITfContext *iface, IEnumTfProperties **ppEnum)
Definition: context.c:477
static HRESULT WINAPI Context_QueryInterface(ITfContext *iface, REFIID iid, LPVOID *ppvOut)
Definition: context.c:144
static HRESULT WINAPI Context_GetActiveView(ITfContext *iface, ITfContextView **ppView)
Definition: context.c:411
static HRESULT WINAPI Context_InWriteSession(ITfContext *iface, TfClientId tid, BOOL *pfWriteSession)
Definition: context.c:251
static HRESULT WINAPI Context_GetAppProperty(ITfContext *iface, REFGUID guidProp, ITfReadOnlyProperty **ppProp)
Definition: context.c:460
static HRESULT WINAPI Context_GetEnd(ITfContext *iface, TfEditCookie ec, ITfRange **ppEnd)
Definition: context.c:380

Definition at line 511 of file context.c.

Referenced by Context_Constructor().

◆ InsertAtSelectionVtbl

const ITfInsertAtSelectionVtbl InsertAtSelectionVtbl
static
Initial value:
=
{
}
static HRESULT WINAPI InsertAtSelection_InsertEmbeddedAtSelection(ITfInsertAtSelection *iface, TfEditCookie ec, DWORD dwFlags, IDataObject *pDataObject, ITfRange **ppRange)
Definition: context.c:649
static ULONG WINAPI InsertAtSelection_Release(ITfInsertAtSelection *iface)
Definition: context.c:607
static ULONG WINAPI InsertAtSelection_AddRef(ITfInsertAtSelection *iface)
Definition: context.c:601
static HRESULT WINAPI InsertAtSelection_QueryInterface(ITfInsertAtSelection *iface, REFIID iid, LPVOID *ppvOut)
Definition: context.c:595
static HRESULT WINAPI InsertAtSelection_InsertTextAtSelection(ITfInsertAtSelection *iface, TfEditCookie ec, DWORD dwFlags, const WCHAR *pchText, LONG cch, ITfRange **ppRange)
Definition: context.c:613

Definition at line 658 of file context.c.

Referenced by Context_Constructor().

◆ TextStoreACPServicesVtbl

const ITextStoreACPServicesVtbl TextStoreACPServicesVtbl
static
Initial value:
=
{
}
static HRESULT WINAPI TextStoreACPServices_Unserialize(ITextStoreACPServices *iface, ITfProperty *prop, const TF_PERSISTENT_PROPERTY_HEADER_ACP *header, IStream *stream, ITfPersistentPropertyLoaderACP *loader)
Definition: context.c:928
static HRESULT WINAPI TextStoreACPServices_QueryInterface(ITextStoreACPServices *iface, REFIID riid, void **obj)
Definition: context.c:900
static HRESULT WINAPI TextStoreACPServices_CreateRange(ITextStoreACPServices *iface, LONG start, LONG end, ITfRangeACP **range)
Definition: context.c:947
static HRESULT WINAPI TextStoreACPServices_ForceLoadProperty(ITextStoreACPServices *iface, ITfProperty *prop)
Definition: context.c:938
static HRESULT WINAPI TextStoreACPServices_Serialize(ITextStoreACPServices *iface, ITfProperty *prop, ITfRange *range, TF_PERSISTENT_PROPERTY_HEADER_ACP *header, IStream *stream)
Definition: context.c:918
static ULONG WINAPI TextStoreACPServices_AddRef(ITextStoreACPServices *iface)
Definition: context.c:906
static ULONG WINAPI TextStoreACPServices_Release(ITextStoreACPServices *iface)
Definition: context.c:912

Definition at line 957 of file context.c.

Referenced by Context_Constructor().

◆ TextStoreACPSinkVtbl

const ITextStoreACPSinkVtbl TextStoreACPSinkVtbl
static
Initial value:
=
{
}
static HRESULT WINAPI TextStoreACPSink_OnAttrsChange(ITextStoreACPSink *iface, LONG acpStart, LONG acpEnd, ULONG cAttrs, const TS_ATTRID *paAttrs)
Definition: context.c:801
static HRESULT WINAPI TextStoreACPSink_QueryInterface(ITextStoreACPSink *iface, REFIID iid, LPVOID *ppvOut)
Definition: context.c:717
static ULONG WINAPI TextStoreACPSink_Release(ITextStoreACPSink *iface)
Definition: context.c:746
static HRESULT WINAPI TextStoreACPSink_OnEndEditTransaction(ITextStoreACPSink *iface)
Definition: context.c:878
static HRESULT WINAPI TextStoreACPSink_OnStatusChange(ITextStoreACPSink *iface, DWORD dwFlags)
Definition: context.c:779
static ULONG WINAPI TextStoreACPSink_AddRef(ITextStoreACPSink *iface)
Definition: context.c:740
static HRESULT WINAPI TextStoreACPSink_OnStartEditTransaction(ITextStoreACPSink *iface)
Definition: context.c:871
static HRESULT WINAPI TextStoreACPSink_OnLayoutChange(ITextStoreACPSink *iface, TsLayoutCode lcode, TsViewCookie vcView)
Definition: context.c:771
static HRESULT WINAPI TextStoreACPSink_OnTextChange(ITextStoreACPSink *iface, DWORD dwFlags, const TS_TEXTCHANGE *pChange)
Definition: context.c:756
static HRESULT WINAPI TextStoreACPSink_OnSelectionChange(ITextStoreACPSink *iface)
Definition: context.c:764
static HRESULT WINAPI TextStoreACPSink_OnLockGranted(ITextStoreACPSink *iface, DWORD dwLockFlags)
Definition: context.c:809

Definition at line 885 of file context.c.

Referenced by Context_Constructor().