Update XPLM for ARM64
This commit is contained in:
1 parent
40067a606d
commit
174c20bd8f
59 files changed
+12475
-9196
No files matched your search
@@ -1,28 +1,22 @@
|
||||
{
|
||||
Copyright 2005-2012 Sandy Barbour and Ben Supnik
|
||||
|
||||
All rights reserved. See license.txt for usage.
|
||||
|
||||
X-Plane SDK Version: 2.1.1
|
||||
Copyright 2005-2012 Sandy Barbour and Ben Supnik All rights reserved. See
|
||||
license.txt for usage. X-Plane SDK Version: 2.1.1
|
||||
}
|
||||
|
||||
UNIT XPLMDefs;
|
||||
INTERFACE
|
||||
{
|
||||
This file is contains the cross-platform and basic definitions for the
|
||||
X-Plane SDK.
|
||||
This file is contains the cross-platform and basic definitions for the
|
||||
X-Plane SDK.
|
||||
|
||||
The preprocessor macros APL and IBM must be defined to specify the
|
||||
compilation target; define APL to 1 and IBM 0 to compile on Macintosh and
|
||||
APL to 0 and IBM to 1 for Windows. You must specify these macro definitions
|
||||
before including XPLMDefs.h or any other XPLM headers. You can do this
|
||||
using the -D command line option or a preprocessor header.
|
||||
The preprocessor macros APL and IBM must be defined to specify the
|
||||
compilation target; define APL to 1 and IBM 0 to compile on Macintosh and
|
||||
APL to 0 and IBM to 1 for Windows. You must specify these macro definitions
|
||||
before including XPLMDefs.h or any other XPLM headers. You can do this
|
||||
using the -D command line option or a preprocessor header.
|
||||
}
|
||||
|
||||
{$A4}
|
||||
{$IFDEF MSWINDOWS}
|
||||
{$DEFINE DELPHI}
|
||||
{$ENDIF}
|
||||
{$IFDEF LINUX}
|
||||
{$DEFINE KYLIX}
|
||||
{$ENDIF}
|
||||
@@ -41,86 +35,85 @@ TYPE
|
||||
* DLL Definitions
|
||||
___________________________________________________________________________}
|
||||
{
|
||||
These definitions control the importing and exporting of functions within
|
||||
the DLL.
|
||||
These definitions control the importing and exporting of functions within
|
||||
the DLL.
|
||||
|
||||
You can prefix your five required callbacks with the PLUGIN_API macro to
|
||||
declare them as exported C functions. The XPLM_API macro identifies
|
||||
functions that are provided to you via the plugin SDK. (Link against
|
||||
XPLM.lib to use these functions.)
|
||||
You can prefix your five required callbacks with the PLUGIN_API macro to
|
||||
declare them as exported C functions. The XPLM_API macro identifies
|
||||
functions that are provided to you via the plugin SDK. (Link against
|
||||
XPLM.lib to use these functions.)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
{___________________________________________________________________________
|
||||
* GLOBAL DEFINITIONS
|
||||
___________________________________________________________________________}
|
||||
{
|
||||
These definitions are used in all parts of the SDK.
|
||||
These definitions are used in all parts of the SDK.
|
||||
}
|
||||
|
||||
|
||||
|
||||
TYPE
|
||||
{
|
||||
XPLMPluginID
|
||||
|
||||
Each plug-in is identified by a unique integer ID. This ID can be used to
|
||||
disable or enable a plug-in, or discover what plug-in is 'running' at the
|
||||
time. A plug-in ID is unique within the currently running instance of
|
||||
X-Plane unless plug-ins are reloaded. Plug-ins may receive a different
|
||||
unique ID each time they are loaded.
|
||||
Each plug-in is identified by a unique integer ID. This ID can be used to
|
||||
disable or enable a plug-in, or discover what plug-in is 'running' at the
|
||||
time. A plug-in ID is unique within the currently running instance of
|
||||
X-Plane unless plug-ins are reloaded. Plug-ins may receive a different
|
||||
unique ID each time they are loaded. This includes the unloading and
|
||||
reloading of plugins that are part of the user's aircraft.
|
||||
|
||||
For persistent identification of plug-ins, use XPLMFindPluginBySignature in
|
||||
XPLMUtiltiies.h
|
||||
For persistent identification of plug-ins, use XPLMFindPluginBySignature in
|
||||
XPLMUtiltiies.h
|
||||
|
||||
-1 indicates no plug-in.
|
||||
-1 indicates no plug-in.
|
||||
}
|
||||
XPLMPluginID = integer;
|
||||
XPLMPluginID = Integer;
|
||||
PXPLMPluginID = ^XPLMPluginID;
|
||||
|
||||
CONST
|
||||
{ No plugin. }
|
||||
{ No plugin. }
|
||||
XPLM_NO_PLUGIN_ID = (-1);
|
||||
|
||||
{ X-Plane itself }
|
||||
{ X-Plane itself }
|
||||
XPLM_PLUGIN_XPLANE = (0);
|
||||
|
||||
{ The current XPLM revision is 2.10 (210). }
|
||||
kXPLM_Version = (210);
|
||||
{ The current XPLM revision is 4.00 (400). }
|
||||
kXPLM_Version = (400);
|
||||
|
||||
{
|
||||
XPLMKeyFlags
|
||||
|
||||
These bitfields define modifier keys in a platform independent way. When a
|
||||
key is pressed, a series of messages are sent to your plugin. The down
|
||||
flag is set in the first of these messages, and the up flag in the last.
|
||||
While the key is held down, messages are sent with neither to indicate that
|
||||
the key is being held down as a repeated character.
|
||||
These bitfields define modifier keys in a platform independent way. When a
|
||||
key is pressed, a series of messages are sent to your plugin. The down
|
||||
flag is set in the first of these messages, and the up flag in the last.
|
||||
While the key is held down, messages are sent with neither to indicate that
|
||||
the key is being held down as a repeated character.
|
||||
|
||||
The control flag is mapped to the control flag on Macintosh and PC.
|
||||
Generally X-Plane uses the control key and not the command key on
|
||||
Macintosh, providing a consistent interface across platforms that does not
|
||||
necessarily match the Macintosh user interface guidelines. There is not
|
||||
yet a way for plugins to access the Macintosh control keys without using
|
||||
#ifdefed code.
|
||||
The control flag is mapped to the control flag on Macintosh and PC.
|
||||
Generally X-Plane uses the control key and not the command key on
|
||||
Macintosh, providing a consistent interface across platforms that does not
|
||||
necessarily match the Macintosh user interface guidelines. There is not
|
||||
yet a way for plugins to access the Macintosh control keys without using
|
||||
#ifdefed code.
|
||||
}
|
||||
TYPE
|
||||
XPLMKeyFlags = (
|
||||
{ The shift key is down }
|
||||
{ The shift key is down }
|
||||
xplm_ShiftFlag = 1
|
||||
|
||||
{ The option or alt key is down }
|
||||
{ The option or alt key is down }
|
||||
,xplm_OptionAltFlag = 2
|
||||
|
||||
{ The control key is down* }
|
||||
{ The control key is down* }
|
||||
,xplm_ControlFlag = 4
|
||||
|
||||
{ The key is being pressed down }
|
||||
{ The key is being pressed down }
|
||||
,xplm_DownFlag = 8
|
||||
|
||||
{ The key is being released }
|
||||
{ The key is being released }
|
||||
,xplm_UpFlag = 16
|
||||
|
||||
);
|
||||
@@ -130,19 +123,19 @@ TYPE
|
||||
* ASCII CONTROL KEY CODES
|
||||
___________________________________________________________________________}
|
||||
{
|
||||
These definitions define how various control keys are mapped to ASCII key
|
||||
codes. Not all key presses generate an ASCII value, so plugin code should
|
||||
be prepared to see null characters come from the keyboard...this usually
|
||||
represents a key stroke that has no equivalent ASCII, like a page-down
|
||||
press. Use virtual key codes to find these key strokes. ASCII key codes
|
||||
take into account modifier keys; shift keys will affect capitals and
|
||||
punctuation; control key combinations may have no vaild ASCII and produce
|
||||
NULL. To detect control-key combinations, use virtual key codes, not ASCII
|
||||
keys.
|
||||
These definitions define how various control keys are mapped to ASCII key
|
||||
codes. Not all key presses generate an ASCII value, so plugin code should
|
||||
be prepared to see null characters come from the keyboard...this usually
|
||||
represents a key stroke that has no equivalent ASCII, like a page-down
|
||||
press. Use virtual key codes to find these key strokes.
|
||||
|
||||
ASCII key codes take into account modifier keys; shift keys will affect
|
||||
capitals and punctuation; control key combinations may have no vaild ASCII
|
||||
and produce NULL. To detect control-key combinations, use virtual key
|
||||
codes, not ASCII keys.
|
||||
}
|
||||
|
||||
|
||||
|
||||
CONST
|
||||
XPLM_KEY_RETURN = 13;
|
||||
|
||||
@@ -186,35 +179,32 @@ CONST
|
||||
* VIRTUAL KEY CODES
|
||||
___________________________________________________________________________}
|
||||
{
|
||||
These are cross-platform defines for every distinct keyboard press on the
|
||||
computer. Every physical key on the keyboard has a virtual key code. So
|
||||
the "two" key on the top row of the main keyboard has a different code
|
||||
from the "two" key on the numeric key pad. But the 'w' and 'W' character
|
||||
are indistinguishable by virtual key code because they are the same
|
||||
physical key (one with and one without the shift key).
|
||||
These are cross-platform defines for every distinct keyboard press on the
|
||||
computer. Every physical key on the keyboard has a virtual key code. So
|
||||
the "two" key on the top row of the main keyboard has a different code from
|
||||
the "two" key on the numeric key pad. But the 'w' and 'W' character are
|
||||
indistinguishable by virtual key code because they are the same physical
|
||||
key (one with and one without the shift key).
|
||||
|
||||
Use virtual key codes to detect keystrokes that do not have ASCII
|
||||
equivalents, allow the user to map the numeric keypad separately from the
|
||||
main keyboard, and detect control key and other modifier-key combinations
|
||||
that generate ASCII control key sequences (many of which are not available
|
||||
directly via character keys in the SDK).
|
||||
Use virtual key codes to detect keystrokes that do not have ASCII
|
||||
equivalents, allow the user to map the numeric keypad separately from the
|
||||
main keyboard, and detect control key and other modifier-key combinations
|
||||
that generate ASCII control key sequences (many of which are not available
|
||||
directly via character keys in the SDK).
|
||||
|
||||
To assign virtual key codes we started with the Microsoft set but made some
|
||||
additions and changes. A few differences:
|
||||
To assign virtual key codes we started with the Microsoft set but made some
|
||||
additions and changes. A few differences:
|
||||
|
||||
1. Modifier keys are not available as virtual key codes. You cannot get
|
||||
distinct modifier press and release messages. Please do not try to use
|
||||
modifier keys as regular keys; doing so will almost certainly interfere
|
||||
with users' abilities to use the native x-plane key bindings.
|
||||
|
||||
2. Some keys that do not exist on both Mac and PC keyboards are removed.
|
||||
|
||||
3. Do not assume that the values of these keystrokes are interchangeable
|
||||
with MS v-keys.
|
||||
1. Modifier keys are not available as virtual key codes. You cannot get
|
||||
distinct modifier press and release messages. Please do not try to use
|
||||
modifier keys as regular keys; doing so will almost certainly interfere
|
||||
with users' abilities to use the native X-Plane key bindings.
|
||||
2. Some keys that do not exist on both Mac and PC keyboards are removed.
|
||||
3. Do not assume that the values of these keystrokes are interchangeable
|
||||
with MS v-keys.
|
||||
}
|
||||
|
||||
|
||||
|
||||
CONST
|
||||
XPLM_VK_BACK = $08;
|
||||
|
||||
@@ -258,7 +248,7 @@ CONST
|
||||
|
||||
XPLM_VK_HELP = $2F;
|
||||
|
||||
{ XPLM_VK_0 thru XPLM_VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39) }
|
||||
{ XPLM_VK_0 thru XPLM_VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39) }
|
||||
XPLM_VK_0 = $30;
|
||||
|
||||
XPLM_VK_1 = $31;
|
||||
@@ -279,7 +269,7 @@ CONST
|
||||
|
||||
XPLM_VK_9 = $39;
|
||||
|
||||
{ XPLM_VK_A thru XPLM_VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A) }
|
||||
{ XPLM_VK_A thru XPLM_VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A) }
|
||||
XPLM_VK_A = $41;
|
||||
|
||||
XPLM_VK_B = $42;
|
||||
@@ -412,8 +402,8 @@ CONST
|
||||
|
||||
XPLM_VK_F24 = $87;
|
||||
|
||||
{ The following definitions are extended and are not based on the Microsoft }
|
||||
{ key set. }
|
||||
{ The following definitions are extended and are not based on the Microsoft }
|
||||
{ key set. }
|
||||
XPLM_VK_EQUAL = $B0;
|
||||
|
||||
XPLM_VK_MINUS = $B1;
|
||||
@@ -442,5 +432,7 @@ CONST
|
||||
|
||||
XPLM_VK_NUMPAD_EQ = $BD;
|
||||
|
||||
|
||||
IMPLEMENTATION
|
||||
|
||||
END.
|
||||
Reference in new issue
Block a user