ReactOS 0.4.15-dev-5666-gc548b97
context.c File Reference
#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 "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
 
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_ITfContextOwnerCompositionServices (ITfContextOwnerCompositionServices *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 ContextOwnerCompositionServices_QueryInterface (ITfContextOwnerCompositionServices *iface, REFIID iid, LPVOID *ppvOut)
 
static ULONG WINAPI ContextOwnerCompositionServices_AddRef (ITfContextOwnerCompositionServices *iface)
 
static ULONG WINAPI ContextOwnerCompositionServices_Release (ITfContextOwnerCompositionServices *iface)
 
static HRESULT WINAPI ContextOwnerCompositionServices_StartComposition (ITfContextOwnerCompositionServices *iface, TfEditCookie ecWrite, ITfRange *pCompositionRange, ITfCompositionSink *pSink, ITfComposition **ppComposition)
 
static HRESULT WINAPI ContextOwnerCompositionServices_EnumCompositions (ITfContextOwnerCompositionServices *iface, IEnumITfCompositionView **ppEnum)
 
static HRESULT WINAPI ContextOwnerCompositionServices_FindComposition (ITfContextOwnerCompositionServices *iface, TfEditCookie ecRead, ITfRange *pTestRange, IEnumITfCompositionView **ppEnum)
 
static HRESULT WINAPI ContextOwnerCompositionServices_TakeOwnership (ITfContextOwnerCompositionServices *iface, TfEditCookie ecWrite, ITfCompositionView *pComposition, ITfCompositionSink *pSink, ITfComposition **ppComposition)
 
static HRESULT WINAPI ContextOwnerCompositionServices_TerminateComposition (ITfContextOwnerCompositionServices *iface, ITfCompositionView *pComposition)
 
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 ITfContextOwnerCompositionServicesVtbl ContextOwnerCompositionServicesVtbl
 
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 23 of file context.c.

Typedef Documentation

◆ Context

Initial value:
{
#define WdfFunctions
Definition: wdf.h:66
_Must_inspect_result_ _In_ WDFDMAENABLER _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFDMATRANSACTION * DmaTransaction
PWDF_DRIVER_GLOBALS WdfDriverGlobals
@ WdfDmaTransactionExecuteTableIndex
Definition: wdffuncenum.h:126

Definition at line 1038 of file acpixf.h.

◆ EditCookie

Function Documentation

◆ Context_AddRef()

static ULONG WINAPI Context_AddRef ( ITfContext iface)
static

Definition at line 185 of file context.c.

186{
188 return InterlockedIncrement(&This->refCount);
189}
#define InterlockedIncrement
Definition: armddk.h:53
static Context * impl_from_ITfContext(ITfContext *iface)
Definition: context.c:82

◆ Context_Constructor()

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

Definition at line 1047 of file context.c.

1048{
1049 Context *This;
1051
1053 if (This == NULL)
1054 return E_OUTOFMEMORY;
1055
1057 if (cookie == NULL)
1058 {
1060 return E_OUTOFMEMORY;
1061 }
1062
1063 TRACE("(%p) %x %p %p %p\n",This, tidOwner, punk, ppOut, pecTextStore);
1064
1065 This->ITfContext_iface.lpVtbl= &ContextVtbl;
1066 This->ITfSource_iface.lpVtbl = &ContextSourceVtbl;
1067 This->ITfContextOwnerCompositionServices_iface.lpVtbl = &ContextOwnerCompositionServicesVtbl;
1068 This->ITfInsertAtSelection_iface.lpVtbl = &InsertAtSelectionVtbl;
1069 This->ITfSourceSingle_iface.lpVtbl = &ContextSourceSingleVtbl;
1070 This->ITextStoreACPSink_iface.lpVtbl = &TextStoreACPSinkVtbl;
1071 This->ITextStoreACPServices_iface.lpVtbl = &TextStoreACPServicesVtbl;
1072 This->refCount = 1;
1073 This->tidOwner = tidOwner;
1074 This->connected = FALSE;
1075 This->manager = mgr;
1076
1077 CompartmentMgr_Constructor((IUnknown*)&This->ITfContext_iface, &IID_IUnknown, (IUnknown**)&This->CompartmentMgr);
1078
1079 cookie->lockType = TF_ES_READ;
1080 cookie->pOwningContext = This;
1081
1082 if (punk)
1083 {
1084 IUnknown_QueryInterface(punk, &IID_ITextStoreACP,
1085 (LPVOID*)&This->pITextStoreACP);
1086
1087 IUnknown_QueryInterface(punk, &IID_ITfContextOwnerCompositionSink,
1088 (LPVOID*)&This->pITfContextOwnerCompositionSink);
1089
1090 if (!This->pITextStoreACP && !This->pITfContextOwnerCompositionSink)
1091 FIXME("Unhandled pUnk\n");
1092 }
1093
1095 *pecTextStore = This->defaultCookie;
1096
1097 list_init(&This->pContextKeyEventSink);
1098 list_init(&This->pEditTransactionSink);
1099 list_init(&This->pStatusSink);
1100 list_init(&This->pTextEditSink);
1101 list_init(&This->pTextLayoutSink);
1102
1103 *ppOut = &This->ITfContext_iface;
1104 TRACE("returning %p\n", *ppOut);
1105
1106 return S_OK;
1107}
static void list_init(struct list_entry *head)
Definition: list.h:51
const GUID IID_IUnknown
#define FIXME(fmt,...)
Definition: debug.h:111
HRESULT CompartmentMgr_Constructor(IUnknown *pUnkOuter, REFIID riid, IUnknown **ppOut)
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
static const ITfContextVtbl ContextVtbl
Definition: context.c:516
static const ITextStoreACPSinkVtbl TextStoreACPSinkVtbl
Definition: context.c:964
static const ITextStoreACPServicesVtbl TextStoreACPServicesVtbl
Definition: context.c:1036
static const ITfSourceSingleVtbl ContextSourceSingleVtbl
Definition: context.c:783
static const ITfInsertAtSelectionVtbl InsertAtSelectionVtbl
Definition: context.c:737
static const ITfSourceVtbl ContextSourceVtbl
Definition: context.c:588
static const ITfContextOwnerCompositionServicesVtbl ContextOwnerCompositionServicesVtbl
Definition: context.c:659
#define S_OK
Definition: intsafe.h:52
DWORD generate_Cookie(DWORD magic, LPVOID data)
Definition: msctf.c:189
#define COOKIE_MAGIC_EDITCOOKIE
#define TRACE(s)
Definition: solgame.cpp:4
Definition: cookie.c:34

Referenced by DocumentMgr_CreateContext().

◆ Context_CreateRangeBackup()

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

Definition at line 508 of file context.c.

510{
512 FIXME("STUB:(%p)\n",This);
513 return E_NOTIMPL;
514}
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ Context_Destructor()

static void Context_Destructor ( Context This)
static

Definition at line 117 of file context.c.

118{
120 TRACE("destroying %p\n", This);
121
122 if (This->pITextStoreACP)
123 ITextStoreACP_Release(This->pITextStoreACP);
124
125 if (This->pITfContextOwnerCompositionSink)
126 ITfContextOwnerCompositionSink_Release(This->pITfContextOwnerCompositionSink);
127
128 if (This->defaultCookie)
129 {
130 cookie = remove_Cookie(This->defaultCookie);
132 This->defaultCookie = 0;
133 }
134
135 free_sinks(&This->pContextKeyEventSink);
136 free_sinks(&This->pEditTransactionSink);
137 free_sinks(&This->pStatusSink);
138 free_sinks(&This->pTextEditSink);
139 free_sinks(&This->pTextLayoutSink);
140
141 CompartmentMgr_Destructor(This->CompartmentMgr);
143}
HRESULT CompartmentMgr_Destructor(ITfCompartmentMgr *iface)
LPVOID remove_Cookie(DWORD id)
Definition: msctf.c:259
void free_sinks(struct list *sink_list)
Definition: msctf.c:324

Referenced by Context_Release().

◆ Context_EnumProperties()

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

Definition at line 482 of file context.c.

484{
486 FIXME("STUB:(%p)\n",This);
487 return E_NOTIMPL;
488}

◆ Context_EnumViews()

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

Definition at line 424 of file context.c.

426{
428 FIXME("STUB:(%p)\n",This);
429 return E_NOTIMPL;
430}

◆ Context_GetActiveView()

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

Definition at line 416 of file context.c.

418{
420 FIXME("STUB:(%p)\n",This);
421 return E_NOTIMPL;
422}

◆ Context_GetAppProperty()

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

Definition at line 465 of file context.c.

467{
469 FIXME("STUB:(%p)\n",This);
470 return E_NOTIMPL;
471}

◆ Context_GetDocumentMgr()

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

Definition at line 490 of file context.c.

492{
494 TRACE("(%p) %p\n",This,ppDm);
495
496 if (!ppDm)
497 return E_INVALIDARG;
498
499 *ppDm = This->manager;
500 if (!This->manager)
501 return S_FALSE;
502
503 ITfDocumentMgr_AddRef(This->manager);
504
505 return S_OK;
506}
#define E_INVALIDARG
Definition: ddrawi.h:101
#define S_FALSE
Definition: winerror.h:2357

◆ Context_GetEnd()

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

Definition at line 385 of file context.c.

387{
390 LONG end;
391 TRACE("(%p) %i %p\n",This,ec,ppEnd);
392
393 if (!ppEnd)
394 return E_INVALIDARG;
395
396 *ppEnd = NULL;
397
398 if (!This->connected)
399 return TF_E_DISCONNECTED;
400
402 return TF_E_NOLOCK;
403
404 if (!This->pITextStoreACP)
405 {
406 FIXME("Context does not have a ITextStoreACP\n");
407 return E_NOTIMPL;
408 }
409
411 ITextStoreACP_GetEndACP(This->pITextStoreACP,&end);
412
413 return Range_Constructor(iface, This->pITextStoreACP, cookie->lockType, end, end, ppEnd);
414}
GLuint GLuint end
Definition: gl.h:1545
DWORD get_Cookie_magic(DWORD id)
Definition: msctf.c:233
LPVOID get_Cookie_data(DWORD id)
Definition: msctf.c:246
HRESULT Range_Constructor(ITfContext *context, ITextStoreACP *textstore, DWORD lockType, DWORD anchorStart, DWORD anchorEnd, ITfRange **ppOut) DECLSPEC_HIDDEN
Definition: range.c:325
long LONG
Definition: pedump.c:60

◆ Context_GetProperty()

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

Definition at line 457 of file context.c.

459{
461 FIXME("STUB:(%p)\n",This);
462 return E_NOTIMPL;
463}

◆ Context_GetSelection()

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

Definition at line 265 of file context.c.

268{
271 ULONG count, i;
272 ULONG totalFetched = 0;
273 HRESULT hr = S_OK;
274
275 if (!pSelection || !pcFetched)
276 return E_INVALIDARG;
277
278 *pcFetched = 0;
279
280 if (!This->connected)
281 return TF_E_DISCONNECTED;
282
284 return TF_E_NOLOCK;
285
286 if (!This->pITextStoreACP)
287 {
288 FIXME("Context does not have a ITextStoreACP\n");
289 return E_NOTIMPL;
290 }
291
293
294 if (ulIndex == TF_DEFAULT_SELECTION)
295 count = 1;
296 else
297 count = ulCount;
298
299 for (i = 0; i < count; i++)
300 {
301 DWORD fetched;
302 TS_SELECTION_ACP acps;
303
304 hr = ITextStoreACP_GetSelection(This->pITextStoreACP, ulIndex + i,
305 1, &acps, &fetched);
306
307 if (hr == TS_E_NOLOCK)
308 return TF_E_NOLOCK;
309 else if (SUCCEEDED(hr))
310 {
311 pSelection[totalFetched].style.ase = acps.style.ase;
312 pSelection[totalFetched].style.fInterimChar = acps.style.fInterimChar;
313 Range_Constructor(iface, This->pITextStoreACP, cookie->lockType, acps.acpStart, acps.acpEnd, &pSelection[totalFetched].range);
314 totalFetched ++;
315 }
316 else
317 break;
318 }
319
320 *pcFetched = totalFetched;
321
322 return hr;
323}
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint GLuint GLsizei count
Definition: gl.h:1545
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 SUCCEEDED(hr)
Definition: intsafe.h:50
unsigned int ULONG
Definition: retypes.h:1
HRESULT hr
Definition: shlfolder.c:183
TsActiveSelEnd ase
Definition: textstor.idl:86
TS_SELECTIONSTYLE style
Definition: textstor.idl:94
ULONG ulIndex
Definition: symbols.c:92

◆ Context_GetStart()

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

Definition at line 363 of file context.c.

365{
368 TRACE("(%p) %i %p\n",This,ec,ppStart);
369
370 if (!ppStart)
371 return E_INVALIDARG;
372
373 *ppStart = NULL;
374
375 if (!This->connected)
376 return TF_E_DISCONNECTED;
377
379 return TF_E_NOLOCK;
380
382 return Range_Constructor(iface, This->pITextStoreACP, cookie->lockType, 0, 0, ppStart);
383}

◆ Context_GetStatus()

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

Definition at line 432 of file context.c.

434{
436 TRACE("(%p) %p\n",This,pdcs);
437
438 if (!This->connected)
439 return TF_E_DISCONNECTED;
440
441 if (!pdcs)
442 return E_INVALIDARG;
443
444 if (!This->pITextStoreACP)
445 {
446 FIXME("Context does not have a ITextStoreACP\n");
447 return E_NOTIMPL;
448 }
449
450 ITextStoreACP_GetStatus(This->pITextStoreACP, &This->documentStatus);
451
452 *pdcs = This->documentStatus;
453
454 return S_OK;
455}

◆ Context_Initialize()

HRESULT Context_Initialize ( ITfContext iface,
ITfDocumentMgr manager 
)

Definition at line 1109 of file context.c.

1110{
1112
1113 if (This->pITextStoreACP)
1114 ITextStoreACP_AdviseSink(This->pITextStoreACP, &IID_ITextStoreACPSink,
1115 (IUnknown*)&This->ITextStoreACPSink_iface, TS_AS_ALL_SINKS);
1116 This->connected = TRUE;
1117 This->manager = manager;
1118 return S_OK;
1119}
#define TRUE
Definition: types.h:120
const DWORD TS_AS_ALL_SINKS
Definition: textstor.idl:54

Referenced by DocumentMgr_Push().

◆ Context_InWriteSession()

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

Definition at line 256 of file context.c.

259{
261 FIXME("STUB:(%p)\n",This);
262 return E_NOTIMPL;
263}

◆ Context_QueryInterface()

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

Definition at line 145 of file context.c.

146{
148 *ppvOut = NULL;
149
150 if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_ITfContext))
151 {
152 *ppvOut = &This->ITfContext_iface;
153 }
154 else if (IsEqualIID(iid, &IID_ITfSource))
155 {
156 *ppvOut = &This->ITfSource_iface;
157 }
158 else if (IsEqualIID(iid, &IID_ITfContextOwnerCompositionServices))
159 {
160 *ppvOut = &This->ITfContextOwnerCompositionServices_iface;
161 }
162 else if (IsEqualIID(iid, &IID_ITfInsertAtSelection))
163 {
164 *ppvOut = &This->ITfInsertAtSelection_iface;
165 }
166 else if (IsEqualIID(iid, &IID_ITfCompartmentMgr))
167 {
168 *ppvOut = This->CompartmentMgr;
169 }
170 else if (IsEqualIID(iid, &IID_ITfSourceSingle))
171 {
172 *ppvOut = &This->ITfSourceSingle_iface;
173 }
174
175 if (*ppvOut)
176 {
177 ITfContext_AddRef(iface);
178 return S_OK;
179 }
180
181 WARN("unsupported interface: %s\n", debugstr_guid(iid));
182 return E_NOINTERFACE;
183}
#define WARN(fmt,...)
Definition: debug.h:112
#define debugstr_guid
Definition: kernel32.h:35
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ Context_Release()

static ULONG WINAPI Context_Release ( ITfContext iface)
static

Definition at line 191 of file context.c.

192{
194 ULONG ret;
195
196 ret = InterlockedDecrement(&This->refCount);
197 if (ret == 0)
199 return ret;
200}
#define InterlockedDecrement
Definition: armddk.h:52
static void Context_Destructor(Context *This)
Definition: context.c:117
int ret

◆ Context_RequestEditSession()

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

Definition at line 205 of file context.c.

208{
210 HRESULT hr;
211 DWORD dwLockFlags = 0x0;
212
213 TRACE("(%p) %i %p %x %p\n",This, tid, pes, dwFlags, phrSession);
214
215 if (!(dwFlags & TF_ES_READ) && !(dwFlags & TF_ES_READWRITE))
216 {
217 *phrSession = E_FAIL;
218 return E_INVALIDARG;
219 }
220
221 if (!This->pITextStoreACP)
222 {
223 FIXME("No ITextStoreACP available\n");
224 *phrSession = E_FAIL;
225 return E_FAIL;
226 }
227
228 if (!(dwFlags & TF_ES_ASYNC))
229 dwLockFlags |= TS_LF_SYNC;
230
231 if ((dwFlags & TF_ES_READWRITE) == TF_ES_READWRITE)
232 dwLockFlags |= TS_LF_READWRITE;
233 else if (dwFlags & TF_ES_READ)
234 dwLockFlags |= TS_LF_READ;
235
236 if (!This->documentStatus.dwDynamicFlags)
237 ITextStoreACP_GetStatus(This->pITextStoreACP, &This->documentStatus);
238
239 if (((dwFlags & TF_ES_READWRITE) == TF_ES_READWRITE) && (This->documentStatus.dwDynamicFlags & TS_SD_READONLY))
240 {
241 *phrSession = TS_E_READONLY;
242 return S_OK;
243 }
244
245 if (FAILED (ITfEditSession_QueryInterface(pes, &IID_ITfEditSession, (LPVOID*)&This->currentEditSession)))
246 {
247 *phrSession = E_FAIL;
248 return E_INVALIDARG;
249 }
250
251 hr = ITextStoreACP_RequestLock(This->pITextStoreACP, dwLockFlags, phrSession);
252
253 return hr;
254}
#define E_FAIL
Definition: ddrawi.h:102
#define FAILED(hr)
Definition: intsafe.h:51
static TfClientId tid
const DWORD TS_LF_READWRITE
Definition: textstor.idl:58
const DWORD TS_LF_SYNC
Definition: textstor.idl:56
const DWORD TS_SD_READONLY
Definition: textstor.idl:40
const DWORD TS_LF_READ
Definition: textstor.idl:57
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176

◆ Context_SetSelection()

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

Definition at line 325 of file context.c.

327{
329 TS_SELECTION_ACP *acp;
330 ULONG i;
331 HRESULT hr;
332
333 TRACE("(%p) %i %i %p\n",This,ec,ulCount,pSelection);
334
335 if (!This->pITextStoreACP)
336 {
337 FIXME("Context does not have a ITextStoreACP\n");
338 return E_NOTIMPL;
339 }
340
342 return TF_E_NOLOCK;
343
344 acp = HeapAlloc(GetProcessHeap(), 0, sizeof(TS_SELECTION_ACP) * ulCount);
345 if (!acp)
346 return E_OUTOFMEMORY;
347
348 for (i = 0; i < ulCount; i++)
349 if (FAILED(TF_SELECTION_to_TS_SELECTION_ACP(&pSelection[i], &acp[i])))
350 {
351 TRACE("Selection Conversion Failed\n");
352 HeapFree(GetProcessHeap(), 0 , acp);
353 return E_FAIL;
354 }
355
356 hr = ITextStoreACP_SetSelection(This->pITextStoreACP, ulCount, acp);
357
358 HeapFree(GetProcessHeap(), 0, acp);
359
360 return hr;
361}
HRESULT TF_SELECTION_to_TS_SELECTION_ACP(const TF_SELECTION *tf, TS_SELECTION_ACP *tsAcp) DECLSPEC_HIDDEN
Definition: range.c:351

◆ 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 473 of file context.c.

476{
478 FIXME("STUB:(%p)\n",This);
479 return E_NOTIMPL;
480}

◆ Context_Uninitialize()

HRESULT Context_Uninitialize ( ITfContext iface)

Definition at line 1121 of file context.c.

1122{
1124
1125 if (This->pITextStoreACP)
1126 ITextStoreACP_UnadviseSink(This->pITextStoreACP, (IUnknown*)&This->ITextStoreACPSink_iface);
1127 This->connected = FALSE;
1128 This->manager = NULL;
1129 return S_OK;
1130}

Referenced by DocumentMgr_Pop().

◆ ContextOwnerCompositionServices_AddRef()

static ULONG WINAPI ContextOwnerCompositionServices_AddRef ( ITfContextOwnerCompositionServices iface)
static

Definition at line 607 of file context.c.

608{
610 return ITfContext_AddRef(&This->ITfContext_iface);
611}
static Context * impl_from_ITfContextOwnerCompositionServices(ITfContextOwnerCompositionServices *iface)
Definition: context.c:92

◆ ContextOwnerCompositionServices_EnumCompositions()

static HRESULT WINAPI ContextOwnerCompositionServices_EnumCompositions ( ITfContextOwnerCompositionServices iface,
IEnumITfCompositionView **  ppEnum 
)
static

Definition at line 627 of file context.c.

629{
631 FIXME("STUB:(%p) %p\n", This, ppEnum);
632 return E_NOTIMPL;
633}

◆ ContextOwnerCompositionServices_FindComposition()

static HRESULT WINAPI ContextOwnerCompositionServices_FindComposition ( ITfContextOwnerCompositionServices iface,
TfEditCookie  ecRead,
ITfRange pTestRange,
IEnumITfCompositionView **  ppEnum 
)
static

Definition at line 635 of file context.c.

637{
639 FIXME("STUB:(%p) %#x %p %p\n", This, ecRead, pTestRange, ppEnum);
640 return E_NOTIMPL;
641}

◆ ContextOwnerCompositionServices_QueryInterface()

static HRESULT WINAPI ContextOwnerCompositionServices_QueryInterface ( ITfContextOwnerCompositionServices iface,
REFIID  iid,
LPVOID ppvOut 
)
static

Definition at line 600 of file context.c.

602{
604 return ITfContext_QueryInterface(&This->ITfContext_iface, iid, ppvOut);
605}

◆ ContextOwnerCompositionServices_Release()

static ULONG WINAPI ContextOwnerCompositionServices_Release ( ITfContextOwnerCompositionServices iface)
static

Definition at line 613 of file context.c.

614{
616 return ITfContext_Release(&This->ITfContext_iface);
617}

◆ ContextOwnerCompositionServices_StartComposition()

static HRESULT WINAPI ContextOwnerCompositionServices_StartComposition ( ITfContextOwnerCompositionServices iface,
TfEditCookie  ecWrite,
ITfRange pCompositionRange,
ITfCompositionSink pSink,
ITfComposition **  ppComposition 
)
static

Definition at line 619 of file context.c.

621{
623 FIXME("STUB:(%p) %#x %p %p %p\n", This, ecWrite, pCompositionRange, pSink, ppComposition);
624 return E_NOTIMPL;
625}

◆ ContextOwnerCompositionServices_TakeOwnership()

static HRESULT WINAPI ContextOwnerCompositionServices_TakeOwnership ( ITfContextOwnerCompositionServices iface,
TfEditCookie  ecWrite,
ITfCompositionView pComposition,
ITfCompositionSink pSink,
ITfComposition **  ppComposition 
)
static

Definition at line 643 of file context.c.

645{
647 FIXME("STUB:(%p) %#x %p %p %p\n", This, ecWrite, pComposition, pSink, ppComposition);
648 return E_NOTIMPL;
649}

◆ ContextOwnerCompositionServices_TerminateComposition()

static HRESULT WINAPI ContextOwnerCompositionServices_TerminateComposition ( ITfContextOwnerCompositionServices iface,
ITfCompositionView pComposition 
)
static

Definition at line 651 of file context.c.

653{
655 FIXME("STUB:(%p) %p\n", This, pComposition);
656 return E_NOTIMPL;
657}

◆ ContextSource_AddRef()

static ULONG WINAPI ContextSource_AddRef ( ITfSource iface)
static

Definition at line 547 of file context.c.

548{
550 return ITfContext_AddRef(&This->ITfContext_iface);
551}
static Context * impl_from_ITfSource(ITfSource *iface)
Definition: context.c:87

◆ ContextSource_AdviseSink()

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

Definition at line 559 of file context.c.

561{
563
564 TRACE("(%p) %s %p %p\n",This,debugstr_guid(riid),punk,pdwCookie);
565
566 if (!riid || !punk || !pdwCookie)
567 return E_INVALIDARG;
568
569 if (IsEqualIID(riid, &IID_ITfTextEditSink))
570 return advise_sink(&This->pTextEditSink, &IID_ITfTextEditSink, COOKIE_MAGIC_CONTEXTSINK, punk, pdwCookie);
571
572 FIXME("(%p) Unhandled Sink: %s\n",This,debugstr_guid(riid));
573 return E_NOTIMPL;
574}
REFIID riid
Definition: atlbase.h:39
HRESULT advise_sink(struct list *sink_list, REFIID riid, DWORD cookie_magic, IUnknown *unk, DWORD *cookie)
Definition: msctf.c:285
#define COOKIE_MAGIC_CONTEXTSINK

◆ ContextSource_QueryInterface()

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

Definition at line 541 of file context.c.

542{
544 return ITfContext_QueryInterface(&This->ITfContext_iface, iid, ppvOut);
545}

◆ ContextSource_Release()

static ULONG WINAPI ContextSource_Release ( ITfSource iface)
static

Definition at line 553 of file context.c.

554{
556 return ITfContext_Release(&This->ITfContext_iface);
557}

◆ ContextSource_UnadviseSink()

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

Definition at line 576 of file context.c.

577{
579
580 TRACE("(%p) %x\n",This,pdwCookie);
581
583 return E_INVALIDARG;
584
585 return unadvise_sink(pdwCookie);
586}
HRESULT unadvise_sink(DWORD cookie)
Definition: msctf.c:312

◆ impl_from_ITextStoreACPServices()

static Context * impl_from_ITextStoreACPServices ( ITextStoreACPServices iface)
inlinestatic

◆ impl_from_ITextStoreACPSink()

◆ impl_from_ITfContext()

◆ impl_from_ITfContextOwnerCompositionServices()

◆ impl_from_ITfInsertAtSelection()

static Context * impl_from_ITfInsertAtSelection ( ITfInsertAtSelection iface)
inlinestatic

◆ impl_from_ITfSource()

static Context * impl_from_ITfSource ( ITfSource iface)
inlinestatic

◆ impl_from_ITfSourceSingle()

static Context * impl_from_ITfSourceSingle ( ITfSourceSingle iface)
inlinestatic

◆ InsertAtSelection_AddRef()

static ULONG WINAPI InsertAtSelection_AddRef ( ITfInsertAtSelection iface)
static

Definition at line 680 of file context.c.

681{
683 return ITfContext_AddRef(&This->ITfContext_iface);
684}
static Context * impl_from_ITfInsertAtSelection(ITfInsertAtSelection *iface)
Definition: context.c:97

◆ InsertAtSelection_InsertEmbeddedAtSelection()

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

Definition at line 728 of file context.c.

731{
733 FIXME("STUB:(%p)\n",This);
734 return E_NOTIMPL;
735}

◆ InsertAtSelection_InsertTextAtSelection()

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

Definition at line 692 of file context.c.

695{
698 LONG acpStart, acpEnd;
699 TS_TEXTCHANGE change;
700 HRESULT hr;
701
702 TRACE("(%p) %i %x %s %p\n",This, ec, dwFlags, debugstr_wn(pchText,cch), ppRange);
703
704 if (!This->connected)
705 return TF_E_DISCONNECTED;
706
708 return TF_E_NOLOCK;
709
711
712 if ((cookie->lockType & TS_LF_READWRITE) != TS_LF_READWRITE )
713 return TS_E_READONLY;
714
715 if (!This->pITextStoreACP)
716 {
717 FIXME("Context does not have a ITextStoreACP\n");
718 return E_NOTIMPL;
719 }
720
721 hr = ITextStoreACP_InsertTextAtSelection(This->pITextStoreACP, dwFlags, pchText, cch, &acpStart, &acpEnd, &change);
722 if (SUCCEEDED(hr))
723 Range_Constructor(&This->ITfContext_iface, This->pITextStoreACP, cookie->lockType, change.acpStart, change.acpNewEnd, ppRange);
724
725 return hr;
726}
#define debugstr_wn
Definition: kernel32.h:33
static DWORD DWORD void LPSTR DWORD cch
Definition: str.c:202
LONG acpNewEnd
Definition: textstor.idl:81

◆ InsertAtSelection_QueryInterface()

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

Definition at line 674 of file context.c.

675{
677 return ITfContext_QueryInterface(&This->ITfContext_iface, iid, ppvOut);
678}

◆ InsertAtSelection_Release()

static ULONG WINAPI InsertAtSelection_Release ( ITfInsertAtSelection iface)
static

Definition at line 686 of file context.c.

687{
689 return ITfContext_Release(&This->ITfContext_iface);
690}

◆ SourceSingle_AddRef()

static ULONG WINAPI SourceSingle_AddRef ( ITfSourceSingle iface)
static

Definition at line 755 of file context.c.

756{
758 return ITfContext_AddRef(&This->ITfContext_iface);
759}
static Context * impl_from_ITfSourceSingle(ITfSourceSingle *iface)
Definition: context.c:102

◆ SourceSingle_AdviseSingleSink()

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

Definition at line 767 of file context.c.

769{
771 FIXME("STUB:(%p) %i %s %p\n",This, tid, debugstr_guid(riid),punk);
772 return E_NOTIMPL;
773}

◆ SourceSingle_QueryInterface()

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

Definition at line 749 of file context.c.

750{
752 return ITfContext_QueryInterface(&This->ITfContext_iface, iid, ppvOut);
753}

◆ SourceSingle_Release()

static ULONG WINAPI SourceSingle_Release ( ITfSourceSingle iface)
static

Definition at line 761 of file context.c.

762{
764 return ITfContext_Release(&This->ITfContext_iface);
765}

◆ SourceSingle_UnadviseSingleSink()

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

Definition at line 775 of file context.c.

777{
779 FIXME("STUB:(%p) %i %s\n",This, tid, debugstr_guid(riid));
780 return E_NOTIMPL;
781}

◆ TextStoreACPServices_AddRef()

static ULONG WINAPI TextStoreACPServices_AddRef ( ITextStoreACPServices iface)
static

Definition at line 985 of file context.c.

986{
988 return ITextStoreACPSink_AddRef(&This->ITextStoreACPSink_iface);
989}
static Context * impl_from_ITextStoreACPServices(ITextStoreACPServices *iface)
Definition: context.c:112

◆ TextStoreACPServices_CreateRange()

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

Definition at line 1026 of file context.c.

1028{
1030
1031 FIXME("stub: %p %d %d %p\n", This, start, end, range);
1032
1033 return S_OK;
1034}
GLuint start
Definition: gl.h:1545
GLenum GLint * range
Definition: glext.h:7539

◆ TextStoreACPServices_ForceLoadProperty()

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

Definition at line 1017 of file context.c.

1018{
1020
1021 FIXME("stub: %p %p\n", This, prop);
1022
1023 return E_NOTIMPL;
1024}

◆ TextStoreACPServices_QueryInterface()

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

Definition at line 979 of file context.c.

980{
982 return ITextStoreACPSink_QueryInterface(&This->ITextStoreACPSink_iface, riid, obj);
983}

◆ TextStoreACPServices_Release()

static ULONG WINAPI TextStoreACPServices_Release ( ITextStoreACPServices iface)
static

Definition at line 991 of file context.c.

992{
994 return ITextStoreACPSink_Release(&This->ITextStoreACPSink_iface);
995}

◆ 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 997 of file context.c.

999{
1001
1002 FIXME("stub: %p %p %p %p %p\n", This, prop, range, header, stream);
1003
1004 return E_NOTIMPL;
1005}
Definition: parse.h:23

◆ 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 1007 of file context.c.

1009{
1011
1012 FIXME("stub: %p %p %p %p %p\n", This, prop, header, stream, loader);
1013
1014 return E_NOTIMPL;
1015}

◆ TextStoreACPSink_AddRef()

static ULONG WINAPI TextStoreACPSink_AddRef ( ITextStoreACPSink iface)
static

Definition at line 819 of file context.c.

820{
822 return ITfContext_AddRef(&This->ITfContext_iface);
823}
static Context * impl_from_ITextStoreACPSink(ITextStoreACPSink *iface)
Definition: context.c:107

◆ TextStoreACPSink_OnAttrsChange()

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

Definition at line 880 of file context.c.

882{
884 FIXME("STUB:(%p)\n",This);
885 return E_NOTIMPL;
886}

◆ TextStoreACPSink_OnEndEditTransaction()

static HRESULT WINAPI TextStoreACPSink_OnEndEditTransaction ( ITextStoreACPSink iface)
static

Definition at line 957 of file context.c.

958{
960 FIXME("STUB:(%p)\n",This);
961 return E_NOTIMPL;
962}

◆ TextStoreACPSink_OnLayoutChange()

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

Definition at line 850 of file context.c.

852{
854 FIXME("STUB:(%p)\n",This);
855 return S_OK;
856}

◆ TextStoreACPSink_OnLockGranted()

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

Definition at line 888 of file context.c.

890{
892 HRESULT hr;
893 EditCookie *cookie,*sinkcookie;
894 TfEditCookie ec;
895 struct list *cursor;
896
897 TRACE("(%p) %x\n",This, dwLockFlags);
898
899 if (!This->currentEditSession)
900 {
901 FIXME("OnLockGranted called for something other than an EditSession\n");
902 return S_OK;
903 }
904
906 if (!cookie)
907 return E_OUTOFMEMORY;
908
909 sinkcookie = HeapAlloc(GetProcessHeap(),0,sizeof(EditCookie));
910 if (!sinkcookie)
911 {
913 return E_OUTOFMEMORY;
914 }
915
916 cookie->lockType = dwLockFlags;
917 cookie->pOwningContext = This;
919
920 hr = ITfEditSession_DoEditSession(This->currentEditSession, ec);
921
922 if ((dwLockFlags&TS_LF_READWRITE) == TS_LF_READWRITE)
923 {
925 TfEditCookie sc;
926
927 sinkcookie->lockType = TS_LF_READ;
928 sinkcookie->pOwningContext = This;
930
931 /*TODO: implement ITfEditRecord */
932 SINK_FOR_EACH(cursor, &This->pTextEditSink, ITfTextEditSink, sink)
933 {
934 ITfTextEditSink_OnEndEdit(sink, &This->ITfContext_iface, sc, NULL);
935 }
936 sinkcookie = remove_Cookie(sc);
937 }
938 HeapFree(GetProcessHeap(),0,sinkcookie);
939
940 ITfEditSession_Release(This->currentEditSession);
941 This->currentEditSession = NULL;
942
943 /* Edit Cookie is only valid during the edit session */
944 cookie = remove_Cookie(ec);
946
947 return hr;
948}
Definition: list.h:37
GLsizei GLenum GLboolean sink
Definition: glext.h:5672
const char cursor[]
Definition: icontest.c:13
DWORD TfEditCookie
Definition: msctf.idl:67
#define SINK_FOR_EACH(cursor, list, type, elem)
DWORD lockType
Definition: context.c:78
Context * pOwningContext
Definition: context.c:79

◆ TextStoreACPSink_OnSelectionChange()

static HRESULT WINAPI TextStoreACPSink_OnSelectionChange ( ITextStoreACPSink iface)
static

Definition at line 843 of file context.c.

844{
846 FIXME("STUB:(%p)\n",This);
847 return S_OK;
848}

◆ TextStoreACPSink_OnStartEditTransaction()

static HRESULT WINAPI TextStoreACPSink_OnStartEditTransaction ( ITextStoreACPSink iface)
static

Definition at line 950 of file context.c.

951{
953 FIXME("STUB:(%p)\n",This);
954 return E_NOTIMPL;
955}

◆ TextStoreACPSink_OnStatusChange()

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

Definition at line 858 of file context.c.

860{
862 HRESULT hr, hrSession;
863
864 TRACE("(%p) %x\n",This, dwFlags);
865
866 if (!This->pITextStoreACP)
867 {
868 FIXME("Context does not have a ITextStoreACP\n");
869 return E_NOTIMPL;
870 }
871
872 hr = ITextStoreACP_RequestLock(This->pITextStoreACP, TS_LF_READ, &hrSession);
873
874 if(SUCCEEDED(hr) && SUCCEEDED(hrSession))
875 This->documentStatus.dwDynamicFlags = dwFlags;
876
877 return S_OK;
878}

◆ TextStoreACPSink_OnTextChange()

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

Definition at line 835 of file context.c.

837{
839 FIXME("STUB:(%p)\n",This);
840 return S_OK;
841}

◆ TextStoreACPSink_QueryInterface()

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

Definition at line 796 of file context.c.

797{
799
800 *ppvOut = NULL;
801
802 if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_ITextStoreACPSink))
803 {
804 *ppvOut = &This->ITextStoreACPSink_iface;
805 }
806 else if (IsEqualIID(iid, &IID_ITextStoreACPServices))
807 *ppvOut = &This->ITextStoreACPServices_iface;
808
809 if (*ppvOut)
810 {
811 ITextStoreACPSink_AddRef(iface);
812 return S_OK;
813 }
814
815 WARN("unsupported interface: %s\n", debugstr_guid(iid));
816 return E_NOINTERFACE;
817}

◆ TextStoreACPSink_Release()

static ULONG WINAPI TextStoreACPSink_Release ( ITextStoreACPSink iface)
static

Definition at line 825 of file context.c.

826{
828 return ITfContext_Release(&This->ITfContext_iface);
829}

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( msctf  )

Variable Documentation

◆ ContextOwnerCompositionServicesVtbl

const ITfContextOwnerCompositionServicesVtbl ContextOwnerCompositionServicesVtbl
static
Initial value:
=
{
}
static HRESULT WINAPI ContextOwnerCompositionServices_StartComposition(ITfContextOwnerCompositionServices *iface, TfEditCookie ecWrite, ITfRange *pCompositionRange, ITfCompositionSink *pSink, ITfComposition **ppComposition)
Definition: context.c:619
static HRESULT WINAPI ContextOwnerCompositionServices_TakeOwnership(ITfContextOwnerCompositionServices *iface, TfEditCookie ecWrite, ITfCompositionView *pComposition, ITfCompositionSink *pSink, ITfComposition **ppComposition)
Definition: context.c:643
static ULONG WINAPI ContextOwnerCompositionServices_AddRef(ITfContextOwnerCompositionServices *iface)
Definition: context.c:607
static HRESULT WINAPI ContextOwnerCompositionServices_TerminateComposition(ITfContextOwnerCompositionServices *iface, ITfCompositionView *pComposition)
Definition: context.c:651
static ULONG WINAPI ContextOwnerCompositionServices_Release(ITfContextOwnerCompositionServices *iface)
Definition: context.c:613
static HRESULT WINAPI ContextOwnerCompositionServices_QueryInterface(ITfContextOwnerCompositionServices *iface, REFIID iid, LPVOID *ppvOut)
Definition: context.c:600
static HRESULT WINAPI ContextOwnerCompositionServices_FindComposition(ITfContextOwnerCompositionServices *iface, TfEditCookie ecRead, ITfRange *pTestRange, IEnumITfCompositionView **ppEnum)
Definition: context.c:635
static HRESULT WINAPI ContextOwnerCompositionServices_EnumCompositions(ITfContextOwnerCompositionServices *iface, IEnumITfCompositionView **ppEnum)
Definition: context.c:627

Definition at line 659 of file context.c.

Referenced by Context_Constructor().

◆ ContextSourceSingleVtbl

const ITfSourceSingleVtbl ContextSourceSingleVtbl
static
Initial value:
=
{
}
static HRESULT WINAPI SourceSingle_UnadviseSingleSink(ITfSourceSingle *iface, TfClientId tid, REFIID riid)
Definition: context.c:775
static ULONG WINAPI SourceSingle_AddRef(ITfSourceSingle *iface)
Definition: context.c:755
static HRESULT WINAPI SourceSingle_AdviseSingleSink(ITfSourceSingle *iface, TfClientId tid, REFIID riid, IUnknown *punk)
Definition: context.c:767
static HRESULT WINAPI SourceSingle_QueryInterface(ITfSourceSingle *iface, REFIID iid, LPVOID *ppvOut)
Definition: context.c:749
static ULONG WINAPI SourceSingle_Release(ITfSourceSingle *iface)
Definition: context.c:761

Definition at line 783 of file context.c.

Referenced by Context_Constructor().

◆ ContextSourceVtbl

const ITfSourceVtbl ContextSourceVtbl
static
Initial value:
=
{
}
static ULONG WINAPI ContextSource_AddRef(ITfSource *iface)
Definition: context.c:547
static HRESULT WINAPI ContextSource_QueryInterface(ITfSource *iface, REFIID iid, LPVOID *ppvOut)
Definition: context.c:541
static HRESULT WINAPI ContextSource_AdviseSink(ITfSource *iface, REFIID riid, IUnknown *punk, DWORD *pdwCookie)
Definition: context.c:559
static HRESULT WINAPI ContextSource_UnadviseSink(ITfSource *iface, DWORD pdwCookie)
Definition: context.c:576
static ULONG WINAPI ContextSource_Release(ITfSource *iface)
Definition: context.c:553

Definition at line 588 of file context.c.

Referenced by Context_Constructor().

◆ ContextVtbl

const ITfContextVtbl ContextVtbl
static
Initial value:
=
{
}
void Context_AddRef(context_t *context)
Definition: context.c:78
void Context_Release(context_t *context)
Definition: context.c:106
static HRESULT WINAPI Context_GetActiveView(ITfContext *iface, ITfContextView **ppView)
Definition: context.c:416
static HRESULT WINAPI Context_GetStart(ITfContext *iface, TfEditCookie ec, ITfRange **ppStart)
Definition: context.c:363
static HRESULT WINAPI Context_TrackProperties(ITfContext *iface, const GUID **prgProp, ULONG cProp, const GUID **prgAppProp, ULONG cAppProp, ITfReadOnlyProperty **ppProperty)
Definition: context.c:473
static HRESULT WINAPI Context_SetSelection(ITfContext *iface, TfEditCookie ec, ULONG ulCount, const TF_SELECTION *pSelection)
Definition: context.c:325
static HRESULT WINAPI Context_GetAppProperty(ITfContext *iface, REFGUID guidProp, ITfReadOnlyProperty **ppProp)
Definition: context.c:465
static HRESULT WINAPI Context_GetStatus(ITfContext *iface, TF_STATUS *pdcs)
Definition: context.c:432
static HRESULT WINAPI Context_GetEnd(ITfContext *iface, TfEditCookie ec, ITfRange **ppEnd)
Definition: context.c:385
static HRESULT WINAPI Context_EnumProperties(ITfContext *iface, IEnumTfProperties **ppEnum)
Definition: context.c:482
static HRESULT WINAPI Context_RequestEditSession(ITfContext *iface, TfClientId tid, ITfEditSession *pes, DWORD dwFlags, HRESULT *phrSession)
Definition: context.c:205
static HRESULT WINAPI Context_InWriteSession(ITfContext *iface, TfClientId tid, BOOL *pfWriteSession)
Definition: context.c:256
static HRESULT WINAPI Context_EnumViews(ITfContext *iface, IEnumTfContextViews **ppEnum)
Definition: context.c:424
static HRESULT WINAPI Context_GetSelection(ITfContext *iface, TfEditCookie ec, ULONG ulIndex, ULONG ulCount, TF_SELECTION *pSelection, ULONG *pcFetched)
Definition: context.c:265
static HRESULT WINAPI Context_GetProperty(ITfContext *iface, REFGUID guidProp, ITfProperty **ppProp)
Definition: context.c:457
static HRESULT WINAPI Context_GetDocumentMgr(ITfContext *iface, ITfDocumentMgr **ppDm)
Definition: context.c:490
static HRESULT WINAPI Context_QueryInterface(ITfContext *iface, REFIID iid, LPVOID *ppvOut)
Definition: context.c:145
static HRESULT WINAPI Context_CreateRangeBackup(ITfContext *iface, TfEditCookie ec, ITfRange *pRange, ITfRangeBackup **ppBackup)
Definition: context.c:508

Definition at line 516 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:728
static ULONG WINAPI InsertAtSelection_Release(ITfInsertAtSelection *iface)
Definition: context.c:686
static HRESULT WINAPI InsertAtSelection_QueryInterface(ITfInsertAtSelection *iface, REFIID iid, LPVOID *ppvOut)
Definition: context.c:674
static ULONG WINAPI InsertAtSelection_AddRef(ITfInsertAtSelection *iface)
Definition: context.c:680
static HRESULT WINAPI InsertAtSelection_InsertTextAtSelection(ITfInsertAtSelection *iface, TfEditCookie ec, DWORD dwFlags, const WCHAR *pchText, LONG cch, ITfRange **ppRange)
Definition: context.c:692

Definition at line 737 of file context.c.

Referenced by Context_Constructor().

◆ TextStoreACPServicesVtbl

const ITextStoreACPServicesVtbl TextStoreACPServicesVtbl
static
Initial value:
=
{
}
static HRESULT WINAPI TextStoreACPServices_Serialize(ITextStoreACPServices *iface, ITfProperty *prop, ITfRange *range, TF_PERSISTENT_PROPERTY_HEADER_ACP *header, IStream *stream)
Definition: context.c:997
static HRESULT WINAPI TextStoreACPServices_Unserialize(ITextStoreACPServices *iface, ITfProperty *prop, const TF_PERSISTENT_PROPERTY_HEADER_ACP *header, IStream *stream, ITfPersistentPropertyLoaderACP *loader)
Definition: context.c:1007
static HRESULT WINAPI TextStoreACPServices_QueryInterface(ITextStoreACPServices *iface, REFIID riid, void **obj)
Definition: context.c:979
static ULONG WINAPI TextStoreACPServices_Release(ITextStoreACPServices *iface)
Definition: context.c:991
static HRESULT WINAPI TextStoreACPServices_ForceLoadProperty(ITextStoreACPServices *iface, ITfProperty *prop)
Definition: context.c:1017
static ULONG WINAPI TextStoreACPServices_AddRef(ITextStoreACPServices *iface)
Definition: context.c:985
static HRESULT WINAPI TextStoreACPServices_CreateRange(ITextStoreACPServices *iface, LONG start, LONG end, ITfRangeACP **range)
Definition: context.c:1026

Definition at line 1036 of file context.c.

Referenced by Context_Constructor().

◆ TextStoreACPSinkVtbl

const ITextStoreACPSinkVtbl TextStoreACPSinkVtbl
static
Initial value:
=
{
}
static ULONG WINAPI TextStoreACPSink_AddRef(ITextStoreACPSink *iface)
Definition: context.c:819
static HRESULT WINAPI TextStoreACPSink_QueryInterface(ITextStoreACPSink *iface, REFIID iid, LPVOID *ppvOut)
Definition: context.c:796
static HRESULT WINAPI TextStoreACPSink_OnLockGranted(ITextStoreACPSink *iface, DWORD dwLockFlags)
Definition: context.c:888
static HRESULT WINAPI TextStoreACPSink_OnLayoutChange(ITextStoreACPSink *iface, TsLayoutCode lcode, TsViewCookie vcView)
Definition: context.c:850
static HRESULT WINAPI TextStoreACPSink_OnTextChange(ITextStoreACPSink *iface, DWORD dwFlags, const TS_TEXTCHANGE *pChange)
Definition: context.c:835
static HRESULT WINAPI TextStoreACPSink_OnAttrsChange(ITextStoreACPSink *iface, LONG acpStart, LONG acpEnd, ULONG cAttrs, const TS_ATTRID *paAttrs)
Definition: context.c:880
static HRESULT WINAPI TextStoreACPSink_OnSelectionChange(ITextStoreACPSink *iface)
Definition: context.c:843
static HRESULT WINAPI TextStoreACPSink_OnStatusChange(ITextStoreACPSink *iface, DWORD dwFlags)
Definition: context.c:858
static HRESULT WINAPI TextStoreACPSink_OnStartEditTransaction(ITextStoreACPSink *iface)
Definition: context.c:950
static ULONG WINAPI TextStoreACPSink_Release(ITextStoreACPSink *iface)
Definition: context.c:825
static HRESULT WINAPI TextStoreACPSink_OnEndEditTransaction(ITextStoreACPSink *iface)
Definition: context.c:957

Definition at line 964 of file context.c.

Referenced by Context_Constructor().