* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "config.h"
-
#include <stdarg.h>
+#ifdef __REACTOS__
+#include <wchar.h>
+#endif
#define COBJMACROS
#include "winerror.h"
#include "objbase.h"
-#include "wine/unicode.h"
#include "msctf.h"
#include "msctf_internal.h"
TRACE("(%p) %s %s %s\n",This,debugstr_guid(rclsid), debugstr_guid(rcatid), debugstr_guid(rguid));
StringFromGUID2(rclsid, buf, 39);
- sprintfW(fullkey,fmt,szwSystemTIPKey,buf);
+ swprintf(fullkey,fmt,szwSystemTIPKey,buf);
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,fullkey, 0, KEY_READ | KEY_WRITE,
&tipkey ) != ERROR_SUCCESS)
StringFromGUID2(rcatid, buf, 39);
StringFromGUID2(rguid, buf2, 39);
- sprintfW(fullkey,fmt2,ctg,ctg,buf,buf2);
+ swprintf(fullkey,fmt2,ctg,ctg,buf,buf2);
res = RegCreateKeyExW(tipkey, fullkey, 0, NULL, 0, KEY_READ | KEY_WRITE,
NULL, &catkey, NULL);
if (!res)
{
- sprintfW(fullkey,fmt2,ctg,itm,buf2,buf);
+ swprintf(fullkey,fmt2,ctg,itm,buf2,buf);
res = RegCreateKeyExW(tipkey, fullkey, 0, NULL, 0, KEY_READ | KEY_WRITE,
NULL, &itmkey, NULL);
TRACE("(%p) %s %s %s\n",This,debugstr_guid(rclsid), debugstr_guid(rcatid), debugstr_guid(rguid));
StringFromGUID2(rclsid, buf, 39);
- sprintfW(fullkey,fmt,szwSystemTIPKey,buf);
+ swprintf(fullkey,fmt,szwSystemTIPKey,buf);
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,fullkey, 0, KEY_READ | KEY_WRITE,
&tipkey ) != ERROR_SUCCESS)
StringFromGUID2(rcatid, buf, 39);
StringFromGUID2(rguid, buf2, 39);
- sprintfW(fullkey,fmt2,ctg,ctg,buf,buf2);
-
- sprintfW(fullkey,fmt2,ctg,itm,buf2,buf);
+ swprintf(fullkey,fmt2,ctg,ctg,buf,buf2);
RegDeleteTreeW(tipkey, fullkey);
- sprintfW(fullkey,fmt2,ctg,itm,buf2,buf);
+ swprintf(fullkey,fmt2,ctg,itm,buf2,buf);
RegDeleteTreeW(tipkey, fullkey);
RegCloseKey(tipkey);
return E_INVALIDARG;
StringFromGUID2(rguid, buf, 39);
- sprintfW(fullkey,fmt,szwSystemTIPKey,buf,buf);
+ swprintf(fullkey,fmt,szwSystemTIPKey,buf,buf);
*pcatid = GUID_NULL;
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,fullkey, 0, KEY_READ, &key ) !=
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "config.h"
-
#include <stdarg.h>
#define COBJMACROS
#include "oleauto.h"
#include "olectl.h"
-#include "wine/unicode.h"
-
#include "msctf.h"
#include "msctf_internal.h"
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "config.h"
-
#include <stdarg.h>
#define COBJMACROS
#include "objbase.h"
#include "olectl.h"
-#include "wine/unicode.h"
-
#include "msctf.h"
#include "msctf_internal.h"
ITfContext ITfContext_iface;
ITfSource ITfSource_iface;
/* const ITfContextCompositionVtbl *ContextCompositionVtbl; */
- /* const ITfContextOwnerCompositionServicesVtbl *ContextOwnerCompositionServicesVtbl; */
+ ITfContextOwnerCompositionServices ITfContextOwnerCompositionServices_iface;
/* const ITfContextOwnerServicesVtbl *ContextOwnerServicesVtbl; */
ITfInsertAtSelection ITfInsertAtSelection_iface;
/* const ITfMouseTrackerVtbl *MouseTrackerVtbl; */
return CONTAINING_RECORD(iface, Context, ITfSource_iface);
}
+static inline Context *impl_from_ITfContextOwnerCompositionServices(ITfContextOwnerCompositionServices *iface)
+{
+ return CONTAINING_RECORD(iface, Context, ITfContextOwnerCompositionServices_iface);
+}
+
static inline Context *impl_from_ITfInsertAtSelection(ITfInsertAtSelection *iface)
{
return CONTAINING_RECORD(iface, Context, ITfInsertAtSelection_iface);
{
*ppvOut = &This->ITfSource_iface;
}
+ else if (IsEqualIID(iid, &IID_ITfContextOwnerCompositionServices))
+ {
+ *ppvOut = &This->ITfContextOwnerCompositionServices_iface;
+ }
else if (IsEqualIID(iid, &IID_ITfInsertAtSelection))
{
*ppvOut = &This->ITfInsertAtSelection_iface;
Context_CreateRangeBackup
};
+/*****************************************************
+ * ITfSource functions
+ *****************************************************/
static HRESULT WINAPI ContextSource_QueryInterface(ITfSource *iface, REFIID iid, LPVOID *ppvOut)
{
Context *This = impl_from_ITfSource(iface);
return ITfContext_Release(&This->ITfContext_iface);
}
-/*****************************************************
- * ITfSource functions
- *****************************************************/
static HRESULT WINAPI ContextSource_AdviseSink(ITfSource *iface,
REFIID riid, IUnknown *punk, DWORD *pdwCookie)
{
ContextSource_UnadviseSink
};
+/*****************************************************
+ * ITfContextOwnerCompositionServices functions
+ *****************************************************/
+static HRESULT WINAPI ContextOwnerCompositionServices_QueryInterface(ITfContextOwnerCompositionServices *iface,
+ REFIID iid, LPVOID *ppvOut)
+{
+ Context *This = impl_from_ITfContextOwnerCompositionServices(iface);
+ return ITfContext_QueryInterface(&This->ITfContext_iface, iid, ppvOut);
+}
+
+static ULONG WINAPI ContextOwnerCompositionServices_AddRef(ITfContextOwnerCompositionServices *iface)
+{
+ Context *This = impl_from_ITfContextOwnerCompositionServices(iface);
+ return ITfContext_AddRef(&This->ITfContext_iface);
+}
+
+static ULONG WINAPI ContextOwnerCompositionServices_Release(ITfContextOwnerCompositionServices *iface)
+{
+ Context *This = impl_from_ITfContextOwnerCompositionServices(iface);
+ return ITfContext_Release(&This->ITfContext_iface);
+}
+
+static HRESULT WINAPI ContextOwnerCompositionServices_StartComposition(ITfContextOwnerCompositionServices *iface,
+ TfEditCookie ecWrite, ITfRange *pCompositionRange, ITfCompositionSink *pSink, ITfComposition **ppComposition)
+{
+ Context *This = impl_from_ITfContextOwnerCompositionServices(iface);
+ FIXME("STUB:(%p) %#x %p %p %p\n", This, ecWrite, pCompositionRange, pSink, ppComposition);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ContextOwnerCompositionServices_EnumCompositions(ITfContextOwnerCompositionServices *iface,
+ IEnumITfCompositionView **ppEnum)
+{
+ Context *This = impl_from_ITfContextOwnerCompositionServices(iface);
+ FIXME("STUB:(%p) %p\n", This, ppEnum);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ContextOwnerCompositionServices_FindComposition(ITfContextOwnerCompositionServices *iface,
+ TfEditCookie ecRead, ITfRange *pTestRange, IEnumITfCompositionView **ppEnum)
+{
+ Context *This = impl_from_ITfContextOwnerCompositionServices(iface);
+ FIXME("STUB:(%p) %#x %p %p\n", This, ecRead, pTestRange, ppEnum);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ContextOwnerCompositionServices_TakeOwnership(ITfContextOwnerCompositionServices *iface,
+ TfEditCookie ecWrite, ITfCompositionView *pComposition, ITfCompositionSink *pSink, ITfComposition **ppComposition)
+{
+ Context *This = impl_from_ITfContextOwnerCompositionServices(iface);
+ FIXME("STUB:(%p) %#x %p %p %p\n", This, ecWrite, pComposition, pSink, ppComposition);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ContextOwnerCompositionServices_TerminateComposition(ITfContextOwnerCompositionServices *iface,
+ ITfCompositionView *pComposition)
+{
+ Context *This = impl_from_ITfContextOwnerCompositionServices(iface);
+ FIXME("STUB:(%p) %p\n", This, pComposition);
+ return E_NOTIMPL;
+}
+
+static const ITfContextOwnerCompositionServicesVtbl ContextOwnerCompositionServicesVtbl =
+{
+ ContextOwnerCompositionServices_QueryInterface,
+ ContextOwnerCompositionServices_AddRef,
+ ContextOwnerCompositionServices_Release,
+ ContextOwnerCompositionServices_StartComposition,
+ ContextOwnerCompositionServices_EnumCompositions,
+ ContextOwnerCompositionServices_FindComposition,
+ ContextOwnerCompositionServices_TakeOwnership,
+ ContextOwnerCompositionServices_TerminateComposition
+};
+
/*****************************************************
* ITfInsertAtSelection functions
*****************************************************/
/*TODO: implement ITfEditRecord */
SINK_FOR_EACH(cursor, &This->pTextEditSink, ITfTextEditSink, sink)
{
- ITfTextEditSink_OnEndEdit(sink, (ITfContext*) &This->ITfContext_iface, sc, NULL);
+ ITfTextEditSink_OnEndEdit(sink, &This->ITfContext_iface, sc, NULL);
}
sinkcookie = remove_Cookie(sc);
}
This->ITfContext_iface.lpVtbl= &ContextVtbl;
This->ITfSource_iface.lpVtbl = &ContextSourceVtbl;
+ This->ITfContextOwnerCompositionServices_iface.lpVtbl = &ContextOwnerCompositionServicesVtbl;
This->ITfInsertAtSelection_iface.lpVtbl = &InsertAtSelectionVtbl;
This->ITfSourceSingle_iface.lpVtbl = &ContextSourceSingleVtbl;
This->ITextStoreACPSink_iface.lpVtbl = &TextStoreACPSinkVtbl;
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "config.h"
-
#include <stdarg.h>
#define COBJMACROS
#include "winerror.h"
#include "objbase.h"
-#include "wine/unicode.h"
-
#include "msctf.h"
#include "msctf_internal.h"
static void DocumentMgr_Destructor(DocumentMgr *This)
{
- ITfThreadMgr *tm;
+ ITfThreadMgr *tm = NULL;
TRACE("destroying %p\n", This);
TF_GetThreadMgr(&tm);
- ThreadMgr_OnDocumentMgrDestruction(tm, &This->ITfDocumentMgr_iface);
+ if (tm)
+ {
+ ThreadMgr_OnDocumentMgrDestruction(tm, &This->ITfDocumentMgr_iface);
+ ITfThreadMgr_Release(tm);
+ }
if (This->contextStack[0])
ITfContext_Release(This->contextStack[0]);
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "config.h"
-
#include <stdarg.h>
#define COBJMACROS
#include "winbase.h"
#include "winreg.h"
#include "winuser.h"
+#ifdef __REACTOS__
+#include <wchar.h>
+#include <winnls.h>
+#endif
#include "shlwapi.h"
#include "winerror.h"
#include "objbase.h"
#include "olectl.h"
-#include "wine/unicode.h"
-
#include "msctf.h"
#include "msctf_internal.h"
StringFromGUID2(rclsid, buf, 39);
StringFromGUID2(guidProfile, buf2, 39);
- sprintfW(fullkey,szwFullLangfmt,szwSystemTIPKey,buf,szwLngp,langid,buf2);
+ swprintf(fullkey,szwFullLangfmt,szwSystemTIPKey,buf,szwLngp,langid,buf2);
res = RegCreateKeyExW(HKEY_CURRENT_USER,fullkey, 0, NULL, 0,
KEY_READ | KEY_WRITE, NULL, &key, &disposition);
TRACE("(%p) %s\n",This,debugstr_guid(rclsid));
StringFromGUID2(rclsid, buf, 39);
- sprintfW(fullkey,szwTipfmt,szwSystemTIPKey,buf);
+ swprintf(fullkey,szwTipfmt,szwSystemTIPKey,buf);
if (RegCreateKeyExW(HKEY_LOCAL_MACHINE,fullkey, 0, NULL, 0,
KEY_READ | KEY_WRITE, NULL, &tipkey, NULL) != ERROR_SUCCESS)
TRACE("(%p) %s\n",This,debugstr_guid(rclsid));
StringFromGUID2(rclsid, buf, 39);
- sprintfW(fullkey,szwTipfmt,szwSystemTIPKey,buf);
+ swprintf(fullkey,szwTipfmt,szwSystemTIPKey,buf);
RegDeleteTreeW(HKEY_LOCAL_MACHINE, fullkey);
RegDeleteTreeW(HKEY_CURRENT_USER, fullkey);
debugstr_wn(pchIconFile,cchFile),uIconIndex);
StringFromGUID2(rclsid, buf, 39);
- sprintfW(fullkey,szwTipfmt,szwSystemTIPKey,buf);
+ swprintf(fullkey,szwTipfmt,szwSystemTIPKey,buf);
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,fullkey, 0, KEY_READ | KEY_WRITE,
&tipkey ) != ERROR_SUCCESS)
return E_FAIL;
StringFromGUID2(guidProfile, buf, 39);
- sprintfW(fullkey,fmt2,szwLngp,langid,buf);
+ swprintf(fullkey,fmt2,szwLngp,langid,buf);
res = RegCreateKeyExW(tipkey,fullkey, 0, NULL, 0, KEY_READ | KEY_WRITE,
NULL, &fmtkey, &disposition);
return E_INVALIDARG;
StringFromGUID2(catid, buf, 39);
- sprintfW(fullkey, szwDefaultFmt, szwSystemCTFKey, szwAssemblies, langid, buf);
+ swprintf(fullkey, szwDefaultFmt, szwSystemCTFKey, szwAssemblies, langid, buf);
if (RegOpenKeyExW(HKEY_CURRENT_USER, fullkey, 0, KEY_READ | KEY_WRITE,
&hkey ) != ERROR_SUCCESS)
return E_FAIL;
StringFromGUID2(&catid, buf, 39);
- sprintfW(fullkey, szwDefaultFmt, szwSystemCTFKey, szwAssemblies, langid, buf);
+ swprintf(fullkey, szwDefaultFmt, szwSystemCTFKey, szwAssemblies, langid, buf);
if (RegCreateKeyExW(HKEY_CURRENT_USER, fullkey, 0, NULL, 0, KEY_READ | KEY_WRITE,
NULL, &hkey, NULL ) != ERROR_SUCCESS)
StringFromGUID2(rclsid, buf, 39);
StringFromGUID2(guidProfile, buf2, 39);
- sprintfW(fullkey,szwFullLangfmt,szwSystemTIPKey,buf,szwLngp,langid,buf2);
+ swprintf(fullkey,szwFullLangfmt,szwSystemTIPKey,buf,szwLngp,langid,buf2);
res = RegOpenKeyExW(HKEY_CURRENT_USER, fullkey, 0, KEY_READ | KEY_WRITE, &key);
StringFromGUID2(rclsid, buf, 39);
StringFromGUID2(guidProfile, buf2, 39);
- sprintfW(fullkey,szwFullLangfmt,szwSystemTIPKey,buf,szwLngp,langid,buf2);
+ swprintf(fullkey,szwFullLangfmt,szwSystemTIPKey,buf,szwLngp,langid,buf2);
res = RegOpenKeyExW(HKEY_CURRENT_USER, fullkey, 0, KEY_READ | KEY_WRITE, &key);
StringFromGUID2(rclsid, buf, 39);
StringFromGUID2(guidProfile, buf2, 39);
- sprintfW(fullkey,szwFullLangfmt,szwSystemTIPKey,buf,szwLngp,langid,buf2);
+ swprintf(fullkey,szwFullLangfmt,szwSystemTIPKey,buf,szwLngp,langid,buf2);
res = RegOpenKeyExW(HKEY_LOCAL_MACHINE, fullkey, 0, KEY_READ | KEY_WRITE, &key);
if (This->langkey == NULL)
{
- sprintfW(fullkey,fmt,This->szwCurrentClsid,szwLngp,This->langid);
+ swprintf(fullkey,fmt,This->szwCurrentClsid,szwLngp,This->langid);
res = RegOpenKeyExW(This->tipkey, fullkey, 0, KEY_READ | KEY_WRITE, &This->langkey);
if (res)
{
WCHAR fullkey[168];
static const WCHAR fmt[] = {'%','s','\\','%','s','\\','0','x','%','0','8','x',0};
- sprintfW(fullkey,fmt,This->szwCurrentClsid,szwLngp,This->langid);
+ swprintf(fullkey,fmt,This->szwCurrentClsid,szwLngp,This->langid);
res = RegOpenKeyExW(new_This->tipkey, fullkey, 0, KEY_READ | KEY_WRITE, &This->langkey);
new_This->lang_index = This->lang_index;
}
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "config.h"
-
#include <stdarg.h>
#include <stdio.h>
#define COOKIE_MAGIC_DMSINK 0x0070
#define COOKIE_MAGIC_THREADFOCUSSINK 0x0080
#define COOKIE_MAGIC_KEYTRACESINK 0x0090
+#define COOKIE_MAGIC_UIELEMENTSINK 0x00a0
+#define COOKIE_MAGIC_INPUTPROCESSORPROFILEACTIVATIONSINK 0x00b0
+#define COOKIE_MAGIC_ACTIVELANGSINK 0x00c0
extern DWORD tlsIndex DECLSPEC_HIDDEN;
extern TfClientId processId DECLSPEC_HIDDEN;
#ifndef _MSCTF_PRECOMP_H
#define _MSCTF_PRECOMP_H
-#include <wine/config.h>
-
#include <stdarg.h>
+#include <wchar.h>
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#include <shlwapi.h>
#include <wine/list.h>
-#include <wine/unicode.h>
#include <wine/debug.h>
#include "msctf_internal.h"
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "config.h"
-
#include <stdarg.h>
#define COBJMACROS
#include "winerror.h"
#include "objbase.h"
-#include "wine/unicode.h"
-
#include "msctf.h"
#include "msctf_internal.h"
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "config.h"
-
#include <stdarg.h>
#define COBJMACROS
#include "objbase.h"
#include "olectl.h"
-#include "wine/unicode.h"
-
#include "msctf.h"
#include "msctf_internal.h"
struct list PreservedKeyNotifySink;
struct list ThreadFocusSink;
struct list ThreadMgrEventSink;
+ struct list UIElementSink;
+ struct list InputProcessorProfileActivationSink;
} ThreadMgr;
typedef struct tagEnumTfDocumentMgr {
free_sinks(&This->PreservedKeyNotifySink);
free_sinks(&This->ThreadFocusSink);
free_sinks(&This->ThreadMgrEventSink);
+ free_sinks(&This->UIElementSink);
+ free_sinks(&This->InputProcessorProfileActivationSink);
LIST_FOR_EACH_SAFE(cursor, cursor2, &This->CurrentPreservedKeys)
{
return advise_sink(&This->ThreadFocusSink, &IID_ITfThreadFocusSink, COOKIE_MAGIC_THREADFOCUSSINK, punk, pdwCookie);
}
+ if (IsEqualIID(riid, &IID_ITfActiveLanguageProfileNotifySink))
+ {
+ WARN("semi-stub for ITfActiveLanguageProfileNotifySink: sink won't be used.\n");
+ return advise_sink(&This->ActiveLanguageProfileNotifySink, &IID_ITfActiveLanguageProfileNotifySink,
+ COOKIE_MAGIC_ACTIVELANGSINK, punk, pdwCookie);
+ }
+
if (IsEqualIID(riid, &IID_ITfKeyTraceEventSink))
{
WARN("semi-stub for ITfKeyTraceEventSink: sink won't be used.\n");
COOKIE_MAGIC_KEYTRACESINK, punk, pdwCookie);
}
+ if (IsEqualIID(riid, &IID_ITfUIElementSink))
+ {
+ WARN("semi-stub for ITfUIElementSink: sink won't be used.\n");
+ return advise_sink(&This->UIElementSink, &IID_ITfUIElementSink,
+ COOKIE_MAGIC_UIELEMENTSINK, punk, pdwCookie);
+ }
+
+ if (IsEqualIID(riid, &IID_ITfInputProcessorProfileActivationSink))
+ {
+ WARN("semi-stub for ITfInputProcessorProfileActivationSink: sink won't be used.\n");
+ return advise_sink(&This->InputProcessorProfileActivationSink, &IID_ITfInputProcessorProfileActivationSink,
+ COOKIE_MAGIC_INPUTPROCESSORPROFILEACTIVATIONSINK, punk, pdwCookie);
+ }
+
FIXME("(%p) Unhandled Sink: %s\n",This,debugstr_guid(riid));
return E_NOTIMPL;
}
magic = get_Cookie_magic(pdwCookie);
if (magic != COOKIE_MAGIC_TMSINK && magic != COOKIE_MAGIC_THREADFOCUSSINK
+ && magic != COOKIE_MAGIC_KEYTRACESINK && magic != COOKIE_MAGIC_UIELEMENTSINK
+ && magic != COOKIE_MAGIC_INPUTPROCESSORPROFILEACTIVATIONSINK
&& magic != COOKIE_MAGIC_KEYTRACESINK)
return E_INVALIDARG;
list_init(&This->PreservedKeyNotifySink);
list_init(&This->ThreadFocusSink);
list_init(&This->ThreadMgrEventSink);
+ list_init(&This->UIElementSink);
+ list_init(&This->InputProcessorProfileActivationSink);
TRACE("returning %p\n", This);
*ppOut = (IUnknown *)&This->ITfThreadMgrEx_iface;
dll/win32/mscat32 # Synced to WineStaging-4.18
dll/win32/mscms # Synced to WineStaging-4.18
dll/win32/mscoree # Synced to Wine-1.5.4
-dll/win32/msctf # Synced to WineStaging-4.0
+dll/win32/msctf # Synced to WineStaging-4.18
dll/win32/msftedit # Synced to WineStaging-3.3
dll/win32/msg711.acm # Synced to WineStaging-4.0
dll/win32/msgsm32.acm # Synced to WineStaging-4.0