' ########################################################################################
' Microsoft Windows
' File: WinNls32.inc
' Contents: Procedure declarations, constant definitions and macros for the Windows NT 3.x
' compatible FarEast IMM component.
' 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_WinNls32_PBI)
#DEFINE PBX_WinNls32_PBI
%EQUATE `WINNLS32_INC = 1
#INCLUDE ONCE "Core/Windows.inc"
' // Size = 12 bytes
TYPE DATETIME WORD
 year AS WORD
 month AS WORD
 day AS WORD
 hour AS WORD
 min AS WORD
 sec AS WORD
END TYPE
' // Size = 180 bytes
TYPE IMEPROA BYTE
 hWnd AS DWORD
 InstDate AS DATETIME ' DATETIME
 wVersion AS DWORD ' UINT
 szDescription AS STRING * 50 ' BYTE
 szName AS STRING * 80 ' BYTE
 szOptions AS STRING * 30 ' BYTE
END TYPE
' // Size = 340 bytes
TYPE IMEPROW BYTE
 hWnd AS DWORD
 InstDate AS DATETIME ' DATETIME
 wVersion AS DWORD ' UINT
 szDescription AS WSTRINGZ * 50 ' WCHAR
 szName AS WSTRINGZ * 80 ' WCHAR
 szOptions AS WSTRINGZ * 30 ' WCHAR
END TYPE
#IF %DEF(%UNICODE)
 MACRO IMEPRO = IMEPROW
#ELSE
 MACRO IMEPRO = IMEPROA
#ENDIF
DECLARE FUNCTION IMPGetIMEA LIB "user32.dll" ALIAS "IMPGetIMEA" ( BYVAL hwnd AS QUAD , BYREF lpimepro AS IMEPROA ) AS LONG
DECLARE FUNCTION IMPGetIMEW LIB "user32.dll" ALIAS "IMPGetIMEW" ( BYVAL hwnd AS QUAD
 , BYREF lpimepro AS IMEPROW
 ) AS LONG
#IF %DEF(%UNICODE)
 MACRO IMPGetIME = IMPGetIMEW
#ELSE
 MACRO IMPGetIME = IMPGetIMEA
#ENDIF
DECLARE FUNCTION IMPQueryIMEA LIB "user32.dll" ALIAS "IMPQueryIMEA" ( BYREF lpimepro AS IMEPROA ) AS LONG
DECLARE FUNCTION IMPQueryIMEW LIB "user32.dll" ALIAS "IMPQueryIMEW" ( BYREF lpimepro AS IMEPROW
 ) AS LONG
#IF %DEF(%UNICODE)
 MACRO IMPQueryIME = IMPQueryIMEW
#ELSE
 MACRO IMPQueryIME = IMPQueryIMEA
#ENDIF
DECLARE FUNCTION IMPSetIMEA LIB "user32.dll" ALIAS "IMPSetIMEA" ( BYVAL hwnd AS QUAD , BYREF lpimepro AS IMEPROA ) AS LONG
DECLARE FUNCTION IMPSetIMEW LIB "user32.dll" ALIAS "IMPSetIMEW" ( BYVAL hwnd AS QUAD
 , BYREF lpimepro AS IMEPROW
 ) AS LONG
#IF %DEF(%UNICODE)
 MACRO IMPSetIME = IMPSetIMEW
#ELSE
 MACRO IMPSetIME = IMPSetIMEA
#ENDIF
DECLARE FUNCTION WINNLSGetIMEHotkey LIB "user32.dll" ALIAS "WINNLSGetIMEHotkey" ( BYVAL hwnd AS QUAD ) AS QUAD ' UINT
DECLARE FUNCTION WINNLSEnableIME LIB "user32.dll" ALIAS "WINNLSEnableIME" ( BYVAL hwnd AS QUAD , BYVAL bFlag AS LONG ) AS LONG
DECLARE FUNCTION WINNLSGetEnableStatus LIB "user32.dll" ALIAS "WINNLSGetEnableStatus" ( BYVAL hwnd AS QUAD
 ) AS LONG
#ENDIF
