wine/include/msctf.idl

243 lines
6.3 KiB
Plaintext
Raw Normal View History

/*
* Copyright 2008 Aric Stewart, CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef DO_NO_IMPORTS
import "oaidl.idl";
import "comcat.idl";
2009-02-02 16:24:59 +00:00
import "textstor.idl";
/* import "ctfutb.idl"; */
#endif
2009-02-02 16:25:06 +00:00
cpp_quote("#define TF_E_STACKFULL MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0501)")
cpp_quote("EXTERN_C const CLSID CLSID_TF_ThreadMgr;")
2009-01-30 20:27:06 +00:00
typedef [uuid(7213778c-7bb0-4270-b050-6189ee594e97)] DWORD TfEditCookie;
typedef [uuid(de403c21-89fd-4f85-8b87-64584d063fbc)] DWORD TfClientId;
interface ITfDocumentMgr;
2009-01-30 20:27:06 +00:00
interface ITfContext;
interface IEnumTfDocumentMgrs;
2009-01-30 20:27:06 +00:00
interface IEnumTfContexts;
interface ITfFunctionProvider;
interface IEnumTfFunctionProviders;
interface ITfCompartmentMgr;
2009-02-02 16:24:59 +00:00
interface ITfEditSession;
interface ITfRange;
interface ITfContextView;
interface IEnumTfContextViews;
interface ITfProperty;
interface ITfReadOnlyProperty;
interface IEnumTfProperties;
interface ITfRangeBackup;
[
object,
uuid(aa80e801-2021-11d2-93e0-0060b067b86e),
pointer_default(unique)
]
interface ITfThreadMgr: IUnknown
{
HRESULT Activate(
[out] TfClientId *ptid);
HRESULT Deactivate();
HRESULT CreateDocumentMgr(
[out] ITfDocumentMgr **ppdim);
HRESULT EnumDocumentMgrs(
[out] IEnumTfDocumentMgrs **ppEnum);
HRESULT GetFocus(
[out] ITfDocumentMgr **ppdimFocus);
HRESULT SetFocus(
[in] ITfDocumentMgr *pdimFocus);
HRESULT AssociateFocus(
[in] HWND hwnd,
[in, unique] ITfDocumentMgr *pdimNew,
[out] ITfDocumentMgr **ppdimPrev);
HRESULT IsThreadFocus(
[out] BOOL *pfThreadFocus);
HRESULT GetFunctionProvider(
[in] REFCLSID clsid,
[out] ITfFunctionProvider **ppFuncProv);
HRESULT EnumFunctionProviders(
[out] IEnumTfFunctionProviders **ppEnum);
HRESULT GetGlobalCompartment(
[out] ITfCompartmentMgr **ppCompMgr);
};
2009-01-30 20:27:06 +00:00
[
object,
uuid(aa80e7f4-2021-11d2-93e0-0060b067b86e),
pointer_default(unique)
]
interface ITfDocumentMgr: IUnknown
{
HRESULT CreateContext(
[in] TfClientId tidOwner,
[in] DWORD dwFlags,
[in, unique] IUnknown *punk,
[out] ITfContext **ppic,
[out] TfEditCookie *pecTextStore);
HRESULT Push(
[in] ITfContext *pic);
const DWORD TF_POPF_ALL = 0x0001;
HRESULT Pop(
[in] DWORD dwFlags);
HRESULT GetTop(
[out] ITfContext **ppic);
HRESULT GetBase(
[out] ITfContext **ppic);
HRESULT EnumContexts(
[out] IEnumTfContexts **ppEnum);
};
2009-02-02 16:24:59 +00:00
[
object,
uuid(aa80e7fd-2021-11d2-93e0-0060b067b86e),
pointer_default(unique)
]
interface ITfContext : IUnknown
{
const DWORD TF_ES_ASYNCDONTCARE = 0x0;
const DWORD TF_ES_SYNC = 0x1;
const DWORD TF_ES_READ = 0x2;
const DWORD TF_ES_READWRITE = 0x6;
const DWORD TF_ES_ASYNC = 0x8;
HRESULT RequestEditSession(
[in] TfClientId tid,
[in] ITfEditSession *pes,
[in] DWORD dwFlags,
[out] HRESULT *phrSession);
HRESULT InWriteSession(
[in] TfClientId tid,
[out] BOOL *pfWriteSession);
typedef [uuid(1690be9b-d3e9-49f6-8d8b-51b905af4c43)] enum { TF_AE_NONE, TF_AE_START, TF_AE_END } TfActiveSelEnd;
typedef [uuid(36ae42a4-6989-4bdc-b48a-6137b7bf2e42)] struct TF_SELECTIONSTYLE
{
TfActiveSelEnd ase;
BOOL fInterimChar;
} TF_SELECTIONSTYLE;
typedef [uuid(75eb22f2-b0bf-46a8-8006-975a3b6efcf1)] struct TF_SELECTION
{
ITfRange *range;
TF_SELECTIONSTYLE style;
} TF_SELECTION;
const ULONG TF_DEFAULT_SELECTION = TS_DEFAULT_SELECTION;
HRESULT GetSelection(
[in] TfEditCookie ec,
[in] ULONG ulIndex,
[in] ULONG ulCount,
[out, size_is(ulCount), length_is(*pcFetched)] TF_SELECTION *pSelection,
[out] ULONG *pcFetched);
HRESULT SetSelection(
[in] TfEditCookie ec,
[in] ULONG ulCount,
[in, size_is(ulCount)] const TF_SELECTION *pSelection);
HRESULT GetStart(
[in] TfEditCookie ec,
[out] ITfRange **ppStart);
HRESULT GetEnd(
[in] TfEditCookie ec,
[out] ITfRange **ppEnd);
typedef [uuid(bc7d979a-846a-444d-afef-0a9bfa82b961)] TS_STATUS TF_STATUS;
const DWORD TF_SD_READONLY = TS_SD_READONLY;
const DWORD TF_SD_LOADING = TS_SD_LOADING;
const DWORD TF_SS_DISJOINTSEL = TS_SS_DISJOINTSEL;
const DWORD TF_SS_REGIONS = TS_SS_REGIONS;
const DWORD TF_SS_TRANSITORY = TS_SS_TRANSITORY;
HRESULT GetActiveView(
[out] ITfContextView **ppView);
HRESULT EnumViews(
[out] IEnumTfContextViews **ppEnum);
HRESULT GetStatus(
[out] TF_STATUS *pdcs);
HRESULT GetProperty(
[in] REFGUID guidProp,
[out] ITfProperty **ppProp);
HRESULT GetAppProperty(
[in] REFGUID guidProp,
[out] ITfReadOnlyProperty **ppProp);
HRESULT TrackProperties(
[in, size_is(cProp)] const GUID **prgProp,
[in] ULONG cProp,
[in, size_is(cAppProp)] const GUID **prgAppProp,
[in] ULONG cAppProp,
[out] ITfReadOnlyProperty **ppProperty);
HRESULT EnumProperties(
[out] IEnumTfProperties **ppEnum);
HRESULT GetDocumentMgr(
[out] ITfDocumentMgr **ppDm);
HRESULT CreateRangeBackup(
[in] TfEditCookie ec,
[in] ITfRange *pRange,
[out] ITfRangeBackup **ppBackup);
};
[
object,
uuid(4ea48a35-60ae-446f-8fd6-e6a8d82459f7),
pointer_default(unique)
]
interface ITfSource : IUnknown
{
HRESULT AdviseSink(
[in] REFIID riid,
[in, iid_is(riid)] IUnknown *punk,
[out] DWORD *pdwCookie);
HRESULT UnadviseSink(
[in] DWORD dwCookie);
};