src/video/windows/SDL_msctf.h
author Sam Lantinga <slouken@libsdl.org>
Sat, 02 Jan 2016 10:10:34 -0800
changeset 9998 f67cf37e9cd4
parent 9619 b94b6d0bff0f
child 10737 3406a0f8b041
permissions -rw-r--r--
Updated copyright to 2016
slouken@8616
     1
/*
slouken@8616
     2
  Simple DirectMedia Layer
slouken@9998
     3
  Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
slouken@8616
     4
slouken@8616
     5
  This software is provided 'as-is', without any express or implied
slouken@8616
     6
  warranty.  In no event will the authors be held liable for any damages
slouken@8616
     7
  arising from the use of this software.
slouken@8616
     8
slouken@8616
     9
  Permission is granted to anyone to use this software for any purpose,
slouken@8616
    10
  including commercial applications, and to alter it and redistribute it
slouken@8616
    11
  freely, subject to the following restrictions:
slouken@8616
    12
slouken@8616
    13
  1. The origin of this software must not be misrepresented; you must not
slouken@8616
    14
     claim that you wrote the original software. If you use this software
slouken@8616
    15
     in a product, an acknowledgment in the product documentation would be
slouken@8616
    16
     appreciated but is not required.
slouken@8616
    17
  2. Altered source versions must be plainly marked as such, and must not be
slouken@8616
    18
     misrepresented as being the original software.
slouken@8616
    19
  3. This notice may not be removed or altered from any source distribution.
slouken@8616
    20
*/
slouken@8616
    21
slouken@5245
    22
#ifndef _SDL_msctf_h
slouken@5245
    23
#define _SDL_msctf_h
slouken@5245
    24
slouken@5245
    25
#include <unknwn.h>
slouken@5245
    26
slouken@5245
    27
#define     TF_INVALID_COOKIE               (0xffffffff)
slouken@5245
    28
#define     TF_IPSINK_FLAG_ACTIVE           0x0001
slouken@5245
    29
#define     TF_TMAE_UIELEMENTENABLEDONLY    0x00000004
slouken@5245
    30
slouken@5245
    31
typedef struct ITfThreadMgr ITfThreadMgr;
slouken@5245
    32
typedef struct ITfDocumentMgr ITfDocumentMgr;
slouken@5245
    33
typedef struct ITfClientId ITfClientId;
slouken@5245
    34
slouken@5245
    35
typedef struct IEnumTfDocumentMgrs IEnumTfDocumentMgrs;
slouken@5245
    36
typedef struct IEnumTfFunctionProviders IEnumTfFunctionProviders;
slouken@5245
    37
typedef struct ITfFunctionProvider ITfFunctionProvider;
slouken@5245
    38
typedef struct ITfCompartmentMgr ITfCompartmentMgr;
slouken@5245
    39
typedef struct ITfContext ITfContext;
slouken@5245
    40
typedef struct IEnumTfContexts IEnumTfContexts;
slouken@5245
    41
typedef struct ITfUIElementSink ITfUIElementSink;
slouken@5245
    42
typedef struct ITfUIElement ITfUIElement;
slouken@5245
    43
typedef struct ITfUIElementMgr ITfUIElementMgr;
slouken@5245
    44
typedef struct IEnumTfUIElements IEnumTfUIElements;
slouken@5245
    45
typedef struct ITfThreadMgrEx ITfThreadMgrEx;
slouken@5245
    46
typedef struct ITfCandidateListUIElement ITfCandidateListUIElement;
slouken@5245
    47
typedef struct ITfReadingInformationUIElement ITfReadingInformationUIElement;
slouken@5245
    48
typedef struct ITfInputProcessorProfileActivationSink ITfInputProcessorProfileActivationSink;
slouken@5245
    49
typedef struct ITfSource ITfSource;
slouken@5245
    50
slouken@5245
    51
typedef DWORD TfClientId;
slouken@5245
    52
typedef DWORD TfEditCookie;
slouken@5245
    53
slouken@5245
    54
typedef struct ITfThreadMgrVtbl
slouken@5245
    55
{
slouken@5245
    56
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfThreadMgr *, REFIID, void **);
slouken@5245
    57
    ULONG (STDMETHODCALLTYPE *AddRef)(ITfThreadMgr *);
slouken@5245
    58
    ULONG (STDMETHODCALLTYPE *Release)(ITfThreadMgr *);
slouken@5245
    59
    HRESULT (STDMETHODCALLTYPE *Activate)(ITfThreadMgr *, TfClientId *);
slouken@5245
    60
    HRESULT (STDMETHODCALLTYPE *Deactivate)(ITfThreadMgr *);
slouken@5245
    61
    HRESULT (STDMETHODCALLTYPE *CreateDocumentMgr)(ITfThreadMgr *);
slouken@5245
    62
    HRESULT (STDMETHODCALLTYPE *EnumDocumentMgrs)(ITfThreadMgr *, IEnumTfDocumentMgrs **);
slouken@5245
    63
    HRESULT (STDMETHODCALLTYPE *GetFocus)(ITfThreadMgr *, ITfDocumentMgr **);
slouken@5245
    64
    HRESULT (STDMETHODCALLTYPE *SetFocus)(ITfThreadMgr *, ITfDocumentMgr *);
slouken@5245
    65
    HRESULT (STDMETHODCALLTYPE *AssociateFocus)(ITfThreadMgr *, HWND, ITfDocumentMgr *, ITfDocumentMgr **);
slouken@5245
    66
    HRESULT (STDMETHODCALLTYPE *IsThreadFocus)(ITfThreadMgr *, BOOL *);
slouken@5245
    67
    HRESULT (STDMETHODCALLTYPE *GetFunctionProvider)(ITfThreadMgr *, REFCLSID, ITfFunctionProvider **);
slouken@5245
    68
    HRESULT (STDMETHODCALLTYPE *EnumFunctionProviders)(ITfThreadMgr *, IEnumTfFunctionProviders **);
slouken@5245
    69
    HRESULT (STDMETHODCALLTYPE *GetGlobalCompartment)(ITfThreadMgr *, ITfCompartmentMgr **);
slouken@5245
    70
} ITfThreadMgrVtbl;
slouken@5245
    71
slouken@5245
    72
struct ITfThreadMgr
slouken@5245
    73
{
slouken@5245
    74
    const struct ITfThreadMgrVtbl *lpVtbl;
slouken@5245
    75
};
slouken@5245
    76
slouken@5245
    77
typedef struct ITfThreadMgrExVtbl
slouken@5245
    78
{
slouken@5245
    79
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfThreadMgrEx *, REFIID, void **);
slouken@5245
    80
    ULONG (STDMETHODCALLTYPE *AddRef)(ITfThreadMgrEx *);
slouken@5245
    81
    ULONG (STDMETHODCALLTYPE *Release)(ITfThreadMgrEx *);
slouken@5245
    82
    HRESULT (STDMETHODCALLTYPE *Activate)(ITfThreadMgrEx *, TfClientId *);
slouken@5245
    83
    HRESULT (STDMETHODCALLTYPE *Deactivate)(ITfThreadMgrEx *);
slouken@5245
    84
    HRESULT (STDMETHODCALLTYPE *CreateDocumentMgr)(ITfThreadMgrEx *, ITfDocumentMgr **);
slouken@5245
    85
    HRESULT (STDMETHODCALLTYPE *EnumDocumentMgrs)(ITfThreadMgrEx *, IEnumTfDocumentMgrs **);
slouken@5245
    86
    HRESULT (STDMETHODCALLTYPE *GetFocus)(ITfThreadMgrEx *, ITfDocumentMgr **);
slouken@5245
    87
    HRESULT (STDMETHODCALLTYPE *SetFocus)(ITfThreadMgrEx *, ITfDocumentMgr *);
slouken@5245
    88
    HRESULT (STDMETHODCALLTYPE *AssociateFocus)(ITfThreadMgrEx *, ITfDocumentMgr *, ITfDocumentMgr **);
slouken@5245
    89
    HRESULT (STDMETHODCALLTYPE *IsThreadFocus)(ITfThreadMgrEx *, BOOL *);
slouken@5245
    90
    HRESULT (STDMETHODCALLTYPE *GetFunctionProvider)(ITfThreadMgrEx *, REFCLSID, ITfFunctionProvider **);
slouken@5245
    91
    HRESULT (STDMETHODCALLTYPE *EnumFunctionProviders)(ITfThreadMgrEx *, IEnumTfFunctionProviders **);
slouken@5245
    92
    HRESULT (STDMETHODCALLTYPE *GetGlobalCompartment)(ITfThreadMgrEx *, ITfCompartmentMgr **);
slouken@5245
    93
    HRESULT (STDMETHODCALLTYPE *ActivateEx)(ITfThreadMgrEx *, TfClientId *, DWORD);
slouken@5245
    94
    HRESULT (STDMETHODCALLTYPE *GetActiveFlags)(ITfThreadMgrEx *, DWORD *);
slouken@5245
    95
} ITfThreadMgrExVtbl;
slouken@5245
    96
slouken@5245
    97
struct ITfThreadMgrEx
slouken@5245
    98
{
slouken@5245
    99
    const struct ITfThreadMgrExVtbl *lpVtbl;
slouken@5245
   100
};
slouken@5245
   101
slouken@5245
   102
typedef struct ITfDocumentMgrVtbl
slouken@5245
   103
{
slouken@5245
   104
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfDocumentMgr *, REFIID, void **);
slouken@5245
   105
    ULONG (STDMETHODCALLTYPE *AddRef)(ITfDocumentMgr *);
slouken@5245
   106
    ULONG (STDMETHODCALLTYPE *Release)(ITfDocumentMgr *);
slouken@5245
   107
    HRESULT (STDMETHODCALLTYPE *CreateContext)(ITfDocumentMgr *, TfClientId, DWORD, IUnknown *, ITfContext **, TfEditCookie *);
slouken@5245
   108
    HRESULT (STDMETHODCALLTYPE *Push)(ITfDocumentMgr *, ITfContext *);
slouken@5245
   109
    HRESULT (STDMETHODCALLTYPE *Pop)(ITfDocumentMgr *);
slouken@5245
   110
    HRESULT (STDMETHODCALLTYPE *GetTop)(ITfDocumentMgr *, ITfContext **);
slouken@5245
   111
    HRESULT (STDMETHODCALLTYPE *GetBase)(ITfDocumentMgr *, ITfContext **);
slouken@5245
   112
    HRESULT (STDMETHODCALLTYPE *EnumContexts)(ITfDocumentMgr *, IEnumTfContexts **);
slouken@5245
   113
} ITfDocumentMgrVtbl;
slouken@5245
   114
slouken@5245
   115
struct ITfDocumentMgr
slouken@5245
   116
{
slouken@5245
   117
    const struct ITfDocumentMgrVtbl *lpVtbl;
slouken@5245
   118
};
slouken@5245
   119
slouken@5245
   120
typedef struct ITfUIElementSinkVtbl
slouken@5245
   121
{
slouken@5245
   122
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfUIElementSink *, REFIID, void **);
slouken@5245
   123
    ULONG (STDMETHODCALLTYPE *AddRef)(ITfUIElementSink *);
slouken@5245
   124
    ULONG (STDMETHODCALLTYPE *Release)(ITfUIElementSink *);
slouken@5245
   125
    HRESULT (STDMETHODCALLTYPE *BeginUIElement)(ITfUIElementSink *, DWORD, BOOL *);
slouken@5245
   126
    HRESULT (STDMETHODCALLTYPE *UpdateUIElement)(ITfUIElementSink *, DWORD);
slouken@5245
   127
    HRESULT (STDMETHODCALLTYPE *EndUIElement)(ITfUIElementSink *, DWORD);
slouken@5245
   128
} ITfUIElementSinkVtbl;
slouken@5245
   129
slouken@5245
   130
struct ITfUIElementSink
slouken@5245
   131
{
slouken@5245
   132
    const struct ITfUIElementSinkVtbl *lpVtbl;
slouken@5245
   133
};
slouken@5245
   134
slouken@5245
   135
typedef struct ITfUIElementMgrVtbl
slouken@5245
   136
{
slouken@5245
   137
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfUIElementMgr *, REFIID, void **);
slouken@5245
   138
    ULONG (STDMETHODCALLTYPE *AddRef)(ITfUIElementMgr *);
slouken@5245
   139
    ULONG (STDMETHODCALLTYPE *Release)(ITfUIElementMgr *);
slouken@5245
   140
    HRESULT (STDMETHODCALLTYPE *BeginUIElement)(ITfUIElementMgr *, ITfUIElement *, BOOL *, DWORD *);
slouken@5245
   141
    HRESULT (STDMETHODCALLTYPE *UpdateUIElement)(ITfUIElementMgr *, DWORD);
slouken@5245
   142
    HRESULT (STDMETHODCALLTYPE *EndUIElement)(ITfUIElementMgr *, DWORD);
slouken@5245
   143
    HRESULT (STDMETHODCALLTYPE *GetUIElement)(ITfUIElementMgr *, DWORD, ITfUIElement **);
slouken@5245
   144
    HRESULT (STDMETHODCALLTYPE *EnumUIElements)(ITfUIElementMgr *, IEnumTfUIElements **);
slouken@5245
   145
} ITfUIElementMgrVtbl;
slouken@5245
   146
slouken@5245
   147
struct ITfUIElementMgr
slouken@5245
   148
{
slouken@5245
   149
    const struct ITfUIElementMgrVtbl *lpVtbl;
slouken@5245
   150
};
slouken@5245
   151
slouken@5245
   152
typedef struct ITfCandidateListUIElementVtbl
slouken@5245
   153
{
slouken@5245
   154
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfCandidateListUIElement *, REFIID, void **);
slouken@5245
   155
    ULONG (STDMETHODCALLTYPE *AddRef)(ITfCandidateListUIElement *);
slouken@5245
   156
    ULONG (STDMETHODCALLTYPE *Release)(ITfCandidateListUIElement *);
slouken@5245
   157
    HRESULT (STDMETHODCALLTYPE *GetDescription)(ITfCandidateListUIElement *, BSTR *);
slouken@5245
   158
    HRESULT (STDMETHODCALLTYPE *GetGUID)(ITfCandidateListUIElement *, GUID *);
slouken@5245
   159
    HRESULT (STDMETHODCALLTYPE *Show)(ITfCandidateListUIElement *, BOOL);
slouken@5245
   160
    HRESULT (STDMETHODCALLTYPE *IsShown)(ITfCandidateListUIElement *, BOOL *);
slouken@5245
   161
    HRESULT (STDMETHODCALLTYPE *GetUpdatedFlags)(ITfCandidateListUIElement *, DWORD *);
slouken@5245
   162
    HRESULT (STDMETHODCALLTYPE *GetDocumentMgr)(ITfCandidateListUIElement *, ITfDocumentMgr **);
slouken@5245
   163
    HRESULT (STDMETHODCALLTYPE *GetCount)(ITfCandidateListUIElement *, UINT *);
slouken@5245
   164
    HRESULT (STDMETHODCALLTYPE *GetSelection)(ITfCandidateListUIElement *, UINT *);
slouken@5245
   165
    HRESULT (STDMETHODCALLTYPE *GetString)(ITfCandidateListUIElement *, UINT, BSTR *);
slouken@5245
   166
    HRESULT (STDMETHODCALLTYPE *GetPageIndex)(ITfCandidateListUIElement *, UINT *, UINT, UINT *);
slouken@5245
   167
    HRESULT (STDMETHODCALLTYPE *SetPageIndex)(ITfCandidateListUIElement *, UINT *, UINT);
slouken@5245
   168
    HRESULT (STDMETHODCALLTYPE *GetCurrentPage)(ITfCandidateListUIElement *, UINT *);
slouken@5245
   169
} ITfCandidateListUIElementVtbl;
slouken@5245
   170
slouken@5245
   171
struct ITfCandidateListUIElement
slouken@5245
   172
{
slouken@5245
   173
    const struct ITfCandidateListUIElementVtbl *lpVtbl;
slouken@5245
   174
};
slouken@5245
   175
slouken@5245
   176
typedef struct ITfReadingInformationUIElementVtbl
slouken@5245
   177
{
slouken@5245
   178
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfReadingInformationUIElement *, REFIID, void **);
slouken@5245
   179
    ULONG (STDMETHODCALLTYPE *AddRef)(ITfReadingInformationUIElement *);
slouken@5245
   180
    ULONG (STDMETHODCALLTYPE *Release)(ITfReadingInformationUIElement *);
slouken@5245
   181
    HRESULT (STDMETHODCALLTYPE *GetDescription)(ITfReadingInformationUIElement *, BSTR *);
slouken@5245
   182
    HRESULT (STDMETHODCALLTYPE *GetGUID)(ITfReadingInformationUIElement *, GUID *);
slouken@5245
   183
    HRESULT (STDMETHODCALLTYPE *Show)(ITfReadingInformationUIElement *, BOOL);
slouken@5245
   184
    HRESULT (STDMETHODCALLTYPE *IsShown)(ITfReadingInformationUIElement *, BOOL *);
slouken@5245
   185
    HRESULT (STDMETHODCALLTYPE *GetUpdatedFlags)(ITfReadingInformationUIElement *, DWORD *);
slouken@5245
   186
    HRESULT (STDMETHODCALLTYPE *GetContext)(ITfReadingInformationUIElement *, ITfContext **);
slouken@5245
   187
    HRESULT (STDMETHODCALLTYPE *GetString)(ITfReadingInformationUIElement *, BSTR *);
slouken@5245
   188
    HRESULT (STDMETHODCALLTYPE *GetMaxReadingStringLength)(ITfReadingInformationUIElement *, UINT *);
slouken@5245
   189
    HRESULT (STDMETHODCALLTYPE *GetErrorIndex)(ITfReadingInformationUIElement *, UINT *);
slouken@5245
   190
    HRESULT (STDMETHODCALLTYPE *IsVerticalOrderPreferred)(ITfReadingInformationUIElement *, BOOL *);
slouken@5245
   191
} ITfReadingInformationUIElementVtbl;
slouken@5245
   192
slouken@5245
   193
struct ITfReadingInformationUIElement
slouken@5245
   194
{
slouken@5245
   195
    const struct ITfReadingInformationUIElementVtbl *lpVtbl;
slouken@5245
   196
};
slouken@5245
   197
slouken@5245
   198
typedef struct ITfUIElementVtbl
slouken@5245
   199
{
slouken@5245
   200
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfUIElement *, REFIID, void **);
slouken@5245
   201
    ULONG (STDMETHODCALLTYPE *AddRef)(ITfUIElement *);
slouken@5245
   202
    ULONG (STDMETHODCALLTYPE *Release)(ITfUIElement *);
slouken@5245
   203
    HRESULT (STDMETHODCALLTYPE *GetDescription)(ITfUIElement *, BSTR *);
slouken@5245
   204
    HRESULT (STDMETHODCALLTYPE *GetGUID)(ITfUIElement *, GUID *);
slouken@5245
   205
    HRESULT (STDMETHODCALLTYPE *Show)(ITfUIElement *, BOOL);
slouken@5245
   206
    HRESULT (STDMETHODCALLTYPE *IsShown)(ITfUIElement *, BOOL *);
slouken@5245
   207
} ITfUIElementVtbl;
slouken@5245
   208
slouken@5245
   209
struct ITfUIElement
slouken@5245
   210
{
slouken@5245
   211
    const struct ITfUIElementVtbl *lpVtbl;
slouken@5245
   212
};
slouken@5245
   213
slouken@5245
   214
typedef struct ITfInputProcessorProfileActivationSinkVtbl
slouken@5245
   215
{
slouken@5245
   216
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfInputProcessorProfileActivationSink *, REFIID, void **);
slouken@5245
   217
    ULONG (STDMETHODCALLTYPE *AddRef)(ITfInputProcessorProfileActivationSink *);
slouken@5245
   218
    ULONG (STDMETHODCALLTYPE *Release)(ITfInputProcessorProfileActivationSink *);
slouken@5245
   219
    HRESULT (STDMETHODCALLTYPE *OnActivated)(ITfInputProcessorProfileActivationSink *, DWORD, LANGID, REFCLSID, REFGUID, REFGUID, HKL, DWORD);
slouken@5245
   220
slouken@5245
   221
} ITfInputProcessorProfileActivationSinkVtbl;
slouken@5245
   222
slouken@5245
   223
struct ITfInputProcessorProfileActivationSink
slouken@5245
   224
{
slouken@5245
   225
    const struct ITfInputProcessorProfileActivationSinkVtbl *lpVtbl;
slouken@5245
   226
};
slouken@5245
   227
slouken@5245
   228
typedef struct ITfSourceVtbl
slouken@5245
   229
{
slouken@5245
   230
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfSource *, REFIID, void **);
slouken@5245
   231
    ULONG (STDMETHODCALLTYPE *AddRef)(ITfSource *);
slouken@5245
   232
    ULONG (STDMETHODCALLTYPE *Release)(ITfSource *);
slouken@5245
   233
    HRESULT (STDMETHODCALLTYPE *AdviseSink)(ITfSource *, REFIID, IUnknown *, DWORD *);
slouken@5245
   234
    HRESULT (STDMETHODCALLTYPE *UnadviseSink)(ITfSource *, DWORD);
slouken@5245
   235
} ITfSourceVtbl;
slouken@5245
   236
slouken@5245
   237
struct ITfSource
slouken@5245
   238
{
slouken@5245
   239
    const struct ITfSourceVtbl *lpVtbl;
slouken@5245
   240
};
slouken@5245
   241
slouken@5245
   242
#endif /* _SDL_msctf_h */