zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

elscore.h (4313B) - Raw


      1 /**
      2  * This file has no copyright assigned and is placed in the Public Domain.
      3  * This file is part of the mingw-w64 runtime package.
      4  * No warranty is given; refer to the file DISCLAIMER.PD within this package.
      5  */
      6 #ifndef __INC_ELSCORE__
      7 #define __INC_ELSCORE__
      8 
      9 #include <objbase.h>
     10 
     11 #ifdef __cplusplus
     12 extern "C" {
     13 #endif
     14 
     15 #ifndef ELSCOREAPI
     16 #define ELSCOREAPI DECLSPEC_IMPORT
     17 #endif
     18 
     19 #ifndef CALLBACK
     20 #define CALLBACK WINAPI
     21 #endif
     22 
     23 /* MAPPING_ENUM_OPTIONS.ServiceType */
     24 #define ALL_SERVICE_TYPES 0
     25 #define HIGHLEVEL_SERVICE_TYPES 1
     26 #define LOWLEVEL_SERVICE_TYPES 2
     27 
     28 /* MAPPING_ENUM_OPTIONS.OnlineService */
     29 #define ALL_SERVICES 0
     30 #define ONLINE_SERVICES 1
     31 #define OFFLINE_SERVICES 2
     32 
     33 typedef struct _MAPPING_DATA_RANGE {
     34   DWORD  dwStartIndex;
     35   DWORD  dwEndIndex;
     36   LPWSTR pszDescription;
     37   DWORD  dwDescriptionLength;
     38   LPVOID pData;
     39   DWORD  dwDataSize;
     40   LPWSTR pszContentType;
     41   LPWSTR *prgActionIds;
     42   DWORD  dwActionsCount;
     43   LPWSTR *prgActionDisplayNames;
     44 } MAPPING_DATA_RANGE, *PMAPPING_DATA_RANGE;
     45 
     46 typedef struct _MAPPING_ENUM_OPTIONS {
     47   size_t   Size;
     48   LPWSTR   pszCategory;
     49   LPWSTR   pszInputLanguage;
     50   LPWSTR   pszOutputLanguage;
     51   LPWSTR   pszInputScript;
     52   LPWSTR   pszOutputScript;
     53   LPWSTR   pszInputContentType;
     54   LPWSTR   pszOutputContentType;
     55   GUID     *pGuid;
     56   unsigned OnlineService  :2;
     57   unsigned ServiceType  :2;
     58 } MAPPING_ENUM_OPTIONS, *PMAPPING_ENUM_OPTIONS;
     59 
     60 typedef struct _MAPPING_PROPERTY_BAG {
     61   size_t              Size;
     62   PMAPPING_DATA_RANGE prgResultRanges;
     63   DWORD               dwRangesCount;
     64   LPVOID              pServiceData;
     65   DWORD               dwServiceDataSize;
     66   LPVOID              pCallerData;
     67   DWORD               dwCallerDataSize;
     68   LPVOID              pContext;
     69 } MAPPING_PROPERTY_BAG, *PMAPPING_PROPERTY_BAG;
     70 
     71 typedef void (CALLBACK *PFN_MAPPINGCALLBACKPROC)(
     72   MAPPING_PROPERTY_BAG *pBag,
     73   LPVOID data,
     74   DWORD dwDataSize,
     75   HRESULT Result
     76 );
     77 
     78 typedef struct _MAPPING_OPTIONS {
     79   size_t                  Size;
     80   LPWSTR                  pszInputLanguage;
     81   LPWSTR                  pszOutputLanguage;
     82   LPWSTR                  pszInputScript;
     83   LPWSTR                  pszOutputScript;
     84   LPWSTR                  pszInputContentType;
     85   LPWSTR                  pszOutputContentType;
     86   LPWSTR                  pszUILanguage;
     87   PFN_MAPPINGCALLBACKPROC pfnRecognizeCallback;
     88   LPVOID                  pRecognizeCallerData;
     89   DWORD                   dwRecognizeCallerDataSize;
     90   PFN_MAPPINGCALLBACKPROC pfnActionCallback;
     91   LPVOID                  pActionCallerData;
     92   DWORD                   dwActionCallerDataSize;
     93   DWORD                   dwServiceFlag;
     94   unsigned                GetActionDisplayName  :1;
     95 } MAPPING_OPTIONS, *PMAPPING_OPTIONS;
     96 
     97 typedef struct _MAPPING_SERVICE_INFO {
     98   size_t   Size;
     99   LPWSTR   pszCopyright;
    100   WORD     wMajorVersion;
    101   WORD     wMinorVersion;
    102   WORD     wBuildVersion;
    103   WORD     wStepVersion;
    104   DWORD    dwInputContentTypesCount;
    105   LPWSTR   *prgInputContentTypes;
    106   DWORD    dwOutputContentTypesCount;
    107   LPWSTR   *prgOutputContentTypes;
    108   DWORD    dwInputLanguagesCount;
    109   LPWSTR   *prgInputLanguages;
    110   DWORD    dwOutputLanguagesCount;
    111   LPWSTR   *prgOutputLanguages;
    112   DWORD    dwInputScriptsCount;
    113   LPWSTR   *prgInputScripts;
    114   DWORD    dwOutputScriptsCount;
    115   LPWSTR   *prgOutputScripts;
    116   GUID     guid;
    117   LPWSTR   pszCategory;
    118   LPWSTR   pszDescription;
    119   DWORD    dwPrivateDataSize;
    120   LPVOID   pPrivateData;
    121   LPVOID   pContext;
    122   unsigned IsOneToOneLanguageMapping  :1;
    123   unsigned HasSubservices  :1;
    124   unsigned OnlineOnly  :1;
    125   unsigned ServiceType  :2;
    126 } MAPPING_SERVICE_INFO, *PMAPPING_SERVICE_INFO;
    127 
    128 ELSCOREAPI HRESULT WINAPI MappingRecognizeText(
    129   PMAPPING_SERVICE_INFO pServiceInfo,
    130   LPCWSTR pszText,
    131   DWORD dwLength,
    132   DWORD dwIndex,
    133   PMAPPING_OPTIONS pOptions,
    134   PMAPPING_PROPERTY_BAG pBag
    135 );
    136 
    137 ELSCOREAPI HRESULT WINAPI MappingDoAction(
    138   PMAPPING_PROPERTY_BAG pBag,
    139   DWORD dwRangeIndex,
    140   LPCWSTR pszActionId
    141 );
    142 
    143 ELSCOREAPI HRESULT WINAPI MappingFreePropertyBag(
    144   PMAPPING_PROPERTY_BAG pBag
    145 );
    146 
    147 ELSCOREAPI HRESULT WINAPI MappingFreeServices(
    148   PMAPPING_SERVICE_INFO pServiceInfo
    149 );
    150 
    151 ELSCOREAPI HRESULT WINAPI MappingGetServices(
    152   PMAPPING_ENUM_OPTIONS pOptions,
    153   PMAPPING_SERVICE_INFO *prgServices,
    154   DWORD *pdwServicesCount
    155 );
    156 
    157 #ifdef __cplusplus
    158 }
    159 #endif
    160 
    161 #endif /*__INC_ELSCORE__*/