DirectInput.pas
上传用户:hylc_2004
上传日期:2014-01-23
资源大小:46800k
文件大小:319k
- {******************************************************************************}
- {* *}
- {* Copyright (C) Microsoft Corporation. All Rights Reserved. *}
- {* *}
- {* Files: dinput.h *}
- {* Content: DirectInput include file *}
- {* *}
- {* DirectX 9.0 Delphi adaptation by Alexey Barkovoy *}
- {* E-Mail: clootie@reactor.ru *}
- {* *}
- {* Modified: 26-Jan-2003 *}
- {* *}
- {* Compatible with : *}
- {* DirectX 7.0 Object Pascal adaptation by *}
- {* Erik Unger, e-Mail: DelphiDirectX@next-reality.com *}
- {* *}
- {* Latest version can be downloaded from: *}
- {* http://clootie.narod.ru/delphi *}
- {* *}
- {******************************************************************************}
- { }
- { Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
- { }
- { The contents of this file are used with permission, subject to the Mozilla }
- { Public License Version 1.1 (the "License"); you may not use this file except }
- { in compliance with the License. You may obtain a copy of the License at }
- { http://www.mozilla.org/MPL/MPL-1.1.html }
- { }
- { Software distributed under the License is distributed on an "AS IS" basis, }
- { WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
- { the specific language governing rights and limitations under the License. }
- { }
- { Alternatively, the contents of this file may be used under the terms of the }
- { GNU Lesser General Public License (the "LGPL License"), in which case the }
- { provisions of the LGPL License are applicable instead of those above. }
- { If you wish to allow use of your version of this file only under the terms }
- { of the LGPL License and not to allow others to use your version of this file }
- { under the MPL, indicate your decision by deleting the provisions above and }
- { replace them with the notice and other provisions required by the LGPL }
- { License. If you do not delete the provisions above, a recipient may use }
- { your version of this file under either the MPL or the LGPL License. }
- { }
- { For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
- { }
- {******************************************************************************}
- // Original source contained in "DirectInput.par"
- ///////////////////////////////////////////////////////////////////////////////
- // Notes:
- //----------------------------------------------------------------------------
- // Possible input defines for this file, mapped to original C values:
- // DIRECTINPUT_VERSION_8 : DIRECTINPUT_VERSION = 0x0800,
- // DIRECTINPUT_VERSION_7 : DIRECTINPUT_VERSION = 0x0700,
- // DIRECTINPUT_VERSION_5b : DIRECTINPUT_VERSION = 0x05b2,
- // - in this translation we don't support DirectInput 5.0a (0x050a) version
- // - just straight 5.0b (0x05b2) one.
- // DIRECTINPUT_VERSION_5 : DIRECTINPUT_VERSION = 0x0500,
- // DIRECTINPUT_VERSION_3 : DIRECTINPUT_VERSION = 0x0300,
- //
- // By default DIRECTINPUT_VERSION_8 (DIRECTINPUT_VERSION = 0x0800) is assumed
- //
- // Also you can use generic DIRECTXx defines, so:
- // DIRECTX9 equal to DIRECTINPUT_VERSION_8;
- // DIRECTX8 equal to DIRECTINPUT_VERSION_8;
- // DIRECTX7 equal to DIRECTINPUT_VERSION_7;
- // DIRECTX6 equal to DIRECTINPUT_VERSION_5;
- // DIRECTX5 equal to DIRECTINPUT_VERSION_5;
- // DIRECTX3 equal to DIRECTINPUT_VERSION_3
- ///////////////////////////////////////////////////////////////////////////////
- unit DirectInput;
- interface
- uses
- Windows, MMSystem, DXTypes;
- {$I DirectX.inc}
- ////////////////////////////////////////////////////////////////////////
- // Global level dynamic loading support
- {$IFDEF DYNAMIC_LINK_ALL}
- {$DEFINE DIRECTINPUT_DYNAMIC_LINK}
- {$ENDIF}
- {$IFDEF DYNAMIC_LINK_EXPLICIT_ALL}
- {$DEFINE DIRECTINPUT_DYNAMIC_LINK_EXPLICIT}
- {$ENDIF}
- // Remove "dots" below to force some kind of dynamic linking
- {.$DEFINE DIRECTINPUT_DYNAMIC_LINK}
- {.$DEFINE DIRECTINPUT_DYNAMIC_LINK_EXPLICIT}
- ////////////////////////////////////////////////////////////////////////
- // Assume for what DirectInput version we will compile headers
- {$IFDEF DIRECTX9}
- {$DEFINE DIRECTINPUT_VERSION_8}
- {$ENDIF}
- {$IFDEF DIRECTX8}
- {$DEFINE DIRECTINPUT_VERSION_8}
- {$ENDIF}
- {$IFDEF DIRECTX7}
- {$DEFINE DIRECTINPUT_VERSION_7}
- {$ENDIF}
- {$IFDEF DIRECTX6}
- {$DEFINE DIRECTINPUT_VERSION_5}
- {$ENDIF}
- {$IFDEF DIRECTX5}
- {$DEFINE DIRECTINPUT_VERSION_5}
- {$ENDIF}
- {$IFDEF DIRECTX3}
- {$DEFINE DIRECTINPUT_VERSION_3}
- {$ENDIF}
- {$IFNDEF DIRECTINPUT_VERSION_8}
- {$IFNDEF DIRECTINPUT_VERSION_7}
- {$IFNDEF DIRECTINPUT_VERSION_5b}
- {$IFNDEF DIRECTINPUT_VERSION_5}
- {$IFNDEF DIRECTINPUT_VERSION_3}
- // Compiling for DirectInput8 by default
- {$DEFINE DIRECTINPUT_VERSION_8}
- {$ENDIF}
- {$ENDIF}
- {$ENDIF}
- {$ENDIF}
- {$ENDIF}
- ////////////////////////////////////////////////////////////////////////
- // Define DirectInputVerrsion constant
- const
- {$IFDEF DIRECTINPUT_VERSION_8}
- DIRECTINPUT_VERSION = $0800;
- {$ELSE}{$IFDEF DIRECTINPUT_VERSION_7}
- DIRECTINPUT_VERSION = $0700;
- {$ELSE}{$IFDEF DIRECTINPUT_VERSION_5b}
- DIRECTINPUT_VERSION = $05b2;
- {$ELSE}{$IFDEF DIRECTINPUT_VERSION_5}
- DIRECTINPUT_VERSION = $0500;
- {$ELSE}{$IFDEF DIRECTINPUT_VERSION_3}
- DIRECTINPUT_VERSION = $0300;
- {$ENDIF}{$ENDIF}{$ENDIF}{$ENDIF}{$ENDIF}
- {$EXTERNALSYM DIRECTINPUT_VERSION}
- ////////////////////////////////////////////////////////////////////////
- // Emit conditionals to C++Builder compiler
- {$IFDEF DIRECTINPUT_VERSION_3}
- {$HPPEMIT '#define DIRECTINPUT_VERSION 0x0300'}
- {$ENDIF}
- {$IFDEF DIRECTINPUT_VERSION_5}
- {$HPPEMIT '#define DIRECTINPUT_VERSION 0x0500'}
- {$ENDIF}
- {$IFDEF DIRECTINPUT_VERSION_5b}
- {$HPPEMIT '#define DIRECTINPUT_VERSION 0x05b2'}
- {$ENDIF}
- {$IFDEF DIRECTINPUT_VERSION_7}
- {$HPPEMIT '#define DIRECTINPUT_VERSION 0x0700'}
- {$ENDIF}
- {$IFDEF DIRECTINPUT_VERSION_8}
- {$HPPEMIT '#define DIRECTINPUT_VERSION 0x0800'}
- {$ENDIF}
- (*$NOINCLUDE DXTypes*)
- (*$HPPEMIT '#include "dinput.h"' *)
- (*$HPPEMIT '' *)
- ////////////////////////////////////////////////////////////////////////
- // Define symbols for '<=' comparision
- {$IFDEF DIRECTINPUT_VERSION_8}
- {$DEFINE DIRECTINPUT_VERSION_7}
- {$ENDIF}
- {$IFDEF DIRECTINPUT_VERSION_7}
- {$DEFINE DIRECTINPUT_VERSION_5b}
- {$ENDIF}
- {$IFDEF DIRECTINPUT_VERSION_5b}
- {$DEFINE DIRECTINPUT_VERSION_5}
- {$ENDIF}
- {$IFDEF DIRECTINPUT_VERSION_5}
- {$DEFINE DIRECTINPUT_VERSION_3}
- {$ENDIF}
- (****************************************************************************
- *
- * Copyright (C) 1996-2000 Microsoft Corporation. All Rights Reserved.
- *
- * File: dinput.h
- * Content: DirectInput include file
- *
- ****************************************************************************)
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectInputEffect);'}
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectInputDeviceA);'}
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectInputDeviceW);'}
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectInputA);'}
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectInputW);'}
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectInput2A);'}
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectInput2W);'}
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectInput7A);'}
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectInput7W);'}
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectInput8A);'}
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectInput8W);'}
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectInputDeviceA);'}
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectInputDeviceW);'}
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectInputDevice2A);'}
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectInputDevice2W);'}
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectInputDevice7A);'}
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectInputDevice7W);'}
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectInputDevice8A);'}
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectInputDevice8W);'}
- {$HPPEMIT '#ifdef UNICODE'}
- {$HPPEMIT 'typedef _di_IDirectInputW _di_IDirectInput;'}
- {$HPPEMIT 'typedef _di_IDirectInput2W _di_IDirectInput2;'}
- {$HPPEMIT 'typedef _di_IDirectInput7W _di_IDirectInput7;'}
- {$HPPEMIT 'typedef _di_IDirectInput8W _di_IDirectInput8;'}
- {$HPPEMIT 'typedef _di_IDirectInputDeviceW _di_IDirectInputDevice;'}
- {$HPPEMIT 'typedef _di_IDirectInputDevice2W _di_IDirectInputDevice2;'}
- {$HPPEMIT 'typedef _di_IDirectInputDevice7W _di_IDirectInputDevice7;'}
- {$HPPEMIT 'typedef _di_IDirectInputDevice8W _di_IDirectInputDevice8;'}
- {$HPPEMIT '#else'}
- {$HPPEMIT 'typedef _di_IDirectInputA _di_IDirectInput;'}
- {$HPPEMIT 'typedef _di_IDirectInput2A _di_IDirectInput2;'}
- {$HPPEMIT 'typedef _di_IDirectInput7A _di_IDirectInput7;'}
- {$HPPEMIT 'typedef _di_IDirectInput8A _di_IDirectInput8;'}
- {$HPPEMIT 'typedef _di_IDirectInputDeviceA _di_IDirectInputDevice;'}
- {$HPPEMIT 'typedef _di_IDirectInputDevice2A _di_IDirectInputDevice2;'}
- {$HPPEMIT 'typedef _di_IDirectInputDevice7A _di_IDirectInputDevice7;'}
- {$HPPEMIT 'typedef _di_IDirectInputDevice8A _di_IDirectInputDevice8;'}
- {$HPPEMIT '#endif'}
- (****************************************************************************
- *
- * Class IDs
- *
- ****************************************************************************)
- const
- CLSID_DirectInput : TGUID = '{25E609E0-B259-11CF-BFC7-444553540000}';
- {$EXTERNALSYM CLSID_DirectInput}
- CLSID_DirectInputDevice : TGUID = '{25E609E1-B259-11CF-BFC7-444553540000}';
- {$EXTERNALSYM CLSID_DirectInputDevice}
- CLSID_DirectInput8 : TGUID = '{25E609E4-B259-11CF-BFC7-444553540000}';
- {$EXTERNALSYM CLSID_DirectInput8}
- CLSID_DirectInputDevice8 : TGUID = '{25E609E5-B259-11CF-BFC7-444553540000}';
- {$EXTERNALSYM CLSID_DirectInputDevice8}
- (****************************************************************************
- *
- * Interfaces
- *
- ****************************************************************************)
- const
- IID_IDirectInputA : TGUID = '{89521360-AA8A-11CF-BFC7-444553540000}';
- {$EXTERNALSYM IID_IDirectInputA}
- IID_IDirectInputW : TGUID = '{89521361-AA8A-11CF-BFC7-444553540000}';
- {$EXTERNALSYM IID_IDirectInputW}
- IID_IDirectInput2A : TGUID = '{5944E662-AA8A-11CF-BFC7-444553540000}';
- {$EXTERNALSYM IID_IDirectInput2A}
- IID_IDirectInput2W : TGUID = '{5944E663-AA8A-11CF-BFC7-444553540000}';
- {$EXTERNALSYM IID_IDirectInput2W}
- IID_IDirectInput7A : TGUID = '{9A4CB684-236D-11D3-8E9D-00C04F6844AE}';
- {$EXTERNALSYM IID_IDirectInput7A}
- IID_IDirectInput7W : TGUID = '{9A4CB685-236D-11D3-8E9D-00C04F6844AE}';
- {$EXTERNALSYM IID_IDirectInput7W}
- IID_IDirectInput8A : TGUID = '{BF798030-483A-4DA2-AA99-5D64ED369700}';
- {$EXTERNALSYM IID_IDirectInput8A}
- IID_IDirectInput8W : TGUID = '{BF798031-483A-4DA2-AA99-5D64ED369700}';
- {$EXTERNALSYM IID_IDirectInput8W}
- IID_IDirectInputDeviceA : TGUID = '{5944E680-C92E-11CF-BFC7-444553540000}';
- {$EXTERNALSYM IID_IDirectInputDeviceA}
- IID_IDirectInputDeviceW : TGUID = '{5944E681-C92E-11CF-BFC7-444553540000}';
- {$EXTERNALSYM IID_IDirectInputDeviceW}
- IID_IDirectInputDevice2A : TGUID = '{5944E682-C92E-11CF-BFC7-444553540000}';
- {$EXTERNALSYM IID_IDirectInputDevice2A}
- IID_IDirectInputDevice2W : TGUID = '{5944E683-C92E-11CF-BFC7-444553540000}';
- {$EXTERNALSYM IID_IDirectInputDevice2W}
- IID_IDirectInputDevice7A : TGUID = '{57D7C6BC-2356-11D3-8E9D-00C04F6844AE}';
- {$EXTERNALSYM IID_IDirectInputDevice7A}
- IID_IDirectInputDevice7W : TGUID = '{57D7C6BD-2356-11D3-8E9D-00C04F6844AE}';
- {$EXTERNALSYM IID_IDirectInputDevice7W}
- IID_IDirectInputDevice8A : TGUID = '{54D41080-DC15-4833-A41B-748F73A38179}';
- {$EXTERNALSYM IID_IDirectInputDevice8A}
- IID_IDirectInputDevice8W : TGUID = '{54D41081-DC15-4833-A41B-748F73A38179}';
- {$EXTERNALSYM IID_IDirectInputDevice8W}
- IID_IDirectInputEffect : TGUID = '{E7E1F7C0-88D2-11D0-9AD0-00A0C9A06E35}';
- {$EXTERNALSYM IID_IDirectInputEffect}
- // String constants for Interface IDs
- SID_IDirectInputA = '{89521360-AA8A-11CF-BFC7-444553540000}';
- SID_IDirectInputW = '{89521361-AA8A-11CF-BFC7-444553540000}';
- SID_IDirectInput2A = '{5944E662-AA8A-11CF-BFC7-444553540000}';
- SID_IDirectInput2W = '{5944E663-AA8A-11CF-BFC7-444553540000}';
- SID_IDirectInput7A = '{9A4CB684-236D-11D3-8E9D-00C04F6844AE}';
- SID_IDirectInput7W = '{9A4CB685-236D-11D3-8E9D-00C04F6844AE}';
- SID_IDirectInput8A = '{BF798030-483A-4DA2-AA99-5D64ED369700}';
- SID_IDirectInput8W = '{BF798031-483A-4DA2-AA99-5D64ED369700}';
- SID_IDirectInputDeviceA = '{5944E680-C92E-11CF-BFC7-444553540000}';
- SID_IDirectInputDeviceW = '{5944E681-C92E-11CF-BFC7-444553540000}';
- SID_IDirectInputDevice2A = '{5944E682-C92E-11CF-BFC7-444553540000}';
- SID_IDirectInputDevice2W = '{5944E683-C92E-11CF-BFC7-444553540000}';
- SID_IDirectInputDevice7A = '{57D7C6BC-2356-11D3-8E9D-00C04F6844AE}';
- SID_IDirectInputDevice7W = '{57D7C6BD-2356-11D3-8E9D-00C04F6844AE}';
- SID_IDirectInputDevice8A = '{54D41080-DC15-4833-A41B-748F73A38179}';
- SID_IDirectInputDevice8W = '{54D41081-DC15-4833-A41B-748F73A38179}';
- SID_IDirectInputEffect = '{E7E1F7C0-88D2-11D0-9AD0-00A0C9A06E35}';
-
- (****************************************************************************
- *
- * Predefined object types
- *
- ****************************************************************************)
- const
- GUID_XAxis : TGUID = '{A36D02E0-C9F3-11CF-BFC7-444553540000}';
- {$EXTERNALSYM GUID_XAxis}
- GUID_YAxis : TGUID = '{A36D02E1-C9F3-11CF-BFC7-444553540000}';
- {$EXTERNALSYM GUID_YAxis}
- GUID_ZAxis : TGUID = '{A36D02E2-C9F3-11CF-BFC7-444553540000}';
- {$EXTERNALSYM GUID_ZAxis}
- GUID_RxAxis : TGUID = '{A36D02F4-C9F3-11CF-BFC7-444553540000}';
- {$EXTERNALSYM GUID_RxAxis}
- GUID_RyAxis : TGUID = '{A36D02F5-C9F3-11CF-BFC7-444553540000}';
- {$EXTERNALSYM GUID_RyAxis}
- GUID_RzAxis : TGUID = '{A36D02E3-C9F3-11CF-BFC7-444553540000}';
- {$EXTERNALSYM GUID_RzAxis}
- GUID_Slider : TGUID = '{A36D02E4-C9F3-11CF-BFC7-444553540000}';
- {$EXTERNALSYM GUID_Slider}
- GUID_Button : TGUID = '{A36D02F0-C9F3-11CF-BFC7-444553540000}';
- {$EXTERNALSYM GUID_Button}
- GUID_Key : TGUID = '{55728220-D33C-11CF-BFC7-444553540000}';
- {$EXTERNALSYM GUID_Key}
- GUID_POV : TGUID = '{A36D02F2-C9F3-11CF-BFC7-444553540000}';
- {$EXTERNALSYM GUID_POV}
- GUID_Unknown : TGUID = '{A36D02F3-C9F3-11CF-BFC7-444553540000}';
- {$EXTERNALSYM GUID_Unknown}
- (****************************************************************************
- *
- * Predefined product GUIDs
- *
- ****************************************************************************)
- const
- GUID_SysMouse : TGUID = '{6F1D2B60-D5A0-11CF-BFC7-444553540000}';
- {$EXTERNALSYM GUID_SysMouse}
- GUID_SysKeyboard : TGUID = '{6F1D2B61-D5A0-11CF-BFC7-444553540000}';
- {$EXTERNALSYM GUID_SysKeyboard}
- GUID_Joystick : TGUID = '{6F1D2B70-D5A0-11CF-BFC7-444553540000}';
- {$EXTERNALSYM GUID_Joystick}
- GUID_SysMouseEm : TGUID = '{6F1D2B80-D5A0-11CF-BFC7-444553540000}';
- {$EXTERNALSYM GUID_SysMouseEm}
- GUID_SysMouseEm2 : TGUID = '{6F1D2B81-D5A0-11CF-BFC7-444553540000}';
- {$EXTERNALSYM GUID_SysMouseEm2}
- GUID_SysKeyboardEm : TGUID = '{6F1D2B82-D5A0-11CF-BFC7-444553540000}';
- {$EXTERNALSYM GUID_SysKeyboardEm}
- GUID_SysKeyboardEm2 : TGUID = '{6F1D2B83-D5A0-11CF-BFC7-444553540000}';
- {$EXTERNALSYM GUID_SysKeyboardEm2}
- (****************************************************************************
- *
- * Predefined force feedback effects
- *
- ****************************************************************************)
- const
- GUID_ConstantForce : TGUID = '{13541C20-8E33-11D0-9AD0-00A0C9A06E35}';
- {$EXTERNALSYM GUID_ConstantForce}
- GUID_RampForce : TGUID = '{13541C21-8E33-11D0-9AD0-00A0C9A06E35}';
- {$EXTERNALSYM GUID_RampForce}
- GUID_Square : TGUID = '{13541C22-8E33-11D0-9AD0-00A0C9A06E35}';
- {$EXTERNALSYM GUID_Square}
- GUID_Sine : TGUID = '{13541C23-8E33-11D0-9AD0-00A0C9A06E35}';
- {$EXTERNALSYM GUID_Sine}
- GUID_Triangle : TGUID = '{13541C24-8E33-11D0-9AD0-00A0C9A06E35}';
- {$EXTERNALSYM GUID_Triangle}
- GUID_SawtoothUp : TGUID = '{13541C25-8E33-11D0-9AD0-00A0C9A06E35}';
- {$EXTERNALSYM GUID_SawtoothUp}
- GUID_SawtoothDown : TGUID = '{13541C26-8E33-11D0-9AD0-00A0C9A06E35}';
- {$EXTERNALSYM GUID_SawtoothDown}
- GUID_Spring : TGUID = '{13541C27-8E33-11D0-9AD0-00A0C9A06E35}';
- {$EXTERNALSYM GUID_Spring}
- GUID_Damper : TGUID = '{13541C28-8E33-11D0-9AD0-00A0C9A06E35}';
- {$EXTERNALSYM GUID_Damper}
- GUID_Inertia : TGUID = '{13541C29-8E33-11D0-9AD0-00A0C9A06E35}';
- {$EXTERNALSYM GUID_Inertia}
- GUID_Friction : TGUID = '{13541C2A-8E33-11D0-9AD0-00A0C9A06E35}';
- {$EXTERNALSYM GUID_Friction}
- GUID_CustomForce : TGUID = '{13541C2B-8E33-11D0-9AD0-00A0C9A06E35}';
- {$EXTERNALSYM GUID_CustomForce}
-
- (****************************************************************************
- *
- * Interfaces and Structures...
- *
- ****************************************************************************)
- {$IFDEF DIRECTINPUT_VERSION_5}
- (****************************************************************************
- *
- * IDirectInputEffect
- *
- ****************************************************************************)
- const
- DIEFT_ALL = $00000000;
- {$EXTERNALSYM DIEFT_ALL}
- DIEFT_CONSTANTFORCE = $00000001;
- {$EXTERNALSYM DIEFT_CONSTANTFORCE}
- DIEFT_RAMPFORCE = $00000002;
- {$EXTERNALSYM DIEFT_RAMPFORCE}
- DIEFT_PERIODIC = $00000003;
- {$EXTERNALSYM DIEFT_PERIODIC}
- DIEFT_CONDITION = $00000004;
- {$EXTERNALSYM DIEFT_CONDITION}
- DIEFT_CUSTOMFORCE = $00000005;
- {$EXTERNALSYM DIEFT_CUSTOMFORCE}
- DIEFT_HARDWARE = $000000FF;
- {$EXTERNALSYM DIEFT_HARDWARE}
- DIEFT_FFATTACK = $00000200;
- {$EXTERNALSYM DIEFT_FFATTACK}
- DIEFT_FFFADE = $00000400;
- {$EXTERNALSYM DIEFT_FFFADE}
- DIEFT_SATURATION = $00000800;
- {$EXTERNALSYM DIEFT_SATURATION}
- DIEFT_POSNEGCOEFFICIENTS = $00001000;
- {$EXTERNALSYM DIEFT_POSNEGCOEFFICIENTS}
- DIEFT_POSNEGSATURATION = $00002000;
- {$EXTERNALSYM DIEFT_POSNEGSATURATION}
- DIEFT_DEADBAND = $00004000;
- {$EXTERNALSYM DIEFT_DEADBAND}
- DIEFT_STARTDELAY = $00008000;
- {$EXTERNALSYM DIEFT_STARTDELAY}
- //#define DIEFT_GETTYPE(n) LOBYTE(n)
- function DIEFT_GETTYPE(n: Cardinal): Byte;
- {$EXTERNALSYM DIEFT_GETTYPE}
- const
- DI_DEGREES = 100;
- {$EXTERNALSYM DI_DEGREES}
- DI_FFNOMINALMAX = 10000;
- {$EXTERNALSYM DI_FFNOMINALMAX}
- DI_SECONDS = 1000000;
- {$EXTERNALSYM DI_SECONDS}
- type
- PDIConstantForce = ^TDIConstantForce;
- DICONSTANTFORCE = packed record
- lMagnitude: Longint;
- end;
- {$EXTERNALSYM DICONSTANTFORCE}
- TDIConstantForce = DICONSTANTFORCE;
- PDIRampForce = ^TDIRampForce;
- DIRAMPFORCE = packed record
- lStart: Longint;
- lEnd: Longint;
- end;
- {$EXTERNALSYM DIRAMPFORCE}
- TDIRampForce = DIRAMPFORCE;
- PDIPeriodic = ^TDIPeriodic;
- DIPERIODIC = packed record
- dwMagnitude: DWORD;
- lOffset: Longint;
- dwPhase: DWORD;
- dwPeriod: DWORD;
- end;
- {$EXTERNALSYM DIPERIODIC}
- TDIPeriodic = DIPERIODIC;
- PDICondition = ^TDICondition;
- DICONDITION = packed record
- lOffset: Longint;
- lPositiveCoefficient: Longint;
- lNegativeCoefficient: Longint;
- dwPositiveSaturation: DWORD;
- dwNegativeSaturation: DWORD;
- lDeadBand: Longint;
- end;
- {$EXTERNALSYM DICONDITION}
- TDICondition = DICONDITION;
- PDICustomForce = ^TDICustomForce;
- DICUSTOMFORCE = packed record
- cChannels: DWORD;
- dwSamplePeriod: DWORD;
- cSamples: DWORD;
- rglForceData: PLongint;
- end;
- {$EXTERNALSYM DICUSTOMFORCE}
- TDICustomForce = DICUSTOMFORCE;
- PDIEnvelope = ^TDIEnvelope;
- DIENVELOPE = packed record
- dwSize: DWORD; (* sizeof(DIENVELOPE) *)
- dwAttackLevel: DWORD;
- dwAttackTime: DWORD; (* Microseconds *)
- dwFadeLevel: DWORD;
- dwFadeTime: DWORD; (* Microseconds *)
- end;
- {$EXTERNALSYM DIENVELOPE}
- TDIEnvelope = DIENVELOPE;
- (* This structure is defined for DirectX 5.0 compatibility *)
- PDIEffectDX5 = ^TDIEffectDX5;
- DIEFFECT_DX5 = packed record
- dwSize: DWORD; (* sizeof(DIEFFECT_DX5) *)
- dwFlags: DWORD; (* DIEFF_* *)
- dwDuration: DWORD; (* Microseconds *)
- dwSamplePeriod: DWORD; (* Microseconds *)
- dwGain: DWORD;
- dwTriggerButton: DWORD; (* or DIEB_NOTRIGGER *)
- dwTriggerRepeatInterval: DWORD; (* Microseconds *)
- cAxes: DWORD; (* Number of axes *)
- rgdwAxes: PDWORD; (* Array of axes *)
- rglDirection: PLongint; (* Array of directions *)
- lpEnvelope: PDIEnvelope; (* Optional *)
- cbTypeSpecificParams: DWORD; (* Size of params *)
- lpvTypeSpecificParams: Pointer; (* Pointer to params *)
- end;
- {$EXTERNALSYM DIEFFECT_DX5}
- TDIEffectDX5 = DIEFFECT_DX5;
- PDIEffect = ^TDIEffect;
- DIEFFECT = packed record
- dwSize: DWORD; (* sizeof(DIEFFECT) *)
- dwFlags: DWORD; (* DIEFF_* *)
- dwDuration: DWORD; (* Microseconds *)
- dwSamplePeriod: DWORD; (* Microseconds *)
- dwGain: DWORD;
- dwTriggerButton: DWORD; (* or DIEB_NOTRIGGER *)
- dwTriggerRepeatInterval: DWORD; (* Microseconds *)
- cAxes: DWORD; (* Number of axes *)
- rgdwAxes: PDWORD; (* Array of axes *)
- rglDirection: PLongint; (* Array of directions *)
- lpEnvelope: PDIEnvelope; (* Optional *)
- cbTypeSpecificParams: DWORD; (* Size of params *)
- lpvTypeSpecificParams: Pointer; (* Pointer to params *)
- {$IFDEF DIRECTINPUT_VERSION_6}
- dwStartDelay: DWORD; (* Microseconds *)
- {$ENDIF} (* DIRECTINPUT_VERSION >= 0x0600 *)
- end;
- {$EXTERNALSYM DIEFFECT}
- TDIEffect = DIEFFECT;
- DIEFFECT_DX6 = DIEFFECT;
- {$EXTERNALSYM DIEFFECT_DX6}
- TDIEffectDX6 = DIEFFECT_DX6;
- PDIEffectDX6 = ^TDIEffectDX6;
- {$IFDEF DIRECTINPUT_VERSION_7}
- PDIFileEffect = ^TDIFileEffect;
- DIFILEEFFECT = packed record
- dwSize: DWORD;
- GuidEffect: TGUID;
- lpDiEffect: PDIEffect;
- szFriendlyName: array [0..MAX_PATH-1] of Char;
- end;
- {$EXTERNALSYM DIFILEEFFECT}
- TDIFileEffect = DIFILEEFFECT;
- TDIEnumEffectsInFileCallback = function (const Effect: TDIFileEffect; Data: Pointer): BOOL; stdcall;
- {$NODEFINE TDIEnumEffectsInFileCallback}
- {$HPPEMIT 'typedef LPDIENUMEFFECTSINFILECALLBACK TDIEnumEffectsInFileCallback;'}
- {$ENDIF} (* DIRECTINPUT_VERSION >= 0x0700 *)
- const
- DIEFF_OBJECTIDS = $00000001;
- {$EXTERNALSYM DIEFF_OBJECTIDS}
- DIEFF_OBJECTOFFSETS = $00000002;
- {$EXTERNALSYM DIEFF_OBJECTOFFSETS}
- DIEFF_CARTESIAN = $00000010;
- {$EXTERNALSYM DIEFF_CARTESIAN}
- DIEFF_POLAR = $00000020;
- {$EXTERNALSYM DIEFF_POLAR}
- DIEFF_SPHERICAL = $00000040;
- {$EXTERNALSYM DIEFF_SPHERICAL}
- DIEP_DURATION = $00000001;
- {$EXTERNALSYM DIEP_DURATION}
- DIEP_SAMPLEPERIOD = $00000002;
- {$EXTERNALSYM DIEP_SAMPLEPERIOD}
- DIEP_GAIN = $00000004;
- {$EXTERNALSYM DIEP_GAIN}
- DIEP_TRIGGERBUTTON = $00000008;
- {$EXTERNALSYM DIEP_TRIGGERBUTTON}
- DIEP_TRIGGERREPEATINTERVAL = $00000010;
- {$EXTERNALSYM DIEP_TRIGGERREPEATINTERVAL}
- DIEP_AXES = $00000020;
- {$EXTERNALSYM DIEP_AXES}
- DIEP_DIRECTION = $00000040;
- {$EXTERNALSYM DIEP_DIRECTION}
- DIEP_ENVELOPE = $00000080;
- {$EXTERNALSYM DIEP_ENVELOPE}
- DIEP_TYPESPECIFICPARAMS = $00000100;
- {$EXTERNALSYM DIEP_TYPESPECIFICPARAMS}
- {$IFDEF DIRECTINPUT_VERSION_6}
- DIEP_STARTDELAY = $00000200;
- {$EXTERNALSYM DIEP_STARTDELAY}
- DIEP_ALLPARAMS_DX5 = $000001FF;
- {$EXTERNALSYM DIEP_ALLPARAMS_DX5}
- DIEP_ALLPARAMS = $000003FF;
- {$EXTERNALSYM DIEP_ALLPARAMS}
- {$ELSE} (* DIRECTINPUT_VERSION < 0x0600 *)
- DIEP_ALLPARAMS = $000001FF;
- {$EXTERNALSYM DIEP_ALLPARAMS}
- {$ENDIF} (* DIRECTINPUT_VERSION ? 0x0600 *)
- DIEP_START = $20000000;
- {$EXTERNALSYM DIEP_START}
- DIEP_NORESTART = $40000000;
- {$EXTERNALSYM DIEP_NORESTART}
- DIEP_NODOWNLOAD = $80000000;
- {$EXTERNALSYM DIEP_NODOWNLOAD}
- DIEB_NOTRIGGER = $FFFFFFFF;
- {$EXTERNALSYM DIEB_NOTRIGGER}
- DIES_SOLO = $00000001;
- {$EXTERNALSYM DIES_SOLO}
- DIES_NODOWNLOAD = $80000000;
- {$EXTERNALSYM DIES_NODOWNLOAD}
- DIEGES_PLAYING = $00000001;
- {$EXTERNALSYM DIEGES_PLAYING}
- DIEGES_EMULATED = $00000002;
- {$EXTERNALSYM DIEGES_EMULATED}
- type
- PDIEffEscape = ^TDIEffEscape;
- DIEFFESCAPE = packed record
- dwSize: DWORD;
- dwCommand: DWORD;
- lpvInBuffer: Pointer;
- cbInBuffer: DWORD;
- lpvOutBuffer: Pointer;
- cbOutBuffer: DWORD;
- end;
- {$EXTERNALSYM DIEFFESCAPE}
- TDIEffEscape = DIEFFESCAPE;
- type
- {$EXTERNALSYM IDirectInputEffect}
- IDirectInputEffect = interface(IUnknown)
- [SID_IDirectInputEffect]
- (*** IDirectInputEffect methods ***)
- function Initialize(hinst: THandle; dwVersion: DWORD; const rguid: TGUID): HResult; stdcall;
- function GetEffectGuid(out pguid: TGUID): HResult; stdcall;
- function GetParameters(var peff: TDIEffect; dwFlags: DWORD): HResult; stdcall;
- function SetParameters(const peff: TDIEffect; dwFlags: DWORD): HResult; stdcall;
- function Start(dwIterations, dwFlags: DWORD): HResult; stdcall;
- function Stop: HResult; stdcall;
- function GetEffectStatus(out pdwFlags: DWORD): HResult; stdcall;
- function Download: HResult; stdcall;
- function Unload: HResult; stdcall;
- function Escape(var pesc: PDIEffEscape): HResult; stdcall;
- end;
- {$ENDIF} (* DIRECTINPUT_VERSION >= 0x0500 *)
- (****************************************************************************
- *
- * IDirectInputDevice
- *
- ****************************************************************************)
- const
- {$IFNDEF DIRECTINPUT_VERSION_8} (* #if DIRECTINPUT_VERSION <= 0x700 *)
- DIDEVTYPE_DEVICE = 1;
- {$EXTERNALSYM DIDEVTYPE_DEVICE}
- DIDEVTYPE_MOUSE = 2;
- {$EXTERNALSYM DIDEVTYPE_MOUSE}
- DIDEVTYPE_KEYBOARD = 3;
- {$EXTERNALSYM DIDEVTYPE_KEYBOARD}
- DIDEVTYPE_JOYSTICK = 4;
- {$EXTERNALSYM DIDEVTYPE_JOYSTICK}
- {$ELSE}
- DI8DEVCLASS_ALL = 0;
- {$EXTERNALSYM DI8DEVCLASS_ALL}
- DI8DEVCLASS_DEVICE = 1;
- {$EXTERNALSYM DI8DEVCLASS_DEVICE}
- DI8DEVCLASS_POINTER = 2;
- {$EXTERNALSYM DI8DEVCLASS_POINTER}
- DI8DEVCLASS_KEYBOARD = 3;
- {$EXTERNALSYM DI8DEVCLASS_KEYBOARD}
- DI8DEVCLASS_GAMECTRL = 4;
- {$EXTERNALSYM DI8DEVCLASS_GAMECTRL}
- DI8DEVTYPE_DEVICE = $11;
- {$EXTERNALSYM DI8DEVTYPE_DEVICE}
- DI8DEVTYPE_MOUSE = $12;
- {$EXTERNALSYM DI8DEVTYPE_MOUSE}
- DI8DEVTYPE_KEYBOARD = $13;
- {$EXTERNALSYM DI8DEVTYPE_KEYBOARD}
- DI8DEVTYPE_JOYSTICK = $14;
- {$EXTERNALSYM DI8DEVTYPE_JOYSTICK}
- DI8DEVTYPE_GAMEPAD = $15;
- {$EXTERNALSYM DI8DEVTYPE_GAMEPAD}
- DI8DEVTYPE_DRIVING = $16;
- {$EXTERNALSYM DI8DEVTYPE_DRIVING}
- DI8DEVTYPE_FLIGHT = $17;
- {$EXTERNALSYM DI8DEVTYPE_FLIGHT}
- DI8DEVTYPE_1STPERSON = $18;
- {$EXTERNALSYM DI8DEVTYPE_1STPERSON}
- DI8DEVTYPE_DEVICECTRL = $19;
- {$EXTERNALSYM DI8DEVTYPE_DEVICECTRL}
- DI8DEVTYPE_SCREENPOINTER = $1A;
- {$EXTERNALSYM DI8DEVTYPE_SCREENPOINTER}
- DI8DEVTYPE_REMOTE = $1B;
- {$EXTERNALSYM DI8DEVTYPE_REMOTE}
- DI8DEVTYPE_SUPPLEMENTAL = $1C;
- {$EXTERNALSYM DI8DEVTYPE_SUPPLEMENTAL}
- {$ENDIF} (* DIRECTINPUT_VERSION <= 0x700 *)
- DIDEVTYPE_HID = $00010000;
- {$EXTERNALSYM DIDEVTYPE_HID}
- {$IFNDEF DIRECTINPUT_VERSION_8} (* #if DIRECTINPUT_VERSION <= 0x700 *)
- DIDEVTYPEMOUSE_UNKNOWN = 1;
- {$EXTERNALSYM DIDEVTYPEMOUSE_UNKNOWN}
- DIDEVTYPEMOUSE_TRADITIONAL = 2;
- {$EXTERNALSYM DIDEVTYPEMOUSE_TRADITIONAL}
- DIDEVTYPEMOUSE_FINGERSTICK = 3;
- {$EXTERNALSYM DIDEVTYPEMOUSE_FINGERSTICK}
- DIDEVTYPEMOUSE_TOUCHPAD = 4;
- {$EXTERNALSYM DIDEVTYPEMOUSE_TOUCHPAD}
- DIDEVTYPEMOUSE_TRACKBALL = 5;
- {$EXTERNALSYM DIDEVTYPEMOUSE_TRACKBALL}
- DIDEVTYPEKEYBOARD_UNKNOWN = 0;
- {$EXTERNALSYM DIDEVTYPEKEYBOARD_UNKNOWN}
- DIDEVTYPEKEYBOARD_PCXT = 1;
- {$EXTERNALSYM DIDEVTYPEKEYBOARD_PCXT}
- DIDEVTYPEKEYBOARD_OLIVETTI = 2;
- {$EXTERNALSYM DIDEVTYPEKEYBOARD_OLIVETTI}
- DIDEVTYPEKEYBOARD_PCAT = 3;
- {$EXTERNALSYM DIDEVTYPEKEYBOARD_PCAT}
- DIDEVTYPEKEYBOARD_PCENH = 4;
- {$EXTERNALSYM DIDEVTYPEKEYBOARD_PCENH}
- DIDEVTYPEKEYBOARD_NOKIA1050 = 5;
- {$EXTERNALSYM DIDEVTYPEKEYBOARD_NOKIA1050}
- DIDEVTYPEKEYBOARD_NOKIA9140 = 6;
- {$EXTERNALSYM DIDEVTYPEKEYBOARD_NOKIA9140}
- DIDEVTYPEKEYBOARD_NEC98 = 7;
- {$EXTERNALSYM DIDEVTYPEKEYBOARD_NEC98}
- DIDEVTYPEKEYBOARD_NEC98LAPTOP = 8;
- {$EXTERNALSYM DIDEVTYPEKEYBOARD_NEC98LAPTOP}
- DIDEVTYPEKEYBOARD_NEC98106 = 9;
- {$EXTERNALSYM DIDEVTYPEKEYBOARD_NEC98106}
- DIDEVTYPEKEYBOARD_JAPAN106 = 10;
- {$EXTERNALSYM DIDEVTYPEKEYBOARD_JAPAN106}
- DIDEVTYPEKEYBOARD_JAPANAX = 11;
- {$EXTERNALSYM DIDEVTYPEKEYBOARD_JAPANAX}
- DIDEVTYPEKEYBOARD_J3100 = 12;
- {$EXTERNALSYM DIDEVTYPEKEYBOARD_J3100}
- DIDEVTYPEJOYSTICK_UNKNOWN = 1;
- {$EXTERNALSYM DIDEVTYPEJOYSTICK_UNKNOWN}
- DIDEVTYPEJOYSTICK_TRADITIONAL = 2;
- {$EXTERNALSYM DIDEVTYPEJOYSTICK_TRADITIONAL}
- DIDEVTYPEJOYSTICK_FLIGHTSTICK = 3;
- {$EXTERNALSYM DIDEVTYPEJOYSTICK_FLIGHTSTICK}
- DIDEVTYPEJOYSTICK_GAMEPAD = 4;
- {$EXTERNALSYM DIDEVTYPEJOYSTICK_GAMEPAD}
- DIDEVTYPEJOYSTICK_RUDDER = 5;
- {$EXTERNALSYM DIDEVTYPEJOYSTICK_RUDDER}
- DIDEVTYPEJOYSTICK_WHEEL = 6;
- {$EXTERNALSYM DIDEVTYPEJOYSTICK_WHEEL}
- DIDEVTYPEJOYSTICK_HEADTRACKER = 7;
- {$EXTERNALSYM DIDEVTYPEJOYSTICK_HEADTRACKER}
- {$ELSE}
- DI8DEVTYPEMOUSE_UNKNOWN = 1;
- {$EXTERNALSYM DI8DEVTYPEMOUSE_UNKNOWN}
- DI8DEVTYPEMOUSE_TRADITIONAL = 2;
- {$EXTERNALSYM DI8DEVTYPEMOUSE_TRADITIONAL}
- DI8DEVTYPEMOUSE_FINGERSTICK = 3;
- {$EXTERNALSYM DI8DEVTYPEMOUSE_FINGERSTICK}
- DI8DEVTYPEMOUSE_TOUCHPAD = 4;
- {$EXTERNALSYM DI8DEVTYPEMOUSE_TOUCHPAD}
- DI8DEVTYPEMOUSE_TRACKBALL = 5;
- {$EXTERNALSYM DI8DEVTYPEMOUSE_TRACKBALL}
- DI8DEVTYPEMOUSE_ABSOLUTE = 6;
- {$EXTERNALSYM DI8DEVTYPEMOUSE_ABSOLUTE}
- DI8DEVTYPEKEYBOARD_UNKNOWN = 0;
- {$EXTERNALSYM DI8DEVTYPEKEYBOARD_UNKNOWN}
- DI8DEVTYPEKEYBOARD_PCXT = 1;
- {$EXTERNALSYM DI8DEVTYPEKEYBOARD_PCXT}
- DI8DEVTYPEKEYBOARD_OLIVETTI = 2;
- {$EXTERNALSYM DI8DEVTYPEKEYBOARD_OLIVETTI}
- DI8DEVTYPEKEYBOARD_PCAT = 3;
- {$EXTERNALSYM DI8DEVTYPEKEYBOARD_PCAT}
- DI8DEVTYPEKEYBOARD_PCENH = 4;
- {$EXTERNALSYM DI8DEVTYPEKEYBOARD_PCENH}
- DI8DEVTYPEKEYBOARD_NOKIA1050 = 5;
- {$EXTERNALSYM DI8DEVTYPEKEYBOARD_NOKIA1050}
- DI8DEVTYPEKEYBOARD_NOKIA9140 = 6;
- {$EXTERNALSYM DI8DEVTYPEKEYBOARD_NOKIA9140}
- DI8DEVTYPEKEYBOARD_NEC98 = 7;
- {$EXTERNALSYM DI8DEVTYPEKEYBOARD_NEC98}
- DI8DEVTYPEKEYBOARD_NEC98LAPTOP = 8;
- {$EXTERNALSYM DI8DEVTYPEKEYBOARD_NEC98LAPTOP}
- DI8DEVTYPEKEYBOARD_NEC98106 = 9;
- {$EXTERNALSYM DI8DEVTYPEKEYBOARD_NEC98106}
- DI8DEVTYPEKEYBOARD_JAPAN106 = 10;
- {$EXTERNALSYM DI8DEVTYPEKEYBOARD_JAPAN106}
- DI8DEVTYPEKEYBOARD_JAPANAX = 11;
- {$EXTERNALSYM DI8DEVTYPEKEYBOARD_JAPANAX}
- DI8DEVTYPEKEYBOARD_J3100 = 12;
- {$EXTERNALSYM DI8DEVTYPEKEYBOARD_J3100}
- DI8DEVTYPE_LIMITEDGAMESUBTYPE = 1;
- {$EXTERNALSYM DI8DEVTYPE_LIMITEDGAMESUBTYPE}
- DI8DEVTYPEJOYSTICK_LIMITED = DI8DEVTYPE_LIMITEDGAMESUBTYPE;
- {$EXTERNALSYM DI8DEVTYPEJOYSTICK_LIMITED}
- DI8DEVTYPEJOYSTICK_STANDARD = 2;
- {$EXTERNALSYM DI8DEVTYPEJOYSTICK_STANDARD}
- DI8DEVTYPEGAMEPAD_LIMITED = DI8DEVTYPE_LIMITEDGAMESUBTYPE;
- {$EXTERNALSYM DI8DEVTYPEGAMEPAD_LIMITED}
- DI8DEVTYPEGAMEPAD_STANDARD = 2;
- {$EXTERNALSYM DI8DEVTYPEGAMEPAD_STANDARD}
- DI8DEVTYPEGAMEPAD_TILT = 3;
- {$EXTERNALSYM DI8DEVTYPEGAMEPAD_TILT}
- DI8DEVTYPEDRIVING_LIMITED = DI8DEVTYPE_LIMITEDGAMESUBTYPE;
- {$EXTERNALSYM DI8DEVTYPEDRIVING_LIMITED}
- DI8DEVTYPEDRIVING_COMBINEDPEDALS = 2;
- {$EXTERNALSYM DI8DEVTYPEDRIVING_COMBINEDPEDALS}
- DI8DEVTYPEDRIVING_DUALPEDALS = 3;
- {$EXTERNALSYM DI8DEVTYPEDRIVING_DUALPEDALS}
- DI8DEVTYPEDRIVING_THREEPEDALS = 4;
- {$EXTERNALSYM DI8DEVTYPEDRIVING_THREEPEDALS}
- DI8DEVTYPEDRIVING_HANDHELD = 5;
- {$EXTERNALSYM DI8DEVTYPEDRIVING_HANDHELD}
- DI8DEVTYPEFLIGHT_LIMITED = DI8DEVTYPE_LIMITEDGAMESUBTYPE;
- {$EXTERNALSYM DI8DEVTYPEFLIGHT_LIMITED}
- DI8DEVTYPEFLIGHT_STICK = 2;
- {$EXTERNALSYM DI8DEVTYPEFLIGHT_STICK}
- DI8DEVTYPEFLIGHT_YOKE = 3;
- {$EXTERNALSYM DI8DEVTYPEFLIGHT_YOKE}
- DI8DEVTYPEFLIGHT_RC = 4;
- {$EXTERNALSYM DI8DEVTYPEFLIGHT_RC}
- DI8DEVTYPE1STPERSON_LIMITED = DI8DEVTYPE_LIMITEDGAMESUBTYPE;
- {$EXTERNALSYM DI8DEVTYPE1STPERSON_LIMITED}
- DI8DEVTYPE1STPERSON_UNKNOWN = 2;
- {$EXTERNALSYM DI8DEVTYPE1STPERSON_UNKNOWN}
- DI8DEVTYPE1STPERSON_SIXDOF = 3;
- {$EXTERNALSYM DI8DEVTYPE1STPERSON_SIXDOF}
- DI8DEVTYPE1STPERSON_SHOOTER = 4;
- {$EXTERNALSYM DI8DEVTYPE1STPERSON_SHOOTER}
- DI8DEVTYPESCREENPTR_UNKNOWN = 2;
- {$EXTERNALSYM DI8DEVTYPESCREENPTR_UNKNOWN}
- DI8DEVTYPESCREENPTR_LIGHTGUN = 3;
- {$EXTERNALSYM DI8DEVTYPESCREENPTR_LIGHTGUN}
- DI8DEVTYPESCREENPTR_LIGHTPEN = 4;
- {$EXTERNALSYM DI8DEVTYPESCREENPTR_LIGHTPEN}
- DI8DEVTYPESCREENPTR_TOUCH = 5;
- {$EXTERNALSYM DI8DEVTYPESCREENPTR_TOUCH}
- DI8DEVTYPEREMOTE_UNKNOWN = 2;
- {$EXTERNALSYM DI8DEVTYPEREMOTE_UNKNOWN}
- DI8DEVTYPEDEVICECTRL_UNKNOWN = 2;
- {$EXTERNALSYM DI8DEVTYPEDEVICECTRL_UNKNOWN}
- DI8DEVTYPEDEVICECTRL_COMMSSELECTION = 3;
- {$EXTERNALSYM DI8DEVTYPEDEVICECTRL_COMMSSELECTION}
- DI8DEVTYPEDEVICECTRL_COMMSSELECTION_HARDWIRED = 4;
- {$EXTERNALSYM DI8DEVTYPEDEVICECTRL_COMMSSELECTION_HARDWIRED}
- DI8DEVTYPESUPPLEMENTAL_UNKNOWN = 2;
- {$EXTERNALSYM DI8DEVTYPESUPPLEMENTAL_UNKNOWN}
- DI8DEVTYPESUPPLEMENTAL_2NDHANDCONTROLLER = 3;
- {$EXTERNALSYM DI8DEVTYPESUPPLEMENTAL_2NDHANDCONTROLLER}
- DI8DEVTYPESUPPLEMENTAL_HEADTRACKER = 4;
- {$EXTERNALSYM DI8DEVTYPESUPPLEMENTAL_HEADTRACKER}
- DI8DEVTYPESUPPLEMENTAL_HANDTRACKER = 5;
- {$EXTERNALSYM DI8DEVTYPESUPPLEMENTAL_HANDTRACKER}
- DI8DEVTYPESUPPLEMENTAL_SHIFTSTICKGATE = 6;
- {$EXTERNALSYM DI8DEVTYPESUPPLEMENTAL_SHIFTSTICKGATE}
- DI8DEVTYPESUPPLEMENTAL_SHIFTER = 7;
- {$EXTERNALSYM DI8DEVTYPESUPPLEMENTAL_SHIFTER}
- DI8DEVTYPESUPPLEMENTAL_THROTTLE = 8;
- {$EXTERNALSYM DI8DEVTYPESUPPLEMENTAL_THROTTLE}
- DI8DEVTYPESUPPLEMENTAL_SPLITTHROTTLE = 9;
- {$EXTERNALSYM DI8DEVTYPESUPPLEMENTAL_SPLITTHROTTLE}
- DI8DEVTYPESUPPLEMENTAL_COMBINEDPEDALS = 10;
- {$EXTERNALSYM DI8DEVTYPESUPPLEMENTAL_COMBINEDPEDALS}
- DI8DEVTYPESUPPLEMENTAL_DUALPEDALS = 11;
- {$EXTERNALSYM DI8DEVTYPESUPPLEMENTAL_DUALPEDALS}
- DI8DEVTYPESUPPLEMENTAL_THREEPEDALS = 12;
- {$EXTERNALSYM DI8DEVTYPESUPPLEMENTAL_THREEPEDALS}
- DI8DEVTYPESUPPLEMENTAL_RUDDERPEDALS = 13;
- {$EXTERNALSYM DI8DEVTYPESUPPLEMENTAL_RUDDERPEDALS}
- {$ENDIF} (* DIRECTINPUT_VERSION <= 0x700 *)
- // #define GET_DIDEVICE_TYPE(dwDevType) LOBYTE(dwDevType)
- function GET_DIDEVICE_TYPE(dwDevType: DWORD): Byte;
- {$EXTERNALSYM GET_DIDEVICE_TYPE}
- // #define GET_DIDEVICE_SUBTYPE(dwDevType) HIBYTE(dwDevType)
- function GET_DIDEVICE_SUBTYPE(dwDevType: DWORD): Byte;
- {$EXTERNALSYM GET_DIDEVICE_SUBTYPE}
- {$IFDEF DIRECTINPUT_VERSION_5} (* #if(DIRECTINPUT_VERSION >= 0x0500) *)
- (* This structure is defined for DirectX 3.0 compatibility *)
- type
- PDIDevCapsDX3 = ^TDIDevCapsDX3;
- DIDEVCAPS_DX3 = packed record
- dwSize: DWORD;
- dwFlags: DWORD;
- dwDevType: DWORD;
- dwAxes: DWORD;
- dwButtons: DWORD;
- dwPOVs: DWORD;
- end;
- {$EXTERNALSYM DIDEVCAPS_DX3}
- TDIDevCapsDX3 = DIDEVCAPS_DX3;
- {$ENDIF} (* DIRECTINPUT_VERSION >= 0x0500 *)
- PDIDevCaps = ^TDIDevCaps;
- DIDEVCAPS = packed record
- dwSize: DWORD;
- dwFlags: DWORD;
- dwDevType: DWORD;
- dwAxes: DWORD;
- dwButtons: DWORD;
- dwPOVs: DWORD;
- {$IFDEF DIRECTINPUT_VERSION_5} (* #if(DIRECTINPUT_VERSION >= 0x0500) *)
- dwFFSamplePeriod: DWORD;
- dwFFMinTimeResolution: DWORD;
- dwFirmwareRevision: DWORD;
- dwHardwareRevision: DWORD;
- dwFFDriverVersion: DWORD;
- {$ENDIF} (* DIRECTINPUT_VERSION >= 0x0500 *)
- end;
- {$EXTERNALSYM DIDEVCAPS}
- TDIDevCaps = DIDEVCAPS;
- const
- DIDC_ATTACHED = $00000001;
- {$EXTERNALSYM DIDC_ATTACHED}
- DIDC_POLLEDDEVICE = $00000002;
- {$EXTERNALSYM DIDC_POLLEDDEVICE}
- DIDC_EMULATED = $00000004;
- {$EXTERNALSYM DIDC_EMULATED}
- DIDC_POLLEDDATAFORMAT = $00000008;
- {$EXTERNALSYM DIDC_POLLEDDATAFORMAT}
- {$IFDEF DIRECTINPUT_VERSION_5} (* #if(DIRECTINPUT_VERSION >= 0x0500) *)
- DIDC_FORCEFEEDBACK = $00000100;
- {$EXTERNALSYM DIDC_FORCEFEEDBACK}
- DIDC_FFATTACK = $00000200;
- {$EXTERNALSYM DIDC_FFATTACK}
- DIDC_FFFADE = $00000400;
- {$EXTERNALSYM DIDC_FFFADE}
- DIDC_SATURATION = $00000800;
- {$EXTERNALSYM DIDC_SATURATION}
- DIDC_POSNEGCOEFFICIENTS = $00001000;
- {$EXTERNALSYM DIDC_POSNEGCOEFFICIENTS}
- DIDC_POSNEGSATURATION = $00002000;
- {$EXTERNALSYM DIDC_POSNEGSATURATION}
- DIDC_DEADBAND = $00004000;
- {$EXTERNALSYM DIDC_DEADBAND}
- {$ENDIF} (* DIRECTINPUT_VERSION >= 0x0500 *)
- DIDC_STARTDELAY = $00008000;
- {$EXTERNALSYM DIDC_STARTDELAY}
- {$IFDEF DIRECTINPUT_VERSION_5b} (* #if(DIRECTINPUT_VERSION >= 0x050a) *)
- DIDC_ALIAS = $00010000;
- {$EXTERNALSYM DIDC_ALIAS}
- DIDC_PHANTOM = $00020000;
- {$EXTERNALSYM DIDC_PHANTOM}
- {$ENDIF} (* DIRECTINPUT_VERSION >= 0x050a *)
- {$IFDEF DIRECTINPUT_VERSION_8} (* #if(DIRECTINPUT_VERSION >= 0x0800) *)
- DIDC_HIDDEN = $00040000;
- {$EXTERNALSYM DIDC_HIDDEN}
- {$ENDIF} (* DIRECTINPUT_VERSION >= 0x0800 *)
- DIDFT_ALL = $00000000;
- {$EXTERNALSYM DIDFT_ALL}
- DIDFT_RELAXIS = $00000001;
- {$EXTERNALSYM DIDFT_RELAXIS}
- DIDFT_ABSAXIS = $00000002;
- {$EXTERNALSYM DIDFT_ABSAXIS}
- DIDFT_AXIS = $00000003;
- {$EXTERNALSYM DIDFT_AXIS}
- DIDFT_PSHBUTTON = $00000004;
- {$EXTERNALSYM DIDFT_PSHBUTTON}
- DIDFT_TGLBUTTON = $00000008;
- {$EXTERNALSYM DIDFT_TGLBUTTON}
- DIDFT_BUTTON = $0000000C;
- {$EXTERNALSYM DIDFT_BUTTON}
- DIDFT_POV = $00000010;
- {$EXTERNALSYM DIDFT_POV}
- DIDFT_COLLECTION = $00000040;
- {$EXTERNALSYM DIDFT_COLLECTION}
- DIDFT_NODATA = $00000080;
- {$EXTERNALSYM DIDFT_NODATA}
- DIDFT_ANYINSTANCE = $00FFFF00;
- {$EXTERNALSYM DIDFT_ANYINSTANCE}
- DIDFT_INSTANCEMASK = DIDFT_ANYINSTANCE;
- {$EXTERNALSYM DIDFT_INSTANCEMASK}
- // #define DIDFT_MAKEINSTANCE(n) ((WORD)(n) << 8)
- function DIDFT_MAKEINSTANCE(n: Cardinal): Cardinal;
- {$EXTERNALSYM DIDFT_MAKEINSTANCE}
- // #define DIDFT_GETTYPE(n) LOBYTE(n)
- function DIDFT_GETTYPE(n: Cardinal): Byte;
- {$EXTERNALSYM DIDFT_GETTYPE}
- // #define DIDFT_GETINSTANCE(n) LOWORD((n) >> 8)
- function DIDFT_GETINSTANCE(n: Cardinal): Cardinal;
- {$EXTERNALSYM DIDFT_GETINSTANCE}
- const
- DIDFT_FFACTUATOR = $01000000;
- {$EXTERNALSYM DIDFT_FFACTUATOR}
- DIDFT_FFEFFECTTRIGGER = $02000000;
- {$EXTERNALSYM DIDFT_FFEFFECTTRIGGER}
- {$IFDEF DIRECTINPUT_VERSION_5b} (* #if(DIRECTINPUT_VERSION >= 0x050a) *)
- DIDFT_OUTPUT = $10000000;
- {$EXTERNALSYM DIDFT_OUTPUT}
- DIDFT_VENDORDEFINED = $04000000;
- {$EXTERNALSYM DIDFT_VENDORDEFINED}
- DIDFT_ALIAS = $08000000;
- {$EXTERNALSYM DIDFT_ALIAS}
- {$ENDIF} (* DIRECTINPUT_VERSION >= 0x050a *)
- // #define DIDFT_ENUMCOLLECTION(n) ((WORD)(n) << 8)
- function DIDFT_ENUMCOLLECTION(n: Cardinal): Cardinal;
- {$EXTERNALSYM DIDFT_ENUMCOLLECTION}
- const
- DIDFT_NOCOLLECTION = $00FFFF00;
- {$EXTERNALSYM DIDFT_NOCOLLECTION}
- type
- PDIObjectDataFormat = ^TDIObjectDataFormat;
- _DIOBJECTDATAFORMAT = packed record
- pguid: PGUID;
- dwOfs: DWORD;
- dwType: DWORD;
- dwFlags: DWORD;
- end;
- {$EXTERNALSYM _DIOBJECTDATAFORMAT}
- DIOBJECTDATAFORMAT = _DIOBJECTDATAFORMAT;
- {$EXTERNALSYM DIOBJECTDATAFORMAT}
- TDIObjectDataFormat = _DIOBJECTDATAFORMAT;
- PDIDataFormat = ^TDIDataFormat;
- _DIDATAFORMAT = packed record
- dwSize: DWORD;
- dwObjSize: DWORD;
- dwFlags: DWORD;
- dwDataSize: DWORD;
- dwNumObjs: DWORD;
- rgodf: PDIObjectDataFormat;
- end;
- {$EXTERNALSYM _DIDATAFORMAT}
- DIDATAFORMAT = _DIDATAFORMAT;
- {$EXTERNALSYM DIDATAFORMAT}
- TDIDataFormat = _DIDATAFORMAT;
- const
- DIDF_ABSAXIS = $00000001;
- {$EXTERNALSYM DIDF_ABSAXIS}
- DIDF_RELAXIS = $00000002;
- {$EXTERNALSYM DIDF_RELAXIS}
- {$IFDEF DIRECTINPUT_VERSION_8} (* #if(DIRECTINPUT_VERSION > 0x0700) *)
- type
- PDIActionA = ^TDIActionA;
- PDIActionW = ^TDIActionW;
- PDIAction = PDIActionA;
- _DIACTIONA = packed record
- uAppData: Pointer;
- dwSemantic: DWORD;
- dwFlags: DWORD;
- case Byte of
- 0: (
- lptszActionName: PAnsiChar;
- guidInstance: TGUID;
- dwObjID: DWORD;
- dwHow: DWORD;
- );
- 1: (
- uResIdString: LongWord;
- );
- end;
- {$EXTERNALSYM _DIACTIONA}
- _DIACTIONW = packed record
- uAppData: Pointer;
- dwSemantic: DWORD;
- dwFlags: DWORD;
- case Byte of
- 0: (
- lptszActionName: PWideChar;
- guidInstance: TGUID;
- dwObjID: DWORD;
- dwHow: DWORD;
- );
- 1: (
- uResIdString: LongWord;
- );
- end;
- {$EXTERNALSYM _DIACTIONW}
- _DIACTION = _DIACTIONA;
- {$EXTERNALSYM _DIACTION}
- DIACTIONA = _DIACTIONA;
- {$EXTERNALSYM DIACTIONA}
- DIACTIONW = _DIACTIONW;
- {$EXTERNALSYM DIACTIONW}
- DIACTION = DIACTIONA;
- {$EXTERNALSYM DIACTION}
- TDIActionA = _DIACTIONA;
- TDIActionW = _DIACTIONW;
- TDIAction = TDIActionA;
- const
- DIA_FORCEFEEDBACK = $00000001;
- {$EXTERNALSYM DIA_FORCEFEEDBACK}
- DIA_APPMAPPED = $00000002;
- {$EXTERNALSYM DIA_APPMAPPED}
- DIA_APPNOMAP = $00000004;
- {$EXTERNALSYM DIA_APPNOMAP}
- DIA_NORANGE = $00000008;
- {$EXTERNALSYM DIA_NORANGE}
- DIA_APPFIXED = $00000010;
- {$EXTERNALSYM DIA_APPFIXED}
- DIAH_UNMAPPED = $00000000;
- {$EXTERNALSYM DIAH_UNMAPPED}
- DIAH_USERCONFIG = $00000001;
- {$EXTERNALSYM DIAH_USERCONFIG}
- DIAH_APPREQUESTED = $00000002;
- {$EXTERNALSYM DIAH_APPREQUESTED}
- DIAH_HWAPP = $00000004;
- {$EXTERNALSYM DIAH_HWAPP}
- DIAH_HWDEFAULT = $00000008;
- {$EXTERNALSYM DIAH_HWDEFAULT}
- DIAH_DEFAULT = $00000020;
- {$EXTERNALSYM DIAH_DEFAULT}
- DIAH_ERROR = $80000000;
- {$EXTERNALSYM DIAH_ERROR}
- type
- PDIActionFormatA = ^TDIActionFormatA;
- PDIActionFormatW = ^TDIActionFormatW;
- PDIActionFormat = PDIActionFormatA;
- _DIACTIONFORMATA = packed record
- dwSize : DWORD;
- dwActionSize : DWORD;
- dwDataSize : DWORD;
- dwNumActions : DWORD;
- rgoAction : PDIActionA;
- guidActionMap : TGUID;
- dwGenre : DWORD;
- dwBufferSize : DWORD;
- lAxisMin : Longint;
- lAxisMax : Longint;
- hInstString : THandle;
- ftTimeStamp : TFileTime;
- dwCRC : DWORD;
- tszActionMap : array [0..MAX_PATH-1] of AnsiChar;
- end;
- {$EXTERNALSYM _DIACTIONFORMATA}
- _DIACTIONFORMATW = packed record
- dwSize : DWORD;
- dwActionSize : DWORD;
- dwDataSize : DWORD;
- dwNumActions : DWORD;
- rgoAction : PDIActionW;
- guidActionMap : TGUID;
- dwGenre : DWORD;
- dwBufferSize : DWORD;
- lAxisMin : Longint;
- lAxisMax : Longint;
- hInstString : THandle;
- ftTimeStamp : TFileTime;
- dwCRC : DWORD;
- tszActionMap : array [0..MAX_PATH-1] of WideChar;
- end;
- {$EXTERNALSYM _DIACTIONFORMATW}
- _DIACTIONFORMAT = _DIACTIONFORMATA;
- {$EXTERNALSYM _DIACTIONFORMAT}
- DIACTIONFORMATA = _DIACTIONFORMATA;
- {$EXTERNALSYM DIACTIONFORMATA}
- DIACTIONFORMATW = _DIACTIONFORMATW;
- {$EXTERNALSYM DIACTIONFORMATW}
- DIACTIONFORMAT = DIACTIONFORMATA;
- {$EXTERNALSYM DIACTIONFORMAT}
- TDIActionFormatA = _DIACTIONFORMATA;
- TDIActionFormatW = _DIACTIONFORMATW;
- TDIActionFormat = TDIActionFormatA;
- const
- DIAFTS_NEWDEVICELOW = $FFFFFFFF;
- {$EXTERNALSYM DIAFTS_NEWDEVICELOW}
- DIAFTS_NEWDEVICEHIGH = $FFFFFFFF;
- {$EXTERNALSYM DIAFTS_NEWDEVICEHIGH}
- DIAFTS_UNUSEDDEVICELOW = $00000000;
- {$EXTERNALSYM DIAFTS_UNUSEDDEVICELOW}
- DIAFTS_UNUSEDDEVICEHIGH = $00000000;
- {$EXTERNALSYM DIAFTS_UNUSEDDEVICEHIGH}
- DIDBAM_DEFAULT = $00000000;
- {$EXTERNALSYM DIDBAM_DEFAULT}
- DIDBAM_PRESERVE = $00000001;
- {$EXTERNALSYM DIDBAM_PRESERVE}
- DIDBAM_INITIALIZE = $00000002;
- {$EXTERNALSYM DIDBAM_INITIALIZE}
- DIDBAM_HWDEFAULTS = $00000004;
- {$EXTERNALSYM DIDBAM_HWDEFAULTS}
- DIDSAM_DEFAULT = $00000000;
- {$EXTERNALSYM DIDSAM_DEFAULT}
- DIDSAM_NOUSER = $00000001;
- {$EXTERNALSYM DIDSAM_NOUSER}
- DIDSAM_FORCESAVE = $00000002;
- {$EXTERNALSYM DIDSAM_FORCESAVE}
- DICD_DEFAULT = $00000000;
- {$EXTERNALSYM DICD_DEFAULT}
- DICD_EDIT = $00000001;
- {$EXTERNALSYM DICD_EDIT}
- (*
- * The following definition is normally defined in d3dtypes.h
- *)
- type
- TD3DColor = DXTypes.TD3DColor;
- {$NODEFINE TD3DColor}
- {$HPPEMIT ''}
- {$HPPEMIT '#ifndef D3DCOLOR_DEFINED_BCB'}
- {$HPPEMIT 'typedef D3DCOLOR TD3DColor;'}
- {$HPPEMIT '#define D3DCOLOR_DEFINED_BCB'}
- {$HPPEMIT '#endif'}
- {$HPPEMIT ''}
- type
- PDIColorSet = ^TDIColorSet;
- _DICOLORSET = packed record
- dwSize: DWORD;
- cTextFore: TD3DColor;
- cTextHighlight: TD3DColor;
- cCalloutLine: TD3DColor;
- cCalloutHighlight: TD3DColor;
- cBorder: TD3DColor;
- cControlFill: TD3DColor;
- cHighlightFill: TD3DColor;
- cAreaFill: TD3DColor;
- end;
- {$EXTERNALSYM _DICOLORSET}
- DICOLORSET = _DICOLORSET;
- {$EXTERNALSYM DICOLORSET}
- TDIColorSet = _DICOLORSET;
- PDIConfigureDevicesParamsA = ^TDIConfigureDevicesParamsA;
- PDIConfigureDevicesParamsW = ^TDIConfigureDevicesParamsW;
- PDIConfigureDevicesParams = PDIConfigureDevicesParamsA;
- _DICONFIGUREDEVICESPARAMSA = packed record
- dwSize: DWORD;
- dwcUsers: DWORD;
- lptszUserNames: PAnsiChar;
- dwcFormats: DWORD;
- lprgFormats: PDIActionFormatA;
- hwnd: HWND;
- dics: TDIColorSet;
- lpUnkDDSTarget: IUnknown;
- end;
- {$EXTERNALSYM _DICONFIGUREDEVICESPARAMSA}
- _DICONFIGUREDEVICESPARAMSW = packed record
- dwSize: DWORD;
- dwcUsers: DWORD;
- lptszUserNames: PWideChar;
- dwcFormats: DWORD;
- lprgFormats: PDIActionFormatW;
- hwnd: HWND;
- dics: TDIColorSet;
- lpUnkDDSTarget: IUnknown;
- end;
- {$EXTERNALSYM _DICONFIGUREDEVICESPARAMSW}
- _DICONFIGUREDEVICESPARAMS = _DICONFIGUREDEVICESPARAMSA;
- {$EXTERNALSYM _DICONFIGUREDEVICESPARAMS}
- DICONFIGUREDEVICESPARAMSA = _DICONFIGUREDEVICESPARAMSA;
- {$EXTERNALSYM DICONFIGUREDEVICESPARAMSA}
- DICONFIGUREDEVICESPARAMSW = _DICONFIGUREDEVICESPARAMSW;
- {$EXTERNALSYM DICONFIGUREDEVICESPARAMSW}
- DICONFIGUREDEVICESPARAMS = DICONFIGUREDEVICESPARAMSA;
- {$EXTERNALSYM DICONFIGUREDEVICESPARAMS}
- TDIConfigureDevicesParamsA = _DICONFIGUREDEVICESPARAMSA;
- TDIConfigureDevicesParamsW = _DICONFIGUREDEVICESPARAMSW;
- TDIConfigureDevicesParams = TDIConfigureDevicesParamsA;
- const
- DIDIFT_CONFIGURATION = $00000001;
- {$EXTERNALSYM DIDIFT_CONFIGURATION}
- DIDIFT_OVERLAY = $00000002;
- {$EXTERNALSYM DIDIFT_OVERLAY}
- DIDAL_CENTERED = $00000000;
- {$EXTERNALSYM DIDAL_CENTERED}
- DIDAL_LEFTALIGNED = $00000001;
- {$EXTERNALSYM DIDAL_LEFTALIGNED}
- DIDAL_RIGHTALIGNED = $00000002;
- {$EXTERNALSYM DIDAL_RIGHTALIGNED}
- DIDAL_MIDDLE = $00000000;
- {$EXTERNALSYM DIDAL_MIDDLE}
- DIDAL_TOPALIGNED = $00000004;
- {$EXTERNALSYM DIDAL_TOPALIGNED}
- DIDAL_BOTTOMALIGNED = $00000008;
- {$EXTERNALSYM DIDAL_BOTTOMALIGNED}
- type
- PDIDeviceImageInfoA = ^TDIDeviceImageInfoA;
- PDIDeviceImageInfoW = ^TDIDeviceImageInfoW;
- PDIDeviceImageInfo = PDIDeviceImageInfoA;
- _DIDEVICEIMAGEINFOA = packed record
- tszImagePath: array [0..MAX_PATH-1] of AnsiChar;
- dwFlags: DWORD;
- // These are valid if DIDIFT_OVERLAY is present in dwFlags.
- dwViewID: DWORD;
- rcOverlay: TRect;
- dwObjID: DWORD;
- dwcValidPts: DWORD;
- rgptCalloutLine: array [0..4] of TPoint;
- rcCalloutRect: TRect;
- dwTextAlign: DWORD;
- end;
- {$EXTERNALSYM _DIDEVICEIMAGEINFOA}
- _DIDEVICEIMAGEINFOW = packed record
- tszImagePath: array [0..MAX_PATH-1] of WideChar;
- dwFlags: DWORD;
- // These are valid if DIDIFT_OVERLAY is present in dwFlags.
- dwViewID: DWORD;
- rcOverlay: TRect;
- dwObjID: DWORD;
- dwcValidPts: DWORD;
- rgptCalloutLine: array [0..4] of TPoint;
- rcCalloutRect: TRect;
- dwTextAlign: DWORD;
- end;
- {$EXTERNALSYM _DIDEVICEIMAGEINFOW}
- _DIDEVICEIMAGEINFO = _DIDEVICEIMAGEINFOA;
- {$EXTERNALSYM _DIDEVICEIMAGEINFO}
- DIDEVICEIMAGEINFOA = _DIDEVICEIMAGEINFOA;
- {$EXTERNALSYM DIDEVICEIMAGEINFOA}
- DIDEVICEIMAGEINFOW = _DIDEVICEIMAGEINFOW;
- {$EXTERNALSYM DIDEVICEIMAGEINFOW}
- DIDEVICEIMAGEINFO = DIDEVICEIMAGEINFOA;
- {$EXTERNALSYM DIDEVICEIMAGEINFO}
- TDIDeviceImageInfoA = _DIDEVICEIMAGEINFOA;
- TDIDeviceImageInfoW = _DIDEVICEIMAGEINFOW;
- TDIDeviceImageInfo = TDIDeviceImageInfoA;
- PDIDeviceImageInfoHeaderA = ^TDIDeviceImageInfoHeaderA;
- PDIDeviceImageInfoHeaderW = ^TDIDeviceImageInfoHeaderW;
- PDIDeviceImageInfoHeader = PDIDeviceImageInfoHeaderA;
- _DIDEVICEIMAGEINFOHEADERA = packed record
- dwSize: DWORD;
- dwSizeImageInfo: DWORD;
- dwcViews: DWORD;
- dwcButtons: DWORD;
- dwcAxes: DWORD;
- dwcPOVs: DWORD;
- dwBufferSize: DWORD;
- dwBufferUsed: DWORD;
- lprgImageInfoArray: PDIDeviceImageInfoA;
- end;
- {$EXTERNALSYM _DIDEVICEIMAGEINFOHEADERA}
- _DIDEVICEIMAGEINFOHEADERW = packed record
- dwSize: DWORD;
- dwSizeImageInfo: DWORD;
- dwcViews: DWORD;
- dwcButtons: DWORD;
- dwcAxes: DWORD;
- dwcPOVs: DWORD;
- dwBufferSize: DWORD;
- dwBufferUsed: DWORD;
- lprgImageInfoArray: PDIDeviceImageInfoW;
- end;
- {$EXTERNALSYM _DIDEVICEIMAGEINFOHEADERW}
- _DIDEVICEIMAGEINFOHEADER = _DIDEVICEIMAGEINFOHEADERA;
- {$EXTERNALSYM _DIDEVICEIMAGEINFOHEADER}
- DIDEVICEIMAGEINFOHEADERA = _DIDEVICEIMAGEINFOHEADERA;
- {$EXTERNALSYM _DIDEVICEIMAGEINFOHEADERA}
- DIDEVICEIMAGEINFOHEADERW = _DIDEVICEIMAGEINFOHEADERW;
- {$EXTERNALSYM _DIDEVICEIMAGEINFOHEADERW}
- DIDEVICEIMAGEINFOHEADER = DIDEVICEIMAGEINFOHEADERA;
- {$EXTERNALSYM _DIDEVICEIMAGEINFOHEADER}
- TDIDeviceImageInfoHeaderA = _DIDEVICEIMAGEINFOHEADERA;
- TDIDeviceImageInfoHeaderW = _DIDEVICEIMAGEINFOHEADERW;
- TDIDeviceImageInfoHeader = TDIDeviceImageInfoHeaderA;
- {$ENDIF} (* DIRECTINPUT_VERSION > 0x0700 *)
- {$IFDEF DIRECTINPUT_VERSION_5} (* #if(DIRECTINPUT_VERSION >= 0x0500) *)
- (* These structures are defined for DirectX 3.0 compatibility *)
- type
- PDIDeviceObjectInstanceDX3A = ^TDIDeviceObjectInstanceDX3A;
- PDIDeviceObjectInstanceDX3W = ^TDIDeviceObjectInstanceDX3W;
- PDIDeviceObjectInstanceDX3 = PDIDeviceObjectInstanceDX3A;
- DIDEVICEOBJECTINSTANCE_DX3A = packed record
- dwSize: DWORD;
- guidType: TGUID;
- dwOfs: DWORD;
- dwType: DWORD;
- dwFlags: DWORD;
- tszName: array [0..MAX_PATH-1] of AnsiChar;
- end;
- {$EXTERNALSYM DIDEVICEOBJECTINSTANCE_DX3A}
- DIDEVICEOBJECTINSTANCE_DX3W = packed record
- dwSize: DWORD;
- guidType: TGUID;
- dwOfs: DWORD;
- dwType: DWORD;
- dwFlags: DWORD;
- tszName: array [0..MAX_PATH-1] of WideChar;
- end;
- {$EXTERNALSYM DIDEVICEOBJECTINSTANCE_DX3W}
- DIDEVICEOBJECTINSTANCE_DX3 = DIDEVICEOBJECTINSTANCE_DX3A;
- {$EXTERNALSYM DIDEVICEOBJECTINSTANCE_DX3}
- TDIDeviceObjectInstanceDX3A = DIDEVICEOBJECTINSTANCE_DX3A;
- TDIDeviceObjectInstanceDX3W = DIDEVICEOBJECTINSTANCE_DX3W;
- TDIDeviceObjectInstanceDX3 = TDIDeviceObjectInstanceDX3A;
- {$ENDIF} (* DIRECTINPUT_VERSION >= 0x0500 *)
- type
- PDIDeviceObjectInstanceA = ^TDIDeviceObjectInstanceA;
- PDIDeviceObjectInstanceW = ^TDIDeviceObjectInstanceW;
- PDIDeviceObjectInstance = PDIDeviceObjectInstanceA;
- DIDEVICEOBJECTINSTANCEA = packed record
- dwSize: DWORD;
- guidType: TGUID;
- dwOfs: DWORD;
- dwType: DWORD;
- dwFlags: DWORD;
- tszName: array[0..MAX_PATH-1] of AnsiChar;
- {$IFDEF DIRECTINPUT_VERSION_5} (* #if(DIRECTINPUT_VERSION >= 0x0500) *)
- dwFFMaxForce: DWORD;
- dwFFForceResolution: DWORD;
- wCollectionNumber: Word;
- wDesignatorIndex: Word;
- wUsagePage: Word;
- wUsage: Word;
- dwDimension: DWORD;
- wExponent: Word;
- wReportId: Word;
- {$ENDIF} (* DIRECTINPUT_VERSION >= 0x0500 *)
- end;
- {$EXTERNALSYM DIDEVICEOBJECTINSTANCEA}
- DIDEVICEOBJECTINSTANCEW = packed record
- dwSize: DWORD;
- guidType: TGUID;
- dwOfs: DWORD;
- dwType: DWORD;
- dwFlags: DWORD;
- tszName: array[0..MAX_PATH-1] of WideChar;
- {$IFDEF DIRECTINPUT_VERSION_5} (* #if(DIRECTINPUT_VERSION >= 0x0500) *)
- dwFFMaxForce: DWORD;
- dwFFForceResolution: DWORD;
- wCollectionNumber: Word;
- wDesignatorIndex: Word;
- wUsagePage: Word;
- wUsage: Word;
- dwDimension: DWORD;
- wExponent: Word;
- wReportId: Word;
- {$ENDIF} (* DIRECTINPUT_VERSION >= 0x0500 *)
- end;
- {$EXTERNALSYM DIDEVICEOBJECTINSTANCEW}
- DIDEVICEOBJECTINSTANCE = DIDEVICEOBJECTINSTANCEA;
- {$EXTERNALSYM DIDEVICEOBJECTINSTANCE}
- TDIDeviceObjectInstanceA = DIDEVICEOBJECTINSTANCEA;
- TDIDeviceObjectInstanceW = DIDEVICEOBJECTINSTANCEW;
- TDIDeviceObjectInstance = TDIDeviceObjectInstanceA;
- type
- TDIEnumDeviceObjectsCallbackA = function (var lpddoi: TDIDeviceObjectInstanceA; pvRef : Pointer): BOOL; stdcall;
- {$EXTERNALSYM TDIEnumDeviceObjectsCallbackA}
- TDIEnumDeviceObjectsCallbackW = function (var lpddoi: TDIDeviceObjectInstanceW; pvRef : Pointer): BOOL; stdcall;
- {$EXTERNALSYM TDIEnumDeviceObjectsCallbackW}
- TDIEnumDeviceObjectsCallback = TDIEnumDeviceObjectsCallbackA;
- {$EXTERNALSYM TDIEnumDeviceObjectsCallback}
- {$IFDEF DIRECTINPUT_VERSION_5} (* #if(DIRECTINPUT_VERSION >= 0x0500) *)
- const
- DIDOI_FFACTUATOR = $00000001;
- {$EXTERNALSYM DIDOI_FFACTUATOR}
- DIDOI_FFEFFECTTRIGGER = $00000002;
- {$EXTERNALSYM DIDOI_FFEFFECTTRIGGER}
- DIDOI_POLLED = $00008000;
- {$EXTERNALSYM DIDOI_POLLED}
- DIDOI_ASPECTPOSITION = $00000100;
- {$EXTERNALSYM DIDOI_ASPECTPOSITION}
- DIDOI_ASPECTVELOCITY = $00000200;
- {$EXTERNALSYM DIDOI_ASPECTVELOCITY}
- DIDOI_ASPECTACCEL = $00000300;
- {$EXTERNALSYM DIDOI_ASPECTACCEL}
- DIDOI_ASPECTFORCE = $00000400;
- {$EXTERNALSYM DIDOI_ASPECTFORCE}
- DIDOI_ASPECTMASK = $00000F00;
- {$EXTERNALSYM DIDOI_ASPECTMASK}
- {$ENDIF} (* DIRECTINPUT_VERSION >= 0x0500 *)
- {$IFDEF DIRECTINPUT_VERSION_5b} (* #if(DIRECTINPUT_VERSION >= 0x050a) *)
- DIDOI_GUIDISUSAGE = $00010000;
- {$EXTERNALSYM DIDOI_GUIDISUSAGE}
- {$ENDIF} (* DIRECTINPUT_VERSION >= 0x050a *)
- type
- PDIPropHeader = ^TDIPropHeader;
- DIPROPHEADER = packed record
- dwSize: DWORD;
- dwHeaderSize: DWORD;
- dwObj: DWORD;
- dwHow: DWORD;
- end;
- {$EXTERNALSYM DIPROPHEADER}
- TDIPropHeader = DIPROPHEADER;
- const
- DIPH_DEVICE = 0;
- {$EXTERNALSYM DIPH_DEVICE}
- DIPH_BYOFFSET = 1;
- {$EXTERNALSYM DIPH_BYOFFSET}
- DIPH_BYID = 2;
- {$EXTERNALSYM DIPH_BYID}
- {$IFDEF DIRECTINPUT_VERSION_5b} (* #if(DIRECTINPUT_VERSION >= 0x050a) *)
- DIPH_BYUSAGE = 3;
- {$EXTERNALSYM DIPH_BYUSAGE}
- {$ENDIF} (* DIRECTINPUT_VERSION >= 0x050a *)
- {$IFDEF DIRECTINPUT_VERSION_5b} (* #if(DIRECTINPUT_VERSION >= 0x050a) *)
- // #define DIMAKEUSAGEDWORD(UsagePage, Usage)
- // (DWORD)MAKELONG(Usage, UsagePage)
- function DIMAKEUSAGEDWORD(UsagePage, Usage: Word): DWORD;
- {$EXTERNALSYM DIMAKEUSAGEDWORD}
- {$ENDIF} (* DIRECTINPUT_VERSION >= 0x050a *)
- type
- PDIPropDWord = ^TDIPropDWord;
- DIPROPDWORD = packed record
- diph: TDIPropHeader;
- dwData: DWORD;
- end;
- {$EXTERNALSYM DIPROPDWORD}
- TDIPropDWord = DIPROPDWORD;
- {$IFDEF DIRECTINPUT_VERSION_8} (* #if(DIRECTINPUT_VERSION >= 0x0800) *)
- PDIPropPointer = ^TDIPropPointer;
- DIPROPPOINTER = packed record
- diph: TDIPropHeader;
- uData: Pointer;
- end;
- {$EXTERNALSYM DIPROPPOINTER}
- TDIPropPointer = DIPROPPOINTER;
- {$ENDIF} (* DIRECTINPUT_VERSION >= 0x0800 *)
- PDIPropRange = ^TDIPropRange;
- DIPROPRANGE = packed record
- diph: TDIPropHeader;
- lMin: Longint;
- lMax: Longint;
- end;
- {$EXTERNALSYM DIPROPRANGE}
- TDIPropRange = DIPROPRANGE;
- const
- DIPROPRANGE_NOMIN = $80000000;
- {$EXTERNALSYM DIPROPRANGE_NOMIN}
- DIPROPRANGE_NOMAX = $7FFFFFFF;
- {$EXTERNALSYM DIPROPRANGE_NOMAX}
- {$IFDEF DIRECTINPUT_VERSION_5b} (* #if(DIRECTINPUT_VERSION >= 0x050a) *)
- type
- PDIPropCal = ^TDIPropCal;
- DIPROPCAL = packed record
- diph: TDIPropHeader;
- lMin: Longint;
- lCenter: Longint;
- lMax: Longint;
- end;
- {$EXTERNALSYM DIPROPCAL}
- TDIPropCal = DIPROPCAL;
- PDIPropCalPov = ^TDIPropCalPov;
- DIPROPCALPOV = packed record
- diph: TDIPropHeader;
- lMin: array[0..4] of Longint;
- lMax: array[0..4] of Longint;
- end;
- {$EXTERNALSYM DIPROPCALPOV}
- TDIPropCalPov = DIPROPCALPOV;
- PDIPropGuidAndPath = ^TDIPropGuidAndPath;
- DIPROPGUIDANDPATH = packed record
- diph: TDIPropHeader;
- guidClass: TGUID;
- wszPath: array[0..MAX_PATH-1] of WideChar;
- end;
- {$EXTERNALSYM DIPROPGUIDANDPATH}
- TDIPropGuidAndPath = DIPROPGUIDANDPATH;
- PDIPropString = ^TDIPropString;
- DIPROPSTRING = packed record
- diph: TDIPropHeader;
- wsz: array[0..MAX_PATH-1] of WideChar;
- end;
- {$EXTERNALSYM DIPROPSTRING}
- TDIPropString = DIPROPSTRING;
- {$ENDIF} (* DIRECTINPUT_VERSION >= 0x050a *)
- {$IFDEF DIRECTINPUT_VERSION_8} (* #if(DIRECTINPUT_VERSION >= 0x0800) *)
- const
- MAXCPOINTSNUM = 8;
- {$EXTERNALSYM MAXCPOINTSNUM}
- type
- PCPoint = ^TCPoint;
- _CPOINT = packed record
- lP: Longint; // raw value
- dwLog: DWORD; // logical_value / max_logical_value * 10000
- end;
- {$EXTERNALSYM _CPOINT}
- CPOINT = _CPOINT;
- {$EXTERNALSYM CPOINT}
- TCPoint = _CPOINT;
- PDIPropCPoints = ^TDIPropCPoints;
- DIPROPCPOINTS = packed record
- diph: TDIPropHeader;
- dwCPointsNum: DWORD;
- cp: array[0..MAXCPOINTSNUM-1] of TCPoint;
- end;
- {$EXTERNALSYM DIPROPCPOINTS}
- TDIPropCPoints = DIPROPCPOINTS;
- {$ENDIF} (* DIRECTINPUT_VERSION >= 0x0800 *)
- // #define MAKEDIPROP(prop) (*(const GUID *)(prop))
- type
- MAKEDIPROP = PGUID;
- {$EXTERNALSYM MAKEDIPROP}
- const
- DIPROP_BUFFERSIZE = MAKEDIPROP(1);
- {$EXTERNALSYM DIPROP_BUFFERSIZE}
- DIPROP_AXISMODE = MAKEDIPROP(2);
- {$EXTERNALSYM DIPROP_AXISMODE}
- DIPROPAXISMODE_ABS = 0;
- {$EXTERNALSYM DIPROPAXISMODE_ABS}
- DIPROPAXISMODE_REL = 1;
- {$EXTERNALSYM DIPROPAXISMODE_REL}
- DIPROP_GRANULARITY = MAKEDIPROP(3);
- {$EXTERNALSYM DIPROP_GRANULARITY}
- DIPROP_RANGE = MAKEDIPROP(4);
- {$EXTERNALSYM DIPROP_RANGE}
- DIPROP_DEADZONE = MAKEDIPROP(5);
- {$EXTERNALSYM DIPROP_DEADZONE}
- DIPROP_SATURATION = MAKEDIPROP(6);
- {$EXTERNALSYM DIPROP_SATURATION}
- DIPROP_FFGAIN = MAKEDIPROP(7);
- {$EXTERNALSYM DIPROP_FFGAIN}
- DIPROP_FFLOAD = MAKEDIPROP(8);
- {$EXTERNALSYM DIPROP_FFLOAD}
- DIPROP_AUTOCENTER = MAKEDIPROP(9);
- {$EXTERNALSYM DIPROP_AUTOCENTER}
- DIPROPAUTOCENTER_OFF = 0;
- {$EXTERNALSYM DIPROPAUTOCENTER_OFF}
- DIPROPAUTOCENTER_ON = 1;
- {$EXTERNALSYM DIPROPAUTOCENTER_ON}
- DIPROP_CALIBRATIONMODE = MAKEDIPROP(10);
- {$EXTERNALSYM DIPROP_CALIBRATIONMODE}
- DIPROPCALIBRATIONMODE_COOKED = 0;
- {$EXTERNALSYM DIPROPCALIBRATIONMODE_COOKED}
- DIPROPCALIBRATIONMODE_RAW = 1;
- {$EXTERNALSYM DIPROPCALIBRATIONMODE_RAW}
- {$IFDEF DIRECTINPUT_VERSION_5b} (* #if(DIRECTINPUT_VERSION >= 0x050a) *)
- DIPROP_CALIBRATION = MAKEDIPROP(11);
- {$EXTERNALSYM DIPROP_CALIBRATION}
- DIPROP_GUIDANDPATH = MAKEDIPROP(12);
- {$EXTERNALSYM DIPROP_GUIDANDPATH}
- DIPROP_INSTANCENAME = MAKEDIPROP(13);
- {$EXTERNALSYM DIPROP_INSTANCENAME}
- DIPROP_PRODUCTNAME = MAKEDIPROP(14);
- {$EXTERNALSYM DIPROP_PRODUCTNAME}
- {$ENDIF} (* DIRECTINPUT_VERSION >= 0x050a *)
- {$IFDEF DIRECTINPUT_VERSION_5b} (* #if(DIRECTINPUT_VERSION >= 0x05b2) *)
- DIPROP_JOYSTICKID = MAKEDIPROP(15);
- {$EXTERNALSYM DIPROP_JOYSTICKID}
- DIPROP_GETPORTDISPLAYNAME = MAKEDIPROP(16);
- {$EXTERNALSYM DIPROP_GETPORTDISPLAYNAME}
- {$ENDIF} (* DIRECTINPUT_VERSION >= 0x05b2 *)
- {$IFDEF DIRECTINPUT_VERSION_7} (* #if(DIRECTINPUT_VERSION >= 0x0700) *)
- DIPROP_PHYSICALRANGE = MAKEDIPROP(18);
- {$EXTERNALSYM DIPROP_PHYSICALRANGE}
- DIPROP_LOGICALRANGE = MAKEDIPROP(19);
- {$EXTERNALSYM DIPROP_LOGICALRANGE}
- {$ENDIF} (* DIRECTINPUT_VERSION >= 0x0700 *)
- {$IFDEF DIRECTINPUT_VERSION_8} (* #if(DIRECTINPUT_VERSION >= 0x0800) *)
- DIPROP_KEYNAME = MAKEDIPROP(20);
- {$EXTERNALSYM DIPROP_KEYNAME}
- DIPROP_CPOINTS = MAKEDIPROP(21);
- {$EXTERNALSYM DIPROP_CPOINTS}
- DIPROP_APPDATA = MAKEDIPROP(22);
- {$EXTERNALSYM DIPROP_APPDATA}
- DIPROP_SCANCODE = MAKEDIPROP(23);
- {$EXTERNALSYM DIPROP_SCANCODE}
- DIPROP_VIDPID = MAKEDIPROP(24);
- {$EXTERNALSYM DIPROP_VIDPID}
- DIPROP_USERNAME = MAKEDIPROP(25);
- {$EXTERNALSYM DIPROP_USERNAME}
- DIPROP_TYPENAME = MAKEDIPROP(26);
- {$EXTERNALSYM DIPROP_TYPENAME}
- {$ENDIF} (* DIRECTINPUT_VERSION >= 0x0800 *)
- type
- PDIDeviceObjectDataDX3 = ^TDIDeviceObjectDataDX3;
- DIDEVICEOBJECTDATA_DX3 = packed record
- dwOfs: DWORD;
- dwData: DWORD;
- dwTimeStamp: DWORD;
- dwSequence: DWORD;
- end;
- {$EXTERNALSYM DIDEVICEOBJECTDATA_DX3}
- TDIDeviceObjectDataDX3 = DIDEVICEOBJECTDATA_DX3;
- PDIDeviceObjectData = ^TDIDeviceObjectData;
- DIDEVICEOBJECTDATA = packed record
- dwOfs: DWORD;
- dwData: DWORD;
- dwTimeStamp: DWORD;
- dwSequence: DWORD;
- {$IFDEF DIRECTINPUT_VERSION_8} (* #if(DIRECTINPUT_VERSION >= 0x0800) *)
- uAppData: Pointer;
- {$ENDIF} (* DIRECTINPUT_VERSION >= 0x0800 *)
- end;
- {$EXTERNALSYM DIDEVICEOBJECTDATA}
- TDIDeviceObjectData = DIDEVICEOBJECTDATA;
- const
- DIGDD_PEEK = $00000001;
- {$EXTERNALSYM DIGDD_PEEK}
- // #define DISEQUENCE_COMPARE(dwSequence1, cmp, dwSequence2)
- // ((int)((dwSequence1) - (dwSequence2)) cmp 0)
- // Translator: This is not convertable to pascal
- const
- DISCL_EXCLUSIVE = $00000001;
- {$EXTERNALSYM DISCL_EXCLUSIVE}
- DISCL_NONEXCLUSIVE = $00000002;
- {$EXTERNALSYM DISCL_NONEXCLUSIVE}
- DISCL_FOREGROUND = $00000004;
- {$EXTERNALSYM DISCL_FOREGROUND}
- DISCL_BACKGROUND = $00000008;
- {$EXTERNALSYM DISCL_BACKGROUND}
- DISCL_NOWINKEY = $00000010;
- {$EXTERNALSYM DISCL_NOWINKEY}
- {$IFDEF DIRECTINPUT_VERSION_5} (* #if(DIRECTINPUT_VERSION >= 0x0500) *)
- (* These structures are defined for DirectX 3.0 compatibility *)
- type
- PDIDeviceInstanceDX3A = ^TDIDeviceInstanceDX3A;
- PDIDeviceInstanceDX3W = ^TDIDeviceInstanceDX3W;
- PDIDeviceInstanceDX3 = PDIDeviceInstanceDX3A;
- DIDEVICEINSTANCE_DX3A = packed record
- dwSize: DWORD;
- guidInstance: TGUID;
- guidProduct: TGUID;
- dwDevType: DWORD;
- tszInstanceName: array[0..MAX_PATH-1] of AnsiChar;
- tszProductName: array[0..MAX_PATH-1] of AnsiChar;
- end;
- {$EXTERNALSYM DIDEVICEINSTANCE_DX3A}
- DIDEVICEINSTANCE_DX3W = packed record
- dwSize: DWORD;
- guidInstance: TGUID;
- guidProduct: TGUID;
- dwDevType: DWORD;
- tszInstanceName: array[0..MAX_PATH-1] of WideChar;
- tszProductName: array[0..MAX_PATH-1] of WideChar;
- end;
- {$EXTERNALSYM DIDEVICEINSTANCE_DX3W}
- DIDEVICEINSTANCE_DX3 = DIDEVICEINSTANCE_DX3A;
- {$EXTERNALSYM DIDEVICEINSTANCE_DX3}
- TDIDeviceInstanceDX3A = DIDEVICEINSTANCE_DX3A;
- TDIDeviceInstanceDX3W = DIDEVICEINSTANCE_DX3W;
- TDIDeviceInstanceDX3 = TDIDeviceInstanceDX3A;
- {$ENDIF} (* DIRECTINPUT_VERSION >= 0x0500 *)
- type
- PDIDeviceInstanceA = ^TDIDeviceInstanceA;
- PDIDeviceInstanceW = ^TDIDeviceInstanceW;
- PDIDeviceInstance = PDIDeviceInstanceA;
- DIDEVICEINSTANCEA = packed record
- dwSize: DWORD;
- guidInstance: TGUID;
- guidProduct: TGUID;
- dwDevType: DWORD;
- tszInstanceName: array[0..MAX_PATH-1] of AnsiChar;
- tszProductName: array[0..MAX_PATH-1] of AnsiChar;
- {$IFDEF DIRECTINPUT_VERSION_5} (* #if(DIRECTINPUT_VERSION >= 0x0500) *)
- guidFFDriver: TGUID;
- wUsagePage: Word;
- wUsage: Word;
- {$ENDIF} (* DIRECTINPUT_VERSION >= 0x0500 *)
- end;
- {$EXTERNALSYM DIDEVICEINSTANCEA}
- DIDEVICEINSTANCEW = packed record
- dwSize: DWORD;
- guidInstance: TGUID;
- guidProduct: TGUID;
- dwDevType: DWORD;
- tszInstanceName: array[0..MAX_PATH-1] of WideChar;
- tszProductName: array[0..MAX_PATH-1] of WideChar;
- {$IFDEF DIRECTINPUT_VERSION_5} (* #if(DIRECTINPUT_VERSION >= 0x0500) *)
- guidFFDriver: TGUID;
- wUsagePage: Word;
- wUsage: Word;
- {$ENDIF} (* DIRECTINPUT_VERSION >= 0x0500 *)
- end;
- {$EXTERNALSYM DIDEVICEINSTANCEW}
- DIDEVICEINSTANCE = DIDEVICEINSTANCEA;
- {$EXTERNALSYM DIDEVICEINSTANCE}
- TDIDeviceInstanceA = DIDEVICEINSTANCEA;
- TDIDeviceInstanceW = DIDEVICEINSTANCEW;
- TDIDeviceInstance = TDIDeviceInstanceA;
- type
- {$EXTERNALSYM IDirectInputDeviceA}
- IDirectInputDeviceA = interface(IUnknown)
- [SID_IDirectInputDeviceA]
- (*** IDirectInputDeviceA methods ***)
- function GetCapabilities(var lpDIDevCaps: TDIDevCaps): HResult; stdcall;
- function EnumObjects(lpCallback: TDIEnumDeviceObjectsCallbackA; pvRef: Pointer; dwFlags: DWORD): HResult; stdcall;
- function GetProperty(rguidProp: PGUID; var pdiph: TDIPropHeader): HResult; stdcall;
- function SetProperty(rguidProp: PGUID; const pdiph: TDIPropHeader): HResult; stdcall;
- function Acquire: HResult; stdcall;
- function Unacquire: HResult; stdcall;
- function GetDeviceState(cbData: DWORD; lpvData: Pointer): HResult; stdcall;
- function GetDeviceData(cbObjectData: DWORD; rgdod: PDIDeviceObjectData; out pdwInOut: DWORD; dwFlags: DWORD): HResult; stdcall;
- function SetDataFormat(var lpdf: TDIDataFormat): HResult; stdcall;
- function SetEventNotification(hEvent: THandle): HResult; stdcall;
- function SetCooperativeLevel(hwnd: HWND; dwFlags: DWORD): HResult; stdcall;
- function GetObjectInfo(var pdidoi: TDIDeviceObjectInstanceA; dwObj, dwHow: DWORD): HResult; stdcall;
- function GetDeviceInfo(var pdidi: TDIDeviceInstanceA): HResult; stdcall;
- function RunControlPanel(hwndOwner: HWND; dwFlags: DWORD): HResult; stdcall;
- function Initialize(hinst: THandle; dwVersion: DWORD; const rguid: TGUID): HResult; stdcall;
- end;
- {$EXTERNALSYM IDirectInputDeviceW}
- IDirectInputDeviceW = interface(IUnknown)
- [SID_IDirectInputDeviceW]
- (*** IDirectInputDeviceW methods ***)
- function GetCapabilities(var lpDIDevCaps: TDIDevCaps): HResult; stdcall;
- function EnumObjects(lpCallback: TDIEnumDeviceObjectsCallbackW; pvRef: Pointer; dwFlags: DWORD): HResult; stdcall;
- function GetProperty(rguidProp: PGUID; var pdiph: TDIPropHeader): HResult; stdcall;
- function SetProperty(rguidProp: PGUID; const pdiph: TDIPropHeader): HResult; stdcall;
- function Acquire: HResult; stdcall;
- function Unacquire: HResult; stdcall;
- function GetDeviceState(cbData: DWORD; lpvData: Pointer): HResult; stdcall;
- function GetDeviceData(cbObjectData: DWORD; rgdod: PDIDeviceObjectData; out pdwInOut: DWORD; dwFlags: DWORD): HResult; stdcall;
- function SetDataFormat(var lpdf: TDIDataFormat): HResult; stdcall;
- function SetEventNotification(hEvent: THandle): HResult; stdcall;
- function SetCooperativeLevel(hwnd: HWND; dwFlags: DWORD): HResult; stdcall;
- function GetObjectInfo(var pdidoi: TDIDeviceObjectInstanceW; dwObj, dwHow: DWORD): HResult; stdcall;
- function GetDeviceInfo(var pdidi: TDIDeviceInstanceW): HResult; stdcall;
- function RunControlPanel(hwndOwner: HWND; dwFlags: DWORD): HResult; stdcall;
- function Initialize(hinst: THandle; dwVersion: DWORD; const rguid: TGUID): HResult; stdcall;
- end;
- {$EXTERNALSYM IDirectInputDevice}
- IDirectInputDevice = IDirectInputDeviceA;
- type
- IID_IDirectInputDevice = IDirectInputDevice;
- {$EXTERNALSYM IID_IDirectInputDevice}
- {$IFDEF DIRECTINPUT_VERSION_5} (* #if(DIRECTINPUT_VERSION >= 0x0500) *)
- const
- DISFFC_RESET = $00000001;
- {$EXTERNALSYM DISFFC_RESET}
- DISFFC_STOPALL = $00000002;
- {$EXTERNALSYM DISFFC_STOPALL}
- DISFFC_PAUSE = $00000004;
- {$EXTERNALSYM DISFFC_PAUSE}
- DISFFC_CONTINUE = $00000008;
- {$EXTERNALSYM DISFFC_CONTINUE}
- DISFFC_SETACTUATORSON = $00000010;
- {$EXTERNALSYM DISFFC_SETACTUATORSON}
- DISFFC_SETACTUATORSOFF = $00000020;
- {$EXTERNALSYM DISFFC_SETACTUATORSOFF}
- DIGFFS_EMPTY = $00000001;
- {$EXTERNALSYM DIGFFS_EMPTY}
- DIGFFS_STOPPED = $00000002;
- {$EXTERNALSYM DIGFFS_STOPPED}
- DIGFFS_PAUSED = $00000004;
- {$EXTERNALSYM DIGFFS_PAUSED}
- DIGFFS_ACTUATORSON = $00000010;
- {$EXTERNALSYM DIGFFS_ACTUATORSON}
- DIGFFS_ACTUATORSOFF = $00000020;
- {$EXTERNALSYM DIGFFS_ACTUATORSOFF}
- DIGFFS_POWERON = $00000040;
- {$EXTERNALSYM DIGFFS_POWERON}
- DIGFFS_POWEROFF = $00000080;
- {$EXTERNALSYM DIGFFS_POWEROFF}
- DIGFFS_SAFETYSWITCHON = $00000100;
- {$EXTERNALSYM DIGFFS_SAFETYSWITCHON}
- DIGFFS_SAFETYSWITCHOFF = $00000200;
- {$EXTERNALSYM DIGFFS_SAFETYSWITCHOFF}
- DIGFFS_USERFFSWITCHON = $00000400;
- {$EXTERNALSYM DIGFFS_USERFFSWITCHON}
- DIGFFS_USERFFSWITCHOFF = $00000800;
- {$EXTERNALSYM DIGFFS_USERFFSWITCHOFF}
- DIGFFS_DEVICELOST = $80000000;
- {$EXTERNALSYM DIGFFS_DEVICELOST}
- type
- PDIEffectInfoA = ^TDIEffectInfoA;
- PDIEffectInfoW = ^TDIEffectInfoW;
- PDIEffectInfo = PDIEffectInfoA;
- DIEFFECTINFOA = packed record
- dwSize: DWORD;
- guid: TGUID;
- dwEffType: DWORD;
- dwStaticParams: DWORD;
- dwDynamicParams: DWORD;
- tszName: array[0..MAX_PATH-1] of AnsiChar;
- end;
- {$EXTERNALSYM DIEFFECTINFOA}
- DIEFFECTINFOW = packed record
- dwSize: DWORD;
- guid: TGUID;
- dwEffType: DWORD;
- dwStaticParams: DWORD;
- dwDynamicParams: DWORD;
- tszName: array[0..MAX_PATH-1] of WideChar;
- end;
- {$EXTERNALSYM DIEFFECTINFOW}
- DIEFFECTINFO = DIEFFECTINFOA;
- {$EXTERNALSYM DIEFFECTINFO}
- TDIEffectInfoA = DIEFFECTINFOA;
- TDIEffectInfoW = DIEFFECTINFOW;
- TDIEffectInfo = TDIEffectInfoA;
- const
- DISDD_CONTINUE = $00000001;
- {$EXTERNALSYM DISDD_CONTINUE}
- type
- TDIEnumEffectsCallbackA = function (var pdei: TDIEffectInfoA; pvRef: Pointer): BOOL; stdcall;
- {$NODEFINE TDIEnumEffectsCallbackA}
- (*$HPPEMIT 'typedef LPDIENUMEFFECTSCALLBACKA TDIEnumEffectsCallbackA;'*)
- TDIEnumEffectsCallbackW = function (var pdei: TDIEffectInfoW; pvRef: Pointer): BOOL; stdcall;
- {$NODEFINE TDIEnumEffectsCallbackW}
- (*$HPPEMIT 'typedef LPDIENUMEFFECTSCALLBACKW TDIEnumEffectsCallbackW;'*)
- TDIEnumEffectsCallback = TDIEnumEffectsCallbackA;
- {$NODEFINE TDIEnumEffectsCallback}
- {$HPPEMIT 'typedef LPDIENUMEFFECTSINFILECALLBACK TDIEnumEffectsInFileCallback;'}
- TDIEnumCreatedEffectObjectsCallback = function (peff : IDirectInputEffect; pvRev: Pointer): BOOL; stdcall;
- {$NODEFINE TDIEnumCreatedEffectObjectsCallback}
- {$HPPEMIT 'typedef LPDIENUMCREATEDEFFECTOBJECTSCALLBACK TDIEnumCreatedEffectObjectsCallback;'}
- {$EXTERNALSYM IDirectInputDevice2A}
- IDirectInputDevice2A = interface(IDirectInputDeviceA)
- [SID_IDirectInputDevice2A]
- (*** IDirectInputDevice2A methods ***)
- function CreateEffect(const rguid: TGUID; lpeff: PDIEffect; out ppdeff: IDirectInputEffect; punkOuter: IUnknown): HResult; stdcall;
- function EnumEffects(lpCallback: TDIEnumEffectsCallbackA; pvRef: Pointer; dwEffType: DWORD): HResult; stdcall;
- function GetEffectInfo(var pdei: TDIEffectInfoA; const rguid: TGUID): HResult; stdcall;
- function GetForceFeedbackState(out pdwOut: DWORD): HResult; stdcall;
- function SendForceFeedbackCommand(dwFlags: DWORD): HResult; stdcall;
- function EnumCreatedEffectObjects(lpCallback: TDIEnumCreatedEffectObjectsCallback; pvRef: Pointer; fl: DWORD): HResult; stdcall;
- function Escape(var pesc: TDIEffEscape): HResult; stdcall;
- function Poll: HResult; stdcall;
- function SendDeviceData(cbObjectData: DWORD; rgdod: PDIDeviceObjectData; var pdwInOut: DWORD; fl: DWORD): HResult; stdcall;
- end;
- {$EXTERNALSYM IDirectInputDevice2W}
- IDirectInputDevice2W = interface(IDirectInputDeviceW)
- [SID_IDirectInputDevice2W]
- (*** IDirectInputDevice2W methods ***)
- function CreateEffect(const rguid: TGUID; lpeff: PDIEffect; out ppdeff: IDirectInputEffect; punkOuter: IUnknown): HResult; stdcall;
- function EnumEffects(lpCallback: TDIEnumEffectsCallbackW; pvRef: Pointer; dwEffType: DWORD): HResult; stdcall;
- function GetEffectInfo(var pdei: TDIEffectInfoW; const rguid: TGUID): HResult; stdcall;
- function GetForceFeedbackState(out pdwOut: DWORD): HResult; stdcall;
- function SendForceFeedbackCommand(dwFlags: DWORD): HResult; stdcall;
- function EnumCreatedEffectObjects(lpCallback: TDIEnumCreatedEffectObjectsCallback; pvRef: Pointer; fl: DWORD): HResult; stdcall;
- function Escape(var pesc: TDIEffEscape): HResult; stdcall;
- function Poll: HResult; stdcall;
- function SendDeviceData(cbObjectData: DWORD; rgdod: PDIDeviceObjectData; var pdwInOut: DWORD; fl: DWORD): HResult; stdcall;
- end;
- {$EXTERNALSYM IDirectInputDevice2}
- IDirectInputDevice2 = IDirectInputDevice2A;
- type
- IID_IDirectInputDevice2 = IDirectInputDevice2;
- {$EXTERNALSYM IID_IDirectInputDevice2}
- {$ENDIF} (* DIRECTINPUT_VERSION >= 0x0500 *)
- {$IFDEF DIRECTINPUT_VERSION_7} (* #if(DIRECTINPUT_VERSION >= 0x0700) *)
- const
- DIFEF_DEFAULT = $00000000;
- {$EXTERNALSYM DIFEF_DEFAULT}
- DIFEF_INCLUDENONSTANDARD = $00000001;
- {$EXTERNALSYM DIFEF_INCLUDENONSTANDARD}
- DIFEF_MODIFYIFNEEDED = $00000010;
- {$EXTERNALSYM DIFEF_MODIFYIFNEEDED}
- type
- {$EXTERNALSYM IDirectInputDevice7A}
- IDirectInputDevice7A = interface(IDirectInputDevice2A)
- [SID_IDirectInputDevice7A]
- (*** IDirectInputDevice7A methods ***)
- function EnumEffectsInFile(lpszFileName: PAnsiChar; pec: TDIEnumEffectsInFileCallback; pvRef: Pointer; dwFlags: DWORD): HResult; stdcall;
- function WriteEffectToFile(lpszFileName: PAnsiChar; dwEntries: DWORD; rgDiFileEft: PDIFileEffect; dwFlags: DWORD): HResult; stdcall;
- end;
- {$EXTERNALSYM IDirectInputDevice7W}
- IDirectInputDevice7W = interface(IDirectInputDevice2W)
- [SID_IDirectInputDevice7W]
- (*** IDirectInputDevice7W methods ***)
- function EnumEffectsInFile(lpszFileName: PWideChar; pec: TDIEnumEffectsInFileCallback; pvRef: Pointer; dwFlags: DWORD): HResult; stdcall;
- function WriteEffectToFile(lpszFileName: PWideChar; dwEntries: DWORD; rgDiFileEft: PDIFileEffect; dwFlags: DWORD): HResult; stdcall;
- end;
- {$EXTERNALSYM IDirectInputDevice7}
- IDirectInputDevice7 = IDirectInputDevice7A;
- type
- IID_IDirectInputDevice7 = IDirectInputDevice7;
- {$EXTERNALSYM IID_IDirectInputDevice7}
- {$ENDIF} (* DIRECTINPUT_VERSION >= 0x0700 *)
- {$IFDEF DIRECTINPUT_VERSION_8} (* #if(DIRECTINPUT_VERSION >= 0x0800) *)
- type
- {$EXTERNALSYM IDirectInputDevice8A}
- IDirectInputDevice8A = interface(IDirectInputDevice7A)
- [SID_IDirectInputDevice8A]
- (*** IDirectInputDevice8A methods ***)
- function BuildActionMap(lpdiaf: TDIActionFormatA; lpszUserName: PAnsiChar; dwFlags: DWORD): HResult; stdcall;
- function SetActionMap(var lpdiActionFormat: TDIActionFormatA; lptszUserName: PAnsiChar; dwFlags: DWORD): HResult; stdcall;
- function GetImageInfo(var lpdiDevImageInfoHeader: TDIDeviceImageInfoHeaderA): HResult; stdcall;
- end;
- {$EXTERNALSYM IDirectInputDevice8W}
- IDirectInputDevice8W = interface(IDirectInputDevice7W)
- [SID_IDirectInputDevice8W]
- (*** IDirectInputDevice8W methods ***)
- function BuildActionMap(lpdiaf: TDIActionFormatW; lpszUserName: PWideChar; dwFlags: DWORD): HResult; stdcall;
- function SetActionMap(var lpdiActionFormat: TDIActionFormatW; lptszUserName: PWideChar; dwFlags: DWORD): HResult; stdcall;
- function GetImageInfo(var lpdiDevImageInfoHeader: TDIDeviceImageInfoHeaderW): HResult; stdcall;
- end;
- {$EXTERNALSYM IDirectInputDevice8}
- IDirectInputDevice8 = IDirectInputDevice8A;
- type
- IID_IDirectInputDevice8 = IDirectInputDevice8;
- {$EXTERNALSYM IID_IDirectInputDevice8}
- {$ENDIF} (* DIRECTINPUT_VERSION >= 0x0800 *)
- (****************************************************************************
- *
- * Mouse
- *
- ****************************************************************************)
- type
- PDIMouseState = ^TDIMouseState;
- _DIMOUSESTATE = packed record
- lX: Longint;
- lY: Longint;
- lZ: Longint;
- rgbButtons: array[0..3] of Byte;
- end;
- {$EXTERNALSYM _DIMOUSESTATE}
- DIMOUSESTATE = _DIMOUSESTATE;
- {$EXTERNALSYM DIMOUSESTATE}
- TDIMouseState = _DIMOUSESTATE;
- {$IFDEF DIRECTINPUT_VERSION_7} (* #if(DIRECTINPUT_VERSION >= 0x0700) *)
- PDIMouseState2 = ^TDIMouseState2;
- _DIMOUSESTATE2 = packed record
- lX: Longint;
- lY: Longint;
- lZ: Longint;
- rgbButtons: array[0..7] of Byte;
- end;
- {$EXTERNALSYM _DIMOUSESTATE2}
- DIMOUSESTATE2 = _DIMOUSESTATE2;
- {$EXTERNALSYM DIMOUSESTATE2}
- TDIMouseState2 = _DIMOUSESTATE2;
- {$ENDIF} (* DIRECTINPUT_VERSION >= 0x0700 *)
- const
- DIMOFS_X = 0; // FIELD_OFFSET(DIMOUSESTATE, lX)
- {$EXTERNALSYM DIMOFS_X}
- DIMOFS_Y = 4; // FIELD_OFFSET(DIMOUSESTATE, lY)
- {$EXTERNALSYM DIMOFS_Y}
- DIMOFS_Z = 8; // FIELD_OFFSET(DIMOUSESTATE, lZ)
- {$EXTERNALSYM DIMOFS_Z}
- DIMOFS_BUTTON0 = 12; // (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 0)
- {$EXTERNALSYM DIMOFS_BUTTON0}
- DIMOFS_BUTTON1 = DIMOFS_BUTTON0 + 1; // (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 1)
- {$EXTERNALSYM DIMOFS_BUTTON1}
- DIMOFS_BUTTON2 = DIMOFS_BUTTON0 + 2; // (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 2)
- {$EXTERNALSYM DIMOFS_BUTTON2}
- DIMOFS_BUTTON3 = DIMOFS_BUTTON0 + 3; // (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 3)
- {$EXTERNALSYM DIMOFS_BUTTON3}
- {$IFDEF DIRECTINPUT_VERSION_7} (* #if(DIRECTINPUT_VERSION >= 0x0700) *)
- DIMOFS_BUTTON4 = DIMOFS_BUTTON0 + 4; // (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 4)
- {$EXTERNALSYM DIMOFS_BUTTON4}
- DIMOFS_BUTTON5 = DIMOFS_BUTTON0 + 5; // (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 5)
- {$EXTERNALSYM DIMOFS_BUTTON5}
- DIMOFS_BUTTON6 = DIMOFS_BUTTON0 + 6; // (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 6)
- {$EXTERNALSYM DIMOFS_BUTTON6}