' ########################################################################################
' Microsoft Windows
' File: InputScope.inc
' Contents: InputScope declarations
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
#IF NOT %DEF(PBX_InputScope_PBI)
#DEFINE PBX_InputScope_PBI
%EQUATE `INPUTSCOPE_INC = 1
'/* header files for imported files */
#INCLUDE ONCE "Legacy/COM/OAIdl.inc"
#INCLUDE ONCE "Legacy/COM/OCIdl.inc"
#IF NOT %DEF(%INPUTSCOPE_DEFINED)
 %INPUTSCOPE_DEFINED = 1
#INCLUDE ONCE "Core/Windows.inc"
' enum InputScope
%EQUATE `IS_DEFAULT = 0
%EQUATE `IS_URL = 1
%EQUATE `IS_FILE_FULLFILEPATH = 2
%EQUATE `IS_FILE_FILENAME = 3
%EQUATE `IS_EMAIL_USERNAME = 4
%EQUATE `IS_EMAIL_SMTPEMAILADDRESS = 5
%EQUATE `IS_LOGINNAME = 6
%EQUATE `IS_PERSONALNAME_FULLNAME = 7
%EQUATE `IS_PERSONALNAME_PREFIX = 8
%EQUATE `IS_PERSONALNAME_GIVENNAME = 9
%EQUATE `IS_PERSONALNAME_MIDDLENAME = 10
%EQUATE `IS_PERSONALNAME_SURNAME = 11
%EQUATE `IS_PERSONALNAME_SUFFIX = 12
%EQUATE `IS_ADDRESS_FULLPOSTALADDRESS = 13
%EQUATE `IS_ADDRESS_POSTALCODE = 14
%EQUATE `IS_ADDRESS_STREET = 15
%EQUATE `IS_ADDRESS_STATEORPROVINCE = 16
%EQUATE `IS_ADDRESS_CITY = 17
%EQUATE `IS_ADDRESS_COUNTRYNAME = 18
%EQUATE `IS_ADDRESS_COUNTRYSHORTNAME = 19
%EQUATE `IS_CURRENCY_AMOUNTANDSYMBOL = 20
%EQUATE `IS_CURRENCY_AMOUNT = 21
%EQUATE `IS_DATE_FULLDATE = 22
%EQUATE `IS_DATE_MONTH = 23
%EQUATE `IS_DATE_DAY = 24
%EQUATE `IS_DATE_YEAR = 25
%EQUATE `IS_DATE_MONTHNAME = 26
%EQUATE `IS_DATE_DAYNAME = 27
%EQUATE `IS_DIGITS = 28
%EQUATE `IS_NUMBER = 29
%EQUATE `IS_ONECHAR = 30
%EQUATE `IS_PASSWORD = 31
%EQUATE `IS_TELEPHONE_FULLTELEPHONENUMBER = 32
%EQUATE `IS_TELEPHONE_COUNTRYCODE = 33
%EQUATE `IS_TELEPHONE_AREACODE = 34
%EQUATE `IS_TELEPHONE_LOCALNUMBER = 35
%EQUATE `IS_TIME_FULLTIME = 36
%EQUATE `IS_TIME_HOUR = 37
%EQUATE `IS_TIME_MINORSEC = 38
%EQUATE `IS_NUMBER_FULLWIDTH = 39
%EQUATE `IS_ALPHANUMERIC_HALFWIDTH = 40
%EQUATE `IS_ALPHANUMERIC_FULLWIDTH = 41
%EQUATE `IS_CURRENCY_CHINESE = 42
%EQUATE `IS_BOPOMOFO = 43
%EQUATE `IS_HIRAGANA = 44
%EQUATE `IS_KATAKANA_HALFWIDTH = 45
%EQUATE `IS_KATAKANA_FULLWIDTH = 46
%EQUATE `IS_HANJA = 47
%EQUATE `IS_HANGUL_HALFWIDTH = 48
%EQUATE `IS_HANGUL_FULLWIDTH = 49
%EQUATE `IS_PHRASELIST = -1
%EQUATE `IS_REGULAREXPRESSION = -2
%EQUATE `IS_SRGS = -3
%EQUATE `IS_XML = -4
%EQUATE `IS_ENUMSTRING = -5
DECLARE FUNCTION SetInputScope LIB "msctf.dll" ALIAS "SetInputScope" ( BYVAL hwnd AS QUAD , BYVAL inputscope AS LONG ) AS LONG
DECLARE FUNCTION SetInputScopes LIB "msctf.dll" ALIAS "SetInputScopes" ( BYVAL hwnd AS QUAD
 , BYREF pInputScopes AS LONG
 , BYVAL cInputScopes AS DWORD
 , BYREF ppszPhraseList AS WSTRINGZ
 , BYVAL cPhrases AS DWORD
 , BYREF pszRegExp AS WSTRINGZ
 , BYREF pszSRGS AS WSTRINGZ
 ) AS LONG
DECLARE FUNCTION SetInputScopeXML LIB "msctf.dll" ALIAS "SetInputScopeXML" ( BYVAL hwnd AS DWORD
 , BYREF pszXML AS WSTRINGZ
 ) AS LONG
DECLARE FUNCTION SetInputScopes2 LIB "msctf.dll" ALIAS "SetInputScopes2" ( BYVAL hwnd AS DWORD
 , BYREF pInputScopes AS LONG
 , BYVAL cInputScopes AS DWORD
 , BYVAL pEnumString AS IEnumString
 , OPTIONAL BYREF pszRegExp AS WSTRINGZ
 , OPTIONAL BYREF pszSRGS AS WSTRINGZ
 ) AS LONG
$IID_ITfInputScope = GUID$("{FDE1EAEE-6924-4CDF-91E7-DA38CFF5559D}")
$IID_ITfInputScope2 = GUID$("{5731EAA0-6BC2-4681-A532-92FBB74D7C41}")
$GUID_PROP_INPUTSCOPE = GUID$("{1713DD5A-68E7-4A5B-9AF6-592A595C778D}")
' ########################################################################################
' ITfInputScope interface
' IID = FDE1EAEE-6924-4CDF-91E7-DA38CFF5559D
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ITfInputScope_INTERFACE_DEFINED)
 %ITfInputScope_INTERFACE_DEFINED = 1
INTERFACE ITfInputScope $IID_ITfInputScope
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetInputScopes ( ' VTable offset = 12
 BYREF pprgInputScopes AS LONG
 , BYREF pcCount AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetPhrase ( ' VTable offset = 16
 BYREF ppbstrPhrases AS WSTRING
 , BYREF pcCount AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetRegularExpression ( ' VTable offset = 20
 BYREF pbstrRegExp AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD GetSRGS ( ' VTable offset = 24
 BYREF pbstrSRGS AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD GetXML ( ' VTable offset = 28
 BYREF pbstrXML AS WSTRING
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ITfInputScope_INTERFACE_DEFINED__ */
' ########################################################################################
' ITfInputScope2 interface
' IID = 5731EAA0-6BC2-4681-A532-92FBB74D7C41
' Inherited interface = ITfInputScope
' ########################################################################################
#IF NOT %DEF(%ITfInputScope2_INTERFACE_DEFINED)
 %ITfInputScope2_INTERFACE_DEFINED = 1
INTERFACE ITfInputScope2 $IID_ITfInputScope2
 INHERIT IUnknown
 ' =====================================================================================
 ' ITfInputScope methods
 ' =====================================================================================
 METHOD GetInputScopes ( ' VTable offset = 12
 BYREF pprgInputScopes AS LONG
 , BYREF pcCount AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetPhrase ( ' VTable offset = 16
 BYREF ppbstrPhrases AS WSTRING
 , BYREF pcCount AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetRegularExpression ( ' VTable offset = 20
 BYREF pbstrRegExp AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD GetSRGS ( ' VTable offset = 24
 BYREF pbstrSRGS AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD GetXML ( ' VTable offset = 28
 BYREF pbstrXML AS WSTRING
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ITfInputScope2 method
 ' =====================================================================================
 METHOD EnumWordList ( ' VTable offset = 32
 BYREF ppEnumString AS IEnumString
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ITfInputScope_INTERFACE_DEFINED__ */
#ENDIF ' // INPUTSCOPE_DEFINED
#ENDIF
