cscg22-gearboy

CSCG 2022 Challenge 'Gearboy'
git clone https://git.sinitax.com/sinitax/cscg22-gearboy
Log | Files | Refs | sfeed.txt

SDL_msctf.h (11531B)


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