From 05e501067a1d6fc72fbec14bca91b39f1d58ddda Mon Sep 17 00:00:00 2001 From: sparker256 Date: Sat, 6 Nov 2021 12:44:55 -0400 Subject: [PATCH 1/8] Remove old SDK --- .../CHeaders/Widgets/XPStandardWidgets.h | 571 ------ src/XPSDK301/CHeaders/Widgets/XPUIGraphics.h | 360 ---- src/XPSDK301/CHeaders/Widgets/XPWidgetDefs.h | 482 ----- src/XPSDK301/CHeaders/Widgets/XPWidgetUtils.h | 232 --- src/XPSDK301/CHeaders/Widgets/XPWidgets.h | 578 ------ .../CHeaders/Wrappers/XPCBroadcaster.cpp | 56 - .../CHeaders/Wrappers/XPCBroadcaster.h | 38 - src/XPSDK301/CHeaders/Wrappers/XPCDisplay.cpp | 104 -- src/XPSDK301/CHeaders/Wrappers/XPCDisplay.h | 73 - .../CHeaders/Wrappers/XPCListener.cpp | 27 - src/XPSDK301/CHeaders/Wrappers/XPCListener.h | 36 - .../CHeaders/Wrappers/XPCProcessing.cpp | 52 - .../CHeaders/Wrappers/XPCProcessing.h | 37 - src/XPSDK301/CHeaders/Wrappers/XPCWidget.cpp | 123 -- src/XPSDK301/CHeaders/Wrappers/XPCWidget.h | 84 - .../Wrappers/XPCWidgetAttachments.cpp | 267 --- .../CHeaders/Wrappers/XPCWidgetAttachments.h | 146 -- src/XPSDK301/CHeaders/XPLM/XPLMCamera.h | 167 -- src/XPSDK301/CHeaders/XPLM/XPLMDataAccess.h | 703 -------- src/XPSDK301/CHeaders/XPLM/XPLMDefs.h | 514 ------ src/XPSDK301/CHeaders/XPLM/XPLMDisplay.h | 1441 --------------- src/XPSDK301/CHeaders/XPLM/XPLMGraphics.h | 405 ----- src/XPSDK301/CHeaders/XPLM/XPLMInstance.h | 109 -- src/XPSDK301/CHeaders/XPLM/XPLMMap.h | 629 ------- src/XPSDK301/CHeaders/XPLM/XPLMMenus.h | 291 --- src/XPSDK301/CHeaders/XPLM/XPLMNavigation.h | 371 ---- src/XPSDK301/CHeaders/XPLM/XPLMPlanes.h | 275 --- src/XPSDK301/CHeaders/XPLM/XPLMPlugin.h | 340 ---- src/XPSDK301/CHeaders/XPLM/XPLMProcessing.h | 252 --- src/XPSDK301/CHeaders/XPLM/XPLMScenery.h | 446 ----- src/XPSDK301/CHeaders/XPLM/XPLMUtilities.h | 835 --------- .../Delphi/Widgets/XPStandardWidgets.pas | 488 ----- src/XPSDK301/Delphi/Widgets/XPUIGraphics.pas | 377 ---- src/XPSDK301/Delphi/Widgets/XPWidgetDefs.pas | 437 ----- src/XPSDK301/Delphi/Widgets/XPWidgetUtils.pas | 223 --- src/XPSDK301/Delphi/Widgets/XPWidgets.pas | 678 ------- src/XPSDK301/Delphi/XPLM/XPLMCamera.pas | 173 -- src/XPSDK301/Delphi/XPLM/XPLMDataAccess.pas | 760 -------- src/XPSDK301/Delphi/XPLM/XPLMDefs.pas | 442 ----- src/XPSDK301/Delphi/XPLM/XPLMDisplay.pas | 1571 ----------------- src/XPSDK301/Delphi/XPLM/XPLMGraphics.pas | 438 ----- src/XPSDK301/Delphi/XPLM/XPLMInstance.pas | 113 -- src/XPSDK301/Delphi/XPLM/XPLMMap.pas | 652 ------- src/XPSDK301/Delphi/XPLM/XPLMMenus.pas | 333 ---- src/XPSDK301/Delphi/XPLM/XPLMNavigation.pas | 429 ----- src/XPSDK301/Delphi/XPLM/XPLMPlanes.pas | 315 ---- src/XPSDK301/Delphi/XPLM/XPLMPlugin.pas | 390 ---- src/XPSDK301/Delphi/XPLM/XPLMProcessing.pas | 274 --- src/XPSDK301/Delphi/XPLM/XPLMScenery.pas | 476 ----- src/XPSDK301/Delphi/XPLM/XPLMUtilities.pas | 923 ---------- .../Libraries/Mac/XPLM.framework/XPLM | Bin 206576 -> 0 bytes .../Mac/XPWidgets.framework/XPWidgets | Bin 48768 -> 0 bytes src/XPSDK301/Libraries/Win/XPLM_64.lib | Bin 48750 -> 0 bytes src/XPSDK301/Libraries/Win/XPWidgets_64.lib | Bin 10830 -> 0 bytes src/XPSDK301/README.txt | 197 --- src/XPSDK301/license.txt | 27 - 56 files changed, 19760 deletions(-) delete mode 100755 src/XPSDK301/CHeaders/Widgets/XPStandardWidgets.h delete mode 100755 src/XPSDK301/CHeaders/Widgets/XPUIGraphics.h delete mode 100755 src/XPSDK301/CHeaders/Widgets/XPWidgetDefs.h delete mode 100755 src/XPSDK301/CHeaders/Widgets/XPWidgetUtils.h delete mode 100755 src/XPSDK301/CHeaders/Widgets/XPWidgets.h delete mode 100755 src/XPSDK301/CHeaders/Wrappers/XPCBroadcaster.cpp delete mode 100755 src/XPSDK301/CHeaders/Wrappers/XPCBroadcaster.h delete mode 100755 src/XPSDK301/CHeaders/Wrappers/XPCDisplay.cpp delete mode 100755 src/XPSDK301/CHeaders/Wrappers/XPCDisplay.h delete mode 100755 src/XPSDK301/CHeaders/Wrappers/XPCListener.cpp delete mode 100755 src/XPSDK301/CHeaders/Wrappers/XPCListener.h delete mode 100755 src/XPSDK301/CHeaders/Wrappers/XPCProcessing.cpp delete mode 100755 src/XPSDK301/CHeaders/Wrappers/XPCProcessing.h delete mode 100755 src/XPSDK301/CHeaders/Wrappers/XPCWidget.cpp delete mode 100755 src/XPSDK301/CHeaders/Wrappers/XPCWidget.h delete mode 100755 src/XPSDK301/CHeaders/Wrappers/XPCWidgetAttachments.cpp delete mode 100755 src/XPSDK301/CHeaders/Wrappers/XPCWidgetAttachments.h delete mode 100755 src/XPSDK301/CHeaders/XPLM/XPLMCamera.h delete mode 100755 src/XPSDK301/CHeaders/XPLM/XPLMDataAccess.h delete mode 100755 src/XPSDK301/CHeaders/XPLM/XPLMDefs.h delete mode 100755 src/XPSDK301/CHeaders/XPLM/XPLMDisplay.h delete mode 100755 src/XPSDK301/CHeaders/XPLM/XPLMGraphics.h delete mode 100644 src/XPSDK301/CHeaders/XPLM/XPLMInstance.h delete mode 100644 src/XPSDK301/CHeaders/XPLM/XPLMMap.h delete mode 100755 src/XPSDK301/CHeaders/XPLM/XPLMMenus.h delete mode 100755 src/XPSDK301/CHeaders/XPLM/XPLMNavigation.h delete mode 100755 src/XPSDK301/CHeaders/XPLM/XPLMPlanes.h delete mode 100755 src/XPSDK301/CHeaders/XPLM/XPLMPlugin.h delete mode 100755 src/XPSDK301/CHeaders/XPLM/XPLMProcessing.h delete mode 100644 src/XPSDK301/CHeaders/XPLM/XPLMScenery.h delete mode 100755 src/XPSDK301/CHeaders/XPLM/XPLMUtilities.h delete mode 100755 src/XPSDK301/Delphi/Widgets/XPStandardWidgets.pas delete mode 100755 src/XPSDK301/Delphi/Widgets/XPUIGraphics.pas delete mode 100755 src/XPSDK301/Delphi/Widgets/XPWidgetDefs.pas delete mode 100755 src/XPSDK301/Delphi/Widgets/XPWidgetUtils.pas delete mode 100755 src/XPSDK301/Delphi/Widgets/XPWidgets.pas delete mode 100755 src/XPSDK301/Delphi/XPLM/XPLMCamera.pas delete mode 100755 src/XPSDK301/Delphi/XPLM/XPLMDataAccess.pas delete mode 100755 src/XPSDK301/Delphi/XPLM/XPLMDefs.pas delete mode 100755 src/XPSDK301/Delphi/XPLM/XPLMDisplay.pas delete mode 100755 src/XPSDK301/Delphi/XPLM/XPLMGraphics.pas delete mode 100644 src/XPSDK301/Delphi/XPLM/XPLMInstance.pas delete mode 100644 src/XPSDK301/Delphi/XPLM/XPLMMap.pas delete mode 100755 src/XPSDK301/Delphi/XPLM/XPLMMenus.pas delete mode 100755 src/XPSDK301/Delphi/XPLM/XPLMNavigation.pas delete mode 100755 src/XPSDK301/Delphi/XPLM/XPLMPlanes.pas delete mode 100755 src/XPSDK301/Delphi/XPLM/XPLMPlugin.pas delete mode 100755 src/XPSDK301/Delphi/XPLM/XPLMProcessing.pas delete mode 100644 src/XPSDK301/Delphi/XPLM/XPLMScenery.pas delete mode 100755 src/XPSDK301/Delphi/XPLM/XPLMUtilities.pas delete mode 100755 src/XPSDK301/Libraries/Mac/XPLM.framework/XPLM delete mode 100755 src/XPSDK301/Libraries/Mac/XPWidgets.framework/XPWidgets delete mode 100644 src/XPSDK301/Libraries/Win/XPLM_64.lib delete mode 100644 src/XPSDK301/Libraries/Win/XPWidgets_64.lib delete mode 100644 src/XPSDK301/README.txt delete mode 100644 src/XPSDK301/license.txt diff --git a/src/XPSDK301/CHeaders/Widgets/XPStandardWidgets.h b/src/XPSDK301/CHeaders/Widgets/XPStandardWidgets.h deleted file mode 100755 index f0c65545..00000000 --- a/src/XPSDK301/CHeaders/Widgets/XPStandardWidgets.h +++ /dev/null @@ -1,571 +0,0 @@ -#ifndef _XPStandardWidgets_h_ -#define _XPStandardWidgets_h_ - -/* - * Copyright 2005-2012 Sandy Barbour and Ben Supnik - * - * All rights reserved. See license.txt for usage. - * - * X-Plane SDK Version: 2.1.1 - * - */ - -/* - * XPStandardWidgets - THEORY OF OPERATION - * - * The standard widgets are widgets built into the widgets library. While you - * can gain access to the widget function that drives them, you generally use - * them by calling XPCreateWidget and then listening for special messages, - * etc. - * - * The standard widgets often send mesages to themselves when the user - * performs an event; these messages are sent up the widget hierarchy until - * they are handled. So you can add a widget proc directly to a push button - * (for example) to intercept the message when it is clicked, or you can put - * one widget proc on a window for all of the push buttons in the window. Most - * of these messages contain the original widget ID as a parameter so you can - * know which widget is messaging no matter who it is sent to. - * - */ - -#include "XPWidgetDefs.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/*************************************************************************** - * MAIN WINDOW - ***************************************************************************/ -/* - * The main window widget class provides a "window" as the user knows it. - * These windows are dragable and can be selected. Use them to create floating - * windows and non-modal dialogs. - * - */ - - -#define xpWidgetClass_MainWindow 1 - -/* - * Main Window Type Values - * - * These type values are used to control the appearance of a main window. - * - */ -enum { - /* The standard main window; pin stripes on XP7, metal frame on XP 6. */ - xpMainWindowStyle_MainWindow = 0 - - /* A translucent dark gray window, like the one ATC messages appear in. */ - ,xpMainWindowStyle_Translucent = 1 - - -}; - -/* - * Main Window Properties - * - * - */ -enum { - /* This property specifies the type of window. Set to one of the main window * - * types above. */ - xpProperty_MainWindowType = 1100 - - /* This property specifies whether the main window has close boxes in its * - * corners. */ - ,xpProperty_MainWindowHasCloseBoxes = 1200 - - -}; - -/* - * MainWindow Messages - * - * - */ -enum { - /* This message is sent when the close buttons are pressed for your window. */ - xpMessage_CloseButtonPushed = 1200 - - -}; - -/*************************************************************************** - * SUB WINDOW - ***************************************************************************/ -/* - * X-Plane dialogs are divided into separate areas; the sub window widgets - * allow you to make these areas. Create one main window and place several - * subwindows inside it. Then place your controls inside the subwindows. - * - */ - - -#define xpWidgetClass_SubWindow 2 - -/* - * SubWindow Type Values - * - * These values control the appearance of the subwindow. - * - */ -enum { - /* A panel that sits inside a main window. */ - xpSubWindowStyle_SubWindow = 0 - - /* A screen that sits inside a panel for showing text information. */ - ,xpSubWindowStyle_Screen = 2 - - /* A list view for scrolling lists. */ - ,xpSubWindowStyle_ListView = 3 - - -}; - -/* - * SubWindow Properties - * - * - */ -enum { - /* This property specifies the type of window. Set to one of the subwindow * - * types above. */ - xpProperty_SubWindowType = 1200 - - -}; - -/*************************************************************************** - * BUTTON - ***************************************************************************/ -/* - * The button class provides a number of different button styles and - * behaviors, including push buttons, radio buttons, check boxes, etc. The - * button label appears on or next to the button depending on the button's - * appearance, or type. - * - * The button's behavior is a separate property that dictates who it hilights - * and what kinds of messages it sends. Since behavior and type are different, - * you can do strange things like make check boxes that act as push buttons or - * push buttons with radio button behavior. - * - * In X-Plane 6 there were no check box graphics. The result is the following - * behavior: in X-Plane 6 all check box and radio buttons are round - * (radio-button style) buttons; in X-Plane 7 they are all square (check-box - * style) buttons. In a future version of X-Plane, the xpButtonBehavior enums - * will provide the correct graphic (check box or radio button) giving the - * expected result. - * - */ - - -#define xpWidgetClass_Button 3 - -/* - * Button Types - * - * These define the visual appearance of buttons but not how they respond to - * the mouse. - * - */ -enum { - /* This is a standard push button, like an 'OK' or 'Cancel' button in a dialog * - * box. */ - xpPushButton = 0 - - /* A check box or radio button. Use this and the button behaviors below to * - * get the desired behavior. */ - ,xpRadioButton = 1 - - /* A window close box. */ - ,xpWindowCloseBox = 3 - - /* A small down arrow. */ - ,xpLittleDownArrow = 5 - - /* A small up arrow. */ - ,xpLittleUpArrow = 6 - - -}; - -/* - * Button Behavior Values - * - * These define how the button responds to mouse clicks. - * - */ -enum { - /* Standard push button behavior. The button hilites while the mouse is * - * clicked over it and unhilites when the mouse is moved outside of it or * - * released. If the mouse is released over the button, the * - * xpMsg_PushButtonPressed message is sent. */ - xpButtonBehaviorPushButton = 0 - - /* Check box behavior. The button immediately toggles its value when the mouse * - * is clicked and sends out a xpMsg_ButtonStateChanged message. */ - ,xpButtonBehaviorCheckBox = 1 - - /* Radio button behavior. The button immediately sets its state to one and * - * sends out a xpMsg_ButtonStateChanged message if it was not already set to * - * one. You must turn off other radio buttons in a group in your code. */ - ,xpButtonBehaviorRadioButton = 2 - - -}; - -/* - * Button Properties - * - * - */ -enum { - /* This property sets the visual type of button. Use one of the button types * - * above. */ - xpProperty_ButtonType = 1300 - - /* This property sets the button's behavior. Use one of the button behaviors * - * above. */ - ,xpProperty_ButtonBehavior = 1301 - - /* This property tells whether a check box or radio button is "checked" or * - * not. Not used for push buttons. */ - ,xpProperty_ButtonState = 1302 - - -}; - -/* - * Button Messages - * - * These messages are sent by the button to itself and then up the widget - * chain when the button is clicked. (You may intercept them by providing a - * widget handler for the button itself or by providing a handler in a parent - * widget.) - * - */ -enum { - /* This message is sent when the user completes a click and release in a * - * button with push button behavior. Parameter one of the message is the * - * widget ID of the button. This message is dispatched up the widget * - * hierarchy. */ - xpMsg_PushButtonPressed = 1300 - - /* This message is sent when a button is clicked that has radio button or * - * check box behavior and its value changes. (Note that if the value changes * - * by setting a property you do not receive this message!) Parameter one is * - * the widget ID of the button, parameter 2 is the new state value, either * - * zero or one. This message is dispatched up the widget hierarchy. */ - ,xpMsg_ButtonStateChanged = 1301 - - -}; - -/*************************************************************************** - * TEXT FIELD - ***************************************************************************/ -/* - * The text field widget provides an editable text field including mouse - * selection and keyboard navigation. The contents of the text field are its - * descriptor. (The descriptor changes as the user types.) - * - * The text field can have a number of types, that effect the visual layout of - * the text field. The text field sends messages to itself so you may control - * its behavior. - * - * If you need to filter keystrokes, add a new handler and intercept the key - * press message. Since key presses are passed by pointer, you can modify the - * keystroke and pass it through to the text field widget. - * - * WARNING: in X-Plane before 7.10 (including 6.70) null characters could - * crash X-Plane. To prevent this, wrap this object with a filter function - * (more instructions can be found on the SDK website). - * - */ - - -#define xpWidgetClass_TextField 4 - -/* - * Text Field Type Values - * - * These control the look of the text field. - * - */ -enum { - /* A field for text entry. */ - xpTextEntryField = 0 - - /* A transparent text field. The user can type and the text is drawn, but no * - * background is drawn. You can draw your own background by adding a widget * - * handler and prehandling the draw message. */ - ,xpTextTransparent = 3 - - /* A translucent edit field, dark gray. */ - ,xpTextTranslucent = 4 - - -}; - -/* - * Text Field Properties - * - * - */ -enum { - /* This is the character position the selection starts at, zero based. If it * - * is the same as the end insertion point, the insertion point is not a * - * selection. */ - xpProperty_EditFieldSelStart = 1400 - - /* This is the character position of the end of the selection. */ - ,xpProperty_EditFieldSelEnd = 1401 - - /* This is the character position a drag was started at if the user is * - * dragging to select text, or -1 if a drag is not in progress. */ - ,xpProperty_EditFieldSelDragStart = 1402 - - /* This is the type of text field to display, from the above list. */ - ,xpProperty_TextFieldType = 1403 - - /* Set this property to 1 to password protect the field. Characters will be * - * drawn as *s even though the descriptor will contain plain-text. */ - ,xpProperty_PasswordMode = 1404 - - /* The max number of characters you can enter, if limited. Zero means * - * unlimited. */ - ,xpProperty_MaxCharacters = 1405 - - /* The first visible character on the left. This effectively scrolls the text * - * field. */ - ,xpProperty_ScrollPosition = 1406 - - /* The font to draw the field's text with. (An XPLMFontID.) */ - ,xpProperty_Font = 1407 - - /* This is the active side of the insert selection. (Internal) */ - ,xpProperty_ActiveEditSide = 1408 - - -}; - -/* - * Text Field Messages - * - * - */ -enum { - /* Text Field Messages * - * * - * The text field sends this message to itself when its text changes. It sends * - * the message up the call chain; param1 is the text field's widget ID. */ - xpMsg_TextFieldChanged = 1400 - - -}; - -/*************************************************************************** - * SCROLL BAR - ***************************************************************************/ -/* - * A standard scroll bar or slider control. The scroll bar has a minimum, - * maximum and current value that is updated when the user drags it. The - * scroll bar sends continuous messages as it is dragged. - * - */ - - -#define xpWidgetClass_ScrollBar 5 - -/* - * Scroll Bar Type Values - * - * This defines how the scroll bar looks. - * - */ -enum { - /* Scroll bar types. * - * * - * A standard X-Plane scroll bar (with arrows on the ends). */ - xpScrollBarTypeScrollBar = 0 - - /* A slider, no arrows. */ - ,xpScrollBarTypeSlider = 1 - - -}; - -/* - * Scroll Bar Properties - * - * - */ -enum { - /* The current position of the thumb (in between the min and max, inclusive) */ - xpProperty_ScrollBarSliderPosition = 1500 - - /* The value the scroll bar has when the thumb is in the lowest position. */ - ,xpProperty_ScrollBarMin = 1501 - - /* The value the scroll bar has when the thumb is in the highest position. */ - ,xpProperty_ScrollBarMax = 1502 - - /* How many units to moev the scroll bar when clicking next to the thumb. The * - * scroll bar always moves one unit when the arrows are clicked. */ - ,xpProperty_ScrollBarPageAmount = 1503 - - /* The type of scrollbar from the enums above. */ - ,xpProperty_ScrollBarType = 1504 - - /* Used internally. */ - ,xpProperty_ScrollBarSlop = 1505 - - -}; - -/* - * Scroll Bar Messages - * - * - */ -enum { - /* The Scroll Bar sends this message when the slider position changes. It * - * sends the message up the call chain; param1 is the Scroll Bar widget ID. */ - xpMsg_ScrollBarSliderPositionChanged = 1500 - - -}; - -/*************************************************************************** - * CAPTION - ***************************************************************************/ -/* - * A caption is a simple widget that shows its descriptor as a string, useful - * for labeling parts of a window. It always shows its descriptor as its - * string and is otherwise transparent. - * - */ - - -#define xpWidgetClass_Caption 6 - -/* - * Caption Properties - * - * - */ -enum { - /* This property specifies whether the caption is lit; use lit captions * - * against screens. */ - xpProperty_CaptionLit = 1600 - - -}; - -/*************************************************************************** - * GENERAL GRAPHICS - ***************************************************************************/ -/* - * The general graphics widget can show one of many icons available from - * X-Plane. - * - */ - - -#define xpWidgetClass_GeneralGraphics 7 - -/* - * General Graphics Types Values - * - * These define the icon for the general graphics. - * - */ -enum { - xpShip = 4 - - ,xpILSGlideScope = 5 - - ,xpMarkerLeft = 6 - - ,xp_Airport = 7 - - ,xpNDB = 8 - - ,xpVOR = 9 - - ,xpRadioTower = 10 - - ,xpAircraftCarrier = 11 - - ,xpFire = 12 - - ,xpMarkerRight = 13 - - ,xpCustomObject = 14 - - ,xpCoolingTower = 15 - - ,xpSmokeStack = 16 - - ,xpBuilding = 17 - - ,xpPowerLine = 18 - - ,xpVORWithCompassRose = 19 - - ,xpOilPlatform = 21 - - ,xpOilPlatformSmall = 22 - - ,xpWayPoint = 23 - - -}; - -/* - * General Graphics Properties - * - * - */ -enum { - /* This property controls the type of icon that is drawn. */ - xpProperty_GeneralGraphicsType = 1700 - - -}; - -/*************************************************************************** - * PROGRESS INDICATOR - ***************************************************************************/ -/* - * This widget implements a progress indicator as seen when X-Plane starts up. - * - */ - -#define xpWidgetClass_Progress 8 - -/* - * Progress Indicator Properties - * - * - */ -enum { - /* This is the current value of the progress indicator. */ - xpProperty_ProgressPosition = 1800 - - /* This is the minimum value, equivalent to 0% filled. */ - ,xpProperty_ProgressMin = 1801 - - /* This is the maximum value, equivalent to 100% filled. */ - ,xpProperty_ProgressMax = 1802 - - -}; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/XPSDK301/CHeaders/Widgets/XPUIGraphics.h b/src/XPSDK301/CHeaders/Widgets/XPUIGraphics.h deleted file mode 100755 index bbf510a1..00000000 --- a/src/XPSDK301/CHeaders/Widgets/XPUIGraphics.h +++ /dev/null @@ -1,360 +0,0 @@ -#ifndef _XPUIGraphics_h_ -#define _XPUIGraphics_h_ - -/* - * Copyright 2005-2012 Sandy Barbour and Ben Supnik - * - * All rights reserved. See license.txt for usage. - * - * X-Plane SDK Version: 2.1.1 - * - */ - -/* - * - * - */ - -#include "XPWidgetDefs.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/*************************************************************************** - * UI GRAPHICS - ***************************************************************************/ -/* - * - * - */ - -/* - * XPWindowStyle - * - * There are a few built-in window styles in X-Plane that you can use. - * - * Note that X-Plane 6 does not offer real shadow-compositing; you must make - * sure to put a window on top of another window of the right style to the - * shadows work, etc. This applies to elements with insets and shadows. The - * rules are: - * - * Sub windows must go on top of main windows, and screens and list views on - * top of subwindows. Only help and main windows can be over the main screen. - * - * With X-Plane 7 any window or element may be placed over any other element. - * - * Some windows are scaled by stretching, some by repeating. The drawing - * routines know which scaling method to use. The list view cannot be rescaled - * in X-Plane 6 because it has both a repeating pattern and a gradient in one - * element. All other elements can be rescaled. - * - */ -enum { - /* An LCD screen that shows help. */ - xpWindow_Help = 0 - - /* A dialog box window. */ - ,xpWindow_MainWindow = 1 - - /* A panel or frame within a dialog box window. */ - ,xpWindow_SubWindow = 2 - - /* An LCD screen within a panel to hold text displays. */ - ,xpWindow_Screen = 4 - - /* A list view within a panel for scrolling file names, etc. */ - ,xpWindow_ListView = 5 - - -}; -typedef int XPWindowStyle; - -/* - * XPDrawWindow - * - * This routine draws a window of the given dimensions at the given offset on - * the virtual screen in a given style. The window is automatically scaled as - * appropriate using a bitmap scaling technique (scaling or repeating) as - * appropriate to the style. - * - */ -WIDGET_API void XPDrawWindow( - int inX1, - int inY1, - int inX2, - int inY2, - XPWindowStyle inStyle); - -/* - * XPGetWindowDefaultDimensions - * - * This routine returns the default dimensions for a window. Output is either - * a minimum or fixed value depending on whether the window is scalable. - * - */ -WIDGET_API void XPGetWindowDefaultDimensions( - XPWindowStyle inStyle, - int * outWidth, /* Can be NULL */ - int * outHeight); /* Can be NULL */ - -/* - * XPElementStyle - * - * Elements are individually drawable UI things like push buttons, etc. The - * style defines what kind of element you are drawing. Elements can be - * stretched in one or two dimensions (depending on the element). Some - * elements can be lit. - * - * In X-Plane 6 some elements must be drawn over metal. Some are scalable and - * some are not. Any element can be drawn anywhere in X-Plane 7. - * - * Scalable Axis Required Background - * - */ -enum { - /* x metal */ - xpElement_TextField = 6 - - /* none metal */ - ,xpElement_CheckBox = 9 - - /* none metal */ - ,xpElement_CheckBoxLit = 10 - - /* none window header */ - ,xpElement_WindowCloseBox = 14 - - /* none window header */ - ,xpElement_WindowCloseBoxPressed = 15 - - /* x metal */ - ,xpElement_PushButton = 16 - - /* x metal */ - ,xpElement_PushButtonLit = 17 - - /* none any */ - ,xpElement_OilPlatform = 24 - - /* none any */ - ,xpElement_OilPlatformSmall = 25 - - /* none any */ - ,xpElement_Ship = 26 - - /* none any */ - ,xpElement_ILSGlideScope = 27 - - /* none any */ - ,xpElement_MarkerLeft = 28 - - /* none any */ - ,xpElement_Airport = 29 - - /* none any */ - ,xpElement_Waypoint = 30 - - /* none any */ - ,xpElement_NDB = 31 - - /* none any */ - ,xpElement_VOR = 32 - - /* none any */ - ,xpElement_RadioTower = 33 - - /* none any */ - ,xpElement_AircraftCarrier = 34 - - /* none any */ - ,xpElement_Fire = 35 - - /* none any */ - ,xpElement_MarkerRight = 36 - - /* none any */ - ,xpElement_CustomObject = 37 - - /* none any */ - ,xpElement_CoolingTower = 38 - - /* none any */ - ,xpElement_SmokeStack = 39 - - /* none any */ - ,xpElement_Building = 40 - - /* none any */ - ,xpElement_PowerLine = 41 - - /* none metal */ - ,xpElement_CopyButtons = 45 - - /* none metal */ - ,xpElement_CopyButtonsWithEditingGrid = 46 - - /* x, y metal */ - ,xpElement_EditingGrid = 47 - - /* THIS CAN PROBABLY BE REMOVED */ - ,xpElement_ScrollBar = 48 - - /* none any */ - ,xpElement_VORWithCompassRose = 49 - - /* none metal */ - ,xpElement_Zoomer = 51 - - /* x, y metal */ - ,xpElement_TextFieldMiddle = 52 - - /* none metal */ - ,xpElement_LittleDownArrow = 53 - - /* none metal */ - ,xpElement_LittleUpArrow = 54 - - /* none metal */ - ,xpElement_WindowDragBar = 61 - - /* none metal */ - ,xpElement_WindowDragBarSmooth = 62 - - -}; -typedef int XPElementStyle; - -/* - * XPDrawElement - * - * XPDrawElement draws a given element at an offset on the virtual screen in - * set dimensions. EVEN if the element is not scalable, it will be scaled if - * the width and height do not match the preferred dimensions; it'll just look - * ugly. Pass inLit to see the lit version of the element; if the element - * cannot be lit this is ignored. - * - */ -WIDGET_API void XPDrawElement( - int inX1, - int inY1, - int inX2, - int inY2, - XPElementStyle inStyle, - int inLit); - -/* - * XPGetElementDefaultDimensions - * - * This routine returns the recommended or minimum dimensions of a given UI - * element. outCanBeLit tells whether the element has both a lit and unlit - * state. Pass NULL to not receive any of these parameters. - * - */ -WIDGET_API void XPGetElementDefaultDimensions( - XPElementStyle inStyle, - int * outWidth, /* Can be NULL */ - int * outHeight, /* Can be NULL */ - int * outCanBeLit); /* Can be NULL */ - -/* - * XPTrackStyle - * - * A track is a UI element that displays a value vertically or horizontally. - * X-Plane has three kinds of tracks: scroll bars, sliders, and progress bars. - * Tracks can be displayed either horizontally or vertically; tracks will - * choose their own layout based on the larger dimension of their dimensions - * (e.g. they know if they are tall or wide). Sliders may be lit or unlit - * (showing the user manipulating them). - * - * ScrollBar - this is a standard scroll bar with arrows and a thumb to drag. - * Slider - this is a simple track with a ball in the middle that can be slid. - * Progress - this is a progress indicator showing how a long task is going. - * - */ -enum { - /* not over metal can be lit can be rotated */ - xpTrack_ScrollBar = 0 - - /* over metal can be lit can be rotated */ - ,xpTrack_Slider = 1 - - /* over metal cannot be lit cannot be rotated */ - ,xpTrack_Progress = 2 - - -}; -typedef int XPTrackStyle; - -/* - * XPDrawTrack - * - * This routine draws a track. You pass in the track dimensions and size; the - * track picks the optimal orientation for these dimensions. Pass in the - * track's minimum current and maximum values; the indicator will be - * positioned appropriately. You can also specify whether the track is lit or - * not. - * - */ -WIDGET_API void XPDrawTrack( - int inX1, - int inY1, - int inX2, - int inY2, - int inMin, - int inMax, - int inValue, - XPTrackStyle inTrackStyle, - int inLit); - -/* - * XPGetTrackDefaultDimensions - * - * This routine returns a track's default smaller dimension; all tracks are - * scalable in the larger dimension. It also returns whether a track can be - * lit. - * - */ -WIDGET_API void XPGetTrackDefaultDimensions( - XPTrackStyle inStyle, - int * outWidth, - int * outCanBeLit); - -/* - * XPGetTrackMetrics - * - * This routine returns the metrics of a track. If you want to write UI code - * to manipulate a track, this routine helps you know where the mouse - * locations are. For most other elements, the rectangle the element is drawn - * in is enough information. However, the scrollbar drawing routine does some - * automatic placement; this routine lets you know where things ended up. You - * pass almost everything you would pass to the draw routine. You get out the - * orientation, and other useful stuff. - * - * Besides orientation, you get five dimensions for the five parts of a - * scrollbar, which are the down button, down area (area before the thumb), - * the thumb, and the up area and button. For horizontal scrollers, the left - * button decreases; for vertical scrollers, the top button decreases. - * - */ -WIDGET_API void XPGetTrackMetrics( - int inX1, - int inY1, - int inX2, - int inY2, - int inMin, - int inMax, - int inValue, - XPTrackStyle inTrackStyle, - int * outIsVertical, - int * outDownBtnSize, - int * outDownPageSize, - int * outThumbSize, - int * outUpPageSize, - int * outUpBtnSize); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/XPSDK301/CHeaders/Widgets/XPWidgetDefs.h b/src/XPSDK301/CHeaders/Widgets/XPWidgetDefs.h deleted file mode 100755 index f01d3a38..00000000 --- a/src/XPSDK301/CHeaders/Widgets/XPWidgetDefs.h +++ /dev/null @@ -1,482 +0,0 @@ -#ifndef _XPWidgetDefs_h_ -#define _XPWidgetDefs_h_ - -/* - * Copyright 2005-2012 Sandy Barbour and Ben Supnik - * - * All rights reserved. See license.txt for usage. - * - * X-Plane SDK Version: 2.1.1 - * - */ - -/* - * - * - */ - -#include "XPLMDefs.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -#if APL - #if XPWIDGETS - #if __GNUC__ >= 4 - #define WIDGET_API __attribute__((visibility("default"))) - #elif __MACH__ - #define WIDGET_API - #else - #define WIDGET_API __declspec(dllexport) - #endif - #else - #define WIDGET_API - #endif -#elif IBM - #if XPWIDGETS - #define WIDGET_API __declspec(dllexport) - #else - #define WIDGET_API __declspec(dllimport) - #endif -#elif LIN - #if XPWIDGETS - #if __GNUC__ >= 4 - #define WIDGET_API __attribute__((visibility("default"))) - #else - #define WIDGET_API - #endif - #else - #define WIDGET_API - #endif -#else -#pragma error "Platform not defined!" -#endif - /*************************************************************************** - * WIDGET DEFINITIONS - ***************************************************************************/ -/* - * A widget is a call-back driven screen entity like a push-button, window, - * text entry field, etc. - * - * Use the widget API to create widgets of various classes. You can nest them - * into trees of widgets to create complex user interfaces. - * - */ - - -/* - * XPWidgetID - * - * A Widget ID is an opaque unique non-zero handle identifying your widget. - * Use 0 to specify "no widget". This type is defined as wide enough to hold a - * pointer. You receive a widget ID when you create a new widget and then use - * that widget ID to further refer to the widget. - * - */ -typedef void * XPWidgetID; - -/* - * XPWidgetPropertyID - * - * Properties are values attached to instances of your widgets. A property is - * identified by a 32-bit ID and its value is the width of a pointer. - * - * Each widget instance may have a property or not have it. When you set a - * property on a widget for the first time, the property is added to the - * widget; it then stays there for the life of the widget. - * - * Some property IDs are predefined by the widget package; you can make up - * your own property IDs as well. - * - */ -enum { - /* A window's refcon is an opaque value used by client code to find other data * - * based on it. */ - xpProperty_Refcon = 0 - - /* These properties are used by the utlities to implement dragging. */ - ,xpProperty_Dragging = 1 - - ,xpProperty_DragXOff = 2 - - ,xpProperty_DragYOff = 3 - - /* Is the widget hilited? (For widgets that support this kind of thing.) */ - ,xpProperty_Hilited = 4 - - /* Is there a C++ object attached to this widget? */ - ,xpProperty_Object = 5 - - /* If this property is 1, the widget package will use OpenGL to restrict * - * drawing to the Wiget's exposed rectangle. */ - ,xpProperty_Clip = 6 - - /* Is this widget enabled (for those that have a disabled state too)? */ - ,xpProperty_Enabled = 7 - - /* NOTE: Property IDs 1 - 999 are reserved for the widget's library. * - * * - * NOTE: Property IDs 1000 - 9999 are allocated to the standard widget classes * - * provided with the library Properties 1000 - 1099 are for widget class 0, * - * 1100 - 1199 for widget class 1, etc. */ - ,xpProperty_UserStart = 10000 - - -}; -typedef int XPWidgetPropertyID; - -/* - * XPMouseState_t - * - * When the mouse is clicked or dragged, a pointer to this structure is passed - * to your widget function. - * - */ -typedef struct { - int x; - int y; - /* Mouse Button number, left = 0 (right button not yet supported. */ - int button; -#if defined(XPLM200) - /* Scroll wheel delta (button in this case would be the wheel axis number). */ - int delta; -#endif /* XPLM200 */ -} XPMouseState_t; - -/* - * XPKeyState_t - * - * When a key is pressed, a pointer to this struct is passed to your widget - * function. - * - */ -typedef struct { - /* The ASCII key that was pressed. WARNING: this may be 0 for some non-ASCII * - * key sequences. */ - char key; - /* The flags. Make sure to check this if you only want key-downs! */ - XPLMKeyFlags flags; - /* The virtual key code for the key */ - char vkey; -} XPKeyState_t; - -/* - * XPWidgetGeometryChange_t - * - * This structure contains the deltas for your widget's geometry when it - * changes. - * - */ -typedef struct { - int dx; - /* +Y = the widget moved up */ - int dy; - int dwidth; - int dheight; -} XPWidgetGeometryChange_t; - -/* - * XPDispatchMode - * - * The dispatching modes describe how the widgets library sends out messages. - * Currently there are three modes: - * - */ -enum { - /* The message will only be sent to the target widget. */ - xpMode_Direct = 0 - - /* The message is sent to the target widget, then up the chain of parents * - * until the message is handled or a parentless widget is reached. */ - ,xpMode_UpChain = 1 - - /* The message is sent to the target widget and then all of its children * - * recursively depth-first. */ - ,xpMode_Recursive = 2 - - /* The message is snet just to the target, but goes to every callback, even if * - * it is handled. */ - ,xpMode_DirectAllCallbacks = 3 - - /* The message is only sent to the very first handler even if it is not * - * accepted. (This is really only useful for some internal Widget Lib * - * functions. */ - ,xpMode_Once = 4 - - -}; -typedef int XPDispatchMode; - -/* - * XPWidgetClass - * - * Widget classes define predefined widget types. A widget class basically - * specifies from a library the widget function to be used for the widget. - * Most widgets can be made right from classes. - * - */ -typedef int XPWidgetClass; - -/* An unspecified widget class. Other widget classes are in * - * XPStandardWidgets.h */ -#define xpWidgetClass_None 0 - -/*************************************************************************** - * WIDGET MESSAGES - ***************************************************************************/ -/* - * - * - */ - -/* - * XPWidgetMessage - * - * Widgets receive 32-bit messages indicating what action is to be taken or - * notifications of events. The list of messages may be expanded. - * - */ -enum { - /* No message, should not be sent. */ - xpMsg_None = 0 - - /* The create message is sent once per widget that is created with your widget * - * function and once for any widget that has your widget function attached. * - * * - * Dispatching: Direct * - * * - * Param 1: 1 if you are being added as a subclass, 0 if the widget is first * - * being created. */ - ,xpMsg_Create = 1 - - /* The destroy message is sent once for each message that is destroyed that * - * has your widget function. * - * * - * Dispatching: Direct for all * - * * - * Param 1: 1 if being deleted by a recursive delete to the parent, 0 for * - * explicit deletion. */ - ,xpMsg_Destroy = 2 - - /* The paint message is sent to your widget to draw itself. The paint message * - * is the bare-bones message; in response you must draw yourself, draw your * - * children, set up clipping and culling, check for visibility, etc. If you * - * don't want to do all of this, ignore the paint message and a draw message * - * (see below) will be sent to you. * - * * - * Dispatching: Direct */ - ,xpMsg_Paint = 3 - - /* The draw message is sent to your widget when it is time to draw yourself. * - * OpenGL will be set up to draw in 2-d global screen coordinates, but you * - * should use the XPLM to set up OpenGL state. * - * * - * Dispatching: Direct */ - ,xpMsg_Draw = 4 - - /* The key press message is sent once per key that is pressed. The first * - * parameter is the type of key code (integer or char) and the second is the * - * code itself. By handling this event, you consume the key stroke. * - * * - * Handling this message 'consumes' the keystroke; not handling it passes it * - * to your parent widget. * - * * - * Dispatching: Up Chain * - * * - * : Param 1: A pointer to an XPKeyState_t structure with the keystroke. */ - ,xpMsg_KeyPress = 5 - - /* Keyboard focus is being given to you. By handling this message you accept * - * keyboard focus. The first parameter will be one if a child of yours gave up * - * focus to you, 0 if someone set focus on you explicitly. * - * * - * : Handling this message accepts focus; not handling refuses focus. * - * * - * Dispatching: direct * - * * - * Param 1: 1 if you are gaining focus because your child is giving it up, 0 * - * if someone is explicitly giving you focus. */ - ,xpMsg_KeyTakeFocus = 6 - - /* Keyboard focus is being taken away from you. The first parameter will be * - * one if you are losing focus because another widget is taking it, or 0 if * - * someone called the API to make you lose focus explicitly. * - * * - * Dispatching: Direct * - * * - * Param 1: 1 if focus is being taken by another widget, 0 if code requested * - * to remove focus. */ - ,xpMsg_KeyLoseFocus = 7 - - /* You receive one mousedown event per click with a mouse-state structure * - * pointed to by parameter 1, by accepting this you eat the click, otherwise * - * your parent gets it. You will not receive drag and mouse up messages if you * - * do not accept the down message. * - * * - * Handling this message consumes the mouse click, not handling it passes it * - * to the next widget. You can act 'transparent' as a window by never handling * - * moues clicks to certain areas. * - * * - * Dispatching: Up chain NOTE: Technically this is direct dispatched, but the * - * widgets library will shop it to each widget until one consumes the click, * - * making it effectively "up chain". * - * * - * Param 1: A pointer to an XPMouseState_t containing the mouse status. */ - ,xpMsg_MouseDown = 8 - - /* You receive a series of mouse drag messages (typically one per frame in the * - * sim) as the mouse is moved once you have accepted a mouse down message. * - * Parameter one points to a mouse-state structure describing the mouse * - * location. You will continue to receive these until the mouse button is * - * released. You may receive multiple mouse state messages with the same mouse * - * position. You will receive mouse drag events even if the mouse is dragged * - * out of your current or original bounds at the time of the mouse down. * - * * - * Dispatching: Direct * - * * - * Param 1: A pointer to an XPMouseState_t containing the mouse status. */ - ,xpMsg_MouseDrag = 9 - - /* The mouseup event is sent once when the mouse button is released after a * - * drag or click. You only receive this message if you accept the mouseDown * - * message. Parameter one points to a mouse state structure. * - * * - * Dispatching: Direct * - * * - * Param 1: A pointer to an XPMouseState_t containing the mouse status. */ - ,xpMsg_MouseUp = 10 - - /* Your geometry or a child's geometry is being changed. * - * * - * Dispatching: Up chain * - * * - * Param 1: The widget ID of the original reshaped target. * - * * - * Param 2: A pointer to a XPWidgetGeometryChange_t struct describing the * - * change. */ - ,xpMsg_Reshape = 11 - - /* Your exposed area has changed. * - * * - * Dispatching: Direct */ - ,xpMsg_ExposedChanged = 12 - - /* A child has been added to you. The child's ID is passed in parameter one. * - * * - * Dispatching: Direct * - * * - * Param 1: The Widget ID of the child being added. */ - ,xpMsg_AcceptChild = 13 - - /* A child has been removed from to you. The child's ID is passed in parameter * - * one. * - * * - * Dispatching: Direct * - * * - * Param 1: The Widget ID of the child being removed. */ - ,xpMsg_LoseChild = 14 - - /* You now have a new parent, or have no parent. The parent's ID is passed in, * - * or 0 for no parent. * - * * - * Dispatching: Direct * - * * - * Param 1: The Widget ID of your parent */ - ,xpMsg_AcceptParent = 15 - - /* You or a child has been shown. Note that this does not include you being * - * shown because your parent was shown, you were put in a new parent, your * - * root was shown, etc. * - * * - * Dispatching: Up chain * - * * - * Param 1: The widget ID of the shown widget. */ - ,xpMsg_Shown = 16 - - /* You have been hidden. See limitations above. * - * * - * Dispatching: Up chain * - * * - * Param 1: The widget ID of the hidden widget. */ - ,xpMsg_Hidden = 17 - - /* Your descriptor has changed. * - * * - * Dispatching: Direct */ - ,xpMsg_DescriptorChanged = 18 - - /* A property has changed. Param 1 contains the property ID. * - * * - * Dispatching: Direct * - * * - * Param 1: The Property ID being changed. * - * * - * Param 2: The new property value */ - ,xpMsg_PropertyChanged = 19 - -#if defined(XPLM200) - /* The mouse wheel has moved. * - * * - * Return 1 to consume the mouse wheel move, or 0 to pass the message to a * - * parent. Dispatching: Up chain * - * * - * Param 1: A pointer to an XPMouseState_t containing the mouse status. */ - ,xpMsg_MouseWheel = 20 - -#endif /* XPLM200 */ -#if defined(XPLM200) - /* The cursor is over your widget. If you consume this message, change the * - * XPLMCursorStatus value to indicate the desired result, with the same rules * - * as in XPLMDisplay.h. * - * * - * Return 1 to consume this message, 0 to pass it on. * - * * - * Dispatching: Up chain Param 1: A pointer to an XPMouseState_t struct * - * containing the mouse status. * - * * - * Param 2: A pointer to a XPLMCursorStatus - set this to the cursor result * - * you desire. */ - ,xpMsg_CursorAdjust = 21 - -#endif /* XPLM200 */ - /* NOTE: Message IDs 1000 - 9999 are allocated to the standard widget classes * - * provided with the library with 1000 - 1099 for widget class 0, 1100 - 1199 * - * for widget class 1, etc. Message IDs 10,000 and beyond are for plugin use. */ - ,xpMsg_UserStart = 10000 - - -}; -typedef int XPWidgetMessage; - -/*************************************************************************** - * WIDGET CALLBACK FUNCTION - ***************************************************************************/ -/* - * - * - */ - -/* - * XPWidgetFunc_t - * - * This function defines your custom widget's behavior. It will be called by - * the widgets library to send messages to your widget. The message and widget - * ID are passed in, as well as two ptr-width signed parameters whose meaning - * varies with the message. Return 1 to indicate that you have processed the - * message, 0 to indicate that you have not. For any message that is not - * understood, return 0. - * - */ -typedef int (* XPWidgetFunc_t)( - XPWidgetMessage inMessage, - XPWidgetID inWidget, - intptr_t inParam1, - intptr_t inParam2); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/XPSDK301/CHeaders/Widgets/XPWidgetUtils.h b/src/XPSDK301/CHeaders/Widgets/XPWidgetUtils.h deleted file mode 100755 index f2fcffd0..00000000 --- a/src/XPSDK301/CHeaders/Widgets/XPWidgetUtils.h +++ /dev/null @@ -1,232 +0,0 @@ -#ifndef _XPWidgetUtils_h_ -#define _XPWidgetUtils_h_ - -/* - * Copyright 2005-2012 Sandy Barbour and Ben Supnik - * - * All rights reserved. See license.txt for usage. - * - * X-Plane SDK Version: 2.1.1 - * - */ - -/* - * XPWidgetUtils - USAGE NOTES - * - * The XPWidgetUtils library contains useful functions that make writing and - * using widgets less of a pain. - * - * One set of functions are the widget behavior functions. These functions - * each add specific useful behaviors to widgets. They can be used in two - * manners: - * - * 1. You can add a widget behavior function to a widget as a callback proc - * using the XPAddWidgetCallback function. The widget will gain that behavior. - * Remember that the last function you add has highest priority. You can use - * this to change or augment the behavior of an existing finished widget. - * - * 2. You can call a widget function from inside your own widget function. - * This allows you to include useful behaviors in custom-built widgets. A - * number of the standard widgets get their behavior from this library. To do - * this, call the behavior function from your function first. If it returns 1, - * that means it handled the event and you don't need to; simply return 1. - * - */ - -#include "XPWidgetDefs.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/*************************************************************************** - * GENERAL UTILITIES - ***************************************************************************/ -/* - * - * - */ - - - -/* - * Convenience accessors - * - * It can be clumsy accessing the variables passed in by pointer to a struct - * for mouse and reshape messages; these accessors let you simply pass in the param - * right from the arguments of your widget proc and get back the value you want. - * - */ -#define MOUSE_X(param) (((XPMouseState_t *) (param))->x) -#define MOUSE_Y(param) (((XPMouseState_t *) (param))->y) - -#define DELTA_X(param) (((XPWidgetGeometryChange_t *) (param))->dx) -#define DELTA_Y(param) (((XPWidgetGeometryChange_t *) (param))->dy) -#define DELTA_W(param) (((XPWidgetGeometryChange_t *) (param))->dwidth) -#define DELTA_H(param) (((XPWidgetGeometryChange_t *) (param))->dheight) - -#define KEY_CHAR(param) (((XPKeyState_t *) (param))->key) -#define KEY_FLAGS(param) (((XPKeyState_t *) (param))->flags) -#define KEY_VKEY(param) (((XPKeyState_t *) (param))->vkey) - -#define IN_RECT(x, y, l, t, r, b) \ - (((x) >= (l)) && ((x) <= (r)) && ((y) >= (b)) && ((y) <= (t))) - -/* - * XPWidgetCreate_t - * - * This structure contains all of the parameters needed to create a wiget. It - * is used with XPUCreateWidgets to create widgets in bulk from an array. All - * parameters correspond to those of XPCreateWidget except for the container - * index. If the container index is equal to the index of a widget in the - * array, the widget in the array passed to XPUCreateWidgets is used as the - * parent of this widget. Note that if you pass an index greater than your own - * position in the array, the parent you are requesting will not exist yet. If - * the container index is NO_PARENT, the parent widget is specified as NULL. - * If the container index is PARAM_PARENT, the widget passed into - * XPUCreateWidgets is used. - * - */ -typedef struct { - int left; - int top; - int right; - int bottom; - int visible; - const char * descriptor; - /* Whether ethis widget is a root wiget */ - int isRoot; - /* The index of the widget to contain within, or a constant */ - int containerIndex; - XPWidgetClass widgetClass; -} XPWidgetCreate_t; - -#define NO_PARENT -1 - -#define PARAM_PARENT -2 - -#define WIDGET_COUNT(x) ((sizeof(x) / sizeof(XPWidgetCreate_t))) - -/* - * XPUCreateWidgets - * - * This function creates a series of widgets from a table...see - * XPCreateWidget_t above. Pass in an array of widget creation structures and - * an array of widget IDs that will receive each widget. - * - * Widget parents are specified by index into the created widget table, - * allowing you to create nested widget structures. You can create multiple - * widget trees in one table. Generally you should create widget trees from - * the top down. - * - * You can also pass in a widget ID that will be used when the widget's parent - * is listed as PARAM_PARENT; this allows you to embed widgets created with - * XPUCreateWidgets in a widget created previously. - * - */ -WIDGET_API void XPUCreateWidgets( - const XPWidgetCreate_t * inWidgetDefs, - int inCount, - XPWidgetID inParamParent, - XPWidgetID * ioWidgets); - -/* - * XPUMoveWidgetBy - * - * Simply moves a widget by an amount, +x = right, +y=up, without resizing the - * widget. - * - */ -WIDGET_API void XPUMoveWidgetBy( - XPWidgetID inWidget, - int inDeltaX, - int inDeltaY); - -/*************************************************************************** - * LAYOUT MANAGERS - ***************************************************************************/ -/* - * The layout managers are widget behavior functions for handling where - * widgets move. Layout managers can be called from a widget function or - * attached to a widget later. - * - */ - - -/* - * XPUFixedLayout - * - * This function causes the widget to maintain its children in fixed position - * relative to itself as it is resized. Use this on the top level 'window' - * widget for your window. - * - */ -WIDGET_API int XPUFixedLayout( - XPWidgetMessage inMessage, - XPWidgetID inWidget, - intptr_t inParam1, - intptr_t inParam2); - -/*************************************************************************** - * WIDGET PROC BEHAVIORS - ***************************************************************************/ -/* - * These widget behavior functions add other useful behaviors to widgets. - * These functions cannot be attached to a widget; they must be called from - * your widget function. - * - */ - - -/* - * XPUSelectIfNeeded - * - * This causes the widget to bring its window to the foreground if it is not - * already. inEatClick specifies whether clicks in the background should be - * consumed by bringin the window to the foreground. - * - */ -WIDGET_API int XPUSelectIfNeeded( - XPWidgetMessage inMessage, - XPWidgetID inWidget, - intptr_t inParam1, - intptr_t inParam2, - int inEatClick); - -/* - * XPUDefocusKeyboard - * - * This causes a click in the widget to send keyboard focus back to X-Plane. - * This stops editing of any text fields, etc. - * - */ -WIDGET_API int XPUDefocusKeyboard( - XPWidgetMessage inMessage, - XPWidgetID inWidget, - intptr_t inParam1, - intptr_t inParam2, - int inEatClick); - -/* - * XPUDragWidget - * - * XPUDragWidget drags the widget in response to mouse clicks. Pass in not - * only the event, but the global coordinates of the drag region, which might - * be a sub-region of your widget (for example, a title bar). - * - */ -WIDGET_API int XPUDragWidget( - XPWidgetMessage inMessage, - XPWidgetID inWidget, - intptr_t inParam1, - intptr_t inParam2, - int inLeft, - int inTop, - int inRight, - int inBottom); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/XPSDK301/CHeaders/Widgets/XPWidgets.h b/src/XPSDK301/CHeaders/Widgets/XPWidgets.h deleted file mode 100755 index 84ce15c5..00000000 --- a/src/XPSDK301/CHeaders/Widgets/XPWidgets.h +++ /dev/null @@ -1,578 +0,0 @@ -#ifndef _XPWidgets_h_ -#define _XPWidgets_h_ - -/* - * Copyright 2005-2012 Sandy Barbour and Ben Supnik - * - * All rights reserved. See license.txt for usage. - * - * X-Plane SDK Version: 2.1.1 - * - */ - -/* - * WIDGETS - THEORY OF OPERATION AND NOTES - * - * Widgets are persistent view 'objects' for X-Plane. A widget is an object - * referenced by its opaque handle (widget ID) and the APIs in this file. You - * cannot access the widget's guts directly. Every Widget has the following - * intrinsic data: - * - * - A bounding box defined in global screen coordinates with 0,0 in the - * bottom left and +y = up, +x = right. - * - * - A visible box, which is the intersection of the bounding box with the - * widget's parents visible box. - * - * - Zero or one parent widgets. (Always zero if the widget is a root widget. - * - * - Zero or more child widgets. - * - * - Whether the widget is a root. Root widgets are the top level plugin - * windows. - * - * - Whether the widget is visible. - * - * - A text string descriptor, whose meaning varies from widget to widget. - * - * - An arbitrary set of 32 bit integral properties defined by 32-bit integral - * keys. This is how specific widgets - * - * store specific data. - * - * - A list of widget callbacks proc that implements the widgets behaviors. - * - * The Widgets library sends messages to widgets to request specific behaviors - * or notify the widget of things. - * - * Widgets may have more than one callback function, in which case messages - * are sent to the most recently added callback function until the message is - * handled. Messages may also be sent to parents or children; see the - * XPWidgetDefs.h header file for the different widget message dispatching - * functions. By adding a callback function to a window you can 'subclass' its - * behavior. - * - * A set of standard widgets are provided that serve common UI purposes. You - * can also customize or implement entirely custom widgets. - * - * Widgets are different than other view hierarchies (most notably Win32, - * which they bear a striking resemblance to) in the following ways: - * - * - Not all behavior can be patched. State that is managed by the XPWidgets - * DLL and not by individual widgets cannot be customized. - * - * - All coordinates are in global screen coordinates. Coordinates are not - * relative to an enclosing widget, nor are they relative to a display window. - * - * - * - Widget messages are always dispatched synchronously, and there is no - * concept of scheduling an update or a dirty region. Messages originate from - * X-Plane as the sim cycle goes by. Since X-Plane is constantly redrawing, so - * are widgets; there is no need to mark a part of a widget as 'needing - * redrawing' because redrawing happens frequently whether the widget needs it - * or not. - * - * - Any widget may be a 'root' widget, causing it to be drawn; there is no - * relationship between widget class and rootness. Root widgets are imlemented - * as XPLMDisply windows. - * - */ - -#include "XPWidgetDefs.h" -#include "XPLMDisplay.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/*************************************************************************** - * WIDGET CREATION AND MANAGEMENT - ***************************************************************************/ -/* - * - * - */ - -/* - * XPCreateWidget - * - * This function creates a new widget and returns the new widget's ID to you. - * If the widget creation fails for some reason, it returns NULL. Widget - * creation will fail either if you pass a bad class ID or if there is not - * adequate memory. - * - * Input Parameters: - * - * - Top, left, bottom, and right in global screen coordinates defining the - * widget's location on the screen. - * - * - inVisible is 1 if the widget should be drawn, 0 to start the widget as - * hidden. - * - * - inDescriptor is a null terminated string that will become the widget's - * descriptor. - * - * - inIsRoot is 1 if this is going to be a root widget, 0 if it will not be. - * - * - inContainer is the ID of this widget's container. It must be 0 for a root - * widget. for a non-root widget, pass the widget ID of the widget to place - * this widget within. If this widget is not going to start inside another - * widget, pass 0; this new widget will then just be floating off in space - * (and will not be drawn until it is placed in a widget. - * - * - inClass is the class of the widget to draw. Use one of the predefined - * class-IDs to create a standard widget. - * - * A note on widget embedding: a widget is only called (and will be drawn, - * etc.) if it is placed within a widget that will be called. Root widgets are - * always called. So it is possible to have whole chains of widgets that are - * simply not called. You can preconstruct widget trees and then place them - * into root widgets later to activate them if you wish. - * - */ -WIDGET_API XPWidgetID XPCreateWidget( - int inLeft, - int inTop, - int inRight, - int inBottom, - int inVisible, - const char * inDescriptor, - int inIsRoot, - XPWidgetID inContainer, - XPWidgetClass inClass); - -/* - * XPCreateCustomWidget - * - * This function is the same as XPCreateWidget except that instead of passing - * a class ID, you pass your widget callback function pointer defining the - * widget. Use this function to define a custom widget. All parameters are the - * same as XPCreateWidget, except that the widget class has been replaced with - * the widget function. - * - */ -WIDGET_API XPWidgetID XPCreateCustomWidget( - int inLeft, - int inTop, - int inRight, - int inBottom, - int inVisible, - const char * inDescriptor, - int inIsRoot, - XPWidgetID inContainer, - XPWidgetFunc_t inCallback); - -/* - * XPDestroyWidget - * - * This class destroys a widget. Pass in the ID of the widget to kill. If you - * pass 1 for inDestroyChilren, the widget's children will be destroyed first, - * then this widget will be destroyed. (Furthermore, the widget's children - * will be destroyed with the inDestroyChildren flag set to 1, so the - * destruction will recurse down the widget tree.) If you pass 0 for this - * flag, the child widgets will simply end up with their parent set to 0. - * - */ -WIDGET_API void XPDestroyWidget( - XPWidgetID inWidget, - int inDestroyChildren); - -/* - * XPSendMessageToWidget - * - * This sends any message to a widget. You should probably not go around - * simulating the predefined messages that the widgets library defines for - * you. You may however define custom messages for your widgets and send them - * with this method. - * - * This method supports several dispatching patterns; see XPDispatchMode for - * more info. The function returns 1 if the message was handled, 0 if it was - * not. - * - * For each widget that receives the message (see the dispatching modes), each - * widget function from the most recently installed to the oldest one receives - * the message in order until it is handled. - * - */ -WIDGET_API int XPSendMessageToWidget( - XPWidgetID inWidget, - XPWidgetMessage inMessage, - XPDispatchMode inMode, - intptr_t inParam1, - intptr_t inParam2); - -/*************************************************************************** - * WIDGET POSITIONING AND VISIBILITY - ***************************************************************************/ -/* - * - * - */ - -/* - * XPPlaceWidgetWithin - * - * This function changes which container a widget resides in. You may NOT use - * this function on a root widget! inSubWidget is the widget that will be - * moved. Pass a widget ID in inContainer to make inSubWidget be a child of - * inContainer. It will become the last/closest widget in the container. Pass - * 0 to remove the widget from any container. Any call to this other than - * passing the widget ID of the old parent of the affected widget will cause - * the widget to be removed from its old parent. Placing a widget within its - * own parent simply makes it the last widget. - * - * NOTE: this routine does not reposition the sub widget in global - * coordinates. If the container has layout management code, it will - * reposition the subwidget for you, otherwise you must do it with - * SetWidgetGeometry. - * - */ -WIDGET_API void XPPlaceWidgetWithin( - XPWidgetID inSubWidget, - XPWidgetID inContainer); - -/* - * XPCountChildWidgets - * - * This routine returns the number of widgets another widget contains. - * - */ -WIDGET_API int XPCountChildWidgets( - XPWidgetID inWidget); - -/* - * XPGetNthChildWidget - * - * This routine returns the widget ID of a child widget by index. Indexes are - * 0 based, from 0 to one minus the number of widgets in the parent, - * inclusive. If the index is invalid, 0 is returned. - * - */ -WIDGET_API XPWidgetID XPGetNthChildWidget( - XPWidgetID inWidget, - int inIndex); - -/* - * XPGetParentWidget - * - * This routine returns the parent of a widget, or 0 if the widget has no - * parent. Root widgets never have parents and therefore always return 0. - * - */ -WIDGET_API XPWidgetID XPGetParentWidget( - XPWidgetID inWidget); - -/* - * XPShowWidget - * - * This routine makes a widget visible if it is not already. Note that if a - * widget is not in a rooted widget hierarchy or one of its parents is not - * visible, it will still not be visible to the user. - * - */ -WIDGET_API void XPShowWidget( - XPWidgetID inWidget); - -/* - * XPHideWidget - * - * Makes a widget invisible. See XPShowWidget for considerations of when a - * widget might not be visible despite its own visibility state. - * - */ -WIDGET_API void XPHideWidget( - XPWidgetID inWidget); - -/* - * XPIsWidgetVisible - * - * This returns 1 if a widget is visible, 0 if it is not. Note that this - * routine takes into consideration whether a parent is invisible. Use this - * routine to tell if the user can see the widget. - * - */ -WIDGET_API int XPIsWidgetVisible( - XPWidgetID inWidget); - -/* - * XPFindRootWidget - * - * XPFindRootWidget returns the Widget ID of the root widget that contains the - * passed in widget or NULL if the passed in widget is not in a rooted - * hierarchy. - * - */ -WIDGET_API XPWidgetID XPFindRootWidget( - XPWidgetID inWidget); - -/* - * XPBringRootWidgetToFront - * - * This routine makes the specified widget be in the front most widget - * hierarchy. If this widget is a root widget, its widget hierarchy comes to - * front, otherwise the widget's root is brought to the front. If this widget - * is not in an active widget hiearchy (e.g. there is no root widget at the - * top of the tree), this routine does nothing. - * - */ -WIDGET_API void XPBringRootWidgetToFront( - XPWidgetID inWidget); - -/* - * XPIsWidgetInFront - * - * This routine returns true if this widget's hierarchy is the front most - * hierarchy. It returns false if the widget's hierarchy is not in front, or - * if the widget is not in a rooted hierarchy. - * - */ -WIDGET_API int XPIsWidgetInFront( - XPWidgetID inWidget); - -/* - * XPGetWidgetGeometry - * - * This routine returns the bounding box of a widget in global coordinates. - * Pass NULL for any parameter you are not interested in. - * - */ -WIDGET_API void XPGetWidgetGeometry( - XPWidgetID inWidget, - int * outLeft, /* Can be NULL */ - int * outTop, /* Can be NULL */ - int * outRight, /* Can be NULL */ - int * outBottom); /* Can be NULL */ - -/* - * XPSetWidgetGeometry - * - * This function changes the bounding box of a widget. - * - */ -WIDGET_API void XPSetWidgetGeometry( - XPWidgetID inWidget, - int inLeft, - int inTop, - int inRight, - int inBottom); - -/* - * XPGetWidgetForLocation - * - * Given a widget and a location, this routine returns the widget ID of the - * child of that widget that owns that location. If inRecursive is true then - * this will return a child of a child of a widget as it tries to find the - * deepest widget at that location. If inVisibleOnly is true, then only - * visible widgets are considered, otherwise all widgets are considered. The - * widget ID passed for inContainer will be returned if the location is in - * that widget but not in a child widget. 0 is returned if the location is not - * in the container. - * - * NOTE: if a widget's geometry extends outside its parents geometry, it will - * not be returned by this call for mouse locations outside the parent - * geometry. The parent geometry limits the child's eligibility for mouse - * location. - * - */ -WIDGET_API XPWidgetID XPGetWidgetForLocation( - XPWidgetID inContainer, - int inXOffset, - int inYOffset, - int inRecursive, - int inVisibleOnly); - -/* - * XPGetWidgetExposedGeometry - * - * This routine returns the bounds of the area of a widget that is completely - * within its parent widgets. Since a widget's bounding box can be outside its - * parent, part of its area will not be elligible for mouse clicks and should - * not draw. Use XPGetWidgetGeometry to find out what area defines your - * widget's shape, but use this routine to find out what area to actually draw - * into. Note that the widget library does not use OpenGL clipping to keep - * frame rates up, although you could use it internally. - * - */ -WIDGET_API void XPGetWidgetExposedGeometry( - XPWidgetID inWidgetID, - int * outLeft, /* Can be NULL */ - int * outTop, /* Can be NULL */ - int * outRight, /* Can be NULL */ - int * outBottom); /* Can be NULL */ - -/*************************************************************************** - * ACCESSING WIDGET DATA - ***************************************************************************/ -/* - * - * - */ - -/* - * XPSetWidgetDescriptor - * - * Every widget has a descriptor, which is a text string. What the text string - * is used for varies from widget to widget; for example, a push button's text - * is its descriptor, a caption shows its descriptor, and a text field's - * descriptor is the text being edited. In other words, the usage for the text - * varies from widget to widget, but this API provides a universal and - * convenient way to get at it. While not all UI widgets need their - * descriptor, many do. - * - */ -WIDGET_API void XPSetWidgetDescriptor( - XPWidgetID inWidget, - const char * inDescriptor); - -/* - * XPGetWidgetDescriptor - * - * This routine returns the widget's descriptor. Pass in the length of the - * buffer you are going to receive the descriptor in. The descriptor will be - * null terminated for you. This routine returns the length of the actual - * descriptor; if you pass NULL for outDescriptor, you can get the - * descriptor's length without getting its text. If the length of the - * descriptor exceeds your buffer length, the buffer will not be null - * terminated (this routine has 'strncpy' semantics). - * - */ -WIDGET_API int XPGetWidgetDescriptor( - XPWidgetID inWidget, - char * outDescriptor, - int inMaxDescLength); - -/* - * XPGetWidgetUnderlyingWindow - * - * Returns the window (from the XPLMDisplay API) that backs your widget - * window. If you have opted in to modern windows, via a call to - * XPLMEnableFeature("XPLM_USE_NATIVE_WIDGET_WINDOWS", 1), you can use the - * returned window ID for display APIs like XPLMSetWindowPositioningMode(), - * allowing you to pop the widget window out into a real OS window, or move it - * into VR. - * - */ -WIDGET_API XPLMWindowID XPGetWidgetUnderlyingWindow( - XPWidgetID inWidget); - -/* - * XPSetWidgetProperty - * - * This function sets a widget's property. Properties are arbitrary values - * associated by a widget by ID. - * - */ -WIDGET_API void XPSetWidgetProperty( - XPWidgetID inWidget, - XPWidgetPropertyID inProperty, - intptr_t inValue); - -/* - * XPGetWidgetProperty - * - * This routine returns the value of a widget's property, or 0 if the property - * is not defined. If you need to know whether the property is defined, pass a - * pointer to an int for inExists; the existence of that property will be - * returned in the int. Pass NULL for inExists if you do not need this - * information. - * - */ -WIDGET_API intptr_t XPGetWidgetProperty( - XPWidgetID inWidget, - XPWidgetPropertyID inProperty, - int * inExists); /* Can be NULL */ - -/*************************************************************************** - * KEYBOARD MANAGEMENT - ***************************************************************************/ -/* - * - * - */ - -/* - * XPSetKeyboardFocus - * - * XPSetKeyboardFocus controls which widget will receive keystrokes. Pass the - * Widget ID of the widget to get the keys. Note that if the widget does not - * care about keystrokes, they will go to the parent widget, and if no widget - * cares about them, they go to X-Plane. - * - * If you set the keyboard focus to Widget ID 0, X-Plane gets keyboard focus. - * - * This routine returns the widget ID that ended up with keyboard focus, or 0 - * for X-Plane. - * - * Keyboard focus is not changed if the new widget will not accept it. For - * setting to X-Plane, keyboard focus is always accepted. - * - * * - */ -WIDGET_API XPWidgetID XPSetKeyboardFocus( - XPWidgetID inWidget); - -/* - * XPLoseKeyboardFocus - * - * This causes the specified widget to lose focus; focus is passed to its - * parent, or the next parent that will accept it. This routine does nothing - * if this widget does not have focus. - * - */ -WIDGET_API void XPLoseKeyboardFocus( - XPWidgetID inWidget); - -/* - * XPGetWidgetWithFocus - * - * This routine returns the widget that has keyboard focus, or 0 if X-Plane - * has keyboard focus or some other plugin window that does not have widgets - * has focus. - * - */ -WIDGET_API XPWidgetID XPGetWidgetWithFocus(void); - -/*************************************************************************** - * CREATING CUSTOM WIDGETS - ***************************************************************************/ -/* - * - * - */ - -/* - * XPAddWidgetCallback - * - * This function adds a new widget callback to a widget. This widget callback - * supercedes any existing ones and will receive messages first; if it does - * not handle messages they will go on to be handled by pre-existing widgets. - * - * The widget function will remain on the widget for the life of the widget. - * The creation message will be sent to the new callback immediately with the - * widget ID, and the destruction message will be sent before the other widget - * function receives a destruction message. - * - * This provides a way to 'subclass' an existing widget. By providing a second - * hook that only handles certain widget messages, you can customize or extend - * widget behavior. - * - */ -WIDGET_API void XPAddWidgetCallback( - XPWidgetID inWidget, - XPWidgetFunc_t inNewCallback); - -/* - * XPGetWidgetClassFunc - * - * Given a widget class, this function returns the callbacks that power that - * widget class. - * - */ -WIDGET_API XPWidgetFunc_t XPGetWidgetClassFunc( - XPWidgetClass inWidgetClass); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/XPSDK301/CHeaders/Wrappers/XPCBroadcaster.cpp b/src/XPSDK301/CHeaders/Wrappers/XPCBroadcaster.cpp deleted file mode 100755 index 5fe6218f..00000000 --- a/src/XPSDK301/CHeaders/Wrappers/XPCBroadcaster.cpp +++ /dev/null @@ -1,56 +0,0 @@ -#include "XPCBroadcaster.h" -#include "XPCListener.h" - -XPCBroadcaster::XPCBroadcaster() : - mIterator(NULL) -{ -} - -XPCBroadcaster::~XPCBroadcaster() -{ - ListenerVector::iterator iter; - mIterator = &iter; - for (iter = mListeners.begin(); iter != mListeners.end(); ++iter) - { - (*iter)->BroadcasterRemoved(this); - } -} - -void XPCBroadcaster::AddListener( - XPCListener * inListener) -{ - mListeners.push_back(inListener); - inListener->BroadcasterAdded(this); -} - -void XPCBroadcaster::RemoveListener( - XPCListener * inListener) -{ - ListenerVector::iterator iter = std::find - (mListeners.begin(), mListeners.end(), inListener); - if (iter == mListeners.end()) - return; - - if (mIterator != NULL) - { - if (*mIterator >= iter) - (*mIterator)--; - } - - mListeners.erase(iter); - inListener->BroadcasterRemoved(this); -} - -void XPCBroadcaster::BroadcastMessage( - int inMessage, - void * inParam) -{ - ListenerVector::iterator iter; - mIterator = &iter; - for (iter = mListeners.begin(); iter != mListeners.end(); ++iter) - { - (*iter)->ListenToMessage(inMessage, inParam); - } - mIterator = NULL; -} - diff --git a/src/XPSDK301/CHeaders/Wrappers/XPCBroadcaster.h b/src/XPSDK301/CHeaders/Wrappers/XPCBroadcaster.h deleted file mode 100755 index 8f34a050..00000000 --- a/src/XPSDK301/CHeaders/Wrappers/XPCBroadcaster.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef _XPCBroadcaster_h_ -#define _XPCBroadcaster_h_ - -#include -#include - -class XPCListener; - -class XPCBroadcaster { -public: - - XPCBroadcaster(); - virtual ~XPCBroadcaster(); - - void AddListener( - XPCListener * inListener); - void RemoveListener( - XPCListener * inListener); - -protected: - - void BroadcastMessage( - int inMessage, - void * inParam=0); - -private: - - typedef std::vector ListenerVector; - - ListenerVector mListeners; - - // Reentrancy support - - ListenerVector::iterator * mIterator; - -}; - -#endif \ No newline at end of file diff --git a/src/XPSDK301/CHeaders/Wrappers/XPCDisplay.cpp b/src/XPSDK301/CHeaders/Wrappers/XPCDisplay.cpp deleted file mode 100755 index fc996ca8..00000000 --- a/src/XPSDK301/CHeaders/Wrappers/XPCDisplay.cpp +++ /dev/null @@ -1,104 +0,0 @@ -#include "XPCDisplay.h" - -XPCKeySniffer::XPCKeySniffer(int inBeforeWindows) : mBeforeWindows(inBeforeWindows) -{ - XPLMRegisterKeySniffer(KeySnifferCB, mBeforeWindows, reinterpret_cast(this)); -} - -XPCKeySniffer::~XPCKeySniffer() -{ - XPLMUnregisterKeySniffer(KeySnifferCB, mBeforeWindows, reinterpret_cast(this)); -} - - -int XPCKeySniffer::KeySnifferCB( - char inCharKey, - XPLMKeyFlags inFlags, - char inVirtualKey, - void * inRefCon) -{ - XPCKeySniffer * me = reinterpret_cast(inRefCon); - return me->HandleKeyStroke(inCharKey, inFlags, inVirtualKey); -} - -XPCWindow::XPCWindow( - int inLeft, - int inTop, - int inRight, - int inBottom, - int inIsVisible) -{ - mWindow = XPLMCreateWindow(inLeft, inTop, inRight, inBottom, inIsVisible, - DrawCB, HandleKeyCB, MouseClickCB, - reinterpret_cast(this)); -} - -XPCWindow::~XPCWindow() -{ - XPLMDestroyWindow(mWindow); -} - -void XPCWindow::GetWindowGeometry( - int * outLeft, - int * outTop, - int * outRight, - int * outBottom) -{ - XPLMGetWindowGeometry(mWindow, outLeft, outTop, outRight, outBottom); -} - -void XPCWindow::SetWindowGeometry( - int inLeft, - int inTop, - int inRight, - int inBottom) -{ - XPLMSetWindowGeometry(mWindow, inLeft, inTop, inRight, inBottom); -} - -int XPCWindow::GetWindowIsVisible(void) -{ - return XPLMGetWindowIsVisible(mWindow); -} - -void XPCWindow::SetWindowIsVisible( - int inIsVisible) -{ - XPLMSetWindowIsVisible(mWindow, inIsVisible); -} - -void XPCWindow::TakeKeyboardFocus(void) -{ - XPLMTakeKeyboardFocus(mWindow); -} - -void XPCWindow::BringWindowToFront(void) -{ - XPLMBringWindowToFront(mWindow); -} - -int XPCWindow::IsWindowInFront(void) -{ - return XPLMIsWindowInFront(mWindow); -} - -void XPCWindow::DrawCB(XPLMWindowID inWindowID, void * inRefcon) -{ - XPCWindow * me = reinterpret_cast(inRefcon); - me->DoDraw(); -} - -void XPCWindow::HandleKeyCB(XPLMWindowID inWindowID, char inKey, XPLMKeyFlags inFlags, char inVirtualKey, void * inRefcon, int losingFocus) -{ - XPCWindow * me = reinterpret_cast(inRefcon); - if (losingFocus) - me->LoseFocus(); - else - me->HandleKey(inKey, inFlags, inVirtualKey); -} - -int XPCWindow::MouseClickCB(XPLMWindowID inWindowID, int x, int y, XPLMMouseStatus inMouse, void * inRefcon) -{ - XPCWindow * me = reinterpret_cast(inRefcon); - return me->HandleClick(x, y, inMouse); -} diff --git a/src/XPSDK301/CHeaders/Wrappers/XPCDisplay.h b/src/XPSDK301/CHeaders/Wrappers/XPCDisplay.h deleted file mode 100755 index 24659283..00000000 --- a/src/XPSDK301/CHeaders/Wrappers/XPCDisplay.h +++ /dev/null @@ -1,73 +0,0 @@ -#ifndef _XPCDisplay_h_ -#define _XPCDisplay_h_ - -#include "XPLMDisplay.h" - -class XPCKeySniffer { -public: - - XPCKeySniffer(int inBeforeWindows); - virtual ~XPCKeySniffer(); - - virtual int HandleKeyStroke( - char inCharKey, - XPLMKeyFlags inFlags, - char inVirtualKey)=0; - -private: - - int mBeforeWindows; - - static int KeySnifferCB( - char inCharKey, - XPLMKeyFlags inFlags, - char inVirtualKey, - void * inRefCon); -}; - - - -class XPCWindow { -public: - - XPCWindow( - int inLeft, - int inTop, - int inRight, - int inBottom, - int inIsVisible); - virtual ~XPCWindow(); - - virtual void DoDraw(void)=0; - virtual void HandleKey(char inKey, XPLMKeyFlags inFlags, char inVirtualKey)=0; - virtual void LoseFocus(void)=0; - virtual int HandleClick(int x, int y, XPLMMouseStatus inMouse)=0; - - void GetWindowGeometry( - int * outLeft, - int * outTop, - int * outRight, - int * outBottom); - void SetWindowGeometry( - int inLeft, - int inTop, - int inRight, - int inBottom); - int GetWindowIsVisible(void); - void SetWindowIsVisible( - int inIsVisible); - void TakeKeyboardFocus(void); - void BringWindowToFront(void); - int IsWindowInFront(void); - -private: - - XPLMWindowID mWindow; - - static void DrawCB(XPLMWindowID inWindowID, void * inRefcon); - static void HandleKeyCB(XPLMWindowID inWindowID, char inKey, XPLMKeyFlags inFlags, char inVirtualKey, void * inRefcon, int losingFocus); - static int MouseClickCB(XPLMWindowID inWindowID, int x, int y, XPLMMouseStatus inMouse, void * inRefcon); - -}; - -#endif \ No newline at end of file diff --git a/src/XPSDK301/CHeaders/Wrappers/XPCListener.cpp b/src/XPSDK301/CHeaders/Wrappers/XPCListener.cpp deleted file mode 100755 index b4c77aaf..00000000 --- a/src/XPSDK301/CHeaders/Wrappers/XPCListener.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include "XPCListener.h" -#include "XPCBroadcaster.h" - -XPCListener::XPCListener() -{ -} - -XPCListener::~XPCListener() -{ - while (!mBroadcasters.empty()) - mBroadcasters.front()->RemoveListener(this); -} - -void XPCListener::BroadcasterAdded( - XPCBroadcaster * inBroadcaster) -{ - mBroadcasters.push_back(inBroadcaster); -} - -void XPCListener::BroadcasterRemoved( - XPCBroadcaster * inBroadcaster) -{ - BroadcastVector::iterator iter = std::find(mBroadcasters.begin(), - mBroadcasters.end(), inBroadcaster); - if (iter != mBroadcasters.end()) - mBroadcasters.erase(iter); -} diff --git a/src/XPSDK301/CHeaders/Wrappers/XPCListener.h b/src/XPSDK301/CHeaders/Wrappers/XPCListener.h deleted file mode 100755 index dbdd2a09..00000000 --- a/src/XPSDK301/CHeaders/Wrappers/XPCListener.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef _XPCListener_h_ -#define _XPCListener_h_ - -#include -#include - -class XPCBroadcaster; - - -class XPCListener { -public: - - XPCListener(); - virtual ~XPCListener(); - - virtual void ListenToMessage( - int inMessage, - void * inParam)=0; - -private: - - typedef std::vector BroadcastVector; - - BroadcastVector mBroadcasters; - - friend class XPCBroadcaster; - - void BroadcasterAdded( - XPCBroadcaster * inBroadcaster); - - void BroadcasterRemoved( - XPCBroadcaster * inBroadcaster); - -}; - -#endif \ No newline at end of file diff --git a/src/XPSDK301/CHeaders/Wrappers/XPCProcessing.cpp b/src/XPSDK301/CHeaders/Wrappers/XPCProcessing.cpp deleted file mode 100755 index 352c05f2..00000000 --- a/src/XPSDK301/CHeaders/Wrappers/XPCProcessing.cpp +++ /dev/null @@ -1,52 +0,0 @@ -#include "XPCProcessing.h" -#include "XPLMUtilities.h" - -XPCProcess::XPCProcess() : - mInCallback(false), - mCallbackTime(0) -{ - XPLMRegisterFlightLoopCallback(FlightLoopCB, 0, reinterpret_cast(this)); -} - -XPCProcess::~XPCProcess() -{ - XPLMUnregisterFlightLoopCallback(FlightLoopCB, reinterpret_cast(this)); -} - -void XPCProcess::StartProcessTime(float inSeconds) -{ - mCallbackTime = inSeconds; - if (!mInCallback) - XPLMSetFlightLoopCallbackInterval( - FlightLoopCB, mCallbackTime, 1/*relative to now*/, reinterpret_cast(this)); -} - -void XPCProcess::StartProcessCycles(int inCycles) -{ - mCallbackTime = -inCycles; - if (!mInCallback) - XPLMSetFlightLoopCallbackInterval( - FlightLoopCB, mCallbackTime, 1/*relative to now*/, reinterpret_cast(this)); -} - -void XPCProcess::StopProcess(void) -{ - mCallbackTime = 0; - if (!mInCallback) - XPLMSetFlightLoopCallbackInterval( - FlightLoopCB, mCallbackTime, 1/*relative to now*/, reinterpret_cast(this)); -} - - -float XPCProcess::FlightLoopCB( - float inElapsedSinceLastCall, - float inElapsedTimeSinceLastFlightLoop, - int inCounter, - void * inRefcon) -{ - XPCProcess * me = reinterpret_cast(inRefcon); - me->mInCallback = true; - me->DoProcessing(inElapsedSinceLastCall, inElapsedTimeSinceLastFlightLoop, inCounter); - me->mInCallback = false; - return me->mCallbackTime; -} \ No newline at end of file diff --git a/src/XPSDK301/CHeaders/Wrappers/XPCProcessing.h b/src/XPSDK301/CHeaders/Wrappers/XPCProcessing.h deleted file mode 100755 index cd735e51..00000000 --- a/src/XPSDK301/CHeaders/Wrappers/XPCProcessing.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef _XPCProcessing_h_ -#define _XPCProcessing_h_ - -#include "XPLMProcessing.h" - -class XPCProcess { -public: - - XPCProcess(); - virtual ~XPCProcess(); - - void StartProcessTime(float inSeconds); - void StartProcessCycles(int inCycles); - void StopProcess(void); - - virtual void DoProcessing( - float inElapsedSinceLastCall, - float inElapsedTimeSinceLastFlightLoop, - int inCounter)=0; - -private: - - static float FlightLoopCB( - float inElapsedSinceLastCall, - float inElapsedTimeSinceLastFlightLoop, - int inCounter, - void * inRefcon); - - bool mInCallback; - float mCallbackTime; - - XPCProcess(const XPCProcess&); - XPCProcess& operator=(const XPCProcess&); - -}; - -#endif diff --git a/src/XPSDK301/CHeaders/Wrappers/XPCWidget.cpp b/src/XPSDK301/CHeaders/Wrappers/XPCWidget.cpp deleted file mode 100755 index 8ef8aa38..00000000 --- a/src/XPSDK301/CHeaders/Wrappers/XPCWidget.cpp +++ /dev/null @@ -1,123 +0,0 @@ -#include "XPCWidget.h" - -XPCWidget::XPCWidget( - int inLeft, - int inTop, - int inRight, - int inBottom, - bool inVisible, - const char * inDescriptor, - bool inIsRoot, - XPWidgetID inParent, - XPWidgetClass inClass) : - mWidget(NULL), - mOwnsChildren(false), - mOwnsWidget(true) -{ - mWidget = XPCreateWidget( - inLeft, inTop, inRight, inBottom, - inVisible ? 1 : 0, - inDescriptor, - inIsRoot ? 1 : 0, - inIsRoot ? NULL : inParent, - inClass); - - XPSetWidgetProperty(mWidget, xpProperty_Object, reinterpret_cast(this)); - XPAddWidgetCallback(mWidget, WidgetCallback); -} - -XPCWidget::XPCWidget( - XPWidgetID inWidget, - bool inOwnsWidget) : - mWidget(inWidget), - mOwnsChildren(false), - mOwnsWidget(inOwnsWidget) -{ - XPSetWidgetProperty(mWidget, xpProperty_Object, reinterpret_cast(this)); - XPAddWidgetCallback(mWidget, WidgetCallback); -} - -XPCWidget::~XPCWidget() -{ - if (mOwnsWidget) - XPDestroyWidget(mWidget, mOwnsChildren ? 1 : 0); -} - -void XPCWidget::SetOwnsWidget( - bool inOwnsWidget) -{ - mOwnsWidget = inOwnsWidget; -} - -void XPCWidget::SetOwnsChildren( - bool inOwnsChildren) -{ - mOwnsChildren = inOwnsChildren; -} - -XPCWidget::operator XPWidgetID () const -{ - return mWidget; -} - -XPWidgetID XPCWidget::Get(void) const -{ - return mWidget; -} - -void XPCWidget::AddAttachment( - XPCWidgetAttachment * inAttachment, - bool inOwnsAttachment, - bool inPrefilter) -{ - if (inPrefilter) - { - mAttachments.insert(mAttachments.begin(), AttachmentInfo(inAttachment, inOwnsAttachment)); - } else { - mAttachments.push_back(AttachmentInfo(inAttachment, inOwnsAttachment)); - } -} - -void XPCWidget::RemoveAttachment( - XPCWidgetAttachment * inAttachment) -{ - for (AttachmentVector::iterator iter = mAttachments.begin(); - iter != mAttachments.end(); ++iter) - { - if (iter->first == inAttachment) - { - mAttachments.erase(iter); - return; - } - } -} - -int XPCWidget::HandleWidgetMessage( - XPWidgetMessage inMessage, - XPWidgetID inWidget, - intptr_t inParam1, - intptr_t inParam2) -{ - return 0; -} - -int XPCWidget::WidgetCallback( - XPWidgetMessage inMessage, - XPWidgetID inWidget, - intptr_t inParam1, - intptr_t inParam2) -{ - XPCWidget * me = reinterpret_cast(XPGetWidgetProperty(inWidget, xpProperty_Object, NULL)); - if (me == NULL) - return 0; - - for (AttachmentVector::iterator iter = me->mAttachments.begin(); iter != - me->mAttachments.end(); ++iter) - { - int result = iter->first->HandleWidgetMessage(me, inMessage, inWidget, inParam1, inParam2); - if (result != 0) - return result; - } - - return me->HandleWidgetMessage(inMessage, inWidget, inParam1, inParam2); -} diff --git a/src/XPSDK301/CHeaders/Wrappers/XPCWidget.h b/src/XPSDK301/CHeaders/Wrappers/XPCWidget.h deleted file mode 100755 index 788b56ac..00000000 --- a/src/XPSDK301/CHeaders/Wrappers/XPCWidget.h +++ /dev/null @@ -1,84 +0,0 @@ -#ifndef _XPCWidget_h_ -#define _XPCWidget_h_ - -#include -#include -#include "XPWidgets.h" - -class XPCWidget; - -class XPCWidgetAttachment { -public: - - virtual int HandleWidgetMessage( - XPCWidget * inObject, - XPWidgetMessage inMessage, - XPWidgetID inWidget, - intptr_t inParam1, - intptr_t inParam2)=0; - -}; - -class XPCWidget { -public: - - XPCWidget( - int inLeft, - int inTop, - int inRight, - int inBottom, - bool inVisible, - const char * inDescriptor, - bool inIsRoot, - XPWidgetID inParent, - XPWidgetClass inClass); - XPCWidget( - XPWidgetID inWidget, - bool inOwnsWidget); - virtual ~XPCWidget(); - - void SetOwnsWidget( - bool inOwnsWidget); - void SetOwnsChildren( - bool inOwnsChildren); - - operator XPWidgetID () const; - - XPWidgetID Get(void) const; - - void AddAttachment( - XPCWidgetAttachment * inAttachment, - bool inOwnsAttachment, - bool inPrefilter); - void RemoveAttachment( - XPCWidgetAttachment * inAttachment); - - virtual int HandleWidgetMessage( - XPWidgetMessage inMessage, - XPWidgetID inWidget, - intptr_t inParam1, - intptr_t inParam2); - -private: - - static int WidgetCallback( - XPWidgetMessage inMessage, - XPWidgetID inWidget, - intptr_t inParam1, - intptr_t inParam2); - - typedef std::pair AttachmentInfo; - typedef std::vector AttachmentVector; - - AttachmentVector mAttachments; - XPWidgetID mWidget; - bool mOwnsChildren; - bool mOwnsWidget; - - XPCWidget(); - XPCWidget(const XPCWidget&); - XPCWidget& operator=(const XPCWidget&); - -}; - -#endif \ No newline at end of file diff --git a/src/XPSDK301/CHeaders/Wrappers/XPCWidgetAttachments.cpp b/src/XPSDK301/CHeaders/Wrappers/XPCWidgetAttachments.cpp deleted file mode 100755 index d87f105c..00000000 --- a/src/XPSDK301/CHeaders/Wrappers/XPCWidgetAttachments.cpp +++ /dev/null @@ -1,267 +0,0 @@ -#include "XPCWidgetAttachments.h" -#include "XPStandardWidgets.h" -#include "XPWidgetUtils.h" - -static void XPCGetOrderedSubWidgets( - XPWidgetID inWidget, - std::vector& outChildren); - -XPCKeyFilterAttachment::XPCKeyFilterAttachment( - const char * inValidKeys, - const char * outValidKeys) : - mInput(inValidKeys), - mOutput(outValidKeys) -{ -} - -XPCKeyFilterAttachment::~XPCKeyFilterAttachment() -{ -} - -int XPCKeyFilterAttachment::HandleWidgetMessage( - XPCWidget * inObject, - XPWidgetMessage inMessage, - XPWidgetID inWidget, - intptr_t inParam1, - intptr_t inParam2) -{ - if (inMessage == xpMsg_KeyPress) - { - char& theKey = KEY_CHAR(inParam1); - std::string::size_type pos = mInput.find(theKey); - if (pos == std::string::npos) - return 1; // Not found; eat the key! - else { - theKey = mOutput[pos]; - return 0; - } // Let it live. - } - return 0; -} - - -XPCKeyMessageAttachment::XPCKeyMessageAttachment( - char inKey, - int inMessage, - void * inParam, - bool inConsume, - bool inVkey, - XPCListener * inListener) : - mKey(inKey), mMsg(inMessage), mParam(inParam), mConsume(inConsume), - mVkey(inVkey) -{ - if (inListener != NULL) - this->AddListener(inListener); -} - -XPCKeyMessageAttachment::~XPCKeyMessageAttachment() -{ -} - -int XPCKeyMessageAttachment::HandleWidgetMessage( - XPCWidget * inObject, - XPWidgetMessage inMessage, - XPWidgetID inWidget, - intptr_t inParam1, - intptr_t inParam2) -{ - if (inMessage == xpMsg_KeyPress) - { - char theKey = mVkey ? KEY_VKEY(inParam1) : KEY_CHAR(inParam1); - if (theKey != mKey) - return 0; - if (!(KEY_FLAGS(inParam1) & xplm_DownFlag)) - return 0; - - BroadcastMessage(mMsg, mParam); - return mConsume ? 1 : 0; - } - return 0; -} - -XPCPushButtonMessageAttachment::XPCPushButtonMessageAttachment( - XPWidgetID inWidget, - int inMessage, - void * inParam, - XPCListener * inListener) : - mMsg(inMessage), mParam(inParam), mWidget(inWidget) -{ - if (inListener != NULL) - this->AddListener(inListener); -} - -XPCPushButtonMessageAttachment::~XPCPushButtonMessageAttachment() -{ -} - -int XPCPushButtonMessageAttachment::HandleWidgetMessage( - XPCWidget * inObject, - XPWidgetMessage inMessage, - XPWidgetID inWidget, - intptr_t inParam1, - intptr_t inParam2) -{ - if ((inMessage == xpMsg_PushButtonPressed) && ((XPWidgetID) inParam1 == mWidget)) - { - BroadcastMessage(mMsg, mParam); - return 1; - } - - if ((inMessage == xpMsg_ButtonStateChanged) && ((XPWidgetID) inParam1 == mWidget)) - { - BroadcastMessage(mMsg, mParam); - return 1; - } - return 0; -} - -XPCSliderMessageAttachment::XPCSliderMessageAttachment( - XPWidgetID inWidget, - int inMessage, - void * inParam, - XPCListener * inListener) : - mMsg(inMessage), mParam(inParam), mWidget(inWidget) -{ - if (inListener != NULL) - this->AddListener(inListener); -} - -XPCSliderMessageAttachment::~XPCSliderMessageAttachment() -{ -} - -int XPCSliderMessageAttachment::HandleWidgetMessage( - XPCWidget * inObject, - XPWidgetMessage inMessage, - XPWidgetID inWidget, - intptr_t inParam1, - intptr_t inParam2) -{ - if ((inMessage == xpMsg_ScrollBarSliderPositionChanged) && ((XPWidgetID) inParam1 == mWidget)) - { - BroadcastMessage(mMsg, mParam); - return 1; - } - - return 0; -} - - -XPCCloseButtonMessageAttachment::XPCCloseButtonMessageAttachment( - XPWidgetID inWidget, - int inMessage, - void * inParam, - XPCListener * inListener) : - mMsg(inMessage), mParam(inParam), mWidget(inWidget) -{ - if (inListener != NULL) - this->AddListener(inListener); -} - -XPCCloseButtonMessageAttachment::~XPCCloseButtonMessageAttachment() -{ -} - -int XPCCloseButtonMessageAttachment::HandleWidgetMessage( - XPCWidget * inObject, - XPWidgetMessage inMessage, - XPWidgetID inWidget, - intptr_t inParam1, - intptr_t inParam2) -{ - if ((inMessage == xpMessage_CloseButtonPushed) && ((XPWidgetID) inParam1 == mWidget)) - { - BroadcastMessage(mMsg, mParam); - return 1; - } - - return 0; -} - -XPCTabGroupAttachment::XPCTabGroupAttachment() -{ -} - -XPCTabGroupAttachment::~XPCTabGroupAttachment() -{ -} - -int XPCTabGroupAttachment::HandleWidgetMessage( - XPCWidget * inObject, - XPWidgetMessage inMessage, - XPWidgetID inWidget, - intptr_t inParam1, - intptr_t inParam2) -{ - if ((inMessage == xpMsg_KeyPress) && (KEY_CHAR(inParam1) == XPLM_KEY_TAB) && - ((KEY_FLAGS(inParam1) & xplm_UpFlag) == 0)) - { - bool backwards = (KEY_FLAGS(inParam1) & xplm_ShiftFlag) != 0; - std::vector widgets; - XPCGetOrderedSubWidgets(inWidget, widgets); - int n, index = 0; - XPWidgetID focusWidget = XPGetWidgetWithFocus(); - std::vector::iterator iter = std::find(widgets.begin(), widgets.end(), focusWidget); - if (iter != widgets.end()) - { - index = std::distance(widgets.begin(), iter); - if (backwards) - index--; - else - index++; - if (index < 0) - index = widgets.size() - 1; - if (index >= widgets.size()) - index = 0; - } - - if (backwards) - { - for (n = index; n >= 0; --n) - { - if (XPGetWidgetProperty(widgets[n], xpProperty_Enabled, NULL)) - if (XPSetKeyboardFocus(widgets[n]) != NULL) - return 1; - } - for (n = widgets.size() - 1; n > index; --n) - { - if (XPGetWidgetProperty(widgets[n], xpProperty_Enabled, NULL)) - if (XPSetKeyboardFocus(widgets[n]) != NULL) - return 1; - } - } else { - for (n = index; n < widgets.size(); ++n) - { - if (XPGetWidgetProperty(widgets[n], xpProperty_Enabled, NULL)) - if (XPSetKeyboardFocus(widgets[n]) != NULL) - return 1; - } - for (n = 0; n < index; ++n) - { - if (XPGetWidgetProperty(widgets[n], xpProperty_Enabled, NULL)) - if (XPSetKeyboardFocus(widgets[n]) != NULL) - return 1; - } - } - } - return 0; -} - - - -static void XPCGetOrderedSubWidgets( - XPWidgetID inWidget, - std::vector& outChildren) -{ - outChildren.clear(); - int count = XPCountChildWidgets(inWidget); - for (int n = 0; n < count; ++n) - { - XPWidgetID child = XPGetNthChildWidget(inWidget, n); - outChildren.push_back(child); - std::vector grandChildren; - XPCGetOrderedSubWidgets(child, grandChildren); - - outChildren.insert(outChildren.end(), grandChildren.begin(), grandChildren.end()); - } -} diff --git a/src/XPSDK301/CHeaders/Wrappers/XPCWidgetAttachments.h b/src/XPSDK301/CHeaders/Wrappers/XPCWidgetAttachments.h deleted file mode 100755 index 91fb5875..00000000 --- a/src/XPSDK301/CHeaders/Wrappers/XPCWidgetAttachments.h +++ /dev/null @@ -1,146 +0,0 @@ -#ifndef _XPCWidgetAttachments_h_ -#define _XPCWidgetAttachments_h_ - -#include - -#include "XPCWidget.h" -#include "XPCBroadcaster.h" - -class XPCKeyFilterAttachment : public XPCWidgetAttachment { -public: - - XPCKeyFilterAttachment( - const char * inValidKeys, - const char * outValidKeys); - virtual ~XPCKeyFilterAttachment(); - - virtual int HandleWidgetMessage( - XPCWidget * inObject, - XPWidgetMessage inMessage, - XPWidgetID inWidget, - intptr_t inParam1, - intptr_t inParam2); - -private: - - std::string mInput; - std::string mOutput; - -}; - - -class XPCKeyMessageAttachment : public XPCWidgetAttachment, public XPCBroadcaster { -public: - - XPCKeyMessageAttachment( - char inKey, - int inMessage, - void * inParam, - bool inConsume, - bool inVkey, - XPCListener * inListener); - virtual ~XPCKeyMessageAttachment(); - - virtual int HandleWidgetMessage( - XPCWidget * inObject, - XPWidgetMessage inMessage, - XPWidgetID inWidget, - intptr_t inParam1, - intptr_t inParam2); - -private: - - char mKey; - bool mVkey; - int mMsg; - void * mParam; - bool mConsume; - -}; - -class XPCPushButtonMessageAttachment : public XPCWidgetAttachment, XPCBroadcaster { -public: - - XPCPushButtonMessageAttachment( - XPWidgetID inWidget, - int inMessage, - void * inParam, - XPCListener * inListener); - virtual ~XPCPushButtonMessageAttachment(); - - virtual int HandleWidgetMessage( - XPCWidget * inObject, - XPWidgetMessage inMessage, - XPWidgetID inWidget, - intptr_t inParam1, - intptr_t inParam2); - -private: - XPWidgetID mWidget; - int mMsg; - void * mParam; -}; - -class XPCSliderMessageAttachment : public XPCWidgetAttachment, XPCBroadcaster { -public: - - XPCSliderMessageAttachment( - XPWidgetID inWidget, - int inMessage, - void * inParam, - XPCListener * inListener); - virtual ~XPCSliderMessageAttachment(); - - virtual int HandleWidgetMessage( - XPCWidget * inObject, - XPWidgetMessage inMessage, - XPWidgetID inWidget, - intptr_t inParam1, - intptr_t inParam2); - -private: - XPWidgetID mWidget; - int mMsg; - void * mParam; -}; - - -class XPCCloseButtonMessageAttachment : public XPCWidgetAttachment, XPCBroadcaster { -public: - - XPCCloseButtonMessageAttachment( - XPWidgetID inWidget, - int inMessage, - void * inParam, - XPCListener * inListener); - virtual ~XPCCloseButtonMessageAttachment(); - - virtual int HandleWidgetMessage( - XPCWidget * inObject, - XPWidgetMessage inMessage, - XPWidgetID inWidget, - intptr_t inParam1, - intptr_t inParam2); - -private: - XPWidgetID mWidget; - int mMsg; - void * mParam; -}; - -class XPCTabGroupAttachment : public XPCWidgetAttachment { -public: - - XPCTabGroupAttachment(); - virtual ~XPCTabGroupAttachment(); - - virtual int HandleWidgetMessage( - XPCWidget * inObject, - XPWidgetMessage inMessage, - XPWidgetID inWidget, - intptr_t inParam1, - intptr_t inParam2); - -}; - -#endif \ No newline at end of file diff --git a/src/XPSDK301/CHeaders/XPLM/XPLMCamera.h b/src/XPSDK301/CHeaders/XPLM/XPLMCamera.h deleted file mode 100755 index e12a8dfb..00000000 --- a/src/XPSDK301/CHeaders/XPLM/XPLMCamera.h +++ /dev/null @@ -1,167 +0,0 @@ -#ifndef _XPLMCamera_h_ -#define _XPLMCamera_h_ - -/* - * Copyright 2005-2012 Sandy Barbour and Ben Supnik - * - * All rights reserved. See license.txt for usage. - * - * X-Plane SDK Version: 2.1.1 - * - */ - -/* - * XPLMCamera - THEORY OF OPERATION The XPLMCamera APIs allow plug-ins to - * control the camera angle in X-Plane. This has a number of applications, - * including but not limited to: - * - * - Creating new views (including dynamic/user-controllable views) for the - * user. - * - * - Creating applications that use X-Plane as a renderer of scenery, - * aircrafts, or both. - * - * The camera is controlled via six parameters: a location in OpenGL - * coordinates and pitch, roll and yaw, similar to an airplane's position. - * OpenGL coordinate info is described in detail in the XPLMGraphics - * documentation; generally you should use the XPLMGraphics routines to - * convert from world to local coordinates. The camera's orientation starts - * facing level with the ground directly up the negative-Z axis (approximately - * north) with the horizon horizontal. It is then rotated clockwise for yaw, - * pitched up for positive pitch, and rolled clockwise around the vector it is - * looking along for roll. - * - * You control the camera either either until the user selects a new view or - * permanently (the later being similar to how UDP camera control works). You - * control the camera by registering a callback per frame from which you - * calculate the new camera positions. This guarantees smooth camera motion. - * - * Use the XPLMDataAccess APIs to get information like the position of the - * aircraft, etc. for complex camera positioning. - * - */ - -#include "XPLMDefs.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/*************************************************************************** - * CAMERA CONTROL - ***************************************************************************/ -/* - * - * - */ - -/* - * XPLMCameraControlDuration - * - * This enumeration states how long you want to retain control of the camera. - * You can retain it indefinitely or until the user selects a new view. - * - */ -enum { - /* Control the camera until the user picks a new view. */ - xplm_ControlCameraUntilViewChanges = 1 - - /* Control the camera until your plugin is disabled or another plugin forcably * - * takes control. */ - ,xplm_ControlCameraForever = 2 - - -}; -typedef int XPLMCameraControlDuration; - -/* - * XPLMCameraPosition_t - * - * This structure contains a full specification of the camera. X, Y, and Z are - * the camera's position in OpenGL coordiantes; pitch, roll, and yaw are - * rotations from a camera facing flat north in degrees. Positive pitch means - * nose up, positive roll means roll right, and positive yaw means yaw right, - * all in degrees. Zoom is a zoom factor, with 1.0 meaning normal zoom and 2.0 - * magnifying by 2x (objects appear larger). - * - */ -typedef struct { - float x; - float y; - float z; - float pitch; - float heading; - float roll; - float zoom; -} XPLMCameraPosition_t; - -/* - * XPLMCameraControl_f - * - * You use an XPLMCameraControl function to provide continuous control over - * the camera. You are passed in a structure in which to put the new camera - * position; modify it and return 1 to reposition the camera. Return 0 to - * surrender control of the camera; camera control will be handled by X-Plane - * on this draw loop. The contents of the structure as you are called are - * undefined. - * - * If X-Plane is taking camera control away from you, this function will be - * called with inIsLosingControl set to 1 and ioCameraPosition NULL. - * - */ -typedef int (* XPLMCameraControl_f)( - XPLMCameraPosition_t * outCameraPosition, /* Can be NULL */ - int inIsLosingControl, - void * inRefcon); - -/* - * XPLMControlCamera - * - * This function repositions the camera on the next drawing cycle. You must - * pass a non-null control function. Specify in inHowLong how long you'd like - * control (indefinitely or until a key is pressed). - * - */ -XPLM_API void XPLMControlCamera( - XPLMCameraControlDuration inHowLong, - XPLMCameraControl_f inControlFunc, - void * inRefcon); - -/* - * XPLMDontControlCamera - * - * This function stops you from controlling the camera. If you have a camera - * control function, it will not be called with an inIsLosingControl flag. - * X-Plane will control the camera on the next cycle. - * - * For maximum compatibility you should not use this routine unless you are in - * posession of the camera. - * - */ -XPLM_API void XPLMDontControlCamera(void); - -/* - * XPLMIsCameraBeingControlled - * - * This routine returns 1 if the camera is being controlled, zero if it is - * not. If it is and you pass in a pointer to a camera control duration, the - * current control duration will be returned. - * - */ -XPLM_API int XPLMIsCameraBeingControlled( - XPLMCameraControlDuration * outCameraControlDuration); /* Can be NULL */ - -/* - * XPLMReadCameraPosition - * - * This function reads the current camera position. - * - */ -XPLM_API void XPLMReadCameraPosition( - XPLMCameraPosition_t * outCameraPosition); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/XPSDK301/CHeaders/XPLM/XPLMDataAccess.h b/src/XPSDK301/CHeaders/XPLM/XPLMDataAccess.h deleted file mode 100755 index 6ea77c50..00000000 --- a/src/XPSDK301/CHeaders/XPLM/XPLMDataAccess.h +++ /dev/null @@ -1,703 +0,0 @@ -#ifndef _XPLMDataAccess_h_ -#define _XPLMDataAccess_h_ - -/* - * Copyright 2005-2012 Sandy Barbour and Ben Supnik - * - * All rights reserved. See license.txt for usage. - * - * X-Plane SDK Version: 2.1.1 - * - */ - -/* - * XPLM Data Access API - Theory of Operation - * - * The data access API gives you a generic, flexible, high performance way to - * read and write data to and from X-Plane and other plug-ins. For example, - * this API allows you to read and set the nav radios, get the plane location, - * determine the current effective graphics frame rate, etc. - * - * The data access APIs are the way that you read and write data from the sim - * as well as other plugins. - * - * The API works using opaque data references. A data reference is a source of - * data; you do not know where it comes from, but once you have it you can - * read the data quickly and possibly write it. To get a data reference, you - * look it up. - * - * Data references are identified by verbose string names - * (sim/cockpit/radios/nav1_freq_hz). The actual numeric value of the data - * reference is implementation defined and is likely to change each time the - * simulator is run (or the plugin that provides the datareference is - * reloaded). - * - * The task of looking up a data reference is relatively expensive; look up - * your data references once based on verbose strings, and save the opaque - * data reference value for the duration of your plugin's operation. Reading - * and writing data references is relatively fast (the cost is equivalent to - * two function calls through function pointers). - * - * This allows data access to be high performance, while leaving in - * abstraction; since data references are opaque and are searched for, the - * underlying data access system can be rebuilt. - * - * A note on typing: you must know the correct data type to read and write. - * APIs are provided for reading and writing data in a number of ways. You can - * also double check the data type for a data ref. Note that automatic - * conversion is not done for you. - * - * A note for plugins sharing data with other plugins: the load order of - * plugins is not guaranteed. To make sure that every plugin publishing data - * has published their data references before other plugins try to subscribe, - * publish your data references in your start routine but resolve them the - * first time your 'enable' routine is called, or the first time they are - * needed in code. - * - * X-Plane publishes well over 1000 datarefs; a complete list may be found in - * the reference section of the SDK online documentation (from the SDK home - * page, choose Documentation). - * - */ - -#include "XPLMDefs.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/*************************************************************************** - * READING AND WRITING DATA - ***************************************************************************/ -/* - * These routines allow you to access a wide variety of data from within - * X-Plane and modify some of it. - * - */ - - -/* - * XPLMDataRef - * - * A data ref is an opaque handle to data provided by the simulator or another - * plugin. It uniquely identifies one variable (or array of variables) over - * the lifetime of your plugin. You never hard code these values; you always - * get them from XPLMFindDataRef. - * - */ -typedef void * XPLMDataRef; - -/* - * XPLMDataTypeID - * - * This is an enumeration that defines the type of the data behind a data - * reference. This allows you to sanity check that the data type matches what - * you expect. But for the most part, you will know the type of data you are - * expecting from the online documentation. - * - * Data types each take a bit field, so sets of data types may be formed. - * - */ -enum { - /* Data of a type the current XPLM doesn't do. */ - xplmType_Unknown = 0 - - /* A single 4-byte integer, native endian. */ - ,xplmType_Int = 1 - - /* A single 4-byte float, native endian. */ - ,xplmType_Float = 2 - - /* A single 8-byte double, native endian. */ - ,xplmType_Double = 4 - - /* An array of 4-byte floats, native endian. */ - ,xplmType_FloatArray = 8 - - /* An array of 4-byte integers, native endian. */ - ,xplmType_IntArray = 16 - - /* A variable block of data. */ - ,xplmType_Data = 32 - - -}; -typedef int XPLMDataTypeID; - -/* - * XPLMFindDataRef - * - * Given a c-style string that names the data ref, this routine looks up the - * actual opaque XPLMDataRef that you use to read and write the data. The - * string names for datarefs are published on the X-Plane SDK web site. - * - * This function returns NULL if the data ref cannot be found. - * - * NOTE: this function is relatively expensive; save the XPLMDataRef this - * function returns for future use. Do not look up your data ref by string - * every time you need to read or write it. - * - */ -XPLM_API XPLMDataRef XPLMFindDataRef( - const char * inDataRefName); - -/* - * XPLMCanWriteDataRef - * - * Given a data ref, this routine returns true if you can successfully set the - * data, false otherwise. Some datarefs are read-only. - * - */ -XPLM_API int XPLMCanWriteDataRef( - XPLMDataRef inDataRef); - -/* - * XPLMIsDataRefGood - * - * WARNING: This function is deprecated and should not be used. Datarefs are - * valid until plugins are reloaded or the sim quits. Plugins sharing datarefs - * should support these semantics by not unregistering datarefs during - * operation. (You should however unregister datarefs when your plugin is - * unloaded, as part of general resource cleanup.) - * - * This function returns whether a data ref is still valid. If it returns - * false, you should refind the data ref from its original string. Calling an - * accessor function on a bad data ref will return a default value, typically - * 0 or 0-length data. - * - */ -XPLM_API int XPLMIsDataRefGood( - XPLMDataRef inDataRef); - -/* - * XPLMGetDataRefTypes - * - * This routine returns the types of the data ref for accessor use. If a data - * ref is available in multiple data types, they will all be returned. - * - */ -XPLM_API XPLMDataTypeID XPLMGetDataRefTypes( - XPLMDataRef inDataRef); - -/*************************************************************************** - * DATA ACCESSORS - ***************************************************************************/ -/* - * These routines read and write the data references. For each supported data - * type there is a reader and a writer. - * - * If the data ref is invalid or the plugin that provides it is disabled or - * there is a type mismatch, the functions that read data will return 0 as a - * default value or not modify the passed in memory. The plugins that write - * data will not write under these circumstances or if the data ref is - * read-only. NOTE: to keep the overhead of reading datarefs low, these - * routines do not do full validation of a dataref; passing a junk value for a - * dataref can result in crashing the sim. - * - * For array-style datarefs, you specify the number of items to read/write and - * the offset into the array; the actual number of items read or written is - * returned. This may be less to prevent an array-out-of-bounds error. - * - */ - - -/* - * XPLMGetDatai - * - * Read an integer data ref and return its value. The return value is the - * dataref value or 0 if the dataref is invalid/NULL or the plugin is - * disabled. - * - */ -XPLM_API int XPLMGetDatai( - XPLMDataRef inDataRef); - -/* - * XPLMSetDatai - * - * Write a new value to an integer data ref. This routine is a no-op if the - * plugin publishing the dataref is disabled, the dataref is invalid, or the - * dataref is not writable. - * - */ -XPLM_API void XPLMSetDatai( - XPLMDataRef inDataRef, - int inValue); - -/* - * XPLMGetDataf - * - * Read a single precision floating point dataref and return its value. The - * return value is the dataref value or 0.0 if the dataref is invalid/NULL or - * the plugin is disabled. - * - */ -XPLM_API float XPLMGetDataf( - XPLMDataRef inDataRef); - -/* - * XPLMSetDataf - * - * Write a new value to a single precision floating point data ref. This - * routine is a no-op if the plugin publishing the dataref is disabled, the - * dataref is invalid, or the dataref is not writable. - * - */ -XPLM_API void XPLMSetDataf( - XPLMDataRef inDataRef, - float inValue); - -/* - * XPLMGetDatad - * - * Read a double precision floating point dataref and return its value. The - * return value is the dataref value or 0.0 if the dataref is invalid/NULL or - * the plugin is disabled. - * - */ -XPLM_API double XPLMGetDatad( - XPLMDataRef inDataRef); - -/* - * XPLMSetDatad - * - * Write a new value to a double precision floating point data ref. This - * routine is a no-op if the plugin publishing the dataref is disabled, the - * dataref is invalid, or the dataref is not writable. - * - */ -XPLM_API void XPLMSetDatad( - XPLMDataRef inDataRef, - double inValue); - -/* - * XPLMGetDatavi - * - * Read a part of an integer array dataref. If you pass NULL for outVaules, - * the routine will return the size of the array, ignoring inOffset and inMax. - * - * - * If outValues is not NULL, then up to inMax values are copied from the - * dataref into outValues, starting at inOffset in the dataref. If inMax + - * inOffset is larger than the size of the dataref, less than inMax values - * will be copied. The number of values copied is returned. - * - * Note: the semantics of array datarefs are entirely implemented by the - * plugin (or X-Plane) that provides the dataref, not the SDK itself; the - * above description is how these datarefs are intended to work, but a rogue - * plugin may have different behavior. - * - */ -XPLM_API int XPLMGetDatavi( - XPLMDataRef inDataRef, - int * outValues, /* Can be NULL */ - int inOffset, - int inMax); - -/* - * XPLMSetDatavi - * - * Write part or all of an integer array dataref. The values passed by - * inValues are written into the dataref starting at inOffset. Up to inCount - * values are written; however if the values would write "off the end" of the - * dataref array, then fewer values are written. - * - * Note: the semantics of array datarefs are entirely implemented by the - * plugin (or X-Plane) that provides the dataref, not the SDK itself; the - * above description is how these datarefs are intended to work, but a rogue - * plugin may have different behavior. - * - */ -XPLM_API void XPLMSetDatavi( - XPLMDataRef inDataRef, - int * inValues, - int inoffset, - int inCount); - -/* - * XPLMGetDatavf - * - * Read a part of a single precision floating point array dataref. If you pass - * NULL for outVaules, the routine will return the size of the array, ignoring - * inOffset and inMax. - * - * If outValues is not NULL, then up to inMax values are copied from the - * dataref into outValues, starting at inOffset in the dataref. If inMax + - * inOffset is larger than the size of the dataref, less than inMax values - * will be copied. The number of values copied is returned. - * - * Note: the semantics of array datarefs are entirely implemented by the - * plugin (or X-Plane) that provides the dataref, not the SDK itself; the - * above description is how these datarefs are intended to work, but a rogue - * plugin may have different behavior. - * - */ -XPLM_API int XPLMGetDatavf( - XPLMDataRef inDataRef, - float * outValues, /* Can be NULL */ - int inOffset, - int inMax); - -/* - * XPLMSetDatavf - * - * Write part or all of a single precision floating point array dataref. The - * values passed by inValues are written into the dataref starting at - * inOffset. Up to inCount values are written; however if the values would - * write "off the end" of the dataref array, then fewer values are written. - * - * Note: the semantics of array datarefs are entirely implemented by the - * plugin (or X-Plane) that provides the dataref, not the SDK itself; the - * above description is how these datarefs are intended to work, but a rogue - * plugin may have different behavior. - * - */ -XPLM_API void XPLMSetDatavf( - XPLMDataRef inDataRef, - float * inValues, - int inoffset, - int inCount); - -/* - * XPLMGetDatab - * - * Read a part of a byte array dataref. If you pass NULL for outVaules, the - * routine will return the size of the array, ignoring inOffset and inMax. - * - * If outValues is not NULL, then up to inMax values are copied from the - * dataref into outValues, starting at inOffset in the dataref. If inMax + - * inOffset is larger than the size of the dataref, less than inMax values - * will be copied. The number of values copied is returned. - * - * Note: the semantics of array datarefs are entirely implemented by the - * plugin (or X-Plane) that provides the dataref, not the SDK itself; the - * above description is how these datarefs are intended to work, but a rogue - * plugin may have different behavior. - * - */ -XPLM_API int XPLMGetDatab( - XPLMDataRef inDataRef, - void * outValue, /* Can be NULL */ - int inOffset, - int inMaxBytes); - -/* - * XPLMSetDatab - * - * Write part or all of a byte array dataref. The values passed by inValues - * are written into the dataref starting at inOffset. Up to inCount values are - * written; however if the values would write "off the end" of the dataref - * array, then fewer values are written. - * - * Note: the semantics of array datarefs are entirely implemented by the - * plugin (or X-Plane) that provides the dataref, not the SDK itself; the - * above description is how these datarefs are intended to work, but a rogue - * plugin may have different behavior. - * - */ -XPLM_API void XPLMSetDatab( - XPLMDataRef inDataRef, - void * inValue, - int inOffset, - int inLength); - -/*************************************************************************** - * PUBLISHING YOUR PLUGINS DATA - ***************************************************************************/ -/* - * These functions allow you to create data references that other plug-ins can - * access via the above data access APIs. Data references published by other - * plugins operate the same as ones published by X-Plane in all manners except - * that your data reference will not be available to other plugins if/when - * your plugin is disabled. - * - * You share data by registering data provider callback functions. When a - * plug-in requests your data, these callbacks are then called. You provide - * one callback to return the value when a plugin 'reads' it and another to - * change the value when a plugin 'writes' it. - * - * Important: you must pick a prefix for your datarefs other than "sim/" - - * this prefix is reserved for X-Plane. The X-Plane SDK website contains a - * registry where authors can select a unique first word for dataref names, to - * prevent dataref collisions between plugins. - * - */ - - -/* - * XPLMGetDatai_f - * - * Data provider function pointers. - * - * These define the function pointers you provide to get or set data. Note - * that you are passed a generic pointer for each one. This is the same - * pointer you pass in your register routine; you can use it to find global - * variables, etc. - * - * The semantics of your callbacks are the same as the dataref accessor above - * - basically routines like XPLMGetDatai are just pass-throughs from a caller - * to your plugin. Be particularly mindful in implementing array dataref - * read-write accessors; you are responsible for avoiding overruns, supporting - * offset read/writes, and handling a read with a NULL buffer. - * - */ -typedef int (* XPLMGetDatai_f)( - void * inRefcon); - -/* - * XPLMSetDatai_f - * - * - */ -typedef void (* XPLMSetDatai_f)( - void * inRefcon, - int inValue); - -/* - * XPLMGetDataf_f - * - * - */ -typedef float (* XPLMGetDataf_f)( - void * inRefcon); - -/* - * XPLMSetDataf_f - * - * - */ -typedef void (* XPLMSetDataf_f)( - void * inRefcon, - float inValue); - -/* - * XPLMGetDatad_f - * - * - */ -typedef double (* XPLMGetDatad_f)( - void * inRefcon); - -/* - * XPLMSetDatad_f - * - * - */ -typedef void (* XPLMSetDatad_f)( - void * inRefcon, - double inValue); - -/* - * XPLMGetDatavi_f - * - * - */ -typedef int (* XPLMGetDatavi_f)( - void * inRefcon, - int * outValues, /* Can be NULL */ - int inOffset, - int inMax); - -/* - * XPLMSetDatavi_f - * - * - */ -typedef void (* XPLMSetDatavi_f)( - void * inRefcon, - int * inValues, - int inOffset, - int inCount); - -/* - * XPLMGetDatavf_f - * - * - */ -typedef int (* XPLMGetDatavf_f)( - void * inRefcon, - float * outValues, /* Can be NULL */ - int inOffset, - int inMax); - -/* - * XPLMSetDatavf_f - * - * - */ -typedef void (* XPLMSetDatavf_f)( - void * inRefcon, - float * inValues, - int inOffset, - int inCount); - -/* - * XPLMGetDatab_f - * - * - */ -typedef int (* XPLMGetDatab_f)( - void * inRefcon, - void * outValue, /* Can be NULL */ - int inOffset, - int inMaxLength); - -/* - * XPLMSetDatab_f - * - * - */ -typedef void (* XPLMSetDatab_f)( - void * inRefcon, - void * inValue, - int inOffset, - int inLength); - -/* - * XPLMRegisterDataAccessor - * - * This routine creates a new item of data that can be read and written. Pass - * in the data's full name for searching, the type(s) of the data for - * accessing, and whether the data can be written to. For each data type you - * support, pass in a read accessor function and a write accessor function if - * necessary. Pass NULL for data types you do not support or write accessors - * if you are read-only. - * - * You are returned a data ref for the new item of data created. You can use - * this data ref to unregister your data later or read or write from it. - * - */ -XPLM_API XPLMDataRef XPLMRegisterDataAccessor( - const char * inDataName, - XPLMDataTypeID inDataType, - int inIsWritable, - XPLMGetDatai_f inReadInt, - XPLMSetDatai_f inWriteInt, - XPLMGetDataf_f inReadFloat, - XPLMSetDataf_f inWriteFloat, - XPLMGetDatad_f inReadDouble, - XPLMSetDatad_f inWriteDouble, - XPLMGetDatavi_f inReadIntArray, - XPLMSetDatavi_f inWriteIntArray, - XPLMGetDatavf_f inReadFloatArray, - XPLMSetDatavf_f inWriteFloatArray, - XPLMGetDatab_f inReadData, - XPLMSetDatab_f inWriteData, - void * inReadRefcon, - void * inWriteRefcon); - -/* - * XPLMUnregisterDataAccessor - * - * Use this routine to unregister any data accessors you may have registered. - * You unregister a data ref by the XPLMDataRef you get back from - * registration. Once you unregister a data ref, your function pointer will - * not be called anymore. - * - * For maximum compatibility, do not unregister your data accessors until - * final shutdown (when your XPluginStop routine is called). This allows other - * plugins to find your data reference once and use it for their entire time - * of operation. - * - */ -XPLM_API void XPLMUnregisterDataAccessor( - XPLMDataRef inDataRef); - -/*************************************************************************** - * SHARING DATA BETWEEN MULTIPLE PLUGINS - ***************************************************************************/ -/* - * The data reference registration APIs from the previous section allow a - * plugin to publish data in a one-owner manner; the plugin that publishes the - * data reference owns the real memory that the data ref uses. This is - * satisfactory for most cases, but there are also cases where plugnis need to - * share actual data. - * - * With a shared data reference, no one plugin owns the actual memory for the - * data reference; the plugin SDK allocates that for you. When the first - * plugin asks to 'share' the data, the memory is allocated. When the data is - * changed, every plugin that is sharing the data is notified. - * - * Shared data references differ from the 'owned' data references from the - * previous section in a few ways: - * - * - With shared data references, any plugin can create the data reference; - * with owned plugins one plugin must create the data reference and others - * subscribe. (This can be a problem if you don't know which set of plugins - * will be present). - * - * - With shared data references, every plugin that is sharing the data is - * notified when the data is changed. With owned data references, only the one - * owner is notified when the data is changed. - * - * - With shared data references, you cannot access the physical memory of the - * data reference; you must use the XPLMGet... and XPLMSet... APIs. With an - * owned data reference, the one owning data reference can manipulate the data - * reference's memory in any way it sees fit. - * - * Shared data references solve two problems: if you need to have a data - * reference used by several plugins but do not know which plugins will be - * installed, or if all plugins sharing data need to be notified when that - * data is changed, use shared data references. - * - */ - - -/* - * XPLMDataChanged_f - * - * An XPLMDataChanged_f is a callback that the XPLM calls whenever any other - * plug-in modifies shared data. A refcon you provide is passed back to help - * identify which data is being changed. In response, you may want to call one - * of the XPLMGetDataxxx routines to find the new value of the data. - * - */ -typedef void (* XPLMDataChanged_f)( - void * inRefcon); - -/* - * XPLMShareData - * - * This routine connects a plug-in to shared data, creating the shared data if - * necessary. inDataName is a standard path for the data ref, and inDataType - * specifies the type. This function will create the data if it does not - * exist. If the data already exists but the type does not match, an error is - * returned, so it is important that plug-in authors collaborate to establish - * public standards for shared data. - * - * If a notificationFunc is passed in and is not NULL, that notification - * function will be called whenever the data is modified. The notification - * refcon will be passed to it. This allows your plug-in to know which shared - * data was changed if multiple shared data are handled by one callback, or if - * the plug-in does not use global variables. - * - * A one is returned for successfully creating or finding the shared data; a - * zero if the data already exists but is of the wrong type. - * - */ -XPLM_API int XPLMShareData( - const char * inDataName, - XPLMDataTypeID inDataType, - XPLMDataChanged_f inNotificationFunc, - void * inNotificationRefcon); - -/* - * XPLMUnshareData - * - * This routine removes your notification function for shared data. Call it - * when done with the data to stop receiving change notifications. Arguments - * must match XPLMShareData. The actual memory will not necessarily be freed, - * since other plug-ins could be using it. - * - */ -XPLM_API int XPLMUnshareData( - const char * inDataName, - XPLMDataTypeID inDataType, - XPLMDataChanged_f inNotificationFunc, - void * inNotificationRefcon); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/XPSDK301/CHeaders/XPLM/XPLMDefs.h b/src/XPSDK301/CHeaders/XPLM/XPLMDefs.h deleted file mode 100755 index 9e4e04aa..00000000 --- a/src/XPSDK301/CHeaders/XPLM/XPLMDefs.h +++ /dev/null @@ -1,514 +0,0 @@ -#ifndef _XPLMDefs_h_ -#define _XPLMDefs_h_ - -/* - * Copyright 2005-2012 Sandy Barbour and Ben Supnik - * - * All rights reserved. See license.txt for usage. - * - * X-Plane SDK Version: 2.1.1 - * - */ - -/* - * 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. - * - */ - - -#ifdef __cplusplus -extern "C" { -#endif - -#if IBM -#include -#else -#include -#endif -/*************************************************************************** - * DLL Definitions - ***************************************************************************/ -/* - * 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.) - * - */ - - -#ifdef __cplusplus - #if APL - #if __GNUC__ >= 4 - #define PLUGIN_API extern "C" __attribute__((visibility("default"))) - #elif __MACH__ - #define PLUGIN_API extern "C" - #else - #define PLUGIN_API extern "C" __declspec(dllexport) - #endif - #elif IBM - #define PLUGIN_API extern "C" __declspec(dllexport) - #elif LIN - #if __GNUC__ >= 4 - #define PLUGIN_API extern "C" __attribute__((visibility("default"))) - #else - #define PLUGIN_API extern "C" - #endif - #else - #error "Platform not defined!" - #endif -#else - #if APL - #if __GNUC__ >= 4 - #define PLUGIN_API __attribute__((visibility("default"))) - #elif __MACH__ - #define PLUGIN_API - #else - #define PLUGIN_API __declspec(dllexport) - #endif - #elif IBM - #define PLUGIN_API __declspec(dllexport) - #elif LIN - #if __GNUC__ >= 4 - #define PLUGIN_API __attribute__((visibility("default"))) - #else - #define PLUGIN_API - #endif - #else - #error "Platform not defined!" - #endif -#endif - -#if APL - #if XPLM - #if __GNUC__ >= 4 - #define XPLM_API __attribute__((visibility("default"))) - #elif __MACH__ - #define XPLM_API - #else - #define XPLM_API __declspec(dllexport) - #endif - #else - #define XPLM_API - #endif -#elif IBM - #if XPLM - #define XPLM_API __declspec(dllexport) - #else - #define XPLM_API __declspec(dllimport) - #endif -#elif LIN - #if XPLM - #if __GNUC__ >= 4 - #define XPLM_API __attribute__((visibility("default"))) - #else - #define XPLM_API - #endif - #else - #define XPLM_API - #endif -#else - #error "Platform not defined!" -#endif - -/*************************************************************************** - * GLOBAL DEFINITIONS - ***************************************************************************/ -/* - * These definitions are used in all parts of the SDK. - * - */ - - -/* - * 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. - * - * For persistent identification of plug-ins, use XPLMFindPluginBySignature in - * XPLMUtiltiies.h - * - * -1 indicates no plug-in. - * - */ -typedef int XPLMPluginID; - -/* No plugin. */ -#define XPLM_NO_PLUGIN_ID (-1) - -/* X-Plane itself */ -#define XPLM_PLUGIN_XPLANE (0) - -/* The current XPLM revision is 3.01 (301). */ -#define kXPLM_Version (301) - -/* - * 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. - * - * 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. - * - */ -enum { - /* The shift key is down */ - xplm_ShiftFlag = 1 - - /* The option or alt key is down */ - ,xplm_OptionAltFlag = 2 - - /* The control key is down* */ - ,xplm_ControlFlag = 4 - - /* The key is being pressed down */ - ,xplm_DownFlag = 8 - - /* The key is being released */ - ,xplm_UpFlag = 16 - - -}; -typedef int XPLMKeyFlags; - -/*************************************************************************** - * 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. - * - */ - - -#define XPLM_KEY_RETURN 13 - -#define XPLM_KEY_ESCAPE 27 - -#define XPLM_KEY_TAB 9 - -#define XPLM_KEY_DELETE 8 - -#define XPLM_KEY_LEFT 28 - -#define XPLM_KEY_RIGHT 29 - -#define XPLM_KEY_UP 30 - -#define XPLM_KEY_DOWN 31 - -#define XPLM_KEY_0 48 - -#define XPLM_KEY_1 49 - -#define XPLM_KEY_2 50 - -#define XPLM_KEY_3 51 - -#define XPLM_KEY_4 52 - -#define XPLM_KEY_5 53 - -#define XPLM_KEY_6 54 - -#define XPLM_KEY_7 55 - -#define XPLM_KEY_8 56 - -#define XPLM_KEY_9 57 - -#define XPLM_KEY_DECIMAL 46 - -/*************************************************************************** - * 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). - * - * 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: - * - * 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. - * - */ - - -#define XPLM_VK_BACK 0x08 - -#define XPLM_VK_TAB 0x09 - -#define XPLM_VK_CLEAR 0x0C - -#define XPLM_VK_RETURN 0x0D - -#define XPLM_VK_ESCAPE 0x1B - -#define XPLM_VK_SPACE 0x20 - -#define XPLM_VK_PRIOR 0x21 - -#define XPLM_VK_NEXT 0x22 - -#define XPLM_VK_END 0x23 - -#define XPLM_VK_HOME 0x24 - -#define XPLM_VK_LEFT 0x25 - -#define XPLM_VK_UP 0x26 - -#define XPLM_VK_RIGHT 0x27 - -#define XPLM_VK_DOWN 0x28 - -#define XPLM_VK_SELECT 0x29 - -#define XPLM_VK_PRINT 0x2A - -#define XPLM_VK_EXECUTE 0x2B - -#define XPLM_VK_SNAPSHOT 0x2C - -#define XPLM_VK_INSERT 0x2D - -#define XPLM_VK_DELETE 0x2E - -#define XPLM_VK_HELP 0x2F - -/* XPLM_VK_0 thru XPLM_VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39) */ -#define XPLM_VK_0 0x30 - -#define XPLM_VK_1 0x31 - -#define XPLM_VK_2 0x32 - -#define XPLM_VK_3 0x33 - -#define XPLM_VK_4 0x34 - -#define XPLM_VK_5 0x35 - -#define XPLM_VK_6 0x36 - -#define XPLM_VK_7 0x37 - -#define XPLM_VK_8 0x38 - -#define XPLM_VK_9 0x39 - -/* XPLM_VK_A thru XPLM_VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A) */ -#define XPLM_VK_A 0x41 - -#define XPLM_VK_B 0x42 - -#define XPLM_VK_C 0x43 - -#define XPLM_VK_D 0x44 - -#define XPLM_VK_E 0x45 - -#define XPLM_VK_F 0x46 - -#define XPLM_VK_G 0x47 - -#define XPLM_VK_H 0x48 - -#define XPLM_VK_I 0x49 - -#define XPLM_VK_J 0x4A - -#define XPLM_VK_K 0x4B - -#define XPLM_VK_L 0x4C - -#define XPLM_VK_M 0x4D - -#define XPLM_VK_N 0x4E - -#define XPLM_VK_O 0x4F - -#define XPLM_VK_P 0x50 - -#define XPLM_VK_Q 0x51 - -#define XPLM_VK_R 0x52 - -#define XPLM_VK_S 0x53 - -#define XPLM_VK_T 0x54 - -#define XPLM_VK_U 0x55 - -#define XPLM_VK_V 0x56 - -#define XPLM_VK_W 0x57 - -#define XPLM_VK_X 0x58 - -#define XPLM_VK_Y 0x59 - -#define XPLM_VK_Z 0x5A - -#define XPLM_VK_NUMPAD0 0x60 - -#define XPLM_VK_NUMPAD1 0x61 - -#define XPLM_VK_NUMPAD2 0x62 - -#define XPLM_VK_NUMPAD3 0x63 - -#define XPLM_VK_NUMPAD4 0x64 - -#define XPLM_VK_NUMPAD5 0x65 - -#define XPLM_VK_NUMPAD6 0x66 - -#define XPLM_VK_NUMPAD7 0x67 - -#define XPLM_VK_NUMPAD8 0x68 - -#define XPLM_VK_NUMPAD9 0x69 - -#define XPLM_VK_MULTIPLY 0x6A - -#define XPLM_VK_ADD 0x6B - -#define XPLM_VK_SEPARATOR 0x6C - -#define XPLM_VK_SUBTRACT 0x6D - -#define XPLM_VK_DECIMAL 0x6E - -#define XPLM_VK_DIVIDE 0x6F - -#define XPLM_VK_F1 0x70 - -#define XPLM_VK_F2 0x71 - -#define XPLM_VK_F3 0x72 - -#define XPLM_VK_F4 0x73 - -#define XPLM_VK_F5 0x74 - -#define XPLM_VK_F6 0x75 - -#define XPLM_VK_F7 0x76 - -#define XPLM_VK_F8 0x77 - -#define XPLM_VK_F9 0x78 - -#define XPLM_VK_F10 0x79 - -#define XPLM_VK_F11 0x7A - -#define XPLM_VK_F12 0x7B - -#define XPLM_VK_F13 0x7C - -#define XPLM_VK_F14 0x7D - -#define XPLM_VK_F15 0x7E - -#define XPLM_VK_F16 0x7F - -#define XPLM_VK_F17 0x80 - -#define XPLM_VK_F18 0x81 - -#define XPLM_VK_F19 0x82 - -#define XPLM_VK_F20 0x83 - -#define XPLM_VK_F21 0x84 - -#define XPLM_VK_F22 0x85 - -#define XPLM_VK_F23 0x86 - -#define XPLM_VK_F24 0x87 - -/* The following definitions are extended and are not based on the Microsoft * - * key set. */ -#define XPLM_VK_EQUAL 0xB0 - -#define XPLM_VK_MINUS 0xB1 - -#define XPLM_VK_RBRACE 0xB2 - -#define XPLM_VK_LBRACE 0xB3 - -#define XPLM_VK_QUOTE 0xB4 - -#define XPLM_VK_SEMICOLON 0xB5 - -#define XPLM_VK_BACKSLASH 0xB6 - -#define XPLM_VK_COMMA 0xB7 - -#define XPLM_VK_SLASH 0xB8 - -#define XPLM_VK_PERIOD 0xB9 - -#define XPLM_VK_BACKQUOTE 0xBA - -#define XPLM_VK_ENTER 0xBB - -#define XPLM_VK_NUMPAD_ENT 0xBC - -#define XPLM_VK_NUMPAD_EQ 0xBD - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/XPSDK301/CHeaders/XPLM/XPLMDisplay.h b/src/XPSDK301/CHeaders/XPLM/XPLMDisplay.h deleted file mode 100755 index 75774495..00000000 --- a/src/XPSDK301/CHeaders/XPLM/XPLMDisplay.h +++ /dev/null @@ -1,1441 +0,0 @@ -#ifndef _XPLMDisplay_h_ -#define _XPLMDisplay_h_ - -/* - * Copyright 2005-2012 Sandy Barbour and Ben Supnik - * - * All rights reserved. See license.txt for usage. - * - * X-Plane SDK Version: 2.1.1 - * - */ - -/* - * This API provides the basic hooks to draw in X-Plane and create user - * interface. All X-Plane drawing is done in OpenGL. The X-Plane plug-in - * manager takes care of properly setting up the OpenGL context and matrices. - * You do not decide when in your code's execution to draw; X-Plane tells you - * (via callbacks) when it is ready to have your plugin draw. - * - * X-Plane's drawing strategy is straightforward: every "frame" the screen is - * rendered by drawing the 3-D scene (dome, ground, objects, airplanes, etc.) - * and then drawing the cockpit on top of it. Alpha blending is used to - * overlay the cockpit over the world (and the gauges over the panel, etc.). - * X-Plane user interface elements (including windows like the map, the main - * menu, etc.) are then drawn on top of the cockpit. - * - * There are two ways you can draw: directly and in a window. - * - * Direct drawing (deprecated!---more on that below) involves drawing to the - * screen before or after X-Plane finishes a phase of drawing. When you draw - * directly, you can specify whether X-Plane is to complete this phase or not. - * This allows you to do three things: draw before X-Plane does (under it), - * draw after X-Plane does (over it), or draw instead of X-Plane. - * - * To draw directly, you register a callback and specify which phase you want - * to intercept. The plug-in manager will call you over and over to draw that - * phase. - * - * Direct drawing allows you to override scenery, panels, or anything. Note - * that you cannot assume that you are the only plug-in drawing at this - * phase. - * - * Direct drawing is deprecated; at some point in the X-Plane 11 run, it will - * likely become unsupported entirely as X-Plane transitions from OpenGL to - * modern graphics API backends (e.g., Vulkan, Metal, etc.). In the long term, - * plugins should use the XPLMInstance API for drawing 3-D objects---this will - * be much more efficient than general 3-D OpenGL drawing, and it will - * actually be supported by the new graphics backends. We do not yet know what - * the post-transition API for generic 3-D drawing will look like (if it - * exists at all). - * - * In contrast to direct drawing, window drawing provides a higher level - * functionality. With window drawing, you create a 2-D window that takes up a - * portion of the screen. Window drawing is always two dimensional. Window - * drawing is front-to-back controlled; you can specify that you want your - * window to be brought on top, and other plug-ins may put their window on top - * of you. Window drawing also allows you to sign up for key presses and - * receive mouse clicks. - * - * There are three ways to get keystrokes: - * - * 1. If you create a window, the window can take keyboard focus. It will - * then receive all keystrokes. If no window has focus, X-Plane receives - * keystrokes. Use this to implement typing in dialog boxes, etc. Only one - * window may have focus at a time; your window will be notified if it loses - * focus. - * - * 2. If you need low level access to the keystroke stream, install a key - * sniffer. Key sniffers can be installed above everything or right in front - * of the sim. - * - * 3. If you would like to associate key strokes with commands/functions in - * your plug-in, you should simply register a command (via - * XPLMCreateCommand()) and allow users to bind whatever key they choose to - * that command. Another (now deprecated) method of doing so is to use a hot - * key---a key-specific callback. Hotkeys are sent based on virtual key - * strokes, so any key may be distinctly mapped with any modifiers. Hot keys - * can be remapped by other plug-ins. As a plug-in, you don't have to worry - * about what your hot key ends up mapped to; other plug-ins may provide a UI - * for remapping keystrokes. So hotkeys allow a user to resolve conflicts and - * customize keystrokes. - * - */ - -#include "XPLMDefs.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/*************************************************************************** - * DRAWING CALLBACKS - ***************************************************************************/ -/* - * Basic drawing callbacks, for low level intercepting of X-Plane's render - * loop. The purpose of drawing callbacks is to provide targeted additions or - * replacements to X-Plane's graphics environment (for example, to add extra - * custom objects, or replace drawing of the AI aircraft). Do not assume that - * the drawing callbacks will be called in the order implied by the - * enumerations. Also do not assume that each drawing phase ends before - * another begins; they may be nested. - * - * Note that all APIs in this section are deprecated, and will likely be - * removed during the X-Plane 11 run as part of the transition to - * Vulkan/Metal/etc. See the XPLMInstance API for future-proof drawing of 3-D - * objects. - * - */ - - -/* - * XPLMDrawingPhase - * - * This constant indicates which part of drawing we are in. Drawing is done - * from the back to the front. We get a callback before or after each item. - * Metaphases provide access to the beginning and end of the 3d (scene) and 2d - * (cockpit) drawing in a manner that is independent of new phases added via - * X-Plane implementation. - * - * WARNING: As X-Plane's scenery evolves, some drawing phases may cease to - * exist and new ones may be invented. If you need a particularly specific - * use of these codes, consult Austin and/or be prepared to revise your code - * as X-Plane evolves. - * - */ -enum { - /* This is the earliest point at which you can draw in 3-d. */ - xplm_Phase_FirstScene = 0 - - /* Drawing of land and water. */ - ,xplm_Phase_Terrain = 5 - - /* Drawing runways and other airport detail. */ - ,xplm_Phase_Airports = 10 - - /* Drawing roads, trails, trains, etc. */ - ,xplm_Phase_Vectors = 15 - - /* 3-d objects (houses, smokestacks, etc. */ - ,xplm_Phase_Objects = 20 - - /* External views of airplanes, both yours and the AI aircraft. */ - ,xplm_Phase_Airplanes = 25 - - /* This is the last point at which you can draw in 3-d. */ - ,xplm_Phase_LastScene = 30 - - /* This is the first phase where you can draw in 2-d. */ - ,xplm_Phase_FirstCockpit = 35 - - /* The non-moving parts of the aircraft panel. */ - ,xplm_Phase_Panel = 40 - - /* The moving parts of the aircraft panel. */ - ,xplm_Phase_Gauges = 45 - - /* Floating windows from plugins. */ - ,xplm_Phase_Window = 50 - - /* The last change to draw in 2d. */ - ,xplm_Phase_LastCockpit = 55 - -#if defined(XPLM200) - /* Removed as of XPLM300; Use the full-blown XPLMMap API instead. */ - ,xplm_Phase_LocalMap3D = 100 - -#endif /* XPLM200 */ -#if defined(XPLM200) - /* Removed as of XPLM300; Use the full-blown XPLMMap API instead. */ - ,xplm_Phase_LocalMap2D = 101 - -#endif /* XPLM200 */ -#if defined(XPLM200) - /* Removed as of XPLM300; Use the full-blown XPLMMap API instead. */ - ,xplm_Phase_LocalMapProfile = 102 - -#endif /* XPLM200 */ - -}; -typedef int XPLMDrawingPhase; - -/* - * XPLMDrawCallback_f - * - * This is the prototype for a low level drawing callback. You are passed in - * the phase and whether it is before or after. If you are before the phase, - * return 1 to let X-Plane draw or 0 to suppress X-Plane drawing. If you are - * after the phase the return value is ignored. - * - * Refcon is a unique value that you specify when registering the callback, - * allowing you to slip a pointer to your own data to the callback. - * - * Upon entry the OpenGL context will be correctly set up for you and OpenGL - * will be in 'local' coordinates for 3d drawing and panel coordinates for 2d - * drawing. The OpenGL state (texturing, etc.) will be unknown. - * - */ -typedef int (* XPLMDrawCallback_f)( - XPLMDrawingPhase inPhase, - int inIsBefore, - void * inRefcon); - -/* - * XPLMRegisterDrawCallback - * - * This routine registers a low level drawing callback. Pass in the phase you - * want to be called for and whether you want to be called before or after. - * This routine returns 1 if the registration was successful, or 0 if the - * phase does not exist in this version of X-Plane. You may register a - * callback multiple times for the same or different phases as long as the - * refcon is unique each time. - * - * Note that this function will likely be removed during the X-Plane 11 run as - * part of the transition to Vulkan/Metal/etc. See the XPLMInstance API for - * future-proof drawing of 3-D objects. - * - */ -XPLM_API int XPLMRegisterDrawCallback( - XPLMDrawCallback_f inCallback, - XPLMDrawingPhase inPhase, - int inWantsBefore, - void * inRefcon); - -/* - * XPLMUnregisterDrawCallback - * - * This routine unregisters a draw callback. You must unregister a callback - * for each time you register a callback if you have registered it multiple - * times with different refcons. The routine returns 1 if it can find the - * callback to unregister, 0 otherwise. - * - * Note that this function will likely be removed during the X-Plane 11 run as - * part of the transition to Vulkan/Metal/etc. See the XPLMInstance API for - * future-proof drawing of 3-D objects. - * - */ -XPLM_API int XPLMUnregisterDrawCallback( - XPLMDrawCallback_f inCallback, - XPLMDrawingPhase inPhase, - int inWantsBefore, - void * inRefcon); - -/*************************************************************************** - * WINDOW API - ***************************************************************************/ -/* - * The window API provides a high-level abstraction for drawing with UI - * interaction. - * - * Windows may operate in one of two modes: legacy (for plugins compiled - * against old versions of the XPLM, as well as windows created via the - * deprecated XPLMCreateWindow() function, rather than XPLMCreateWindowEx()), - * or modern (for windows compiled against the XPLM300 or newer API, and - * created via XPLMCreateWindowEx()). - * - * Modern windows have access to new X-Plane 11 windowing features, like - * support for new positioning modes (including being "popped out" into their - * own first-class window in the operating system). They can also optionally - * be decorated in the style of X-Plane 11 windows (like the map). - * - * Modern windows operate in "boxel" units. A boxel ("box of pixels") is a - * unit of virtual pixels which, depending on X-Plane's scaling, may - * correspond to an arbitrary NxN "box" of real pixels on screen. Because - * X-Plane handles this scaling automatically, you can effectively treat the - * units as though you were simply drawing in pixels, and know that when - * X-Plane is running with 150% or 200% scaling, your drawing will be - * automatically scaled (and likewise all mouse coordinates, screen bounds, - * etc. will also be auto-scaled). - * - * In contrast, legacy windows draw in true screen pixels, and thus tend to - * look quite small when X-Plane is operating in a scaled mode. - * - * Legacy windows have their origin in the lower left of the main X-Plane - * window. In contrast, since modern windows are not constrained to the main - * window, they have their origin in the lower left of the entire global - * desktop space, and the lower left of the main X-Plane window is not - * guaranteed to be (0, 0). In both cases, x increases as you move left, and y - * increases as you move up. - * - */ - - -/* - * XPLMWindowID - * - * This is an opaque identifier for a window. You use it to control your - * window. When you create a window (via either XPLMCreateWindow() or - * XPLMCreateWindowEx()), you will specify callbacks to handle drawing, mouse - * interaction, etc. - * - */ -typedef void * XPLMWindowID; - -/* - * XPLMDrawWindow_f - * - * A callback to handle 2-D drawing of your window. You are passed in your - * window and its refcon. Draw the window. You can use other XPLM functions - * from this header to find the current dimensions of your window, etc. When - * this callback is called, the OpenGL context will be set properly for 2-D - * window drawing. - * - * NOTE: Because you are drawing your window over a background, you can make a - * translucent window easily by simply not filling in your entire window's - * bounds. - * - */ -typedef void (* XPLMDrawWindow_f)( - XPLMWindowID inWindowID, - void * inRefcon); - -/* - * XPLMHandleKey_f - * - * This function is called when a key is pressed or keyboard focus is taken - * away from your window. If losingFocus is 1, you are losing the keyboard - * focus, otherwise a key was pressed and inKey contains its character. You - * are also passed your window and a refcon. - * - * Warning: this API declares virtual keys as a signed character; however the - * VKEY #define macros in XPLMDefs.h define the vkeys using unsigned values - * (that is 0x80 instead of -0x80). So you may need to cast the incoming vkey - * to an unsigned char to get correct comparisons in C. - * - */ -typedef void (* XPLMHandleKey_f)( - XPLMWindowID inWindowID, - char inKey, - XPLMKeyFlags inFlags, - char inVirtualKey, - void * inRefcon, - int losingFocus); - -/* - * XPLMMouseStatus - * - * When the mouse is clicked, your mouse click routine is called repeatedly. - * It is first called with the mouse down message. It is then called zero or - * more times with the mouse-drag message, and finally it is called once with - * the mouse up message. All of these messages will be directed to the same - * window; you are guaranteed to not receive a drag or mouse-up event without - * first receiving the corresponding mouse-down. - * - */ -enum { - xplm_MouseDown = 1 - - ,xplm_MouseDrag = 2 - - ,xplm_MouseUp = 3 - - -}; -typedef int XPLMMouseStatus; - -/* - * XPLMHandleMouseClick_f - * - * You receive this call for one of three events: - * - * - when the user clicks the mouse button down - (optionally) when the user - * drags the mouse after a down-click, but before the up-click - when the user - * releases the down-clicked mouse button. - * - * You receive the x and y of the click, your window, and a refcon. Return 1 - * to consume the click, or 0 to pass it through. - * - * WARNING: passing clicks through windows (as of this writing) causes mouse - * tracking problems in X-Plane; do not use this feature! - * - * The units for x and y values match the units used in your window. Thus, for - * "modern" windows (those created via XPLMCreateWindowEx() and compiled - * against the XPLM300 library), the units are boxels, while legacy windows - * will get pixels. Legacy windows have their origin in the lower left of the - * main X-Plane window, while modern windows have their origin in the lower - * left of the global desktop space. In both cases, x increases as you move - * left, and y increases as you move up. - * - */ -typedef int (* XPLMHandleMouseClick_f)( - XPLMWindowID inWindowID, - int x, - int y, - XPLMMouseStatus inMouse, - void * inRefcon); - -#if defined(XPLM200) -/* - * XPLMCursorStatus - * - * XPLMCursorStatus describes how you would like X-Plane to manage the cursor. - * See XPLMHandleCursor_f for more info. - * - */ -enum { - /* X-Plane manages the cursor normally, plugin does not affect the cusrsor. */ - xplm_CursorDefault = 0 - - /* X-Plane hides the cursor. */ - ,xplm_CursorHidden = 1 - - /* X-Plane shows the cursor as the default arrow. */ - ,xplm_CursorArrow = 2 - - /* X-Plane shows the cursor but lets you select an OS cursor. */ - ,xplm_CursorCustom = 3 - - -}; -typedef int XPLMCursorStatus; -#endif /* XPLM200 */ - -#if defined(XPLM200) -/* - * XPLMHandleCursor_f - * - * The SDK calls your cursor status callback when the mouse is over your - * plugin window. Return a cursor status code to indicate how you would like - * X-Plane to manage the cursor. If you return xplm_CursorDefault, the SDK - * will try lower-Z-order plugin windows, then let the sim manage the cursor. - * - * Note: you should never show or hide the cursor yourself---these APIs are - * typically reference-counted and thus cannot safely and predictably be used - * by the SDK. Instead return one of xplm_CursorHidden to hide the cursor or - * xplm_CursorArrow/xplm_CursorCustom to show the cursor. - * - * If you want to implement a custom cursor by drawing a cursor in OpenGL, use - * xplm_CursorHidden to hide the OS cursor and draw the cursor using a 2-d - * drawing callback (after xplm_Phase_Window is probably a good choice, but - * see deprecation warnings on the drawing APIs!). If you want to use a - * custom OS-based cursor, use xplm_CursorCustom to ask X-Plane to show the - * cursor but not affect its image. You can then use an OS specific call like - * SetThemeCursor (Mac) or SetCursor/LoadCursor (Windows). - * - * The units for x and y values match the units used in your window. Thus, for - * "modern" windows (those created via XPLMCreateWindowEx() and compiled - * against the XPLM300 library), the units are boxels, while legacy windows - * will get pixels. Legacy windows have their origin in the lower left of the - * main X-Plane window, while modern windows have their origin in the lower - * left of the global desktop space. In both cases, x increases as you move - * left, and y increases as you move up. - * - */ -typedef XPLMCursorStatus (* XPLMHandleCursor_f)( - XPLMWindowID inWindowID, - int x, - int y, - void * inRefcon); -#endif /* XPLM200 */ - -#if defined(XPLM200) -/* - * XPLMHandleMouseWheel_f - * - * The SDK calls your mouse wheel callback when one of the mouse wheels is - * scrolled within your window. Return 1 to consume the mouse wheel movement - * or 0 to pass them on to a lower window. (If your window appears opaque to - * the user, you should consume mouse wheel scrolling even if it does - * nothing.) The number of "clicks" indicates how far the wheel was turned - * since the last callback. The wheel is 0 for the vertical axis or 1 for the - * horizontal axis (for OS/mouse combinations that support this). - * - * The units for x and y values match the units used in your window. Thus, for - * "modern" windows (those created via XPLMCreateWindowEx() and compiled - * against the XPLM300 library), the units are boxels, while legacy windows - * will get pixels. Legacy windows have their origin in the lower left of the - * main X-Plane window, while modern windows have their origin in the lower - * left of the global desktop space. In both cases, x increases as you move - * left, and y increases as you move up. - * - */ -typedef int (* XPLMHandleMouseWheel_f)( - XPLMWindowID inWindowID, - int x, - int y, - int wheel, - int clicks, - void * inRefcon); -#endif /* XPLM200 */ - -#if defined(XPLM300) -/* - * XPLMWindowLayer - * - * XPLMWindowLayer describes where in the ordering of windows X-Plane should - * place a particular window. Windows in higher layers cover windows in lower - * layers. So, a given window might be at the top of its particular layer, but - * it might still be obscured by a window in a higher layer. (This happens - * frequently when floating windows, like X-Plane's map, are covered by a - * modal alert.) - * - * Your window's layer can only be specified when you create the window (in - * the XPLMCreateWindow_t you pass to XPLMCreateWindowEx()). For this reason, - * layering only applies to windows created with new X-Plane 11 GUI features. - * (Windows created using the older XPLMCreateWindow(), or windows compiled - * against a pre-XPLM300 version of the SDK will simply be placed in the - * flight overlay window layer.) - * - */ -enum { - /* The lowest layer, used for HUD-like displays while flying. */ - xplm_WindowLayerFlightOverlay = 0 - - /* Windows that "float" over the sim, like the X-Plane 11 map does. If you are * - * not sure which layer to create your window in, choose floating. */ - ,xplm_WindowLayerFloatingWindows = 1 - - /* An interruptive modal that covers the sim with a transparent black overlay * - * to draw the user's focus to the alert */ - ,xplm_WindowLayerModal = 2 - - /* "Growl"-style notifications that are visible in a corner of the screen, * - * even over modals */ - ,xplm_WindowLayerGrowlNotifications = 3 - - -}; -typedef int XPLMWindowLayer; -#endif /* XPLM300 */ - -#if defined(XPLM301) -/* - * XPLMWindowDecoration - * - * XPLMWindowDecoration describes how "modern" windows will be displayed. This - * impacts both how X-Plane draws your window as well as certain mouse - * handlers. - * - * Your window's decoration can only be specified when you create the window - * (in the XPLMCreateWindow_t you pass to XPLMCreateWindowEx()). - * - */ -enum { - /* X-Plane will draw no decoration for your window, and apply no automatic * - * click handlers. The window will not stop click from passing through its * - * bounds. This is suitable for "windows" which request, say, the full screen * - * bounds, then only draw in a small portion of the available area. */ - xplm_WindowDecorationNone = 0 - - /* The default decoration for "native" windows, like the map. Provides a solid * - * background, as well as click handlers for resizing and dragging the window. */ - ,xplm_WindowDecorationRoundRectangle = 1 - - /* X-Plane will draw no decoration for your window, nor will it provide resize * - * handlers for your window edges, but it will stop clicks from passing * - * through your windows bounds. */ - ,xplm_WindowDecorationSelfDecorated = 2 - - /* Like self-decorated, but with resizing; X-Plane will draw no decoration for * - * your window, but it will stop clicks from passing through your windows * - * bounds, and provide automatic mouse handlers for resizing. */ - ,xplm_WindowDecorationSelfDecoratedResizable = 3 - - -}; -typedef int XPLMWindowDecoration; -#endif /* XPLM301 */ - -#if defined(XPLM200) -/* - * XPLMCreateWindow_t - * - * The XPMCreateWindow_t structure defines all of the parameters used to - * create a modern window using XPLMCreateWindowEx(). The structure will be - * expanded in future SDK APIs to include more features. Always set the - * structSize member to the size of your struct in bytes! - * - * All windows created by this function in the XPLM300 version of the API are - * created with the new X-Plane 11 GUI features. This means your plugin will - * get to "know" about the existence of X-Plane windows other than the main - * window. All drawing and mouse callbacks for your window will occur in - * "boxels," giving your windows automatic support for high-DPI scaling in - * X-Plane. In addition, your windows can opt-in to decoration with the - * X-Plane 11 window styling, and you can use the - * XPLMSetWindowPositioningMode() API to make your window "popped out" into a - * first-class operating system window. - * - * Note that this requires dealing with your window's bounds in "global - * desktop" positioning units, rather than the traditional panel coordinate - * system. In global desktop coordinates, the main X-Plane window may not have - * its origin at coordinate (0, 0), and your own window may have negative - * coordinates. Assuming you don't implicitly assume (0, 0) as your origin, - * the only API change you should need is to start using - * XPLMGetMouseLocationGlobal() rather than XPLMGetMouseLocation(), and - * XPLMGetScreenBoundsGlobal() instead of XPLMGetScreenSize(). - * - * If you ask to be decorated as a floating window, you'll get the blue window - * control bar and blue backing that you see in X-Plane 11's normal "floating" - * windows (like the map). - * - */ -typedef struct { - /* Used to inform XPLMCreateWindowEx() of the SDK version you compiled * - * against; should always be set to sizeof(XPLMCreateWindow_t) */ - int structSize; - /* Left bound, in global desktop boxels */ - int left; - /* Top bound, in global desktop boxels */ - int top; - /* Right bound, in global desktop boxels */ - int right; - /* Bottom bound, in global desktop boxels */ - int bottom; - int visible; - XPLMDrawWindow_f drawWindowFunc; - /* A callback to handle the user left-clicking within your window (or NULL to * - * ignore left clicks) */ - XPLMHandleMouseClick_f handleMouseClickFunc; - XPLMHandleKey_f handleKeyFunc; - XPLMHandleCursor_f handleCursorFunc; - XPLMHandleMouseWheel_f handleMouseWheelFunc; - /* A reference which will be passed into each of your window callbacks. Use * - * this to pass information to yourself as needed. */ - void * refcon; -#if defined(XPLM301) - /* Specifies the type of X-Plane 11-style "wrapper" you want around your * - * window, if any */ - XPLMWindowDecoration decorateAsFloatingWindow; -#endif /* XPLM301 */ -#if defined(XPLM300) - XPLMWindowLayer layer; -#endif /* XPLM300 */ -#if defined(XPLM300) - /* A callback to handle the user right-clicking within your window (or NULL to * - * ignore right clicks) */ - XPLMHandleMouseClick_f handleRightClickFunc; -#endif /* XPLM300 */ -} XPLMCreateWindow_t; -#endif /* XPLM200 */ - -#if defined(XPLM200) -/* - * XPLMCreateWindowEx - * - * This routine creates a new "modern" window. You pass in an - * XPLMCreateWindow_t structure with all of the fields set in. You must set - * the structSize of the structure to the size of the actual structure you - * used. Also, you must provide functions for every callback---you may not - * leave them null! (If you do not support the cursor or mouse wheel, use - * functions that return the default values.) - * - */ -XPLM_API XPLMWindowID XPLMCreateWindowEx( - XPLMCreateWindow_t * inParams); -#endif /* XPLM200 */ - -/* - * XPLMCreateWindow - * - * Deprecated as of XPLM300. - * - * This routine creates a new legacy window. Unlike modern windows (created - * via XPLMCreateWindowEx()), legacy windows do not have access to X-Plane 11 - * features like automatic scaling for high-DPI screens, native window styles, - * or support for being "popped out" into first-class operating system - * windows. - * - * Pass in the dimensions and offsets to the window's bottom left corner from - * the bottom left of the screen. You can specify whether the window is - * initially visible or not. Also, you pass in three callbacks to run the - * window and a refcon. This function returns a window ID you can use to - * refer to the new window. - * - * NOTE: Legacy windows do not have "frames"; you are responsible for drawing - * the background and frame of the window. Higher level libraries have - * routines which make this easy. - * - */ -XPLM_API XPLMWindowID XPLMCreateWindow( - int inLeft, - int inTop, - int inRight, - int inBottom, - int inIsVisible, - XPLMDrawWindow_f inDrawCallback, - XPLMHandleKey_f inKeyCallback, - XPLMHandleMouseClick_f inMouseCallback, - void * inRefcon); - -/* - * XPLMDestroyWindow - * - * This routine destroys a window. The window's callbacks are not called - * after this call. Keyboard focus is removed from the window before - * destroying it. - * - */ -XPLM_API void XPLMDestroyWindow( - XPLMWindowID inWindowID); - -/* - * XPLMGetScreenSize - * - * This routine returns the size of the main X-Plane OpenGL window in pixels. - * This number can be used to get a rough idea of the amount of detail the - * user will be able to see when drawing in 3-d. - * - */ -XPLM_API void XPLMGetScreenSize( - int * outWidth, /* Can be NULL */ - int * outHeight); /* Can be NULL */ - -#if defined(XPLM300) -/* - * XPLMGetScreenBoundsGlobal - * - * This routine returns the bounds of the "global" X-Plane desktop, in boxels. - * Unlike the non-global version XPLMGetScreenSize(), this is multi-monitor - * aware. There are three primary consequences of multimonitor awareness. - * - * First, if the user is running X-Plane in full-screen on two or more - * monitors (typically configured using one full-screen window per monitor), - * the global desktop will be sized to include all X-Plane windows. - * - * Second, the origin of the screen coordinates is not guaranteed to be (0, - * 0). Suppose the user has two displays side-by-side, both running at 1080p. - * Suppose further that they've configured their OS to make the left display - * their "primary" monitor, and that X-Plane is running in full-screen on - * their right monitor only. In this case, the global desktop bounds would be - * the rectangle from (1920, 0) to (3840, 1080). If the user later asked - * X-Plane to draw on their primary monitor as well, the bounds would change - * to (0, 0) to (3840, 1080). - * - * Finally, if the usable area of the virtual desktop is not a perfect - * rectangle (for instance, because the monitors have different resolutions or - * because one monitor is configured in the operating system to be above and - * to the right of the other), the global desktop will include any wasted - * space. Thus, if you have two 1080p monitors, and monitor 2 is configured to - * have its bottom left touch monitor 1's upper right, your global desktop - * area would be the rectangle from (0, 0) to (3840, 2160). - * - * Note that popped-out windows (windows drawn in their own operating system - * windows, rather than "floating" within X-Plane) are not included in these - * bounds. - * - */ -XPLM_API void XPLMGetScreenBoundsGlobal( - int * outLeft, /* Can be NULL */ - int * outTop, /* Can be NULL */ - int * outRight, /* Can be NULL */ - int * outBottom); /* Can be NULL */ -#endif /* XPLM300 */ - -#if defined(XPLM300) -/* - * XPLMReceiveMonitorBoundsGlobal_f - * - * This function is informed of the global bounds (in boxels) of a particular - * monitor within the X-Plane global desktop space. Note that X-Plane must be - * running in full screen on a monitor in order for that monitor to be passed - * to you in this callback. - * - */ -typedef void (* XPLMReceiveMonitorBoundsGlobal_f)( - int inMonitorIndex, - int inLeftBx, - int inTopBx, - int inRightBx, - int inBottomBx, - void * inRefcon); -#endif /* XPLM300 */ - -#if defined(XPLM300) -/* - * XPLMGetAllMonitorBoundsGlobal - * - * This routine immediately calls you back with the bounds (in boxels) of each - * full-screen X-Plane window within the X-Plane global desktop space. Note - * that if a monitor is *not* covered by an X-Plane window, you cannot get its - * bounds this way. Likewise, monitors with only an X-Plane window (not in - * full-screen mode) will not be included. - * - * If X-Plane is running in full-screen and your monitors are of the same size - * and configured contiguously in the OS, then the combined global bounds of - * all full-screen monitors will match the total global desktop bounds, as - * returned by XPLMGetScreenBoundsGlobal(). (Of course, if X-Plane is running - * in windowed mode, this will not be the case. Likewise, if you have - * differently sized monitors, the global desktop space will include wasted - * space.) - * - * Note that this function's monitor indices match those provided by - * XPLMGetAllMonitorBoundsOS(), but the coordinates are different (since the - * X-Plane global desktop may not match the operating system's global desktop, - * and one X-Plane boxel may be larger than one pixel due to 150% or 200% - * scaling). - * - */ -XPLM_API void XPLMGetAllMonitorBoundsGlobal( - XPLMReceiveMonitorBoundsGlobal_f inMonitorBoundsCallback, - void * inRefcon); -#endif /* XPLM300 */ - -#if defined(XPLM300) -/* - * XPLMReceiveMonitorBoundsOS_f - * - * This function is informed of the global bounds (in pixels) of a particular - * monitor within the operating system's global desktop space. Note that a - * monitor index being passed to you here does not indicate that X-Plane is - * running in full screen on this monitor, or even that any X-Plane windows - * exist on this monitor. - * - */ -typedef void (* XPLMReceiveMonitorBoundsOS_f)( - int inMonitorIndex, - int inLeftPx, - int inTopPx, - int inRightPx, - int inBottomPx, - void * inRefcon); -#endif /* XPLM300 */ - -#if defined(XPLM300) -/* - * XPLMGetAllMonitorBoundsOS - * - * This routine immediately calls you back with the bounds (in pixels) of each - * monitor within the operating system's global desktop space. Note that - * unlike XPLMGetAllMonitorBoundsGlobal(), this may include monitors that have - * no X-Plane window on them. - * - * Note that this function's monitor indices match those provided by - * XPLMGetAllMonitorBoundsGlobal(), but the coordinates are different (since - * the X-Plane global desktop may not match the operating system's global - * desktop, and one X-Plane boxel may be larger than one pixel). - * - */ -XPLM_API void XPLMGetAllMonitorBoundsOS( - XPLMReceiveMonitorBoundsOS_f inMonitorBoundsCallback, - void * inRefcon); -#endif /* XPLM300 */ - -/* - * XPLMGetMouseLocation - * - * Deprecated in XPLM300. Modern windows should use - * XPLMGetMouseLocationGlobal() instead. - * - * This routine returns the current mouse location in pixels relative to the - * main X-Plane window. The bottom left corner of the main window is (0, 0). - * Pass NULL to not receive info about either parameter. - * - * Because this function gives the mouse position relative to the main X-Plane - * window (rather than in global bounds), this function should only be used by - * legacy windows. Modern windows should instead get the mouse position in - * global desktop coordinates using XPLMGetMouseLocationGlobal(). - * - * Note that unlike XPLMGetMouseLocationGlobal(), if the mouse goes outside - * the user's main monitor (for instance, to a pop out window or a secondary - * monitor), this function will not reflect it. - * - */ -XPLM_API void XPLMGetMouseLocation( - int * outX, /* Can be NULL */ - int * outY); /* Can be NULL */ - -#if defined(XPLM300) -/* - * XPLMGetMouseLocationGlobal - * - * Returns the current mouse location in global desktop boxels. Unlike - * XPLMGetMouseLocation(), the bottom left of the main X-Plane window is not - * guaranteed to be (0, 0)---instead, the origin is the lower left of the - * entire global desktop space. In addition, this routine gives the real mouse - * location when the mouse goes to X-Plane windows other than the primary - * display. Thus, it can be used with both pop-out windows and secondary - * monitors. - * - * This is the mouse location function to use with modern windows (i.e., those - * created by XPLMCreateWindowEx()). - * - * Pass NULL to not receive info about either parameter. - * - */ -XPLM_API void XPLMGetMouseLocationGlobal( - int * outX, /* Can be NULL */ - int * outY); /* Can be NULL */ -#endif /* XPLM300 */ - -/* - * XPLMGetWindowGeometry - * - * This routine returns the position and size of a window. The units and - * coordinate system vary depending on the type of window you have. - * - * If this is a legacy window (one compiled against a pre-XPLM300 version of - * the SDK, or an XPLM300 window that was not created using - * XPLMCreateWindowEx()), the units are pixels relative to the main X-Plane - * display. - * - * If, on the other hand, this is a new X-Plane 11-style window (compiled - * against the XPLM300 SDK and created using XPLMCreateWindowEx()), the units - * are global desktop boxels. - * - * Pass NULL to not receive any paramter. - * - */ -XPLM_API void XPLMGetWindowGeometry( - XPLMWindowID inWindowID, - int * outLeft, /* Can be NULL */ - int * outTop, /* Can be NULL */ - int * outRight, /* Can be NULL */ - int * outBottom); /* Can be NULL */ - -/* - * XPLMSetWindowGeometry - * - * This routine allows you to set the position and size of a window. - * - * The units and coordinate system match those of XPLMGetWindowGeometry(). - * That is, modern windows use global desktop boxel coordinates, while legacy - * windows use pixels relative to the main X-Plane display. - * - * Note that this only applies to "floating" windows (that is, windows that - * are drawn within the X-Plane simulation windows, rather than being "popped - * out" into their own first-class operating system windows). To set the - * position of windows whose positioning mode is xplm_WindowPopOut, you'll - * need to instead use XPLMSetWindowGeometryOS(). - * - */ -XPLM_API void XPLMSetWindowGeometry( - XPLMWindowID inWindowID, - int inLeft, - int inTop, - int inRight, - int inBottom); - -#if defined(XPLM300) -/* - * XPLMGetWindowGeometryOS - * - * This routine returns the position and size of a "popped out" window (i.e., - * a window whose positioning mode is xplm_WindowPopOut), in operating system - * pixels. Pass NULL to not receive any parameter. - * - */ -XPLM_API void XPLMGetWindowGeometryOS( - XPLMWindowID inWindowID, - int * outLeft, /* Can be NULL */ - int * outTop, /* Can be NULL */ - int * outRight, /* Can be NULL */ - int * outBottom); /* Can be NULL */ -#endif /* XPLM300 */ - -#if defined(XPLM300) -/* - * XPLMSetWindowGeometryOS - * - * This routine allows you to set the position and size, in operating system - * pixel coordinates, of a popped out window (that is, a window whose - * positioning mode is xplm_WindowPopOut, which exists outside the X-Plane - * simulation window, in its own first-class operating system window). - * - * Note that you are responsible for ensuring both that your window is popped - * out (using XPLMWindowIsPoppedOut()) and that a monitor really exists at the - * OS coordinates you provide (using XPLMGetAllMonitorBoundsOS()). - * - */ -XPLM_API void XPLMSetWindowGeometryOS( - XPLMWindowID inWindowID, - int inLeft, - int inTop, - int inRight, - int inBottom); -#endif /* XPLM300 */ - -#if defined(XPLM301) -/* - * XPLMGetWindowGeometryVR - * - * Returns the width and height, in boxels, of a window in VR. Note that you - * are responsible for ensuring your window is in VR (using - * XPLMWindowIsInVR()). - * - */ -XPLM_API void XPLMGetWindowGeometryVR( - XPLMWindowID inWindowID, - int * outWidthBoxels, /* Can be NULL */ - int * outHeightBoxels); /* Can be NULL */ -#endif /* XPLM301 */ - -#if defined(XPLM301) -/* - * XPLMSetWindowGeometryVR - * - * This routine allows you to set the size, in boxels, of a window in VR (that - * is, a window whose positioning mode is xplm_WindowVR). - * - * Note that you are responsible for ensuring your window is in VR (using - * XPLMWindowIsInVR()). - * - */ -XPLM_API void XPLMSetWindowGeometryVR( - XPLMWindowID inWindowID, - int widthBoxels, - int heightBoxels); -#endif /* XPLM301 */ - -/* - * XPLMGetWindowIsVisible - * - * This routine returns whether a window is visible. - * - */ -XPLM_API int XPLMGetWindowIsVisible( - XPLMWindowID inWindowID); - -/* - * XPLMSetWindowIsVisible - * - * This routine shows or hides a window. - * - */ -XPLM_API void XPLMSetWindowIsVisible( - XPLMWindowID inWindowID, - int inIsVisible); - -#if defined(XPLM300) -/* - * XPLMWindowIsPoppedOut - * - * True if this window has been popped out (making it a first-class window in - * the operating system), which in turn is true if and only if you have set - * the window's positioning mode to xplm_WindowPopOut. - * - * Only applies to modern windows. (Windows created using the deprecated - * XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of - * the SDK cannot be popped out.) - * - */ -XPLM_API int XPLMWindowIsPoppedOut( - XPLMWindowID inWindowID); -#endif /* XPLM300 */ - -#if defined(XPLM301) -/* - * XPLMWindowIsInVR - * - * True if this window has been moved to the virtual reality (VR) headset, - * which in turn is true if and only if you have set the window's positioning - * mode to xplm_WindowVR. - * - * Only applies to modern windows. (Windows created using the deprecated - * XPLMCreateWindow(), or windows compiled against a pre-XPLM301 version of - * the SDK cannot be moved to VR.) - * - */ -XPLM_API int XPLMWindowIsInVR( - XPLMWindowID inWindowID); -#endif /* XPLM301 */ - -#if defined(XPLM300) -/* - * XPLMSetWindowGravity - * - * A window's "gravity" controls how the window shifts as the whole X-Plane - * window resizes. A gravity of 1 means the window maintains its positioning - * relative to the right or top edges, 0 the left/bottom, and 0.5 keeps it - * centered. - * - * Default gravity is (0, 1, 0, 1), meaning your window will maintain its - * position relative to the top left and will not change size as its - * containing window grows. - * - * If you wanted, say, a window that sticks to the top of the screen (with a - * constant height), but which grows to take the full width of the window, you - * would pass (0, 1, 1, 1). Because your left and right edges would maintain - * their positioning relative to their respective edges of the screen, the - * whole width of your window would change with the X-Plane window. - * - * Only applies to modern windows. (Windows created using the deprecated - * XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of - * the SDK will simply get the default gravity.) - * - */ -XPLM_API void XPLMSetWindowGravity( - XPLMWindowID inWindowID, - float inLeftGravity, - float inTopGravity, - float inRightGravity, - float inBottomGravity); -#endif /* XPLM300 */ - -#if defined(XPLM300) -/* - * XPLMSetWindowResizingLimits - * - * Sets the minimum and maximum size of the client rectangle of the given - * window. (That is, it does not include any window styling that you might - * have asked X-Plane to apply on your behalf.) All resizing operations are - * constrained to these sizes. - * - * Only applies to modern windows. (Windows created using the deprecated - * XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of - * the SDK will have no minimum or maximum size.) - * - */ -XPLM_API void XPLMSetWindowResizingLimits( - XPLMWindowID inWindowID, - int inMinWidthBoxels, - int inMinHeightBoxels, - int inMaxWidthBoxels, - int inMaxHeightBoxels); -#endif /* XPLM300 */ - -#if defined(XPLM300) -/* - * XPLMWindowPositioningMode - * - * XPLMWindowPositionMode describes how X-Plane will position your window on - * the user's screen. X-Plane will maintain this positioning mode even as the - * user resizes their window or adds/removes full-screen monitors. - * - * Positioning mode can only be set for "modern" windows (that is, windows - * created using XPLMCreateWindowEx() and compiled against the XPLM300 SDK). - * Windows created using the deprecated XPLMCreateWindow(), or windows - * compiled against a pre-XPLM300 version of the SDK will simply get the - * "free" positioning mode. - * - */ -enum { - /* The default positioning mode. Set the window geometry and its future * - * position will be determined by its window gravity, resizing limits, and * - * user interactions. */ - xplm_WindowPositionFree = 0 - - /* Keep the window centered on the monitor you specify */ - ,xplm_WindowCenterOnMonitor = 1 - - /* Keep the window full screen on the monitor you specify */ - ,xplm_WindowFullScreenOnMonitor = 2 - - /* Like gui_window_full_screen_on_monitor, but stretches over *all* monitors * - * and popout windows. This is an obscure one... unless you have a very good * - * reason to need it, you probably don't! */ - ,xplm_WindowFullScreenOnAllMonitors = 3 - - /* A first-class window in the operating system, completely separate from the * - * X-Plane window(s) */ - ,xplm_WindowPopOut = 4 - -#if defined(XPLM301) - /* A floating window visible on the VR headset */ - ,xplm_WindowVR = 5 - -#endif /* XPLM301 */ - -}; -typedef int XPLMWindowPositioningMode; -#endif /* XPLM300 */ - -#if defined(XPLM300) -/* - * XPLMSetWindowPositioningMode - * - * Sets the policy for how X-Plane will position your window. - * - * Some positioning modes apply to a particular monitor. For those modes, you - * can pass a negative monitor index to position the window on the main - * X-Plane monitor (the screen with the X-Plane menu bar at the top). Or, if - * you have a specific monitor you want to position your window on, you can - * pass a real monitor index as received from, e.g., - * XPLMGetAllMonitorBoundsOS(). - * - * Only applies to modern windows. (Windows created using the deprecated - * XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of - * the SDK will always use xplm_WindowPositionFree.) - * - */ -XPLM_API void XPLMSetWindowPositioningMode( - XPLMWindowID inWindowID, - XPLMWindowPositioningMode inPositioningMode, - int inMonitorIndex); -#endif /* XPLM300 */ - -#if defined(XPLM300) -/* - * XPLMSetWindowTitle - * - * Sets the name for a window. This only applies to windows that opted-in to - * styling as an X-Plane 11 floating window (i.e., with styling mode - * xplm_WindowDecorationRoundRectangle) when they were created using - * XPLMCreateWindowEx(). - * - */ -XPLM_API void XPLMSetWindowTitle( - XPLMWindowID inWindowID, - const char * inWindowTitle); -#endif /* XPLM300 */ - -/* - * XPLMGetWindowRefCon - * - * This routine returns a window's reference constant, the unique value you - * can use for your own purposes. - * - */ -XPLM_API void * XPLMGetWindowRefCon( - XPLMWindowID inWindowID); - -/* - * XPLMSetWindowRefCon - * - * This routine sets a window's reference constant. Use this to pass data to - * yourself in the callbacks. - * - */ -XPLM_API void XPLMSetWindowRefCon( - XPLMWindowID inWindowID, - void * inRefcon); - -/* - * XPLMTakeKeyboardFocus - * - * This routine gives a specific window keyboard focus. Keystrokes will be - * sent to that window. Pass a window ID of 0 to remove keyboard focus from - * any plugin-created windows and instead pass keyboard strokes directly to - * X-Plane. - * - */ -XPLM_API void XPLMTakeKeyboardFocus( - XPLMWindowID inWindow); - -/* - * XPLMHasKeyboardFocus - * - * Returns true (1) if the indicated window has keyboard focus. Pass a window - * ID of 0 to see if no plugin window has focus, and all keystrokes will go - * directly to X-Plane. - * - */ -XPLM_API int XPLMHasKeyboardFocus( - XPLMWindowID inWindow); - -/* - * XPLMBringWindowToFront - * - * This routine brings the window to the front of the Z-order for its layer. - * Windows are brought to the front automatically when they are created. - * Beyond that, you should make sure you are front before handling mouse - * clicks. - * - * Note that this only brings your window to the front of its layer - * (XPLMWindowLayer). Thus, if you have a window in the floating window layer - * (xplm_WindowLayerFloatingWindows), but there is a modal window (in layer - * xplm_WindowLayerModal) above you, you would still not be the true frontmost - * window after calling this. (After all, the window layers are strictly - * ordered, and no window in a lower layer can ever be above any window in a - * higher one.) - * - */ -XPLM_API void XPLMBringWindowToFront( - XPLMWindowID inWindow); - -/* - * XPLMIsWindowInFront - * - * This routine returns true if the window you passed in is the frontmost - * visible window in its layer (XPLMWindowLayer). - * - * Thus, if you have a window at the front of the floating window layer - * (xplm_WindowLayerFloatingWindows), this will return true even if there is a - * modal window (in layer xplm_WindowLayerModal) above you. (Not to worry, - * though: in such a case, X-Plane will not pass clicks or keyboard input down - * to your layer until the window above stops "eating" the input.) - * - */ -XPLM_API int XPLMIsWindowInFront( - XPLMWindowID inWindow); - -/*************************************************************************** - * KEY SNIFFERS - ***************************************************************************/ -/* - * Low-level keyboard handlers. Allows for intercepting keystrokes outside the - * normal rules of the user interface. - * - */ - - -/* - * XPLMKeySniffer_f - * - * This is the prototype for a low level key-sniffing function. Window-based - * UI _should not use this_! The windowing system provides high-level - * mediated keyboard access, via the callbacks you attach to your - * XPLMCreateWindow_t. By comparison, the key sniffer provides low level - * keyboard access. - * - * Key sniffers are provided to allow libraries to provide non-windowed user - * interaction. For example, the MUI library uses a key sniffer to do pop-up - * text entry. - * - * Return 1 to pass the key on to the next sniffer, the window manager, - * X-Plane, or whomever is down stream. Return 0 to consume the key. - * - * Warning: this API declares virtual keys as a signed character; however the - * VKEY #define macros in XPLMDefs.h define the vkeys using unsigned values - * (that is 0x80 instead of -0x80). So you may need to cast the incoming vkey - * to an unsigned char to get correct comparisons in C. - * - */ -typedef int (* XPLMKeySniffer_f)( - char inChar, - XPLMKeyFlags inFlags, - char inVirtualKey, - void * inRefcon); - -/* - * XPLMRegisterKeySniffer - * - * This routine registers a key sniffing callback. You specify whether you - * want to sniff before the window system, or only sniff keys the window - * system does not consume. You should ALMOST ALWAYS sniff non-control keys - * after the window system. When the window system consumes a key, it is - * because the user has "focused" a window. Consuming the key or taking - * action based on the key will produce very weird results. Returns 1 if - * successful. - * - */ -XPLM_API int XPLMRegisterKeySniffer( - XPLMKeySniffer_f inCallback, - int inBeforeWindows, - void * inRefcon); - -/* - * XPLMUnregisterKeySniffer - * - * This routine unregisters a key sniffer. You must unregister a key sniffer - * for every time you register one with the exact same signature. Returns 1 - * if successful. - * - */ -XPLM_API int XPLMUnregisterKeySniffer( - XPLMKeySniffer_f inCallback, - int inBeforeWindows, - void * inRefcon); - -/*************************************************************************** - * HOT KEYS - ***************************************************************************/ -/* - * Keystrokes that can be managed by others. These are lower-level than window - * keyboard handlers (i.e., callbacks you attach to your XPLMCreateWindow_t), - * but higher level than key sniffers. - * - */ - - -/* - * XPLMHotKey_f - * - * Your hot key callback simply takes a pointer of your choosing. - * - */ -typedef void (* XPLMHotKey_f)( - void * inRefcon); - -/* - * XPLMHotKeyID - * - * An opaque IDs used to identify a hot key. - * - */ -typedef void * XPLMHotKeyID; - -/* - * XPLMRegisterHotKey - * - * This routine registers a hot key. You specify your preferred key stroke - * virtual key/flag combination, a description of what your callback does (so - * other plug-ins can describe the plug-in to the user for remapping) and a - * callback function and opaque pointer to pass in). A new hot key ID is - * returned. During execution, the actual key associated with your hot key - * may change, but you are insulated from this. - * - */ -XPLM_API XPLMHotKeyID XPLMRegisterHotKey( - char inVirtualKey, - XPLMKeyFlags inFlags, - const char * inDescription, - XPLMHotKey_f inCallback, - void * inRefcon); - -/* - * XPLMUnregisterHotKey - * - * This API unregisters a hot key. You can only unregister your own hot keys. - * - */ -XPLM_API void XPLMUnregisterHotKey( - XPLMHotKeyID inHotKey); - -/* - * XPLMCountHotKeys - * - * Returns the number of current hot keys. - * - */ -XPLM_API int XPLMCountHotKeys(void); - -/* - * XPLMGetNthHotKey - * - * Returns a hot key by index, for iteration on all hot keys. - * - */ -XPLM_API XPLMHotKeyID XPLMGetNthHotKey( - int inIndex); - -/* - * XPLMGetHotKeyInfo - * - * Returns information about the hot key. Return NULL for any parameter you - * don't want info about. The description should be at least 512 chars long. - * - */ -XPLM_API void XPLMGetHotKeyInfo( - XPLMHotKeyID inHotKey, - char * outVirtualKey, /* Can be NULL */ - XPLMKeyFlags * outFlags, /* Can be NULL */ - char * outDescription, /* Can be NULL */ - XPLMPluginID * outPlugin); /* Can be NULL */ - -/* - * XPLMSetHotKeyCombination - * - * XPLMSetHotKeyCombination remaps a hot keys keystrokes. You may remap - * another plugin's keystrokes. - * - */ -XPLM_API void XPLMSetHotKeyCombination( - XPLMHotKeyID inHotKey, - char inVirtualKey, - XPLMKeyFlags inFlags); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/XPSDK301/CHeaders/XPLM/XPLMGraphics.h b/src/XPSDK301/CHeaders/XPLM/XPLMGraphics.h deleted file mode 100755 index 3588dcc4..00000000 --- a/src/XPSDK301/CHeaders/XPLM/XPLMGraphics.h +++ /dev/null @@ -1,405 +0,0 @@ -#ifndef _XPLMGraphics_h_ -#define _XPLMGraphics_h_ - -/* - * Copyright 2005-2012 Sandy Barbour and Ben Supnik - * - * All rights reserved. See license.txt for usage. - * - * X-Plane SDK Version: 2.1.1 - * - */ - -/* - * Graphics routines for X-Plane and OpenGL. - * - * A few notes on coordinate systems: - * - * X-Plane uses three kinds of coordinates. Global coordinates are specified - * as latitude, longitude and elevation. This coordinate system never changes - * but is not very precise. - * - * OpenGL (or 'local') coordinates are cartesian and shift with the plane. - * They offer more precision and are used for 3-d OpenGL drawing. The X axis - * is aligned east-west with positive X meaning east. The Y axis is aligned - * straight up and down at the point 0,0,0 (but since the earth is round it is - * not truly straight up and down at other points). The Z axis is aligned - * north-south at 0, 0, 0 with positive Z pointing south (but since the earth - * is round it isn't exactly north-south as you move east or west of 0, 0, 0). - * One unit is one meter and the point 0,0,0 is on the surface of the earth - * at sea level for some latitude and longitude picked by the sim such that - * the user's aircraft is reasonably nearby. - * - * Cockpit coordinates are 2d, with the X axis horizontal and the Y axis - * vertical. The point 0,0 is the bottom left and 1024,768 is the upper right - * of the screen. This is true no matter what resolution the user's monitor is - * in; when running in higher resolution, graphics will be scaled. - * - * Use X-Plane's routines to convert between global and local coordinates. Do - * not attempt to do this conversion yourself; the precise 'roundness' of - * X-Plane's physics model may not match your own, and (to make things - * weirder) the user can potentially customize the physics of the current - * planet. - * - */ - -#include "XPLMDefs.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/*************************************************************************** - * X-PLANE GRAPHICS - ***************************************************************************/ -/* - * These routines allow you to use OpenGL with X-Plane. - * - */ - - -/* - * XPLMTextureID - * - * XPLM Texture IDs name well-known textures in the sim for you to use. This - * allows you to recycle textures from X-Plane, saving VRAM. - * - */ -enum { - /* The bitmap that contains window outlines, button outlines, fonts, etc. */ - xplm_Tex_GeneralInterface = 0 - - /* The exterior paint for the user's aircraft (daytime). */ - ,xplm_Tex_AircraftPaint = 1 - - /* The exterior light map for the user's aircraft. */ - ,xplm_Tex_AircraftLiteMap = 2 - - -}; -typedef int XPLMTextureID; - -/* - * XPLMSetGraphicsState - * - * XPLMSetGraphicsState changes OpenGL's graphics state in a number of ways: - * - * inEnableFog - enables or disables fog, equivalent to: glEnable(GL_FOG); - * - * inNumberTexUnits - enables or disables a number of multitexturing units. If - * the number is 0, 2d texturing is disabled entirely, as in - * glDisable(GL_TEXTURE_2D); Otherwise, 2d texturing is enabled, and a - * number of multitexturing units are enabled sequentially, starting with - * unit 0, e.g. glActiveTextureARB(GL_TEXTURE0_ARB); glEnable - * (GL_TEXTURE_2D); - * - * inEnableLighting - enables or disables OpenGL lighting, e.g. - * glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); - * - * inEnableAlphaTesting - enables or disables the alpha test per pixel, e.g. - * glEnable(GL_ALPHA_TEST); - * - * inEnableAlphaBlending - enables or disables alpha blending per pixel, e.g. - * glEnable(GL_BLEND); - * - * inEnableDepthTesting - enables per pixel depth testing, as in - * glEnable(GL_DEPTH_TEST); - * - * inEnableDepthWriting - enables writing back of depth information to the - * depth bufffer, as in glDepthMask(GL_TRUE); - * - * The purpose of this function is to change OpenGL state while keeping - * X-Plane aware of the state changes; this keeps X-Plane from getting - * surprised by OGL state changes, and prevents X-Plane and plug-ins from - * having to set all state before all draws; XPLMSetGraphicsState internally - * skips calls to change state that is already properly enabled. - * - * X-Plane does not have a 'default' OGL state to plug-ins; plug-ins should - * totally set OGL state before drawing. Use XPLMSetGraphicsState instead of - * any of the above OpenGL calls. - * - * WARNING: Any routine that performs drawing (e.g. XPLMDrawString or widget - * code) may change X-Plane's state. Always set state before drawing after - * unknown code has executed. - * - */ -XPLM_API void XPLMSetGraphicsState( - int inEnableFog, - int inNumberTexUnits, - int inEnableLighting, - int inEnableAlphaTesting, - int inEnableAlphaBlending, - int inEnableDepthTesting, - int inEnableDepthWriting); - -/* - * XPLMBindTexture2d - * - * XPLMBindTexture2d changes what texture is bound to the 2d texturing target. - * This routine caches the current 2d texture across all texturing units in - * the sim and plug-ins, preventing extraneous binding. For example, consider - * several plug-ins running in series; if they all use the 'general interface' - * bitmap to do UI, calling this function will skip the rebinding of the - * general interface texture on all but the first plug-in, which can provide - * better frame rate son some graphics cards. - * - * inTextureID is the ID of the texture object to bind; inTextureUnit is a - * zero-based texture unit (e.g. 0 for the first one), up to a maximum of 4 - * units. (This number may increase in future versions of X-Plane.) - * - * Use this routine instead of glBindTexture(GL_TEXTURE_2D, ....); - * - */ -XPLM_API void XPLMBindTexture2d( - int inTextureNum, - int inTextureUnit); - -/* - * XPLMGenerateTextureNumbers - * - * This routine generates unused texture numbers that a plug-in can use to - * safely bind textures. Use this routine instead of glGenTextures; - * glGenTextures will allocate texture numbers in ranges that X-Plane reserves - * for its own use but does not always use; for example, it might provide an - * ID within the range of textures reserved for terrain...loading a new .env - * file as the plane flies might then cause X-Plane to use this texture ID. - * X-Plane will then overwrite the plug-ins texture. This routine returns - * texture IDs that are out of X-Plane's usage range. - * - */ -XPLM_API void XPLMGenerateTextureNumbers( - int * outTextureIDs, - int inCount); - -/* - * XPLMGetTexture - * - * XPLMGetTexture returns the OpenGL texture enumeration of an X-Plane texture - * based on a generic identifying code. For example, you can get the texture - * for X-Plane's UI bitmaps. This allows you to build new gauges that take - * advantage of X-Plane's textures, for smooth artwork integration and also - * saving texture memory. Note that the texture might not be loaded yet, - * depending on what the plane's panel contains. - * - * OPEN ISSUE: We really need a way to make sure X-Plane loads this texture if - * it isn't around, or at least a way to find out whether it is loaded or not. - * - */ -XPLM_API int XPLMGetTexture( - XPLMTextureID inTexture); - -/* - * XPLMWorldToLocal - * - * This routine translates coordinates from latitude, longitude, and altitude - * to local scene coordinates. Latitude and longitude are in decimal degrees, - * and altitude is in meters MSL (mean sea level). The XYZ coordinates are in - * meters in the local OpenGL coordinate system. - * - */ -XPLM_API void XPLMWorldToLocal( - double inLatitude, - double inLongitude, - double inAltitude, - double * outX, - double * outY, - double * outZ); - -/* - * XPLMLocalToWorld - * - * This routine translates a local coordinate triplet back into latitude, - * longitude, and altitude. Latitude and longitude are in decimal degrees, - * and altitude is in meters MSL (mean sea level). The XYZ coordinates are in - * meters in the local OpenGL coordinate system. - * - * NOTE: world coordinates are less precise than local coordinates; you should - * try to avoid round tripping from local to world and back. - * - */ -XPLM_API void XPLMLocalToWorld( - double inX, - double inY, - double inZ, - double * outLatitude, - double * outLongitude, - double * outAltitude); - -/* - * XPLMDrawTranslucentDarkBox - * - * This routine draws a translucent dark box, partially obscuring parts of the - * screen but making text easy to read. This is the same graphics primitive - * used by X-Plane to show text files and ATC info. - * - */ -XPLM_API void XPLMDrawTranslucentDarkBox( - int inLeft, - int inTop, - int inRight, - int inBottom); - -/*************************************************************************** - * X-PLANE TEXT - ***************************************************************************/ -/* - * - * - */ - -/* - * XPLMFontID - * - * X-Plane features some fixed-character fonts. Each font may have its own - * metrics. - * - * WARNING: Some of these fonts are no longer supported or may have changed - * geometries. For maximum copmatibility, see the comments below. - * - * Note: X-Plane 7 supports proportional-spaced fonts. Since no measuring - * routine is available yet, the SDK will normally draw using a fixed-width - * font. You can use a dataref to enable proportional font drawing on XP7 if - * you want to. - * - */ -enum { - /* Mono-spaced font for user interface. Available in all versions of the SDK. */ - xplmFont_Basic = 0 - - /* Deprecated, do not use. */ - ,xplmFont_Menus = 1 - - /* Deprecated, do not use. */ - ,xplmFont_Metal = 2 - - /* Deprecated, do not use. */ - ,xplmFont_Led = 3 - - /* Deprecated, do not use. */ - ,xplmFont_LedWide = 4 - - /* Deprecated, do not use. */ - ,xplmFont_PanelHUD = 5 - - /* Deprecated, do not use. */ - ,xplmFont_PanelEFIS = 6 - - /* Deprecated, do not use. */ - ,xplmFont_PanelGPS = 7 - - /* Deprecated, do not use. */ - ,xplmFont_RadiosGA = 8 - - /* Deprecated, do not use. */ - ,xplmFont_RadiosBC = 9 - - /* Deprecated, do not use. */ - ,xplmFont_RadiosHM = 10 - - /* Deprecated, do not use. */ - ,xplmFont_RadiosGANarrow = 11 - - /* Deprecated, do not use. */ - ,xplmFont_RadiosBCNarrow = 12 - - /* Deprecated, do not use. */ - ,xplmFont_RadiosHMNarrow = 13 - - /* Deprecated, do not use. */ - ,xplmFont_Timer = 14 - - /* Deprecated, do not use. */ - ,xplmFont_FullRound = 15 - - /* Deprecated, do not use. */ - ,xplmFont_SmallRound = 16 - - /* Deprecated, do not use. */ - ,xplmFont_Menus_Localized = 17 - -#if defined(XPLM200) - /* Proportional UI font. */ - ,xplmFont_Proportional = 18 - -#endif /* XPLM200 */ - -}; -typedef int XPLMFontID; - -/* - * XPLMDrawString - * - * This routine draws a NULL termianted string in a given font. Pass in the - * lower left pixel that the character is to be drawn onto. Also pass the - * character and font ID. This function returns the x offset plus the width of - * all drawn characters. The color to draw in is specified as a pointer to an - * array of three floating point colors, representing RGB intensities from 0.0 - * to 1.0. - * - */ -XPLM_API void XPLMDrawString( - float * inColorRGB, - int inXOffset, - int inYOffset, - char * inChar, - int * inWordWrapWidth, /* Can be NULL */ - XPLMFontID inFontID); - -/* - * XPLMDrawNumber - * - * This routine draws a number similar to the digit editing fields in - * PlaneMaker and data output display in X-Plane. Pass in a color, a - * position, a floating point value, and formatting info. Specify how many - * integer and how many decimal digits to show and whether to show a sign, as - * well as a character set. This routine returns the xOffset plus width of the - * string drawn. - * - */ -XPLM_API void XPLMDrawNumber( - float * inColorRGB, - int inXOffset, - int inYOffset, - double inValue, - int inDigits, - int inDecimals, - int inShowSign, - XPLMFontID inFontID); - -/* - * XPLMGetFontDimensions - * - * This routine returns the width and height of a character in a given font. - * It also tells you if the font only supports numeric digits. Pass NULL if - * you don't need a given field. Note that for a proportional font the width - * will be an arbitrary, hopefully average width. - * - */ -XPLM_API void XPLMGetFontDimensions( - XPLMFontID inFontID, - int * outCharWidth, /* Can be NULL */ - int * outCharHeight, /* Can be NULL */ - int * outDigitsOnly); /* Can be NULL */ - -#if defined(XPLM200) -/* - * XPLMMeasureString - * - * This routine returns the width in pixels of a string using a given font. - * The string is passed as a pointer plus length (and does not need to be null - * terminated); this is used to allow for measuring substrings. The return - * value is floating point; it is possible that future font drawing may allow - * for fractional pixels. - * - */ -XPLM_API float XPLMMeasureString( - XPLMFontID inFontID, - const char * inChar, - int inNumChars); -#endif /* XPLM200 */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/XPSDK301/CHeaders/XPLM/XPLMInstance.h b/src/XPSDK301/CHeaders/XPLM/XPLMInstance.h deleted file mode 100644 index 952b9912..00000000 --- a/src/XPSDK301/CHeaders/XPLM/XPLMInstance.h +++ /dev/null @@ -1,109 +0,0 @@ -#ifndef _XPLMInstance_h_ -#define _XPLMInstance_h_ - -/* - * Copyright 2005-2012 Sandy Barbour and Ben Supnik - * - * All rights reserved. See license.txt for usage. - * - * X-Plane SDK Version: 2.1.1 - * - */ - -/* - * This API provides instanced drawing of X-Plane objects (.obj files). In - * contrast to old drawing APIs, which required you to draw your own objects - * per-frame, the instancing API allows you to simply register an OBJ for - * drawing, then move or manipulate it later (as needed). - * - * This provides one tremendous benefit: it keeps all dataref operations for - * your object in one place. Because datarefs are main thread only, allowing - * dataref access anywhere is a serious performance bottleneck for the - * simulator---the whole simulator has to pause and wait for each dataref - * access. This performance penalty will only grow worse as X-Plane moves - * toward an ever more heavily multithreaded engine. - * - * The instancing API allows X-Plane to isolate all dataref manipulations for - * all plugin object drawing to one place, potentially providing huge - * performance gains. - * - * Here's how it works: - * - * When an instance is created, it provides a list of all datarefs you want to - * manipulate in for the OBJ in the future. This list of datarefs replaces the - * ad-hoc collections of dataref objects previously used by art assets. Then, - * per-frame, you can manipulate the instance by passing in a "block" of - * packed floats representing the current values of the datarefs for your - * instance. (Note that the ordering of this set of packed floats must exactly - * match the ordering of the datarefs when you created your instance.) - * - */ - -#include "XPLMDefs.h" -#include "XPLMScenery.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/*************************************************************************** - * Instance Creation and Destruction - ***************************************************************************/ -/* - * Registers and unregisters instances. - * - */ - - -/* - * XPLMInstanceRef - * - * An opaque handle to an instance. - * - */ -typedef void * XPLMInstanceRef; - -/* - * XPLMCreateInstance - * - * Registers an instance of an X-Plane object. - * - */ -XPLM_API XPLMInstanceRef XPLMCreateInstance( - XPLMObjectRef obj, - const char ** datarefs); - -/* - * XPLMDestroyInstance - * - * Unregisters an instance. - * - */ -XPLM_API void XPLMDestroyInstance( - XPLMInstanceRef instance); - -/*************************************************************************** - * Instance Manipulation - ***************************************************************************/ -/* - * - * - */ - -/* - * XPLMInstanceSetPosition - * - * Updates both the position of the instance and all datarefs you registered - * for it. - * - */ -XPLM_API void XPLMInstanceSetPosition( - XPLMInstanceRef instance, - const XPLMDrawInfo_t * new_position, - const float * data); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/XPSDK301/CHeaders/XPLM/XPLMMap.h b/src/XPSDK301/CHeaders/XPLM/XPLMMap.h deleted file mode 100644 index 86cf48b7..00000000 --- a/src/XPSDK301/CHeaders/XPLM/XPLMMap.h +++ /dev/null @@ -1,629 +0,0 @@ -#ifndef _XPLMMap_h_ -#define _XPLMMap_h_ - -/* - * Copyright 2005-2012 Sandy Barbour and Ben Supnik - * - * All rights reserved. See license.txt for usage. - * - * X-Plane SDK Version: 2.1.1 - * - */ - -/* - * This API allows you to create new layers within X-Plane maps. Your layers - * can draw arbitrary OpenGL, but they conveniently also have access to - * X-Plane's built-in icon and label drawing functions. - * - * As of X-Plane 11, map drawing happens in three stages: - * - * 1. backgrounds and "fill," 2. icons, and 3. labels. - * - * Thus, all background drawing gets layered beneath all icons, which likewise - * get layered beneath all labels. Within each stage, the map obeys a - * consistent layer ordering, such that "fill" layers (layers that cover a - * large amount of map area, like the terrain and clouds) appear beneath - * "markings" layers (like airport icons). This ensures that layers with fine - * details don't get obscured by layers with larger details. - * - * The XPLM map API reflects both aspects of this draw layering: you can - * register a layer as providing either markings or fill, and X-Plane will - * draw your fill layers beneath your markings layers (regardless of - * registration order). Likewise, you are guaranteed that your layer's icons - * (added from within an icon callback) will go above your layer's OpenGL - * drawing, and your labels will go above your icons. - * - * The XPLM guarantees that all plugin-created fill layers go on top of all - * native X-Plane fill layers, and all plugin-created markings layers go on - * top of all X-Plane markings layers (with the exception of the aircraft - * icons). It also guarantees that the draw order of your own plugin's layers - * will be consistent. But, for layers created by different plugins, the only - * guarantee is that we will draw all of one plugin's layers of each type - * (fill, then markings), then all of the others'; we don't guarantee which - * plugin's fill and markings layers go on top of the other's. - * - * As of X-Plane 11, maps use true cartographic projections for their drawing, - * and different maps may use different projections. For that reason, all - * drawing calls include an opaque handle for the projection you should use to - * do the drawing. Any time you would draw at a particular latitude/longitude, - * you'll need to ask the projection to translate that position into "map - * coordinates." (Note that the projection is guaranteed not to change between - * calls to your prepare-cache hook, so if you cache your map coordinates - * ahead of time, there's no need to re-project them when you actually draw.) - * - * In addition to mapping normal latitude/longitude locations into map - * coordinates, the projection APIs also let you know the current heading for - * north. (Since X-Plane 11 maps can rotate to match the heading of the user's - * aircraft, it's not safe to assume that north is at zero degrees rotation.) - * - */ - -#include "XPLMDefs.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#if defined(XPLM300) -/*************************************************************************** - * DRAWING CALLBACKS - ***************************************************************************/ -/* - * When you create a new map layer (using XPLMCreateMapLayer), you can provide - * any or all of these callbacks. They allow you to insert your own OpenGL - * drawing, text labels, and icons into the X-Plane map at the appropriate - * places, allowing your layer to behave as similarly to X-Plane's built-in - * layers as possible. - * - */ - - -/* - * XPLMMapLayerID - * - * This is an opaque handle for a plugin-created map layer. Pass it to the map - * drawing APIs from an appropriate callback to draw in the layer you created. - * - */ -typedef void * XPLMMapLayerID; - -/* - * XPLMMapProjectionID - * - * This is an opaque handle for a map projection. Pass it to the projection - * APIs to translate between map coordinates and latitude/longitudes. - * - */ -typedef void * XPLMMapProjectionID; - -/* - * XPLMMapStyle - * - * Indicates the visual style being drawn by the map. In X-Plane, the user can - * choose between a number of map types, and different map types may have use - * a different visual representation for the same elements (for instance, the - * visual style of the terrain layer changes drastically between the VFR and - * IFR layers), or certain layers may be disabled entirely in some map types - * (e.g., localizers are only visible in the IFR low-enroute style). - * - */ -enum { - xplm_MapStyle_VFR_Sectional = 0 - - ,xplm_MapStyle_IFR_LowEnroute = 1 - - ,xplm_MapStyle_IFR_HighEnroute = 2 - - -}; -typedef int XPLMMapStyle; - -/* - * XPLMMapDrawingCallback_f - * - * This is the OpenGL map drawing callback for plugin-created map layers. You - * can perform arbitrary OpenGL drawing from this callback, with one - * exception: changes to the Z-buffer are not permitted, and will result in - * map drawing errors. - * - * All drawing done from within this callback appears beneath all built-in - * X-Plane icons and labels, but above the built-in "fill" layers (layers - * providing major details, like terrain and water). Note, however, that the - * relative ordering between the drawing callbacks of different plugins is not - * guaranteed. - * - */ -typedef void (* XPLMMapDrawingCallback_f)( - XPLMMapLayerID inLayer, - const float * inMapBoundsLeftTopRightBottom, - float zoomRatio, - float mapUnitsPerUserInterfaceUnit, - XPLMMapStyle mapStyle, - XPLMMapProjectionID projection, - void * inRefcon); - -/* - * XPLMMapIconDrawingCallback_f - * - * This is the icon drawing callback that enables plugin-created map layers to - * draw icons using X-Plane's built-in icon drawing functionality. You can - * request an arbitrary number of PNG icons to be drawn via - * XPLMDrawMapIconFromSheet() from within this callback, but you may not - * perform any OpenGL drawing here. - * - * Icons enqueued by this function will appear above all OpenGL drawing - * (performed by your optional XPLMMapDrawingCallback_f), and above all - * built-in X-Plane map icons of the same layer type ("fill" or "markings," as - * determined by the XPLMMapLayerType in your XPLMCreateMapLayer_t). Note, - * however, that the relative ordering between the drawing callbacks of - * different plugins is not guaranteed. - * - */ -typedef void (* XPLMMapIconDrawingCallback_f)( - XPLMMapLayerID inLayer, - const float * inMapBoundsLeftTopRightBottom, - float zoomRatio, - float mapUnitsPerUserInterfaceUnit, - XPLMMapStyle mapStyle, - XPLMMapProjectionID projection, - void * inRefcon); - -/* - * XPLMMapLabelDrawingCallback_f - * - * This is the label drawing callback that enables plugin-created map layers - * to draw text labels using X-Plane's built-in labeling functionality. You - * can request an arbitrary number of text labels to be drawn via - * XPLMDrawMapLabel() from within this callback, but you may not perform any - * OpenGL drawing here. - * - * Labels enqueued by this function will appear above all OpenGL drawing - * (performed by your optional XPLMMapDrawingCallback_f), and above all - * built-in map icons and labels of the same layer type ("fill" or "markings," - * as determined by the XPLMMapLayerType in your XPLMCreateMapLayer_t). Note, - * however, that the relative ordering between the drawing callbacks of - * different plugins is not guaranteed. - * - */ -typedef void (* XPLMMapLabelDrawingCallback_f)( - XPLMMapLayerID inLayer, - const float * inMapBoundsLeftTopRightBottom, - float zoomRatio, - float mapUnitsPerUserInterfaceUnit, - XPLMMapStyle mapStyle, - XPLMMapProjectionID projection, - void * inRefcon); - -#endif /* XPLM300 */ -#if defined(XPLM300) -/*************************************************************************** - * LAYER MANAGEMENT CALLBACKS - ***************************************************************************/ -/* - * These are various "bookkeeping" callbacks that your map layer can receive - * (if you provide the callback in your XPLMCreateMapLayer_t). They allow you - * to manage the lifecycle of your layer, as well as cache any - * computationally-intensive preparation you might need for drawing. - * - */ - - -/* - * XPLMMapPrepareCacheCallback_f - * - * A callback used to allow you to cache whatever information your layer needs - * to draw in the current map area. - * - * This is called each time the map's total bounds change. This is typically - * triggered by new DSFs being loaded, such that X-Plane discards old, - * now-distant DSFs and pulls in new ones. At that point, the available bounds - * of the map also change to match the new DSF area. - * - * By caching just the information you need to draw in this area, your future - * draw calls can be made faster, since you'll be able to simply "splat" your - * precomputed information each frame. - * - * We guarantee that the map projection will not change between successive - * prepare cache calls, nor will any draw call give you bounds outside these - * total map bounds. So, if you cache the projected map coordinates of all the - * items you might want to draw in the total map area, you can be guaranteed - * that no draw call will be asked to do any new work. - * - */ -typedef void (* XPLMMapPrepareCacheCallback_f)( - XPLMMapLayerID inLayer, - const float * inTotalMapBoundsLeftTopRightBottom, - XPLMMapProjectionID projection, - void * inRefcon); - -/* - * XPLMMapWillBeDeletedCallback_f - * - * Called just before your map layer gets deleted. Because SDK-created map - * layers have the same lifetime as the X-Plane map that contains them, if the - * map gets unloaded from memory, your layer will too. - * - */ -typedef void (* XPLMMapWillBeDeletedCallback_f)( - XPLMMapLayerID inLayer, - void * inRefcon); - -#endif /* XPLM300 */ -#if defined(XPLM300) -/*************************************************************************** - * MAP LAYER CREATION AND DESTRUCTION - ***************************************************************************/ -/* - * Enables the creation of new map layers. Layers are created for a particular - * instance of the X-Plane map. For instance, if you want your layer to appear - * in both the normal map interface and the Instructor Operator Station (IOS), - * you would need two separate calls to XPLMCreateMapLayer(), with two - * different values for your XPLMCreateMapLayer_t::layer_name. - * - * Your layer's lifetime will be determined by the lifetime of the map it is - * created in. If the map is destroyed (on the X-Plane side), your layer will - * be too, and you'll receive a callback to your - * XPLMMapWillBeDeletedCallback_f. - * - */ - - -/* - * XPLMMapLayerType - * - * Indicates the type of map layer you are creating. Fill layers will always - * be drawn beneath markings layers. - * - */ -enum { - /* A layer that draws "fill" graphics, like weather patterns, terrain, etc. * - * Fill layers frequently cover a large portion of the visible map area. */ - xplm_MapLayer_Fill = 0 - - /* A layer that provides markings for particular map features, like NAVAIDs, * - * airports, etc. Even dense markings layers cover a small portion of the * - * total map area. */ - ,xplm_MapLayer_Markings = 1 - - -}; -typedef int XPLMMapLayerType; - -/* Globally unique identifier for X-Plane's Map window, used as the * - * mapToCreateLayerIn parameter in XPLMCreateMapLayer_t */ -#define XPLM_MAP_USER_INTERFACE "XPLM_MAP_USER_INTERFACE" - -/* Globally unique identifier for X-Plane's Instructor Operator Station * - * window, used as the mapToCreateLayerIn parameter in XPLMCreateMapLayer_t */ -#define XPLM_MAP_IOS "XPLM_MAP_IOS" - -/* - * XPLMCreateMapLayer_t - * - * This structure defines all of the parameters used to create a map layer - * using XPLMCreateMapLayer. The structure will be expanded in future SDK APIs - * to include more features. Always set the structSize member to the size of - * your struct in bytes! - * - * Each layer must be associated with exactly one map instance in X-Plane. - * That map, and that map alone, will call your callbacks. Likewise, when that - * map is deleted, your layer will be as well. - * - */ -typedef struct { - /* Used to inform XPLMCreateMapLayer() of the SDK version you compiled * - * against; should always be set to sizeof(XPLMCreateMapLayer_t) */ - int structSize; - /* Globally unique string identifying the map you want this layer to appear * - * in. As of XPLM300, this is limited to one of XPLM_MAP_USER_INTERFACE or * - * XPLM_MAP_IOS */ - const char * mapToCreateLayerIn; - /* The type of layer you are creating, used to determine draw order (all * - * plugin-created markings layers are drawn above all plugin-created fill * - * layers) */ - XPLMMapLayerType layerType; - /* Optional callback to inform you this layer is being deleted (due to its * - * owning map being destroyed) */ - XPLMMapWillBeDeletedCallback_f willBeDeletedCallback; - /* Optional callback you want to use to prepare your draw cache when the map * - * bounds change (set to NULL if you don't want this callback) */ - XPLMMapPrepareCacheCallback_f prepCacheCallback; - /* Optional callback you want to use for arbitrary OpenGL drawing, which goes * - * beneath all icons in the map's layering system (set to NULL if you don't * - * want this callback) */ - XPLMMapDrawingCallback_f drawCallback; - /* Optional callback you want to use for drawing icons, which go above all * - * built-in X-Plane icons (except the aircraft) in the map's layering system * - * (set to NULL if you don't want this callback) */ - XPLMMapIconDrawingCallback_f iconCallback; - /* Optional callback you want to use for drawing map labels, which go above * - * all built-in X-Plane icons and labels (except those of aircraft) in the * - * map's layering system (set to NULL if you don't want this callback) */ - XPLMMapLabelDrawingCallback_f labelCallback; - /* True if you want a checkbox to be created in the map UI to toggle this * - * layer on and off; false if the layer should simply always be enabled */ - int showUiToggle; - /* Short label to use for this layer in the user interface */ - const char * layerName; - /* A reference to arbitrary data that will be passed to your callbacks */ - void * refcon; -} XPLMCreateMapLayer_t; - -/* - * XPLMCreateMapLayer - * - * This routine creates a new map layer. You pass in an XPLMCreateMapLayer_t - * structure with all of the fields set in. You must set the structSize of - * the structure to the size of the actual structure you used. - * - * Returns NULL if the layer creation failed. This happens most frequently - * because the map you specified in your - * XPLMCreateMapLayer_t::mapToCreateLayerIn field doesn't exist (that is, if - * XPLMMapExists() returns 0 for the specified map). You can use - * XPLMRegisterMapCreationHook() to get a notification each time a new map is - * opened in X-Plane, at which time you can create layers in it. - * - */ -XPLM_API XPLMMapLayerID XPLMCreateMapLayer( - XPLMCreateMapLayer_t * inParams); - -/* - * XPLMDestroyMapLayer - * - * Destroys a map layer you created (calling your - * XPLMMapWillBeDeletedCallback_f if applicable). Returns true if a deletion - * took place. - * - */ -XPLM_API int XPLMDestroyMapLayer( - XPLMMapLayerID inLayer); - -/* - * XPLMMapCreatedCallback_f - * - * A callback to notify your plugin that a new map has been created in - * X-Plane. This is the best time to add a custom map layer using - * XPLMCreateMapLayer(). - * - * No OpenGL drawing is permitted within this callback. - * - */ -typedef void (* XPLMMapCreatedCallback_f)( - const char * mapIdentifier, - void * refcon); - -/* - * XPLMRegisterMapCreationHook - * - * Registers your callback to receive a notification each time a new map is - * constructed in X-Plane. This callback is the best time to add your custom - * map layer using XPLMCreateMapLayer(). - * - * Note that you will not be notified about any maps that already exist---you - * can use XPLMMapExists() to check for maps that were created previously. - * - */ -XPLM_API void XPLMRegisterMapCreationHook( - XPLMMapCreatedCallback_f callback, - void * refcon); - -/* - * XPLMMapExists - * - * Returns 1 if the map with the specified identifier already exists in - * X-Plane. In that case, you can safely call XPLMCreateMapLayer() specifying - * that your layer should be added to that map. - * - */ -XPLM_API int XPLMMapExists( - const char * mapIdentifier); - -#endif /* XPLM300 */ -#if defined(XPLM300) -/*************************************************************************** - * MAP DRAWING - ***************************************************************************/ -/* - * These APIs are only valid from within a map drawing callback (one of - * XPLMIconDrawingCallback_t or XPLMMapLabelDrawingCallback_f). Your drawing - * callbacks are registered when you create a new map layer as part of your - * XPLMCreateMapLayer_t. The functions here hook into X-Plane's built-in map - * drawing functionality for icons and labels, so that you get a consistent - * style with the rest of the X-Plane map. - * - * Note that the X-Plane 11 map introduces a strict ordering: layers of type - * xplm_MapLayer_Fill get drawn beneath all xplm_MapLayer_Markings layers. - * Likewise, all OpenGL drawing (performed in your layer's - * XPLMMapDrawingCallback_f) will appear beneath any icons and labels you - * draw. - * - */ - - -/* - * XPLMMapOrientation - * - * Indicates whether a map element should be match its rotation to the map - * itself, or to the user interface. For instance, the map itself may be - * rotated such that "up" matches the user's aircraft, but you may want to - * draw a text label such that it is always rotated zero degrees relative to - * the user's perspective. In that case, you would have it draw with UI - * orientation. - * - */ -enum { - /* Orient such that a 0 degree rotation matches the map's north */ - xplm_MapOrientation_Map = 0 - - /* Orient such that a 0 degree rotation is "up" relative to the user interface */ - ,xplm_MapOrientation_UI = 1 - - -}; -typedef int XPLMMapOrientation; - -/* - * XPLMDrawMapIconFromSheet - * - * Enables plugin-created map layers to draw PNG icons using X-Plane's - * built-in icon drawing functionality. Only valid from within an - * XPLMIconDrawingCallback_t (but you can request an arbitrary number of icons - * to be drawn from within your callback). - * - * X-Plane will automatically manage the memory for your texture so that it - * only has to be loaded from disk once as long as you continue drawing it - * per-frame. (When you stop drawing it, the memory may purged in a "garbage - * collection" pass, require a load from disk in the future.) - * - * Instead of having X-Plane draw a full PNG, this method allows you to use UV - * coordinates to request a portion of the image to be drawn. This allows you - * to use a single texture load (of an icon sheet, for example) to draw many - * icons. Doing so is much more efficient than drawing a dozen different small - * PNGs. - * - * The UV coordinates used here treat the texture you load as being comprised - * of a number of identically sized "cells." You specify the width and height - * in cells (ds and dt, respectively), as well as the coordinates within the - * cell grid for the sub-image you'd like to draw. - * - * Note that you can use different ds and dt values in subsequent calls with - * the same texture sheet. This enables you to use icons of different sizes in - * the same sheet if you arrange them properly in the PNG. - * - * This function is only valid from within an XPLMIconDrawingCallback_t (but - * you can request an arbitrary number of icons to be drawn from within your - * callback). - * - */ -XPLM_API void XPLMDrawMapIconFromSheet( - XPLMMapLayerID layer, - const char * inPngPath, - int s, - int t, - int ds, - int dt, - float mapX, - float mapY, - XPLMMapOrientation orientation, - float rotationDegrees, - float mapWidth); - -/* - * XPLMDrawMapLabel - * - * Enables plugin-created map layers to draw text labels using X-Plane's - * built-in labeling functionality. Only valid from within an - * XPLMMapLabelDrawingCallback_f (but you can request an arbitrary number of - * text labels to be drawn from within your callback). - * - */ -XPLM_API void XPLMDrawMapLabel( - XPLMMapLayerID layer, - const char * inText, - float mapX, - float mapY, - XPLMMapOrientation orientation, - float rotationDegrees); - -#endif /* XPLM300 */ -#if defined(XPLM300) -/*************************************************************************** - * MAP PROJECTIONS - ***************************************************************************/ -/* - * As of X-Plane 11, the map draws using true cartographic projections, and - * different maps may use different projections. Thus, to draw at a particular - * latitude and longitude, you must first transform your real-world - * coordinates into map coordinates. - * - * The map projection is also responsible for giving you the current scale of - * the map. That is, the projection can tell you how many map units correspond - * to 1 meter at a given point. - * - * Finally, the map projection can give you the current rotation of the map. - * Since X-Plane 11 maps can rotate to match the heading of the aircraft, the - * map's rotation can potentially change every frame. - * - */ - - -/* - * XPLMMapProject - * - * Projects a latitude/longitude into map coordinates. This is the inverse of - * XPLMMapUnproject(). - * - * Only valid from within a map layer callback (one of - * XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, - * XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) - * - */ -XPLM_API void XPLMMapProject( - XPLMMapProjectionID projection, - double latitude, - double longitude, - float * outX, - float * outY); - -/* - * XPLMMapUnproject - * - * Transforms map coordinates back into a latitude and longitude. This is the - * inverse of XPLMMapProject(). - * - * Only valid from within a map layer callback (one of - * XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, - * XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) - * - */ -XPLM_API void XPLMMapUnproject( - XPLMMapProjectionID projection, - float mapX, - float mapY, - double * outLatitude, - double * outLongitude); - -/* - * XPLMMapScaleMeter - * - * Returns the number of map units that correspond to a distance of one meter - * at a given set of map coordinates. - * - * Only valid from within a map layer callback (one of - * XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, - * XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) - * - */ -XPLM_API float XPLMMapScaleMeter( - XPLMMapProjectionID projection, - float mapX, - float mapY); - -/* - * XPLMMapGetNorthHeading - * - * Returns the heading (in degrees clockwise from "up") that corresponds to - * north at a given point on the map. In other words, if your runway has a - * true heading of 360, you would use "north" as the Cartesian angle at which - * to draw the runway on the map. (You would add the result of - * XPLMMapGetNorthHeading() to your true heading to get the map angle.) - * - * This is necessary becuase X-Plane's map can be rotated to match your - * aircraft's orientation; north is not always "up." - * - * Only valid from within a map layer callback (one of - * XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, - * XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) - * - */ -XPLM_API float XPLMMapGetNorthHeading( - XPLMMapProjectionID projection, - float mapX, - float mapY); - -#endif /* XPLM300 */ -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/XPSDK301/CHeaders/XPLM/XPLMMenus.h b/src/XPSDK301/CHeaders/XPLM/XPLMMenus.h deleted file mode 100755 index 935abb58..00000000 --- a/src/XPSDK301/CHeaders/XPLM/XPLMMenus.h +++ /dev/null @@ -1,291 +0,0 @@ -#ifndef _XPLMMenus_h_ -#define _XPLMMenus_h_ - -/* - * Copyright 2005-2012 Sandy Barbour and Ben Supnik - * - * All rights reserved. See license.txt for usage. - * - * X-Plane SDK Version: 2.1.1 - * - */ - -/* - * Theory of Operation - * - * Plug-ins can create menus in the menu bar of X-Plane. This is done by - * creating a menu and then creating items. Menus are referred to by an - * opaque ID. Items are referred to by (zero-based) index number. - * - * Menus are "sandboxed" between plugins---no plugin can access the menus of - * any other plugin. Furthermore, all menu indices are relative to your - * plugin's menus only; if your plugin creates two sub-menus in the Plugins - * menu at different times, it doesn't matter how many other plugins also - * create sub-menus of Plugins in the intervening time: your sub-menus will be - * given menu indices 0 and 1. (The SDK does some work in the back-end to - * filter out menus that are irrelevant to your plugin in order to deliver - * this consistency for each plugin.) - * - * When you create a menu item, you specify how we should handle clicks on - * that menu item. You can either have the XPLM trigger a callback (the - * XPLMMenuHandler_f associated with the menu that contains the item), or you - * can simply have a command be triggered (with no associated call to your - * menu handler). The advantage of the latter method is that X-Plane will - * display any keyboard shortcuts associated with the command. (In contrast, - * there are no keyboard shortcuts associated with menu handler callbacks with - * specific parameters.) - * - */ - -#include "XPLMDefs.h" -#include "XPLMUtilities.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/*************************************************************************** - * XPLM MENUS - ***************************************************************************/ -/* - * - * - */ - -/* - * XPLMMenuCheck - * - * These enumerations define the various 'check' states for an X-Plane menu. - * 'checking' in X-Plane actually appears as a light which may or may not be - * lit. So there are three possible states. - * - */ -enum { - /* there is no symbol to the left of the menu item. */ - xplm_Menu_NoCheck = 0 - - /* the menu has a mark next to it that is unmarked (not lit). */ - ,xplm_Menu_Unchecked = 1 - - /* the menu has a mark next to it that is checked (lit). */ - ,xplm_Menu_Checked = 2 - - -}; -typedef int XPLMMenuCheck; - -/* - * XPLMMenuID - * - * This is a unique ID for each menu you create. - * - */ -typedef void * XPLMMenuID; - -/* - * XPLMMenuHandler_f - * - * A menu handler function takes two reference pointers, one for the menu - * (specified when the menu was created) and one for the item (specified when - * the item was created). - * - */ -typedef void (* XPLMMenuHandler_f)( - void * inMenuRef, - void * inItemRef); - -/* - * XPLMFindPluginsMenu - * - * This function returns the ID of the plug-ins menu, which is created for you - * at startup. - * - */ -XPLM_API XPLMMenuID XPLMFindPluginsMenu(void); - -#if defined(XPLM300) -/* - * XPLMFindAircraftMenu - * - * This function returns the ID of the menu for the currently-loaded aircraft, - * used for showing aircraft-specific commands. - * - * The aircraft menu is created by X-Plane at startup, but it remains hidden - * until it is populated via XPLMAppendMenuItem() or - * XPLMAppendMenuItemWithCommand(). - * - * Only plugins loaded with the user's current aircraft are allowed to access - * the aircraft menu. For all other plugins, this will return NULL, and any - * attempts to add menu items to it will fail. - * - */ -XPLM_API XPLMMenuID XPLMFindAircraftMenu(void); -#endif /* XPLM300 */ - -/* - * XPLMCreateMenu - * - * This function creates a new menu and returns its ID. It returns NULL if - * the menu cannot be created. Pass in a parent menu ID and an item index to - * create a submenu, or NULL for the parent menu to put the menu in the menu - * bar. The menu's name is only used if the menu is in the menubar. You also - * pass a handler function and a menu reference value. Pass NULL for the - * handler if you do not need callbacks from the menu (for example, if it only - * contains submenus). - * - * Important: you must pass a valid, non-empty menu title even if the menu is - * a submenu where the title is not visible. - * - */ -XPLM_API XPLMMenuID XPLMCreateMenu( - const char * inName, - XPLMMenuID inParentMenu, - int inParentItem, - XPLMMenuHandler_f inHandler, - void * inMenuRef); - -/* - * XPLMDestroyMenu - * - * This function destroys a menu that you have created. Use this to remove a - * submenu if necessary. (Normally this function will not be necessary.) - * - */ -XPLM_API void XPLMDestroyMenu( - XPLMMenuID inMenuID); - -/* - * XPLMClearAllMenuItems - * - * This function removes all menu items from a menu, allowing you to rebuild - * it. Use this function if you need to change the number of items on a menu. - * - */ -XPLM_API void XPLMClearAllMenuItems( - XPLMMenuID inMenuID); - -/* - * XPLMAppendMenuItem - * - * This routine appends a new menu item to the bottom of a menu and returns - * its index. Pass in the menu to add the item to, the items name, and a void - * * ref for this item. - * - * Returns a negative index if the append failed (due to an invalid parent - * menu argument). - * - * Note that all menu indices returned are relative to your plugin's menus - * only; if your plugin creates two sub-menus in the Plugins menu at different - * times, it doesn't matter how many other plugins also create sub-menus of - * Plugins in the intervening time: your sub-menus will be given menu indices - * 0 and 1. (The SDK does some work in the back-end to filter out menus that - * are irrelevant to your plugin in order to deliver this consistency for each - * plugin.) - * - */ -XPLM_API int XPLMAppendMenuItem( - XPLMMenuID inMenu, - const char * inItemName, - void * inItemRef, - int inDeprecatedAndIgnored); - -#if defined(XPLM300) -/* - * XPLMAppendMenuItemWithCommand - * - * Like XPLMAppendMenuItem(), but instead of the new menu item triggering the - * XPLMMenuHandler_f of the containiner menu, it will simply execute the - * command you pass in. Using a command for your menu item allows the user to - * bind a keyboard shortcut to the command and see that shortcut represented - * in the menu. - * - * Returns a negative index if the append failed (due to an invalid parent - * menu argument). - * - * Like XPLMAppendMenuItem(), all menu indices are relative to your plugin's - * menus only. - * - */ -XPLM_API int XPLMAppendMenuItemWithCommand( - XPLMMenuID inMenu, - const char * inItemName, - XPLMCommandRef inCommandToExecute); -#endif /* XPLM300 */ - -/* - * XPLMAppendMenuSeparator - * - * This routine adds a separator to the end of a menu. - * - * Returns a negative index if the append failed (due to an invalid parent - * menu argument). - * - */ -XPLM_API void XPLMAppendMenuSeparator( - XPLMMenuID inMenu); - -/* - * XPLMSetMenuItemName - * - * This routine changes the name of an existing menu item. Pass in the menu - * ID and the index of the menu item. - * - */ -XPLM_API void XPLMSetMenuItemName( - XPLMMenuID inMenu, - int inIndex, - const char * inItemName, - int inForceEnglish); - -/* - * XPLMCheckMenuItem - * - * Set whether a menu item is checked. Pass in the menu ID and item index. - * - */ -XPLM_API void XPLMCheckMenuItem( - XPLMMenuID inMenu, - int index, - XPLMMenuCheck inCheck); - -/* - * XPLMCheckMenuItemState - * - * This routine returns whether a menu item is checked or not. A menu item's - * check mark may be on or off, or a menu may not have an icon at all. - * - */ -XPLM_API void XPLMCheckMenuItemState( - XPLMMenuID inMenu, - int index, - XPLMMenuCheck * outCheck); - -/* - * XPLMEnableMenuItem - * - * Sets whether this menu item is enabled. Items start out enabled. - * - */ -XPLM_API void XPLMEnableMenuItem( - XPLMMenuID inMenu, - int index, - int enabled); - -#if defined(XPLM210) -/* - * XPLMRemoveMenuItem - * - * Removes one item from a menu. Note that all menu items below are moved up - * one; your plugin must track the change in index numbers. - * - */ -XPLM_API void XPLMRemoveMenuItem( - XPLMMenuID inMenu, - int inIndex); -#endif /* XPLM210 */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/XPSDK301/CHeaders/XPLM/XPLMNavigation.h b/src/XPSDK301/CHeaders/XPLM/XPLMNavigation.h deleted file mode 100755 index 90af7972..00000000 --- a/src/XPSDK301/CHeaders/XPLM/XPLMNavigation.h +++ /dev/null @@ -1,371 +0,0 @@ -#ifndef _XPLMNavigation_h_ -#define _XPLMNavigation_h_ - -/* - * Copyright 2005-2012 Sandy Barbour and Ben Supnik - * - * All rights reserved. See license.txt for usage. - * - * X-Plane SDK Version: 2.1.1 - * - */ - -/* - * XPLMNavigation - THEORY OF OPERATION - * - * The XPLM Navigation APIs give you some access to the navigation databases - * inside X-Plane. X-Plane stores all navigation information in RAM, so by - * using these APIs you can gain access to most information without having to - * go to disk or parse the files yourself. - * - * You can also use this API to program the FMS. You must use the navigation - * APIs to find the nav-aids you want to program into the FMS, since the FMS - * is powered internally by X-Plane's navigation database. - * - */ - -#include "XPLMDefs.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/*************************************************************************** - * NAVIGATION DATABASE ACCESS - ***************************************************************************/ -/* - * - * - */ - -/* - * XPLMNavType - * - * These enumerations define the different types of navaids. They are each - * defined with a separate bit so that they may be bit-wise added together to - * form sets of nav-aid types. - * - * NOTE: xplm_Nav_LatLon is a specific lat-lon coordinate entered into the - * FMS. It will not exist in the database, and cannot be programmed into the - * FMS. Querying the FMS for navaids will return it. Use - * XPLMSetFMSEntryLatLon to set a lat/lon waypoint. - * - */ -enum { - xplm_Nav_Unknown = 0 - - ,xplm_Nav_Airport = 1 - - ,xplm_Nav_NDB = 2 - - ,xplm_Nav_VOR = 4 - - ,xplm_Nav_ILS = 8 - - ,xplm_Nav_Localizer = 16 - - ,xplm_Nav_GlideSlope = 32 - - ,xplm_Nav_OuterMarker = 64 - - ,xplm_Nav_MiddleMarker = 128 - - ,xplm_Nav_InnerMarker = 256 - - ,xplm_Nav_Fix = 512 - - ,xplm_Nav_DME = 1024 - - ,xplm_Nav_LatLon = 2048 - - -}; -typedef int XPLMNavType; - -/* - * XPLMNavRef - * - * XPLMNavRef is an iterator into the navigation database. The navigation - * database is essentially an array, but it is not necessarily densely - * populated. The only assumption you can safely make is that like-typed - * nav-aids are grouped together. - * - * Use XPLMNavRef to refer to a nav-aid. - * - * XPLM_NAV_NOT_FOUND is returned by functions that return an XPLMNavRef when - * the iterator must be invalid. - * - */ -typedef int XPLMNavRef; - -#define XPLM_NAV_NOT_FOUND -1 - -/* - * XPLMGetFirstNavAid - * - * This returns the very first navaid in the database. Use this to traverse - * the entire database. Returns XPLM_NAV_NOT_FOUND if the nav database is - * empty. - * - */ -XPLM_API XPLMNavRef XPLMGetFirstNavAid(void); - -/* - * XPLMGetNextNavAid - * - * Given a nav aid ref, this routine returns the next navaid. It returns - * XPLM_NAV_NOT_FOUND if the nav aid passed in was invalid or if the navaid - * passed in was the last one in the database. Use this routine to iterate - * across all like-typed navaids or the entire database. - * - * WARNING: due to a bug in the SDK, when fix loading is disabled in the - * rendering settings screen, calling this routine with the last airport - * returns a bogus nav aid. Using this nav aid can crash X-Plane. - * - */ -XPLM_API XPLMNavRef XPLMGetNextNavAid( - XPLMNavRef inNavAidRef); - -/* - * XPLMFindFirstNavAidOfType - * - * This routine returns the ref of the first navaid of the given type in the - * database or XPLM_NAV_NOT_FOUND if there are no navaids of that type in the - * database. You must pass exactly one nav aid type to this routine. - * - * WARNING: due to a bug in the SDK, when fix loading is disabled in the - * rendering settings screen, calling this routine with fixes returns a bogus - * nav aid. Using this nav aid can crash X-Plane. - * - */ -XPLM_API XPLMNavRef XPLMFindFirstNavAidOfType( - XPLMNavType inType); - -/* - * XPLMFindLastNavAidOfType - * - * This routine returns the ref of the last navaid of the given type in the - * database or XPLM_NAV_NOT_FOUND if there are no navaids of that type in the - * database. You must pass exactly one nav aid type to this routine. - * - * WARNING: due to a bug in the SDK, when fix loading is disabled in the - * rendering settings screen, calling this routine with fixes returns a bogus - * nav aid. Using this nav aid can crash X-Plane. - * - */ -XPLM_API XPLMNavRef XPLMFindLastNavAidOfType( - XPLMNavType inType); - -/* - * XPLMFindNavAid - * - * This routine provides a number of searching capabilities for the nav - * database. XPLMFindNavAid will search through every nav aid whose type is - * within inType (multiple types may be added together) and return any - * nav-aids found based on the following rules: - * - * If inLat and inLon are not NULL, the navaid nearest to that lat/lon will be - * returned, otherwise the last navaid found will be returned. - * - * If inFrequency is not NULL, then any navaids considered must match this - * frequency. Note that this will screen out radio beacons that do not have - * frequency data published (like inner markers) but not fixes and airports. - * - * If inNameFragment is not NULL, only navaids that contain the fragment in - * their name will be returned. - * - * If inIDFragment is not NULL, only navaids that contain the fragment in - * their IDs will be returned. - * - * This routine provides a simple way to do a number of useful searches: - * - * Find the nearest navaid on this frequency. Find the nearest airport. Find - * the VOR whose ID is "KBOS". Find the nearest airport whose name contains - * "Chicago". - * - */ -XPLM_API XPLMNavRef XPLMFindNavAid( - const char * inNameFragment, /* Can be NULL */ - const char * inIDFragment, /* Can be NULL */ - float * inLat, /* Can be NULL */ - float * inLon, /* Can be NULL */ - int * inFrequency, /* Can be NULL */ - XPLMNavType inType); - -/* - * XPLMGetNavAidInfo - * - * This routine returns information about a navaid. Any non-null field is - * filled out with information if it is available. - * - * Frequencies are in the nav.dat convention as described in the X-Plane nav - * database FAQ: NDB frequencies are exact, all others are multiplied by 100. - * - * The buffer for IDs should be at least 6 chars and the buffer for names - * should be at least 41 chars, but since these values are likely to go up, I - * recommend passing at least 32 chars for IDs and 256 chars for names when - * possible. - * - * The outReg parameter tells if the navaid is within the local "region" of - * loaded DSFs. (This information may not be particularly useful to plugins.) - * The parameter is a single byte value 1 for true or 0 for false, not a C - * string. - * - */ -XPLM_API void XPLMGetNavAidInfo( - XPLMNavRef inRef, - XPLMNavType * outType, /* Can be NULL */ - float * outLatitude, /* Can be NULL */ - float * outLongitude, /* Can be NULL */ - float * outHeight, /* Can be NULL */ - int * outFrequency, /* Can be NULL */ - float * outHeading, /* Can be NULL */ - char * outID, /* Can be NULL */ - char * outName, /* Can be NULL */ - char * outReg); /* Can be NULL */ - -/*************************************************************************** - * FLIGHT MANAGEMENT COMPUTER - ***************************************************************************/ -/* - * Note: the FMS works based on an array of entries. Indices into the array - * are zero-based. Each entry is a nav-aid plus an altitude. The FMS tracks - * the currently displayed entry and the entry that it is flying to. - * - * The FMS must be programmed with contiguous entries, so clearing an entry at - * the end shortens the effective flight plan. There is a max of 100 - * waypoints in the flight plan. - * - */ - - -/* - * XPLMCountFMSEntries - * - * This routine returns the number of entries in the FMS. - * - */ -XPLM_API int XPLMCountFMSEntries(void); - -/* - * XPLMGetDisplayedFMSEntry - * - * This routine returns the index of the entry the pilot is viewing. - * - */ -XPLM_API int XPLMGetDisplayedFMSEntry(void); - -/* - * XPLMGetDestinationFMSEntry - * - * This routine returns the index of the entry the FMS is flying to. - * - */ -XPLM_API int XPLMGetDestinationFMSEntry(void); - -/* - * XPLMSetDisplayedFMSEntry - * - * This routine changes which entry the FMS is showing to the index specified. - * * - */ -XPLM_API void XPLMSetDisplayedFMSEntry( - int inIndex); - -/* - * XPLMSetDestinationFMSEntry - * - * This routine changes which entry the FMS is flying the aircraft toward. - * - */ -XPLM_API void XPLMSetDestinationFMSEntry( - int inIndex); - -/* - * XPLMGetFMSEntryInfo - * - * This routine returns information about a given FMS entry. A reference to a - * navaid can be returned allowing you to find additional information (such as - * a frequency, ILS heading, name, etc.). Some information is available - * immediately. For a lat/lon entry, the lat/lon is returned by this routine - * but the navaid cannot be looked up (and the reference will be - * XPLM_NAV_NOT_FOUND. FMS name entry buffers should be at least 256 chars in - * length. - * - */ -XPLM_API void XPLMGetFMSEntryInfo( - int inIndex, - XPLMNavType * outType, /* Can be NULL */ - char * outID, /* Can be NULL */ - XPLMNavRef * outRef, /* Can be NULL */ - int * outAltitude, /* Can be NULL */ - float * outLat, /* Can be NULL */ - float * outLon); /* Can be NULL */ - -/* - * XPLMSetFMSEntryInfo - * - * This routine changes an entry in the FMS to have the destination navaid - * passed in and the altitude specified. Use this only for airports, fixes, - * and radio-beacon navaids. Currently of radio beacons, the FMS can only - * support VORs and NDBs. Use the routines below to clear or fly to a lat/lon. - * - */ -XPLM_API void XPLMSetFMSEntryInfo( - int inIndex, - XPLMNavRef inRef, - int inAltitude); - -/* - * XPLMSetFMSEntryLatLon - * - * This routine changes the entry in the FMS to a lat/lon entry with the given - * coordinates. - * - */ -XPLM_API void XPLMSetFMSEntryLatLon( - int inIndex, - float inLat, - float inLon, - int inAltitude); - -/* - * XPLMClearFMSEntry - * - * This routine clears the given entry, potentially shortening the flight - * plan. - * - */ -XPLM_API void XPLMClearFMSEntry( - int inIndex); - -/*************************************************************************** - * GPS RECEIVER - ***************************************************************************/ -/* - * These APIs let you read data from the GPS unit. - * - */ - -/* - * XPLMGetGPSDestinationType - * - * This routine returns the type of the currently selected GPS destination, - * one of fix, airport, VOR or NDB. - * - */ -XPLM_API XPLMNavType XPLMGetGPSDestinationType(void); - -/* - * XPLMGetGPSDestination - * - * This routine returns the current GPS destination. - * - */ -XPLM_API XPLMNavRef XPLMGetGPSDestination(void); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/XPSDK301/CHeaders/XPLM/XPLMPlanes.h b/src/XPSDK301/CHeaders/XPLM/XPLMPlanes.h deleted file mode 100755 index 26879082..00000000 --- a/src/XPSDK301/CHeaders/XPLM/XPLMPlanes.h +++ /dev/null @@ -1,275 +0,0 @@ -#ifndef _XPLMPlanes_h_ -#define _XPLMPlanes_h_ - -/* - * Copyright 2005-2012 Sandy Barbour and Ben Supnik - * - * All rights reserved. See license.txt for usage. - * - * X-Plane SDK Version: 2.1.1 - * - */ - -/* - * The XPLMPlanes APIs allow you to control the various aircraft in X-Plane, - * both the user's and the sim's. - * - */ - -#include "XPLMDefs.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/*************************************************************************** - * USER AIRCRAFT ACCESS - ***************************************************************************/ -/* - * - * - */ - -/* - * XPLMSetUsersAircraft - * - * This routine changes the user's aircraft. Note that this will reinitialize - * the user to be on the nearest airport's first runway. Pass in a full path - * (hard drive and everything including the .acf extension) to the .acf file. - * - */ -XPLM_API void XPLMSetUsersAircraft( - const char * inAircraftPath); -/* - * XPLMPlaceUserAtAirport - * - * This routine places the user at a given airport. Specify the airport by - * its ICAO code (e.g. 'KBOS'). - * - */ -XPLM_API void XPLMPlaceUserAtAirport( - const char * inAirportCode); -#if defined(XPLM300) -/* - * XPLMPlaceUserAtLocation - * - * Places the user at a specific location after performing any necessary - * scenery loads. - * - * As with in-air starts initiated from the X-Plane user interface, the - * aircraft will always start with its engines running, regardless of the - * user's preferences (i.e., regardless of what the dataref - * sim/operation/prefs/startup_running says). - * - */ -XPLM_API void XPLMPlaceUserAtLocation( - double latitudeDegrees, - double longitudeDegrees, - float elevationMetersMSL, - float headingDegreesTrue, - float speedMetersPerSecond); -#endif /* XPLM300 */ -/*************************************************************************** - * GLOBAL AIRCRAFT ACCESS - ***************************************************************************/ -/* - * - * - */ - -/* The user's aircraft is always index 0. */ -#define XPLM_USER_AIRCRAFT 0 -/* - * XPLMPlaneDrawState_t - * - * This structure contains additional plane parameter info to be passed to - * draw plane. Make sure to fill in the size of the structure field with - * sizeof(XPLMDrawPlaneState_t) so that the XPLM can tell how many fields you - * knew about when compiling your plugin (since more fields may be added - * later). - * - * Most of these fields are ratios from 0 to 1 for control input. X-Plane - * calculates what the actual controls look like based on the .acf file for - * that airplane. Note for the yoke inputs, this is what the pilot of the - * plane has commanded (post artificial stability system if there were one) - * and affects aelerons, rudder, etc. It is not necessarily related to the - * actual position of the plane! - * - */ -typedef struct { - /* The size of the draw state struct. */ - int structSize; - /* A ratio from [0..1] describing how far the landing gear is extended. */ - float gearPosition; - /* Ratio of flap deployment, 0 = up, 1 = full deploy. */ - float flapRatio; - /* Ratio of spoiler deployment, 0 = none, 1 = full deploy. */ - float spoilerRatio; - /* Ratio of speed brake deployment, 0 = none, 1 = full deploy. */ - float speedBrakeRatio; - /* Ratio of slat deployment, 0 = none, 1 = full deploy. */ - float slatRatio; - /* Wing sweep ratio, 0 = forward, 1 = swept. */ - float wingSweep; - /* Thrust power, 0 = none, 1 = full fwd, -1 = full reverse. */ - float thrust; - /* Total pitch input for this plane. */ - float yokePitch; - /* Total Heading input for this plane. */ - float yokeHeading; - /* Total Roll input for this plane. */ - float yokeRoll; -} XPLMPlaneDrawState_t; -/* - * XPLMCountAircraft - * - * This function returns the number of aircraft X-Plane is capable of having, - * as well as the number of aircraft that are currently active. These numbers - * count the user's aircraft. It can also return the plugin that is currently - * controlling aircraft. In X-Plane 7, this routine reflects the number of - * aircraft the user has enabled in the rendering options window. - * - */ -XPLM_API void XPLMCountAircraft( - int * outTotalAircraft, - int * outActiveAircraft, - XPLMPluginID * outController); -/* - * XPLMGetNthAircraftModel - * - * This function returns the aircraft model for the Nth aircraft. Indices are - * zero based, with zero being the user's aircraft. The file name should be - * at least 256 chars in length; the path should be at least 512 chars in - * length. - * - */ -XPLM_API void XPLMGetNthAircraftModel( - int inIndex, - char * outFileName, - char * outPath); -/*************************************************************************** - * EXCLUSIVE AIRCRAFT ACCESS - ***************************************************************************/ -/* - * The following routines require exclusive access to the airplane APIs. Only - * one plugin may have this access at a time. - * - */ - - -/* - * XPLMPlanesAvailable_f - * - * Your airplanes available callback is called when another plugin gives up - * access to the multiplayer planes. Use this to wait for access to - * multiplayer. - * - */ -typedef void (* XPLMPlanesAvailable_f)( - void * inRefcon); - -/* - * XPLMAcquirePlanes - * - * XPLMAcquirePlanes grants your plugin exclusive access to the aircraft. It - * returns 1 if you gain access, 0 if you do not. inAircraft - pass in an - * array of pointers to strings specifying the planes you want loaded. For - * any plane index you do not want loaded, pass a 0-length string. Other - * strings should be full paths with the .acf extension. NULL terminates this - * array, or pass NULL if there are no planes you want loaded. If you pass in - * a callback and do not receive access to the planes your callback will be - * called when the airplanes are available. If you do receive airplane access, - * your callback will not be called. - * - */ -XPLM_API int XPLMAcquirePlanes( - char ** inAircraft, /* Can be NULL */ - XPLMPlanesAvailable_f inCallback, - void * inRefcon); - -/* - * XPLMReleasePlanes - * - * Call this function to release access to the planes. Note that if you are - * disabled, access to planes is released for you and you must reacquire it. - * - */ -XPLM_API void XPLMReleasePlanes(void); - -/* - * XPLMSetActiveAircraftCount - * - * This routine sets the number of active planes. If you pass in a number - * higher than the total number of planes availables, only the total number of - * planes available is actually used. - * - */ -XPLM_API void XPLMSetActiveAircraftCount( - int inCount); - -/* - * XPLMSetAircraftModel - * - * This routine loads an aircraft model. It may only be called if you have - * exclusive access to the airplane APIs. Pass in the path of the model with - * the .acf extension. The index is zero based, but you may not pass in 0 - * (use XPLMSetUsersAircraft to load the user's aircracft). - * - */ -XPLM_API void XPLMSetAircraftModel( - int inIndex, - const char * inAircraftPath); - -/* - * XPLMDisableAIForPlane - * - * This routine turns off X-Plane's AI for a given plane. The plane will - * continue to draw and be a real plane in X-Plane, but will not move itself. - * - */ -XPLM_API void XPLMDisableAIForPlane( - int inPlaneIndex); - -/* - * XPLMDrawAircraft - * - * This routine draws an aircraft. It can only be called from a 3-d drawing - * callback. Pass in the position of the plane in OpenGL local coordinates - * and the orientation of the plane. A 1 for full drawing indicates that the - * whole plane must be drawn; a 0 indicates you only need the nav lights - * drawn. (This saves rendering time when planes are far away.) - * - */ -XPLM_API void XPLMDrawAircraft( - int inPlaneIndex, - float inX, - float inY, - float inZ, - float inPitch, - float inRoll, - float inYaw, - int inFullDraw, - XPLMPlaneDrawState_t * inDrawStateInfo); - -/* - * XPLMReinitUsersPlane - * - * This function recomputes the derived flight model data from the aircraft - * structure in memory. If you have used the data access layer to modify the - * aircraft structure, use this routine to resynchronize X-Plane; since - * X-Plane works at least partly from derived values, the sim will not behave - * properly until this is called. - * - * WARNING: this routine does not necessarily place the airplane at the - * airport; use XPLMSetUsersAircraft to be compatible. This routine is - * provided to do special experimentation with flight models without resetting - * flight. - * - */ -XPLM_API void XPLMReinitUsersPlane(void); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/XPSDK301/CHeaders/XPLM/XPLMPlugin.h b/src/XPSDK301/CHeaders/XPLM/XPLMPlugin.h deleted file mode 100755 index b526e15d..00000000 --- a/src/XPSDK301/CHeaders/XPLM/XPLMPlugin.h +++ /dev/null @@ -1,340 +0,0 @@ -#ifndef _XPLMPlugin_h_ -#define _XPLMPlugin_h_ - -/* - * Copyright 2005-2012 Sandy Barbour and Ben Supnik - * - * All rights reserved. See license.txt for usage. - * - * X-Plane SDK Version: 2.1.1 - * - */ - -/* - * These APIs provide facilities to find and work with other plugins and - * manage other plugins. - * - */ - -#include "XPLMDefs.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/*************************************************************************** - * FINDING PLUGINS - ***************************************************************************/ -/* - * These APIs allow you to find another plugin or yourself, or iterate across - * all plugins. For example, if you wrote an FMS plugin that needed to talk - * to an autopilot plugin, you could use these APIs to locate the autopilot - * plugin. - * - */ - - -/* - * XPLMGetMyID - * - * This routine returns the plugin ID of the calling plug-in. Call this to - * get your own ID. - * - */ -XPLM_API XPLMPluginID XPLMGetMyID(void); - -/* - * XPLMCountPlugins - * - * This routine returns the total number of plug-ins that are loaded, both - * disabled and enabled. - * - */ -XPLM_API int XPLMCountPlugins(void); - -/* - * XPLMGetNthPlugin - * - * This routine returns the ID of a plug-in by index. Index is 0 based from 0 - * to XPLMCountPlugins-1, inclusive. Plugins may be returned in any arbitrary - * order. - * - */ -XPLM_API XPLMPluginID XPLMGetNthPlugin( - int inIndex); - -/* - * XPLMFindPluginByPath - * - * This routine returns the plug-in ID of the plug-in whose file exists at the - * passed in absolute file system path. XPLM_NO_PLUGIN_ID is returned if the - * path does not point to a currently loaded plug-in. - * - */ -XPLM_API XPLMPluginID XPLMFindPluginByPath( - const char * inPath); - -/* - * XPLMFindPluginBySignature - * - * This routine returns the plug-in ID of the plug-in whose signature matches - * what is passed in or XPLM_NO_PLUGIN_ID if no running plug-in has this - * signature. Signatures are the best way to identify another plug-in as they - * are independent of the file system path of a plug-in or the human-readable - * plug-in name, and should be unique for all plug-ins. Use this routine to - * locate another plugin that your plugin interoperates with - * - */ -XPLM_API XPLMPluginID XPLMFindPluginBySignature( - const char * inSignature); - -/* - * XPLMGetPluginInfo - * - * This routine returns information about a plug-in. Each parameter should be - * a pointer to a buffer of at least 256 characters, or NULL to not receive - * the information. - * - * outName - the human-readable name of the plug-in. outFilePath - the - * absolute file path to the file that contains this plug-in. outSignature - a - * unique string that identifies this plug-in. outDescription - a - * human-readable description of this plug-in. - * - */ -XPLM_API void XPLMGetPluginInfo( - XPLMPluginID inPlugin, - char * outName, /* Can be NULL */ - char * outFilePath, /* Can be NULL */ - char * outSignature, /* Can be NULL */ - char * outDescription); /* Can be NULL */ - -/*************************************************************************** - * ENABLING/DISABLING PLUG-INS - ***************************************************************************/ -/* - * These routines are used to work with plug-ins and manage them. Most - * plugins will not need to use these APIs. - * - */ - - -/* - * XPLMIsPluginEnabled - * - * Returns whether the specified plug-in is enabled for running. - * - */ -XPLM_API int XPLMIsPluginEnabled( - XPLMPluginID inPluginID); - -/* - * XPLMEnablePlugin - * - * This routine enables a plug-in if it is not already enabled. It returns 1 - * if the plugin was enabled or successfully enables itself, 0 if it does not. - * Plugins may fail to enable (for example, if resources cannot be acquired) - * by returning 0 from their XPluginEnable callback. - * - */ -XPLM_API int XPLMEnablePlugin( - XPLMPluginID inPluginID); - -/* - * XPLMDisablePlugin - * - * This routine disableds an enabled plug-in. - * - */ -XPLM_API void XPLMDisablePlugin( - XPLMPluginID inPluginID); - -/* - * XPLMReloadPlugins - * - * This routine reloads all plug-ins. Once this routine is called and you - * return from the callback you were within (e.g. a menu select callback) you - * will receive your XPluginDisable and XPluginStop callbacks and your DLL - * will be unloaded, then the start process happens as if the sim was starting - * up. - * - */ -XPLM_API void XPLMReloadPlugins(void); - -/*************************************************************************** - * INTERPLUGIN MESSAGING - ***************************************************************************/ -/* - * Plugin messages are defined as 32-bit integers. Messages below 0x00FFFFFF - * are reserved for X-Plane and the plugin SDK. - * - * Messages have two conceptual uses: notifications and commands. Commands - * are sent from one plugin to another to induce behavior; notifications are - * sent from one plugin to all others for informational purposes. It is - * important that commands and notifications not have the same values because - * this could cause a notification sent by one plugin to accidentally induce a - * command in another. - * - * By convention, plugin-defined notifications should have the high bit set - * (e.g. be greater or equal to unsigned 0x8000000) while commands should have - * this bit be cleared. - * - * The following messages are sent to your plugin by X-Plane. - * - */ - - -/* This message is sent to your plugin whenever the user's plane crashes. */ -#define XPLM_MSG_PLANE_CRASHED 101 - -/* This message is sent to your plugin whenever a new plane is loaded. The * - * parameter is the number of the plane being loaded; 0 indicates the user's * - * plane. */ -#define XPLM_MSG_PLANE_LOADED 102 - -/* This messages is called whenever the user's plane is positioned at a new * - * airport. */ -#define XPLM_MSG_AIRPORT_LOADED 103 - -/* This message is sent whenever new scenery is loaded. Use datarefs to * - * determine the new scenery files that were loaded. */ -#define XPLM_MSG_SCENERY_LOADED 104 - -/* This message is sent whenever the user adjusts the number of X-Plane * - * aircraft models. You must use XPLMCountPlanes to find out how many planes * - * are now available. This message will only be sent in XP7 and higher * - * because in XP6 the number of aircraft is not user-adjustable. */ -#define XPLM_MSG_AIRPLANE_COUNT_CHANGED 105 - -#if defined(XPLM200) -/* This message is sent to your plugin whenever a plane is unloaded. The * - * parameter is the number of the plane being unloaded; 0 indicates the user's * - * plane. The parameter is of type int, passed as the value of the pointer. * - * (That is: the parameter is an int, not a pointer to an int.) */ -#define XPLM_MSG_PLANE_UNLOADED 106 -#endif /* XPLM200 */ - -#if defined(XPLM210) -/* This message is sent to your plugin right before X-Plane writes its * - * preferences file. You can use this for two purposes: to write your own * - * preferences, and to modify any datarefs to influence preferences output. * - * For example, if your plugin temporarily modifies saved preferences, you can * - * put them back to their default values here to avoid having the tweaks be * - * persisted if your plugin is not loaded on the next invocation of X-Plane. */ -#define XPLM_MSG_WILL_WRITE_PREFS 107 -#endif /* XPLM210 */ - -#if defined(XPLM210) -/* This message is sent to your plugin right after a livery is loaded for an * - * airplane. You can use this to check the new livery (via datarefs) and * - * react accordingly. The parameter is of type int, passed as the value of a * - * pointer and represents the aicraft plane number - 0 is the user's plane. */ -#define XPLM_MSG_LIVERY_LOADED 108 -#endif /* XPLM210 */ - -#if defined(XPLM301) -/* Sent to your plugin right before X-Plane enters virtual reality mode (at * - * which time any windows that are not positioned in VR mode will no longer be * - * visible to the user). */ -#define XPLM_MSG_ENTERED_VR 109 -#endif /* XPLM301 */ - -#if defined(XPLM301) -/* Sent to your plugin right before X-Plane leaves virtual reality mode (at * - * which time you may want to clean up windows that are positioned in VR * - * mode). */ -#define XPLM_MSG_EXITING_VR 110 -#endif /* XPLM301 */ - -/* - * XPLMSendMessageToPlugin - * - * This function sends a message to another plug-in or X-Plane. Pass - * XPLM_NO_PLUGIN_ID to broadcast to all plug-ins. Only enabled plug-ins with - * a message receive function receive the message. - * - */ -XPLM_API void XPLMSendMessageToPlugin( - XPLMPluginID inPlugin, - int inMessage, - void * inParam); - -#if defined(XPLM200) -/*************************************************************************** - * Plugin Features API - ***************************************************************************/ -/* - * The plugin features API allows your plugin to "sign up" for additional - * capabilities and plugin system features that are normally disabled for - * backward compatibility. This allows advanced plugins to "opt-in" to new - * behavior. - * - * Each feature is defined by a permanent string name. The feature string - * names will vary with the particular installation of X-Plane, so plugins - * should not expect a feature to be guaranteed present. - * - */ - - -/* - * XPLMFeatureEnumerator_f - * - * You pass an XPLMFeatureEnumerator_f to get a list of all features supported - * by a given version running version of X-Plane. This routine is called once - * for each feature. - * - */ -typedef void (* XPLMFeatureEnumerator_f)( - const char * inFeature, - void * inRef); - -/* - * XPLMHasFeature - * - * This returns 1 if the given installation of X-Plane supports a feature, or - * 0 if it does not. - * - */ -XPLM_API int XPLMHasFeature( - const char * inFeature); - -/* - * XPLMIsFeatureEnabled - * - * This returns 1 if a feature is currently enabled for your plugin, or 0 if - * it is not enabled. It is an error to call this routine with an unsupported - * feature. - * - */ -XPLM_API int XPLMIsFeatureEnabled( - const char * inFeature); - -/* - * XPLMEnableFeature - * - * This routine enables or disables a feature for your plugin. This will - * change the running behavior of X-Plane and your plugin in some way, - * depending on the feature. - * - */ -XPLM_API void XPLMEnableFeature( - const char * inFeature, - int inEnable); - -/* - * XPLMEnumerateFeatures - * - * This routine calls your enumerator callback once for each feature that this - * running version of X-Plane supports. Use this routine to determine all of - * the features that X-Plane can support. - * - */ -XPLM_API void XPLMEnumerateFeatures( - XPLMFeatureEnumerator_f inEnumerator, - void * inRef); - -#endif /* XPLM200 */ -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/XPSDK301/CHeaders/XPLM/XPLMProcessing.h b/src/XPSDK301/CHeaders/XPLM/XPLMProcessing.h deleted file mode 100755 index a9250714..00000000 --- a/src/XPSDK301/CHeaders/XPLM/XPLMProcessing.h +++ /dev/null @@ -1,252 +0,0 @@ -#ifndef _XPLMProcessing_h_ -#define _XPLMProcessing_h_ - -/* - * Copyright 2005-2012 Sandy Barbour and Ben Supnik - * - * All rights reserved. See license.txt for usage. - * - * X-Plane SDK Version: 2.1.1 - * - */ - -/* - * This API allows you to get regular callbacks during the flight loop, the - * part of X-Plane where the plane's position calculates the physics of - * flight, etc. Use these APIs to accomplish periodic tasks like logging data - * and performing I/O. - * - * WARNING: Do NOT use these callbacks to draw! You cannot draw during flight - * loop callbacks. Use the drawing callbacks (see XPLMDisplay for more info) - * for graphics. - * - */ - -#include "XPLMDefs.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/*************************************************************************** - * FLIGHT LOOP CALLBACKS - ***************************************************************************/ -/* - * - * - */ - -#if defined(XPLM210) -/* - * XPLMFlightLoopPhaseType - * - * You can register a flight loop callback to run either before or after the - * flight model is integrated by X-Plane. - * - */ -enum { - /* Your callback runs before X-Plane integrates the flight model. */ - xplm_FlightLoop_Phase_BeforeFlightModel = 0 - - /* Your callback runs after X-Plane integrates the flight model. */ - ,xplm_FlightLoop_Phase_AfterFlightModel = 1 - - -}; -typedef int XPLMFlightLoopPhaseType; -#endif /* XPLM210 */ - -#if defined(XPLM210) -/* - * XPLMFlightLoopID - * - * This is an opaque identifier for a flight loop callback. You can use this - * identifier to easily track and remove your callbacks, or to use the new - * flight loop APIs. - * - */ -typedef void * XPLMFlightLoopID; -#endif /* XPLM210 */ - -/* - * XPLMFlightLoop_f - * - * This is your flight loop callback. Each time the flight loop is iterated - * through, you receive this call at the end. You receive a time since you - * were last called and a time since the last loop, as well as a loop counter. - * The 'phase' parameter is deprecated and should be ignored. - * - * Your return value controls when you will next be called. Return 0 to stop - * receiving callbacks. Pass a positive number to specify how many seconds - * until the next callback. (You will be called at or after this time, not - * before.) Pass a negative number to specify how many loops must go by until - * you are called. For example, -1.0 means call me the very next loop. Try to - * run your flight loop as infrequently as is practical, and suspend it (using - * return value 0) when you do not need it; lots of flight loop callbacks that - * do nothing lowers X-Plane's frame rate. - * - * Your callback will NOT be unregistered if you return 0; it will merely be - * inactive. - * - * The reference constant you passed to your loop is passed back to you. - * - */ -typedef float (* XPLMFlightLoop_f)( - float inElapsedSinceLastCall, - float inElapsedTimeSinceLastFlightLoop, - int inCounter, - void * inRefcon); - -#if defined(XPLM210) -/* - * XPLMCreateFlightLoop_t - * - * XPLMCreateFlightLoop_t contains the parameters to create a new flight loop - * callback. The strsucture can be expanded in future SDKs - always set - * structSize to the size of your structure in bytes. - * - */ -typedef struct { - int structSize; - XPLMFlightLoopPhaseType phase; - XPLMFlightLoop_f callbackFunc; - void * refcon; -} XPLMCreateFlightLoop_t; -#endif /* XPLM210 */ - -/* - * XPLMGetElapsedTime - * - * This routine returns the elapsed time since the sim started up in decimal - * seconds. - * - */ -XPLM_API float XPLMGetElapsedTime(void); - -/* - * XPLMGetCycleNumber - * - * This routine returns a counter starting at zero for each sim cycle - * computed/video frame rendered. - * - */ -XPLM_API int XPLMGetCycleNumber(void); - -/* - * XPLMRegisterFlightLoopCallback - * - * This routine registers your flight loop callback. Pass in a pointer to a - * flight loop function and a refcon. inInterval defines when you will be - * called. Pass in a positive number to specify seconds from registration time - * to the next callback. Pass in a negative number to indicate when you will - * be called (e.g. pass -1 to be called at the next cylcle). Pass 0 to not be - * called; your callback will be inactive. - * - */ -XPLM_API void XPLMRegisterFlightLoopCallback( - XPLMFlightLoop_f inFlightLoop, - float inInterval, - void * inRefcon); - -/* - * XPLMUnregisterFlightLoopCallback - * - * This routine unregisters your flight loop callback. Do NOT call it from - * your flight loop callback. Once your flight loop callback is unregistered, - * it will not be called again. - * - */ -XPLM_API void XPLMUnregisterFlightLoopCallback( - XPLMFlightLoop_f inFlightLoop, - void * inRefcon); - -/* - * XPLMSetFlightLoopCallbackInterval - * - * This routine sets when a callback will be called. Do NOT call it from your - * callback; use the return value of the callback to change your callback - * interval from inside your callback. - * - * inInterval is formatted the same way as in XPLMRegisterFlightLoopCallback; - * positive for seconds, negative for cycles, and 0 for deactivating the - * callback. If inRelativeToNow is 1, times are from the time of this call; - * otherwise they are from the time the callback was last called (or the time - * it was registered if it has never been called. - * - */ -XPLM_API void XPLMSetFlightLoopCallbackInterval( - XPLMFlightLoop_f inFlightLoop, - float inInterval, - int inRelativeToNow, - void * inRefcon); - -#if defined(XPLM210) -/* - * XPLMCreateFlightLoop - * - * This routine creates a flight loop callback and returns its ID. The flight - * loop callback is created using the input param struct, and is inited to be - * unscheduled. - * - */ -XPLM_API XPLMFlightLoopID XPLMCreateFlightLoop( - XPLMCreateFlightLoop_t * inParams); -#endif /* XPLM210 */ - -#if defined(XPLM210) -/* - * XPLMDestroyFlightLoop - * - * This routine destroys a flight loop callback by ID. - * - */ -XPLM_API void XPLMDestroyFlightLoop( - XPLMFlightLoopID inFlightLoopID); -#endif /* XPLM210 */ - -#if defined(XPLM210) -/* - * XPLMScheduleFlightLoop - * - * This routine schedules a flight loop callback for future execution. If - * inInterval is negative, it is run in a certain number of frames based on - * the absolute value of the input. If the interval is positive, it is a - * duration in seconds. - * - * If inRelativeToNow is true, ties are interpretted relative to the time this - * routine is called; otherwise they are relative to the last call time or the - * time the flight loop was registered (if never called). - * - * THREAD SAFETY: it is legal to call this routine from any thread under the - * following conditions: - * - * 1. The call must be between the beginning of an XPLMEnable and the end of - * an XPLMDisable sequence. (That is, you must not call this routine from - * thread activity when your plugin was supposed to be disabled. Since plugins - * are only enabled while loaded, this also implies you cannot run this - * routine outside an XPLMStart/XPLMStop sequence.) - * - * 2. You may not call this routine re-entrantly for a single flight loop ID. - * (That is, you can't enable from multiple threads at the same time.) - * - * 3. You must call this routine between the time after XPLMCreateFlightLoop - * returns a value and the time you call XPLMDestroyFlightLoop. (That is, you - * must ensure that your threaded activity is within the life of the object. - * The SDK does not check this for you, nor does it synchronize destruction of - * the object.) - * - * 4. The object must be unscheduled if this routine is to be called from a - * thread other than the main thread. - * - */ -XPLM_API void XPLMScheduleFlightLoop( - XPLMFlightLoopID inFlightLoopID, - float inInterval, - int inRelativeToNow); -#endif /* XPLM210 */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/XPSDK301/CHeaders/XPLM/XPLMScenery.h b/src/XPSDK301/CHeaders/XPLM/XPLMScenery.h deleted file mode 100644 index 875468e5..00000000 --- a/src/XPSDK301/CHeaders/XPLM/XPLMScenery.h +++ /dev/null @@ -1,446 +0,0 @@ -#ifndef _XPLMScenery_h_ -#define _XPLMScenery_h_ - -/* - * Copyright 2005-2012 Sandy Barbour and Ben Supnik - * - * All rights reserved. See license.txt for usage. - * - * X-Plane SDK Version: 2.1.1 - * - */ - -/* - * This package contains APIs to interact with X-Plane's scenery system. - * - */ - -#include "XPLMDefs.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#if defined(XPLM200) -/*************************************************************************** - * Terrain Y-Testing - ***************************************************************************/ -/* - * The Y-testing API allows you to locate the physical scenery mesh. This - * would be used to place dynamic graphics on top of the ground in a plausible - * way or do physics interactions. - * - * The Y-test API works via probe objects, which are allocated by your plugin - * and used to query terrain. Probe objects exist both to capture which - * algorithm you have requested (see probe types) and also to cache query - * information. - * - * Performance guidelines: It is generally faster to use the same probe for - * nearby points and different probes for different points. Try not to - * allocate more than "hundreds" of probes at most. Share probes if you need - * more. Generally, probing operations are expensive, and should be avoided - * via caching when possible. - * - * Y testing returns a location on the terrain, a normal vectory, and a - * velocity vector. The normal vector tells you the slope of the terrain at - * that point. The velocity vector tells you if that terrain is moving (and is - * in meters/second). For example, if your Y test hits the aircraft carrier - * deck, this tells you the velocity of that point on the deck. - * - * Note: the Y-testing API is limited to probing the loaded scenery area, - * which is approximately 300x300 km in X-Plane 9. Probes outside this area - * will return the height of a 0 MSL sphere. - * - */ - - -/* - * XPLMProbeType - * - * XPLMProbeType defines the type of terrain probe - each probe has a - * different algorithm. (Only one type of probe is provided right now, but - * future APIs will expose more flexible or poewrful or useful probes. - * - */ -enum { - /* The Y probe gives you the location of the tallest physical scenery along * - * the Y axis going through the queried point. */ - xplm_ProbeY = 0 - - -}; -typedef int XPLMProbeType; - -/* - * XPLMProbeResult - * - * Probe results - possible results from a probe query. - * - */ -enum { - /* The probe hit terrain and returned valid values. */ - xplm_ProbeHitTerrain = 0 - - /* An error in the API call. Either the probe struct size is bad, or the * - * probe is invalid or the type is mismatched for the specific query call. */ - ,xplm_ProbeError = 1 - - /* The probe call succeeded but there is no terrain under this point (perhaps * - * it is off the side of the planet?) */ - ,xplm_ProbeMissed = 2 - - -}; -typedef int XPLMProbeResult; - -/* - * XPLMProbeRef - * - * An XPLMProbeRef is an opaque handle to a probe, used for querying the - * terrain. - * - */ -typedef void * XPLMProbeRef; - -/* - * XPLMProbeInfo_t - * - * XPLMProbeInfo_t contains the results of a probe call. Make sure to set - * structSize to the size of the struct before using it. - * - */ -typedef struct { - /* Size of structure in bytes - always set this before calling the XPLM. */ - int structSize; - /* Resulting X location of the terrain point we hit, in local OpenGL * - * coordinates. */ - float locationX; - /* Resulting Y location of the terrain point we hit, in local OpenGL * - * coordinates. */ - float locationY; - /* Resulting Z location of the terrain point we hit, in local OpenGL * - * coordinates. */ - float locationZ; - /* X component of the normal vector to the terrain we found. */ - float normalX; - /* Y component of the normal vector to the terrain we found. */ - float normalY; - /* Z component of the normal vector to the terrain we found. */ - float normalZ; - /* X component of the velocity vector of the terrain we found. */ - float velocityX; - /* Y component of the velocity vector of the terrain we found. */ - float velocityY; - /* Z component of the velocity vector of the terrain we found. */ - float velocityZ; - /* Tells if the surface we hit is water (otherwise it is land). */ - int is_wet; -} XPLMProbeInfo_t; - -/* - * XPLMCreateProbe - * - * Creates a new probe object of a given type and returns. - * - */ -XPLM_API XPLMProbeRef XPLMCreateProbe( - XPLMProbeType inProbeType); - -/* - * XPLMDestroyProbe - * - * Deallocates an existing probe object. - * - */ -XPLM_API void XPLMDestroyProbe( - XPLMProbeRef inProbe); - -/* - * XPLMProbeTerrainXYZ - * - * Probes the terrain. Pass in the XYZ coordinate of the probe point, a probe - * object, and an XPLMProbeInfo_t struct that has its structSize member set - * properly. Other fields are filled in if we hit terrain, and a probe result - * is returned. - * - */ -XPLM_API XPLMProbeResult XPLMProbeTerrainXYZ( - XPLMProbeRef inProbe, - float inX, - float inY, - float inZ, - XPLMProbeInfo_t * outInfo); - -#endif /* XPLM200 */ -#if defined(XPLM300) -/*************************************************************************** - * Magnetic Variation - ***************************************************************************/ -/* - * Use the magnetic variation (more properly, the "magnetic declination") API - * to find the offset of magnetic north from true north at a given latitude - * and longitude within the simulator. - * - * In the real world, the Earth's magnetic field is irregular, such that true - * north (the direction along a meridian toward the north pole) does not - * necessarily match what a magnetic compass shows as north. - * - * Using this API ensures that you present the same offsets to users as - * X-Plane's built-in instruments. - * - */ - - -/* - * XPLMGetMagneticVariation - * - * Returns X-Plane's simulated magnetic variation (declination) at the - * indication latitude and longitude. - * - */ -XPLM_API float XPLMGetMagneticVariation( - double latitude, - double longitude); - -/* - * XPLMDegTrueToDegMagnetic - * - * Converts a heading in degrees relative to true north into a value relative - * to magnetic north at the user's current location. - * - */ -XPLM_API float XPLMDegTrueToDegMagnetic( - float headingDegreesTrue); - -/* - * XPLMDegMagneticToDegTrue - * - * Converts a heading in degrees relative to magnetic north at the user's - * current location into a value relative to true north. - * - */ -XPLM_API float XPLMDegMagneticToDegTrue( - float headingDegreesMagnetic); - -#endif /* XPLM300 */ -/*************************************************************************** - * Object Drawing - ***************************************************************************/ -/* - * The object drawing routines let you load and draw X-Plane OBJ files. - * Objects are loaded by file path and managed via an opaque handle. X-Plane - * naturally reference counts objects, so it is important that you balance - * every successful call to XPLMLoadObject with a call to XPLMUnloadObject! - * - */ - - -#if defined(XPLM200) -/* - * XPLMObjectRef - * - * An XPLMObjectRef is a opaque handle to an .obj file that has been loaded - * into memory. - * - */ -typedef void * XPLMObjectRef; -#endif /* XPLM200 */ - -#if defined(XPLM200) -/* - * XPLMDrawInfo_t - * - * The XPLMDrawInfo_t structure contains positioning info for one object that - * is to be drawn. Be sure to set structSize to the size of the structure for - * future expansion. - * - */ -typedef struct { - /* Set this to the size of this structure! */ - int structSize; - /* X location of the object in local coordinates. */ - float x; - /* Y location of the object in local coordinates. */ - float y; - /* Z location of the object in local coordinates. */ - float z; - /* Pitch in degres to rotate the object, positive is up. */ - float pitch; - /* Heading in local coordinates to rotate the object, clockwise. */ - float heading; - /* Roll to rotate the object. */ - float roll; -} XPLMDrawInfo_t; -#endif /* XPLM200 */ - -#if defined(XPLM210) -/* - * XPLMObjectLoaded_f - * - * You provide this callback when loading an object asynchronously; it will be - * called once the object is loaded. Your refcon is passed back. The object - * ref passed in is the newly loaded object (ready for use) or NULL if an - * error occured. - * - * If your plugin is disabled, this callback will be delivered as soon as the - * plugin is re-enabled. If your plugin is unloaded before this callback is - * ever called, the SDK will release the object handle for you. - * - */ -typedef void (* XPLMObjectLoaded_f)( - XPLMObjectRef inObject, - void * inRefcon); -#endif /* XPLM210 */ - -#if defined(XPLM200) -/* - * XPLMLoadObject - * - * This routine loads an OBJ file and returns a handle to it. If X-Plane has - * already loaded the object, the handle to the existing object is returned. - * Do not assume you will get the same handle back twice, but do make sure to - * call unload once for every load to avoid "leaking" objects. The object will - * be purged from memory when no plugins and no scenery are using it. - * - * The path for the object must be relative to the X-System base folder. If - * the path is in the root of the X-System folder you may need to prepend ./ - * to it; loading objects in the root of the X-System folder is STRONGLY - * discouraged - your plugin should not dump art resources in the root folder! - * - * - * XPLMLoadObject will return NULL if the object cannot be loaded (either - * because it is not found or the file is misformatted). This routine will - * load any object that can be used in the X-Plane scenery system. - * - * It is important that the datarefs an object uses for animation already be - * loaded before you load the object. For this reason it may be necessary to - * defer object loading until the sim has fully started. - * - */ -XPLM_API XPLMObjectRef XPLMLoadObject( - const char * inPath); -#endif /* XPLM200 */ - -#if defined(XPLM210) -/* - * XPLMLoadObjectAsync - * - * This routine loads an object asynchronously; control is returned to you - * immediately while X-Plane loads the object. The sim will not stop flying - * while the object loads. For large objects, it may be several seconds before - * the load finishes. - * - * You provide a callback function that is called once the load has completed. - * Note that if the object cannot be loaded, you will not find out until the - * callback function is called with a NULL object handle. - * - * There is no way to cancel an asynchronous object load; you must wait for - * the load to complete and then release the object if it is no longer - * desired. - * - */ -XPLM_API void XPLMLoadObjectAsync( - const char * inPath, - XPLMObjectLoaded_f inCallback, - void * inRefcon); -#endif /* XPLM210 */ - -#if defined(XPLM200) -/* - * XPLMDrawObjects - * - * XPLMDrawObjects draws an object from an OBJ file one or more times. You - * pass in the object and an array of XPLMDrawInfo_t structs, one for each - * place you would like the object to be drawn. - * - * X-Plane will attempt to cull the objects based on LOD and visibility, and - * will pick the appropriate LOD. - * - * Lighting is a boolean; pass 1 to show the night version of object with - * night-only lights lit up. Pass 0 to show the daytime version of the object. - * - * - * earth_relative controls the coordinate system. If this is 1, the rotations - * you specify are applied to the object after its coordinate system is - * transformed from local to earth-relative coordinates -- that is, an object - * with no rotations will point toward true north and the Y axis will be up - * against gravity. If this is 0, the object is drawn with your rotations from - * local coordanates -- that is, an object with no rotations is drawn pointing - * down the -Z axis and the Y axis of the object matches the local coordinate - * Y axis. - * - */ -XPLM_API void XPLMDrawObjects( - XPLMObjectRef inObject, - int inCount, - XPLMDrawInfo_t * inLocations, - int lighting, - int earth_relative); -#endif /* XPLM200 */ - -#if defined(XPLM200) -/* - * XPLMUnloadObject - * - * This routine marks an object as no longer being used by your plugin. - * Objects are reference counted: once no plugins are using an object, it is - * purged from memory. Make sure to call XPLMUnloadObject once for each - * successful call to XPLMLoadObject. - * - */ -XPLM_API void XPLMUnloadObject( - XPLMObjectRef inObject); -#endif /* XPLM200 */ - -#if defined(XPLM200) -/*************************************************************************** - * Library Access - ***************************************************************************/ -/* - * The library access routines allow you to locate scenery objects via the - * X-Plane library system. Right now library access is only provided for - * objects, allowing plugin-drawn objects to be extended using the library - * system. - * - */ - - -/* - * XPLMLibraryEnumerator_f - * - * An XPLMLibraryEnumerator_f is a callback you provide that is called once - * for each library element that is located. The returned paths will be - * relative to the X-System folder. - * - */ -typedef void (* XPLMLibraryEnumerator_f)( - const char * inFilePath, - void * inRef); - -/* - * XPLMLookupObjects - * - * This routine looks up a virtual path in the library system and returns all - * matching elements. You provide a callback - one virtual path may match many - * objects in the library. XPLMLookupObjects returns the number of objects - * found. - * - * The latitude and longitude parameters specify the location the object will - * be used. The library system allows for scenery packages to only provide - * objects to certain local locations. Only objects that are allowed at the - * latitude/longitude you provide will be returned. - * - */ -XPLM_API int XPLMLookupObjects( - const char * inPath, - float inLatitude, - float inLongitude, - XPLMLibraryEnumerator_f enumerator, - void * ref); - -#endif /* XPLM200 */ -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/XPSDK301/CHeaders/XPLM/XPLMUtilities.h b/src/XPSDK301/CHeaders/XPLM/XPLMUtilities.h deleted file mode 100755 index a3bab8c8..00000000 --- a/src/XPSDK301/CHeaders/XPLM/XPLMUtilities.h +++ /dev/null @@ -1,835 +0,0 @@ -#ifndef _XPLMUtilities_h_ -#define _XPLMUtilities_h_ - -/* - * Copyright 2005-2012 Sandy Barbour and Ben Supnik - * - * All rights reserved. See license.txt for usage. - * - * X-Plane SDK Version: 2.1.1 - * - */ - -/* - * - * - */ - -#include "XPLMDefs.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/*************************************************************************** - * X-PLANE USER INTERACTION - ***************************************************************************/ -/* - * The user interaction APIs let you simulate commands the user can do with a - * joystick, keyboard etc. Note that it is generally safer for future - * compatibility to use one of these commands than to manipulate the - * underlying sim data. - * - */ - - -/* - * XPLMCommandKeyID - * - * These enums represent all the keystrokes available within X-Plane. They can - * be sent to X-Plane directly. For example, you can reverse thrust using - * these enumerations. - * - */ -enum { - xplm_key_pause=0, - xplm_key_revthrust, - xplm_key_jettison, - xplm_key_brakesreg, - xplm_key_brakesmax, - xplm_key_gear, - xplm_key_timedn, - xplm_key_timeup, - xplm_key_fadec, - xplm_key_otto_dis, - xplm_key_otto_atr, - xplm_key_otto_asi, - xplm_key_otto_hdg, - xplm_key_otto_gps, - xplm_key_otto_lev, - xplm_key_otto_hnav, - xplm_key_otto_alt, - xplm_key_otto_vvi, - xplm_key_otto_vnav, - xplm_key_otto_nav1, - xplm_key_otto_nav2, - xplm_key_targ_dn, - xplm_key_targ_up, - xplm_key_hdgdn, - xplm_key_hdgup, - xplm_key_barodn, - xplm_key_baroup, - xplm_key_obs1dn, - xplm_key_obs1up, - xplm_key_obs2dn, - xplm_key_obs2up, - xplm_key_com1_1, - xplm_key_com1_2, - xplm_key_com1_3, - xplm_key_com1_4, - xplm_key_nav1_1, - xplm_key_nav1_2, - xplm_key_nav1_3, - xplm_key_nav1_4, - xplm_key_com2_1, - xplm_key_com2_2, - xplm_key_com2_3, - xplm_key_com2_4, - xplm_key_nav2_1, - xplm_key_nav2_2, - xplm_key_nav2_3, - xplm_key_nav2_4, - xplm_key_adf_1, - xplm_key_adf_2, - xplm_key_adf_3, - xplm_key_adf_4, - xplm_key_adf_5, - xplm_key_adf_6, - xplm_key_transpon_1, - xplm_key_transpon_2, - xplm_key_transpon_3, - xplm_key_transpon_4, - xplm_key_transpon_5, - xplm_key_transpon_6, - xplm_key_transpon_7, - xplm_key_transpon_8, - xplm_key_flapsup, - xplm_key_flapsdn, - xplm_key_cheatoff, - xplm_key_cheaton, - xplm_key_sbrkoff, - xplm_key_sbrkon, - xplm_key_ailtrimL, - xplm_key_ailtrimR, - xplm_key_rudtrimL, - xplm_key_rudtrimR, - xplm_key_elvtrimD, - xplm_key_elvtrimU, - xplm_key_forward, - xplm_key_down, - xplm_key_left, - xplm_key_right, - xplm_key_back, - xplm_key_tower, - xplm_key_runway, - xplm_key_chase, - xplm_key_free1, - xplm_key_free2, - xplm_key_spot, - xplm_key_fullscrn1, - xplm_key_fullscrn2, - xplm_key_tanspan, - xplm_key_smoke, - xplm_key_map, - xplm_key_zoomin, - xplm_key_zoomout, - xplm_key_cycledump, - xplm_key_replay, - xplm_key_tranID, - xplm_key_max -}; -typedef int XPLMCommandKeyID; - -/* - * XPLMCommandButtonID - * - * These are enumerations for all of the things you can do with a joystick - * button in X-Plane. They currently match the buttons menu in the equipment - * setup dialog, but these enums will be stable even if they change in - * X-Plane. - * - */ -enum { - xplm_joy_nothing=0, - xplm_joy_start_all, - xplm_joy_start_0, - xplm_joy_start_1, - xplm_joy_start_2, - xplm_joy_start_3, - xplm_joy_start_4, - xplm_joy_start_5, - xplm_joy_start_6, - xplm_joy_start_7, - xplm_joy_throt_up, - xplm_joy_throt_dn, - xplm_joy_prop_up, - xplm_joy_prop_dn, - xplm_joy_mixt_up, - xplm_joy_mixt_dn, - xplm_joy_carb_tog, - xplm_joy_carb_on, - xplm_joy_carb_off, - xplm_joy_trev, - xplm_joy_trm_up, - xplm_joy_trm_dn, - xplm_joy_rot_trm_up, - xplm_joy_rot_trm_dn, - xplm_joy_rud_lft, - xplm_joy_rud_cntr, - xplm_joy_rud_rgt, - xplm_joy_ail_lft, - xplm_joy_ail_cntr, - xplm_joy_ail_rgt, - xplm_joy_B_rud_lft, - xplm_joy_B_rud_rgt, - xplm_joy_look_up, - xplm_joy_look_dn, - xplm_joy_look_lft, - xplm_joy_look_rgt, - xplm_joy_glance_l, - xplm_joy_glance_r, - xplm_joy_v_fnh, - xplm_joy_v_fwh, - xplm_joy_v_tra, - xplm_joy_v_twr, - xplm_joy_v_run, - xplm_joy_v_cha, - xplm_joy_v_fr1, - xplm_joy_v_fr2, - xplm_joy_v_spo, - xplm_joy_flapsup, - xplm_joy_flapsdn, - xplm_joy_vctswpfwd, - xplm_joy_vctswpaft, - xplm_joy_gear_tog, - xplm_joy_gear_up, - xplm_joy_gear_down, - xplm_joy_lft_brake, - xplm_joy_rgt_brake, - xplm_joy_brakesREG, - xplm_joy_brakesMAX, - xplm_joy_speedbrake, - xplm_joy_ott_dis, - xplm_joy_ott_atr, - xplm_joy_ott_asi, - xplm_joy_ott_hdg, - xplm_joy_ott_alt, - xplm_joy_ott_vvi, - xplm_joy_tim_start, - xplm_joy_tim_reset, - xplm_joy_ecam_up, - xplm_joy_ecam_dn, - xplm_joy_fadec, - xplm_joy_yaw_damp, - xplm_joy_art_stab, - xplm_joy_chute, - xplm_joy_JATO, - xplm_joy_arrest, - xplm_joy_jettison, - xplm_joy_fuel_dump, - xplm_joy_puffsmoke, - xplm_joy_prerotate, - xplm_joy_UL_prerot, - xplm_joy_UL_collec, - xplm_joy_TOGA, - xplm_joy_shutdown, - xplm_joy_con_atc, - xplm_joy_fail_now, - xplm_joy_pause, - xplm_joy_rock_up, - xplm_joy_rock_dn, - xplm_joy_rock_lft, - xplm_joy_rock_rgt, - xplm_joy_rock_for, - xplm_joy_rock_aft, - xplm_joy_idle_hilo, - xplm_joy_lanlights, - xplm_joy_max -}; -typedef int XPLMCommandButtonID; - -/* - * XPLMHostApplicationID - * - * The plug-in system is based on Austin's cross-platform OpenGL framework and - * could theoretically be adapted to run in other apps like WorldMaker. The - * plug-in system also runs against a test harness for internal development - * and could be adapted to another flight sim (in theory at least). So an ID - * is providing allowing plug-ins to indentify what app they are running - * under. - * - */ -enum { - xplm_Host_Unknown = 0 - - ,xplm_Host_XPlane = 1 - - ,xplm_Host_PlaneMaker = 2 - - ,xplm_Host_WorldMaker = 3 - - ,xplm_Host_Briefer = 4 - - ,xplm_Host_PartMaker = 5 - - ,xplm_Host_YoungsMod = 6 - - ,xplm_Host_XAuto = 7 - - -}; -typedef int XPLMHostApplicationID; - -/* - * XPLMLanguageCode - * - * These enums define what language the sim is running in. These enumerations - * do not imply that the sim can or does run in all of these languages; they - * simply provide a known encoding in the event that a given sim version is - * localized to a certain language. - * - */ -enum { - xplm_Language_Unknown = 0 - - ,xplm_Language_English = 1 - - ,xplm_Language_French = 2 - - ,xplm_Language_German = 3 - - ,xplm_Language_Italian = 4 - - ,xplm_Language_Spanish = 5 - - ,xplm_Language_Korean = 6 - -#if defined(XPLM200) - ,xplm_Language_Russian = 7 - -#endif /* XPLM200 */ -#if defined(XPLM200) - ,xplm_Language_Greek = 8 - -#endif /* XPLM200 */ -#if defined(XPLM200) - ,xplm_Language_Japanese = 9 - -#endif /* XPLM200 */ -#if defined(XPLM200) - ,xplm_Language_Chinese = 10 - -#endif /* XPLM200 */ - -}; -typedef int XPLMLanguageCode; - -#if defined(XPLM200) -/* - * XPLMDataFileType - * - * These enums define types of data files you can load or unload using the - * SDK. - * - */ -enum { - /* A situation (.sit) file, which starts off a flight in a given * - * configuration. */ - xplm_DataFile_Situation = 1 - - /* A situation movie (.smo) file, which replays a past flight. */ - ,xplm_DataFile_ReplayMovie = 2 - - -}; -typedef int XPLMDataFileType; -#endif /* XPLM200 */ - -#if defined(XPLM200) -/* - * XPLMError_f - * - * An XPLM error callback is a function that you provide to receive debugging - * information from the plugin SDK. See XPLMSetErrorCallback for more - * information. NOTE: for the sake of debugging, your error callback will be - * called even if your plugin is not enabled, allowing you to receive debug - * info in your XPluginStart and XPluginStop callbacks. To avoid causing logic - * errors in the management code, do not call any other plugin routines from - * your error callback - it is only meant for logging! - * - */ -typedef void (* XPLMError_f)( - const char * inMessage); -#endif /* XPLM200 */ - -/* - * XPLMSimulateKeyPress - * - * This function simulates a key being pressed for X-Plane. The keystroke goes - * directly to X-Plane; it is never sent to any plug-ins. However, since this - * is a raw key stroke it may be mapped by the keys file or enter text into a - * field. - * - * WARNING: This function will be deprecated; do not use it. Instead use - * XPLMCommandKeyStroke. - * - */ -XPLM_API void XPLMSimulateKeyPress( - int inKeyType, - int inKey); - -/* - * XPLMSpeakString - * - * This function displays the string in a translucent overlay over the current - * display and also speaks the string if text-to-speech is enabled. The string - * is spoken asynchronously, this function returns immediately. - * - */ -XPLM_API void XPLMSpeakString( - const char * inString); - -/* - * XPLMCommandKeyStroke - * - * This routine simulates a command-key stroke. However, the keys are done by - * function, not by actual letter, so this function works even if the user has - * remapped their keyboard. Examples of things you might do with this include - * pausing the simulator. - * - */ -XPLM_API void XPLMCommandKeyStroke( - XPLMCommandKeyID inKey); - -/* - * XPLMCommandButtonPress - * - * This function simulates any of the actions that might be taken by pressing - * a joystick button. However, this lets you call the command directly rather - * than have to know which button is mapped where. Important: you must release - * each button you press. The APIs are separate so that you can 'hold down' a - * button for a fixed amount of time. - * - */ -XPLM_API void XPLMCommandButtonPress( - XPLMCommandButtonID inButton); - -/* - * XPLMCommandButtonRelease - * - * This function simulates any of the actions that might be taken by pressing - * a joystick button. See XPLMCommandButtonPress - * - */ -XPLM_API void XPLMCommandButtonRelease( - XPLMCommandButtonID inButton); - -/* - * XPLMGetVirtualKeyDescription - * - * Given a virtual key code (as defined in XPLMDefs.h) this routine returns a - * human-readable string describing the character. This routine is provided - * for showing users what keyboard mappings they have set up. The string may - * read 'unknown' or be a blank or NULL string if the virtual key is unknown. - * - */ -XPLM_API const char * XPLMGetVirtualKeyDescription( - char inVirtualKey); - -/*************************************************************************** - * X-PLANE MISC - ***************************************************************************/ -/* - * - * - */ - -/* - * XPLMReloadScenery - * - * XPLMReloadScenery reloads the current set of scenery. You can use this - * function in two typical ways: simply call it to reload the scenery, picking - * up any new installed scenery, .env files, etc. from disk. Or, change the - * lat/ref and lon/ref data refs and then call this function to shift the - * scenery environment. - * - */ -XPLM_API void XPLMReloadScenery(void); - -/* - * XPLMGetSystemPath - * - * This function returns the full path to the X-System folder. Note that this - * is a directory path, so it ends in a trailing : or /. The buffer you pass - * should be at least 512 characters long. - * - */ -XPLM_API void XPLMGetSystemPath( - char * outSystemPath); - -/* - * XPLMGetPrefsPath - * - * This routine returns a full path to a file that is within X-Plane's - * preferences directory. (You should remove the file name back to the last - * directory separator to get the preferences directory. The buffer you pass - * should be at least 512 characters long. - * - */ -XPLM_API void XPLMGetPrefsPath( - char * outPrefsPath); - -/* - * XPLMGetDirectorySeparator - * - * This routine returns a string with one char and a null terminator that is - * the directory separator for the current platform. This allows you to write - * code that concatinates directory paths without having to #ifdef for - * platform. - * - */ -XPLM_API const char * XPLMGetDirectorySeparator(void); - -/* - * XPLMExtractFileAndPath - * - * Given a full path to a file, this routine separates the path from the file. - * If the path is a partial directory (e.g. ends in : or \) the trailing - * directory separator is removed. This routine works in-place; a pointer to - * the file part of the buffer is returned; the original buffer still starts - * with the path. - * - */ -XPLM_API char * XPLMExtractFileAndPath( - char * inFullPath); - -/* - * XPLMGetDirectoryContents - * - * This routine returns a list of files in a directory (specified by a full - * path, no trailing : or \). The output is returned as a list of NULL - * terminated strings. An index array (if specified) is filled with pointers - * into the strings. This routine The last file is indicated by a zero-length - * string (and NULL in the indices). This routine will return 1 if you had - * capacity for all files or 0 if you did not. You can also skip a given - * number of files. - * - * inDirectoryPath - a null terminated C string containing the full path to - * the directory with no trailing directory char. - * - * inFirstReturn - the zero-based index of the first file in the directory to - * return. (Usually zero to fetch all in one pass.) - * - * outFileNames - a buffer to receive a series of sequential null terminated - * C-string file names. A zero-length C string will be appended to the very - * end. - * - * inFileNameBufSize - the size of the file name buffer in bytes. - * - * outIndices - a pointer to an array of character pointers that will become - * an index into the directory. The last file will be followed by a NULL - * value. Pass NULL if you do not want indexing information. - * - * inIndexCount - the max size of the index in entries. - * - * outTotalFiles - if not NULL, this is filled in with the number of files in - * the directory. - * - * outReturnedFiles - if not NULL, the number of files returned by this - * iteration. - * - * Return value - 1 if all info could be returned, 0 if there was a buffer - * overrun. - * - * WARNING: Before X-Plane 7 this routine did not properly iterate through - * directories. If X-Plane 6 compatibility is needed, use your own code to - * iterate directories. - * - */ -XPLM_API int XPLMGetDirectoryContents( - const char * inDirectoryPath, - int inFirstReturn, - char * outFileNames, - int inFileNameBufSize, - char ** outIndices, /* Can be NULL */ - int inIndexCount, - int * outTotalFiles, /* Can be NULL */ - int * outReturnedFiles); /* Can be NULL */ - -/* - * XPLMInitialized - * - * This function returns 1 if X-Plane has properly initialized the plug-in - * system. If this routine returns 0, many XPLM functions will not work. - * - * NOTE: Under normal circumstances a plug-in should never be running while - * the plug-in manager is not initialized. - * - * WARNING: This function is generally not needed and may be deprecated in the - * future. - * - */ -XPLM_API int XPLMInitialized(void); - -/* - * XPLMGetVersions - * - * This routine returns the revision of both X-Plane and the XPLM DLL. All - * versions are three-digit decimal numbers (e.g. 606 for version 6.06 of - * X-Plane); the current revision of the XPLM is 200 (2.00). This routine also - * returns the host ID of the app running us. - * - * The most common use of this routine is to special-case around X-Plane - * version-specific behavior. - * - */ -XPLM_API void XPLMGetVersions( - int * outXPlaneVersion, - int * outXPLMVersion, - XPLMHostApplicationID * outHostID); - -/* - * XPLMGetLanguage - * - * This routine returns the langauge the sim is running in. - * - */ -XPLM_API XPLMLanguageCode XPLMGetLanguage(void); - -/* - * XPLMDebugString - * - * This routine outputs a C-style string to the Log.txt file. The file is - * immediately flushed so you will not lose data. (This does cause a - * performance penalty.) - * - */ -XPLM_API void XPLMDebugString( - const char * inString); - -#if defined(XPLM200) -/* - * XPLMSetErrorCallback - * - * XPLMSetErrorCallback installs an error-reporting callback for your plugin. - * Normally the plugin system performs minimum diagnostics to maximize - * performance. When you install an error callback, you will receive calls due - * to certain plugin errors, such as passing bad parameters or incorrect data. - * - * - * The intention is for you to install the error callback during debug - * sections and put a break-point inside your callback. This will cause you to - * break into the debugger from within the SDK at the point in your plugin - * where you made an illegal call. - * - * Installing an error callback may activate error checking code that would - * not normally run, and this may adversely affect performance, so do not - * leave error callbacks installed in shipping plugins. - * - */ -XPLM_API void XPLMSetErrorCallback( - XPLMError_f inCallback); -#endif /* XPLM200 */ - -#if defined(XPLM200) -/* - * XPLMFindSymbol - * - * This routine will attempt to find the symbol passed in the inString - * parameter. If the symbol is found a pointer the function is returned, - * othewise the function will return NULL. - * - */ -XPLM_API void * XPLMFindSymbol( - const char * inString); -#endif /* XPLM200 */ - -#if defined(XPLM200) -/* - * XPLMLoadDataFile - * - * Loads a data file of a given type. Paths must be relative to the X-System - * folder. To clear the replay, pass a NULL file name (this is only valid with - * replay movies, not sit files). - * - */ -XPLM_API int XPLMLoadDataFile( - XPLMDataFileType inFileType, - const char * inFilePath); /* Can be NULL */ -#endif /* XPLM200 */ - -#if defined(XPLM200) -/* - * XPLMSaveDataFile - * - * Saves the current situation or replay; paths are relative to the X-System - * folder. - * - */ -XPLM_API int XPLMSaveDataFile( - XPLMDataFileType inFileType, - const char * inFilePath); -#endif /* XPLM200 */ - -#if defined(XPLM200) -/*************************************************************************** - * X-PLANE COMMAND MANAGEMENT - ***************************************************************************/ -/* - * The command management APIs let plugins interact with the command-system in - * X-Plane, the abstraction behind keyboard presses and joystick buttons. This - * API lets you create new commands and modify the behavior (or get - * notification) of existing ones. - * - * An X-Plane command consists of three phases: a beginning, continuous - * repetition, and an ending. The command may be repeated zero times in the - * event that the user presses a button only momentarily. - * - */ - - -/* - * XPLMCommandPhase - * - * The phases of a command. - * - */ -enum { - /* The command is being started. */ - xplm_CommandBegin = 0 - - /* The command is continuing to execute. */ - ,xplm_CommandContinue = 1 - - /* The command has ended. */ - ,xplm_CommandEnd = 2 - - -}; -typedef int XPLMCommandPhase; - -/* - * XPLMCommandRef - * - * A command ref is an opaque identifier for an X-Plane command. Command - * references stay the same for the life of your plugin but not between - * executions of X-Plane. Command refs are used to execute commands, create - * commands, and create callbacks for particular commands. - * - * Note that a command is not "owned" by a particular plugin. Since many - * plugins may participate in a command's execution, the command does not go - * away if the plugin that created it is unloaded. - * - */ -typedef void * XPLMCommandRef; - -/* - * XPLMCommandCallback_f - * - * A command callback is a function in your plugin that is called when a - * command is pressed. Your callback receives the command reference for the - * particular command, the phase of the command that is executing, and a - * reference pointer that you specify when registering the callback. - * - * Your command handler should return 1 to let processing of the command - * continue to other plugins and X-Plane, or 0 to halt processing, potentially - * bypassing X-Plane code. - * - */ -typedef int (* XPLMCommandCallback_f)( - XPLMCommandRef inCommand, - XPLMCommandPhase inPhase, - void * inRefcon); - -/* - * XPLMFindCommand - * - * XPLMFindCommand looks up a command by name, and returns its command - * reference or NULL if the command does not exist. - * - */ -XPLM_API XPLMCommandRef XPLMFindCommand( - const char * inName); - -/* - * XPLMCommandBegin - * - * XPLMCommandBegin starts the execution of a command, specified by its - * command reference. The command is "held down" until XPLMCommandEnd is - * called. - * - */ -XPLM_API void XPLMCommandBegin( - XPLMCommandRef inCommand); - -/* - * XPLMCommandEnd - * - * XPLMCommandEnd ends the execution of a given command that was started with - * XPLMCommandBegin. - * - */ -XPLM_API void XPLMCommandEnd( - XPLMCommandRef inCommand); - -/* - * XPLMCommandOnce - * - * This executes a given command momentarily, that is, the command begins and - * ends immediately. - * - */ -XPLM_API void XPLMCommandOnce( - XPLMCommandRef inCommand); - -/* - * XPLMCreateCommand - * - * XPLMCreateCommand creates a new command for a given string. If the command - * already exists, the existing command reference is returned. The description - * may appear in user interface contexts, such as the joystick configuration - * screen. - * - */ -XPLM_API XPLMCommandRef XPLMCreateCommand( - const char * inName, - const char * inDescription); - -/* - * XPLMRegisterCommandHandler - * - * XPLMRegisterCommandHandler registers a callback to be called when a command - * is executed. You provide a callback with a reference pointer. - * - * If inBefore is true, your command handler callback will be executed before - * X-Plane executes the command, and returning 0 from your callback will - * disable X-Plane's processing of the command. If inBefore is false, your - * callback will run after X-Plane. (You can register a single callback both - * before and after a command.) - * - */ -XPLM_API void XPLMRegisterCommandHandler( - XPLMCommandRef inComand, - XPLMCommandCallback_f inHandler, - int inBefore, - void * inRefcon); - -/* - * XPLMUnregisterCommandHandler - * - * XPLMUnregisterCommandHandler removes a command callback registered with - * XPLMRegisterCommandHandler. - * - */ -XPLM_API void XPLMUnregisterCommandHandler( - XPLMCommandRef inComand, - XPLMCommandCallback_f inHandler, - int inBefore, - void * inRefcon); - -#endif /* XPLM200 */ -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/XPSDK301/Delphi/Widgets/XPStandardWidgets.pas b/src/XPSDK301/Delphi/Widgets/XPStandardWidgets.pas deleted file mode 100755 index f8e0364a..00000000 --- a/src/XPSDK301/Delphi/Widgets/XPStandardWidgets.pas +++ /dev/null @@ -1,488 +0,0 @@ -{ - Copyright 2005-2012 Sandy Barbour and Ben Supnik - - All rights reserved. See license.txt for usage. - - X-Plane SDK Version: 2.1.1 -} - -UNIT XPStandardWidgets; -INTERFACE -{ - XPStandardWidgets - THEORY OF OPERATION - - The standard widgets are widgets built into the widgets library. While you - can gain access to the widget function that drives them, you generally use - them by calling XPCreateWidget and then listening for special messages, - etc. - - The standard widgets often send mesages to themselves when the user - performs an event; these messages are sent up the widget hierarchy until - they are handled. So you can add a widget proc directly to a push button - (for example) to intercept the message when it is clicked, or you can put - one widget proc on a window for all of the push buttons in the window. Most - of these messages contain the original widget ID as a parameter so you can - know which widget is messaging no matter who it is sent to. -} - -USES XPWidgetDefs; - {$A4} -{$IFDEF MSWINDOWS} - {$DEFINE DELPHI} -{$ENDIF} -{___________________________________________________________________________ - * MAIN WINDOW - ___________________________________________________________________________} -{ - The main window widget class provides a "window" as the user knows it. - These windows are dragable and can be selected. Use them to create floating - windows and non-modal dialogs. -} - - -CONST - xpWidgetClass_MainWindow = 1; - - { - Main Window Type Values - - These type values are used to control the appearance of a main window. - } - { The standard main window; pin stripes on XP7, metal frame on XP 6. } - xpMainWindowStyle_MainWindow = 0 -; - { A translucent dark gray window, like the one ATC messages appear in. } - xpMainWindowStyle_Translucent = 1 -; - - { - Main Window Properties - - } - { This property specifies the type of window. Set to one of the main window } - { types above. } - xpProperty_MainWindowType = 1100 -; - { This property specifies whether the main window has close boxes in its } - { corners. } - xpProperty_MainWindowHasCloseBoxes = 1200 -; - - { - MainWindow Messages - - } - { This message is sent when the close buttons are pressed for your window. } - xpMessage_CloseButtonPushed = 1200 -; - -{___________________________________________________________________________ - * SUB WINDOW - ___________________________________________________________________________} -{ - X-Plane dialogs are divided into separate areas; the sub window widgets - allow you to make these areas. Create one main window and place several - subwindows inside it. Then place your controls inside the subwindows. -} - - -CONST - xpWidgetClass_SubWindow = 2; - - { - SubWindow Type Values - - These values control the appearance of the subwindow. - } - { A panel that sits inside a main window. } - xpSubWindowStyle_SubWindow = 0 -; - { A screen that sits inside a panel for showing text information. } - xpSubWindowStyle_Screen = 2 -; - { A list view for scrolling lists. } - xpSubWindowStyle_ListView = 3 -; - - { - SubWindow Properties - - } - { This property specifies the type of window. Set to one of the subwindow } - { types above. } - xpProperty_SubWindowType = 1200 -; - -{___________________________________________________________________________ - * BUTTON - ___________________________________________________________________________} -{ - The button class provides a number of different button styles and - behaviors, including push buttons, radio buttons, check boxes, etc. The - button label appears on or next to the button depending on the button's - appearance, or type. - - The button's behavior is a separate property that dictates who it hilights - and what kinds of messages it sends. Since behavior and type are different, - you can do strange things like make check boxes that act as push buttons or - push buttons with radio button behavior. - - In X-Plane 6 there were no check box graphics. The result is the following - behavior: in X-Plane 6 all check box and radio buttons are round - (radio-button style) buttons; in X-Plane 7 they are all square (check-box - style) buttons. In a future version of X-Plane, the xpButtonBehavior enums - will provide the correct graphic (check box or radio button) giving the - expected result. -} - - -CONST - xpWidgetClass_Button = 3; - - { - Button Types - - These define the visual appearance of buttons but not how they respond to - the mouse. - } - { This is a standard push button, like an 'OK' or 'Cancel' button in a dialog } - { box. } - xpPushButton = 0 -; - { A check box or radio button. Use this and the button behaviors below to } - { get the desired behavior. } - xpRadioButton = 1 -; - { A window close box. } - xpWindowCloseBox = 3 -; - { A small down arrow. } - xpLittleDownArrow = 5 -; - { A small up arrow. } - xpLittleUpArrow = 6 -; - - { - Button Behavior Values - - These define how the button responds to mouse clicks. - } - { Standard push button behavior. The button hilites while the mouse is } - { clicked over it and unhilites when the mouse is moved outside of it or } - { released. If the mouse is released over the button, the } - { xpMsg_PushButtonPressed message is sent. } - xpButtonBehaviorPushButton = 0 -; - { Check box behavior. The button immediately toggles its value when the mouse } - { is clicked and sends out a xpMsg_ButtonStateChanged message. } - xpButtonBehaviorCheckBox = 1 -; - { Radio button behavior. The button immediately sets its state to one and } - { sends out a xpMsg_ButtonStateChanged message if it was not already set to } - { one. You must turn off other radio buttons in a group in your code. } - xpButtonBehaviorRadioButton = 2 -; - - { - Button Properties - - } - { This property sets the visual type of button. Use one of the button types } - { above. } - xpProperty_ButtonType = 1300 -; - { This property sets the button's behavior. Use one of the button behaviors } - { above. } - xpProperty_ButtonBehavior = 1301 -; - { This property tells whether a check box or radio button is "checked" or } - { not. Not used for push buttons. } - xpProperty_ButtonState = 1302 -; - - { - Button Messages - - These messages are sent by the button to itself and then up the widget - chain when the button is clicked. (You may intercept them by providing a - widget handler for the button itself or by providing a handler in a parent - widget.) - } - { This message is sent when the user completes a click and release in a } - { button with push button behavior. Parameter one of the message is the } - { widget ID of the button. This message is dispatched up the widget } - { hierarchy. } - xpMsg_PushButtonPressed = 1300 -; - { This message is sent when a button is clicked that has radio button or } - { check box behavior and its value changes. (Note that if the value changes } - { by setting a property you do not receive this message!) Parameter one is } - { the widget ID of the button, parameter 2 is the new state value, either } - { zero or one. This message is dispatched up the widget hierarchy. } - xpMsg_ButtonStateChanged = 1301 -; - -{___________________________________________________________________________ - * TEXT FIELD - ___________________________________________________________________________} -{ - The text field widget provides an editable text field including mouse - selection and keyboard navigation. The contents of the text field are its - descriptor. (The descriptor changes as the user types.) - - The text field can have a number of types, that effect the visual layout of - the text field. The text field sends messages to itself so you may control - its behavior. - - If you need to filter keystrokes, add a new handler and intercept the key - press message. Since key presses are passed by pointer, you can modify the - keystroke and pass it through to the text field widget. - - WARNING: in X-Plane before 7.10 (including 6.70) null characters could - crash X-Plane. To prevent this, wrap this object with a filter function - (more instructions can be found on the SDK website). -} - - -CONST - xpWidgetClass_TextField = 4; - - { - Text Field Type Values - - These control the look of the text field. - } - { A field for text entry. } - xpTextEntryField = 0 -; - { A transparent text field. The user can type and the text is drawn, but no } - { background is drawn. You can draw your own background by adding a widget } - { handler and prehandling the draw message. } - xpTextTransparent = 3 -; - { A translucent edit field, dark gray. } - xpTextTranslucent = 4 -; - - { - Text Field Properties - - } - { This is the character position the selection starts at, zero based. If it } - { is the same as the end insertion point, the insertion point is not a } - { selection. } - xpProperty_EditFieldSelStart = 1400 -; - { This is the character position of the end of the selection. } - xpProperty_EditFieldSelEnd = 1401 -; - { This is the character position a drag was started at if the user is } - { dragging to select text, or -1 if a drag is not in progress. } - xpProperty_EditFieldSelDragStart = 1402 -; - { This is the type of text field to display, from the above list. } - xpProperty_TextFieldType = 1403 -; - { Set this property to 1 to password protect the field. Characters will be } - { drawn as *s even though the descriptor will contain plain-text. } - xpProperty_PasswordMode = 1404 -; - { The max number of characters you can enter, if limited. Zero means } - { unlimited. } - xpProperty_MaxCharacters = 1405 -; - { The first visible character on the left. This effectively scrolls the text } - { field. } - xpProperty_ScrollPosition = 1406 -; - { The font to draw the field's text with. (An XPLMFontID.) } - xpProperty_Font = 1407 -; - { This is the active side of the insert selection. (Internal) } - xpProperty_ActiveEditSide = 1408 -; - - { - Text Field Messages - - } - { Text Field Messages } - { } - { The text field sends this message to itself when its text changes. It sends } - { the message up the call chain; param1 is the text field's widget ID. } - xpMsg_TextFieldChanged = 1400 -; - -{___________________________________________________________________________ - * SCROLL BAR - ___________________________________________________________________________} -{ - A standard scroll bar or slider control. The scroll bar has a minimum, - maximum and current value that is updated when the user drags it. The - scroll bar sends continuous messages as it is dragged. -} - - -CONST - xpWidgetClass_ScrollBar = 5; - - { - Scroll Bar Type Values - - This defines how the scroll bar looks. - } - { Scroll bar types. } - { } - { A standard X-Plane scroll bar (with arrows on the ends). } - xpScrollBarTypeScrollBar = 0 -; - { A slider, no arrows. } - xpScrollBarTypeSlider = 1 -; - - { - Scroll Bar Properties - - } - { The current position of the thumb (in between the min and max, inclusive) } - xpProperty_ScrollBarSliderPosition = 1500 -; - { The value the scroll bar has when the thumb is in the lowest position. } - xpProperty_ScrollBarMin = 1501 -; - { The value the scroll bar has when the thumb is in the highest position. } - xpProperty_ScrollBarMax = 1502 -; - { How many units to moev the scroll bar when clicking next to the thumb. The } - { scroll bar always moves one unit when the arrows are clicked. } - xpProperty_ScrollBarPageAmount = 1503 -; - { The type of scrollbar from the enums above. } - xpProperty_ScrollBarType = 1504 -; - { Used internally. } - xpProperty_ScrollBarSlop = 1505 -; - - { - Scroll Bar Messages - - } - { The Scroll Bar sends this message when the slider position changes. It } - { sends the message up the call chain; param1 is the Scroll Bar widget ID. } - xpMsg_ScrollBarSliderPositionChanged = 1500 -; - -{___________________________________________________________________________ - * CAPTION - ___________________________________________________________________________} -{ - A caption is a simple widget that shows its descriptor as a string, useful - for labeling parts of a window. It always shows its descriptor as its - string and is otherwise transparent. -} - - -CONST - xpWidgetClass_Caption = 6; - - { - Caption Properties - - } - { This property specifies whether the caption is lit; use lit captions } - { against screens. } - xpProperty_CaptionLit = 1600 -; - -{___________________________________________________________________________ - * GENERAL GRAPHICS - ___________________________________________________________________________} -{ - The general graphics widget can show one of many icons available from - X-Plane. -} - - -CONST - xpWidgetClass_GeneralGraphics = 7; - - { - General Graphics Types Values - - These define the icon for the general graphics. - } - xpShip = 4 -; - xpILSGlideScope = 5 -; - xpMarkerLeft = 6 -; - xp_Airport = 7 -; - xpNDB = 8 -; - xpVOR = 9 -; - xpRadioTower = 10 -; - xpAircraftCarrier = 11 -; - xpFire = 12 -; - xpMarkerRight = 13 -; - xpCustomObject = 14 -; - xpCoolingTower = 15 -; - xpSmokeStack = 16 -; - xpBuilding = 17 -; - xpPowerLine = 18 -; - xpVORWithCompassRose = 19 -; - xpOilPlatform = 21 -; - xpOilPlatformSmall = 22 -; - xpWayPoint = 23 -; - - { - General Graphics Properties - - } - { This property controls the type of icon that is drawn. } - xpProperty_GeneralGraphicsType = 1700 -; - -{___________________________________________________________________________ - * PROGRESS INDICATOR - ___________________________________________________________________________} -{ - This widget implements a progress indicator as seen when X-Plane starts up. -} - -CONST - xpWidgetClass_Progress = 8; - - { - Progress Indicator Properties - - } - { This is the current value of the progress indicator. } - xpProperty_ProgressPosition = 1800 -; - { This is the minimum value, equivalent to 0% filled. } - xpProperty_ProgressMin = 1801 -; - { This is the maximum value, equivalent to 100% filled. } - xpProperty_ProgressMax = 1802 -; - -IMPLEMENTATION -END. diff --git a/src/XPSDK301/Delphi/Widgets/XPUIGraphics.pas b/src/XPSDK301/Delphi/Widgets/XPUIGraphics.pas deleted file mode 100755 index 05bb28a1..00000000 --- a/src/XPSDK301/Delphi/Widgets/XPUIGraphics.pas +++ /dev/null @@ -1,377 +0,0 @@ -{ - Copyright 2005-2012 Sandy Barbour and Ben Supnik - - All rights reserved. See license.txt for usage. - - X-Plane SDK Version: 2.1.1 -} - -UNIT XPUIGraphics; -INTERFACE -{ - -} - -USES XPWidgetDefs; - {$A4} -{$IFDEF MSWINDOWS} - {$DEFINE DELPHI} -{$ENDIF} -{___________________________________________________________________________ - * UI GRAPHICS - ___________________________________________________________________________} -{ - -} - - { - XPWindowStyle - - There are a few built-in window styles in X-Plane that you can use. - - Note that X-Plane 6 does not offer real shadow-compositing; you must make - sure to put a window on top of another window of the right style to the - shadows work, etc. This applies to elements with insets and shadows. The - rules are: - - Sub windows must go on top of main windows, and screens and list views on - top of subwindows. Only help and main windows can be over the main screen. - - With X-Plane 7 any window or element may be placed over any other element. - - Some windows are scaled by stretching, some by repeating. The drawing - routines know which scaling method to use. The list view cannot be rescaled - in X-Plane 6 because it has both a repeating pattern and a gradient in one - element. All other elements can be rescaled. - } -TYPE - XPWindowStyle = ( - { An LCD screen that shows help. } - xpWindow_Help = 0 - - { A dialog box window. } - ,xpWindow_MainWindow = 1 - - { A panel or frame within a dialog box window. } - ,xpWindow_SubWindow = 2 - - { An LCD screen within a panel to hold text displays. } - ,xpWindow_Screen = 4 - - { A list view within a panel for scrolling file names, etc. } - ,xpWindow_ListView = 5 - - ); - PXPWindowStyle = ^XPWindowStyle; - - { - XPDrawWindow - - This routine draws a window of the given dimensions at the given offset on - the virtual screen in a given style. The window is automatically scaled as - appropriate using a bitmap scaling technique (scaling or repeating) as - appropriate to the style. - } - PROCEDURE XPDrawWindow( - inX1 : integer; - inY1 : integer; - inX2 : integer; - inY2 : integer; - inStyle : XPWindowStyle); -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPGetWindowDefaultDimensions - - This routine returns the default dimensions for a window. Output is either - a minimum or fixed value depending on whether the window is scalable. - } - PROCEDURE XPGetWindowDefaultDimensions( - inStyle : XPWindowStyle; - outWidth : Pinteger; { Can be nil } - outHeight : Pinteger); { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPElementStyle - - Elements are individually drawable UI things like push buttons, etc. The - style defines what kind of element you are drawing. Elements can be - stretched in one or two dimensions (depending on the element). Some - elements can be lit. - - In X-Plane 6 some elements must be drawn over metal. Some are scalable and - some are not. Any element can be drawn anywhere in X-Plane 7. - - Scalable Axis Required Background - } -TYPE - XPElementStyle = ( - { x metal } - xpElement_TextField = 6 - - { none metal } - ,xpElement_CheckBox = 9 - - { none metal } - ,xpElement_CheckBoxLit = 10 - - { none window header } - ,xpElement_WindowCloseBox = 14 - - { none window header } - ,xpElement_WindowCloseBoxPressed = 15 - - { x metal } - ,xpElement_PushButton = 16 - - { x metal } - ,xpElement_PushButtonLit = 17 - - { none any } - ,xpElement_OilPlatform = 24 - - { none any } - ,xpElement_OilPlatformSmall = 25 - - { none any } - ,xpElement_Ship = 26 - - { none any } - ,xpElement_ILSGlideScope = 27 - - { none any } - ,xpElement_MarkerLeft = 28 - - { none any } - ,xpElement_Airport = 29 - - { none any } - ,xpElement_Waypoint = 30 - - { none any } - ,xpElement_NDB = 31 - - { none any } - ,xpElement_VOR = 32 - - { none any } - ,xpElement_RadioTower = 33 - - { none any } - ,xpElement_AircraftCarrier = 34 - - { none any } - ,xpElement_Fire = 35 - - { none any } - ,xpElement_MarkerRight = 36 - - { none any } - ,xpElement_CustomObject = 37 - - { none any } - ,xpElement_CoolingTower = 38 - - { none any } - ,xpElement_SmokeStack = 39 - - { none any } - ,xpElement_Building = 40 - - { none any } - ,xpElement_PowerLine = 41 - - { none metal } - ,xpElement_CopyButtons = 45 - - { none metal } - ,xpElement_CopyButtonsWithEditingGrid = 46 - - { x, y metal } - ,xpElement_EditingGrid = 47 - - { THIS CAN PROBABLY BE REMOVED } - ,xpElement_ScrollBar = 48 - - { none any } - ,xpElement_VORWithCompassRose = 49 - - { none metal } - ,xpElement_Zoomer = 51 - - { x, y metal } - ,xpElement_TextFieldMiddle = 52 - - { none metal } - ,xpElement_LittleDownArrow = 53 - - { none metal } - ,xpElement_LittleUpArrow = 54 - - { none metal } - ,xpElement_WindowDragBar = 61 - - { none metal } - ,xpElement_WindowDragBarSmooth = 62 - - ); - PXPElementStyle = ^XPElementStyle; - - { - XPDrawElement - - XPDrawElement draws a given element at an offset on the virtual screen in - set dimensions. EVEN if the element is not scalable, it will be scaled if - the width and height do not match the preferred dimensions; it'll just look - ugly. Pass inLit to see the lit version of the element; if the element - cannot be lit this is ignored. - } - PROCEDURE XPDrawElement( - inX1 : integer; - inY1 : integer; - inX2 : integer; - inY2 : integer; - inStyle : XPElementStyle; - inLit : integer); -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPGetElementDefaultDimensions - - This routine returns the recommended or minimum dimensions of a given UI - element. outCanBeLit tells whether the element has both a lit and unlit - state. Pass NULL to not receive any of these parameters. - } - PROCEDURE XPGetElementDefaultDimensions( - inStyle : XPElementStyle; - outWidth : Pinteger; { Can be nil } - outHeight : Pinteger; { Can be nil } - outCanBeLit : Pinteger); { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPTrackStyle - - A track is a UI element that displays a value vertically or horizontally. - X-Plane has three kinds of tracks: scroll bars, sliders, and progress bars. - Tracks can be displayed either horizontally or vertically; tracks will - choose their own layout based on the larger dimension of their dimensions - (e.g. they know if they are tall or wide). Sliders may be lit or unlit - (showing the user manipulating them). - - ScrollBar - this is a standard scroll bar with arrows and a thumb to drag. - Slider - this is a simple track with a ball in the middle that can be slid. - Progress - this is a progress indicator showing how a long task is going. - } -TYPE - XPTrackStyle = ( - { not over metal can be lit can be rotated } - xpTrack_ScrollBar = 0 - - { over metal can be lit can be rotated } - ,xpTrack_Slider = 1 - - { over metal cannot be lit cannot be rotated } - ,xpTrack_Progress = 2 - - ); - PXPTrackStyle = ^XPTrackStyle; - - { - XPDrawTrack - - This routine draws a track. You pass in the track dimensions and size; the - track picks the optimal orientation for these dimensions. Pass in the - track's minimum current and maximum values; the indicator will be - positioned appropriately. You can also specify whether the track is lit or - not. - } - PROCEDURE XPDrawTrack( - inX1 : integer; - inY1 : integer; - inX2 : integer; - inY2 : integer; - inMin : integer; - inMax : integer; - inValue : integer; - inTrackStyle : XPTrackStyle; - inLit : integer); -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPGetTrackDefaultDimensions - - This routine returns a track's default smaller dimension; all tracks are - scalable in the larger dimension. It also returns whether a track can be - lit. - } - PROCEDURE XPGetTrackDefaultDimensions( - inStyle : XPTrackStyle; - outWidth : Pinteger; - outCanBeLit : Pinteger); -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPGetTrackMetrics - - This routine returns the metrics of a track. If you want to write UI code - to manipulate a track, this routine helps you know where the mouse - locations are. For most other elements, the rectangle the element is drawn - in is enough information. However, the scrollbar drawing routine does some - automatic placement; this routine lets you know where things ended up. You - pass almost everything you would pass to the draw routine. You get out the - orientation, and other useful stuff. - - Besides orientation, you get five dimensions for the five parts of a - scrollbar, which are the down button, down area (area before the thumb), - the thumb, and the up area and button. For horizontal scrollers, the left - button decreases; for vertical scrollers, the top button decreases. - } - PROCEDURE XPGetTrackMetrics( - inX1 : integer; - inY1 : integer; - inX2 : integer; - inY2 : integer; - inMin : integer; - inMax : integer; - inValue : integer; - inTrackStyle : XPTrackStyle; - outIsVertical : Pinteger; - outDownBtnSize : Pinteger; - outDownPageSize : Pinteger; - outThumbSize : Pinteger; - outUpPageSize : Pinteger; - outUpBtnSize : Pinteger); -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -IMPLEMENTATION -END. diff --git a/src/XPSDK301/Delphi/Widgets/XPWidgetDefs.pas b/src/XPSDK301/Delphi/Widgets/XPWidgetDefs.pas deleted file mode 100755 index 8a38482d..00000000 --- a/src/XPSDK301/Delphi/Widgets/XPWidgetDefs.pas +++ /dev/null @@ -1,437 +0,0 @@ -{ - Copyright 2005-2012 Sandy Barbour and Ben Supnik - - All rights reserved. See license.txt for usage. - - X-Plane SDK Version: 2.1.1 -} - -UNIT XPWidgetDefs; -INTERFACE -{ - -} - -USES XPLMDefs; - {$A4} -{$IFDEF MSWINDOWS} - {$DEFINE DELPHI} -{$ENDIF} -{___________________________________________________________________________ - * WIDGET DEFINITIONS - ___________________________________________________________________________} -{ - A widget is a call-back driven screen entity like a push-button, window, - text entry field, etc. - - Use the widget API to create widgets of various classes. You can nest them - into trees of widgets to create complex user interfaces. -} - - -TYPE - { - XPWidgetID - - A Widget ID is an opaque unique non-zero handle identifying your widget. - Use 0 to specify "no widget". This type is defined as wide enough to hold a - pointer. You receive a widget ID when you create a new widget and then use - that widget ID to further refer to the widget. - } - XPWidgetID = pointer; - PXPWidgetID = ^XPWidgetID; - - { - XPWidgetPropertyID - - Properties are values attached to instances of your widgets. A property is - identified by a 32-bit ID and its value is the width of a pointer. - - Each widget instance may have a property or not have it. When you set a - property on a widget for the first time, the property is added to the - widget; it then stays there for the life of the widget. - - Some property IDs are predefined by the widget package; you can make up - your own property IDs as well. - } - XPWidgetPropertyID = ( - { A window's refcon is an opaque value used by client code to find other data } - { based on it. } - xpProperty_Refcon = 0 - - { These properties are used by the utlities to implement dragging. } - ,xpProperty_Dragging = 1 - - ,xpProperty_DragXOff = 2 - - ,xpProperty_DragYOff = 3 - - { Is the widget hilited? (For widgets that support this kind of thing.) } - ,xpProperty_Hilited = 4 - - { Is there a C++ object attached to this widget? } - ,xpProperty_Object = 5 - - { If this property is 1, the widget package will use OpenGL to restrict } - { drawing to the Wiget's exposed rectangle. } - ,xpProperty_Clip = 6 - - { Is this widget enabled (for those that have a disabled state too)? } - ,xpProperty_Enabled = 7 - - { NOTE: Property IDs 1 - 999 are reserved for the widget's library. } - { } - { NOTE: Property IDs 1000 - 9999 are allocated to the standard widget classes } - { provided with the library Properties 1000 - 1099 are for widget class 0, } - { 1100 - 1199 for widget class 1, etc. } - ,xpProperty_UserStart = 10000 - - ); - PXPWidgetPropertyID = ^XPWidgetPropertyID; - - { - XPMouseState_t - - When the mouse is clicked or dragged, a pointer to this structure is passed - to your widget function. - } - XPMouseState_t = RECORD - x : integer; - y : integer; - { Mouse Button number, left = 0 (right button not yet supported. } - button : integer; -{$IFDEF XPLM200} - { Scroll wheel delta (button in this case would be the wheel axis number). } - delta : integer; -{$ENDIF} - END; - PXPMouseState_t = ^XPMouseState_t; - - { - XPKeyState_t - - When a key is pressed, a pointer to this struct is passed to your widget - function. - } - XPKeyState_t = RECORD - { The ASCII key that was pressed. WARNING: this may be 0 for some non-ASCII } - { key sequences. } - key : char; - { The flags. Make sure to check this if you only want key-downs! } - flags : XPLMKeyFlags; - { The virtual key code for the key } - vkey : char; - END; - PXPKeyState_t = ^XPKeyState_t; - - { - XPWidgetGeometryChange_t - - This structure contains the deltas for your widget's geometry when it - changes. - } - XPWidgetGeometryChange_t = RECORD - dx : integer; - { +Y = the widget moved up } - dy : integer; - dwidth : integer; - dheight : integer; - END; - PXPWidgetGeometryChange_t = ^XPWidgetGeometryChange_t; - - { - XPDispatchMode - - The dispatching modes describe how the widgets library sends out messages. - Currently there are three modes: - } - XPDispatchMode = ( - { The message will only be sent to the target widget. } - xpMode_Direct = 0 - - { The message is sent to the target widget, then up the chain of parents } - { until the message is handled or a parentless widget is reached. } - ,xpMode_UpChain = 1 - - { The message is sent to the target widget and then all of its children } - { recursively depth-first. } - ,xpMode_Recursive = 2 - - { The message is snet just to the target, but goes to every callback, even if } - { it is handled. } - ,xpMode_DirectAllCallbacks = 3 - - { The message is only sent to the very first handler even if it is not } - { accepted. (This is really only useful for some internal Widget Lib } - { functions. } - ,xpMode_Once = 4 - - ); - PXPDispatchMode = ^XPDispatchMode; - - { - XPWidgetClass - - Widget classes define predefined widget types. A widget class basically - specifies from a library the widget function to be used for the widget. - Most widgets can be made right from classes. - } - XPWidgetClass = integer; - PXPWidgetClass = ^XPWidgetClass; - -CONST - { An unspecified widget class. Other widget classes are in } - { XPStandardWidgets.h } - xpWidgetClass_None = 0; - -{___________________________________________________________________________ - * WIDGET MESSAGES - ___________________________________________________________________________} -{ - -} - - { - XPWidgetMessage - - Widgets receive 32-bit messages indicating what action is to be taken or - notifications of events. The list of messages may be expanded. - } -TYPE - XPWidgetMessage = ( - { No message, should not be sent. } - xpMsg_None = 0 - - { The create message is sent once per widget that is created with your widget } - { function and once for any widget that has your widget function attached. } - { } - { Dispatching: Direct } - { } - { Param 1: 1 if you are being added as a subclass, 0 if the widget is first } - { being created. } - ,xpMsg_Create = 1 - - { The destroy message is sent once for each message that is destroyed that } - { has your widget function. } - { } - { Dispatching: Direct for all } - { } - { Param 1: 1 if being deleted by a recursive delete to the parent, 0 for } - { explicit deletion. } - ,xpMsg_Destroy = 2 - - { The paint message is sent to your widget to draw itself. The paint message } - { is the bare-bones message; in response you must draw yourself, draw your } - { children, set up clipping and culling, check for visibility, etc. If you } - { don't want to do all of this, ignore the paint message and a draw message } - { (see below) will be sent to you. } - { } - { Dispatching: Direct } - ,xpMsg_Paint = 3 - - { The draw message is sent to your widget when it is time to draw yourself. } - { OpenGL will be set up to draw in 2-d global screen coordinates, but you } - { should use the XPLM to set up OpenGL state. } - { } - { Dispatching: Direct } - ,xpMsg_Draw = 4 - - { The key press message is sent once per key that is pressed. The first } - { parameter is the type of key code (integer or char) and the second is the } - { code itself. By handling this event, you consume the key stroke. } - { } - { Handling this message 'consumes' the keystroke; not handling it passes it } - { to your parent widget. } - { } - { Dispatching: Up Chain } - { } - { : Param 1: A pointer to an XPKeyState_t structure with the keystroke. } - ,xpMsg_KeyPress = 5 - - { Keyboard focus is being given to you. By handling this message you accept } - { keyboard focus. The first parameter will be one if a child of yours gave up } - { focus to you, 0 if someone set focus on you explicitly. } - { } - { : Handling this message accepts focus; not handling refuses focus. } - { } - { Dispatching: direct } - { } - { Param 1: 1 if you are gaining focus because your child is giving it up, 0 } - { if someone is explicitly giving you focus. } - ,xpMsg_KeyTakeFocus = 6 - - { Keyboard focus is being taken away from you. The first parameter will be } - { one if you are losing focus because another widget is taking it, or 0 if } - { someone called the API to make you lose focus explicitly. } - { } - { Dispatching: Direct } - { } - { Param 1: 1 if focus is being taken by another widget, 0 if code requested } - { to remove focus. } - ,xpMsg_KeyLoseFocus = 7 - - { You receive one mousedown event per click with a mouse-state structure } - { pointed to by parameter 1, by accepting this you eat the click, otherwise } - { your parent gets it. You will not receive drag and mouse up messages if you } - { do not accept the down message. } - { } - { Handling this message consumes the mouse click, not handling it passes it } - { to the next widget. You can act 'transparent' as a window by never handling } - { moues clicks to certain areas. } - { } - { Dispatching: Up chain NOTE: Technically this is direct dispatched, but the } - { widgets library will shop it to each widget until one consumes the click, } - { making it effectively "up chain". } - { } - { Param 1: A pointer to an XPMouseState_t containing the mouse status. } - ,xpMsg_MouseDown = 8 - - { You receive a series of mouse drag messages (typically one per frame in the } - { sim) as the mouse is moved once you have accepted a mouse down message. } - { Parameter one points to a mouse-state structure describing the mouse } - { location. You will continue to receive these until the mouse button is } - { released. You may receive multiple mouse state messages with the same mouse } - { position. You will receive mouse drag events even if the mouse is dragged } - { out of your current or original bounds at the time of the mouse down. } - { } - { Dispatching: Direct } - { } - { Param 1: A pointer to an XPMouseState_t containing the mouse status. } - ,xpMsg_MouseDrag = 9 - - { The mouseup event is sent once when the mouse button is released after a } - { drag or click. You only receive this message if you accept the mouseDown } - { message. Parameter one points to a mouse state structure. } - { } - { Dispatching: Direct } - { } - { Param 1: A pointer to an XPMouseState_t containing the mouse status. } - ,xpMsg_MouseUp = 10 - - { Your geometry or a child's geometry is being changed. } - { } - { Dispatching: Up chain } - { } - { Param 1: The widget ID of the original reshaped target. } - { } - { Param 2: A pointer to a XPWidgetGeometryChange_t struct describing the } - { change. } - ,xpMsg_Reshape = 11 - - { Your exposed area has changed. } - { } - { Dispatching: Direct } - ,xpMsg_ExposedChanged = 12 - - { A child has been added to you. The child's ID is passed in parameter one. } - { } - { Dispatching: Direct } - { } - { Param 1: The Widget ID of the child being added. } - ,xpMsg_AcceptChild = 13 - - { A child has been removed from to you. The child's ID is passed in parameter } - { one. } - { } - { Dispatching: Direct } - { } - { Param 1: The Widget ID of the child being removed. } - ,xpMsg_LoseChild = 14 - - { You now have a new parent, or have no parent. The parent's ID is passed in, } - { or 0 for no parent. } - { } - { Dispatching: Direct } - { } - { Param 1: The Widget ID of your parent } - ,xpMsg_AcceptParent = 15 - - { You or a child has been shown. Note that this does not include you being } - { shown because your parent was shown, you were put in a new parent, your } - { root was shown, etc. } - { } - { Dispatching: Up chain } - { } - { Param 1: The widget ID of the shown widget. } - ,xpMsg_Shown = 16 - - { You have been hidden. See limitations above. } - { } - { Dispatching: Up chain } - { } - { Param 1: The widget ID of the hidden widget. } - ,xpMsg_Hidden = 17 - - { Your descriptor has changed. } - { } - { Dispatching: Direct } - ,xpMsg_DescriptorChanged = 18 - - { A property has changed. Param 1 contains the property ID. } - { } - { Dispatching: Direct } - { } - { Param 1: The Property ID being changed. } - { } - { Param 2: The new property value } - ,xpMsg_PropertyChanged = 19 - -{$IFDEF XPLM200} - { The mouse wheel has moved. } - { } - { Return 1 to consume the mouse wheel move, or 0 to pass the message to a } - { parent. Dispatching: Up chain } - { } - { Param 1: A pointer to an XPMouseState_t containing the mouse status. } - ,xpMsg_MouseWheel = 20 -{$ENDIF} - -{$IFDEF XPLM200} - { The cursor is over your widget. If you consume this message, change the } - { XPLMCursorStatus value to indicate the desired result, with the same rules } - { as in XPLMDisplay.h. } - { } - { Return 1 to consume this message, 0 to pass it on. } - { } - { Dispatching: Up chain Param 1: A pointer to an XPMouseState_t struct } - { containing the mouse status. } - { } - { Param 2: A pointer to a XPLMCursorStatus - set this to the cursor result } - { you desire. } - ,xpMsg_CursorAdjust = 21 -{$ENDIF} - - { NOTE: Message IDs 1000 - 9999 are allocated to the standard widget classes } - { provided with the library with 1000 - 1099 for widget class 0, 1100 - 1199 } - { for widget class 1, etc. Message IDs 10,000 and beyond are for plugin use. } - ,xpMsg_UserStart = 10000 - - ); - PXPWidgetMessage = ^XPWidgetMessage; - -{___________________________________________________________________________ - * WIDGET CALLBACK FUNCTION - ___________________________________________________________________________} -{ - -} - - { - XPWidgetFunc_t - - This function defines your custom widget's behavior. It will be called by - the widgets library to send messages to your widget. The message and widget - ID are passed in, as well as two ptr-width signed parameters whose meaning - varies with the message. Return 1 to indicate that you have processed the - message, 0 to indicate that you have not. For any message that is not - understood, return 0. - } -TYPE - XPWidgetFunc_t = FUNCTION( - inMessage : XPWidgetMessage; - inWidget : XPWidgetID; - inParam1 : intptr_t; - inParam2 : intptr_t) : integer; cdecl; - -IMPLEMENTATION -END. diff --git a/src/XPSDK301/Delphi/Widgets/XPWidgetUtils.pas b/src/XPSDK301/Delphi/Widgets/XPWidgetUtils.pas deleted file mode 100755 index 80ef7a3d..00000000 --- a/src/XPSDK301/Delphi/Widgets/XPWidgetUtils.pas +++ /dev/null @@ -1,223 +0,0 @@ -{ - Copyright 2005-2012 Sandy Barbour and Ben Supnik - - All rights reserved. See license.txt for usage. - - X-Plane SDK Version: 2.1.1 -} - -UNIT XPWidgetUtils; -INTERFACE -{ - XPWidgetUtils - USAGE NOTES - - The XPWidgetUtils library contains useful functions that make writing and - using widgets less of a pain. - - One set of functions are the widget behavior functions. These functions - each add specific useful behaviors to widgets. They can be used in two - manners: - - 1. You can add a widget behavior function to a widget as a callback proc - using the XPAddWidgetCallback function. The widget will gain that behavior. - Remember that the last function you add has highest priority. You can use - this to change or augment the behavior of an existing finished widget. - - 2. You can call a widget function from inside your own widget function. - This allows you to include useful behaviors in custom-built widgets. A - number of the standard widgets get their behavior from this library. To do - this, call the behavior function from your function first. If it returns 1, - that means it handled the event and you don't need to; simply return 1. -} - -USES XPWidgetDefs; - {$A4} -{$IFDEF MSWINDOWS} - {$DEFINE DELPHI} -{$ENDIF} -{___________________________________________________________________________ - * GENERAL UTILITIES - ___________________________________________________________________________} -{ - -} - - - { - XPWidgetCreate_t - - This structure contains all of the parameters needed to create a wiget. It - is used with XPUCreateWidgets to create widgets in bulk from an array. All - parameters correspond to those of XPCreateWidget except for the container - index. If the container index is equal to the index of a widget in the - array, the widget in the array passed to XPUCreateWidgets is used as the - parent of this widget. Note that if you pass an index greater than your own - position in the array, the parent you are requesting will not exist yet. If - the container index is NO_PARENT, the parent widget is specified as NULL. - If the container index is PARAM_PARENT, the widget passed into - XPUCreateWidgets is used. - } -TYPE - XPWidgetCreate_t = RECORD - left : integer; - top : integer; - right : integer; - bottom : integer; - visible : integer; - descriptor : Pchar; - { Whether ethis widget is a root wiget } - isRoot : integer; - { The index of the widget to contain within, or a constant } - containerIndex : integer; - widgetClass : XPWidgetClass; - END; - PXPWidgetCreate_t = ^XPWidgetCreate_t; - -CONST - NO_PARENT = -1; - - PARAM_PARENT = -2; - - - { - XPUCreateWidgets - - This function creates a series of widgets from a table...see - XPCreateWidget_t above. Pass in an array of widget creation structures and - an array of widget IDs that will receive each widget. - - Widget parents are specified by index into the created widget table, - allowing you to create nested widget structures. You can create multiple - widget trees in one table. Generally you should create widget trees from - the top down. - - You can also pass in a widget ID that will be used when the widget's parent - is listed as PARAM_PARENT; this allows you to embed widgets created with - XPUCreateWidgets in a widget created previously. - } - PROCEDURE XPUCreateWidgets( - inWidgetDefs : PXPWidgetCreate_t; - inCount : integer; - inParamParent : XPWidgetID; - ioWidgets : PXPWidgetID); -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPUMoveWidgetBy - - Simply moves a widget by an amount, +x = right, +y=up, without resizing the - widget. - } - PROCEDURE XPUMoveWidgetBy( - inWidget : XPWidgetID; - inDeltaX : integer; - inDeltaY : integer); -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{___________________________________________________________________________ - * LAYOUT MANAGERS - ___________________________________________________________________________} -{ - The layout managers are widget behavior functions for handling where - widgets move. Layout managers can be called from a widget function or - attached to a widget later. -} - - - { - XPUFixedLayout - - This function causes the widget to maintain its children in fixed position - relative to itself as it is resized. Use this on the top level 'window' - widget for your window. - } - FUNCTION XPUFixedLayout( - inMessage : XPWidgetMessage; - inWidget : XPWidgetID; - inParam1 : intptr_t; - inParam2 : intptr_t) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{___________________________________________________________________________ - * WIDGET PROC BEHAVIORS - ___________________________________________________________________________} -{ - These widget behavior functions add other useful behaviors to widgets. - These functions cannot be attached to a widget; they must be called from - your widget function. -} - - - { - XPUSelectIfNeeded - - This causes the widget to bring its window to the foreground if it is not - already. inEatClick specifies whether clicks in the background should be - consumed by bringin the window to the foreground. - } - FUNCTION XPUSelectIfNeeded( - inMessage : XPWidgetMessage; - inWidget : XPWidgetID; - inParam1 : intptr_t; - inParam2 : intptr_t; - inEatClick : integer) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPUDefocusKeyboard - - This causes a click in the widget to send keyboard focus back to X-Plane. - This stops editing of any text fields, etc. - } - FUNCTION XPUDefocusKeyboard( - inMessage : XPWidgetMessage; - inWidget : XPWidgetID; - inParam1 : intptr_t; - inParam2 : intptr_t; - inEatClick : integer) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPUDragWidget - - XPUDragWidget drags the widget in response to mouse clicks. Pass in not - only the event, but the global coordinates of the drag region, which might - be a sub-region of your widget (for example, a title bar). - } - FUNCTION XPUDragWidget( - inMessage : XPWidgetMessage; - inWidget : XPWidgetID; - inParam1 : intptr_t; - inParam2 : intptr_t; - inLeft : integer; - inTop : integer; - inRight : integer; - inBottom : integer) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -IMPLEMENTATION -END. diff --git a/src/XPSDK301/Delphi/Widgets/XPWidgets.pas b/src/XPSDK301/Delphi/Widgets/XPWidgets.pas deleted file mode 100755 index fe002d0e..00000000 --- a/src/XPSDK301/Delphi/Widgets/XPWidgets.pas +++ /dev/null @@ -1,678 +0,0 @@ -{ - Copyright 2005-2012 Sandy Barbour and Ben Supnik - - All rights reserved. See license.txt for usage. - - X-Plane SDK Version: 2.1.1 -} - -UNIT XPWidgets; -INTERFACE -{ - WIDGETS - THEORY OF OPERATION AND NOTES - - Widgets are persistent view 'objects' for X-Plane. A widget is an object - referenced by its opaque handle (widget ID) and the APIs in this file. You - cannot access the widget's guts directly. Every Widget has the following - intrinsic data: - - - A bounding box defined in global screen coordinates with 0,0 in the - bottom left and +y = up, +x = right. - - - A visible box, which is the intersection of the bounding box with the - widget's parents visible box. - - - Zero or one parent widgets. (Always zero if the widget is a root widget. - - - Zero or more child widgets. - - - Whether the widget is a root. Root widgets are the top level plugin - windows. - - - Whether the widget is visible. - - - A text string descriptor, whose meaning varies from widget to widget. - - - An arbitrary set of 32 bit integral properties defined by 32-bit integral - keys. This is how specific widgets - - store specific data. - - - A list of widget callbacks proc that implements the widgets behaviors. - - The Widgets library sends messages to widgets to request specific behaviors - or notify the widget of things. - - Widgets may have more than one callback function, in which case messages - are sent to the most recently added callback function until the message is - handled. Messages may also be sent to parents or children; see the - XPWidgetDefs.h header file for the different widget message dispatching - functions. By adding a callback function to a window you can 'subclass' its - behavior. - - A set of standard widgets are provided that serve common UI purposes. You - can also customize or implement entirely custom widgets. - - Widgets are different than other view hierarchies (most notably Win32, - which they bear a striking resemblance to) in the following ways: - - - Not all behavior can be patched. State that is managed by the XPWidgets - DLL and not by individual widgets cannot be customized. - - - All coordinates are in global screen coordinates. Coordinates are not - relative to an enclosing widget, nor are they relative to a display window. - - - - Widget messages are always dispatched synchronously, and there is no - concept of scheduling an update or a dirty region. Messages originate from - X-Plane as the sim cycle goes by. Since X-Plane is constantly redrawing, so - are widgets; there is no need to mark a part of a widget as 'needing - redrawing' because redrawing happens frequently whether the widget needs it - or not. - - - Any widget may be a 'root' widget, causing it to be drawn; there is no - relationship between widget class and rootness. Root widgets are imlemented - as XPLMDisply windows. -} - -USES XPWidgetDefs; -USES XPLMDisplay; - {$A4} -{$IFDEF MSWINDOWS} - {$DEFINE DELPHI} -{$ENDIF} -{___________________________________________________________________________ - * WIDGET CREATION AND MANAGEMENT - ___________________________________________________________________________} -{ - -} - - { - XPCreateWidget - - This function creates a new widget and returns the new widget's ID to you. - If the widget creation fails for some reason, it returns NULL. Widget - creation will fail either if you pass a bad class ID or if there is not - adequate memory. - - Input Parameters: - - - Top, left, bottom, and right in global screen coordinates defining the - widget's location on the screen. - - - inVisible is 1 if the widget should be drawn, 0 to start the widget as - hidden. - - - inDescriptor is a null terminated string that will become the widget's - descriptor. - - - inIsRoot is 1 if this is going to be a root widget, 0 if it will not be. - - - inContainer is the ID of this widget's container. It must be 0 for a root - widget. for a non-root widget, pass the widget ID of the widget to place - this widget within. If this widget is not going to start inside another - widget, pass 0; this new widget will then just be floating off in space - (and will not be drawn until it is placed in a widget. - - - inClass is the class of the widget to draw. Use one of the predefined - class-IDs to create a standard widget. - - A note on widget embedding: a widget is only called (and will be drawn, - etc.) if it is placed within a widget that will be called. Root widgets are - always called. So it is possible to have whole chains of widgets that are - simply not called. You can preconstruct widget trees and then place them - into root widgets later to activate them if you wish. - } - FUNCTION XPCreateWidget( - inLeft : integer; - inTop : integer; - inRight : integer; - inBottom : integer; - inVisible : integer; - inDescriptor : Pchar; - inIsRoot : integer; - inContainer : XPWidgetID; - inClass : XPWidgetClass) : XPWidgetID; -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPCreateCustomWidget - - This function is the same as XPCreateWidget except that instead of passing - a class ID, you pass your widget callback function pointer defining the - widget. Use this function to define a custom widget. All parameters are the - same as XPCreateWidget, except that the widget class has been replaced with - the widget function. - } - FUNCTION XPCreateCustomWidget( - inLeft : integer; - inTop : integer; - inRight : integer; - inBottom : integer; - inVisible : integer; - inDescriptor : Pchar; - inIsRoot : integer; - inContainer : XPWidgetID; - inCallback : XPWidgetFunc_t) : XPWidgetID; -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPDestroyWidget - - This class destroys a widget. Pass in the ID of the widget to kill. If you - pass 1 for inDestroyChilren, the widget's children will be destroyed first, - then this widget will be destroyed. (Furthermore, the widget's children - will be destroyed with the inDestroyChildren flag set to 1, so the - destruction will recurse down the widget tree.) If you pass 0 for this - flag, the child widgets will simply end up with their parent set to 0. - } - PROCEDURE XPDestroyWidget( - inWidget : XPWidgetID; - inDestroyChildren : integer); -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPSendMessageToWidget - - This sends any message to a widget. You should probably not go around - simulating the predefined messages that the widgets library defines for - you. You may however define custom messages for your widgets and send them - with this method. - - This method supports several dispatching patterns; see XPDispatchMode for - more info. The function returns 1 if the message was handled, 0 if it was - not. - - For each widget that receives the message (see the dispatching modes), each - widget function from the most recently installed to the oldest one receives - the message in order until it is handled. - } - FUNCTION XPSendMessageToWidget( - inWidget : XPWidgetID; - inMessage : XPWidgetMessage; - inMode : XPDispatchMode; - inParam1 : intptr_t; - inParam2 : intptr_t) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{___________________________________________________________________________ - * WIDGET POSITIONING AND VISIBILITY - ___________________________________________________________________________} -{ - -} - - { - XPPlaceWidgetWithin - - This function changes which container a widget resides in. You may NOT use - this function on a root widget! inSubWidget is the widget that will be - moved. Pass a widget ID in inContainer to make inSubWidget be a child of - inContainer. It will become the last/closest widget in the container. Pass - 0 to remove the widget from any container. Any call to this other than - passing the widget ID of the old parent of the affected widget will cause - the widget to be removed from its old parent. Placing a widget within its - own parent simply makes it the last widget. - - NOTE: this routine does not reposition the sub widget in global - coordinates. If the container has layout management code, it will - reposition the subwidget for you, otherwise you must do it with - SetWidgetGeometry. - } - PROCEDURE XPPlaceWidgetWithin( - inSubWidget : XPWidgetID; - inContainer : XPWidgetID); -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPCountChildWidgets - - This routine returns the number of widgets another widget contains. - } - FUNCTION XPCountChildWidgets( - inWidget : XPWidgetID) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPGetNthChildWidget - - This routine returns the widget ID of a child widget by index. Indexes are - 0 based, from 0 to one minus the number of widgets in the parent, - inclusive. If the index is invalid, 0 is returned. - } - FUNCTION XPGetNthChildWidget( - inWidget : XPWidgetID; - inIndex : integer) : XPWidgetID; -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPGetParentWidget - - This routine returns the parent of a widget, or 0 if the widget has no - parent. Root widgets never have parents and therefore always return 0. - } - FUNCTION XPGetParentWidget( - inWidget : XPWidgetID) : XPWidgetID; -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPShowWidget - - This routine makes a widget visible if it is not already. Note that if a - widget is not in a rooted widget hierarchy or one of its parents is not - visible, it will still not be visible to the user. - } - PROCEDURE XPShowWidget( - inWidget : XPWidgetID); -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPHideWidget - - Makes a widget invisible. See XPShowWidget for considerations of when a - widget might not be visible despite its own visibility state. - } - PROCEDURE XPHideWidget( - inWidget : XPWidgetID); -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPIsWidgetVisible - - This returns 1 if a widget is visible, 0 if it is not. Note that this - routine takes into consideration whether a parent is invisible. Use this - routine to tell if the user can see the widget. - } - FUNCTION XPIsWidgetVisible( - inWidget : XPWidgetID) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPFindRootWidget - - XPFindRootWidget returns the Widget ID of the root widget that contains the - passed in widget or NULL if the passed in widget is not in a rooted - hierarchy. - } - FUNCTION XPFindRootWidget( - inWidget : XPWidgetID) : XPWidgetID; -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPBringRootWidgetToFront - - This routine makes the specified widget be in the front most widget - hierarchy. If this widget is a root widget, its widget hierarchy comes to - front, otherwise the widget's root is brought to the front. If this widget - is not in an active widget hiearchy (e.g. there is no root widget at the - top of the tree), this routine does nothing. - } - PROCEDURE XPBringRootWidgetToFront( - inWidget : XPWidgetID); -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPIsWidgetInFront - - This routine returns true if this widget's hierarchy is the front most - hierarchy. It returns false if the widget's hierarchy is not in front, or - if the widget is not in a rooted hierarchy. - } - FUNCTION XPIsWidgetInFront( - inWidget : XPWidgetID) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPGetWidgetGeometry - - This routine returns the bounding box of a widget in global coordinates. - Pass NULL for any parameter you are not interested in. - } - PROCEDURE XPGetWidgetGeometry( - inWidget : XPWidgetID; - outLeft : Pinteger; { Can be nil } - outTop : Pinteger; { Can be nil } - outRight : Pinteger; { Can be nil } - outBottom : Pinteger); { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPSetWidgetGeometry - - This function changes the bounding box of a widget. - } - PROCEDURE XPSetWidgetGeometry( - inWidget : XPWidgetID; - inLeft : integer; - inTop : integer; - inRight : integer; - inBottom : integer); -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPGetWidgetForLocation - - Given a widget and a location, this routine returns the widget ID of the - child of that widget that owns that location. If inRecursive is true then - this will return a child of a child of a widget as it tries to find the - deepest widget at that location. If inVisibleOnly is true, then only - visible widgets are considered, otherwise all widgets are considered. The - widget ID passed for inContainer will be returned if the location is in - that widget but not in a child widget. 0 is returned if the location is not - in the container. - - NOTE: if a widget's geometry extends outside its parents geometry, it will - not be returned by this call for mouse locations outside the parent - geometry. The parent geometry limits the child's eligibility for mouse - location. - } - FUNCTION XPGetWidgetForLocation( - inContainer : XPWidgetID; - inXOffset : integer; - inYOffset : integer; - inRecursive : integer; - inVisibleOnly : integer) : XPWidgetID; -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPGetWidgetExposedGeometry - - This routine returns the bounds of the area of a widget that is completely - within its parent widgets. Since a widget's bounding box can be outside its - parent, part of its area will not be elligible for mouse clicks and should - not draw. Use XPGetWidgetGeometry to find out what area defines your - widget's shape, but use this routine to find out what area to actually draw - into. Note that the widget library does not use OpenGL clipping to keep - frame rates up, although you could use it internally. - } - PROCEDURE XPGetWidgetExposedGeometry( - inWidgetID : XPWidgetID; - outLeft : Pinteger; { Can be nil } - outTop : Pinteger; { Can be nil } - outRight : Pinteger; { Can be nil } - outBottom : Pinteger); { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{___________________________________________________________________________ - * ACCESSING WIDGET DATA - ___________________________________________________________________________} -{ - -} - - { - XPSetWidgetDescriptor - - Every widget has a descriptor, which is a text string. What the text string - is used for varies from widget to widget; for example, a push button's text - is its descriptor, a caption shows its descriptor, and a text field's - descriptor is the text being edited. In other words, the usage for the text - varies from widget to widget, but this API provides a universal and - convenient way to get at it. While not all UI widgets need their - descriptor, many do. - } - PROCEDURE XPSetWidgetDescriptor( - inWidget : XPWidgetID; - inDescriptor : Pchar); -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPGetWidgetDescriptor - - This routine returns the widget's descriptor. Pass in the length of the - buffer you are going to receive the descriptor in. The descriptor will be - null terminated for you. This routine returns the length of the actual - descriptor; if you pass NULL for outDescriptor, you can get the - descriptor's length without getting its text. If the length of the - descriptor exceeds your buffer length, the buffer will not be null - terminated (this routine has 'strncpy' semantics). - } - FUNCTION XPGetWidgetDescriptor( - inWidget : XPWidgetID; - outDescriptor : Pchar; - inMaxDescLength : integer) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPGetWidgetUnderlyingWindow - - Returns the window (from the XPLMDisplay API) that backs your widget - window. If you have opted in to modern windows, via a call to - XPLMEnableFeature("XPLM_USE_NATIVE_WIDGET_WINDOWS", 1), you can use the - returned window ID for display APIs like XPLMSetWindowPositioningMode(), - allowing you to pop the widget window out into a real OS window, or move it - into VR. - } - FUNCTION XPGetWidgetUnderlyingWindow( - inWidget : XPWidgetID) : XPLMWindowID; -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPSetWidgetProperty - - This function sets a widget's property. Properties are arbitrary values - associated by a widget by ID. - } - PROCEDURE XPSetWidgetProperty( - inWidget : XPWidgetID; - inProperty : XPWidgetPropertyID; - inValue : intptr_t); -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPGetWidgetProperty - - This routine returns the value of a widget's property, or 0 if the property - is not defined. If you need to know whether the property is defined, pass a - pointer to an int for inExists; the existence of that property will be - returned in the int. Pass NULL for inExists if you do not need this - information. - } - FUNCTION XPGetWidgetProperty( - inWidget : XPWidgetID; - inProperty : XPWidgetPropertyID; - inExists : Pinteger) : intptr_t; { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{___________________________________________________________________________ - * KEYBOARD MANAGEMENT - ___________________________________________________________________________} -{ - -} - - { - XPSetKeyboardFocus - - XPSetKeyboardFocus controls which widget will receive keystrokes. Pass the - Widget ID of the widget to get the keys. Note that if the widget does not - care about keystrokes, they will go to the parent widget, and if no widget - cares about them, they go to X-Plane. - - If you set the keyboard focus to Widget ID 0, X-Plane gets keyboard focus. - - This routine returns the widget ID that ended up with keyboard focus, or 0 - for X-Plane. - - Keyboard focus is not changed if the new widget will not accept it. For - setting to X-Plane, keyboard focus is always accepted. - - } - FUNCTION XPSetKeyboardFocus( - inWidget : XPWidgetID) : XPWidgetID; -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLoseKeyboardFocus - - This causes the specified widget to lose focus; focus is passed to its - parent, or the next parent that will accept it. This routine does nothing - if this widget does not have focus. - } - PROCEDURE XPLoseKeyboardFocus( - inWidget : XPWidgetID); -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPGetWidgetWithFocus - - This routine returns the widget that has keyboard focus, or 0 if X-Plane - has keyboard focus or some other plugin window that does not have widgets - has focus. - } - FUNCTION XPGetWidgetWithFocus: XPWidgetID; -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{___________________________________________________________________________ - * CREATING CUSTOM WIDGETS - ___________________________________________________________________________} -{ - -} - - { - XPAddWidgetCallback - - This function adds a new widget callback to a widget. This widget callback - supercedes any existing ones and will receive messages first; if it does - not handle messages they will go on to be handled by pre-existing widgets. - - The widget function will remain on the widget for the life of the widget. - The creation message will be sent to the new callback immediately with the - widget ID, and the destruction message will be sent before the other widget - function receives a destruction message. - - This provides a way to 'subclass' an existing widget. By providing a second - hook that only handles certain widget messages, you can customize or extend - widget behavior. - } - PROCEDURE XPAddWidgetCallback( - inWidget : XPWidgetID; - inNewCallback : XPWidgetFunc_t); -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPGetWidgetClassFunc - - Given a widget class, this function returns the callbacks that power that - widget class. - } - FUNCTION XPGetWidgetClassFunc( - inWidgetClass : XPWidgetClass) : XPWidgetFunc_t; -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -IMPLEMENTATION -END. diff --git a/src/XPSDK301/Delphi/XPLM/XPLMCamera.pas b/src/XPSDK301/Delphi/XPLM/XPLMCamera.pas deleted file mode 100755 index af3f9160..00000000 --- a/src/XPSDK301/Delphi/XPLM/XPLMCamera.pas +++ /dev/null @@ -1,173 +0,0 @@ -{ - Copyright 2005-2012 Sandy Barbour and Ben Supnik - - All rights reserved. See license.txt for usage. - - X-Plane SDK Version: 2.1.1 -} - -UNIT XPLMCamera; -INTERFACE -{ - XPLMCamera - THEORY OF OPERATION The XPLMCamera APIs allow plug-ins to - control the camera angle in X-Plane. This has a number of applications, - including but not limited to: - - - Creating new views (including dynamic/user-controllable views) for the - user. - - - Creating applications that use X-Plane as a renderer of scenery, - aircrafts, or both. - - The camera is controlled via six parameters: a location in OpenGL - coordinates and pitch, roll and yaw, similar to an airplane's position. - OpenGL coordinate info is described in detail in the XPLMGraphics - documentation; generally you should use the XPLMGraphics routines to - convert from world to local coordinates. The camera's orientation starts - facing level with the ground directly up the negative-Z axis (approximately - north) with the horizon horizontal. It is then rotated clockwise for yaw, - pitched up for positive pitch, and rolled clockwise around the vector it is - looking along for roll. - - You control the camera either either until the user selects a new view or - permanently (the later being similar to how UDP camera control works). You - control the camera by registering a callback per frame from which you - calculate the new camera positions. This guarantees smooth camera motion. - - Use the XPLMDataAccess APIs to get information like the position of the - aircraft, etc. for complex camera positioning. -} - -USES XPLMDefs; - {$A4} -{$IFDEF MSWINDOWS} - {$DEFINE DELPHI} -{$ENDIF} -{___________________________________________________________________________ - * CAMERA CONTROL - ___________________________________________________________________________} -{ - -} - - { - XPLMCameraControlDuration - - This enumeration states how long you want to retain control of the camera. - You can retain it indefinitely or until the user selects a new view. - } -TYPE - XPLMCameraControlDuration = ( - { Control the camera until the user picks a new view. } - xplm_ControlCameraUntilViewChanges = 1 - - { Control the camera until your plugin is disabled or another plugin forcably } - { takes control. } - ,xplm_ControlCameraForever = 2 - - ); - PXPLMCameraControlDuration = ^XPLMCameraControlDuration; - - { - XPLMCameraPosition_t - - This structure contains a full specification of the camera. X, Y, and Z are - the camera's position in OpenGL coordiantes; pitch, roll, and yaw are - rotations from a camera facing flat north in degrees. Positive pitch means - nose up, positive roll means roll right, and positive yaw means yaw right, - all in degrees. Zoom is a zoom factor, with 1.0 meaning normal zoom and 2.0 - magnifying by 2x (objects appear larger). - } - XPLMCameraPosition_t = RECORD - x : single; - y : single; - z : single; - pitch : single; - heading : single; - roll : single; - zoom : single; - END; - PXPLMCameraPosition_t = ^XPLMCameraPosition_t; - - { - XPLMCameraControl_f - - You use an XPLMCameraControl function to provide continuous control over - the camera. You are passed in a structure in which to put the new camera - position; modify it and return 1 to reposition the camera. Return 0 to - surrender control of the camera; camera control will be handled by X-Plane - on this draw loop. The contents of the structure as you are called are - undefined. - - If X-Plane is taking camera control away from you, this function will be - called with inIsLosingControl set to 1 and ioCameraPosition NULL. - } - XPLMCameraControl_f = FUNCTION( - outCameraPosition : PXPLMCameraPosition_t; { Can be nil } - inIsLosingControl : integer; - inRefcon : pointer) : integer; cdecl; - - { - XPLMControlCamera - - This function repositions the camera on the next drawing cycle. You must - pass a non-null control function. Specify in inHowLong how long you'd like - control (indefinitely or until a key is pressed). - } - PROCEDURE XPLMControlCamera( - inHowLong : XPLMCameraControlDuration; - inControlFunc : XPLMCameraControl_f; - inRefcon : pointer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMDontControlCamera - - This function stops you from controlling the camera. If you have a camera - control function, it will not be called with an inIsLosingControl flag. - X-Plane will control the camera on the next cycle. - - For maximum compatibility you should not use this routine unless you are in - posession of the camera. - } - PROCEDURE XPLMDontControlCamera; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMIsCameraBeingControlled - - This routine returns 1 if the camera is being controlled, zero if it is - not. If it is and you pass in a pointer to a camera control duration, the - current control duration will be returned. - } - FUNCTION XPLMIsCameraBeingControlled( - outCameraControlDuration: PXPLMCameraControlDuration) : integer; { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMReadCameraPosition - - This function reads the current camera position. - } - PROCEDURE XPLMReadCameraPosition( - outCameraPosition : PXPLMCameraPosition_t); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -IMPLEMENTATION -END. diff --git a/src/XPSDK301/Delphi/XPLM/XPLMDataAccess.pas b/src/XPSDK301/Delphi/XPLM/XPLMDataAccess.pas deleted file mode 100755 index 164dcfa7..00000000 --- a/src/XPSDK301/Delphi/XPLM/XPLMDataAccess.pas +++ /dev/null @@ -1,760 +0,0 @@ -{ - Copyright 2005-2012 Sandy Barbour and Ben Supnik - - All rights reserved. See license.txt for usage. - - X-Plane SDK Version: 2.1.1 -} - -UNIT XPLMDataAccess; -INTERFACE -{ - XPLM Data Access API - Theory of Operation - - The data access API gives you a generic, flexible, high performance way to - read and write data to and from X-Plane and other plug-ins. For example, - this API allows you to read and set the nav radios, get the plane location, - determine the current effective graphics frame rate, etc. - - The data access APIs are the way that you read and write data from the sim - as well as other plugins. - - The API works using opaque data references. A data reference is a source of - data; you do not know where it comes from, but once you have it you can - read the data quickly and possibly write it. To get a data reference, you - look it up. - - Data references are identified by verbose string names - (sim/cockpit/radios/nav1_freq_hz). The actual numeric value of the data - reference is implementation defined and is likely to change each time the - simulator is run (or the plugin that provides the datareference is - reloaded). - - The task of looking up a data reference is relatively expensive; look up - your data references once based on verbose strings, and save the opaque - data reference value for the duration of your plugin's operation. Reading - and writing data references is relatively fast (the cost is equivalent to - two function calls through function pointers). - - This allows data access to be high performance, while leaving in - abstraction; since data references are opaque and are searched for, the - underlying data access system can be rebuilt. - - A note on typing: you must know the correct data type to read and write. - APIs are provided for reading and writing data in a number of ways. You can - also double check the data type for a data ref. Note that automatic - conversion is not done for you. - - A note for plugins sharing data with other plugins: the load order of - plugins is not guaranteed. To make sure that every plugin publishing data - has published their data references before other plugins try to subscribe, - publish your data references in your start routine but resolve them the - first time your 'enable' routine is called, or the first time they are - needed in code. - - X-Plane publishes well over 1000 datarefs; a complete list may be found in - the reference section of the SDK online documentation (from the SDK home - page, choose Documentation). -} - -USES XPLMDefs; - {$A4} -{$IFDEF MSWINDOWS} - {$DEFINE DELPHI} -{$ENDIF} -{___________________________________________________________________________ - * READING AND WRITING DATA - ___________________________________________________________________________} -{ - These routines allow you to access a wide variety of data from within - X-Plane and modify some of it. -} - - -TYPE - { - XPLMDataRef - - A data ref is an opaque handle to data provided by the simulator or another - plugin. It uniquely identifies one variable (or array of variables) over - the lifetime of your plugin. You never hard code these values; you always - get them from XPLMFindDataRef. - } - XPLMDataRef = pointer; - PXPLMDataRef = ^XPLMDataRef; - - { - XPLMDataTypeID - - This is an enumeration that defines the type of the data behind a data - reference. This allows you to sanity check that the data type matches what - you expect. But for the most part, you will know the type of data you are - expecting from the online documentation. - - Data types each take a bit field, so sets of data types may be formed. - } - XPLMDataTypeID = ( - { Data of a type the current XPLM doesn't do. } - xplmType_Unknown = 0 - - { A single 4-byte integer, native endian. } - ,xplmType_Int = 1 - - { A single 4-byte float, native endian. } - ,xplmType_Float = 2 - - { A single 8-byte double, native endian. } - ,xplmType_Double = 4 - - { An array of 4-byte floats, native endian. } - ,xplmType_FloatArray = 8 - - { An array of 4-byte integers, native endian. } - ,xplmType_IntArray = 16 - - { A variable block of data. } - ,xplmType_Data = 32 - - ); - PXPLMDataTypeID = ^XPLMDataTypeID; - - { - XPLMFindDataRef - - Given a c-style string that names the data ref, this routine looks up the - actual opaque XPLMDataRef that you use to read and write the data. The - string names for datarefs are published on the X-Plane SDK web site. - - This function returns NULL if the data ref cannot be found. - - NOTE: this function is relatively expensive; save the XPLMDataRef this - function returns for future use. Do not look up your data ref by string - every time you need to read or write it. - } - FUNCTION XPLMFindDataRef( - inDataRefName : Pchar) : XPLMDataRef; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMCanWriteDataRef - - Given a data ref, this routine returns true if you can successfully set the - data, false otherwise. Some datarefs are read-only. - } - FUNCTION XPLMCanWriteDataRef( - inDataRef : XPLMDataRef) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMIsDataRefGood - - WARNING: This function is deprecated and should not be used. Datarefs are - valid until plugins are reloaded or the sim quits. Plugins sharing datarefs - should support these semantics by not unregistering datarefs during - operation. (You should however unregister datarefs when your plugin is - unloaded, as part of general resource cleanup.) - - This function returns whether a data ref is still valid. If it returns - false, you should refind the data ref from its original string. Calling an - accessor function on a bad data ref will return a default value, typically - 0 or 0-length data. - } - FUNCTION XPLMIsDataRefGood( - inDataRef : XPLMDataRef) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMGetDataRefTypes - - This routine returns the types of the data ref for accessor use. If a data - ref is available in multiple data types, they will all be returned. - } - FUNCTION XPLMGetDataRefTypes( - inDataRef : XPLMDataRef) : XPLMDataTypeID; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{___________________________________________________________________________ - * DATA ACCESSORS - ___________________________________________________________________________} -{ - These routines read and write the data references. For each supported data - type there is a reader and a writer. - - If the data ref is invalid or the plugin that provides it is disabled or - there is a type mismatch, the functions that read data will return 0 as a - default value or not modify the passed in memory. The plugins that write - data will not write under these circumstances or if the data ref is - read-only. NOTE: to keep the overhead of reading datarefs low, these - routines do not do full validation of a dataref; passing a junk value for a - dataref can result in crashing the sim. - - For array-style datarefs, you specify the number of items to read/write and - the offset into the array; the actual number of items read or written is - returned. This may be less to prevent an array-out-of-bounds error. -} - - - { - XPLMGetDatai - - Read an integer data ref and return its value. The return value is the - dataref value or 0 if the dataref is invalid/NULL or the plugin is - disabled. - } - FUNCTION XPLMGetDatai( - inDataRef : XPLMDataRef) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMSetDatai - - Write a new value to an integer data ref. This routine is a no-op if the - plugin publishing the dataref is disabled, the dataref is invalid, or the - dataref is not writable. - } - PROCEDURE XPLMSetDatai( - inDataRef : XPLMDataRef; - inValue : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMGetDataf - - Read a single precision floating point dataref and return its value. The - return value is the dataref value or 0.0 if the dataref is invalid/NULL or - the plugin is disabled. - } - FUNCTION XPLMGetDataf( - inDataRef : XPLMDataRef) : single; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMSetDataf - - Write a new value to a single precision floating point data ref. This - routine is a no-op if the plugin publishing the dataref is disabled, the - dataref is invalid, or the dataref is not writable. - } - PROCEDURE XPLMSetDataf( - inDataRef : XPLMDataRef; - inValue : single); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMGetDatad - - Read a double precision floating point dataref and return its value. The - return value is the dataref value or 0.0 if the dataref is invalid/NULL or - the plugin is disabled. - } - FUNCTION XPLMGetDatad( - inDataRef : XPLMDataRef) : real; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMSetDatad - - Write a new value to a double precision floating point data ref. This - routine is a no-op if the plugin publishing the dataref is disabled, the - dataref is invalid, or the dataref is not writable. - } - PROCEDURE XPLMSetDatad( - inDataRef : XPLMDataRef; - inValue : real); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMGetDatavi - - Read a part of an integer array dataref. If you pass NULL for outVaules, - the routine will return the size of the array, ignoring inOffset and inMax. - - - If outValues is not NULL, then up to inMax values are copied from the - dataref into outValues, starting at inOffset in the dataref. If inMax + - inOffset is larger than the size of the dataref, less than inMax values - will be copied. The number of values copied is returned. - - Note: the semantics of array datarefs are entirely implemented by the - plugin (or X-Plane) that provides the dataref, not the SDK itself; the - above description is how these datarefs are intended to work, but a rogue - plugin may have different behavior. - } - FUNCTION XPLMGetDatavi( - inDataRef : XPLMDataRef; - outValues : Pinteger; { Can be nil } - inOffset : integer; - inMax : integer) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMSetDatavi - - Write part or all of an integer array dataref. The values passed by - inValues are written into the dataref starting at inOffset. Up to inCount - values are written; however if the values would write "off the end" of the - dataref array, then fewer values are written. - - Note: the semantics of array datarefs are entirely implemented by the - plugin (or X-Plane) that provides the dataref, not the SDK itself; the - above description is how these datarefs are intended to work, but a rogue - plugin may have different behavior. - } - PROCEDURE XPLMSetDatavi( - inDataRef : XPLMDataRef; - inValues : Pinteger; - inoffset : integer; - inCount : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMGetDatavf - - Read a part of a single precision floating point array dataref. If you pass - NULL for outVaules, the routine will return the size of the array, ignoring - inOffset and inMax. - - If outValues is not NULL, then up to inMax values are copied from the - dataref into outValues, starting at inOffset in the dataref. If inMax + - inOffset is larger than the size of the dataref, less than inMax values - will be copied. The number of values copied is returned. - - Note: the semantics of array datarefs are entirely implemented by the - plugin (or X-Plane) that provides the dataref, not the SDK itself; the - above description is how these datarefs are intended to work, but a rogue - plugin may have different behavior. - } - FUNCTION XPLMGetDatavf( - inDataRef : XPLMDataRef; - outValues : Psingle; { Can be nil } - inOffset : integer; - inMax : integer) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMSetDatavf - - Write part or all of a single precision floating point array dataref. The - values passed by inValues are written into the dataref starting at - inOffset. Up to inCount values are written; however if the values would - write "off the end" of the dataref array, then fewer values are written. - - Note: the semantics of array datarefs are entirely implemented by the - plugin (or X-Plane) that provides the dataref, not the SDK itself; the - above description is how these datarefs are intended to work, but a rogue - plugin may have different behavior. - } - PROCEDURE XPLMSetDatavf( - inDataRef : XPLMDataRef; - inValues : Psingle; - inoffset : integer; - inCount : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMGetDatab - - Read a part of a byte array dataref. If you pass NULL for outVaules, the - routine will return the size of the array, ignoring inOffset and inMax. - - If outValues is not NULL, then up to inMax values are copied from the - dataref into outValues, starting at inOffset in the dataref. If inMax + - inOffset is larger than the size of the dataref, less than inMax values - will be copied. The number of values copied is returned. - - Note: the semantics of array datarefs are entirely implemented by the - plugin (or X-Plane) that provides the dataref, not the SDK itself; the - above description is how these datarefs are intended to work, but a rogue - plugin may have different behavior. - } - FUNCTION XPLMGetDatab( - inDataRef : XPLMDataRef; - outValue : pointer; { Can be nil } - inOffset : integer; - inMaxBytes : integer) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMSetDatab - - Write part or all of a byte array dataref. The values passed by inValues - are written into the dataref starting at inOffset. Up to inCount values are - written; however if the values would write "off the end" of the dataref - array, then fewer values are written. - - Note: the semantics of array datarefs are entirely implemented by the - plugin (or X-Plane) that provides the dataref, not the SDK itself; the - above description is how these datarefs are intended to work, but a rogue - plugin may have different behavior. - } - PROCEDURE XPLMSetDatab( - inDataRef : XPLMDataRef; - inValue : pointer; - inOffset : integer; - inLength : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{___________________________________________________________________________ - * PUBLISHING YOUR PLUGINS DATA - ___________________________________________________________________________} -{ - These functions allow you to create data references that other plug-ins can - access via the above data access APIs. Data references published by other - plugins operate the same as ones published by X-Plane in all manners except - that your data reference will not be available to other plugins if/when - your plugin is disabled. - - You share data by registering data provider callback functions. When a - plug-in requests your data, these callbacks are then called. You provide - one callback to return the value when a plugin 'reads' it and another to - change the value when a plugin 'writes' it. - - Important: you must pick a prefix for your datarefs other than "sim/" - - this prefix is reserved for X-Plane. The X-Plane SDK website contains a - registry where authors can select a unique first word for dataref names, to - prevent dataref collisions between plugins. -} - - - { - XPLMGetDatai_f - - Data provider function pointers. - - These define the function pointers you provide to get or set data. Note - that you are passed a generic pointer for each one. This is the same - pointer you pass in your register routine; you can use it to find global - variables, etc. - - The semantics of your callbacks are the same as the dataref accessor above - - basically routines like XPLMGetDatai are just pass-throughs from a caller - to your plugin. Be particularly mindful in implementing array dataref - read-write accessors; you are responsible for avoiding overruns, supporting - offset read/writes, and handling a read with a NULL buffer. - } -TYPE - XPLMGetDatai_f = FUNCTION( - inRefcon : pointer) : integer; cdecl; - - { - XPLMSetDatai_f - - } - XPLMSetDatai_f = PROCEDURE( - inRefcon : pointer; - inValue : integer); cdecl; - - { - XPLMGetDataf_f - - } - XPLMGetDataf_f = FUNCTION( - inRefcon : pointer) : single; cdecl; - - { - XPLMSetDataf_f - - } - XPLMSetDataf_f = PROCEDURE( - inRefcon : pointer; - inValue : single); cdecl; - - { - XPLMGetDatad_f - - } - XPLMGetDatad_f = FUNCTION( - inRefcon : pointer) : real; cdecl; - - { - XPLMSetDatad_f - - } - XPLMSetDatad_f = PROCEDURE( - inRefcon : pointer; - inValue : real); cdecl; - - { - XPLMGetDatavi_f - - } - XPLMGetDatavi_f = FUNCTION( - inRefcon : pointer; - outValues : Pinteger; { Can be nil } - inOffset : integer; - inMax : integer) : integer; cdecl; - - { - XPLMSetDatavi_f - - } - XPLMSetDatavi_f = PROCEDURE( - inRefcon : pointer; - inValues : Pinteger; - inOffset : integer; - inCount : integer); cdecl; - - { - XPLMGetDatavf_f - - } - XPLMGetDatavf_f = FUNCTION( - inRefcon : pointer; - outValues : Psingle; { Can be nil } - inOffset : integer; - inMax : integer) : integer; cdecl; - - { - XPLMSetDatavf_f - - } - XPLMSetDatavf_f = PROCEDURE( - inRefcon : pointer; - inValues : Psingle; - inOffset : integer; - inCount : integer); cdecl; - - { - XPLMGetDatab_f - - } - XPLMGetDatab_f = FUNCTION( - inRefcon : pointer; - outValue : pointer; { Can be nil } - inOffset : integer; - inMaxLength : integer) : integer; cdecl; - - { - XPLMSetDatab_f - - } - XPLMSetDatab_f = PROCEDURE( - inRefcon : pointer; - inValue : pointer; - inOffset : integer; - inLength : integer); cdecl; - - { - XPLMRegisterDataAccessor - - This routine creates a new item of data that can be read and written. Pass - in the data's full name for searching, the type(s) of the data for - accessing, and whether the data can be written to. For each data type you - support, pass in a read accessor function and a write accessor function if - necessary. Pass NULL for data types you do not support or write accessors - if you are read-only. - - You are returned a data ref for the new item of data created. You can use - this data ref to unregister your data later or read or write from it. - } - FUNCTION XPLMRegisterDataAccessor( - inDataName : Pchar; - inDataType : XPLMDataTypeID; - inIsWritable : integer; - inReadInt : XPLMGetDatai_f; - inWriteInt : XPLMSetDatai_f; - inReadFloat : XPLMGetDataf_f; - inWriteFloat : XPLMSetDataf_f; - inReadDouble : XPLMGetDatad_f; - inWriteDouble : XPLMSetDatad_f; - inReadIntArray : XPLMGetDatavi_f; - inWriteIntArray : XPLMSetDatavi_f; - inReadFloatArray : XPLMGetDatavf_f; - inWriteFloatArray : XPLMSetDatavf_f; - inReadData : XPLMGetDatab_f; - inWriteData : XPLMSetDatab_f; - inReadRefcon : pointer; - inWriteRefcon : pointer) : XPLMDataRef; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMUnregisterDataAccessor - - Use this routine to unregister any data accessors you may have registered. - You unregister a data ref by the XPLMDataRef you get back from - registration. Once you unregister a data ref, your function pointer will - not be called anymore. - - For maximum compatibility, do not unregister your data accessors until - final shutdown (when your XPluginStop routine is called). This allows other - plugins to find your data reference once and use it for their entire time - of operation. - } - PROCEDURE XPLMUnregisterDataAccessor( - inDataRef : XPLMDataRef); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{___________________________________________________________________________ - * SHARING DATA BETWEEN MULTIPLE PLUGINS - ___________________________________________________________________________} -{ - The data reference registration APIs from the previous section allow a - plugin to publish data in a one-owner manner; the plugin that publishes the - data reference owns the real memory that the data ref uses. This is - satisfactory for most cases, but there are also cases where plugnis need to - share actual data. - - With a shared data reference, no one plugin owns the actual memory for the - data reference; the plugin SDK allocates that for you. When the first - plugin asks to 'share' the data, the memory is allocated. When the data is - changed, every plugin that is sharing the data is notified. - - Shared data references differ from the 'owned' data references from the - previous section in a few ways: - - - With shared data references, any plugin can create the data reference; - with owned plugins one plugin must create the data reference and others - subscribe. (This can be a problem if you don't know which set of plugins - will be present). - - - With shared data references, every plugin that is sharing the data is - notified when the data is changed. With owned data references, only the one - owner is notified when the data is changed. - - - With shared data references, you cannot access the physical memory of the - data reference; you must use the XPLMGet... and XPLMSet... APIs. With an - owned data reference, the one owning data reference can manipulate the data - reference's memory in any way it sees fit. - - Shared data references solve two problems: if you need to have a data - reference used by several plugins but do not know which plugins will be - installed, or if all plugins sharing data need to be notified when that - data is changed, use shared data references. -} - - - { - XPLMDataChanged_f - - An XPLMDataChanged_f is a callback that the XPLM calls whenever any other - plug-in modifies shared data. A refcon you provide is passed back to help - identify which data is being changed. In response, you may want to call one - of the XPLMGetDataxxx routines to find the new value of the data. - } -TYPE - XPLMDataChanged_f = PROCEDURE( - inRefcon : pointer); cdecl; - - { - XPLMShareData - - This routine connects a plug-in to shared data, creating the shared data if - necessary. inDataName is a standard path for the data ref, and inDataType - specifies the type. This function will create the data if it does not - exist. If the data already exists but the type does not match, an error is - returned, so it is important that plug-in authors collaborate to establish - public standards for shared data. - - If a notificationFunc is passed in and is not NULL, that notification - function will be called whenever the data is modified. The notification - refcon will be passed to it. This allows your plug-in to know which shared - data was changed if multiple shared data are handled by one callback, or if - the plug-in does not use global variables. - - A one is returned for successfully creating or finding the shared data; a - zero if the data already exists but is of the wrong type. - } - FUNCTION XPLMShareData( - inDataName : Pchar; - inDataType : XPLMDataTypeID; - inNotificationFunc : XPLMDataChanged_f; - inNotificationRefcon: pointer) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMUnshareData - - This routine removes your notification function for shared data. Call it - when done with the data to stop receiving change notifications. Arguments - must match XPLMShareData. The actual memory will not necessarily be freed, - since other plug-ins could be using it. - } - FUNCTION XPLMUnshareData( - inDataName : Pchar; - inDataType : XPLMDataTypeID; - inNotificationFunc : XPLMDataChanged_f; - inNotificationRefcon: pointer) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -IMPLEMENTATION -END. diff --git a/src/XPSDK301/Delphi/XPLM/XPLMDefs.pas b/src/XPSDK301/Delphi/XPLM/XPLMDefs.pas deleted file mode 100755 index 48ec73bc..00000000 --- a/src/XPSDK301/Delphi/XPLM/XPLMDefs.pas +++ /dev/null @@ -1,442 +0,0 @@ -{ - 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. - - 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} -TYPE -{$IFNDEF DELPHI} -{$IFNDEF KYLIX} - Pchar = ^char; - Ppchar = ^Pchar; - Psingle = ^single; - Pinteger = ^integer; -{$ENDIF} -{$ENDIF} - Preal = ^real; - Plongint = ^longint; -{___________________________________________________________________________ - * DLL Definitions - ___________________________________________________________________________} -{ - 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.) -} - - - -{___________________________________________________________________________ - * GLOBAL DEFINITIONS - ___________________________________________________________________________} -{ - 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. - - For persistent identification of plug-ins, use XPLMFindPluginBySignature in - XPLMUtiltiies.h - - -1 indicates no plug-in. - } - XPLMPluginID = integer; - PXPLMPluginID = ^XPLMPluginID; - -CONST - { No plugin. } - XPLM_NO_PLUGIN_ID = (-1); - - { X-Plane itself } - XPLM_PLUGIN_XPLANE = (0); - - { The current XPLM revision is 3.01 (301). } - kXPLM_Version = (301); - - { - 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. - - 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 } - xplm_ShiftFlag = 1 - - { The option or alt key is down } - ,xplm_OptionAltFlag = 2 - - { The control key is down* } - ,xplm_ControlFlag = 4 - - { The key is being pressed down } - ,xplm_DownFlag = 8 - - { The key is being released } - ,xplm_UpFlag = 16 - - ); - PXPLMKeyFlags = ^XPLMKeyFlags; - -{___________________________________________________________________________ - * 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. -} - - -CONST - XPLM_KEY_RETURN = 13; - - XPLM_KEY_ESCAPE = 27; - - XPLM_KEY_TAB = 9; - - XPLM_KEY_DELETE = 8; - - XPLM_KEY_LEFT = 28; - - XPLM_KEY_RIGHT = 29; - - XPLM_KEY_UP = 30; - - XPLM_KEY_DOWN = 31; - - XPLM_KEY_0 = 48; - - XPLM_KEY_1 = 49; - - XPLM_KEY_2 = 50; - - XPLM_KEY_3 = 51; - - XPLM_KEY_4 = 52; - - XPLM_KEY_5 = 53; - - XPLM_KEY_6 = 54; - - XPLM_KEY_7 = 55; - - XPLM_KEY_8 = 56; - - XPLM_KEY_9 = 57; - - XPLM_KEY_DECIMAL = 46; - -{___________________________________________________________________________ - * 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). - - 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: - - 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; - - XPLM_VK_TAB = $09; - - XPLM_VK_CLEAR = $0C; - - XPLM_VK_RETURN = $0D; - - XPLM_VK_ESCAPE = $1B; - - XPLM_VK_SPACE = $20; - - XPLM_VK_PRIOR = $21; - - XPLM_VK_NEXT = $22; - - XPLM_VK_END = $23; - - XPLM_VK_HOME = $24; - - XPLM_VK_LEFT = $25; - - XPLM_VK_UP = $26; - - XPLM_VK_RIGHT = $27; - - XPLM_VK_DOWN = $28; - - XPLM_VK_SELECT = $29; - - XPLM_VK_PRINT = $2A; - - XPLM_VK_EXECUTE = $2B; - - XPLM_VK_SNAPSHOT = $2C; - - XPLM_VK_INSERT = $2D; - - XPLM_VK_DELETE = $2E; - - XPLM_VK_HELP = $2F; - - { 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; - - XPLM_VK_2 = $32; - - XPLM_VK_3 = $33; - - XPLM_VK_4 = $34; - - XPLM_VK_5 = $35; - - XPLM_VK_6 = $36; - - XPLM_VK_7 = $37; - - XPLM_VK_8 = $38; - - XPLM_VK_9 = $39; - - { 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; - - XPLM_VK_C = $43; - - XPLM_VK_D = $44; - - XPLM_VK_E = $45; - - XPLM_VK_F = $46; - - XPLM_VK_G = $47; - - XPLM_VK_H = $48; - - XPLM_VK_I = $49; - - XPLM_VK_J = $4A; - - XPLM_VK_K = $4B; - - XPLM_VK_L = $4C; - - XPLM_VK_M = $4D; - - XPLM_VK_N = $4E; - - XPLM_VK_O = $4F; - - XPLM_VK_P = $50; - - XPLM_VK_Q = $51; - - XPLM_VK_R = $52; - - XPLM_VK_S = $53; - - XPLM_VK_T = $54; - - XPLM_VK_U = $55; - - XPLM_VK_V = $56; - - XPLM_VK_W = $57; - - XPLM_VK_X = $58; - - XPLM_VK_Y = $59; - - XPLM_VK_Z = $5A; - - XPLM_VK_NUMPAD0 = $60; - - XPLM_VK_NUMPAD1 = $61; - - XPLM_VK_NUMPAD2 = $62; - - XPLM_VK_NUMPAD3 = $63; - - XPLM_VK_NUMPAD4 = $64; - - XPLM_VK_NUMPAD5 = $65; - - XPLM_VK_NUMPAD6 = $66; - - XPLM_VK_NUMPAD7 = $67; - - XPLM_VK_NUMPAD8 = $68; - - XPLM_VK_NUMPAD9 = $69; - - XPLM_VK_MULTIPLY = $6A; - - XPLM_VK_ADD = $6B; - - XPLM_VK_SEPARATOR = $6C; - - XPLM_VK_SUBTRACT = $6D; - - XPLM_VK_DECIMAL = $6E; - - XPLM_VK_DIVIDE = $6F; - - XPLM_VK_F1 = $70; - - XPLM_VK_F2 = $71; - - XPLM_VK_F3 = $72; - - XPLM_VK_F4 = $73; - - XPLM_VK_F5 = $74; - - XPLM_VK_F6 = $75; - - XPLM_VK_F7 = $76; - - XPLM_VK_F8 = $77; - - XPLM_VK_F9 = $78; - - XPLM_VK_F10 = $79; - - XPLM_VK_F11 = $7A; - - XPLM_VK_F12 = $7B; - - XPLM_VK_F13 = $7C; - - XPLM_VK_F14 = $7D; - - XPLM_VK_F15 = $7E; - - XPLM_VK_F16 = $7F; - - XPLM_VK_F17 = $80; - - XPLM_VK_F18 = $81; - - XPLM_VK_F19 = $82; - - XPLM_VK_F20 = $83; - - XPLM_VK_F21 = $84; - - XPLM_VK_F22 = $85; - - XPLM_VK_F23 = $86; - - XPLM_VK_F24 = $87; - - { The following definitions are extended and are not based on the Microsoft } - { key set. } - XPLM_VK_EQUAL = $B0; - - XPLM_VK_MINUS = $B1; - - XPLM_VK_RBRACE = $B2; - - XPLM_VK_LBRACE = $B3; - - XPLM_VK_QUOTE = $B4; - - XPLM_VK_SEMICOLON = $B5; - - XPLM_VK_BACKSLASH = $B6; - - XPLM_VK_COMMA = $B7; - - XPLM_VK_SLASH = $B8; - - XPLM_VK_PERIOD = $B9; - - XPLM_VK_BACKQUOTE = $BA; - - XPLM_VK_ENTER = $BB; - - XPLM_VK_NUMPAD_ENT = $BC; - - XPLM_VK_NUMPAD_EQ = $BD; - -IMPLEMENTATION -END. diff --git a/src/XPSDK301/Delphi/XPLM/XPLMDisplay.pas b/src/XPSDK301/Delphi/XPLM/XPLMDisplay.pas deleted file mode 100755 index 9dd1ab49..00000000 --- a/src/XPSDK301/Delphi/XPLM/XPLMDisplay.pas +++ /dev/null @@ -1,1571 +0,0 @@ -{ - Copyright 2005-2012 Sandy Barbour and Ben Supnik - - All rights reserved. See license.txt for usage. - - X-Plane SDK Version: 2.1.1 -} - -UNIT XPLMDisplay; -INTERFACE -{ - This API provides the basic hooks to draw in X-Plane and create user - interface. All X-Plane drawing is done in OpenGL. The X-Plane plug-in - manager takes care of properly setting up the OpenGL context and matrices. - You do not decide when in your code's execution to draw; X-Plane tells you - (via callbacks) when it is ready to have your plugin draw. - - X-Plane's drawing strategy is straightforward: every "frame" the screen is - rendered by drawing the 3-D scene (dome, ground, objects, airplanes, etc.) - and then drawing the cockpit on top of it. Alpha blending is used to - overlay the cockpit over the world (and the gauges over the panel, etc.). - X-Plane user interface elements (including windows like the map, the main - menu, etc.) are then drawn on top of the cockpit. - - There are two ways you can draw: directly and in a window. - - Direct drawing (deprecated!---more on that below) involves drawing to the - screen before or after X-Plane finishes a phase of drawing. When you draw - directly, you can specify whether X-Plane is to complete this phase or not. - This allows you to do three things: draw before X-Plane does (under it), - draw after X-Plane does (over it), or draw instead of X-Plane. - - To draw directly, you register a callback and specify which phase you want - to intercept. The plug-in manager will call you over and over to draw that - phase. - - Direct drawing allows you to override scenery, panels, or anything. Note - that you cannot assume that you are the only plug-in drawing at this - phase. - - Direct drawing is deprecated; at some point in the X-Plane 11 run, it will - likely become unsupported entirely as X-Plane transitions from OpenGL to - modern graphics API backends (e.g., Vulkan, Metal, etc.). In the long term, - plugins should use the XPLMInstance API for drawing 3-D objects---this will - be much more efficient than general 3-D OpenGL drawing, and it will - actually be supported by the new graphics backends. We do not yet know what - the post-transition API for generic 3-D drawing will look like (if it - exists at all). - - In contrast to direct drawing, window drawing provides a higher level - functionality. With window drawing, you create a 2-D window that takes up a - portion of the screen. Window drawing is always two dimensional. Window - drawing is front-to-back controlled; you can specify that you want your - window to be brought on top, and other plug-ins may put their window on top - of you. Window drawing also allows you to sign up for key presses and - receive mouse clicks. - - There are three ways to get keystrokes: - - 1. If you create a window, the window can take keyboard focus. It will - then receive all keystrokes. If no window has focus, X-Plane receives - keystrokes. Use this to implement typing in dialog boxes, etc. Only one - window may have focus at a time; your window will be notified if it loses - focus. - - 2. If you need low level access to the keystroke stream, install a key - sniffer. Key sniffers can be installed above everything or right in front - of the sim. - - 3. If you would like to associate key strokes with commands/functions in - your plug-in, you should simply register a command (via - XPLMCreateCommand()) and allow users to bind whatever key they choose to - that command. Another (now deprecated) method of doing so is to use a hot - key---a key-specific callback. Hotkeys are sent based on virtual key - strokes, so any key may be distinctly mapped with any modifiers. Hot keys - can be remapped by other plug-ins. As a plug-in, you don't have to worry - about what your hot key ends up mapped to; other plug-ins may provide a UI - for remapping keystrokes. So hotkeys allow a user to resolve conflicts and - customize keystrokes. -} - -USES XPLMDefs; - {$A4} -{$IFDEF MSWINDOWS} - {$DEFINE DELPHI} -{$ENDIF} -{___________________________________________________________________________ - * DRAWING CALLBACKS - ___________________________________________________________________________} -{ - Basic drawing callbacks, for low level intercepting of X-Plane's render - loop. The purpose of drawing callbacks is to provide targeted additions or - replacements to X-Plane's graphics environment (for example, to add extra - custom objects, or replace drawing of the AI aircraft). Do not assume that - the drawing callbacks will be called in the order implied by the - enumerations. Also do not assume that each drawing phase ends before - another begins; they may be nested. - - Note that all APIs in this section are deprecated, and will likely be - removed during the X-Plane 11 run as part of the transition to - Vulkan/Metal/etc. See the XPLMInstance API for future-proof drawing of 3-D - objects. -} - - - { - XPLMDrawingPhase - - This constant indicates which part of drawing we are in. Drawing is done - from the back to the front. We get a callback before or after each item. - Metaphases provide access to the beginning and end of the 3d (scene) and 2d - (cockpit) drawing in a manner that is independent of new phases added via - X-Plane implementation. - - WARNING: As X-Plane's scenery evolves, some drawing phases may cease to - exist and new ones may be invented. If you need a particularly specific - use of these codes, consult Austin and/or be prepared to revise your code - as X-Plane evolves. - } -TYPE - XPLMDrawingPhase = ( - { This is the earliest point at which you can draw in 3-d. } - xplm_Phase_FirstScene = 0 - - { Drawing of land and water. } - ,xplm_Phase_Terrain = 5 - - { Drawing runways and other airport detail. } - ,xplm_Phase_Airports = 10 - - { Drawing roads, trails, trains, etc. } - ,xplm_Phase_Vectors = 15 - - { 3-d objects (houses, smokestacks, etc. } - ,xplm_Phase_Objects = 20 - - { External views of airplanes, both yours and the AI aircraft. } - ,xplm_Phase_Airplanes = 25 - - { This is the last point at which you can draw in 3-d. } - ,xplm_Phase_LastScene = 30 - - { This is the first phase where you can draw in 2-d. } - ,xplm_Phase_FirstCockpit = 35 - - { The non-moving parts of the aircraft panel. } - ,xplm_Phase_Panel = 40 - - { The moving parts of the aircraft panel. } - ,xplm_Phase_Gauges = 45 - - { Floating windows from plugins. } - ,xplm_Phase_Window = 50 - - { The last change to draw in 2d. } - ,xplm_Phase_LastCockpit = 55 - -{$IFDEF XPLM200} - { Removed as of XPLM300; Use the full-blown XPLMMap API instead. } - ,xplm_Phase_LocalMap3D = 100 -{$ENDIF} - -{$IFDEF XPLM200} - { Removed as of XPLM300; Use the full-blown XPLMMap API instead. } - ,xplm_Phase_LocalMap2D = 101 -{$ENDIF} - -{$IFDEF XPLM200} - { Removed as of XPLM300; Use the full-blown XPLMMap API instead. } - ,xplm_Phase_LocalMapProfile = 102 -{$ENDIF} - - ); - PXPLMDrawingPhase = ^XPLMDrawingPhase; - - { - XPLMDrawCallback_f - - This is the prototype for a low level drawing callback. You are passed in - the phase and whether it is before or after. If you are before the phase, - return 1 to let X-Plane draw or 0 to suppress X-Plane drawing. If you are - after the phase the return value is ignored. - - Refcon is a unique value that you specify when registering the callback, - allowing you to slip a pointer to your own data to the callback. - - Upon entry the OpenGL context will be correctly set up for you and OpenGL - will be in 'local' coordinates for 3d drawing and panel coordinates for 2d - drawing. The OpenGL state (texturing, etc.) will be unknown. - } - XPLMDrawCallback_f = FUNCTION( - inPhase : XPLMDrawingPhase; - inIsBefore : integer; - inRefcon : pointer) : integer; cdecl; - - { - XPLMRegisterDrawCallback - - This routine registers a low level drawing callback. Pass in the phase you - want to be called for and whether you want to be called before or after. - This routine returns 1 if the registration was successful, or 0 if the - phase does not exist in this version of X-Plane. You may register a - callback multiple times for the same or different phases as long as the - refcon is unique each time. - - Note that this function will likely be removed during the X-Plane 11 run as - part of the transition to Vulkan/Metal/etc. See the XPLMInstance API for - future-proof drawing of 3-D objects. - } - FUNCTION XPLMRegisterDrawCallback( - inCallback : XPLMDrawCallback_f; - inPhase : XPLMDrawingPhase; - inWantsBefore : integer; - inRefcon : pointer) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMUnregisterDrawCallback - - This routine unregisters a draw callback. You must unregister a callback - for each time you register a callback if you have registered it multiple - times with different refcons. The routine returns 1 if it can find the - callback to unregister, 0 otherwise. - - Note that this function will likely be removed during the X-Plane 11 run as - part of the transition to Vulkan/Metal/etc. See the XPLMInstance API for - future-proof drawing of 3-D objects. - } - FUNCTION XPLMUnregisterDrawCallback( - inCallback : XPLMDrawCallback_f; - inPhase : XPLMDrawingPhase; - inWantsBefore : integer; - inRefcon : pointer) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{___________________________________________________________________________ - * WINDOW API - ___________________________________________________________________________} -{ - The window API provides a high-level abstraction for drawing with UI - interaction. - - Windows may operate in one of two modes: legacy (for plugins compiled - against old versions of the XPLM, as well as windows created via the - deprecated XPLMCreateWindow() function, rather than XPLMCreateWindowEx()), - or modern (for windows compiled against the XPLM300 or newer API, and - created via XPLMCreateWindowEx()). - - Modern windows have access to new X-Plane 11 windowing features, like - support for new positioning modes (including being "popped out" into their - own first-class window in the operating system). They can also optionally - be decorated in the style of X-Plane 11 windows (like the map). - - Modern windows operate in "boxel" units. A boxel ("box of pixels") is a - unit of virtual pixels which, depending on X-Plane's scaling, may - correspond to an arbitrary NxN "box" of real pixels on screen. Because - X-Plane handles this scaling automatically, you can effectively treat the - units as though you were simply drawing in pixels, and know that when - X-Plane is running with 150% or 200% scaling, your drawing will be - automatically scaled (and likewise all mouse coordinates, screen bounds, - etc. will also be auto-scaled). - - In contrast, legacy windows draw in true screen pixels, and thus tend to - look quite small when X-Plane is operating in a scaled mode. - - Legacy windows have their origin in the lower left of the main X-Plane - window. In contrast, since modern windows are not constrained to the main - window, they have their origin in the lower left of the entire global - desktop space, and the lower left of the main X-Plane window is not - guaranteed to be (0, 0). In both cases, x increases as you move left, and y - increases as you move up. -} - - -TYPE - { - XPLMWindowID - - This is an opaque identifier for a window. You use it to control your - window. When you create a window (via either XPLMCreateWindow() or - XPLMCreateWindowEx()), you will specify callbacks to handle drawing, mouse - interaction, etc. - } - XPLMWindowID = pointer; - PXPLMWindowID = ^XPLMWindowID; - - { - XPLMDrawWindow_f - - A callback to handle 2-D drawing of your window. You are passed in your - window and its refcon. Draw the window. You can use other XPLM functions - from this header to find the current dimensions of your window, etc. When - this callback is called, the OpenGL context will be set properly for 2-D - window drawing. - - NOTE: Because you are drawing your window over a background, you can make a - translucent window easily by simply not filling in your entire window's - bounds. - } - XPLMDrawWindow_f = PROCEDURE( - inWindowID : XPLMWindowID; - inRefcon : pointer); cdecl; - - { - XPLMHandleKey_f - - This function is called when a key is pressed or keyboard focus is taken - away from your window. If losingFocus is 1, you are losing the keyboard - focus, otherwise a key was pressed and inKey contains its character. You - are also passed your window and a refcon. - - Warning: this API declares virtual keys as a signed character; however the - VKEY #define macros in XPLMDefs.h define the vkeys using unsigned values - (that is 0x80 instead of -0x80). So you may need to cast the incoming vkey - to an unsigned char to get correct comparisons in C. - } - XPLMHandleKey_f = PROCEDURE( - inWindowID : XPLMWindowID; - inKey : char; - inFlags : XPLMKeyFlags; - inVirtualKey : char; - inRefcon : pointer; - losingFocus : integer); cdecl; - - { - XPLMMouseStatus - - When the mouse is clicked, your mouse click routine is called repeatedly. - It is first called with the mouse down message. It is then called zero or - more times with the mouse-drag message, and finally it is called once with - the mouse up message. All of these messages will be directed to the same - window; you are guaranteed to not receive a drag or mouse-up event without - first receiving the corresponding mouse-down. - } - XPLMMouseStatus = ( - xplm_MouseDown = 1 - - ,xplm_MouseDrag = 2 - - ,xplm_MouseUp = 3 - - ); - PXPLMMouseStatus = ^XPLMMouseStatus; - - { - XPLMHandleMouseClick_f - - You receive this call for one of three events: - - - when the user clicks the mouse button down - (optionally) when the user - drags the mouse after a down-click, but before the up-click - when the user - releases the down-clicked mouse button. - - You receive the x and y of the click, your window, and a refcon. Return 1 - to consume the click, or 0 to pass it through. - - WARNING: passing clicks through windows (as of this writing) causes mouse - tracking problems in X-Plane; do not use this feature! - - The units for x and y values match the units used in your window. Thus, for - "modern" windows (those created via XPLMCreateWindowEx() and compiled - against the XPLM300 library), the units are boxels, while legacy windows - will get pixels. Legacy windows have their origin in the lower left of the - main X-Plane window, while modern windows have their origin in the lower - left of the global desktop space. In both cases, x increases as you move - left, and y increases as you move up. - } - XPLMHandleMouseClick_f = FUNCTION( - inWindowID : XPLMWindowID; - x : integer; - y : integer; - inMouse : XPLMMouseStatus; - inRefcon : pointer) : integer; cdecl; - -{$IFDEF XPLM200} - { - XPLMCursorStatus - - XPLMCursorStatus describes how you would like X-Plane to manage the cursor. - See XPLMHandleCursor_f for more info. - } - XPLMCursorStatus = ( - { X-Plane manages the cursor normally, plugin does not affect the cusrsor. } - xplm_CursorDefault = 0 - - { X-Plane hides the cursor. } - ,xplm_CursorHidden = 1 - - { X-Plane shows the cursor as the default arrow. } - ,xplm_CursorArrow = 2 - - { X-Plane shows the cursor but lets you select an OS cursor. } - ,xplm_CursorCustom = 3 - - ); - PXPLMCursorStatus = ^XPLMCursorStatus; -{$ENDIF} - -{$IFDEF XPLM200} - { - XPLMHandleCursor_f - - The SDK calls your cursor status callback when the mouse is over your - plugin window. Return a cursor status code to indicate how you would like - X-Plane to manage the cursor. If you return xplm_CursorDefault, the SDK - will try lower-Z-order plugin windows, then let the sim manage the cursor. - - Note: you should never show or hide the cursor yourself---these APIs are - typically reference-counted and thus cannot safely and predictably be used - by the SDK. Instead return one of xplm_CursorHidden to hide the cursor or - xplm_CursorArrow/xplm_CursorCustom to show the cursor. - - If you want to implement a custom cursor by drawing a cursor in OpenGL, use - xplm_CursorHidden to hide the OS cursor and draw the cursor using a 2-d - drawing callback (after xplm_Phase_Window is probably a good choice, but - see deprecation warnings on the drawing APIs!). If you want to use a - custom OS-based cursor, use xplm_CursorCustom to ask X-Plane to show the - cursor but not affect its image. You can then use an OS specific call like - SetThemeCursor (Mac) or SetCursor/LoadCursor (Windows). - - The units for x and y values match the units used in your window. Thus, for - "modern" windows (those created via XPLMCreateWindowEx() and compiled - against the XPLM300 library), the units are boxels, while legacy windows - will get pixels. Legacy windows have their origin in the lower left of the - main X-Plane window, while modern windows have their origin in the lower - left of the global desktop space. In both cases, x increases as you move - left, and y increases as you move up. - } - XPLMHandleCursor_f = FUNCTION( - inWindowID : XPLMWindowID; - x : integer; - y : integer; - inRefcon : pointer) : XPLMCursorStatus; cdecl; -{$ENDIF} - -{$IFDEF XPLM200} - { - XPLMHandleMouseWheel_f - - The SDK calls your mouse wheel callback when one of the mouse wheels is - scrolled within your window. Return 1 to consume the mouse wheel movement - or 0 to pass them on to a lower window. (If your window appears opaque to - the user, you should consume mouse wheel scrolling even if it does - nothing.) The number of "clicks" indicates how far the wheel was turned - since the last callback. The wheel is 0 for the vertical axis or 1 for the - horizontal axis (for OS/mouse combinations that support this). - - The units for x and y values match the units used in your window. Thus, for - "modern" windows (those created via XPLMCreateWindowEx() and compiled - against the XPLM300 library), the units are boxels, while legacy windows - will get pixels. Legacy windows have their origin in the lower left of the - main X-Plane window, while modern windows have their origin in the lower - left of the global desktop space. In both cases, x increases as you move - left, and y increases as you move up. - } - XPLMHandleMouseWheel_f = FUNCTION( - inWindowID : XPLMWindowID; - x : integer; - y : integer; - wheel : integer; - clicks : integer; - inRefcon : pointer) : integer; cdecl; -{$ENDIF} - -{$IFDEF XPLM300} - { - XPLMWindowLayer - - XPLMWindowLayer describes where in the ordering of windows X-Plane should - place a particular window. Windows in higher layers cover windows in lower - layers. So, a given window might be at the top of its particular layer, but - it might still be obscured by a window in a higher layer. (This happens - frequently when floating windows, like X-Plane's map, are covered by a - modal alert.) - - Your window's layer can only be specified when you create the window (in - the XPLMCreateWindow_t you pass to XPLMCreateWindowEx()). For this reason, - layering only applies to windows created with new X-Plane 11 GUI features. - (Windows created using the older XPLMCreateWindow(), or windows compiled - against a pre-XPLM300 version of the SDK will simply be placed in the - flight overlay window layer.) - } - XPLMWindowLayer = ( - { The lowest layer, used for HUD-like displays while flying. } - xplm_WindowLayerFlightOverlay = 0 - - { Windows that "float" over the sim, like the X-Plane 11 map does. If you are } - { not sure which layer to create your window in, choose floating. } - ,xplm_WindowLayerFloatingWindows = 1 - - { An interruptive modal that covers the sim with a transparent black overlay } - { to draw the user's focus to the alert } - ,xplm_WindowLayerModal = 2 - - { "Growl"-style notifications that are visible in a corner of the screen, } - { even over modals } - ,xplm_WindowLayerGrowlNotifications = 3 - - ); - PXPLMWindowLayer = ^XPLMWindowLayer; -{$ENDIF} - -{$IFDEF XPLM301} - { - XPLMWindowDecoration - - XPLMWindowDecoration describes how "modern" windows will be displayed. This - impacts both how X-Plane draws your window as well as certain mouse - handlers. - - Your window's decoration can only be specified when you create the window - (in the XPLMCreateWindow_t you pass to XPLMCreateWindowEx()). - } - XPLMWindowDecoration = ( - { X-Plane will draw no decoration for your window, and apply no automatic } - { click handlers. The window will not stop click from passing through its } - { bounds. This is suitable for "windows" which request, say, the full screen } - { bounds, then only draw in a small portion of the available area. } - xplm_WindowDecorationNone = 0 - - { The default decoration for "native" windows, like the map. Provides a solid } - { background, as well as click handlers for resizing and dragging the window. } - ,xplm_WindowDecorationRoundRectangle = 1 - - { X-Plane will draw no decoration for your window, nor will it provide resize } - { handlers for your window edges, but it will stop clicks from passing } - { through your windows bounds. } - ,xplm_WindowDecorationSelfDecorated = 2 - - { Like self-decorated, but with resizing; X-Plane will draw no decoration for } - { your window, but it will stop clicks from passing through your windows } - { bounds, and provide automatic mouse handlers for resizing. } - ,xplm_WindowDecorationSelfDecoratedResizable = 3 - - ); - PXPLMWindowDecoration = ^XPLMWindowDecoration; -{$ENDIF} - -{$IFDEF XPLM200} - { - XPLMCreateWindow_t - - The XPMCreateWindow_t structure defines all of the parameters used to - create a modern window using XPLMCreateWindowEx(). The structure will be - expanded in future SDK APIs to include more features. Always set the - structSize member to the size of your struct in bytes! - - All windows created by this function in the XPLM300 version of the API are - created with the new X-Plane 11 GUI features. This means your plugin will - get to "know" about the existence of X-Plane windows other than the main - window. All drawing and mouse callbacks for your window will occur in - "boxels," giving your windows automatic support for high-DPI scaling in - X-Plane. In addition, your windows can opt-in to decoration with the - X-Plane 11 window styling, and you can use the - XPLMSetWindowPositioningMode() API to make your window "popped out" into a - first-class operating system window. - - Note that this requires dealing with your window's bounds in "global - desktop" positioning units, rather than the traditional panel coordinate - system. In global desktop coordinates, the main X-Plane window may not have - its origin at coordinate (0, 0), and your own window may have negative - coordinates. Assuming you don't implicitly assume (0, 0) as your origin, - the only API change you should need is to start using - XPLMGetMouseLocationGlobal() rather than XPLMGetMouseLocation(), and - XPLMGetScreenBoundsGlobal() instead of XPLMGetScreenSize(). - - If you ask to be decorated as a floating window, you'll get the blue window - control bar and blue backing that you see in X-Plane 11's normal "floating" - windows (like the map). - } - XPLMCreateWindow_t = RECORD - { Used to inform XPLMCreateWindowEx() of the SDK version you compiled } - { against; should always be set to sizeof(XPLMCreateWindow_t) } - structSize : integer; - { Left bound, in global desktop boxels } - left : integer; - { Top bound, in global desktop boxels } - top : integer; - { Right bound, in global desktop boxels } - right : integer; - { Bottom bound, in global desktop boxels } - bottom : integer; - visible : integer; - drawWindowFunc : XPLMDrawWindow_f; - { A callback to handle the user left-clicking within your window (or NULL to } - { ignore left clicks) } - handleMouseClickFunc : XPLMHandleMouseClick_f; - handleKeyFunc : XPLMHandleKey_f; - handleCursorFunc : XPLMHandleCursor_f; - handleMouseWheelFunc : XPLMHandleMouseWheel_f; - { A reference which will be passed into each of your window callbacks. Use } - { this to pass information to yourself as needed. } - refcon : pointer; -{$IFDEF XPLM301} - { Specifies the type of X-Plane 11-style "wrapper" you want around your } - { window, if any } - decorateAsFloatingWindow : XPLMWindowDecoration; -{$ENDIF} -{$IFDEF XPLM300} - layer : XPLMWindowLayer; -{$ENDIF} -{$IFDEF XPLM300} - { A callback to handle the user right-clicking within your window (or NULL to } - { ignore right clicks) } - handleRightClickFunc : XPLMHandleMouseClick_f; -{$ENDIF} - END; - PXPLMCreateWindow_t = ^XPLMCreateWindow_t; -{$ENDIF} - -{$IFDEF XPLM200} - { - XPLMCreateWindowEx - - This routine creates a new "modern" window. You pass in an - XPLMCreateWindow_t structure with all of the fields set in. You must set - the structSize of the structure to the size of the actual structure you - used. Also, you must provide functions for every callback---you may not - leave them null! (If you do not support the cursor or mouse wheel, use - functions that return the default values.) - } - FUNCTION XPLMCreateWindowEx( - inParams : PXPLMCreateWindow_t) : XPLMWindowID; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} - - { - XPLMCreateWindow - - Deprecated as of XPLM300. - - This routine creates a new legacy window. Unlike modern windows (created - via XPLMCreateWindowEx()), legacy windows do not have access to X-Plane 11 - features like automatic scaling for high-DPI screens, native window styles, - or support for being "popped out" into first-class operating system - windows. - - Pass in the dimensions and offsets to the window's bottom left corner from - the bottom left of the screen. You can specify whether the window is - initially visible or not. Also, you pass in three callbacks to run the - window and a refcon. This function returns a window ID you can use to - refer to the new window. - - NOTE: Legacy windows do not have "frames"; you are responsible for drawing - the background and frame of the window. Higher level libraries have - routines which make this easy. - } - FUNCTION XPLMCreateWindow( - inLeft : integer; - inTop : integer; - inRight : integer; - inBottom : integer; - inIsVisible : integer; - inDrawCallback : XPLMDrawWindow_f; - inKeyCallback : XPLMHandleKey_f; - inMouseCallback : XPLMHandleMouseClick_f; - inRefcon : pointer) : XPLMWindowID; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMDestroyWindow - - This routine destroys a window. The window's callbacks are not called - after this call. Keyboard focus is removed from the window before - destroying it. - } - PROCEDURE XPLMDestroyWindow( - inWindowID : XPLMWindowID); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMGetScreenSize - - This routine returns the size of the main X-Plane OpenGL window in pixels. - This number can be used to get a rough idea of the amount of detail the - user will be able to see when drawing in 3-d. - } - PROCEDURE XPLMGetScreenSize( - outWidth : Pinteger; { Can be nil } - outHeight : Pinteger); { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{$IFDEF XPLM300} - { - XPLMGetScreenBoundsGlobal - - This routine returns the bounds of the "global" X-Plane desktop, in boxels. - Unlike the non-global version XPLMGetScreenSize(), this is multi-monitor - aware. There are three primary consequences of multimonitor awareness. - - First, if the user is running X-Plane in full-screen on two or more - monitors (typically configured using one full-screen window per monitor), - the global desktop will be sized to include all X-Plane windows. - - Second, the origin of the screen coordinates is not guaranteed to be (0, - 0). Suppose the user has two displays side-by-side, both running at 1080p. - Suppose further that they've configured their OS to make the left display - their "primary" monitor, and that X-Plane is running in full-screen on - their right monitor only. In this case, the global desktop bounds would be - the rectangle from (1920, 0) to (3840, 1080). If the user later asked - X-Plane to draw on their primary monitor as well, the bounds would change - to (0, 0) to (3840, 1080). - - Finally, if the usable area of the virtual desktop is not a perfect - rectangle (for instance, because the monitors have different resolutions or - because one monitor is configured in the operating system to be above and - to the right of the other), the global desktop will include any wasted - space. Thus, if you have two 1080p monitors, and monitor 2 is configured to - have its bottom left touch monitor 1's upper right, your global desktop - area would be the rectangle from (0, 0) to (3840, 2160). - - Note that popped-out windows (windows drawn in their own operating system - windows, rather than "floating" within X-Plane) are not included in these - bounds. - } - PROCEDURE XPLMGetScreenBoundsGlobal( - outLeft : Pinteger; { Can be nil } - outTop : Pinteger; { Can be nil } - outRight : Pinteger; { Can be nil } - outBottom : Pinteger); { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} - -{$IFDEF XPLM300} - { - XPLMReceiveMonitorBoundsGlobal_f - - This function is informed of the global bounds (in boxels) of a particular - monitor within the X-Plane global desktop space. Note that X-Plane must be - running in full screen on a monitor in order for that monitor to be passed - to you in this callback. - } -TYPE - XPLMReceiveMonitorBoundsGlobal_f = PROCEDURE( - inMonitorIndex : integer; - inLeftBx : integer; - inTopBx : integer; - inRightBx : integer; - inBottomBx : integer; - inRefcon : pointer); cdecl; -{$ENDIF} - -{$IFDEF XPLM300} - { - XPLMGetAllMonitorBoundsGlobal - - This routine immediately calls you back with the bounds (in boxels) of each - full-screen X-Plane window within the X-Plane global desktop space. Note - that if a monitor is *not* covered by an X-Plane window, you cannot get its - bounds this way. Likewise, monitors with only an X-Plane window (not in - full-screen mode) will not be included. - - If X-Plane is running in full-screen and your monitors are of the same size - and configured contiguously in the OS, then the combined global bounds of - all full-screen monitors will match the total global desktop bounds, as - returned by XPLMGetScreenBoundsGlobal(). (Of course, if X-Plane is running - in windowed mode, this will not be the case. Likewise, if you have - differently sized monitors, the global desktop space will include wasted - space.) - - Note that this function's monitor indices match those provided by - XPLMGetAllMonitorBoundsOS(), but the coordinates are different (since the - X-Plane global desktop may not match the operating system's global desktop, - and one X-Plane boxel may be larger than one pixel due to 150% or 200% - scaling). - } - PROCEDURE XPLMGetAllMonitorBoundsGlobal( - inMonitorBoundsCallback: XPLMReceiveMonitorBoundsGlobal_f; - inRefcon : pointer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} - -{$IFDEF XPLM300} - { - XPLMReceiveMonitorBoundsOS_f - - This function is informed of the global bounds (in pixels) of a particular - monitor within the operating system's global desktop space. Note that a - monitor index being passed to you here does not indicate that X-Plane is - running in full screen on this monitor, or even that any X-Plane windows - exist on this monitor. - } -TYPE - XPLMReceiveMonitorBoundsOS_f = PROCEDURE( - inMonitorIndex : integer; - inLeftPx : integer; - inTopPx : integer; - inRightPx : integer; - inBottomPx : integer; - inRefcon : pointer); cdecl; -{$ENDIF} - -{$IFDEF XPLM300} - { - XPLMGetAllMonitorBoundsOS - - This routine immediately calls you back with the bounds (in pixels) of each - monitor within the operating system's global desktop space. Note that - unlike XPLMGetAllMonitorBoundsGlobal(), this may include monitors that have - no X-Plane window on them. - - Note that this function's monitor indices match those provided by - XPLMGetAllMonitorBoundsGlobal(), but the coordinates are different (since - the X-Plane global desktop may not match the operating system's global - desktop, and one X-Plane boxel may be larger than one pixel). - } - PROCEDURE XPLMGetAllMonitorBoundsOS( - inMonitorBoundsCallback: XPLMReceiveMonitorBoundsOS_f; - inRefcon : pointer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} - - { - XPLMGetMouseLocation - - Deprecated in XPLM300. Modern windows should use - XPLMGetMouseLocationGlobal() instead. - - This routine returns the current mouse location in pixels relative to the - main X-Plane window. The bottom left corner of the main window is (0, 0). - Pass NULL to not receive info about either parameter. - - Because this function gives the mouse position relative to the main X-Plane - window (rather than in global bounds), this function should only be used by - legacy windows. Modern windows should instead get the mouse position in - global desktop coordinates using XPLMGetMouseLocationGlobal(). - - Note that unlike XPLMGetMouseLocationGlobal(), if the mouse goes outside - the user's main monitor (for instance, to a pop out window or a secondary - monitor), this function will not reflect it. - } - PROCEDURE XPLMGetMouseLocation( - outX : Pinteger; { Can be nil } - outY : Pinteger); { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{$IFDEF XPLM300} - { - XPLMGetMouseLocationGlobal - - Returns the current mouse location in global desktop boxels. Unlike - XPLMGetMouseLocation(), the bottom left of the main X-Plane window is not - guaranteed to be (0, 0)---instead, the origin is the lower left of the - entire global desktop space. In addition, this routine gives the real mouse - location when the mouse goes to X-Plane windows other than the primary - display. Thus, it can be used with both pop-out windows and secondary - monitors. - - This is the mouse location function to use with modern windows (i.e., those - created by XPLMCreateWindowEx()). - - Pass NULL to not receive info about either parameter. - } - PROCEDURE XPLMGetMouseLocationGlobal( - outX : Pinteger; { Can be nil } - outY : Pinteger); { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} - - { - XPLMGetWindowGeometry - - This routine returns the position and size of a window. The units and - coordinate system vary depending on the type of window you have. - - If this is a legacy window (one compiled against a pre-XPLM300 version of - the SDK, or an XPLM300 window that was not created using - XPLMCreateWindowEx()), the units are pixels relative to the main X-Plane - display. - - If, on the other hand, this is a new X-Plane 11-style window (compiled - against the XPLM300 SDK and created using XPLMCreateWindowEx()), the units - are global desktop boxels. - - Pass NULL to not receive any paramter. - } - PROCEDURE XPLMGetWindowGeometry( - inWindowID : XPLMWindowID; - outLeft : Pinteger; { Can be nil } - outTop : Pinteger; { Can be nil } - outRight : Pinteger; { Can be nil } - outBottom : Pinteger); { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMSetWindowGeometry - - This routine allows you to set the position and size of a window. - - The units and coordinate system match those of XPLMGetWindowGeometry(). - That is, modern windows use global desktop boxel coordinates, while legacy - windows use pixels relative to the main X-Plane display. - - Note that this only applies to "floating" windows (that is, windows that - are drawn within the X-Plane simulation windows, rather than being "popped - out" into their own first-class operating system windows). To set the - position of windows whose positioning mode is xplm_WindowPopOut, you'll - need to instead use XPLMSetWindowGeometryOS(). - } - PROCEDURE XPLMSetWindowGeometry( - inWindowID : XPLMWindowID; - inLeft : integer; - inTop : integer; - inRight : integer; - inBottom : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{$IFDEF XPLM300} - { - XPLMGetWindowGeometryOS - - This routine returns the position and size of a "popped out" window (i.e., - a window whose positioning mode is xplm_WindowPopOut), in operating system - pixels. Pass NULL to not receive any parameter. - } - PROCEDURE XPLMGetWindowGeometryOS( - inWindowID : XPLMWindowID; - outLeft : Pinteger; { Can be nil } - outTop : Pinteger; { Can be nil } - outRight : Pinteger; { Can be nil } - outBottom : Pinteger); { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} - -{$IFDEF XPLM300} - { - XPLMSetWindowGeometryOS - - This routine allows you to set the position and size, in operating system - pixel coordinates, of a popped out window (that is, a window whose - positioning mode is xplm_WindowPopOut, which exists outside the X-Plane - simulation window, in its own first-class operating system window). - - Note that you are responsible for ensuring both that your window is popped - out (using XPLMWindowIsPoppedOut()) and that a monitor really exists at the - OS coordinates you provide (using XPLMGetAllMonitorBoundsOS()). - } - PROCEDURE XPLMSetWindowGeometryOS( - inWindowID : XPLMWindowID; - inLeft : integer; - inTop : integer; - inRight : integer; - inBottom : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} - -{$IFDEF XPLM301} - { - XPLMGetWindowGeometryVR - - Returns the width and height, in boxels, of a window in VR. Note that you - are responsible for ensuring your window is in VR (using - XPLMWindowIsInVR()). - } - PROCEDURE XPLMGetWindowGeometryVR( - inWindowID : XPLMWindowID; - outWidthBoxels : Pinteger; { Can be nil } - outHeightBoxels : Pinteger); { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} - -{$IFDEF XPLM301} - { - XPLMSetWindowGeometryVR - - This routine allows you to set the size, in boxels, of a window in VR (that - is, a window whose positioning mode is xplm_WindowVR). - - Note that you are responsible for ensuring your window is in VR (using - XPLMWindowIsInVR()). - } - PROCEDURE XPLMSetWindowGeometryVR( - inWindowID : XPLMWindowID; - widthBoxels : integer; - heightBoxels : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} - - { - XPLMGetWindowIsVisible - - This routine returns whether a window is visible. - } - FUNCTION XPLMGetWindowIsVisible( - inWindowID : XPLMWindowID) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMSetWindowIsVisible - - This routine shows or hides a window. - } - PROCEDURE XPLMSetWindowIsVisible( - inWindowID : XPLMWindowID; - inIsVisible : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{$IFDEF XPLM300} - { - XPLMWindowIsPoppedOut - - True if this window has been popped out (making it a first-class window in - the operating system), which in turn is true if and only if you have set - the window's positioning mode to xplm_WindowPopOut. - - Only applies to modern windows. (Windows created using the deprecated - XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of - the SDK cannot be popped out.) - } - FUNCTION XPLMWindowIsPoppedOut( - inWindowID : XPLMWindowID) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} - -{$IFDEF XPLM301} - { - XPLMWindowIsInVR - - True if this window has been moved to the virtual reality (VR) headset, - which in turn is true if and only if you have set the window's positioning - mode to xplm_WindowVR. - - Only applies to modern windows. (Windows created using the deprecated - XPLMCreateWindow(), or windows compiled against a pre-XPLM301 version of - the SDK cannot be moved to VR.) - } - FUNCTION XPLMWindowIsInVR( - inWindowID : XPLMWindowID) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} - -{$IFDEF XPLM300} - { - XPLMSetWindowGravity - - A window's "gravity" controls how the window shifts as the whole X-Plane - window resizes. A gravity of 1 means the window maintains its positioning - relative to the right or top edges, 0 the left/bottom, and 0.5 keeps it - centered. - - Default gravity is (0, 1, 0, 1), meaning your window will maintain its - position relative to the top left and will not change size as its - containing window grows. - - If you wanted, say, a window that sticks to the top of the screen (with a - constant height), but which grows to take the full width of the window, you - would pass (0, 1, 1, 1). Because your left and right edges would maintain - their positioning relative to their respective edges of the screen, the - whole width of your window would change with the X-Plane window. - - Only applies to modern windows. (Windows created using the deprecated - XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of - the SDK will simply get the default gravity.) - } - PROCEDURE XPLMSetWindowGravity( - inWindowID : XPLMWindowID; - inLeftGravity : single; - inTopGravity : single; - inRightGravity : single; - inBottomGravity : single); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} - -{$IFDEF XPLM300} - { - XPLMSetWindowResizingLimits - - Sets the minimum and maximum size of the client rectangle of the given - window. (That is, it does not include any window styling that you might - have asked X-Plane to apply on your behalf.) All resizing operations are - constrained to these sizes. - - Only applies to modern windows. (Windows created using the deprecated - XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of - the SDK will have no minimum or maximum size.) - } - PROCEDURE XPLMSetWindowResizingLimits( - inWindowID : XPLMWindowID; - inMinWidthBoxels : integer; - inMinHeightBoxels : integer; - inMaxWidthBoxels : integer; - inMaxHeightBoxels : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} - -{$IFDEF XPLM300} - { - XPLMWindowPositioningMode - - XPLMWindowPositionMode describes how X-Plane will position your window on - the user's screen. X-Plane will maintain this positioning mode even as the - user resizes their window or adds/removes full-screen monitors. - - Positioning mode can only be set for "modern" windows (that is, windows - created using XPLMCreateWindowEx() and compiled against the XPLM300 SDK). - Windows created using the deprecated XPLMCreateWindow(), or windows - compiled against a pre-XPLM300 version of the SDK will simply get the - "free" positioning mode. - } -TYPE - XPLMWindowPositioningMode = ( - { The default positioning mode. Set the window geometry and its future } - { position will be determined by its window gravity, resizing limits, and } - { user interactions. } - xplm_WindowPositionFree = 0 - - { Keep the window centered on the monitor you specify } - ,xplm_WindowCenterOnMonitor = 1 - - { Keep the window full screen on the monitor you specify } - ,xplm_WindowFullScreenOnMonitor = 2 - - { Like gui_window_full_screen_on_monitor, but stretches over *all* monitors } - { and popout windows. This is an obscure one... unless you have a very good } - { reason to need it, you probably don't! } - ,xplm_WindowFullScreenOnAllMonitors = 3 - - { A first-class window in the operating system, completely separate from the } - { X-Plane window(s) } - ,xplm_WindowPopOut = 4 - -{$IFDEF XPLM301} - { A floating window visible on the VR headset } - ,xplm_WindowVR = 5 -{$ENDIF} - - ); - PXPLMWindowPositioningMode = ^XPLMWindowPositioningMode; -{$ENDIF} - -{$IFDEF XPLM300} - { - XPLMSetWindowPositioningMode - - Sets the policy for how X-Plane will position your window. - - Some positioning modes apply to a particular monitor. For those modes, you - can pass a negative monitor index to position the window on the main - X-Plane monitor (the screen with the X-Plane menu bar at the top). Or, if - you have a specific monitor you want to position your window on, you can - pass a real monitor index as received from, e.g., - XPLMGetAllMonitorBoundsOS(). - - Only applies to modern windows. (Windows created using the deprecated - XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of - the SDK will always use xplm_WindowPositionFree.) - } - PROCEDURE XPLMSetWindowPositioningMode( - inWindowID : XPLMWindowID; - inPositioningMode : XPLMWindowPositioningMode; - inMonitorIndex : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} - -{$IFDEF XPLM300} - { - XPLMSetWindowTitle - - Sets the name for a window. This only applies to windows that opted-in to - styling as an X-Plane 11 floating window (i.e., with styling mode - xplm_WindowDecorationRoundRectangle) when they were created using - XPLMCreateWindowEx(). - } - PROCEDURE XPLMSetWindowTitle( - inWindowID : XPLMWindowID; - inWindowTitle : Pchar); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} - - { - XPLMGetWindowRefCon - - This routine returns a window's reference constant, the unique value you - can use for your own purposes. - } - FUNCTION XPLMGetWindowRefCon( - inWindowID : XPLMWindowID) : pointer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMSetWindowRefCon - - This routine sets a window's reference constant. Use this to pass data to - yourself in the callbacks. - } - PROCEDURE XPLMSetWindowRefCon( - inWindowID : XPLMWindowID; - inRefcon : pointer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMTakeKeyboardFocus - - This routine gives a specific window keyboard focus. Keystrokes will be - sent to that window. Pass a window ID of 0 to remove keyboard focus from - any plugin-created windows and instead pass keyboard strokes directly to - X-Plane. - } - PROCEDURE XPLMTakeKeyboardFocus( - inWindow : XPLMWindowID); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMHasKeyboardFocus - - Returns true (1) if the indicated window has keyboard focus. Pass a window - ID of 0 to see if no plugin window has focus, and all keystrokes will go - directly to X-Plane. - } - FUNCTION XPLMHasKeyboardFocus( - inWindow : XPLMWindowID) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMBringWindowToFront - - This routine brings the window to the front of the Z-order for its layer. - Windows are brought to the front automatically when they are created. - Beyond that, you should make sure you are front before handling mouse - clicks. - - Note that this only brings your window to the front of its layer - (XPLMWindowLayer). Thus, if you have a window in the floating window layer - (xplm_WindowLayerFloatingWindows), but there is a modal window (in layer - xplm_WindowLayerModal) above you, you would still not be the true frontmost - window after calling this. (After all, the window layers are strictly - ordered, and no window in a lower layer can ever be above any window in a - higher one.) - } - PROCEDURE XPLMBringWindowToFront( - inWindow : XPLMWindowID); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMIsWindowInFront - - This routine returns true if the window you passed in is the frontmost - visible window in its layer (XPLMWindowLayer). - - Thus, if you have a window at the front of the floating window layer - (xplm_WindowLayerFloatingWindows), this will return true even if there is a - modal window (in layer xplm_WindowLayerModal) above you. (Not to worry, - though: in such a case, X-Plane will not pass clicks or keyboard input down - to your layer until the window above stops "eating" the input.) - } - FUNCTION XPLMIsWindowInFront( - inWindow : XPLMWindowID) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{___________________________________________________________________________ - * KEY SNIFFERS - ___________________________________________________________________________} -{ - Low-level keyboard handlers. Allows for intercepting keystrokes outside the - normal rules of the user interface. -} - - - { - XPLMKeySniffer_f - - This is the prototype for a low level key-sniffing function. Window-based - UI _should not use this_! The windowing system provides high-level - mediated keyboard access, via the callbacks you attach to your - XPLMCreateWindow_t. By comparison, the key sniffer provides low level - keyboard access. - - Key sniffers are provided to allow libraries to provide non-windowed user - interaction. For example, the MUI library uses a key sniffer to do pop-up - text entry. - - Return 1 to pass the key on to the next sniffer, the window manager, - X-Plane, or whomever is down stream. Return 0 to consume the key. - - Warning: this API declares virtual keys as a signed character; however the - VKEY #define macros in XPLMDefs.h define the vkeys using unsigned values - (that is 0x80 instead of -0x80). So you may need to cast the incoming vkey - to an unsigned char to get correct comparisons in C. - } -TYPE - XPLMKeySniffer_f = FUNCTION( - inChar : char; - inFlags : XPLMKeyFlags; - inVirtualKey : char; - inRefcon : pointer) : integer; cdecl; - - { - XPLMRegisterKeySniffer - - This routine registers a key sniffing callback. You specify whether you - want to sniff before the window system, or only sniff keys the window - system does not consume. You should ALMOST ALWAYS sniff non-control keys - after the window system. When the window system consumes a key, it is - because the user has "focused" a window. Consuming the key or taking - action based on the key will produce very weird results. Returns 1 if - successful. - } - FUNCTION XPLMRegisterKeySniffer( - inCallback : XPLMKeySniffer_f; - inBeforeWindows : integer; - inRefcon : pointer) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMUnregisterKeySniffer - - This routine unregisters a key sniffer. You must unregister a key sniffer - for every time you register one with the exact same signature. Returns 1 - if successful. - } - FUNCTION XPLMUnregisterKeySniffer( - inCallback : XPLMKeySniffer_f; - inBeforeWindows : integer; - inRefcon : pointer) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{___________________________________________________________________________ - * HOT KEYS - ___________________________________________________________________________} -{ - Keystrokes that can be managed by others. These are lower-level than window - keyboard handlers (i.e., callbacks you attach to your XPLMCreateWindow_t), - but higher level than key sniffers. -} - - - { - XPLMHotKey_f - - Your hot key callback simply takes a pointer of your choosing. - } -TYPE - XPLMHotKey_f = PROCEDURE( - inRefcon : pointer); cdecl; - - { - XPLMHotKeyID - - An opaque IDs used to identify a hot key. - } - XPLMHotKeyID = pointer; - PXPLMHotKeyID = ^XPLMHotKeyID; - - { - XPLMRegisterHotKey - - This routine registers a hot key. You specify your preferred key stroke - virtual key/flag combination, a description of what your callback does (so - other plug-ins can describe the plug-in to the user for remapping) and a - callback function and opaque pointer to pass in). A new hot key ID is - returned. During execution, the actual key associated with your hot key - may change, but you are insulated from this. - } - FUNCTION XPLMRegisterHotKey( - inVirtualKey : char; - inFlags : XPLMKeyFlags; - inDescription : Pchar; - inCallback : XPLMHotKey_f; - inRefcon : pointer) : XPLMHotKeyID; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMUnregisterHotKey - - This API unregisters a hot key. You can only unregister your own hot keys. - } - PROCEDURE XPLMUnregisterHotKey( - inHotKey : XPLMHotKeyID); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMCountHotKeys - - Returns the number of current hot keys. - } - FUNCTION XPLMCountHotKeys: integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMGetNthHotKey - - Returns a hot key by index, for iteration on all hot keys. - } - FUNCTION XPLMGetNthHotKey( - inIndex : integer) : XPLMHotKeyID; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMGetHotKeyInfo - - Returns information about the hot key. Return NULL for any parameter you - don't want info about. The description should be at least 512 chars long. - } - PROCEDURE XPLMGetHotKeyInfo( - inHotKey : XPLMHotKeyID; - outVirtualKey : Pchar; { Can be nil } - outFlags : PXPLMKeyFlags; { Can be nil } - outDescription : Pchar; { Can be nil } - outPlugin : PXPLMPluginID); { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMSetHotKeyCombination - - XPLMSetHotKeyCombination remaps a hot keys keystrokes. You may remap - another plugin's keystrokes. - } - PROCEDURE XPLMSetHotKeyCombination( - inHotKey : XPLMHotKeyID; - inVirtualKey : char; - inFlags : XPLMKeyFlags); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -IMPLEMENTATION -END. diff --git a/src/XPSDK301/Delphi/XPLM/XPLMGraphics.pas b/src/XPSDK301/Delphi/XPLM/XPLMGraphics.pas deleted file mode 100755 index 7c712f28..00000000 --- a/src/XPSDK301/Delphi/XPLM/XPLMGraphics.pas +++ /dev/null @@ -1,438 +0,0 @@ -{ - Copyright 2005-2012 Sandy Barbour and Ben Supnik - - All rights reserved. See license.txt for usage. - - X-Plane SDK Version: 2.1.1 -} - -UNIT XPLMGraphics; -INTERFACE -{ - Graphics routines for X-Plane and OpenGL. - - A few notes on coordinate systems: - - X-Plane uses three kinds of coordinates. Global coordinates are specified - as latitude, longitude and elevation. This coordinate system never changes - but is not very precise. - - OpenGL (or 'local') coordinates are cartesian and shift with the plane. - They offer more precision and are used for 3-d OpenGL drawing. The X axis - is aligned east-west with positive X meaning east. The Y axis is aligned - straight up and down at the point 0,0,0 (but since the earth is round it is - not truly straight up and down at other points). The Z axis is aligned - north-south at 0, 0, 0 with positive Z pointing south (but since the earth - is round it isn't exactly north-south as you move east or west of 0, 0, 0). - One unit is one meter and the point 0,0,0 is on the surface of the earth - at sea level for some latitude and longitude picked by the sim such that - the user's aircraft is reasonably nearby. - - Cockpit coordinates are 2d, with the X axis horizontal and the Y axis - vertical. The point 0,0 is the bottom left and 1024,768 is the upper right - of the screen. This is true no matter what resolution the user's monitor is - in; when running in higher resolution, graphics will be scaled. - - Use X-Plane's routines to convert between global and local coordinates. Do - not attempt to do this conversion yourself; the precise 'roundness' of - X-Plane's physics model may not match your own, and (to make things - weirder) the user can potentially customize the physics of the current - planet. -} - -USES XPLMDefs; - {$A4} -{$IFDEF MSWINDOWS} - {$DEFINE DELPHI} -{$ENDIF} -{___________________________________________________________________________ - * X-PLANE GRAPHICS - ___________________________________________________________________________} -{ - These routines allow you to use OpenGL with X-Plane. -} - - - { - XPLMTextureID - - XPLM Texture IDs name well-known textures in the sim for you to use. This - allows you to recycle textures from X-Plane, saving VRAM. - } -TYPE - XPLMTextureID = ( - { The bitmap that contains window outlines, button outlines, fonts, etc. } - xplm_Tex_GeneralInterface = 0 - - { The exterior paint for the user's aircraft (daytime). } - ,xplm_Tex_AircraftPaint = 1 - - { The exterior light map for the user's aircraft. } - ,xplm_Tex_AircraftLiteMap = 2 - - ); - PXPLMTextureID = ^XPLMTextureID; - - { - XPLMSetGraphicsState - - XPLMSetGraphicsState changes OpenGL's graphics state in a number of ways: - - inEnableFog - enables or disables fog, equivalent to: glEnable(GL_FOG); - - inNumberTexUnits - enables or disables a number of multitexturing units. If - the number is 0, 2d texturing is disabled entirely, as in - glDisable(GL_TEXTURE_2D); Otherwise, 2d texturing is enabled, and a - number of multitexturing units are enabled sequentially, starting with - unit 0, e.g. glActiveTextureARB(GL_TEXTURE0_ARB); glEnable - (GL_TEXTURE_2D); - - inEnableLighting - enables or disables OpenGL lighting, e.g. - glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); - - inEnableAlphaTesting - enables or disables the alpha test per pixel, e.g. - glEnable(GL_ALPHA_TEST); - - inEnableAlphaBlending - enables or disables alpha blending per pixel, e.g. - glEnable(GL_BLEND); - - inEnableDepthTesting - enables per pixel depth testing, as in - glEnable(GL_DEPTH_TEST); - - inEnableDepthWriting - enables writing back of depth information to the - depth bufffer, as in glDepthMask(GL_TRUE); - - The purpose of this function is to change OpenGL state while keeping - X-Plane aware of the state changes; this keeps X-Plane from getting - surprised by OGL state changes, and prevents X-Plane and plug-ins from - having to set all state before all draws; XPLMSetGraphicsState internally - skips calls to change state that is already properly enabled. - - X-Plane does not have a 'default' OGL state to plug-ins; plug-ins should - totally set OGL state before drawing. Use XPLMSetGraphicsState instead of - any of the above OpenGL calls. - - WARNING: Any routine that performs drawing (e.g. XPLMDrawString or widget - code) may change X-Plane's state. Always set state before drawing after - unknown code has executed. - } - PROCEDURE XPLMSetGraphicsState( - inEnableFog : integer; - inNumberTexUnits : integer; - inEnableLighting : integer; - inEnableAlphaTesting: integer; - inEnableAlphaBlending: integer; - inEnableDepthTesting: integer; - inEnableDepthWriting: integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMBindTexture2d - - XPLMBindTexture2d changes what texture is bound to the 2d texturing target. - This routine caches the current 2d texture across all texturing units in - the sim and plug-ins, preventing extraneous binding. For example, consider - several plug-ins running in series; if they all use the 'general interface' - bitmap to do UI, calling this function will skip the rebinding of the - general interface texture on all but the first plug-in, which can provide - better frame rate son some graphics cards. - - inTextureID is the ID of the texture object to bind; inTextureUnit is a - zero-based texture unit (e.g. 0 for the first one), up to a maximum of 4 - units. (This number may increase in future versions of X-Plane.) - - Use this routine instead of glBindTexture(GL_TEXTURE_2D, ....); - } - PROCEDURE XPLMBindTexture2d( - inTextureNum : integer; - inTextureUnit : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMGenerateTextureNumbers - - This routine generates unused texture numbers that a plug-in can use to - safely bind textures. Use this routine instead of glGenTextures; - glGenTextures will allocate texture numbers in ranges that X-Plane reserves - for its own use but does not always use; for example, it might provide an - ID within the range of textures reserved for terrain...loading a new .env - file as the plane flies might then cause X-Plane to use this texture ID. - X-Plane will then overwrite the plug-ins texture. This routine returns - texture IDs that are out of X-Plane's usage range. - } - PROCEDURE XPLMGenerateTextureNumbers( - outTextureIDs : Pinteger; - inCount : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMGetTexture - - XPLMGetTexture returns the OpenGL texture enumeration of an X-Plane texture - based on a generic identifying code. For example, you can get the texture - for X-Plane's UI bitmaps. This allows you to build new gauges that take - advantage of X-Plane's textures, for smooth artwork integration and also - saving texture memory. Note that the texture might not be loaded yet, - depending on what the plane's panel contains. - - OPEN ISSUE: We really need a way to make sure X-Plane loads this texture if - it isn't around, or at least a way to find out whether it is loaded or not. - } - FUNCTION XPLMGetTexture( - inTexture : XPLMTextureID) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMWorldToLocal - - This routine translates coordinates from latitude, longitude, and altitude - to local scene coordinates. Latitude and longitude are in decimal degrees, - and altitude is in meters MSL (mean sea level). The XYZ coordinates are in - meters in the local OpenGL coordinate system. - } - PROCEDURE XPLMWorldToLocal( - inLatitude : real; - inLongitude : real; - inAltitude : real; - outX : Preal; - outY : Preal; - outZ : Preal); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMLocalToWorld - - This routine translates a local coordinate triplet back into latitude, - longitude, and altitude. Latitude and longitude are in decimal degrees, - and altitude is in meters MSL (mean sea level). The XYZ coordinates are in - meters in the local OpenGL coordinate system. - - NOTE: world coordinates are less precise than local coordinates; you should - try to avoid round tripping from local to world and back. - } - PROCEDURE XPLMLocalToWorld( - inX : real; - inY : real; - inZ : real; - outLatitude : Preal; - outLongitude : Preal; - outAltitude : Preal); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMDrawTranslucentDarkBox - - This routine draws a translucent dark box, partially obscuring parts of the - screen but making text easy to read. This is the same graphics primitive - used by X-Plane to show text files and ATC info. - } - PROCEDURE XPLMDrawTranslucentDarkBox( - inLeft : integer; - inTop : integer; - inRight : integer; - inBottom : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{___________________________________________________________________________ - * X-PLANE TEXT - ___________________________________________________________________________} -{ - -} - - { - XPLMFontID - - X-Plane features some fixed-character fonts. Each font may have its own - metrics. - - WARNING: Some of these fonts are no longer supported or may have changed - geometries. For maximum copmatibility, see the comments below. - - Note: X-Plane 7 supports proportional-spaced fonts. Since no measuring - routine is available yet, the SDK will normally draw using a fixed-width - font. You can use a dataref to enable proportional font drawing on XP7 if - you want to. - } -TYPE - XPLMFontID = ( - { Mono-spaced font for user interface. Available in all versions of the SDK. } - xplmFont_Basic = 0 - - { Deprecated, do not use. } - ,xplmFont_Menus = 1 - - { Deprecated, do not use. } - ,xplmFont_Metal = 2 - - { Deprecated, do not use. } - ,xplmFont_Led = 3 - - { Deprecated, do not use. } - ,xplmFont_LedWide = 4 - - { Deprecated, do not use. } - ,xplmFont_PanelHUD = 5 - - { Deprecated, do not use. } - ,xplmFont_PanelEFIS = 6 - - { Deprecated, do not use. } - ,xplmFont_PanelGPS = 7 - - { Deprecated, do not use. } - ,xplmFont_RadiosGA = 8 - - { Deprecated, do not use. } - ,xplmFont_RadiosBC = 9 - - { Deprecated, do not use. } - ,xplmFont_RadiosHM = 10 - - { Deprecated, do not use. } - ,xplmFont_RadiosGANarrow = 11 - - { Deprecated, do not use. } - ,xplmFont_RadiosBCNarrow = 12 - - { Deprecated, do not use. } - ,xplmFont_RadiosHMNarrow = 13 - - { Deprecated, do not use. } - ,xplmFont_Timer = 14 - - { Deprecated, do not use. } - ,xplmFont_FullRound = 15 - - { Deprecated, do not use. } - ,xplmFont_SmallRound = 16 - - { Deprecated, do not use. } - ,xplmFont_Menus_Localized = 17 - -{$IFDEF XPLM200} - { Proportional UI font. } - ,xplmFont_Proportional = 18 -{$ENDIF} - - ); - PXPLMFontID = ^XPLMFontID; - - { - XPLMDrawString - - This routine draws a NULL termianted string in a given font. Pass in the - lower left pixel that the character is to be drawn onto. Also pass the - character and font ID. This function returns the x offset plus the width of - all drawn characters. The color to draw in is specified as a pointer to an - array of three floating point colors, representing RGB intensities from 0.0 - to 1.0. - } - PROCEDURE XPLMDrawString( - inColorRGB : Psingle; - inXOffset : integer; - inYOffset : integer; - inChar : Pchar; - inWordWrapWidth : Pinteger; { Can be nil } - inFontID : XPLMFontID); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMDrawNumber - - This routine draws a number similar to the digit editing fields in - PlaneMaker and data output display in X-Plane. Pass in a color, a - position, a floating point value, and formatting info. Specify how many - integer and how many decimal digits to show and whether to show a sign, as - well as a character set. This routine returns the xOffset plus width of the - string drawn. - } - PROCEDURE XPLMDrawNumber( - inColorRGB : Psingle; - inXOffset : integer; - inYOffset : integer; - inValue : real; - inDigits : integer; - inDecimals : integer; - inShowSign : integer; - inFontID : XPLMFontID); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMGetFontDimensions - - This routine returns the width and height of a character in a given font. - It also tells you if the font only supports numeric digits. Pass NULL if - you don't need a given field. Note that for a proportional font the width - will be an arbitrary, hopefully average width. - } - PROCEDURE XPLMGetFontDimensions( - inFontID : XPLMFontID; - outCharWidth : Pinteger; { Can be nil } - outCharHeight : Pinteger; { Can be nil } - outDigitsOnly : Pinteger); { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{$IFDEF XPLM200} - { - XPLMMeasureString - - This routine returns the width in pixels of a string using a given font. - The string is passed as a pointer plus length (and does not need to be null - terminated); this is used to allow for measuring substrings. The return - value is floating point; it is possible that future font drawing may allow - for fractional pixels. - } - FUNCTION XPLMMeasureString( - inFontID : XPLMFontID; - inChar : Pchar; - inNumChars : integer) : single; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} - -IMPLEMENTATION -END. diff --git a/src/XPSDK301/Delphi/XPLM/XPLMInstance.pas b/src/XPSDK301/Delphi/XPLM/XPLMInstance.pas deleted file mode 100644 index 9daac4d7..00000000 --- a/src/XPSDK301/Delphi/XPLM/XPLMInstance.pas +++ /dev/null @@ -1,113 +0,0 @@ -{ - Copyright 2005-2012 Sandy Barbour and Ben Supnik - - All rights reserved. See license.txt for usage. - - X-Plane SDK Version: 2.1.1 -} - -UNIT XPLMInstance; -INTERFACE -{ - This API provides instanced drawing of X-Plane objects (.obj files). In - contrast to old drawing APIs, which required you to draw your own objects - per-frame, the instancing API allows you to simply register an OBJ for - drawing, then move or manipulate it later (as needed). - - This provides one tremendous benefit: it keeps all dataref operations for - your object in one place. Because datarefs are main thread only, allowing - dataref access anywhere is a serious performance bottleneck for the - simulator---the whole simulator has to pause and wait for each dataref - access. This performance penalty will only grow worse as X-Plane moves - toward an ever more heavily multithreaded engine. - - The instancing API allows X-Plane to isolate all dataref manipulations for - all plugin object drawing to one place, potentially providing huge - performance gains. - - Here's how it works: - - When an instance is created, it provides a list of all datarefs you want to - manipulate in for the OBJ in the future. This list of datarefs replaces the - ad-hoc collections of dataref objects previously used by art assets. Then, - per-frame, you can manipulate the instance by passing in a "block" of - packed floats representing the current values of the datarefs for your - instance. (Note that the ordering of this set of packed floats must exactly - match the ordering of the datarefs when you created your instance.) -} - -USES XPLMDefs; -USES XPLMScenery; - {$A4} -{$IFDEF MSWINDOWS} - {$DEFINE DELPHI} -{$ENDIF} -{___________________________________________________________________________ - * Instance Creation and Destruction - ___________________________________________________________________________} -{ - Registers and unregisters instances. -} - - -TYPE - { - XPLMInstanceRef - - An opaque handle to an instance. - } - XPLMInstanceRef = pointer; - PXPLMInstanceRef = ^XPLMInstanceRef; - - { - XPLMCreateInstance - - Registers an instance of an X-Plane object. - } - FUNCTION XPLMCreateInstance( - obj : XPLMObjectRef; - datarefs : PPchar) : XPLMInstanceRef; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMDestroyInstance - - Unregisters an instance. - } - PROCEDURE XPLMDestroyInstance( - instance : XPLMInstanceRef); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{___________________________________________________________________________ - * Instance Manipulation - ___________________________________________________________________________} -{ - -} - - { - XPLMInstanceSetPosition - - Updates both the position of the instance and all datarefs you registered - for it. - } - PROCEDURE XPLMInstanceSetPosition( - instance : XPLMInstanceRef; - new_position : PXPLMDrawInfo_t; - data : Psingle); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -IMPLEMENTATION -END. diff --git a/src/XPSDK301/Delphi/XPLM/XPLMMap.pas b/src/XPSDK301/Delphi/XPLM/XPLMMap.pas deleted file mode 100644 index f07a2b23..00000000 --- a/src/XPSDK301/Delphi/XPLM/XPLMMap.pas +++ /dev/null @@ -1,652 +0,0 @@ -{ - Copyright 2005-2012 Sandy Barbour and Ben Supnik - - All rights reserved. See license.txt for usage. - - X-Plane SDK Version: 2.1.1 -} - -UNIT XPLMMap; -INTERFACE -{ - This API allows you to create new layers within X-Plane maps. Your layers - can draw arbitrary OpenGL, but they conveniently also have access to - X-Plane's built-in icon and label drawing functions. - - As of X-Plane 11, map drawing happens in three stages: - - 1. backgrounds and "fill," 2. icons, and 3. labels. - - Thus, all background drawing gets layered beneath all icons, which likewise - get layered beneath all labels. Within each stage, the map obeys a - consistent layer ordering, such that "fill" layers (layers that cover a - large amount of map area, like the terrain and clouds) appear beneath - "markings" layers (like airport icons). This ensures that layers with fine - details don't get obscured by layers with larger details. - - The XPLM map API reflects both aspects of this draw layering: you can - register a layer as providing either markings or fill, and X-Plane will - draw your fill layers beneath your markings layers (regardless of - registration order). Likewise, you are guaranteed that your layer's icons - (added from within an icon callback) will go above your layer's OpenGL - drawing, and your labels will go above your icons. - - The XPLM guarantees that all plugin-created fill layers go on top of all - native X-Plane fill layers, and all plugin-created markings layers go on - top of all X-Plane markings layers (with the exception of the aircraft - icons). It also guarantees that the draw order of your own plugin's layers - will be consistent. But, for layers created by different plugins, the only - guarantee is that we will draw all of one plugin's layers of each type - (fill, then markings), then all of the others'; we don't guarantee which - plugin's fill and markings layers go on top of the other's. - - As of X-Plane 11, maps use true cartographic projections for their drawing, - and different maps may use different projections. For that reason, all - drawing calls include an opaque handle for the projection you should use to - do the drawing. Any time you would draw at a particular latitude/longitude, - you'll need to ask the projection to translate that position into "map - coordinates." (Note that the projection is guaranteed not to change between - calls to your prepare-cache hook, so if you cache your map coordinates - ahead of time, there's no need to re-project them when you actually draw.) - - In addition to mapping normal latitude/longitude locations into map - coordinates, the projection APIs also let you know the current heading for - north. (Since X-Plane 11 maps can rotate to match the heading of the user's - aircraft, it's not safe to assume that north is at zero degrees rotation.) -} - -USES XPLMDefs; - {$A4} -{$IFDEF MSWINDOWS} - {$DEFINE DELPHI} -{$ENDIF} -{$IFDEF XPLM300} -{___________________________________________________________________________ - * DRAWING CALLBACKS - ___________________________________________________________________________} -{ - When you create a new map layer (using XPLMCreateMapLayer), you can provide - any or all of these callbacks. They allow you to insert your own OpenGL - drawing, text labels, and icons into the X-Plane map at the appropriate - places, allowing your layer to behave as similarly to X-Plane's built-in - layers as possible. -} - - -TYPE - { - XPLMMapLayerID - - This is an opaque handle for a plugin-created map layer. Pass it to the map - drawing APIs from an appropriate callback to draw in the layer you created. - } - XPLMMapLayerID = pointer; - PXPLMMapLayerID = ^XPLMMapLayerID; - - { - XPLMMapProjectionID - - This is an opaque handle for a map projection. Pass it to the projection - APIs to translate between map coordinates and latitude/longitudes. - } - XPLMMapProjectionID = pointer; - PXPLMMapProjectionID = ^XPLMMapProjectionID; - - { - XPLMMapStyle - - Indicates the visual style being drawn by the map. In X-Plane, the user can - choose between a number of map types, and different map types may have use - a different visual representation for the same elements (for instance, the - visual style of the terrain layer changes drastically between the VFR and - IFR layers), or certain layers may be disabled entirely in some map types - (e.g., localizers are only visible in the IFR low-enroute style). - } - XPLMMapStyle = ( - xplm_MapStyle_VFR_Sectional = 0 - - ,xplm_MapStyle_IFR_LowEnroute = 1 - - ,xplm_MapStyle_IFR_HighEnroute = 2 - - ); - PXPLMMapStyle = ^XPLMMapStyle; - - { - XPLMMapDrawingCallback_f - - This is the OpenGL map drawing callback for plugin-created map layers. You - can perform arbitrary OpenGL drawing from this callback, with one - exception: changes to the Z-buffer are not permitted, and will result in - map drawing errors. - - All drawing done from within this callback appears beneath all built-in - X-Plane icons and labels, but above the built-in "fill" layers (layers - providing major details, like terrain and water). Note, however, that the - relative ordering between the drawing callbacks of different plugins is not - guaranteed. - } - XPLMMapDrawingCallback_f = PROCEDURE( - inLayer : XPLMMapLayerID; - inMapBoundsLeftTopRightBottom: Psingle; - zoomRatio : single; - mapUnitsPerUserInterfaceUnit: single; - mapStyle : XPLMMapStyle; - projection : XPLMMapProjectionID; - inRefcon : pointer); cdecl; - - { - XPLMMapIconDrawingCallback_f - - This is the icon drawing callback that enables plugin-created map layers to - draw icons using X-Plane's built-in icon drawing functionality. You can - request an arbitrary number of PNG icons to be drawn via - XPLMDrawMapIconFromSheet() from within this callback, but you may not - perform any OpenGL drawing here. - - Icons enqueued by this function will appear above all OpenGL drawing - (performed by your optional XPLMMapDrawingCallback_f), and above all - built-in X-Plane map icons of the same layer type ("fill" or "markings," as - determined by the XPLMMapLayerType in your XPLMCreateMapLayer_t). Note, - however, that the relative ordering between the drawing callbacks of - different plugins is not guaranteed. - } - XPLMMapIconDrawingCallback_f = PROCEDURE( - inLayer : XPLMMapLayerID; - inMapBoundsLeftTopRightBottom: Psingle; - zoomRatio : single; - mapUnitsPerUserInterfaceUnit: single; - mapStyle : XPLMMapStyle; - projection : XPLMMapProjectionID; - inRefcon : pointer); cdecl; - - { - XPLMMapLabelDrawingCallback_f - - This is the label drawing callback that enables plugin-created map layers - to draw text labels using X-Plane's built-in labeling functionality. You - can request an arbitrary number of text labels to be drawn via - XPLMDrawMapLabel() from within this callback, but you may not perform any - OpenGL drawing here. - - Labels enqueued by this function will appear above all OpenGL drawing - (performed by your optional XPLMMapDrawingCallback_f), and above all - built-in map icons and labels of the same layer type ("fill" or "markings," - as determined by the XPLMMapLayerType in your XPLMCreateMapLayer_t). Note, - however, that the relative ordering between the drawing callbacks of - different plugins is not guaranteed. - } - XPLMMapLabelDrawingCallback_f = PROCEDURE( - inLayer : XPLMMapLayerID; - inMapBoundsLeftTopRightBottom: Psingle; - zoomRatio : single; - mapUnitsPerUserInterfaceUnit: single; - mapStyle : XPLMMapStyle; - projection : XPLMMapProjectionID; - inRefcon : pointer); cdecl; - -{$ENDIF} -{$IFDEF XPLM300} -{___________________________________________________________________________ - * LAYER MANAGEMENT CALLBACKS - ___________________________________________________________________________} -{ - These are various "bookkeeping" callbacks that your map layer can receive - (if you provide the callback in your XPLMCreateMapLayer_t). They allow you - to manage the lifecycle of your layer, as well as cache any - computationally-intensive preparation you might need for drawing. -} - - - { - XPLMMapPrepareCacheCallback_f - - A callback used to allow you to cache whatever information your layer needs - to draw in the current map area. - - This is called each time the map's total bounds change. This is typically - triggered by new DSFs being loaded, such that X-Plane discards old, - now-distant DSFs and pulls in new ones. At that point, the available bounds - of the map also change to match the new DSF area. - - By caching just the information you need to draw in this area, your future - draw calls can be made faster, since you'll be able to simply "splat" your - precomputed information each frame. - - We guarantee that the map projection will not change between successive - prepare cache calls, nor will any draw call give you bounds outside these - total map bounds. So, if you cache the projected map coordinates of all the - items you might want to draw in the total map area, you can be guaranteed - that no draw call will be asked to do any new work. - } -TYPE - XPLMMapPrepareCacheCallback_f = PROCEDURE( - inLayer : XPLMMapLayerID; - inTotalMapBoundsLeftTopRightBottom: Psingle; - projection : XPLMMapProjectionID; - inRefcon : pointer); cdecl; - - { - XPLMMapWillBeDeletedCallback_f - - Called just before your map layer gets deleted. Because SDK-created map - layers have the same lifetime as the X-Plane map that contains them, if the - map gets unloaded from memory, your layer will too. - } - XPLMMapWillBeDeletedCallback_f = PROCEDURE( - inLayer : XPLMMapLayerID; - inRefcon : pointer); cdecl; - -{$ENDIF} -{$IFDEF XPLM300} -{___________________________________________________________________________ - * MAP LAYER CREATION AND DESTRUCTION - ___________________________________________________________________________} -{ - Enables the creation of new map layers. Layers are created for a particular - instance of the X-Plane map. For instance, if you want your layer to appear - in both the normal map interface and the Instructor Operator Station (IOS), - you would need two separate calls to XPLMCreateMapLayer(), with two - different values for your XPLMCreateMapLayer_t::layer_name. - - Your layer's lifetime will be determined by the lifetime of the map it is - created in. If the map is destroyed (on the X-Plane side), your layer will - be too, and you'll receive a callback to your - XPLMMapWillBeDeletedCallback_f. -} - - - { - XPLMMapLayerType - - Indicates the type of map layer you are creating. Fill layers will always - be drawn beneath markings layers. - } -TYPE - XPLMMapLayerType = ( - { A layer that draws "fill" graphics, like weather patterns, terrain, etc. } - { Fill layers frequently cover a large portion of the visible map area. } - xplm_MapLayer_Fill = 0 - - { A layer that provides markings for particular map features, like NAVAIDs, } - { airports, etc. Even dense markings layers cover a small portion of the } - { total map area. } - ,xplm_MapLayer_Markings = 1 - - ); - PXPLMMapLayerType = ^XPLMMapLayerType; - -CONST - { Globally unique identifier for X-Plane's Map window, used as the } - { mapToCreateLayerIn parameter in XPLMCreateMapLayer_t } - XPLM_MAP_USER_INTERFACE = "XPLM_MAP_USER_INTERFACE"; - - { Globally unique identifier for X-Plane's Instructor Operator Station } - { window, used as the mapToCreateLayerIn parameter in XPLMCreateMapLayer_t } - XPLM_MAP_IOS = "XPLM_MAP_IOS"; - - { - XPLMCreateMapLayer_t - - This structure defines all of the parameters used to create a map layer - using XPLMCreateMapLayer. The structure will be expanded in future SDK APIs - to include more features. Always set the structSize member to the size of - your struct in bytes! - - Each layer must be associated with exactly one map instance in X-Plane. - That map, and that map alone, will call your callbacks. Likewise, when that - map is deleted, your layer will be as well. - } -TYPE - XPLMCreateMapLayer_t = RECORD - { Used to inform XPLMCreateMapLayer() of the SDK version you compiled } - { against; should always be set to sizeof(XPLMCreateMapLayer_t) } - structSize : integer; - { Globally unique string identifying the map you want this layer to appear } - { in. As of XPLM300, this is limited to one of XPLM_MAP_USER_INTERFACE or } - { XPLM_MAP_IOS } - mapToCreateLayerIn : Pchar; - { The type of layer you are creating, used to determine draw order (all } - { plugin-created markings layers are drawn above all plugin-created fill } - { layers) } - layerType : XPLMMapLayerType; - { Optional callback to inform you this layer is being deleted (due to its } - { owning map being destroyed) } - willBeDeletedCallback : XPLMMapWillBeDeletedCallback_f; - { Optional callback you want to use to prepare your draw cache when the map } - { bounds change (set to NULL if you don't want this callback) } - prepCacheCallback : XPLMMapPrepareCacheCallback_f; - { Optional callback you want to use for arbitrary OpenGL drawing, which goes } - { beneath all icons in the map's layering system (set to NULL if you don't } - { want this callback) } - drawCallback : XPLMMapDrawingCallback_f; - { Optional callback you want to use for drawing icons, which go above all } - { built-in X-Plane icons (except the aircraft) in the map's layering system } - { (set to NULL if you don't want this callback) } - iconCallback : XPLMMapIconDrawingCallback_f; - { Optional callback you want to use for drawing map labels, which go above } - { all built-in X-Plane icons and labels (except those of aircraft) in the } - { map's layering system (set to NULL if you don't want this callback) } - labelCallback : XPLMMapLabelDrawingCallback_f; - { True if you want a checkbox to be created in the map UI to toggle this } - { layer on and off; false if the layer should simply always be enabled } - showUiToggle : integer; - { Short label to use for this layer in the user interface } - layerName : Pchar; - { A reference to arbitrary data that will be passed to your callbacks } - refcon : pointer; - END; - PXPLMCreateMapLayer_t = ^XPLMCreateMapLayer_t; - - { - XPLMCreateMapLayer - - This routine creates a new map layer. You pass in an XPLMCreateMapLayer_t - structure with all of the fields set in. You must set the structSize of - the structure to the size of the actual structure you used. - - Returns NULL if the layer creation failed. This happens most frequently - because the map you specified in your - XPLMCreateMapLayer_t::mapToCreateLayerIn field doesn't exist (that is, if - XPLMMapExists() returns 0 for the specified map). You can use - XPLMRegisterMapCreationHook() to get a notification each time a new map is - opened in X-Plane, at which time you can create layers in it. - } - FUNCTION XPLMCreateMapLayer( - inParams : PXPLMCreateMapLayer_t) : XPLMMapLayerID; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMDestroyMapLayer - - Destroys a map layer you created (calling your - XPLMMapWillBeDeletedCallback_f if applicable). Returns true if a deletion - took place. - } - FUNCTION XPLMDestroyMapLayer( - inLayer : XPLMMapLayerID) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMMapCreatedCallback_f - - A callback to notify your plugin that a new map has been created in - X-Plane. This is the best time to add a custom map layer using - XPLMCreateMapLayer(). - - No OpenGL drawing is permitted within this callback. - } -TYPE - XPLMMapCreatedCallback_f = PROCEDURE( - mapIdentifier : Pchar; - refcon : pointer); cdecl; - - { - XPLMRegisterMapCreationHook - - Registers your callback to receive a notification each time a new map is - constructed in X-Plane. This callback is the best time to add your custom - map layer using XPLMCreateMapLayer(). - - Note that you will not be notified about any maps that already exist---you - can use XPLMMapExists() to check for maps that were created previously. - } - PROCEDURE XPLMRegisterMapCreationHook( - callback : XPLMMapCreatedCallback_f; - refcon : pointer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMMapExists - - Returns 1 if the map with the specified identifier already exists in - X-Plane. In that case, you can safely call XPLMCreateMapLayer() specifying - that your layer should be added to that map. - } - FUNCTION XPLMMapExists( - mapIdentifier : Pchar) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{$ENDIF} -{$IFDEF XPLM300} -{___________________________________________________________________________ - * MAP DRAWING - ___________________________________________________________________________} -{ - These APIs are only valid from within a map drawing callback (one of - XPLMIconDrawingCallback_t or XPLMMapLabelDrawingCallback_f). Your drawing - callbacks are registered when you create a new map layer as part of your - XPLMCreateMapLayer_t. The functions here hook into X-Plane's built-in map - drawing functionality for icons and labels, so that you get a consistent - style with the rest of the X-Plane map. - - Note that the X-Plane 11 map introduces a strict ordering: layers of type - xplm_MapLayer_Fill get drawn beneath all xplm_MapLayer_Markings layers. - Likewise, all OpenGL drawing (performed in your layer's - XPLMMapDrawingCallback_f) will appear beneath any icons and labels you - draw. -} - - - { - XPLMMapOrientation - - Indicates whether a map element should be match its rotation to the map - itself, or to the user interface. For instance, the map itself may be - rotated such that "up" matches the user's aircraft, but you may want to - draw a text label such that it is always rotated zero degrees relative to - the user's perspective. In that case, you would have it draw with UI - orientation. - } -TYPE - XPLMMapOrientation = ( - { Orient such that a 0 degree rotation matches the map's north } - xplm_MapOrientation_Map = 0 - - { Orient such that a 0 degree rotation is "up" relative to the user interface } - ,xplm_MapOrientation_UI = 1 - - ); - PXPLMMapOrientation = ^XPLMMapOrientation; - - { - XPLMDrawMapIconFromSheet - - Enables plugin-created map layers to draw PNG icons using X-Plane's - built-in icon drawing functionality. Only valid from within an - XPLMIconDrawingCallback_t (but you can request an arbitrary number of icons - to be drawn from within your callback). - - X-Plane will automatically manage the memory for your texture so that it - only has to be loaded from disk once as long as you continue drawing it - per-frame. (When you stop drawing it, the memory may purged in a "garbage - collection" pass, require a load from disk in the future.) - - Instead of having X-Plane draw a full PNG, this method allows you to use UV - coordinates to request a portion of the image to be drawn. This allows you - to use a single texture load (of an icon sheet, for example) to draw many - icons. Doing so is much more efficient than drawing a dozen different small - PNGs. - - The UV coordinates used here treat the texture you load as being comprised - of a number of identically sized "cells." You specify the width and height - in cells (ds and dt, respectively), as well as the coordinates within the - cell grid for the sub-image you'd like to draw. - - Note that you can use different ds and dt values in subsequent calls with - the same texture sheet. This enables you to use icons of different sizes in - the same sheet if you arrange them properly in the PNG. - - This function is only valid from within an XPLMIconDrawingCallback_t (but - you can request an arbitrary number of icons to be drawn from within your - callback). - } - PROCEDURE XPLMDrawMapIconFromSheet( - layer : XPLMMapLayerID; - inPngPath : Pchar; - s : integer; - t : integer; - ds : integer; - dt : integer; - mapX : single; - mapY : single; - orientation : XPLMMapOrientation; - rotationDegrees : single; - mapWidth : single); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMDrawMapLabel - - Enables plugin-created map layers to draw text labels using X-Plane's - built-in labeling functionality. Only valid from within an - XPLMMapLabelDrawingCallback_f (but you can request an arbitrary number of - text labels to be drawn from within your callback). - } - PROCEDURE XPLMDrawMapLabel( - layer : XPLMMapLayerID; - inText : Pchar; - mapX : single; - mapY : single; - orientation : XPLMMapOrientation; - rotationDegrees : single); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{$ENDIF} -{$IFDEF XPLM300} -{___________________________________________________________________________ - * MAP PROJECTIONS - ___________________________________________________________________________} -{ - As of X-Plane 11, the map draws using true cartographic projections, and - different maps may use different projections. Thus, to draw at a particular - latitude and longitude, you must first transform your real-world - coordinates into map coordinates. - - The map projection is also responsible for giving you the current scale of - the map. That is, the projection can tell you how many map units correspond - to 1 meter at a given point. - - Finally, the map projection can give you the current rotation of the map. - Since X-Plane 11 maps can rotate to match the heading of the aircraft, the - map's rotation can potentially change every frame. -} - - - { - XPLMMapProject - - Projects a latitude/longitude into map coordinates. This is the inverse of - XPLMMapUnproject(). - - Only valid from within a map layer callback (one of - XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, - XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) - } - PROCEDURE XPLMMapProject( - projection : XPLMMapProjectionID; - latitude : real; - longitude : real; - outX : Psingle; - outY : Psingle); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMMapUnproject - - Transforms map coordinates back into a latitude and longitude. This is the - inverse of XPLMMapProject(). - - Only valid from within a map layer callback (one of - XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, - XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) - } - PROCEDURE XPLMMapUnproject( - projection : XPLMMapProjectionID; - mapX : single; - mapY : single; - outLatitude : Preal; - outLongitude : Preal); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMMapScaleMeter - - Returns the number of map units that correspond to a distance of one meter - at a given set of map coordinates. - - Only valid from within a map layer callback (one of - XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, - XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) - } - FUNCTION XPLMMapScaleMeter( - projection : XPLMMapProjectionID; - mapX : single; - mapY : single) : single; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMMapGetNorthHeading - - Returns the heading (in degrees clockwise from "up") that corresponds to - north at a given point on the map. In other words, if your runway has a - true heading of 360, you would use "north" as the Cartesian angle at which - to draw the runway on the map. (You would add the result of - XPLMMapGetNorthHeading() to your true heading to get the map angle.) - - This is necessary becuase X-Plane's map can be rotated to match your - aircraft's orientation; north is not always "up." - - Only valid from within a map layer callback (one of - XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, - XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) - } - FUNCTION XPLMMapGetNorthHeading( - projection : XPLMMapProjectionID; - mapX : single; - mapY : single) : single; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{$ENDIF} -IMPLEMENTATION -END. diff --git a/src/XPSDK301/Delphi/XPLM/XPLMMenus.pas b/src/XPSDK301/Delphi/XPLM/XPLMMenus.pas deleted file mode 100755 index 98db8101..00000000 --- a/src/XPSDK301/Delphi/XPLM/XPLMMenus.pas +++ /dev/null @@ -1,333 +0,0 @@ -{ - Copyright 2005-2012 Sandy Barbour and Ben Supnik - - All rights reserved. See license.txt for usage. - - X-Plane SDK Version: 2.1.1 -} - -UNIT XPLMMenus; -INTERFACE -{ - Theory of Operation - - Plug-ins can create menus in the menu bar of X-Plane. This is done by - creating a menu and then creating items. Menus are referred to by an - opaque ID. Items are referred to by (zero-based) index number. - - Menus are "sandboxed" between plugins---no plugin can access the menus of - any other plugin. Furthermore, all menu indices are relative to your - plugin's menus only; if your plugin creates two sub-menus in the Plugins - menu at different times, it doesn't matter how many other plugins also - create sub-menus of Plugins in the intervening time: your sub-menus will be - given menu indices 0 and 1. (The SDK does some work in the back-end to - filter out menus that are irrelevant to your plugin in order to deliver - this consistency for each plugin.) - - When you create a menu item, you specify how we should handle clicks on - that menu item. You can either have the XPLM trigger a callback (the - XPLMMenuHandler_f associated with the menu that contains the item), or you - can simply have a command be triggered (with no associated call to your - menu handler). The advantage of the latter method is that X-Plane will - display any keyboard shortcuts associated with the command. (In contrast, - there are no keyboard shortcuts associated with menu handler callbacks with - specific parameters.) -} - -USES XPLMDefs; -USES XPLMUtilities; - {$A4} -{$IFDEF MSWINDOWS} - {$DEFINE DELPHI} -{$ENDIF} -{___________________________________________________________________________ - * XPLM MENUS - ___________________________________________________________________________} -{ - -} - - { - XPLMMenuCheck - - These enumerations define the various 'check' states for an X-Plane menu. - 'checking' in X-Plane actually appears as a light which may or may not be - lit. So there are three possible states. - } -TYPE - XPLMMenuCheck = ( - { there is no symbol to the left of the menu item. } - xplm_Menu_NoCheck = 0 - - { the menu has a mark next to it that is unmarked (not lit). } - ,xplm_Menu_Unchecked = 1 - - { the menu has a mark next to it that is checked (lit). } - ,xplm_Menu_Checked = 2 - - ); - PXPLMMenuCheck = ^XPLMMenuCheck; - - { - XPLMMenuID - - This is a unique ID for each menu you create. - } - XPLMMenuID = pointer; - PXPLMMenuID = ^XPLMMenuID; - - { - XPLMMenuHandler_f - - A menu handler function takes two reference pointers, one for the menu - (specified when the menu was created) and one for the item (specified when - the item was created). - } - XPLMMenuHandler_f = PROCEDURE( - inMenuRef : pointer; - inItemRef : pointer); cdecl; - - { - XPLMFindPluginsMenu - - This function returns the ID of the plug-ins menu, which is created for you - at startup. - } - FUNCTION XPLMFindPluginsMenu: XPLMMenuID; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{$IFDEF XPLM300} - { - XPLMFindAircraftMenu - - This function returns the ID of the menu for the currently-loaded aircraft, - used for showing aircraft-specific commands. - - The aircraft menu is created by X-Plane at startup, but it remains hidden - until it is populated via XPLMAppendMenuItem() or - XPLMAppendMenuItemWithCommand(). - - Only plugins loaded with the user's current aircraft are allowed to access - the aircraft menu. For all other plugins, this will return NULL, and any - attempts to add menu items to it will fail. - } - FUNCTION XPLMFindAircraftMenu: XPLMMenuID; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} - - { - XPLMCreateMenu - - This function creates a new menu and returns its ID. It returns NULL if - the menu cannot be created. Pass in a parent menu ID and an item index to - create a submenu, or NULL for the parent menu to put the menu in the menu - bar. The menu's name is only used if the menu is in the menubar. You also - pass a handler function and a menu reference value. Pass NULL for the - handler if you do not need callbacks from the menu (for example, if it only - contains submenus). - - Important: you must pass a valid, non-empty menu title even if the menu is - a submenu where the title is not visible. - } - FUNCTION XPLMCreateMenu( - inName : Pchar; - inParentMenu : XPLMMenuID; - inParentItem : integer; - inHandler : XPLMMenuHandler_f; - inMenuRef : pointer) : XPLMMenuID; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMDestroyMenu - - This function destroys a menu that you have created. Use this to remove a - submenu if necessary. (Normally this function will not be necessary.) - } - PROCEDURE XPLMDestroyMenu( - inMenuID : XPLMMenuID); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMClearAllMenuItems - - This function removes all menu items from a menu, allowing you to rebuild - it. Use this function if you need to change the number of items on a menu. - } - PROCEDURE XPLMClearAllMenuItems( - inMenuID : XPLMMenuID); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMAppendMenuItem - - This routine appends a new menu item to the bottom of a menu and returns - its index. Pass in the menu to add the item to, the items name, and a void - * ref for this item. - - Returns a negative index if the append failed (due to an invalid parent - menu argument). - - Note that all menu indices returned are relative to your plugin's menus - only; if your plugin creates two sub-menus in the Plugins menu at different - times, it doesn't matter how many other plugins also create sub-menus of - Plugins in the intervening time: your sub-menus will be given menu indices - 0 and 1. (The SDK does some work in the back-end to filter out menus that - are irrelevant to your plugin in order to deliver this consistency for each - plugin.) - } - FUNCTION XPLMAppendMenuItem( - inMenu : XPLMMenuID; - inItemName : Pchar; - inItemRef : pointer; - inDeprecatedAndIgnored: integer) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{$IFDEF XPLM300} - { - XPLMAppendMenuItemWithCommand - - Like XPLMAppendMenuItem(), but instead of the new menu item triggering the - XPLMMenuHandler_f of the containiner menu, it will simply execute the - command you pass in. Using a command for your menu item allows the user to - bind a keyboard shortcut to the command and see that shortcut represented - in the menu. - - Returns a negative index if the append failed (due to an invalid parent - menu argument). - - Like XPLMAppendMenuItem(), all menu indices are relative to your plugin's - menus only. - } - FUNCTION XPLMAppendMenuItemWithCommand( - inMenu : XPLMMenuID; - inItemName : Pchar; - inCommandToExecute : XPLMCommandRef) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} - - { - XPLMAppendMenuSeparator - - This routine adds a separator to the end of a menu. - - Returns a negative index if the append failed (due to an invalid parent - menu argument). - } - PROCEDURE XPLMAppendMenuSeparator( - inMenu : XPLMMenuID); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMSetMenuItemName - - This routine changes the name of an existing menu item. Pass in the menu - ID and the index of the menu item. - } - PROCEDURE XPLMSetMenuItemName( - inMenu : XPLMMenuID; - inIndex : integer; - inItemName : Pchar; - inForceEnglish : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMCheckMenuItem - - Set whether a menu item is checked. Pass in the menu ID and item index. - } - PROCEDURE XPLMCheckMenuItem( - inMenu : XPLMMenuID; - index : integer; - inCheck : XPLMMenuCheck); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMCheckMenuItemState - - This routine returns whether a menu item is checked or not. A menu item's - check mark may be on or off, or a menu may not have an icon at all. - } - PROCEDURE XPLMCheckMenuItemState( - inMenu : XPLMMenuID; - index : integer; - outCheck : PXPLMMenuCheck); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMEnableMenuItem - - Sets whether this menu item is enabled. Items start out enabled. - } - PROCEDURE XPLMEnableMenuItem( - inMenu : XPLMMenuID; - index : integer; - enabled : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{$IFDEF XPLM210} - { - XPLMRemoveMenuItem - - Removes one item from a menu. Note that all menu items below are moved up - one; your plugin must track the change in index numbers. - } - PROCEDURE XPLMRemoveMenuItem( - inMenu : XPLMMenuID; - inIndex : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} - -IMPLEMENTATION -END. diff --git a/src/XPSDK301/Delphi/XPLM/XPLMNavigation.pas b/src/XPSDK301/Delphi/XPLM/XPLMNavigation.pas deleted file mode 100755 index 10b046f9..00000000 --- a/src/XPSDK301/Delphi/XPLM/XPLMNavigation.pas +++ /dev/null @@ -1,429 +0,0 @@ -{ - Copyright 2005-2012 Sandy Barbour and Ben Supnik - - All rights reserved. See license.txt for usage. - - X-Plane SDK Version: 2.1.1 -} - -UNIT XPLMNavigation; -INTERFACE -{ - XPLMNavigation - THEORY OF OPERATION - - The XPLM Navigation APIs give you some access to the navigation databases - inside X-Plane. X-Plane stores all navigation information in RAM, so by - using these APIs you can gain access to most information without having to - go to disk or parse the files yourself. - - You can also use this API to program the FMS. You must use the navigation - APIs to find the nav-aids you want to program into the FMS, since the FMS - is powered internally by X-Plane's navigation database. -} - -USES XPLMDefs; - {$A4} -{$IFDEF MSWINDOWS} - {$DEFINE DELPHI} -{$ENDIF} -{___________________________________________________________________________ - * NAVIGATION DATABASE ACCESS - ___________________________________________________________________________} -{ - -} - - { - XPLMNavType - - These enumerations define the different types of navaids. They are each - defined with a separate bit so that they may be bit-wise added together to - form sets of nav-aid types. - - NOTE: xplm_Nav_LatLon is a specific lat-lon coordinate entered into the - FMS. It will not exist in the database, and cannot be programmed into the - FMS. Querying the FMS for navaids will return it. Use - XPLMSetFMSEntryLatLon to set a lat/lon waypoint. - } -TYPE - XPLMNavType = ( - xplm_Nav_Unknown = 0 - - ,xplm_Nav_Airport = 1 - - ,xplm_Nav_NDB = 2 - - ,xplm_Nav_VOR = 4 - - ,xplm_Nav_ILS = 8 - - ,xplm_Nav_Localizer = 16 - - ,xplm_Nav_GlideSlope = 32 - - ,xplm_Nav_OuterMarker = 64 - - ,xplm_Nav_MiddleMarker = 128 - - ,xplm_Nav_InnerMarker = 256 - - ,xplm_Nav_Fix = 512 - - ,xplm_Nav_DME = 1024 - - ,xplm_Nav_LatLon = 2048 - - ); - PXPLMNavType = ^XPLMNavType; - - { - XPLMNavRef - - XPLMNavRef is an iterator into the navigation database. The navigation - database is essentially an array, but it is not necessarily densely - populated. The only assumption you can safely make is that like-typed - nav-aids are grouped together. - - Use XPLMNavRef to refer to a nav-aid. - - XPLM_NAV_NOT_FOUND is returned by functions that return an XPLMNavRef when - the iterator must be invalid. - } - XPLMNavRef = integer; - PXPLMNavRef = ^XPLMNavRef; - -CONST - XPLM_NAV_NOT_FOUND = -1; - - { - XPLMGetFirstNavAid - - This returns the very first navaid in the database. Use this to traverse - the entire database. Returns XPLM_NAV_NOT_FOUND if the nav database is - empty. - } - FUNCTION XPLMGetFirstNavAid: XPLMNavRef; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMGetNextNavAid - - Given a nav aid ref, this routine returns the next navaid. It returns - XPLM_NAV_NOT_FOUND if the nav aid passed in was invalid or if the navaid - passed in was the last one in the database. Use this routine to iterate - across all like-typed navaids or the entire database. - - WARNING: due to a bug in the SDK, when fix loading is disabled in the - rendering settings screen, calling this routine with the last airport - returns a bogus nav aid. Using this nav aid can crash X-Plane. - } - FUNCTION XPLMGetNextNavAid( - inNavAidRef : XPLMNavRef) : XPLMNavRef; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMFindFirstNavAidOfType - - This routine returns the ref of the first navaid of the given type in the - database or XPLM_NAV_NOT_FOUND if there are no navaids of that type in the - database. You must pass exactly one nav aid type to this routine. - - WARNING: due to a bug in the SDK, when fix loading is disabled in the - rendering settings screen, calling this routine with fixes returns a bogus - nav aid. Using this nav aid can crash X-Plane. - } - FUNCTION XPLMFindFirstNavAidOfType( - inType : XPLMNavType) : XPLMNavRef; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMFindLastNavAidOfType - - This routine returns the ref of the last navaid of the given type in the - database or XPLM_NAV_NOT_FOUND if there are no navaids of that type in the - database. You must pass exactly one nav aid type to this routine. - - WARNING: due to a bug in the SDK, when fix loading is disabled in the - rendering settings screen, calling this routine with fixes returns a bogus - nav aid. Using this nav aid can crash X-Plane. - } - FUNCTION XPLMFindLastNavAidOfType( - inType : XPLMNavType) : XPLMNavRef; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMFindNavAid - - This routine provides a number of searching capabilities for the nav - database. XPLMFindNavAid will search through every nav aid whose type is - within inType (multiple types may be added together) and return any - nav-aids found based on the following rules: - - If inLat and inLon are not NULL, the navaid nearest to that lat/lon will be - returned, otherwise the last navaid found will be returned. - - If inFrequency is not NULL, then any navaids considered must match this - frequency. Note that this will screen out radio beacons that do not have - frequency data published (like inner markers) but not fixes and airports. - - If inNameFragment is not NULL, only navaids that contain the fragment in - their name will be returned. - - If inIDFragment is not NULL, only navaids that contain the fragment in - their IDs will be returned. - - This routine provides a simple way to do a number of useful searches: - - Find the nearest navaid on this frequency. Find the nearest airport. Find - the VOR whose ID is "KBOS". Find the nearest airport whose name contains - "Chicago". - } - FUNCTION XPLMFindNavAid( - inNameFragment : Pchar; { Can be nil } - inIDFragment : Pchar; { Can be nil } - inLat : Psingle; { Can be nil } - inLon : Psingle; { Can be nil } - inFrequency : Pinteger; { Can be nil } - inType : XPLMNavType) : XPLMNavRef; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMGetNavAidInfo - - This routine returns information about a navaid. Any non-null field is - filled out with information if it is available. - - Frequencies are in the nav.dat convention as described in the X-Plane nav - database FAQ: NDB frequencies are exact, all others are multiplied by 100. - - The buffer for IDs should be at least 6 chars and the buffer for names - should be at least 41 chars, but since these values are likely to go up, I - recommend passing at least 32 chars for IDs and 256 chars for names when - possible. - - The outReg parameter tells if the navaid is within the local "region" of - loaded DSFs. (This information may not be particularly useful to plugins.) - The parameter is a single byte value 1 for true or 0 for false, not a C - string. - } - PROCEDURE XPLMGetNavAidInfo( - inRef : XPLMNavRef; - outType : PXPLMNavType; { Can be nil } - outLatitude : Psingle; { Can be nil } - outLongitude : Psingle; { Can be nil } - outHeight : Psingle; { Can be nil } - outFrequency : Pinteger; { Can be nil } - outHeading : Psingle; { Can be nil } - outID : Pchar; { Can be nil } - outName : Pchar; { Can be nil } - outReg : Pchar); { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{___________________________________________________________________________ - * FLIGHT MANAGEMENT COMPUTER - ___________________________________________________________________________} -{ - Note: the FMS works based on an array of entries. Indices into the array - are zero-based. Each entry is a nav-aid plus an altitude. The FMS tracks - the currently displayed entry and the entry that it is flying to. - - The FMS must be programmed with contiguous entries, so clearing an entry at - the end shortens the effective flight plan. There is a max of 100 - waypoints in the flight plan. -} - - - { - XPLMCountFMSEntries - - This routine returns the number of entries in the FMS. - } - FUNCTION XPLMCountFMSEntries: integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMGetDisplayedFMSEntry - - This routine returns the index of the entry the pilot is viewing. - } - FUNCTION XPLMGetDisplayedFMSEntry: integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMGetDestinationFMSEntry - - This routine returns the index of the entry the FMS is flying to. - } - FUNCTION XPLMGetDestinationFMSEntry: integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMSetDisplayedFMSEntry - - This routine changes which entry the FMS is showing to the index specified. - } - PROCEDURE XPLMSetDisplayedFMSEntry( - inIndex : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMSetDestinationFMSEntry - - This routine changes which entry the FMS is flying the aircraft toward. - } - PROCEDURE XPLMSetDestinationFMSEntry( - inIndex : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMGetFMSEntryInfo - - This routine returns information about a given FMS entry. A reference to a - navaid can be returned allowing you to find additional information (such as - a frequency, ILS heading, name, etc.). Some information is available - immediately. For a lat/lon entry, the lat/lon is returned by this routine - but the navaid cannot be looked up (and the reference will be - XPLM_NAV_NOT_FOUND. FMS name entry buffers should be at least 256 chars in - length. - } - PROCEDURE XPLMGetFMSEntryInfo( - inIndex : integer; - outType : PXPLMNavType; { Can be nil } - outID : Pchar; { Can be nil } - outRef : PXPLMNavRef; { Can be nil } - outAltitude : Pinteger; { Can be nil } - outLat : Psingle; { Can be nil } - outLon : Psingle); { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMSetFMSEntryInfo - - This routine changes an entry in the FMS to have the destination navaid - passed in and the altitude specified. Use this only for airports, fixes, - and radio-beacon navaids. Currently of radio beacons, the FMS can only - support VORs and NDBs. Use the routines below to clear or fly to a lat/lon. - } - PROCEDURE XPLMSetFMSEntryInfo( - inIndex : integer; - inRef : XPLMNavRef; - inAltitude : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMSetFMSEntryLatLon - - This routine changes the entry in the FMS to a lat/lon entry with the given - coordinates. - } - PROCEDURE XPLMSetFMSEntryLatLon( - inIndex : integer; - inLat : single; - inLon : single; - inAltitude : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMClearFMSEntry - - This routine clears the given entry, potentially shortening the flight - plan. - } - PROCEDURE XPLMClearFMSEntry( - inIndex : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{___________________________________________________________________________ - * GPS RECEIVER - ___________________________________________________________________________} -{ - These APIs let you read data from the GPS unit. -} - - { - XPLMGetGPSDestinationType - - This routine returns the type of the currently selected GPS destination, - one of fix, airport, VOR or NDB. - } - FUNCTION XPLMGetGPSDestinationType: XPLMNavType; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMGetGPSDestination - - This routine returns the current GPS destination. - } - FUNCTION XPLMGetGPSDestination: XPLMNavRef; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -IMPLEMENTATION -END. diff --git a/src/XPSDK301/Delphi/XPLM/XPLMPlanes.pas b/src/XPSDK301/Delphi/XPLM/XPLMPlanes.pas deleted file mode 100755 index bac0ef7d..00000000 --- a/src/XPSDK301/Delphi/XPLM/XPLMPlanes.pas +++ /dev/null @@ -1,315 +0,0 @@ -{ - Copyright 2005-2012 Sandy Barbour and Ben Supnik - - All rights reserved. See license.txt for usage. - - X-Plane SDK Version: 2.1.1 -} - -UNIT XPLMPlanes; -INTERFACE -{ - The XPLMPlanes APIs allow you to control the various aircraft in X-Plane, - both the user's and the sim's. -} - -USES XPLMDefs; - {$A4} -{$IFDEF MSWINDOWS} - {$DEFINE DELPHI} -{$ENDIF} -{___________________________________________________________________________ - * USER AIRCRAFT ACCESS - ___________________________________________________________________________} -{ - -} - - { - XPLMSetUsersAircraft - - This routine changes the user's aircraft. Note that this will reinitialize - the user to be on the nearest airport's first runway. Pass in a full path - (hard drive and everything including the .acf extension) to the .acf file. - } - PROCEDURE XPLMSetUsersAircraft( - inAircraftPath : Pchar); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - { - XPLMPlaceUserAtAirport - - This routine places the user at a given airport. Specify the airport by - its ICAO code (e.g. 'KBOS'). - } - PROCEDURE XPLMPlaceUserAtAirport( - inAirportCode : Pchar); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$IFDEF XPLM300} - { - XPLMPlaceUserAtLocation - - Places the user at a specific location after performing any necessary - scenery loads. - - As with in-air starts initiated from the X-Plane user interface, the - aircraft will always start with its engines running, regardless of the - user's preferences (i.e., regardless of what the dataref - sim/operation/prefs/startup_running says). - } - PROCEDURE XPLMPlaceUserAtLocation( - latitudeDegrees : real; - longitudeDegrees : real; - elevationMetersMSL : single; - headingDegreesTrue : single; - speedMetersPerSecond: single); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} -{___________________________________________________________________________ - * GLOBAL AIRCRAFT ACCESS - ___________________________________________________________________________} -{ - -} - -CONST - { The user's aircraft is always index 0. } - XPLM_USER_AIRCRAFT = 0; - { - XPLMPlaneDrawState_t - - This structure contains additional plane parameter info to be passed to - draw plane. Make sure to fill in the size of the structure field with - sizeof(XPLMDrawPlaneState_t) so that the XPLM can tell how many fields you - knew about when compiling your plugin (since more fields may be added - later). - - Most of these fields are ratios from 0 to 1 for control input. X-Plane - calculates what the actual controls look like based on the .acf file for - that airplane. Note for the yoke inputs, this is what the pilot of the - plane has commanded (post artificial stability system if there were one) - and affects aelerons, rudder, etc. It is not necessarily related to the - actual position of the plane! - } -TYPE - XPLMPlaneDrawState_t = RECORD - { The size of the draw state struct. } - structSize : integer; - { A ratio from [0..1] describing how far the landing gear is extended. } - gearPosition : single; - { Ratio of flap deployment, 0 = up, 1 = full deploy. } - flapRatio : single; - { Ratio of spoiler deployment, 0 = none, 1 = full deploy. } - spoilerRatio : single; - { Ratio of speed brake deployment, 0 = none, 1 = full deploy. } - speedBrakeRatio : single; - { Ratio of slat deployment, 0 = none, 1 = full deploy. } - slatRatio : single; - { Wing sweep ratio, 0 = forward, 1 = swept. } - wingSweep : single; - { Thrust power, 0 = none, 1 = full fwd, -1 = full reverse. } - thrust : single; - { Total pitch input for this plane. } - yokePitch : single; - { Total Heading input for this plane. } - yokeHeading : single; - { Total Roll input for this plane. } - yokeRoll : single; - END; - PXPLMPlaneDrawState_t = ^XPLMPlaneDrawState_t; - { - XPLMCountAircraft - - This function returns the number of aircraft X-Plane is capable of having, - as well as the number of aircraft that are currently active. These numbers - count the user's aircraft. It can also return the plugin that is currently - controlling aircraft. In X-Plane 7, this routine reflects the number of - aircraft the user has enabled in the rendering options window. - } - PROCEDURE XPLMCountAircraft( - outTotalAircraft : Pinteger; - outActiveAircraft : Pinteger; - outController : PXPLMPluginID); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - { - XPLMGetNthAircraftModel - - This function returns the aircraft model for the Nth aircraft. Indices are - zero based, with zero being the user's aircraft. The file name should be - at least 256 chars in length; the path should be at least 512 chars in - length. - } - PROCEDURE XPLMGetNthAircraftModel( - inIndex : integer; - outFileName : Pchar; - outPath : Pchar); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{___________________________________________________________________________ - * EXCLUSIVE AIRCRAFT ACCESS - ___________________________________________________________________________} -{ - The following routines require exclusive access to the airplane APIs. Only - one plugin may have this access at a time. -} - - - { - XPLMPlanesAvailable_f - - Your airplanes available callback is called when another plugin gives up - access to the multiplayer planes. Use this to wait for access to - multiplayer. - } -TYPE - XPLMPlanesAvailable_f = PROCEDURE( - inRefcon : pointer); cdecl; - - { - XPLMAcquirePlanes - - XPLMAcquirePlanes grants your plugin exclusive access to the aircraft. It - returns 1 if you gain access, 0 if you do not. inAircraft - pass in an - array of pointers to strings specifying the planes you want loaded. For - any plane index you do not want loaded, pass a 0-length string. Other - strings should be full paths with the .acf extension. NULL terminates this - array, or pass NULL if there are no planes you want loaded. If you pass in - a callback and do not receive access to the planes your callback will be - called when the airplanes are available. If you do receive airplane access, - your callback will not be called. - } - FUNCTION XPLMAcquirePlanes( - inAircraft : PPchar; { Can be nil } - inCallback : XPLMPlanesAvailable_f; - inRefcon : pointer) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMReleasePlanes - - Call this function to release access to the planes. Note that if you are - disabled, access to planes is released for you and you must reacquire it. - } - PROCEDURE XPLMReleasePlanes; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMSetActiveAircraftCount - - This routine sets the number of active planes. If you pass in a number - higher than the total number of planes availables, only the total number of - planes available is actually used. - } - PROCEDURE XPLMSetActiveAircraftCount( - inCount : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMSetAircraftModel - - This routine loads an aircraft model. It may only be called if you have - exclusive access to the airplane APIs. Pass in the path of the model with - the .acf extension. The index is zero based, but you may not pass in 0 - (use XPLMSetUsersAircraft to load the user's aircracft). - } - PROCEDURE XPLMSetAircraftModel( - inIndex : integer; - inAircraftPath : Pchar); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMDisableAIForPlane - - This routine turns off X-Plane's AI for a given plane. The plane will - continue to draw and be a real plane in X-Plane, but will not move itself. - } - PROCEDURE XPLMDisableAIForPlane( - inPlaneIndex : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMDrawAircraft - - This routine draws an aircraft. It can only be called from a 3-d drawing - callback. Pass in the position of the plane in OpenGL local coordinates - and the orientation of the plane. A 1 for full drawing indicates that the - whole plane must be drawn; a 0 indicates you only need the nav lights - drawn. (This saves rendering time when planes are far away.) - } - PROCEDURE XPLMDrawAircraft( - inPlaneIndex : integer; - inX : single; - inY : single; - inZ : single; - inPitch : single; - inRoll : single; - inYaw : single; - inFullDraw : integer; - inDrawStateInfo : PXPLMPlaneDrawState_t); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMReinitUsersPlane - - This function recomputes the derived flight model data from the aircraft - structure in memory. If you have used the data access layer to modify the - aircraft structure, use this routine to resynchronize X-Plane; since - X-Plane works at least partly from derived values, the sim will not behave - properly until this is called. - - WARNING: this routine does not necessarily place the airplane at the - airport; use XPLMSetUsersAircraft to be compatible. This routine is - provided to do special experimentation with flight models without resetting - flight. - } - PROCEDURE XPLMReinitUsersPlane; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -IMPLEMENTATION -END. diff --git a/src/XPSDK301/Delphi/XPLM/XPLMPlugin.pas b/src/XPSDK301/Delphi/XPLM/XPLMPlugin.pas deleted file mode 100755 index d61ca83e..00000000 --- a/src/XPSDK301/Delphi/XPLM/XPLMPlugin.pas +++ /dev/null @@ -1,390 +0,0 @@ -{ - Copyright 2005-2012 Sandy Barbour and Ben Supnik - - All rights reserved. See license.txt for usage. - - X-Plane SDK Version: 2.1.1 -} - -UNIT XPLMPlugin; -INTERFACE -{ - These APIs provide facilities to find and work with other plugins and - manage other plugins. -} - -USES XPLMDefs; - {$A4} -{$IFDEF MSWINDOWS} - {$DEFINE DELPHI} -{$ENDIF} -{___________________________________________________________________________ - * FINDING PLUGINS - ___________________________________________________________________________} -{ - These APIs allow you to find another plugin or yourself, or iterate across - all plugins. For example, if you wrote an FMS plugin that needed to talk - to an autopilot plugin, you could use these APIs to locate the autopilot - plugin. -} - - - { - XPLMGetMyID - - This routine returns the plugin ID of the calling plug-in. Call this to - get your own ID. - } - FUNCTION XPLMGetMyID: XPLMPluginID; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMCountPlugins - - This routine returns the total number of plug-ins that are loaded, both - disabled and enabled. - } - FUNCTION XPLMCountPlugins: integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMGetNthPlugin - - This routine returns the ID of a plug-in by index. Index is 0 based from 0 - to XPLMCountPlugins-1, inclusive. Plugins may be returned in any arbitrary - order. - } - FUNCTION XPLMGetNthPlugin( - inIndex : integer) : XPLMPluginID; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMFindPluginByPath - - This routine returns the plug-in ID of the plug-in whose file exists at the - passed in absolute file system path. XPLM_NO_PLUGIN_ID is returned if the - path does not point to a currently loaded plug-in. - } - FUNCTION XPLMFindPluginByPath( - inPath : Pchar) : XPLMPluginID; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMFindPluginBySignature - - This routine returns the plug-in ID of the plug-in whose signature matches - what is passed in or XPLM_NO_PLUGIN_ID if no running plug-in has this - signature. Signatures are the best way to identify another plug-in as they - are independent of the file system path of a plug-in or the human-readable - plug-in name, and should be unique for all plug-ins. Use this routine to - locate another plugin that your plugin interoperates with - } - FUNCTION XPLMFindPluginBySignature( - inSignature : Pchar) : XPLMPluginID; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMGetPluginInfo - - This routine returns information about a plug-in. Each parameter should be - a pointer to a buffer of at least 256 characters, or NULL to not receive - the information. - - outName - the human-readable name of the plug-in. outFilePath - the - absolute file path to the file that contains this plug-in. outSignature - a - unique string that identifies this plug-in. outDescription - a - human-readable description of this plug-in. - } - PROCEDURE XPLMGetPluginInfo( - inPlugin : XPLMPluginID; - outName : Pchar; { Can be nil } - outFilePath : Pchar; { Can be nil } - outSignature : Pchar; { Can be nil } - outDescription : Pchar); { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{___________________________________________________________________________ - * ENABLING/DISABLING PLUG-INS - ___________________________________________________________________________} -{ - These routines are used to work with plug-ins and manage them. Most - plugins will not need to use these APIs. -} - - - { - XPLMIsPluginEnabled - - Returns whether the specified plug-in is enabled for running. - } - FUNCTION XPLMIsPluginEnabled( - inPluginID : XPLMPluginID) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMEnablePlugin - - This routine enables a plug-in if it is not already enabled. It returns 1 - if the plugin was enabled or successfully enables itself, 0 if it does not. - Plugins may fail to enable (for example, if resources cannot be acquired) - by returning 0 from their XPluginEnable callback. - } - FUNCTION XPLMEnablePlugin( - inPluginID : XPLMPluginID) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMDisablePlugin - - This routine disableds an enabled plug-in. - } - PROCEDURE XPLMDisablePlugin( - inPluginID : XPLMPluginID); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMReloadPlugins - - This routine reloads all plug-ins. Once this routine is called and you - return from the callback you were within (e.g. a menu select callback) you - will receive your XPluginDisable and XPluginStop callbacks and your DLL - will be unloaded, then the start process happens as if the sim was starting - up. - } - PROCEDURE XPLMReloadPlugins; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{___________________________________________________________________________ - * INTERPLUGIN MESSAGING - ___________________________________________________________________________} -{ - Plugin messages are defined as 32-bit integers. Messages below 0x00FFFFFF - are reserved for X-Plane and the plugin SDK. - - Messages have two conceptual uses: notifications and commands. Commands - are sent from one plugin to another to induce behavior; notifications are - sent from one plugin to all others for informational purposes. It is - important that commands and notifications not have the same values because - this could cause a notification sent by one plugin to accidentally induce a - command in another. - - By convention, plugin-defined notifications should have the high bit set - (e.g. be greater or equal to unsigned 0x8000000) while commands should have - this bit be cleared. - - The following messages are sent to your plugin by X-Plane. -} - - -CONST - { This message is sent to your plugin whenever the user's plane crashes. } - XPLM_MSG_PLANE_CRASHED = 101; - - { This message is sent to your plugin whenever a new plane is loaded. The } - { parameter is the number of the plane being loaded; 0 indicates the user's } - { plane. } - XPLM_MSG_PLANE_LOADED = 102; - - { This messages is called whenever the user's plane is positioned at a new } - { airport. } - XPLM_MSG_AIRPORT_LOADED = 103; - - { This message is sent whenever new scenery is loaded. Use datarefs to } - { determine the new scenery files that were loaded. } - XPLM_MSG_SCENERY_LOADED = 104; - - { This message is sent whenever the user adjusts the number of X-Plane } - { aircraft models. You must use XPLMCountPlanes to find out how many planes } - { are now available. This message will only be sent in XP7 and higher } - { because in XP6 the number of aircraft is not user-adjustable. } - XPLM_MSG_AIRPLANE_COUNT_CHANGED = 105; - -{$IFDEF XPLM200} - { This message is sent to your plugin whenever a plane is unloaded. The } - { parameter is the number of the plane being unloaded; 0 indicates the user's } - { plane. The parameter is of type int, passed as the value of the pointer. } - { (That is: the parameter is an int, not a pointer to an int.) } - XPLM_MSG_PLANE_UNLOADED = 106; -{$ENDIF} - -{$IFDEF XPLM210} - { This message is sent to your plugin right before X-Plane writes its } - { preferences file. You can use this for two purposes: to write your own } - { preferences, and to modify any datarefs to influence preferences output. } - { For example, if your plugin temporarily modifies saved preferences, you can } - { put them back to their default values here to avoid having the tweaks be } - { persisted if your plugin is not loaded on the next invocation of X-Plane. } - XPLM_MSG_WILL_WRITE_PREFS = 107; -{$ENDIF} - -{$IFDEF XPLM210} - { This message is sent to your plugin right after a livery is loaded for an } - { airplane. You can use this to check the new livery (via datarefs) and } - { react accordingly. The parameter is of type int, passed as the value of a } - { pointer and represents the aicraft plane number - 0 is the user's plane. } - XPLM_MSG_LIVERY_LOADED = 108; -{$ENDIF} - -{$IFDEF XPLM301} - { Sent to your plugin right before X-Plane enters virtual reality mode (at } - { which time any windows that are not positioned in VR mode will no longer be } - { visible to the user). } - XPLM_MSG_ENTERED_VR = 109; -{$ENDIF} - -{$IFDEF XPLM301} - { Sent to your plugin right before X-Plane leaves virtual reality mode (at } - { which time you may want to clean up windows that are positioned in VR } - { mode). } - XPLM_MSG_EXITING_VR = 110; -{$ENDIF} - - { - XPLMSendMessageToPlugin - - This function sends a message to another plug-in or X-Plane. Pass - XPLM_NO_PLUGIN_ID to broadcast to all plug-ins. Only enabled plug-ins with - a message receive function receive the message. - } - PROCEDURE XPLMSendMessageToPlugin( - inPlugin : XPLMPluginID; - inMessage : integer; - inParam : pointer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{$IFDEF XPLM200} -{___________________________________________________________________________ - * Plugin Features API - ___________________________________________________________________________} -{ - The plugin features API allows your plugin to "sign up" for additional - capabilities and plugin system features that are normally disabled for - backward compatibility. This allows advanced plugins to "opt-in" to new - behavior. - - Each feature is defined by a permanent string name. The feature string - names will vary with the particular installation of X-Plane, so plugins - should not expect a feature to be guaranteed present. -} - - - { - XPLMFeatureEnumerator_f - - You pass an XPLMFeatureEnumerator_f to get a list of all features supported - by a given version running version of X-Plane. This routine is called once - for each feature. - } -TYPE - XPLMFeatureEnumerator_f = PROCEDURE( - inFeature : Pchar; - inRef : pointer); cdecl; - - { - XPLMHasFeature - - This returns 1 if the given installation of X-Plane supports a feature, or - 0 if it does not. - } - FUNCTION XPLMHasFeature( - inFeature : Pchar) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMIsFeatureEnabled - - This returns 1 if a feature is currently enabled for your plugin, or 0 if - it is not enabled. It is an error to call this routine with an unsupported - feature. - } - FUNCTION XPLMIsFeatureEnabled( - inFeature : Pchar) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMEnableFeature - - This routine enables or disables a feature for your plugin. This will - change the running behavior of X-Plane and your plugin in some way, - depending on the feature. - } - PROCEDURE XPLMEnableFeature( - inFeature : Pchar; - inEnable : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMEnumerateFeatures - - This routine calls your enumerator callback once for each feature that this - running version of X-Plane supports. Use this routine to determine all of - the features that X-Plane can support. - } - PROCEDURE XPLMEnumerateFeatures( - inEnumerator : XPLMFeatureEnumerator_f; - inRef : pointer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{$ENDIF} -IMPLEMENTATION -END. diff --git a/src/XPSDK301/Delphi/XPLM/XPLMProcessing.pas b/src/XPSDK301/Delphi/XPLM/XPLMProcessing.pas deleted file mode 100755 index b2925c36..00000000 --- a/src/XPSDK301/Delphi/XPLM/XPLMProcessing.pas +++ /dev/null @@ -1,274 +0,0 @@ -{ - Copyright 2005-2012 Sandy Barbour and Ben Supnik - - All rights reserved. See license.txt for usage. - - X-Plane SDK Version: 2.1.1 -} - -UNIT XPLMProcessing; -INTERFACE -{ - This API allows you to get regular callbacks during the flight loop, the - part of X-Plane where the plane's position calculates the physics of - flight, etc. Use these APIs to accomplish periodic tasks like logging data - and performing I/O. - - WARNING: Do NOT use these callbacks to draw! You cannot draw during flight - loop callbacks. Use the drawing callbacks (see XPLMDisplay for more info) - for graphics. -} - -USES XPLMDefs; - {$A4} -{$IFDEF MSWINDOWS} - {$DEFINE DELPHI} -{$ENDIF} -{___________________________________________________________________________ - * FLIGHT LOOP CALLBACKS - ___________________________________________________________________________} -{ - -} - -{$IFDEF XPLM210} - { - XPLMFlightLoopPhaseType - - You can register a flight loop callback to run either before or after the - flight model is integrated by X-Plane. - } -TYPE - XPLMFlightLoopPhaseType = ( - { Your callback runs before X-Plane integrates the flight model. } - xplm_FlightLoop_Phase_BeforeFlightModel = 0 - - { Your callback runs after X-Plane integrates the flight model. } - ,xplm_FlightLoop_Phase_AfterFlightModel = 1 - - ); - PXPLMFlightLoopPhaseType = ^XPLMFlightLoopPhaseType; -{$ENDIF} - -{$IFDEF XPLM210} - { - XPLMFlightLoopID - - This is an opaque identifier for a flight loop callback. You can use this - identifier to easily track and remove your callbacks, or to use the new - flight loop APIs. - } - XPLMFlightLoopID = pointer; - PXPLMFlightLoopID = ^XPLMFlightLoopID; -{$ENDIF} - - { - XPLMFlightLoop_f - - This is your flight loop callback. Each time the flight loop is iterated - through, you receive this call at the end. You receive a time since you - were last called and a time since the last loop, as well as a loop counter. - The 'phase' parameter is deprecated and should be ignored. - - Your return value controls when you will next be called. Return 0 to stop - receiving callbacks. Pass a positive number to specify how many seconds - until the next callback. (You will be called at or after this time, not - before.) Pass a negative number to specify how many loops must go by until - you are called. For example, -1.0 means call me the very next loop. Try to - run your flight loop as infrequently as is practical, and suspend it (using - return value 0) when you do not need it; lots of flight loop callbacks that - do nothing lowers X-Plane's frame rate. - - Your callback will NOT be unregistered if you return 0; it will merely be - inactive. - - The reference constant you passed to your loop is passed back to you. - } - XPLMFlightLoop_f = FUNCTION( - inElapsedSinceLastCall: single; - inElapsedTimeSinceLastFlightLoop: single; - inCounter : integer; - inRefcon : pointer) : single; cdecl; - -{$IFDEF XPLM210} - { - XPLMCreateFlightLoop_t - - XPLMCreateFlightLoop_t contains the parameters to create a new flight loop - callback. The strsucture can be expanded in future SDKs - always set - structSize to the size of your structure in bytes. - } - XPLMCreateFlightLoop_t = RECORD - structSize : integer; - phase : XPLMFlightLoopPhaseType; - callbackFunc : XPLMFlightLoop_f; - refcon : pointer; - END; - PXPLMCreateFlightLoop_t = ^XPLMCreateFlightLoop_t; -{$ENDIF} - - { - XPLMGetElapsedTime - - This routine returns the elapsed time since the sim started up in decimal - seconds. - } - FUNCTION XPLMGetElapsedTime: single; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMGetCycleNumber - - This routine returns a counter starting at zero for each sim cycle - computed/video frame rendered. - } - FUNCTION XPLMGetCycleNumber: integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMRegisterFlightLoopCallback - - This routine registers your flight loop callback. Pass in a pointer to a - flight loop function and a refcon. inInterval defines when you will be - called. Pass in a positive number to specify seconds from registration time - to the next callback. Pass in a negative number to indicate when you will - be called (e.g. pass -1 to be called at the next cylcle). Pass 0 to not be - called; your callback will be inactive. - } - PROCEDURE XPLMRegisterFlightLoopCallback( - inFlightLoop : XPLMFlightLoop_f; - inInterval : single; - inRefcon : pointer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMUnregisterFlightLoopCallback - - This routine unregisters your flight loop callback. Do NOT call it from - your flight loop callback. Once your flight loop callback is unregistered, - it will not be called again. - } - PROCEDURE XPLMUnregisterFlightLoopCallback( - inFlightLoop : XPLMFlightLoop_f; - inRefcon : pointer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMSetFlightLoopCallbackInterval - - This routine sets when a callback will be called. Do NOT call it from your - callback; use the return value of the callback to change your callback - interval from inside your callback. - - inInterval is formatted the same way as in XPLMRegisterFlightLoopCallback; - positive for seconds, negative for cycles, and 0 for deactivating the - callback. If inRelativeToNow is 1, times are from the time of this call; - otherwise they are from the time the callback was last called (or the time - it was registered if it has never been called. - } - PROCEDURE XPLMSetFlightLoopCallbackInterval( - inFlightLoop : XPLMFlightLoop_f; - inInterval : single; - inRelativeToNow : integer; - inRefcon : pointer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{$IFDEF XPLM210} - { - XPLMCreateFlightLoop - - This routine creates a flight loop callback and returns its ID. The flight - loop callback is created using the input param struct, and is inited to be - unscheduled. - } - FUNCTION XPLMCreateFlightLoop( - inParams : PXPLMCreateFlightLoop_t) : XPLMFlightLoopID; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} - -{$IFDEF XPLM210} - { - XPLMDestroyFlightLoop - - This routine destroys a flight loop callback by ID. - } - PROCEDURE XPLMDestroyFlightLoop( - inFlightLoopID : XPLMFlightLoopID); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} - -{$IFDEF XPLM210} - { - XPLMScheduleFlightLoop - - This routine schedules a flight loop callback for future execution. If - inInterval is negative, it is run in a certain number of frames based on - the absolute value of the input. If the interval is positive, it is a - duration in seconds. - - If inRelativeToNow is true, ties are interpretted relative to the time this - routine is called; otherwise they are relative to the last call time or the - time the flight loop was registered (if never called). - - THREAD SAFETY: it is legal to call this routine from any thread under the - following conditions: - - 1. The call must be between the beginning of an XPLMEnable and the end of - an XPLMDisable sequence. (That is, you must not call this routine from - thread activity when your plugin was supposed to be disabled. Since plugins - are only enabled while loaded, this also implies you cannot run this - routine outside an XPLMStart/XPLMStop sequence.) - - 2. You may not call this routine re-entrantly for a single flight loop ID. - (That is, you can't enable from multiple threads at the same time.) - - 3. You must call this routine between the time after XPLMCreateFlightLoop - returns a value and the time you call XPLMDestroyFlightLoop. (That is, you - must ensure that your threaded activity is within the life of the object. - The SDK does not check this for you, nor does it synchronize destruction of - the object.) - - 4. The object must be unscheduled if this routine is to be called from a - thread other than the main thread. - } - PROCEDURE XPLMScheduleFlightLoop( - inFlightLoopID : XPLMFlightLoopID; - inInterval : single; - inRelativeToNow : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} - -IMPLEMENTATION -END. diff --git a/src/XPSDK301/Delphi/XPLM/XPLMScenery.pas b/src/XPSDK301/Delphi/XPLM/XPLMScenery.pas deleted file mode 100644 index d68b33a5..00000000 --- a/src/XPSDK301/Delphi/XPLM/XPLMScenery.pas +++ /dev/null @@ -1,476 +0,0 @@ -{ - Copyright 2005-2012 Sandy Barbour and Ben Supnik - - All rights reserved. See license.txt for usage. - - X-Plane SDK Version: 2.1.1 -} - -UNIT XPLMScenery; -INTERFACE -{ - This package contains APIs to interact with X-Plane's scenery system. -} - -USES XPLMDefs; - {$A4} -{$IFDEF MSWINDOWS} - {$DEFINE DELPHI} -{$ENDIF} -{$IFDEF XPLM200} -{___________________________________________________________________________ - * Terrain Y-Testing - ___________________________________________________________________________} -{ - The Y-testing API allows you to locate the physical scenery mesh. This - would be used to place dynamic graphics on top of the ground in a plausible - way or do physics interactions. - - The Y-test API works via probe objects, which are allocated by your plugin - and used to query terrain. Probe objects exist both to capture which - algorithm you have requested (see probe types) and also to cache query - information. - - Performance guidelines: It is generally faster to use the same probe for - nearby points and different probes for different points. Try not to - allocate more than "hundreds" of probes at most. Share probes if you need - more. Generally, probing operations are expensive, and should be avoided - via caching when possible. - - Y testing returns a location on the terrain, a normal vectory, and a - velocity vector. The normal vector tells you the slope of the terrain at - that point. The velocity vector tells you if that terrain is moving (and is - in meters/second). For example, if your Y test hits the aircraft carrier - deck, this tells you the velocity of that point on the deck. - - Note: the Y-testing API is limited to probing the loaded scenery area, - which is approximately 300x300 km in X-Plane 9. Probes outside this area - will return the height of a 0 MSL sphere. -} - - - { - XPLMProbeType - - XPLMProbeType defines the type of terrain probe - each probe has a - different algorithm. (Only one type of probe is provided right now, but - future APIs will expose more flexible or poewrful or useful probes. - } -TYPE - XPLMProbeType = ( - { The Y probe gives you the location of the tallest physical scenery along } - { the Y axis going through the queried point. } - xplm_ProbeY = 0 - - ); - PXPLMProbeType = ^XPLMProbeType; - - { - XPLMProbeResult - - Probe results - possible results from a probe query. - } - XPLMProbeResult = ( - { The probe hit terrain and returned valid values. } - xplm_ProbeHitTerrain = 0 - - { An error in the API call. Either the probe struct size is bad, or the } - { probe is invalid or the type is mismatched for the specific query call. } - ,xplm_ProbeError = 1 - - { The probe call succeeded but there is no terrain under this point (perhaps } - { it is off the side of the planet?) } - ,xplm_ProbeMissed = 2 - - ); - PXPLMProbeResult = ^XPLMProbeResult; - - { - XPLMProbeRef - - An XPLMProbeRef is an opaque handle to a probe, used for querying the - terrain. - } - XPLMProbeRef = pointer; - PXPLMProbeRef = ^XPLMProbeRef; - - { - XPLMProbeInfo_t - - XPLMProbeInfo_t contains the results of a probe call. Make sure to set - structSize to the size of the struct before using it. - } - XPLMProbeInfo_t = RECORD - { Size of structure in bytes - always set this before calling the XPLM. } - structSize : integer; - { Resulting X location of the terrain point we hit, in local OpenGL } - { coordinates. } - locationX : single; - { Resulting Y location of the terrain point we hit, in local OpenGL } - { coordinates. } - locationY : single; - { Resulting Z location of the terrain point we hit, in local OpenGL } - { coordinates. } - locationZ : single; - { X component of the normal vector to the terrain we found. } - normalX : single; - { Y component of the normal vector to the terrain we found. } - normalY : single; - { Z component of the normal vector to the terrain we found. } - normalZ : single; - { X component of the velocity vector of the terrain we found. } - velocityX : single; - { Y component of the velocity vector of the terrain we found. } - velocityY : single; - { Z component of the velocity vector of the terrain we found. } - velocityZ : single; - { Tells if the surface we hit is water (otherwise it is land). } - is_wet : integer; - END; - PXPLMProbeInfo_t = ^XPLMProbeInfo_t; - - { - XPLMCreateProbe - - Creates a new probe object of a given type and returns. - } - FUNCTION XPLMCreateProbe( - inProbeType : XPLMProbeType) : XPLMProbeRef; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMDestroyProbe - - Deallocates an existing probe object. - } - PROCEDURE XPLMDestroyProbe( - inProbe : XPLMProbeRef); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMProbeTerrainXYZ - - Probes the terrain. Pass in the XYZ coordinate of the probe point, a probe - object, and an XPLMProbeInfo_t struct that has its structSize member set - properly. Other fields are filled in if we hit terrain, and a probe result - is returned. - } - FUNCTION XPLMProbeTerrainXYZ( - inProbe : XPLMProbeRef; - inX : single; - inY : single; - inZ : single; - outInfo : PXPLMProbeInfo_t) : XPLMProbeResult; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{$ENDIF} -{$IFDEF XPLM300} -{___________________________________________________________________________ - * Magnetic Variation - ___________________________________________________________________________} -{ - Use the magnetic variation (more properly, the "magnetic declination") API - to find the offset of magnetic north from true north at a given latitude - and longitude within the simulator. - - In the real world, the Earth's magnetic field is irregular, such that true - north (the direction along a meridian toward the north pole) does not - necessarily match what a magnetic compass shows as north. - - Using this API ensures that you present the same offsets to users as - X-Plane's built-in instruments. -} - - - { - XPLMGetMagneticVariation - - Returns X-Plane's simulated magnetic variation (declination) at the - indication latitude and longitude. - } - FUNCTION XPLMGetMagneticVariation( - latitude : real; - longitude : real) : single; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMDegTrueToDegMagnetic - - Converts a heading in degrees relative to true north into a value relative - to magnetic north at the user's current location. - } - FUNCTION XPLMDegTrueToDegMagnetic( - headingDegreesTrue : single) : single; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMDegMagneticToDegTrue - - Converts a heading in degrees relative to magnetic north at the user's - current location into a value relative to true north. - } - FUNCTION XPLMDegMagneticToDegTrue( - headingDegreesMagnetic: single) : single; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{$ENDIF} -{___________________________________________________________________________ - * Object Drawing - ___________________________________________________________________________} -{ - The object drawing routines let you load and draw X-Plane OBJ files. - Objects are loaded by file path and managed via an opaque handle. X-Plane - naturally reference counts objects, so it is important that you balance - every successful call to XPLMLoadObject with a call to XPLMUnloadObject! -} - - -{$IFDEF XPLM200} -TYPE - { - XPLMObjectRef - - An XPLMObjectRef is a opaque handle to an .obj file that has been loaded - into memory. - } - XPLMObjectRef = pointer; - PXPLMObjectRef = ^XPLMObjectRef; -{$ENDIF} - -{$IFDEF XPLM200} - { - XPLMDrawInfo_t - - The XPLMDrawInfo_t structure contains positioning info for one object that - is to be drawn. Be sure to set structSize to the size of the structure for - future expansion. - } - XPLMDrawInfo_t = RECORD - { Set this to the size of this structure! } - structSize : integer; - { X location of the object in local coordinates. } - x : single; - { Y location of the object in local coordinates. } - y : single; - { Z location of the object in local coordinates. } - z : single; - { Pitch in degres to rotate the object, positive is up. } - pitch : single; - { Heading in local coordinates to rotate the object, clockwise. } - heading : single; - { Roll to rotate the object. } - roll : single; - END; - PXPLMDrawInfo_t = ^XPLMDrawInfo_t; -{$ENDIF} - -{$IFDEF XPLM210} - { - XPLMObjectLoaded_f - - You provide this callback when loading an object asynchronously; it will be - called once the object is loaded. Your refcon is passed back. The object - ref passed in is the newly loaded object (ready for use) or NULL if an - error occured. - - If your plugin is disabled, this callback will be delivered as soon as the - plugin is re-enabled. If your plugin is unloaded before this callback is - ever called, the SDK will release the object handle for you. - } - XPLMObjectLoaded_f = PROCEDURE( - inObject : XPLMObjectRef; - inRefcon : pointer); cdecl; -{$ENDIF} - -{$IFDEF XPLM200} - { - XPLMLoadObject - - This routine loads an OBJ file and returns a handle to it. If X-Plane has - already loaded the object, the handle to the existing object is returned. - Do not assume you will get the same handle back twice, but do make sure to - call unload once for every load to avoid "leaking" objects. The object will - be purged from memory when no plugins and no scenery are using it. - - The path for the object must be relative to the X-System base folder. If - the path is in the root of the X-System folder you may need to prepend ./ - to it; loading objects in the root of the X-System folder is STRONGLY - discouraged - your plugin should not dump art resources in the root folder! - - - XPLMLoadObject will return NULL if the object cannot be loaded (either - because it is not found or the file is misformatted). This routine will - load any object that can be used in the X-Plane scenery system. - - It is important that the datarefs an object uses for animation already be - loaded before you load the object. For this reason it may be necessary to - defer object loading until the sim has fully started. - } - FUNCTION XPLMLoadObject( - inPath : Pchar) : XPLMObjectRef; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} - -{$IFDEF XPLM210} - { - XPLMLoadObjectAsync - - This routine loads an object asynchronously; control is returned to you - immediately while X-Plane loads the object. The sim will not stop flying - while the object loads. For large objects, it may be several seconds before - the load finishes. - - You provide a callback function that is called once the load has completed. - Note that if the object cannot be loaded, you will not find out until the - callback function is called with a NULL object handle. - - There is no way to cancel an asynchronous object load; you must wait for - the load to complete and then release the object if it is no longer - desired. - } - PROCEDURE XPLMLoadObjectAsync( - inPath : Pchar; - inCallback : XPLMObjectLoaded_f; - inRefcon : pointer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} - -{$IFDEF XPLM200} - { - XPLMDrawObjects - - XPLMDrawObjects draws an object from an OBJ file one or more times. You - pass in the object and an array of XPLMDrawInfo_t structs, one for each - place you would like the object to be drawn. - - X-Plane will attempt to cull the objects based on LOD and visibility, and - will pick the appropriate LOD. - - Lighting is a boolean; pass 1 to show the night version of object with - night-only lights lit up. Pass 0 to show the daytime version of the object. - - - earth_relative controls the coordinate system. If this is 1, the rotations - you specify are applied to the object after its coordinate system is - transformed from local to earth-relative coordinates -- that is, an object - with no rotations will point toward true north and the Y axis will be up - against gravity. If this is 0, the object is drawn with your rotations from - local coordanates -- that is, an object with no rotations is drawn pointing - down the -Z axis and the Y axis of the object matches the local coordinate - Y axis. - } - PROCEDURE XPLMDrawObjects( - inObject : XPLMObjectRef; - inCount : integer; - inLocations : PXPLMDrawInfo_t; - lighting : integer; - earth_relative : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} - -{$IFDEF XPLM200} - { - XPLMUnloadObject - - This routine marks an object as no longer being used by your plugin. - Objects are reference counted: once no plugins are using an object, it is - purged from memory. Make sure to call XPLMUnloadObject once for each - successful call to XPLMLoadObject. - } - PROCEDURE XPLMUnloadObject( - inObject : XPLMObjectRef); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} - -{$IFDEF XPLM200} -{___________________________________________________________________________ - * Library Access - ___________________________________________________________________________} -{ - The library access routines allow you to locate scenery objects via the - X-Plane library system. Right now library access is only provided for - objects, allowing plugin-drawn objects to be extended using the library - system. -} - - - { - XPLMLibraryEnumerator_f - - An XPLMLibraryEnumerator_f is a callback you provide that is called once - for each library element that is located. The returned paths will be - relative to the X-System folder. - } -TYPE - XPLMLibraryEnumerator_f = PROCEDURE( - inFilePath : Pchar; - inRef : pointer); cdecl; - - { - XPLMLookupObjects - - This routine looks up a virtual path in the library system and returns all - matching elements. You provide a callback - one virtual path may match many - objects in the library. XPLMLookupObjects returns the number of objects - found. - - The latitude and longitude parameters specify the location the object will - be used. The library system allows for scenery packages to only provide - objects to certain local locations. Only objects that are allowed at the - latitude/longitude you provide will be returned. - } - FUNCTION XPLMLookupObjects( - inPath : Pchar; - inLatitude : single; - inLongitude : single; - enumerator : XPLMLibraryEnumerator_f; - ref : pointer) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{$ENDIF} -IMPLEMENTATION -END. diff --git a/src/XPSDK301/Delphi/XPLM/XPLMUtilities.pas b/src/XPSDK301/Delphi/XPLM/XPLMUtilities.pas deleted file mode 100755 index b8de3657..00000000 --- a/src/XPSDK301/Delphi/XPLM/XPLMUtilities.pas +++ /dev/null @@ -1,923 +0,0 @@ -{ - Copyright 2005-2012 Sandy Barbour and Ben Supnik - - All rights reserved. See license.txt for usage. - - X-Plane SDK Version: 2.1.1 -} - -UNIT XPLMUtilities; -INTERFACE -{ - -} - -USES XPLMDefs; - {$A4} -{$IFDEF MSWINDOWS} - {$DEFINE DELPHI} -{$ENDIF} -{___________________________________________________________________________ - * X-PLANE USER INTERACTION - ___________________________________________________________________________} -{ - The user interaction APIs let you simulate commands the user can do with a - joystick, keyboard etc. Note that it is generally safer for future - compatibility to use one of these commands than to manipulate the - underlying sim data. -} - - - { - XPLMCommandKeyID - - These enums represent all the keystrokes available within X-Plane. They can - be sent to X-Plane directly. For example, you can reverse thrust using - these enumerations. - } -TYPE - XPLMCommandKeyID = ( - xplm_key_pause=0, - xplm_key_revthrust, - xplm_key_jettison, - xplm_key_brakesreg, - xplm_key_brakesmax, - xplm_key_gear, - xplm_key_timedn, - xplm_key_timeup, - xplm_key_fadec, - xplm_key_otto_dis, - xplm_key_otto_atr, - xplm_key_otto_asi, - xplm_key_otto_hdg, - xplm_key_otto_gps, - xplm_key_otto_lev, - xplm_key_otto_hnav, - xplm_key_otto_alt, - xplm_key_otto_vvi, - xplm_key_otto_vnav, - xplm_key_otto_nav1, - xplm_key_otto_nav2, - xplm_key_targ_dn, - xplm_key_targ_up, - xplm_key_hdgdn, - xplm_key_hdgup, - xplm_key_barodn, - xplm_key_baroup, - xplm_key_obs1dn, - xplm_key_obs1up, - xplm_key_obs2dn, - xplm_key_obs2up, - xplm_key_com1_1, - xplm_key_com1_2, - xplm_key_com1_3, - xplm_key_com1_4, - xplm_key_nav1_1, - xplm_key_nav1_2, - xplm_key_nav1_3, - xplm_key_nav1_4, - xplm_key_com2_1, - xplm_key_com2_2, - xplm_key_com2_3, - xplm_key_com2_4, - xplm_key_nav2_1, - xplm_key_nav2_2, - xplm_key_nav2_3, - xplm_key_nav2_4, - xplm_key_adf_1, - xplm_key_adf_2, - xplm_key_adf_3, - xplm_key_adf_4, - xplm_key_adf_5, - xplm_key_adf_6, - xplm_key_transpon_1, - xplm_key_transpon_2, - xplm_key_transpon_3, - xplm_key_transpon_4, - xplm_key_transpon_5, - xplm_key_transpon_6, - xplm_key_transpon_7, - xplm_key_transpon_8, - xplm_key_flapsup, - xplm_key_flapsdn, - xplm_key_cheatoff, - xplm_key_cheaton, - xplm_key_sbrkoff, - xplm_key_sbrkon, - xplm_key_ailtrimL, - xplm_key_ailtrimR, - xplm_key_rudtrimL, - xplm_key_rudtrimR, - xplm_key_elvtrimD, - xplm_key_elvtrimU, - xplm_key_forward, - xplm_key_down, - xplm_key_left, - xplm_key_right, - xplm_key_back, - xplm_key_tower, - xplm_key_runway, - xplm_key_chase, - xplm_key_free1, - xplm_key_free2, - xplm_key_spot, - xplm_key_fullscrn1, - xplm_key_fullscrn2, - xplm_key_tanspan, - xplm_key_smoke, - xplm_key_map, - xplm_key_zoomin, - xplm_key_zoomout, - xplm_key_cycledump, - xplm_key_replay, - xplm_key_tranID, - xplm_key_max - ); - PXPLMCommandKeyID = ^XPLMCommandKeyID; - - { - XPLMCommandButtonID - - These are enumerations for all of the things you can do with a joystick - button in X-Plane. They currently match the buttons menu in the equipment - setup dialog, but these enums will be stable even if they change in - X-Plane. - } - XPLMCommandButtonID = ( - xplm_joy_nothing=0, - xplm_joy_start_all, - xplm_joy_start_0, - xplm_joy_start_1, - xplm_joy_start_2, - xplm_joy_start_3, - xplm_joy_start_4, - xplm_joy_start_5, - xplm_joy_start_6, - xplm_joy_start_7, - xplm_joy_throt_up, - xplm_joy_throt_dn, - xplm_joy_prop_up, - xplm_joy_prop_dn, - xplm_joy_mixt_up, - xplm_joy_mixt_dn, - xplm_joy_carb_tog, - xplm_joy_carb_on, - xplm_joy_carb_off, - xplm_joy_trev, - xplm_joy_trm_up, - xplm_joy_trm_dn, - xplm_joy_rot_trm_up, - xplm_joy_rot_trm_dn, - xplm_joy_rud_lft, - xplm_joy_rud_cntr, - xplm_joy_rud_rgt, - xplm_joy_ail_lft, - xplm_joy_ail_cntr, - xplm_joy_ail_rgt, - xplm_joy_B_rud_lft, - xplm_joy_B_rud_rgt, - xplm_joy_look_up, - xplm_joy_look_dn, - xplm_joy_look_lft, - xplm_joy_look_rgt, - xplm_joy_glance_l, - xplm_joy_glance_r, - xplm_joy_v_fnh, - xplm_joy_v_fwh, - xplm_joy_v_tra, - xplm_joy_v_twr, - xplm_joy_v_run, - xplm_joy_v_cha, - xplm_joy_v_fr1, - xplm_joy_v_fr2, - xplm_joy_v_spo, - xplm_joy_flapsup, - xplm_joy_flapsdn, - xplm_joy_vctswpfwd, - xplm_joy_vctswpaft, - xplm_joy_gear_tog, - xplm_joy_gear_up, - xplm_joy_gear_down, - xplm_joy_lft_brake, - xplm_joy_rgt_brake, - xplm_joy_brakesREG, - xplm_joy_brakesMAX, - xplm_joy_speedbrake, - xplm_joy_ott_dis, - xplm_joy_ott_atr, - xplm_joy_ott_asi, - xplm_joy_ott_hdg, - xplm_joy_ott_alt, - xplm_joy_ott_vvi, - xplm_joy_tim_start, - xplm_joy_tim_reset, - xplm_joy_ecam_up, - xplm_joy_ecam_dn, - xplm_joy_fadec, - xplm_joy_yaw_damp, - xplm_joy_art_stab, - xplm_joy_chute, - xplm_joy_JATO, - xplm_joy_arrest, - xplm_joy_jettison, - xplm_joy_fuel_dump, - xplm_joy_puffsmoke, - xplm_joy_prerotate, - xplm_joy_UL_prerot, - xplm_joy_UL_collec, - xplm_joy_TOGA, - xplm_joy_shutdown, - xplm_joy_con_atc, - xplm_joy_fail_now, - xplm_joy_pause, - xplm_joy_rock_up, - xplm_joy_rock_dn, - xplm_joy_rock_lft, - xplm_joy_rock_rgt, - xplm_joy_rock_for, - xplm_joy_rock_aft, - xplm_joy_idle_hilo, - xplm_joy_lanlights, - xplm_joy_max - ); - PXPLMCommandButtonID = ^XPLMCommandButtonID; - - { - XPLMHostApplicationID - - The plug-in system is based on Austin's cross-platform OpenGL framework and - could theoretically be adapted to run in other apps like WorldMaker. The - plug-in system also runs against a test harness for internal development - and could be adapted to another flight sim (in theory at least). So an ID - is providing allowing plug-ins to indentify what app they are running - under. - } - XPLMHostApplicationID = ( - xplm_Host_Unknown = 0 - - ,xplm_Host_XPlane = 1 - - ,xplm_Host_PlaneMaker = 2 - - ,xplm_Host_WorldMaker = 3 - - ,xplm_Host_Briefer = 4 - - ,xplm_Host_PartMaker = 5 - - ,xplm_Host_YoungsMod = 6 - - ,xplm_Host_XAuto = 7 - - ); - PXPLMHostApplicationID = ^XPLMHostApplicationID; - - { - XPLMLanguageCode - - These enums define what language the sim is running in. These enumerations - do not imply that the sim can or does run in all of these languages; they - simply provide a known encoding in the event that a given sim version is - localized to a certain language. - } - XPLMLanguageCode = ( - xplm_Language_Unknown = 0 - - ,xplm_Language_English = 1 - - ,xplm_Language_French = 2 - - ,xplm_Language_German = 3 - - ,xplm_Language_Italian = 4 - - ,xplm_Language_Spanish = 5 - - ,xplm_Language_Korean = 6 - -{$IFDEF XPLM200} - ,xplm_Language_Russian = 7 -{$ENDIF} - -{$IFDEF XPLM200} - ,xplm_Language_Greek = 8 -{$ENDIF} - -{$IFDEF XPLM200} - ,xplm_Language_Japanese = 9 -{$ENDIF} - -{$IFDEF XPLM200} - ,xplm_Language_Chinese = 10 -{$ENDIF} - - ); - PXPLMLanguageCode = ^XPLMLanguageCode; - -{$IFDEF XPLM200} - { - XPLMDataFileType - - These enums define types of data files you can load or unload using the - SDK. - } - XPLMDataFileType = ( - { A situation (.sit) file, which starts off a flight in a given } - { configuration. } - xplm_DataFile_Situation = 1 - - { A situation movie (.smo) file, which replays a past flight. } - ,xplm_DataFile_ReplayMovie = 2 - - ); - PXPLMDataFileType = ^XPLMDataFileType; -{$ENDIF} - -{$IFDEF XPLM200} - { - XPLMError_f - - An XPLM error callback is a function that you provide to receive debugging - information from the plugin SDK. See XPLMSetErrorCallback for more - information. NOTE: for the sake of debugging, your error callback will be - called even if your plugin is not enabled, allowing you to receive debug - info in your XPluginStart and XPluginStop callbacks. To avoid causing logic - errors in the management code, do not call any other plugin routines from - your error callback - it is only meant for logging! - } - XPLMError_f = PROCEDURE( - inMessage : Pchar); cdecl; -{$ENDIF} - - { - XPLMSimulateKeyPress - - This function simulates a key being pressed for X-Plane. The keystroke goes - directly to X-Plane; it is never sent to any plug-ins. However, since this - is a raw key stroke it may be mapped by the keys file or enter text into a - field. - - WARNING: This function will be deprecated; do not use it. Instead use - XPLMCommandKeyStroke. - } - PROCEDURE XPLMSimulateKeyPress( - inKeyType : integer; - inKey : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMSpeakString - - This function displays the string in a translucent overlay over the current - display and also speaks the string if text-to-speech is enabled. The string - is spoken asynchronously, this function returns immediately. - } - PROCEDURE XPLMSpeakString( - inString : Pchar); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMCommandKeyStroke - - This routine simulates a command-key stroke. However, the keys are done by - function, not by actual letter, so this function works even if the user has - remapped their keyboard. Examples of things you might do with this include - pausing the simulator. - } - PROCEDURE XPLMCommandKeyStroke( - inKey : XPLMCommandKeyID); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMCommandButtonPress - - This function simulates any of the actions that might be taken by pressing - a joystick button. However, this lets you call the command directly rather - than have to know which button is mapped where. Important: you must release - each button you press. The APIs are separate so that you can 'hold down' a - button for a fixed amount of time. - } - PROCEDURE XPLMCommandButtonPress( - inButton : XPLMCommandButtonID); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMCommandButtonRelease - - This function simulates any of the actions that might be taken by pressing - a joystick button. See XPLMCommandButtonPress - } - PROCEDURE XPLMCommandButtonRelease( - inButton : XPLMCommandButtonID); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMGetVirtualKeyDescription - - Given a virtual key code (as defined in XPLMDefs.h) this routine returns a - human-readable string describing the character. This routine is provided - for showing users what keyboard mappings they have set up. The string may - read 'unknown' or be a blank or NULL string if the virtual key is unknown. - } - FUNCTION XPLMGetVirtualKeyDescription( - inVirtualKey : char) : Pchar; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{___________________________________________________________________________ - * X-PLANE MISC - ___________________________________________________________________________} -{ - -} - - { - XPLMReloadScenery - - XPLMReloadScenery reloads the current set of scenery. You can use this - function in two typical ways: simply call it to reload the scenery, picking - up any new installed scenery, .env files, etc. from disk. Or, change the - lat/ref and lon/ref data refs and then call this function to shift the - scenery environment. - } - PROCEDURE XPLMReloadScenery; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMGetSystemPath - - This function returns the full path to the X-System folder. Note that this - is a directory path, so it ends in a trailing : or /. The buffer you pass - should be at least 512 characters long. - } - PROCEDURE XPLMGetSystemPath( - outSystemPath : Pchar); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMGetPrefsPath - - This routine returns a full path to a file that is within X-Plane's - preferences directory. (You should remove the file name back to the last - directory separator to get the preferences directory. The buffer you pass - should be at least 512 characters long. - } - PROCEDURE XPLMGetPrefsPath( - outPrefsPath : Pchar); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMGetDirectorySeparator - - This routine returns a string with one char and a null terminator that is - the directory separator for the current platform. This allows you to write - code that concatinates directory paths without having to #ifdef for - platform. - } - FUNCTION XPLMGetDirectorySeparator: Pchar; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMExtractFileAndPath - - Given a full path to a file, this routine separates the path from the file. - If the path is a partial directory (e.g. ends in : or \) the trailing - directory separator is removed. This routine works in-place; a pointer to - the file part of the buffer is returned; the original buffer still starts - with the path. - } - FUNCTION XPLMExtractFileAndPath( - inFullPath : Pchar) : Pchar; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMGetDirectoryContents - - This routine returns a list of files in a directory (specified by a full - path, no trailing : or \). The output is returned as a list of NULL - terminated strings. An index array (if specified) is filled with pointers - into the strings. This routine The last file is indicated by a zero-length - string (and NULL in the indices). This routine will return 1 if you had - capacity for all files or 0 if you did not. You can also skip a given - number of files. - - inDirectoryPath - a null terminated C string containing the full path to - the directory with no trailing directory char. - - inFirstReturn - the zero-based index of the first file in the directory to - return. (Usually zero to fetch all in one pass.) - - outFileNames - a buffer to receive a series of sequential null terminated - C-string file names. A zero-length C string will be appended to the very - end. - - inFileNameBufSize - the size of the file name buffer in bytes. - - outIndices - a pointer to an array of character pointers that will become - an index into the directory. The last file will be followed by a NULL - value. Pass NULL if you do not want indexing information. - - inIndexCount - the max size of the index in entries. - - outTotalFiles - if not NULL, this is filled in with the number of files in - the directory. - - outReturnedFiles - if not NULL, the number of files returned by this - iteration. - - Return value - 1 if all info could be returned, 0 if there was a buffer - overrun. - - WARNING: Before X-Plane 7 this routine did not properly iterate through - directories. If X-Plane 6 compatibility is needed, use your own code to - iterate directories. - } - FUNCTION XPLMGetDirectoryContents( - inDirectoryPath : Pchar; - inFirstReturn : integer; - outFileNames : Pchar; - inFileNameBufSize : integer; - outIndices : PPchar; { Can be nil } - inIndexCount : integer; - outTotalFiles : Pinteger; { Can be nil } - outReturnedFiles : Pinteger) : integer; { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMInitialized - - This function returns 1 if X-Plane has properly initialized the plug-in - system. If this routine returns 0, many XPLM functions will not work. - - NOTE: Under normal circumstances a plug-in should never be running while - the plug-in manager is not initialized. - - WARNING: This function is generally not needed and may be deprecated in the - future. - } - FUNCTION XPLMInitialized: integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMGetVersions - - This routine returns the revision of both X-Plane and the XPLM DLL. All - versions are three-digit decimal numbers (e.g. 606 for version 6.06 of - X-Plane); the current revision of the XPLM is 200 (2.00). This routine also - returns the host ID of the app running us. - - The most common use of this routine is to special-case around X-Plane - version-specific behavior. - } - PROCEDURE XPLMGetVersions( - outXPlaneVersion : Pinteger; - outXPLMVersion : Pinteger; - outHostID : PXPLMHostApplicationID); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMGetLanguage - - This routine returns the langauge the sim is running in. - } - FUNCTION XPLMGetLanguage: XPLMLanguageCode; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMDebugString - - This routine outputs a C-style string to the Log.txt file. The file is - immediately flushed so you will not lose data. (This does cause a - performance penalty.) - } - PROCEDURE XPLMDebugString( - inString : Pchar); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{$IFDEF XPLM200} - { - XPLMSetErrorCallback - - XPLMSetErrorCallback installs an error-reporting callback for your plugin. - Normally the plugin system performs minimum diagnostics to maximize - performance. When you install an error callback, you will receive calls due - to certain plugin errors, such as passing bad parameters or incorrect data. - - - The intention is for you to install the error callback during debug - sections and put a break-point inside your callback. This will cause you to - break into the debugger from within the SDK at the point in your plugin - where you made an illegal call. - - Installing an error callback may activate error checking code that would - not normally run, and this may adversely affect performance, so do not - leave error callbacks installed in shipping plugins. - } - PROCEDURE XPLMSetErrorCallback( - inCallback : XPLMError_f); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} - -{$IFDEF XPLM200} - { - XPLMFindSymbol - - This routine will attempt to find the symbol passed in the inString - parameter. If the symbol is found a pointer the function is returned, - othewise the function will return NULL. - } - FUNCTION XPLMFindSymbol( - inString : Pchar) : pointer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} - -{$IFDEF XPLM200} - { - XPLMLoadDataFile - - Loads a data file of a given type. Paths must be relative to the X-System - folder. To clear the replay, pass a NULL file name (this is only valid with - replay movies, not sit files). - } - FUNCTION XPLMLoadDataFile( - inFileType : XPLMDataFileType; - inFilePath : Pchar) : integer; { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} - -{$IFDEF XPLM200} - { - XPLMSaveDataFile - - Saves the current situation or replay; paths are relative to the X-System - folder. - } - FUNCTION XPLMSaveDataFile( - inFileType : XPLMDataFileType; - inFilePath : Pchar) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} - -{$IFDEF XPLM200} -{___________________________________________________________________________ - * X-PLANE COMMAND MANAGEMENT - ___________________________________________________________________________} -{ - The command management APIs let plugins interact with the command-system in - X-Plane, the abstraction behind keyboard presses and joystick buttons. This - API lets you create new commands and modify the behavior (or get - notification) of existing ones. - - An X-Plane command consists of three phases: a beginning, continuous - repetition, and an ending. The command may be repeated zero times in the - event that the user presses a button only momentarily. -} - - - { - XPLMCommandPhase - - The phases of a command. - } -TYPE - XPLMCommandPhase = ( - { The command is being started. } - xplm_CommandBegin = 0 - - { The command is continuing to execute. } - ,xplm_CommandContinue = 1 - - { The command has ended. } - ,xplm_CommandEnd = 2 - - ); - PXPLMCommandPhase = ^XPLMCommandPhase; - - { - XPLMCommandRef - - A command ref is an opaque identifier for an X-Plane command. Command - references stay the same for the life of your plugin but not between - executions of X-Plane. Command refs are used to execute commands, create - commands, and create callbacks for particular commands. - - Note that a command is not "owned" by a particular plugin. Since many - plugins may participate in a command's execution, the command does not go - away if the plugin that created it is unloaded. - } - XPLMCommandRef = pointer; - PXPLMCommandRef = ^XPLMCommandRef; - - { - XPLMCommandCallback_f - - A command callback is a function in your plugin that is called when a - command is pressed. Your callback receives the command reference for the - particular command, the phase of the command that is executing, and a - reference pointer that you specify when registering the callback. - - Your command handler should return 1 to let processing of the command - continue to other plugins and X-Plane, or 0 to halt processing, potentially - bypassing X-Plane code. - } - XPLMCommandCallback_f = FUNCTION( - inCommand : XPLMCommandRef; - inPhase : XPLMCommandPhase; - inRefcon : pointer) : integer; cdecl; - - { - XPLMFindCommand - - XPLMFindCommand looks up a command by name, and returns its command - reference or NULL if the command does not exist. - } - FUNCTION XPLMFindCommand( - inName : Pchar) : XPLMCommandRef; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMCommandBegin - - XPLMCommandBegin starts the execution of a command, specified by its - command reference. The command is "held down" until XPLMCommandEnd is - called. - } - PROCEDURE XPLMCommandBegin( - inCommand : XPLMCommandRef); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMCommandEnd - - XPLMCommandEnd ends the execution of a given command that was started with - XPLMCommandBegin. - } - PROCEDURE XPLMCommandEnd( - inCommand : XPLMCommandRef); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMCommandOnce - - This executes a given command momentarily, that is, the command begins and - ends immediately. - } - PROCEDURE XPLMCommandOnce( - inCommand : XPLMCommandRef); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMCreateCommand - - XPLMCreateCommand creates a new command for a given string. If the command - already exists, the existing command reference is returned. The description - may appear in user interface contexts, such as the joystick configuration - screen. - } - FUNCTION XPLMCreateCommand( - inName : Pchar; - inDescription : Pchar) : XPLMCommandRef; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMRegisterCommandHandler - - XPLMRegisterCommandHandler registers a callback to be called when a command - is executed. You provide a callback with a reference pointer. - - If inBefore is true, your command handler callback will be executed before - X-Plane executes the command, and returning 0 from your callback will - disable X-Plane's processing of the command. If inBefore is false, your - callback will run after X-Plane. (You can register a single callback both - before and after a command.) - } - PROCEDURE XPLMRegisterCommandHandler( - inComand : XPLMCommandRef; - inHandler : XPLMCommandCallback_f; - inBefore : integer; - inRefcon : pointer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMUnregisterCommandHandler - - XPLMUnregisterCommandHandler removes a command callback registered with - XPLMRegisterCommandHandler. - } - PROCEDURE XPLMUnregisterCommandHandler( - inComand : XPLMCommandRef; - inHandler : XPLMCommandCallback_f; - inBefore : integer; - inRefcon : pointer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{$ENDIF} -IMPLEMENTATION -END. diff --git a/src/XPSDK301/Libraries/Mac/XPLM.framework/XPLM b/src/XPSDK301/Libraries/Mac/XPLM.framework/XPLM deleted file mode 100755 index b7542d5469d0028aaa56a30c7af0bdac6143d6b9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 206576 zcmeFae|%KM)jz%qSqMnnfS^GIQjIkc#6*l{4Z$qQ!d=)E6j7?ipb-QSh-6nnAsD(z z<$AkH`)I|gmG-H9XssHpV59& zoomWsHy>5R zN%Y-OR#rN#vTRzpuhe(zZ5`=bk*V-a8LYDNy&XOk9s65aT2|qkH*?M%W=uzXN5&|8 z))WO0eUBpOh#UCk&Z&quNJo5@>lD5PQ3QBz*B;S$Gb}Cj&zV1S&h4c$=S-iAxQ_T1 znfMA#f#7>bni5f#mQI^dI(^=)v!|)pj`$jGR`eB8aPg1t=A(+}@HZ~U#m?)T35ikp z%{Jqr@2TpYa!kB&Ilg0VoNKIS=lIf9c8dl066vD6jf|!tEG?aLS82t9*|*KTtF+uV z?<9QbCOsxO7QT1HSJ)2UUALYJU$%*_MX}Gq_e6ZG@91{;X3u4#&h(W|_s=OiiN4g^ z6rwyc58o5<^-93S$CKr*J^v<}_$(v@|M-4txx4*V->nLke>=9v#F>h|dJ}~2r^Z({ zclPYLbD|hK;!D0$;VV>u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goEX}|GnK;@|K67M-nMjX*#O5@QZcQvgEh9@p4fI}YLyjyY?9j=ZR4#RtQc%L zk!Y9H)t9#tD!`Yq7|r2I1Moc4@+FirgSTm84K z6wp+0lQ^y$z+yoXt^HpwAZo#41WV$q#*44YpDAp6c#z9;oxwX=BS!Qo6F`eVpn>QT z+C-Z4j{p9M3$uUn19?w?y8ip~huuB%hJ6_fm!BSPc8}6U`OUynCw=lr1V!69K%%vt z!4kJ}^^O+*=JcW1{2xr-JO{oE$8I3bR>e&*zun4jrx#zP#1m-a<7U1kv3aUIS#rXr zYlpm{NBm?ocmz^5(Ox~S=bO#q2LRCSXY-re*=D_4qJ{F^Xz3~~zqCw}kk%3TCP?<# KD8|3wzkdOF6v~$X diff --git a/src/XPSDK301/Libraries/Mac/XPWidgets.framework/XPWidgets b/src/XPSDK301/Libraries/Mac/XPWidgets.framework/XPWidgets deleted file mode 100755 index 20e521a54c969c17c285bcd229ebda586777a35b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 48768 zcmeFaeSB2K^*?@Zl7+~FHz;UCkf>2vgF+C270_I=H{69?41^$BVhCY@NJuc*6{rNG z$rdh`RX!DzR#CLJrPa37f<-Hk5KO{@7?5HB1ys}<*9RUH0x0`?pSg24n+0k6`+WZT zzItDoJ9B2voS8W@bLPyM*_-#yeto{9Ac*mTAasCBf?I=#fY1#gLAVBPUYsE0=TA^3 zO<+;&UzP1afx{pn*x<;gCqLiko#!*dCfuIhS}GWi!)y8kCzwI=onTQm!TkJkpMPq3 z1S7V7U;53Y(W2=S%!4cS=n2#SCZ#0(M#@&q4wqBrmU7Q}zF3>2W{MJL`V~7R7 z&(AL@&M%)odunNM{v2P~1@w|CO=OE6!LjrlCJKA!=NA`Tie3ux)3br|jo@f{)Xrgq zz@Pm5*`?G8MZWy${*uBA>eu|ZiI~Xo367?BnMEii zt&rIM$aum`o6^ z)L&NUE$=_4*gvDFq`d#6?E8wQ&G7olZ=YUPFxxw~v}{&e9H`N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iJRlYH#l6l2%*ma?p0VX?$Z>ISOYT&4UTzGIR6ca#LoH0rHn*5lLqD=lW^c_s-f zzV}>zS6Ni^=#z+k8aYg~%&RSycuPvciSM1|EV0YI#-iC5sszBy=IvU8<~)2Q;l%gO z@>a5{=2OS(3N-Pczv&2F_qo(qdA&fAuXKsrbUnwVP6lo;c<$R@60ZCFB~~dnYP{e{ zv7Qi99soB<#E8RhZ|myRsCKhP7Ehd+_s@FDZEAgeONd!Kt0qCk_l|l;s?F{;nBHS; z0;BsjThbeOk9(`ei#!1*A-iw4C8HaAj_xTi)!%jZUP$TM4(@eem5LrddOp zHwGoJ_}9;YEPsi0)_oRDJhLbex*z=#X!kp4 z=JCd!&`NB?{F2TC1)B3Dq=f5woK5ZB9@KcwOOrjJrF!8*25oda8=I!|{}hv>*Ku zpZ1X4Oo^u7b1!>FApKAJBR(r|g9mLz2B$G@CRP#8SycC(+};oqBlYtZapt`A5+^_V zLOk(D)6DQCvfEJ$T3FI6=Al=-AP~!+3Kodn&k~6mebJ)34-iYhu1A5?y8Dv z|A9ty9;KIHU5{?5k>;-pw34^(dqPg#9{QUAc?NB{iM{yWhPX3l%`KTnzKXTw4+C6l zU6~(U_ac-#-|{Mzc0H+{pjby&Pg`_WuW3cP6R; diff --git a/src/XPSDK301/Libraries/Win/XPWidgets_64.lib b/src/XPSDK301/Libraries/Win/XPWidgets_64.lib deleted file mode 100644 index dff5202aabf7b57903c8a6f19f43630bf06d4ca7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10830 zcmcgyOK%iM5H6cnFa#VheuLL0FY7%6v-QIvDUA<7Tn5aoan#|Y)X0p*xOq@=ogx~CsA1H&#EsXQ}P)%|t%R8?2k zy8pwHU*7nrWyNr78V}FGHVKh1k zKxp6rqrrOsgnGVX)QLkSG}y{0Hv>Ru1jk3H?@>q=-jRlXV|3yP0HOY~j7EMzeWct& zM#G<>9@607jQW2FpOotRQ^IiU>w>%eN62=K_hCt-~_%~Rwhl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6IR&#@!Q_Rn24JS_xIGlpEULX()Lx2e7VH{;nz9!hr>Jqozy{zZ_znK} zhrhCsc#M@n{xc@~&DQ|U>Z@t{ULVI~yKO`Fy|ieYQ*r;NJ)mDjZQve|7Lf)RYV=<& z^?%WXjDnm71}U0WGOiyn#cqcfqF#-zA2a3rI2>X|g>C~bd(2Hak&iGuxrlB6X7?&gnQLFu%nEwH^SUExf diff --git a/src/XPSDK301/README.txt b/src/XPSDK301/README.txt deleted file mode 100644 index 2316eb50..00000000 --- a/src/XPSDK301/README.txt +++ /dev/null @@ -1,197 +0,0 @@ -------------------------------------------------------------------------------- - THE X-PLANE PLUGIN SDK -------------------------------------------------------------------------------- - -This download contains the files necessary to build plugins for X-Plane. The -X-Plane plugin website is: - -http://www.xsquawkbox.net/xpsdk/ - -The website contains full documentation on the SDK including tech notes, sample -plugins, sample code, contact information, and links to the latest versions of -this SDK. - -The X-Plane SDK authors can be reached at: - -xplanesdk@xsquawkbox.net - -Please do not email Austin or Laminar Research for SDK questions or support; -the SDK is a third party effort. - -the X-Plane developer mailing list is an unlisted yahoo group frequented by -many X-Plane developers. - -x-plane-dev@yahoogroups.com - -------------------------------------------------------------------------------- - SDK FILES -------------------------------------------------------------------------------- - -license.txt Copyright information for this download. -README.txt This document -CHeaders Header files for compiling C/C++ plugins -Delphi Interfaces for compiling Pascal plugins -Libraries Import libraries for linking on Windows - and frameworks for linking on Mac. - -Note: there are no import/link-time libraries for Linux; on Linux, plugins -simply leave SDK symbols undefined and they are discovered at runtime. The -SDK website explains this process in more detail. - -Mac CFM plugins are not supported by the SDK versions 2.0 and higher; the -2.0 SDK requires X-Plane 9.0 or newer, and X-Plane 9 will not run on -Mac OS 9. Therefore CFM plugins are not useful (and are probably -counterproductive since they cannot support x86 code). If you have a CFM -plugin, continue to use the 1.0 SDK to build it. You will have to port to -Mach-O if you want to use 2.0 features. - -------------------------------------------------------------------------------- - RELEASE NOTES -------------------------------------------------------------------------------- - -This section contains per-release notes for the history of the X-Plane SDK. - -X-Plane SDK Release 2.1.3 11/14/13 - -Fixed XPC Wrappers to use int and intptr_t instead of long. This fixes -crashes for plugins on 64-bit Windows. - -X-Plane SDK Release 2.1.2 RC2 1/15/13 - -Removed headers from frameworks, as they don't work; updated README. - -X-Plane SDK Release 2.1.2 RC1 1/12/13 - -The 2.1.2 SDK adds frameworks for the XPLM and XPWidgets; Mac developers -can link directly against these frameworks and avoid unresolved symbols -and flat namespace problems. The frameworks produce plugins that will -work on X-Plane 8, 9, and 10 depending on the plugin CPU architecture, -minimum system SDK, and XPLM API revision number. - -X-Plane SDK Release 2.1.1 RC1 10/29/12 - -The 2.1.1 update to the SDK provides 64-bit build materials. - -X-Plane SDK Release 2.1.0 RC1 3/31/12 - -This is the first release of the version 2.1 X-Plane SDK. This version of the -SDK exposes new APIs. - -This API also replaces all references to "long" with int or intptr_t, -depending on whether the integer needs to be wide enough to hold coerced -pointers. Most of the time, int is used; the notable exception is the widgets -library where params and properties can contain pointers to user data. - -This change is not an ABI change - compiled plugins will work unmodified. -However for some compilers, you may need to replace long with int or intptr_t -in your code. - -X-Plane SDK Release 2.0.1 RC1 7/21/10 - -This release adds symbol visibility macros for GCC 4 on Linux and corrects a few -function documentation comments. - -X-Plane SDK Release 2.0 RC1 7/11/08 - -This release includes a corrected XPLM.lib for windows with exports for some of -the new 2.0 APIs. - -X-Plane SDK Release 2.0 Beta 2 4/23/08 - -This release includes new APIs for reading and writing data files and drawing -hooks for the local map screen, as well as some minor tweaks: - -- Sim version is 2.0 in the headers. -- unload plane msg marked as 2.0 only. -- New enumerations for additional languages. -- Function level docs improved. - -X-Plane SDK Release 2.0 Beta 1 1/19/08 - -This is the first release of the version 2.0 X-Plane SDK. CFM support has -been removed, and the license has been simplified, reflecting that it only has -to cover the SDK include/import lib files and not the sample code or examples. - -X-Plane SDK Release 1.0.2 1/5/05 - -The headers of the SDK are modified to support Kylix. No changes for Mac, -Windows, or C users. Headers now have SDK version numbers. - -X-Plane SDK Release 1.0.1 12/29/04 - -The headers of this SDK are modified to support Linux complication. No changes -for Mac and Windows users. - -X-Plane SDK Release Candidate 1 - -Only one slight change in the enums: the enum xpProperty_SubWindowHasCloseBoxes -in XPStandardWidgets.h has been changed to xpProperty_MainWindowHasCloseBoxes. -Its value has not been changed, so you will need to search-and-replace your code -when using this version of the SDK, but already-compiled plugins will experience -no different operation. - -The documentation has been revised for all headers to revise changes made to the -SDK over the course of beta. - -X-Plane SDK Beta 5 - -This version of the SDK features a number of enumeration changes to reflect the -X-Plane interface more correctly. This became crucial when X-Plane 7's new user -interface was released. With X-Plane in release candidates hopefully beta 5 of -the SDK could be the last one. Please see: - -www.xsquawkbox.net/xpsdk/newui.html - -For a comprehensive description of all the enumeration changes. For most -plugins (no developers reported using the deprecated enumerations), a simple -search and replace should suffice. Plugins compiled against the beta 4 SDK that -do not use now-unsupported graphics will continue to work correctly. - -X-Plane SDK Beta 4 - -This release corrects two problems with the Pascal headers: function pointer -types are now declared cdecl (since this is how the SDK calls them), and the -import library for the widget callbacks is now XPWIDGETS.DLL as it should be. - -X-Plane SDK Beta 3 - -This release finally features full documentation and a stable widgets API, as -well as a few other minor bug fixes. - -Starting with beta 3, the DLLs necessary to run plugins ship with X-Plane 660. -The SDK will work with X-Plane 660 RC3 and later. The XPWidgets DLL now lives -in the Resources/plugins folder. - -Starting with beta 3, extra plugins, documentation, sample code, and sample -projects are now featured directly on the web in the new X-Plane SDK library. -They are not included in the SDK zip file; the zip file only contains headers -and lib files for the SDK. - -X-Plane SDK Beta 2 - -You must recompile your plugin for the beta 2 plugin SDK! Plugins compiled -against the beta 1 SDK will not work with X-Plane 660 or the new XPLM.DLL. - -A huge number of data refs have been added. Unfortunately the documentation -is thin. Use the data ref tester plugin to view the data refs in real time -and find what you need. - -The data ref APIs have also changed to allow for arrays of integers as well -as floats. Some sim variables are now arrays that were previously many -individual items. - -A new drawing phase is available for replacing aircraft graphics. The -texturing APIs in XPLMGraphics have been revised. The most notable change is -that you cannot use the SDK to load your textures. (This functionality was -broken and never worked in beta 1.) See the x-plane-dev list for sample code -on how to load your own bitmaps. - -X-Plane can reload plugins on the fly. Use the Plugin Enabler plugin to reload -your plugin. On the Mac you can throw the old DLL in the trash and put a new -one in its place to reload a new version of the plugin. On the PC, an alert -comes up; while this alert is up you can swap your plugins' DLL. This allows -you to recompile your plugin without rebooting the sim. - -Delphi Pascal interfaces and sample code are in the SDK. Thanks to Billy -Verreynne for his hard work on this. - diff --git a/src/XPSDK301/license.txt b/src/XPSDK301/license.txt deleted file mode 100644 index 8b9cbfce..00000000 --- a/src/XPSDK301/license.txt +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2008, Sandy Barbour and Ben Supnik -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Neither the names of the authors nor that of X-Plane or Laminar Research - may be used to endorse or promote products derived from this software - without specific prior written permission from the authors or - Laminar Research, respectively. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. From 604f61ae0aa3f9a91f297f845ea3350da835ddb0 Mon Sep 17 00:00:00 2001 From: sparker256 Date: Sat, 6 Nov 2021 12:46:42 -0400 Subject: [PATCH 2/8] Add new SDK --- src/SDK/CHeaders/Widgets/XPStandardWidgets.h | 556 +++++++ src/SDK/CHeaders/Widgets/XPUIGraphics.h | 354 ++++ src/SDK/CHeaders/Widgets/XPWidgetDefs.h | 472 ++++++ src/SDK/CHeaders/Widgets/XPWidgetUtils.h | 232 +++ src/SDK/CHeaders/Widgets/XPWidgets.h | 538 ++++++ src/SDK/CHeaders/Wrappers/XPCBroadcaster.cpp | 56 + src/SDK/CHeaders/Wrappers/XPCBroadcaster.h | 38 + src/SDK/CHeaders/Wrappers/XPCDisplay.cpp | 104 ++ src/SDK/CHeaders/Wrappers/XPCDisplay.h | 73 + src/SDK/CHeaders/Wrappers/XPCListener.cpp | 27 + src/SDK/CHeaders/Wrappers/XPCListener.h | 36 + src/SDK/CHeaders/Wrappers/XPCProcessing.cpp | 52 + src/SDK/CHeaders/Wrappers/XPCProcessing.h | 37 + src/SDK/CHeaders/Wrappers/XPCWidget.cpp | 123 ++ src/SDK/CHeaders/Wrappers/XPCWidget.h | 84 + .../Wrappers/XPCWidgetAttachments.cpp | 267 +++ .../CHeaders/Wrappers/XPCWidgetAttachments.h | 146 ++ src/SDK/CHeaders/XPLM/XPLMCamera.h | 167 ++ src/SDK/CHeaders/XPLM/XPLMDataAccess.h | 716 ++++++++ src/SDK/CHeaders/XPLM/XPLMDefs.h | 514 ++++++ src/SDK/CHeaders/XPLM/XPLMDisplay.h | 1477 +++++++++++++++++ src/SDK/CHeaders/XPLM/XPLMGraphics.h | 437 +++++ src/SDK/CHeaders/XPLM/XPLMInstance.h | 136 ++ src/SDK/CHeaders/XPLM/XPLMMap.h | 631 +++++++ src/SDK/CHeaders/XPLM/XPLMMenus.h | 290 ++++ src/SDK/CHeaders/XPLM/XPLMNavigation.h | 362 ++++ src/SDK/CHeaders/XPLM/XPLMPlanes.h | 287 ++++ src/SDK/CHeaders/XPLM/XPLMPlugin.h | 422 +++++ src/SDK/CHeaders/XPLM/XPLMProcessing.h | 264 +++ src/SDK/CHeaders/XPLM/XPLMScenery.h | 450 +++++ src/SDK/CHeaders/XPLM/XPLMUtilities.h | 970 +++++++++++ src/SDK/Delphi/Widgets/XPStandardWidgets.pas | 470 ++++++ src/SDK/Delphi/Widgets/XPUIGraphics.pas | 342 ++++ src/SDK/Delphi/Widgets/XPWidgetDefs.pas | 427 +++++ src/SDK/Delphi/Widgets/XPWidgetUtils.pas | 197 +++ src/SDK/Delphi/Widgets/XPWidgets.pas | 527 ++++++ src/SDK/Delphi/XPLM/XPLMCamera.pas | 155 ++ src/SDK/Delphi/XPLM/XPLMDataAccess.pas | 690 ++++++++ src/SDK/Delphi/XPLM/XPLMDefs.pas | 438 +++++ src/SDK/Delphi/XPLM/XPLMDisplay.pas | 1452 ++++++++++++++++ src/SDK/Delphi/XPLM/XPLMGraphics.pas | 424 +++++ src/SDK/Delphi/XPLM/XPLMInstance.pas | 125 ++ src/SDK/Delphi/XPLM/XPLMMap.pas | 611 +++++++ src/SDK/Delphi/XPLM/XPLMMenus.pas | 277 ++++ src/SDK/Delphi/XPLM/XPLMNavigation.pas | 350 ++++ src/SDK/Delphi/XPLM/XPLMPlanes.pas | 278 ++++ src/SDK/Delphi/XPLM/XPLMPlugin.pas | 413 +++++ src/SDK/Delphi/XPLM/XPLMProcessing.pas | 254 +++ src/SDK/Delphi/XPLM/XPLMScenery.pas | 434 +++++ src/SDK/Delphi/XPLM/XPLMUtilities.pas | 951 +++++++++++ src/SDK/Libraries/Mac/XPLM.framework/XPLM | Bin 0 -> 214288 bytes .../Mac/XPWidgets.framework/XPWidgets | Bin 0 -> 48768 bytes src/SDK/Libraries/Win/XPLM_64.lib | Bin 0 -> 49542 bytes src/SDK/Libraries/Win/XPWidgets_64.lib | Bin 0 -> 10830 bytes src/SDK/README.txt | 197 +++ src/SDK/license.txt | 27 + 56 files changed, 19357 insertions(+) create mode 100755 src/SDK/CHeaders/Widgets/XPStandardWidgets.h create mode 100755 src/SDK/CHeaders/Widgets/XPUIGraphics.h create mode 100755 src/SDK/CHeaders/Widgets/XPWidgetDefs.h create mode 100755 src/SDK/CHeaders/Widgets/XPWidgetUtils.h create mode 100755 src/SDK/CHeaders/Widgets/XPWidgets.h create mode 100755 src/SDK/CHeaders/Wrappers/XPCBroadcaster.cpp create mode 100755 src/SDK/CHeaders/Wrappers/XPCBroadcaster.h create mode 100755 src/SDK/CHeaders/Wrappers/XPCDisplay.cpp create mode 100755 src/SDK/CHeaders/Wrappers/XPCDisplay.h create mode 100755 src/SDK/CHeaders/Wrappers/XPCListener.cpp create mode 100755 src/SDK/CHeaders/Wrappers/XPCListener.h create mode 100755 src/SDK/CHeaders/Wrappers/XPCProcessing.cpp create mode 100755 src/SDK/CHeaders/Wrappers/XPCProcessing.h create mode 100755 src/SDK/CHeaders/Wrappers/XPCWidget.cpp create mode 100755 src/SDK/CHeaders/Wrappers/XPCWidget.h create mode 100755 src/SDK/CHeaders/Wrappers/XPCWidgetAttachments.cpp create mode 100755 src/SDK/CHeaders/Wrappers/XPCWidgetAttachments.h create mode 100755 src/SDK/CHeaders/XPLM/XPLMCamera.h create mode 100755 src/SDK/CHeaders/XPLM/XPLMDataAccess.h create mode 100755 src/SDK/CHeaders/XPLM/XPLMDefs.h create mode 100755 src/SDK/CHeaders/XPLM/XPLMDisplay.h create mode 100755 src/SDK/CHeaders/XPLM/XPLMGraphics.h create mode 100644 src/SDK/CHeaders/XPLM/XPLMInstance.h create mode 100644 src/SDK/CHeaders/XPLM/XPLMMap.h create mode 100755 src/SDK/CHeaders/XPLM/XPLMMenus.h create mode 100755 src/SDK/CHeaders/XPLM/XPLMNavigation.h create mode 100755 src/SDK/CHeaders/XPLM/XPLMPlanes.h create mode 100755 src/SDK/CHeaders/XPLM/XPLMPlugin.h create mode 100755 src/SDK/CHeaders/XPLM/XPLMProcessing.h create mode 100644 src/SDK/CHeaders/XPLM/XPLMScenery.h create mode 100755 src/SDK/CHeaders/XPLM/XPLMUtilities.h create mode 100755 src/SDK/Delphi/Widgets/XPStandardWidgets.pas create mode 100755 src/SDK/Delphi/Widgets/XPUIGraphics.pas create mode 100755 src/SDK/Delphi/Widgets/XPWidgetDefs.pas create mode 100755 src/SDK/Delphi/Widgets/XPWidgetUtils.pas create mode 100755 src/SDK/Delphi/Widgets/XPWidgets.pas create mode 100755 src/SDK/Delphi/XPLM/XPLMCamera.pas create mode 100755 src/SDK/Delphi/XPLM/XPLMDataAccess.pas create mode 100755 src/SDK/Delphi/XPLM/XPLMDefs.pas create mode 100755 src/SDK/Delphi/XPLM/XPLMDisplay.pas create mode 100755 src/SDK/Delphi/XPLM/XPLMGraphics.pas create mode 100644 src/SDK/Delphi/XPLM/XPLMInstance.pas create mode 100644 src/SDK/Delphi/XPLM/XPLMMap.pas create mode 100755 src/SDK/Delphi/XPLM/XPLMMenus.pas create mode 100755 src/SDK/Delphi/XPLM/XPLMNavigation.pas create mode 100755 src/SDK/Delphi/XPLM/XPLMPlanes.pas create mode 100755 src/SDK/Delphi/XPLM/XPLMPlugin.pas create mode 100755 src/SDK/Delphi/XPLM/XPLMProcessing.pas create mode 100644 src/SDK/Delphi/XPLM/XPLMScenery.pas create mode 100755 src/SDK/Delphi/XPLM/XPLMUtilities.pas create mode 100755 src/SDK/Libraries/Mac/XPLM.framework/XPLM create mode 100755 src/SDK/Libraries/Mac/XPWidgets.framework/XPWidgets create mode 100644 src/SDK/Libraries/Win/XPLM_64.lib create mode 100644 src/SDK/Libraries/Win/XPWidgets_64.lib create mode 100644 src/SDK/README.txt create mode 100644 src/SDK/license.txt diff --git a/src/SDK/CHeaders/Widgets/XPStandardWidgets.h b/src/SDK/CHeaders/Widgets/XPStandardWidgets.h new file mode 100755 index 00000000..42d49876 --- /dev/null +++ b/src/SDK/CHeaders/Widgets/XPStandardWidgets.h @@ -0,0 +1,556 @@ +#ifndef _XPStandardWidgets_h_ +#define _XPStandardWidgets_h_ + +/* + * Copyright 2005-2012 Sandy Barbour and Ben Supnik All rights reserved. See + * license.txt for usage. X-Plane SDK Version: 2.1.1 + * + */ + +/*************************************************************************** + * XPStandardWidgets + ***************************************************************************/ +/* + * ## THEORY OF OPERATION + * + * The standard widgets are widgets built into the widgets library. While you + * can gain access to the widget function that drives them, you generally use + * them by calling XPCreateWidget and then listening for special messages, + * etc. + * + * The standard widgets often send mesages to themselves when the user + * performs an event; these messages are sent up the widget hierarchy until + * they are handled. So you can add a widget proc directly to a push button + * (for example) to intercept the message when it is clicked, or you can put + * one widget proc on a window for all of the push buttons in the window. Most + * of these messages contain the original widget ID as a parameter so you can + * know which widget is messaging no matter who it is sent to. + * + */ + +#include "XPWidgetDefs.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/*************************************************************************** + * MAIN WINDOW + ***************************************************************************/ +/* + * The main window widget class provides a "window" as the user knows it. + * These windows are dragable and can be selected. Use them to create floating + * windows and non-modal dialogs. + * + */ + + +#define xpWidgetClass_MainWindow 1 + +/* + * Main Window Type Values + * + * These type values are used to control the appearance of a main window. + * + */ +enum { + /* The standard main window; pin stripes on XP7, metal frame on XP 6. */ + xpMainWindowStyle_MainWindow = 0, + + /* A translucent dark gray window, like the one ATC messages appear in. */ + xpMainWindowStyle_Translucent = 1, + + +}; + +/* + * Main Window Properties + * + */ +enum { + /* This property specifies the type of window. Set to one of the main window * + * types above. */ + xpProperty_MainWindowType = 1100, + + /* This property specifies whether the main window has close boxes in its * + * corners. */ + xpProperty_MainWindowHasCloseBoxes = 1200, + + +}; + +/* + * MainWindow Messages + * + */ +enum { + /* This message is sent when the close buttons are pressed for your window. */ + xpMessage_CloseButtonPushed = 1200, + + +}; + +/*************************************************************************** + * SUB WINDOW + ***************************************************************************/ +/* + * X-Plane dialogs are divided into separate areas; the sub window widgets + * allow you to make these areas. Create one main window and place several + * subwindows inside it. Then place your controls inside the subwindows. + * + */ + + +#define xpWidgetClass_SubWindow 2 + +/* + * SubWindow Type Values + * + * These values control the appearance of the subwindow. + * + */ +enum { + /* A panel that sits inside a main window. */ + xpSubWindowStyle_SubWindow = 0, + + /* A screen that sits inside a panel for showing text information. */ + xpSubWindowStyle_Screen = 2, + + /* A list view for scrolling lists. */ + xpSubWindowStyle_ListView = 3, + + +}; + +/* + * SubWindow Properties + * + */ +enum { + /* This property specifies the type of window. Set to one of the subwindow * + * types above. */ + xpProperty_SubWindowType = 1200, + + +}; + +/*************************************************************************** + * BUTTON + ***************************************************************************/ +/* + * The button class provides a number of different button styles and + * behaviors, including push buttons, radio buttons, check boxes, etc. The + * button label appears on or next to the button depending on the button's + * appearance, or type. + * + * The button's behavior is a separate property that dictates who it hilights + * and what kinds of messages it sends. Since behavior and type are different, + * you can do strange things like make check boxes that act as push buttons or + * push buttons with radio button behavior. + * + * In X-Plane 6 there were no check box graphics. The result is the following + * behavior: in X-Plane + * 6 all check box and radio buttons are round (radio-button style) buttons; + * in X-Plane 7 they are all square (check-box style) buttons. In a future + * version of X-Plane, the xpButtonBehavior enums will provide the correct + * graphic (check box or radio button) giving the expected result. + * + */ + + +#define xpWidgetClass_Button 3 + +/* + * Button Types + * + * These define the visual appearance of buttons but not how they respond to + * the mouse. + * + */ +enum { + /* This is a standard push button, like an 'OK' or 'Cancel' button in a dialog* + * box. */ + xpPushButton = 0, + + /* A check box or radio button. Use this and the button behaviors below to * + * get the desired behavior. */ + xpRadioButton = 1, + + /* A window close box. */ + xpWindowCloseBox = 3, + + /* A small down arrow. */ + xpLittleDownArrow = 5, + + /* A small up arrow. */ + xpLittleUpArrow = 6, + + +}; + +/* + * Button Behavior Values + * + * These define how the button responds to mouse clicks. + * + */ +enum { + /* Standard push button behavior. The button hilites while the mouse is * + * clicked over it and unhilites when the mouse is moved outside of it or * + * released. If the mouse is released over the button, the * + * xpMsg_PushButtonPressed message is sent. */ + xpButtonBehaviorPushButton = 0, + + /* Check box behavior. The button immediately toggles its value when the mouse* + * is clicked and sends out a xpMsg_ButtonStateChanged message. */ + xpButtonBehaviorCheckBox = 1, + + /* Radio button behavior. The button immediately sets its state to one and * + * sends out a xpMsg_ButtonStateChanged message if it was not already set to * + * one. You must turn off other radio buttons in a group in your code. */ + xpButtonBehaviorRadioButton = 2, + + +}; + +/* + * Button Properties + * + */ +enum { + /* This property sets the visual type of button. Use one of the button types * + * above. */ + xpProperty_ButtonType = 1300, + + /* This property sets the button's behavior. Use one of the button behaviors * + * above. */ + xpProperty_ButtonBehavior = 1301, + + /* This property tells whether a check box or radio button is "checked" or * + * not. Not used for push buttons. */ + xpProperty_ButtonState = 1302, + + +}; + +/* + * Button Messages + * + * These messages are sent by the button to itself and then up the widget + * chain when the button is clicked. (You may intercept them by providing a + * widget handler for the button itself or by providing a handler in a parent + * widget.) + * + */ +enum { + /* This message is sent when the user completes a click and release in a * + * button with push button behavior. Parameter one of the message is the * + * widget ID of the button. This message is dispatched up the widget * + * hierarchy. */ + xpMsg_PushButtonPressed = 1300, + + /* This message is sent when a button is clicked that has radio button or * + * check box behavior and its value changes. (Note that if the value changes * + * by setting a property you do not receive this message!) Parameter one is * + * the widget ID of the button, parameter 2 is the new state value, either * + * zero or one. This message is dispatched up the widget hierarchy. */ + xpMsg_ButtonStateChanged = 1301, + + +}; + +/*************************************************************************** + * TEXT FIELD + ***************************************************************************/ +/* + * The text field widget provides an editable text field including mouse + * selection and keyboard navigation. The contents of the text field are its + * descriptor. (The descriptor changes as the user types.) + * + * The text field can have a number of types, that effect the visual layout of + * the text field. The text field sends messages to itself so you may control + * its behavior. + * + * If you need to filter keystrokes, add a new handler and intercept the key + * press message. Since key presses are passed by pointer, you can modify the + * keystroke and pass it through to the text field widget. + * + * WARNING: in X-Plane before 7.10 (including 6.70) null characters could + * crash X-Plane. To prevent this, wrap this object with a filter function + * (more instructions can be found on the SDK website). + * + */ + + +#define xpWidgetClass_TextField 4 + +/* + * Text Field Type Values + * + * These control the look of the text field. + * + */ +enum { + /* A field for text entry. */ + xpTextEntryField = 0, + + /* A transparent text field. The user can type and the text is drawn, but no * + * background is drawn. You can draw your own background by adding a widget * + * handler and prehandling the draw message. */ + xpTextTransparent = 3, + + /* A translucent edit field, dark gray. */ + xpTextTranslucent = 4, + + +}; + +/* + * Text Field Properties + * + */ +enum { + /* This is the character position the selection starts at, zero based. If it * + * is the same as the end insertion point, the insertion point is not a * + * selection. */ + xpProperty_EditFieldSelStart = 1400, + + /* This is the character position of the end of the selection. */ + xpProperty_EditFieldSelEnd = 1401, + + /* This is the character position a drag was started at if the user is * + * dragging to select text, or -1 if a drag is not in progress. */ + xpProperty_EditFieldSelDragStart = 1402, + + /* This is the type of text field to display, from the above list. */ + xpProperty_TextFieldType = 1403, + + /* Set this property to 1 to password protect the field. Characters will be * + * drawn as *s even though the descriptor will contain plain-text. */ + xpProperty_PasswordMode = 1404, + + /* The max number of characters you can enter, if limited. Zero means * + * unlimited. */ + xpProperty_MaxCharacters = 1405, + + /* The first visible character on the left. This effectively scrolls the text* + * field. */ + xpProperty_ScrollPosition = 1406, + + /* The font to draw the field's text with. (An XPLMFontID.) */ + xpProperty_Font = 1407, + + /* This is the active side of the insert selection. (Internal) */ + xpProperty_ActiveEditSide = 1408, + + +}; + +/* + * Text Field Messages + * + */ +enum { + /* The text field sends this message to itself when its text changes. It sends* + * the message up the call chain; param1 is the text field's widget ID. */ + xpMsg_TextFieldChanged = 1400, + + +}; + +/*************************************************************************** + * SCROLL BAR + ***************************************************************************/ +/* + * A standard scroll bar or slider control. The scroll bar has a minimum, + * maximum and current value that is updated when the user drags it. The + * scroll bar sends continuous messages as it is dragged. + * + */ + + +#define xpWidgetClass_ScrollBar 5 + +/* + * Scroll Bar Type Values + * + * This defines how the scroll bar looks. + * + */ +enum { + /* A standard X-Plane scroll bar (with arrows on the ends). */ + xpScrollBarTypeScrollBar = 0, + + /* A slider, no arrows. */ + xpScrollBarTypeSlider = 1, + + +}; + +/* + * Scroll Bar Properties + * + */ +enum { + /* The current position of the thumb (in between the min and max, inclusive) */ + xpProperty_ScrollBarSliderPosition = 1500, + + /* The value the scroll bar has when the thumb is in the lowest position. */ + xpProperty_ScrollBarMin = 1501, + + /* The value the scroll bar has when the thumb is in the highest position. */ + xpProperty_ScrollBarMax = 1502, + + /* How many units to move the scroll bar when clicking next to the thumb. The * + * scroll bar always moves one unit when the arrows are clicked. */ + xpProperty_ScrollBarPageAmount = 1503, + + /* The type of scrollbar from the enums above. */ + xpProperty_ScrollBarType = 1504, + + /* Used internally. */ + xpProperty_ScrollBarSlop = 1505, + + +}; + +/* + * Scroll Bar Messages + * + */ +enum { + /* The scroll bar sends this message when the slider position changes. It * + * sends the message up the call chain; param1 is the Scroll Bar widget ID. */ + xpMsg_ScrollBarSliderPositionChanged = 1500, + + +}; + +/*************************************************************************** + * CAPTION + ***************************************************************************/ +/* + * A caption is a simple widget that shows its descriptor as a string, useful + * for labeling parts of a window. It always shows its descriptor as its + * string and is otherwise transparent. + * + */ + + +#define xpWidgetClass_Caption 6 + +/* + * Caption Properties + * + */ +enum { + /* This property specifies whether the caption is lit; use lit captions * + * against screens. */ + xpProperty_CaptionLit = 1600, + + +}; + +/*************************************************************************** + * GENERAL GRAPHICS + ***************************************************************************/ +/* + * The general graphics widget can show one of many icons available from + * X-Plane. + * + */ + + +#define xpWidgetClass_GeneralGraphics 7 + +/* + * General Graphics Types Values + * + * These define the icon for the general graphics. + * + */ +enum { + xpShip = 4, + + xpILSGlideScope = 5, + + xpMarkerLeft = 6, + + xp_Airport = 7, + + xpNDB = 8, + + xpVOR = 9, + + xpRadioTower = 10, + + xpAircraftCarrier = 11, + + xpFire = 12, + + xpMarkerRight = 13, + + xpCustomObject = 14, + + xpCoolingTower = 15, + + xpSmokeStack = 16, + + xpBuilding = 17, + + xpPowerLine = 18, + + xpVORWithCompassRose = 19, + + xpOilPlatform = 21, + + xpOilPlatformSmall = 22, + + xpWayPoint = 23, + + +}; + +/* + * General Graphics Properties + * + */ +enum { + /* This property controls the type of icon that is drawn. */ + xpProperty_GeneralGraphicsType = 1700, + + +}; + +/*************************************************************************** + * PROGRESS INDICATOR + ***************************************************************************/ +/* + * This widget implements a progress indicator as seen when X-Plane starts up. + * + */ + +#define xpWidgetClass_Progress 8 + +/* + * Progress Indicator Properties + * + */ +enum { + /* This is the current value of the progress indicator. */ + xpProperty_ProgressPosition = 1800, + + /* This is the minimum value, equivalent to 0% filled. */ + xpProperty_ProgressMin = 1801, + + /* This is the maximum value, equivalent to 100% filled. */ + xpProperty_ProgressMax = 1802, + + +}; + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/SDK/CHeaders/Widgets/XPUIGraphics.h b/src/SDK/CHeaders/Widgets/XPUIGraphics.h new file mode 100755 index 00000000..b70e0f65 --- /dev/null +++ b/src/SDK/CHeaders/Widgets/XPUIGraphics.h @@ -0,0 +1,354 @@ +#ifndef _XPUIGraphics_h_ +#define _XPUIGraphics_h_ + +/* + * Copyright 2005-2012 Sandy Barbour and Ben Supnik All rights reserved. See + * license.txt for usage. X-Plane SDK Version: 2.1.1 + * + */ + +/*************************************************************************** + * XPUIGraphics + ***************************************************************************/ + +#include "XPWidgetDefs.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/*************************************************************************** + * UI GRAPHICS + ***************************************************************************/ + +/* + * XPWindowStyle + * + * There are a few built-in window styles in X-Plane that you can use. + * + * Note that X-Plane 6 does not offer real shadow-compositing; you must make + * sure to put a window on top of another window of the right style to the + * shadows work, etc. This applies to elements with insets and shadows. The + * rules are: + * + * Sub windows must go on top of main windows, and screens and list views on + * top of subwindows. Only help and main windows can be over the main screen. + * + * With X-Plane 7 any window or element may be placed over any other element. + * + * Some windows are scaled by stretching, some by repeating. The drawing + * routines know which scaling method to use. The list view cannot be rescaled + * in X-Plane 6 because it has both a repeating pattern and a gradient in one + * element. All other elements can be rescaled. + * + */ +enum { + /* An LCD screen that shows help. */ + xpWindow_Help = 0, + + /* A dialog box window. */ + xpWindow_MainWindow = 1, + + /* A panel or frame within a dialog box window. */ + xpWindow_SubWindow = 2, + + /* An LCD screen within a panel to hold text displays. */ + xpWindow_Screen = 4, + + /* A list view within a panel for scrolling file names, etc. */ + xpWindow_ListView = 5, + + +}; +typedef int XPWindowStyle; + +/* + * XPDrawWindow + * + * This routine draws a window of the given dimensions at the given offset on + * the virtual screen in a given style. The window is automatically scaled as + * appropriate using a bitmap scaling technique (scaling or repeating) as + * appropriate to the style. + * + */ +WIDGET_API void XPDrawWindow( + int inX1, + int inY1, + int inX2, + int inY2, + XPWindowStyle inStyle); + +/* + * XPGetWindowDefaultDimensions + * + * This routine returns the default dimensions for a window. Output is either + * a minimum or fixed value depending on whether the window is scalable. + * + */ +WIDGET_API void XPGetWindowDefaultDimensions( + XPWindowStyle inStyle, + int * outWidth, /* Can be NULL */ + int * outHeight); /* Can be NULL */ + +/* + * XPElementStyle + * + * Elements are individually drawable UI things like push buttons, etc. The + * style defines what kind of element you are drawing. Elements can be + * stretched in one or two dimensions (depending on the element). Some + * elements can be lit. + * + * In X-Plane 6 some elements must be drawn over metal. Some are scalable and + * some are not. Any element can be drawn anywhere in X-Plane 7. + * + * Scalable Axis Required Background + * + */ +enum { + /* x metal */ + xpElement_TextField = 6, + + /* none metal */ + xpElement_CheckBox = 9, + + /* none metal */ + xpElement_CheckBoxLit = 10, + + /* none window header */ + xpElement_WindowCloseBox = 14, + + /* none window header */ + xpElement_WindowCloseBoxPressed = 15, + + /* x metal */ + xpElement_PushButton = 16, + + /* x metal */ + xpElement_PushButtonLit = 17, + + /* none any */ + xpElement_OilPlatform = 24, + + /* none any */ + xpElement_OilPlatformSmall = 25, + + /* none any */ + xpElement_Ship = 26, + + /* none any */ + xpElement_ILSGlideScope = 27, + + /* none any */ + xpElement_MarkerLeft = 28, + + /* none any */ + xpElement_Airport = 29, + + /* none any */ + xpElement_Waypoint = 30, + + /* none any */ + xpElement_NDB = 31, + + /* none any */ + xpElement_VOR = 32, + + /* none any */ + xpElement_RadioTower = 33, + + /* none any */ + xpElement_AircraftCarrier = 34, + + /* none any */ + xpElement_Fire = 35, + + /* none any */ + xpElement_MarkerRight = 36, + + /* none any */ + xpElement_CustomObject = 37, + + /* none any */ + xpElement_CoolingTower = 38, + + /* none any */ + xpElement_SmokeStack = 39, + + /* none any */ + xpElement_Building = 40, + + /* none any */ + xpElement_PowerLine = 41, + + /* none metal */ + xpElement_CopyButtons = 45, + + /* none metal */ + xpElement_CopyButtonsWithEditingGrid = 46, + + /* x, y metal */ + xpElement_EditingGrid = 47, + + /* THIS CAN PROBABLY BE REMOVED */ + xpElement_ScrollBar = 48, + + /* none any */ + xpElement_VORWithCompassRose = 49, + + /* none metal */ + xpElement_Zoomer = 51, + + /* x, y metal */ + xpElement_TextFieldMiddle = 52, + + /* none metal */ + xpElement_LittleDownArrow = 53, + + /* none metal */ + xpElement_LittleUpArrow = 54, + + /* none metal */ + xpElement_WindowDragBar = 61, + + /* none metal */ + xpElement_WindowDragBarSmooth = 62, + + +}; +typedef int XPElementStyle; + +/* + * XPDrawElement + * + * XPDrawElement draws a given element at an offset on the virtual screen in + * set dimensions. + * *Even* if the element is not scalable, it will be scaled if the width and + * height do not match the preferred dimensions; it'll just look ugly. Pass + * inLit to see the lit version of the element; if the element cannot be lit + * this is ignored. + * + */ +WIDGET_API void XPDrawElement( + int inX1, + int inY1, + int inX2, + int inY2, + XPElementStyle inStyle, + int inLit); + +/* + * XPGetElementDefaultDimensions + * + * This routine returns the recommended or minimum dimensions of a given UI + * element. outCanBeLit tells whether the element has both a lit and unlit + * state. Pass `NULL` to not receive any of these parameters. + * + */ +WIDGET_API void XPGetElementDefaultDimensions( + XPElementStyle inStyle, + int * outWidth, /* Can be NULL */ + int * outHeight, /* Can be NULL */ + int * outCanBeLit); /* Can be NULL */ + +/* + * XPTrackStyle + * + * A track is a UI element that displays a value vertically or horizontally. + * X-Plane has three kinds of tracks: scroll bars, sliders, and progress bars. + * Tracks can be displayed either horizontally or vertically; tracks will + * choose their own layout based on the larger dimension of their dimensions + * (e.g. they know if they are tall or wide). Sliders may be lit or unlit + * (showing the user manipulating them). + * + * - ScrollBar: this is a standard scroll bar with arrows and a thumb to drag. + * - Slider: this is a simple track with a ball in the middle that can be + * slid. + * - Progress: this is a progress indicator showing how a long task is going. + * + */ +enum { + /* not over metal can be lit can be rotated */ + xpTrack_ScrollBar = 0, + + /* over metal can be lit can be rotated */ + xpTrack_Slider = 1, + + /* over metal cannot be lit cannot be rotated */ + xpTrack_Progress = 2, + + +}; +typedef int XPTrackStyle; + +/* + * XPDrawTrack + * + * This routine draws a track. You pass in the track dimensions and size; the + * track picks the optimal orientation for these dimensions. Pass in the + * track's minimum current and maximum values; the indicator will be + * positioned appropriately. You can also specify whether the track is lit or + * not. + * + */ +WIDGET_API void XPDrawTrack( + int inX1, + int inY1, + int inX2, + int inY2, + int inMin, + int inMax, + int inValue, + XPTrackStyle inTrackStyle, + int inLit); + +/* + * XPGetTrackDefaultDimensions + * + * This routine returns a track's default smaller dimension; all tracks are + * scalable in the larger dimension. It also returns whether a track can be + * lit. + * + */ +WIDGET_API void XPGetTrackDefaultDimensions( + XPTrackStyle inStyle, + int * outWidth, + int * outCanBeLit); + +/* + * XPGetTrackMetrics + * + * This routine returns the metrics of a track. If you want to write UI code + * to manipulate a track, this routine helps you know where the mouse + * locations are. For most other elements, the rectangle the element is drawn + * in is enough information. However, the scrollbar drawing routine does some + * automatic placement; this routine lets you know where things ended up. You + * pass almost everything you would pass to the draw routine. You get out the + * orientation, and other useful stuff. + * + * Besides orientation, you get five dimensions for the five parts of a + * scrollbar, which are the down button, down area (area before the thumb), + * the thumb, and the up area and button. For horizontal scrollers, the left + * button decreases; for vertical scrollers, the top button decreases. + * + */ +WIDGET_API void XPGetTrackMetrics( + int inX1, + int inY1, + int inX2, + int inY2, + int inMin, + int inMax, + int inValue, + XPTrackStyle inTrackStyle, + int * outIsVertical, + int * outDownBtnSize, + int * outDownPageSize, + int * outThumbSize, + int * outUpPageSize, + int * outUpBtnSize); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/SDK/CHeaders/Widgets/XPWidgetDefs.h b/src/SDK/CHeaders/Widgets/XPWidgetDefs.h new file mode 100755 index 00000000..c1b2341f --- /dev/null +++ b/src/SDK/CHeaders/Widgets/XPWidgetDefs.h @@ -0,0 +1,472 @@ +#ifndef _XPWidgetDefs_h_ +#define _XPWidgetDefs_h_ + +/* + * Copyright 2005-2012 Sandy Barbour and Ben Supnik All rights reserved. See + * license.txt for usage. X-Plane SDK Version: 2.1.1 + * + */ + +/*************************************************************************** + * XPWidgetDefs + ***************************************************************************/ + +#include "XPLMDefs.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +#if APL + #if XPWIDGETS + #if __GNUC__ >= 4 + #define WIDGET_API __attribute__((visibility("default"))) + #elif __MACH__ + #define WIDGET_API + #else + #define WIDGET_API __declspec(dllexport) + #endif + #else + #define WIDGET_API + #endif +#elif IBM + #if XPWIDGETS + #define WIDGET_API __declspec(dllexport) + #else + #define WIDGET_API __declspec(dllimport) + #endif +#elif LIN + #if XPWIDGETS + #if __GNUC__ >= 4 + #define WIDGET_API __attribute__((visibility("default"))) + #else + #define WIDGET_API + #endif + #else + #define WIDGET_API + #endif +#else +#pragma error "Platform not defined!" +#endif + /*************************************************************************** + * WIDGET DEFINITIONS + ***************************************************************************/ +/* + * A widget is a call-back driven screen entity like a push-button, window, + * text entry field, etc. + * + * Use the widget API to create widgets of various classes. You can nest them + * into trees of widgets to create complex user interfaces. + * + */ + + +/* + * XPWidgetID + * + * A Widget ID is an opaque unique non-zero handle identifying your widget. + * Use 0 to specify "no widget". This type is defined as wide enough to hold a + * pointer. You receive a widget ID when you create a new widget and then use + * that widget ID to further refer to the widget. + * + */ +typedef void * XPWidgetID; + +/* + * XPWidgetPropertyID + * + * Properties are values attached to instances of your widgets. A property is + * identified by a 32-bit ID and its value is the width of a pointer. + * + * Each widget instance may have a property or not have it. When you set a + * property on a widget for the first time, the property is added to the + * widget; it then stays there for the life of the widget. + * + * Some property IDs are predefined by the widget package; you can make up + * your own property IDs as well. + * + */ +enum { + /* A window's refcon is an opaque value used by client code to find other data* + * based on it. */ + xpProperty_Refcon = 0, + + /* These properties are used by the utlities to implement dragging. */ + xpProperty_Dragging = 1, + + xpProperty_DragXOff = 2, + + xpProperty_DragYOff = 3, + + /* Is the widget hilited? (For widgets that support this kind of thing.) */ + xpProperty_Hilited = 4, + + /* Is there a C++ object attached to this widget? */ + xpProperty_Object = 5, + + /* If this property is 1, the widget package will use OpenGL to restrict * + * drawing to the Wiget's exposed rectangle. */ + xpProperty_Clip = 6, + + /* Is this widget enabled (for those that have a disabled state too)? */ + xpProperty_Enabled = 7, + + /* NOTE: Property IDs 1 - 999 are reserved for the widgets library. * + * * + * NOTE: Property IDs 1000 - 9999 are allocated to the standard widget classes* + * provided with the library. * + * * + * Properties 1000 - 1099 are for widget class 0, 1100 - 1199 for widget class* + * 1, etc. */ + xpProperty_UserStart = 10000, + + +}; +typedef int XPWidgetPropertyID; + +/* + * XPMouseState_t + * + * When the mouse is clicked or dragged, a pointer to this structure is passed + * to your widget function. + * + */ +typedef struct { + int x; + int y; + /* Mouse Button number, left = 0 (right button not yet supported. */ + int button; +#if defined(XPLM200) + /* Scroll wheel delta (button in this case would be the wheel axis number). */ + int delta; +#endif /* XPLM200 */ +} XPMouseState_t; + +/* + * XPKeyState_t + * + * When a key is pressed, a pointer to this struct is passed to your widget + * function. + * + */ +typedef struct { + /* The ASCII key that was pressed. WARNING: this may be 0 for some non-ASCII * + * key sequences. */ + char key; + /* The flags. Make sure to check this if you only want key-downs! */ + XPLMKeyFlags flags; + /* The virtual key code for the key */ + char vkey; +} XPKeyState_t; + +/* + * XPWidgetGeometryChange_t + * + * This structure contains the deltas for your widget's geometry when it + * changes. + * + */ +typedef struct { + int dx; + /* +Y = the widget moved up */ + int dy; + int dwidth; + int dheight; +} XPWidgetGeometryChange_t; + +/* + * XPDispatchMode + * + * The dispatching modes describe how the widgets library sends out messages. + * Currently there are three modes: + * + */ +enum { + /* The message will only be sent to the target widget. */ + xpMode_Direct = 0, + + /* The message is sent to the target widget, then up the chain of parents * + * until the message is handled or a parentless widget is reached. */ + xpMode_UpChain = 1, + + /* The message is sent to the target widget and then all of its children * + * recursively depth-first. */ + xpMode_Recursive = 2, + + /* The message is snet just to the target, but goes to every callback, even if* + * it is handled. */ + xpMode_DirectAllCallbacks = 3, + + /* The message is only sent to the very first handler even if it is not * + * accepted. (This is really only useful for some internal widget library * + * functions.) */ + xpMode_Once = 4, + + +}; +typedef int XPDispatchMode; + +/* + * XPWidgetClass + * + * Widget classes define predefined widget types. A widget class basically + * specifies from a library the widget function to be used for the widget. + * Most widgets can be made right from classes. + * + */ +typedef int XPWidgetClass; + +/* An unspecified widget class. Other widget classes are in * + * XPStandardWidgets.h */ +#define xpWidgetClass_None 0 + +/*************************************************************************** + * WIDGET MESSAGES + ***************************************************************************/ + +/* + * XPWidgetMessage + * + * Widgets receive 32-bit messages indicating what action is to be taken or + * notifications of events. The list of messages may be expanded. + * + */ +enum { + /* No message, should not be sent. */ + xpMsg_None = 0, + + /* The create message is sent once per widget that is created with your widget* + * function and once for any widget that has your widget function attached. * + * * + * Dispatching: Direct * + * * + * Param 1: 1 if you are being added as a subclass, 0 if the widget is first * + * being created. */ + xpMsg_Create = 1, + + /* The destroy message is sent once for each message that is destroyed that * + * has your widget function. * + * * + * Dispatching: Direct for all * + * * + * Param 1: 1 if being deleted by a recursive delete to the parent, 0 for * + * explicit deletion. */ + xpMsg_Destroy = 2, + + /* The paint message is sent to your widget to draw itself. The paint message * + * is the bare-bones message; in response you must draw yourself, draw your * + * children, set up clipping and culling, check for visibility, etc. If you * + * don't want to do all of this, ignore the paint message and a draw message * + * (see below) will be sent to you. * + * * + * Dispatching: Direct */ + xpMsg_Paint = 3, + + /* The draw message is sent to your widget when it is time to draw yourself. * + * OpenGL will be set up to draw in 2-d global screen coordinates, but you * + * should use the XPLM to set up OpenGL state. * + * * + * Dispatching: Direct */ + xpMsg_Draw = 4, + + /* The key press message is sent once per key that is pressed. The first * + * parameter is the type of key code (integer or char) and the second is the * + * code itself. By handling this event, you consume the key stroke. * + * * + * Handling this message 'consumes' the keystroke; not handling it passes it * + * to your parent widget. * + * * + * Dispatching: Up Chain * + * * + * Param 1: A pointer to an XPKeyState_t structure with the keystroke. */ + xpMsg_KeyPress = 5, + + /* Keyboard focus is being given to you. By handling this message you accept * + * keyboard focus. The first parameter will be one if a child of yours gave up* + * focus to you, 0 if someone set focus on you explicitly. * + * * + * Handling this message accepts focus; not handling refuses focus. * + * * + * Dispatching: direct * + * * + * Param 1: 1 if you are gaining focus because your child is giving it up, 0 * + * if someone is explicitly giving you focus. */ + xpMsg_KeyTakeFocus = 6, + + /* Keyboard focus is being taken away from you. The first parameter will be * + * one if you are losing focus because another widget is taking it, or 0 if * + * someone called the API to make you lose focus explicitly. * + * * + * Dispatching: Direct * + * * + * Param 1: 1 if focus is being taken by another widget, 0 if code requested * + * to remove focus. */ + xpMsg_KeyLoseFocus = 7, + + /* You receive one mousedown event per click with a mouse-state structure * + * pointed to by parameter 1, by accepting this you eat the click, otherwise * + * your parent gets it. You will not receive drag and mouse up messages if you* + * do not accept the down message. * + * * + * Handling this message consumes the mouse click, not handling it passes it * + * to the next widget. You can act 'transparent' as a window by never handling* + * moues clicks to certain areas. * + * * + * Dispatching: Up chain NOTE: Technically this is direct dispatched, but the * + * widgets library will shop it to each widget until one consumes the click, * + * making it effectively "up chain". * + * * + * Param 1: A pointer to an XPMouseState_t containing the mouse status. */ + xpMsg_MouseDown = 8, + + /* You receive a series of mouse drag messages (typically one per frame in the* + * sim) as the mouse is moved once you have accepted a mouse down message. * + * Parameter one points to a mouse-state structure describing the mouse * + * location. You will continue to receive these until the mouse button is * + * released. You may receive multiple mouse state messages with the same mouse* + * position. You will receive mouse drag events even if the mouse is dragged * + * out of your current or original bounds at the time of the mouse down. * + * * + * Dispatching: Direct * + * * + * Param 1: A pointer to an XPMouseState_t containing the mouse status. */ + xpMsg_MouseDrag = 9, + + /* The mouseup event is sent once when the mouse button is released after a * + * drag or click. You only receive this message if you accept the mouseDown * + * message. Parameter one points to a mouse state structure. * + * * + * Dispatching: Direct * + * * + * Param 1: A pointer to an XPMouseState_t containing the mouse status. */ + xpMsg_MouseUp = 10, + + /* Your geometry or a child's geometry is being changed. * + * * + * Dispatching: Up chain * + * * + * Param 1: The widget ID of the original reshaped target. * + * * + * Param 2: A pointer to a XPWidgetGeometryChange_t struct describing the * + * change. */ + xpMsg_Reshape = 11, + + /* Your exposed area has changed. * + * * + * Dispatching: Direct */ + xpMsg_ExposedChanged = 12, + + /* A child has been added to you. The child's ID is passed in parameter one. * + * * + * Dispatching: Direct * + * * + * Param 1: The Widget ID of the child being added. */ + xpMsg_AcceptChild = 13, + + /* A child has been removed from to you. The child's ID is passed in parameter* + * one. * + * * + * Dispatching: Direct * + * * + * Param 1: The Widget ID of the child being removed. */ + xpMsg_LoseChild = 14, + + /* You now have a new parent, or have no parent. The parent's ID is passed in,* + * or 0 for no parent. * + * * + * Dispatching: Direct * + * * + * Param 1: The Widget ID of your parent */ + xpMsg_AcceptParent = 15, + + /* You or a child has been shown. Note that this does not include you being * + * shown because your parent was shown, you were put in a new parent, your * + * root was shown, etc. * + * * + * Dispatching: Up chain * + * * + * Param 1: The widget ID of the shown widget. */ + xpMsg_Shown = 16, + + /* You have been hidden. See limitations above. * + * * + * Dispatching: Up chain * + * * + * Param 1: The widget ID of the hidden widget. */ + xpMsg_Hidden = 17, + + /* Your descriptor has changed. * + * * + * Dispatching: Direct */ + xpMsg_DescriptorChanged = 18, + + /* A property has changed. Param 1 contains the property ID. * + * * + * Dispatching: Direct * + * * + * Param 1: The Property ID being changed. * + * * + * Param 2: The new property value */ + xpMsg_PropertyChanged = 19, + +#if defined(XPLM200) + /* The mouse wheel has moved. * + * * + * Return 1 to consume the mouse wheel move, or 0 to pass the message to a * + * parent. Dispatching: Up chain * + * * + * Param 1: A pointer to an XPMouseState_t containing the mouse status. */ + xpMsg_MouseWheel = 20, + +#endif /* XPLM200 */ +#if defined(XPLM200) + /* The cursor is over your widget. If you consume this message, change the * + * XPLMCursorStatus value to indicate the desired result, with the same rules * + * as in XPLMDisplay.h. * + * * + * Return 1 to consume this message, 0 to pass it on. * + * * + * Dispatching: Up chain Param 1: A pointer to an XPMouseState_t struct * + * containing the mouse status. * + * * + * Param 2: A pointer to a XPLMCursorStatus - set this to the cursor result * + * you desire. */ + xpMsg_CursorAdjust = 21, + +#endif /* XPLM200 */ + /* NOTE: Message IDs 1000 - 9999 are allocated to the standard widget classes * + * provided with the library with 1000 - 1099 for widget class 0, 1100 - 1199 * + * for widget class 1, etc. Message IDs 10,000 and beyond are for plugin use. */ + xpMsg_UserStart = 10000, + + +}; +typedef int XPWidgetMessage; + +/*************************************************************************** + * WIDGET CALLBACK FUNCTION + ***************************************************************************/ + +/* + * XPWidgetFunc_t + * + * This function defines your custom widget's behavior. It will be called by + * the widgets library to send messages to your widget. The message and widget + * ID are passed in, as well as two ptr-width signed parameters whose meaning + * varies with the message. Return 1 to indicate that you have processed the + * message, 0 to indicate that you have not. For any message that is not + * understood, return 0. + * + */ +typedef int (* XPWidgetFunc_t)( + XPWidgetMessage inMessage, + XPWidgetID inWidget, + intptr_t inParam1, + intptr_t inParam2); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/SDK/CHeaders/Widgets/XPWidgetUtils.h b/src/SDK/CHeaders/Widgets/XPWidgetUtils.h new file mode 100755 index 00000000..ff757f79 --- /dev/null +++ b/src/SDK/CHeaders/Widgets/XPWidgetUtils.h @@ -0,0 +1,232 @@ +#ifndef _XPWidgetUtils_h_ +#define _XPWidgetUtils_h_ + +/* + * Copyright 2005-2012 Sandy Barbour and Ben Supnik All rights reserved. See + * license.txt for usage. X-Plane SDK Version: 2.1.1 + * + */ + +/*************************************************************************** + * XPWidgetUtils + ***************************************************************************/ +/* + * ## USAGE NOTES + * + * The XPWidgetUtils library contains useful functions that make writing and + * using widgets less of a pain. + * + * One set of functions are the widget behavior functions. These functions + * each add specific useful behaviors to widgets. They can be used in two + * manners: + * + * 1. You can add a widget behavior function to a widget as a callback proc + * using the XPAddWidgetCallback function. The widget will gain that + * behavior. Remember that the last function you add has highest priority. + * You can use this to change or augment the behavior of an existing + * finished widget. + * 2. You can call a widget function from inside your own widget function. + * This allows you to include useful behaviors in custom-built widgets. A + * number of the standard widgets get their behavior from this library. To + * do this, call the behavior function from your function first. If it + * returns 1, that means it handled the event and you don't need to; simply + * return 1. + * + */ + +#include "XPWidgetDefs.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/*************************************************************************** + * GENERAL UTILITIES + ***************************************************************************/ + + + +/* + * Convenience accessors + * + * It can be clumsy accessing the variables passed in by pointer to a struct + * for mouse and reshape messages; these accessors let you simply pass in the param + * right from the arguments of your widget proc and get back the value you want. + * + */ +#define MOUSE_X(param) (((XPMouseState_t *) (param))->x) +#define MOUSE_Y(param) (((XPMouseState_t *) (param))->y) + +#define DELTA_X(param) (((XPWidgetGeometryChange_t *) (param))->dx) +#define DELTA_Y(param) (((XPWidgetGeometryChange_t *) (param))->dy) +#define DELTA_W(param) (((XPWidgetGeometryChange_t *) (param))->dwidth) +#define DELTA_H(param) (((XPWidgetGeometryChange_t *) (param))->dheight) + +#define KEY_CHAR(param) (((XPKeyState_t *) (param))->key) +#define KEY_FLAGS(param) (((XPKeyState_t *) (param))->flags) +#define KEY_VKEY(param) (((XPKeyState_t *) (param))->vkey) + +#define IN_RECT(x, y, l, t, r, b) \ + (((x) >= (l)) && ((x) <= (r)) && ((y) >= (b)) && ((y) <= (t))) + +/* + * XPWidgetCreate_t + * + * This structure contains all of the parameters needed to create a wiget. It + * is used with XPUCreateWidgets to create widgets in bulk from an array. All + * parameters correspond to those of XPCreateWidget except for the container + * index. + * + * If the container index is equal to the index of a widget in the array, the + * widget in the array passed to XPUCreateWidgets is used as the parent of + * this widget. Note that if you pass an index greater than your own position + * in the array, the parent you are requesting will not exist yet. + * + * If the container index is NO_PARENT, the parent widget is specified as + * NULL. If the container index is PARAM_PARENT, the widget passed into + * XPUCreateWidgets is used. + * + */ +typedef struct { + int left; + int top; + int right; + int bottom; + int visible; + const char * descriptor; + /* Whether ethis widget is a root wiget */ + int isRoot; + /* The index of the widget to contain within, or a constant */ + int containerIndex; + XPWidgetClass widgetClass; +} XPWidgetCreate_t; + +#define NO_PARENT -1 + +#define PARAM_PARENT -2 + +#define WIDGET_COUNT(x) ((sizeof(x) / sizeof(XPWidgetCreate_t))) + +/* + * XPUCreateWidgets + * + * This function creates a series of widgets from a table (see + * XPCreateWidget_t above). Pass in an array of widget creation structures and + * an array of widget IDs that will receive each widget. + * + * Widget parents are specified by index into the created widget table, + * allowing you to create nested widget structures. You can create multiple + * widget trees in one table. Generally you should create widget trees from + * the top down. + * + * You can also pass in a widget ID that will be used when the widget's parent + * is listed as PARAM_PARENT; this allows you to embed widgets created with + * XPUCreateWidgets in a widget created previously. + * + */ +WIDGET_API void XPUCreateWidgets( + const XPWidgetCreate_t * inWidgetDefs, + int inCount, + XPWidgetID inParamParent, + XPWidgetID * ioWidgets); + +/* + * XPUMoveWidgetBy + * + * Simply moves a widget by an amount, +x = right, +y=up, without resizing the + * widget. + * + */ +WIDGET_API void XPUMoveWidgetBy( + XPWidgetID inWidget, + int inDeltaX, + int inDeltaY); + +/*************************************************************************** + * LAYOUT MANAGERS + ***************************************************************************/ +/* + * The layout managers are widget behavior functions for handling where + * widgets move. Layout managers can be called from a widget function or + * attached to a widget later. + * + */ + + +/* + * XPUFixedLayout + * + * This function causes the widget to maintain its children in fixed position + * relative to itself as it is resized. Use this on the top level 'window' + * widget for your window. + * + */ +WIDGET_API int XPUFixedLayout( + XPWidgetMessage inMessage, + XPWidgetID inWidget, + intptr_t inParam1, + intptr_t inParam2); + +/*************************************************************************** + * WIDGET PROC BEHAVIORS + ***************************************************************************/ +/* + * These widget behavior functions add other useful behaviors to widgets. + * These functions cannot be attached to a widget; they must be called from + * your widget function. + * + */ + + +/* + * XPUSelectIfNeeded + * + * This causes the widget to bring its window to the foreground if it is not + * already. inEatClick specifies whether clicks in the background should be + * consumed by bringin the window to the foreground. + * + */ +WIDGET_API int XPUSelectIfNeeded( + XPWidgetMessage inMessage, + XPWidgetID inWidget, + intptr_t inParam1, + intptr_t inParam2, + int inEatClick); + +/* + * XPUDefocusKeyboard + * + * This causes a click in the widget to send keyboard focus back to X-Plane. + * This stops editing of any text fields, etc. + * + */ +WIDGET_API int XPUDefocusKeyboard( + XPWidgetMessage inMessage, + XPWidgetID inWidget, + intptr_t inParam1, + intptr_t inParam2, + int inEatClick); + +/* + * XPUDragWidget + * + * XPUDragWidget drags the widget in response to mouse clicks. Pass in not + * only the event, but the global coordinates of the drag region, which might + * be a sub-region of your widget (for example, a title bar). + * + */ +WIDGET_API int XPUDragWidget( + XPWidgetMessage inMessage, + XPWidgetID inWidget, + intptr_t inParam1, + intptr_t inParam2, + int inLeft, + int inTop, + int inRight, + int inBottom); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/SDK/CHeaders/Widgets/XPWidgets.h b/src/SDK/CHeaders/Widgets/XPWidgets.h new file mode 100755 index 00000000..f4423e2c --- /dev/null +++ b/src/SDK/CHeaders/Widgets/XPWidgets.h @@ -0,0 +1,538 @@ +#ifndef _XPWidgets_h_ +#define _XPWidgets_h_ + +/* + * Copyright 2005-2012 Sandy Barbour and Ben Supnik All rights reserved. See + * license.txt for usage. X-Plane SDK Version: 2.1.1 + * + */ + +/*************************************************************************** + * XPWidgets + ***************************************************************************/ +/* + * ## THEORY OF OPERATION AND NOTES + * + * Widgets are persistent view 'objects' for X-Plane. A widget is an object + * referenced by its opaque handle (widget ID) and the APIs in this file. You + * cannot access the widget's guts directly. Every Widget has the following + * intrinsic data: + * + * - A bounding box defined in global screen coordinates with 0,0 in the + * bottom left and +y = up, +x = right. + * - A visible box, which is the intersection of the bounding box with the + * widget's parents visible box. + * - Zero or one parent widgets. (Always zero if the widget is a root widget. + * - Zero or more child widgets. + * - Whether the widget is a root. Root widgets are the top level plugin + * windows. + * - Whether the widget is visible. + * - A text string descriptor, whose meaning varies from widget to widget. + * - An arbitrary set of 32 bit integral properties defined by 32-bit integral + * keys. This is how specific widgets store specific data. + * - A list of widget callbacks proc that implements the widgets behaviors. + * + * The Widgets library sends messages to widgets to request specific behaviors + * or notify the widget of things. + * + * Widgets may have more than one callback function, in which case messages + * are sent to the most recently added callback function until the message is + * handled. Messages may also be sent to parents or children; see the + * XPWidgetDefs.h header file for the different widget message dispatching + * functions. By adding a callback function to a window you can 'subclass' its + * behavior. + * + * A set of standard widgets are provided that serve common UI purposes. You + * can also customize or implement entirely custom widgets. + * + * Widgets are different than other view hierarchies (most notably Win32, + * which they bear a striking resemblance to) in the following ways: + * + * - Not all behavior can be patched. State that is managed by the XPWidgets + * DLL and not by individual widgets cannot be customized. + * - All coordinates are in global screen coordinates. Coordinates are not + * relative to an enclosing widget, nor are they relative to a display + * window. + * - Widget messages are always dispatched synchronously, and there is no + * concept of scheduling an update or a dirty region. Messages originate + * from X-Plane as the sim cycle goes by. Since X-Plane is constantly + * redrawing, so are widgets; there is no need to mark a part of a widget as + * 'needing redrawing' because redrawing happens frequently whether the + * widget needs it or not. + * - Any widget may be a 'root' widget, causing it to be drawn; there is no + * relationship between widget class and rootness. Root widgets are + * imlemented as XPLMDisply windows. + * + */ + +#include "XPWidgetDefs.h" +#include "XPLMDisplay.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/*************************************************************************** + * WIDGET CREATION AND MANAGEMENT + ***************************************************************************/ + +/* + * XPCreateWidget + * + * This function creates a new widget and returns the new widget's ID to you. + * If the widget creation fails for some reason, it returns NULL. Widget + * creation will fail either if you pass a bad class ID or if there is not + * adequate memory. + * + * Input Parameters: + * + * - Top, left, bottom, and right in global screen coordinates defining the + * widget's location on the screen. + * - inVisible is 1 if the widget should be drawn, 0 to start the widget as + * hidden. + * - inDescriptor is a null terminated string that will become the widget's + * descriptor. + * - inIsRoot is 1 if this is going to be a root widget, 0 if it will not be. + * - inContainer is the ID of this widget's container. It must be 0 for a root + * widget. for a non-root widget, pass the widget ID of the widget to place + * this widget within. If this widget is not going to start inside another + * widget, pass 0; this new widget will then just be floating off in space + * (and will not be drawn until it is placed in a widget. + * - inClass is the class of the widget to draw. Use one of the predefined + * class-IDs to create a standard widget. + * + * A note on widget embedding: a widget is only called (and will be drawn, + * etc.) if it is placed within a widget that will be called. Root widgets are + * always called. So it is possible to have whole chains of widgets that are + * simply not called. You can preconstruct widget trees and then place them + * into root widgets later to activate them if you wish. + * + */ +WIDGET_API XPWidgetID XPCreateWidget( + int inLeft, + int inTop, + int inRight, + int inBottom, + int inVisible, + const char * inDescriptor, + int inIsRoot, + XPWidgetID inContainer, + XPWidgetClass inClass); + +/* + * XPCreateCustomWidget + * + * This function is the same as XPCreateWidget except that instead of passing + * a class ID, you pass your widget callback function pointer defining the + * widget. Use this function to define a custom widget. All parameters are the + * same as XPCreateWidget, except that the widget class has been replaced with + * the widget function. + * + */ +WIDGET_API XPWidgetID XPCreateCustomWidget( + int inLeft, + int inTop, + int inRight, + int inBottom, + int inVisible, + const char * inDescriptor, + int inIsRoot, + XPWidgetID inContainer, + XPWidgetFunc_t inCallback); + +/* + * XPDestroyWidget + * + * This class destroys a widget. Pass in the ID of the widget to kill. If you + * pass 1 for inDestroyChilren, the widget's children will be destroyed first, + * then this widget will be destroyed. (Furthermore, the widget's children + * will be destroyed with the inDestroyChildren flag set to 1, so the + * destruction will recurse down the widget tree.) If you pass 0 for this + * flag, the child widgets will simply end up with their parent set to 0. + * + */ +WIDGET_API void XPDestroyWidget( + XPWidgetID inWidget, + int inDestroyChildren); + +/* + * XPSendMessageToWidget + * + * This sends any message to a widget. You should probably not go around + * simulating the predefined messages that the widgets library defines for + * you. You may however define custom messages for your widgets and send them + * with this method. + * + * This method supports several dispatching patterns; see XPDispatchMode for + * more info. The function returns 1 if the message was handled, 0 if it was + * not. + * + * For each widget that receives the message (see the dispatching modes), each + * widget function from the most recently installed to the oldest one receives + * the message in order until it is handled. + * + */ +WIDGET_API int XPSendMessageToWidget( + XPWidgetID inWidget, + XPWidgetMessage inMessage, + XPDispatchMode inMode, + intptr_t inParam1, + intptr_t inParam2); + +/*************************************************************************** + * WIDGET POSITIONING AND VISIBILITY + ***************************************************************************/ + +/* + * XPPlaceWidgetWithin + * + * This function changes which container a widget resides in. You may NOT use + * this function on a root widget! inSubWidget is the widget that will be + * moved. Pass a widget ID in inContainer to make inSubWidget be a child of + * inContainer. It will become the last/closest widget in the container. Pass + * 0 to remove the widget from any container. Any call to this other than + * passing the widget ID of the old parent of the affected widget will cause + * the widget to be removed from its old parent. Placing a widget within its + * own parent simply makes it the last widget. + * + * NOTE: this routine does not reposition the sub widget in global + * coordinates. If the container has layout management code, it will + * reposition the subwidget for you, otherwise you must do it with + * SetWidgetGeometry. + * + */ +WIDGET_API void XPPlaceWidgetWithin( + XPWidgetID inSubWidget, + XPWidgetID inContainer); + +/* + * XPCountChildWidgets + * + * This routine returns the number of widgets another widget contains. + * + */ +WIDGET_API int XPCountChildWidgets( + XPWidgetID inWidget); + +/* + * XPGetNthChildWidget + * + * This routine returns the widget ID of a child widget by index. Indexes are + * 0 based, from 0 to one minus the number of widgets in the parent, + * inclusive. If the index is invalid, 0 is returned. + * + */ +WIDGET_API XPWidgetID XPGetNthChildWidget( + XPWidgetID inWidget, + int inIndex); + +/* + * XPGetParentWidget + * + * Returns the parent of a widget, or 0 if the widget has no parent. Root + * widgets never have parents and therefore always return 0. + * + */ +WIDGET_API XPWidgetID XPGetParentWidget( + XPWidgetID inWidget); + +/* + * XPShowWidget + * + * This routine makes a widget visible if it is not already. Note that if a + * widget is not in a rooted widget hierarchy or one of its parents is not + * visible, it will still not be visible to the user. + * + */ +WIDGET_API void XPShowWidget( + XPWidgetID inWidget); + +/* + * XPHideWidget + * + * Makes a widget invisible. See XPShowWidget for considerations of when a + * widget might not be visible despite its own visibility state. + * + */ +WIDGET_API void XPHideWidget( + XPWidgetID inWidget); + +/* + * XPIsWidgetVisible + * + * This returns 1 if a widget is visible, 0 if it is not. Note that this + * routine takes into consideration whether a parent is invisible. Use this + * routine to tell if the user can see the widget. + * + */ +WIDGET_API int XPIsWidgetVisible( + XPWidgetID inWidget); + +/* + * XPFindRootWidget + * + * Returns the Widget ID of the root widget that contains the passed in widget + * or NULL if the passed in widget is not in a rooted hierarchy. + * + */ +WIDGET_API XPWidgetID XPFindRootWidget( + XPWidgetID inWidget); + +/* + * XPBringRootWidgetToFront + * + * This routine makes the specified widget be in the front most widget + * hierarchy. If this widget is a root widget, its widget hierarchy comes to + * front, otherwise the widget's root is brought to the front. If this widget + * is not in an active widget hiearchy (e.g. there is no root widget at the + * top of the tree), this routine does nothing. + * + */ +WIDGET_API void XPBringRootWidgetToFront( + XPWidgetID inWidget); + +/* + * XPIsWidgetInFront + * + * This routine returns true if this widget's hierarchy is the front most + * hierarchy. It returns false if the widget's hierarchy is not in front, or + * if the widget is not in a rooted hierarchy. + * + */ +WIDGET_API int XPIsWidgetInFront( + XPWidgetID inWidget); + +/* + * XPGetWidgetGeometry + * + * This routine returns the bounding box of a widget in global coordinates. + * Pass NULL for any parameter you are not interested in. + * + */ +WIDGET_API void XPGetWidgetGeometry( + XPWidgetID inWidget, + int * outLeft, /* Can be NULL */ + int * outTop, /* Can be NULL */ + int * outRight, /* Can be NULL */ + int * outBottom); /* Can be NULL */ + +/* + * XPSetWidgetGeometry + * + * This function changes the bounding box of a widget. + * + */ +WIDGET_API void XPSetWidgetGeometry( + XPWidgetID inWidget, + int inLeft, + int inTop, + int inRight, + int inBottom); + +/* + * XPGetWidgetForLocation + * + * Given a widget and a location, this routine returns the widget ID of the + * child of that widget that owns that location. If inRecursive is true then + * this will return a child of a child of a widget as it tries to find the + * deepest widget at that location. If inVisibleOnly is true, then only + * visible widgets are considered, otherwise all widgets are considered. The + * widget ID passed for inContainer will be returned if the location is in + * that widget but not in a child widget. 0 is returned if the location is not + * in the container. + * + * NOTE: if a widget's geometry extends outside its parents geometry, it will + * not be returned by this call for mouse locations outside the parent + * geometry. The parent geometry limits the child's eligibility for mouse + * location. + * + */ +WIDGET_API XPWidgetID XPGetWidgetForLocation( + XPWidgetID inContainer, + int inXOffset, + int inYOffset, + int inRecursive, + int inVisibleOnly); + +/* + * XPGetWidgetExposedGeometry + * + * This routine returns the bounds of the area of a widget that is completely + * within its parent widgets. Since a widget's bounding box can be outside its + * parent, part of its area will not be elligible for mouse clicks and should + * not draw. Use XPGetWidgetGeometry to find out what area defines your + * widget's shape, but use this routine to find out what area to actually draw + * into. Note that the widget library does not use OpenGL clipping to keep + * frame rates up, although you could use it internally. + * + */ +WIDGET_API void XPGetWidgetExposedGeometry( + XPWidgetID inWidgetID, + int * outLeft, /* Can be NULL */ + int * outTop, /* Can be NULL */ + int * outRight, /* Can be NULL */ + int * outBottom); /* Can be NULL */ + +/*************************************************************************** + * ACCESSING WIDGET DATA + ***************************************************************************/ + +/* + * XPSetWidgetDescriptor + * + * Every widget has a descriptor, which is a text string. What the text string + * is used for varies from widget to widget; for example, a push button's text + * is its descriptor, a caption shows its descriptor, and a text field's + * descriptor is the text being edited. In other words, the usage for the text + * varies from widget to widget, but this API provides a universal and + * convenient way to get at it. While not all UI widgets need their + * descriptor, many do. + * + */ +WIDGET_API void XPSetWidgetDescriptor( + XPWidgetID inWidget, + const char * inDescriptor); + +/* + * XPGetWidgetDescriptor + * + * This routine returns the widget's descriptor. Pass in the length of the + * buffer you are going to receive the descriptor in. The descriptor will be + * null terminated for you. This routine returns the length of the actual + * descriptor; if you pass NULL for outDescriptor, you can get the + * descriptor's length without getting its text. If the length of the + * descriptor exceeds your buffer length, the buffer will not be null + * terminated (this routine has 'strncpy' semantics). + * + */ +WIDGET_API int XPGetWidgetDescriptor( + XPWidgetID inWidget, + char * outDescriptor, + int inMaxDescLength); + +/* + * XPGetWidgetUnderlyingWindow + * + * Returns the window (from the XPLMDisplay API) that backs your widget + * window. If you have opted in to modern windows, via a call to + * XPLMEnableFeature("XPLM_USE_NATIVE_WIDGET_WINDOWS", 1), you can use the + * returned window ID for display APIs like XPLMSetWindowPositioningMode(), + * allowing you to pop the widget window out into a real OS window, or move it + * into VR. + * + */ +WIDGET_API XPLMWindowID XPGetWidgetUnderlyingWindow( + XPWidgetID inWidget); + +/* + * XPSetWidgetProperty + * + * This function sets a widget's property. Properties are arbitrary values + * associated by a widget by ID. + * + */ +WIDGET_API void XPSetWidgetProperty( + XPWidgetID inWidget, + XPWidgetPropertyID inProperty, + intptr_t inValue); + +/* + * XPGetWidgetProperty + * + * This routine returns the value of a widget's property, or 0 if the property + * is not defined. If you need to know whether the property is defined, pass a + * pointer to an int for inExists; the existence of that property will be + * returned in the int. Pass NULL for inExists if you do not need this + * information. + * + */ +WIDGET_API intptr_t XPGetWidgetProperty( + XPWidgetID inWidget, + XPWidgetPropertyID inProperty, + int * inExists); /* Can be NULL */ + +/*************************************************************************** + * KEYBOARD MANAGEMENT + ***************************************************************************/ + +/* + * XPSetKeyboardFocus + * + * Controls which widget will receive keystrokes. Pass the widget ID of the + * widget to get the keys. Note that if the widget does not care about + * keystrokes, they will go to the parent widget, and if no widget cares about + * them, they go to X-Plane. + * + * If you set the keyboard focus to widget ID 0, X-Plane gets keyboard focus. + * + * This routine returns the widget ID that ended up with keyboard focus, or 0 + * for X-Plane. + * + * Keyboard focus is not changed if the new widget will not accept it. For + * setting to X-Plane, keyboard focus is always accepted. + * + */ +WIDGET_API XPWidgetID XPSetKeyboardFocus( + XPWidgetID inWidget); + +/* + * XPLoseKeyboardFocus + * + * This causes the specified widget to lose focus; focus is passed to its + * parent, or the next parent that will accept it. This routine does nothing + * if this widget does not have focus. + * + */ +WIDGET_API void XPLoseKeyboardFocus( + XPWidgetID inWidget); + +/* + * XPGetWidgetWithFocus + * + * This routine returns the widget that has keyboard focus, or 0 if X-Plane + * has keyboard focus or some other plugin window that does not have widgets + * has focus. + * + */ +WIDGET_API XPWidgetID XPGetWidgetWithFocus(void); + +/*************************************************************************** + * CREATING CUSTOM WIDGETS + ***************************************************************************/ + +/* + * XPAddWidgetCallback + * + * This function adds a new widget callback to a widget. This widget callback + * supercedes any existing ones and will receive messages first; if it does + * not handle messages they will go on to be handled by pre-existing widgets. + * + * The widget function will remain on the widget for the life of the widget. + * The creation message will be sent to the new callback immediately with the + * widget ID, and the destruction message will be sent before the other widget + * function receives a destruction message. + * + * This provides a way to 'subclass' an existing widget. By providing a second + * hook that only handles certain widget messages, you can customize or extend + * widget behavior. + * + */ +WIDGET_API void XPAddWidgetCallback( + XPWidgetID inWidget, + XPWidgetFunc_t inNewCallback); + +/* + * XPGetWidgetClassFunc + * + * Given a widget class, this function returns the callbacks that power that + * widget class. + * + */ +WIDGET_API XPWidgetFunc_t XPGetWidgetClassFunc( + XPWidgetClass inWidgetClass); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/SDK/CHeaders/Wrappers/XPCBroadcaster.cpp b/src/SDK/CHeaders/Wrappers/XPCBroadcaster.cpp new file mode 100755 index 00000000..5fe6218f --- /dev/null +++ b/src/SDK/CHeaders/Wrappers/XPCBroadcaster.cpp @@ -0,0 +1,56 @@ +#include "XPCBroadcaster.h" +#include "XPCListener.h" + +XPCBroadcaster::XPCBroadcaster() : + mIterator(NULL) +{ +} + +XPCBroadcaster::~XPCBroadcaster() +{ + ListenerVector::iterator iter; + mIterator = &iter; + for (iter = mListeners.begin(); iter != mListeners.end(); ++iter) + { + (*iter)->BroadcasterRemoved(this); + } +} + +void XPCBroadcaster::AddListener( + XPCListener * inListener) +{ + mListeners.push_back(inListener); + inListener->BroadcasterAdded(this); +} + +void XPCBroadcaster::RemoveListener( + XPCListener * inListener) +{ + ListenerVector::iterator iter = std::find + (mListeners.begin(), mListeners.end(), inListener); + if (iter == mListeners.end()) + return; + + if (mIterator != NULL) + { + if (*mIterator >= iter) + (*mIterator)--; + } + + mListeners.erase(iter); + inListener->BroadcasterRemoved(this); +} + +void XPCBroadcaster::BroadcastMessage( + int inMessage, + void * inParam) +{ + ListenerVector::iterator iter; + mIterator = &iter; + for (iter = mListeners.begin(); iter != mListeners.end(); ++iter) + { + (*iter)->ListenToMessage(inMessage, inParam); + } + mIterator = NULL; +} + diff --git a/src/SDK/CHeaders/Wrappers/XPCBroadcaster.h b/src/SDK/CHeaders/Wrappers/XPCBroadcaster.h new file mode 100755 index 00000000..8f34a050 --- /dev/null +++ b/src/SDK/CHeaders/Wrappers/XPCBroadcaster.h @@ -0,0 +1,38 @@ +#ifndef _XPCBroadcaster_h_ +#define _XPCBroadcaster_h_ + +#include +#include + +class XPCListener; + +class XPCBroadcaster { +public: + + XPCBroadcaster(); + virtual ~XPCBroadcaster(); + + void AddListener( + XPCListener * inListener); + void RemoveListener( + XPCListener * inListener); + +protected: + + void BroadcastMessage( + int inMessage, + void * inParam=0); + +private: + + typedef std::vector ListenerVector; + + ListenerVector mListeners; + + // Reentrancy support + + ListenerVector::iterator * mIterator; + +}; + +#endif \ No newline at end of file diff --git a/src/SDK/CHeaders/Wrappers/XPCDisplay.cpp b/src/SDK/CHeaders/Wrappers/XPCDisplay.cpp new file mode 100755 index 00000000..fc996ca8 --- /dev/null +++ b/src/SDK/CHeaders/Wrappers/XPCDisplay.cpp @@ -0,0 +1,104 @@ +#include "XPCDisplay.h" + +XPCKeySniffer::XPCKeySniffer(int inBeforeWindows) : mBeforeWindows(inBeforeWindows) +{ + XPLMRegisterKeySniffer(KeySnifferCB, mBeforeWindows, reinterpret_cast(this)); +} + +XPCKeySniffer::~XPCKeySniffer() +{ + XPLMUnregisterKeySniffer(KeySnifferCB, mBeforeWindows, reinterpret_cast(this)); +} + + +int XPCKeySniffer::KeySnifferCB( + char inCharKey, + XPLMKeyFlags inFlags, + char inVirtualKey, + void * inRefCon) +{ + XPCKeySniffer * me = reinterpret_cast(inRefCon); + return me->HandleKeyStroke(inCharKey, inFlags, inVirtualKey); +} + +XPCWindow::XPCWindow( + int inLeft, + int inTop, + int inRight, + int inBottom, + int inIsVisible) +{ + mWindow = XPLMCreateWindow(inLeft, inTop, inRight, inBottom, inIsVisible, + DrawCB, HandleKeyCB, MouseClickCB, + reinterpret_cast(this)); +} + +XPCWindow::~XPCWindow() +{ + XPLMDestroyWindow(mWindow); +} + +void XPCWindow::GetWindowGeometry( + int * outLeft, + int * outTop, + int * outRight, + int * outBottom) +{ + XPLMGetWindowGeometry(mWindow, outLeft, outTop, outRight, outBottom); +} + +void XPCWindow::SetWindowGeometry( + int inLeft, + int inTop, + int inRight, + int inBottom) +{ + XPLMSetWindowGeometry(mWindow, inLeft, inTop, inRight, inBottom); +} + +int XPCWindow::GetWindowIsVisible(void) +{ + return XPLMGetWindowIsVisible(mWindow); +} + +void XPCWindow::SetWindowIsVisible( + int inIsVisible) +{ + XPLMSetWindowIsVisible(mWindow, inIsVisible); +} + +void XPCWindow::TakeKeyboardFocus(void) +{ + XPLMTakeKeyboardFocus(mWindow); +} + +void XPCWindow::BringWindowToFront(void) +{ + XPLMBringWindowToFront(mWindow); +} + +int XPCWindow::IsWindowInFront(void) +{ + return XPLMIsWindowInFront(mWindow); +} + +void XPCWindow::DrawCB(XPLMWindowID inWindowID, void * inRefcon) +{ + XPCWindow * me = reinterpret_cast(inRefcon); + me->DoDraw(); +} + +void XPCWindow::HandleKeyCB(XPLMWindowID inWindowID, char inKey, XPLMKeyFlags inFlags, char inVirtualKey, void * inRefcon, int losingFocus) +{ + XPCWindow * me = reinterpret_cast(inRefcon); + if (losingFocus) + me->LoseFocus(); + else + me->HandleKey(inKey, inFlags, inVirtualKey); +} + +int XPCWindow::MouseClickCB(XPLMWindowID inWindowID, int x, int y, XPLMMouseStatus inMouse, void * inRefcon) +{ + XPCWindow * me = reinterpret_cast(inRefcon); + return me->HandleClick(x, y, inMouse); +} diff --git a/src/SDK/CHeaders/Wrappers/XPCDisplay.h b/src/SDK/CHeaders/Wrappers/XPCDisplay.h new file mode 100755 index 00000000..24659283 --- /dev/null +++ b/src/SDK/CHeaders/Wrappers/XPCDisplay.h @@ -0,0 +1,73 @@ +#ifndef _XPCDisplay_h_ +#define _XPCDisplay_h_ + +#include "XPLMDisplay.h" + +class XPCKeySniffer { +public: + + XPCKeySniffer(int inBeforeWindows); + virtual ~XPCKeySniffer(); + + virtual int HandleKeyStroke( + char inCharKey, + XPLMKeyFlags inFlags, + char inVirtualKey)=0; + +private: + + int mBeforeWindows; + + static int KeySnifferCB( + char inCharKey, + XPLMKeyFlags inFlags, + char inVirtualKey, + void * inRefCon); +}; + + + +class XPCWindow { +public: + + XPCWindow( + int inLeft, + int inTop, + int inRight, + int inBottom, + int inIsVisible); + virtual ~XPCWindow(); + + virtual void DoDraw(void)=0; + virtual void HandleKey(char inKey, XPLMKeyFlags inFlags, char inVirtualKey)=0; + virtual void LoseFocus(void)=0; + virtual int HandleClick(int x, int y, XPLMMouseStatus inMouse)=0; + + void GetWindowGeometry( + int * outLeft, + int * outTop, + int * outRight, + int * outBottom); + void SetWindowGeometry( + int inLeft, + int inTop, + int inRight, + int inBottom); + int GetWindowIsVisible(void); + void SetWindowIsVisible( + int inIsVisible); + void TakeKeyboardFocus(void); + void BringWindowToFront(void); + int IsWindowInFront(void); + +private: + + XPLMWindowID mWindow; + + static void DrawCB(XPLMWindowID inWindowID, void * inRefcon); + static void HandleKeyCB(XPLMWindowID inWindowID, char inKey, XPLMKeyFlags inFlags, char inVirtualKey, void * inRefcon, int losingFocus); + static int MouseClickCB(XPLMWindowID inWindowID, int x, int y, XPLMMouseStatus inMouse, void * inRefcon); + +}; + +#endif \ No newline at end of file diff --git a/src/SDK/CHeaders/Wrappers/XPCListener.cpp b/src/SDK/CHeaders/Wrappers/XPCListener.cpp new file mode 100755 index 00000000..b4c77aaf --- /dev/null +++ b/src/SDK/CHeaders/Wrappers/XPCListener.cpp @@ -0,0 +1,27 @@ +#include "XPCListener.h" +#include "XPCBroadcaster.h" + +XPCListener::XPCListener() +{ +} + +XPCListener::~XPCListener() +{ + while (!mBroadcasters.empty()) + mBroadcasters.front()->RemoveListener(this); +} + +void XPCListener::BroadcasterAdded( + XPCBroadcaster * inBroadcaster) +{ + mBroadcasters.push_back(inBroadcaster); +} + +void XPCListener::BroadcasterRemoved( + XPCBroadcaster * inBroadcaster) +{ + BroadcastVector::iterator iter = std::find(mBroadcasters.begin(), + mBroadcasters.end(), inBroadcaster); + if (iter != mBroadcasters.end()) + mBroadcasters.erase(iter); +} diff --git a/src/SDK/CHeaders/Wrappers/XPCListener.h b/src/SDK/CHeaders/Wrappers/XPCListener.h new file mode 100755 index 00000000..dbdd2a09 --- /dev/null +++ b/src/SDK/CHeaders/Wrappers/XPCListener.h @@ -0,0 +1,36 @@ +#ifndef _XPCListener_h_ +#define _XPCListener_h_ + +#include +#include + +class XPCBroadcaster; + + +class XPCListener { +public: + + XPCListener(); + virtual ~XPCListener(); + + virtual void ListenToMessage( + int inMessage, + void * inParam)=0; + +private: + + typedef std::vector BroadcastVector; + + BroadcastVector mBroadcasters; + + friend class XPCBroadcaster; + + void BroadcasterAdded( + XPCBroadcaster * inBroadcaster); + + void BroadcasterRemoved( + XPCBroadcaster * inBroadcaster); + +}; + +#endif \ No newline at end of file diff --git a/src/SDK/CHeaders/Wrappers/XPCProcessing.cpp b/src/SDK/CHeaders/Wrappers/XPCProcessing.cpp new file mode 100755 index 00000000..352c05f2 --- /dev/null +++ b/src/SDK/CHeaders/Wrappers/XPCProcessing.cpp @@ -0,0 +1,52 @@ +#include "XPCProcessing.h" +#include "XPLMUtilities.h" + +XPCProcess::XPCProcess() : + mInCallback(false), + mCallbackTime(0) +{ + XPLMRegisterFlightLoopCallback(FlightLoopCB, 0, reinterpret_cast(this)); +} + +XPCProcess::~XPCProcess() +{ + XPLMUnregisterFlightLoopCallback(FlightLoopCB, reinterpret_cast(this)); +} + +void XPCProcess::StartProcessTime(float inSeconds) +{ + mCallbackTime = inSeconds; + if (!mInCallback) + XPLMSetFlightLoopCallbackInterval( + FlightLoopCB, mCallbackTime, 1/*relative to now*/, reinterpret_cast(this)); +} + +void XPCProcess::StartProcessCycles(int inCycles) +{ + mCallbackTime = -inCycles; + if (!mInCallback) + XPLMSetFlightLoopCallbackInterval( + FlightLoopCB, mCallbackTime, 1/*relative to now*/, reinterpret_cast(this)); +} + +void XPCProcess::StopProcess(void) +{ + mCallbackTime = 0; + if (!mInCallback) + XPLMSetFlightLoopCallbackInterval( + FlightLoopCB, mCallbackTime, 1/*relative to now*/, reinterpret_cast(this)); +} + + +float XPCProcess::FlightLoopCB( + float inElapsedSinceLastCall, + float inElapsedTimeSinceLastFlightLoop, + int inCounter, + void * inRefcon) +{ + XPCProcess * me = reinterpret_cast(inRefcon); + me->mInCallback = true; + me->DoProcessing(inElapsedSinceLastCall, inElapsedTimeSinceLastFlightLoop, inCounter); + me->mInCallback = false; + return me->mCallbackTime; +} \ No newline at end of file diff --git a/src/SDK/CHeaders/Wrappers/XPCProcessing.h b/src/SDK/CHeaders/Wrappers/XPCProcessing.h new file mode 100755 index 00000000..cd735e51 --- /dev/null +++ b/src/SDK/CHeaders/Wrappers/XPCProcessing.h @@ -0,0 +1,37 @@ +#ifndef _XPCProcessing_h_ +#define _XPCProcessing_h_ + +#include "XPLMProcessing.h" + +class XPCProcess { +public: + + XPCProcess(); + virtual ~XPCProcess(); + + void StartProcessTime(float inSeconds); + void StartProcessCycles(int inCycles); + void StopProcess(void); + + virtual void DoProcessing( + float inElapsedSinceLastCall, + float inElapsedTimeSinceLastFlightLoop, + int inCounter)=0; + +private: + + static float FlightLoopCB( + float inElapsedSinceLastCall, + float inElapsedTimeSinceLastFlightLoop, + int inCounter, + void * inRefcon); + + bool mInCallback; + float mCallbackTime; + + XPCProcess(const XPCProcess&); + XPCProcess& operator=(const XPCProcess&); + +}; + +#endif diff --git a/src/SDK/CHeaders/Wrappers/XPCWidget.cpp b/src/SDK/CHeaders/Wrappers/XPCWidget.cpp new file mode 100755 index 00000000..8ef8aa38 --- /dev/null +++ b/src/SDK/CHeaders/Wrappers/XPCWidget.cpp @@ -0,0 +1,123 @@ +#include "XPCWidget.h" + +XPCWidget::XPCWidget( + int inLeft, + int inTop, + int inRight, + int inBottom, + bool inVisible, + const char * inDescriptor, + bool inIsRoot, + XPWidgetID inParent, + XPWidgetClass inClass) : + mWidget(NULL), + mOwnsChildren(false), + mOwnsWidget(true) +{ + mWidget = XPCreateWidget( + inLeft, inTop, inRight, inBottom, + inVisible ? 1 : 0, + inDescriptor, + inIsRoot ? 1 : 0, + inIsRoot ? NULL : inParent, + inClass); + + XPSetWidgetProperty(mWidget, xpProperty_Object, reinterpret_cast(this)); + XPAddWidgetCallback(mWidget, WidgetCallback); +} + +XPCWidget::XPCWidget( + XPWidgetID inWidget, + bool inOwnsWidget) : + mWidget(inWidget), + mOwnsChildren(false), + mOwnsWidget(inOwnsWidget) +{ + XPSetWidgetProperty(mWidget, xpProperty_Object, reinterpret_cast(this)); + XPAddWidgetCallback(mWidget, WidgetCallback); +} + +XPCWidget::~XPCWidget() +{ + if (mOwnsWidget) + XPDestroyWidget(mWidget, mOwnsChildren ? 1 : 0); +} + +void XPCWidget::SetOwnsWidget( + bool inOwnsWidget) +{ + mOwnsWidget = inOwnsWidget; +} + +void XPCWidget::SetOwnsChildren( + bool inOwnsChildren) +{ + mOwnsChildren = inOwnsChildren; +} + +XPCWidget::operator XPWidgetID () const +{ + return mWidget; +} + +XPWidgetID XPCWidget::Get(void) const +{ + return mWidget; +} + +void XPCWidget::AddAttachment( + XPCWidgetAttachment * inAttachment, + bool inOwnsAttachment, + bool inPrefilter) +{ + if (inPrefilter) + { + mAttachments.insert(mAttachments.begin(), AttachmentInfo(inAttachment, inOwnsAttachment)); + } else { + mAttachments.push_back(AttachmentInfo(inAttachment, inOwnsAttachment)); + } +} + +void XPCWidget::RemoveAttachment( + XPCWidgetAttachment * inAttachment) +{ + for (AttachmentVector::iterator iter = mAttachments.begin(); + iter != mAttachments.end(); ++iter) + { + if (iter->first == inAttachment) + { + mAttachments.erase(iter); + return; + } + } +} + +int XPCWidget::HandleWidgetMessage( + XPWidgetMessage inMessage, + XPWidgetID inWidget, + intptr_t inParam1, + intptr_t inParam2) +{ + return 0; +} + +int XPCWidget::WidgetCallback( + XPWidgetMessage inMessage, + XPWidgetID inWidget, + intptr_t inParam1, + intptr_t inParam2) +{ + XPCWidget * me = reinterpret_cast(XPGetWidgetProperty(inWidget, xpProperty_Object, NULL)); + if (me == NULL) + return 0; + + for (AttachmentVector::iterator iter = me->mAttachments.begin(); iter != + me->mAttachments.end(); ++iter) + { + int result = iter->first->HandleWidgetMessage(me, inMessage, inWidget, inParam1, inParam2); + if (result != 0) + return result; + } + + return me->HandleWidgetMessage(inMessage, inWidget, inParam1, inParam2); +} diff --git a/src/SDK/CHeaders/Wrappers/XPCWidget.h b/src/SDK/CHeaders/Wrappers/XPCWidget.h new file mode 100755 index 00000000..788b56ac --- /dev/null +++ b/src/SDK/CHeaders/Wrappers/XPCWidget.h @@ -0,0 +1,84 @@ +#ifndef _XPCWidget_h_ +#define _XPCWidget_h_ + +#include +#include +#include "XPWidgets.h" + +class XPCWidget; + +class XPCWidgetAttachment { +public: + + virtual int HandleWidgetMessage( + XPCWidget * inObject, + XPWidgetMessage inMessage, + XPWidgetID inWidget, + intptr_t inParam1, + intptr_t inParam2)=0; + +}; + +class XPCWidget { +public: + + XPCWidget( + int inLeft, + int inTop, + int inRight, + int inBottom, + bool inVisible, + const char * inDescriptor, + bool inIsRoot, + XPWidgetID inParent, + XPWidgetClass inClass); + XPCWidget( + XPWidgetID inWidget, + bool inOwnsWidget); + virtual ~XPCWidget(); + + void SetOwnsWidget( + bool inOwnsWidget); + void SetOwnsChildren( + bool inOwnsChildren); + + operator XPWidgetID () const; + + XPWidgetID Get(void) const; + + void AddAttachment( + XPCWidgetAttachment * inAttachment, + bool inOwnsAttachment, + bool inPrefilter); + void RemoveAttachment( + XPCWidgetAttachment * inAttachment); + + virtual int HandleWidgetMessage( + XPWidgetMessage inMessage, + XPWidgetID inWidget, + intptr_t inParam1, + intptr_t inParam2); + +private: + + static int WidgetCallback( + XPWidgetMessage inMessage, + XPWidgetID inWidget, + intptr_t inParam1, + intptr_t inParam2); + + typedef std::pair AttachmentInfo; + typedef std::vector AttachmentVector; + + AttachmentVector mAttachments; + XPWidgetID mWidget; + bool mOwnsChildren; + bool mOwnsWidget; + + XPCWidget(); + XPCWidget(const XPCWidget&); + XPCWidget& operator=(const XPCWidget&); + +}; + +#endif \ No newline at end of file diff --git a/src/SDK/CHeaders/Wrappers/XPCWidgetAttachments.cpp b/src/SDK/CHeaders/Wrappers/XPCWidgetAttachments.cpp new file mode 100755 index 00000000..d87f105c --- /dev/null +++ b/src/SDK/CHeaders/Wrappers/XPCWidgetAttachments.cpp @@ -0,0 +1,267 @@ +#include "XPCWidgetAttachments.h" +#include "XPStandardWidgets.h" +#include "XPWidgetUtils.h" + +static void XPCGetOrderedSubWidgets( + XPWidgetID inWidget, + std::vector& outChildren); + +XPCKeyFilterAttachment::XPCKeyFilterAttachment( + const char * inValidKeys, + const char * outValidKeys) : + mInput(inValidKeys), + mOutput(outValidKeys) +{ +} + +XPCKeyFilterAttachment::~XPCKeyFilterAttachment() +{ +} + +int XPCKeyFilterAttachment::HandleWidgetMessage( + XPCWidget * inObject, + XPWidgetMessage inMessage, + XPWidgetID inWidget, + intptr_t inParam1, + intptr_t inParam2) +{ + if (inMessage == xpMsg_KeyPress) + { + char& theKey = KEY_CHAR(inParam1); + std::string::size_type pos = mInput.find(theKey); + if (pos == std::string::npos) + return 1; // Not found; eat the key! + else { + theKey = mOutput[pos]; + return 0; + } // Let it live. + } + return 0; +} + + +XPCKeyMessageAttachment::XPCKeyMessageAttachment( + char inKey, + int inMessage, + void * inParam, + bool inConsume, + bool inVkey, + XPCListener * inListener) : + mKey(inKey), mMsg(inMessage), mParam(inParam), mConsume(inConsume), + mVkey(inVkey) +{ + if (inListener != NULL) + this->AddListener(inListener); +} + +XPCKeyMessageAttachment::~XPCKeyMessageAttachment() +{ +} + +int XPCKeyMessageAttachment::HandleWidgetMessage( + XPCWidget * inObject, + XPWidgetMessage inMessage, + XPWidgetID inWidget, + intptr_t inParam1, + intptr_t inParam2) +{ + if (inMessage == xpMsg_KeyPress) + { + char theKey = mVkey ? KEY_VKEY(inParam1) : KEY_CHAR(inParam1); + if (theKey != mKey) + return 0; + if (!(KEY_FLAGS(inParam1) & xplm_DownFlag)) + return 0; + + BroadcastMessage(mMsg, mParam); + return mConsume ? 1 : 0; + } + return 0; +} + +XPCPushButtonMessageAttachment::XPCPushButtonMessageAttachment( + XPWidgetID inWidget, + int inMessage, + void * inParam, + XPCListener * inListener) : + mMsg(inMessage), mParam(inParam), mWidget(inWidget) +{ + if (inListener != NULL) + this->AddListener(inListener); +} + +XPCPushButtonMessageAttachment::~XPCPushButtonMessageAttachment() +{ +} + +int XPCPushButtonMessageAttachment::HandleWidgetMessage( + XPCWidget * inObject, + XPWidgetMessage inMessage, + XPWidgetID inWidget, + intptr_t inParam1, + intptr_t inParam2) +{ + if ((inMessage == xpMsg_PushButtonPressed) && ((XPWidgetID) inParam1 == mWidget)) + { + BroadcastMessage(mMsg, mParam); + return 1; + } + + if ((inMessage == xpMsg_ButtonStateChanged) && ((XPWidgetID) inParam1 == mWidget)) + { + BroadcastMessage(mMsg, mParam); + return 1; + } + return 0; +} + +XPCSliderMessageAttachment::XPCSliderMessageAttachment( + XPWidgetID inWidget, + int inMessage, + void * inParam, + XPCListener * inListener) : + mMsg(inMessage), mParam(inParam), mWidget(inWidget) +{ + if (inListener != NULL) + this->AddListener(inListener); +} + +XPCSliderMessageAttachment::~XPCSliderMessageAttachment() +{ +} + +int XPCSliderMessageAttachment::HandleWidgetMessage( + XPCWidget * inObject, + XPWidgetMessage inMessage, + XPWidgetID inWidget, + intptr_t inParam1, + intptr_t inParam2) +{ + if ((inMessage == xpMsg_ScrollBarSliderPositionChanged) && ((XPWidgetID) inParam1 == mWidget)) + { + BroadcastMessage(mMsg, mParam); + return 1; + } + + return 0; +} + + +XPCCloseButtonMessageAttachment::XPCCloseButtonMessageAttachment( + XPWidgetID inWidget, + int inMessage, + void * inParam, + XPCListener * inListener) : + mMsg(inMessage), mParam(inParam), mWidget(inWidget) +{ + if (inListener != NULL) + this->AddListener(inListener); +} + +XPCCloseButtonMessageAttachment::~XPCCloseButtonMessageAttachment() +{ +} + +int XPCCloseButtonMessageAttachment::HandleWidgetMessage( + XPCWidget * inObject, + XPWidgetMessage inMessage, + XPWidgetID inWidget, + intptr_t inParam1, + intptr_t inParam2) +{ + if ((inMessage == xpMessage_CloseButtonPushed) && ((XPWidgetID) inParam1 == mWidget)) + { + BroadcastMessage(mMsg, mParam); + return 1; + } + + return 0; +} + +XPCTabGroupAttachment::XPCTabGroupAttachment() +{ +} + +XPCTabGroupAttachment::~XPCTabGroupAttachment() +{ +} + +int XPCTabGroupAttachment::HandleWidgetMessage( + XPCWidget * inObject, + XPWidgetMessage inMessage, + XPWidgetID inWidget, + intptr_t inParam1, + intptr_t inParam2) +{ + if ((inMessage == xpMsg_KeyPress) && (KEY_CHAR(inParam1) == XPLM_KEY_TAB) && + ((KEY_FLAGS(inParam1) & xplm_UpFlag) == 0)) + { + bool backwards = (KEY_FLAGS(inParam1) & xplm_ShiftFlag) != 0; + std::vector widgets; + XPCGetOrderedSubWidgets(inWidget, widgets); + int n, index = 0; + XPWidgetID focusWidget = XPGetWidgetWithFocus(); + std::vector::iterator iter = std::find(widgets.begin(), widgets.end(), focusWidget); + if (iter != widgets.end()) + { + index = std::distance(widgets.begin(), iter); + if (backwards) + index--; + else + index++; + if (index < 0) + index = widgets.size() - 1; + if (index >= widgets.size()) + index = 0; + } + + if (backwards) + { + for (n = index; n >= 0; --n) + { + if (XPGetWidgetProperty(widgets[n], xpProperty_Enabled, NULL)) + if (XPSetKeyboardFocus(widgets[n]) != NULL) + return 1; + } + for (n = widgets.size() - 1; n > index; --n) + { + if (XPGetWidgetProperty(widgets[n], xpProperty_Enabled, NULL)) + if (XPSetKeyboardFocus(widgets[n]) != NULL) + return 1; + } + } else { + for (n = index; n < widgets.size(); ++n) + { + if (XPGetWidgetProperty(widgets[n], xpProperty_Enabled, NULL)) + if (XPSetKeyboardFocus(widgets[n]) != NULL) + return 1; + } + for (n = 0; n < index; ++n) + { + if (XPGetWidgetProperty(widgets[n], xpProperty_Enabled, NULL)) + if (XPSetKeyboardFocus(widgets[n]) != NULL) + return 1; + } + } + } + return 0; +} + + + +static void XPCGetOrderedSubWidgets( + XPWidgetID inWidget, + std::vector& outChildren) +{ + outChildren.clear(); + int count = XPCountChildWidgets(inWidget); + for (int n = 0; n < count; ++n) + { + XPWidgetID child = XPGetNthChildWidget(inWidget, n); + outChildren.push_back(child); + std::vector grandChildren; + XPCGetOrderedSubWidgets(child, grandChildren); + + outChildren.insert(outChildren.end(), grandChildren.begin(), grandChildren.end()); + } +} diff --git a/src/SDK/CHeaders/Wrappers/XPCWidgetAttachments.h b/src/SDK/CHeaders/Wrappers/XPCWidgetAttachments.h new file mode 100755 index 00000000..91fb5875 --- /dev/null +++ b/src/SDK/CHeaders/Wrappers/XPCWidgetAttachments.h @@ -0,0 +1,146 @@ +#ifndef _XPCWidgetAttachments_h_ +#define _XPCWidgetAttachments_h_ + +#include + +#include "XPCWidget.h" +#include "XPCBroadcaster.h" + +class XPCKeyFilterAttachment : public XPCWidgetAttachment { +public: + + XPCKeyFilterAttachment( + const char * inValidKeys, + const char * outValidKeys); + virtual ~XPCKeyFilterAttachment(); + + virtual int HandleWidgetMessage( + XPCWidget * inObject, + XPWidgetMessage inMessage, + XPWidgetID inWidget, + intptr_t inParam1, + intptr_t inParam2); + +private: + + std::string mInput; + std::string mOutput; + +}; + + +class XPCKeyMessageAttachment : public XPCWidgetAttachment, public XPCBroadcaster { +public: + + XPCKeyMessageAttachment( + char inKey, + int inMessage, + void * inParam, + bool inConsume, + bool inVkey, + XPCListener * inListener); + virtual ~XPCKeyMessageAttachment(); + + virtual int HandleWidgetMessage( + XPCWidget * inObject, + XPWidgetMessage inMessage, + XPWidgetID inWidget, + intptr_t inParam1, + intptr_t inParam2); + +private: + + char mKey; + bool mVkey; + int mMsg; + void * mParam; + bool mConsume; + +}; + +class XPCPushButtonMessageAttachment : public XPCWidgetAttachment, XPCBroadcaster { +public: + + XPCPushButtonMessageAttachment( + XPWidgetID inWidget, + int inMessage, + void * inParam, + XPCListener * inListener); + virtual ~XPCPushButtonMessageAttachment(); + + virtual int HandleWidgetMessage( + XPCWidget * inObject, + XPWidgetMessage inMessage, + XPWidgetID inWidget, + intptr_t inParam1, + intptr_t inParam2); + +private: + XPWidgetID mWidget; + int mMsg; + void * mParam; +}; + +class XPCSliderMessageAttachment : public XPCWidgetAttachment, XPCBroadcaster { +public: + + XPCSliderMessageAttachment( + XPWidgetID inWidget, + int inMessage, + void * inParam, + XPCListener * inListener); + virtual ~XPCSliderMessageAttachment(); + + virtual int HandleWidgetMessage( + XPCWidget * inObject, + XPWidgetMessage inMessage, + XPWidgetID inWidget, + intptr_t inParam1, + intptr_t inParam2); + +private: + XPWidgetID mWidget; + int mMsg; + void * mParam; +}; + + +class XPCCloseButtonMessageAttachment : public XPCWidgetAttachment, XPCBroadcaster { +public: + + XPCCloseButtonMessageAttachment( + XPWidgetID inWidget, + int inMessage, + void * inParam, + XPCListener * inListener); + virtual ~XPCCloseButtonMessageAttachment(); + + virtual int HandleWidgetMessage( + XPCWidget * inObject, + XPWidgetMessage inMessage, + XPWidgetID inWidget, + intptr_t inParam1, + intptr_t inParam2); + +private: + XPWidgetID mWidget; + int mMsg; + void * mParam; +}; + +class XPCTabGroupAttachment : public XPCWidgetAttachment { +public: + + XPCTabGroupAttachment(); + virtual ~XPCTabGroupAttachment(); + + virtual int HandleWidgetMessage( + XPCWidget * inObject, + XPWidgetMessage inMessage, + XPWidgetID inWidget, + intptr_t inParam1, + intptr_t inParam2); + +}; + +#endif \ No newline at end of file diff --git a/src/SDK/CHeaders/XPLM/XPLMCamera.h b/src/SDK/CHeaders/XPLM/XPLMCamera.h new file mode 100755 index 00000000..db930ef8 --- /dev/null +++ b/src/SDK/CHeaders/XPLM/XPLMCamera.h @@ -0,0 +1,167 @@ +#ifndef _XPLMCamera_h_ +#define _XPLMCamera_h_ + +/* + * Copyright 2005-2012 Sandy Barbour and Ben Supnik All rights reserved. See + * license.txt for usage. X-Plane SDK Version: 2.1.1 + * + */ + +/*************************************************************************** + * XPLMCamera + ***************************************************************************/ +/* + * The XPLMCamera APIs allow plug-ins to control the camera angle in X-Plane. + * This has a number of applications, including but not limited to: + * + * - Creating new views (including dynamic/user-controllable views) for the + * user. + * - Creating applications that use X-Plane as a renderer of scenery, + * aircrafts, or both. + * + * The camera is controlled via six parameters: a location in OpenGL + * coordinates and pitch, roll and yaw, similar to an airplane's position. + * OpenGL coordinate info is described in detail in the XPLMGraphics + * documentation; generally you should use the XPLMGraphics routines to + * convert from world to local coordinates. The camera's orientation starts + * facing level with the ground directly up the negative-Z axis (approximately + * north) with the horizon horizontal. It is then rotated clockwise for yaw, + * pitched up for positive pitch, and rolled clockwise around the vector it is + * looking along for roll. + * + * You control the camera either either until the user selects a new view or + * permanently (the later being similar to how UDP camera control works). You + * control the camera by registering a callback per frame from which you + * calculate the new camera positions. This guarantees smooth camera motion. + * + * Use the XPLMDataAccess APIs to get information like the position of the + * aircraft, etc. for complex camera positioning. + * + * Note: if your goal is to move the virtual pilot in the cockpit, this API is + * not needed; simply update the datarefs for the pilot's head position. + * + * For custom exterior cameras, set the camera's mode to an external view + * first to get correct sound and 2-d panel behavior. + * + */ + +#include "XPLMDefs.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/*************************************************************************** + * CAMERA CONTROL + ***************************************************************************/ + +/* + * XPLMCameraControlDuration + * + * This enumeration states how long you want to retain control of the camera. + * You can retain it indefinitely or until the user selects a new view. + * + */ +enum { + /* Control the camera until the user picks a new view. */ + xplm_ControlCameraUntilViewChanges = 1, + + /* Control the camera until your plugin is disabled or another plugin forcably* + * takes control. */ + xplm_ControlCameraForever = 2, + + +}; +typedef int XPLMCameraControlDuration; + +/* + * XPLMCameraPosition_t + * + * This structure contains a full specification of the camera. X, Y, and Z are + * the camera's position in OpenGL coordiantes; pitch, roll, and yaw are + * rotations from a camera facing flat north in degrees. Positive pitch means + * nose up, positive roll means roll right, and positive yaw means yaw right, + * all in degrees. Zoom is a zoom factor, with 1.0 meaning normal zoom and 2.0 + * magnifying by 2x (objects appear larger). + * + */ +typedef struct { + float x; + float y; + float z; + float pitch; + float heading; + float roll; + float zoom; +} XPLMCameraPosition_t; + +/* + * XPLMCameraControl_f + * + * You use an XPLMCameraControl function to provide continuous control over + * the camera. You are passed in a structure in which to put the new camera + * position; modify it and return 1 to reposition the camera. Return 0 to + * surrender control of the camera; camera control will be handled by X-Plane + * on this draw loop. The contents of the structure as you are called are + * undefined. + * + * If X-Plane is taking camera control away from you, this function will be + * called with inIsLosingControl set to 1 and ioCameraPosition NULL. + * + */ +typedef int (* XPLMCameraControl_f)( + XPLMCameraPosition_t * outCameraPosition, /* Can be NULL */ + int inIsLosingControl, + void * inRefcon); + +/* + * XPLMControlCamera + * + * This function repositions the camera on the next drawing cycle. You must + * pass a non-null control function. Specify in inHowLong how long you'd like + * control (indefinitely or until a new view mode is set by the user). + * + */ +XPLM_API void XPLMControlCamera( + XPLMCameraControlDuration inHowLong, + XPLMCameraControl_f inControlFunc, + void * inRefcon); + +/* + * XPLMDontControlCamera + * + * This function stops you from controlling the camera. If you have a camera + * control function, it will not be called with an inIsLosingControl flag. + * X-Plane will control the camera on the next cycle. + * + * For maximum compatibility you should not use this routine unless you are in + * posession of the camera. + * + */ +XPLM_API void XPLMDontControlCamera(void); + +/* + * XPLMIsCameraBeingControlled + * + * This routine returns 1 if the camera is being controlled, zero if it is + * not. If it is and you pass in a pointer to a camera control duration, the + * current control duration will be returned. + * + */ +XPLM_API int XPLMIsCameraBeingControlled( + XPLMCameraControlDuration * outCameraControlDuration); /* Can be NULL */ + +/* + * XPLMReadCameraPosition + * + * This function reads the current camera position. + * + */ +XPLM_API void XPLMReadCameraPosition( + XPLMCameraPosition_t * outCameraPosition); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/SDK/CHeaders/XPLM/XPLMDataAccess.h b/src/SDK/CHeaders/XPLM/XPLMDataAccess.h new file mode 100755 index 00000000..d8d1418f --- /dev/null +++ b/src/SDK/CHeaders/XPLM/XPLMDataAccess.h @@ -0,0 +1,716 @@ +#ifndef _XPLMDataAccess_h_ +#define _XPLMDataAccess_h_ + +/* + * Copyright 2005-2012 Sandy Barbour and Ben Supnik All rights reserved. See + * license.txt for usage. X-Plane SDK Version: 2.1.1 + * + */ + +/*************************************************************************** + * XPLMDataAccess + ***************************************************************************/ +/* + * The data access API gives you a generic, flexible, high performance way to + * read and write data to and from X-Plane and other plug-ins. For example, + * this API allows you to read and set the nav radios, get the plane location, + * determine the current effective graphics frame rate, etc. + * + * The data access APIs are the way that you read and write data from the sim + * as well as other plugins. + * + * The API works using opaque data references. A data reference is a source of + * data; you do not know where it comes from, but once you have it you can + * read the data quickly and possibly write it. + * + * Dataref Lookup + * -------------- + * + * Data references are identified by verbose, permanent string names; by + * convention these names use path separates to form a hierarchy of datarefs, + * e.g. (sim/cockpit/radios/nav1_freq_hz). The actual opaque numeric value of + * the data reference, as returned by the XPLM API, is implementation defined + * and changes each time X-Plane is launched; therefore you need to look up + * the dataref by path every time your plugin runs. + * + * The task of looking up a data reference is relatively expensive; look up + * your data references once based on the verbose path strings, and save the + * opaque data reference value for the duration of your plugin's operation. + * Reading and writing data references is relatively fast (the cost is + * equivalent to two function calls through function pointers). + * + * X-Plane publishes over 4000 datarefs; a complete list may be found in the + * reference section of the SDK online documentation (from the SDK home page, + * choose Documentation). + * + * Dataref Types + * ------------- + * + * A note on typing: you must know the correct data type to read and write. + * APIs are provided for reading and writing data in a number of ways. You can + * also double check the data type for a data ref. Automatic type conversion + * is not done for you. + * + * Dataref types are a set, e.g. a dataref can be more than one type. When + * this happens, you can choose which API you want to use to read. For + * example, it is not uncommon for a dataref to be of type float and double. + * This means you can use either XPLMGetDatad or XPLMGetDataf to read it. + * + * Creating New Datarefs + * --------------------- + * + * X-Plane provides datarefs that come with the sim, but plugins can also + * create their own datarefs. A plugin creates a dataref by registering + * function callbacks to read and write the dataref. The XPLM will call your + * plugin each time some other plugin (or X-Plane) tries to read or write the + * dataref. You must provide a read (and optional write) callback for each + * data type you support. + * + * A note for plugins sharing data with other plugins: the load order of + * plugins is not guaranteed. To make sure that every plugin publishing data + * has published their data references before other plugins try to subscribe, + * publish your data references in your start routine but resolve them the + * first time your 'enable' routine is called, or the first time they are + * needed in code. + * + * When a plugin that created a dataref is unloaded, it becomes "orphaned". + * The dataref handle continues to be usable, but the dataref is not writable, + * and reading it will always return 0 (or 0 items for arrays). If the plugin + * is reloaded and re-registers the dataref, the handle becomes un-orphaned + * and works again. + * + */ + +#include "XPLMDefs.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/*************************************************************************** + * READING AND WRITING DATA + ***************************************************************************/ +/* + * These routines allow you to access data from within X-Plane and sometimes + * modify it. + * + */ + + +/* + * XPLMDataRef + * + * A data ref is an opaque handle to data provided by the simulator or another + * plugin. It uniquely identifies one variable (or array of variables) over + * the lifetime of your plugin. You never hard code these values; you always + * get them from XPLMFindDataRef. + * + */ +typedef void * XPLMDataRef; + +/* + * XPLMDataTypeID + * + * This is an enumeration that defines the type of the data behind a data + * reference. This allows you to sanity check that the data type matches what + * you expect. But for the most part, you will know the type of data you are + * expecting from the online documentation. + * + * Data types each take a bit field; it is legal to have a single dataref be + * more than one type of data. Whe this happens, you can pick any matching + * get/set API. + * + */ +enum { + /* Data of a type the current XPLM doesn't do. */ + xplmType_Unknown = 0, + + /* A single 4-byte integer, native endian. */ + xplmType_Int = 1, + + /* A single 4-byte float, native endian. */ + xplmType_Float = 2, + + /* A single 8-byte double, native endian. */ + xplmType_Double = 4, + + /* An array of 4-byte floats, native endian. */ + xplmType_FloatArray = 8, + + /* An array of 4-byte integers, native endian. */ + xplmType_IntArray = 16, + + /* A variable block of data. */ + xplmType_Data = 32, + + +}; +typedef int XPLMDataTypeID; + +/* + * XPLMFindDataRef + * + * Given a c-style string that names the data ref, this routine looks up the + * actual opaque XPLMDataRef that you use to read and write the data. The + * string names for datarefs are published on the X-Plane SDK web site. + * + * This function returns NULL if the data ref cannot be found. + * + * NOTE: this function is relatively expensive; save the XPLMDataRef this + * function returns for future use. Do not look up your data ref by string + * every time you need to read or write it. + * + */ +XPLM_API XPLMDataRef XPLMFindDataRef( + const char * inDataRefName); + +/* + * XPLMCanWriteDataRef + * + * Given a data ref, this routine returns true if you can successfully set the + * data, false otherwise. Some datarefs are read-only. + * + * NOTE: even if a dataref is marked writable, it may not act writable. This + * can happen for datarefs that X-Plane writes to on every frame of + * simulation. In some cases, the dataref is writable but you have to set a + * separate "override" dataref to 1 to stop X-Plane from writing it. + * + */ +XPLM_API int XPLMCanWriteDataRef( + XPLMDataRef inDataRef); + +/* + * XPLMIsDataRefGood + * + * This function returns true if the passed in handle is a valid dataref that + * is not orphaned. + * + * Note: there is normally no need to call this function; datarefs returned by + * XPLMFindDataRef remain valid (but possibly orphaned) unless there is a + * complete plugin reload (in which case your plugin is reloaded anyway). + * Orphaned datarefs can be safely read and return 0. Therefore you never need + * to call XPLMIsDataRefGood to 'check' the safety of a dataref. + * (XPLMIsDatarefGood performs some slow checking of the handle validity, so + * it has a perormance cost.) + * + */ +XPLM_API int XPLMIsDataRefGood( + XPLMDataRef inDataRef); + +/* + * XPLMGetDataRefTypes + * + * This routine returns the types of the data ref for accessor use. If a data + * ref is available in multiple data types, the bit-wise OR of these types + * will be returned. + * + */ +XPLM_API XPLMDataTypeID XPLMGetDataRefTypes( + XPLMDataRef inDataRef); + +/*************************************************************************** + * DATA ACCESSORS + ***************************************************************************/ +/* + * These routines read and write the data references. For each supported data + * type there is a reader and a writer. + * + * If the data ref is orphaned or the plugin that provides it is disabled or + * there is a type mismatch, the functions that read data will return 0 as a + * default value or not modify the passed in memory. The plugins that write + * data will not write under these circumstances or if the data ref is + * read-only. + * + * NOTE: to keep the overhead of reading datarefs low, these routines do not + * do full validation of a dataref; passing a junk value for a dataref can + * result in crashing the sim. The get/set APIs do check for NULL. + * + * For array-style datarefs, you specify the number of items to read/write and + * the offset into the array; the actual number of items read or written is + * returned. This may be less to prevent an array-out-of-bounds error. + * + */ + + +/* + * XPLMGetDatai + * + * Read an integer data ref and return its value. The return value is the + * dataref value or 0 if the dataref is NULL or the plugin is disabled. + * + */ +XPLM_API int XPLMGetDatai( + XPLMDataRef inDataRef); + +/* + * XPLMSetDatai + * + * Write a new value to an integer data ref. This routine is a no-op if the + * plugin publishing the dataref is disabled, the dataref is NULL, or the + * dataref is not writable. + * + */ +XPLM_API void XPLMSetDatai( + XPLMDataRef inDataRef, + int inValue); + +/* + * XPLMGetDataf + * + * Read a single precision floating point dataref and return its value. The + * return value is the dataref value or 0.0 if the dataref is NULL or the + * plugin is disabled. + * + */ +XPLM_API float XPLMGetDataf( + XPLMDataRef inDataRef); + +/* + * XPLMSetDataf + * + * Write a new value to a single precision floating point data ref. This + * routine is a no-op if the plugin publishing the dataref is disabled, the + * dataref is NULL, or the dataref is not writable. + * + */ +XPLM_API void XPLMSetDataf( + XPLMDataRef inDataRef, + float inValue); + +/* + * XPLMGetDatad + * + * Read a double precision floating point dataref and return its value. The + * return value is the dataref value or 0.0 if the dataref is NULL or the + * plugin is disabled. + * + */ +XPLM_API double XPLMGetDatad( + XPLMDataRef inDataRef); + +/* + * XPLMSetDatad + * + * Write a new value to a double precision floating point data ref. This + * routine is a no-op if the plugin publishing the dataref is disabled, the + * dataref is NULL, or the dataref is not writable. + * + */ +XPLM_API void XPLMSetDatad( + XPLMDataRef inDataRef, + double inValue); + +/* + * XPLMGetDatavi + * + * Read a part of an integer array dataref. If you pass NULL for outValues, + * the routine will return the size of the array, ignoring inOffset and inMax. + * + * If outValues is not NULL, then up to inMax values are copied from the + * dataref into outValues, starting at inOffset in the dataref. If inMax + + * inOffset is larger than the size of the dataref, less than inMax values + * will be copied. The number of values copied is returned. + * + * Note: the semantics of array datarefs are entirely implemented by the + * plugin (or X-Plane) that provides the dataref, not the SDK itself; the + * above description is how these datarefs are intended to work, but a rogue + * plugin may have different behavior. + * + */ +XPLM_API int XPLMGetDatavi( + XPLMDataRef inDataRef, + int * outValues, /* Can be NULL */ + int inOffset, + int inMax); + +/* + * XPLMSetDatavi + * + * Write part or all of an integer array dataref. The values passed by + * inValues are written into the dataref starting at inOffset. Up to inCount + * values are written; however if the values would write "off the end" of the + * dataref array, then fewer values are written. + * + * Note: the semantics of array datarefs are entirely implemented by the + * plugin (or X-Plane) that provides the dataref, not the SDK itself; the + * above description is how these datarefs are intended to work, but a rogue + * plugin may have different behavior. + * + */ +XPLM_API void XPLMSetDatavi( + XPLMDataRef inDataRef, + int * inValues, + int inoffset, + int inCount); + +/* + * XPLMGetDatavf + * + * Read a part of a single precision floating point array dataref. If you pass + * NULL for outVaules, the routine will return the size of the array, ignoring + * inOffset and inMax. + * + * If outValues is not NULL, then up to inMax values are copied from the + * dataref into outValues, starting at inOffset in the dataref. If inMax + + * inOffset is larger than the size of the dataref, less than inMax values + * will be copied. The number of values copied is returned. + * + * Note: the semantics of array datarefs are entirely implemented by the + * plugin (or X-Plane) that provides the dataref, not the SDK itself; the + * above description is how these datarefs are intended to work, but a rogue + * plugin may have different behavior. + * + */ +XPLM_API int XPLMGetDatavf( + XPLMDataRef inDataRef, + float * outValues, /* Can be NULL */ + int inOffset, + int inMax); + +/* + * XPLMSetDatavf + * + * Write part or all of a single precision floating point array dataref. The + * values passed by inValues are written into the dataref starting at + * inOffset. Up to inCount values are written; however if the values would + * write "off the end" of the dataref array, then fewer values are written. + * + * Note: the semantics of array datarefs are entirely implemented by the + * plugin (or X-Plane) that provides the dataref, not the SDK itself; the + * above description is how these datarefs are intended to work, but a rogue + * plugin may have different behavior. + * + */ +XPLM_API void XPLMSetDatavf( + XPLMDataRef inDataRef, + float * inValues, + int inoffset, + int inCount); + +/* + * XPLMGetDatab + * + * Read a part of a byte array dataref. If you pass NULL for outVaules, the + * routine will return the size of the array, ignoring inOffset and inMax. + * + * If outValues is not NULL, then up to inMax values are copied from the + * dataref into outValues, starting at inOffset in the dataref. If inMax + + * inOffset is larger than the size of the dataref, less than inMax values + * will be copied. The number of values copied is returned. + * + * Note: the semantics of array datarefs are entirely implemented by the + * plugin (or X-Plane) that provides the dataref, not the SDK itself; the + * above description is how these datarefs are intended to work, but a rogue + * plugin may have different behavior. + * + */ +XPLM_API int XPLMGetDatab( + XPLMDataRef inDataRef, + void * outValue, /* Can be NULL */ + int inOffset, + int inMaxBytes); + +/* + * XPLMSetDatab + * + * Write part or all of a byte array dataref. The values passed by inValues + * are written into the dataref starting at inOffset. Up to inCount values are + * written; however if the values would write "off the end" of the dataref + * array, then fewer values are written. + * + * Note: the semantics of array datarefs are entirely implemented by the + * plugin (or X-Plane) that provides the dataref, not the SDK itself; the + * above description is how these datarefs are intended to work, but a rogue + * plugin may have different behavior. + * + */ +XPLM_API void XPLMSetDatab( + XPLMDataRef inDataRef, + void * inValue, + int inOffset, + int inLength); + +/*************************************************************************** + * PUBLISHING YOUR PLUGIN'S DATA + ***************************************************************************/ +/* + * These functions allow you to create data references that other plug-ins and + * X-Plane can access via the above data access APIs. Data references + * published by other plugins operate the same as ones published by X-Plane in + * all manners except that your data reference will not be available to other + * plugins if/when your plugin is disabled. + * + * You share data by registering data provider callback functions. When a + * plug-in requests your data, these callbacks are then called. You provide + * one callback to return the value when a plugin 'reads' it and another to + * change the value when a plugin 'writes' it. + * + * Important: you must pick a prefix for your datarefs other than "sim/" - + * this prefix is reserved for X-Plane. The X-Plane SDK website contains a + * registry where authors can select a unique first word for dataref names, to + * prevent dataref collisions between plugins. + * + */ + + +/* + * XPLMGetDatai_f + * + * Data provider function pointers. + * + * These define the function pointers you provide to get or set data. Note + * that you are passed a generic pointer for each one. This is the same + * pointer you pass in your register routine; you can use it to locate plugin + * variables, etc. + * + * The semantics of your callbacks are the same as the dataref accessor above + * - basically routines like XPLMGetDatai are just pass-throughs from a caller + * to your plugin. Be particularly mindful in implementing array dataref + * read-write accessors; you are responsible for avoiding overruns, supporting + * offset read/writes, and handling a read with a NULL buffer. + * + */ +typedef int (* XPLMGetDatai_f)( + void * inRefcon); + +/* + * XPLMSetDatai_f + * + */ +typedef void (* XPLMSetDatai_f)( + void * inRefcon, + int inValue); + +/* + * XPLMGetDataf_f + * + */ +typedef float (* XPLMGetDataf_f)( + void * inRefcon); + +/* + * XPLMSetDataf_f + * + */ +typedef void (* XPLMSetDataf_f)( + void * inRefcon, + float inValue); + +/* + * XPLMGetDatad_f + * + */ +typedef double (* XPLMGetDatad_f)( + void * inRefcon); + +/* + * XPLMSetDatad_f + * + */ +typedef void (* XPLMSetDatad_f)( + void * inRefcon, + double inValue); + +/* + * XPLMGetDatavi_f + * + */ +typedef int (* XPLMGetDatavi_f)( + void * inRefcon, + int * outValues, /* Can be NULL */ + int inOffset, + int inMax); + +/* + * XPLMSetDatavi_f + * + */ +typedef void (* XPLMSetDatavi_f)( + void * inRefcon, + int * inValues, + int inOffset, + int inCount); + +/* + * XPLMGetDatavf_f + * + */ +typedef int (* XPLMGetDatavf_f)( + void * inRefcon, + float * outValues, /* Can be NULL */ + int inOffset, + int inMax); + +/* + * XPLMSetDatavf_f + * + */ +typedef void (* XPLMSetDatavf_f)( + void * inRefcon, + float * inValues, + int inOffset, + int inCount); + +/* + * XPLMGetDatab_f + * + */ +typedef int (* XPLMGetDatab_f)( + void * inRefcon, + void * outValue, /* Can be NULL */ + int inOffset, + int inMaxLength); + +/* + * XPLMSetDatab_f + * + */ +typedef void (* XPLMSetDatab_f)( + void * inRefcon, + void * inValue, + int inOffset, + int inLength); + +/* + * XPLMRegisterDataAccessor + * + * This routine creates a new item of data that can be read and written. Pass + * in the data's full name for searching, the type(s) of the data for + * accessing, and whether the data can be written to. For each data type you + * support, pass in a read accessor function and a write accessor function if + * necessary. Pass NULL for data types you do not support or write accessors + * if you are read-only. + * + * You are returned a data ref for the new item of data created. You can use + * this data ref to unregister your data later or read or write from it. + * + */ +XPLM_API XPLMDataRef XPLMRegisterDataAccessor( + const char * inDataName, + XPLMDataTypeID inDataType, + int inIsWritable, + XPLMGetDatai_f inReadInt, + XPLMSetDatai_f inWriteInt, + XPLMGetDataf_f inReadFloat, + XPLMSetDataf_f inWriteFloat, + XPLMGetDatad_f inReadDouble, + XPLMSetDatad_f inWriteDouble, + XPLMGetDatavi_f inReadIntArray, + XPLMSetDatavi_f inWriteIntArray, + XPLMGetDatavf_f inReadFloatArray, + XPLMSetDatavf_f inWriteFloatArray, + XPLMGetDatab_f inReadData, + XPLMSetDatab_f inWriteData, + void * inReadRefcon, + void * inWriteRefcon); + +/* + * XPLMUnregisterDataAccessor + * + * Use this routine to unregister any data accessors you may have registered. + * You unregister a data ref by the XPLMDataRef you get back from + * registration. Once you unregister a data ref, your function pointer will + * not be called anymore. + * + */ +XPLM_API void XPLMUnregisterDataAccessor( + XPLMDataRef inDataRef); + +/*************************************************************************** + * SHARING DATA BETWEEN MULTIPLE PLUGINS + ***************************************************************************/ +/* + * The data reference registration APIs from the previous section allow a + * plugin to publish data in a one-owner manner; the plugin that publishes the + * data reference owns the real memory that the data ref uses. This is + * satisfactory for most cases, but there are also cases where plugnis need to + * share actual data. + * + * With a shared data reference, no one plugin owns the actual memory for the + * data reference; the plugin SDK allocates that for you. When the first + * plugin asks to 'share' the data, the memory is allocated. When the data is + * changed, every plugin that is sharing the data is notified. + * + * Shared data references differ from the 'owned' data references from the + * previous section in a few ways: + * + * * With shared data references, any plugin can create the data reference; + * with owned plugins one plugin must create the data reference and others + * subscribe. (This can be a problem if you don't know which set of plugins + * will be present). + * + * * With shared data references, every plugin that is sharing the data is + * notified when the data is changed. With owned data references, only the + * one owner is notified when the data is changed. + * + * * With shared data references, you cannot access the physical memory of the + * data reference; you must use the XPLMGet... and XPLMSet... APIs. With an + * owned data reference, the one owning data reference can manipulate the + * data reference's memory in any way it sees fit. + * + * Shared data references solve two problems: if you need to have a data + * reference used by several plugins but do not know which plugins will be + * installed, or if all plugins sharing data need to be notified when that + * data is changed, use shared data references. + * + */ + + +/* + * XPLMDataChanged_f + * + * An XPLMDataChanged_f is a callback that the XPLM calls whenever any other + * plug-in modifies shared data. A refcon you provide is passed back to help + * identify which data is being changed. In response, you may want to call one + * of the XPLMGetDataxxx routines to find the new value of the data. + * + */ +typedef void (* XPLMDataChanged_f)( + void * inRefcon); + +/* + * XPLMShareData + * + * This routine connects a plug-in to shared data, creating the shared data if + * necessary. inDataName is a standard path for the data ref, and inDataType + * specifies the type. This function will create the data if it does not + * exist. If the data already exists but the type does not match, an error is + * returned, so it is important that plug-in authors collaborate to establish + * public standards for shared data. + * + * If a notificationFunc is passed in and is not NULL, that notification + * function will be called whenever the data is modified. The notification + * refcon will be passed to it. This allows your plug-in to know which shared + * data was changed if multiple shared data are handled by one callback, or if + * the plug-in does not use global variables. + * + * A one is returned for successfully creating or finding the shared data; a + * zero if the data already exists but is of the wrong type. + * + */ +XPLM_API int XPLMShareData( + const char * inDataName, + XPLMDataTypeID inDataType, + XPLMDataChanged_f inNotificationFunc, + void * inNotificationRefcon); + +/* + * XPLMUnshareData + * + * This routine removes your notification function for shared data. Call it + * when done with the data to stop receiving change notifications. Arguments + * must match XPLMShareData. The actual memory will not necessarily be freed, + * since other plug-ins could be using it. + * + */ +XPLM_API int XPLMUnshareData( + const char * inDataName, + XPLMDataTypeID inDataType, + XPLMDataChanged_f inNotificationFunc, + void * inNotificationRefcon); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/SDK/CHeaders/XPLM/XPLMDefs.h b/src/SDK/CHeaders/XPLM/XPLMDefs.h new file mode 100755 index 00000000..bb1fe2fb --- /dev/null +++ b/src/SDK/CHeaders/XPLM/XPLMDefs.h @@ -0,0 +1,514 @@ +#ifndef _XPLMDefs_h_ +#define _XPLMDefs_h_ + +/* + * Copyright 2005-2012 Sandy Barbour and Ben Supnik All rights reserved. See + * license.txt for usage. X-Plane SDK Version: 2.1.1 + * + */ + +/*************************************************************************** + * XPLMDefs + ***************************************************************************/ +/* + * 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. + * + */ + + +#ifdef __cplusplus +extern "C" { +#endif + +#if IBM +#include +#else +#include +#endif +/*************************************************************************** + * DLL Definitions + ***************************************************************************/ +/* + * 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.) + * + */ + + +#ifdef __cplusplus + #if APL + #if __GNUC__ >= 4 + #define PLUGIN_API extern "C" __attribute__((visibility("default"))) + #elif __MACH__ + #define PLUGIN_API extern "C" + #else + #define PLUGIN_API extern "C" __declspec(dllexport) + #endif + #elif IBM + #define PLUGIN_API extern "C" __declspec(dllexport) + #elif LIN + #if __GNUC__ >= 4 + #define PLUGIN_API extern "C" __attribute__((visibility("default"))) + #else + #define PLUGIN_API extern "C" + #endif + #else + #error "Platform not defined!" + #endif +#else + #if APL + #if __GNUC__ >= 4 + #define PLUGIN_API __attribute__((visibility("default"))) + #elif __MACH__ + #define PLUGIN_API + #else + #define PLUGIN_API __declspec(dllexport) + #endif + #elif IBM + #define PLUGIN_API __declspec(dllexport) + #elif LIN + #if __GNUC__ >= 4 + #define PLUGIN_API __attribute__((visibility("default"))) + #else + #define PLUGIN_API + #endif + #else + #error "Platform not defined!" + #endif +#endif + +#if APL + #if XPLM + #if __GNUC__ >= 4 + #define XPLM_API __attribute__((visibility("default"))) + #elif __MACH__ + #define XPLM_API + #else + #define XPLM_API __declspec(dllexport) + #endif + #else + #define XPLM_API + #endif +#elif IBM + #if XPLM + #define XPLM_API __declspec(dllexport) + #else + #define XPLM_API __declspec(dllimport) + #endif +#elif LIN + #if XPLM + #if __GNUC__ >= 4 + #define XPLM_API __attribute__((visibility("default"))) + #else + #define XPLM_API + #endif + #else + #define XPLM_API + #endif +#else + #error "Platform not defined!" +#endif + +/*************************************************************************** + * GLOBAL DEFINITIONS + ***************************************************************************/ +/* + * These definitions are used in all parts of the SDK. + * + */ + + +/* + * 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. 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 + * + * -1 indicates no plug-in. + * + */ +typedef int XPLMPluginID; + +/* No plugin. */ +#define XPLM_NO_PLUGIN_ID (-1) + +/* X-Plane itself */ +#define XPLM_PLUGIN_XPLANE (0) + +/* The current XPLM revision is 3.03 (303). */ +#define kXPLM_Version (303) + +/* + * 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. + * + * 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. + * + */ +enum { + /* The shift key is down */ + xplm_ShiftFlag = 1, + + /* The option or alt key is down */ + xplm_OptionAltFlag = 2, + + /* The control key is down* */ + xplm_ControlFlag = 4, + + /* The key is being pressed down */ + xplm_DownFlag = 8, + + /* The key is being released */ + xplm_UpFlag = 16, + + +}; +typedef int XPLMKeyFlags; + +/*************************************************************************** + * 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. + * + */ + + +#define XPLM_KEY_RETURN 13 + +#define XPLM_KEY_ESCAPE 27 + +#define XPLM_KEY_TAB 9 + +#define XPLM_KEY_DELETE 8 + +#define XPLM_KEY_LEFT 28 + +#define XPLM_KEY_RIGHT 29 + +#define XPLM_KEY_UP 30 + +#define XPLM_KEY_DOWN 31 + +#define XPLM_KEY_0 48 + +#define XPLM_KEY_1 49 + +#define XPLM_KEY_2 50 + +#define XPLM_KEY_3 51 + +#define XPLM_KEY_4 52 + +#define XPLM_KEY_5 53 + +#define XPLM_KEY_6 54 + +#define XPLM_KEY_7 55 + +#define XPLM_KEY_8 56 + +#define XPLM_KEY_9 57 + +#define XPLM_KEY_DECIMAL 46 + +/*************************************************************************** + * 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). + * + * 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: + * + * 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. + * + */ + + +#define XPLM_VK_BACK 0x08 + +#define XPLM_VK_TAB 0x09 + +#define XPLM_VK_CLEAR 0x0C + +#define XPLM_VK_RETURN 0x0D + +#define XPLM_VK_ESCAPE 0x1B + +#define XPLM_VK_SPACE 0x20 + +#define XPLM_VK_PRIOR 0x21 + +#define XPLM_VK_NEXT 0x22 + +#define XPLM_VK_END 0x23 + +#define XPLM_VK_HOME 0x24 + +#define XPLM_VK_LEFT 0x25 + +#define XPLM_VK_UP 0x26 + +#define XPLM_VK_RIGHT 0x27 + +#define XPLM_VK_DOWN 0x28 + +#define XPLM_VK_SELECT 0x29 + +#define XPLM_VK_PRINT 0x2A + +#define XPLM_VK_EXECUTE 0x2B + +#define XPLM_VK_SNAPSHOT 0x2C + +#define XPLM_VK_INSERT 0x2D + +#define XPLM_VK_DELETE 0x2E + +#define XPLM_VK_HELP 0x2F + +/* XPLM_VK_0 thru XPLM_VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39) */ +#define XPLM_VK_0 0x30 + +#define XPLM_VK_1 0x31 + +#define XPLM_VK_2 0x32 + +#define XPLM_VK_3 0x33 + +#define XPLM_VK_4 0x34 + +#define XPLM_VK_5 0x35 + +#define XPLM_VK_6 0x36 + +#define XPLM_VK_7 0x37 + +#define XPLM_VK_8 0x38 + +#define XPLM_VK_9 0x39 + +/* XPLM_VK_A thru XPLM_VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A) */ +#define XPLM_VK_A 0x41 + +#define XPLM_VK_B 0x42 + +#define XPLM_VK_C 0x43 + +#define XPLM_VK_D 0x44 + +#define XPLM_VK_E 0x45 + +#define XPLM_VK_F 0x46 + +#define XPLM_VK_G 0x47 + +#define XPLM_VK_H 0x48 + +#define XPLM_VK_I 0x49 + +#define XPLM_VK_J 0x4A + +#define XPLM_VK_K 0x4B + +#define XPLM_VK_L 0x4C + +#define XPLM_VK_M 0x4D + +#define XPLM_VK_N 0x4E + +#define XPLM_VK_O 0x4F + +#define XPLM_VK_P 0x50 + +#define XPLM_VK_Q 0x51 + +#define XPLM_VK_R 0x52 + +#define XPLM_VK_S 0x53 + +#define XPLM_VK_T 0x54 + +#define XPLM_VK_U 0x55 + +#define XPLM_VK_V 0x56 + +#define XPLM_VK_W 0x57 + +#define XPLM_VK_X 0x58 + +#define XPLM_VK_Y 0x59 + +#define XPLM_VK_Z 0x5A + +#define XPLM_VK_NUMPAD0 0x60 + +#define XPLM_VK_NUMPAD1 0x61 + +#define XPLM_VK_NUMPAD2 0x62 + +#define XPLM_VK_NUMPAD3 0x63 + +#define XPLM_VK_NUMPAD4 0x64 + +#define XPLM_VK_NUMPAD5 0x65 + +#define XPLM_VK_NUMPAD6 0x66 + +#define XPLM_VK_NUMPAD7 0x67 + +#define XPLM_VK_NUMPAD8 0x68 + +#define XPLM_VK_NUMPAD9 0x69 + +#define XPLM_VK_MULTIPLY 0x6A + +#define XPLM_VK_ADD 0x6B + +#define XPLM_VK_SEPARATOR 0x6C + +#define XPLM_VK_SUBTRACT 0x6D + +#define XPLM_VK_DECIMAL 0x6E + +#define XPLM_VK_DIVIDE 0x6F + +#define XPLM_VK_F1 0x70 + +#define XPLM_VK_F2 0x71 + +#define XPLM_VK_F3 0x72 + +#define XPLM_VK_F4 0x73 + +#define XPLM_VK_F5 0x74 + +#define XPLM_VK_F6 0x75 + +#define XPLM_VK_F7 0x76 + +#define XPLM_VK_F8 0x77 + +#define XPLM_VK_F9 0x78 + +#define XPLM_VK_F10 0x79 + +#define XPLM_VK_F11 0x7A + +#define XPLM_VK_F12 0x7B + +#define XPLM_VK_F13 0x7C + +#define XPLM_VK_F14 0x7D + +#define XPLM_VK_F15 0x7E + +#define XPLM_VK_F16 0x7F + +#define XPLM_VK_F17 0x80 + +#define XPLM_VK_F18 0x81 + +#define XPLM_VK_F19 0x82 + +#define XPLM_VK_F20 0x83 + +#define XPLM_VK_F21 0x84 + +#define XPLM_VK_F22 0x85 + +#define XPLM_VK_F23 0x86 + +#define XPLM_VK_F24 0x87 + +/* The following definitions are extended and are not based on the Microsoft * + * key set. */ +#define XPLM_VK_EQUAL 0xB0 + +#define XPLM_VK_MINUS 0xB1 + +#define XPLM_VK_RBRACE 0xB2 + +#define XPLM_VK_LBRACE 0xB3 + +#define XPLM_VK_QUOTE 0xB4 + +#define XPLM_VK_SEMICOLON 0xB5 + +#define XPLM_VK_BACKSLASH 0xB6 + +#define XPLM_VK_COMMA 0xB7 + +#define XPLM_VK_SLASH 0xB8 + +#define XPLM_VK_PERIOD 0xB9 + +#define XPLM_VK_BACKQUOTE 0xBA + +#define XPLM_VK_ENTER 0xBB + +#define XPLM_VK_NUMPAD_ENT 0xBC + +#define XPLM_VK_NUMPAD_EQ 0xBD + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/SDK/CHeaders/XPLM/XPLMDisplay.h b/src/SDK/CHeaders/XPLM/XPLMDisplay.h new file mode 100755 index 00000000..48c7a700 --- /dev/null +++ b/src/SDK/CHeaders/XPLM/XPLMDisplay.h @@ -0,0 +1,1477 @@ +#ifndef _XPLMDisplay_h_ +#define _XPLMDisplay_h_ + +/* + * Copyright 2005-2012 Sandy Barbour and Ben Supnik All rights reserved. See + * license.txt for usage. X-Plane SDK Version: 2.1.1 + * + */ + +/*************************************************************************** + * XPLMDisplay + ***************************************************************************/ +/* + * This API provides the basic hooks to draw in X-Plane and create user + * interface. All X-Plane drawing is done in OpenGL. The X-Plane plug-in + * manager takes care of properly setting up the OpenGL context and matrices. + * You do not decide when in your code's execution to draw; X-Plane tells you + * (via callbacks) when it is ready to have your plugin draw. + * + * X-Plane's drawing strategy is straightforward: every "frame" the screen is + * rendered by drawing the 3-D scene (dome, ground, objects, airplanes, etc.) + * and then drawing the cockpit on top of it. Alpha blending is used to + * overlay the cockpit over the world (and the gauges over the panel, etc.). + * X-Plane user interface elements (including windows like the map, the main + * menu, etc.) are then drawn on top of the cockpit. + * + * There are two ways you can draw: directly and in a window. + * + * Direct drawing (deprecated!---more on that below) involves drawing to the + * screen before or after X-Plane finishes a phase of drawing. When you draw + * directly, you can specify whether X-Plane is to complete this phase or not. + * This allows you to do three things: draw before X-Plane does (under it), + * draw after X-Plane does (over it), or draw instead of X-Plane. + * + * To draw directly, you register a callback and specify which phase you want + * to intercept. The plug-in manager will call you over and over to draw that + * phase. + * + * Direct drawing allows you to override scenery, panels, or anything. Note + * that you cannot assume that you are the only plug-in drawing at this phase. + * + * Direct drawing is deprecated; at some point in the X-Plane 11 run, it will + * likely become unsupported entirely as X-Plane transitions from OpenGL to + * modern graphics API backends (e.g., Vulkan, Metal, etc.). In the long term, + * plugins should use the XPLMInstance API for drawing 3-D objects---this will + * be much more efficient than general 3-D OpenGL drawing, and it will + * actually be supported by the new graphics backends. We do not yet know what + * the post-transition API for generic 3-D drawing will look like (if it + * exists at all). + * + * In contrast to direct drawing, window drawing provides a higher level + * functionality. With window drawing, you create a 2-D window that takes up a + * portion of the screen. Window drawing is always two dimensional. Window + * drawing is front-to-back controlled; you can specify that you want your + * window to be brought on top, and other plug-ins may put their window on top + * of you. Window drawing also allows you to sign up for key presses and + * receive mouse clicks. + * + * There are three ways to get keystrokes: + * + * 1. If you create a window, the window can take keyboard focus. It will + * then receive all keystrokes. If no window has focus, X-Plane receives + * keystrokes. Use this to implement typing in dialog boxes, etc. Only + * one window may have focus at a time; your window will be notified if it + * loses focus. + * 2. If you need low level access to the keystroke stream, install a key + * sniffer. Key sniffers can be installed above everything or right in + * front of the sim. + * 3. If you would like to associate key strokes with commands/functions in + * your plug-in, you should simply register a command (via + * XPLMCreateCommand()) and allow users to bind whatever key they choose to + * that command. Another (now deprecated) method of doing so is to use a + * hot key---a key-specific callback. Hotkeys are sent based on virtual + * key strokes, so any key may be distinctly mapped with any modifiers. + * Hot keys can be remapped by other plug-ins. As a plug-in, you don't + * have to worry about what your hot key ends up mapped to; other plug-ins + * may provide a UI for remapping keystrokes. So hotkeys allow a user to + * resolve conflicts and customize keystrokes. + * + */ + +#include "XPLMDefs.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/*************************************************************************** + * DRAWING CALLBACKS + ***************************************************************************/ +/* + * Basic drawing callbacks, for low level intercepting of X-Plane's render + * loop. The purpose of drawing callbacks is to provide targeted additions or + * replacements to X-Plane's graphics environment (for example, to add extra + * custom objects, or replace drawing of the AI aircraft). Do not assume that + * the drawing callbacks will be called in the order implied by the + * enumerations. Also do not assume that each drawing phase ends before + * another begins; they may be nested. + * + * Note that all APIs in this section are deprecated, and will likely be + * removed during the X-Plane 11 run as part of the transition to + * Vulkan/Metal/etc. See the XPLMInstance API for future-proof drawing of 3-D + * objects. + * + */ + + +/* + * XPLMDrawingPhase + * + * This constant indicates which part of drawing we are in. Drawing is done + * from the back to the front. We get a callback before or after each item. + * Metaphases provide access to the beginning and end of the 3d (scene) and + * 2d (cockpit) drawing in a manner that is independent of new phases added + * via X-Plane implementation. + * + * **NOTE**: As of XPLM302 the legacy 3D drawing phases (xplm_Phase_FirstScene + * to xplm_Phase_LastScene) are deprecated. When running under X-Plane 11.50 + * with the modern Vulkan or Metal backend, X-Plane will no longer call + * these drawing phases. There is a new drawing phase, xplm_Phase_Modern3D, + * which is supported under OpenGL and Vulkan which is called out roughly + * where the old before xplm_Phase_Airplanes phase was for blending. This + * phase is *NOT* supported under Metal and comes with potentially + * substantial performance overhead. Please do *NOT* opt into this phase if + * you don't do any actual drawing that requires the depth buffer in some + * way! + * + * **WARNING**: As X-Plane's scenery evolves, some drawing phases may cease to + * exist and new ones may be invented. If you need a particularly specific + * use of these codes, consult Austin and/or be prepared to revise your code + * as X-Plane evolves. + * + */ +enum { +#if defined(XPLM_DEPRECATED) + /* Deprecated as of XPLM302. This is the earliest point at which you can draw * + * in 3-d. */ + xplm_Phase_FirstScene = 0, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated as of XPLM302. Drawing of land and water. */ + xplm_Phase_Terrain = 5, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated as of XPLM302. Drawing runways and other airport detail. */ + xplm_Phase_Airports = 10, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated as of XPLM302. Drawing roads, trails, trains, etc. */ + xplm_Phase_Vectors = 15, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated as of XPLM302. 3-d objects (houses, smokestacks, etc. */ + xplm_Phase_Objects = 20, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated as of XPLM302. External views of airplanes, both yours and the * + * AI aircraft. */ + xplm_Phase_Airplanes = 25, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated as of XPLM302. This is the last point at which you can draw in * + * 3-d. */ + xplm_Phase_LastScene = 30, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM302) + /* A chance to do modern 3D drawing. */ + xplm_Phase_Modern3D = 31, + +#endif /* XPLM302 */ + /* This is the first phase where you can draw in 2-d. */ + xplm_Phase_FirstCockpit = 35, + + /* The non-moving parts of the aircraft panel. */ + xplm_Phase_Panel = 40, + + /* The moving parts of the aircraft panel. */ + xplm_Phase_Gauges = 45, + + /* Floating windows from plugins. */ + xplm_Phase_Window = 50, + + /* The last chance to draw in 2d. */ + xplm_Phase_LastCockpit = 55, + +#if defined(XPLM200) + /* Removed as of XPLM300; Use the full-blown XPLMMap API instead. */ + xplm_Phase_LocalMap3D = 100, + +#endif /* XPLM200 */ +#if defined(XPLM200) + /* Removed as of XPLM300; Use the full-blown XPLMMap API instead. */ + xplm_Phase_LocalMap2D = 101, + +#endif /* XPLM200 */ +#if defined(XPLM200) + /* Removed as of XPLM300; Use the full-blown XPLMMap API instead. */ + xplm_Phase_LocalMapProfile = 102, + +#endif /* XPLM200 */ + +}; +typedef int XPLMDrawingPhase; + +/* + * XPLMDrawCallback_f + * + * This is the prototype for a low level drawing callback. You are passed in + * the phase and whether it is before or after. If you are before the phase, + * return 1 to let X-Plane draw or 0 to suppress X-Plane drawing. If you are + * after the phase the return value is ignored. + * + * Refcon is a unique value that you specify when registering the callback, + * allowing you to slip a pointer to your own data to the callback. + * + * Upon entry the OpenGL context will be correctly set up for you and OpenGL + * will be in 'local' coordinates for 3d drawing and panel coordinates for 2d + * drawing. The OpenGL state (texturing, etc.) will be unknown. + * + */ +typedef int (* XPLMDrawCallback_f)( + XPLMDrawingPhase inPhase, + int inIsBefore, + void * inRefcon); + +/* + * XPLMRegisterDrawCallback + * + * This routine registers a low level drawing callback. Pass in the phase you + * want to be called for and whether you want to be called before or after. + * This routine returns 1 if the registration was successful, or 0 if the + * phase does not exist in this version of X-Plane. You may register a + * callback multiple times for the same or different phases as long as the + * refcon is unique each time. + * + * Note that this function will likely be removed during the X-Plane 11 run as + * part of the transition to Vulkan/Metal/etc. See the XPLMInstance API for + * future-proof drawing of 3-D objects. + * + */ +XPLM_API int XPLMRegisterDrawCallback( + XPLMDrawCallback_f inCallback, + XPLMDrawingPhase inPhase, + int inWantsBefore, + void * inRefcon); + +/* + * XPLMUnregisterDrawCallback + * + * This routine unregisters a draw callback. You must unregister a callback + * for each time you register a callback if you have registered it multiple + * times with different refcons. The routine returns 1 if it can find the + * callback to unregister, 0 otherwise. + * + * Note that this function will likely be removed during the X-Plane 11 run as + * part of the transition to Vulkan/Metal/etc. See the XPLMInstance API for + * future-proof drawing of 3-D objects. + * + */ +XPLM_API int XPLMUnregisterDrawCallback( + XPLMDrawCallback_f inCallback, + XPLMDrawingPhase inPhase, + int inWantsBefore, + void * inRefcon); + +/*************************************************************************** + * WINDOW API + ***************************************************************************/ +/* + * The window API provides a high-level abstraction for drawing with UI + * interaction. + * + * Windows may operate in one of two modes: legacy (for plugins compiled + * against old versions of the XPLM, as well as windows created via the + * deprecated XPLMCreateWindow() function, rather than XPLMCreateWindowEx()), + * or modern (for windows compiled against the XPLM300 or newer API, and + * created via XPLMCreateWindowEx()). + * + * Modern windows have access to new X-Plane 11 windowing features, like + * support for new positioning modes (including being "popped out" into their + * own first-class window in the operating system). They can also optionally + * be decorated in the style of X-Plane 11 windows (like the map). + * + * Modern windows operate in "boxel" units. A boxel ("box of pixels") is a + * unit of virtual pixels which, depending on X-Plane's scaling, may + * correspond to an arbitrary NxN "box" of real pixels on screen. Because + * X-Plane handles this scaling automatically, you can effectively treat the + * units as though you were simply drawing in pixels, and know that when + * X-Plane is running with 150% or 200% scaling, your drawing will be + * automatically scaled (and likewise all mouse coordinates, screen bounds, + * etc. will also be auto-scaled). + * + * In contrast, legacy windows draw in true screen pixels, and thus tend to + * look quite small when X-Plane is operating in a scaled mode. + * + * Legacy windows have their origin in the lower left of the main X-Plane + * window. In contrast, since modern windows are not constrained to the main + * window, they have their origin in the lower left of the entire global + * desktop space, and the lower left of the main X-Plane window is not + * guaranteed to be (0, 0). In both cases, x increases as you move left, and y + * increases as you move up. + * + */ + + +/* + * XPLMWindowID + * + * This is an opaque identifier for a window. You use it to control your + * window. When you create a window (via either XPLMCreateWindow() or + * XPLMCreateWindowEx()), you will specify callbacks to handle drawing, mouse + * interaction, etc. + * + */ +typedef void * XPLMWindowID; + +/* + * XPLMDrawWindow_f + * + * A callback to handle 2-D drawing of your window. You are passed in your + * window and its refcon. Draw the window. You can use other XPLM functions + * from this header to find the current dimensions of your window, etc. When + * this callback is called, the OpenGL context will be set properly for 2-D + * window drawing. + * + * **Note**: Because you are drawing your window over a background, you can + * make a translucent window easily by simply not filling in your entire + * window's bounds. + * + */ +typedef void (* XPLMDrawWindow_f)( + XPLMWindowID inWindowID, + void * inRefcon); + +/* + * XPLMHandleKey_f + * + * This function is called when a key is pressed or keyboard focus is taken + * away from your window. If losingFocus is 1, you are losing the keyboard + * focus, otherwise a key was pressed and inKey contains its character. You + * are also passed your window and a refcon. + * + * Warning: this API declares virtual keys as a signed character; however the + * VKEY #define macros in XPLMDefs.h define the vkeys using unsigned values + * (that is 0x80 instead of -0x80). So you may need to cast the incoming vkey + * to an unsigned char to get correct comparisons in C. + * + */ +typedef void (* XPLMHandleKey_f)( + XPLMWindowID inWindowID, + char inKey, + XPLMKeyFlags inFlags, + char inVirtualKey, + void * inRefcon, + int losingFocus); + +/* + * XPLMMouseStatus + * + * When the mouse is clicked, your mouse click routine is called repeatedly. + * It is first called with the mouse down message. It is then called zero or + * more times with the mouse-drag message, and finally it is called once with + * the mouse up message. All of these messages will be directed to the same + * window; you are guaranteed to not receive a drag or mouse-up event without + * first receiving the corresponding mouse-down. + * + */ +enum { + xplm_MouseDown = 1, + + xplm_MouseDrag = 2, + + xplm_MouseUp = 3, + + +}; +typedef int XPLMMouseStatus; + +/* + * XPLMHandleMouseClick_f + * + * You receive this call for one of three events: + * + * - when the user clicks the mouse button down + * - (optionally) when the user drags the mouse after a down-click, but before + * the up-click + * - when the user releases the down-clicked mouse button. + * + * You receive the x and y of the click, your window, and a refcon. Return 1 + * to consume the click, or 0 to pass it through. + * + * WARNING: passing clicks through windows (as of this writing) causes mouse + * tracking problems in X-Plane; do not use this feature! + * + * The units for x and y values match the units used in your window. Thus, for + * "modern" windows (those created via XPLMCreateWindowEx() and compiled + * against the XPLM300 library), the units are boxels, while legacy windows + * will get pixels. Legacy windows have their origin in the lower left of the + * main X-Plane window, while modern windows have their origin in the lower + * left of the global desktop space. In both cases, x increases as you move + * right, and y increases as you move up. + * + */ +typedef int (* XPLMHandleMouseClick_f)( + XPLMWindowID inWindowID, + int x, + int y, + XPLMMouseStatus inMouse, + void * inRefcon); + +#if defined(XPLM200) +/* + * XPLMCursorStatus + * + * XPLMCursorStatus describes how you would like X-Plane to manage the cursor. + * See XPLMHandleCursor_f for more info. + * + */ +enum { + /* X-Plane manages the cursor normally, plugin does not affect the cusrsor. */ + xplm_CursorDefault = 0, + + /* X-Plane hides the cursor. */ + xplm_CursorHidden = 1, + + /* X-Plane shows the cursor as the default arrow. */ + xplm_CursorArrow = 2, + + /* X-Plane shows the cursor but lets you select an OS cursor. */ + xplm_CursorCustom = 3, + + +}; +typedef int XPLMCursorStatus; +#endif /* XPLM200 */ + +#if defined(XPLM200) +/* + * XPLMHandleCursor_f + * + * The SDK calls your cursor status callback when the mouse is over your + * plugin window. Return a cursor status code to indicate how you would like + * X-Plane to manage the cursor. If you return xplm_CursorDefault, the SDK + * will try lower-Z-order plugin windows, then let the sim manage the cursor. + * + * Note: you should never show or hide the cursor yourself---these APIs are + * typically reference-counted and thus cannot safely and predictably be used + * by the SDK. Instead return one of xplm_CursorHidden to hide the cursor or + * xplm_CursorArrow/xplm_CursorCustom to show the cursor. + * + * If you want to implement a custom cursor by drawing a cursor in OpenGL, use + * xplm_CursorHidden to hide the OS cursor and draw the cursor using a 2-d + * drawing callback (after xplm_Phase_Window is probably a good choice, but + * see deprecation warnings on the drawing APIs!). If you want to use a + * custom OS-based cursor, use xplm_CursorCustom to ask X-Plane to show the + * cursor but not affect its image. You can then use an OS specific call like + * SetThemeCursor (Mac) or SetCursor/LoadCursor (Windows). + * + * The units for x and y values match the units used in your window. Thus, for + * "modern" windows (those created via XPLMCreateWindowEx() and compiled + * against the XPLM300 library), the units are boxels, while legacy windows + * will get pixels. Legacy windows have their origin in the lower left of the + * main X-Plane window, while modern windows have their origin in the lower + * left of the global desktop space. In both cases, x increases as you move + * right, and y increases as you move up. + * + */ +typedef XPLMCursorStatus (* XPLMHandleCursor_f)( + XPLMWindowID inWindowID, + int x, + int y, + void * inRefcon); +#endif /* XPLM200 */ + +#if defined(XPLM200) +/* + * XPLMHandleMouseWheel_f + * + * The SDK calls your mouse wheel callback when one of the mouse wheels is + * scrolled within your window. Return 1 to consume the mouse wheel movement + * or 0 to pass them on to a lower window. (If your window appears opaque to + * the user, you should consume mouse wheel scrolling even if it does + * nothing.) The number of "clicks" indicates how far the wheel was turned + * since the last callback. The wheel is 0 for the vertical axis or 1 for the + * horizontal axis (for OS/mouse combinations that support this). + * + * The units for x and y values match the units used in your window. Thus, for + * "modern" windows (those created via XPLMCreateWindowEx() and compiled + * against the XPLM300 library), the units are boxels, while legacy windows + * will get pixels. Legacy windows have their origin in the lower left of the + * main X-Plane window, while modern windows have their origin in the lower + * left of the global desktop space. In both cases, x increases as you move + * right, and y increases as you move up. + * + */ +typedef int (* XPLMHandleMouseWheel_f)( + XPLMWindowID inWindowID, + int x, + int y, + int wheel, + int clicks, + void * inRefcon); +#endif /* XPLM200 */ + +#if defined(XPLM300) +/* + * XPLMWindowLayer + * + * XPLMWindowLayer describes where in the ordering of windows X-Plane should + * place a particular window. Windows in higher layers cover windows in lower + * layers. So, a given window might be at the top of its particular layer, but + * it might still be obscured by a window in a higher layer. (This happens + * frequently when floating windows, like X-Plane's map, are covered by a + * modal alert.) + * + * Your window's layer can only be specified when you create the window (in + * the XPLMCreateWindow_t you pass to XPLMCreateWindowEx()). For this reason, + * layering only applies to windows created with new X-Plane 11 GUI features. + * (Windows created using the older XPLMCreateWindow(), or windows compiled + * against a pre-XPLM300 version of the SDK will simply be placed in the + * flight overlay window layer.) + * + */ +enum { + /* The lowest layer, used for HUD-like displays while flying. */ + xplm_WindowLayerFlightOverlay = 0, + + /* Windows that "float" over the sim, like the X-Plane 11 map does. If you are* + * not sure which layer to create your window in, choose floating. */ + xplm_WindowLayerFloatingWindows = 1, + + /* An interruptive modal that covers the sim with a transparent black overlay * + * to draw the user's focus to the alert */ + xplm_WindowLayerModal = 2, + + /* "Growl"-style notifications that are visible in a corner of the screen, * + * even over modals */ + xplm_WindowLayerGrowlNotifications = 3, + + +}; +typedef int XPLMWindowLayer; +#endif /* XPLM300 */ + +#if defined(XPLM301) +/* + * XPLMWindowDecoration + * + * XPLMWindowDecoration describes how "modern" windows will be displayed. This + * impacts both how X-Plane draws your window as well as certain mouse + * handlers. + * + * Your window's decoration can only be specified when you create the window + * (in the XPLMCreateWindow_t you pass to XPLMCreateWindowEx()). + * + */ +enum { + /* X-Plane will draw no decoration for your window, and apply no automatic * + * click handlers. The window will not stop click from passing through its * + * bounds. This is suitable for "windows" which request, say, the full screen * + * bounds, then only draw in a small portion of the available area. */ + xplm_WindowDecorationNone = 0, + + /* The default decoration for "native" windows, like the map. Provides a solid* + * background, as well as click handlers for resizing and dragging the window.*/ + xplm_WindowDecorationRoundRectangle = 1, + + /* X-Plane will draw no decoration for your window, nor will it provide resize* + * handlers for your window edges, but it will stop clicks from passing * + * through your windows bounds. */ + xplm_WindowDecorationSelfDecorated = 2, + + /* Like self-decorated, but with resizing; X-Plane will draw no decoration for* + * your window, but it will stop clicks from passing through your windows * + * bounds, and provide automatic mouse handlers for resizing. */ + xplm_WindowDecorationSelfDecoratedResizable = 3, + + +}; +typedef int XPLMWindowDecoration; +#endif /* XPLM301 */ + +#if defined(XPLM200) +/* + * XPLMCreateWindow_t + * + * The XPMCreateWindow_t structure defines all of the parameters used to + * create a modern window using XPLMCreateWindowEx(). The structure will be + * expanded in future SDK APIs to include more features. Always set the + * structSize member to the size of your struct in bytes! + * + * All windows created by this function in the XPLM300 version of the API are + * created with the new X-Plane 11 GUI features. This means your plugin will + * get to "know" about the existence of X-Plane windows other than the main + * window. All drawing and mouse callbacks for your window will occur in + * "boxels," giving your windows automatic support for high-DPI scaling in + * X-Plane. In addition, your windows can opt-in to decoration with the + * X-Plane 11 window styling, and you can use the + * XPLMSetWindowPositioningMode() API to make your window "popped out" into a + * first-class operating system window. + * + * Note that this requires dealing with your window's bounds in "global + * desktop" positioning units, rather than the traditional panel coordinate + * system. In global desktop coordinates, the main X-Plane window may not have + * its origin at coordinate (0, 0), and your own window may have negative + * coordinates. Assuming you don't implicitly assume (0, 0) as your origin, + * the only API change you should need is to start using + * XPLMGetMouseLocationGlobal() rather than XPLMGetMouseLocation(), and + * XPLMGetScreenBoundsGlobal() instead of XPLMGetScreenSize(). + * + * If you ask to be decorated as a floating window, you'll get the blue window + * control bar and blue backing that you see in X-Plane 11's normal "floating" + * windows (like the map). + * + */ +typedef struct { + /* Used to inform XPLMCreateWindowEx() of the SDK version you compiled * + * against; should always be set to sizeof(XPLMCreateWindow_t) */ + int structSize; + /* Left bound, in global desktop boxels */ + int left; + /* Top bound, in global desktop boxels */ + int top; + /* Right bound, in global desktop boxels */ + int right; + /* Bottom bound, in global desktop boxels */ + int bottom; + int visible; + XPLMDrawWindow_f drawWindowFunc; + /* A callback to handle the user left-clicking within your window (or NULL to * + * ignore left clicks) */ + XPLMHandleMouseClick_f handleMouseClickFunc; + XPLMHandleKey_f handleKeyFunc; + XPLMHandleCursor_f handleCursorFunc; + XPLMHandleMouseWheel_f handleMouseWheelFunc; + /* A reference which will be passed into each of your window callbacks. Use * + * this to pass information to yourself as needed. */ + void * refcon; +#if defined(XPLM301) + /* Specifies the type of X-Plane 11-style "wrapper" you want around your * + * window, if any */ + XPLMWindowDecoration decorateAsFloatingWindow; +#endif /* XPLM301 */ +#if defined(XPLM300) + XPLMWindowLayer layer; +#endif /* XPLM300 */ +#if defined(XPLM300) + /* A callback to handle the user right-clicking within your window (or NULL to* + * ignore right clicks) */ + XPLMHandleMouseClick_f handleRightClickFunc; +#endif /* XPLM300 */ +} XPLMCreateWindow_t; +#endif /* XPLM200 */ + +#if defined(XPLM200) +/* + * XPLMCreateWindowEx + * + * This routine creates a new "modern" window. You pass in an + * XPLMCreateWindow_t structure with all of the fields set in. You must set + * the structSize of the structure to the size of the actual structure you + * used. Also, you must provide functions for every callback---you may not + * leave them null! (If you do not support the cursor or mouse wheel, use + * functions that return the default values.) + * + */ +XPLM_API XPLMWindowID XPLMCreateWindowEx( + XPLMCreateWindow_t * inParams); +#endif /* XPLM200 */ + +/* + * XPLMCreateWindow + * + * Deprecated as of XPLM300. + * + * This routine creates a new legacy window. Unlike modern windows (created + * via XPLMCreateWindowEx()), legacy windows do not have access to X-Plane 11 + * features like automatic scaling for high-DPI screens, native window styles, + * or support for being "popped out" into first-class operating system + * windows. + * + * Pass in the dimensions and offsets to the window's bottom left corner from + * the bottom left of the screen. You can specify whether the window is + * initially visible or not. Also, you pass in three callbacks to run the + * window and a refcon. This function returns a window ID you can use to + * refer to the new window. + * + * NOTE: Legacy windows do not have "frames"; you are responsible for drawing + * the background and frame of the window. Higher level libraries have + * routines which make this easy. + * + */ +XPLM_API XPLMWindowID XPLMCreateWindow( + int inLeft, + int inTop, + int inRight, + int inBottom, + int inIsVisible, + XPLMDrawWindow_f inDrawCallback, + XPLMHandleKey_f inKeyCallback, + XPLMHandleMouseClick_f inMouseCallback, + void * inRefcon); + +/* + * XPLMDestroyWindow + * + * This routine destroys a window. The window's callbacks are not called + * after this call. Keyboard focus is removed from the window before + * destroying it. + * + */ +XPLM_API void XPLMDestroyWindow( + XPLMWindowID inWindowID); + +/* + * XPLMGetScreenSize + * + * This routine returns the size of the main X-Plane OpenGL window in pixels. + * This number can be used to get a rough idea of the amount of detail the + * user will be able to see when drawing in 3-d. + * + */ +XPLM_API void XPLMGetScreenSize( + int * outWidth, /* Can be NULL */ + int * outHeight); /* Can be NULL */ + +#if defined(XPLM300) +/* + * XPLMGetScreenBoundsGlobal + * + * This routine returns the bounds of the "global" X-Plane desktop, in boxels. + * Unlike the non-global version XPLMGetScreenSize(), this is multi-monitor + * aware. There are three primary consequences of multimonitor awareness. + * + * First, if the user is running X-Plane in full-screen on two or more + * monitors (typically configured using one full-screen window per monitor), + * the global desktop will be sized to include all X-Plane windows. + * + * Second, the origin of the screen coordinates is not guaranteed to be (0, + * 0). Suppose the user has two displays side-by-side, both running at 1080p. + * Suppose further that they've configured their OS to make the left display + * their "primary" monitor, and that X-Plane is running in full-screen on + * their right monitor only. In this case, the global desktop bounds would be + * the rectangle from (1920, 0) to (3840, 1080). If the user later asked + * X-Plane to draw on their primary monitor as well, the bounds would change + * to (0, 0) to (3840, 1080). + * + * Finally, if the usable area of the virtual desktop is not a perfect + * rectangle (for instance, because the monitors have different resolutions or + * because one monitor is configured in the operating system to be above and + * to the right of the other), the global desktop will include any wasted + * space. Thus, if you have two 1080p monitors, and monitor 2 is configured to + * have its bottom left touch monitor 1's upper right, your global desktop + * area would be the rectangle from (0, 0) to (3840, 2160). + * + * Note that popped-out windows (windows drawn in their own operating system + * windows, rather than "floating" within X-Plane) are not included in these + * bounds. + * + */ +XPLM_API void XPLMGetScreenBoundsGlobal( + int * outLeft, /* Can be NULL */ + int * outTop, /* Can be NULL */ + int * outRight, /* Can be NULL */ + int * outBottom); /* Can be NULL */ +#endif /* XPLM300 */ + +#if defined(XPLM300) +/* + * XPLMReceiveMonitorBoundsGlobal_f + * + * This function is informed of the global bounds (in boxels) of a particular + * monitor within the X-Plane global desktop space. Note that X-Plane must be + * running in full screen on a monitor in order for that monitor to be passed + * to you in this callback. + * + */ +typedef void (* XPLMReceiveMonitorBoundsGlobal_f)( + int inMonitorIndex, + int inLeftBx, + int inTopBx, + int inRightBx, + int inBottomBx, + void * inRefcon); +#endif /* XPLM300 */ + +#if defined(XPLM300) +/* + * XPLMGetAllMonitorBoundsGlobal + * + * This routine immediately calls you back with the bounds (in boxels) of each + * full-screen X-Plane window within the X-Plane global desktop space. Note + * that if a monitor is *not* covered by an X-Plane window, you cannot get its + * bounds this way. Likewise, monitors with only an X-Plane window (not in + * full-screen mode) will not be included. + * + * If X-Plane is running in full-screen and your monitors are of the same size + * and configured contiguously in the OS, then the combined global bounds of + * all full-screen monitors will match the total global desktop bounds, as + * returned by XPLMGetScreenBoundsGlobal(). (Of course, if X-Plane is running + * in windowed mode, this will not be the case. Likewise, if you have + * differently sized monitors, the global desktop space will include wasted + * space.) + * + * Note that this function's monitor indices match those provided by + * XPLMGetAllMonitorBoundsOS(), but the coordinates are different (since the + * X-Plane global desktop may not match the operating system's global desktop, + * and one X-Plane boxel may be larger than one pixel due to 150% or 200% + * scaling). + * + */ +XPLM_API void XPLMGetAllMonitorBoundsGlobal( + XPLMReceiveMonitorBoundsGlobal_f inMonitorBoundsCallback, + void * inRefcon); +#endif /* XPLM300 */ + +#if defined(XPLM300) +/* + * XPLMReceiveMonitorBoundsOS_f + * + * This function is informed of the global bounds (in pixels) of a particular + * monitor within the operating system's global desktop space. Note that a + * monitor index being passed to you here does not indicate that X-Plane is + * running in full screen on this monitor, or even that any X-Plane windows + * exist on this monitor. + * + */ +typedef void (* XPLMReceiveMonitorBoundsOS_f)( + int inMonitorIndex, + int inLeftPx, + int inTopPx, + int inRightPx, + int inBottomPx, + void * inRefcon); +#endif /* XPLM300 */ + +#if defined(XPLM300) +/* + * XPLMGetAllMonitorBoundsOS + * + * This routine immediately calls you back with the bounds (in pixels) of each + * monitor within the operating system's global desktop space. Note that + * unlike XPLMGetAllMonitorBoundsGlobal(), this may include monitors that have + * no X-Plane window on them. + * + * Note that this function's monitor indices match those provided by + * XPLMGetAllMonitorBoundsGlobal(), but the coordinates are different (since + * the X-Plane global desktop may not match the operating system's global + * desktop, and one X-Plane boxel may be larger than one pixel). + * + */ +XPLM_API void XPLMGetAllMonitorBoundsOS( + XPLMReceiveMonitorBoundsOS_f inMonitorBoundsCallback, + void * inRefcon); +#endif /* XPLM300 */ + +/* + * XPLMGetMouseLocation + * + * Deprecated in XPLM300. Modern windows should use + * XPLMGetMouseLocationGlobal() instead. + * + * This routine returns the current mouse location in pixels relative to the + * main X-Plane window. The bottom left corner of the main window is (0, 0). + * Pass NULL to not receive info about either parameter. + * + * Because this function gives the mouse position relative to the main X-Plane + * window (rather than in global bounds), this function should only be used by + * legacy windows. Modern windows should instead get the mouse position in + * global desktop coordinates using XPLMGetMouseLocationGlobal(). + * + * Note that unlike XPLMGetMouseLocationGlobal(), if the mouse goes outside + * the user's main monitor (for instance, to a pop out window or a secondary + * monitor), this function will not reflect it. + * + */ +XPLM_API void XPLMGetMouseLocation( + int * outX, /* Can be NULL */ + int * outY); /* Can be NULL */ + +#if defined(XPLM300) +/* + * XPLMGetMouseLocationGlobal + * + * Returns the current mouse location in global desktop boxels. Unlike + * XPLMGetMouseLocation(), the bottom left of the main X-Plane window is not + * guaranteed to be (0, 0)---instead, the origin is the lower left of the + * entire global desktop space. In addition, this routine gives the real mouse + * location when the mouse goes to X-Plane windows other than the primary + * display. Thus, it can be used with both pop-out windows and secondary + * monitors. + * + * This is the mouse location function to use with modern windows (i.e., those + * created by XPLMCreateWindowEx()). + * + * Pass NULL to not receive info about either parameter. + * + */ +XPLM_API void XPLMGetMouseLocationGlobal( + int * outX, /* Can be NULL */ + int * outY); /* Can be NULL */ +#endif /* XPLM300 */ + +/* + * XPLMGetWindowGeometry + * + * This routine returns the position and size of a window. The units and + * coordinate system vary depending on the type of window you have. + * + * If this is a legacy window (one compiled against a pre-XPLM300 version of + * the SDK, or an XPLM300 window that was not created using + * XPLMCreateWindowEx()), the units are pixels relative to the main X-Plane + * display. + * + * If, on the other hand, this is a new X-Plane 11-style window (compiled + * against the XPLM300 SDK and created using XPLMCreateWindowEx()), the units + * are global desktop boxels. + * + * Pass NULL to not receive any paramter. + * + */ +XPLM_API void XPLMGetWindowGeometry( + XPLMWindowID inWindowID, + int * outLeft, /* Can be NULL */ + int * outTop, /* Can be NULL */ + int * outRight, /* Can be NULL */ + int * outBottom); /* Can be NULL */ + +/* + * XPLMSetWindowGeometry + * + * This routine allows you to set the position and size of a window. + * + * The units and coordinate system match those of XPLMGetWindowGeometry(). + * That is, modern windows use global desktop boxel coordinates, while legacy + * windows use pixels relative to the main X-Plane display. + * + * Note that this only applies to "floating" windows (that is, windows that + * are drawn within the X-Plane simulation windows, rather than being "popped + * out" into their own first-class operating system windows). To set the + * position of windows whose positioning mode is xplm_WindowPopOut, you'll + * need to instead use XPLMSetWindowGeometryOS(). + * + */ +XPLM_API void XPLMSetWindowGeometry( + XPLMWindowID inWindowID, + int inLeft, + int inTop, + int inRight, + int inBottom); + +#if defined(XPLM300) +/* + * XPLMGetWindowGeometryOS + * + * This routine returns the position and size of a "popped out" window (i.e., + * a window whose positioning mode is xplm_WindowPopOut), in operating system + * pixels. Pass NULL to not receive any parameter. + * + */ +XPLM_API void XPLMGetWindowGeometryOS( + XPLMWindowID inWindowID, + int * outLeft, /* Can be NULL */ + int * outTop, /* Can be NULL */ + int * outRight, /* Can be NULL */ + int * outBottom); /* Can be NULL */ +#endif /* XPLM300 */ + +#if defined(XPLM300) +/* + * XPLMSetWindowGeometryOS + * + * This routine allows you to set the position and size, in operating system + * pixel coordinates, of a popped out window (that is, a window whose + * positioning mode is xplm_WindowPopOut, which exists outside the X-Plane + * simulation window, in its own first-class operating system window). + * + * Note that you are responsible for ensuring both that your window is popped + * out (using XPLMWindowIsPoppedOut()) and that a monitor really exists at the + * OS coordinates you provide (using XPLMGetAllMonitorBoundsOS()). + * + */ +XPLM_API void XPLMSetWindowGeometryOS( + XPLMWindowID inWindowID, + int inLeft, + int inTop, + int inRight, + int inBottom); +#endif /* XPLM300 */ + +#if defined(XPLM301) +/* + * XPLMGetWindowGeometryVR + * + * Returns the width and height, in boxels, of a window in VR. Note that you + * are responsible for ensuring your window is in VR (using + * XPLMWindowIsInVR()). + * + */ +XPLM_API void XPLMGetWindowGeometryVR( + XPLMWindowID inWindowID, + int * outWidthBoxels, /* Can be NULL */ + int * outHeightBoxels); /* Can be NULL */ +#endif /* XPLM301 */ + +#if defined(XPLM301) +/* + * XPLMSetWindowGeometryVR + * + * This routine allows you to set the size, in boxels, of a window in VR (that + * is, a window whose positioning mode is xplm_WindowVR). + * + * Note that you are responsible for ensuring your window is in VR (using + * XPLMWindowIsInVR()). + * + */ +XPLM_API void XPLMSetWindowGeometryVR( + XPLMWindowID inWindowID, + int widthBoxels, + int heightBoxels); +#endif /* XPLM301 */ + +/* + * XPLMGetWindowIsVisible + * + * Returns true (1) if the specified window is visible. + * + */ +XPLM_API int XPLMGetWindowIsVisible( + XPLMWindowID inWindowID); + +/* + * XPLMSetWindowIsVisible + * + * This routine shows or hides a window. + * + */ +XPLM_API void XPLMSetWindowIsVisible( + XPLMWindowID inWindowID, + int inIsVisible); + +#if defined(XPLM300) +/* + * XPLMWindowIsPoppedOut + * + * True if this window has been popped out (making it a first-class window in + * the operating system), which in turn is true if and only if you have set + * the window's positioning mode to xplm_WindowPopOut. + * + * Only applies to modern windows. (Windows created using the deprecated + * XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of + * the SDK cannot be popped out.) + * + */ +XPLM_API int XPLMWindowIsPoppedOut( + XPLMWindowID inWindowID); +#endif /* XPLM300 */ + +#if defined(XPLM301) +/* + * XPLMWindowIsInVR + * + * True if this window has been moved to the virtual reality (VR) headset, + * which in turn is true if and only if you have set the window's positioning + * mode to xplm_WindowVR. + * + * Only applies to modern windows. (Windows created using the deprecated + * XPLMCreateWindow(), or windows compiled against a pre-XPLM301 version of + * the SDK cannot be moved to VR.) + * + */ +XPLM_API int XPLMWindowIsInVR( + XPLMWindowID inWindowID); +#endif /* XPLM301 */ + +#if defined(XPLM300) +/* + * XPLMSetWindowGravity + * + * A window's "gravity" controls how the window shifts as the whole X-Plane + * window resizes. A gravity of 1 means the window maintains its positioning + * relative to the right or top edges, 0 the left/bottom, and 0.5 keeps it + * centered. + * + * Default gravity is (0, 1, 0, 1), meaning your window will maintain its + * position relative to the top left and will not change size as its + * containing window grows. + * + * If you wanted, say, a window that sticks to the top of the screen (with a + * constant height), but which grows to take the full width of the window, you + * would pass (0, 1, 1, 1). Because your left and right edges would maintain + * their positioning relative to their respective edges of the screen, the + * whole width of your window would change with the X-Plane window. + * + * Only applies to modern windows. (Windows created using the deprecated + * XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of + * the SDK will simply get the default gravity.) + * + */ +XPLM_API void XPLMSetWindowGravity( + XPLMWindowID inWindowID, + float inLeftGravity, + float inTopGravity, + float inRightGravity, + float inBottomGravity); +#endif /* XPLM300 */ + +#if defined(XPLM300) +/* + * XPLMSetWindowResizingLimits + * + * Sets the minimum and maximum size of the client rectangle of the given + * window. (That is, it does not include any window styling that you might + * have asked X-Plane to apply on your behalf.) All resizing operations are + * constrained to these sizes. + * + * Only applies to modern windows. (Windows created using the deprecated + * XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of + * the SDK will have no minimum or maximum size.) + * + */ +XPLM_API void XPLMSetWindowResizingLimits( + XPLMWindowID inWindowID, + int inMinWidthBoxels, + int inMinHeightBoxels, + int inMaxWidthBoxels, + int inMaxHeightBoxels); +#endif /* XPLM300 */ + +#if defined(XPLM300) +/* + * XPLMWindowPositioningMode + * + * XPLMWindowPositionMode describes how X-Plane will position your window on + * the user's screen. X-Plane will maintain this positioning mode even as the + * user resizes their window or adds/removes full-screen monitors. + * + * Positioning mode can only be set for "modern" windows (that is, windows + * created using XPLMCreateWindowEx() and compiled against the XPLM300 SDK). + * Windows created using the deprecated XPLMCreateWindow(), or windows + * compiled against a pre-XPLM300 version of the SDK will simply get the + * "free" positioning mode. + * + */ +enum { + /* The default positioning mode. Set the window geometry and its future * + * position will be determined by its window gravity, resizing limits, and * + * user interactions. */ + xplm_WindowPositionFree = 0, + + /* Keep the window centered on the monitor you specify */ + xplm_WindowCenterOnMonitor = 1, + + /* Keep the window full screen on the monitor you specify */ + xplm_WindowFullScreenOnMonitor = 2, + + /* Like gui_window_full_screen_on_monitor, but stretches over *all* monitors * + * and popout windows. This is an obscure one... unless you have a very good * + * reason to need it, you probably don't! */ + xplm_WindowFullScreenOnAllMonitors = 3, + + /* A first-class window in the operating system, completely separate from the * + * X-Plane window(s) */ + xplm_WindowPopOut = 4, + +#if defined(XPLM301) + /* A floating window visible on the VR headset */ + xplm_WindowVR = 5, + +#endif /* XPLM301 */ + +}; +typedef int XPLMWindowPositioningMode; +#endif /* XPLM300 */ + +#if defined(XPLM300) +/* + * XPLMSetWindowPositioningMode + * + * Sets the policy for how X-Plane will position your window. + * + * Some positioning modes apply to a particular monitor. For those modes, you + * can pass a negative monitor index to position the window on the main + * X-Plane monitor (the screen with the X-Plane menu bar at the top). Or, if + * you have a specific monitor you want to position your window on, you can + * pass a real monitor index as received from, e.g., + * XPLMGetAllMonitorBoundsOS(). + * + * Only applies to modern windows. (Windows created using the deprecated + * XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of + * the SDK will always use xplm_WindowPositionFree.) + * + */ +XPLM_API void XPLMSetWindowPositioningMode( + XPLMWindowID inWindowID, + XPLMWindowPositioningMode inPositioningMode, + int inMonitorIndex); +#endif /* XPLM300 */ + +#if defined(XPLM300) +/* + * XPLMSetWindowTitle + * + * Sets the name for a window. This only applies to windows that opted-in to + * styling as an X-Plane 11 floating window (i.e., with styling mode + * xplm_WindowDecorationRoundRectangle) when they were created using + * XPLMCreateWindowEx(). + * + */ +XPLM_API void XPLMSetWindowTitle( + XPLMWindowID inWindowID, + const char * inWindowTitle); +#endif /* XPLM300 */ + +/* + * XPLMGetWindowRefCon + * + * Returns a window's reference constant, the unique value you can use for + * your own purposes. + * + */ +XPLM_API void * XPLMGetWindowRefCon( + XPLMWindowID inWindowID); + +/* + * XPLMSetWindowRefCon + * + * Sets a window's reference constant. Use this to pass data to yourself in + * the callbacks. + * + */ +XPLM_API void XPLMSetWindowRefCon( + XPLMWindowID inWindowID, + void * inRefcon); + +/* + * XPLMTakeKeyboardFocus + * + * This routine gives a specific window keyboard focus. Keystrokes will be + * sent to that window. Pass a window ID of 0 to remove keyboard focus from + * any plugin-created windows and instead pass keyboard strokes directly to + * X-Plane. + * + */ +XPLM_API void XPLMTakeKeyboardFocus( + XPLMWindowID inWindow); + +/* + * XPLMHasKeyboardFocus + * + * Returns true (1) if the indicated window has keyboard focus. Pass a window + * ID of 0 to see if no plugin window has focus, and all keystrokes will go + * directly to X-Plane. + * + */ +XPLM_API int XPLMHasKeyboardFocus( + XPLMWindowID inWindow); + +/* + * XPLMBringWindowToFront + * + * This routine brings the window to the front of the Z-order for its layer. + * Windows are brought to the front automatically when they are created. + * Beyond that, you should make sure you are front before handling mouse + * clicks. + * + * Note that this only brings your window to the front of its layer + * (XPLMWindowLayer). Thus, if you have a window in the floating window layer + * (xplm_WindowLayerFloatingWindows), but there is a modal window (in layer + * xplm_WindowLayerModal) above you, you would still not be the true frontmost + * window after calling this. (After all, the window layers are strictly + * ordered, and no window in a lower layer can ever be above any window in a + * higher one.) + * + */ +XPLM_API void XPLMBringWindowToFront( + XPLMWindowID inWindow); + +/* + * XPLMIsWindowInFront + * + * This routine returns true if the window you passed in is the frontmost + * visible window in its layer (XPLMWindowLayer). + * + * Thus, if you have a window at the front of the floating window layer + * (xplm_WindowLayerFloatingWindows), this will return true even if there is a + * modal window (in layer xplm_WindowLayerModal) above you. (Not to worry, + * though: in such a case, X-Plane will not pass clicks or keyboard input down + * to your layer until the window above stops "eating" the input.) + * + * Note that legacy windows are always placed in layer + * xplm_WindowLayerFlightOverlay, while modern-style windows default to + * xplm_WindowLayerFloatingWindows. This means it's perfectly consistent to + * have two different plugin-created windows (one legacy, one modern) *both* + * be in the front (of their different layers!) at the same time. + * + */ +XPLM_API int XPLMIsWindowInFront( + XPLMWindowID inWindow); + +/*************************************************************************** + * KEY SNIFFERS + ***************************************************************************/ +/* + * Low-level keyboard handlers. Allows for intercepting keystrokes outside the + * normal rules of the user interface. + * + */ + + +/* + * XPLMKeySniffer_f + * + * This is the prototype for a low level key-sniffing function. Window-based + * UI _should not use this_! The windowing system provides high-level + * mediated keyboard access, via the callbacks you attach to your + * XPLMCreateWindow_t. By comparison, the key sniffer provides low level + * keyboard access. + * + * Key sniffers are provided to allow libraries to provide non-windowed user + * interaction. For example, the MUI library uses a key sniffer to do pop-up + * text entry. + * + * Return 1 to pass the key on to the next sniffer, the window manager, + * X-Plane, or whomever is down stream. Return 0 to consume the key. + * + * Warning: this API declares virtual keys as a signed character; however the + * VKEY #define macros in XPLMDefs.h define the vkeys using unsigned values + * (that is 0x80 instead of -0x80). So you may need to cast the incoming vkey + * to an unsigned char to get correct comparisons in C. + * + */ +typedef int (* XPLMKeySniffer_f)( + char inChar, + XPLMKeyFlags inFlags, + char inVirtualKey, + void * inRefcon); + +/* + * XPLMRegisterKeySniffer + * + * This routine registers a key sniffing callback. You specify whether you + * want to sniff before the window system, or only sniff keys the window + * system does not consume. You should ALMOST ALWAYS sniff non-control keys + * after the window system. When the window system consumes a key, it is + * because the user has "focused" a window. Consuming the key or taking + * action based on the key will produce very weird results. Returns + * 1 if successful. + * + */ +XPLM_API int XPLMRegisterKeySniffer( + XPLMKeySniffer_f inCallback, + int inBeforeWindows, + void * inRefcon); + +/* + * XPLMUnregisterKeySniffer + * + * This routine unregisters a key sniffer. You must unregister a key sniffer + * for every time you register one with the exact same signature. Returns 1 + * if successful. + * + */ +XPLM_API int XPLMUnregisterKeySniffer( + XPLMKeySniffer_f inCallback, + int inBeforeWindows, + void * inRefcon); + +/*************************************************************************** + * HOT KEYS + ***************************************************************************/ +/* + * Keystrokes that can be managed by others. These are lower-level than window + * keyboard handlers (i.e., callbacks you attach to your XPLMCreateWindow_t), + * but higher level than key sniffers. + * + */ + + +/* + * XPLMHotKey_f + * + * Your hot key callback simply takes a pointer of your choosing. + * + */ +typedef void (* XPLMHotKey_f)( + void * inRefcon); + +/* + * XPLMHotKeyID + * + * An opaque ID used to identify a hot key. + * + */ +typedef void * XPLMHotKeyID; + +/* + * XPLMRegisterHotKey + * + * This routine registers a hot key. You specify your preferred key stroke + * virtual key/flag combination, a description of what your callback does (so + * other plug-ins can describe the plug-in to the user for remapping) and a + * callback function and opaque pointer to pass in). A new hot key ID is + * returned. During execution, the actual key associated with your hot key + * may change, but you are insulated from this. + * + */ +XPLM_API XPLMHotKeyID XPLMRegisterHotKey( + char inVirtualKey, + XPLMKeyFlags inFlags, + const char * inDescription, + XPLMHotKey_f inCallback, + void * inRefcon); + +/* + * XPLMUnregisterHotKey + * + * Unregisters a hot key. You can only unregister your own hot keys. + * + */ +XPLM_API void XPLMUnregisterHotKey( + XPLMHotKeyID inHotKey); + +/* + * XPLMCountHotKeys + * + * Returns the number of current hot keys. + * + */ +XPLM_API int XPLMCountHotKeys(void); + +/* + * XPLMGetNthHotKey + * + * Returns a hot key by index, for iteration on all hot keys. + * + */ +XPLM_API XPLMHotKeyID XPLMGetNthHotKey( + int inIndex); + +/* + * XPLMGetHotKeyInfo + * + * Returns information about the hot key. Return NULL for any parameter you + * don't want info about. The description should be at least 512 chars long. + * + */ +XPLM_API void XPLMGetHotKeyInfo( + XPLMHotKeyID inHotKey, + char * outVirtualKey, /* Can be NULL */ + XPLMKeyFlags * outFlags, /* Can be NULL */ + char * outDescription, /* Can be NULL */ + XPLMPluginID * outPlugin); /* Can be NULL */ + +/* + * XPLMSetHotKeyCombination + * + * Remaps a hot key's keystrokes. You may remap another plugin's keystrokes. + * + */ +XPLM_API void XPLMSetHotKeyCombination( + XPLMHotKeyID inHotKey, + char inVirtualKey, + XPLMKeyFlags inFlags); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/SDK/CHeaders/XPLM/XPLMGraphics.h b/src/SDK/CHeaders/XPLM/XPLMGraphics.h new file mode 100755 index 00000000..d7aef52f --- /dev/null +++ b/src/SDK/CHeaders/XPLM/XPLMGraphics.h @@ -0,0 +1,437 @@ +#ifndef _XPLMGraphics_h_ +#define _XPLMGraphics_h_ + +/* + * Copyright 2005-2012 Sandy Barbour and Ben Supnik All rights reserved. See + * license.txt for usage. X-Plane SDK Version: 2.1.1 + * + */ + +/*************************************************************************** + * XPLMGraphics + ***************************************************************************/ +/* + * A few notes on coordinate systems: + * + * X-Plane uses three kinds of coordinates. Global coordinates are specified + * as latitude, longitude and elevation. This coordinate system never changes + * but is not very precise. + * + * OpenGL (or 'local') coordinates are cartesian and shift with the plane. + * They offer more precision and are used for 3-d OpenGL drawing. The X axis + * is aligned east-west with positive X meaning east. The Y axis is aligned + * straight up and down at the point 0,0,0 (but since the earth is round it is + * not truly straight up and down at other points). The Z axis is aligned + * north-south at 0, 0, 0 with positive Z pointing south (but since the earth + * is round it isn't exactly north-south as you move east or west of 0, 0, 0). + * One unit is one meter and the point 0,0,0 is on the surface of the earth at + * sea level for some latitude and longitude picked by the sim such that the + * user's aircraft is reasonably nearby. + * + * 2-d Panel coordinates are 2d, with the X axis horizontal and the Y axis + * vertical. The point 0,0 is the bottom left and 1024,768 is the upper + * right of the screen. This is true no matter what resolution the user's + * monitor is in; when running in higher resolution, graphics will be + * scaled. + * + * Use X-Plane's routines to convert between global and local coordinates. Do + * not attempt to do this conversion yourself; the precise 'roundness' of + * X-Plane's physics model may not match your own, and (to make things + * weirder) the user can potentially customize the physics of the current + * planet. + * + */ + +#include "XPLMDefs.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/*************************************************************************** + * X-PLANE GRAPHICS + ***************************************************************************/ +/* + * These routines allow you to use OpenGL with X-Plane. + * + */ + + +/* + * XPLMTextureID + * + * XPLM Texture IDs name well-known textures in the sim for you to use. This + * allows you to recycle textures from X-Plane, saving VRAM. + * + * *Warning*: do not use these enums. The only remaining use they have is to + * access the legacy compatibility v10 UI texture; if you need this, get it + * via the Widgets library. + * + */ +enum { + /* The bitmap that contains window outlines, button outlines, fonts, etc. */ + xplm_Tex_GeneralInterface = 0, + +#if defined(XPLM_DEPRECATED) + /* The exterior paint for the user's aircraft (daytime). */ + xplm_Tex_AircraftPaint = 1, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* The exterior light map for the user's aircraft. */ + xplm_Tex_AircraftLiteMap = 2, + +#endif /* XPLM_DEPRECATED */ + +}; +typedef int XPLMTextureID; + +/* + * XPLMSetGraphicsState + * + * XPLMSetGraphicsState changes OpenGL's fixed function pipeline state. You + * are not responsible for restoring any state that is accessed via + * XPLMSetGraphicsState, but you are responsible for not accessing this state + * directly. + * + * - inEnableFog - enables or disables fog, equivalent to: glEnable(GL_FOG); + * - inNumberTexUnits - enables or disables a number of multitexturing units. + * If the number is 0, 2d texturing is disabled entirely, as in + * glDisable(GL_TEXTURE_2D); Otherwise, 2d texturing is enabled, and a + * number of multitexturing units are enabled sequentially, starting with + * unit 0, e.g. glActiveTextureARB(GL_TEXTURE0_ARB); glEnable + * (GL_TEXTURE_2D); + * - inEnableLighting - enables or disables OpenGL lighting, e.g. + * glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); + * - inEnableAlphaTesting - enables or disables the alpha test per pixel, e.g. + * glEnable(GL_ALPHA_TEST); + * - inEnableAlphaBlending - enables or disables alpha blending per pixel, + * e.g. glEnable(GL_BLEND); + * - inEnableDepthTesting - enables per pixel depth testing, as in + * glEnable(GL_DEPTH_TEST); + * - inEnableDepthWriting - enables writing back of depth information to the + * depth bufffer, as in glDepthMask(GL_TRUE); + * + * The purpose of this function is to change OpenGL state while keeping + * X-Plane aware of the state changes; this keeps X-Plane from getting + * surprised by OGL state changes, and prevents X-Plane and plug-ins from + * having to set all state before all draws; XPLMSetGraphicsState internally + * skips calls to change state that is already properly enabled. + * + * X-Plane does not have a 'default' OGL state for plug-ins with respect to + * the above state vector; plug-ins should totally set OGL state using this + * API before drawing. Use XPLMSetGraphicsState instead of any of the above + * OpenGL calls. + * + * WARNING: Any routine that performs drawing (e.g. XPLMDrawString or widget + * code) may change X-Plane's state. Always set state before drawing after + * unknown code has executed. + * + * *Deprecation Warnings*: X-Plane's lighting and fog environemnt is + * significantly more complex than the fixed function pipeline can express; + * do not assume that lighting and fog state is a good approximation for 3-d + * drawing. Prefer to use XPLMInstancing to draw objects. All calls to + * XPLMSetGraphicsState should have no fog or lighting. + * + */ +XPLM_API void XPLMSetGraphicsState( + int inEnableFog, + int inNumberTexUnits, + int inEnableLighting, + int inEnableAlphaTesting, + int inEnableAlphaBlending, + int inEnableDepthTesting, + int inEnableDepthWriting); + +/* + * XPLMBindTexture2d + * + * XPLMBindTexture2d changes what texture is bound to the 2d texturing + * target. This routine caches the current 2d texture across all texturing + * units in the sim and plug-ins, preventing extraneous binding. For + * example, consider several plug-ins running in series; if they all use the + * 'general interface' bitmap to do UI, calling this function will skip the + * rebinding of the general interface texture on all but the first plug-in, + * which can provide better frame rate son some graphics cards. + * + * inTextureID is the ID of the texture object to bind; inTextureUnit is a + * zero-based texture unit (e.g. 0 for the first one), up to a maximum of 4 + * units. (This number may increase in future versions of X-Plane.) + * + * Use this routine instead of glBindTexture(GL_TEXTURE_2D, ....); + * + */ +XPLM_API void XPLMBindTexture2d( + int inTextureNum, + int inTextureUnit); + +/* + * XPLMGenerateTextureNumbers + * + * Use this routine instead of glGenTextures to generate new texture object + * IDs. This routine historically ensured that plugins don't use texure IDs + * that X-Plane is reserving for its own use. + * + */ +XPLM_API void XPLMGenerateTextureNumbers( + int * outTextureIDs, + int inCount); + +#if defined(XPLM_DEPRECATED) +/* + * XPLMGetTexture + * + * XPLMGetTexture returns the OpenGL texture ID of an X-Plane texture based on + * a generic identifying code. For example, you can get the texture for + * X-Plane's UI bitmaps. + * + */ +XPLM_API int XPLMGetTexture( + XPLMTextureID inTexture); +#endif /* XPLM_DEPRECATED */ + +/* + * XPLMWorldToLocal + * + * This routine translates coordinates from latitude, longitude, and altitude + * to local scene coordinates. Latitude and longitude are in decimal degrees, + * and altitude is in meters MSL (mean sea level). The XYZ coordinates are in + * meters in the local OpenGL coordinate system. + * + */ +XPLM_API void XPLMWorldToLocal( + double inLatitude, + double inLongitude, + double inAltitude, + double * outX, + double * outY, + double * outZ); + +/* + * XPLMLocalToWorld + * + * This routine translates a local coordinate triplet back into latitude, + * longitude, and altitude. Latitude and longitude are in decimal degrees, + * and altitude is in meters MSL (mean sea level). The XYZ coordinates are in + * meters in the local OpenGL coordinate system. + * + * NOTE: world coordinates are less precise than local coordinates; you should + * try to avoid round tripping from local to world and back. + * + */ +XPLM_API void XPLMLocalToWorld( + double inX, + double inY, + double inZ, + double * outLatitude, + double * outLongitude, + double * outAltitude); + +/* + * XPLMDrawTranslucentDarkBox + * + * This routine draws a translucent dark box, partially obscuring parts of the + * screen but making text easy to read. This is the same graphics primitive + * used by X-Plane to show text files and ATC info. + * + */ +XPLM_API void XPLMDrawTranslucentDarkBox( + int inLeft, + int inTop, + int inRight, + int inBottom); + +/*************************************************************************** + * X-PLANE TEXT + ***************************************************************************/ + +/* + * XPLMFontID + * + * X-Plane features some fixed-character fonts. Each font may have its own + * metrics. + * + * WARNING: Some of these fonts are no longer supported or may have changed + * geometries. For maximum copmatibility, see the comments below. + * + * Note: X-Plane 7 supports proportional-spaced fonts. Since no measuring + * routine is available yet, the SDK will normally draw using a fixed-width + * font. You can use a dataref to enable proportional font drawing on XP7 if + * you want to. + * + */ +enum { + /* Mono-spaced font for user interface. Available in all versions of the SDK.*/ + xplmFont_Basic = 0, + +#if defined(XPLM_DEPRECATED) + /* Deprecated, do not use. */ + xplmFont_Menus = 1, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated, do not use. */ + xplmFont_Metal = 2, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated, do not use. */ + xplmFont_Led = 3, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated, do not use. */ + xplmFont_LedWide = 4, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated, do not use. */ + xplmFont_PanelHUD = 5, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated, do not use. */ + xplmFont_PanelEFIS = 6, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated, do not use. */ + xplmFont_PanelGPS = 7, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated, do not use. */ + xplmFont_RadiosGA = 8, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated, do not use. */ + xplmFont_RadiosBC = 9, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated, do not use. */ + xplmFont_RadiosHM = 10, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated, do not use. */ + xplmFont_RadiosGANarrow = 11, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated, do not use. */ + xplmFont_RadiosBCNarrow = 12, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated, do not use. */ + xplmFont_RadiosHMNarrow = 13, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated, do not use. */ + xplmFont_Timer = 14, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated, do not use. */ + xplmFont_FullRound = 15, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated, do not use. */ + xplmFont_SmallRound = 16, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated, do not use. */ + xplmFont_Menus_Localized = 17, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM200) + /* Proportional UI font. */ + xplmFont_Proportional = 18, + +#endif /* XPLM200 */ + +}; +typedef int XPLMFontID; + +/* + * XPLMDrawString + * + * This routine draws a NULL termianted string in a given font. Pass in the + * lower left pixel that the character is to be drawn onto. Also pass the + * character and font ID. This function returns the x offset plus the width of + * all drawn characters. The color to draw in is specified as a pointer to an + * array of three floating point colors, representing RGB intensities from 0.0 + * to 1.0. + * + */ +XPLM_API void XPLMDrawString( + float * inColorRGB, + int inXOffset, + int inYOffset, + char * inChar, + int * inWordWrapWidth, /* Can be NULL */ + XPLMFontID inFontID); + +/* + * XPLMDrawNumber + * + * This routine draws a number similar to the digit editing fields in + * PlaneMaker and data output display in X-Plane. Pass in a color, a + * position, a floating point value, and formatting info. Specify how many + * integer and how many decimal digits to show and whether to show a sign, as + * well as a character set. This routine returns the xOffset plus width of the + * string drawn. + * + */ +XPLM_API void XPLMDrawNumber( + float * inColorRGB, + int inXOffset, + int inYOffset, + double inValue, + int inDigits, + int inDecimals, + int inShowSign, + XPLMFontID inFontID); + +/* + * XPLMGetFontDimensions + * + * This routine returns the width and height of a character in a given font. + * It also tells you if the font only supports numeric digits. Pass NULL if + * you don't need a given field. Note that for a proportional font the width + * will be an arbitrary, hopefully average width. + * + */ +XPLM_API void XPLMGetFontDimensions( + XPLMFontID inFontID, + int * outCharWidth, /* Can be NULL */ + int * outCharHeight, /* Can be NULL */ + int * outDigitsOnly); /* Can be NULL */ + +#if defined(XPLM200) +/* + * XPLMMeasureString + * + * This routine returns the width in pixels of a string using a given font. + * The string is passed as a pointer plus length (and does not need to be null + * terminated); this is used to allow for measuring substrings. The return + * value is floating point; it is possible that future font drawing may allow + * for fractional pixels. + * + */ +XPLM_API float XPLMMeasureString( + XPLMFontID inFontID, + const char * inChar, + int inNumChars); +#endif /* XPLM200 */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/SDK/CHeaders/XPLM/XPLMInstance.h b/src/SDK/CHeaders/XPLM/XPLMInstance.h new file mode 100644 index 00000000..d2a8f2c0 --- /dev/null +++ b/src/SDK/CHeaders/XPLM/XPLMInstance.h @@ -0,0 +1,136 @@ +#ifndef _XPLMInstance_h_ +#define _XPLMInstance_h_ + +/* + * Copyright 2005-2012 Sandy Barbour and Ben Supnik All rights reserved. See + * license.txt for usage. X-Plane SDK Version: 2.1.1 + * + */ + +/*************************************************************************** + * XPLMInstance + ***************************************************************************/ +/* + * This API provides instanced drawing of X-Plane objects (.obj files). In + * contrast to old drawing APIs, which required you to draw your own objects + * per-frame, the instancing API allows you to simply register an OBJ for + * drawing, then move or manipulate it later (as needed). + * + * This provides one tremendous benefit: it keeps all dataref operations for + * your object in one place. Because datarefs are main thread only, allowing + * dataref access anywhere is a serious performance bottleneck for the + * simulator---the whole simulator has to pause and wait for each dataref + * access. This performance penalty will only grow worse as X-Plane moves + * toward an ever more heavily multithreaded engine. + * + * The instancing API allows X-Plane to isolate all dataref manipulations for + * all plugin object drawing to one place, potentially providing huge + * performance gains. + * + * Here's how it works: + * + * When an instance is created, it provides a list of all datarefs you want to + * manipulate in for the OBJ in the future. This list of datarefs replaces the + * ad-hoc collections of dataref objects previously used by art assets. Then, + * per-frame, you can manipulate the instance by passing in a "block" of + * packed floats representing the current values of the datarefs for your + * instance. (Note that the ordering of this set of packed floats must exactly + * match the ordering of the datarefs when you created your instance.) + * + */ + +#include "XPLMDefs.h" +#include "XPLMScenery.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/*************************************************************************** + * Instance Creation and Destruction + ***************************************************************************/ +/* + * Registers and unregisters instances. + * + */ + + +/* + * XPLMInstanceRef + * + * An opaque handle to an instance. + * + */ +typedef void * XPLMInstanceRef; + +/* + * XPLMCreateInstance + * + * XPLMCreateInstance creates a new instance, managed by your plug-in, and + * returns a handle to the instance. A few important requirements: + * + * * The object passed in must be fully loaded and returned from the XPLM + * before you can create your instance; you cannot pass a null obj ref, nor + * can you change the ref later. + * + * * If you use any custom datarefs in your object, they must be registered + * before the object is loaded. This is true even if their data will be + * provided via the instance dataref list. + * + * * The instance dataref array must be a valid ptr to an array of at least + * one item that is null terminated. That is, if you do not want any + * datarefs, you must passa ptr to an array with a null item. You cannot + * pass null for this. + * + */ +XPLM_API XPLMInstanceRef XPLMCreateInstance( + XPLMObjectRef obj, + const char ** datarefs); + +/* + * XPLMDestroyInstance + * + * XPLMDestroyInstance destroys and deallocates your instance; once called, + * you are still responsible for releasing the OBJ ref. + * + * Tip: you can release your OBJ ref after you call XPLMCreateInstance as long + * as you never use it again; the instance will maintain its own reference to + * the OBJ and the object OBJ be deallocated when the instance is destroyed. + * + */ +XPLM_API void XPLMDestroyInstance( + XPLMInstanceRef instance); + +/*************************************************************************** + * Instance Manipulation + ***************************************************************************/ + +/* + * XPLMInstanceSetPosition + * + * Updates both the position of the instance and all datarefs you registered + * for it. Call this from a flight loop callback or UI callback. + * + * __DO NOT__ call XPLMInstanceSetPosition from a drawing callback; the whole + * point of instancing is that you do not need any drawing callbacks. Setting + * instance data from a drawing callback may have undefined consequences, and + * the drawing callback hurts FPS unnecessarily. + * + * The memory pointed to by the data pointer must be large enough to hold one + * float for every data ref you have registered, and must contain valid + * floating point data. + * + * BUG: before X-Plane 11.50, if you have no dataref registered, you must + * still pass a valid pointer for data and not null. + * + */ +XPLM_API void XPLMInstanceSetPosition( + XPLMInstanceRef instance, + const XPLMDrawInfo_t * new_position, + const float * data); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/SDK/CHeaders/XPLM/XPLMMap.h b/src/SDK/CHeaders/XPLM/XPLMMap.h new file mode 100644 index 00000000..18c055ac --- /dev/null +++ b/src/SDK/CHeaders/XPLM/XPLMMap.h @@ -0,0 +1,631 @@ +#ifndef _XPLMMap_h_ +#define _XPLMMap_h_ + +/* + * Copyright 2005-2012 Sandy Barbour and Ben Supnik All rights reserved. See + * license.txt for usage. X-Plane SDK Version: 2.1.1 + * + */ + +/*************************************************************************** + * XPLMMap + ***************************************************************************/ +/* + * This API allows you to create new layers within X-Plane maps. Your layers + * can draw arbitrary OpenGL, but they conveniently also have access to + * X-Plane's built-in icon and label drawing functions. + * + * As of X-Plane 11, map drawing happens in three stages: + * + * 1. backgrounds and "fill," + * 2. icons, and + * 3. labels. + * + * Thus, all background drawing gets layered beneath all icons, which likewise + * get layered beneath all labels. Within each stage, the map obeys a + * consistent layer ordering, such that "fill" layers (layers that cover a + * large amount of map area, like the terrain and clouds) appear beneath + * "markings" layers (like airport icons). This ensures that layers with fine + * details don't get obscured by layers with larger details. + * + * The XPLM map API reflects both aspects of this draw layering: you can + * register a layer as providing either markings or fill, and X-Plane will + * draw your fill layers beneath your markings layers (regardless of + * registration order). Likewise, you are guaranteed that your layer's icons + * (added from within an icon callback) will go above your layer's OpenGL + * drawing, and your labels will go above your icons. + * + * The XPLM guarantees that all plugin-created fill layers go on top of all + * native X-Plane fill layers, and all plugin-created markings layers go on + * top of all X-Plane markings layers (with the exception of the aircraft + * icons). It also guarantees that the draw order of your own plugin's layers + * will be consistent. But, for layers created by different plugins, the only + * guarantee is that we will draw all of one plugin's layers of each type + * (fill, then markings), then all of the others'; we don't guarantee which + * plugin's fill and markings layers go on top of the other's. + * + * As of X-Plane 11, maps use true cartographic projections for their drawing, + * and different maps may use different projections. For that reason, all + * drawing calls include an opaque handle for the projection you should use to + * do the drawing. Any time you would draw at a particular latitude/longitude, + * you'll need to ask the projection to translate that position into "map + * coordinates." (Note that the projection is guaranteed not to change between + * calls to your prepare-cache hook, so if you cache your map coordinates + * ahead of time, there's no need to re-project them when you actually draw.) + * + * In addition to mapping normal latitude/longitude locations into map + * coordinates, the projection APIs also let you know the current heading for + * north. (Since X-Plane 11 maps can rotate to match the heading of the user's + * aircraft, it's not safe to assume that north is at zero degrees rotation.) + * + */ + +#include "XPLMDefs.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#if defined(XPLM300) +/*************************************************************************** + * DRAWING CALLBACKS + ***************************************************************************/ +/* + * When you create a new map layer (using XPLMCreateMapLayer), you can provide + * any or all of these callbacks. They allow you to insert your own OpenGL + * drawing, text labels, and icons into the X-Plane map at the appropriate + * places, allowing your layer to behave as similarly to X-Plane's built-in + * layers as possible. + * + */ + + +/* + * XPLMMapLayerID + * + * This is an opaque handle for a plugin-created map layer. Pass it to the map + * drawing APIs from an appropriate callback to draw in the layer you created. + * + */ +typedef void * XPLMMapLayerID; + +/* + * XPLMMapProjectionID + * + * This is an opaque handle for a map projection. Pass it to the projection + * APIs to translate between map coordinates and latitude/longitudes. + * + */ +typedef void * XPLMMapProjectionID; + +/* + * XPLMMapStyle + * + * Indicates the visual style being drawn by the map. In X-Plane, the user can + * choose between a number of map types, and different map types may have use + * a different visual representation for the same elements (for instance, the + * visual style of the terrain layer changes drastically between the VFR and + * IFR layers), or certain layers may be disabled entirely in some map types + * (e.g., localizers are only visible in the IFR low-enroute style). + * + */ +enum { + xplm_MapStyle_VFR_Sectional = 0, + + xplm_MapStyle_IFR_LowEnroute = 1, + + xplm_MapStyle_IFR_HighEnroute = 2, + + +}; +typedef int XPLMMapStyle; + +/* + * XPLMMapDrawingCallback_f + * + * This is the OpenGL map drawing callback for plugin-created map layers. You + * can perform arbitrary OpenGL drawing from this callback, with one + * exception: changes to the Z-buffer are not permitted, and will result in + * map drawing errors. + * + * All drawing done from within this callback appears beneath all built-in + * X-Plane icons and labels, but above the built-in "fill" layers (layers + * providing major details, like terrain and water). Note, however, that the + * relative ordering between the drawing callbacks of different plugins is not + * guaranteed. + * + */ +typedef void (* XPLMMapDrawingCallback_f)( + XPLMMapLayerID inLayer, + const float * inMapBoundsLeftTopRightBottom, + float zoomRatio, + float mapUnitsPerUserInterfaceUnit, + XPLMMapStyle mapStyle, + XPLMMapProjectionID projection, + void * inRefcon); + +/* + * XPLMMapIconDrawingCallback_f + * + * This is the icon drawing callback that enables plugin-created map layers to + * draw icons using X-Plane's built-in icon drawing functionality. You can + * request an arbitrary number of PNG icons to be drawn via + * XPLMDrawMapIconFromSheet() from within this callback, but you may not + * perform any OpenGL drawing here. + * + * Icons enqueued by this function will appear above all OpenGL drawing + * (performed by your optional XPLMMapDrawingCallback_f), and above all + * built-in X-Plane map icons of the same layer type ("fill" or "markings," as + * determined by the XPLMMapLayerType in your XPLMCreateMapLayer_t). Note, + * however, that the relative ordering between the drawing callbacks of + * different plugins is not guaranteed. + * + */ +typedef void (* XPLMMapIconDrawingCallback_f)( + XPLMMapLayerID inLayer, + const float * inMapBoundsLeftTopRightBottom, + float zoomRatio, + float mapUnitsPerUserInterfaceUnit, + XPLMMapStyle mapStyle, + XPLMMapProjectionID projection, + void * inRefcon); + +/* + * XPLMMapLabelDrawingCallback_f + * + * This is the label drawing callback that enables plugin-created map layers + * to draw text labels using X-Plane's built-in labeling functionality. You + * can request an arbitrary number of text labels to be drawn via + * XPLMDrawMapLabel() from within this callback, but you may not perform any + * OpenGL drawing here. + * + * Labels enqueued by this function will appear above all OpenGL drawing + * (performed by your optional XPLMMapDrawingCallback_f), and above all + * built-in map icons and labels of the same layer type ("fill" or "markings," + * as determined by the XPLMMapLayerType in your XPLMCreateMapLayer_t). Note, + * however, that the relative ordering between the drawing callbacks of + * different plugins is not guaranteed. + * + */ +typedef void (* XPLMMapLabelDrawingCallback_f)( + XPLMMapLayerID inLayer, + const float * inMapBoundsLeftTopRightBottom, + float zoomRatio, + float mapUnitsPerUserInterfaceUnit, + XPLMMapStyle mapStyle, + XPLMMapProjectionID projection, + void * inRefcon); + +#endif /* XPLM300 */ +#if defined(XPLM300) +/*************************************************************************** + * LAYER MANAGEMENT CALLBACKS + ***************************************************************************/ +/* + * These are various "bookkeeping" callbacks that your map layer can receive + * (if you provide the callback in your XPLMCreateMapLayer_t). They allow you + * to manage the lifecycle of your layer, as well as cache any + * computationally-intensive preparation you might need for drawing. + * + */ + + +/* + * XPLMMapPrepareCacheCallback_f + * + * A callback used to allow you to cache whatever information your layer needs + * to draw in the current map area. + * + * This is called each time the map's total bounds change. This is typically + * triggered by new DSFs being loaded, such that X-Plane discards old, + * now-distant DSFs and pulls in new ones. At that point, the available bounds + * of the map also change to match the new DSF area. + * + * By caching just the information you need to draw in this area, your future + * draw calls can be made faster, since you'll be able to simply "splat" your + * precomputed information each frame. + * + * We guarantee that the map projection will not change between successive + * prepare cache calls, nor will any draw call give you bounds outside these + * total map bounds. So, if you cache the projected map coordinates of all the + * items you might want to draw in the total map area, you can be guaranteed + * that no draw call will be asked to do any new work. + * + */ +typedef void (* XPLMMapPrepareCacheCallback_f)( + XPLMMapLayerID inLayer, + const float * inTotalMapBoundsLeftTopRightBottom, + XPLMMapProjectionID projection, + void * inRefcon); + +/* + * XPLMMapWillBeDeletedCallback_f + * + * Called just before your map layer gets deleted. Because SDK-created map + * layers have the same lifetime as the X-Plane map that contains them, if the + * map gets unloaded from memory, your layer will too. + * + */ +typedef void (* XPLMMapWillBeDeletedCallback_f)( + XPLMMapLayerID inLayer, + void * inRefcon); + +#endif /* XPLM300 */ +#if defined(XPLM300) +/*************************************************************************** + * MAP LAYER CREATION AND DESTRUCTION + ***************************************************************************/ +/* + * Enables the creation of new map layers. Layers are created for a particular + * instance of the X-Plane map. For instance, if you want your layer to appear + * in both the normal map interface and the Instructor Operator Station (IOS), + * you would need two separate calls to XPLMCreateMapLayer(), with two + * different values for your XPLMCreateMapLayer_t::layer_name. + * + * Your layer's lifetime will be determined by the lifetime of the map it is + * created in. If the map is destroyed (on the X-Plane side), your layer will + * be too, and you'll receive a callback to your + * XPLMMapWillBeDeletedCallback_f. + * + */ + + +/* + * XPLMMapLayerType + * + * Indicates the type of map layer you are creating. Fill layers will always + * be drawn beneath markings layers. + * + */ +enum { + /* A layer that draws "fill" graphics, like weather patterns, terrain, etc. * + * Fill layers frequently cover a large portion of the visible map area. */ + xplm_MapLayer_Fill = 0, + + /* A layer that provides markings for particular map features, like NAVAIDs, * + * airports, etc. Even dense markings layers cover a small portion of the * + * total map area. */ + xplm_MapLayer_Markings = 1, + + +}; +typedef int XPLMMapLayerType; + +/* Globally unique identifier for X-Plane's Map window, used as the * + * mapToCreateLayerIn parameter in XPLMCreateMapLayer_t */ +#define XPLM_MAP_USER_INTERFACE "XPLM_MAP_USER_INTERFACE" + +/* Globally unique identifier for X-Plane's Instructor Operator Station * + * window, used as the mapToCreateLayerIn parameter in XPLMCreateMapLayer_t */ +#define XPLM_MAP_IOS "XPLM_MAP_IOS" + +/* + * XPLMCreateMapLayer_t + * + * This structure defines all of the parameters used to create a map layer + * using XPLMCreateMapLayer. The structure will be expanded in future SDK APIs + * to include more features. Always set the structSize member to the size of + * your struct in bytes! + * + * Each layer must be associated with exactly one map instance in X-Plane. + * That map, and that map alone, will call your callbacks. Likewise, when that + * map is deleted, your layer will be as well. + * + */ +typedef struct { + /* Used to inform XPLMCreateMapLayer() of the SDK version you compiled * + * against; should always be set to sizeof(XPLMCreateMapLayer_t) */ + int structSize; + /* Globally unique string identifying the map you want this layer to appear * + * in. As of XPLM300, this is limited to one of XPLM_MAP_USER_INTERFACE or * + * XPLM_MAP_IOS */ + const char * mapToCreateLayerIn; + /* The type of layer you are creating, used to determine draw order (all * + * plugin-created markings layers are drawn above all plugin-created fill * + * layers) */ + XPLMMapLayerType layerType; + /* Optional callback to inform you this layer is being deleted (due to its * + * owning map being destroyed) */ + XPLMMapWillBeDeletedCallback_f willBeDeletedCallback; + /* Optional callback you want to use to prepare your draw cache when the map * + * bounds change (set to NULL if you don't want this callback) */ + XPLMMapPrepareCacheCallback_f prepCacheCallback; + /* Optional callback you want to use for arbitrary OpenGL drawing, which goes * + * beneath all icons in the map's layering system (set to NULL if you don't * + * want this callback) */ + XPLMMapDrawingCallback_f drawCallback; + /* Optional callback you want to use for drawing icons, which go above all * + * built-in X-Plane icons (except the aircraft) in the map's layering system * + * (set to NULL if you don't want this callback) */ + XPLMMapIconDrawingCallback_f iconCallback; + /* Optional callback you want to use for drawing map labels, which go above * + * all built-in X-Plane icons and labels (except those of aircraft) in the * + * map's layering system (set to NULL if you don't want this callback) */ + XPLMMapLabelDrawingCallback_f labelCallback; + /* True if you want a checkbox to be created in the map UI to toggle this * + * layer on and off; false if the layer should simply always be enabled */ + int showUiToggle; + /* Short label to use for this layer in the user interface */ + const char * layerName; + /* A reference to arbitrary data that will be passed to your callbacks */ + void * refcon; +} XPLMCreateMapLayer_t; + +/* + * XPLMCreateMapLayer + * + * This routine creates a new map layer. You pass in an XPLMCreateMapLayer_t + * structure with all of the fields set in. You must set the structSize of + * the structure to the size of the actual structure you used. + * + * Returns NULL if the layer creation failed. This happens most frequently + * because the map you specified in your + * XPLMCreateMapLayer_t::mapToCreateLayerIn field doesn't exist (that is, if + * XPLMMapExists() returns 0 for the specified map). You can use + * XPLMRegisterMapCreationHook() to get a notification each time a new map is + * opened in X-Plane, at which time you can create layers in it. + * + */ +XPLM_API XPLMMapLayerID XPLMCreateMapLayer( + XPLMCreateMapLayer_t * inParams); + +/* + * XPLMDestroyMapLayer + * + * Destroys a map layer you created (calling your + * XPLMMapWillBeDeletedCallback_f if applicable). Returns true if a deletion + * took place. + * + */ +XPLM_API int XPLMDestroyMapLayer( + XPLMMapLayerID inLayer); + +/* + * XPLMMapCreatedCallback_f + * + * A callback to notify your plugin that a new map has been created in + * X-Plane. This is the best time to add a custom map layer using + * XPLMCreateMapLayer(). + * + * No OpenGL drawing is permitted within this callback. + * + */ +typedef void (* XPLMMapCreatedCallback_f)( + const char * mapIdentifier, + void * refcon); + +/* + * XPLMRegisterMapCreationHook + * + * Registers your callback to receive a notification each time a new map is + * constructed in X-Plane. This callback is the best time to add your custom + * map layer using XPLMCreateMapLayer(). + * + * Note that you will not be notified about any maps that already exist---you + * can use XPLMMapExists() to check for maps that were created previously. + * + */ +XPLM_API void XPLMRegisterMapCreationHook( + XPLMMapCreatedCallback_f callback, + void * refcon); + +/* + * XPLMMapExists + * + * Returns 1 if the map with the specified identifier already exists in + * X-Plane. In that case, you can safely call XPLMCreateMapLayer() specifying + * that your layer should be added to that map. + * + */ +XPLM_API int XPLMMapExists( + const char * mapIdentifier); + +#endif /* XPLM300 */ +#if defined(XPLM300) +/*************************************************************************** + * MAP DRAWING + ***************************************************************************/ +/* + * These APIs are only valid from within a map drawing callback (one of + * XPLMIconDrawingCallback_t or XPLMMapLabelDrawingCallback_f). Your drawing + * callbacks are registered when you create a new map layer as part of your + * XPLMCreateMapLayer_t. The functions here hook into X-Plane's built-in map + * drawing functionality for icons and labels, so that you get a consistent + * style with the rest of the X-Plane map. + * + * Note that the X-Plane 11 map introduces a strict ordering: layers of type + * xplm_MapLayer_Fill get drawn beneath all xplm_MapLayer_Markings layers. + * Likewise, all OpenGL drawing (performed in your layer's + * XPLMMapDrawingCallback_f) will appear beneath any icons and labels you + * draw. + * + */ + + +/* + * XPLMMapOrientation + * + * Indicates whether a map element should be match its rotation to the map + * itself, or to the user interface. For instance, the map itself may be + * rotated such that "up" matches the user's aircraft, but you may want to + * draw a text label such that it is always rotated zero degrees relative to + * the user's perspective. In that case, you would have it draw with UI + * orientation. + * + */ +enum { + /* Orient such that a 0 degree rotation matches the map's north */ + xplm_MapOrientation_Map = 0, + + /* Orient such that a 0 degree rotation is "up" relative to the user interface*/ + xplm_MapOrientation_UI = 1, + + +}; +typedef int XPLMMapOrientation; + +/* + * XPLMDrawMapIconFromSheet + * + * Enables plugin-created map layers to draw PNG icons using X-Plane's + * built-in icon drawing functionality. Only valid from within an + * XPLMIconDrawingCallback_t (but you can request an arbitrary number of icons + * to be drawn from within your callback). + * + * X-Plane will automatically manage the memory for your texture so that it + * only has to be loaded from disk once as long as you continue drawing it + * per-frame. (When you stop drawing it, the memory may purged in a "garbage + * collection" pass, require a load from disk in the future.) + * + * Instead of having X-Plane draw a full PNG, this method allows you to use UV + * coordinates to request a portion of the image to be drawn. This allows you + * to use a single texture load (of an icon sheet, for example) to draw many + * icons. Doing so is much more efficient than drawing a dozen different small + * PNGs. + * + * The UV coordinates used here treat the texture you load as being comprised + * of a number of identically sized "cells." You specify the width and height + * in cells (ds and dt, respectively), as well as the coordinates within the + * cell grid for the sub-image you'd like to draw. + * + * Note that you can use different ds and dt values in subsequent calls with + * the same texture sheet. This enables you to use icons of different sizes in + * the same sheet if you arrange them properly in the PNG. + * + * This function is only valid from within an XPLMIconDrawingCallback_t (but + * you can request an arbitrary number of icons to be drawn from within your + * callback). + * + */ +XPLM_API void XPLMDrawMapIconFromSheet( + XPLMMapLayerID layer, + const char * inPngPath, + int s, + int t, + int ds, + int dt, + float mapX, + float mapY, + XPLMMapOrientation orientation, + float rotationDegrees, + float mapWidth); + +/* + * XPLMDrawMapLabel + * + * Enables plugin-created map layers to draw text labels using X-Plane's + * built-in labeling functionality. Only valid from within an + * XPLMMapLabelDrawingCallback_f (but you can request an arbitrary number of + * text labels to be drawn from within your callback). + * + */ +XPLM_API void XPLMDrawMapLabel( + XPLMMapLayerID layer, + const char * inText, + float mapX, + float mapY, + XPLMMapOrientation orientation, + float rotationDegrees); + +#endif /* XPLM300 */ +#if defined(XPLM300) +/*************************************************************************** + * MAP PROJECTIONS + ***************************************************************************/ +/* + * As of X-Plane 11, the map draws using true cartographic projections, and + * different maps may use different projections. Thus, to draw at a particular + * latitude and longitude, you must first transform your real-world + * coordinates into map coordinates. + * + * The map projection is also responsible for giving you the current scale of + * the map. That is, the projection can tell you how many map units correspond + * to 1 meter at a given point. + * + * Finally, the map projection can give you the current rotation of the map. + * Since X-Plane 11 maps can rotate to match the heading of the aircraft, the + * map's rotation can potentially change every frame. + * + */ + + +/* + * XPLMMapProject + * + * Projects a latitude/longitude into map coordinates. This is the inverse of + * XPLMMapUnproject(). + * + * Only valid from within a map layer callback (one of + * XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, + * XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) + * + */ +XPLM_API void XPLMMapProject( + XPLMMapProjectionID projection, + double latitude, + double longitude, + float * outX, + float * outY); + +/* + * XPLMMapUnproject + * + * Transforms map coordinates back into a latitude and longitude. This is the + * inverse of XPLMMapProject(). + * + * Only valid from within a map layer callback (one of + * XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, + * XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) + * + */ +XPLM_API void XPLMMapUnproject( + XPLMMapProjectionID projection, + float mapX, + float mapY, + double * outLatitude, + double * outLongitude); + +/* + * XPLMMapScaleMeter + * + * Returns the number of map units that correspond to a distance of one meter + * at a given set of map coordinates. + * + * Only valid from within a map layer callback (one of + * XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, + * XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) + * + */ +XPLM_API float XPLMMapScaleMeter( + XPLMMapProjectionID projection, + float mapX, + float mapY); + +/* + * XPLMMapGetNorthHeading + * + * Returns the heading (in degrees clockwise from "up") that corresponds to + * north at a given point on the map. In other words, if your runway has a + * true heading of 360, you would use "north" as the Cartesian angle at which + * to draw the runway on the map. (You would add the result of + * XPLMMapGetNorthHeading() to your true heading to get the map angle.) + * + * This is necessary becuase X-Plane's map can be rotated to match your + * aircraft's orientation; north is not always "up." + * + * Only valid from within a map layer callback (one of + * XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, + * XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) + * + */ +XPLM_API float XPLMMapGetNorthHeading( + XPLMMapProjectionID projection, + float mapX, + float mapY); + +#endif /* XPLM300 */ +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/SDK/CHeaders/XPLM/XPLMMenus.h b/src/SDK/CHeaders/XPLM/XPLMMenus.h new file mode 100755 index 00000000..f5802ab8 --- /dev/null +++ b/src/SDK/CHeaders/XPLM/XPLMMenus.h @@ -0,0 +1,290 @@ +#ifndef _XPLMMenus_h_ +#define _XPLMMenus_h_ + +/* + * Copyright 2005-2012 Sandy Barbour and Ben Supnik All rights reserved. See + * license.txt for usage. X-Plane SDK Version: 2.1.1 + * + */ + +/*************************************************************************** + * XPLMMenus + ***************************************************************************/ +/* + * Plug-ins can create menus in the menu bar of X-Plane. This is done by + * creating a menu and then creating items. Menus are referred to by an + * opaque ID. Items are referred to by (zero-based) index number. + * + * Menus are "sandboxed" between plugins---no plugin can access the menus of + * any other plugin. Furthermore, all menu indices are relative to your + * plugin's menus only; if your plugin creates two sub-menus in the Plugins + * menu at different times, it doesn't matter how many other plugins also + * create sub-menus of Plugins in the intervening time: your sub-menus will be + * given menu indices 0 and 1. (The SDK does some work in the back-end to + * filter out menus that are irrelevant to your plugin in order to deliver + * this consistency for each plugin.) + * + * When you create a menu item, you specify how we should handle clicks on + * that menu item. You can either have the XPLM trigger a callback (the + * XPLMMenuHandler_f associated with the menu that contains the item), or you + * can simply have a command be triggered (with no associated call to your + * menu handler). The advantage of the latter method is that X-Plane will + * display any keyboard shortcuts associated with the command. (In contrast, + * there are no keyboard shortcuts associated with menu handler callbacks with + * specific parameters.) + * + * Menu text in X-Plane is UTF8; X-Plane's character set covers latin, greek + * and cyrillic characters, Katakana, as well as some Japanese symbols. Some + * APIs have a inDeprecatedAndIgnored parameter that used to select a + * character set; since X-Plane 9 all localization is done via UTF-8 only. + * + */ + +#include "XPLMDefs.h" +#include "XPLMUtilities.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/*************************************************************************** + * XPLM MENUS + ***************************************************************************/ + +/* + * XPLMMenuCheck + * + * These enumerations define the various 'check' states for an X-Plane menu. + * 'checking' in X-Plane actually appears as a light which may or may not be + * lit. So there are three possible states. + * + */ +enum { + /* there is no symbol to the left of the menu item. */ + xplm_Menu_NoCheck = 0, + + /* the menu has a mark next to it that is unmarked (not lit). */ + xplm_Menu_Unchecked = 1, + + /* the menu has a mark next to it that is checked (lit). */ + xplm_Menu_Checked = 2, + + +}; +typedef int XPLMMenuCheck; + +/* + * XPLMMenuID + * + * This is a unique ID for each menu you create. + * + */ +typedef void * XPLMMenuID; + +/* + * XPLMMenuHandler_f + * + * A menu handler function takes two reference pointers, one for the menu + * (specified when the menu was created) and one for the item (specified when + * the item was created). + * + */ +typedef void (* XPLMMenuHandler_f)( + void * inMenuRef, + void * inItemRef); + +/* + * XPLMFindPluginsMenu + * + * This function returns the ID of the plug-ins menu, which is created for you + * at startup. + * + */ +XPLM_API XPLMMenuID XPLMFindPluginsMenu(void); + +#if defined(XPLM300) +/* + * XPLMFindAircraftMenu + * + * This function returns the ID of the menu for the currently-loaded aircraft, + * used for showing aircraft-specific commands. + * + * The aircraft menu is created by X-Plane at startup, but it remains hidden + * until it is populated via XPLMAppendMenuItem() or + * XPLMAppendMenuItemWithCommand(). + * + * Only plugins loaded with the user's current aircraft are allowed to access + * the aircraft menu. For all other plugins, this will return NULL, and any + * attempts to add menu items to it will fail. + * + */ +XPLM_API XPLMMenuID XPLMFindAircraftMenu(void); +#endif /* XPLM300 */ + +/* + * XPLMCreateMenu + * + * This function creates a new menu and returns its ID. It returns NULL if + * the menu cannot be created. Pass in a parent menu ID and an item index to + * create a submenu, or NULL for the parent menu to put the menu in the menu + * bar. The menu's name is only used if the menu is in the menubar. You also + * pass a handler function and a menu reference value. Pass NULL for the + * handler if you do not need callbacks from the menu (for example, if it only + * contains submenus). + * + * Important: you must pass a valid, non-empty menu title even if the menu is + * a submenu where the title is not visible. + * + */ +XPLM_API XPLMMenuID XPLMCreateMenu( + const char * inName, + XPLMMenuID inParentMenu, + int inParentItem, + XPLMMenuHandler_f inHandler, + void * inMenuRef); + +/* + * XPLMDestroyMenu + * + * This function destroys a menu that you have created. Use this to remove a + * submenu if necessary. (Normally this function will not be necessary.) + * + */ +XPLM_API void XPLMDestroyMenu( + XPLMMenuID inMenuID); + +/* + * XPLMClearAllMenuItems + * + * This function removes all menu items from a menu, allowing you to rebuild + * it. Use this function if you need to change the number of items on a menu. + * + */ +XPLM_API void XPLMClearAllMenuItems( + XPLMMenuID inMenuID); + +/* + * XPLMAppendMenuItem + * + * This routine appends a new menu item to the bottom of a menu and returns + * its index. Pass in the menu to add the item to, the items name, and a void + * * ref for this item. + * + * Returns a negative index if the append failed (due to an invalid parent + * menu argument). + * + * Note that all menu indices returned are relative to your plugin's menus + * only; if your plugin creates two sub-menus in the Plugins menu at different + * times, it doesn't matter how many other plugins also create sub-menus of + * Plugins in the intervening time: your sub-menus will be given menu indices + * 0 and 1. (The SDK does some work in the back-end to filter out menus that + * are irrelevant to your plugin in order to deliver this consistency for each + * plugin.) + * + */ +XPLM_API int XPLMAppendMenuItem( + XPLMMenuID inMenu, + const char * inItemName, + void * inItemRef, + int inDeprecatedAndIgnored); + +#if defined(XPLM300) +/* + * XPLMAppendMenuItemWithCommand + * + * Like XPLMAppendMenuItem(), but instead of the new menu item triggering the + * XPLMMenuHandler_f of the containiner menu, it will simply execute the + * command you pass in. Using a command for your menu item allows the user to + * bind a keyboard shortcut to the command and see that shortcut represented + * in the menu. + * + * Returns a negative index if the append failed (due to an invalid parent + * menu argument). + * + * Like XPLMAppendMenuItem(), all menu indices are relative to your plugin's + * menus only. + * + */ +XPLM_API int XPLMAppendMenuItemWithCommand( + XPLMMenuID inMenu, + const char * inItemName, + XPLMCommandRef inCommandToExecute); +#endif /* XPLM300 */ + +/* + * XPLMAppendMenuSeparator + * + * This routine adds a separator to the end of a menu. + * + * Returns a negative index if the append failed (due to an invalid parent + * menu argument). + * + */ +XPLM_API void XPLMAppendMenuSeparator( + XPLMMenuID inMenu); + +/* + * XPLMSetMenuItemName + * + * This routine changes the name of an existing menu item. Pass in the menu + * ID and the index of the menu item. + * + */ +XPLM_API void XPLMSetMenuItemName( + XPLMMenuID inMenu, + int inIndex, + const char * inItemName, + int inDeprecatedAndIgnored); + +/* + * XPLMCheckMenuItem + * + * Set whether a menu item is checked. Pass in the menu ID and item index. + * + */ +XPLM_API void XPLMCheckMenuItem( + XPLMMenuID inMenu, + int index, + XPLMMenuCheck inCheck); + +/* + * XPLMCheckMenuItemState + * + * This routine returns whether a menu item is checked or not. A menu item's + * check mark may be on or off, or a menu may not have an icon at all. + * + */ +XPLM_API void XPLMCheckMenuItemState( + XPLMMenuID inMenu, + int index, + XPLMMenuCheck * outCheck); + +/* + * XPLMEnableMenuItem + * + * Sets whether this menu item is enabled. Items start out enabled. + * + */ +XPLM_API void XPLMEnableMenuItem( + XPLMMenuID inMenu, + int index, + int enabled); + +#if defined(XPLM210) +/* + * XPLMRemoveMenuItem + * + * Removes one item from a menu. Note that all menu items below are moved up + * one; your plugin must track the change in index numbers. + * + */ +XPLM_API void XPLMRemoveMenuItem( + XPLMMenuID inMenu, + int inIndex); +#endif /* XPLM210 */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/SDK/CHeaders/XPLM/XPLMNavigation.h b/src/SDK/CHeaders/XPLM/XPLMNavigation.h new file mode 100755 index 00000000..716caf04 --- /dev/null +++ b/src/SDK/CHeaders/XPLM/XPLMNavigation.h @@ -0,0 +1,362 @@ +#ifndef _XPLMNavigation_h_ +#define _XPLMNavigation_h_ + +/* + * Copyright 2005-2012 Sandy Barbour and Ben Supnik All rights reserved. See + * license.txt for usage. X-Plane SDK Version: 2.1.1 + * + */ + +/*************************************************************************** + * XPLMNavigation + ***************************************************************************/ +/* + * The XPLM Navigation APIs give you some access to the navigation databases + * inside X-Plane. X-Plane stores all navigation information in RAM, so by + * using these APIs you can gain access to most information without having to + * go to disk or parse the files yourself. + * + * You can also use this API to program the FMS. You must use the navigation + * APIs to find the nav-aids you want to program into the FMS, since the FMS + * is powered internally by X-Plane's navigation database. + * + */ + +#include "XPLMDefs.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/*************************************************************************** + * NAVIGATION DATABASE ACCESS + ***************************************************************************/ + +/* + * XPLMNavType + * + * These enumerations define the different types of navaids. They are each + * defined with a separate bit so that they may be bit-wise added together to + * form sets of nav-aid types. + * + * NOTE: xplm_Nav_LatLon is a specific lat-lon coordinate entered into the + * FMS. It will not exist in the database, and cannot be programmed into the + * FMS. Querying the FMS for navaids will return it. Use + * XPLMSetFMSEntryLatLon to set a lat/lon waypoint. + * + */ +enum { + xplm_Nav_Unknown = 0, + + xplm_Nav_Airport = 1, + + xplm_Nav_NDB = 2, + + xplm_Nav_VOR = 4, + + xplm_Nav_ILS = 8, + + xplm_Nav_Localizer = 16, + + xplm_Nav_GlideSlope = 32, + + xplm_Nav_OuterMarker = 64, + + xplm_Nav_MiddleMarker = 128, + + xplm_Nav_InnerMarker = 256, + + xplm_Nav_Fix = 512, + + xplm_Nav_DME = 1024, + + xplm_Nav_LatLon = 2048, + + +}; +typedef int XPLMNavType; + +/* + * XPLMNavRef + * + * XPLMNavRef is an iterator into the navigation database. The navigation + * database is essentially an array, but it is not necessarily densely + * populated. The only assumption you can safely make is that like-typed + * nav-aids are grouped together. + * + * Use XPLMNavRef to refer to a nav-aid. + * + * XPLM_NAV_NOT_FOUND is returned by functions that return an XPLMNavRef when + * the iterator must be invalid. + * + */ +typedef int XPLMNavRef; + +#define XPLM_NAV_NOT_FOUND -1 + +/* + * XPLMGetFirstNavAid + * + * This returns the very first navaid in the database. Use this to traverse + * the entire database. Returns XPLM_NAV_NOT_FOUND if the nav database is + * empty. + * + */ +XPLM_API XPLMNavRef XPLMGetFirstNavAid(void); + +/* + * XPLMGetNextNavAid + * + * Given a valid nav aid ref, this routine returns the next navaid. It + * returns XPLM_NAV_NOT_FOUND if the nav aid passed in was invalid or if the + * navaid passed in was the last one in the database. Use this routine to + * iterate across all like-typed navaids or the entire database. + * + */ +XPLM_API XPLMNavRef XPLMGetNextNavAid( + XPLMNavRef inNavAidRef); + +/* + * XPLMFindFirstNavAidOfType + * + * This routine returns the ref of the first navaid of the given type in the + * database or XPLM_NAV_NOT_FOUND if there are no navaids of that type in the + * database. You must pass exactly one nav aid type to this routine. + * + */ +XPLM_API XPLMNavRef XPLMFindFirstNavAidOfType( + XPLMNavType inType); + +/* + * XPLMFindLastNavAidOfType + * + * This routine returns the ref of the last navaid of the given type in the + * database or XPLM_NAV_NOT_FOUND if there are no navaids of that type in the + * database. You must pass exactly one nav aid type to this routine. + * + */ +XPLM_API XPLMNavRef XPLMFindLastNavAidOfType( + XPLMNavType inType); + +/* + * XPLMFindNavAid + * + * This routine provides a number of searching capabilities for the nav + * database. XPLMFindNavAid will search through every nav aid whose type is + * within inType (multiple types may be added together) and return any + * nav-aids found based on the following rules: + * + * * If inLat and inLon are not NULL, the navaid nearest to that lat/lon will + * be returned, otherwise the last navaid found will be returned. + * + * * If inFrequency is not NULL, then any navaids considered must match this + * frequency. Note that this will screen out radio beacons that do not have + * frequency data published (like inner markers) but not fixes and airports. + * + * * If inNameFragment is not NULL, only navaids that contain the fragment in + * their name will be returned. + * + * * If inIDFragment is not NULL, only navaids that contain the fragment in + * their IDs will be returned. + * + * This routine provides a simple way to do a number of useful searches: + * * Find the nearest navaid on this frequency. + * * Find the nearest airport. + * * Find the VOR whose ID is "KBOS". + * * Find the nearest airport whose name contains "Chicago". + * + */ +XPLM_API XPLMNavRef XPLMFindNavAid( + const char * inNameFragment, /* Can be NULL */ + const char * inIDFragment, /* Can be NULL */ + float * inLat, /* Can be NULL */ + float * inLon, /* Can be NULL */ + int * inFrequency, /* Can be NULL */ + XPLMNavType inType); + +/* + * XPLMGetNavAidInfo + * + * This routine returns information about a navaid. Any non-null field is + * filled out with information if it is available. + * + * Frequencies are in the nav.dat convention as described in the X-Plane nav + * database FAQ: NDB frequencies are exact, all others are multiplied by 100. + * + * The buffer for IDs should be at least 6 chars and the buffer for names + * should be at least 41 chars, but since these values are likely to go up, I + * recommend passing at least 32 chars for IDs and 256 chars for names when + * possible. + * + * The outReg parameter tells if the navaid is within the local "region" of + * loaded DSFs. (This information may not be particularly useful to plugins.) + * The parameter is a single byte value 1 for true or 0 for false, not a C + * string. + * + */ +XPLM_API void XPLMGetNavAidInfo( + XPLMNavRef inRef, + XPLMNavType * outType, /* Can be NULL */ + float * outLatitude, /* Can be NULL */ + float * outLongitude, /* Can be NULL */ + float * outHeight, /* Can be NULL */ + int * outFrequency, /* Can be NULL */ + float * outHeading, /* Can be NULL */ + char * outID, /* Can be NULL */ + char * outName, /* Can be NULL */ + char * outReg); /* Can be NULL */ + +/*************************************************************************** + * FLIGHT MANAGEMENT COMPUTER + ***************************************************************************/ +/* + * Note: the FMS works based on an array of entries. Indices into the array + * are zero-based. Each entry is a nav-aid plus an altitude. The FMS tracks + * the currently displayed entry and the entry that it is flying to. + * + * The FMS must be programmed with contiguous entries, so clearing an entry at + * the end shortens the effective flight plan. There is a max of 100 + * waypoints in the flight plan. + * + */ + + +/* + * XPLMCountFMSEntries + * + * This routine returns the number of entries in the FMS. + * + */ +XPLM_API int XPLMCountFMSEntries(void); + +/* + * XPLMGetDisplayedFMSEntry + * + * This routine returns the index of the entry the pilot is viewing. + * + */ +XPLM_API int XPLMGetDisplayedFMSEntry(void); + +/* + * XPLMGetDestinationFMSEntry + * + * This routine returns the index of the entry the FMS is flying to. + * + */ +XPLM_API int XPLMGetDestinationFMSEntry(void); + +/* + * XPLMSetDisplayedFMSEntry + * + * This routine changes which entry the FMS is showing to the index specified. + * + */ +XPLM_API void XPLMSetDisplayedFMSEntry( + int inIndex); + +/* + * XPLMSetDestinationFMSEntry + * + * This routine changes which entry the FMS is flying the aircraft toward. + * + */ +XPLM_API void XPLMSetDestinationFMSEntry( + int inIndex); + +/* + * XPLMGetFMSEntryInfo + * + * This routine returns information about a given FMS entry. If the entry is + * an airport or navaid, a reference to a nav entry can be returned allowing + * you to find additional information (such as a frequency, ILS heading, name, + * etc.). Note that this reference can be XPLM_NAV_NOT_FOUND until the + * information has been looked up asynchronously, so after flightplan changes, + * it might take up to a second for this field to become populated. The other + * information is available immediately. For a lat/lon entry, the lat/lon is + * returned by this routine but the navaid cannot be looked up (and the + * reference will be XPLM_NAV_NOT_FOUND). FMS name entry buffers should be at + * least 256 chars in length. + * + * WARNING: Due to a bug in X-Plane prior to 11.31, the navaid reference will + * not be set to XPLM_NAV_NOT_FOUND while no data is available, and instead + * just remain the value of the variable that you passed the pointer to. + * Therefore, always initialize the variable to XPLM_NAV_NOT_FOUND before + * passing the pointer to this function. + * + */ +XPLM_API void XPLMGetFMSEntryInfo( + int inIndex, + XPLMNavType * outType, /* Can be NULL */ + char * outID, /* Can be NULL */ + XPLMNavRef * outRef, /* Can be NULL */ + int * outAltitude, /* Can be NULL */ + float * outLat, /* Can be NULL */ + float * outLon); /* Can be NULL */ + +/* + * XPLMSetFMSEntryInfo + * + * This routine changes an entry in the FMS to have the destination navaid + * passed in and the altitude specified. Use this only for airports, fixes, + * and radio-beacon navaids. Currently of radio beacons, the FMS can only + * support VORs and NDBs. Use the routines below to clear or fly to a lat/lon. + * + */ +XPLM_API void XPLMSetFMSEntryInfo( + int inIndex, + XPLMNavRef inRef, + int inAltitude); + +/* + * XPLMSetFMSEntryLatLon + * + * This routine changes the entry in the FMS to a lat/lon entry with the given + * coordinates. + * + */ +XPLM_API void XPLMSetFMSEntryLatLon( + int inIndex, + float inLat, + float inLon, + int inAltitude); + +/* + * XPLMClearFMSEntry + * + * This routine clears the given entry, potentially shortening the flight + * plan. + * + */ +XPLM_API void XPLMClearFMSEntry( + int inIndex); + +/*************************************************************************** + * GPS RECEIVER + ***************************************************************************/ +/* + * These APIs let you read data from the GPS unit. + * + */ + +/* + * XPLMGetGPSDestinationType + * + * This routine returns the type of the currently selected GPS destination, + * one of fix, airport, VOR or NDB. + * + */ +XPLM_API XPLMNavType XPLMGetGPSDestinationType(void); + +/* + * XPLMGetGPSDestination + * + * This routine returns the current GPS destination. + * + */ +XPLM_API XPLMNavRef XPLMGetGPSDestination(void); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/SDK/CHeaders/XPLM/XPLMPlanes.h b/src/SDK/CHeaders/XPLM/XPLMPlanes.h new file mode 100755 index 00000000..486302db --- /dev/null +++ b/src/SDK/CHeaders/XPLM/XPLMPlanes.h @@ -0,0 +1,287 @@ +#ifndef _XPLMPlanes_h_ +#define _XPLMPlanes_h_ + +/* + * Copyright 2005-2012 Sandy Barbour and Ben Supnik All rights reserved. See + * license.txt for usage. X-Plane SDK Version: 2.1.1 + * + */ + +/*************************************************************************** + * XPLMPlanes + ***************************************************************************/ +/* + * The XPLMPlanes APIs allow you to control the various aircraft in X-Plane, + * both the user's and the sim's. + * + * *Note*: unlike almost all other APIs in the SDK, aircraft paths are _full_ + * file system paths for historical reasons. You'll need to prefix all + * relative paths with the X-Plane path as accessed via XPLMGetSystemPath. + * + */ + +#include "XPLMDefs.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/*************************************************************************** + * USER AIRCRAFT ACCESS + ***************************************************************************/ + +/* + * XPLMSetUsersAircraft + * + * This routine changes the user's aircraft. Note that this will reinitialize + * the user to be on the nearest airport's first runway. Pass in a full path + * (hard drive and everything including the .acf extension) to the .acf file. + * + */ +XPLM_API void XPLMSetUsersAircraft( + const char * inAircraftPath); +/* + * XPLMPlaceUserAtAirport + * + * This routine places the user at a given airport. Specify the airport by + * its X-Plane airport ID (e.g. 'KBOS'). + * + */ +XPLM_API void XPLMPlaceUserAtAirport( + const char * inAirportCode); +#if defined(XPLM300) +/* + * XPLMPlaceUserAtLocation + * + * Places the user at a specific location after performing any necessary + * scenery loads. + * + * As with in-air starts initiated from the X-Plane user interface, the + * aircraft will always start with its engines running, regardless of the + * user's preferences (i.e., regardless of what the dataref + * `sim/operation/prefs/startup_running` says). + * + */ +XPLM_API void XPLMPlaceUserAtLocation( + double latitudeDegrees, + double longitudeDegrees, + float elevationMetersMSL, + float headingDegreesTrue, + float speedMetersPerSecond); +#endif /* XPLM300 */ +/*************************************************************************** + * GLOBAL AIRCRAFT ACCESS + ***************************************************************************/ + +/* The user's aircraft is always index 0. */ +#define XPLM_USER_AIRCRAFT 0 +#if defined(XPLM_DEPRECATED) +/* + * XPLMPlaneDrawState_t + * + * This structure contains additional plane parameter info to be passed to + * draw plane. Make sure to fill in the size of the structure field with + * sizeof(XPLMDrawPlaneState_t) so that the XPLM can tell how many fields you + * knew about when compiling your plugin (since more fields may be added + * later). + * + * Most of these fields are ratios from 0 to 1 for control input. X-Plane + * calculates what the actual controls look like based on the .acf file for + * that airplane. Note for the yoke inputs, this is what the pilot of the + * plane has commanded (post artificial stability system if there were one) + * and affects aelerons, rudder, etc. It is not necessarily related to the + * actual position of the plane! + * + */ +typedef struct { + /* The size of the draw state struct. */ + int structSize; + /* A ratio from [0..1] describing how far the landing gear is extended. */ + float gearPosition; + /* Ratio of flap deployment, 0 = up, 1 = full deploy. */ + float flapRatio; + /* Ratio of spoiler deployment, 0 = none, 1 = full deploy. */ + float spoilerRatio; + /* Ratio of speed brake deployment, 0 = none, 1 = full deploy. */ + float speedBrakeRatio; + /* Ratio of slat deployment, 0 = none, 1 = full deploy. */ + float slatRatio; + /* Wing sweep ratio, 0 = forward, 1 = swept. */ + float wingSweep; + /* Thrust power, 0 = none, 1 = full fwd, -1 = full reverse. */ + float thrust; + /* Total pitch input for this plane. */ + float yokePitch; + /* Total Heading input for this plane. */ + float yokeHeading; + /* Total Roll input for this plane. */ + float yokeRoll; +} XPLMPlaneDrawState_t; +#endif /* XPLM_DEPRECATED */ +/* + * XPLMCountAircraft + * + * This function returns the number of aircraft X-Plane is capable of having, + * as well as the number of aircraft that are currently active. These numbers + * count the user's aircraft. It can also return the plugin that is currently + * controlling aircraft. In X-Plane 7, this routine reflects the number of + * aircraft the user has enabled in the rendering options window. + * + */ +XPLM_API void XPLMCountAircraft( + int * outTotalAircraft, + int * outActiveAircraft, + XPLMPluginID * outController); +/* + * XPLMGetNthAircraftModel + * + * This function returns the aircraft model for the Nth aircraft. Indices are + * zero based, with zero being the user's aircraft. The file name should be + * at least 256 chars in length; the path should be at least 512 chars in + * length. + * + */ +XPLM_API void XPLMGetNthAircraftModel( + int inIndex, + char * outFileName, + char * outPath); +/*************************************************************************** + * EXCLUSIVE AIRCRAFT ACCESS + ***************************************************************************/ +/* + * The following routines require exclusive access to the airplane APIs. Only + * one plugin may have this access at a time. + * + */ + + +/* + * XPLMPlanesAvailable_f + * + * Your airplanes available callback is called when another plugin gives up + * access to the multiplayer planes. Use this to wait for access to + * multiplayer. + * + */ +typedef void (* XPLMPlanesAvailable_f)( + void * inRefcon); + +/* + * XPLMAcquirePlanes + * + * XPLMAcquirePlanes grants your plugin exclusive access to the aircraft. It + * returns 1 if you gain access, 0 if you do not. + * + * inAircraft - pass in an array of pointers to strings specifying the planes + * you want loaded. For any plane index you do not want loaded, pass a + * 0-length string. Other strings should be full paths with the .acf + * extension. NULL terminates this array, or pass NULL if there are no planes + * you want loaded. + * + * If you pass in a callback and do not receive access to the planes your + * callback will be called when the airplanes are available. If you do receive + * airplane access, your callback will not be called. + * + */ +XPLM_API int XPLMAcquirePlanes( + char ** inAircraft, /* Can be NULL */ + XPLMPlanesAvailable_f inCallback, + void * inRefcon); + +/* + * XPLMReleasePlanes + * + * Call this function to release access to the planes. Note that if you are + * disabled, access to planes is released for you and you must reacquire it. + * + */ +XPLM_API void XPLMReleasePlanes(void); + +/* + * XPLMSetActiveAircraftCount + * + * This routine sets the number of active planes. If you pass in a number + * higher than the total number of planes availables, only the total number of + * planes available is actually used. + * + */ +XPLM_API void XPLMSetActiveAircraftCount( + int inCount); + +/* + * XPLMSetAircraftModel + * + * This routine loads an aircraft model. It may only be called if you have + * exclusive access to the airplane APIs. Pass in the path of the model with + * the .acf extension. The index is zero based, but you may not pass in 0 + * (use XPLMSetUsersAircraft to load the user's aircracft). + * + */ +XPLM_API void XPLMSetAircraftModel( + int inIndex, + const char * inAircraftPath); + +/* + * XPLMDisableAIForPlane + * + * This routine turns off X-Plane's AI for a given plane. The plane will + * continue to draw and be a real plane in X-Plane, but will not move itself. + * + */ +XPLM_API void XPLMDisableAIForPlane( + int inPlaneIndex); + +#if defined(XPLM_DEPRECATED) +/* + * XPLMDrawAircraft + * + * WARNING: Aircraft drawing via this API is deprecated and will not work in + * future versions of X-Plane. Use XPLMInstance for 3-d drawing of custom + * aircraft models. + * + * This routine draws an aircraft. It can only be called from a 3-d drawing + * callback. Pass in the position of the plane in OpenGL local coordinates + * and the orientation of the plane. A 1 for full drawing indicates that the + * whole plane must be drawn; a 0 indicates you only need the nav lights + * drawn. (This saves rendering time when planes are far away.) + * + */ +XPLM_API void XPLMDrawAircraft( + int inPlaneIndex, + float inX, + float inY, + float inZ, + float inPitch, + float inRoll, + float inYaw, + int inFullDraw, + XPLMPlaneDrawState_t * inDrawStateInfo); +#endif /* XPLM_DEPRECATED */ + +#if defined(XPLM_DEPRECATED) +/* + * XPLMReinitUsersPlane + * + * WARNING: DO NOT USE. Use XPLMPlaceUserAtAirport or + * XPLMPlaceUserAtLocation. + * + * This function recomputes the derived flight model data from the aircraft + * structure in memory. If you have used the data access layer to modify the + * aircraft structure, use this routine to resynchronize X-Plane; since + * X-Plane works at least partly from derived values, the sim will not behave + * properly until this is called. + * + * WARNING: this routine does not necessarily place the airplane at the + * airport; use XPLMSetUsersAircraft to be compatible. This routine is + * provided to do special experimentation with flight models without resetting + * flight. + * + */ +XPLM_API void XPLMReinitUsersPlane(void); +#endif /* XPLM_DEPRECATED */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/SDK/CHeaders/XPLM/XPLMPlugin.h b/src/SDK/CHeaders/XPLM/XPLMPlugin.h new file mode 100755 index 00000000..be5d06ca --- /dev/null +++ b/src/SDK/CHeaders/XPLM/XPLMPlugin.h @@ -0,0 +1,422 @@ +#ifndef _XPLMPlugin_h_ +#define _XPLMPlugin_h_ + +/* + * Copyright 2005-2012 Sandy Barbour and Ben Supnik All rights reserved. See + * license.txt for usage. X-Plane SDK Version: 2.1.1 + * + */ + +/*************************************************************************** + * XPLMPlugin + ***************************************************************************/ +/* + * These APIs provide facilities to find and work with other plugins and + * manage other plugins. + * + */ + +#include "XPLMDefs.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/*************************************************************************** + * FINDING PLUGINS + ***************************************************************************/ +/* + * These APIs allow you to find another plugin or yourself, or iterate across + * all plugins. For example, if you wrote an FMS plugin that needed to talk + * to an autopilot plugin, you could use these APIs to locate the autopilot + * plugin. + * + */ + + +/* + * XPLMGetMyID + * + * This routine returns the plugin ID of the calling plug-in. Call this to + * get your own ID. + * + */ +XPLM_API XPLMPluginID XPLMGetMyID(void); + +/* + * XPLMCountPlugins + * + * This routine returns the total number of plug-ins that are loaded, both + * disabled and enabled. + * + */ +XPLM_API int XPLMCountPlugins(void); + +/* + * XPLMGetNthPlugin + * + * This routine returns the ID of a plug-in by index. Index is 0 based from 0 + * to XPLMCountPlugins-1, inclusive. Plugins may be returned in any arbitrary + * order. + * + */ +XPLM_API XPLMPluginID XPLMGetNthPlugin( + int inIndex); + +/* + * XPLMFindPluginByPath + * + * This routine returns the plug-in ID of the plug-in whose file exists at the + * passed in absolute file system path. XPLM_NO_PLUGIN_ID is returned if the + * path does not point to a currently loaded plug-in. + * + */ +XPLM_API XPLMPluginID XPLMFindPluginByPath( + const char * inPath); + +/* + * XPLMFindPluginBySignature + * + * This routine returns the plug-in ID of the plug-in whose signature matches + * what is passed in or XPLM_NO_PLUGIN_ID if no running plug-in has this + * signature. Signatures are the best way to identify another plug-in as they + * are independent of the file system path of a plug-in or the human-readable + * plug-in name, and should be unique for all plug-ins. Use this routine to + * locate another plugin that your plugin interoperates with + * + */ +XPLM_API XPLMPluginID XPLMFindPluginBySignature( + const char * inSignature); + +/* + * XPLMGetPluginInfo + * + * This routine returns information about a plug-in. Each parameter should be + * a pointer to a buffer of at least + * 256 characters, or NULL to not receive the information. + * + * outName - the human-readable name of the plug-in. outFilePath - the + * absolute file path to the file that contains this plug-in. outSignature - a + * unique string that identifies this plug-in. outDescription - a + * human-readable description of this plug-in. + * + */ +XPLM_API void XPLMGetPluginInfo( + XPLMPluginID inPlugin, + char * outName, /* Can be NULL */ + char * outFilePath, /* Can be NULL */ + char * outSignature, /* Can be NULL */ + char * outDescription); /* Can be NULL */ + +/*************************************************************************** + * ENABLING/DISABLING PLUG-INS + ***************************************************************************/ +/* + * These routines are used to work with plug-ins and manage them. Most + * plugins will not need to use these APIs. + * + */ + + +/* + * XPLMIsPluginEnabled + * + * Returns whether the specified plug-in is enabled for running. + * + */ +XPLM_API int XPLMIsPluginEnabled( + XPLMPluginID inPluginID); + +/* + * XPLMEnablePlugin + * + * This routine enables a plug-in if it is not already enabled. It returns 1 + * if the plugin was enabled or successfully enables itself, 0 if it does not. + * Plugins may fail to enable (for example, if resources cannot be acquired) + * by returning 0 from their XPluginEnable callback. + * + */ +XPLM_API int XPLMEnablePlugin( + XPLMPluginID inPluginID); + +/* + * XPLMDisablePlugin + * + * This routine disableds an enabled plug-in. + * + */ +XPLM_API void XPLMDisablePlugin( + XPLMPluginID inPluginID); + +/* + * XPLMReloadPlugins + * + * This routine reloads all plug-ins. Once this routine is called and you + * return from the callback you were within (e.g. a menu select callback) you + * will receive your XPluginDisable and XPluginStop callbacks and your DLL + * will be unloaded, then the start process happens as if the sim was starting + * up. + * + */ +XPLM_API void XPLMReloadPlugins(void); + +/*************************************************************************** + * INTERPLUGIN MESSAGING + ***************************************************************************/ +/* + * Plugin messages are defined as 32-bit integers. Messages below 0x00FFFFFF + * are reserved for X-Plane and the plugin SDK. + * + * Messages come with a pointer parameter; the meaning of this pointer depends + * on the message itself. In some messages, the pointer parameter contains an + * actual typed pointer to data that can be inspected in the plugin; in these + * cases the documentation will state that the parameter "points to" + * information. + * + * in other cases, the value of the pointer is actually an integral number + * stuffed into the pointer's storage. In these second cases, the pointer + * parameter needs to be cast, not dereferenced. In these caess, the + * documentation will state that the parameter "contains" a value, which will + * always be an integral type. + * + * Some messages don't use the pointer parameter - in this case your plugin + * should ignore it. + * + * Messages have two conceptual uses: notifications and commands. Commands + * are sent from one plugin to another to induce behavior; notifications are + * sent from one plugin to all others for informational purposes. It is + * important that commands and notifications not have the same values because + * this could cause a notification sent by one plugin to accidentally induce a + * command in another. + * + * By convention, plugin-defined notifications should have the high bit set + * (e.g. be greater or equal to unsigned 0x8000000) while commands should have + * this bit be cleared. + * + * The following messages are sent to your plugin by X-Plane. + * + */ + + +/* This message is sent to your plugin whenever the user's plane crashes. The * + * parameter is ignored. */ +#define XPLM_MSG_PLANE_CRASHED 101 + +/* This message is sent to your plugin whenever a new plane is loaded. The * + * parameter contains the index number of the plane being loaded; 0 indicates * + * the user's plane. */ +#define XPLM_MSG_PLANE_LOADED 102 + +/* This messages is sent whenever the user's plane is positioned at a new * + * airport. The parameter is ignored. */ +#define XPLM_MSG_AIRPORT_LOADED 103 + +/* This message is sent whenever new scenery is loaded. Use datarefs to * + * determine the new scenery files that were loaded. The parameter is ignored.*/ +#define XPLM_MSG_SCENERY_LOADED 104 + +/* This message is sent whenever the user adjusts the number of X-Plane * + * aircraft models. You must use XPLMCountPlanes to find out how many planes * + * are now available. This message will only be sent in XP7 and higher * + * because in XP6 the number of aircraft is not user-adjustable. The parameter* + * is ignored. */ +#define XPLM_MSG_AIRPLANE_COUNT_CHANGED 105 + +#if defined(XPLM200) +/* This message is sent to your plugin whenever a plane is unloaded. The * + * parameter contains the index number of the plane being unloaded; 0 * + * indicates the user's plane. The parameter is of type int, passed as the * + * value of the pointer. (That is: the parameter is an int, not a pointer to * + * an int.) */ +#define XPLM_MSG_PLANE_UNLOADED 106 +#endif /* XPLM200 */ + +#if defined(XPLM210) +/* This message is sent to your plugin right before X-Plane writes its * + * preferences file. You can use this for two purposes: to write your own * + * preferences, and to modify any datarefs to influence preferences output. * + * For example, if your plugin temporarily modifies saved preferences, you can* + * put them back to their default values here to avoid having the tweaks be * + * persisted if your plugin is not loaded on the next invocation of X-Plane. * + * The parameter is ignored. */ +#define XPLM_MSG_WILL_WRITE_PREFS 107 +#endif /* XPLM210 */ + +#if defined(XPLM210) +/* This message is sent to your plugin right after a livery is loaded for an * + * airplane. You can use this to check the new livery (via datarefs) and * + * react accordingly. The parameter contains the index number of the aircraft* + * whose livery is changing. */ +#define XPLM_MSG_LIVERY_LOADED 108 +#endif /* XPLM210 */ + +#if defined(XPLM301) +/* Sent to your plugin right before X-Plane enters virtual reality mode (at * + * which time any windows that are not positioned in VR mode will no longer be* + * visible to the user). The parameter is unused and should be ignored. */ +#define XPLM_MSG_ENTERED_VR 109 +#endif /* XPLM301 */ + +#if defined(XPLM301) +/* Sent to your plugin right before X-Plane leaves virtual reality mode (at * + * which time you may want to clean up windows that are positioned in VR * + * mode). The parameter is unused and should be ignored. */ +#define XPLM_MSG_EXITING_VR 110 +#endif /* XPLM301 */ + +#if defined(XPLM303) +/* Sent to your plugin if another plugin wants to take over AI planes. If you * + * are a synthetic traffic provider, that probably means a plugin for an * + * online network has connected and wants to supply aircraft flown by real * + * humans and you should cease to provide synthetic traffic. If however you * + * are providing online traffic from real humans, you probably don't want to * + * disconnect, in which case you just ignore this message. The sender is the * + * plugin ID of the plugin asking for control of the planes now. You can use * + * it to find out who is requesting and whether you should yield to them. * + * Synthetic traffic providers should always yield to online networks. The * + * parameter is unused and should be ignored. */ +#define XPLM_MSG_RELEASE_PLANES 111 +#endif /* XPLM303 */ + +/* + * XPLMSendMessageToPlugin + * + * This function sends a message to another plug-in or X-Plane. Pass + * XPLM_NO_PLUGIN_ID to broadcast to all plug-ins. Only enabled plug-ins with + * a message receive function receive the message. + * + */ +XPLM_API void XPLMSendMessageToPlugin( + XPLMPluginID inPlugin, + int inMessage, + void * inParam); + +#if defined(XPLM200) +/*************************************************************************** + * Plugin Features API + ***************************************************************************/ +/* + * The plugin features API allows your plugin to "sign up" for additional + * capabilities and plugin system features that are normally disabled for + * backward compatibility. This allows advanced plugins to "opt-in" to new + * behavior. + * + * Each feature is defined by a permanent string name. The feature string + * names will vary with the particular installation of X-Plane, so plugins + * should not expect a feature to be guaranteed present. + * + * XPLM_WANTS_REFLECTIONS + * ---------------------- + * + * Available in the SDK 2.0 and later for X-Plane 9, enabling this capability + * causes your plugin to receive drawing hook callbacks when X-Plane builds + * its off-screen reflection and shadow rendering passes. Plugins should + * enable this and examine the dataref sim/graphics/view/plane_render_type to + * determine whether the drawing callback is for a reflection, shadow + * calculation, or the main screen. Rendering can be simlified or omitted for + * reflections, and non-solid drawing should be skipped for shadow + * calculations. + * + * **Note**: direct drawing via draw callbacks is not recommended; use the + * XPLMInstance API to create object models instead. + * + * XPLM_USE_NATIVE_PATHS + * --------------------- + * + * available in the SDK 2.1 and later for X-Plane 10, this modifies the plugin + * system to use Unix-style paths on all operating systems. With this enabled: + * + * * OS X paths will match the native OS X Unix. + * * Windows will use forward slashes but preserve C:\ or another drive letter + * when using complete file paths. + * * Linux uses its native file system path scheme. + * + * Without this enabled: + * + * * OS X will use CFM file paths separated by a colon. + * * Windows will use back-slashes and conventional DOS paths. + * * Linux uses its native file system path scheme. + * + * All plugins should enable this feature on OS X to access the native file + * system. + * + * XPLM_USE_NATIVE_WIDGET_WINDOWS + * ------------------------------ + * + * Available in the SDK 3.0.2 SDK, this capability tells the widgets library + * to use new, modern X-Plane backed XPLMDisplay windows to anchor all widget + * trees. Without it, widgets will always use legacy windows. + * + * Plugins should enable this to allow their widget hierarchies to respond to + * the user's UI size settings and to map widget-based windwos to a VR HMD. + * + * Before enabling this, make sure any custom widget code in your plugin is + * prepared to cope with the UI coordinate system not being th same as the + * OpenGL window coordinate system. + * + */ + + +/* + * XPLMFeatureEnumerator_f + * + * You pass an XPLMFeatureEnumerator_f to get a list of all features supported + * by a given version running version of X-Plane. This routine is called once + * for each feature. + * + */ +typedef void (* XPLMFeatureEnumerator_f)( + const char * inFeature, + void * inRef); + +/* + * XPLMHasFeature + * + * This returns 1 if the given installation of X-Plane supports a feature, or + * 0 if it does not. + * + */ +XPLM_API int XPLMHasFeature( + const char * inFeature); + +/* + * XPLMIsFeatureEnabled + * + * This returns 1 if a feature is currently enabled for your plugin, or 0 if + * it is not enabled. It is an error to call this routine with an unsupported + * feature. + * + */ +XPLM_API int XPLMIsFeatureEnabled( + const char * inFeature); + +/* + * XPLMEnableFeature + * + * This routine enables or disables a feature for your plugin. This will + * change the running behavior of X-Plane and your plugin in some way, + * depending on the feature. + * + */ +XPLM_API void XPLMEnableFeature( + const char * inFeature, + int inEnable); + +/* + * XPLMEnumerateFeatures + * + * This routine calls your enumerator callback once for each feature that this + * running version of X-Plane supports. Use this routine to determine all of + * the features that X-Plane can support. + * + */ +XPLM_API void XPLMEnumerateFeatures( + XPLMFeatureEnumerator_f inEnumerator, + void * inRef); + +#endif /* XPLM200 */ +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/SDK/CHeaders/XPLM/XPLMProcessing.h b/src/SDK/CHeaders/XPLM/XPLMProcessing.h new file mode 100755 index 00000000..94ef0c46 --- /dev/null +++ b/src/SDK/CHeaders/XPLM/XPLMProcessing.h @@ -0,0 +1,264 @@ +#ifndef _XPLMProcessing_h_ +#define _XPLMProcessing_h_ + +/* + * Copyright 2005-2012 Sandy Barbour and Ben Supnik All rights reserved. See + * license.txt for usage. X-Plane SDK Version: 2.1.1 + * + */ + +/*************************************************************************** + * XPLMProcessing + ***************************************************************************/ +/* + * This API allows you to get regular callbacks during the flight loop, the + * part of X-Plane where the plane's position calculates the physics of + * flight, etc. Use these APIs to accomplish periodic tasks like logging data + * and performing I/O. + * + * You can receive a callback either just before or just after the per-frame + * physics calculations happen - you can use post-FM callbacks to "patch" the + * flight model after it has run. + * + * If the user has set the number of flight model iterations per frame greater + * than one your plugin will _not_ see this; these integrations run on the + * sub-section of the flight model where iterations improve responsiveness + * (e.g. physical integration, not simple systems tracking) and are thus + * opaque to plugins. + * + * Flight loop scheduling, when scheduled by time, is scheduled by a "first + * callback after the deadline" schedule, e.g. your callbacks will always be + * slightly late to ensure that we don't run faster than your deadline. + * + * WARNING: Do NOT use these callbacks to draw! You cannot draw during flight + * loop callbacks. Use the drawing callbacks (see XPLMDisplay for more info) + * for graphics. (One exception: you can use a post-flight loop callback to + * update your own off-screen FBOs.) + * + */ + +#include "XPLMDefs.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/*************************************************************************** + * FLIGHT LOOP CALLBACKS + ***************************************************************************/ + +#if defined(XPLM210) +/* + * XPLMFlightLoopPhaseType + * + * You can register a flight loop callback to run either before or after the + * flight model is integrated by X-Plane. + * + */ +enum { + /* Your callback runs before X-Plane integrates the flight model. */ + xplm_FlightLoop_Phase_BeforeFlightModel = 0, + + /* Your callback runs after X-Plane integrates the flight model. */ + xplm_FlightLoop_Phase_AfterFlightModel = 1, + + +}; +typedef int XPLMFlightLoopPhaseType; +#endif /* XPLM210 */ + +#if defined(XPLM210) +/* + * XPLMFlightLoopID + * + * This is an opaque identifier for a flight loop callback. You can use this + * identifier to easily track and remove your callbacks, or to use the new + * flight loop APIs. + * + */ +typedef void * XPLMFlightLoopID; +#endif /* XPLM210 */ + +/* + * XPLMFlightLoop_f + * + * This is your flight loop callback. Each time the flight loop is iterated + * through, you receive this call at the end. + * + * Flight loop callbacks receive a number of input timing parameters. These + * input timing parameters are not particularly useful; you may need to track + * your own timing data (e.g. by reading datarefs). The input parameters are: + * + * - inElapsedSinceLastCall: the wall time since your last callback. + * - inElapsedTimeSinceLastFlightLoop: the wall time since any flight loop was + * dispatched. + * - inCounter: a monotonically increasing counter, bumped once per flight + * loop dispatch from the sim. + * - inRefcon: your own ptr constant from when you regitered yor callback. + * + * Your return value controls when you will next be called. + * + * - Return 0 to stop receiving callbacks. + * - Pass a positive number to specify how many seconds until the next + * callback. (You will be called at or after this time, not before.) + * - Pass a negative number to specify how many loops must go by until you + * are called. For example, -1.0 means call me the very next loop. + * + * Try to run your flight loop as infrequently as is practical, and suspend it + * (using return value 0) when you do not need it; lots of flight loop + * callbacks that do nothing lowers X-Plane's frame rate. + * + * Your callback will NOT be unregistered if you return 0; it will merely be + * inactive. + * + */ +typedef float (* XPLMFlightLoop_f)( + float inElapsedSinceLastCall, + float inElapsedTimeSinceLastFlightLoop, + int inCounter, + void * inRefcon); + +#if defined(XPLM210) +/* + * XPLMCreateFlightLoop_t + * + * XPLMCreateFlightLoop_t contains the parameters to create a new flight loop + * callback. The strsucture can be expanded in future SDKs - always set + * structSize to the size of your structure in bytes. + * + */ +typedef struct { + int structSize; + XPLMFlightLoopPhaseType phase; + XPLMFlightLoop_f callbackFunc; + void * refcon; +} XPLMCreateFlightLoop_t; +#endif /* XPLM210 */ + +/* + * XPLMGetElapsedTime + * + * This routine returns the elapsed time since the sim started up in decimal + * seconds. This is a wall timer; it keeps counting upward even if the sim is + * pasued. + * + * __WARNING__: XPLMGetElapsedTime is not a very good timer! It lacks + * precision in both its data type and its source. Do not attempt to use it + * for timing critical applications like network multiplayer. + * + */ +XPLM_API float XPLMGetElapsedTime(void); + +/* + * XPLMGetCycleNumber + * + * This routine returns a counter starting at zero for each sim cycle + * computed/video frame rendered. + * + */ +XPLM_API int XPLMGetCycleNumber(void); + +/* + * XPLMRegisterFlightLoopCallback + * + * This routine registers your flight loop callback. Pass in a pointer to a + * flight loop function and a refcon. inInterval defines when you will be + * called. Pass in a positive number to specify seconds from registration time + * to the next callback. Pass in a negative number to indicate when you will + * be called (e.g. pass -1 to be called at the next cylcle). Pass 0 to not be + * called; your callback will be inactive. + * + * (This legacy function only installs pre-flight-loop callbacks; use + * XPLMCreateFlightLoop for more control.) + * + */ +XPLM_API void XPLMRegisterFlightLoopCallback( + XPLMFlightLoop_f inFlightLoop, + float inInterval, + void * inRefcon); + +/* + * XPLMUnregisterFlightLoopCallback + * + * This routine unregisters your flight loop callback. Do NOT call it from + * your flight loop callback. Once your flight loop callback is unregistered, + * it will not be called again. + * + * Only use this on flight loops registered via + * XPLMRegisterFlightLoopCallback. + * + */ +XPLM_API void XPLMUnregisterFlightLoopCallback( + XPLMFlightLoop_f inFlightLoop, + void * inRefcon); + +/* + * XPLMSetFlightLoopCallbackInterval + * + * This routine sets when a callback will be called. Do NOT call it from your + * callback; use the return value of the callback to change your callback + * interval from inside your callback. + * + * inInterval is formatted the same way as in XPLMRegisterFlightLoopCallback; + * positive for seconds, negative for cycles, and 0 for deactivating the + * callback. If inRelativeToNow is 1, times are from the time of this call; + * otherwise they are from the time the callback was last called (or the time + * it was registered if it has never been called. + * + */ +XPLM_API void XPLMSetFlightLoopCallbackInterval( + XPLMFlightLoop_f inFlightLoop, + float inInterval, + int inRelativeToNow, + void * inRefcon); + +#if defined(XPLM210) +/* + * XPLMCreateFlightLoop + * + * This routine creates a flight loop callback and returns its ID. The flight + * loop callback is created using the input param struct, and is inited to be + * unscheduled. + * + */ +XPLM_API XPLMFlightLoopID XPLMCreateFlightLoop( + XPLMCreateFlightLoop_t * inParams); +#endif /* XPLM210 */ + +#if defined(XPLM210) +/* + * XPLMDestroyFlightLoop + * + * This routine destroys a flight loop callback by ID. Only call it on flight + * loops created with the newer XPLMCreateFlightLoop API. + * + */ +XPLM_API void XPLMDestroyFlightLoop( + XPLMFlightLoopID inFlightLoopID); +#endif /* XPLM210 */ + +#if defined(XPLM210) +/* + * XPLMScheduleFlightLoop + * + * This routine schedules a flight loop callback for future execution. If + * inInterval is negative, it is run in a certain number of frames based on + * the absolute value of the input. If the interval is positive, it is a + * duration in seconds. + * + * If inRelativeToNow is true, ties are interpretted relative to the time this + * routine is called; otherwise they are relative to the last call time or the + * time the flight loop was registered (if never called). + * + */ +XPLM_API void XPLMScheduleFlightLoop( + XPLMFlightLoopID inFlightLoopID, + float inInterval, + int inRelativeToNow); +#endif /* XPLM210 */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/SDK/CHeaders/XPLM/XPLMScenery.h b/src/SDK/CHeaders/XPLM/XPLMScenery.h new file mode 100644 index 00000000..452bac95 --- /dev/null +++ b/src/SDK/CHeaders/XPLM/XPLMScenery.h @@ -0,0 +1,450 @@ +#ifndef _XPLMScenery_h_ +#define _XPLMScenery_h_ + +/* + * Copyright 2005-2012 Sandy Barbour and Ben Supnik All rights reserved. See + * license.txt for usage. X-Plane SDK Version: 2.1.1 + * + */ + +/*************************************************************************** + * XPLMScenery + ***************************************************************************/ +/* + * This package contains APIs to interact with X-Plane's scenery system. + * + */ + +#include "XPLMDefs.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#if defined(XPLM200) +/*************************************************************************** + * Terrain Y-Testing + ***************************************************************************/ +/* + * The Y-testing API allows you to locate the physical scenery mesh. This + * would be used to place dynamic graphics on top of the ground in a plausible + * way or do physics interactions. + * + * The Y-test API works via probe objects, which are allocated by your plugin + * and used to query terrain. Probe objects exist both to capture which + * algorithm you have requested (see probe types) and also to cache query + * information. + * + * Performance Guidelines + * ---------------------- + * + * It is generally faster to use the same probe for nearby points and + * different probes for different points. Try not to allocate more than + * "hundreds" of probes at most. Share probes if you need more. Generally, + * probing operations are expensive, and should be avoided via caching when + * possible. + * + * Y testing returns a location on the terrain, a normal vectory, and a + * velocity vector. The normal vector tells you the slope of the terrain at + * that point. The velocity vector tells you if that terrain is moving (and is + * in meters/second). For example, if your Y test hits the aircraft carrier + * deck, this tells you the velocity of that point on the deck. + * + * Note: the Y-testing API is limited to probing the loaded scenery area, + * which is approximately 300x300 km in X-Plane 9. Probes outside this area + * will return the height of a 0 MSL sphere. + * + */ + + +/* + * XPLMProbeType + * + * XPLMProbeType defines the type of terrain probe - each probe has a + * different algorithm. (Only one type of probe is provided right now, but + * future APIs will expose more flexible or poewrful or useful probes. + * + */ +enum { + /* The Y probe gives you the location of the tallest physical scenery along * + * the Y axis going through the queried point. */ + xplm_ProbeY = 0, + + +}; +typedef int XPLMProbeType; + +/* + * XPLMProbeResult + * + * Probe results - possible results from a probe query. + * + */ +enum { + /* The probe hit terrain and returned valid values. */ + xplm_ProbeHitTerrain = 0, + + /* An error in the API call. Either the probe struct size is bad, or the * + * probe is invalid or the type is mismatched for the specific query call. */ + xplm_ProbeError = 1, + + /* The probe call succeeded but there is no terrain under this point (perhaps * + * it is off the side of the planet?) */ + xplm_ProbeMissed = 2, + + +}; +typedef int XPLMProbeResult; + +/* + * XPLMProbeRef + * + * An XPLMProbeRef is an opaque handle to a probe, used for querying the + * terrain. + * + */ +typedef void * XPLMProbeRef; + +/* + * XPLMProbeInfo_t + * + * XPLMProbeInfo_t contains the results of a probe call. Make sure to set + * structSize to the size of the struct before using it. + * + */ +typedef struct { + /* Size of structure in bytes - always set this before calling the XPLM. */ + int structSize; + /* Resulting X location of the terrain point we hit, in local OpenGL * + * coordinates. */ + float locationX; + /* Resulting Y location of the terrain point we hit, in local OpenGL * + * coordinates. */ + float locationY; + /* Resulting Z location of the terrain point we hit, in local OpenGL * + * coordinates. */ + float locationZ; + /* X component of the normal vector to the terrain we found. */ + float normalX; + /* Y component of the normal vector to the terrain we found. */ + float normalY; + /* Z component of the normal vector to the terrain we found. */ + float normalZ; + /* X component of the velocity vector of the terrain we found. */ + float velocityX; + /* Y component of the velocity vector of the terrain we found. */ + float velocityY; + /* Z component of the velocity vector of the terrain we found. */ + float velocityZ; + /* Tells if the surface we hit is water (otherwise it is land). */ + int is_wet; +} XPLMProbeInfo_t; + +/* + * XPLMCreateProbe + * + * Creates a new probe object of a given type and returns. + * + */ +XPLM_API XPLMProbeRef XPLMCreateProbe( + XPLMProbeType inProbeType); + +/* + * XPLMDestroyProbe + * + * Deallocates an existing probe object. + * + */ +XPLM_API void XPLMDestroyProbe( + XPLMProbeRef inProbe); + +/* + * XPLMProbeTerrainXYZ + * + * Probes the terrain. Pass in the XYZ coordinate of the probe point, a probe + * object, and an XPLMProbeInfo_t struct that has its structSize member set + * properly. Other fields are filled in if we hit terrain, and a probe result + * is returned. + * + */ +XPLM_API XPLMProbeResult XPLMProbeTerrainXYZ( + XPLMProbeRef inProbe, + float inX, + float inY, + float inZ, + XPLMProbeInfo_t * outInfo); + +#endif /* XPLM200 */ +#if defined(XPLM300) +/*************************************************************************** + * Magnetic Variation + ***************************************************************************/ +/* + * Use the magnetic variation (more properly, the "magnetic declination") API + * to find the offset of magnetic north from true north at a given latitude + * and longitude within the simulator. + * + * In the real world, the Earth's magnetic field is irregular, such that true + * north (the direction along a meridian toward the north pole) does not + * necessarily match what a magnetic compass shows as north. + * + * Using this API ensures that you present the same offsets to users as + * X-Plane's built-in instruments. + * + */ + + +/* + * XPLMGetMagneticVariation + * + * Returns X-Plane's simulated magnetic variation (declination) at the + * indication latitude and longitude. + * + */ +XPLM_API float XPLMGetMagneticVariation( + double latitude, + double longitude); + +/* + * XPLMDegTrueToDegMagnetic + * + * Converts a heading in degrees relative to true north into a value relative + * to magnetic north at the user's current location. + * + */ +XPLM_API float XPLMDegTrueToDegMagnetic( + float headingDegreesTrue); + +/* + * XPLMDegMagneticToDegTrue + * + * Converts a heading in degrees relative to magnetic north at the user's + * current location into a value relative to true north. + * + */ +XPLM_API float XPLMDegMagneticToDegTrue( + float headingDegreesMagnetic); + +#endif /* XPLM300 */ +/*************************************************************************** + * Object Drawing + ***************************************************************************/ +/* + * The object drawing routines let you load and draw X-Plane OBJ files. + * Objects are loaded by file path and managed via an opaque handle. X-Plane + * naturally reference counts objects, so it is important that you balance + * every successful call to XPLMLoadObject with a call to XPLMUnloadObject! + * + */ + + +#if defined(XPLM200) +/* + * XPLMObjectRef + * + * An XPLMObjectRef is a opaque handle to an .obj file that has been loaded + * into memory. + * + */ +typedef void * XPLMObjectRef; +#endif /* XPLM200 */ + +#if defined(XPLM200) +/* + * XPLMDrawInfo_t + * + * The XPLMDrawInfo_t structure contains positioning info for one object that + * is to be drawn. Be sure to set structSize to the size of the structure for + * future expansion. + * + */ +typedef struct { + /* Set this to the size of this structure! */ + int structSize; + /* X location of the object in local coordinates. */ + float x; + /* Y location of the object in local coordinates. */ + float y; + /* Z location of the object in local coordinates. */ + float z; + /* Pitch in degres to rotate the object, positive is up. */ + float pitch; + /* Heading in local coordinates to rotate the object, clockwise. */ + float heading; + /* Roll to rotate the object. */ + float roll; +} XPLMDrawInfo_t; +#endif /* XPLM200 */ + +#if defined(XPLM210) +/* + * XPLMObjectLoaded_f + * + * You provide this callback when loading an object asynchronously; it will be + * called once the object is loaded. Your refcon is passed back. The object + * ref passed in is the newly loaded object (ready for use) or NULL if an + * error occured. + * + * If your plugin is disabled, this callback will be delivered as soon as the + * plugin is re-enabled. If your plugin is unloaded before this callback is + * ever called, the SDK will release the object handle for you. + * + */ +typedef void (* XPLMObjectLoaded_f)( + XPLMObjectRef inObject, + void * inRefcon); +#endif /* XPLM210 */ + +#if defined(XPLM200) +/* + * XPLMLoadObject + * + * This routine loads an OBJ file and returns a handle to it. If X-Plane has + * already loaded the object, the handle to the existing object is returned. + * Do not assume you will get the same handle back twice, but do make sure to + * call unload once for every load to avoid "leaking" objects. The object will + * be purged from memory when no plugins and no scenery are using it. + * + * The path for the object must be relative to the X-System base folder. If + * the path is in the root of the X-System folder you may need to prepend ./ + * to it; loading objects in the root of the X-System folder is STRONGLY + * discouraged - your plugin should not dump art resources in the root folder! + * + * XPLMLoadObject will return NULL if the object cannot be loaded (either + * because it is not found or the file is misformatted). This routine will + * load any object that can be used in the X-Plane scenery system. + * + * It is important that the datarefs an object uses for animation already be + * loaded before you load the object. For this reason it may be necessary to + * defer object loading until the sim has fully started. + * + */ +XPLM_API XPLMObjectRef XPLMLoadObject( + const char * inPath); +#endif /* XPLM200 */ + +#if defined(XPLM210) +/* + * XPLMLoadObjectAsync + * + * This routine loads an object asynchronously; control is returned to you + * immediately while X-Plane loads the object. The sim will not stop flying + * while the object loads. For large objects, it may be several seconds before + * the load finishes. + * + * You provide a callback function that is called once the load has completed. + * Note that if the object cannot be loaded, you will not find out until the + * callback function is called with a NULL object handle. + * + * There is no way to cancel an asynchronous object load; you must wait for + * the load to complete and then release the object if it is no longer + * desired. + * + */ +XPLM_API void XPLMLoadObjectAsync( + const char * inPath, + XPLMObjectLoaded_f inCallback, + void * inRefcon); +#endif /* XPLM210 */ + +#if defined(XPLM_DEPRECATED) +/* + * XPLMDrawObjects + * + * __Deprecation Warning__: use XPLMInstancing to draw 3-d objects by creating + * instances, rather than these APIs from draw callbacks. + * + * XPLMDrawObjects draws an object from an OBJ file one or more times. You + * pass in the object and an array of XPLMDrawInfo_t structs, one for each + * place you would like the object to be drawn. + * + * X-Plane will attempt to cull the objects based on LOD and visibility, and + * will pick the appropriate LOD. + * + * Lighting is a boolean; pass 1 to show the night version of object with + * night-only lights lit up. Pass 0 to show the daytime version of the object. + * + * earth_relative controls the coordinate system. If this is 1, the rotations + * you specify are applied to the object after its coordinate system is + * transformed from local to earth-relative coordinates -- that is, an object + * with no rotations will point toward true north and the Y axis will be up + * against gravity. If this is 0, the object is drawn with your rotations from + * local coordanates -- that is, an object with no rotations is drawn pointing + * down the -Z axis and the Y axis of the object matches the local coordinate + * Y axis. + * + */ +XPLM_API void XPLMDrawObjects( + XPLMObjectRef inObject, + int inCount, + XPLMDrawInfo_t * inLocations, + int lighting, + int earth_relative); +#endif /* XPLM_DEPRECATED */ + +#if defined(XPLM200) +/* + * XPLMUnloadObject + * + * This routine marks an object as no longer being used by your plugin. + * Objects are reference counted: once no plugins are using an object, it is + * purged from memory. Make sure to call XPLMUnloadObject once for each + * successful call to XPLMLoadObject. + * + */ +XPLM_API void XPLMUnloadObject( + XPLMObjectRef inObject); +#endif /* XPLM200 */ + +#if defined(XPLM200) +/*************************************************************************** + * Library Access + ***************************************************************************/ +/* + * The library access routines allow you to locate scenery objects via the + * X-Plane library system. Right now library access is only provided for + * objects, allowing plugin-drawn objects to be extended using the library + * system. + * + */ + + +/* + * XPLMLibraryEnumerator_f + * + * An XPLMLibraryEnumerator_f is a callback you provide that is called once + * for each library element that is located. The returned paths will be + * relative to the X-System folder. + * + */ +typedef void (* XPLMLibraryEnumerator_f)( + const char * inFilePath, + void * inRef); + +/* + * XPLMLookupObjects + * + * This routine looks up a virtual path in the library system and returns all + * matching elements. You provide a callback - one virtual path may match many + * objects in the library. XPLMLookupObjects returns the number of objects + * found. + * + * The latitude and longitude parameters specify the location the object will + * be used. The library system allows for scenery packages to only provide + * objects to certain local locations. Only objects that are allowed at the + * latitude/longitude you provide will be returned. + * + */ +XPLM_API int XPLMLookupObjects( + const char * inPath, + float inLatitude, + float inLongitude, + XPLMLibraryEnumerator_f enumerator, + void * ref); + +#endif /* XPLM200 */ +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/SDK/CHeaders/XPLM/XPLMUtilities.h b/src/SDK/CHeaders/XPLM/XPLMUtilities.h new file mode 100755 index 00000000..bec319e1 --- /dev/null +++ b/src/SDK/CHeaders/XPLM/XPLMUtilities.h @@ -0,0 +1,970 @@ +#ifndef _XPLMUtilities_h_ +#define _XPLMUtilities_h_ + +/* + * Copyright 2005-2012 Sandy Barbour and Ben Supnik All rights reserved. See + * license.txt for usage. X-Plane SDK Version: 2.1.1 + * + */ + +/*************************************************************************** + * XPLMUtilities + ***************************************************************************/ + +#include "XPLMDefs.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/*************************************************************************** + * FILE UTILITIES + ***************************************************************************/ +/* + * The XPLMUtilities file APIs provide some basic file and path functions for + * use with X-Plane. + * + * Directory Separators + * -------------------- + * + * The XPLM has two modes it can work in: + * + * * X-Plane native paths: all paths are UTF8 strings, using the unix forward + * slash (/) as the directory separating character. In native path mode, + * you use the same path format for all three operating systems. + * + * * Legacy OS paths: the directroy separator is \ for Windows, : for OS X, + * and / for Linux; OS paths are encoded in MacRoman for OS X using legacy + * HFS conventions, use the application code page for multi-byte encoding + * on Unix using DOS path conventions, and use UTF-8 for Linux. + * + * While legacy OS paths are the default, we strongly encourage you to opt in + * to native paths using the XPLMEnableFeature API. + * + * * All OS X plugins should enable native paths all of the time; if you do + * not do this, you will have to convert all paths back from HFS to Unix + * (and deal with MacRoman) - code written using native paths and the C + * file APIs "just works" on OS X. + * + * * For Linux plugins, there is no difference between the two encodings. + * + * * Windows plugins will need to convert the UTF8 file paths to UTF16 for + * use with the "wide" APIs. While it might seem tempting to stick with + * legacy OS paths (and just use the "ANSI" Windows APIs), X-Plane is fully + * unicode-capable, and will often be installed in paths where the user's + * directories have no ACP encoding. + * + * Full and Relative Paths + * ----------------------- + * + * Some of these APIs use full paths, but others use paths relative to the + * user's X-Plane installation. This is documented on a per-API basis. + * + */ + + +#if defined(XPLM200) +/* + * XPLMDataFileType + * + * These enums define types of data files you can load or unload using the + * SDK. + * + */ +enum { + /* A situation (.sit) file, which starts off a flight in a given * + * configuration. */ + xplm_DataFile_Situation = 1, + + /* A situation movie (.smo) file, which replays a past flight. */ + xplm_DataFile_ReplayMovie = 2, + + +}; +typedef int XPLMDataFileType; +#endif /* XPLM200 */ + +/* + * XPLMGetSystemPath + * + * This function returns the full path to the X-System folder. Note that this + * is a directory path, so it ends in a trailing : or /. + * + * The buffer you pass should be at least 512 characters long. The path is + * returned using the current native or OS path conventions. + * + */ +XPLM_API void XPLMGetSystemPath( + char * outSystemPath); + +/* + * XPLMGetPrefsPath + * + * This routine returns a full path to a file that is within X-Plane's + * preferences directory. (You should remove the file name back to the last + * directory separator to get the preferences directory using + * XPLMExtractFileAndPath.) + * + * The buffer you pass should be at least 512 characters long. The path is + * returned using the current native or OS path conventions. + * + */ +XPLM_API void XPLMGetPrefsPath( + char * outPrefsPath); + +/* + * XPLMGetDirectorySeparator + * + * This routine returns a string with one char and a null terminator that is + * the directory separator for the current platform. This allows you to write + * code that concatinates directory paths without having to #ifdef for + * platform. The character returned will reflect the current file path mode. + * + */ +XPLM_API const char * XPLMGetDirectorySeparator(void); + +/* + * XPLMExtractFileAndPath + * + * Given a full path to a file, this routine separates the path from the file. + * If the path is a partial directory (e.g. ends in : or \) the trailing + * directory separator is removed. This routine works in-place; a pointer to + * the file part of the buffer is returned; the original buffer still starts + * with the path and is null terminated with no trailing separator. + * + */ +XPLM_API char * XPLMExtractFileAndPath( + char * inFullPath); + +/* + * XPLMGetDirectoryContents + * + * This routine returns a list of files in a directory (specified by a full + * path, no trailing : or \). The output is returned as a list of NULL + * terminated strings. An index array (if specified) is filled with pointers + * into the strings. The last file is indicated by a zero-length string (and + * NULL in the indices). This routine will return 1 if you had capacity for + * all files or 0 if you did not. You can also skip a given number of files. + * + * * inDirectoryPath - a null terminated C string containing the full path to + * the directory with no trailing directory char. + * + * * inFirstReturn - the zero-based index of the first file in the directory + * to return. (Usually zero to fetch all in one pass.) + * + * * outFileNames - a buffer to receive a series of sequential null + * terminated C-string file names. A zero-length C string will be appended + * to the very end. + * + * * inFileNameBufSize - the size of the file name buffer in bytes. + * + * * outIndices - a pointer to an array of character pointers that will + * become an index into the directory. The last file will be followed by a + * NULL value. Pass NULL if you do not want indexing information. + * + * * inIndexCount - the max size of the index in entries. + * + * * outTotalFiles - if not NULL, this is filled in with the number of files + * in the directory. + * + * * outReturnedFiles - if not NULL, the number of files returned by this + * iteration. + * + * Return value: 1 if all info could be returned, 0 if there was a buffer + * overrun. + * + * WARNING: Before X-Plane 7 this routine did not properly iterate through + * directories. If X-Plane + * 6 compatibility is needed, use your own code to iterate directories. + * + */ +XPLM_API int XPLMGetDirectoryContents( + const char * inDirectoryPath, + int inFirstReturn, + char * outFileNames, + int inFileNameBufSize, + char ** outIndices, /* Can be NULL */ + int inIndexCount, + int * outTotalFiles, /* Can be NULL */ + int * outReturnedFiles); /* Can be NULL */ + +#if defined(XPLM200) +/* + * XPLMLoadDataFile + * + * Loads a data file of a given type. Paths must be relative to the X-System + * folder. To clear the replay, pass a NULL file name (this is only valid with + * replay movies, not sit files). + * + */ +XPLM_API int XPLMLoadDataFile( + XPLMDataFileType inFileType, + const char * inFilePath); /* Can be NULL */ +#endif /* XPLM200 */ + +#if defined(XPLM200) +/* + * XPLMSaveDataFile + * + * Saves the current situation or replay; paths are relative to the X-System + * folder. + * + */ +XPLM_API int XPLMSaveDataFile( + XPLMDataFileType inFileType, + const char * inFilePath); +#endif /* XPLM200 */ + +/*************************************************************************** + * X-PLANE MISC + ***************************************************************************/ + +/* + * XPLMHostApplicationID + * + * While the plug-in SDK is only accessible to plugins running inside X-Plane, + * the original authors considered extending the API to other applications + * that shared basic infrastructure with X-Plane. These enumerations are + * hold-overs from that original roadmap; all values other than X-Plane are + * deprecated. Your plugin should never need this enumeration. + * + */ +enum { + xplm_Host_Unknown = 0, + + xplm_Host_XPlane = 1, + +#if defined(XPLM_DEPRECATED) + xplm_Host_PlaneMaker = 2, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + xplm_Host_WorldMaker = 3, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + xplm_Host_Briefer = 4, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + xplm_Host_PartMaker = 5, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + xplm_Host_YoungsMod = 6, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + xplm_Host_XAuto = 7, + +#endif /* XPLM_DEPRECATED */ + +}; +typedef int XPLMHostApplicationID; + +/* + * XPLMLanguageCode + * + * These enums define what language the sim is running in. These enumerations + * do not imply that the sim can or does run in all of these languages; they + * simply provide a known encoding in the event that a given sim version is + * localized to a certain language. + * + */ +enum { + xplm_Language_Unknown = 0, + + xplm_Language_English = 1, + + xplm_Language_French = 2, + + xplm_Language_German = 3, + + xplm_Language_Italian = 4, + + xplm_Language_Spanish = 5, + + xplm_Language_Korean = 6, + +#if defined(XPLM200) + xplm_Language_Russian = 7, + +#endif /* XPLM200 */ +#if defined(XPLM200) + xplm_Language_Greek = 8, + +#endif /* XPLM200 */ +#if defined(XPLM200) + xplm_Language_Japanese = 9, + +#endif /* XPLM200 */ +#if defined(XPLM300) + xplm_Language_Chinese = 10, + +#endif /* XPLM300 */ + +}; +typedef int XPLMLanguageCode; + +#if defined(XPLM200) +/* + * XPLMError_f + * + * An XPLM error callback is a function that you provide to receive debugging + * information from the plugin SDK. See XPLMSetErrorCallback for more + * information. NOTE: for the sake of debugging, your error callback will be + * called even if your plugin is not enabled, allowing you to receive debug + * info in your XPluginStart and XPluginStop callbacks. To avoid causing logic + * errors in the management code, do not call any other plugin routines from + * your error callback - it is only meant for catching errors in the + * debugging. + * + */ +typedef void (* XPLMError_f)( + const char * inMessage); +#endif /* XPLM200 */ + +#if defined(XPLM_DEPRECATED) +/* + * XPLMInitialized + * + * Deprecated: This function returns 1 if X-Plane has properly initialized the + * plug-in system. If this routine returns 0, many XPLM functions will not + * work. + * + * NOTE: because plugins are always called from within the XPLM, there is no + * need to check for initialization; it will always return 1. This routine is + * deprecated - you do not need to check it before continuing within your + * plugin. + * + */ +XPLM_API int XPLMInitialized(void); +#endif /* XPLM_DEPRECATED */ + +/* + * XPLMGetVersions + * + * This routine returns the revision of both X-Plane and the XPLM DLL. All + * versions are three-digit decimal numbers (e.g. 606 for version 6.06 of + * X-Plane); the current revision of the XPLM is 200 (2.00). This routine also + * returns the host ID of the app running us. + * + * The most common use of this routine is to special-case around X-Plane + * version-specific behavior. + * + */ +XPLM_API void XPLMGetVersions( + int * outXPlaneVersion, + int * outXPLMVersion, + XPLMHostApplicationID * outHostID); + +/* + * XPLMGetLanguage + * + * This routine returns the langauge the sim is running in. + * + */ +XPLM_API XPLMLanguageCode XPLMGetLanguage(void); + +#if defined(XPLM200) +/* + * XPLMFindSymbol + * + * This routine will attempt to find the symbol passed in the inString + * parameter. If the symbol is found a pointer the function is returned, + * othewise the function will return NULL. + * + * You can use XPLMFindSymbol to utilize newer SDK API features without + * requiring newer versions of the SDK (and X-Plane) as your minimum X-Plane + * version as follows: + * + * * Define the XPLMnnn macro to the minimum required XPLM version you will + * ship with (e.g. XPLM210 for X-Plane 10 compatibility). + * + * * Use XPLMGetVersions and XPLMFindSymbol to detect that the host sim is + * new enough to use new functions and resolve function pointers. + * + * * Conditionally use the new functions if and only if XPLMFindSymbol only + * returns a non- NULL pointer. + * + * Warning: you should always check the XPLM API version as well as the + * results of XPLMFindSymbol to determine if funtionality is safe to use. + * + * To use functionality via XPLMFindSymbol you will need to copy your own + * definitions of the X-Plane API prototypes and cast the returned pointer to + * the correct type. + * + */ +XPLM_API void * XPLMFindSymbol( + const char * inString); +#endif /* XPLM200 */ + +#if defined(XPLM200) +/* + * XPLMSetErrorCallback + * + * XPLMSetErrorCallback installs an error-reporting callback for your plugin. + * Normally the plugin system performs minimum diagnostics to maximize + * performance. When you install an error callback, you will receive calls due + * to certain plugin errors, such as passing bad parameters or incorrect data. + * + * Important: the error callback determines *programming* errors, e.g. bad API + * parameters. Every error that is returned by the error callback represents a + * mistake in your plugin that you should fix. Error callbacks are not used to + * report expected run-time problems (e.g. disk I/O errors). + * + * The intention is for you to install the error callback during debug + * sections and put a break-point inside your callback. This will cause you to + * break into the debugger from within the SDK at the point in your plugin + * where you made an illegal call. + * + * Installing an error callback may activate error checking code that would + * not normally run, and this may adversely affect performance, so do not + * leave error callbacks installed in shipping plugins. Since the only useful + * response to an error is to change code, error callbacks are not useful "in + * the field". + * + */ +XPLM_API void XPLMSetErrorCallback( + XPLMError_f inCallback); +#endif /* XPLM200 */ + +/* + * XPLMDebugString + * + * This routine outputs a C-style string to the Log.txt file. The file is + * immediately flushed so you will not lose data. (This does cause a + * performance penalty.) + * + * Please do *not* leave routine diagnostic logging enabled in your shipping + * plugin. The X-Plane Log file is shared by X-Plane and every plugin in the + * system, and plugins that (when functioning normally) print verbose log + * output make it difficult for developers to find error conditions from other + * parts of the system. + * + */ +XPLM_API void XPLMDebugString( + const char * inString); + +/* + * XPLMSpeakString + * + * This function displays the string in a translucent overlay over the current + * display and also speaks the string if text-to-speech is enabled. The string + * is spoken asynchronously, this function returns immediately. This function + * may not speak or print depending on user preferences. + * + */ +XPLM_API void XPLMSpeakString( + const char * inString); + +/* + * XPLMGetVirtualKeyDescription + * + * Given a virtual key code (as defined in XPLMDefs.h) this routine returns a + * human-readable string describing the character. This routine is provided + * for showing users what keyboard mappings they have set up. The string may + * read 'unknown' or be a blank or NULL string if the virtual key is unknown. + * + */ +XPLM_API const char * XPLMGetVirtualKeyDescription( + char inVirtualKey); + +/* + * XPLMReloadScenery + * + * XPLMReloadScenery reloads the current set of scenery. You can use this + * function in two typical ways: simply call it to reload the scenery, picking + * up any new installed scenery, .env files, etc. from disk. Or, change the + * lat/ref and lon/ref data refs and then call this function to shift the + * scenery environment. This routine is equivalent to picking "reload + * scenery" from the developer menu. + * + */ +XPLM_API void XPLMReloadScenery(void); + +#if defined(XPLM200) +/*************************************************************************** + * X-PLANE COMMAND MANAGEMENT + ***************************************************************************/ +/* + * The command management APIs let plugins interact with the command-system in + * X-Plane, the abstraction behind keyboard presses and joystick buttons. This + * API lets you create new commands and modify the behavior (or get + * notification) of existing ones. + * + * X-Plane Command Phases + * ---------------------- + * + * X-Plane commands are not instantaneous; they operate over a duration. + * (Think of a joystick button press - you can press, hold down, and then + * release the joystick button; X-Plane commands model this entire process.) + * + * An X-Plane command consists of three phases: a beginning, continuous + * repetition, and an ending. The command may be repeated zero times in its + * duration, followed by one command ending. Command begin and end messges are + * balanced, but a command may be bound to more than one event source (e.g. a + * keyboard key and a joystick button), in which case you may receive a second + * begin during before any end). + * + * When you issue commands in the plugin system, you *must* balance every call + * to XPLMCommandBegin with a call to XPLMCommandEnd with the same command + * reference. + * + * Command Behavior Modification + * ----------------------------- + * + * You can register a callback to handle a command either before or after + * X-Plane does; if you receive the command before X-Plane you have the option + * to either let X-Plane handle the command or hide the command from X-Plane. + * This lets plugins both augment commands and replace them. + * + * If you register for an existing command, be sure that you are *consistent* + * in letting X-Plane handle or not handle the command; you are responsible + * for passing a *balanced* number of begin and end messages to X-Plane. (E.g. + * it is not legal to pass all the begin messages to X-Plane but hide all the + * end messages). + * + */ + + +/* + * XPLMCommandPhase + * + * The phases of a command. + * + */ +enum { + /* The command is being started. */ + xplm_CommandBegin = 0, + + /* The command is continuing to execute. */ + xplm_CommandContinue = 1, + + /* The command has ended. */ + xplm_CommandEnd = 2, + + +}; +typedef int XPLMCommandPhase; + +/* + * XPLMCommandRef + * + * A command ref is an opaque identifier for an X-Plane command. Command + * references stay the same for the life of your plugin but not between + * executions of X-Plane. Command refs are used to execute commands, create + * commands, and create callbacks for particular commands. + * + * Note that a command is not "owned" by a particular plugin. Since many + * plugins may participate in a command's execution, the command does not go + * away if the plugin that created it is unloaded. + * + */ +typedef void * XPLMCommandRef; + +/* + * XPLMCommandCallback_f + * + * A command callback is a function in your plugin that is called when a + * command is pressed. Your callback receives the command reference for the + * particular command, the phase of the command that is executing, and a + * reference pointer that you specify when registering the callback. + * + * Your command handler should return 1 to let processing of the command + * continue to other plugins and X-Plane, or 0 to halt processing, potentially + * bypassing X-Plane code. + * + */ +typedef int (* XPLMCommandCallback_f)( + XPLMCommandRef inCommand, + XPLMCommandPhase inPhase, + void * inRefcon); + +/* + * XPLMFindCommand + * + * XPLMFindCommand looks up a command by name, and returns its command + * reference or NULL if the command does not exist. + * + */ +XPLM_API XPLMCommandRef XPLMFindCommand( + const char * inName); + +/* + * XPLMCommandBegin + * + * XPLMCommandBegin starts the execution of a command, specified by its + * command reference. The command is "held down" until XPLMCommandEnd is + * called. You must balance each XPLMCommandBegin call with an XPLMCommandEnd + * call. + * + */ +XPLM_API void XPLMCommandBegin( + XPLMCommandRef inCommand); + +/* + * XPLMCommandEnd + * + * XPLMCommandEnd ends the execution of a given command that was started with + * XPLMCommandBegin. You must not issue XPLMCommandEnd for a command you did + * not begin. + * + */ +XPLM_API void XPLMCommandEnd( + XPLMCommandRef inCommand); + +/* + * XPLMCommandOnce + * + * This executes a given command momentarily, that is, the command begins and + * ends immediately. This is the equivalent of calling XPLMCommandBegin() and + * XPLMCommandEnd() back ot back. + * + */ +XPLM_API void XPLMCommandOnce( + XPLMCommandRef inCommand); + +/* + * XPLMCreateCommand + * + * XPLMCreateCommand creates a new command for a given string. If the command + * already exists, the existing command reference is returned. The description + * may appear in user interface contexts, such as the joystick configuration + * screen. + * + */ +XPLM_API XPLMCommandRef XPLMCreateCommand( + const char * inName, + const char * inDescription); + +/* + * XPLMRegisterCommandHandler + * + * XPLMRegisterCommandHandler registers a callback to be called when a command + * is executed. You provide a callback with a reference pointer. + * + * If inBefore is true, your command handler callback will be executed before + * X-Plane executes the command, and returning 0 from your callback will + * disable X-Plane's processing of the command. If inBefore is false, your + * callback will run after X-Plane. (You can register a single callback both + * before and after a command.) + * + */ +XPLM_API void XPLMRegisterCommandHandler( + XPLMCommandRef inComand, + XPLMCommandCallback_f inHandler, + int inBefore, + void * inRefcon); + +/* + * XPLMUnregisterCommandHandler + * + * XPLMUnregisterCommandHandler removes a command callback registered with + * XPLMRegisterCommandHandler. + * + */ +XPLM_API void XPLMUnregisterCommandHandler( + XPLMCommandRef inComand, + XPLMCommandCallback_f inHandler, + int inBefore, + void * inRefcon); + +#endif /* XPLM200 */ +#if defined(XPLM_DEPRECATED) +/*************************************************************************** + * X-PLANE USER INTERACTION + ***************************************************************************/ +/* + * WARNING: The legacy user interaction API is deprecated; while it was the + * only way to run commands in X-Plane 6,7 and 8, it is obsolete, and was + * replaced by the command system API in X-Plane 9. You should not use this + * API; replace any of the calls below with XPLMCommand invocations based on + * persistent command strings. The documentation that follows is for historic + * reference only. + * + * The legacy user interaction APIs let you simulate commands the user can do + * with a joystick, keyboard etc. Note that it is generally safer for future + * compatibility to use one of these commands than to manipulate the + * underlying sim data. + * + */ + + +/* + * XPLMCommandKeyID + * + * These enums represent all the keystrokes available within X-Plane. They can + * be sent to X-Plane directly. For example, you can reverse thrust using + * these enumerations. + * + */ +enum { + xplm_key_pause=0, + xplm_key_revthrust, + xplm_key_jettison, + xplm_key_brakesreg, + xplm_key_brakesmax, + xplm_key_gear, + xplm_key_timedn, + xplm_key_timeup, + xplm_key_fadec, + xplm_key_otto_dis, + xplm_key_otto_atr, + xplm_key_otto_asi, + xplm_key_otto_hdg, + xplm_key_otto_gps, + xplm_key_otto_lev, + xplm_key_otto_hnav, + xplm_key_otto_alt, + xplm_key_otto_vvi, + xplm_key_otto_vnav, + xplm_key_otto_nav1, + xplm_key_otto_nav2, + xplm_key_targ_dn, + xplm_key_targ_up, + xplm_key_hdgdn, + xplm_key_hdgup, + xplm_key_barodn, + xplm_key_baroup, + xplm_key_obs1dn, + xplm_key_obs1up, + xplm_key_obs2dn, + xplm_key_obs2up, + xplm_key_com1_1, + xplm_key_com1_2, + xplm_key_com1_3, + xplm_key_com1_4, + xplm_key_nav1_1, + xplm_key_nav1_2, + xplm_key_nav1_3, + xplm_key_nav1_4, + xplm_key_com2_1, + xplm_key_com2_2, + xplm_key_com2_3, + xplm_key_com2_4, + xplm_key_nav2_1, + xplm_key_nav2_2, + xplm_key_nav2_3, + xplm_key_nav2_4, + xplm_key_adf_1, + xplm_key_adf_2, + xplm_key_adf_3, + xplm_key_adf_4, + xplm_key_adf_5, + xplm_key_adf_6, + xplm_key_transpon_1, + xplm_key_transpon_2, + xplm_key_transpon_3, + xplm_key_transpon_4, + xplm_key_transpon_5, + xplm_key_transpon_6, + xplm_key_transpon_7, + xplm_key_transpon_8, + xplm_key_flapsup, + xplm_key_flapsdn, + xplm_key_cheatoff, + xplm_key_cheaton, + xplm_key_sbrkoff, + xplm_key_sbrkon, + xplm_key_ailtrimL, + xplm_key_ailtrimR, + xplm_key_rudtrimL, + xplm_key_rudtrimR, + xplm_key_elvtrimD, + xplm_key_elvtrimU, + xplm_key_forward, + xplm_key_down, + xplm_key_left, + xplm_key_right, + xplm_key_back, + xplm_key_tower, + xplm_key_runway, + xplm_key_chase, + xplm_key_free1, + xplm_key_free2, + xplm_key_spot, + xplm_key_fullscrn1, + xplm_key_fullscrn2, + xplm_key_tanspan, + xplm_key_smoke, + xplm_key_map, + xplm_key_zoomin, + xplm_key_zoomout, + xplm_key_cycledump, + xplm_key_replay, + xplm_key_tranID, + xplm_key_max +}; +typedef int XPLMCommandKeyID; + +/* + * XPLMCommandButtonID + * + * These are enumerations for all of the things you can do with a joystick + * button in X-Plane. They currently match the buttons menu in the equipment + * setup dialog, but these enums will be stable even if they change in + * X-Plane. + * + */ +enum { + xplm_joy_nothing=0, + xplm_joy_start_all, + xplm_joy_start_0, + xplm_joy_start_1, + xplm_joy_start_2, + xplm_joy_start_3, + xplm_joy_start_4, + xplm_joy_start_5, + xplm_joy_start_6, + xplm_joy_start_7, + xplm_joy_throt_up, + xplm_joy_throt_dn, + xplm_joy_prop_up, + xplm_joy_prop_dn, + xplm_joy_mixt_up, + xplm_joy_mixt_dn, + xplm_joy_carb_tog, + xplm_joy_carb_on, + xplm_joy_carb_off, + xplm_joy_trev, + xplm_joy_trm_up, + xplm_joy_trm_dn, + xplm_joy_rot_trm_up, + xplm_joy_rot_trm_dn, + xplm_joy_rud_lft, + xplm_joy_rud_cntr, + xplm_joy_rud_rgt, + xplm_joy_ail_lft, + xplm_joy_ail_cntr, + xplm_joy_ail_rgt, + xplm_joy_B_rud_lft, + xplm_joy_B_rud_rgt, + xplm_joy_look_up, + xplm_joy_look_dn, + xplm_joy_look_lft, + xplm_joy_look_rgt, + xplm_joy_glance_l, + xplm_joy_glance_r, + xplm_joy_v_fnh, + xplm_joy_v_fwh, + xplm_joy_v_tra, + xplm_joy_v_twr, + xplm_joy_v_run, + xplm_joy_v_cha, + xplm_joy_v_fr1, + xplm_joy_v_fr2, + xplm_joy_v_spo, + xplm_joy_flapsup, + xplm_joy_flapsdn, + xplm_joy_vctswpfwd, + xplm_joy_vctswpaft, + xplm_joy_gear_tog, + xplm_joy_gear_up, + xplm_joy_gear_down, + xplm_joy_lft_brake, + xplm_joy_rgt_brake, + xplm_joy_brakesREG, + xplm_joy_brakesMAX, + xplm_joy_speedbrake, + xplm_joy_ott_dis, + xplm_joy_ott_atr, + xplm_joy_ott_asi, + xplm_joy_ott_hdg, + xplm_joy_ott_alt, + xplm_joy_ott_vvi, + xplm_joy_tim_start, + xplm_joy_tim_reset, + xplm_joy_ecam_up, + xplm_joy_ecam_dn, + xplm_joy_fadec, + xplm_joy_yaw_damp, + xplm_joy_art_stab, + xplm_joy_chute, + xplm_joy_JATO, + xplm_joy_arrest, + xplm_joy_jettison, + xplm_joy_fuel_dump, + xplm_joy_puffsmoke, + xplm_joy_prerotate, + xplm_joy_UL_prerot, + xplm_joy_UL_collec, + xplm_joy_TOGA, + xplm_joy_shutdown, + xplm_joy_con_atc, + xplm_joy_fail_now, + xplm_joy_pause, + xplm_joy_rock_up, + xplm_joy_rock_dn, + xplm_joy_rock_lft, + xplm_joy_rock_rgt, + xplm_joy_rock_for, + xplm_joy_rock_aft, + xplm_joy_idle_hilo, + xplm_joy_lanlights, + xplm_joy_max +}; +typedef int XPLMCommandButtonID; + +/* + * XPLMSimulateKeyPress + * + * This function simulates a key being pressed for X-Plane. The keystroke goes + * directly to X-Plane; it is never sent to any plug-ins. However, since this + * is a raw key stroke it may be mapped by the keys file or enter text into a + * field. + * + * Deprecated: use XPLMCommandOnce + * + */ +XPLM_API void XPLMSimulateKeyPress( + int inKeyType, + int inKey); + +/* + * XPLMCommandKeyStroke + * + * This routine simulates a command-key stroke. However, the keys are done by + * function, not by actual letter, so this function works even if the user has + * remapped their keyboard. Examples of things you might do with this include + * pausing the simulator. + * + * Deprecated: use XPLMCommandOnce + * + */ +XPLM_API void XPLMCommandKeyStroke( + XPLMCommandKeyID inKey); + +/* + * XPLMCommandButtonPress + * + * This function simulates any of the actions that might be taken by pressing + * a joystick button. However, this lets you call the command directly rather + * than have to know which button is mapped where. Important: you must release + * each button you press. The APIs are separate so that you can 'hold down' a + * button for a fixed amount of time. + * + * Deprecated: use XPLMCommandBegin. + * + */ +XPLM_API void XPLMCommandButtonPress( + XPLMCommandButtonID inButton); + +/* + * XPLMCommandButtonRelease + * + * This function simulates any of the actions that might be taken by pressing + * a joystick button. See XPLMCommandButtonPress. + * + * Deprecated: use XPLMCommandEnd. + * + */ +XPLM_API void XPLMCommandButtonRelease( + XPLMCommandButtonID inButton); + +#endif /* XPLM_DEPRECATED */ +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/SDK/Delphi/Widgets/XPStandardWidgets.pas b/src/SDK/Delphi/Widgets/XPStandardWidgets.pas new file mode 100755 index 00000000..d77f3838 --- /dev/null +++ b/src/SDK/Delphi/Widgets/XPStandardWidgets.pas @@ -0,0 +1,470 @@ +{ + Copyright 2005-2012 Sandy Barbour and Ben Supnik All rights reserved. See + license.txt for usage. X-Plane SDK Version: 2.1.1 +} + +UNIT XPStandardWidgets; +INTERFACE +{ + ## THEORY OF OPERATION + + The standard widgets are widgets built into the widgets library. While you + can gain access to the widget function that drives them, you generally use + them by calling XPCreateWidget and then listening for special messages, + etc. + + The standard widgets often send mesages to themselves when the user + performs an event; these messages are sent up the widget hierarchy until + they are handled. So you can add a widget proc directly to a push button + (for example) to intercept the message when it is clicked, or you can put + one widget proc on a window for all of the push buttons in the window. Most + of these messages contain the original widget ID as a parameter so you can + know which widget is messaging no matter who it is sent to. +} + +USES + XPWidgetDefs; + {$A4} +{___________________________________________________________________________ + * MAIN WINDOW + ___________________________________________________________________________} +{ + The main window widget class provides a "window" as the user knows it. + These windows are dragable and can be selected. Use them to create floating + windows and non-modal dialogs. +} + + +CONST + xpWidgetClass_MainWindow = 1; + + { + Main Window Type Values + + These type values are used to control the appearance of a main window. + } + { The standard main window; pin stripes on XP7, metal frame on XP 6. } + xpMainWindowStyle_MainWindow = 0 +; + { A translucent dark gray window, like the one ATC messages appear in. } + xpMainWindowStyle_Translucent = 1 +; + + { + Main Window Properties + } + { This property specifies the type of window. Set to one of the main window } + { types above. } + xpProperty_MainWindowType = 1100 +; + { This property specifies whether the main window has close boxes in its } + { corners. } + xpProperty_MainWindowHasCloseBoxes = 1200 +; + + { + MainWindow Messages + } + { This message is sent when the close buttons are pressed for your window. } + xpMessage_CloseButtonPushed = 1200 +; + +{___________________________________________________________________________ + * SUB WINDOW + ___________________________________________________________________________} +{ + X-Plane dialogs are divided into separate areas; the sub window widgets + allow you to make these areas. Create one main window and place several + subwindows inside it. Then place your controls inside the subwindows. +} + + +CONST + xpWidgetClass_SubWindow = 2; + + { + SubWindow Type Values + + These values control the appearance of the subwindow. + } + { A panel that sits inside a main window. } + xpSubWindowStyle_SubWindow = 0 +; + { A screen that sits inside a panel for showing text information. } + xpSubWindowStyle_Screen = 2 +; + { A list view for scrolling lists. } + xpSubWindowStyle_ListView = 3 +; + + { + SubWindow Properties + } + { This property specifies the type of window. Set to one of the subwindow } + { types above. } + xpProperty_SubWindowType = 1200 +; + +{___________________________________________________________________________ + * BUTTON + ___________________________________________________________________________} +{ + The button class provides a number of different button styles and + behaviors, including push buttons, radio buttons, check boxes, etc. The + button label appears on or next to the button depending on the button's + appearance, or type. + + The button's behavior is a separate property that dictates who it hilights + and what kinds of messages it sends. Since behavior and type are different, + you can do strange things like make check boxes that act as push buttons or + push buttons with radio button behavior. + + In X-Plane 6 there were no check box graphics. The result is the following + behavior: in X-Plane + 6 all check box and radio buttons are round (radio-button style) buttons; + in X-Plane 7 they are all square (check-box style) buttons. In a future + version of X-Plane, the xpButtonBehavior enums will provide the correct + graphic (check box or radio button) giving the expected result. +} + + +CONST + xpWidgetClass_Button = 3; + + { + Button Types + + These define the visual appearance of buttons but not how they respond to + the mouse. + } + { This is a standard push button, like an 'OK' or 'Cancel' button in a dialog} + { box. } + xpPushButton = 0 +; + { A check box or radio button. Use this and the button behaviors below to } + { get the desired behavior. } + xpRadioButton = 1 +; + { A window close box. } + xpWindowCloseBox = 3 +; + { A small down arrow. } + xpLittleDownArrow = 5 +; + { A small up arrow. } + xpLittleUpArrow = 6 +; + + { + Button Behavior Values + + These define how the button responds to mouse clicks. + } + { Standard push button behavior. The button hilites while the mouse is } + { clicked over it and unhilites when the mouse is moved outside of it or } + { released. If the mouse is released over the button, the } + { xpMsg_PushButtonPressed message is sent. } + xpButtonBehaviorPushButton = 0 +; + { Check box behavior. The button immediately toggles its value when the mouse} + { is clicked and sends out a xpMsg_ButtonStateChanged message. } + xpButtonBehaviorCheckBox = 1 +; + { Radio button behavior. The button immediately sets its state to one and } + { sends out a xpMsg_ButtonStateChanged message if it was not already set to } + { one. You must turn off other radio buttons in a group in your code. } + xpButtonBehaviorRadioButton = 2 +; + + { + Button Properties + } + { This property sets the visual type of button. Use one of the button types } + { above. } + xpProperty_ButtonType = 1300 +; + { This property sets the button's behavior. Use one of the button behaviors } + { above. } + xpProperty_ButtonBehavior = 1301 +; + { This property tells whether a check box or radio button is "checked" or } + { not. Not used for push buttons. } + xpProperty_ButtonState = 1302 +; + + { + Button Messages + + These messages are sent by the button to itself and then up the widget + chain when the button is clicked. (You may intercept them by providing a + widget handler for the button itself or by providing a handler in a parent + widget.) + } + { This message is sent when the user completes a click and release in a } + { button with push button behavior. Parameter one of the message is the } + { widget ID of the button. This message is dispatched up the widget } + { hierarchy. } + xpMsg_PushButtonPressed = 1300 +; + { This message is sent when a button is clicked that has radio button or } + { check box behavior and its value changes. (Note that if the value changes } + { by setting a property you do not receive this message!) Parameter one is } + { the widget ID of the button, parameter 2 is the new state value, either } + { zero or one. This message is dispatched up the widget hierarchy. } + xpMsg_ButtonStateChanged = 1301 +; + +{___________________________________________________________________________ + * TEXT FIELD + ___________________________________________________________________________} +{ + The text field widget provides an editable text field including mouse + selection and keyboard navigation. The contents of the text field are its + descriptor. (The descriptor changes as the user types.) + + The text field can have a number of types, that effect the visual layout of + the text field. The text field sends messages to itself so you may control + its behavior. + + If you need to filter keystrokes, add a new handler and intercept the key + press message. Since key presses are passed by pointer, you can modify the + keystroke and pass it through to the text field widget. + + WARNING: in X-Plane before 7.10 (including 6.70) null characters could + crash X-Plane. To prevent this, wrap this object with a filter function + (more instructions can be found on the SDK website). +} + + +CONST + xpWidgetClass_TextField = 4; + + { + Text Field Type Values + + These control the look of the text field. + } + { A field for text entry. } + xpTextEntryField = 0 +; + { A transparent text field. The user can type and the text is drawn, but no } + { background is drawn. You can draw your own background by adding a widget } + { handler and prehandling the draw message. } + xpTextTransparent = 3 +; + { A translucent edit field, dark gray. } + xpTextTranslucent = 4 +; + + { + Text Field Properties + } + { This is the character position the selection starts at, zero based. If it } + { is the same as the end insertion point, the insertion point is not a } + { selection. } + xpProperty_EditFieldSelStart = 1400 +; + { This is the character position of the end of the selection. } + xpProperty_EditFieldSelEnd = 1401 +; + { This is the character position a drag was started at if the user is } + { dragging to select text, or -1 if a drag is not in progress. } + xpProperty_EditFieldSelDragStart = 1402 +; + { This is the type of text field to display, from the above list. } + xpProperty_TextFieldType = 1403 +; + { Set this property to 1 to password protect the field. Characters will be } + { drawn as *s even though the descriptor will contain plain-text. } + xpProperty_PasswordMode = 1404 +; + { The max number of characters you can enter, if limited. Zero means } + { unlimited. } + xpProperty_MaxCharacters = 1405 +; + { The first visible character on the left. This effectively scrolls the text} + { field. } + xpProperty_ScrollPosition = 1406 +; + { The font to draw the field's text with. (An XPLMFontID.) } + xpProperty_Font = 1407 +; + { This is the active side of the insert selection. (Internal) } + xpProperty_ActiveEditSide = 1408 +; + + { + Text Field Messages + } + { The text field sends this message to itself when its text changes. It sends} + { the message up the call chain; param1 is the text field's widget ID. } + xpMsg_TextFieldChanged = 1400 +; + +{___________________________________________________________________________ + * SCROLL BAR + ___________________________________________________________________________} +{ + A standard scroll bar or slider control. The scroll bar has a minimum, + maximum and current value that is updated when the user drags it. The + scroll bar sends continuous messages as it is dragged. +} + + +CONST + xpWidgetClass_ScrollBar = 5; + + { + Scroll Bar Type Values + + This defines how the scroll bar looks. + } + { A standard X-Plane scroll bar (with arrows on the ends). } + xpScrollBarTypeScrollBar = 0 +; + { A slider, no arrows. } + xpScrollBarTypeSlider = 1 +; + + { + Scroll Bar Properties + } + { The current position of the thumb (in between the min and max, inclusive) } + xpProperty_ScrollBarSliderPosition = 1500 +; + { The value the scroll bar has when the thumb is in the lowest position. } + xpProperty_ScrollBarMin = 1501 +; + { The value the scroll bar has when the thumb is in the highest position. } + xpProperty_ScrollBarMax = 1502 +; + { How many units to move the scroll bar when clicking next to the thumb. The } + { scroll bar always moves one unit when the arrows are clicked. } + xpProperty_ScrollBarPageAmount = 1503 +; + { The type of scrollbar from the enums above. } + xpProperty_ScrollBarType = 1504 +; + { Used internally. } + xpProperty_ScrollBarSlop = 1505 +; + + { + Scroll Bar Messages + } + { The scroll bar sends this message when the slider position changes. It } + { sends the message up the call chain; param1 is the Scroll Bar widget ID. } + xpMsg_ScrollBarSliderPositionChanged = 1500 +; + +{___________________________________________________________________________ + * CAPTION + ___________________________________________________________________________} +{ + A caption is a simple widget that shows its descriptor as a string, useful + for labeling parts of a window. It always shows its descriptor as its + string and is otherwise transparent. +} + + +CONST + xpWidgetClass_Caption = 6; + + { + Caption Properties + } + { This property specifies whether the caption is lit; use lit captions } + { against screens. } + xpProperty_CaptionLit = 1600 +; + +{___________________________________________________________________________ + * GENERAL GRAPHICS + ___________________________________________________________________________} +{ + The general graphics widget can show one of many icons available from + X-Plane. +} + + +CONST + xpWidgetClass_GeneralGraphics = 7; + + { + General Graphics Types Values + + These define the icon for the general graphics. + } + xpShip = 4 +; + xpILSGlideScope = 5 +; + xpMarkerLeft = 6 +; + xp_Airport = 7 +; + xpNDB = 8 +; + xpVOR = 9 +; + xpRadioTower = 10 +; + xpAircraftCarrier = 11 +; + xpFire = 12 +; + xpMarkerRight = 13 +; + xpCustomObject = 14 +; + xpCoolingTower = 15 +; + xpSmokeStack = 16 +; + xpBuilding = 17 +; + xpPowerLine = 18 +; + xpVORWithCompassRose = 19 +; + xpOilPlatform = 21 +; + xpOilPlatformSmall = 22 +; + xpWayPoint = 23 +; + + { + General Graphics Properties + } + { This property controls the type of icon that is drawn. } + xpProperty_GeneralGraphicsType = 1700 +; + +{___________________________________________________________________________ + * PROGRESS INDICATOR + ___________________________________________________________________________} +{ + This widget implements a progress indicator as seen when X-Plane starts up. +} + +CONST + xpWidgetClass_Progress = 8; + + { + Progress Indicator Properties + } + { This is the current value of the progress indicator. } + xpProperty_ProgressPosition = 1800 +; + { This is the minimum value, equivalent to 0% filled. } + xpProperty_ProgressMin = 1801 +; + { This is the maximum value, equivalent to 100% filled. } + xpProperty_ProgressMax = 1802 +; + + +IMPLEMENTATION + +END. diff --git a/src/SDK/Delphi/Widgets/XPUIGraphics.pas b/src/SDK/Delphi/Widgets/XPUIGraphics.pas new file mode 100755 index 00000000..65e06365 --- /dev/null +++ b/src/SDK/Delphi/Widgets/XPUIGraphics.pas @@ -0,0 +1,342 @@ +{ + Copyright 2005-2012 Sandy Barbour and Ben Supnik All rights reserved. See + license.txt for usage. X-Plane SDK Version: 2.1.1 +} + +UNIT XPUIGraphics; +INTERFACE + +USES + XPWidgetDefs; + {$A4} +{___________________________________________________________________________ + * UI GRAPHICS + ___________________________________________________________________________} + + { + XPWindowStyle + + There are a few built-in window styles in X-Plane that you can use. + + Note that X-Plane 6 does not offer real shadow-compositing; you must make + sure to put a window on top of another window of the right style to the + shadows work, etc. This applies to elements with insets and shadows. The + rules are: + + Sub windows must go on top of main windows, and screens and list views on + top of subwindows. Only help and main windows can be over the main screen. + + With X-Plane 7 any window or element may be placed over any other element. + + Some windows are scaled by stretching, some by repeating. The drawing + routines know which scaling method to use. The list view cannot be rescaled + in X-Plane 6 because it has both a repeating pattern and a gradient in one + element. All other elements can be rescaled. + } +TYPE + XPWindowStyle = ( + { An LCD screen that shows help. } + xpWindow_Help = 0 + + { A dialog box window. } + ,xpWindow_MainWindow = 1 + + { A panel or frame within a dialog box window. } + ,xpWindow_SubWindow = 2 + + { An LCD screen within a panel to hold text displays. } + ,xpWindow_Screen = 4 + + { A list view within a panel for scrolling file names, etc. } + ,xpWindow_ListView = 5 + + ); + PXPWindowStyle = ^XPWindowStyle; + + { + XPDrawWindow + + This routine draws a window of the given dimensions at the given offset on + the virtual screen in a given style. The window is automatically scaled as + appropriate using a bitmap scaling technique (scaling or repeating) as + appropriate to the style. + } + PROCEDURE XPDrawWindow( + inX1 : Integer; + inY1 : Integer; + inX2 : Integer; + inY2 : Integer; + inStyle : XPWindowStyle); + cdecl; external XPWIDGETS.DLL; + + { + XPGetWindowDefaultDimensions + + This routine returns the default dimensions for a window. Output is either + a minimum or fixed value depending on whether the window is scalable. + } + PROCEDURE XPGetWindowDefaultDimensions( + inStyle : XPWindowStyle; + outWidth : PInteger; { Can be nil } + outHeight : PInteger); { Can be nil } + cdecl; external XPWIDGETS.DLL; + + { + XPElementStyle + + Elements are individually drawable UI things like push buttons, etc. The + style defines what kind of element you are drawing. Elements can be + stretched in one or two dimensions (depending on the element). Some + elements can be lit. + + In X-Plane 6 some elements must be drawn over metal. Some are scalable and + some are not. Any element can be drawn anywhere in X-Plane 7. + + Scalable Axis Required Background + } +TYPE + XPElementStyle = ( + { x metal } + xpElement_TextField = 6 + + { none metal } + ,xpElement_CheckBox = 9 + + { none metal } + ,xpElement_CheckBoxLit = 10 + + { none window header } + ,xpElement_WindowCloseBox = 14 + + { none window header } + ,xpElement_WindowCloseBoxPressed = 15 + + { x metal } + ,xpElement_PushButton = 16 + + { x metal } + ,xpElement_PushButtonLit = 17 + + { none any } + ,xpElement_OilPlatform = 24 + + { none any } + ,xpElement_OilPlatformSmall = 25 + + { none any } + ,xpElement_Ship = 26 + + { none any } + ,xpElement_ILSGlideScope = 27 + + { none any } + ,xpElement_MarkerLeft = 28 + + { none any } + ,xpElement_Airport = 29 + + { none any } + ,xpElement_Waypoint = 30 + + { none any } + ,xpElement_NDB = 31 + + { none any } + ,xpElement_VOR = 32 + + { none any } + ,xpElement_RadioTower = 33 + + { none any } + ,xpElement_AircraftCarrier = 34 + + { none any } + ,xpElement_Fire = 35 + + { none any } + ,xpElement_MarkerRight = 36 + + { none any } + ,xpElement_CustomObject = 37 + + { none any } + ,xpElement_CoolingTower = 38 + + { none any } + ,xpElement_SmokeStack = 39 + + { none any } + ,xpElement_Building = 40 + + { none any } + ,xpElement_PowerLine = 41 + + { none metal } + ,xpElement_CopyButtons = 45 + + { none metal } + ,xpElement_CopyButtonsWithEditingGrid = 46 + + { x, y metal } + ,xpElement_EditingGrid = 47 + + { THIS CAN PROBABLY BE REMOVED } + ,xpElement_ScrollBar = 48 + + { none any } + ,xpElement_VORWithCompassRose = 49 + + { none metal } + ,xpElement_Zoomer = 51 + + { x, y metal } + ,xpElement_TextFieldMiddle = 52 + + { none metal } + ,xpElement_LittleDownArrow = 53 + + { none metal } + ,xpElement_LittleUpArrow = 54 + + { none metal } + ,xpElement_WindowDragBar = 61 + + { none metal } + ,xpElement_WindowDragBarSmooth = 62 + + ); + PXPElementStyle = ^XPElementStyle; + + { + XPDrawElement + + XPDrawElement draws a given element at an offset on the virtual screen in + set dimensions. + *Even* if the element is not scalable, it will be scaled if the width and + height do not match the preferred dimensions; it'll just look ugly. Pass + inLit to see the lit version of the element; if the element cannot be lit + this is ignored. + } + PROCEDURE XPDrawElement( + inX1 : Integer; + inY1 : Integer; + inX2 : Integer; + inY2 : Integer; + inStyle : XPElementStyle; + inLit : Integer); + cdecl; external XPWIDGETS.DLL; + + { + XPGetElementDefaultDimensions + + This routine returns the recommended or minimum dimensions of a given UI + element. outCanBeLit tells whether the element has both a lit and unlit + state. Pass `NULL` to not receive any of these parameters. + } + PROCEDURE XPGetElementDefaultDimensions( + inStyle : XPElementStyle; + outWidth : PInteger; { Can be nil } + outHeight : PInteger; { Can be nil } + outCanBeLit : PInteger); { Can be nil } + cdecl; external XPWIDGETS.DLL; + + { + XPTrackStyle + + A track is a UI element that displays a value vertically or horizontally. + X-Plane has three kinds of tracks: scroll bars, sliders, and progress bars. + Tracks can be displayed either horizontally or vertically; tracks will + choose their own layout based on the larger dimension of their dimensions + (e.g. they know if they are tall or wide). Sliders may be lit or unlit + (showing the user manipulating them). + + - ScrollBar: this is a standard scroll bar with arrows and a thumb to drag. + - Slider: this is a simple track with a ball in the middle that can be + slid. + - Progress: this is a progress indicator showing how a long task is going. + } +TYPE + XPTrackStyle = ( + { not over metal can be lit can be rotated } + xpTrack_ScrollBar = 0 + + { over metal can be lit can be rotated } + ,xpTrack_Slider = 1 + + { over metal cannot be lit cannot be rotated } + ,xpTrack_Progress = 2 + + ); + PXPTrackStyle = ^XPTrackStyle; + + { + XPDrawTrack + + This routine draws a track. You pass in the track dimensions and size; the + track picks the optimal orientation for these dimensions. Pass in the + track's minimum current and maximum values; the indicator will be + positioned appropriately. You can also specify whether the track is lit or + not. + } + PROCEDURE XPDrawTrack( + inX1 : Integer; + inY1 : Integer; + inX2 : Integer; + inY2 : Integer; + inMin : Integer; + inMax : Integer; + inValue : Integer; + inTrackStyle : XPTrackStyle; + inLit : Integer); + cdecl; external XPWIDGETS.DLL; + + { + XPGetTrackDefaultDimensions + + This routine returns a track's default smaller dimension; all tracks are + scalable in the larger dimension. It also returns whether a track can be + lit. + } + PROCEDURE XPGetTrackDefaultDimensions( + inStyle : XPTrackStyle; + outWidth : PInteger; + outCanBeLit : PInteger); + cdecl; external XPWIDGETS.DLL; + + { + XPGetTrackMetrics + + This routine returns the metrics of a track. If you want to write UI code + to manipulate a track, this routine helps you know where the mouse + locations are. For most other elements, the rectangle the element is drawn + in is enough information. However, the scrollbar drawing routine does some + automatic placement; this routine lets you know where things ended up. You + pass almost everything you would pass to the draw routine. You get out the + orientation, and other useful stuff. + + Besides orientation, you get five dimensions for the five parts of a + scrollbar, which are the down button, down area (area before the thumb), + the thumb, and the up area and button. For horizontal scrollers, the left + button decreases; for vertical scrollers, the top button decreases. + } + PROCEDURE XPGetTrackMetrics( + inX1 : Integer; + inY1 : Integer; + inX2 : Integer; + inY2 : Integer; + inMin : Integer; + inMax : Integer; + inValue : Integer; + inTrackStyle : XPTrackStyle; + outIsVertical : PInteger; + outDownBtnSize : PInteger; + outDownPageSize : PInteger; + outThumbSize : PInteger; + outUpPageSize : PInteger; + outUpBtnSize : PInteger); + cdecl; external XPWIDGETS.DLL; + + +IMPLEMENTATION + +END. diff --git a/src/SDK/Delphi/Widgets/XPWidgetDefs.pas b/src/SDK/Delphi/Widgets/XPWidgetDefs.pas new file mode 100755 index 00000000..1cc342ff --- /dev/null +++ b/src/SDK/Delphi/Widgets/XPWidgetDefs.pas @@ -0,0 +1,427 @@ +{ + Copyright 2005-2012 Sandy Barbour and Ben Supnik All rights reserved. See + license.txt for usage. X-Plane SDK Version: 2.1.1 +} + +UNIT XPWidgetDefs; +INTERFACE + +USES + XPLMDefs; + {$A4} +{___________________________________________________________________________ + * WIDGET DEFINITIONS + ___________________________________________________________________________} +{ + A widget is a call-back driven screen entity like a push-button, window, + text entry field, etc. + + Use the widget API to create widgets of various classes. You can nest them + into trees of widgets to create complex user interfaces. +} + + +TYPE + { + XPWidgetID + + A Widget ID is an opaque unique non-zero handle identifying your widget. + Use 0 to specify "no widget". This type is defined as wide enough to hold a + pointer. You receive a widget ID when you create a new widget and then use + that widget ID to further refer to the widget. + } + XPWidgetID = pointer; + PXPWidgetID = ^XPWidgetID; + + { + XPWidgetPropertyID + + Properties are values attached to instances of your widgets. A property is + identified by a 32-bit ID and its value is the width of a pointer. + + Each widget instance may have a property or not have it. When you set a + property on a widget for the first time, the property is added to the + widget; it then stays there for the life of the widget. + + Some property IDs are predefined by the widget package; you can make up + your own property IDs as well. + } + XPWidgetPropertyID = ( + { A window's refcon is an opaque value used by client code to find other data} + { based on it. } + xpProperty_Refcon = 0 + + { These properties are used by the utlities to implement dragging. } + ,xpProperty_Dragging = 1 + + ,xpProperty_DragXOff = 2 + + ,xpProperty_DragYOff = 3 + + { Is the widget hilited? (For widgets that support this kind of thing.) } + ,xpProperty_Hilited = 4 + + { Is there a C++ object attached to this widget? } + ,xpProperty_Object = 5 + + { If this property is 1, the widget package will use OpenGL to restrict } + { drawing to the Wiget's exposed rectangle. } + ,xpProperty_Clip = 6 + + { Is this widget enabled (for those that have a disabled state too)? } + ,xpProperty_Enabled = 7 + + { NOTE: Property IDs 1 - 999 are reserved for the widgets library. } + { } + { NOTE: Property IDs 1000 - 9999 are allocated to the standard widget classes} + { provided with the library. } + { } + { Properties 1000 - 1099 are for widget class 0, 1100 - 1199 for widget class} + { 1, etc. } + ,xpProperty_UserStart = 10000 + + ); + PXPWidgetPropertyID = ^XPWidgetPropertyID; + + { + XPMouseState_t + + When the mouse is clicked or dragged, a pointer to this structure is passed + to your widget function. + } + XPMouseState_t = RECORD + x : Integer; + y : Integer; + { Mouse Button number, left = 0 (right button not yet supported. } + button : Integer; +{$IFDEF XPLM200} + { Scroll wheel delta (button in this case would be the wheel axis number). } + delta : Integer; +{$ENDIF XPLM200} + END; + PXPMouseState_t = ^XPMouseState_t; + + { + XPKeyState_t + + When a key is pressed, a pointer to this struct is passed to your widget + function. + } + XPKeyState_t = RECORD + { The ASCII key that was pressed. WARNING: this may be 0 for some non-ASCII } + { key sequences. } + key : XPLMChar; + { The flags. Make sure to check this if you only want key-downs! } + flags : XPLMKeyFlags; + { The virtual key code for the key } + vkey : XPLMChar; + END; + PXPKeyState_t = ^XPKeyState_t; + + { + XPWidgetGeometryChange_t + + This structure contains the deltas for your widget's geometry when it + changes. + } + XPWidgetGeometryChange_t = RECORD + dx : Integer; + { +Y = the widget moved up } + dy : Integer; + dwidth : Integer; + dheight : Integer; + END; + PXPWidgetGeometryChange_t = ^XPWidgetGeometryChange_t; + + { + XPDispatchMode + + The dispatching modes describe how the widgets library sends out messages. + Currently there are three modes: + } + XPDispatchMode = ( + { The message will only be sent to the target widget. } + xpMode_Direct = 0 + + { The message is sent to the target widget, then up the chain of parents } + { until the message is handled or a parentless widget is reached. } + ,xpMode_UpChain = 1 + + { The message is sent to the target widget and then all of its children } + { recursively depth-first. } + ,xpMode_Recursive = 2 + + { The message is snet just to the target, but goes to every callback, even if} + { it is handled. } + ,xpMode_DirectAllCallbacks = 3 + + { The message is only sent to the very first handler even if it is not } + { accepted. (This is really only useful for some internal widget library } + { functions.) } + ,xpMode_Once = 4 + + ); + PXPDispatchMode = ^XPDispatchMode; + + { + XPWidgetClass + + Widget classes define predefined widget types. A widget class basically + specifies from a library the widget function to be used for the widget. + Most widgets can be made right from classes. + } + XPWidgetClass = Integer; + PXPWidgetClass = ^XPWidgetClass; + +CONST + { An unspecified widget class. Other widget classes are in } + { XPStandardWidgets.h } + xpWidgetClass_None = 0; + +{___________________________________________________________________________ + * WIDGET MESSAGES + ___________________________________________________________________________} + + { + XPWidgetMessage + + Widgets receive 32-bit messages indicating what action is to be taken or + notifications of events. The list of messages may be expanded. + } +TYPE + XPWidgetMessage = ( + { No message, should not be sent. } + xpMsg_None = 0 + + { The create message is sent once per widget that is created with your widget} + { function and once for any widget that has your widget function attached. } + { } + { Dispatching: Direct } + { } + { Param 1: 1 if you are being added as a subclass, 0 if the widget is first } + { being created. } + ,xpMsg_Create = 1 + + { The destroy message is sent once for each message that is destroyed that } + { has your widget function. } + { } + { Dispatching: Direct for all } + { } + { Param 1: 1 if being deleted by a recursive delete to the parent, 0 for } + { explicit deletion. } + ,xpMsg_Destroy = 2 + + { The paint message is sent to your widget to draw itself. The paint message } + { is the bare-bones message; in response you must draw yourself, draw your } + { children, set up clipping and culling, check for visibility, etc. If you } + { don't want to do all of this, ignore the paint message and a draw message } + { (see below) will be sent to you. } + { } + { Dispatching: Direct } + ,xpMsg_Paint = 3 + + { The draw message is sent to your widget when it is time to draw yourself. } + { OpenGL will be set up to draw in 2-d global screen coordinates, but you } + { should use the XPLM to set up OpenGL state. } + { } + { Dispatching: Direct } + ,xpMsg_Draw = 4 + + { The key press message is sent once per key that is pressed. The first } + { parameter is the type of key code (integer or char) and the second is the } + { code itself. By handling this event, you consume the key stroke. } + { } + { Handling this message 'consumes' the keystroke; not handling it passes it } + { to your parent widget. } + { } + { Dispatching: Up Chain } + { } + { Param 1: A pointer to an XPKeyState_t structure with the keystroke. } + ,xpMsg_KeyPress = 5 + + { Keyboard focus is being given to you. By handling this message you accept } + { keyboard focus. The first parameter will be one if a child of yours gave up} + { focus to you, 0 if someone set focus on you explicitly. } + { } + { Handling this message accepts focus; not handling refuses focus. } + { } + { Dispatching: direct } + { } + { Param 1: 1 if you are gaining focus because your child is giving it up, 0 } + { if someone is explicitly giving you focus. } + ,xpMsg_KeyTakeFocus = 6 + + { Keyboard focus is being taken away from you. The first parameter will be } + { one if you are losing focus because another widget is taking it, or 0 if } + { someone called the API to make you lose focus explicitly. } + { } + { Dispatching: Direct } + { } + { Param 1: 1 if focus is being taken by another widget, 0 if code requested } + { to remove focus. } + ,xpMsg_KeyLoseFocus = 7 + + { You receive one mousedown event per click with a mouse-state structure } + { pointed to by parameter 1, by accepting this you eat the click, otherwise } + { your parent gets it. You will not receive drag and mouse up messages if you} + { do not accept the down message. } + { } + { Handling this message consumes the mouse click, not handling it passes it } + { to the next widget. You can act 'transparent' as a window by never handling} + { moues clicks to certain areas. } + { } + { Dispatching: Up chain NOTE: Technically this is direct dispatched, but the } + { widgets library will shop it to each widget until one consumes the click, } + { making it effectively "up chain". } + { } + { Param 1: A pointer to an XPMouseState_t containing the mouse status. } + ,xpMsg_MouseDown = 8 + + { You receive a series of mouse drag messages (typically one per frame in the} + { sim) as the mouse is moved once you have accepted a mouse down message. } + { Parameter one points to a mouse-state structure describing the mouse } + { location. You will continue to receive these until the mouse button is } + { released. You may receive multiple mouse state messages with the same mouse} + { position. You will receive mouse drag events even if the mouse is dragged } + { out of your current or original bounds at the time of the mouse down. } + { } + { Dispatching: Direct } + { } + { Param 1: A pointer to an XPMouseState_t containing the mouse status. } + ,xpMsg_MouseDrag = 9 + + { The mouseup event is sent once when the mouse button is released after a } + { drag or click. You only receive this message if you accept the mouseDown } + { message. Parameter one points to a mouse state structure. } + { } + { Dispatching: Direct } + { } + { Param 1: A pointer to an XPMouseState_t containing the mouse status. } + ,xpMsg_MouseUp = 10 + + { Your geometry or a child's geometry is being changed. } + { } + { Dispatching: Up chain } + { } + { Param 1: The widget ID of the original reshaped target. } + { } + { Param 2: A pointer to a XPWidgetGeometryChange_t struct describing the } + { change. } + ,xpMsg_Reshape = 11 + + { Your exposed area has changed. } + { } + { Dispatching: Direct } + ,xpMsg_ExposedChanged = 12 + + { A child has been added to you. The child's ID is passed in parameter one. } + { } + { Dispatching: Direct } + { } + { Param 1: The Widget ID of the child being added. } + ,xpMsg_AcceptChild = 13 + + { A child has been removed from to you. The child's ID is passed in parameter} + { one. } + { } + { Dispatching: Direct } + { } + { Param 1: The Widget ID of the child being removed. } + ,xpMsg_LoseChild = 14 + + { You now have a new parent, or have no parent. The parent's ID is passed in,} + { or 0 for no parent. } + { } + { Dispatching: Direct } + { } + { Param 1: The Widget ID of your parent } + ,xpMsg_AcceptParent = 15 + + { You or a child has been shown. Note that this does not include you being } + { shown because your parent was shown, you were put in a new parent, your } + { root was shown, etc. } + { } + { Dispatching: Up chain } + { } + { Param 1: The widget ID of the shown widget. } + ,xpMsg_Shown = 16 + + { You have been hidden. See limitations above. } + { } + { Dispatching: Up chain } + { } + { Param 1: The widget ID of the hidden widget. } + ,xpMsg_Hidden = 17 + + { Your descriptor has changed. } + { } + { Dispatching: Direct } + ,xpMsg_DescriptorChanged = 18 + + { A property has changed. Param 1 contains the property ID. } + { } + { Dispatching: Direct } + { } + { Param 1: The Property ID being changed. } + { } + { Param 2: The new property value } + ,xpMsg_PropertyChanged = 19 + +{$IFDEF XPLM200} + { The mouse wheel has moved. } + { } + { Return 1 to consume the mouse wheel move, or 0 to pass the message to a } + { parent. Dispatching: Up chain } + { } + { Param 1: A pointer to an XPMouseState_t containing the mouse status. } + ,xpMsg_MouseWheel = 20 +{$ENDIF XPLM200} + +{$IFDEF XPLM200} + { The cursor is over your widget. If you consume this message, change the } + { XPLMCursorStatus value to indicate the desired result, with the same rules } + { as in XPLMDisplay.h. } + { } + { Return 1 to consume this message, 0 to pass it on. } + { } + { Dispatching: Up chain Param 1: A pointer to an XPMouseState_t struct } + { containing the mouse status. } + { } + { Param 2: A pointer to a XPLMCursorStatus - set this to the cursor result } + { you desire. } + ,xpMsg_CursorAdjust = 21 +{$ENDIF XPLM200} + + { NOTE: Message IDs 1000 - 9999 are allocated to the standard widget classes } + { provided with the library with 1000 - 1099 for widget class 0, 1100 - 1199 } + { for widget class 1, etc. Message IDs 10,000 and beyond are for plugin use. } + ,xpMsg_UserStart = 10000 + + ); + PXPWidgetMessage = ^XPWidgetMessage; + +{___________________________________________________________________________ + * WIDGET CALLBACK FUNCTION + ___________________________________________________________________________} + + { + XPWidgetFunc_t + + This function defines your custom widget's behavior. It will be called by + the widgets library to send messages to your widget. The message and widget + ID are passed in, as well as two ptr-width signed parameters whose meaning + varies with the message. Return 1 to indicate that you have processed the + message, 0 to indicate that you have not. For any message that is not + understood, return 0. + } +TYPE + XPWidgetFunc_t = FUNCTION( + inMessage : XPWidgetMessage; + inWidget : XPWidgetID; + inParam1 : intptr_t; + inParam2 : intptr_t) : Integer; cdecl; + + +IMPLEMENTATION + +END. diff --git a/src/SDK/Delphi/Widgets/XPWidgetUtils.pas b/src/SDK/Delphi/Widgets/XPWidgetUtils.pas new file mode 100755 index 00000000..9621126f --- /dev/null +++ b/src/SDK/Delphi/Widgets/XPWidgetUtils.pas @@ -0,0 +1,197 @@ +{ + Copyright 2005-2012 Sandy Barbour and Ben Supnik All rights reserved. See + license.txt for usage. X-Plane SDK Version: 2.1.1 +} + +UNIT XPWidgetUtils; +INTERFACE +{ + ## USAGE NOTES + + The XPWidgetUtils library contains useful functions that make writing and + using widgets less of a pain. + + One set of functions are the widget behavior functions. These functions + each add specific useful behaviors to widgets. They can be used in two + manners: + + 1. You can add a widget behavior function to a widget as a callback proc + using the XPAddWidgetCallback function. The widget will gain that + behavior. Remember that the last function you add has highest priority. + You can use this to change or augment the behavior of an existing + finished widget. + 2. You can call a widget function from inside your own widget function. + This allows you to include useful behaviors in custom-built widgets. A + number of the standard widgets get their behavior from this library. To + do this, call the behavior function from your function first. If it + returns 1, that means it handled the event and you don't need to; simply + return 1. +} + +USES + XPWidgetDefs; + {$A4} +{___________________________________________________________________________ + * GENERAL UTILITIES + ___________________________________________________________________________} + + + { + XPWidgetCreate_t + + This structure contains all of the parameters needed to create a wiget. It + is used with XPUCreateWidgets to create widgets in bulk from an array. All + parameters correspond to those of XPCreateWidget except for the container + index. + + If the container index is equal to the index of a widget in the array, the + widget in the array passed to XPUCreateWidgets is used as the parent of + this widget. Note that if you pass an index greater than your own position + in the array, the parent you are requesting will not exist yet. + + If the container index is NO_PARENT, the parent widget is specified as + NULL. If the container index is PARAM_PARENT, the widget passed into + XPUCreateWidgets is used. + } +TYPE + XPWidgetCreate_t = RECORD + left : Integer; + top : Integer; + right : Integer; + bottom : Integer; + visible : Integer; + descriptor : XPLMString; + { Whether ethis widget is a root wiget } + isRoot : Integer; + { The index of the widget to contain within, or a constant } + containerIndex : Integer; + widgetClass : XPWidgetClass; + END; + PXPWidgetCreate_t = ^XPWidgetCreate_t; + +CONST + NO_PARENT = -1; + + PARAM_PARENT = -2; + + + { + XPUCreateWidgets + + This function creates a series of widgets from a table (see + XPCreateWidget_t above). Pass in an array of widget creation structures and + an array of widget IDs that will receive each widget. + + Widget parents are specified by index into the created widget table, + allowing you to create nested widget structures. You can create multiple + widget trees in one table. Generally you should create widget trees from + the top down. + + You can also pass in a widget ID that will be used when the widget's parent + is listed as PARAM_PARENT; this allows you to embed widgets created with + XPUCreateWidgets in a widget created previously. + } + PROCEDURE XPUCreateWidgets( + inWidgetDefs : PXPWidgetCreate_t; + inCount : Integer; + inParamParent : XPWidgetID; + ioWidgets : PXPWidgetID); + cdecl; external XPWIDGETS.DLL; + + { + XPUMoveWidgetBy + + Simply moves a widget by an amount, +x = right, +y=up, without resizing the + widget. + } + PROCEDURE XPUMoveWidgetBy( + inWidget : XPWidgetID; + inDeltaX : Integer; + inDeltaY : Integer); + cdecl; external XPWIDGETS.DLL; + +{___________________________________________________________________________ + * LAYOUT MANAGERS + ___________________________________________________________________________} +{ + The layout managers are widget behavior functions for handling where + widgets move. Layout managers can be called from a widget function or + attached to a widget later. +} + + + { + XPUFixedLayout + + This function causes the widget to maintain its children in fixed position + relative to itself as it is resized. Use this on the top level 'window' + widget for your window. + } + FUNCTION XPUFixedLayout( + inMessage : XPWidgetMessage; + inWidget : XPWidgetID; + inParam1 : intptr_t; + inParam2 : intptr_t) : Integer; + cdecl; external XPWIDGETS.DLL; + +{___________________________________________________________________________ + * WIDGET PROC BEHAVIORS + ___________________________________________________________________________} +{ + These widget behavior functions add other useful behaviors to widgets. + These functions cannot be attached to a widget; they must be called from + your widget function. +} + + + { + XPUSelectIfNeeded + + This causes the widget to bring its window to the foreground if it is not + already. inEatClick specifies whether clicks in the background should be + consumed by bringin the window to the foreground. + } + FUNCTION XPUSelectIfNeeded( + inMessage : XPWidgetMessage; + inWidget : XPWidgetID; + inParam1 : intptr_t; + inParam2 : intptr_t; + inEatClick : Integer) : Integer; + cdecl; external XPWIDGETS.DLL; + + { + XPUDefocusKeyboard + + This causes a click in the widget to send keyboard focus back to X-Plane. + This stops editing of any text fields, etc. + } + FUNCTION XPUDefocusKeyboard( + inMessage : XPWidgetMessage; + inWidget : XPWidgetID; + inParam1 : intptr_t; + inParam2 : intptr_t; + inEatClick : Integer) : Integer; + cdecl; external XPWIDGETS.DLL; + + { + XPUDragWidget + + XPUDragWidget drags the widget in response to mouse clicks. Pass in not + only the event, but the global coordinates of the drag region, which might + be a sub-region of your widget (for example, a title bar). + } + FUNCTION XPUDragWidget( + inMessage : XPWidgetMessage; + inWidget : XPWidgetID; + inParam1 : intptr_t; + inParam2 : intptr_t; + inLeft : Integer; + inTop : Integer; + inRight : Integer; + inBottom : Integer) : Integer; + cdecl; external XPWIDGETS.DLL; + + +IMPLEMENTATION + +END. diff --git a/src/SDK/Delphi/Widgets/XPWidgets.pas b/src/SDK/Delphi/Widgets/XPWidgets.pas new file mode 100755 index 00000000..46ae5422 --- /dev/null +++ b/src/SDK/Delphi/Widgets/XPWidgets.pas @@ -0,0 +1,527 @@ +{ + Copyright 2005-2012 Sandy Barbour and Ben Supnik All rights reserved. See + license.txt for usage. X-Plane SDK Version: 2.1.1 +} + +UNIT XPWidgets; +INTERFACE +{ + ## THEORY OF OPERATION AND NOTES + + Widgets are persistent view 'objects' for X-Plane. A widget is an object + referenced by its opaque handle (widget ID) and the APIs in this file. You + cannot access the widget's guts directly. Every Widget has the following + intrinsic data: + + - A bounding box defined in global screen coordinates with 0,0 in the + bottom left and +y = up, +x = right. + - A visible box, which is the intersection of the bounding box with the + widget's parents visible box. + - Zero or one parent widgets. (Always zero if the widget is a root widget. + - Zero or more child widgets. + - Whether the widget is a root. Root widgets are the top level plugin + windows. + - Whether the widget is visible. + - A text string descriptor, whose meaning varies from widget to widget. + - An arbitrary set of 32 bit integral properties defined by 32-bit integral + keys. This is how specific widgets store specific data. + - A list of widget callbacks proc that implements the widgets behaviors. + + The Widgets library sends messages to widgets to request specific behaviors + or notify the widget of things. + + Widgets may have more than one callback function, in which case messages + are sent to the most recently added callback function until the message is + handled. Messages may also be sent to parents or children; see the + XPWidgetDefs.h header file for the different widget message dispatching + functions. By adding a callback function to a window you can 'subclass' its + behavior. + + A set of standard widgets are provided that serve common UI purposes. You + can also customize or implement entirely custom widgets. + + Widgets are different than other view hierarchies (most notably Win32, + which they bear a striking resemblance to) in the following ways: + + - Not all behavior can be patched. State that is managed by the XPWidgets + DLL and not by individual widgets cannot be customized. + - All coordinates are in global screen coordinates. Coordinates are not + relative to an enclosing widget, nor are they relative to a display + window. + - Widget messages are always dispatched synchronously, and there is no + concept of scheduling an update or a dirty region. Messages originate + from X-Plane as the sim cycle goes by. Since X-Plane is constantly + redrawing, so are widgets; there is no need to mark a part of a widget as + 'needing redrawing' because redrawing happens frequently whether the + widget needs it or not. + - Any widget may be a 'root' widget, causing it to be drawn; there is no + relationship between widget class and rootness. Root widgets are + imlemented as XPLMDisply windows. +} + +USES + XPWidgetDefs, XPLMDisplay; + {$A4} +{___________________________________________________________________________ + * WIDGET CREATION AND MANAGEMENT + ___________________________________________________________________________} + + { + XPCreateWidget + + This function creates a new widget and returns the new widget's ID to you. + If the widget creation fails for some reason, it returns NULL. Widget + creation will fail either if you pass a bad class ID or if there is not + adequate memory. + + Input Parameters: + + - Top, left, bottom, and right in global screen coordinates defining the + widget's location on the screen. + - inVisible is 1 if the widget should be drawn, 0 to start the widget as + hidden. + - inDescriptor is a null terminated string that will become the widget's + descriptor. + - inIsRoot is 1 if this is going to be a root widget, 0 if it will not be. + - inContainer is the ID of this widget's container. It must be 0 for a root + widget. for a non-root widget, pass the widget ID of the widget to place + this widget within. If this widget is not going to start inside another + widget, pass 0; this new widget will then just be floating off in space + (and will not be drawn until it is placed in a widget. + - inClass is the class of the widget to draw. Use one of the predefined + class-IDs to create a standard widget. + + A note on widget embedding: a widget is only called (and will be drawn, + etc.) if it is placed within a widget that will be called. Root widgets are + always called. So it is possible to have whole chains of widgets that are + simply not called. You can preconstruct widget trees and then place them + into root widgets later to activate them if you wish. + } + FUNCTION XPCreateWidget( + inLeft : Integer; + inTop : Integer; + inRight : Integer; + inBottom : Integer; + inVisible : Integer; + inDescriptor : XPLMString; + inIsRoot : Integer; + inContainer : XPWidgetID; + inClass : XPWidgetClass) : XPWidgetID; + cdecl; external XPWIDGETS.DLL; + + { + XPCreateCustomWidget + + This function is the same as XPCreateWidget except that instead of passing + a class ID, you pass your widget callback function pointer defining the + widget. Use this function to define a custom widget. All parameters are the + same as XPCreateWidget, except that the widget class has been replaced with + the widget function. + } + FUNCTION XPCreateCustomWidget( + inLeft : Integer; + inTop : Integer; + inRight : Integer; + inBottom : Integer; + inVisible : Integer; + inDescriptor : XPLMString; + inIsRoot : Integer; + inContainer : XPWidgetID; + inCallback : XPWidgetFunc_t) : XPWidgetID; + cdecl; external XPWIDGETS.DLL; + + { + XPDestroyWidget + + This class destroys a widget. Pass in the ID of the widget to kill. If you + pass 1 for inDestroyChilren, the widget's children will be destroyed first, + then this widget will be destroyed. (Furthermore, the widget's children + will be destroyed with the inDestroyChildren flag set to 1, so the + destruction will recurse down the widget tree.) If you pass 0 for this + flag, the child widgets will simply end up with their parent set to 0. + } + PROCEDURE XPDestroyWidget( + inWidget : XPWidgetID; + inDestroyChildren : Integer); + cdecl; external XPWIDGETS.DLL; + + { + XPSendMessageToWidget + + This sends any message to a widget. You should probably not go around + simulating the predefined messages that the widgets library defines for + you. You may however define custom messages for your widgets and send them + with this method. + + This method supports several dispatching patterns; see XPDispatchMode for + more info. The function returns 1 if the message was handled, 0 if it was + not. + + For each widget that receives the message (see the dispatching modes), each + widget function from the most recently installed to the oldest one receives + the message in order until it is handled. + } + FUNCTION XPSendMessageToWidget( + inWidget : XPWidgetID; + inMessage : XPWidgetMessage; + inMode : XPDispatchMode; + inParam1 : intptr_t; + inParam2 : intptr_t) : Integer; + cdecl; external XPWIDGETS.DLL; + +{___________________________________________________________________________ + * WIDGET POSITIONING AND VISIBILITY + ___________________________________________________________________________} + + { + XPPlaceWidgetWithin + + This function changes which container a widget resides in. You may NOT use + this function on a root widget! inSubWidget is the widget that will be + moved. Pass a widget ID in inContainer to make inSubWidget be a child of + inContainer. It will become the last/closest widget in the container. Pass + 0 to remove the widget from any container. Any call to this other than + passing the widget ID of the old parent of the affected widget will cause + the widget to be removed from its old parent. Placing a widget within its + own parent simply makes it the last widget. + + NOTE: this routine does not reposition the sub widget in global + coordinates. If the container has layout management code, it will + reposition the subwidget for you, otherwise you must do it with + SetWidgetGeometry. + } + PROCEDURE XPPlaceWidgetWithin( + inSubWidget : XPWidgetID; + inContainer : XPWidgetID); + cdecl; external XPWIDGETS.DLL; + + { + XPCountChildWidgets + + This routine returns the number of widgets another widget contains. + } + FUNCTION XPCountChildWidgets( + inWidget : XPWidgetID) : Integer; + cdecl; external XPWIDGETS.DLL; + + { + XPGetNthChildWidget + + This routine returns the widget ID of a child widget by index. Indexes are + 0 based, from 0 to one minus the number of widgets in the parent, + inclusive. If the index is invalid, 0 is returned. + } + FUNCTION XPGetNthChildWidget( + inWidget : XPWidgetID; + inIndex : Integer) : XPWidgetID; + cdecl; external XPWIDGETS.DLL; + + { + XPGetParentWidget + + Returns the parent of a widget, or 0 if the widget has no parent. Root + widgets never have parents and therefore always return 0. + } + FUNCTION XPGetParentWidget( + inWidget : XPWidgetID) : XPWidgetID; + cdecl; external XPWIDGETS.DLL; + + { + XPShowWidget + + This routine makes a widget visible if it is not already. Note that if a + widget is not in a rooted widget hierarchy or one of its parents is not + visible, it will still not be visible to the user. + } + PROCEDURE XPShowWidget( + inWidget : XPWidgetID); + cdecl; external XPWIDGETS.DLL; + + { + XPHideWidget + + Makes a widget invisible. See XPShowWidget for considerations of when a + widget might not be visible despite its own visibility state. + } + PROCEDURE XPHideWidget( + inWidget : XPWidgetID); + cdecl; external XPWIDGETS.DLL; + + { + XPIsWidgetVisible + + This returns 1 if a widget is visible, 0 if it is not. Note that this + routine takes into consideration whether a parent is invisible. Use this + routine to tell if the user can see the widget. + } + FUNCTION XPIsWidgetVisible( + inWidget : XPWidgetID) : Integer; + cdecl; external XPWIDGETS.DLL; + + { + XPFindRootWidget + + Returns the Widget ID of the root widget that contains the passed in widget + or NULL if the passed in widget is not in a rooted hierarchy. + } + FUNCTION XPFindRootWidget( + inWidget : XPWidgetID) : XPWidgetID; + cdecl; external XPWIDGETS.DLL; + + { + XPBringRootWidgetToFront + + This routine makes the specified widget be in the front most widget + hierarchy. If this widget is a root widget, its widget hierarchy comes to + front, otherwise the widget's root is brought to the front. If this widget + is not in an active widget hiearchy (e.g. there is no root widget at the + top of the tree), this routine does nothing. + } + PROCEDURE XPBringRootWidgetToFront( + inWidget : XPWidgetID); + cdecl; external XPWIDGETS.DLL; + + { + XPIsWidgetInFront + + This routine returns true if this widget's hierarchy is the front most + hierarchy. It returns false if the widget's hierarchy is not in front, or + if the widget is not in a rooted hierarchy. + } + FUNCTION XPIsWidgetInFront( + inWidget : XPWidgetID) : Integer; + cdecl; external XPWIDGETS.DLL; + + { + XPGetWidgetGeometry + + This routine returns the bounding box of a widget in global coordinates. + Pass NULL for any parameter you are not interested in. + } + PROCEDURE XPGetWidgetGeometry( + inWidget : XPWidgetID; + outLeft : PInteger; { Can be nil } + outTop : PInteger; { Can be nil } + outRight : PInteger; { Can be nil } + outBottom : PInteger); { Can be nil } + cdecl; external XPWIDGETS.DLL; + + { + XPSetWidgetGeometry + + This function changes the bounding box of a widget. + } + PROCEDURE XPSetWidgetGeometry( + inWidget : XPWidgetID; + inLeft : Integer; + inTop : Integer; + inRight : Integer; + inBottom : Integer); + cdecl; external XPWIDGETS.DLL; + + { + XPGetWidgetForLocation + + Given a widget and a location, this routine returns the widget ID of the + child of that widget that owns that location. If inRecursive is true then + this will return a child of a child of a widget as it tries to find the + deepest widget at that location. If inVisibleOnly is true, then only + visible widgets are considered, otherwise all widgets are considered. The + widget ID passed for inContainer will be returned if the location is in + that widget but not in a child widget. 0 is returned if the location is not + in the container. + + NOTE: if a widget's geometry extends outside its parents geometry, it will + not be returned by this call for mouse locations outside the parent + geometry. The parent geometry limits the child's eligibility for mouse + location. + } + FUNCTION XPGetWidgetForLocation( + inContainer : XPWidgetID; + inXOffset : Integer; + inYOffset : Integer; + inRecursive : Integer; + inVisibleOnly : Integer) : XPWidgetID; + cdecl; external XPWIDGETS.DLL; + + { + XPGetWidgetExposedGeometry + + This routine returns the bounds of the area of a widget that is completely + within its parent widgets. Since a widget's bounding box can be outside its + parent, part of its area will not be elligible for mouse clicks and should + not draw. Use XPGetWidgetGeometry to find out what area defines your + widget's shape, but use this routine to find out what area to actually draw + into. Note that the widget library does not use OpenGL clipping to keep + frame rates up, although you could use it internally. + } + PROCEDURE XPGetWidgetExposedGeometry( + inWidgetID : XPWidgetID; + outLeft : PInteger; { Can be nil } + outTop : PInteger; { Can be nil } + outRight : PInteger; { Can be nil } + outBottom : PInteger); { Can be nil } + cdecl; external XPWIDGETS.DLL; + +{___________________________________________________________________________ + * ACCESSING WIDGET DATA + ___________________________________________________________________________} + + { + XPSetWidgetDescriptor + + Every widget has a descriptor, which is a text string. What the text string + is used for varies from widget to widget; for example, a push button's text + is its descriptor, a caption shows its descriptor, and a text field's + descriptor is the text being edited. In other words, the usage for the text + varies from widget to widget, but this API provides a universal and + convenient way to get at it. While not all UI widgets need their + descriptor, many do. + } + PROCEDURE XPSetWidgetDescriptor( + inWidget : XPWidgetID; + inDescriptor : XPLMString); + cdecl; external XPWIDGETS.DLL; + + { + XPGetWidgetDescriptor + + This routine returns the widget's descriptor. Pass in the length of the + buffer you are going to receive the descriptor in. The descriptor will be + null terminated for you. This routine returns the length of the actual + descriptor; if you pass NULL for outDescriptor, you can get the + descriptor's length without getting its text. If the length of the + descriptor exceeds your buffer length, the buffer will not be null + terminated (this routine has 'strncpy' semantics). + } + FUNCTION XPGetWidgetDescriptor( + inWidget : XPWidgetID; + outDescriptor : XPLMString; + inMaxDescLength : Integer) : Integer; + cdecl; external XPWIDGETS.DLL; + + { + XPGetWidgetUnderlyingWindow + + Returns the window (from the XPLMDisplay API) that backs your widget + window. If you have opted in to modern windows, via a call to + XPLMEnableFeature("XPLM_USE_NATIVE_WIDGET_WINDOWS", 1), you can use the + returned window ID for display APIs like XPLMSetWindowPositioningMode(), + allowing you to pop the widget window out into a real OS window, or move it + into VR. + } + FUNCTION XPGetWidgetUnderlyingWindow( + inWidget : XPWidgetID) : XPLMWindowID; + cdecl; external XPWIDGETS.DLL; + + { + XPSetWidgetProperty + + This function sets a widget's property. Properties are arbitrary values + associated by a widget by ID. + } + PROCEDURE XPSetWidgetProperty( + inWidget : XPWidgetID; + inProperty : XPWidgetPropertyID; + inValue : intptr_t); + cdecl; external XPWIDGETS.DLL; + + { + XPGetWidgetProperty + + This routine returns the value of a widget's property, or 0 if the property + is not defined. If you need to know whether the property is defined, pass a + pointer to an int for inExists; the existence of that property will be + returned in the int. Pass NULL for inExists if you do not need this + information. + } + FUNCTION XPGetWidgetProperty( + inWidget : XPWidgetID; + inProperty : XPWidgetPropertyID; + inExists : PInteger) : intptr_t; { Can be nil } + cdecl; external XPWIDGETS.DLL; + +{___________________________________________________________________________ + * KEYBOARD MANAGEMENT + ___________________________________________________________________________} + + { + XPSetKeyboardFocus + + Controls which widget will receive keystrokes. Pass the widget ID of the + widget to get the keys. Note that if the widget does not care about + keystrokes, they will go to the parent widget, and if no widget cares about + them, they go to X-Plane. + + If you set the keyboard focus to widget ID 0, X-Plane gets keyboard focus. + + This routine returns the widget ID that ended up with keyboard focus, or 0 + for X-Plane. + + Keyboard focus is not changed if the new widget will not accept it. For + setting to X-Plane, keyboard focus is always accepted. + } + FUNCTION XPSetKeyboardFocus( + inWidget : XPWidgetID) : XPWidgetID; + cdecl; external XPWIDGETS.DLL; + + { + XPLoseKeyboardFocus + + This causes the specified widget to lose focus; focus is passed to its + parent, or the next parent that will accept it. This routine does nothing + if this widget does not have focus. + } + PROCEDURE XPLoseKeyboardFocus( + inWidget : XPWidgetID); + cdecl; external XPWIDGETS.DLL; + + { + XPGetWidgetWithFocus + + This routine returns the widget that has keyboard focus, or 0 if X-Plane + has keyboard focus or some other plugin window that does not have widgets + has focus. + } + FUNCTION XPGetWidgetWithFocus: XPWidgetID; + cdecl; external XPWIDGETS.DLL; + +{___________________________________________________________________________ + * CREATING CUSTOM WIDGETS + ___________________________________________________________________________} + + { + XPAddWidgetCallback + + This function adds a new widget callback to a widget. This widget callback + supercedes any existing ones and will receive messages first; if it does + not handle messages they will go on to be handled by pre-existing widgets. + + The widget function will remain on the widget for the life of the widget. + The creation message will be sent to the new callback immediately with the + widget ID, and the destruction message will be sent before the other widget + function receives a destruction message. + + This provides a way to 'subclass' an existing widget. By providing a second + hook that only handles certain widget messages, you can customize or extend + widget behavior. + } + PROCEDURE XPAddWidgetCallback( + inWidget : XPWidgetID; + inNewCallback : XPWidgetFunc_t); + cdecl; external XPWIDGETS.DLL; + + { + XPGetWidgetClassFunc + + Given a widget class, this function returns the callbacks that power that + widget class. + } + FUNCTION XPGetWidgetClassFunc( + inWidgetClass : XPWidgetClass) : XPWidgetFunc_t; + cdecl; external XPWIDGETS.DLL; + + +IMPLEMENTATION + +END. diff --git a/src/SDK/Delphi/XPLM/XPLMCamera.pas b/src/SDK/Delphi/XPLM/XPLMCamera.pas new file mode 100755 index 00000000..ad76fa4d --- /dev/null +++ b/src/SDK/Delphi/XPLM/XPLMCamera.pas @@ -0,0 +1,155 @@ +{ + Copyright 2005-2012 Sandy Barbour and Ben Supnik All rights reserved. See + license.txt for usage. X-Plane SDK Version: 2.1.1 +} + +UNIT XPLMCamera; +INTERFACE +{ + The XPLMCamera APIs allow plug-ins to control the camera angle in X-Plane. + This has a number of applications, including but not limited to: + + - Creating new views (including dynamic/user-controllable views) for the + user. + - Creating applications that use X-Plane as a renderer of scenery, + aircrafts, or both. + + The camera is controlled via six parameters: a location in OpenGL + coordinates and pitch, roll and yaw, similar to an airplane's position. + OpenGL coordinate info is described in detail in the XPLMGraphics + documentation; generally you should use the XPLMGraphics routines to + convert from world to local coordinates. The camera's orientation starts + facing level with the ground directly up the negative-Z axis (approximately + north) with the horizon horizontal. It is then rotated clockwise for yaw, + pitched up for positive pitch, and rolled clockwise around the vector it is + looking along for roll. + + You control the camera either either until the user selects a new view or + permanently (the later being similar to how UDP camera control works). You + control the camera by registering a callback per frame from which you + calculate the new camera positions. This guarantees smooth camera motion. + + Use the XPLMDataAccess APIs to get information like the position of the + aircraft, etc. for complex camera positioning. + + Note: if your goal is to move the virtual pilot in the cockpit, this API is + not needed; simply update the datarefs for the pilot's head position. + + For custom exterior cameras, set the camera's mode to an external view + first to get correct sound and 2-d panel behavior. +} + +USES + XPLMDefs; + {$A4} +{___________________________________________________________________________ + * CAMERA CONTROL + ___________________________________________________________________________} + + { + XPLMCameraControlDuration + + This enumeration states how long you want to retain control of the camera. + You can retain it indefinitely or until the user selects a new view. + } +TYPE + XPLMCameraControlDuration = ( + { Control the camera until the user picks a new view. } + xplm_ControlCameraUntilViewChanges = 1 + + { Control the camera until your plugin is disabled or another plugin forcably} + { takes control. } + ,xplm_ControlCameraForever = 2 + + ); + PXPLMCameraControlDuration = ^XPLMCameraControlDuration; + + { + XPLMCameraPosition_t + + This structure contains a full specification of the camera. X, Y, and Z are + the camera's position in OpenGL coordiantes; pitch, roll, and yaw are + rotations from a camera facing flat north in degrees. Positive pitch means + nose up, positive roll means roll right, and positive yaw means yaw right, + all in degrees. Zoom is a zoom factor, with 1.0 meaning normal zoom and 2.0 + magnifying by 2x (objects appear larger). + } + XPLMCameraPosition_t = RECORD + x : Single; + y : Single; + z : Single; + pitch : Single; + heading : Single; + roll : Single; + zoom : Single; + END; + PXPLMCameraPosition_t = ^XPLMCameraPosition_t; + + { + XPLMCameraControl_f + + You use an XPLMCameraControl function to provide continuous control over + the camera. You are passed in a structure in which to put the new camera + position; modify it and return 1 to reposition the camera. Return 0 to + surrender control of the camera; camera control will be handled by X-Plane + on this draw loop. The contents of the structure as you are called are + undefined. + + If X-Plane is taking camera control away from you, this function will be + called with inIsLosingControl set to 1 and ioCameraPosition NULL. + } + XPLMCameraControl_f = FUNCTION( + outCameraPosition : PXPLMCameraPosition_t; { Can be nil } + inIsLosingControl : Integer; + inRefcon : pointer) : Integer; cdecl; + + { + XPLMControlCamera + + This function repositions the camera on the next drawing cycle. You must + pass a non-null control function. Specify in inHowLong how long you'd like + control (indefinitely or until a new view mode is set by the user). + } + PROCEDURE XPLMControlCamera( + inHowLong : XPLMCameraControlDuration; + inControlFunc : XPLMCameraControl_f; + inRefcon : pointer); + cdecl; external XPLM_DLL; + + { + XPLMDontControlCamera + + This function stops you from controlling the camera. If you have a camera + control function, it will not be called with an inIsLosingControl flag. + X-Plane will control the camera on the next cycle. + + For maximum compatibility you should not use this routine unless you are in + posession of the camera. + } + PROCEDURE XPLMDontControlCamera; + cdecl; external XPLM_DLL; + + { + XPLMIsCameraBeingControlled + + This routine returns 1 if the camera is being controlled, zero if it is + not. If it is and you pass in a pointer to a camera control duration, the + current control duration will be returned. + } + FUNCTION XPLMIsCameraBeingControlled( + outCameraControlDuration: PXPLMCameraControlDuration) : Integer; { Can be nil } + cdecl; external XPLM_DLL; + + { + XPLMReadCameraPosition + + This function reads the current camera position. + } + PROCEDURE XPLMReadCameraPosition( + outCameraPosition : PXPLMCameraPosition_t); + cdecl; external XPLM_DLL; + + +IMPLEMENTATION + +END. diff --git a/src/SDK/Delphi/XPLM/XPLMDataAccess.pas b/src/SDK/Delphi/XPLM/XPLMDataAccess.pas new file mode 100755 index 00000000..1ad210e3 --- /dev/null +++ b/src/SDK/Delphi/XPLM/XPLMDataAccess.pas @@ -0,0 +1,690 @@ +{ + Copyright 2005-2012 Sandy Barbour and Ben Supnik All rights reserved. See + license.txt for usage. X-Plane SDK Version: 2.1.1 +} + +UNIT XPLMDataAccess; +INTERFACE +{ + The data access API gives you a generic, flexible, high performance way to + read and write data to and from X-Plane and other plug-ins. For example, + this API allows you to read and set the nav radios, get the plane location, + determine the current effective graphics frame rate, etc. + + The data access APIs are the way that you read and write data from the sim + as well as other plugins. + + The API works using opaque data references. A data reference is a source of + data; you do not know where it comes from, but once you have it you can + read the data quickly and possibly write it. + + Dataref Lookup + -------------- + + Data references are identified by verbose, permanent string names; by + convention these names use path separates to form a hierarchy of datarefs, + e.g. (sim/cockpit/radios/nav1_freq_hz). The actual opaque numeric value of + the data reference, as returned by the XPLM API, is implementation defined + and changes each time X-Plane is launched; therefore you need to look up + the dataref by path every time your plugin runs. + + The task of looking up a data reference is relatively expensive; look up + your data references once based on the verbose path strings, and save the + opaque data reference value for the duration of your plugin's operation. + Reading and writing data references is relatively fast (the cost is + equivalent to two function calls through function pointers). + + X-Plane publishes over 4000 datarefs; a complete list may be found in the + reference section of the SDK online documentation (from the SDK home page, + choose Documentation). + + Dataref Types + ------------- + + A note on typing: you must know the correct data type to read and write. + APIs are provided for reading and writing data in a number of ways. You can + also double check the data type for a data ref. Automatic type conversion + is not done for you. + + Dataref types are a set, e.g. a dataref can be more than one type. When + this happens, you can choose which API you want to use to read. For + example, it is not uncommon for a dataref to be of type float and double. + This means you can use either XPLMGetDatad or XPLMGetDataf to read it. + + Creating New Datarefs + --------------------- + + X-Plane provides datarefs that come with the sim, but plugins can also + create their own datarefs. A plugin creates a dataref by registering + function callbacks to read and write the dataref. The XPLM will call your + plugin each time some other plugin (or X-Plane) tries to read or write the + dataref. You must provide a read (and optional write) callback for each + data type you support. + + A note for plugins sharing data with other plugins: the load order of + plugins is not guaranteed. To make sure that every plugin publishing data + has published their data references before other plugins try to subscribe, + publish your data references in your start routine but resolve them the + first time your 'enable' routine is called, or the first time they are + needed in code. + + When a plugin that created a dataref is unloaded, it becomes "orphaned". + The dataref handle continues to be usable, but the dataref is not writable, + and reading it will always return 0 (or 0 items for arrays). If the plugin + is reloaded and re-registers the dataref, the handle becomes un-orphaned + and works again. +} + +USES + XPLMDefs; + {$A4} +{___________________________________________________________________________ + * READING AND WRITING DATA + ___________________________________________________________________________} +{ + These routines allow you to access data from within X-Plane and sometimes + modify it. +} + + +TYPE + { + XPLMDataRef + + A data ref is an opaque handle to data provided by the simulator or another + plugin. It uniquely identifies one variable (or array of variables) over + the lifetime of your plugin. You never hard code these values; you always + get them from XPLMFindDataRef. + } + XPLMDataRef = pointer; + PXPLMDataRef = ^XPLMDataRef; + + { + XPLMDataTypeID + + This is an enumeration that defines the type of the data behind a data + reference. This allows you to sanity check that the data type matches what + you expect. But for the most part, you will know the type of data you are + expecting from the online documentation. + + Data types each take a bit field; it is legal to have a single dataref be + more than one type of data. Whe this happens, you can pick any matching + get/set API. + } + XPLMDataTypeID = ( + { Data of a type the current XPLM doesn't do. } + xplmType_Unknown = 0 + + { A single 4-byte integer, native endian. } + ,xplmType_Int = 1 + + { A single 4-byte float, native endian. } + ,xplmType_Float = 2 + + { A single 8-byte double, native endian. } + ,xplmType_Double = 4 + + { An array of 4-byte floats, native endian. } + ,xplmType_FloatArray = 8 + + { An array of 4-byte integers, native endian. } + ,xplmType_IntArray = 16 + + { A variable block of data. } + ,xplmType_Data = 32 + + ); + PXPLMDataTypeID = ^XPLMDataTypeID; + + { + XPLMFindDataRef + + Given a c-style string that names the data ref, this routine looks up the + actual opaque XPLMDataRef that you use to read and write the data. The + string names for datarefs are published on the X-Plane SDK web site. + + This function returns NULL if the data ref cannot be found. + + NOTE: this function is relatively expensive; save the XPLMDataRef this + function returns for future use. Do not look up your data ref by string + every time you need to read or write it. + } + FUNCTION XPLMFindDataRef( + inDataRefName : XPLMString) : XPLMDataRef; + cdecl; external XPLM_DLL; + + { + XPLMCanWriteDataRef + + Given a data ref, this routine returns true if you can successfully set the + data, false otherwise. Some datarefs are read-only. + + NOTE: even if a dataref is marked writable, it may not act writable. This + can happen for datarefs that X-Plane writes to on every frame of + simulation. In some cases, the dataref is writable but you have to set a + separate "override" dataref to 1 to stop X-Plane from writing it. + } + FUNCTION XPLMCanWriteDataRef( + inDataRef : XPLMDataRef) : Integer; + cdecl; external XPLM_DLL; + + { + XPLMIsDataRefGood + + This function returns true if the passed in handle is a valid dataref that + is not orphaned. + + Note: there is normally no need to call this function; datarefs returned by + XPLMFindDataRef remain valid (but possibly orphaned) unless there is a + complete plugin reload (in which case your plugin is reloaded anyway). + Orphaned datarefs can be safely read and return 0. Therefore you never need + to call XPLMIsDataRefGood to 'check' the safety of a dataref. + (XPLMIsDatarefGood performs some slow checking of the handle validity, so + it has a perormance cost.) + } + FUNCTION XPLMIsDataRefGood( + inDataRef : XPLMDataRef) : Integer; + cdecl; external XPLM_DLL; + + { + XPLMGetDataRefTypes + + This routine returns the types of the data ref for accessor use. If a data + ref is available in multiple data types, the bit-wise OR of these types + will be returned. + } + FUNCTION XPLMGetDataRefTypes( + inDataRef : XPLMDataRef) : XPLMDataTypeID; + cdecl; external XPLM_DLL; + +{___________________________________________________________________________ + * DATA ACCESSORS + ___________________________________________________________________________} +{ + These routines read and write the data references. For each supported data + type there is a reader and a writer. + + If the data ref is orphaned or the plugin that provides it is disabled or + there is a type mismatch, the functions that read data will return 0 as a + default value or not modify the passed in memory. The plugins that write + data will not write under these circumstances or if the data ref is + read-only. + + NOTE: to keep the overhead of reading datarefs low, these routines do not + do full validation of a dataref; passing a junk value for a dataref can + result in crashing the sim. The get/set APIs do check for NULL. + + For array-style datarefs, you specify the number of items to read/write and + the offset into the array; the actual number of items read or written is + returned. This may be less to prevent an array-out-of-bounds error. +} + + + { + XPLMGetDatai + + Read an integer data ref and return its value. The return value is the + dataref value or 0 if the dataref is NULL or the plugin is disabled. + } + FUNCTION XPLMGetDatai( + inDataRef : XPLMDataRef) : Integer; + cdecl; external XPLM_DLL; + + { + XPLMSetDatai + + Write a new value to an integer data ref. This routine is a no-op if the + plugin publishing the dataref is disabled, the dataref is NULL, or the + dataref is not writable. + } + PROCEDURE XPLMSetDatai( + inDataRef : XPLMDataRef; + inValue : Integer); + cdecl; external XPLM_DLL; + + { + XPLMGetDataf + + Read a single precision floating point dataref and return its value. The + return value is the dataref value or 0.0 if the dataref is NULL or the + plugin is disabled. + } + FUNCTION XPLMGetDataf( + inDataRef : XPLMDataRef) : Single; + cdecl; external XPLM_DLL; + + { + XPLMSetDataf + + Write a new value to a single precision floating point data ref. This + routine is a no-op if the plugin publishing the dataref is disabled, the + dataref is NULL, or the dataref is not writable. + } + PROCEDURE XPLMSetDataf( + inDataRef : XPLMDataRef; + inValue : Single); + cdecl; external XPLM_DLL; + + { + XPLMGetDatad + + Read a double precision floating point dataref and return its value. The + return value is the dataref value or 0.0 if the dataref is NULL or the + plugin is disabled. + } + FUNCTION XPLMGetDatad( + inDataRef : XPLMDataRef) : Real; + cdecl; external XPLM_DLL; + + { + XPLMSetDatad + + Write a new value to a double precision floating point data ref. This + routine is a no-op if the plugin publishing the dataref is disabled, the + dataref is NULL, or the dataref is not writable. + } + PROCEDURE XPLMSetDatad( + inDataRef : XPLMDataRef; + inValue : Real); + cdecl; external XPLM_DLL; + + { + XPLMGetDatavi + + Read a part of an integer array dataref. If you pass NULL for outValues, + the routine will return the size of the array, ignoring inOffset and inMax. + + If outValues is not NULL, then up to inMax values are copied from the + dataref into outValues, starting at inOffset in the dataref. If inMax + + inOffset is larger than the size of the dataref, less than inMax values + will be copied. The number of values copied is returned. + + Note: the semantics of array datarefs are entirely implemented by the + plugin (or X-Plane) that provides the dataref, not the SDK itself; the + above description is how these datarefs are intended to work, but a rogue + plugin may have different behavior. + } + FUNCTION XPLMGetDatavi( + inDataRef : XPLMDataRef; + outValues : PInteger; { Can be nil } + inOffset : Integer; + inMax : Integer) : Integer; + cdecl; external XPLM_DLL; + + { + XPLMSetDatavi + + Write part or all of an integer array dataref. The values passed by + inValues are written into the dataref starting at inOffset. Up to inCount + values are written; however if the values would write "off the end" of the + dataref array, then fewer values are written. + + Note: the semantics of array datarefs are entirely implemented by the + plugin (or X-Plane) that provides the dataref, not the SDK itself; the + above description is how these datarefs are intended to work, but a rogue + plugin may have different behavior. + } + PROCEDURE XPLMSetDatavi( + inDataRef : XPLMDataRef; + inValues : PInteger; + inoffset : Integer; + inCount : Integer); + cdecl; external XPLM_DLL; + + { + XPLMGetDatavf + + Read a part of a single precision floating point array dataref. If you pass + NULL for outVaules, the routine will return the size of the array, ignoring + inOffset and inMax. + + If outValues is not NULL, then up to inMax values are copied from the + dataref into outValues, starting at inOffset in the dataref. If inMax + + inOffset is larger than the size of the dataref, less than inMax values + will be copied. The number of values copied is returned. + + Note: the semantics of array datarefs are entirely implemented by the + plugin (or X-Plane) that provides the dataref, not the SDK itself; the + above description is how these datarefs are intended to work, but a rogue + plugin may have different behavior. + } + FUNCTION XPLMGetDatavf( + inDataRef : XPLMDataRef; + outValues : PSingle; { Can be nil } + inOffset : Integer; + inMax : Integer) : Integer; + cdecl; external XPLM_DLL; + + { + XPLMSetDatavf + + Write part or all of a single precision floating point array dataref. The + values passed by inValues are written into the dataref starting at + inOffset. Up to inCount values are written; however if the values would + write "off the end" of the dataref array, then fewer values are written. + + Note: the semantics of array datarefs are entirely implemented by the + plugin (or X-Plane) that provides the dataref, not the SDK itself; the + above description is how these datarefs are intended to work, but a rogue + plugin may have different behavior. + } + PROCEDURE XPLMSetDatavf( + inDataRef : XPLMDataRef; + inValues : PSingle; + inoffset : Integer; + inCount : Integer); + cdecl; external XPLM_DLL; + + { + XPLMGetDatab + + Read a part of a byte array dataref. If you pass NULL for outVaules, the + routine will return the size of the array, ignoring inOffset and inMax. + + If outValues is not NULL, then up to inMax values are copied from the + dataref into outValues, starting at inOffset in the dataref. If inMax + + inOffset is larger than the size of the dataref, less than inMax values + will be copied. The number of values copied is returned. + + Note: the semantics of array datarefs are entirely implemented by the + plugin (or X-Plane) that provides the dataref, not the SDK itself; the + above description is how these datarefs are intended to work, but a rogue + plugin may have different behavior. + } + FUNCTION XPLMGetDatab( + inDataRef : XPLMDataRef; + outValue : pointer; { Can be nil } + inOffset : Integer; + inMaxBytes : Integer) : Integer; + cdecl; external XPLM_DLL; + + { + XPLMSetDatab + + Write part or all of a byte array dataref. The values passed by inValues + are written into the dataref starting at inOffset. Up to inCount values are + written; however if the values would write "off the end" of the dataref + array, then fewer values are written. + + Note: the semantics of array datarefs are entirely implemented by the + plugin (or X-Plane) that provides the dataref, not the SDK itself; the + above description is how these datarefs are intended to work, but a rogue + plugin may have different behavior. + } + PROCEDURE XPLMSetDatab( + inDataRef : XPLMDataRef; + inValue : pointer; + inOffset : Integer; + inLength : Integer); + cdecl; external XPLM_DLL; + +{___________________________________________________________________________ + * PUBLISHING YOUR PLUGIN'S DATA + ___________________________________________________________________________} +{ + These functions allow you to create data references that other plug-ins and + X-Plane can access via the above data access APIs. Data references + published by other plugins operate the same as ones published by X-Plane in + all manners except that your data reference will not be available to other + plugins if/when your plugin is disabled. + + You share data by registering data provider callback functions. When a + plug-in requests your data, these callbacks are then called. You provide + one callback to return the value when a plugin 'reads' it and another to + change the value when a plugin 'writes' it. + + Important: you must pick a prefix for your datarefs other than "sim/" - + this prefix is reserved for X-Plane. The X-Plane SDK website contains a + registry where authors can select a unique first word for dataref names, to + prevent dataref collisions between plugins. +} + + + { + XPLMGetDatai_f + + Data provider function pointers. + + These define the function pointers you provide to get or set data. Note + that you are passed a generic pointer for each one. This is the same + pointer you pass in your register routine; you can use it to locate plugin + variables, etc. + + The semantics of your callbacks are the same as the dataref accessor above + - basically routines like XPLMGetDatai are just pass-throughs from a caller + to your plugin. Be particularly mindful in implementing array dataref + read-write accessors; you are responsible for avoiding overruns, supporting + offset read/writes, and handling a read with a NULL buffer. + } +TYPE + XPLMGetDatai_f = FUNCTION( + inRefcon : pointer) : Integer; cdecl; + + { + XPLMSetDatai_f + } + XPLMSetDatai_f = PROCEDURE( + inRefcon : pointer; + inValue : Integer); cdecl; + + { + XPLMGetDataf_f + } + XPLMGetDataf_f = FUNCTION( + inRefcon : pointer) : Single; cdecl; + + { + XPLMSetDataf_f + } + XPLMSetDataf_f = PROCEDURE( + inRefcon : pointer; + inValue : Single); cdecl; + + { + XPLMGetDatad_f + } + XPLMGetDatad_f = FUNCTION( + inRefcon : pointer) : Real; cdecl; + + { + XPLMSetDatad_f + } + XPLMSetDatad_f = PROCEDURE( + inRefcon : pointer; + inValue : Real); cdecl; + + { + XPLMGetDatavi_f + } + XPLMGetDatavi_f = FUNCTION( + inRefcon : pointer; + outValues : PInteger; { Can be nil } + inOffset : Integer; + inMax : Integer) : Integer; cdecl; + + { + XPLMSetDatavi_f + } + XPLMSetDatavi_f = PROCEDURE( + inRefcon : pointer; + inValues : PInteger; + inOffset : Integer; + inCount : Integer); cdecl; + + { + XPLMGetDatavf_f + } + XPLMGetDatavf_f = FUNCTION( + inRefcon : pointer; + outValues : PSingle; { Can be nil } + inOffset : Integer; + inMax : Integer) : Integer; cdecl; + + { + XPLMSetDatavf_f + } + XPLMSetDatavf_f = PROCEDURE( + inRefcon : pointer; + inValues : PSingle; + inOffset : Integer; + inCount : Integer); cdecl; + + { + XPLMGetDatab_f + } + XPLMGetDatab_f = FUNCTION( + inRefcon : pointer; + outValue : pointer; { Can be nil } + inOffset : Integer; + inMaxLength : Integer) : Integer; cdecl; + + { + XPLMSetDatab_f + } + XPLMSetDatab_f = PROCEDURE( + inRefcon : pointer; + inValue : pointer; + inOffset : Integer; + inLength : Integer); cdecl; + + { + XPLMRegisterDataAccessor + + This routine creates a new item of data that can be read and written. Pass + in the data's full name for searching, the type(s) of the data for + accessing, and whether the data can be written to. For each data type you + support, pass in a read accessor function and a write accessor function if + necessary. Pass NULL for data types you do not support or write accessors + if you are read-only. + + You are returned a data ref for the new item of data created. You can use + this data ref to unregister your data later or read or write from it. + } + FUNCTION XPLMRegisterDataAccessor( + inDataName : XPLMString; + inDataType : XPLMDataTypeID; + inIsWritable : Integer; + inReadInt : XPLMGetDatai_f; + inWriteInt : XPLMSetDatai_f; + inReadFloat : XPLMGetDataf_f; + inWriteFloat : XPLMSetDataf_f; + inReadDouble : XPLMGetDatad_f; + inWriteDouble : XPLMSetDatad_f; + inReadIntArray : XPLMGetDatavi_f; + inWriteIntArray : XPLMSetDatavi_f; + inReadFloatArray : XPLMGetDatavf_f; + inWriteFloatArray : XPLMSetDatavf_f; + inReadData : XPLMGetDatab_f; + inWriteData : XPLMSetDatab_f; + inReadRefcon : pointer; + inWriteRefcon : pointer) : XPLMDataRef; + cdecl; external XPLM_DLL; + + { + XPLMUnregisterDataAccessor + + Use this routine to unregister any data accessors you may have registered. + You unregister a data ref by the XPLMDataRef you get back from + registration. Once you unregister a data ref, your function pointer will + not be called anymore. + } + PROCEDURE XPLMUnregisterDataAccessor( + inDataRef : XPLMDataRef); + cdecl; external XPLM_DLL; + +{___________________________________________________________________________ + * SHARING DATA BETWEEN MULTIPLE PLUGINS + ___________________________________________________________________________} +{ + The data reference registration APIs from the previous section allow a + plugin to publish data in a one-owner manner; the plugin that publishes the + data reference owns the real memory that the data ref uses. This is + satisfactory for most cases, but there are also cases where plugnis need to + share actual data. + + With a shared data reference, no one plugin owns the actual memory for the + data reference; the plugin SDK allocates that for you. When the first + plugin asks to 'share' the data, the memory is allocated. When the data is + changed, every plugin that is sharing the data is notified. + + Shared data references differ from the 'owned' data references from the + previous section in a few ways: + + * With shared data references, any plugin can create the data reference; + with owned plugins one plugin must create the data reference and others + subscribe. (This can be a problem if you don't know which set of plugins + will be present). + + * With shared data references, every plugin that is sharing the data is + notified when the data is changed. With owned data references, only the + one owner is notified when the data is changed. + + * With shared data references, you cannot access the physical memory of the + data reference; you must use the XPLMGet... and XPLMSet... APIs. With an + owned data reference, the one owning data reference can manipulate the + data reference's memory in any way it sees fit. + + Shared data references solve two problems: if you need to have a data + reference used by several plugins but do not know which plugins will be + installed, or if all plugins sharing data need to be notified when that + data is changed, use shared data references. +} + + + { + XPLMDataChanged_f + + An XPLMDataChanged_f is a callback that the XPLM calls whenever any other + plug-in modifies shared data. A refcon you provide is passed back to help + identify which data is being changed. In response, you may want to call one + of the XPLMGetDataxxx routines to find the new value of the data. + } +TYPE + XPLMDataChanged_f = PROCEDURE( + inRefcon : pointer); cdecl; + + { + XPLMShareData + + This routine connects a plug-in to shared data, creating the shared data if + necessary. inDataName is a standard path for the data ref, and inDataType + specifies the type. This function will create the data if it does not + exist. If the data already exists but the type does not match, an error is + returned, so it is important that plug-in authors collaborate to establish + public standards for shared data. + + If a notificationFunc is passed in and is not NULL, that notification + function will be called whenever the data is modified. The notification + refcon will be passed to it. This allows your plug-in to know which shared + data was changed if multiple shared data are handled by one callback, or if + the plug-in does not use global variables. + + A one is returned for successfully creating or finding the shared data; a + zero if the data already exists but is of the wrong type. + } + FUNCTION XPLMShareData( + inDataName : XPLMString; + inDataType : XPLMDataTypeID; + inNotificationFunc : XPLMDataChanged_f; + inNotificationRefcon: pointer) : Integer; + cdecl; external XPLM_DLL; + + { + XPLMUnshareData + + This routine removes your notification function for shared data. Call it + when done with the data to stop receiving change notifications. Arguments + must match XPLMShareData. The actual memory will not necessarily be freed, + since other plug-ins could be using it. + } + FUNCTION XPLMUnshareData( + inDataName : XPLMString; + inDataType : XPLMDataTypeID; + inNotificationFunc : XPLMDataChanged_f; + inNotificationRefcon: pointer) : Integer; + cdecl; external XPLM_DLL; + + +IMPLEMENTATION + +END. diff --git a/src/SDK/Delphi/XPLM/XPLMDefs.pas b/src/SDK/Delphi/XPLM/XPLMDefs.pas new file mode 100755 index 00000000..91bd774a --- /dev/null +++ b/src/SDK/Delphi/XPLM/XPLMDefs.pas @@ -0,0 +1,438 @@ +{ + 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. + + 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 LINUX} + {$DEFINE KYLIX} +{$ENDIF} +TYPE +{$IFNDEF DELPHI} +{$IFNDEF KYLIX} + Pchar = ^char; + Ppchar = ^Pchar; + Psingle = ^single; + Pinteger = ^integer; +{$ENDIF} +{$ENDIF} + Preal = ^real; + Plongint = ^longint; +{___________________________________________________________________________ + * DLL Definitions + ___________________________________________________________________________} +{ + 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.) +} + + + +{___________________________________________________________________________ + * GLOBAL DEFINITIONS + ___________________________________________________________________________} +{ + 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. 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 + + -1 indicates no plug-in. + } + XPLMPluginID = Integer; + PXPLMPluginID = ^XPLMPluginID; + +CONST + { No plugin. } + XPLM_NO_PLUGIN_ID = (-1); + + { X-Plane itself } + XPLM_PLUGIN_XPLANE = (0); + + { The current XPLM revision is 3.03 (303). } + kXPLM_Version = (303); + + { + 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. + + 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 } + xplm_ShiftFlag = 1 + + { The option or alt key is down } + ,xplm_OptionAltFlag = 2 + + { The control key is down* } + ,xplm_ControlFlag = 4 + + { The key is being pressed down } + ,xplm_DownFlag = 8 + + { The key is being released } + ,xplm_UpFlag = 16 + + ); + PXPLMKeyFlags = ^XPLMKeyFlags; + +{___________________________________________________________________________ + * 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. +} + + +CONST + XPLM_KEY_RETURN = 13; + + XPLM_KEY_ESCAPE = 27; + + XPLM_KEY_TAB = 9; + + XPLM_KEY_DELETE = 8; + + XPLM_KEY_LEFT = 28; + + XPLM_KEY_RIGHT = 29; + + XPLM_KEY_UP = 30; + + XPLM_KEY_DOWN = 31; + + XPLM_KEY_0 = 48; + + XPLM_KEY_1 = 49; + + XPLM_KEY_2 = 50; + + XPLM_KEY_3 = 51; + + XPLM_KEY_4 = 52; + + XPLM_KEY_5 = 53; + + XPLM_KEY_6 = 54; + + XPLM_KEY_7 = 55; + + XPLM_KEY_8 = 56; + + XPLM_KEY_9 = 57; + + XPLM_KEY_DECIMAL = 46; + +{___________________________________________________________________________ + * 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). + + 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: + + 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; + + XPLM_VK_TAB = $09; + + XPLM_VK_CLEAR = $0C; + + XPLM_VK_RETURN = $0D; + + XPLM_VK_ESCAPE = $1B; + + XPLM_VK_SPACE = $20; + + XPLM_VK_PRIOR = $21; + + XPLM_VK_NEXT = $22; + + XPLM_VK_END = $23; + + XPLM_VK_HOME = $24; + + XPLM_VK_LEFT = $25; + + XPLM_VK_UP = $26; + + XPLM_VK_RIGHT = $27; + + XPLM_VK_DOWN = $28; + + XPLM_VK_SELECT = $29; + + XPLM_VK_PRINT = $2A; + + XPLM_VK_EXECUTE = $2B; + + XPLM_VK_SNAPSHOT = $2C; + + XPLM_VK_INSERT = $2D; + + XPLM_VK_DELETE = $2E; + + XPLM_VK_HELP = $2F; + + { 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; + + XPLM_VK_2 = $32; + + XPLM_VK_3 = $33; + + XPLM_VK_4 = $34; + + XPLM_VK_5 = $35; + + XPLM_VK_6 = $36; + + XPLM_VK_7 = $37; + + XPLM_VK_8 = $38; + + XPLM_VK_9 = $39; + + { 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; + + XPLM_VK_C = $43; + + XPLM_VK_D = $44; + + XPLM_VK_E = $45; + + XPLM_VK_F = $46; + + XPLM_VK_G = $47; + + XPLM_VK_H = $48; + + XPLM_VK_I = $49; + + XPLM_VK_J = $4A; + + XPLM_VK_K = $4B; + + XPLM_VK_L = $4C; + + XPLM_VK_M = $4D; + + XPLM_VK_N = $4E; + + XPLM_VK_O = $4F; + + XPLM_VK_P = $50; + + XPLM_VK_Q = $51; + + XPLM_VK_R = $52; + + XPLM_VK_S = $53; + + XPLM_VK_T = $54; + + XPLM_VK_U = $55; + + XPLM_VK_V = $56; + + XPLM_VK_W = $57; + + XPLM_VK_X = $58; + + XPLM_VK_Y = $59; + + XPLM_VK_Z = $5A; + + XPLM_VK_NUMPAD0 = $60; + + XPLM_VK_NUMPAD1 = $61; + + XPLM_VK_NUMPAD2 = $62; + + XPLM_VK_NUMPAD3 = $63; + + XPLM_VK_NUMPAD4 = $64; + + XPLM_VK_NUMPAD5 = $65; + + XPLM_VK_NUMPAD6 = $66; + + XPLM_VK_NUMPAD7 = $67; + + XPLM_VK_NUMPAD8 = $68; + + XPLM_VK_NUMPAD9 = $69; + + XPLM_VK_MULTIPLY = $6A; + + XPLM_VK_ADD = $6B; + + XPLM_VK_SEPARATOR = $6C; + + XPLM_VK_SUBTRACT = $6D; + + XPLM_VK_DECIMAL = $6E; + + XPLM_VK_DIVIDE = $6F; + + XPLM_VK_F1 = $70; + + XPLM_VK_F2 = $71; + + XPLM_VK_F3 = $72; + + XPLM_VK_F4 = $73; + + XPLM_VK_F5 = $74; + + XPLM_VK_F6 = $75; + + XPLM_VK_F7 = $76; + + XPLM_VK_F8 = $77; + + XPLM_VK_F9 = $78; + + XPLM_VK_F10 = $79; + + XPLM_VK_F11 = $7A; + + XPLM_VK_F12 = $7B; + + XPLM_VK_F13 = $7C; + + XPLM_VK_F14 = $7D; + + XPLM_VK_F15 = $7E; + + XPLM_VK_F16 = $7F; + + XPLM_VK_F17 = $80; + + XPLM_VK_F18 = $81; + + XPLM_VK_F19 = $82; + + XPLM_VK_F20 = $83; + + XPLM_VK_F21 = $84; + + XPLM_VK_F22 = $85; + + XPLM_VK_F23 = $86; + + XPLM_VK_F24 = $87; + + { The following definitions are extended and are not based on the Microsoft } + { key set. } + XPLM_VK_EQUAL = $B0; + + XPLM_VK_MINUS = $B1; + + XPLM_VK_RBRACE = $B2; + + XPLM_VK_LBRACE = $B3; + + XPLM_VK_QUOTE = $B4; + + XPLM_VK_SEMICOLON = $B5; + + XPLM_VK_BACKSLASH = $B6; + + XPLM_VK_COMMA = $B7; + + XPLM_VK_SLASH = $B8; + + XPLM_VK_PERIOD = $B9; + + XPLM_VK_BACKQUOTE = $BA; + + XPLM_VK_ENTER = $BB; + + XPLM_VK_NUMPAD_ENT = $BC; + + XPLM_VK_NUMPAD_EQ = $BD; + + +IMPLEMENTATION + +END. diff --git a/src/SDK/Delphi/XPLM/XPLMDisplay.pas b/src/SDK/Delphi/XPLM/XPLMDisplay.pas new file mode 100755 index 00000000..a100fd0a --- /dev/null +++ b/src/SDK/Delphi/XPLM/XPLMDisplay.pas @@ -0,0 +1,1452 @@ +{ + Copyright 2005-2012 Sandy Barbour and Ben Supnik All rights reserved. See + license.txt for usage. X-Plane SDK Version: 2.1.1 +} + +UNIT XPLMDisplay; +INTERFACE +{ + This API provides the basic hooks to draw in X-Plane and create user + interface. All X-Plane drawing is done in OpenGL. The X-Plane plug-in + manager takes care of properly setting up the OpenGL context and matrices. + You do not decide when in your code's execution to draw; X-Plane tells you + (via callbacks) when it is ready to have your plugin draw. + + X-Plane's drawing strategy is straightforward: every "frame" the screen is + rendered by drawing the 3-D scene (dome, ground, objects, airplanes, etc.) + and then drawing the cockpit on top of it. Alpha blending is used to + overlay the cockpit over the world (and the gauges over the panel, etc.). + X-Plane user interface elements (including windows like the map, the main + menu, etc.) are then drawn on top of the cockpit. + + There are two ways you can draw: directly and in a window. + + Direct drawing (deprecated!---more on that below) involves drawing to the + screen before or after X-Plane finishes a phase of drawing. When you draw + directly, you can specify whether X-Plane is to complete this phase or not. + This allows you to do three things: draw before X-Plane does (under it), + draw after X-Plane does (over it), or draw instead of X-Plane. + + To draw directly, you register a callback and specify which phase you want + to intercept. The plug-in manager will call you over and over to draw that + phase. + + Direct drawing allows you to override scenery, panels, or anything. Note + that you cannot assume that you are the only plug-in drawing at this phase. + + Direct drawing is deprecated; at some point in the X-Plane 11 run, it will + likely become unsupported entirely as X-Plane transitions from OpenGL to + modern graphics API backends (e.g., Vulkan, Metal, etc.). In the long term, + plugins should use the XPLMInstance API for drawing 3-D objects---this will + be much more efficient than general 3-D OpenGL drawing, and it will + actually be supported by the new graphics backends. We do not yet know what + the post-transition API for generic 3-D drawing will look like (if it + exists at all). + + In contrast to direct drawing, window drawing provides a higher level + functionality. With window drawing, you create a 2-D window that takes up a + portion of the screen. Window drawing is always two dimensional. Window + drawing is front-to-back controlled; you can specify that you want your + window to be brought on top, and other plug-ins may put their window on top + of you. Window drawing also allows you to sign up for key presses and + receive mouse clicks. + + There are three ways to get keystrokes: + + 1. If you create a window, the window can take keyboard focus. It will + then receive all keystrokes. If no window has focus, X-Plane receives + keystrokes. Use this to implement typing in dialog boxes, etc. Only + one window may have focus at a time; your window will be notified if it + loses focus. + 2. If you need low level access to the keystroke stream, install a key + sniffer. Key sniffers can be installed above everything or right in + front of the sim. + 3. If you would like to associate key strokes with commands/functions in + your plug-in, you should simply register a command (via + XPLMCreateCommand()) and allow users to bind whatever key they choose to + that command. Another (now deprecated) method of doing so is to use a + hot key---a key-specific callback. Hotkeys are sent based on virtual + key strokes, so any key may be distinctly mapped with any modifiers. + Hot keys can be remapped by other plug-ins. As a plug-in, you don't + have to worry about what your hot key ends up mapped to; other plug-ins + may provide a UI for remapping keystrokes. So hotkeys allow a user to + resolve conflicts and customize keystrokes. +} + +USES + XPLMDefs; + {$A4} +{___________________________________________________________________________ + * DRAWING CALLBACKS + ___________________________________________________________________________} +{ + Basic drawing callbacks, for low level intercepting of X-Plane's render + loop. The purpose of drawing callbacks is to provide targeted additions or + replacements to X-Plane's graphics environment (for example, to add extra + custom objects, or replace drawing of the AI aircraft). Do not assume that + the drawing callbacks will be called in the order implied by the + enumerations. Also do not assume that each drawing phase ends before + another begins; they may be nested. + + Note that all APIs in this section are deprecated, and will likely be + removed during the X-Plane 11 run as part of the transition to + Vulkan/Metal/etc. See the XPLMInstance API for future-proof drawing of 3-D + objects. +} + + + { + XPLMDrawingPhase + + This constant indicates which part of drawing we are in. Drawing is done + from the back to the front. We get a callback before or after each item. + Metaphases provide access to the beginning and end of the 3d (scene) and + 2d (cockpit) drawing in a manner that is independent of new phases added + via X-Plane implementation. + + **NOTE**: As of XPLM302 the legacy 3D drawing phases (xplm_Phase_FirstScene + to xplm_Phase_LastScene) are deprecated. When running under X-Plane 11.50 + with the modern Vulkan or Metal backend, X-Plane will no longer call + these drawing phases. There is a new drawing phase, xplm_Phase_Modern3D, + which is supported under OpenGL and Vulkan which is called out roughly + where the old before xplm_Phase_Airplanes phase was for blending. This + phase is *NOT* supported under Metal and comes with potentially + substantial performance overhead. Please do *NOT* opt into this phase if + you don't do any actual drawing that requires the depth buffer in some + way! + + **WARNING**: As X-Plane's scenery evolves, some drawing phases may cease to + exist and new ones may be invented. If you need a particularly specific + use of these codes, consult Austin and/or be prepared to revise your code + as X-Plane evolves. + } +TYPE + XPLMDrawingPhase = ( +{$IFDEF XPLM_DEPRECATED} + { Deprecated as of XPLM302. This is the earliest point at which you can draw } + { in 3-d. } + xplm_Phase_FirstScene = 0 +{$ENDIF XPLM_DEPRECATED} + +{$IFDEF XPLM_DEPRECATED} + { Deprecated as of XPLM302. Drawing of land and water. } + ,xplm_Phase_Terrain = 5 +{$ENDIF XPLM_DEPRECATED} + +{$IFDEF XPLM_DEPRECATED} + { Deprecated as of XPLM302. Drawing runways and other airport detail. } + ,xplm_Phase_Airports = 10 +{$ENDIF XPLM_DEPRECATED} + +{$IFDEF XPLM_DEPRECATED} + { Deprecated as of XPLM302. Drawing roads, trails, trains, etc. } + ,xplm_Phase_Vectors = 15 +{$ENDIF XPLM_DEPRECATED} + +{$IFDEF XPLM_DEPRECATED} + { Deprecated as of XPLM302. 3-d objects (houses, smokestacks, etc. } + ,xplm_Phase_Objects = 20 +{$ENDIF XPLM_DEPRECATED} + +{$IFDEF XPLM_DEPRECATED} + { Deprecated as of XPLM302. External views of airplanes, both yours and the } + { AI aircraft. } + ,xplm_Phase_Airplanes = 25 +{$ENDIF XPLM_DEPRECATED} + +{$IFDEF XPLM_DEPRECATED} + { Deprecated as of XPLM302. This is the last point at which you can draw in } + { 3-d. } + ,xplm_Phase_LastScene = 30 +{$ENDIF XPLM_DEPRECATED} + +{$IFDEF XPLM302} + { A chance to do modern 3D drawing. } + ,xplm_Phase_Modern3D = 31 +{$ENDIF XPLM302} + + { This is the first phase where you can draw in 2-d. } + ,xplm_Phase_FirstCockpit = 35 + + { The non-moving parts of the aircraft panel. } + ,xplm_Phase_Panel = 40 + + { The moving parts of the aircraft panel. } + ,xplm_Phase_Gauges = 45 + + { Floating windows from plugins. } + ,xplm_Phase_Window = 50 + + { The last chance to draw in 2d. } + ,xplm_Phase_LastCockpit = 55 + +{$IFDEF XPLM200} + { Removed as of XPLM300; Use the full-blown XPLMMap API instead. } + ,xplm_Phase_LocalMap3D = 100 +{$ENDIF XPLM200} + +{$IFDEF XPLM200} + { Removed as of XPLM300; Use the full-blown XPLMMap API instead. } + ,xplm_Phase_LocalMap2D = 101 +{$ENDIF XPLM200} + +{$IFDEF XPLM200} + { Removed as of XPLM300; Use the full-blown XPLMMap API instead. } + ,xplm_Phase_LocalMapProfile = 102 +{$ENDIF XPLM200} + + ); + PXPLMDrawingPhase = ^XPLMDrawingPhase; + + { + XPLMDrawCallback_f + + This is the prototype for a low level drawing callback. You are passed in + the phase and whether it is before or after. If you are before the phase, + return 1 to let X-Plane draw or 0 to suppress X-Plane drawing. If you are + after the phase the return value is ignored. + + Refcon is a unique value that you specify when registering the callback, + allowing you to slip a pointer to your own data to the callback. + + Upon entry the OpenGL context will be correctly set up for you and OpenGL + will be in 'local' coordinates for 3d drawing and panel coordinates for 2d + drawing. The OpenGL state (texturing, etc.) will be unknown. + } + XPLMDrawCallback_f = FUNCTION( + inPhase : XPLMDrawingPhase; + inIsBefore : Integer; + inRefcon : pointer) : Integer; cdecl; + + { + XPLMRegisterDrawCallback + + This routine registers a low level drawing callback. Pass in the phase you + want to be called for and whether you want to be called before or after. + This routine returns 1 if the registration was successful, or 0 if the + phase does not exist in this version of X-Plane. You may register a + callback multiple times for the same or different phases as long as the + refcon is unique each time. + + Note that this function will likely be removed during the X-Plane 11 run as + part of the transition to Vulkan/Metal/etc. See the XPLMInstance API for + future-proof drawing of 3-D objects. + } + FUNCTION XPLMRegisterDrawCallback( + inCallback : XPLMDrawCallback_f; + inPhase : XPLMDrawingPhase; + inWantsBefore : Integer; + inRefcon : pointer) : Integer; + cdecl; external XPLM_DLL; + + { + XPLMUnregisterDrawCallback + + This routine unregisters a draw callback. You must unregister a callback + for each time you register a callback if you have registered it multiple + times with different refcons. The routine returns 1 if it can find the + callback to unregister, 0 otherwise. + + Note that this function will likely be removed during the X-Plane 11 run as + part of the transition to Vulkan/Metal/etc. See the XPLMInstance API for + future-proof drawing of 3-D objects. + } + FUNCTION XPLMUnregisterDrawCallback( + inCallback : XPLMDrawCallback_f; + inPhase : XPLMDrawingPhase; + inWantsBefore : Integer; + inRefcon : pointer) : Integer; + cdecl; external XPLM_DLL; + +{___________________________________________________________________________ + * WINDOW API + ___________________________________________________________________________} +{ + The window API provides a high-level abstraction for drawing with UI + interaction. + + Windows may operate in one of two modes: legacy (for plugins compiled + against old versions of the XPLM, as well as windows created via the + deprecated XPLMCreateWindow() function, rather than XPLMCreateWindowEx()), + or modern (for windows compiled against the XPLM300 or newer API, and + created via XPLMCreateWindowEx()). + + Modern windows have access to new X-Plane 11 windowing features, like + support for new positioning modes (including being "popped out" into their + own first-class window in the operating system). They can also optionally + be decorated in the style of X-Plane 11 windows (like the map). + + Modern windows operate in "boxel" units. A boxel ("box of pixels") is a + unit of virtual pixels which, depending on X-Plane's scaling, may + correspond to an arbitrary NxN "box" of real pixels on screen. Because + X-Plane handles this scaling automatically, you can effectively treat the + units as though you were simply drawing in pixels, and know that when + X-Plane is running with 150% or 200% scaling, your drawing will be + automatically scaled (and likewise all mouse coordinates, screen bounds, + etc. will also be auto-scaled). + + In contrast, legacy windows draw in true screen pixels, and thus tend to + look quite small when X-Plane is operating in a scaled mode. + + Legacy windows have their origin in the lower left of the main X-Plane + window. In contrast, since modern windows are not constrained to the main + window, they have their origin in the lower left of the entire global + desktop space, and the lower left of the main X-Plane window is not + guaranteed to be (0, 0). In both cases, x increases as you move left, and y + increases as you move up. +} + + +TYPE + { + XPLMWindowID + + This is an opaque identifier for a window. You use it to control your + window. When you create a window (via either XPLMCreateWindow() or + XPLMCreateWindowEx()), you will specify callbacks to handle drawing, mouse + interaction, etc. + } + XPLMWindowID = pointer; + PXPLMWindowID = ^XPLMWindowID; + + { + XPLMDrawWindow_f + + A callback to handle 2-D drawing of your window. You are passed in your + window and its refcon. Draw the window. You can use other XPLM functions + from this header to find the current dimensions of your window, etc. When + this callback is called, the OpenGL context will be set properly for 2-D + window drawing. + + **Note**: Because you are drawing your window over a background, you can + make a translucent window easily by simply not filling in your entire + window's bounds. + } + XPLMDrawWindow_f = PROCEDURE( + inWindowID : XPLMWindowID; + inRefcon : pointer); cdecl; + + { + XPLMHandleKey_f + + This function is called when a key is pressed or keyboard focus is taken + away from your window. If losingFocus is 1, you are losing the keyboard + focus, otherwise a key was pressed and inKey contains its character. You + are also passed your window and a refcon. + + Warning: this API declares virtual keys as a signed character; however the + VKEY #define macros in XPLMDefs.h define the vkeys using unsigned values + (that is 0x80 instead of -0x80). So you may need to cast the incoming vkey + to an unsigned char to get correct comparisons in C. + } + XPLMHandleKey_f = PROCEDURE( + inWindowID : XPLMWindowID; + inKey : XPLMChar; + inFlags : XPLMKeyFlags; + inVirtualKey : XPLMChar; + inRefcon : pointer; + losingFocus : Integer); cdecl; + + { + XPLMMouseStatus + + When the mouse is clicked, your mouse click routine is called repeatedly. + It is first called with the mouse down message. It is then called zero or + more times with the mouse-drag message, and finally it is called once with + the mouse up message. All of these messages will be directed to the same + window; you are guaranteed to not receive a drag or mouse-up event without + first receiving the corresponding mouse-down. + } + XPLMMouseStatus = ( + xplm_MouseDown = 1 + + ,xplm_MouseDrag = 2 + + ,xplm_MouseUp = 3 + + ); + PXPLMMouseStatus = ^XPLMMouseStatus; + + { + XPLMHandleMouseClick_f + + You receive this call for one of three events: + + - when the user clicks the mouse button down + - (optionally) when the user drags the mouse after a down-click, but before + the up-click + - when the user releases the down-clicked mouse button. + + You receive the x and y of the click, your window, and a refcon. Return 1 + to consume the click, or 0 to pass it through. + + WARNING: passing clicks through windows (as of this writing) causes mouse + tracking problems in X-Plane; do not use this feature! + + The units for x and y values match the units used in your window. Thus, for + "modern" windows (those created via XPLMCreateWindowEx() and compiled + against the XPLM300 library), the units are boxels, while legacy windows + will get pixels. Legacy windows have their origin in the lower left of the + main X-Plane window, while modern windows have their origin in the lower + left of the global desktop space. In both cases, x increases as you move + right, and y increases as you move up. + } + XPLMHandleMouseClick_f = FUNCTION( + inWindowID : XPLMWindowID; + x : Integer; + y : Integer; + inMouse : XPLMMouseStatus; + inRefcon : pointer) : Integer; cdecl; + +{$IFDEF XPLM200} + { + XPLMCursorStatus + + XPLMCursorStatus describes how you would like X-Plane to manage the cursor. + See XPLMHandleCursor_f for more info. + } +TYPE + XPLMCursorStatus = ( + { X-Plane manages the cursor normally, plugin does not affect the cusrsor. } + xplm_CursorDefault = 0 + + { X-Plane hides the cursor. } + ,xplm_CursorHidden = 1 + + { X-Plane shows the cursor as the default arrow. } + ,xplm_CursorArrow = 2 + + { X-Plane shows the cursor but lets you select an OS cursor. } + ,xplm_CursorCustom = 3 + + ); + PXPLMCursorStatus = ^XPLMCursorStatus; +{$ENDIF XPLM200} + +{$IFDEF XPLM200} + { + XPLMHandleCursor_f + + The SDK calls your cursor status callback when the mouse is over your + plugin window. Return a cursor status code to indicate how you would like + X-Plane to manage the cursor. If you return xplm_CursorDefault, the SDK + will try lower-Z-order plugin windows, then let the sim manage the cursor. + + Note: you should never show or hide the cursor yourself---these APIs are + typically reference-counted and thus cannot safely and predictably be used + by the SDK. Instead return one of xplm_CursorHidden to hide the cursor or + xplm_CursorArrow/xplm_CursorCustom to show the cursor. + + If you want to implement a custom cursor by drawing a cursor in OpenGL, use + xplm_CursorHidden to hide the OS cursor and draw the cursor using a 2-d + drawing callback (after xplm_Phase_Window is probably a good choice, but + see deprecation warnings on the drawing APIs!). If you want to use a + custom OS-based cursor, use xplm_CursorCustom to ask X-Plane to show the + cursor but not affect its image. You can then use an OS specific call like + SetThemeCursor (Mac) or SetCursor/LoadCursor (Windows). + + The units for x and y values match the units used in your window. Thus, for + "modern" windows (those created via XPLMCreateWindowEx() and compiled + against the XPLM300 library), the units are boxels, while legacy windows + will get pixels. Legacy windows have their origin in the lower left of the + main X-Plane window, while modern windows have their origin in the lower + left of the global desktop space. In both cases, x increases as you move + right, and y increases as you move up. + } + XPLMHandleCursor_f = FUNCTION( + inWindowID : XPLMWindowID; + x : Integer; + y : Integer; + inRefcon : pointer) : XPLMCursorStatus; cdecl; +{$ENDIF XPLM200} + +{$IFDEF XPLM200} + { + XPLMHandleMouseWheel_f + + The SDK calls your mouse wheel callback when one of the mouse wheels is + scrolled within your window. Return 1 to consume the mouse wheel movement + or 0 to pass them on to a lower window. (If your window appears opaque to + the user, you should consume mouse wheel scrolling even if it does + nothing.) The number of "clicks" indicates how far the wheel was turned + since the last callback. The wheel is 0 for the vertical axis or 1 for the + horizontal axis (for OS/mouse combinations that support this). + + The units for x and y values match the units used in your window. Thus, for + "modern" windows (those created via XPLMCreateWindowEx() and compiled + against the XPLM300 library), the units are boxels, while legacy windows + will get pixels. Legacy windows have their origin in the lower left of the + main X-Plane window, while modern windows have their origin in the lower + left of the global desktop space. In both cases, x increases as you move + right, and y increases as you move up. + } + XPLMHandleMouseWheel_f = FUNCTION( + inWindowID : XPLMWindowID; + x : Integer; + y : Integer; + wheel : Integer; + clicks : Integer; + inRefcon : pointer) : Integer; cdecl; +{$ENDIF XPLM200} + +{$IFDEF XPLM300} + { + XPLMWindowLayer + + XPLMWindowLayer describes where in the ordering of windows X-Plane should + place a particular window. Windows in higher layers cover windows in lower + layers. So, a given window might be at the top of its particular layer, but + it might still be obscured by a window in a higher layer. (This happens + frequently when floating windows, like X-Plane's map, are covered by a + modal alert.) + + Your window's layer can only be specified when you create the window (in + the XPLMCreateWindow_t you pass to XPLMCreateWindowEx()). For this reason, + layering only applies to windows created with new X-Plane 11 GUI features. + (Windows created using the older XPLMCreateWindow(), or windows compiled + against a pre-XPLM300 version of the SDK will simply be placed in the + flight overlay window layer.) + } +TYPE + XPLMWindowLayer = ( + { The lowest layer, used for HUD-like displays while flying. } + xplm_WindowLayerFlightOverlay = 0 + + { Windows that "float" over the sim, like the X-Plane 11 map does. If you are} + { not sure which layer to create your window in, choose floating. } + ,xplm_WindowLayerFloatingWindows = 1 + + { An interruptive modal that covers the sim with a transparent black overlay } + { to draw the user's focus to the alert } + ,xplm_WindowLayerModal = 2 + + { "Growl"-style notifications that are visible in a corner of the screen, } + { even over modals } + ,xplm_WindowLayerGrowlNotifications = 3 + + ); + PXPLMWindowLayer = ^XPLMWindowLayer; +{$ENDIF XPLM300} + +{$IFDEF XPLM301} + { + XPLMWindowDecoration + + XPLMWindowDecoration describes how "modern" windows will be displayed. This + impacts both how X-Plane draws your window as well as certain mouse + handlers. + + Your window's decoration can only be specified when you create the window + (in the XPLMCreateWindow_t you pass to XPLMCreateWindowEx()). + } +TYPE + XPLMWindowDecoration = ( + { X-Plane will draw no decoration for your window, and apply no automatic } + { click handlers. The window will not stop click from passing through its } + { bounds. This is suitable for "windows" which request, say, the full screen } + { bounds, then only draw in a small portion of the available area. } + xplm_WindowDecorationNone = 0 + + { The default decoration for "native" windows, like the map. Provides a solid} + { background, as well as click handlers for resizing and dragging the window.} + ,xplm_WindowDecorationRoundRectangle = 1 + + { X-Plane will draw no decoration for your window, nor will it provide resize} + { handlers for your window edges, but it will stop clicks from passing } + { through your windows bounds. } + ,xplm_WindowDecorationSelfDecorated = 2 + + { Like self-decorated, but with resizing; X-Plane will draw no decoration for} + { your window, but it will stop clicks from passing through your windows } + { bounds, and provide automatic mouse handlers for resizing. } + ,xplm_WindowDecorationSelfDecoratedResizable = 3 + + ); + PXPLMWindowDecoration = ^XPLMWindowDecoration; +{$ENDIF XPLM301} + +{$IFDEF XPLM200} + { + XPLMCreateWindow_t + + The XPMCreateWindow_t structure defines all of the parameters used to + create a modern window using XPLMCreateWindowEx(). The structure will be + expanded in future SDK APIs to include more features. Always set the + structSize member to the size of your struct in bytes! + + All windows created by this function in the XPLM300 version of the API are + created with the new X-Plane 11 GUI features. This means your plugin will + get to "know" about the existence of X-Plane windows other than the main + window. All drawing and mouse callbacks for your window will occur in + "boxels," giving your windows automatic support for high-DPI scaling in + X-Plane. In addition, your windows can opt-in to decoration with the + X-Plane 11 window styling, and you can use the + XPLMSetWindowPositioningMode() API to make your window "popped out" into a + first-class operating system window. + + Note that this requires dealing with your window's bounds in "global + desktop" positioning units, rather than the traditional panel coordinate + system. In global desktop coordinates, the main X-Plane window may not have + its origin at coordinate (0, 0), and your own window may have negative + coordinates. Assuming you don't implicitly assume (0, 0) as your origin, + the only API change you should need is to start using + XPLMGetMouseLocationGlobal() rather than XPLMGetMouseLocation(), and + XPLMGetScreenBoundsGlobal() instead of XPLMGetScreenSize(). + + If you ask to be decorated as a floating window, you'll get the blue window + control bar and blue backing that you see in X-Plane 11's normal "floating" + windows (like the map). + } +TYPE + XPLMCreateWindow_t = RECORD + { Used to inform XPLMCreateWindowEx() of the SDK version you compiled } + { against; should always be set to sizeof(XPLMCreateWindow_t) } + structSize : Integer; + { Left bound, in global desktop boxels } + left : Integer; + { Top bound, in global desktop boxels } + top : Integer; + { Right bound, in global desktop boxels } + right : Integer; + { Bottom bound, in global desktop boxels } + bottom : Integer; + visible : Integer; + drawWindowFunc : XPLMDrawWindow_f; + { A callback to handle the user left-clicking within your window (or NULL to } + { ignore left clicks) } + handleMouseClickFunc : XPLMHandleMouseClick_f; + handleKeyFunc : XPLMHandleKey_f; + handleCursorFunc : XPLMHandleCursor_f; + handleMouseWheelFunc : XPLMHandleMouseWheel_f; + { A reference which will be passed into each of your window callbacks. Use } + { this to pass information to yourself as needed. } + refcon : pointer; +{$IFDEF XPLM301} + { Specifies the type of X-Plane 11-style "wrapper" you want around your } + { window, if any } + decorateAsFloatingWindow : XPLMWindowDecoration; +{$ENDIF XPLM301} +{$IFDEF XPLM300} + layer : XPLMWindowLayer; +{$ENDIF XPLM300} +{$IFDEF XPLM300} + { A callback to handle the user right-clicking within your window (or NULL to} + { ignore right clicks) } + handleRightClickFunc : XPLMHandleMouseClick_f; +{$ENDIF XPLM300} + END; + PXPLMCreateWindow_t = ^XPLMCreateWindow_t; +{$ENDIF XPLM200} + +{$IFDEF XPLM200} + { + XPLMCreateWindowEx + + This routine creates a new "modern" window. You pass in an + XPLMCreateWindow_t structure with all of the fields set in. You must set + the structSize of the structure to the size of the actual structure you + used. Also, you must provide functions for every callback---you may not + leave them null! (If you do not support the cursor or mouse wheel, use + functions that return the default values.) + } + FUNCTION XPLMCreateWindowEx( + inParams : PXPLMCreateWindow_t) : XPLMWindowID; + cdecl; external XPLM_DLL; +{$ENDIF XPLM200} + + { + XPLMCreateWindow + + Deprecated as of XPLM300. + + This routine creates a new legacy window. Unlike modern windows (created + via XPLMCreateWindowEx()), legacy windows do not have access to X-Plane 11 + features like automatic scaling for high-DPI screens, native window styles, + or support for being "popped out" into first-class operating system + windows. + + Pass in the dimensions and offsets to the window's bottom left corner from + the bottom left of the screen. You can specify whether the window is + initially visible or not. Also, you pass in three callbacks to run the + window and a refcon. This function returns a window ID you can use to + refer to the new window. + + NOTE: Legacy windows do not have "frames"; you are responsible for drawing + the background and frame of the window. Higher level libraries have + routines which make this easy. + } + FUNCTION XPLMCreateWindow( + inLeft : Integer; + inTop : Integer; + inRight : Integer; + inBottom : Integer; + inIsVisible : Integer; + inDrawCallback : XPLMDrawWindow_f; + inKeyCallback : XPLMHandleKey_f; + inMouseCallback : XPLMHandleMouseClick_f; + inRefcon : pointer) : XPLMWindowID; + cdecl; external XPLM_DLL; + + { + XPLMDestroyWindow + + This routine destroys a window. The window's callbacks are not called + after this call. Keyboard focus is removed from the window before + destroying it. + } + PROCEDURE XPLMDestroyWindow( + inWindowID : XPLMWindowID); + cdecl; external XPLM_DLL; + + { + XPLMGetScreenSize + + This routine returns the size of the main X-Plane OpenGL window in pixels. + This number can be used to get a rough idea of the amount of detail the + user will be able to see when drawing in 3-d. + } + PROCEDURE XPLMGetScreenSize( + outWidth : PInteger; { Can be nil } + outHeight : PInteger); { Can be nil } + cdecl; external XPLM_DLL; + +{$IFDEF XPLM300} + { + XPLMGetScreenBoundsGlobal + + This routine returns the bounds of the "global" X-Plane desktop, in boxels. + Unlike the non-global version XPLMGetScreenSize(), this is multi-monitor + aware. There are three primary consequences of multimonitor awareness. + + First, if the user is running X-Plane in full-screen on two or more + monitors (typically configured using one full-screen window per monitor), + the global desktop will be sized to include all X-Plane windows. + + Second, the origin of the screen coordinates is not guaranteed to be (0, + 0). Suppose the user has two displays side-by-side, both running at 1080p. + Suppose further that they've configured their OS to make the left display + their "primary" monitor, and that X-Plane is running in full-screen on + their right monitor only. In this case, the global desktop bounds would be + the rectangle from (1920, 0) to (3840, 1080). If the user later asked + X-Plane to draw on their primary monitor as well, the bounds would change + to (0, 0) to (3840, 1080). + + Finally, if the usable area of the virtual desktop is not a perfect + rectangle (for instance, because the monitors have different resolutions or + because one monitor is configured in the operating system to be above and + to the right of the other), the global desktop will include any wasted + space. Thus, if you have two 1080p monitors, and monitor 2 is configured to + have its bottom left touch monitor 1's upper right, your global desktop + area would be the rectangle from (0, 0) to (3840, 2160). + + Note that popped-out windows (windows drawn in their own operating system + windows, rather than "floating" within X-Plane) are not included in these + bounds. + } + PROCEDURE XPLMGetScreenBoundsGlobal( + outLeft : PInteger; { Can be nil } + outTop : PInteger; { Can be nil } + outRight : PInteger; { Can be nil } + outBottom : PInteger); { Can be nil } + cdecl; external XPLM_DLL; +{$ENDIF XPLM300} + +{$IFDEF XPLM300} + { + XPLMReceiveMonitorBoundsGlobal_f + + This function is informed of the global bounds (in boxels) of a particular + monitor within the X-Plane global desktop space. Note that X-Plane must be + running in full screen on a monitor in order for that monitor to be passed + to you in this callback. + } +TYPE + XPLMReceiveMonitorBoundsGlobal_f = PROCEDURE( + inMonitorIndex : Integer; + inLeftBx : Integer; + inTopBx : Integer; + inRightBx : Integer; + inBottomBx : Integer; + inRefcon : pointer); cdecl; +{$ENDIF XPLM300} + +{$IFDEF XPLM300} + { + XPLMGetAllMonitorBoundsGlobal + + This routine immediately calls you back with the bounds (in boxels) of each + full-screen X-Plane window within the X-Plane global desktop space. Note + that if a monitor is *not* covered by an X-Plane window, you cannot get its + bounds this way. Likewise, monitors with only an X-Plane window (not in + full-screen mode) will not be included. + + If X-Plane is running in full-screen and your monitors are of the same size + and configured contiguously in the OS, then the combined global bounds of + all full-screen monitors will match the total global desktop bounds, as + returned by XPLMGetScreenBoundsGlobal(). (Of course, if X-Plane is running + in windowed mode, this will not be the case. Likewise, if you have + differently sized monitors, the global desktop space will include wasted + space.) + + Note that this function's monitor indices match those provided by + XPLMGetAllMonitorBoundsOS(), but the coordinates are different (since the + X-Plane global desktop may not match the operating system's global desktop, + and one X-Plane boxel may be larger than one pixel due to 150% or 200% + scaling). + } + PROCEDURE XPLMGetAllMonitorBoundsGlobal( + inMonitorBoundsCallback: XPLMReceiveMonitorBoundsGlobal_f; + inRefcon : pointer); + cdecl; external XPLM_DLL; +{$ENDIF XPLM300} + +{$IFDEF XPLM300} + { + XPLMReceiveMonitorBoundsOS_f + + This function is informed of the global bounds (in pixels) of a particular + monitor within the operating system's global desktop space. Note that a + monitor index being passed to you here does not indicate that X-Plane is + running in full screen on this monitor, or even that any X-Plane windows + exist on this monitor. + } +TYPE + XPLMReceiveMonitorBoundsOS_f = PROCEDURE( + inMonitorIndex : Integer; + inLeftPx : Integer; + inTopPx : Integer; + inRightPx : Integer; + inBottomPx : Integer; + inRefcon : pointer); cdecl; +{$ENDIF XPLM300} + +{$IFDEF XPLM300} + { + XPLMGetAllMonitorBoundsOS + + This routine immediately calls you back with the bounds (in pixels) of each + monitor within the operating system's global desktop space. Note that + unlike XPLMGetAllMonitorBoundsGlobal(), this may include monitors that have + no X-Plane window on them. + + Note that this function's monitor indices match those provided by + XPLMGetAllMonitorBoundsGlobal(), but the coordinates are different (since + the X-Plane global desktop may not match the operating system's global + desktop, and one X-Plane boxel may be larger than one pixel). + } + PROCEDURE XPLMGetAllMonitorBoundsOS( + inMonitorBoundsCallback: XPLMReceiveMonitorBoundsOS_f; + inRefcon : pointer); + cdecl; external XPLM_DLL; +{$ENDIF XPLM300} + + { + XPLMGetMouseLocation + + Deprecated in XPLM300. Modern windows should use + XPLMGetMouseLocationGlobal() instead. + + This routine returns the current mouse location in pixels relative to the + main X-Plane window. The bottom left corner of the main window is (0, 0). + Pass NULL to not receive info about either parameter. + + Because this function gives the mouse position relative to the main X-Plane + window (rather than in global bounds), this function should only be used by + legacy windows. Modern windows should instead get the mouse position in + global desktop coordinates using XPLMGetMouseLocationGlobal(). + + Note that unlike XPLMGetMouseLocationGlobal(), if the mouse goes outside + the user's main monitor (for instance, to a pop out window or a secondary + monitor), this function will not reflect it. + } + PROCEDURE XPLMGetMouseLocation( + outX : PInteger; { Can be nil } + outY : PInteger); { Can be nil } + cdecl; external XPLM_DLL; + +{$IFDEF XPLM300} + { + XPLMGetMouseLocationGlobal + + Returns the current mouse location in global desktop boxels. Unlike + XPLMGetMouseLocation(), the bottom left of the main X-Plane window is not + guaranteed to be (0, 0)---instead, the origin is the lower left of the + entire global desktop space. In addition, this routine gives the real mouse + location when the mouse goes to X-Plane windows other than the primary + display. Thus, it can be used with both pop-out windows and secondary + monitors. + + This is the mouse location function to use with modern windows (i.e., those + created by XPLMCreateWindowEx()). + + Pass NULL to not receive info about either parameter. + } + PROCEDURE XPLMGetMouseLocationGlobal( + outX : PInteger; { Can be nil } + outY : PInteger); { Can be nil } + cdecl; external XPLM_DLL; +{$ENDIF XPLM300} + + { + XPLMGetWindowGeometry + + This routine returns the position and size of a window. The units and + coordinate system vary depending on the type of window you have. + + If this is a legacy window (one compiled against a pre-XPLM300 version of + the SDK, or an XPLM300 window that was not created using + XPLMCreateWindowEx()), the units are pixels relative to the main X-Plane + display. + + If, on the other hand, this is a new X-Plane 11-style window (compiled + against the XPLM300 SDK and created using XPLMCreateWindowEx()), the units + are global desktop boxels. + + Pass NULL to not receive any paramter. + } + PROCEDURE XPLMGetWindowGeometry( + inWindowID : XPLMWindowID; + outLeft : PInteger; { Can be nil } + outTop : PInteger; { Can be nil } + outRight : PInteger; { Can be nil } + outBottom : PInteger); { Can be nil } + cdecl; external XPLM_DLL; + + { + XPLMSetWindowGeometry + + This routine allows you to set the position and size of a window. + + The units and coordinate system match those of XPLMGetWindowGeometry(). + That is, modern windows use global desktop boxel coordinates, while legacy + windows use pixels relative to the main X-Plane display. + + Note that this only applies to "floating" windows (that is, windows that + are drawn within the X-Plane simulation windows, rather than being "popped + out" into their own first-class operating system windows). To set the + position of windows whose positioning mode is xplm_WindowPopOut, you'll + need to instead use XPLMSetWindowGeometryOS(). + } + PROCEDURE XPLMSetWindowGeometry( + inWindowID : XPLMWindowID; + inLeft : Integer; + inTop : Integer; + inRight : Integer; + inBottom : Integer); + cdecl; external XPLM_DLL; + +{$IFDEF XPLM300} + { + XPLMGetWindowGeometryOS + + This routine returns the position and size of a "popped out" window (i.e., + a window whose positioning mode is xplm_WindowPopOut), in operating system + pixels. Pass NULL to not receive any parameter. + } + PROCEDURE XPLMGetWindowGeometryOS( + inWindowID : XPLMWindowID; + outLeft : PInteger; { Can be nil } + outTop : PInteger; { Can be nil } + outRight : PInteger; { Can be nil } + outBottom : PInteger); { Can be nil } + cdecl; external XPLM_DLL; +{$ENDIF XPLM300} + +{$IFDEF XPLM300} + { + XPLMSetWindowGeometryOS + + This routine allows you to set the position and size, in operating system + pixel coordinates, of a popped out window (that is, a window whose + positioning mode is xplm_WindowPopOut, which exists outside the X-Plane + simulation window, in its own first-class operating system window). + + Note that you are responsible for ensuring both that your window is popped + out (using XPLMWindowIsPoppedOut()) and that a monitor really exists at the + OS coordinates you provide (using XPLMGetAllMonitorBoundsOS()). + } + PROCEDURE XPLMSetWindowGeometryOS( + inWindowID : XPLMWindowID; + inLeft : Integer; + inTop : Integer; + inRight : Integer; + inBottom : Integer); + cdecl; external XPLM_DLL; +{$ENDIF XPLM300} + +{$IFDEF XPLM301} + { + XPLMGetWindowGeometryVR + + Returns the width and height, in boxels, of a window in VR. Note that you + are responsible for ensuring your window is in VR (using + XPLMWindowIsInVR()). + } + PROCEDURE XPLMGetWindowGeometryVR( + inWindowID : XPLMWindowID; + outWidthBoxels : PInteger; { Can be nil } + outHeightBoxels : PInteger); { Can be nil } + cdecl; external XPLM_DLL; +{$ENDIF XPLM301} + +{$IFDEF XPLM301} + { + XPLMSetWindowGeometryVR + + This routine allows you to set the size, in boxels, of a window in VR (that + is, a window whose positioning mode is xplm_WindowVR). + + Note that you are responsible for ensuring your window is in VR (using + XPLMWindowIsInVR()). + } + PROCEDURE XPLMSetWindowGeometryVR( + inWindowID : XPLMWindowID; + widthBoxels : Integer; + heightBoxels : Integer); + cdecl; external XPLM_DLL; +{$ENDIF XPLM301} + + { + XPLMGetWindowIsVisible + + Returns true (1) if the specified window is visible. + } + FUNCTION XPLMGetWindowIsVisible( + inWindowID : XPLMWindowID) : Integer; + cdecl; external XPLM_DLL; + + { + XPLMSetWindowIsVisible + + This routine shows or hides a window. + } + PROCEDURE XPLMSetWindowIsVisible( + inWindowID : XPLMWindowID; + inIsVisible : Integer); + cdecl; external XPLM_DLL; + +{$IFDEF XPLM300} + { + XPLMWindowIsPoppedOut + + True if this window has been popped out (making it a first-class window in + the operating system), which in turn is true if and only if you have set + the window's positioning mode to xplm_WindowPopOut. + + Only applies to modern windows. (Windows created using the deprecated + XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of + the SDK cannot be popped out.) + } + FUNCTION XPLMWindowIsPoppedOut( + inWindowID : XPLMWindowID) : Integer; + cdecl; external XPLM_DLL; +{$ENDIF XPLM300} + +{$IFDEF XPLM301} + { + XPLMWindowIsInVR + + True if this window has been moved to the virtual reality (VR) headset, + which in turn is true if and only if you have set the window's positioning + mode to xplm_WindowVR. + + Only applies to modern windows. (Windows created using the deprecated + XPLMCreateWindow(), or windows compiled against a pre-XPLM301 version of + the SDK cannot be moved to VR.) + } + FUNCTION XPLMWindowIsInVR( + inWindowID : XPLMWindowID) : Integer; + cdecl; external XPLM_DLL; +{$ENDIF XPLM301} + +{$IFDEF XPLM300} + { + XPLMSetWindowGravity + + A window's "gravity" controls how the window shifts as the whole X-Plane + window resizes. A gravity of 1 means the window maintains its positioning + relative to the right or top edges, 0 the left/bottom, and 0.5 keeps it + centered. + + Default gravity is (0, 1, 0, 1), meaning your window will maintain its + position relative to the top left and will not change size as its + containing window grows. + + If you wanted, say, a window that sticks to the top of the screen (with a + constant height), but which grows to take the full width of the window, you + would pass (0, 1, 1, 1). Because your left and right edges would maintain + their positioning relative to their respective edges of the screen, the + whole width of your window would change with the X-Plane window. + + Only applies to modern windows. (Windows created using the deprecated + XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of + the SDK will simply get the default gravity.) + } + PROCEDURE XPLMSetWindowGravity( + inWindowID : XPLMWindowID; + inLeftGravity : Single; + inTopGravity : Single; + inRightGravity : Single; + inBottomGravity : Single); + cdecl; external XPLM_DLL; +{$ENDIF XPLM300} + +{$IFDEF XPLM300} + { + XPLMSetWindowResizingLimits + + Sets the minimum and maximum size of the client rectangle of the given + window. (That is, it does not include any window styling that you might + have asked X-Plane to apply on your behalf.) All resizing operations are + constrained to these sizes. + + Only applies to modern windows. (Windows created using the deprecated + XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of + the SDK will have no minimum or maximum size.) + } + PROCEDURE XPLMSetWindowResizingLimits( + inWindowID : XPLMWindowID; + inMinWidthBoxels : Integer; + inMinHeightBoxels : Integer; + inMaxWidthBoxels : Integer; + inMaxHeightBoxels : Integer); + cdecl; external XPLM_DLL; +{$ENDIF XPLM300} + +{$IFDEF XPLM300} + { + XPLMWindowPositioningMode + + XPLMWindowPositionMode describes how X-Plane will position your window on + the user's screen. X-Plane will maintain this positioning mode even as the + user resizes their window or adds/removes full-screen monitors. + + Positioning mode can only be set for "modern" windows (that is, windows + created using XPLMCreateWindowEx() and compiled against the XPLM300 SDK). + Windows created using the deprecated XPLMCreateWindow(), or windows + compiled against a pre-XPLM300 version of the SDK will simply get the + "free" positioning mode. + } +TYPE + XPLMWindowPositioningMode = ( + { The default positioning mode. Set the window geometry and its future } + { position will be determined by its window gravity, resizing limits, and } + { user interactions. } + xplm_WindowPositionFree = 0 + + { Keep the window centered on the monitor you specify } + ,xplm_WindowCenterOnMonitor = 1 + + { Keep the window full screen on the monitor you specify } + ,xplm_WindowFullScreenOnMonitor = 2 + + { Like gui_window_full_screen_on_monitor, but stretches over *all* monitors } + { and popout windows. This is an obscure one... unless you have a very good } + { reason to need it, you probably don't! } + ,xplm_WindowFullScreenOnAllMonitors = 3 + + { A first-class window in the operating system, completely separate from the } + { X-Plane window(s) } + ,xplm_WindowPopOut = 4 + +{$IFDEF XPLM301} + { A floating window visible on the VR headset } + ,xplm_WindowVR = 5 +{$ENDIF XPLM301} + + ); + PXPLMWindowPositioningMode = ^XPLMWindowPositioningMode; +{$ENDIF XPLM300} + +{$IFDEF XPLM300} + { + XPLMSetWindowPositioningMode + + Sets the policy for how X-Plane will position your window. + + Some positioning modes apply to a particular monitor. For those modes, you + can pass a negative monitor index to position the window on the main + X-Plane monitor (the screen with the X-Plane menu bar at the top). Or, if + you have a specific monitor you want to position your window on, you can + pass a real monitor index as received from, e.g., + XPLMGetAllMonitorBoundsOS(). + + Only applies to modern windows. (Windows created using the deprecated + XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of + the SDK will always use xplm_WindowPositionFree.) + } + PROCEDURE XPLMSetWindowPositioningMode( + inWindowID : XPLMWindowID; + inPositioningMode : XPLMWindowPositioningMode; + inMonitorIndex : Integer); + cdecl; external XPLM_DLL; +{$ENDIF XPLM300} + +{$IFDEF XPLM300} + { + XPLMSetWindowTitle + + Sets the name for a window. This only applies to windows that opted-in to + styling as an X-Plane 11 floating window (i.e., with styling mode + xplm_WindowDecorationRoundRectangle) when they were created using + XPLMCreateWindowEx(). + } + PROCEDURE XPLMSetWindowTitle( + inWindowID : XPLMWindowID; + inWindowTitle : XPLMString); + cdecl; external XPLM_DLL; +{$ENDIF XPLM300} + + { + XPLMGetWindowRefCon + + Returns a window's reference constant, the unique value you can use for + your own purposes. + } + FUNCTION XPLMGetWindowRefCon( + inWindowID : XPLMWindowID) : pointer; + cdecl; external XPLM_DLL; + + { + XPLMSetWindowRefCon + + Sets a window's reference constant. Use this to pass data to yourself in + the callbacks. + } + PROCEDURE XPLMSetWindowRefCon( + inWindowID : XPLMWindowID; + inRefcon : pointer); + cdecl; external XPLM_DLL; + + { + XPLMTakeKeyboardFocus + + This routine gives a specific window keyboard focus. Keystrokes will be + sent to that window. Pass a window ID of 0 to remove keyboard focus from + any plugin-created windows and instead pass keyboard strokes directly to + X-Plane. + } + PROCEDURE XPLMTakeKeyboardFocus( + inWindow : XPLMWindowID); + cdecl; external XPLM_DLL; + + { + XPLMHasKeyboardFocus + + Returns true (1) if the indicated window has keyboard focus. Pass a window + ID of 0 to see if no plugin window has focus, and all keystrokes will go + directly to X-Plane. + } + FUNCTION XPLMHasKeyboardFocus( + inWindow : XPLMWindowID) : Integer; + cdecl; external XPLM_DLL; + + { + XPLMBringWindowToFront + + This routine brings the window to the front of the Z-order for its layer. + Windows are brought to the front automatically when they are created. + Beyond that, you should make sure you are front before handling mouse + clicks. + + Note that this only brings your window to the front of its layer + (XPLMWindowLayer). Thus, if you have a window in the floating window layer + (xplm_WindowLayerFloatingWindows), but there is a modal window (in layer + xplm_WindowLayerModal) above you, you would still not be the true frontmost + window after calling this. (After all, the window layers are strictly + ordered, and no window in a lower layer can ever be above any window in a + higher one.) + } + PROCEDURE XPLMBringWindowToFront( + inWindow : XPLMWindowID); + cdecl; external XPLM_DLL; + + { + XPLMIsWindowInFront + + This routine returns true if the window you passed in is the frontmost + visible window in its layer (XPLMWindowLayer). + + Thus, if you have a window at the front of the floating window layer + (xplm_WindowLayerFloatingWindows), this will return true even if there is a + modal window (in layer xplm_WindowLayerModal) above you. (Not to worry, + though: in such a case, X-Plane will not pass clicks or keyboard input down + to your layer until the window above stops "eating" the input.) + + Note that legacy windows are always placed in layer + xplm_WindowLayerFlightOverlay, while modern-style windows default to + xplm_WindowLayerFloatingWindows. This means it's perfectly consistent to + have two different plugin-created windows (one legacy, one modern) *both* + be in the front (of their different layers!) at the same time. + } + FUNCTION XPLMIsWindowInFront( + inWindow : XPLMWindowID) : Integer; + cdecl; external XPLM_DLL; + +{___________________________________________________________________________ + * KEY SNIFFERS + ___________________________________________________________________________} +{ + Low-level keyboard handlers. Allows for intercepting keystrokes outside the + normal rules of the user interface. +} + + + { + XPLMKeySniffer_f + + This is the prototype for a low level key-sniffing function. Window-based + UI _should not use this_! The windowing system provides high-level + mediated keyboard access, via the callbacks you attach to your + XPLMCreateWindow_t. By comparison, the key sniffer provides low level + keyboard access. + + Key sniffers are provided to allow libraries to provide non-windowed user + interaction. For example, the MUI library uses a key sniffer to do pop-up + text entry. + + Return 1 to pass the key on to the next sniffer, the window manager, + X-Plane, or whomever is down stream. Return 0 to consume the key. + + Warning: this API declares virtual keys as a signed character; however the + VKEY #define macros in XPLMDefs.h define the vkeys using unsigned values + (that is 0x80 instead of -0x80). So you may need to cast the incoming vkey + to an unsigned char to get correct comparisons in C. + } +TYPE + XPLMKeySniffer_f = FUNCTION( + inChar : XPLMChar; + inFlags : XPLMKeyFlags; + inVirtualKey : XPLMChar; + inRefcon : pointer) : Integer; cdecl; + + { + XPLMRegisterKeySniffer + + This routine registers a key sniffing callback. You specify whether you + want to sniff before the window system, or only sniff keys the window + system does not consume. You should ALMOST ALWAYS sniff non-control keys + after the window system. When the window system consumes a key, it is + because the user has "focused" a window. Consuming the key or taking + action based on the key will produce very weird results. Returns + 1 if successful. + } + FUNCTION XPLMRegisterKeySniffer( + inCallback : XPLMKeySniffer_f; + inBeforeWindows : Integer; + inRefcon : pointer) : Integer; + cdecl; external XPLM_DLL; + + { + XPLMUnregisterKeySniffer + + This routine unregisters a key sniffer. You must unregister a key sniffer + for every time you register one with the exact same signature. Returns 1 + if successful. + } + FUNCTION XPLMUnregisterKeySniffer( + inCallback : XPLMKeySniffer_f; + inBeforeWindows : Integer; + inRefcon : pointer) : Integer; + cdecl; external XPLM_DLL; + +{___________________________________________________________________________ + * HOT KEYS + ___________________________________________________________________________} +{ + Keystrokes that can be managed by others. These are lower-level than window + keyboard handlers (i.e., callbacks you attach to your XPLMCreateWindow_t), + but higher level than key sniffers. +} + + + { + XPLMHotKey_f + + Your hot key callback simply takes a pointer of your choosing. + } +TYPE + XPLMHotKey_f = PROCEDURE( + inRefcon : pointer); cdecl; + + { + XPLMHotKeyID + + An opaque ID used to identify a hot key. + } + XPLMHotKeyID = pointer; + PXPLMHotKeyID = ^XPLMHotKeyID; + + { + XPLMRegisterHotKey + + This routine registers a hot key. You specify your preferred key stroke + virtual key/flag combination, a description of what your callback does (so + other plug-ins can describe the plug-in to the user for remapping) and a + callback function and opaque pointer to pass in). A new hot key ID is + returned. During execution, the actual key associated with your hot key + may change, but you are insulated from this. + } + FUNCTION XPLMRegisterHotKey( + inVirtualKey : XPLMChar; + inFlags : XPLMKeyFlags; + inDescription : XPLMString; + inCallback : XPLMHotKey_f; + inRefcon : pointer) : XPLMHotKeyID; + cdecl; external XPLM_DLL; + + { + XPLMUnregisterHotKey + + Unregisters a hot key. You can only unregister your own hot keys. + } + PROCEDURE XPLMUnregisterHotKey( + inHotKey : XPLMHotKeyID); + cdecl; external XPLM_DLL; + + { + XPLMCountHotKeys + + Returns the number of current hot keys. + } + FUNCTION XPLMCountHotKeys: Integer; + cdecl; external XPLM_DLL; + + { + XPLMGetNthHotKey + + Returns a hot key by index, for iteration on all hot keys. + } + FUNCTION XPLMGetNthHotKey( + inIndex : Integer) : XPLMHotKeyID; + cdecl; external XPLM_DLL; + + { + XPLMGetHotKeyInfo + + Returns information about the hot key. Return NULL for any parameter you + don't want info about. The description should be at least 512 chars long. + } + PROCEDURE XPLMGetHotKeyInfo( + inHotKey : XPLMHotKeyID; + outVirtualKey : XPLMString; { Can be nil } + outFlags : PXPLMKeyFlags; { Can be nil } + outDescription : XPLMString; { Can be nil } + outPlugin : PXPLMPluginID); { Can be nil } + cdecl; external XPLM_DLL; + + { + XPLMSetHotKeyCombination + + Remaps a hot key's keystrokes. You may remap another plugin's keystrokes. + } + PROCEDURE XPLMSetHotKeyCombination( + inHotKey : XPLMHotKeyID; + inVirtualKey : XPLMChar; + inFlags : XPLMKeyFlags); + cdecl; external XPLM_DLL; + + +IMPLEMENTATION + +END. diff --git a/src/SDK/Delphi/XPLM/XPLMGraphics.pas b/src/SDK/Delphi/XPLM/XPLMGraphics.pas new file mode 100755 index 00000000..20ff61a9 --- /dev/null +++ b/src/SDK/Delphi/XPLM/XPLMGraphics.pas @@ -0,0 +1,424 @@ +{ + Copyright 2005-2012 Sandy Barbour and Ben Supnik All rights reserved. See + license.txt for usage. X-Plane SDK Version: 2.1.1 +} + +UNIT XPLMGraphics; +INTERFACE +{ + A few notes on coordinate systems: + + X-Plane uses three kinds of coordinates. Global coordinates are specified + as latitude, longitude and elevation. This coordinate system never changes + but is not very precise. + + OpenGL (or 'local') coordinates are cartesian and shift with the plane. + They offer more precision and are used for 3-d OpenGL drawing. The X axis + is aligned east-west with positive X meaning east. The Y axis is aligned + straight up and down at the point 0,0,0 (but since the earth is round it is + not truly straight up and down at other points). The Z axis is aligned + north-south at 0, 0, 0 with positive Z pointing south (but since the earth + is round it isn't exactly north-south as you move east or west of 0, 0, 0). + One unit is one meter and the point 0,0,0 is on the surface of the earth at + sea level for some latitude and longitude picked by the sim such that the + user's aircraft is reasonably nearby. + + 2-d Panel coordinates are 2d, with the X axis horizontal and the Y axis + vertical. The point 0,0 is the bottom left and 1024,768 is the upper + right of the screen. This is true no matter what resolution the user's + monitor is in; when running in higher resolution, graphics will be + scaled. + + Use X-Plane's routines to convert between global and local coordinates. Do + not attempt to do this conversion yourself; the precise 'roundness' of + X-Plane's physics model may not match your own, and (to make things + weirder) the user can potentially customize the physics of the current + planet. +} + +USES + XPLMDefs; + {$A4} +{___________________________________________________________________________ + * X-PLANE GRAPHICS + ___________________________________________________________________________} +{ + These routines allow you to use OpenGL with X-Plane. +} + + + { + XPLMTextureID + + XPLM Texture IDs name well-known textures in the sim for you to use. This + allows you to recycle textures from X-Plane, saving VRAM. + + *Warning*: do not use these enums. The only remaining use they have is to + access the legacy compatibility v10 UI texture; if you need this, get it + via the Widgets library. + } +TYPE + XPLMTextureID = ( + { The bitmap that contains window outlines, button outlines, fonts, etc. } + xplm_Tex_GeneralInterface = 0 + +{$IFDEF XPLM_DEPRECATED} + { The exterior paint for the user's aircraft (daytime). } + ,xplm_Tex_AircraftPaint = 1 +{$ENDIF XPLM_DEPRECATED} + +{$IFDEF XPLM_DEPRECATED} + { The exterior light map for the user's aircraft. } + ,xplm_Tex_AircraftLiteMap = 2 +{$ENDIF XPLM_DEPRECATED} + + ); + PXPLMTextureID = ^XPLMTextureID; + + { + XPLMSetGraphicsState + + XPLMSetGraphicsState changes OpenGL's fixed function pipeline state. You + are not responsible for restoring any state that is accessed via + XPLMSetGraphicsState, but you are responsible for not accessing this state + directly. + + - inEnableFog - enables or disables fog, equivalent to: glEnable(GL_FOG); + - inNumberTexUnits - enables or disables a number of multitexturing units. + If the number is 0, 2d texturing is disabled entirely, as in + glDisable(GL_TEXTURE_2D); Otherwise, 2d texturing is enabled, and a + number of multitexturing units are enabled sequentially, starting with + unit 0, e.g. glActiveTextureARB(GL_TEXTURE0_ARB); glEnable + (GL_TEXTURE_2D); + - inEnableLighting - enables or disables OpenGL lighting, e.g. + glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); + - inEnableAlphaTesting - enables or disables the alpha test per pixel, e.g. + glEnable(GL_ALPHA_TEST); + - inEnableAlphaBlending - enables or disables alpha blending per pixel, + e.g. glEnable(GL_BLEND); + - inEnableDepthTesting - enables per pixel depth testing, as in + glEnable(GL_DEPTH_TEST); + - inEnableDepthWriting - enables writing back of depth information to the + depth bufffer, as in glDepthMask(GL_TRUE); + + The purpose of this function is to change OpenGL state while keeping + X-Plane aware of the state changes; this keeps X-Plane from getting + surprised by OGL state changes, and prevents X-Plane and plug-ins from + having to set all state before all draws; XPLMSetGraphicsState internally + skips calls to change state that is already properly enabled. + + X-Plane does not have a 'default' OGL state for plug-ins with respect to + the above state vector; plug-ins should totally set OGL state using this + API before drawing. Use XPLMSetGraphicsState instead of any of the above + OpenGL calls. + + WARNING: Any routine that performs drawing (e.g. XPLMDrawString or widget + code) may change X-Plane's state. Always set state before drawing after + unknown code has executed. + + *Deprecation Warnings*: X-Plane's lighting and fog environemnt is + significantly more complex than the fixed function pipeline can express; + do not assume that lighting and fog state is a good approximation for 3-d + drawing. Prefer to use XPLMInstancing to draw objects. All calls to + XPLMSetGraphicsState should have no fog or lighting. + } + PROCEDURE XPLMSetGraphicsState( + inEnableFog : Integer; + inNumberTexUnits : Integer; + inEnableLighting : Integer; + inEnableAlphaTesting: Integer; + inEnableAlphaBlending: Integer; + inEnableDepthTesting: Integer; + inEnableDepthWriting: Integer); + cdecl; external XPLM_DLL; + + { + XPLMBindTexture2d + + XPLMBindTexture2d changes what texture is bound to the 2d texturing + target. This routine caches the current 2d texture across all texturing + units in the sim and plug-ins, preventing extraneous binding. For + example, consider several plug-ins running in series; if they all use the + 'general interface' bitmap to do UI, calling this function will skip the + rebinding of the general interface texture on all but the first plug-in, + which can provide better frame rate son some graphics cards. + + inTextureID is the ID of the texture object to bind; inTextureUnit is a + zero-based texture unit (e.g. 0 for the first one), up to a maximum of 4 + units. (This number may increase in future versions of X-Plane.) + + Use this routine instead of glBindTexture(GL_TEXTURE_2D, ....); + } + PROCEDURE XPLMBindTexture2d( + inTextureNum : Integer; + inTextureUnit : Integer); + cdecl; external XPLM_DLL; + + { + XPLMGenerateTextureNumbers + + Use this routine instead of glGenTextures to generate new texture object + IDs. This routine historically ensured that plugins don't use texure IDs + that X-Plane is reserving for its own use. + } + PROCEDURE XPLMGenerateTextureNumbers( + outTextureIDs : PInteger; + inCount : Integer); + cdecl; external XPLM_DLL; + +{$IFDEF XPLM_DEPRECATED} + { + XPLMGetTexture + + XPLMGetTexture returns the OpenGL texture ID of an X-Plane texture based on + a generic identifying code. For example, you can get the texture for + X-Plane's UI bitmaps. + } + FUNCTION XPLMGetTexture( + inTexture : XPLMTextureID) : Integer; + cdecl; external XPLM_DLL; +{$ENDIF XPLM_DEPRECATED} + + { + XPLMWorldToLocal + + This routine translates coordinates from latitude, longitude, and altitude + to local scene coordinates. Latitude and longitude are in decimal degrees, + and altitude is in meters MSL (mean sea level). The XYZ coordinates are in + meters in the local OpenGL coordinate system. + } + PROCEDURE XPLMWorldToLocal( + inLatitude : Real; + inLongitude : Real; + inAltitude : Real; + outX : PReal; + outY : PReal; + outZ : PReal); + cdecl; external XPLM_DLL; + + { + XPLMLocalToWorld + + This routine translates a local coordinate triplet back into latitude, + longitude, and altitude. Latitude and longitude are in decimal degrees, + and altitude is in meters MSL (mean sea level). The XYZ coordinates are in + meters in the local OpenGL coordinate system. + + NOTE: world coordinates are less precise than local coordinates; you should + try to avoid round tripping from local to world and back. + } + PROCEDURE XPLMLocalToWorld( + inX : Real; + inY : Real; + inZ : Real; + outLatitude : PReal; + outLongitude : PReal; + outAltitude : PReal); + cdecl; external XPLM_DLL; + + { + XPLMDrawTranslucentDarkBox + + This routine draws a translucent dark box, partially obscuring parts of the + screen but making text easy to read. This is the same graphics primitive + used by X-Plane to show text files and ATC info. + } + PROCEDURE XPLMDrawTranslucentDarkBox( + inLeft : Integer; + inTop : Integer; + inRight : Integer; + inBottom : Integer); + cdecl; external XPLM_DLL; + +{___________________________________________________________________________ + * X-PLANE TEXT + ___________________________________________________________________________} + + { + XPLMFontID + + X-Plane features some fixed-character fonts. Each font may have its own + metrics. + + WARNING: Some of these fonts are no longer supported or may have changed + geometries. For maximum copmatibility, see the comments below. + + Note: X-Plane 7 supports proportional-spaced fonts. Since no measuring + routine is available yet, the SDK will normally draw using a fixed-width + font. You can use a dataref to enable proportional font drawing on XP7 if + you want to. + } +TYPE + XPLMFontID = ( + { Mono-spaced font for user interface. Available in all versions of the SDK.} + xplmFont_Basic = 0 + +{$IFDEF XPLM_DEPRECATED} + { Deprecated, do not use. } + ,xplmFont_Menus = 1 +{$ENDIF XPLM_DEPRECATED} + +{$IFDEF XPLM_DEPRECATED} + { Deprecated, do not use. } + ,xplmFont_Metal = 2 +{$ENDIF XPLM_DEPRECATED} + +{$IFDEF XPLM_DEPRECATED} + { Deprecated, do not use. } + ,xplmFont_Led = 3 +{$ENDIF XPLM_DEPRECATED} + +{$IFDEF XPLM_DEPRECATED} + { Deprecated, do not use. } + ,xplmFont_LedWide = 4 +{$ENDIF XPLM_DEPRECATED} + +{$IFDEF XPLM_DEPRECATED} + { Deprecated, do not use. } + ,xplmFont_PanelHUD = 5 +{$ENDIF XPLM_DEPRECATED} + +{$IFDEF XPLM_DEPRECATED} + { Deprecated, do not use. } + ,xplmFont_PanelEFIS = 6 +{$ENDIF XPLM_DEPRECATED} + +{$IFDEF XPLM_DEPRECATED} + { Deprecated, do not use. } + ,xplmFont_PanelGPS = 7 +{$ENDIF XPLM_DEPRECATED} + +{$IFDEF XPLM_DEPRECATED} + { Deprecated, do not use. } + ,xplmFont_RadiosGA = 8 +{$ENDIF XPLM_DEPRECATED} + +{$IFDEF XPLM_DEPRECATED} + { Deprecated, do not use. } + ,xplmFont_RadiosBC = 9 +{$ENDIF XPLM_DEPRECATED} + +{$IFDEF XPLM_DEPRECATED} + { Deprecated, do not use. } + ,xplmFont_RadiosHM = 10 +{$ENDIF XPLM_DEPRECATED} + +{$IFDEF XPLM_DEPRECATED} + { Deprecated, do not use. } + ,xplmFont_RadiosGANarrow = 11 +{$ENDIF XPLM_DEPRECATED} + +{$IFDEF XPLM_DEPRECATED} + { Deprecated, do not use. } + ,xplmFont_RadiosBCNarrow = 12 +{$ENDIF XPLM_DEPRECATED} + +{$IFDEF XPLM_DEPRECATED} + { Deprecated, do not use. } + ,xplmFont_RadiosHMNarrow = 13 +{$ENDIF XPLM_DEPRECATED} + +{$IFDEF XPLM_DEPRECATED} + { Deprecated, do not use. } + ,xplmFont_Timer = 14 +{$ENDIF XPLM_DEPRECATED} + +{$IFDEF XPLM_DEPRECATED} + { Deprecated, do not use. } + ,xplmFont_FullRound = 15 +{$ENDIF XPLM_DEPRECATED} + +{$IFDEF XPLM_DEPRECATED} + { Deprecated, do not use. } + ,xplmFont_SmallRound = 16 +{$ENDIF XPLM_DEPRECATED} + +{$IFDEF XPLM_DEPRECATED} + { Deprecated, do not use. } + ,xplmFont_Menus_Localized = 17 +{$ENDIF XPLM_DEPRECATED} + +{$IFDEF XPLM200} + { Proportional UI font. } + ,xplmFont_Proportional = 18 +{$ENDIF XPLM200} + + ); + PXPLMFontID = ^XPLMFontID; + + { + XPLMDrawString + + This routine draws a NULL termianted string in a given font. Pass in the + lower left pixel that the character is to be drawn onto. Also pass the + character and font ID. This function returns the x offset plus the width of + all drawn characters. The color to draw in is specified as a pointer to an + array of three floating point colors, representing RGB intensities from 0.0 + to 1.0. + } + PROCEDURE XPLMDrawString( + inColorRGB : PSingle; + inXOffset : Integer; + inYOffset : Integer; + inChar : XPLMString; + inWordWrapWidth : PInteger; { Can be nil } + inFontID : XPLMFontID); + cdecl; external XPLM_DLL; + + { + XPLMDrawNumber + + This routine draws a number similar to the digit editing fields in + PlaneMaker and data output display in X-Plane. Pass in a color, a + position, a floating point value, and formatting info. Specify how many + integer and how many decimal digits to show and whether to show a sign, as + well as a character set. This routine returns the xOffset plus width of the + string drawn. + } + PROCEDURE XPLMDrawNumber( + inColorRGB : PSingle; + inXOffset : Integer; + inYOffset : Integer; + inValue : Real; + inDigits : Integer; + inDecimals : Integer; + inShowSign : Integer; + inFontID : XPLMFontID); + cdecl; external XPLM_DLL; + + { + XPLMGetFontDimensions + + This routine returns the width and height of a character in a given font. + It also tells you if the font only supports numeric digits. Pass NULL if + you don't need a given field. Note that for a proportional font the width + will be an arbitrary, hopefully average width. + } + PROCEDURE XPLMGetFontDimensions( + inFontID : XPLMFontID; + outCharWidth : PInteger; { Can be nil } + outCharHeight : PInteger; { Can be nil } + outDigitsOnly : PInteger); { Can be nil } + cdecl; external XPLM_DLL; + +{$IFDEF XPLM200} + { + XPLMMeasureString + + This routine returns the width in pixels of a string using a given font. + The string is passed as a pointer plus length (and does not need to be null + terminated); this is used to allow for measuring substrings. The return + value is floating point; it is possible that future font drawing may allow + for fractional pixels. + } + FUNCTION XPLMMeasureString( + inFontID : XPLMFontID; + inChar : XPLMString; + inNumChars : Integer) : Single; + cdecl; external XPLM_DLL; +{$ENDIF XPLM200} + + +IMPLEMENTATION + +END. diff --git a/src/SDK/Delphi/XPLM/XPLMInstance.pas b/src/SDK/Delphi/XPLM/XPLMInstance.pas new file mode 100644 index 00000000..a38d2bb8 --- /dev/null +++ b/src/SDK/Delphi/XPLM/XPLMInstance.pas @@ -0,0 +1,125 @@ +{ + Copyright 2005-2012 Sandy Barbour and Ben Supnik All rights reserved. See + license.txt for usage. X-Plane SDK Version: 2.1.1 +} + +UNIT XPLMInstance; +INTERFACE +{ + This API provides instanced drawing of X-Plane objects (.obj files). In + contrast to old drawing APIs, which required you to draw your own objects + per-frame, the instancing API allows you to simply register an OBJ for + drawing, then move or manipulate it later (as needed). + + This provides one tremendous benefit: it keeps all dataref operations for + your object in one place. Because datarefs are main thread only, allowing + dataref access anywhere is a serious performance bottleneck for the + simulator---the whole simulator has to pause and wait for each dataref + access. This performance penalty will only grow worse as X-Plane moves + toward an ever more heavily multithreaded engine. + + The instancing API allows X-Plane to isolate all dataref manipulations for + all plugin object drawing to one place, potentially providing huge + performance gains. + + Here's how it works: + + When an instance is created, it provides a list of all datarefs you want to + manipulate in for the OBJ in the future. This list of datarefs replaces the + ad-hoc collections of dataref objects previously used by art assets. Then, + per-frame, you can manipulate the instance by passing in a "block" of + packed floats representing the current values of the datarefs for your + instance. (Note that the ordering of this set of packed floats must exactly + match the ordering of the datarefs when you created your instance.) +} + +USES + XPLMDefs, XPLMScenery; + {$A4} +{___________________________________________________________________________ + * Instance Creation and Destruction + ___________________________________________________________________________} +{ + Registers and unregisters instances. +} + + +TYPE + { + XPLMInstanceRef + + An opaque handle to an instance. + } + XPLMInstanceRef = pointer; + PXPLMInstanceRef = ^XPLMInstanceRef; + + { + XPLMCreateInstance + + XPLMCreateInstance creates a new instance, managed by your plug-in, and + returns a handle to the instance. A few important requirements: + + * The object passed in must be fully loaded and returned from the XPLM + before you can create your instance; you cannot pass a null obj ref, nor + can you change the ref later. + + * If you use any custom datarefs in your object, they must be registered + before the object is loaded. This is true even if their data will be + provided via the instance dataref list. + + * The instance dataref array must be a valid ptr to an array of at least + one item that is null terminated. That is, if you do not want any + datarefs, you must passa ptr to an array with a null item. You cannot + pass null for this. + } + FUNCTION XPLMCreateInstance( + obj : XPLMObjectRef; + datarefs : PXPLMString) : XPLMInstanceRef; + cdecl; external XPLM_DLL; + + { + XPLMDestroyInstance + + XPLMDestroyInstance destroys and deallocates your instance; once called, + you are still responsible for releasing the OBJ ref. + + Tip: you can release your OBJ ref after you call XPLMCreateInstance as long + as you never use it again; the instance will maintain its own reference to + the OBJ and the object OBJ be deallocated when the instance is destroyed. + } + PROCEDURE XPLMDestroyInstance( + instance : XPLMInstanceRef); + cdecl; external XPLM_DLL; + +{___________________________________________________________________________ + * Instance Manipulation + ___________________________________________________________________________} + + { + XPLMInstanceSetPosition + + Updates both the position of the instance and all datarefs you registered + for it. Call this from a flight loop callback or UI callback. + + __DO NOT__ call XPLMInstanceSetPosition from a drawing callback; the whole + point of instancing is that you do not need any drawing callbacks. Setting + instance data from a drawing callback may have undefined consequences, and + the drawing callback hurts FPS unnecessarily. + + The memory pointed to by the data pointer must be large enough to hold one + float for every data ref you have registered, and must contain valid + floating point data. + + BUG: before X-Plane 11.50, if you have no dataref registered, you must + still pass a valid pointer for data and not null. + } + PROCEDURE XPLMInstanceSetPosition( + instance : XPLMInstanceRef; + new_position : PXPLMDrawInfo_t; + data : PSingle); + cdecl; external XPLM_DLL; + + +IMPLEMENTATION + +END. diff --git a/src/SDK/Delphi/XPLM/XPLMMap.pas b/src/SDK/Delphi/XPLM/XPLMMap.pas new file mode 100644 index 00000000..61c82dcf --- /dev/null +++ b/src/SDK/Delphi/XPLM/XPLMMap.pas @@ -0,0 +1,611 @@ +{ + Copyright 2005-2012 Sandy Barbour and Ben Supnik All rights reserved. See + license.txt for usage. X-Plane SDK Version: 2.1.1 +} + +UNIT XPLMMap; +INTERFACE +{ + This API allows you to create new layers within X-Plane maps. Your layers + can draw arbitrary OpenGL, but they conveniently also have access to + X-Plane's built-in icon and label drawing functions. + + As of X-Plane 11, map drawing happens in three stages: + + 1. backgrounds and "fill," + 2. icons, and + 3. labels. + + Thus, all background drawing gets layered beneath all icons, which likewise + get layered beneath all labels. Within each stage, the map obeys a + consistent layer ordering, such that "fill" layers (layers that cover a + large amount of map area, like the terrain and clouds) appear beneath + "markings" layers (like airport icons). This ensures that layers with fine + details don't get obscured by layers with larger details. + + The XPLM map API reflects both aspects of this draw layering: you can + register a layer as providing either markings or fill, and X-Plane will + draw your fill layers beneath your markings layers (regardless of + registration order). Likewise, you are guaranteed that your layer's icons + (added from within an icon callback) will go above your layer's OpenGL + drawing, and your labels will go above your icons. + + The XPLM guarantees that all plugin-created fill layers go on top of all + native X-Plane fill layers, and all plugin-created markings layers go on + top of all X-Plane markings layers (with the exception of the aircraft + icons). It also guarantees that the draw order of your own plugin's layers + will be consistent. But, for layers created by different plugins, the only + guarantee is that we will draw all of one plugin's layers of each type + (fill, then markings), then all of the others'; we don't guarantee which + plugin's fill and markings layers go on top of the other's. + + As of X-Plane 11, maps use true cartographic projections for their drawing, + and different maps may use different projections. For that reason, all + drawing calls include an opaque handle for the projection you should use to + do the drawing. Any time you would draw at a particular latitude/longitude, + you'll need to ask the projection to translate that position into "map + coordinates." (Note that the projection is guaranteed not to change between + calls to your prepare-cache hook, so if you cache your map coordinates + ahead of time, there's no need to re-project them when you actually draw.) + + In addition to mapping normal latitude/longitude locations into map + coordinates, the projection APIs also let you know the current heading for + north. (Since X-Plane 11 maps can rotate to match the heading of the user's + aircraft, it's not safe to assume that north is at zero degrees rotation.) +} + +USES + XPLMDefs; + {$A4} +{$IFDEF XPLM300} +{___________________________________________________________________________ + * DRAWING CALLBACKS + ___________________________________________________________________________} +{ + When you create a new map layer (using XPLMCreateMapLayer), you can provide + any or all of these callbacks. They allow you to insert your own OpenGL + drawing, text labels, and icons into the X-Plane map at the appropriate + places, allowing your layer to behave as similarly to X-Plane's built-in + layers as possible. +} + + +TYPE + { + XPLMMapLayerID + + This is an opaque handle for a plugin-created map layer. Pass it to the map + drawing APIs from an appropriate callback to draw in the layer you created. + } + XPLMMapLayerID = pointer; + PXPLMMapLayerID = ^XPLMMapLayerID; + + { + XPLMMapProjectionID + + This is an opaque handle for a map projection. Pass it to the projection + APIs to translate between map coordinates and latitude/longitudes. + } + XPLMMapProjectionID = pointer; + PXPLMMapProjectionID = ^XPLMMapProjectionID; + + { + XPLMMapStyle + + Indicates the visual style being drawn by the map. In X-Plane, the user can + choose between a number of map types, and different map types may have use + a different visual representation for the same elements (for instance, the + visual style of the terrain layer changes drastically between the VFR and + IFR layers), or certain layers may be disabled entirely in some map types + (e.g., localizers are only visible in the IFR low-enroute style). + } + XPLMMapStyle = ( + xplm_MapStyle_VFR_Sectional = 0 + + ,xplm_MapStyle_IFR_LowEnroute = 1 + + ,xplm_MapStyle_IFR_HighEnroute = 2 + + ); + PXPLMMapStyle = ^XPLMMapStyle; + + { + XPLMMapDrawingCallback_f + + This is the OpenGL map drawing callback for plugin-created map layers. You + can perform arbitrary OpenGL drawing from this callback, with one + exception: changes to the Z-buffer are not permitted, and will result in + map drawing errors. + + All drawing done from within this callback appears beneath all built-in + X-Plane icons and labels, but above the built-in "fill" layers (layers + providing major details, like terrain and water). Note, however, that the + relative ordering between the drawing callbacks of different plugins is not + guaranteed. + } + XPLMMapDrawingCallback_f = PROCEDURE( + inLayer : XPLMMapLayerID; + inMapBoundsLeftTopRightBottom: PSingle; + zoomRatio : Single; + mapUnitsPerUserInterfaceUnit: Single; + mapStyle : XPLMMapStyle; + projection : XPLMMapProjectionID; + inRefcon : pointer); cdecl; + + { + XPLMMapIconDrawingCallback_f + + This is the icon drawing callback that enables plugin-created map layers to + draw icons using X-Plane's built-in icon drawing functionality. You can + request an arbitrary number of PNG icons to be drawn via + XPLMDrawMapIconFromSheet() from within this callback, but you may not + perform any OpenGL drawing here. + + Icons enqueued by this function will appear above all OpenGL drawing + (performed by your optional XPLMMapDrawingCallback_f), and above all + built-in X-Plane map icons of the same layer type ("fill" or "markings," as + determined by the XPLMMapLayerType in your XPLMCreateMapLayer_t). Note, + however, that the relative ordering between the drawing callbacks of + different plugins is not guaranteed. + } + XPLMMapIconDrawingCallback_f = PROCEDURE( + inLayer : XPLMMapLayerID; + inMapBoundsLeftTopRightBottom: PSingle; + zoomRatio : Single; + mapUnitsPerUserInterfaceUnit: Single; + mapStyle : XPLMMapStyle; + projection : XPLMMapProjectionID; + inRefcon : pointer); cdecl; + + { + XPLMMapLabelDrawingCallback_f + + This is the label drawing callback that enables plugin-created map layers + to draw text labels using X-Plane's built-in labeling functionality. You + can request an arbitrary number of text labels to be drawn via + XPLMDrawMapLabel() from within this callback, but you may not perform any + OpenGL drawing here. + + Labels enqueued by this function will appear above all OpenGL drawing + (performed by your optional XPLMMapDrawingCallback_f), and above all + built-in map icons and labels of the same layer type ("fill" or "markings," + as determined by the XPLMMapLayerType in your XPLMCreateMapLayer_t). Note, + however, that the relative ordering between the drawing callbacks of + different plugins is not guaranteed. + } + XPLMMapLabelDrawingCallback_f = PROCEDURE( + inLayer : XPLMMapLayerID; + inMapBoundsLeftTopRightBottom: PSingle; + zoomRatio : Single; + mapUnitsPerUserInterfaceUnit: Single; + mapStyle : XPLMMapStyle; + projection : XPLMMapProjectionID; + inRefcon : pointer); cdecl; + +{$ENDIF XPLM300} +{$IFDEF XPLM300} +{___________________________________________________________________________ + * LAYER MANAGEMENT CALLBACKS + ___________________________________________________________________________} +{ + These are various "bookkeeping" callbacks that your map layer can receive + (if you provide the callback in your XPLMCreateMapLayer_t). They allow you + to manage the lifecycle of your layer, as well as cache any + computationally-intensive preparation you might need for drawing. +} + + + { + XPLMMapPrepareCacheCallback_f + + A callback used to allow you to cache whatever information your layer needs + to draw in the current map area. + + This is called each time the map's total bounds change. This is typically + triggered by new DSFs being loaded, such that X-Plane discards old, + now-distant DSFs and pulls in new ones. At that point, the available bounds + of the map also change to match the new DSF area. + + By caching just the information you need to draw in this area, your future + draw calls can be made faster, since you'll be able to simply "splat" your + precomputed information each frame. + + We guarantee that the map projection will not change between successive + prepare cache calls, nor will any draw call give you bounds outside these + total map bounds. So, if you cache the projected map coordinates of all the + items you might want to draw in the total map area, you can be guaranteed + that no draw call will be asked to do any new work. + } +TYPE + XPLMMapPrepareCacheCallback_f = PROCEDURE( + inLayer : XPLMMapLayerID; + inTotalMapBoundsLeftTopRightBottom: PSingle; + projection : XPLMMapProjectionID; + inRefcon : pointer); cdecl; + + { + XPLMMapWillBeDeletedCallback_f + + Called just before your map layer gets deleted. Because SDK-created map + layers have the same lifetime as the X-Plane map that contains them, if the + map gets unloaded from memory, your layer will too. + } + XPLMMapWillBeDeletedCallback_f = PROCEDURE( + inLayer : XPLMMapLayerID; + inRefcon : pointer); cdecl; + +{$ENDIF XPLM300} +{$IFDEF XPLM300} +{___________________________________________________________________________ + * MAP LAYER CREATION AND DESTRUCTION + ___________________________________________________________________________} +{ + Enables the creation of new map layers. Layers are created for a particular + instance of the X-Plane map. For instance, if you want your layer to appear + in both the normal map interface and the Instructor Operator Station (IOS), + you would need two separate calls to XPLMCreateMapLayer(), with two + different values for your XPLMCreateMapLayer_t::layer_name. + + Your layer's lifetime will be determined by the lifetime of the map it is + created in. If the map is destroyed (on the X-Plane side), your layer will + be too, and you'll receive a callback to your + XPLMMapWillBeDeletedCallback_f. +} + + + { + XPLMMapLayerType + + Indicates the type of map layer you are creating. Fill layers will always + be drawn beneath markings layers. + } +TYPE + XPLMMapLayerType = ( + { A layer that draws "fill" graphics, like weather patterns, terrain, etc. } + { Fill layers frequently cover a large portion of the visible map area. } + xplm_MapLayer_Fill = 0 + + { A layer that provides markings for particular map features, like NAVAIDs, } + { airports, etc. Even dense markings layers cover a small portion of the } + { total map area. } + ,xplm_MapLayer_Markings = 1 + + ); + PXPLMMapLayerType = ^XPLMMapLayerType; + +CONST + { Globally unique identifier for X-Plane's Map window, used as the } + { mapToCreateLayerIn parameter in XPLMCreateMapLayer_t } + XPLM_MAP_USER_INTERFACE = "XPLM_MAP_USER_INTERFACE"; + + { Globally unique identifier for X-Plane's Instructor Operator Station } + { window, used as the mapToCreateLayerIn parameter in XPLMCreateMapLayer_t } + XPLM_MAP_IOS = "XPLM_MAP_IOS"; + + { + XPLMCreateMapLayer_t + + This structure defines all of the parameters used to create a map layer + using XPLMCreateMapLayer. The structure will be expanded in future SDK APIs + to include more features. Always set the structSize member to the size of + your struct in bytes! + + Each layer must be associated with exactly one map instance in X-Plane. + That map, and that map alone, will call your callbacks. Likewise, when that + map is deleted, your layer will be as well. + } +TYPE + XPLMCreateMapLayer_t = RECORD + { Used to inform XPLMCreateMapLayer() of the SDK version you compiled } + { against; should always be set to sizeof(XPLMCreateMapLayer_t) } + structSize : Integer; + { Globally unique string identifying the map you want this layer to appear } + { in. As of XPLM300, this is limited to one of XPLM_MAP_USER_INTERFACE or } + { XPLM_MAP_IOS } + mapToCreateLayerIn : XPLMString; + { The type of layer you are creating, used to determine draw order (all } + { plugin-created markings layers are drawn above all plugin-created fill } + { layers) } + layerType : XPLMMapLayerType; + { Optional callback to inform you this layer is being deleted (due to its } + { owning map being destroyed) } + willBeDeletedCallback : XPLMMapWillBeDeletedCallback_f; + { Optional callback you want to use to prepare your draw cache when the map } + { bounds change (set to NULL if you don't want this callback) } + prepCacheCallback : XPLMMapPrepareCacheCallback_f; + { Optional callback you want to use for arbitrary OpenGL drawing, which goes } + { beneath all icons in the map's layering system (set to NULL if you don't } + { want this callback) } + drawCallback : XPLMMapDrawingCallback_f; + { Optional callback you want to use for drawing icons, which go above all } + { built-in X-Plane icons (except the aircraft) in the map's layering system } + { (set to NULL if you don't want this callback) } + iconCallback : XPLMMapIconDrawingCallback_f; + { Optional callback you want to use for drawing map labels, which go above } + { all built-in X-Plane icons and labels (except those of aircraft) in the } + { map's layering system (set to NULL if you don't want this callback) } + labelCallback : XPLMMapLabelDrawingCallback_f; + { True if you want a checkbox to be created in the map UI to toggle this } + { layer on and off; false if the layer should simply always be enabled } + showUiToggle : Integer; + { Short label to use for this layer in the user interface } + layerName : XPLMString; + { A reference to arbitrary data that will be passed to your callbacks } + refcon : pointer; + END; + PXPLMCreateMapLayer_t = ^XPLMCreateMapLayer_t; + + { + XPLMCreateMapLayer + + This routine creates a new map layer. You pass in an XPLMCreateMapLayer_t + structure with all of the fields set in. You must set the structSize of + the structure to the size of the actual structure you used. + + Returns NULL if the layer creation failed. This happens most frequently + because the map you specified in your + XPLMCreateMapLayer_t::mapToCreateLayerIn field doesn't exist (that is, if + XPLMMapExists() returns 0 for the specified map). You can use + XPLMRegisterMapCreationHook() to get a notification each time a new map is + opened in X-Plane, at which time you can create layers in it. + } + FUNCTION XPLMCreateMapLayer( + inParams : PXPLMCreateMapLayer_t) : XPLMMapLayerID; + cdecl; external XPLM_DLL; + + { + XPLMDestroyMapLayer + + Destroys a map layer you created (calling your + XPLMMapWillBeDeletedCallback_f if applicable). Returns true if a deletion + took place. + } + FUNCTION XPLMDestroyMapLayer( + inLayer : XPLMMapLayerID) : Integer; + cdecl; external XPLM_DLL; + + { + XPLMMapCreatedCallback_f + + A callback to notify your plugin that a new map has been created in + X-Plane. This is the best time to add a custom map layer using + XPLMCreateMapLayer(). + + No OpenGL drawing is permitted within this callback. + } +TYPE + XPLMMapCreatedCallback_f = PROCEDURE( + mapIdentifier : XPLMString; + refcon : pointer); cdecl; + + { + XPLMRegisterMapCreationHook + + Registers your callback to receive a notification each time a new map is + constructed in X-Plane. This callback is the best time to add your custom + map layer using XPLMCreateMapLayer(). + + Note that you will not be notified about any maps that already exist---you + can use XPLMMapExists() to check for maps that were created previously. + } + PROCEDURE XPLMRegisterMapCreationHook( + callback : XPLMMapCreatedCallback_f; + refcon : pointer); + cdecl; external XPLM_DLL; + + { + XPLMMapExists + + Returns 1 if the map with the specified identifier already exists in + X-Plane. In that case, you can safely call XPLMCreateMapLayer() specifying + that your layer should be added to that map. + } + FUNCTION XPLMMapExists( + mapIdentifier : XPLMString) : Integer; + cdecl; external XPLM_DLL; + +{$ENDIF XPLM300} +{$IFDEF XPLM300} +{___________________________________________________________________________ + * MAP DRAWING + ___________________________________________________________________________} +{ + These APIs are only valid from within a map drawing callback (one of + XPLMIconDrawingCallback_t or XPLMMapLabelDrawingCallback_f). Your drawing + callbacks are registered when you create a new map layer as part of your + XPLMCreateMapLayer_t. The functions here hook into X-Plane's built-in map + drawing functionality for icons and labels, so that you get a consistent + style with the rest of the X-Plane map. + + Note that the X-Plane 11 map introduces a strict ordering: layers of type + xplm_MapLayer_Fill get drawn beneath all xplm_MapLayer_Markings layers. + Likewise, all OpenGL drawing (performed in your layer's + XPLMMapDrawingCallback_f) will appear beneath any icons and labels you + draw. +} + + + { + XPLMMapOrientation + + Indicates whether a map element should be match its rotation to the map + itself, or to the user interface. For instance, the map itself may be + rotated such that "up" matches the user's aircraft, but you may want to + draw a text label such that it is always rotated zero degrees relative to + the user's perspective. In that case, you would have it draw with UI + orientation. + } +TYPE + XPLMMapOrientation = ( + { Orient such that a 0 degree rotation matches the map's north } + xplm_MapOrientation_Map = 0 + + { Orient such that a 0 degree rotation is "up" relative to the user interface} + ,xplm_MapOrientation_UI = 1 + + ); + PXPLMMapOrientation = ^XPLMMapOrientation; + + { + XPLMDrawMapIconFromSheet + + Enables plugin-created map layers to draw PNG icons using X-Plane's + built-in icon drawing functionality. Only valid from within an + XPLMIconDrawingCallback_t (but you can request an arbitrary number of icons + to be drawn from within your callback). + + X-Plane will automatically manage the memory for your texture so that it + only has to be loaded from disk once as long as you continue drawing it + per-frame. (When you stop drawing it, the memory may purged in a "garbage + collection" pass, require a load from disk in the future.) + + Instead of having X-Plane draw a full PNG, this method allows you to use UV + coordinates to request a portion of the image to be drawn. This allows you + to use a single texture load (of an icon sheet, for example) to draw many + icons. Doing so is much more efficient than drawing a dozen different small + PNGs. + + The UV coordinates used here treat the texture you load as being comprised + of a number of identically sized "cells." You specify the width and height + in cells (ds and dt, respectively), as well as the coordinates within the + cell grid for the sub-image you'd like to draw. + + Note that you can use different ds and dt values in subsequent calls with + the same texture sheet. This enables you to use icons of different sizes in + the same sheet if you arrange them properly in the PNG. + + This function is only valid from within an XPLMIconDrawingCallback_t (but + you can request an arbitrary number of icons to be drawn from within your + callback). + } + PROCEDURE XPLMDrawMapIconFromSheet( + layer : XPLMMapLayerID; + inPngPath : XPLMString; + s : Integer; + t : Integer; + ds : Integer; + dt : Integer; + mapX : Single; + mapY : Single; + orientation : XPLMMapOrientation; + rotationDegrees : Single; + mapWidth : Single); + cdecl; external XPLM_DLL; + + { + XPLMDrawMapLabel + + Enables plugin-created map layers to draw text labels using X-Plane's + built-in labeling functionality. Only valid from within an + XPLMMapLabelDrawingCallback_f (but you can request an arbitrary number of + text labels to be drawn from within your callback). + } + PROCEDURE XPLMDrawMapLabel( + layer : XPLMMapLayerID; + inText : XPLMString; + mapX : Single; + mapY : Single; + orientation : XPLMMapOrientation; + rotationDegrees : Single); + cdecl; external XPLM_DLL; + +{$ENDIF XPLM300} +{$IFDEF XPLM300} +{___________________________________________________________________________ + * MAP PROJECTIONS + ___________________________________________________________________________} +{ + As of X-Plane 11, the map draws using true cartographic projections, and + different maps may use different projections. Thus, to draw at a particular + latitude and longitude, you must first transform your real-world + coordinates into map coordinates. + + The map projection is also responsible for giving you the current scale of + the map. That is, the projection can tell you how many map units correspond + to 1 meter at a given point. + + Finally, the map projection can give you the current rotation of the map. + Since X-Plane 11 maps can rotate to match the heading of the aircraft, the + map's rotation can potentially change every frame. +} + + + { + XPLMMapProject + + Projects a latitude/longitude into map coordinates. This is the inverse of + XPLMMapUnproject(). + + Only valid from within a map layer callback (one of + XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, + XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) + } + PROCEDURE XPLMMapProject( + projection : XPLMMapProjectionID; + latitude : Real; + longitude : Real; + outX : PSingle; + outY : PSingle); + cdecl; external XPLM_DLL; + + { + XPLMMapUnproject + + Transforms map coordinates back into a latitude and longitude. This is the + inverse of XPLMMapProject(). + + Only valid from within a map layer callback (one of + XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, + XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) + } + PROCEDURE XPLMMapUnproject( + projection : XPLMMapProjectionID; + mapX : Single; + mapY : Single; + outLatitude : PReal; + outLongitude : PReal); + cdecl; external XPLM_DLL; + + { + XPLMMapScaleMeter + + Returns the number of map units that correspond to a distance of one meter + at a given set of map coordinates. + + Only valid from within a map layer callback (one of + XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, + XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) + } + FUNCTION XPLMMapScaleMeter( + projection : XPLMMapProjectionID; + mapX : Single; + mapY : Single) : Single; + cdecl; external XPLM_DLL; + + { + XPLMMapGetNorthHeading + + Returns the heading (in degrees clockwise from "up") that corresponds to + north at a given point on the map. In other words, if your runway has a + true heading of 360, you would use "north" as the Cartesian angle at which + to draw the runway on the map. (You would add the result of + XPLMMapGetNorthHeading() to your true heading to get the map angle.) + + This is necessary becuase X-Plane's map can be rotated to match your + aircraft's orientation; north is not always "up." + + Only valid from within a map layer callback (one of + XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, + XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) + } + FUNCTION XPLMMapGetNorthHeading( + projection : XPLMMapProjectionID; + mapX : Single; + mapY : Single) : Single; + cdecl; external XPLM_DLL; + +{$ENDIF XPLM300} + +IMPLEMENTATION + +END. diff --git a/src/SDK/Delphi/XPLM/XPLMMenus.pas b/src/SDK/Delphi/XPLM/XPLMMenus.pas new file mode 100755 index 00000000..754a4347 --- /dev/null +++ b/src/SDK/Delphi/XPLM/XPLMMenus.pas @@ -0,0 +1,277 @@ +{ + Copyright 2005-2012 Sandy Barbour and Ben Supnik All rights reserved. See + license.txt for usage. X-Plane SDK Version: 2.1.1 +} + +UNIT XPLMMenus; +INTERFACE +{ + Plug-ins can create menus in the menu bar of X-Plane. This is done by + creating a menu and then creating items. Menus are referred to by an + opaque ID. Items are referred to by (zero-based) index number. + + Menus are "sandboxed" between plugins---no plugin can access the menus of + any other plugin. Furthermore, all menu indices are relative to your + plugin's menus only; if your plugin creates two sub-menus in the Plugins + menu at different times, it doesn't matter how many other plugins also + create sub-menus of Plugins in the intervening time: your sub-menus will be + given menu indices 0 and 1. (The SDK does some work in the back-end to + filter out menus that are irrelevant to your plugin in order to deliver + this consistency for each plugin.) + + When you create a menu item, you specify how we should handle clicks on + that menu item. You can either have the XPLM trigger a callback (the + XPLMMenuHandler_f associated with the menu that contains the item), or you + can simply have a command be triggered (with no associated call to your + menu handler). The advantage of the latter method is that X-Plane will + display any keyboard shortcuts associated with the command. (In contrast, + there are no keyboard shortcuts associated with menu handler callbacks with + specific parameters.) + + Menu text in X-Plane is UTF8; X-Plane's character set covers latin, greek + and cyrillic characters, Katakana, as well as some Japanese symbols. Some + APIs have a inDeprecatedAndIgnored parameter that used to select a + character set; since X-Plane 9 all localization is done via UTF-8 only. +} + +USES + XPLMDefs, XPLMUtilities; + {$A4} +{___________________________________________________________________________ + * XPLM MENUS + ___________________________________________________________________________} + + { + XPLMMenuCheck + + These enumerations define the various 'check' states for an X-Plane menu. + 'checking' in X-Plane actually appears as a light which may or may not be + lit. So there are three possible states. + } +TYPE + XPLMMenuCheck = ( + { there is no symbol to the left of the menu item. } + xplm_Menu_NoCheck = 0 + + { the menu has a mark next to it that is unmarked (not lit). } + ,xplm_Menu_Unchecked = 1 + + { the menu has a mark next to it that is checked (lit). } + ,xplm_Menu_Checked = 2 + + ); + PXPLMMenuCheck = ^XPLMMenuCheck; + + { + XPLMMenuID + + This is a unique ID for each menu you create. + } + XPLMMenuID = pointer; + PXPLMMenuID = ^XPLMMenuID; + + { + XPLMMenuHandler_f + + A menu handler function takes two reference pointers, one for the menu + (specified when the menu was created) and one for the item (specified when + the item was created). + } + XPLMMenuHandler_f = PROCEDURE( + inMenuRef : pointer; + inItemRef : pointer); cdecl; + + { + XPLMFindPluginsMenu + + This function returns the ID of the plug-ins menu, which is created for you + at startup. + } + FUNCTION XPLMFindPluginsMenu: XPLMMenuID; + cdecl; external XPLM_DLL; + +{$IFDEF XPLM300} + { + XPLMFindAircraftMenu + + This function returns the ID of the menu for the currently-loaded aircraft, + used for showing aircraft-specific commands. + + The aircraft menu is created by X-Plane at startup, but it remains hidden + until it is populated via XPLMAppendMenuItem() or + XPLMAppendMenuItemWithCommand(). + + Only plugins loaded with the user's current aircraft are allowed to access + the aircraft menu. For all other plugins, this will return NULL, and any + attempts to add menu items to it will fail. + } + FUNCTION XPLMFindAircraftMenu: XPLMMenuID; + cdecl; external XPLM_DLL; +{$ENDIF XPLM300} + + { + XPLMCreateMenu + + This function creates a new menu and returns its ID. It returns NULL if + the menu cannot be created. Pass in a parent menu ID and an item index to + create a submenu, or NULL for the parent menu to put the menu in the menu + bar. The menu's name is only used if the menu is in the menubar. You also + pass a handler function and a menu reference value. Pass NULL for the + handler if you do not need callbacks from the menu (for example, if it only + contains submenus). + + Important: you must pass a valid, non-empty menu title even if the menu is + a submenu where the title is not visible. + } + FUNCTION XPLMCreateMenu( + inName : XPLMString; + inParentMenu : XPLMMenuID; + inParentItem : Integer; + inHandler : XPLMMenuHandler_f; + inMenuRef : pointer) : XPLMMenuID; + cdecl; external XPLM_DLL; + + { + XPLMDestroyMenu + + This function destroys a menu that you have created. Use this to remove a + submenu if necessary. (Normally this function will not be necessary.) + } + PROCEDURE XPLMDestroyMenu( + inMenuID : XPLMMenuID); + cdecl; external XPLM_DLL; + + { + XPLMClearAllMenuItems + + This function removes all menu items from a menu, allowing you to rebuild + it. Use this function if you need to change the number of items on a menu. + } + PROCEDURE XPLMClearAllMenuItems( + inMenuID : XPLMMenuID); + cdecl; external XPLM_DLL; + + { + XPLMAppendMenuItem + + This routine appends a new menu item to the bottom of a menu and returns + its index. Pass in the menu to add the item to, the items name, and a void + * ref for this item. + + Returns a negative index if the append failed (due to an invalid parent + menu argument). + + Note that all menu indices returned are relative to your plugin's menus + only; if your plugin creates two sub-menus in the Plugins menu at different + times, it doesn't matter how many other plugins also create sub-menus of + Plugins in the intervening time: your sub-menus will be given menu indices + 0 and 1. (The SDK does some work in the back-end to filter out menus that + are irrelevant to your plugin in order to deliver this consistency for each + plugin.) + } + FUNCTION XPLMAppendMenuItem( + inMenu : XPLMMenuID; + inItemName : XPLMString; + inItemRef : pointer; + inDeprecatedAndIgnored: Integer) : Integer; + cdecl; external XPLM_DLL; + +{$IFDEF XPLM300} + { + XPLMAppendMenuItemWithCommand + + Like XPLMAppendMenuItem(), but instead of the new menu item triggering the + XPLMMenuHandler_f of the containiner menu, it will simply execute the + command you pass in. Using a command for your menu item allows the user to + bind a keyboard shortcut to the command and see that shortcut represented + in the menu. + + Returns a negative index if the append failed (due to an invalid parent + menu argument). + + Like XPLMAppendMenuItem(), all menu indices are relative to your plugin's + menus only. + } + FUNCTION XPLMAppendMenuItemWithCommand( + inMenu : XPLMMenuID; + inItemName : XPLMString; + inCommandToExecute : XPLMCommandRef) : Integer; + cdecl; external XPLM_DLL; +{$ENDIF XPLM300} + + { + XPLMAppendMenuSeparator + + This routine adds a separator to the end of a menu. + + Returns a negative index if the append failed (due to an invalid parent + menu argument). + } + PROCEDURE XPLMAppendMenuSeparator( + inMenu : XPLMMenuID); + cdecl; external XPLM_DLL; + + { + XPLMSetMenuItemName + + This routine changes the name of an existing menu item. Pass in the menu + ID and the index of the menu item. + } + PROCEDURE XPLMSetMenuItemName( + inMenu : XPLMMenuID; + inIndex : Integer; + inItemName : XPLMString; + inDeprecatedAndIgnored: Integer); + cdecl; external XPLM_DLL; + + { + XPLMCheckMenuItem + + Set whether a menu item is checked. Pass in the menu ID and item index. + } + PROCEDURE XPLMCheckMenuItem( + inMenu : XPLMMenuID; + index : Integer; + inCheck : XPLMMenuCheck); + cdecl; external XPLM_DLL; + + { + XPLMCheckMenuItemState + + This routine returns whether a menu item is checked or not. A menu item's + check mark may be on or off, or a menu may not have an icon at all. + } + PROCEDURE XPLMCheckMenuItemState( + inMenu : XPLMMenuID; + index : Integer; + outCheck : PXPLMMenuCheck); + cdecl; external XPLM_DLL; + + { + XPLMEnableMenuItem + + Sets whether this menu item is enabled. Items start out enabled. + } + PROCEDURE XPLMEnableMenuItem( + inMenu : XPLMMenuID; + index : Integer; + enabled : Integer); + cdecl; external XPLM_DLL; + +{$IFDEF XPLM210} + { + XPLMRemoveMenuItem + + Removes one item from a menu. Note that all menu items below are moved up + one; your plugin must track the change in index numbers. + } + PROCEDURE XPLMRemoveMenuItem( + inMenu : XPLMMenuID; + inIndex : Integer); + cdecl; external XPLM_DLL; +{$ENDIF XPLM210} + + +IMPLEMENTATION + +END. diff --git a/src/SDK/Delphi/XPLM/XPLMNavigation.pas b/src/SDK/Delphi/XPLM/XPLMNavigation.pas new file mode 100755 index 00000000..044b99b5 --- /dev/null +++ b/src/SDK/Delphi/XPLM/XPLMNavigation.pas @@ -0,0 +1,350 @@ +{ + Copyright 2005-2012 Sandy Barbour and Ben Supnik All rights reserved. See + license.txt for usage. X-Plane SDK Version: 2.1.1 +} + +UNIT XPLMNavigation; +INTERFACE +{ + The XPLM Navigation APIs give you some access to the navigation databases + inside X-Plane. X-Plane stores all navigation information in RAM, so by + using these APIs you can gain access to most information without having to + go to disk or parse the files yourself. + + You can also use this API to program the FMS. You must use the navigation + APIs to find the nav-aids you want to program into the FMS, since the FMS + is powered internally by X-Plane's navigation database. +} + +USES + XPLMDefs; + {$A4} +{___________________________________________________________________________ + * NAVIGATION DATABASE ACCESS + ___________________________________________________________________________} + + { + XPLMNavType + + These enumerations define the different types of navaids. They are each + defined with a separate bit so that they may be bit-wise added together to + form sets of nav-aid types. + + NOTE: xplm_Nav_LatLon is a specific lat-lon coordinate entered into the + FMS. It will not exist in the database, and cannot be programmed into the + FMS. Querying the FMS for navaids will return it. Use + XPLMSetFMSEntryLatLon to set a lat/lon waypoint. + } +TYPE + XPLMNavType = ( + xplm_Nav_Unknown = 0 + + ,xplm_Nav_Airport = 1 + + ,xplm_Nav_NDB = 2 + + ,xplm_Nav_VOR = 4 + + ,xplm_Nav_ILS = 8 + + ,xplm_Nav_Localizer = 16 + + ,xplm_Nav_GlideSlope = 32 + + ,xplm_Nav_OuterMarker = 64 + + ,xplm_Nav_MiddleMarker = 128 + + ,xplm_Nav_InnerMarker = 256 + + ,xplm_Nav_Fix = 512 + + ,xplm_Nav_DME = 1024 + + ,xplm_Nav_LatLon = 2048 + + ); + PXPLMNavType = ^XPLMNavType; + + { + XPLMNavRef + + XPLMNavRef is an iterator into the navigation database. The navigation + database is essentially an array, but it is not necessarily densely + populated. The only assumption you can safely make is that like-typed + nav-aids are grouped together. + + Use XPLMNavRef to refer to a nav-aid. + + XPLM_NAV_NOT_FOUND is returned by functions that return an XPLMNavRef when + the iterator must be invalid. + } + XPLMNavRef = Integer; + PXPLMNavRef = ^XPLMNavRef; + +CONST + XPLM_NAV_NOT_FOUND = -1; + + { + XPLMGetFirstNavAid + + This returns the very first navaid in the database. Use this to traverse + the entire database. Returns XPLM_NAV_NOT_FOUND if the nav database is + empty. + } + FUNCTION XPLMGetFirstNavAid: XPLMNavRef; + cdecl; external XPLM_DLL; + + { + XPLMGetNextNavAid + + Given a valid nav aid ref, this routine returns the next navaid. It + returns XPLM_NAV_NOT_FOUND if the nav aid passed in was invalid or if the + navaid passed in was the last one in the database. Use this routine to + iterate across all like-typed navaids or the entire database. + } + FUNCTION XPLMGetNextNavAid( + inNavAidRef : XPLMNavRef) : XPLMNavRef; + cdecl; external XPLM_DLL; + + { + XPLMFindFirstNavAidOfType + + This routine returns the ref of the first navaid of the given type in the + database or XPLM_NAV_NOT_FOUND if there are no navaids of that type in the + database. You must pass exactly one nav aid type to this routine. + } + FUNCTION XPLMFindFirstNavAidOfType( + inType : XPLMNavType) : XPLMNavRef; + cdecl; external XPLM_DLL; + + { + XPLMFindLastNavAidOfType + + This routine returns the ref of the last navaid of the given type in the + database or XPLM_NAV_NOT_FOUND if there are no navaids of that type in the + database. You must pass exactly one nav aid type to this routine. + } + FUNCTION XPLMFindLastNavAidOfType( + inType : XPLMNavType) : XPLMNavRef; + cdecl; external XPLM_DLL; + + { + XPLMFindNavAid + + This routine provides a number of searching capabilities for the nav + database. XPLMFindNavAid will search through every nav aid whose type is + within inType (multiple types may be added together) and return any + nav-aids found based on the following rules: + + * If inLat and inLon are not NULL, the navaid nearest to that lat/lon will + be returned, otherwise the last navaid found will be returned. + + * If inFrequency is not NULL, then any navaids considered must match this + frequency. Note that this will screen out radio beacons that do not have + frequency data published (like inner markers) but not fixes and airports. + + * If inNameFragment is not NULL, only navaids that contain the fragment in + their name will be returned. + + * If inIDFragment is not NULL, only navaids that contain the fragment in + their IDs will be returned. + + This routine provides a simple way to do a number of useful searches: + * Find the nearest navaid on this frequency. + * Find the nearest airport. + * Find the VOR whose ID is "KBOS". + * Find the nearest airport whose name contains "Chicago". + } + FUNCTION XPLMFindNavAid( + inNameFragment : XPLMString; { Can be nil } + inIDFragment : XPLMString; { Can be nil } + inLat : PSingle; { Can be nil } + inLon : PSingle; { Can be nil } + inFrequency : PInteger; { Can be nil } + inType : XPLMNavType) : XPLMNavRef; + cdecl; external XPLM_DLL; + + { + XPLMGetNavAidInfo + + This routine returns information about a navaid. Any non-null field is + filled out with information if it is available. + + Frequencies are in the nav.dat convention as described in the X-Plane nav + database FAQ: NDB frequencies are exact, all others are multiplied by 100. + + The buffer for IDs should be at least 6 chars and the buffer for names + should be at least 41 chars, but since these values are likely to go up, I + recommend passing at least 32 chars for IDs and 256 chars for names when + possible. + + The outReg parameter tells if the navaid is within the local "region" of + loaded DSFs. (This information may not be particularly useful to plugins.) + The parameter is a single byte value 1 for true or 0 for false, not a C + string. + } + PROCEDURE XPLMGetNavAidInfo( + inRef : XPLMNavRef; + outType : PXPLMNavType; { Can be nil } + outLatitude : PSingle; { Can be nil } + outLongitude : PSingle; { Can be nil } + outHeight : PSingle; { Can be nil } + outFrequency : PInteger; { Can be nil } + outHeading : PSingle; { Can be nil } + outID : XPLMString; { Can be nil } + outName : XPLMString; { Can be nil } + outReg : XPLMString); { Can be nil } + cdecl; external XPLM_DLL; + +{___________________________________________________________________________ + * FLIGHT MANAGEMENT COMPUTER + ___________________________________________________________________________} +{ + Note: the FMS works based on an array of entries. Indices into the array + are zero-based. Each entry is a nav-aid plus an altitude. The FMS tracks + the currently displayed entry and the entry that it is flying to. + + The FMS must be programmed with contiguous entries, so clearing an entry at + the end shortens the effective flight plan. There is a max of 100 + waypoints in the flight plan. +} + + + { + XPLMCountFMSEntries + + This routine returns the number of entries in the FMS. + } + FUNCTION XPLMCountFMSEntries: Integer; + cdecl; external XPLM_DLL; + + { + XPLMGetDisplayedFMSEntry + + This routine returns the index of the entry the pilot is viewing. + } + FUNCTION XPLMGetDisplayedFMSEntry: Integer; + cdecl; external XPLM_DLL; + + { + XPLMGetDestinationFMSEntry + + This routine returns the index of the entry the FMS is flying to. + } + FUNCTION XPLMGetDestinationFMSEntry: Integer; + cdecl; external XPLM_DLL; + + { + XPLMSetDisplayedFMSEntry + + This routine changes which entry the FMS is showing to the index specified. + } + PROCEDURE XPLMSetDisplayedFMSEntry( + inIndex : Integer); + cdecl; external XPLM_DLL; + + { + XPLMSetDestinationFMSEntry + + This routine changes which entry the FMS is flying the aircraft toward. + } + PROCEDURE XPLMSetDestinationFMSEntry( + inIndex : Integer); + cdecl; external XPLM_DLL; + + { + XPLMGetFMSEntryInfo + + This routine returns information about a given FMS entry. If the entry is + an airport or navaid, a reference to a nav entry can be returned allowing + you to find additional information (such as a frequency, ILS heading, name, + etc.). Note that this reference can be XPLM_NAV_NOT_FOUND until the + information has been looked up asynchronously, so after flightplan changes, + it might take up to a second for this field to become populated. The other + information is available immediately. For a lat/lon entry, the lat/lon is + returned by this routine but the navaid cannot be looked up (and the + reference will be XPLM_NAV_NOT_FOUND). FMS name entry buffers should be at + least 256 chars in length. + + WARNING: Due to a bug in X-Plane prior to 11.31, the navaid reference will + not be set to XPLM_NAV_NOT_FOUND while no data is available, and instead + just remain the value of the variable that you passed the pointer to. + Therefore, always initialize the variable to XPLM_NAV_NOT_FOUND before + passing the pointer to this function. + } + PROCEDURE XPLMGetFMSEntryInfo( + inIndex : Integer; + outType : PXPLMNavType; { Can be nil } + outID : XPLMString; { Can be nil } + outRef : PXPLMNavRef; { Can be nil } + outAltitude : PInteger; { Can be nil } + outLat : PSingle; { Can be nil } + outLon : PSingle); { Can be nil } + cdecl; external XPLM_DLL; + + { + XPLMSetFMSEntryInfo + + This routine changes an entry in the FMS to have the destination navaid + passed in and the altitude specified. Use this only for airports, fixes, + and radio-beacon navaids. Currently of radio beacons, the FMS can only + support VORs and NDBs. Use the routines below to clear or fly to a lat/lon. + } + PROCEDURE XPLMSetFMSEntryInfo( + inIndex : Integer; + inRef : XPLMNavRef; + inAltitude : Integer); + cdecl; external XPLM_DLL; + + { + XPLMSetFMSEntryLatLon + + This routine changes the entry in the FMS to a lat/lon entry with the given + coordinates. + } + PROCEDURE XPLMSetFMSEntryLatLon( + inIndex : Integer; + inLat : Single; + inLon : Single; + inAltitude : Integer); + cdecl; external XPLM_DLL; + + { + XPLMClearFMSEntry + + This routine clears the given entry, potentially shortening the flight + plan. + } + PROCEDURE XPLMClearFMSEntry( + inIndex : Integer); + cdecl; external XPLM_DLL; + +{___________________________________________________________________________ + * GPS RECEIVER + ___________________________________________________________________________} +{ + These APIs let you read data from the GPS unit. +} + + { + XPLMGetGPSDestinationType + + This routine returns the type of the currently selected GPS destination, + one of fix, airport, VOR or NDB. + } + FUNCTION XPLMGetGPSDestinationType: XPLMNavType; + cdecl; external XPLM_DLL; + + { + XPLMGetGPSDestination + + This routine returns the current GPS destination. + } + FUNCTION XPLMGetGPSDestination: XPLMNavRef; + cdecl; external XPLM_DLL; + + +IMPLEMENTATION + +END. diff --git a/src/SDK/Delphi/XPLM/XPLMPlanes.pas b/src/SDK/Delphi/XPLM/XPLMPlanes.pas new file mode 100755 index 00000000..3801f0ac --- /dev/null +++ b/src/SDK/Delphi/XPLM/XPLMPlanes.pas @@ -0,0 +1,278 @@ +{ + Copyright 2005-2012 Sandy Barbour and Ben Supnik All rights reserved. See + license.txt for usage. X-Plane SDK Version: 2.1.1 +} + +UNIT XPLMPlanes; +INTERFACE +{ + The XPLMPlanes APIs allow you to control the various aircraft in X-Plane, + both the user's and the sim's. + + *Note*: unlike almost all other APIs in the SDK, aircraft paths are _full_ + file system paths for historical reasons. You'll need to prefix all + relative paths with the X-Plane path as accessed via XPLMGetSystemPath. +} + +USES + XPLMDefs; + {$A4} +{___________________________________________________________________________ + * USER AIRCRAFT ACCESS + ___________________________________________________________________________} + + { + XPLMSetUsersAircraft + + This routine changes the user's aircraft. Note that this will reinitialize + the user to be on the nearest airport's first runway. Pass in a full path + (hard drive and everything including the .acf extension) to the .acf file. + } + PROCEDURE XPLMSetUsersAircraft( + inAircraftPath : XPLMString); + cdecl; external XPLM_DLL; + { + XPLMPlaceUserAtAirport + + This routine places the user at a given airport. Specify the airport by + its X-Plane airport ID (e.g. 'KBOS'). + } + PROCEDURE XPLMPlaceUserAtAirport( + inAirportCode : XPLMString); + cdecl; external XPLM_DLL; +{$IFDEF XPLM300} + { + XPLMPlaceUserAtLocation + + Places the user at a specific location after performing any necessary + scenery loads. + + As with in-air starts initiated from the X-Plane user interface, the + aircraft will always start with its engines running, regardless of the + user's preferences (i.e., regardless of what the dataref + `sim/operation/prefs/startup_running` says). + } + PROCEDURE XPLMPlaceUserAtLocation( + latitudeDegrees : Real; + longitudeDegrees : Real; + elevationMetersMSL : Single; + headingDegreesTrue : Single; + speedMetersPerSecond: Single); + cdecl; external XPLM_DLL; +{$ENDIF XPLM300} +{___________________________________________________________________________ + * GLOBAL AIRCRAFT ACCESS + ___________________________________________________________________________} + +CONST + { The user's aircraft is always index 0. } + XPLM_USER_AIRCRAFT = 0; +{$IFDEF XPLM_DEPRECATED} + { + XPLMPlaneDrawState_t + + This structure contains additional plane parameter info to be passed to + draw plane. Make sure to fill in the size of the structure field with + sizeof(XPLMDrawPlaneState_t) so that the XPLM can tell how many fields you + knew about when compiling your plugin (since more fields may be added + later). + + Most of these fields are ratios from 0 to 1 for control input. X-Plane + calculates what the actual controls look like based on the .acf file for + that airplane. Note for the yoke inputs, this is what the pilot of the + plane has commanded (post artificial stability system if there were one) + and affects aelerons, rudder, etc. It is not necessarily related to the + actual position of the plane! + } +TYPE + XPLMPlaneDrawState_t = RECORD + { The size of the draw state struct. } + structSize : Integer; + { A ratio from [0..1] describing how far the landing gear is extended. } + gearPosition : Single; + { Ratio of flap deployment, 0 = up, 1 = full deploy. } + flapRatio : Single; + { Ratio of spoiler deployment, 0 = none, 1 = full deploy. } + spoilerRatio : Single; + { Ratio of speed brake deployment, 0 = none, 1 = full deploy. } + speedBrakeRatio : Single; + { Ratio of slat deployment, 0 = none, 1 = full deploy. } + slatRatio : Single; + { Wing sweep ratio, 0 = forward, 1 = swept. } + wingSweep : Single; + { Thrust power, 0 = none, 1 = full fwd, -1 = full reverse. } + thrust : Single; + { Total pitch input for this plane. } + yokePitch : Single; + { Total Heading input for this plane. } + yokeHeading : Single; + { Total Roll input for this plane. } + yokeRoll : Single; + END; + PXPLMPlaneDrawState_t = ^XPLMPlaneDrawState_t; +{$ENDIF XPLM_DEPRECATED} + { + XPLMCountAircraft + + This function returns the number of aircraft X-Plane is capable of having, + as well as the number of aircraft that are currently active. These numbers + count the user's aircraft. It can also return the plugin that is currently + controlling aircraft. In X-Plane 7, this routine reflects the number of + aircraft the user has enabled in the rendering options window. + } + PROCEDURE XPLMCountAircraft( + outTotalAircraft : PInteger; + outActiveAircraft : PInteger; + outController : PXPLMPluginID); + cdecl; external XPLM_DLL; + { + XPLMGetNthAircraftModel + + This function returns the aircraft model for the Nth aircraft. Indices are + zero based, with zero being the user's aircraft. The file name should be + at least 256 chars in length; the path should be at least 512 chars in + length. + } + PROCEDURE XPLMGetNthAircraftModel( + inIndex : Integer; + outFileName : XPLMString; + outPath : XPLMString); + cdecl; external XPLM_DLL; +{___________________________________________________________________________ + * EXCLUSIVE AIRCRAFT ACCESS + ___________________________________________________________________________} +{ + The following routines require exclusive access to the airplane APIs. Only + one plugin may have this access at a time. +} + + + { + XPLMPlanesAvailable_f + + Your airplanes available callback is called when another plugin gives up + access to the multiplayer planes. Use this to wait for access to + multiplayer. + } +TYPE + XPLMPlanesAvailable_f = PROCEDURE( + inRefcon : pointer); cdecl; + + { + XPLMAcquirePlanes + + XPLMAcquirePlanes grants your plugin exclusive access to the aircraft. It + returns 1 if you gain access, 0 if you do not. + + inAircraft - pass in an array of pointers to strings specifying the planes + you want loaded. For any plane index you do not want loaded, pass a + 0-length string. Other strings should be full paths with the .acf + extension. NULL terminates this array, or pass NULL if there are no planes + you want loaded. + + If you pass in a callback and do not receive access to the planes your + callback will be called when the airplanes are available. If you do receive + airplane access, your callback will not be called. + } + FUNCTION XPLMAcquirePlanes( + inAircraft : PXPLMString; { Can be nil } + inCallback : XPLMPlanesAvailable_f; + inRefcon : pointer) : Integer; + cdecl; external XPLM_DLL; + + { + XPLMReleasePlanes + + Call this function to release access to the planes. Note that if you are + disabled, access to planes is released for you and you must reacquire it. + } + PROCEDURE XPLMReleasePlanes; + cdecl; external XPLM_DLL; + + { + XPLMSetActiveAircraftCount + + This routine sets the number of active planes. If you pass in a number + higher than the total number of planes availables, only the total number of + planes available is actually used. + } + PROCEDURE XPLMSetActiveAircraftCount( + inCount : Integer); + cdecl; external XPLM_DLL; + + { + XPLMSetAircraftModel + + This routine loads an aircraft model. It may only be called if you have + exclusive access to the airplane APIs. Pass in the path of the model with + the .acf extension. The index is zero based, but you may not pass in 0 + (use XPLMSetUsersAircraft to load the user's aircracft). + } + PROCEDURE XPLMSetAircraftModel( + inIndex : Integer; + inAircraftPath : XPLMString); + cdecl; external XPLM_DLL; + + { + XPLMDisableAIForPlane + + This routine turns off X-Plane's AI for a given plane. The plane will + continue to draw and be a real plane in X-Plane, but will not move itself. + } + PROCEDURE XPLMDisableAIForPlane( + inPlaneIndex : Integer); + cdecl; external XPLM_DLL; + +{$IFDEF XPLM_DEPRECATED} + { + XPLMDrawAircraft + + WARNING: Aircraft drawing via this API is deprecated and will not work in + future versions of X-Plane. Use XPLMInstance for 3-d drawing of custom + aircraft models. + + This routine draws an aircraft. It can only be called from a 3-d drawing + callback. Pass in the position of the plane in OpenGL local coordinates + and the orientation of the plane. A 1 for full drawing indicates that the + whole plane must be drawn; a 0 indicates you only need the nav lights + drawn. (This saves rendering time when planes are far away.) + } + PROCEDURE XPLMDrawAircraft( + inPlaneIndex : Integer; + inX : Single; + inY : Single; + inZ : Single; + inPitch : Single; + inRoll : Single; + inYaw : Single; + inFullDraw : Integer; + inDrawStateInfo : PXPLMPlaneDrawState_t); + cdecl; external XPLM_DLL; +{$ENDIF XPLM_DEPRECATED} + +{$IFDEF XPLM_DEPRECATED} + { + XPLMReinitUsersPlane + + WARNING: DO NOT USE. Use XPLMPlaceUserAtAirport or + XPLMPlaceUserAtLocation. + + This function recomputes the derived flight model data from the aircraft + structure in memory. If you have used the data access layer to modify the + aircraft structure, use this routine to resynchronize X-Plane; since + X-Plane works at least partly from derived values, the sim will not behave + properly until this is called. + + WARNING: this routine does not necessarily place the airplane at the + airport; use XPLMSetUsersAircraft to be compatible. This routine is + provided to do special experimentation with flight models without resetting + flight. + } + PROCEDURE XPLMReinitUsersPlane; + cdecl; external XPLM_DLL; +{$ENDIF XPLM_DEPRECATED} + + +IMPLEMENTATION + +END. diff --git a/src/SDK/Delphi/XPLM/XPLMPlugin.pas b/src/SDK/Delphi/XPLM/XPLMPlugin.pas new file mode 100755 index 00000000..83fbb736 --- /dev/null +++ b/src/SDK/Delphi/XPLM/XPLMPlugin.pas @@ -0,0 +1,413 @@ +{ + Copyright 2005-2012 Sandy Barbour and Ben Supnik All rights reserved. See + license.txt for usage. X-Plane SDK Version: 2.1.1 +} + +UNIT XPLMPlugin; +INTERFACE +{ + These APIs provide facilities to find and work with other plugins and + manage other plugins. +} + +USES + XPLMDefs; + {$A4} +{___________________________________________________________________________ + * FINDING PLUGINS + ___________________________________________________________________________} +{ + These APIs allow you to find another plugin or yourself, or iterate across + all plugins. For example, if you wrote an FMS plugin that needed to talk + to an autopilot plugin, you could use these APIs to locate the autopilot + plugin. +} + + + { + XPLMGetMyID + + This routine returns the plugin ID of the calling plug-in. Call this to + get your own ID. + } + FUNCTION XPLMGetMyID: XPLMPluginID; + cdecl; external XPLM_DLL; + + { + XPLMCountPlugins + + This routine returns the total number of plug-ins that are loaded, both + disabled and enabled. + } + FUNCTION XPLMCountPlugins: Integer; + cdecl; external XPLM_DLL; + + { + XPLMGetNthPlugin + + This routine returns the ID of a plug-in by index. Index is 0 based from 0 + to XPLMCountPlugins-1, inclusive. Plugins may be returned in any arbitrary + order. + } + FUNCTION XPLMGetNthPlugin( + inIndex : Integer) : XPLMPluginID; + cdecl; external XPLM_DLL; + + { + XPLMFindPluginByPath + + This routine returns the plug-in ID of the plug-in whose file exists at the + passed in absolute file system path. XPLM_NO_PLUGIN_ID is returned if the + path does not point to a currently loaded plug-in. + } + FUNCTION XPLMFindPluginByPath( + inPath : XPLMString) : XPLMPluginID; + cdecl; external XPLM_DLL; + + { + XPLMFindPluginBySignature + + This routine returns the plug-in ID of the plug-in whose signature matches + what is passed in or XPLM_NO_PLUGIN_ID if no running plug-in has this + signature. Signatures are the best way to identify another plug-in as they + are independent of the file system path of a plug-in or the human-readable + plug-in name, and should be unique for all plug-ins. Use this routine to + locate another plugin that your plugin interoperates with + } + FUNCTION XPLMFindPluginBySignature( + inSignature : XPLMString) : XPLMPluginID; + cdecl; external XPLM_DLL; + + { + XPLMGetPluginInfo + + This routine returns information about a plug-in. Each parameter should be + a pointer to a buffer of at least + 256 characters, or NULL to not receive the information. + + outName - the human-readable name of the plug-in. outFilePath - the + absolute file path to the file that contains this plug-in. outSignature - a + unique string that identifies this plug-in. outDescription - a + human-readable description of this plug-in. + } + PROCEDURE XPLMGetPluginInfo( + inPlugin : XPLMPluginID; + outName : XPLMString; { Can be nil } + outFilePath : XPLMString; { Can be nil } + outSignature : XPLMString; { Can be nil } + outDescription : XPLMString); { Can be nil } + cdecl; external XPLM_DLL; + +{___________________________________________________________________________ + * ENABLING/DISABLING PLUG-INS + ___________________________________________________________________________} +{ + These routines are used to work with plug-ins and manage them. Most + plugins will not need to use these APIs. +} + + + { + XPLMIsPluginEnabled + + Returns whether the specified plug-in is enabled for running. + } + FUNCTION XPLMIsPluginEnabled( + inPluginID : XPLMPluginID) : Integer; + cdecl; external XPLM_DLL; + + { + XPLMEnablePlugin + + This routine enables a plug-in if it is not already enabled. It returns 1 + if the plugin was enabled or successfully enables itself, 0 if it does not. + Plugins may fail to enable (for example, if resources cannot be acquired) + by returning 0 from their XPluginEnable callback. + } + FUNCTION XPLMEnablePlugin( + inPluginID : XPLMPluginID) : Integer; + cdecl; external XPLM_DLL; + + { + XPLMDisablePlugin + + This routine disableds an enabled plug-in. + } + PROCEDURE XPLMDisablePlugin( + inPluginID : XPLMPluginID); + cdecl; external XPLM_DLL; + + { + XPLMReloadPlugins + + This routine reloads all plug-ins. Once this routine is called and you + return from the callback you were within (e.g. a menu select callback) you + will receive your XPluginDisable and XPluginStop callbacks and your DLL + will be unloaded, then the start process happens as if the sim was starting + up. + } + PROCEDURE XPLMReloadPlugins; + cdecl; external XPLM_DLL; + +{___________________________________________________________________________ + * INTERPLUGIN MESSAGING + ___________________________________________________________________________} +{ + Plugin messages are defined as 32-bit integers. Messages below 0x00FFFFFF + are reserved for X-Plane and the plugin SDK. + + Messages come with a pointer parameter; the meaning of this pointer depends + on the message itself. In some messages, the pointer parameter contains an + actual typed pointer to data that can be inspected in the plugin; in these + cases the documentation will state that the parameter "points to" + information. + + in other cases, the value of the pointer is actually an integral number + stuffed into the pointer's storage. In these second cases, the pointer + parameter needs to be cast, not dereferenced. In these caess, the + documentation will state that the parameter "contains" a value, which will + always be an integral type. + + Some messages don't use the pointer parameter - in this case your plugin + should ignore it. + + Messages have two conceptual uses: notifications and commands. Commands + are sent from one plugin to another to induce behavior; notifications are + sent from one plugin to all others for informational purposes. It is + important that commands and notifications not have the same values because + this could cause a notification sent by one plugin to accidentally induce a + command in another. + + By convention, plugin-defined notifications should have the high bit set + (e.g. be greater or equal to unsigned 0x8000000) while commands should have + this bit be cleared. + + The following messages are sent to your plugin by X-Plane. +} + + +CONST + { This message is sent to your plugin whenever the user's plane crashes. The } + { parameter is ignored. } + XPLM_MSG_PLANE_CRASHED = 101; + + { This message is sent to your plugin whenever a new plane is loaded. The } + { parameter contains the index number of the plane being loaded; 0 indicates } + { the user's plane. } + XPLM_MSG_PLANE_LOADED = 102; + + { This messages is sent whenever the user's plane is positioned at a new } + { airport. The parameter is ignored. } + XPLM_MSG_AIRPORT_LOADED = 103; + + { This message is sent whenever new scenery is loaded. Use datarefs to } + { determine the new scenery files that were loaded. The parameter is ignored.} + XPLM_MSG_SCENERY_LOADED = 104; + + { This message is sent whenever the user adjusts the number of X-Plane } + { aircraft models. You must use XPLMCountPlanes to find out how many planes } + { are now available. This message will only be sent in XP7 and higher } + { because in XP6 the number of aircraft is not user-adjustable. The parameter} + { is ignored. } + XPLM_MSG_AIRPLANE_COUNT_CHANGED = 105; + +{$IFDEF XPLM200} +CONST + { This message is sent to your plugin whenever a plane is unloaded. The } + { parameter contains the index number of the plane being unloaded; 0 } + { indicates the user's plane. The parameter is of type int, passed as the } + { value of the pointer. (That is: the parameter is an int, not a pointer to } + { an int.) } + XPLM_MSG_PLANE_UNLOADED = 106; +{$ENDIF XPLM200} + +{$IFDEF XPLM210} +CONST + { This message is sent to your plugin right before X-Plane writes its } + { preferences file. You can use this for two purposes: to write your own } + { preferences, and to modify any datarefs to influence preferences output. } + { For example, if your plugin temporarily modifies saved preferences, you can} + { put them back to their default values here to avoid having the tweaks be } + { persisted if your plugin is not loaded on the next invocation of X-Plane. } + { The parameter is ignored. } + XPLM_MSG_WILL_WRITE_PREFS = 107; +{$ENDIF XPLM210} + +{$IFDEF XPLM210} + { This message is sent to your plugin right after a livery is loaded for an } + { airplane. You can use this to check the new livery (via datarefs) and } + { react accordingly. The parameter contains the index number of the aircraft} + { whose livery is changing. } + XPLM_MSG_LIVERY_LOADED = 108; +{$ENDIF XPLM210} + +{$IFDEF XPLM301} +CONST + { Sent to your plugin right before X-Plane enters virtual reality mode (at } + { which time any windows that are not positioned in VR mode will no longer be} + { visible to the user). The parameter is unused and should be ignored. } + XPLM_MSG_ENTERED_VR = 109; +{$ENDIF XPLM301} + +{$IFDEF XPLM301} + { Sent to your plugin right before X-Plane leaves virtual reality mode (at } + { which time you may want to clean up windows that are positioned in VR } + { mode). The parameter is unused and should be ignored. } + XPLM_MSG_EXITING_VR = 110; +{$ENDIF XPLM301} + +{$IFDEF XPLM303} +CONST + { Sent to your plugin if another plugin wants to take over AI planes. If you } + { are a synthetic traffic provider, that probably means a plugin for an } + { online network has connected and wants to supply aircraft flown by real } + { humans and you should cease to provide synthetic traffic. If however you } + { are providing online traffic from real humans, you probably don't want to } + { disconnect, in which case you just ignore this message. The sender is the } + { plugin ID of the plugin asking for control of the planes now. You can use } + { it to find out who is requesting and whether you should yield to them. } + { Synthetic traffic providers should always yield to online networks. The } + { parameter is unused and should be ignored. } + XPLM_MSG_RELEASE_PLANES = 111; +{$ENDIF XPLM303} + + { + XPLMSendMessageToPlugin + + This function sends a message to another plug-in or X-Plane. Pass + XPLM_NO_PLUGIN_ID to broadcast to all plug-ins. Only enabled plug-ins with + a message receive function receive the message. + } + PROCEDURE XPLMSendMessageToPlugin( + inPlugin : XPLMPluginID; + inMessage : Integer; + inParam : pointer); + cdecl; external XPLM_DLL; + +{$IFDEF XPLM200} +{___________________________________________________________________________ + * Plugin Features API + ___________________________________________________________________________} +{ + The plugin features API allows your plugin to "sign up" for additional + capabilities and plugin system features that are normally disabled for + backward compatibility. This allows advanced plugins to "opt-in" to new + behavior. + + Each feature is defined by a permanent string name. The feature string + names will vary with the particular installation of X-Plane, so plugins + should not expect a feature to be guaranteed present. + + XPLM_WANTS_REFLECTIONS + ---------------------- + + Available in the SDK 2.0 and later for X-Plane 9, enabling this capability + causes your plugin to receive drawing hook callbacks when X-Plane builds + its off-screen reflection and shadow rendering passes. Plugins should + enable this and examine the dataref sim/graphics/view/plane_render_type to + determine whether the drawing callback is for a reflection, shadow + calculation, or the main screen. Rendering can be simlified or omitted for + reflections, and non-solid drawing should be skipped for shadow + calculations. + + **Note**: direct drawing via draw callbacks is not recommended; use the + XPLMInstance API to create object models instead. + + XPLM_USE_NATIVE_PATHS + --------------------- + + available in the SDK 2.1 and later for X-Plane 10, this modifies the plugin + system to use Unix-style paths on all operating systems. With this enabled: + + * OS X paths will match the native OS X Unix. + * Windows will use forward slashes but preserve C:\ or another drive letter + when using complete file paths. + * Linux uses its native file system path scheme. + + Without this enabled: + + * OS X will use CFM file paths separated by a colon. + * Windows will use back-slashes and conventional DOS paths. + * Linux uses its native file system path scheme. + + All plugins should enable this feature on OS X to access the native file + system. + + XPLM_USE_NATIVE_WIDGET_WINDOWS + ------------------------------ + + Available in the SDK 3.0.2 SDK, this capability tells the widgets library + to use new, modern X-Plane backed XPLMDisplay windows to anchor all widget + trees. Without it, widgets will always use legacy windows. + + Plugins should enable this to allow their widget hierarchies to respond to + the user's UI size settings and to map widget-based windwos to a VR HMD. + + Before enabling this, make sure any custom widget code in your plugin is + prepared to cope with the UI coordinate system not being th same as the + OpenGL window coordinate system. +} + + + { + XPLMFeatureEnumerator_f + + You pass an XPLMFeatureEnumerator_f to get a list of all features supported + by a given version running version of X-Plane. This routine is called once + for each feature. + } +TYPE + XPLMFeatureEnumerator_f = PROCEDURE( + inFeature : XPLMString; + inRef : pointer); cdecl; + + { + XPLMHasFeature + + This returns 1 if the given installation of X-Plane supports a feature, or + 0 if it does not. + } + FUNCTION XPLMHasFeature( + inFeature : XPLMString) : Integer; + cdecl; external XPLM_DLL; + + { + XPLMIsFeatureEnabled + + This returns 1 if a feature is currently enabled for your plugin, or 0 if + it is not enabled. It is an error to call this routine with an unsupported + feature. + } + FUNCTION XPLMIsFeatureEnabled( + inFeature : XPLMString) : Integer; + cdecl; external XPLM_DLL; + + { + XPLMEnableFeature + + This routine enables or disables a feature for your plugin. This will + change the running behavior of X-Plane and your plugin in some way, + depending on the feature. + } + PROCEDURE XPLMEnableFeature( + inFeature : XPLMString; + inEnable : Integer); + cdecl; external XPLM_DLL; + + { + XPLMEnumerateFeatures + + This routine calls your enumerator callback once for each feature that this + running version of X-Plane supports. Use this routine to determine all of + the features that X-Plane can support. + } + PROCEDURE XPLMEnumerateFeatures( + inEnumerator : XPLMFeatureEnumerator_f; + inRef : pointer); + cdecl; external XPLM_DLL; + +{$ENDIF XPLM200} + +IMPLEMENTATION + +END. diff --git a/src/SDK/Delphi/XPLM/XPLMProcessing.pas b/src/SDK/Delphi/XPLM/XPLMProcessing.pas new file mode 100755 index 00000000..e09b6e56 --- /dev/null +++ b/src/SDK/Delphi/XPLM/XPLMProcessing.pas @@ -0,0 +1,254 @@ +{ + Copyright 2005-2012 Sandy Barbour and Ben Supnik All rights reserved. See + license.txt for usage. X-Plane SDK Version: 2.1.1 +} + +UNIT XPLMProcessing; +INTERFACE +{ + This API allows you to get regular callbacks during the flight loop, the + part of X-Plane where the plane's position calculates the physics of + flight, etc. Use these APIs to accomplish periodic tasks like logging data + and performing I/O. + + You can receive a callback either just before or just after the per-frame + physics calculations happen - you can use post-FM callbacks to "patch" the + flight model after it has run. + + If the user has set the number of flight model iterations per frame greater + than one your plugin will _not_ see this; these integrations run on the + sub-section of the flight model where iterations improve responsiveness + (e.g. physical integration, not simple systems tracking) and are thus + opaque to plugins. + + Flight loop scheduling, when scheduled by time, is scheduled by a "first + callback after the deadline" schedule, e.g. your callbacks will always be + slightly late to ensure that we don't run faster than your deadline. + + WARNING: Do NOT use these callbacks to draw! You cannot draw during flight + loop callbacks. Use the drawing callbacks (see XPLMDisplay for more info) + for graphics. (One exception: you can use a post-flight loop callback to + update your own off-screen FBOs.) +} + +USES + XPLMDefs; + {$A4} +{___________________________________________________________________________ + * FLIGHT LOOP CALLBACKS + ___________________________________________________________________________} + +{$IFDEF XPLM210} + { + XPLMFlightLoopPhaseType + + You can register a flight loop callback to run either before or after the + flight model is integrated by X-Plane. + } +TYPE + XPLMFlightLoopPhaseType = ( + { Your callback runs before X-Plane integrates the flight model. } + xplm_FlightLoop_Phase_BeforeFlightModel = 0 + + { Your callback runs after X-Plane integrates the flight model. } + ,xplm_FlightLoop_Phase_AfterFlightModel = 1 + + ); + PXPLMFlightLoopPhaseType = ^XPLMFlightLoopPhaseType; +{$ENDIF XPLM210} + +{$IFDEF XPLM210} + { + XPLMFlightLoopID + + This is an opaque identifier for a flight loop callback. You can use this + identifier to easily track and remove your callbacks, or to use the new + flight loop APIs. + } + XPLMFlightLoopID = pointer; + PXPLMFlightLoopID = ^XPLMFlightLoopID; +{$ENDIF XPLM210} + + { + XPLMFlightLoop_f + + This is your flight loop callback. Each time the flight loop is iterated + through, you receive this call at the end. + + Flight loop callbacks receive a number of input timing parameters. These + input timing parameters are not particularly useful; you may need to track + your own timing data (e.g. by reading datarefs). The input parameters are: + + - inElapsedSinceLastCall: the wall time since your last callback. + - inElapsedTimeSinceLastFlightLoop: the wall time since any flight loop was + dispatched. + - inCounter: a monotonically increasing counter, bumped once per flight + loop dispatch from the sim. + - inRefcon: your own ptr constant from when you regitered yor callback. + + Your return value controls when you will next be called. + + - Return 0 to stop receiving callbacks. + - Pass a positive number to specify how many seconds until the next + callback. (You will be called at or after this time, not before.) + - Pass a negative number to specify how many loops must go by until you + are called. For example, -1.0 means call me the very next loop. + + Try to run your flight loop as infrequently as is practical, and suspend it + (using return value 0) when you do not need it; lots of flight loop + callbacks that do nothing lowers X-Plane's frame rate. + + Your callback will NOT be unregistered if you return 0; it will merely be + inactive. + } +TYPE + XPLMFlightLoop_f = FUNCTION( + inElapsedSinceLastCall: Single; + inElapsedTimeSinceLastFlightLoop: Single; + inCounter : Integer; + inRefcon : pointer) : Single; cdecl; + +{$IFDEF XPLM210} + { + XPLMCreateFlightLoop_t + + XPLMCreateFlightLoop_t contains the parameters to create a new flight loop + callback. The strsucture can be expanded in future SDKs - always set + structSize to the size of your structure in bytes. + } +TYPE + XPLMCreateFlightLoop_t = RECORD + structSize : Integer; + phase : XPLMFlightLoopPhaseType; + callbackFunc : XPLMFlightLoop_f; + refcon : pointer; + END; + PXPLMCreateFlightLoop_t = ^XPLMCreateFlightLoop_t; +{$ENDIF XPLM210} + + { + XPLMGetElapsedTime + + This routine returns the elapsed time since the sim started up in decimal + seconds. This is a wall timer; it keeps counting upward even if the sim is + pasued. + + __WARNING__: XPLMGetElapsedTime is not a very good timer! It lacks + precision in both its data type and its source. Do not attempt to use it + for timing critical applications like network multiplayer. + } + FUNCTION XPLMGetElapsedTime: Single; + cdecl; external XPLM_DLL; + + { + XPLMGetCycleNumber + + This routine returns a counter starting at zero for each sim cycle + computed/video frame rendered. + } + FUNCTION XPLMGetCycleNumber: Integer; + cdecl; external XPLM_DLL; + + { + XPLMRegisterFlightLoopCallback + + This routine registers your flight loop callback. Pass in a pointer to a + flight loop function and a refcon. inInterval defines when you will be + called. Pass in a positive number to specify seconds from registration time + to the next callback. Pass in a negative number to indicate when you will + be called (e.g. pass -1 to be called at the next cylcle). Pass 0 to not be + called; your callback will be inactive. + + (This legacy function only installs pre-flight-loop callbacks; use + XPLMCreateFlightLoop for more control.) + } + PROCEDURE XPLMRegisterFlightLoopCallback( + inFlightLoop : XPLMFlightLoop_f; + inInterval : Single; + inRefcon : pointer); + cdecl; external XPLM_DLL; + + { + XPLMUnregisterFlightLoopCallback + + This routine unregisters your flight loop callback. Do NOT call it from + your flight loop callback. Once your flight loop callback is unregistered, + it will not be called again. + + Only use this on flight loops registered via + XPLMRegisterFlightLoopCallback. + } + PROCEDURE XPLMUnregisterFlightLoopCallback( + inFlightLoop : XPLMFlightLoop_f; + inRefcon : pointer); + cdecl; external XPLM_DLL; + + { + XPLMSetFlightLoopCallbackInterval + + This routine sets when a callback will be called. Do NOT call it from your + callback; use the return value of the callback to change your callback + interval from inside your callback. + + inInterval is formatted the same way as in XPLMRegisterFlightLoopCallback; + positive for seconds, negative for cycles, and 0 for deactivating the + callback. If inRelativeToNow is 1, times are from the time of this call; + otherwise they are from the time the callback was last called (or the time + it was registered if it has never been called. + } + PROCEDURE XPLMSetFlightLoopCallbackInterval( + inFlightLoop : XPLMFlightLoop_f; + inInterval : Single; + inRelativeToNow : Integer; + inRefcon : pointer); + cdecl; external XPLM_DLL; + +{$IFDEF XPLM210} + { + XPLMCreateFlightLoop + + This routine creates a flight loop callback and returns its ID. The flight + loop callback is created using the input param struct, and is inited to be + unscheduled. + } + FUNCTION XPLMCreateFlightLoop( + inParams : PXPLMCreateFlightLoop_t) : XPLMFlightLoopID; + cdecl; external XPLM_DLL; +{$ENDIF XPLM210} + +{$IFDEF XPLM210} + { + XPLMDestroyFlightLoop + + This routine destroys a flight loop callback by ID. Only call it on flight + loops created with the newer XPLMCreateFlightLoop API. + } + PROCEDURE XPLMDestroyFlightLoop( + inFlightLoopID : XPLMFlightLoopID); + cdecl; external XPLM_DLL; +{$ENDIF XPLM210} + +{$IFDEF XPLM210} + { + XPLMScheduleFlightLoop + + This routine schedules a flight loop callback for future execution. If + inInterval is negative, it is run in a certain number of frames based on + the absolute value of the input. If the interval is positive, it is a + duration in seconds. + + If inRelativeToNow is true, ties are interpretted relative to the time this + routine is called; otherwise they are relative to the last call time or the + time the flight loop was registered (if never called). + } + PROCEDURE XPLMScheduleFlightLoop( + inFlightLoopID : XPLMFlightLoopID; + inInterval : Single; + inRelativeToNow : Integer); + cdecl; external XPLM_DLL; +{$ENDIF XPLM210} + + +IMPLEMENTATION + +END. diff --git a/src/SDK/Delphi/XPLM/XPLMScenery.pas b/src/SDK/Delphi/XPLM/XPLMScenery.pas new file mode 100644 index 00000000..a585830c --- /dev/null +++ b/src/SDK/Delphi/XPLM/XPLMScenery.pas @@ -0,0 +1,434 @@ +{ + Copyright 2005-2012 Sandy Barbour and Ben Supnik All rights reserved. See + license.txt for usage. X-Plane SDK Version: 2.1.1 +} + +UNIT XPLMScenery; +INTERFACE +{ + This package contains APIs to interact with X-Plane's scenery system. +} + +USES + XPLMDefs; + {$A4} +{$IFDEF XPLM200} +{___________________________________________________________________________ + * Terrain Y-Testing + ___________________________________________________________________________} +{ + The Y-testing API allows you to locate the physical scenery mesh. This + would be used to place dynamic graphics on top of the ground in a plausible + way or do physics interactions. + + The Y-test API works via probe objects, which are allocated by your plugin + and used to query terrain. Probe objects exist both to capture which + algorithm you have requested (see probe types) and also to cache query + information. + + Performance Guidelines + ---------------------- + + It is generally faster to use the same probe for nearby points and + different probes for different points. Try not to allocate more than + "hundreds" of probes at most. Share probes if you need more. Generally, + probing operations are expensive, and should be avoided via caching when + possible. + + Y testing returns a location on the terrain, a normal vectory, and a + velocity vector. The normal vector tells you the slope of the terrain at + that point. The velocity vector tells you if that terrain is moving (and is + in meters/second). For example, if your Y test hits the aircraft carrier + deck, this tells you the velocity of that point on the deck. + + Note: the Y-testing API is limited to probing the loaded scenery area, + which is approximately 300x300 km in X-Plane 9. Probes outside this area + will return the height of a 0 MSL sphere. +} + + + { + XPLMProbeType + + XPLMProbeType defines the type of terrain probe - each probe has a + different algorithm. (Only one type of probe is provided right now, but + future APIs will expose more flexible or poewrful or useful probes. + } +TYPE + XPLMProbeType = ( + { The Y probe gives you the location of the tallest physical scenery along } + { the Y axis going through the queried point. } + xplm_ProbeY = 0 + + ); + PXPLMProbeType = ^XPLMProbeType; + + { + XPLMProbeResult + + Probe results - possible results from a probe query. + } + XPLMProbeResult = ( + { The probe hit terrain and returned valid values. } + xplm_ProbeHitTerrain = 0 + + { An error in the API call. Either the probe struct size is bad, or the } + { probe is invalid or the type is mismatched for the specific query call. } + ,xplm_ProbeError = 1 + + { The probe call succeeded but there is no terrain under this point (perhaps } + { it is off the side of the planet?) } + ,xplm_ProbeMissed = 2 + + ); + PXPLMProbeResult = ^XPLMProbeResult; + + { + XPLMProbeRef + + An XPLMProbeRef is an opaque handle to a probe, used for querying the + terrain. + } + XPLMProbeRef = pointer; + PXPLMProbeRef = ^XPLMProbeRef; + + { + XPLMProbeInfo_t + + XPLMProbeInfo_t contains the results of a probe call. Make sure to set + structSize to the size of the struct before using it. + } + XPLMProbeInfo_t = RECORD + { Size of structure in bytes - always set this before calling the XPLM. } + structSize : Integer; + { Resulting X location of the terrain point we hit, in local OpenGL } + { coordinates. } + locationX : Single; + { Resulting Y location of the terrain point we hit, in local OpenGL } + { coordinates. } + locationY : Single; + { Resulting Z location of the terrain point we hit, in local OpenGL } + { coordinates. } + locationZ : Single; + { X component of the normal vector to the terrain we found. } + normalX : Single; + { Y component of the normal vector to the terrain we found. } + normalY : Single; + { Z component of the normal vector to the terrain we found. } + normalZ : Single; + { X component of the velocity vector of the terrain we found. } + velocityX : Single; + { Y component of the velocity vector of the terrain we found. } + velocityY : Single; + { Z component of the velocity vector of the terrain we found. } + velocityZ : Single; + { Tells if the surface we hit is water (otherwise it is land). } + is_wet : Integer; + END; + PXPLMProbeInfo_t = ^XPLMProbeInfo_t; + + { + XPLMCreateProbe + + Creates a new probe object of a given type and returns. + } + FUNCTION XPLMCreateProbe( + inProbeType : XPLMProbeType) : XPLMProbeRef; + cdecl; external XPLM_DLL; + + { + XPLMDestroyProbe + + Deallocates an existing probe object. + } + PROCEDURE XPLMDestroyProbe( + inProbe : XPLMProbeRef); + cdecl; external XPLM_DLL; + + { + XPLMProbeTerrainXYZ + + Probes the terrain. Pass in the XYZ coordinate of the probe point, a probe + object, and an XPLMProbeInfo_t struct that has its structSize member set + properly. Other fields are filled in if we hit terrain, and a probe result + is returned. + } + FUNCTION XPLMProbeTerrainXYZ( + inProbe : XPLMProbeRef; + inX : Single; + inY : Single; + inZ : Single; + outInfo : PXPLMProbeInfo_t) : XPLMProbeResult; + cdecl; external XPLM_DLL; + +{$ENDIF XPLM200} +{$IFDEF XPLM300} +{___________________________________________________________________________ + * Magnetic Variation + ___________________________________________________________________________} +{ + Use the magnetic variation (more properly, the "magnetic declination") API + to find the offset of magnetic north from true north at a given latitude + and longitude within the simulator. + + In the real world, the Earth's magnetic field is irregular, such that true + north (the direction along a meridian toward the north pole) does not + necessarily match what a magnetic compass shows as north. + + Using this API ensures that you present the same offsets to users as + X-Plane's built-in instruments. +} + + + { + XPLMGetMagneticVariation + + Returns X-Plane's simulated magnetic variation (declination) at the + indication latitude and longitude. + } + FUNCTION XPLMGetMagneticVariation( + latitude : Real; + longitude : Real) : Single; + cdecl; external XPLM_DLL; + + { + XPLMDegTrueToDegMagnetic + + Converts a heading in degrees relative to true north into a value relative + to magnetic north at the user's current location. + } + FUNCTION XPLMDegTrueToDegMagnetic( + headingDegreesTrue : Single) : Single; + cdecl; external XPLM_DLL; + + { + XPLMDegMagneticToDegTrue + + Converts a heading in degrees relative to magnetic north at the user's + current location into a value relative to true north. + } + FUNCTION XPLMDegMagneticToDegTrue( + headingDegreesMagnetic: Single) : Single; + cdecl; external XPLM_DLL; + +{$ENDIF XPLM300} +{___________________________________________________________________________ + * Object Drawing + ___________________________________________________________________________} +{ + The object drawing routines let you load and draw X-Plane OBJ files. + Objects are loaded by file path and managed via an opaque handle. X-Plane + naturally reference counts objects, so it is important that you balance + every successful call to XPLMLoadObject with a call to XPLMUnloadObject! +} + + +{$IFDEF XPLM200} +TYPE + { + XPLMObjectRef + + An XPLMObjectRef is a opaque handle to an .obj file that has been loaded + into memory. + } + XPLMObjectRef = pointer; + PXPLMObjectRef = ^XPLMObjectRef; +{$ENDIF XPLM200} + +{$IFDEF XPLM200} + { + XPLMDrawInfo_t + + The XPLMDrawInfo_t structure contains positioning info for one object that + is to be drawn. Be sure to set structSize to the size of the structure for + future expansion. + } + XPLMDrawInfo_t = RECORD + { Set this to the size of this structure! } + structSize : Integer; + { X location of the object in local coordinates. } + x : Single; + { Y location of the object in local coordinates. } + y : Single; + { Z location of the object in local coordinates. } + z : Single; + { Pitch in degres to rotate the object, positive is up. } + pitch : Single; + { Heading in local coordinates to rotate the object, clockwise. } + heading : Single; + { Roll to rotate the object. } + roll : Single; + END; + PXPLMDrawInfo_t = ^XPLMDrawInfo_t; +{$ENDIF XPLM200} + +{$IFDEF XPLM210} + { + XPLMObjectLoaded_f + + You provide this callback when loading an object asynchronously; it will be + called once the object is loaded. Your refcon is passed back. The object + ref passed in is the newly loaded object (ready for use) or NULL if an + error occured. + + If your plugin is disabled, this callback will be delivered as soon as the + plugin is re-enabled. If your plugin is unloaded before this callback is + ever called, the SDK will release the object handle for you. + } +TYPE + XPLMObjectLoaded_f = PROCEDURE( + inObject : XPLMObjectRef; + inRefcon : pointer); cdecl; +{$ENDIF XPLM210} + +{$IFDEF XPLM200} + { + XPLMLoadObject + + This routine loads an OBJ file and returns a handle to it. If X-Plane has + already loaded the object, the handle to the existing object is returned. + Do not assume you will get the same handle back twice, but do make sure to + call unload once for every load to avoid "leaking" objects. The object will + be purged from memory when no plugins and no scenery are using it. + + The path for the object must be relative to the X-System base folder. If + the path is in the root of the X-System folder you may need to prepend ./ + to it; loading objects in the root of the X-System folder is STRONGLY + discouraged - your plugin should not dump art resources in the root folder! + + XPLMLoadObject will return NULL if the object cannot be loaded (either + because it is not found or the file is misformatted). This routine will + load any object that can be used in the X-Plane scenery system. + + It is important that the datarefs an object uses for animation already be + loaded before you load the object. For this reason it may be necessary to + defer object loading until the sim has fully started. + } + FUNCTION XPLMLoadObject( + inPath : XPLMString) : XPLMObjectRef; + cdecl; external XPLM_DLL; +{$ENDIF XPLM200} + +{$IFDEF XPLM210} + { + XPLMLoadObjectAsync + + This routine loads an object asynchronously; control is returned to you + immediately while X-Plane loads the object. The sim will not stop flying + while the object loads. For large objects, it may be several seconds before + the load finishes. + + You provide a callback function that is called once the load has completed. + Note that if the object cannot be loaded, you will not find out until the + callback function is called with a NULL object handle. + + There is no way to cancel an asynchronous object load; you must wait for + the load to complete and then release the object if it is no longer + desired. + } + PROCEDURE XPLMLoadObjectAsync( + inPath : XPLMString; + inCallback : XPLMObjectLoaded_f; + inRefcon : pointer); + cdecl; external XPLM_DLL; +{$ENDIF XPLM210} + +{$IFDEF XPLM_DEPRECATED} + { + XPLMDrawObjects + + __Deprecation Warning__: use XPLMInstancing to draw 3-d objects by creating + instances, rather than these APIs from draw callbacks. + + XPLMDrawObjects draws an object from an OBJ file one or more times. You + pass in the object and an array of XPLMDrawInfo_t structs, one for each + place you would like the object to be drawn. + + X-Plane will attempt to cull the objects based on LOD and visibility, and + will pick the appropriate LOD. + + Lighting is a boolean; pass 1 to show the night version of object with + night-only lights lit up. Pass 0 to show the daytime version of the object. + + earth_relative controls the coordinate system. If this is 1, the rotations + you specify are applied to the object after its coordinate system is + transformed from local to earth-relative coordinates -- that is, an object + with no rotations will point toward true north and the Y axis will be up + against gravity. If this is 0, the object is drawn with your rotations from + local coordanates -- that is, an object with no rotations is drawn pointing + down the -Z axis and the Y axis of the object matches the local coordinate + Y axis. + } + PROCEDURE XPLMDrawObjects( + inObject : XPLMObjectRef; + inCount : Integer; + inLocations : PXPLMDrawInfo_t; + lighting : Integer; + earth_relative : Integer); + cdecl; external XPLM_DLL; +{$ENDIF XPLM_DEPRECATED} + +{$IFDEF XPLM200} + { + XPLMUnloadObject + + This routine marks an object as no longer being used by your plugin. + Objects are reference counted: once no plugins are using an object, it is + purged from memory. Make sure to call XPLMUnloadObject once for each + successful call to XPLMLoadObject. + } + PROCEDURE XPLMUnloadObject( + inObject : XPLMObjectRef); + cdecl; external XPLM_DLL; +{$ENDIF XPLM200} + +{$IFDEF XPLM200} +{___________________________________________________________________________ + * Library Access + ___________________________________________________________________________} +{ + The library access routines allow you to locate scenery objects via the + X-Plane library system. Right now library access is only provided for + objects, allowing plugin-drawn objects to be extended using the library + system. +} + + + { + XPLMLibraryEnumerator_f + + An XPLMLibraryEnumerator_f is a callback you provide that is called once + for each library element that is located. The returned paths will be + relative to the X-System folder. + } +TYPE + XPLMLibraryEnumerator_f = PROCEDURE( + inFilePath : XPLMString; + inRef : pointer); cdecl; + + { + XPLMLookupObjects + + This routine looks up a virtual path in the library system and returns all + matching elements. You provide a callback - one virtual path may match many + objects in the library. XPLMLookupObjects returns the number of objects + found. + + The latitude and longitude parameters specify the location the object will + be used. The library system allows for scenery packages to only provide + objects to certain local locations. Only objects that are allowed at the + latitude/longitude you provide will be returned. + } + FUNCTION XPLMLookupObjects( + inPath : XPLMString; + inLatitude : Single; + inLongitude : Single; + enumerator : XPLMLibraryEnumerator_f; + ref : pointer) : Integer; + cdecl; external XPLM_DLL; + +{$ENDIF XPLM200} + +IMPLEMENTATION + +END. diff --git a/src/SDK/Delphi/XPLM/XPLMUtilities.pas b/src/SDK/Delphi/XPLM/XPLMUtilities.pas new file mode 100755 index 00000000..121e28b3 --- /dev/null +++ b/src/SDK/Delphi/XPLM/XPLMUtilities.pas @@ -0,0 +1,951 @@ +{ + Copyright 2005-2012 Sandy Barbour and Ben Supnik All rights reserved. See + license.txt for usage. X-Plane SDK Version: 2.1.1 +} + +UNIT XPLMUtilities; +INTERFACE + +USES + XPLMDefs; + {$A4} +{___________________________________________________________________________ + * FILE UTILITIES + ___________________________________________________________________________} +{ + The XPLMUtilities file APIs provide some basic file and path functions for + use with X-Plane. + + Directory Separators + -------------------- + + The XPLM has two modes it can work in: + + * X-Plane native paths: all paths are UTF8 strings, using the unix forward + slash (/) as the directory separating character. In native path mode, + you use the same path format for all three operating systems. + + * Legacy OS paths: the directroy separator is \ for Windows, : for OS X, + and / for Linux; OS paths are encoded in MacRoman for OS X using legacy + HFS conventions, use the application code page for multi-byte encoding + on Unix using DOS path conventions, and use UTF-8 for Linux. + + While legacy OS paths are the default, we strongly encourage you to opt in + to native paths using the XPLMEnableFeature API. + + * All OS X plugins should enable native paths all of the time; if you do + not do this, you will have to convert all paths back from HFS to Unix + (and deal with MacRoman) - code written using native paths and the C + file APIs "just works" on OS X. + + * For Linux plugins, there is no difference between the two encodings. + + * Windows plugins will need to convert the UTF8 file paths to UTF16 for + use with the "wide" APIs. While it might seem tempting to stick with + legacy OS paths (and just use the "ANSI" Windows APIs), X-Plane is fully + unicode-capable, and will often be installed in paths where the user's + directories have no ACP encoding. + + Full and Relative Paths + ----------------------- + + Some of these APIs use full paths, but others use paths relative to the + user's X-Plane installation. This is documented on a per-API basis. +} + + +{$IFDEF XPLM200} + { + XPLMDataFileType + + These enums define types of data files you can load or unload using the + SDK. + } +TYPE + XPLMDataFileType = ( + { A situation (.sit) file, which starts off a flight in a given } + { configuration. } + xplm_DataFile_Situation = 1 + + { A situation movie (.smo) file, which replays a past flight. } + ,xplm_DataFile_ReplayMovie = 2 + + ); + PXPLMDataFileType = ^XPLMDataFileType; +{$ENDIF XPLM200} + + { + XPLMGetSystemPath + + This function returns the full path to the X-System folder. Note that this + is a directory path, so it ends in a trailing : or /. + + The buffer you pass should be at least 512 characters long. The path is + returned using the current native or OS path conventions. + } + PROCEDURE XPLMGetSystemPath( + outSystemPath : XPLMString); + cdecl; external XPLM_DLL; + + { + XPLMGetPrefsPath + + This routine returns a full path to a file that is within X-Plane's + preferences directory. (You should remove the file name back to the last + directory separator to get the preferences directory using + XPLMExtractFileAndPath.) + + The buffer you pass should be at least 512 characters long. The path is + returned using the current native or OS path conventions. + } + PROCEDURE XPLMGetPrefsPath( + outPrefsPath : XPLMString); + cdecl; external XPLM_DLL; + + { + XPLMGetDirectorySeparator + + This routine returns a string with one char and a null terminator that is + the directory separator for the current platform. This allows you to write + code that concatinates directory paths without having to #ifdef for + platform. The character returned will reflect the current file path mode. + } + FUNCTION XPLMGetDirectorySeparator: XPLMString; + cdecl; external XPLM_DLL; + + { + XPLMExtractFileAndPath + + Given a full path to a file, this routine separates the path from the file. + If the path is a partial directory (e.g. ends in : or \) the trailing + directory separator is removed. This routine works in-place; a pointer to + the file part of the buffer is returned; the original buffer still starts + with the path and is null terminated with no trailing separator. + } + FUNCTION XPLMExtractFileAndPath( + inFullPath : XPLMString) : XPLMString; + cdecl; external XPLM_DLL; + + { + XPLMGetDirectoryContents + + This routine returns a list of files in a directory (specified by a full + path, no trailing : or \). The output is returned as a list of NULL + terminated strings. An index array (if specified) is filled with pointers + into the strings. The last file is indicated by a zero-length string (and + NULL in the indices). This routine will return 1 if you had capacity for + all files or 0 if you did not. You can also skip a given number of files. + + * inDirectoryPath - a null terminated C string containing the full path to + the directory with no trailing directory char. + + * inFirstReturn - the zero-based index of the first file in the directory + to return. (Usually zero to fetch all in one pass.) + + * outFileNames - a buffer to receive a series of sequential null + terminated C-string file names. A zero-length C string will be appended + to the very end. + + * inFileNameBufSize - the size of the file name buffer in bytes. + + * outIndices - a pointer to an array of character pointers that will + become an index into the directory. The last file will be followed by a + NULL value. Pass NULL if you do not want indexing information. + + * inIndexCount - the max size of the index in entries. + + * outTotalFiles - if not NULL, this is filled in with the number of files + in the directory. + + * outReturnedFiles - if not NULL, the number of files returned by this + iteration. + + Return value: 1 if all info could be returned, 0 if there was a buffer + overrun. + + WARNING: Before X-Plane 7 this routine did not properly iterate through + directories. If X-Plane + 6 compatibility is needed, use your own code to iterate directories. + } + FUNCTION XPLMGetDirectoryContents( + inDirectoryPath : XPLMString; + inFirstReturn : Integer; + outFileNames : XPLMString; + inFileNameBufSize : Integer; + outIndices : PXPLMString; { Can be nil } + inIndexCount : Integer; + outTotalFiles : PInteger; { Can be nil } + outReturnedFiles : PInteger) : Integer; { Can be nil } + cdecl; external XPLM_DLL; + +{$IFDEF XPLM200} + { + XPLMLoadDataFile + + Loads a data file of a given type. Paths must be relative to the X-System + folder. To clear the replay, pass a NULL file name (this is only valid with + replay movies, not sit files). + } + FUNCTION XPLMLoadDataFile( + inFileType : XPLMDataFileType; + inFilePath : XPLMString) : Integer; { Can be nil } + cdecl; external XPLM_DLL; +{$ENDIF XPLM200} + +{$IFDEF XPLM200} + { + XPLMSaveDataFile + + Saves the current situation or replay; paths are relative to the X-System + folder. + } + FUNCTION XPLMSaveDataFile( + inFileType : XPLMDataFileType; + inFilePath : XPLMString) : Integer; + cdecl; external XPLM_DLL; +{$ENDIF XPLM200} + +{___________________________________________________________________________ + * X-PLANE MISC + ___________________________________________________________________________} + + { + XPLMHostApplicationID + + While the plug-in SDK is only accessible to plugins running inside X-Plane, + the original authors considered extending the API to other applications + that shared basic infrastructure with X-Plane. These enumerations are + hold-overs from that original roadmap; all values other than X-Plane are + deprecated. Your plugin should never need this enumeration. + } +TYPE + XPLMHostApplicationID = ( + xplm_Host_Unknown = 0 + + ,xplm_Host_XPlane = 1 + +{$IFDEF XPLM_DEPRECATED} + ,xplm_Host_PlaneMaker = 2 +{$ENDIF XPLM_DEPRECATED} + +{$IFDEF XPLM_DEPRECATED} + ,xplm_Host_WorldMaker = 3 +{$ENDIF XPLM_DEPRECATED} + +{$IFDEF XPLM_DEPRECATED} + ,xplm_Host_Briefer = 4 +{$ENDIF XPLM_DEPRECATED} + +{$IFDEF XPLM_DEPRECATED} + ,xplm_Host_PartMaker = 5 +{$ENDIF XPLM_DEPRECATED} + +{$IFDEF XPLM_DEPRECATED} + ,xplm_Host_YoungsMod = 6 +{$ENDIF XPLM_DEPRECATED} + +{$IFDEF XPLM_DEPRECATED} + ,xplm_Host_XAuto = 7 +{$ENDIF XPLM_DEPRECATED} + + ); + PXPLMHostApplicationID = ^XPLMHostApplicationID; + + { + XPLMLanguageCode + + These enums define what language the sim is running in. These enumerations + do not imply that the sim can or does run in all of these languages; they + simply provide a known encoding in the event that a given sim version is + localized to a certain language. + } + XPLMLanguageCode = ( + xplm_Language_Unknown = 0 + + ,xplm_Language_English = 1 + + ,xplm_Language_French = 2 + + ,xplm_Language_German = 3 + + ,xplm_Language_Italian = 4 + + ,xplm_Language_Spanish = 5 + + ,xplm_Language_Korean = 6 + +{$IFDEF XPLM200} + ,xplm_Language_Russian = 7 +{$ENDIF XPLM200} + +{$IFDEF XPLM200} + ,xplm_Language_Greek = 8 +{$ENDIF XPLM200} + +{$IFDEF XPLM200} + ,xplm_Language_Japanese = 9 +{$ENDIF XPLM200} + +{$IFDEF XPLM300} + ,xplm_Language_Chinese = 10 +{$ENDIF XPLM300} + + ); + PXPLMLanguageCode = ^XPLMLanguageCode; + +{$IFDEF XPLM200} + { + XPLMError_f + + An XPLM error callback is a function that you provide to receive debugging + information from the plugin SDK. See XPLMSetErrorCallback for more + information. NOTE: for the sake of debugging, your error callback will be + called even if your plugin is not enabled, allowing you to receive debug + info in your XPluginStart and XPluginStop callbacks. To avoid causing logic + errors in the management code, do not call any other plugin routines from + your error callback - it is only meant for catching errors in the + debugging. + } +TYPE + XPLMError_f = PROCEDURE( + inMessage : XPLMString); cdecl; +{$ENDIF XPLM200} + +{$IFDEF XPLM_DEPRECATED} + { + XPLMInitialized + + Deprecated: This function returns 1 if X-Plane has properly initialized the + plug-in system. If this routine returns 0, many XPLM functions will not + work. + + NOTE: because plugins are always called from within the XPLM, there is no + need to check for initialization; it will always return 1. This routine is + deprecated - you do not need to check it before continuing within your + plugin. + } + FUNCTION XPLMInitialized: Integer; + cdecl; external XPLM_DLL; +{$ENDIF XPLM_DEPRECATED} + + { + XPLMGetVersions + + This routine returns the revision of both X-Plane and the XPLM DLL. All + versions are three-digit decimal numbers (e.g. 606 for version 6.06 of + X-Plane); the current revision of the XPLM is 200 (2.00). This routine also + returns the host ID of the app running us. + + The most common use of this routine is to special-case around X-Plane + version-specific behavior. + } + PROCEDURE XPLMGetVersions( + outXPlaneVersion : PInteger; + outXPLMVersion : PInteger; + outHostID : PXPLMHostApplicationID); + cdecl; external XPLM_DLL; + + { + XPLMGetLanguage + + This routine returns the langauge the sim is running in. + } + FUNCTION XPLMGetLanguage: XPLMLanguageCode; + cdecl; external XPLM_DLL; + +{$IFDEF XPLM200} + { + XPLMFindSymbol + + This routine will attempt to find the symbol passed in the inString + parameter. If the symbol is found a pointer the function is returned, + othewise the function will return NULL. + + You can use XPLMFindSymbol to utilize newer SDK API features without + requiring newer versions of the SDK (and X-Plane) as your minimum X-Plane + version as follows: + + * Define the XPLMnnn macro to the minimum required XPLM version you will + ship with (e.g. XPLM210 for X-Plane 10 compatibility). + + * Use XPLMGetVersions and XPLMFindSymbol to detect that the host sim is + new enough to use new functions and resolve function pointers. + + * Conditionally use the new functions if and only if XPLMFindSymbol only + returns a non- NULL pointer. + + Warning: you should always check the XPLM API version as well as the + results of XPLMFindSymbol to determine if funtionality is safe to use. + + To use functionality via XPLMFindSymbol you will need to copy your own + definitions of the X-Plane API prototypes and cast the returned pointer to + the correct type. + } + FUNCTION XPLMFindSymbol( + inString : XPLMString) : pointer; + cdecl; external XPLM_DLL; +{$ENDIF XPLM200} + +{$IFDEF XPLM200} + { + XPLMSetErrorCallback + + XPLMSetErrorCallback installs an error-reporting callback for your plugin. + Normally the plugin system performs minimum diagnostics to maximize + performance. When you install an error callback, you will receive calls due + to certain plugin errors, such as passing bad parameters or incorrect data. + + Important: the error callback determines *programming* errors, e.g. bad API + parameters. Every error that is returned by the error callback represents a + mistake in your plugin that you should fix. Error callbacks are not used to + report expected run-time problems (e.g. disk I/O errors). + + The intention is for you to install the error callback during debug + sections and put a break-point inside your callback. This will cause you to + break into the debugger from within the SDK at the point in your plugin + where you made an illegal call. + + Installing an error callback may activate error checking code that would + not normally run, and this may adversely affect performance, so do not + leave error callbacks installed in shipping plugins. Since the only useful + response to an error is to change code, error callbacks are not useful "in + the field". + } + PROCEDURE XPLMSetErrorCallback( + inCallback : XPLMError_f); + cdecl; external XPLM_DLL; +{$ENDIF XPLM200} + + { + XPLMDebugString + + This routine outputs a C-style string to the Log.txt file. The file is + immediately flushed so you will not lose data. (This does cause a + performance penalty.) + + Please do *not* leave routine diagnostic logging enabled in your shipping + plugin. The X-Plane Log file is shared by X-Plane and every plugin in the + system, and plugins that (when functioning normally) print verbose log + output make it difficult for developers to find error conditions from other + parts of the system. + } + PROCEDURE XPLMDebugString( + inString : XPLMString); + cdecl; external XPLM_DLL; + + { + XPLMSpeakString + + This function displays the string in a translucent overlay over the current + display and also speaks the string if text-to-speech is enabled. The string + is spoken asynchronously, this function returns immediately. This function + may not speak or print depending on user preferences. + } + PROCEDURE XPLMSpeakString( + inString : XPLMString); + cdecl; external XPLM_DLL; + + { + XPLMGetVirtualKeyDescription + + Given a virtual key code (as defined in XPLMDefs.h) this routine returns a + human-readable string describing the character. This routine is provided + for showing users what keyboard mappings they have set up. The string may + read 'unknown' or be a blank or NULL string if the virtual key is unknown. + } + FUNCTION XPLMGetVirtualKeyDescription( + inVirtualKey : XPLMChar) : XPLMString; + cdecl; external XPLM_DLL; + + { + XPLMReloadScenery + + XPLMReloadScenery reloads the current set of scenery. You can use this + function in two typical ways: simply call it to reload the scenery, picking + up any new installed scenery, .env files, etc. from disk. Or, change the + lat/ref and lon/ref data refs and then call this function to shift the + scenery environment. This routine is equivalent to picking "reload + scenery" from the developer menu. + } + PROCEDURE XPLMReloadScenery; + cdecl; external XPLM_DLL; + +{$IFDEF XPLM200} +{___________________________________________________________________________ + * X-PLANE COMMAND MANAGEMENT + ___________________________________________________________________________} +{ + The command management APIs let plugins interact with the command-system in + X-Plane, the abstraction behind keyboard presses and joystick buttons. This + API lets you create new commands and modify the behavior (or get + notification) of existing ones. + + X-Plane Command Phases + ---------------------- + + X-Plane commands are not instantaneous; they operate over a duration. + (Think of a joystick button press - you can press, hold down, and then + release the joystick button; X-Plane commands model this entire process.) + + An X-Plane command consists of three phases: a beginning, continuous + repetition, and an ending. The command may be repeated zero times in its + duration, followed by one command ending. Command begin and end messges are + balanced, but a command may be bound to more than one event source (e.g. a + keyboard key and a joystick button), in which case you may receive a second + begin during before any end). + + When you issue commands in the plugin system, you *must* balance every call + to XPLMCommandBegin with a call to XPLMCommandEnd with the same command + reference. + + Command Behavior Modification + ----------------------------- + + You can register a callback to handle a command either before or after + X-Plane does; if you receive the command before X-Plane you have the option + to either let X-Plane handle the command or hide the command from X-Plane. + This lets plugins both augment commands and replace them. + + If you register for an existing command, be sure that you are *consistent* + in letting X-Plane handle or not handle the command; you are responsible + for passing a *balanced* number of begin and end messages to X-Plane. (E.g. + it is not legal to pass all the begin messages to X-Plane but hide all the + end messages). +} + + + { + XPLMCommandPhase + + The phases of a command. + } +TYPE + XPLMCommandPhase = ( + { The command is being started. } + xplm_CommandBegin = 0 + + { The command is continuing to execute. } + ,xplm_CommandContinue = 1 + + { The command has ended. } + ,xplm_CommandEnd = 2 + + ); + PXPLMCommandPhase = ^XPLMCommandPhase; + + { + XPLMCommandRef + + A command ref is an opaque identifier for an X-Plane command. Command + references stay the same for the life of your plugin but not between + executions of X-Plane. Command refs are used to execute commands, create + commands, and create callbacks for particular commands. + + Note that a command is not "owned" by a particular plugin. Since many + plugins may participate in a command's execution, the command does not go + away if the plugin that created it is unloaded. + } + XPLMCommandRef = pointer; + PXPLMCommandRef = ^XPLMCommandRef; + + { + XPLMCommandCallback_f + + A command callback is a function in your plugin that is called when a + command is pressed. Your callback receives the command reference for the + particular command, the phase of the command that is executing, and a + reference pointer that you specify when registering the callback. + + Your command handler should return 1 to let processing of the command + continue to other plugins and X-Plane, or 0 to halt processing, potentially + bypassing X-Plane code. + } + XPLMCommandCallback_f = FUNCTION( + inCommand : XPLMCommandRef; + inPhase : XPLMCommandPhase; + inRefcon : pointer) : Integer; cdecl; + + { + XPLMFindCommand + + XPLMFindCommand looks up a command by name, and returns its command + reference or NULL if the command does not exist. + } + FUNCTION XPLMFindCommand( + inName : XPLMString) : XPLMCommandRef; + cdecl; external XPLM_DLL; + + { + XPLMCommandBegin + + XPLMCommandBegin starts the execution of a command, specified by its + command reference. The command is "held down" until XPLMCommandEnd is + called. You must balance each XPLMCommandBegin call with an XPLMCommandEnd + call. + } + PROCEDURE XPLMCommandBegin( + inCommand : XPLMCommandRef); + cdecl; external XPLM_DLL; + + { + XPLMCommandEnd + + XPLMCommandEnd ends the execution of a given command that was started with + XPLMCommandBegin. You must not issue XPLMCommandEnd for a command you did + not begin. + } + PROCEDURE XPLMCommandEnd( + inCommand : XPLMCommandRef); + cdecl; external XPLM_DLL; + + { + XPLMCommandOnce + + This executes a given command momentarily, that is, the command begins and + ends immediately. This is the equivalent of calling XPLMCommandBegin() and + XPLMCommandEnd() back ot back. + } + PROCEDURE XPLMCommandOnce( + inCommand : XPLMCommandRef); + cdecl; external XPLM_DLL; + + { + XPLMCreateCommand + + XPLMCreateCommand creates a new command for a given string. If the command + already exists, the existing command reference is returned. The description + may appear in user interface contexts, such as the joystick configuration + screen. + } + FUNCTION XPLMCreateCommand( + inName : XPLMString; + inDescription : XPLMString) : XPLMCommandRef; + cdecl; external XPLM_DLL; + + { + XPLMRegisterCommandHandler + + XPLMRegisterCommandHandler registers a callback to be called when a command + is executed. You provide a callback with a reference pointer. + + If inBefore is true, your command handler callback will be executed before + X-Plane executes the command, and returning 0 from your callback will + disable X-Plane's processing of the command. If inBefore is false, your + callback will run after X-Plane. (You can register a single callback both + before and after a command.) + } + PROCEDURE XPLMRegisterCommandHandler( + inComand : XPLMCommandRef; + inHandler : XPLMCommandCallback_f; + inBefore : Integer; + inRefcon : pointer); + cdecl; external XPLM_DLL; + + { + XPLMUnregisterCommandHandler + + XPLMUnregisterCommandHandler removes a command callback registered with + XPLMRegisterCommandHandler. + } + PROCEDURE XPLMUnregisterCommandHandler( + inComand : XPLMCommandRef; + inHandler : XPLMCommandCallback_f; + inBefore : Integer; + inRefcon : pointer); + cdecl; external XPLM_DLL; + +{$ENDIF XPLM200} +{$IFDEF XPLM_DEPRECATED} +{___________________________________________________________________________ + * X-PLANE USER INTERACTION + ___________________________________________________________________________} +{ + WARNING: The legacy user interaction API is deprecated; while it was the + only way to run commands in X-Plane 6,7 and 8, it is obsolete, and was + replaced by the command system API in X-Plane 9. You should not use this + API; replace any of the calls below with XPLMCommand invocations based on + persistent command strings. The documentation that follows is for historic + reference only. + + The legacy user interaction APIs let you simulate commands the user can do + with a joystick, keyboard etc. Note that it is generally safer for future + compatibility to use one of these commands than to manipulate the + underlying sim data. +} + + + { + XPLMCommandKeyID + + These enums represent all the keystrokes available within X-Plane. They can + be sent to X-Plane directly. For example, you can reverse thrust using + these enumerations. + } +TYPE + XPLMCommandKeyID = ( + xplm_key_pause=0, + xplm_key_revthrust, + xplm_key_jettison, + xplm_key_brakesreg, + xplm_key_brakesmax, + xplm_key_gear, + xplm_key_timedn, + xplm_key_timeup, + xplm_key_fadec, + xplm_key_otto_dis, + xplm_key_otto_atr, + xplm_key_otto_asi, + xplm_key_otto_hdg, + xplm_key_otto_gps, + xplm_key_otto_lev, + xplm_key_otto_hnav, + xplm_key_otto_alt, + xplm_key_otto_vvi, + xplm_key_otto_vnav, + xplm_key_otto_nav1, + xplm_key_otto_nav2, + xplm_key_targ_dn, + xplm_key_targ_up, + xplm_key_hdgdn, + xplm_key_hdgup, + xplm_key_barodn, + xplm_key_baroup, + xplm_key_obs1dn, + xplm_key_obs1up, + xplm_key_obs2dn, + xplm_key_obs2up, + xplm_key_com1_1, + xplm_key_com1_2, + xplm_key_com1_3, + xplm_key_com1_4, + xplm_key_nav1_1, + xplm_key_nav1_2, + xplm_key_nav1_3, + xplm_key_nav1_4, + xplm_key_com2_1, + xplm_key_com2_2, + xplm_key_com2_3, + xplm_key_com2_4, + xplm_key_nav2_1, + xplm_key_nav2_2, + xplm_key_nav2_3, + xplm_key_nav2_4, + xplm_key_adf_1, + xplm_key_adf_2, + xplm_key_adf_3, + xplm_key_adf_4, + xplm_key_adf_5, + xplm_key_adf_6, + xplm_key_transpon_1, + xplm_key_transpon_2, + xplm_key_transpon_3, + xplm_key_transpon_4, + xplm_key_transpon_5, + xplm_key_transpon_6, + xplm_key_transpon_7, + xplm_key_transpon_8, + xplm_key_flapsup, + xplm_key_flapsdn, + xplm_key_cheatoff, + xplm_key_cheaton, + xplm_key_sbrkoff, + xplm_key_sbrkon, + xplm_key_ailtrimL, + xplm_key_ailtrimR, + xplm_key_rudtrimL, + xplm_key_rudtrimR, + xplm_key_elvtrimD, + xplm_key_elvtrimU, + xplm_key_forward, + xplm_key_down, + xplm_key_left, + xplm_key_right, + xplm_key_back, + xplm_key_tower, + xplm_key_runway, + xplm_key_chase, + xplm_key_free1, + xplm_key_free2, + xplm_key_spot, + xplm_key_fullscrn1, + xplm_key_fullscrn2, + xplm_key_tanspan, + xplm_key_smoke, + xplm_key_map, + xplm_key_zoomin, + xplm_key_zoomout, + xplm_key_cycledump, + xplm_key_replay, + xplm_key_tranID, + xplm_key_max + ); + PXPLMCommandKeyID = ^XPLMCommandKeyID; + + { + XPLMCommandButtonID + + These are enumerations for all of the things you can do with a joystick + button in X-Plane. They currently match the buttons menu in the equipment + setup dialog, but these enums will be stable even if they change in + X-Plane. + } + XPLMCommandButtonID = ( + xplm_joy_nothing=0, + xplm_joy_start_all, + xplm_joy_start_0, + xplm_joy_start_1, + xplm_joy_start_2, + xplm_joy_start_3, + xplm_joy_start_4, + xplm_joy_start_5, + xplm_joy_start_6, + xplm_joy_start_7, + xplm_joy_throt_up, + xplm_joy_throt_dn, + xplm_joy_prop_up, + xplm_joy_prop_dn, + xplm_joy_mixt_up, + xplm_joy_mixt_dn, + xplm_joy_carb_tog, + xplm_joy_carb_on, + xplm_joy_carb_off, + xplm_joy_trev, + xplm_joy_trm_up, + xplm_joy_trm_dn, + xplm_joy_rot_trm_up, + xplm_joy_rot_trm_dn, + xplm_joy_rud_lft, + xplm_joy_rud_cntr, + xplm_joy_rud_rgt, + xplm_joy_ail_lft, + xplm_joy_ail_cntr, + xplm_joy_ail_rgt, + xplm_joy_B_rud_lft, + xplm_joy_B_rud_rgt, + xplm_joy_look_up, + xplm_joy_look_dn, + xplm_joy_look_lft, + xplm_joy_look_rgt, + xplm_joy_glance_l, + xplm_joy_glance_r, + xplm_joy_v_fnh, + xplm_joy_v_fwh, + xplm_joy_v_tra, + xplm_joy_v_twr, + xplm_joy_v_run, + xplm_joy_v_cha, + xplm_joy_v_fr1, + xplm_joy_v_fr2, + xplm_joy_v_spo, + xplm_joy_flapsup, + xplm_joy_flapsdn, + xplm_joy_vctswpfwd, + xplm_joy_vctswpaft, + xplm_joy_gear_tog, + xplm_joy_gear_up, + xplm_joy_gear_down, + xplm_joy_lft_brake, + xplm_joy_rgt_brake, + xplm_joy_brakesREG, + xplm_joy_brakesMAX, + xplm_joy_speedbrake, + xplm_joy_ott_dis, + xplm_joy_ott_atr, + xplm_joy_ott_asi, + xplm_joy_ott_hdg, + xplm_joy_ott_alt, + xplm_joy_ott_vvi, + xplm_joy_tim_start, + xplm_joy_tim_reset, + xplm_joy_ecam_up, + xplm_joy_ecam_dn, + xplm_joy_fadec, + xplm_joy_yaw_damp, + xplm_joy_art_stab, + xplm_joy_chute, + xplm_joy_JATO, + xplm_joy_arrest, + xplm_joy_jettison, + xplm_joy_fuel_dump, + xplm_joy_puffsmoke, + xplm_joy_prerotate, + xplm_joy_UL_prerot, + xplm_joy_UL_collec, + xplm_joy_TOGA, + xplm_joy_shutdown, + xplm_joy_con_atc, + xplm_joy_fail_now, + xplm_joy_pause, + xplm_joy_rock_up, + xplm_joy_rock_dn, + xplm_joy_rock_lft, + xplm_joy_rock_rgt, + xplm_joy_rock_for, + xplm_joy_rock_aft, + xplm_joy_idle_hilo, + xplm_joy_lanlights, + xplm_joy_max + ); + PXPLMCommandButtonID = ^XPLMCommandButtonID; + + { + XPLMSimulateKeyPress + + This function simulates a key being pressed for X-Plane. The keystroke goes + directly to X-Plane; it is never sent to any plug-ins. However, since this + is a raw key stroke it may be mapped by the keys file or enter text into a + field. + + Deprecated: use XPLMCommandOnce + } + PROCEDURE XPLMSimulateKeyPress( + inKeyType : Integer; + inKey : Integer); + cdecl; external XPLM_DLL; + + { + XPLMCommandKeyStroke + + This routine simulates a command-key stroke. However, the keys are done by + function, not by actual letter, so this function works even if the user has + remapped their keyboard. Examples of things you might do with this include + pausing the simulator. + + Deprecated: use XPLMCommandOnce + } + PROCEDURE XPLMCommandKeyStroke( + inKey : XPLMCommandKeyID); + cdecl; external XPLM_DLL; + + { + XPLMCommandButtonPress + + This function simulates any of the actions that might be taken by pressing + a joystick button. However, this lets you call the command directly rather + than have to know which button is mapped where. Important: you must release + each button you press. The APIs are separate so that you can 'hold down' a + button for a fixed amount of time. + + Deprecated: use XPLMCommandBegin. + } + PROCEDURE XPLMCommandButtonPress( + inButton : XPLMCommandButtonID); + cdecl; external XPLM_DLL; + + { + XPLMCommandButtonRelease + + This function simulates any of the actions that might be taken by pressing + a joystick button. See XPLMCommandButtonPress. + + Deprecated: use XPLMCommandEnd. + } + PROCEDURE XPLMCommandButtonRelease( + inButton : XPLMCommandButtonID); + cdecl; external XPLM_DLL; + +{$ENDIF XPLM_DEPRECATED} + +IMPLEMENTATION + +END. diff --git a/src/SDK/Libraries/Mac/XPLM.framework/XPLM b/src/SDK/Libraries/Mac/XPLM.framework/XPLM new file mode 100755 index 0000000000000000000000000000000000000000..334071184538ea16492dd9756e7132a1ac807b8d GIT binary patch literal 214288 zcmeFaeSB2K_4vPmEJP%1M8NofL`4A~6E&JOL|KxBySNc5f>_0%2tpNzWLJU+h9*&N zuUl!=mVUGqTie=4W33udFbI<1V-O!uR8UbTt`7(bD9ZlcXXfr^6N0v%-}n3a{r->_ zo4I%9%$YN1&YU@O=Hb5h^(Xs!dOR83JswXFeuwaD%<_2Z^^?bQIPWdpJf4b*i-MCb z;-&My%8ZUN?mIX=UVfm`|0*gX)2bux3qfaml>)Wzzg{&@9v|C*pI%e zr%tVyRy}oEWuzi<#g(1u+g@n!T|3BRm-i0%OmymRMa9&r$lRH;uXbZP|&P}EfR#eQswxVkOtSjeSTTvOA zyC1$hmmZfKkGyxrH?jl1Yp?h&eEBZE?S_3Gc~8eD^)2gwZ`K@X)R~cr>CxF!_or{J zK{Ue6lgE2HzJtaWV*O7lyTznoOgn#n>-Ew!;6_G0pto-fV9#iHU`WjsjdH-&F zQ|HW@HD`7bV`qH1HyC_NOrXKi>zfv>(<&;itZLU%`_s34fyuG-m}H3^^+#g+u0;8H zV9X=T1$EKl43EUmAk3vR)z}%HqP`xj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fAzWGQ4|P0~Gq1GX1Sr z4-);upZ5m~plB=vj|SG&Ir?*Vx%%?>?qNCm^BRc&-abDfu>+C?dYJ{e-35xE&Z@HU zhs>ykiBSzRWk1Aa8?&T?Y+J(>BagbH$-^8ofTR;lpv#xF%L=dvDR+&mcT^0dUQb=& z-{wHHTvQ-ZL@f`<2~)E05RT}lP@DcG!Qnh>*2It7^yKN`WwAu2fF(ypHTRn0El9U_0qZIS>mrHjm!8v%)HZ47;2Id6WG}dIA z;3&_ipFrg1VnKQ1KwhTLP4Sw4zlDhSC$C+3Pw>*R6XgB7)ypHN;kzk%i|f_wWh3O4 zGKII?-4oE&g>AZaiUoqTU4$H$IbW@xK29HLg^)w|Ko`ZE<$AWB-n%U@yu6hf&#+rI z@Kz?WRlDQnbU`l9WgGH_9`RTGVguZG$|ARUm_9wt?_ghhoJ?o;ZV9;W`U`Ee{IW2K TS<%ZqW?!K(x5o7TAO7=yXE5y9 literal 0 HcmV?d00001 diff --git a/src/SDK/Libraries/Mac/XPWidgets.framework/XPWidgets b/src/SDK/Libraries/Mac/XPWidgets.framework/XPWidgets new file mode 100755 index 0000000000000000000000000000000000000000..20e521a54c969c17c285bcd229ebda586777a35b GIT binary patch literal 48768 zcmeFaeSB2K^*?@Zl7+~FHz;UCkf>2vgF+C270_I=H{69?41^$BVhCY@NJuc*6{rNG z$rdh`RX!DzR#CLJrPa37f<-Hk5KO{@7?5HB1ys}<*9RUH0x0`?pSg24n+0k6`+WZT zzItDoJ9B2voS8W@bLPyM*_-#yeto{9Ac*mTAasCBf?I=#fY1#gLAVBPUYsE0=TA^3 zO<+;&UzP1afx{pn*x<;gCqLiko#!*dCfuIhS}GWi!)y8kCzwI=onTQm!TkJkpMPq3 z1S7V7U;53Y(W2=S%!4cS=n2#SCZ#0(M#@&q4wqBrmU7Q}zF3>2W{MJL`V~7R7 z&(AL@&M%)odunNM{v2P~1@w|CO=OE6!LjrlCJKA!=NA`Tie3ux)3br|jo@f{)Xrgq zz@Pm5*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JYnaocP{Z z-bz;0eAaqhfhPV)gXsuekISjC@_K3WV!orm0D@Z5LSBwY9TORQ3E)Of-3 zZ9O5Tye)2$h!N-N-qzKrQSD}pES{4yZ_V|T+tm8{mJqXe!cKyU?;Z7yRGYokV0sVZ z35@RBY)NnAJ??E9FY?@;gzUcEmW*!frF(mUxxR`&U*7ayqv{Q}WSz#Iba!~Typt#% z2i#+*clxOE-K?HaQ@0WB@=)!aQDc;r&1eeqNr@etUuU`7!=8@Qh1A$^kB29o4ePCZ zOIE6U#_&TA)2t!QdyW!VeD7?0NR0XS7P#Ikkpg52wONu=wuIkTAj-!lC7k%)S^g4e zJ1m-b(o!JEX4^B`{SKOWD6=QDM89~TKy#kolyF^-v#Gt?k2Ie1s%KAVsb2V?K?@%X z?F}4{auGZxi-lejm; z#7OjT12(L$2P8bL%KKAL_2!PqMD13#h)IWYOSVb!Iv$b``~qNIZU+NS1jUx z(|P`@Wr%z5JpZ*a%wEs)6MbZNfGPftq-i|e_mPBk<;OnaGAI$24cc=H2t& zT5h6m{*8}34ZaJhv*^DK@mkfhkj;rZTU|D?zG!;6Z7U<0s6F9bQ6~Pe-03*%ch$e8-8A(wx(yKO|+zcF<9}x zThUX`NsSP{(74*`NBudBp3qXhslW8l>|fcCkm7qsV{R&cZyUr$vo<=^;PX1qV)g$3 DyBx`D literal 0 HcmV?d00001 diff --git a/src/SDK/Libraries/Win/XPWidgets_64.lib b/src/SDK/Libraries/Win/XPWidgets_64.lib new file mode 100644 index 0000000000000000000000000000000000000000..48f131744e2aa2584a54b67fb767b0a337a78b22 GIT binary patch literal 10830 zcmcgyOK%iM5H1@6iNnKy<2SH=+j#(Xb~m6z$Y5izu+7NWVGj{zy)(w6taq&0aT4c} zON62*N2J_2Mkwbfhln4LLzF`lag0z798iuqAd%|s>7IVf3=F$ur1H#ERrlB3Q&nAE z>w%BTer5A~+v%KoO%~3cotn%S^LdqjCVZWmIy=Q4Z?yryD!|eE03DA3I!6KeLK++f zAk=$>QU5*wL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>qW~*U^g4upzrT5O(XIGi-P;Iq!ZQTe@~QM=8b zi^n5zZ@<7}hlM80PV6q%_m9Bd4tYPJL4D=%!*h{@Ws=J z*hUf4j!y=BcI!#NC$aBMj;|ffnt;j^0&Sg#5cL2@RgQg)V-^!I-$TrU95dla**LmL zfnsKSNI~bv)h1x3MBKw1lX*;Z6gFV9T67^HK44)KtDhtuiQ1HOmNQ^8TXHeMcS*JQ zh>EM9;0^Gsb1o)CDJ=Zr*+rSNTpVZ^H!X8Hrs9gTu>qQSrPEM5R8(>9ZX7kuf8SD3 zje1Gr=xNzYr-~lcVhq^KcEyu_Eoz)XyXuNi4h(jw9zLyi8+ zrSUJCkWrA+zz{{#O2&;Nrr7N;L)5F$jbo;qA4fvWsL*Y|WskWjC-PB-Cl}ETz|4M` aav~pNcuIZV0L(talwD< Date: Sat, 6 Nov 2021 12:52:07 -0400 Subject: [PATCH 3/8] Updated CMakeLists.txt for new SDK folder name --- src/CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a277458d..84724caf 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -20,9 +20,9 @@ endif () set(CMAKE_CXX_STANDARD 14) # Set include directories used by our code and dependencies. -include_directories("${CMAKE_SOURCE_DIR}/XPSDK301/CHeaders/Widgets") -include_directories("${CMAKE_SOURCE_DIR}/XPSDK301/CHeaders/Wrappers") -include_directories("${CMAKE_SOURCE_DIR}/XPSDK301/CHeaders/XPLM") +include_directories("${CMAKE_SOURCE_DIR}/SDK/CHeaders/Widgets") +include_directories("${CMAKE_SOURCE_DIR}/SDK/CHeaders/Wrappers") +include_directories("${CMAKE_SOURCE_DIR}/SDK/CHeaders/XPLM") include_directories("${CMAKE_SOURCE_DIR}/include64") include_directories("${CMAKE_SOURCE_DIR}/hidapi") include_directories("${CMAKE_SOURCE_DIR}/.") @@ -39,15 +39,15 @@ endif (WIN32) if (WIN32) list(APPEND CMAKE_LIBRARY_PATH "${CMAKE_SOURCE_DIR}/include64") list(APPEND CMAKE_LIBRARY_PATH "${CMAKE_SOURCE_DIR}/GLUT_for_Windows/GL") - list(APPEND CMAKE_LIBRARY_PATH "${CMAKE_SOURCE_DIR}/XPSDK301/Libraries/Win") + list(APPEND CMAKE_LIBRARY_PATH "${CMAKE_SOURCE_DIR}/SDK/Libraries/Win") elseif (APPLE) - list(APPEND CMAKE_FRAMEWORK_PATH "${CMAKE_SOURCE_DIR}/XPSDK301/Libraries/Mac") + list(APPEND CMAKE_FRAMEWORK_PATH "${CMAKE_SOURCE_DIR}/SDK/Libraries/Mac") elseif (UNIX) endif () # Enable all X-Plane SDK APIs up to the newest version. -add_definitions(-DXPLM200=1 -DXPLM210=1 -DXPLM300=1 -DXPLM301=1) +add_definitions(-DXPLM200=1 -DXPLM210=1 -DXPLM300=1 -DXPLM301=1 -DXPLM303=1) # Define platform macros. add_definitions(-DAPL=$ -DIBM=$ -DLIN=$,$>>) From 368062bdb56a419070d69957293d6f3cd6bdf5f4 Mon Sep 17 00:00:00 2001 From: sparker256 Date: Sat, 6 Nov 2021 13:40:40 -0400 Subject: [PATCH 4/8] Try previous SDK --- src/CMakeLists.txt | 2 +- src/SDK/CHeaders/Widgets/XPStandardWidgets.h | 477 ++--- src/SDK/CHeaders/Widgets/XPUIGraphics.h | 420 ++--- src/SDK/CHeaders/Widgets/XPWidgetDefs.h | 590 +++--- src/SDK/CHeaders/Widgets/XPWidgetUtils.h | 202 +- src/SDK/CHeaders/Widgets/XPWidgets.h | 686 +++---- src/SDK/CHeaders/XPLM/XPLMCamera.h | 162 +- src/SDK/CHeaders/XPLM/XPLMDataAccess.h | 819 ++++---- src/SDK/CHeaders/XPLM/XPLMDefs.h | 174 +- src/SDK/CHeaders/XPLM/XPLMDisplay.h | 1744 +++++++++-------- src/SDK/CHeaders/XPLM/XPLMGraphics.h | 576 +++--- src/SDK/CHeaders/XPLM/XPLMInstance.h | 117 +- src/SDK/CHeaders/XPLM/XPLMMap.h | 738 ++++---- src/SDK/CHeaders/XPLM/XPLMMenus.h | 283 +-- src/SDK/CHeaders/XPLM/XPLMNavigation.h | 361 ++-- src/SDK/CHeaders/XPLM/XPLMPlanes.h | 290 ++- src/SDK/CHeaders/XPLM/XPLMPlugin.h | 388 ++-- src/SDK/CHeaders/XPLM/XPLMProcessing.h | 258 ++- src/SDK/CHeaders/XPLM/XPLMScenery.h | 422 +++-- src/SDK/CHeaders/XPLM/XPLMUtilities.h | 1333 ++++++------- src/SDK/Delphi/Widgets/XPStandardWidgets.pas | 346 ++-- src/SDK/Delphi/Widgets/XPUIGraphics.pas | 349 ++-- src/SDK/Delphi/Widgets/XPWidgetDefs.pas | 502 ++--- src/SDK/Delphi/Widgets/XPWidgetUtils.pas | 208 ++- src/SDK/Delphi/Widgets/XPWidgets.pas | 713 ++++--- src/SDK/Delphi/XPLM/XPLMCamera.pas | 172 +- src/SDK/Delphi/XPLM/XPLMDataAccess.pas | 796 ++++---- src/SDK/Delphi/XPLM/XPLMDefs.pas | 168 +- src/SDK/Delphi/XPLM/XPLMDisplay.pas | 1757 ++++++++++-------- src/SDK/Delphi/XPLM/XPLMGraphics.pas | 522 +++--- src/SDK/Delphi/XPLM/XPLMInstance.pas | 126 +- src/SDK/Delphi/XPLM/XPLMMap.pas | 713 +++---- src/SDK/Delphi/XPLM/XPLMMenus.pas | 304 +-- src/SDK/Delphi/XPLM/XPLMNavigation.pas | 395 ++-- src/SDK/Delphi/XPLM/XPLMPlanes.pas | 357 ++-- src/SDK/Delphi/XPLM/XPLMPlugin.pas | 455 +++-- src/SDK/Delphi/XPLM/XPLMProcessing.pas | 290 +-- src/SDK/Delphi/XPLM/XPLMScenery.pas | 484 ++--- src/SDK/Delphi/XPLM/XPLMUtilities.pas | 1412 +++++++------- src/SDK/Libraries/Mac/XPLM.framework/XPLM | Bin 214288 -> 206576 bytes src/SDK/Libraries/Win/XPLM_64.lib | Bin 49542 -> 48750 bytes src/SDK/Libraries/Win/XPWidgets_64.lib | Bin 10830 -> 10830 bytes 42 files changed, 10257 insertions(+), 9854 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 84724caf..6bb7ecb0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -47,7 +47,7 @@ endif () # Enable all X-Plane SDK APIs up to the newest version. -add_definitions(-DXPLM200=1 -DXPLM210=1 -DXPLM300=1 -DXPLM301=1 -DXPLM303=1) +add_definitions(-DXPLM200=1 -DXPLM210=1 -DXPLM300=1 -DXPLM301=1) # Define platform macros. add_definitions(-DAPL=$ -DIBM=$ -DLIN=$,$>>) diff --git a/src/SDK/CHeaders/Widgets/XPStandardWidgets.h b/src/SDK/CHeaders/Widgets/XPStandardWidgets.h index 42d49876..f0c65545 100755 --- a/src/SDK/CHeaders/Widgets/XPStandardWidgets.h +++ b/src/SDK/CHeaders/Widgets/XPStandardWidgets.h @@ -2,29 +2,29 @@ #define _XPStandardWidgets_h_ /* - * 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 * */ -/*************************************************************************** - * XPStandardWidgets - ***************************************************************************/ /* - * ## THEORY OF OPERATION + * XPStandardWidgets - THEORY OF OPERATION * - * The standard widgets are widgets built into the widgets library. While you - * can gain access to the widget function that drives them, you generally use - * them by calling XPCreateWidget and then listening for special messages, - * etc. + * The standard widgets are widgets built into the widgets library. While you + * can gain access to the widget function that drives them, you generally use + * them by calling XPCreateWidget and then listening for special messages, + * etc. * - * The standard widgets often send mesages to themselves when the user - * performs an event; these messages are sent up the widget hierarchy until - * they are handled. So you can add a widget proc directly to a push button - * (for example) to intercept the message when it is clicked, or you can put - * one widget proc on a window for all of the push buttons in the window. Most - * of these messages contain the original widget ID as a parameter so you can - * know which widget is messaging no matter who it is sent to. + * The standard widgets often send mesages to themselves when the user + * performs an event; these messages are sent up the widget hierarchy until + * they are handled. So you can add a widget proc directly to a push button + * (for example) to intercept the message when it is clicked, or you can put + * one widget proc on a window for all of the push buttons in the window. Most + * of these messages contain the original widget ID as a parameter so you can + * know which widget is messaging no matter who it is sent to. * */ @@ -38,9 +38,9 @@ extern "C" { * MAIN WINDOW ***************************************************************************/ /* - * The main window widget class provides a "window" as the user knows it. - * These windows are dragable and can be selected. Use them to create floating - * windows and non-modal dialogs. + * The main window widget class provides a "window" as the user knows it. + * These windows are dragable and can be selected. Use them to create floating + * windows and non-modal dialogs. * */ @@ -50,42 +50,44 @@ extern "C" { /* * Main Window Type Values * - * These type values are used to control the appearance of a main window. + * These type values are used to control the appearance of a main window. * */ enum { - /* The standard main window; pin stripes on XP7, metal frame on XP 6. */ - xpMainWindowStyle_MainWindow = 0, + /* The standard main window; pin stripes on XP7, metal frame on XP 6. */ + xpMainWindowStyle_MainWindow = 0 - /* A translucent dark gray window, like the one ATC messages appear in. */ - xpMainWindowStyle_Translucent = 1, + /* A translucent dark gray window, like the one ATC messages appear in. */ + ,xpMainWindowStyle_Translucent = 1 }; /* - * Main Window Properties + * Main Window Properties + * * */ enum { - /* This property specifies the type of window. Set to one of the main window * - * types above. */ - xpProperty_MainWindowType = 1100, + /* This property specifies the type of window. Set to one of the main window * + * types above. */ + xpProperty_MainWindowType = 1100 - /* This property specifies whether the main window has close boxes in its * - * corners. */ - xpProperty_MainWindowHasCloseBoxes = 1200, + /* This property specifies whether the main window has close boxes in its * + * corners. */ + ,xpProperty_MainWindowHasCloseBoxes = 1200 }; /* - * MainWindow Messages + * MainWindow Messages + * * */ enum { - /* This message is sent when the close buttons are pressed for your window. */ - xpMessage_CloseButtonPushed = 1200, + /* This message is sent when the close buttons are pressed for your window. */ + xpMessage_CloseButtonPushed = 1200 }; @@ -94,9 +96,9 @@ enum { * SUB WINDOW ***************************************************************************/ /* - * X-Plane dialogs are divided into separate areas; the sub window widgets - * allow you to make these areas. Create one main window and place several - * subwindows inside it. Then place your controls inside the subwindows. + * X-Plane dialogs are divided into separate areas; the sub window widgets + * allow you to make these areas. Create one main window and place several + * subwindows inside it. Then place your controls inside the subwindows. * */ @@ -106,30 +108,31 @@ enum { /* * SubWindow Type Values * - * These values control the appearance of the subwindow. + * These values control the appearance of the subwindow. * */ enum { - /* A panel that sits inside a main window. */ - xpSubWindowStyle_SubWindow = 0, + /* A panel that sits inside a main window. */ + xpSubWindowStyle_SubWindow = 0 - /* A screen that sits inside a panel for showing text information. */ - xpSubWindowStyle_Screen = 2, + /* A screen that sits inside a panel for showing text information. */ + ,xpSubWindowStyle_Screen = 2 - /* A list view for scrolling lists. */ - xpSubWindowStyle_ListView = 3, + /* A list view for scrolling lists. */ + ,xpSubWindowStyle_ListView = 3 }; /* - * SubWindow Properties + * SubWindow Properties + * * */ enum { - /* This property specifies the type of window. Set to one of the subwindow * - * types above. */ - xpProperty_SubWindowType = 1200, + /* This property specifies the type of window. Set to one of the subwindow * + * types above. */ + xpProperty_SubWindowType = 1200 }; @@ -138,22 +141,22 @@ enum { * BUTTON ***************************************************************************/ /* - * The button class provides a number of different button styles and - * behaviors, including push buttons, radio buttons, check boxes, etc. The - * button label appears on or next to the button depending on the button's - * appearance, or type. + * The button class provides a number of different button styles and + * behaviors, including push buttons, radio buttons, check boxes, etc. The + * button label appears on or next to the button depending on the button's + * appearance, or type. * - * The button's behavior is a separate property that dictates who it hilights - * and what kinds of messages it sends. Since behavior and type are different, - * you can do strange things like make check boxes that act as push buttons or - * push buttons with radio button behavior. + * The button's behavior is a separate property that dictates who it hilights + * and what kinds of messages it sends. Since behavior and type are different, + * you can do strange things like make check boxes that act as push buttons or + * push buttons with radio button behavior. * - * In X-Plane 6 there were no check box graphics. The result is the following - * behavior: in X-Plane - * 6 all check box and radio buttons are round (radio-button style) buttons; - * in X-Plane 7 they are all square (check-box style) buttons. In a future - * version of X-Plane, the xpButtonBehavior enums will provide the correct - * graphic (check box or radio button) giving the expected result. + * In X-Plane 6 there were no check box graphics. The result is the following + * behavior: in X-Plane 6 all check box and radio buttons are round + * (radio-button style) buttons; in X-Plane 7 they are all square (check-box + * style) buttons. In a future version of X-Plane, the xpButtonBehavior enums + * will provide the correct graphic (check box or radio button) giving the + * expected result. * */ @@ -163,27 +166,27 @@ enum { /* * Button Types * - * These define the visual appearance of buttons but not how they respond to - * the mouse. + * These define the visual appearance of buttons but not how they respond to + * the mouse. * */ enum { - /* This is a standard push button, like an 'OK' or 'Cancel' button in a dialog* - * box. */ - xpPushButton = 0, + /* This is a standard push button, like an 'OK' or 'Cancel' button in a dialog * + * box. */ + xpPushButton = 0 - /* A check box or radio button. Use this and the button behaviors below to * - * get the desired behavior. */ - xpRadioButton = 1, + /* A check box or radio button. Use this and the button behaviors below to * + * get the desired behavior. */ + ,xpRadioButton = 1 - /* A window close box. */ - xpWindowCloseBox = 3, + /* A window close box. */ + ,xpWindowCloseBox = 3 - /* A small down arrow. */ - xpLittleDownArrow = 5, + /* A small down arrow. */ + ,xpLittleDownArrow = 5 - /* A small up arrow. */ - xpLittleUpArrow = 6, + /* A small up arrow. */ + ,xpLittleUpArrow = 6 }; @@ -191,44 +194,45 @@ enum { /* * Button Behavior Values * - * These define how the button responds to mouse clicks. + * These define how the button responds to mouse clicks. * */ enum { - /* Standard push button behavior. The button hilites while the mouse is * - * clicked over it and unhilites when the mouse is moved outside of it or * - * released. If the mouse is released over the button, the * - * xpMsg_PushButtonPressed message is sent. */ - xpButtonBehaviorPushButton = 0, + /* Standard push button behavior. The button hilites while the mouse is * + * clicked over it and unhilites when the mouse is moved outside of it or * + * released. If the mouse is released over the button, the * + * xpMsg_PushButtonPressed message is sent. */ + xpButtonBehaviorPushButton = 0 - /* Check box behavior. The button immediately toggles its value when the mouse* - * is clicked and sends out a xpMsg_ButtonStateChanged message. */ - xpButtonBehaviorCheckBox = 1, + /* Check box behavior. The button immediately toggles its value when the mouse * + * is clicked and sends out a xpMsg_ButtonStateChanged message. */ + ,xpButtonBehaviorCheckBox = 1 - /* Radio button behavior. The button immediately sets its state to one and * - * sends out a xpMsg_ButtonStateChanged message if it was not already set to * - * one. You must turn off other radio buttons in a group in your code. */ - xpButtonBehaviorRadioButton = 2, + /* Radio button behavior. The button immediately sets its state to one and * + * sends out a xpMsg_ButtonStateChanged message if it was not already set to * + * one. You must turn off other radio buttons in a group in your code. */ + ,xpButtonBehaviorRadioButton = 2 }; /* - * Button Properties + * Button Properties + * * */ enum { - /* This property sets the visual type of button. Use one of the button types * - * above. */ - xpProperty_ButtonType = 1300, + /* This property sets the visual type of button. Use one of the button types * + * above. */ + xpProperty_ButtonType = 1300 - /* This property sets the button's behavior. Use one of the button behaviors * - * above. */ - xpProperty_ButtonBehavior = 1301, + /* This property sets the button's behavior. Use one of the button behaviors * + * above. */ + ,xpProperty_ButtonBehavior = 1301 - /* This property tells whether a check box or radio button is "checked" or * - * not. Not used for push buttons. */ - xpProperty_ButtonState = 1302, + /* This property tells whether a check box or radio button is "checked" or * + * not. Not used for push buttons. */ + ,xpProperty_ButtonState = 1302 }; @@ -236,25 +240,25 @@ enum { /* * Button Messages * - * These messages are sent by the button to itself and then up the widget - * chain when the button is clicked. (You may intercept them by providing a - * widget handler for the button itself or by providing a handler in a parent - * widget.) + * These messages are sent by the button to itself and then up the widget + * chain when the button is clicked. (You may intercept them by providing a + * widget handler for the button itself or by providing a handler in a parent + * widget.) * */ enum { - /* This message is sent when the user completes a click and release in a * - * button with push button behavior. Parameter one of the message is the * - * widget ID of the button. This message is dispatched up the widget * - * hierarchy. */ - xpMsg_PushButtonPressed = 1300, + /* This message is sent when the user completes a click and release in a * + * button with push button behavior. Parameter one of the message is the * + * widget ID of the button. This message is dispatched up the widget * + * hierarchy. */ + xpMsg_PushButtonPressed = 1300 - /* This message is sent when a button is clicked that has radio button or * - * check box behavior and its value changes. (Note that if the value changes * - * by setting a property you do not receive this message!) Parameter one is * - * the widget ID of the button, parameter 2 is the new state value, either * - * zero or one. This message is dispatched up the widget hierarchy. */ - xpMsg_ButtonStateChanged = 1301, + /* This message is sent when a button is clicked that has radio button or * + * check box behavior and its value changes. (Note that if the value changes * + * by setting a property you do not receive this message!) Parameter one is * + * the widget ID of the button, parameter 2 is the new state value, either * + * zero or one. This message is dispatched up the widget hierarchy. */ + ,xpMsg_ButtonStateChanged = 1301 }; @@ -263,21 +267,21 @@ enum { * TEXT FIELD ***************************************************************************/ /* - * The text field widget provides an editable text field including mouse - * selection and keyboard navigation. The contents of the text field are its - * descriptor. (The descriptor changes as the user types.) + * The text field widget provides an editable text field including mouse + * selection and keyboard navigation. The contents of the text field are its + * descriptor. (The descriptor changes as the user types.) * - * The text field can have a number of types, that effect the visual layout of - * the text field. The text field sends messages to itself so you may control - * its behavior. + * The text field can have a number of types, that effect the visual layout of + * the text field. The text field sends messages to itself so you may control + * its behavior. * - * If you need to filter keystrokes, add a new handler and intercept the key - * press message. Since key presses are passed by pointer, you can modify the - * keystroke and pass it through to the text field widget. + * If you need to filter keystrokes, add a new handler and intercept the key + * press message. Since key presses are passed by pointer, you can modify the + * keystroke and pass it through to the text field widget. * - * WARNING: in X-Plane before 7.10 (including 6.70) null characters could - * crash X-Plane. To prevent this, wrap this object with a filter function - * (more instructions can be found on the SDK website). + * WARNING: in X-Plane before 7.10 (including 6.70) null characters could + * crash X-Plane. To prevent this, wrap this object with a filter function + * (more instructions can be found on the SDK website). * */ @@ -287,73 +291,77 @@ enum { /* * Text Field Type Values * - * These control the look of the text field. + * These control the look of the text field. * */ enum { - /* A field for text entry. */ - xpTextEntryField = 0, + /* A field for text entry. */ + xpTextEntryField = 0 - /* A transparent text field. The user can type and the text is drawn, but no * - * background is drawn. You can draw your own background by adding a widget * - * handler and prehandling the draw message. */ - xpTextTransparent = 3, + /* A transparent text field. The user can type and the text is drawn, but no * + * background is drawn. You can draw your own background by adding a widget * + * handler and prehandling the draw message. */ + ,xpTextTransparent = 3 - /* A translucent edit field, dark gray. */ - xpTextTranslucent = 4, + /* A translucent edit field, dark gray. */ + ,xpTextTranslucent = 4 }; /* - * Text Field Properties + * Text Field Properties + * * */ enum { - /* This is the character position the selection starts at, zero based. If it * - * is the same as the end insertion point, the insertion point is not a * - * selection. */ - xpProperty_EditFieldSelStart = 1400, + /* This is the character position the selection starts at, zero based. If it * + * is the same as the end insertion point, the insertion point is not a * + * selection. */ + xpProperty_EditFieldSelStart = 1400 - /* This is the character position of the end of the selection. */ - xpProperty_EditFieldSelEnd = 1401, + /* This is the character position of the end of the selection. */ + ,xpProperty_EditFieldSelEnd = 1401 - /* This is the character position a drag was started at if the user is * - * dragging to select text, or -1 if a drag is not in progress. */ - xpProperty_EditFieldSelDragStart = 1402, + /* This is the character position a drag was started at if the user is * + * dragging to select text, or -1 if a drag is not in progress. */ + ,xpProperty_EditFieldSelDragStart = 1402 - /* This is the type of text field to display, from the above list. */ - xpProperty_TextFieldType = 1403, + /* This is the type of text field to display, from the above list. */ + ,xpProperty_TextFieldType = 1403 - /* Set this property to 1 to password protect the field. Characters will be * - * drawn as *s even though the descriptor will contain plain-text. */ - xpProperty_PasswordMode = 1404, + /* Set this property to 1 to password protect the field. Characters will be * + * drawn as *s even though the descriptor will contain plain-text. */ + ,xpProperty_PasswordMode = 1404 - /* The max number of characters you can enter, if limited. Zero means * - * unlimited. */ - xpProperty_MaxCharacters = 1405, + /* The max number of characters you can enter, if limited. Zero means * + * unlimited. */ + ,xpProperty_MaxCharacters = 1405 - /* The first visible character on the left. This effectively scrolls the text* - * field. */ - xpProperty_ScrollPosition = 1406, + /* The first visible character on the left. This effectively scrolls the text * + * field. */ + ,xpProperty_ScrollPosition = 1406 - /* The font to draw the field's text with. (An XPLMFontID.) */ - xpProperty_Font = 1407, + /* The font to draw the field's text with. (An XPLMFontID.) */ + ,xpProperty_Font = 1407 - /* This is the active side of the insert selection. (Internal) */ - xpProperty_ActiveEditSide = 1408, + /* This is the active side of the insert selection. (Internal) */ + ,xpProperty_ActiveEditSide = 1408 }; /* - * Text Field Messages + * Text Field Messages + * * */ enum { - /* The text field sends this message to itself when its text changes. It sends* - * the message up the call chain; param1 is the text field's widget ID. */ - xpMsg_TextFieldChanged = 1400, + /* Text Field Messages * + * * + * The text field sends this message to itself when its text changes. It sends * + * the message up the call chain; param1 is the text field's widget ID. */ + xpMsg_TextFieldChanged = 1400 }; @@ -362,9 +370,9 @@ enum { * SCROLL BAR ***************************************************************************/ /* - * A standard scroll bar or slider control. The scroll bar has a minimum, - * maximum and current value that is updated when the user drags it. The - * scroll bar sends continuous messages as it is dragged. + * A standard scroll bar or slider control. The scroll bar has a minimum, + * maximum and current value that is updated when the user drags it. The + * scroll bar sends continuous messages as it is dragged. * */ @@ -374,54 +382,58 @@ enum { /* * Scroll Bar Type Values * - * This defines how the scroll bar looks. + * This defines how the scroll bar looks. * */ enum { - /* A standard X-Plane scroll bar (with arrows on the ends). */ - xpScrollBarTypeScrollBar = 0, + /* Scroll bar types. * + * * + * A standard X-Plane scroll bar (with arrows on the ends). */ + xpScrollBarTypeScrollBar = 0 - /* A slider, no arrows. */ - xpScrollBarTypeSlider = 1, + /* A slider, no arrows. */ + ,xpScrollBarTypeSlider = 1 }; /* - * Scroll Bar Properties + * Scroll Bar Properties + * * */ enum { - /* The current position of the thumb (in between the min and max, inclusive) */ - xpProperty_ScrollBarSliderPosition = 1500, + /* The current position of the thumb (in between the min and max, inclusive) */ + xpProperty_ScrollBarSliderPosition = 1500 - /* The value the scroll bar has when the thumb is in the lowest position. */ - xpProperty_ScrollBarMin = 1501, + /* The value the scroll bar has when the thumb is in the lowest position. */ + ,xpProperty_ScrollBarMin = 1501 - /* The value the scroll bar has when the thumb is in the highest position. */ - xpProperty_ScrollBarMax = 1502, + /* The value the scroll bar has when the thumb is in the highest position. */ + ,xpProperty_ScrollBarMax = 1502 - /* How many units to move the scroll bar when clicking next to the thumb. The * - * scroll bar always moves one unit when the arrows are clicked. */ - xpProperty_ScrollBarPageAmount = 1503, + /* How many units to moev the scroll bar when clicking next to the thumb. The * + * scroll bar always moves one unit when the arrows are clicked. */ + ,xpProperty_ScrollBarPageAmount = 1503 - /* The type of scrollbar from the enums above. */ - xpProperty_ScrollBarType = 1504, + /* The type of scrollbar from the enums above. */ + ,xpProperty_ScrollBarType = 1504 - /* Used internally. */ - xpProperty_ScrollBarSlop = 1505, + /* Used internally. */ + ,xpProperty_ScrollBarSlop = 1505 }; /* - * Scroll Bar Messages + * Scroll Bar Messages + * * */ enum { - /* The scroll bar sends this message when the slider position changes. It * - * sends the message up the call chain; param1 is the Scroll Bar widget ID. */ - xpMsg_ScrollBarSliderPositionChanged = 1500, + /* The Scroll Bar sends this message when the slider position changes. It * + * sends the message up the call chain; param1 is the Scroll Bar widget ID. */ + xpMsg_ScrollBarSliderPositionChanged = 1500 }; @@ -430,9 +442,9 @@ enum { * CAPTION ***************************************************************************/ /* - * A caption is a simple widget that shows its descriptor as a string, useful - * for labeling parts of a window. It always shows its descriptor as its - * string and is otherwise transparent. + * A caption is a simple widget that shows its descriptor as a string, useful + * for labeling parts of a window. It always shows its descriptor as its + * string and is otherwise transparent. * */ @@ -440,13 +452,14 @@ enum { #define xpWidgetClass_Caption 6 /* - * Caption Properties + * Caption Properties + * * */ enum { - /* This property specifies whether the caption is lit; use lit captions * - * against screens. */ - xpProperty_CaptionLit = 1600, + /* This property specifies whether the caption is lit; use lit captions * + * against screens. */ + xpProperty_CaptionLit = 1600 }; @@ -455,8 +468,8 @@ enum { * GENERAL GRAPHICS ***************************************************************************/ /* - * The general graphics widget can show one of many icons available from - * X-Plane. + * The general graphics widget can show one of many icons available from + * X-Plane. * */ @@ -466,58 +479,59 @@ enum { /* * General Graphics Types Values * - * These define the icon for the general graphics. + * These define the icon for the general graphics. * */ enum { - xpShip = 4, + xpShip = 4 - xpILSGlideScope = 5, + ,xpILSGlideScope = 5 - xpMarkerLeft = 6, + ,xpMarkerLeft = 6 - xp_Airport = 7, + ,xp_Airport = 7 - xpNDB = 8, + ,xpNDB = 8 - xpVOR = 9, + ,xpVOR = 9 - xpRadioTower = 10, + ,xpRadioTower = 10 - xpAircraftCarrier = 11, + ,xpAircraftCarrier = 11 - xpFire = 12, + ,xpFire = 12 - xpMarkerRight = 13, + ,xpMarkerRight = 13 - xpCustomObject = 14, + ,xpCustomObject = 14 - xpCoolingTower = 15, + ,xpCoolingTower = 15 - xpSmokeStack = 16, + ,xpSmokeStack = 16 - xpBuilding = 17, + ,xpBuilding = 17 - xpPowerLine = 18, + ,xpPowerLine = 18 - xpVORWithCompassRose = 19, + ,xpVORWithCompassRose = 19 - xpOilPlatform = 21, + ,xpOilPlatform = 21 - xpOilPlatformSmall = 22, + ,xpOilPlatformSmall = 22 - xpWayPoint = 23, + ,xpWayPoint = 23 }; /* - * General Graphics Properties + * General Graphics Properties + * * */ enum { - /* This property controls the type of icon that is drawn. */ - xpProperty_GeneralGraphicsType = 1700, + /* This property controls the type of icon that is drawn. */ + xpProperty_GeneralGraphicsType = 1700 }; @@ -526,25 +540,26 @@ enum { * PROGRESS INDICATOR ***************************************************************************/ /* - * This widget implements a progress indicator as seen when X-Plane starts up. + * This widget implements a progress indicator as seen when X-Plane starts up. * */ #define xpWidgetClass_Progress 8 /* - * Progress Indicator Properties + * Progress Indicator Properties + * * */ enum { - /* This is the current value of the progress indicator. */ - xpProperty_ProgressPosition = 1800, + /* This is the current value of the progress indicator. */ + xpProperty_ProgressPosition = 1800 - /* This is the minimum value, equivalent to 0% filled. */ - xpProperty_ProgressMin = 1801, + /* This is the minimum value, equivalent to 0% filled. */ + ,xpProperty_ProgressMin = 1801 - /* This is the maximum value, equivalent to 100% filled. */ - xpProperty_ProgressMax = 1802, + /* This is the maximum value, equivalent to 100% filled. */ + ,xpProperty_ProgressMax = 1802 }; diff --git a/src/SDK/CHeaders/Widgets/XPUIGraphics.h b/src/SDK/CHeaders/Widgets/XPUIGraphics.h index b70e0f65..bbf510a1 100755 --- a/src/SDK/CHeaders/Widgets/XPUIGraphics.h +++ b/src/SDK/CHeaders/Widgets/XPUIGraphics.h @@ -2,14 +2,18 @@ #define _XPUIGraphics_h_ /* - * 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 * */ -/*************************************************************************** - * XPUIGraphics - ***************************************************************************/ +/* + * + * + */ #include "XPWidgetDefs.h" @@ -20,43 +24,47 @@ extern "C" { /*************************************************************************** * UI GRAPHICS ***************************************************************************/ +/* + * + * + */ /* * XPWindowStyle * - * There are a few built-in window styles in X-Plane that you can use. + * There are a few built-in window styles in X-Plane that you can use. * - * Note that X-Plane 6 does not offer real shadow-compositing; you must make - * sure to put a window on top of another window of the right style to the - * shadows work, etc. This applies to elements with insets and shadows. The - * rules are: + * Note that X-Plane 6 does not offer real shadow-compositing; you must make + * sure to put a window on top of another window of the right style to the + * shadows work, etc. This applies to elements with insets and shadows. The + * rules are: * - * Sub windows must go on top of main windows, and screens and list views on - * top of subwindows. Only help and main windows can be over the main screen. + * Sub windows must go on top of main windows, and screens and list views on + * top of subwindows. Only help and main windows can be over the main screen. * - * With X-Plane 7 any window or element may be placed over any other element. + * With X-Plane 7 any window or element may be placed over any other element. * - * Some windows are scaled by stretching, some by repeating. The drawing - * routines know which scaling method to use. The list view cannot be rescaled - * in X-Plane 6 because it has both a repeating pattern and a gradient in one - * element. All other elements can be rescaled. + * Some windows are scaled by stretching, some by repeating. The drawing + * routines know which scaling method to use. The list view cannot be rescaled + * in X-Plane 6 because it has both a repeating pattern and a gradient in one + * element. All other elements can be rescaled. * */ enum { - /* An LCD screen that shows help. */ - xpWindow_Help = 0, + /* An LCD screen that shows help. */ + xpWindow_Help = 0 - /* A dialog box window. */ - xpWindow_MainWindow = 1, + /* A dialog box window. */ + ,xpWindow_MainWindow = 1 - /* A panel or frame within a dialog box window. */ - xpWindow_SubWindow = 2, + /* A panel or frame within a dialog box window. */ + ,xpWindow_SubWindow = 2 - /* An LCD screen within a panel to hold text displays. */ - xpWindow_Screen = 4, + /* An LCD screen within a panel to hold text displays. */ + ,xpWindow_Screen = 4 - /* A list view within a panel for scrolling file names, etc. */ - xpWindow_ListView = 5, + /* A list view within a panel for scrolling file names, etc. */ + ,xpWindow_ListView = 5 }; @@ -65,153 +73,153 @@ typedef int XPWindowStyle; /* * XPDrawWindow * - * This routine draws a window of the given dimensions at the given offset on - * the virtual screen in a given style. The window is automatically scaled as - * appropriate using a bitmap scaling technique (scaling or repeating) as - * appropriate to the style. + * This routine draws a window of the given dimensions at the given offset on + * the virtual screen in a given style. The window is automatically scaled as + * appropriate using a bitmap scaling technique (scaling or repeating) as + * appropriate to the style. * */ -WIDGET_API void XPDrawWindow( - int inX1, - int inY1, - int inX2, - int inY2, - XPWindowStyle inStyle); +WIDGET_API void XPDrawWindow( + int inX1, + int inY1, + int inX2, + int inY2, + XPWindowStyle inStyle); /* * XPGetWindowDefaultDimensions * - * This routine returns the default dimensions for a window. Output is either - * a minimum or fixed value depending on whether the window is scalable. + * This routine returns the default dimensions for a window. Output is either + * a minimum or fixed value depending on whether the window is scalable. * */ -WIDGET_API void XPGetWindowDefaultDimensions( - XPWindowStyle inStyle, - int * outWidth, /* Can be NULL */ - int * outHeight); /* Can be NULL */ +WIDGET_API void XPGetWindowDefaultDimensions( + XPWindowStyle inStyle, + int * outWidth, /* Can be NULL */ + int * outHeight); /* Can be NULL */ /* * XPElementStyle * - * Elements are individually drawable UI things like push buttons, etc. The - * style defines what kind of element you are drawing. Elements can be - * stretched in one or two dimensions (depending on the element). Some - * elements can be lit. + * Elements are individually drawable UI things like push buttons, etc. The + * style defines what kind of element you are drawing. Elements can be + * stretched in one or two dimensions (depending on the element). Some + * elements can be lit. * - * In X-Plane 6 some elements must be drawn over metal. Some are scalable and - * some are not. Any element can be drawn anywhere in X-Plane 7. + * In X-Plane 6 some elements must be drawn over metal. Some are scalable and + * some are not. Any element can be drawn anywhere in X-Plane 7. * - * Scalable Axis Required Background + * Scalable Axis Required Background * */ enum { - /* x metal */ - xpElement_TextField = 6, + /* x metal */ + xpElement_TextField = 6 - /* none metal */ - xpElement_CheckBox = 9, + /* none metal */ + ,xpElement_CheckBox = 9 - /* none metal */ - xpElement_CheckBoxLit = 10, + /* none metal */ + ,xpElement_CheckBoxLit = 10 - /* none window header */ - xpElement_WindowCloseBox = 14, + /* none window header */ + ,xpElement_WindowCloseBox = 14 - /* none window header */ - xpElement_WindowCloseBoxPressed = 15, + /* none window header */ + ,xpElement_WindowCloseBoxPressed = 15 - /* x metal */ - xpElement_PushButton = 16, + /* x metal */ + ,xpElement_PushButton = 16 - /* x metal */ - xpElement_PushButtonLit = 17, + /* x metal */ + ,xpElement_PushButtonLit = 17 - /* none any */ - xpElement_OilPlatform = 24, + /* none any */ + ,xpElement_OilPlatform = 24 - /* none any */ - xpElement_OilPlatformSmall = 25, + /* none any */ + ,xpElement_OilPlatformSmall = 25 - /* none any */ - xpElement_Ship = 26, + /* none any */ + ,xpElement_Ship = 26 - /* none any */ - xpElement_ILSGlideScope = 27, + /* none any */ + ,xpElement_ILSGlideScope = 27 - /* none any */ - xpElement_MarkerLeft = 28, + /* none any */ + ,xpElement_MarkerLeft = 28 - /* none any */ - xpElement_Airport = 29, + /* none any */ + ,xpElement_Airport = 29 - /* none any */ - xpElement_Waypoint = 30, + /* none any */ + ,xpElement_Waypoint = 30 - /* none any */ - xpElement_NDB = 31, + /* none any */ + ,xpElement_NDB = 31 - /* none any */ - xpElement_VOR = 32, + /* none any */ + ,xpElement_VOR = 32 - /* none any */ - xpElement_RadioTower = 33, + /* none any */ + ,xpElement_RadioTower = 33 - /* none any */ - xpElement_AircraftCarrier = 34, + /* none any */ + ,xpElement_AircraftCarrier = 34 - /* none any */ - xpElement_Fire = 35, + /* none any */ + ,xpElement_Fire = 35 - /* none any */ - xpElement_MarkerRight = 36, + /* none any */ + ,xpElement_MarkerRight = 36 - /* none any */ - xpElement_CustomObject = 37, + /* none any */ + ,xpElement_CustomObject = 37 - /* none any */ - xpElement_CoolingTower = 38, + /* none any */ + ,xpElement_CoolingTower = 38 - /* none any */ - xpElement_SmokeStack = 39, + /* none any */ + ,xpElement_SmokeStack = 39 - /* none any */ - xpElement_Building = 40, + /* none any */ + ,xpElement_Building = 40 - /* none any */ - xpElement_PowerLine = 41, + /* none any */ + ,xpElement_PowerLine = 41 - /* none metal */ - xpElement_CopyButtons = 45, + /* none metal */ + ,xpElement_CopyButtons = 45 - /* none metal */ - xpElement_CopyButtonsWithEditingGrid = 46, + /* none metal */ + ,xpElement_CopyButtonsWithEditingGrid = 46 - /* x, y metal */ - xpElement_EditingGrid = 47, + /* x, y metal */ + ,xpElement_EditingGrid = 47 - /* THIS CAN PROBABLY BE REMOVED */ - xpElement_ScrollBar = 48, + /* THIS CAN PROBABLY BE REMOVED */ + ,xpElement_ScrollBar = 48 - /* none any */ - xpElement_VORWithCompassRose = 49, + /* none any */ + ,xpElement_VORWithCompassRose = 49 - /* none metal */ - xpElement_Zoomer = 51, + /* none metal */ + ,xpElement_Zoomer = 51 - /* x, y metal */ - xpElement_TextFieldMiddle = 52, + /* x, y metal */ + ,xpElement_TextFieldMiddle = 52 - /* none metal */ - xpElement_LittleDownArrow = 53, + /* none metal */ + ,xpElement_LittleDownArrow = 53 - /* none metal */ - xpElement_LittleUpArrow = 54, + /* none metal */ + ,xpElement_LittleUpArrow = 54 - /* none metal */ - xpElement_WindowDragBar = 61, + /* none metal */ + ,xpElement_WindowDragBar = 61 - /* none metal */ - xpElement_WindowDragBarSmooth = 62, + /* none metal */ + ,xpElement_WindowDragBarSmooth = 62 }; @@ -220,61 +228,59 @@ typedef int XPElementStyle; /* * XPDrawElement * - * XPDrawElement draws a given element at an offset on the virtual screen in - * set dimensions. - * *Even* if the element is not scalable, it will be scaled if the width and - * height do not match the preferred dimensions; it'll just look ugly. Pass - * inLit to see the lit version of the element; if the element cannot be lit - * this is ignored. + * XPDrawElement draws a given element at an offset on the virtual screen in + * set dimensions. EVEN if the element is not scalable, it will be scaled if + * the width and height do not match the preferred dimensions; it'll just look + * ugly. Pass inLit to see the lit version of the element; if the element + * cannot be lit this is ignored. * */ -WIDGET_API void XPDrawElement( - int inX1, - int inY1, - int inX2, - int inY2, - XPElementStyle inStyle, - int inLit); +WIDGET_API void XPDrawElement( + int inX1, + int inY1, + int inX2, + int inY2, + XPElementStyle inStyle, + int inLit); /* * XPGetElementDefaultDimensions * - * This routine returns the recommended or minimum dimensions of a given UI - * element. outCanBeLit tells whether the element has both a lit and unlit - * state. Pass `NULL` to not receive any of these parameters. + * This routine returns the recommended or minimum dimensions of a given UI + * element. outCanBeLit tells whether the element has both a lit and unlit + * state. Pass NULL to not receive any of these parameters. * */ -WIDGET_API void XPGetElementDefaultDimensions( - XPElementStyle inStyle, - int * outWidth, /* Can be NULL */ - int * outHeight, /* Can be NULL */ - int * outCanBeLit); /* Can be NULL */ +WIDGET_API void XPGetElementDefaultDimensions( + XPElementStyle inStyle, + int * outWidth, /* Can be NULL */ + int * outHeight, /* Can be NULL */ + int * outCanBeLit); /* Can be NULL */ /* * XPTrackStyle * - * A track is a UI element that displays a value vertically or horizontally. - * X-Plane has three kinds of tracks: scroll bars, sliders, and progress bars. - * Tracks can be displayed either horizontally or vertically; tracks will - * choose their own layout based on the larger dimension of their dimensions - * (e.g. they know if they are tall or wide). Sliders may be lit or unlit - * (showing the user manipulating them). + * A track is a UI element that displays a value vertically or horizontally. + * X-Plane has three kinds of tracks: scroll bars, sliders, and progress bars. + * Tracks can be displayed either horizontally or vertically; tracks will + * choose their own layout based on the larger dimension of their dimensions + * (e.g. they know if they are tall or wide). Sliders may be lit or unlit + * (showing the user manipulating them). * - * - ScrollBar: this is a standard scroll bar with arrows and a thumb to drag. - * - Slider: this is a simple track with a ball in the middle that can be - * slid. - * - Progress: this is a progress indicator showing how a long task is going. + * ScrollBar - this is a standard scroll bar with arrows and a thumb to drag. + * Slider - this is a simple track with a ball in the middle that can be slid. + * Progress - this is a progress indicator showing how a long task is going. * */ enum { - /* not over metal can be lit can be rotated */ - xpTrack_ScrollBar = 0, + /* not over metal can be lit can be rotated */ + xpTrack_ScrollBar = 0 - /* over metal can be lit can be rotated */ - xpTrack_Slider = 1, + /* over metal can be lit can be rotated */ + ,xpTrack_Slider = 1 - /* over metal cannot be lit cannot be rotated */ - xpTrack_Progress = 2, + /* over metal cannot be lit cannot be rotated */ + ,xpTrack_Progress = 2 }; @@ -283,69 +289,69 @@ typedef int XPTrackStyle; /* * XPDrawTrack * - * This routine draws a track. You pass in the track dimensions and size; the - * track picks the optimal orientation for these dimensions. Pass in the - * track's minimum current and maximum values; the indicator will be - * positioned appropriately. You can also specify whether the track is lit or - * not. + * This routine draws a track. You pass in the track dimensions and size; the + * track picks the optimal orientation for these dimensions. Pass in the + * track's minimum current and maximum values; the indicator will be + * positioned appropriately. You can also specify whether the track is lit or + * not. * */ -WIDGET_API void XPDrawTrack( - int inX1, - int inY1, - int inX2, - int inY2, - int inMin, - int inMax, - int inValue, - XPTrackStyle inTrackStyle, - int inLit); +WIDGET_API void XPDrawTrack( + int inX1, + int inY1, + int inX2, + int inY2, + int inMin, + int inMax, + int inValue, + XPTrackStyle inTrackStyle, + int inLit); /* * XPGetTrackDefaultDimensions * - * This routine returns a track's default smaller dimension; all tracks are - * scalable in the larger dimension. It also returns whether a track can be - * lit. + * This routine returns a track's default smaller dimension; all tracks are + * scalable in the larger dimension. It also returns whether a track can be + * lit. * */ -WIDGET_API void XPGetTrackDefaultDimensions( - XPTrackStyle inStyle, - int * outWidth, - int * outCanBeLit); +WIDGET_API void XPGetTrackDefaultDimensions( + XPTrackStyle inStyle, + int * outWidth, + int * outCanBeLit); /* * XPGetTrackMetrics * - * This routine returns the metrics of a track. If you want to write UI code - * to manipulate a track, this routine helps you know where the mouse - * locations are. For most other elements, the rectangle the element is drawn - * in is enough information. However, the scrollbar drawing routine does some - * automatic placement; this routine lets you know where things ended up. You - * pass almost everything you would pass to the draw routine. You get out the - * orientation, and other useful stuff. + * This routine returns the metrics of a track. If you want to write UI code + * to manipulate a track, this routine helps you know where the mouse + * locations are. For most other elements, the rectangle the element is drawn + * in is enough information. However, the scrollbar drawing routine does some + * automatic placement; this routine lets you know where things ended up. You + * pass almost everything you would pass to the draw routine. You get out the + * orientation, and other useful stuff. * - * Besides orientation, you get five dimensions for the five parts of a - * scrollbar, which are the down button, down area (area before the thumb), - * the thumb, and the up area and button. For horizontal scrollers, the left - * button decreases; for vertical scrollers, the top button decreases. + * Besides orientation, you get five dimensions for the five parts of a + * scrollbar, which are the down button, down area (area before the thumb), + * the thumb, and the up area and button. For horizontal scrollers, the left + * button decreases; for vertical scrollers, the top button decreases. * */ -WIDGET_API void XPGetTrackMetrics( - int inX1, - int inY1, - int inX2, - int inY2, - int inMin, - int inMax, - int inValue, - XPTrackStyle inTrackStyle, - int * outIsVertical, - int * outDownBtnSize, - int * outDownPageSize, - int * outThumbSize, - int * outUpPageSize, - int * outUpBtnSize); +WIDGET_API void XPGetTrackMetrics( + int inX1, + int inY1, + int inX2, + int inY2, + int inMin, + int inMax, + int inValue, + XPTrackStyle inTrackStyle, + int * outIsVertical, + int * outDownBtnSize, + int * outDownPageSize, + int * outThumbSize, + int * outUpPageSize, + int * outUpBtnSize); #ifdef __cplusplus } diff --git a/src/SDK/CHeaders/Widgets/XPWidgetDefs.h b/src/SDK/CHeaders/Widgets/XPWidgetDefs.h index c1b2341f..f01d3a38 100755 --- a/src/SDK/CHeaders/Widgets/XPWidgetDefs.h +++ b/src/SDK/CHeaders/Widgets/XPWidgetDefs.h @@ -2,14 +2,18 @@ #define _XPWidgetDefs_h_ /* - * 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 * */ -/*************************************************************************** - * XPWidgetDefs - ***************************************************************************/ +/* + * + * + */ #include "XPLMDefs.h" @@ -53,11 +57,11 @@ extern "C" { * WIDGET DEFINITIONS ***************************************************************************/ /* - * A widget is a call-back driven screen entity like a push-button, window, - * text entry field, etc. + * A widget is a call-back driven screen entity like a push-button, window, + * text entry field, etc. * - * Use the widget API to create widgets of various classes. You can nest them - * into trees of widgets to create complex user interfaces. + * Use the widget API to create widgets of various classes. You can nest them + * into trees of widgets to create complex user interfaces. * */ @@ -65,10 +69,10 @@ extern "C" { /* * XPWidgetID * - * A Widget ID is an opaque unique non-zero handle identifying your widget. - * Use 0 to specify "no widget". This type is defined as wide enough to hold a - * pointer. You receive a widget ID when you create a new widget and then use - * that widget ID to further refer to the widget. + * A Widget ID is an opaque unique non-zero handle identifying your widget. + * Use 0 to specify "no widget". This type is defined as wide enough to hold a + * pointer. You receive a widget ID when you create a new widget and then use + * that widget ID to further refer to the widget. * */ typedef void * XPWidgetID; @@ -76,50 +80,48 @@ typedef void * XPWidgetID; /* * XPWidgetPropertyID * - * Properties are values attached to instances of your widgets. A property is - * identified by a 32-bit ID and its value is the width of a pointer. + * Properties are values attached to instances of your widgets. A property is + * identified by a 32-bit ID and its value is the width of a pointer. * - * Each widget instance may have a property or not have it. When you set a - * property on a widget for the first time, the property is added to the - * widget; it then stays there for the life of the widget. + * Each widget instance may have a property or not have it. When you set a + * property on a widget for the first time, the property is added to the + * widget; it then stays there for the life of the widget. * - * Some property IDs are predefined by the widget package; you can make up - * your own property IDs as well. + * Some property IDs are predefined by the widget package; you can make up + * your own property IDs as well. * */ enum { - /* A window's refcon is an opaque value used by client code to find other data* - * based on it. */ - xpProperty_Refcon = 0, + /* A window's refcon is an opaque value used by client code to find other data * + * based on it. */ + xpProperty_Refcon = 0 - /* These properties are used by the utlities to implement dragging. */ - xpProperty_Dragging = 1, + /* These properties are used by the utlities to implement dragging. */ + ,xpProperty_Dragging = 1 - xpProperty_DragXOff = 2, + ,xpProperty_DragXOff = 2 - xpProperty_DragYOff = 3, + ,xpProperty_DragYOff = 3 - /* Is the widget hilited? (For widgets that support this kind of thing.) */ - xpProperty_Hilited = 4, + /* Is the widget hilited? (For widgets that support this kind of thing.) */ + ,xpProperty_Hilited = 4 - /* Is there a C++ object attached to this widget? */ - xpProperty_Object = 5, + /* Is there a C++ object attached to this widget? */ + ,xpProperty_Object = 5 - /* If this property is 1, the widget package will use OpenGL to restrict * - * drawing to the Wiget's exposed rectangle. */ - xpProperty_Clip = 6, + /* If this property is 1, the widget package will use OpenGL to restrict * + * drawing to the Wiget's exposed rectangle. */ + ,xpProperty_Clip = 6 - /* Is this widget enabled (for those that have a disabled state too)? */ - xpProperty_Enabled = 7, + /* Is this widget enabled (for those that have a disabled state too)? */ + ,xpProperty_Enabled = 7 - /* NOTE: Property IDs 1 - 999 are reserved for the widgets library. * - * * - * NOTE: Property IDs 1000 - 9999 are allocated to the standard widget classes* - * provided with the library. * - * * - * Properties 1000 - 1099 are for widget class 0, 1100 - 1199 for widget class* - * 1, etc. */ - xpProperty_UserStart = 10000, + /* NOTE: Property IDs 1 - 999 are reserved for the widget's library. * + * * + * NOTE: Property IDs 1000 - 9999 are allocated to the standard widget classes * + * provided with the library Properties 1000 - 1099 are for widget class 0, * + * 1100 - 1199 for widget class 1, etc. */ + ,xpProperty_UserStart = 10000 }; @@ -128,17 +130,17 @@ typedef int XPWidgetPropertyID; /* * XPMouseState_t * - * When the mouse is clicked or dragged, a pointer to this structure is passed - * to your widget function. + * When the mouse is clicked or dragged, a pointer to this structure is passed + * to your widget function. * */ typedef struct { int x; int y; - /* Mouse Button number, left = 0 (right button not yet supported. */ + /* Mouse Button number, left = 0 (right button not yet supported. */ int button; #if defined(XPLM200) - /* Scroll wheel delta (button in this case would be the wheel axis number). */ + /* Scroll wheel delta (button in this case would be the wheel axis number). */ int delta; #endif /* XPLM200 */ } XPMouseState_t; @@ -146,30 +148,30 @@ typedef struct { /* * XPKeyState_t * - * When a key is pressed, a pointer to this struct is passed to your widget - * function. + * When a key is pressed, a pointer to this struct is passed to your widget + * function. * */ typedef struct { - /* The ASCII key that was pressed. WARNING: this may be 0 for some non-ASCII * - * key sequences. */ + /* The ASCII key that was pressed. WARNING: this may be 0 for some non-ASCII * + * key sequences. */ char key; - /* The flags. Make sure to check this if you only want key-downs! */ + /* The flags. Make sure to check this if you only want key-downs! */ XPLMKeyFlags flags; - /* The virtual key code for the key */ + /* The virtual key code for the key */ char vkey; } XPKeyState_t; /* * XPWidgetGeometryChange_t * - * This structure contains the deltas for your widget's geometry when it - * changes. + * This structure contains the deltas for your widget's geometry when it + * changes. * */ typedef struct { int dx; - /* +Y = the widget moved up */ + /* +Y = the widget moved up */ int dy; int dwidth; int dheight; @@ -178,30 +180,30 @@ typedef struct { /* * XPDispatchMode * - * The dispatching modes describe how the widgets library sends out messages. - * Currently there are three modes: + * The dispatching modes describe how the widgets library sends out messages. + * Currently there are three modes: * */ enum { - /* The message will only be sent to the target widget. */ - xpMode_Direct = 0, + /* The message will only be sent to the target widget. */ + xpMode_Direct = 0 - /* The message is sent to the target widget, then up the chain of parents * - * until the message is handled or a parentless widget is reached. */ - xpMode_UpChain = 1, + /* The message is sent to the target widget, then up the chain of parents * + * until the message is handled or a parentless widget is reached. */ + ,xpMode_UpChain = 1 - /* The message is sent to the target widget and then all of its children * - * recursively depth-first. */ - xpMode_Recursive = 2, + /* The message is sent to the target widget and then all of its children * + * recursively depth-first. */ + ,xpMode_Recursive = 2 - /* The message is snet just to the target, but goes to every callback, even if* - * it is handled. */ - xpMode_DirectAllCallbacks = 3, + /* The message is snet just to the target, but goes to every callback, even if * + * it is handled. */ + ,xpMode_DirectAllCallbacks = 3 - /* The message is only sent to the very first handler even if it is not * - * accepted. (This is really only useful for some internal widget library * - * functions.) */ - xpMode_Once = 4, + /* The message is only sent to the very first handler even if it is not * + * accepted. (This is really only useful for some internal Widget Lib * + * functions. */ + ,xpMode_Once = 4 }; @@ -210,235 +212,239 @@ typedef int XPDispatchMode; /* * XPWidgetClass * - * Widget classes define predefined widget types. A widget class basically - * specifies from a library the widget function to be used for the widget. - * Most widgets can be made right from classes. + * Widget classes define predefined widget types. A widget class basically + * specifies from a library the widget function to be used for the widget. + * Most widgets can be made right from classes. * */ typedef int XPWidgetClass; -/* An unspecified widget class. Other widget classes are in * - * XPStandardWidgets.h */ +/* An unspecified widget class. Other widget classes are in * + * XPStandardWidgets.h */ #define xpWidgetClass_None 0 /*************************************************************************** * WIDGET MESSAGES ***************************************************************************/ +/* + * + * + */ /* * XPWidgetMessage * - * Widgets receive 32-bit messages indicating what action is to be taken or - * notifications of events. The list of messages may be expanded. + * Widgets receive 32-bit messages indicating what action is to be taken or + * notifications of events. The list of messages may be expanded. * */ enum { - /* No message, should not be sent. */ - xpMsg_None = 0, - - /* The create message is sent once per widget that is created with your widget* - * function and once for any widget that has your widget function attached. * - * * - * Dispatching: Direct * - * * - * Param 1: 1 if you are being added as a subclass, 0 if the widget is first * - * being created. */ - xpMsg_Create = 1, - - /* The destroy message is sent once for each message that is destroyed that * - * has your widget function. * - * * - * Dispatching: Direct for all * - * * - * Param 1: 1 if being deleted by a recursive delete to the parent, 0 for * - * explicit deletion. */ - xpMsg_Destroy = 2, - - /* The paint message is sent to your widget to draw itself. The paint message * - * is the bare-bones message; in response you must draw yourself, draw your * - * children, set up clipping and culling, check for visibility, etc. If you * - * don't want to do all of this, ignore the paint message and a draw message * - * (see below) will be sent to you. * - * * - * Dispatching: Direct */ - xpMsg_Paint = 3, - - /* The draw message is sent to your widget when it is time to draw yourself. * - * OpenGL will be set up to draw in 2-d global screen coordinates, but you * - * should use the XPLM to set up OpenGL state. * - * * - * Dispatching: Direct */ - xpMsg_Draw = 4, - - /* The key press message is sent once per key that is pressed. The first * - * parameter is the type of key code (integer or char) and the second is the * - * code itself. By handling this event, you consume the key stroke. * - * * - * Handling this message 'consumes' the keystroke; not handling it passes it * - * to your parent widget. * - * * - * Dispatching: Up Chain * - * * - * Param 1: A pointer to an XPKeyState_t structure with the keystroke. */ - xpMsg_KeyPress = 5, - - /* Keyboard focus is being given to you. By handling this message you accept * - * keyboard focus. The first parameter will be one if a child of yours gave up* - * focus to you, 0 if someone set focus on you explicitly. * - * * - * Handling this message accepts focus; not handling refuses focus. * - * * - * Dispatching: direct * - * * - * Param 1: 1 if you are gaining focus because your child is giving it up, 0 * - * if someone is explicitly giving you focus. */ - xpMsg_KeyTakeFocus = 6, - - /* Keyboard focus is being taken away from you. The first parameter will be * - * one if you are losing focus because another widget is taking it, or 0 if * - * someone called the API to make you lose focus explicitly. * - * * - * Dispatching: Direct * - * * - * Param 1: 1 if focus is being taken by another widget, 0 if code requested * - * to remove focus. */ - xpMsg_KeyLoseFocus = 7, - - /* You receive one mousedown event per click with a mouse-state structure * - * pointed to by parameter 1, by accepting this you eat the click, otherwise * - * your parent gets it. You will not receive drag and mouse up messages if you* - * do not accept the down message. * - * * - * Handling this message consumes the mouse click, not handling it passes it * - * to the next widget. You can act 'transparent' as a window by never handling* - * moues clicks to certain areas. * - * * - * Dispatching: Up chain NOTE: Technically this is direct dispatched, but the * - * widgets library will shop it to each widget until one consumes the click, * - * making it effectively "up chain". * - * * - * Param 1: A pointer to an XPMouseState_t containing the mouse status. */ - xpMsg_MouseDown = 8, - - /* You receive a series of mouse drag messages (typically one per frame in the* - * sim) as the mouse is moved once you have accepted a mouse down message. * - * Parameter one points to a mouse-state structure describing the mouse * - * location. You will continue to receive these until the mouse button is * - * released. You may receive multiple mouse state messages with the same mouse* - * position. You will receive mouse drag events even if the mouse is dragged * - * out of your current or original bounds at the time of the mouse down. * - * * - * Dispatching: Direct * - * * - * Param 1: A pointer to an XPMouseState_t containing the mouse status. */ - xpMsg_MouseDrag = 9, - - /* The mouseup event is sent once when the mouse button is released after a * - * drag or click. You only receive this message if you accept the mouseDown * - * message. Parameter one points to a mouse state structure. * - * * - * Dispatching: Direct * - * * - * Param 1: A pointer to an XPMouseState_t containing the mouse status. */ - xpMsg_MouseUp = 10, - - /* Your geometry or a child's geometry is being changed. * - * * - * Dispatching: Up chain * - * * - * Param 1: The widget ID of the original reshaped target. * - * * - * Param 2: A pointer to a XPWidgetGeometryChange_t struct describing the * - * change. */ - xpMsg_Reshape = 11, - - /* Your exposed area has changed. * - * * - * Dispatching: Direct */ - xpMsg_ExposedChanged = 12, - - /* A child has been added to you. The child's ID is passed in parameter one. * - * * - * Dispatching: Direct * - * * - * Param 1: The Widget ID of the child being added. */ - xpMsg_AcceptChild = 13, - - /* A child has been removed from to you. The child's ID is passed in parameter* - * one. * - * * - * Dispatching: Direct * - * * - * Param 1: The Widget ID of the child being removed. */ - xpMsg_LoseChild = 14, - - /* You now have a new parent, or have no parent. The parent's ID is passed in,* - * or 0 for no parent. * - * * - * Dispatching: Direct * - * * - * Param 1: The Widget ID of your parent */ - xpMsg_AcceptParent = 15, - - /* You or a child has been shown. Note that this does not include you being * - * shown because your parent was shown, you were put in a new parent, your * - * root was shown, etc. * - * * - * Dispatching: Up chain * - * * - * Param 1: The widget ID of the shown widget. */ - xpMsg_Shown = 16, - - /* You have been hidden. See limitations above. * - * * - * Dispatching: Up chain * - * * - * Param 1: The widget ID of the hidden widget. */ - xpMsg_Hidden = 17, - - /* Your descriptor has changed. * - * * - * Dispatching: Direct */ - xpMsg_DescriptorChanged = 18, - - /* A property has changed. Param 1 contains the property ID. * - * * - * Dispatching: Direct * - * * - * Param 1: The Property ID being changed. * - * * - * Param 2: The new property value */ - xpMsg_PropertyChanged = 19, + /* No message, should not be sent. */ + xpMsg_None = 0 + + /* The create message is sent once per widget that is created with your widget * + * function and once for any widget that has your widget function attached. * + * * + * Dispatching: Direct * + * * + * Param 1: 1 if you are being added as a subclass, 0 if the widget is first * + * being created. */ + ,xpMsg_Create = 1 + + /* The destroy message is sent once for each message that is destroyed that * + * has your widget function. * + * * + * Dispatching: Direct for all * + * * + * Param 1: 1 if being deleted by a recursive delete to the parent, 0 for * + * explicit deletion. */ + ,xpMsg_Destroy = 2 + + /* The paint message is sent to your widget to draw itself. The paint message * + * is the bare-bones message; in response you must draw yourself, draw your * + * children, set up clipping and culling, check for visibility, etc. If you * + * don't want to do all of this, ignore the paint message and a draw message * + * (see below) will be sent to you. * + * * + * Dispatching: Direct */ + ,xpMsg_Paint = 3 + + /* The draw message is sent to your widget when it is time to draw yourself. * + * OpenGL will be set up to draw in 2-d global screen coordinates, but you * + * should use the XPLM to set up OpenGL state. * + * * + * Dispatching: Direct */ + ,xpMsg_Draw = 4 + + /* The key press message is sent once per key that is pressed. The first * + * parameter is the type of key code (integer or char) and the second is the * + * code itself. By handling this event, you consume the key stroke. * + * * + * Handling this message 'consumes' the keystroke; not handling it passes it * + * to your parent widget. * + * * + * Dispatching: Up Chain * + * * + * : Param 1: A pointer to an XPKeyState_t structure with the keystroke. */ + ,xpMsg_KeyPress = 5 + + /* Keyboard focus is being given to you. By handling this message you accept * + * keyboard focus. The first parameter will be one if a child of yours gave up * + * focus to you, 0 if someone set focus on you explicitly. * + * * + * : Handling this message accepts focus; not handling refuses focus. * + * * + * Dispatching: direct * + * * + * Param 1: 1 if you are gaining focus because your child is giving it up, 0 * + * if someone is explicitly giving you focus. */ + ,xpMsg_KeyTakeFocus = 6 + + /* Keyboard focus is being taken away from you. The first parameter will be * + * one if you are losing focus because another widget is taking it, or 0 if * + * someone called the API to make you lose focus explicitly. * + * * + * Dispatching: Direct * + * * + * Param 1: 1 if focus is being taken by another widget, 0 if code requested * + * to remove focus. */ + ,xpMsg_KeyLoseFocus = 7 + + /* You receive one mousedown event per click with a mouse-state structure * + * pointed to by parameter 1, by accepting this you eat the click, otherwise * + * your parent gets it. You will not receive drag and mouse up messages if you * + * do not accept the down message. * + * * + * Handling this message consumes the mouse click, not handling it passes it * + * to the next widget. You can act 'transparent' as a window by never handling * + * moues clicks to certain areas. * + * * + * Dispatching: Up chain NOTE: Technically this is direct dispatched, but the * + * widgets library will shop it to each widget until one consumes the click, * + * making it effectively "up chain". * + * * + * Param 1: A pointer to an XPMouseState_t containing the mouse status. */ + ,xpMsg_MouseDown = 8 + + /* You receive a series of mouse drag messages (typically one per frame in the * + * sim) as the mouse is moved once you have accepted a mouse down message. * + * Parameter one points to a mouse-state structure describing the mouse * + * location. You will continue to receive these until the mouse button is * + * released. You may receive multiple mouse state messages with the same mouse * + * position. You will receive mouse drag events even if the mouse is dragged * + * out of your current or original bounds at the time of the mouse down. * + * * + * Dispatching: Direct * + * * + * Param 1: A pointer to an XPMouseState_t containing the mouse status. */ + ,xpMsg_MouseDrag = 9 + + /* The mouseup event is sent once when the mouse button is released after a * + * drag or click. You only receive this message if you accept the mouseDown * + * message. Parameter one points to a mouse state structure. * + * * + * Dispatching: Direct * + * * + * Param 1: A pointer to an XPMouseState_t containing the mouse status. */ + ,xpMsg_MouseUp = 10 + + /* Your geometry or a child's geometry is being changed. * + * * + * Dispatching: Up chain * + * * + * Param 1: The widget ID of the original reshaped target. * + * * + * Param 2: A pointer to a XPWidgetGeometryChange_t struct describing the * + * change. */ + ,xpMsg_Reshape = 11 + + /* Your exposed area has changed. * + * * + * Dispatching: Direct */ + ,xpMsg_ExposedChanged = 12 + + /* A child has been added to you. The child's ID is passed in parameter one. * + * * + * Dispatching: Direct * + * * + * Param 1: The Widget ID of the child being added. */ + ,xpMsg_AcceptChild = 13 + + /* A child has been removed from to you. The child's ID is passed in parameter * + * one. * + * * + * Dispatching: Direct * + * * + * Param 1: The Widget ID of the child being removed. */ + ,xpMsg_LoseChild = 14 + + /* You now have a new parent, or have no parent. The parent's ID is passed in, * + * or 0 for no parent. * + * * + * Dispatching: Direct * + * * + * Param 1: The Widget ID of your parent */ + ,xpMsg_AcceptParent = 15 + + /* You or a child has been shown. Note that this does not include you being * + * shown because your parent was shown, you were put in a new parent, your * + * root was shown, etc. * + * * + * Dispatching: Up chain * + * * + * Param 1: The widget ID of the shown widget. */ + ,xpMsg_Shown = 16 + + /* You have been hidden. See limitations above. * + * * + * Dispatching: Up chain * + * * + * Param 1: The widget ID of the hidden widget. */ + ,xpMsg_Hidden = 17 + + /* Your descriptor has changed. * + * * + * Dispatching: Direct */ + ,xpMsg_DescriptorChanged = 18 + + /* A property has changed. Param 1 contains the property ID. * + * * + * Dispatching: Direct * + * * + * Param 1: The Property ID being changed. * + * * + * Param 2: The new property value */ + ,xpMsg_PropertyChanged = 19 #if defined(XPLM200) - /* The mouse wheel has moved. * - * * - * Return 1 to consume the mouse wheel move, or 0 to pass the message to a * - * parent. Dispatching: Up chain * - * * - * Param 1: A pointer to an XPMouseState_t containing the mouse status. */ - xpMsg_MouseWheel = 20, + /* The mouse wheel has moved. * + * * + * Return 1 to consume the mouse wheel move, or 0 to pass the message to a * + * parent. Dispatching: Up chain * + * * + * Param 1: A pointer to an XPMouseState_t containing the mouse status. */ + ,xpMsg_MouseWheel = 20 #endif /* XPLM200 */ #if defined(XPLM200) - /* The cursor is over your widget. If you consume this message, change the * - * XPLMCursorStatus value to indicate the desired result, with the same rules * - * as in XPLMDisplay.h. * - * * - * Return 1 to consume this message, 0 to pass it on. * - * * - * Dispatching: Up chain Param 1: A pointer to an XPMouseState_t struct * - * containing the mouse status. * - * * - * Param 2: A pointer to a XPLMCursorStatus - set this to the cursor result * - * you desire. */ - xpMsg_CursorAdjust = 21, + /* The cursor is over your widget. If you consume this message, change the * + * XPLMCursorStatus value to indicate the desired result, with the same rules * + * as in XPLMDisplay.h. * + * * + * Return 1 to consume this message, 0 to pass it on. * + * * + * Dispatching: Up chain Param 1: A pointer to an XPMouseState_t struct * + * containing the mouse status. * + * * + * Param 2: A pointer to a XPLMCursorStatus - set this to the cursor result * + * you desire. */ + ,xpMsg_CursorAdjust = 21 #endif /* XPLM200 */ - /* NOTE: Message IDs 1000 - 9999 are allocated to the standard widget classes * - * provided with the library with 1000 - 1099 for widget class 0, 1100 - 1199 * - * for widget class 1, etc. Message IDs 10,000 and beyond are for plugin use. */ - xpMsg_UserStart = 10000, + /* NOTE: Message IDs 1000 - 9999 are allocated to the standard widget classes * + * provided with the library with 1000 - 1099 for widget class 0, 1100 - 1199 * + * for widget class 1, etc. Message IDs 10,000 and beyond are for plugin use. */ + ,xpMsg_UserStart = 10000 }; @@ -447,23 +453,27 @@ typedef int XPWidgetMessage; /*************************************************************************** * WIDGET CALLBACK FUNCTION ***************************************************************************/ +/* + * + * + */ /* * XPWidgetFunc_t * - * This function defines your custom widget's behavior. It will be called by - * the widgets library to send messages to your widget. The message and widget - * ID are passed in, as well as two ptr-width signed parameters whose meaning - * varies with the message. Return 1 to indicate that you have processed the - * message, 0 to indicate that you have not. For any message that is not - * understood, return 0. + * This function defines your custom widget's behavior. It will be called by + * the widgets library to send messages to your widget. The message and widget + * ID are passed in, as well as two ptr-width signed parameters whose meaning + * varies with the message. Return 1 to indicate that you have processed the + * message, 0 to indicate that you have not. For any message that is not + * understood, return 0. * */ typedef int (* XPWidgetFunc_t)( - XPWidgetMessage inMessage, - XPWidgetID inWidget, - intptr_t inParam1, - intptr_t inParam2); + XPWidgetMessage inMessage, + XPWidgetID inWidget, + intptr_t inParam1, + intptr_t inParam2); #ifdef __cplusplus } diff --git a/src/SDK/CHeaders/Widgets/XPWidgetUtils.h b/src/SDK/CHeaders/Widgets/XPWidgetUtils.h index ff757f79..f2fcffd0 100755 --- a/src/SDK/CHeaders/Widgets/XPWidgetUtils.h +++ b/src/SDK/CHeaders/Widgets/XPWidgetUtils.h @@ -2,35 +2,34 @@ #define _XPWidgetUtils_h_ /* - * 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 * */ -/*************************************************************************** - * XPWidgetUtils - ***************************************************************************/ /* - * ## USAGE NOTES + * XPWidgetUtils - USAGE NOTES + * + * The XPWidgetUtils library contains useful functions that make writing and + * using widgets less of a pain. * - * The XPWidgetUtils library contains useful functions that make writing and - * using widgets less of a pain. + * One set of functions are the widget behavior functions. These functions + * each add specific useful behaviors to widgets. They can be used in two + * manners: * - * One set of functions are the widget behavior functions. These functions - * each add specific useful behaviors to widgets. They can be used in two - * manners: + * 1. You can add a widget behavior function to a widget as a callback proc + * using the XPAddWidgetCallback function. The widget will gain that behavior. + * Remember that the last function you add has highest priority. You can use + * this to change or augment the behavior of an existing finished widget. * - * 1. You can add a widget behavior function to a widget as a callback proc - * using the XPAddWidgetCallback function. The widget will gain that - * behavior. Remember that the last function you add has highest priority. - * You can use this to change or augment the behavior of an existing - * finished widget. - * 2. You can call a widget function from inside your own widget function. - * This allows you to include useful behaviors in custom-built widgets. A - * number of the standard widgets get their behavior from this library. To - * do this, call the behavior function from your function first. If it - * returns 1, that means it handled the event and you don't need to; simply - * return 1. + * 2. You can call a widget function from inside your own widget function. + * This allows you to include useful behaviors in custom-built widgets. A + * number of the standard widgets get their behavior from this library. To do + * this, call the behavior function from your function first. If it returns 1, + * that means it handled the event and you don't need to; simply return 1. * */ @@ -43,6 +42,10 @@ extern "C" { /*************************************************************************** * GENERAL UTILITIES ***************************************************************************/ +/* + * + * + */ @@ -72,19 +75,16 @@ extern "C" { /* * XPWidgetCreate_t * - * This structure contains all of the parameters needed to create a wiget. It - * is used with XPUCreateWidgets to create widgets in bulk from an array. All - * parameters correspond to those of XPCreateWidget except for the container - * index. - * - * If the container index is equal to the index of a widget in the array, the - * widget in the array passed to XPUCreateWidgets is used as the parent of - * this widget. Note that if you pass an index greater than your own position - * in the array, the parent you are requesting will not exist yet. - * - * If the container index is NO_PARENT, the parent widget is specified as - * NULL. If the container index is PARAM_PARENT, the widget passed into - * XPUCreateWidgets is used. + * This structure contains all of the parameters needed to create a wiget. It + * is used with XPUCreateWidgets to create widgets in bulk from an array. All + * parameters correspond to those of XPCreateWidget except for the container + * index. If the container index is equal to the index of a widget in the + * array, the widget in the array passed to XPUCreateWidgets is used as the + * parent of this widget. Note that if you pass an index greater than your own + * position in the array, the parent you are requesting will not exist yet. If + * the container index is NO_PARENT, the parent widget is specified as NULL. + * If the container index is PARAM_PARENT, the widget passed into + * XPUCreateWidgets is used. * */ typedef struct { @@ -94,9 +94,9 @@ typedef struct { int bottom; int visible; const char * descriptor; - /* Whether ethis widget is a root wiget */ + /* Whether ethis widget is a root wiget */ int isRoot; - /* The index of the widget to contain within, or a constant */ + /* The index of the widget to contain within, or a constant */ int containerIndex; XPWidgetClass widgetClass; } XPWidgetCreate_t; @@ -110,45 +110,45 @@ typedef struct { /* * XPUCreateWidgets * - * This function creates a series of widgets from a table (see - * XPCreateWidget_t above). Pass in an array of widget creation structures and - * an array of widget IDs that will receive each widget. + * This function creates a series of widgets from a table...see + * XPCreateWidget_t above. Pass in an array of widget creation structures and + * an array of widget IDs that will receive each widget. * - * Widget parents are specified by index into the created widget table, - * allowing you to create nested widget structures. You can create multiple - * widget trees in one table. Generally you should create widget trees from - * the top down. + * Widget parents are specified by index into the created widget table, + * allowing you to create nested widget structures. You can create multiple + * widget trees in one table. Generally you should create widget trees from + * the top down. * - * You can also pass in a widget ID that will be used when the widget's parent - * is listed as PARAM_PARENT; this allows you to embed widgets created with - * XPUCreateWidgets in a widget created previously. + * You can also pass in a widget ID that will be used when the widget's parent + * is listed as PARAM_PARENT; this allows you to embed widgets created with + * XPUCreateWidgets in a widget created previously. * */ -WIDGET_API void XPUCreateWidgets( - const XPWidgetCreate_t * inWidgetDefs, - int inCount, - XPWidgetID inParamParent, - XPWidgetID * ioWidgets); +WIDGET_API void XPUCreateWidgets( + const XPWidgetCreate_t * inWidgetDefs, + int inCount, + XPWidgetID inParamParent, + XPWidgetID * ioWidgets); /* * XPUMoveWidgetBy * - * Simply moves a widget by an amount, +x = right, +y=up, without resizing the - * widget. + * Simply moves a widget by an amount, +x = right, +y=up, without resizing the + * widget. * */ -WIDGET_API void XPUMoveWidgetBy( - XPWidgetID inWidget, - int inDeltaX, - int inDeltaY); +WIDGET_API void XPUMoveWidgetBy( + XPWidgetID inWidget, + int inDeltaX, + int inDeltaY); /*************************************************************************** * LAYOUT MANAGERS ***************************************************************************/ /* - * The layout managers are widget behavior functions for handling where - * widgets move. Layout managers can be called from a widget function or - * attached to a widget later. + * The layout managers are widget behavior functions for handling where + * widgets move. Layout managers can be called from a widget function or + * attached to a widget later. * */ @@ -156,24 +156,24 @@ WIDGET_API void XPUMoveWidgetBy( /* * XPUFixedLayout * - * This function causes the widget to maintain its children in fixed position - * relative to itself as it is resized. Use this on the top level 'window' - * widget for your window. + * This function causes the widget to maintain its children in fixed position + * relative to itself as it is resized. Use this on the top level 'window' + * widget for your window. * */ -WIDGET_API int XPUFixedLayout( - XPWidgetMessage inMessage, - XPWidgetID inWidget, - intptr_t inParam1, - intptr_t inParam2); +WIDGET_API int XPUFixedLayout( + XPWidgetMessage inMessage, + XPWidgetID inWidget, + intptr_t inParam1, + intptr_t inParam2); /*************************************************************************** * WIDGET PROC BEHAVIORS ***************************************************************************/ /* - * These widget behavior functions add other useful behaviors to widgets. - * These functions cannot be attached to a widget; they must be called from - * your widget function. + * These widget behavior functions add other useful behaviors to widgets. + * These functions cannot be attached to a widget; they must be called from + * your widget function. * */ @@ -181,49 +181,49 @@ WIDGET_API int XPUFixedLayout( /* * XPUSelectIfNeeded * - * This causes the widget to bring its window to the foreground if it is not - * already. inEatClick specifies whether clicks in the background should be - * consumed by bringin the window to the foreground. + * This causes the widget to bring its window to the foreground if it is not + * already. inEatClick specifies whether clicks in the background should be + * consumed by bringin the window to the foreground. * */ -WIDGET_API int XPUSelectIfNeeded( - XPWidgetMessage inMessage, - XPWidgetID inWidget, - intptr_t inParam1, - intptr_t inParam2, - int inEatClick); +WIDGET_API int XPUSelectIfNeeded( + XPWidgetMessage inMessage, + XPWidgetID inWidget, + intptr_t inParam1, + intptr_t inParam2, + int inEatClick); /* * XPUDefocusKeyboard * - * This causes a click in the widget to send keyboard focus back to X-Plane. - * This stops editing of any text fields, etc. + * This causes a click in the widget to send keyboard focus back to X-Plane. + * This stops editing of any text fields, etc. * */ -WIDGET_API int XPUDefocusKeyboard( - XPWidgetMessage inMessage, - XPWidgetID inWidget, - intptr_t inParam1, - intptr_t inParam2, - int inEatClick); +WIDGET_API int XPUDefocusKeyboard( + XPWidgetMessage inMessage, + XPWidgetID inWidget, + intptr_t inParam1, + intptr_t inParam2, + int inEatClick); /* * XPUDragWidget * - * XPUDragWidget drags the widget in response to mouse clicks. Pass in not - * only the event, but the global coordinates of the drag region, which might - * be a sub-region of your widget (for example, a title bar). + * XPUDragWidget drags the widget in response to mouse clicks. Pass in not + * only the event, but the global coordinates of the drag region, which might + * be a sub-region of your widget (for example, a title bar). * */ -WIDGET_API int XPUDragWidget( - XPWidgetMessage inMessage, - XPWidgetID inWidget, - intptr_t inParam1, - intptr_t inParam2, - int inLeft, - int inTop, - int inRight, - int inBottom); +WIDGET_API int XPUDragWidget( + XPWidgetMessage inMessage, + XPWidgetID inWidget, + intptr_t inParam1, + intptr_t inParam2, + int inLeft, + int inTop, + int inRight, + int inBottom); #ifdef __cplusplus } diff --git a/src/SDK/CHeaders/Widgets/XPWidgets.h b/src/SDK/CHeaders/Widgets/XPWidgets.h index f4423e2c..84ce15c5 100755 --- a/src/SDK/CHeaders/Widgets/XPWidgets.h +++ b/src/SDK/CHeaders/Widgets/XPWidgets.h @@ -2,66 +2,79 @@ #define _XPWidgets_h_ /* - * 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 * */ -/*************************************************************************** - * XPWidgets - ***************************************************************************/ /* - * ## THEORY OF OPERATION AND NOTES - * - * Widgets are persistent view 'objects' for X-Plane. A widget is an object - * referenced by its opaque handle (widget ID) and the APIs in this file. You - * cannot access the widget's guts directly. Every Widget has the following - * intrinsic data: - * - * - A bounding box defined in global screen coordinates with 0,0 in the - * bottom left and +y = up, +x = right. - * - A visible box, which is the intersection of the bounding box with the - * widget's parents visible box. - * - Zero or one parent widgets. (Always zero if the widget is a root widget. - * - Zero or more child widgets. - * - Whether the widget is a root. Root widgets are the top level plugin - * windows. - * - Whether the widget is visible. - * - A text string descriptor, whose meaning varies from widget to widget. - * - An arbitrary set of 32 bit integral properties defined by 32-bit integral - * keys. This is how specific widgets store specific data. - * - A list of widget callbacks proc that implements the widgets behaviors. - * - * The Widgets library sends messages to widgets to request specific behaviors - * or notify the widget of things. - * - * Widgets may have more than one callback function, in which case messages - * are sent to the most recently added callback function until the message is - * handled. Messages may also be sent to parents or children; see the - * XPWidgetDefs.h header file for the different widget message dispatching - * functions. By adding a callback function to a window you can 'subclass' its - * behavior. - * - * A set of standard widgets are provided that serve common UI purposes. You - * can also customize or implement entirely custom widgets. - * - * Widgets are different than other view hierarchies (most notably Win32, - * which they bear a striking resemblance to) in the following ways: - * - * - Not all behavior can be patched. State that is managed by the XPWidgets - * DLL and not by individual widgets cannot be customized. - * - All coordinates are in global screen coordinates. Coordinates are not - * relative to an enclosing widget, nor are they relative to a display - * window. - * - Widget messages are always dispatched synchronously, and there is no - * concept of scheduling an update or a dirty region. Messages originate - * from X-Plane as the sim cycle goes by. Since X-Plane is constantly - * redrawing, so are widgets; there is no need to mark a part of a widget as - * 'needing redrawing' because redrawing happens frequently whether the - * widget needs it or not. - * - Any widget may be a 'root' widget, causing it to be drawn; there is no - * relationship between widget class and rootness. Root widgets are - * imlemented as XPLMDisply windows. + * WIDGETS - THEORY OF OPERATION AND NOTES + * + * Widgets are persistent view 'objects' for X-Plane. A widget is an object + * referenced by its opaque handle (widget ID) and the APIs in this file. You + * cannot access the widget's guts directly. Every Widget has the following + * intrinsic data: + * + * - A bounding box defined in global screen coordinates with 0,0 in the + * bottom left and +y = up, +x = right. + * + * - A visible box, which is the intersection of the bounding box with the + * widget's parents visible box. + * + * - Zero or one parent widgets. (Always zero if the widget is a root widget. + * + * - Zero or more child widgets. + * + * - Whether the widget is a root. Root widgets are the top level plugin + * windows. + * + * - Whether the widget is visible. + * + * - A text string descriptor, whose meaning varies from widget to widget. + * + * - An arbitrary set of 32 bit integral properties defined by 32-bit integral + * keys. This is how specific widgets + * + * store specific data. + * + * - A list of widget callbacks proc that implements the widgets behaviors. + * + * The Widgets library sends messages to widgets to request specific behaviors + * or notify the widget of things. + * + * Widgets may have more than one callback function, in which case messages + * are sent to the most recently added callback function until the message is + * handled. Messages may also be sent to parents or children; see the + * XPWidgetDefs.h header file for the different widget message dispatching + * functions. By adding a callback function to a window you can 'subclass' its + * behavior. + * + * A set of standard widgets are provided that serve common UI purposes. You + * can also customize or implement entirely custom widgets. + * + * Widgets are different than other view hierarchies (most notably Win32, + * which they bear a striking resemblance to) in the following ways: + * + * - Not all behavior can be patched. State that is managed by the XPWidgets + * DLL and not by individual widgets cannot be customized. + * + * - All coordinates are in global screen coordinates. Coordinates are not + * relative to an enclosing widget, nor are they relative to a display window. + * + * + * - Widget messages are always dispatched synchronously, and there is no + * concept of scheduling an update or a dirty region. Messages originate from + * X-Plane as the sim cycle goes by. Since X-Plane is constantly redrawing, so + * are widgets; there is no need to mark a part of a widget as 'needing + * redrawing' because redrawing happens frequently whether the widget needs it + * or not. + * + * - Any widget may be a 'root' widget, causing it to be drawn; there is no + * relationship between widget class and rootness. Root widgets are imlemented + * as XPLMDisply windows. * */ @@ -75,461 +88,488 @@ extern "C" { /*************************************************************************** * WIDGET CREATION AND MANAGEMENT ***************************************************************************/ +/* + * + * + */ /* * XPCreateWidget * - * This function creates a new widget and returns the new widget's ID to you. - * If the widget creation fails for some reason, it returns NULL. Widget - * creation will fail either if you pass a bad class ID or if there is not - * adequate memory. - * - * Input Parameters: - * - * - Top, left, bottom, and right in global screen coordinates defining the - * widget's location on the screen. - * - inVisible is 1 if the widget should be drawn, 0 to start the widget as - * hidden. - * - inDescriptor is a null terminated string that will become the widget's - * descriptor. - * - inIsRoot is 1 if this is going to be a root widget, 0 if it will not be. - * - inContainer is the ID of this widget's container. It must be 0 for a root - * widget. for a non-root widget, pass the widget ID of the widget to place - * this widget within. If this widget is not going to start inside another - * widget, pass 0; this new widget will then just be floating off in space - * (and will not be drawn until it is placed in a widget. - * - inClass is the class of the widget to draw. Use one of the predefined - * class-IDs to create a standard widget. - * - * A note on widget embedding: a widget is only called (and will be drawn, - * etc.) if it is placed within a widget that will be called. Root widgets are - * always called. So it is possible to have whole chains of widgets that are - * simply not called. You can preconstruct widget trees and then place them - * into root widgets later to activate them if you wish. - * - */ -WIDGET_API XPWidgetID XPCreateWidget( - int inLeft, - int inTop, - int inRight, - int inBottom, - int inVisible, - const char * inDescriptor, - int inIsRoot, - XPWidgetID inContainer, - XPWidgetClass inClass); + * This function creates a new widget and returns the new widget's ID to you. + * If the widget creation fails for some reason, it returns NULL. Widget + * creation will fail either if you pass a bad class ID or if there is not + * adequate memory. + * + * Input Parameters: + * + * - Top, left, bottom, and right in global screen coordinates defining the + * widget's location on the screen. + * + * - inVisible is 1 if the widget should be drawn, 0 to start the widget as + * hidden. + * + * - inDescriptor is a null terminated string that will become the widget's + * descriptor. + * + * - inIsRoot is 1 if this is going to be a root widget, 0 if it will not be. + * + * - inContainer is the ID of this widget's container. It must be 0 for a root + * widget. for a non-root widget, pass the widget ID of the widget to place + * this widget within. If this widget is not going to start inside another + * widget, pass 0; this new widget will then just be floating off in space + * (and will not be drawn until it is placed in a widget. + * + * - inClass is the class of the widget to draw. Use one of the predefined + * class-IDs to create a standard widget. + * + * A note on widget embedding: a widget is only called (and will be drawn, + * etc.) if it is placed within a widget that will be called. Root widgets are + * always called. So it is possible to have whole chains of widgets that are + * simply not called. You can preconstruct widget trees and then place them + * into root widgets later to activate them if you wish. + * + */ +WIDGET_API XPWidgetID XPCreateWidget( + int inLeft, + int inTop, + int inRight, + int inBottom, + int inVisible, + const char * inDescriptor, + int inIsRoot, + XPWidgetID inContainer, + XPWidgetClass inClass); /* * XPCreateCustomWidget * - * This function is the same as XPCreateWidget except that instead of passing - * a class ID, you pass your widget callback function pointer defining the - * widget. Use this function to define a custom widget. All parameters are the - * same as XPCreateWidget, except that the widget class has been replaced with - * the widget function. + * This function is the same as XPCreateWidget except that instead of passing + * a class ID, you pass your widget callback function pointer defining the + * widget. Use this function to define a custom widget. All parameters are the + * same as XPCreateWidget, except that the widget class has been replaced with + * the widget function. * */ -WIDGET_API XPWidgetID XPCreateCustomWidget( - int inLeft, - int inTop, - int inRight, - int inBottom, - int inVisible, - const char * inDescriptor, - int inIsRoot, - XPWidgetID inContainer, - XPWidgetFunc_t inCallback); +WIDGET_API XPWidgetID XPCreateCustomWidget( + int inLeft, + int inTop, + int inRight, + int inBottom, + int inVisible, + const char * inDescriptor, + int inIsRoot, + XPWidgetID inContainer, + XPWidgetFunc_t inCallback); /* * XPDestroyWidget * - * This class destroys a widget. Pass in the ID of the widget to kill. If you - * pass 1 for inDestroyChilren, the widget's children will be destroyed first, - * then this widget will be destroyed. (Furthermore, the widget's children - * will be destroyed with the inDestroyChildren flag set to 1, so the - * destruction will recurse down the widget tree.) If you pass 0 for this - * flag, the child widgets will simply end up with their parent set to 0. + * This class destroys a widget. Pass in the ID of the widget to kill. If you + * pass 1 for inDestroyChilren, the widget's children will be destroyed first, + * then this widget will be destroyed. (Furthermore, the widget's children + * will be destroyed with the inDestroyChildren flag set to 1, so the + * destruction will recurse down the widget tree.) If you pass 0 for this + * flag, the child widgets will simply end up with their parent set to 0. * */ -WIDGET_API void XPDestroyWidget( - XPWidgetID inWidget, - int inDestroyChildren); +WIDGET_API void XPDestroyWidget( + XPWidgetID inWidget, + int inDestroyChildren); /* * XPSendMessageToWidget * - * This sends any message to a widget. You should probably not go around - * simulating the predefined messages that the widgets library defines for - * you. You may however define custom messages for your widgets and send them - * with this method. + * This sends any message to a widget. You should probably not go around + * simulating the predefined messages that the widgets library defines for + * you. You may however define custom messages for your widgets and send them + * with this method. * - * This method supports several dispatching patterns; see XPDispatchMode for - * more info. The function returns 1 if the message was handled, 0 if it was - * not. + * This method supports several dispatching patterns; see XPDispatchMode for + * more info. The function returns 1 if the message was handled, 0 if it was + * not. * - * For each widget that receives the message (see the dispatching modes), each - * widget function from the most recently installed to the oldest one receives - * the message in order until it is handled. + * For each widget that receives the message (see the dispatching modes), each + * widget function from the most recently installed to the oldest one receives + * the message in order until it is handled. * */ -WIDGET_API int XPSendMessageToWidget( - XPWidgetID inWidget, - XPWidgetMessage inMessage, - XPDispatchMode inMode, - intptr_t inParam1, - intptr_t inParam2); +WIDGET_API int XPSendMessageToWidget( + XPWidgetID inWidget, + XPWidgetMessage inMessage, + XPDispatchMode inMode, + intptr_t inParam1, + intptr_t inParam2); /*************************************************************************** * WIDGET POSITIONING AND VISIBILITY ***************************************************************************/ +/* + * + * + */ /* * XPPlaceWidgetWithin * - * This function changes which container a widget resides in. You may NOT use - * this function on a root widget! inSubWidget is the widget that will be - * moved. Pass a widget ID in inContainer to make inSubWidget be a child of - * inContainer. It will become the last/closest widget in the container. Pass - * 0 to remove the widget from any container. Any call to this other than - * passing the widget ID of the old parent of the affected widget will cause - * the widget to be removed from its old parent. Placing a widget within its - * own parent simply makes it the last widget. - * - * NOTE: this routine does not reposition the sub widget in global - * coordinates. If the container has layout management code, it will - * reposition the subwidget for you, otherwise you must do it with - * SetWidgetGeometry. + * This function changes which container a widget resides in. You may NOT use + * this function on a root widget! inSubWidget is the widget that will be + * moved. Pass a widget ID in inContainer to make inSubWidget be a child of + * inContainer. It will become the last/closest widget in the container. Pass + * 0 to remove the widget from any container. Any call to this other than + * passing the widget ID of the old parent of the affected widget will cause + * the widget to be removed from its old parent. Placing a widget within its + * own parent simply makes it the last widget. + * + * NOTE: this routine does not reposition the sub widget in global + * coordinates. If the container has layout management code, it will + * reposition the subwidget for you, otherwise you must do it with + * SetWidgetGeometry. * */ -WIDGET_API void XPPlaceWidgetWithin( - XPWidgetID inSubWidget, - XPWidgetID inContainer); +WIDGET_API void XPPlaceWidgetWithin( + XPWidgetID inSubWidget, + XPWidgetID inContainer); /* * XPCountChildWidgets * - * This routine returns the number of widgets another widget contains. + * This routine returns the number of widgets another widget contains. * */ -WIDGET_API int XPCountChildWidgets( - XPWidgetID inWidget); +WIDGET_API int XPCountChildWidgets( + XPWidgetID inWidget); /* * XPGetNthChildWidget * - * This routine returns the widget ID of a child widget by index. Indexes are - * 0 based, from 0 to one minus the number of widgets in the parent, - * inclusive. If the index is invalid, 0 is returned. + * This routine returns the widget ID of a child widget by index. Indexes are + * 0 based, from 0 to one minus the number of widgets in the parent, + * inclusive. If the index is invalid, 0 is returned. * */ -WIDGET_API XPWidgetID XPGetNthChildWidget( - XPWidgetID inWidget, - int inIndex); +WIDGET_API XPWidgetID XPGetNthChildWidget( + XPWidgetID inWidget, + int inIndex); /* * XPGetParentWidget * - * Returns the parent of a widget, or 0 if the widget has no parent. Root - * widgets never have parents and therefore always return 0. + * This routine returns the parent of a widget, or 0 if the widget has no + * parent. Root widgets never have parents and therefore always return 0. * */ -WIDGET_API XPWidgetID XPGetParentWidget( - XPWidgetID inWidget); +WIDGET_API XPWidgetID XPGetParentWidget( + XPWidgetID inWidget); /* * XPShowWidget * - * This routine makes a widget visible if it is not already. Note that if a - * widget is not in a rooted widget hierarchy or one of its parents is not - * visible, it will still not be visible to the user. + * This routine makes a widget visible if it is not already. Note that if a + * widget is not in a rooted widget hierarchy or one of its parents is not + * visible, it will still not be visible to the user. * */ -WIDGET_API void XPShowWidget( - XPWidgetID inWidget); +WIDGET_API void XPShowWidget( + XPWidgetID inWidget); /* * XPHideWidget * - * Makes a widget invisible. See XPShowWidget for considerations of when a - * widget might not be visible despite its own visibility state. + * Makes a widget invisible. See XPShowWidget for considerations of when a + * widget might not be visible despite its own visibility state. * */ -WIDGET_API void XPHideWidget( - XPWidgetID inWidget); +WIDGET_API void XPHideWidget( + XPWidgetID inWidget); /* * XPIsWidgetVisible * - * This returns 1 if a widget is visible, 0 if it is not. Note that this - * routine takes into consideration whether a parent is invisible. Use this - * routine to tell if the user can see the widget. + * This returns 1 if a widget is visible, 0 if it is not. Note that this + * routine takes into consideration whether a parent is invisible. Use this + * routine to tell if the user can see the widget. * */ -WIDGET_API int XPIsWidgetVisible( - XPWidgetID inWidget); +WIDGET_API int XPIsWidgetVisible( + XPWidgetID inWidget); /* * XPFindRootWidget * - * Returns the Widget ID of the root widget that contains the passed in widget - * or NULL if the passed in widget is not in a rooted hierarchy. + * XPFindRootWidget returns the Widget ID of the root widget that contains the + * passed in widget or NULL if the passed in widget is not in a rooted + * hierarchy. * */ -WIDGET_API XPWidgetID XPFindRootWidget( - XPWidgetID inWidget); +WIDGET_API XPWidgetID XPFindRootWidget( + XPWidgetID inWidget); /* * XPBringRootWidgetToFront * - * This routine makes the specified widget be in the front most widget - * hierarchy. If this widget is a root widget, its widget hierarchy comes to - * front, otherwise the widget's root is brought to the front. If this widget - * is not in an active widget hiearchy (e.g. there is no root widget at the - * top of the tree), this routine does nothing. + * This routine makes the specified widget be in the front most widget + * hierarchy. If this widget is a root widget, its widget hierarchy comes to + * front, otherwise the widget's root is brought to the front. If this widget + * is not in an active widget hiearchy (e.g. there is no root widget at the + * top of the tree), this routine does nothing. * */ -WIDGET_API void XPBringRootWidgetToFront( - XPWidgetID inWidget); +WIDGET_API void XPBringRootWidgetToFront( + XPWidgetID inWidget); /* * XPIsWidgetInFront * - * This routine returns true if this widget's hierarchy is the front most - * hierarchy. It returns false if the widget's hierarchy is not in front, or - * if the widget is not in a rooted hierarchy. + * This routine returns true if this widget's hierarchy is the front most + * hierarchy. It returns false if the widget's hierarchy is not in front, or + * if the widget is not in a rooted hierarchy. * */ -WIDGET_API int XPIsWidgetInFront( - XPWidgetID inWidget); +WIDGET_API int XPIsWidgetInFront( + XPWidgetID inWidget); /* * XPGetWidgetGeometry * - * This routine returns the bounding box of a widget in global coordinates. - * Pass NULL for any parameter you are not interested in. + * This routine returns the bounding box of a widget in global coordinates. + * Pass NULL for any parameter you are not interested in. * */ -WIDGET_API void XPGetWidgetGeometry( - XPWidgetID inWidget, - int * outLeft, /* Can be NULL */ - int * outTop, /* Can be NULL */ - int * outRight, /* Can be NULL */ - int * outBottom); /* Can be NULL */ +WIDGET_API void XPGetWidgetGeometry( + XPWidgetID inWidget, + int * outLeft, /* Can be NULL */ + int * outTop, /* Can be NULL */ + int * outRight, /* Can be NULL */ + int * outBottom); /* Can be NULL */ /* * XPSetWidgetGeometry * - * This function changes the bounding box of a widget. + * This function changes the bounding box of a widget. * */ -WIDGET_API void XPSetWidgetGeometry( - XPWidgetID inWidget, - int inLeft, - int inTop, - int inRight, - int inBottom); +WIDGET_API void XPSetWidgetGeometry( + XPWidgetID inWidget, + int inLeft, + int inTop, + int inRight, + int inBottom); /* * XPGetWidgetForLocation * - * Given a widget and a location, this routine returns the widget ID of the - * child of that widget that owns that location. If inRecursive is true then - * this will return a child of a child of a widget as it tries to find the - * deepest widget at that location. If inVisibleOnly is true, then only - * visible widgets are considered, otherwise all widgets are considered. The - * widget ID passed for inContainer will be returned if the location is in - * that widget but not in a child widget. 0 is returned if the location is not - * in the container. - * - * NOTE: if a widget's geometry extends outside its parents geometry, it will - * not be returned by this call for mouse locations outside the parent - * geometry. The parent geometry limits the child's eligibility for mouse - * location. + * Given a widget and a location, this routine returns the widget ID of the + * child of that widget that owns that location. If inRecursive is true then + * this will return a child of a child of a widget as it tries to find the + * deepest widget at that location. If inVisibleOnly is true, then only + * visible widgets are considered, otherwise all widgets are considered. The + * widget ID passed for inContainer will be returned if the location is in + * that widget but not in a child widget. 0 is returned if the location is not + * in the container. + * + * NOTE: if a widget's geometry extends outside its parents geometry, it will + * not be returned by this call for mouse locations outside the parent + * geometry. The parent geometry limits the child's eligibility for mouse + * location. * */ -WIDGET_API XPWidgetID XPGetWidgetForLocation( - XPWidgetID inContainer, - int inXOffset, - int inYOffset, - int inRecursive, - int inVisibleOnly); +WIDGET_API XPWidgetID XPGetWidgetForLocation( + XPWidgetID inContainer, + int inXOffset, + int inYOffset, + int inRecursive, + int inVisibleOnly); /* * XPGetWidgetExposedGeometry * - * This routine returns the bounds of the area of a widget that is completely - * within its parent widgets. Since a widget's bounding box can be outside its - * parent, part of its area will not be elligible for mouse clicks and should - * not draw. Use XPGetWidgetGeometry to find out what area defines your - * widget's shape, but use this routine to find out what area to actually draw - * into. Note that the widget library does not use OpenGL clipping to keep - * frame rates up, although you could use it internally. + * This routine returns the bounds of the area of a widget that is completely + * within its parent widgets. Since a widget's bounding box can be outside its + * parent, part of its area will not be elligible for mouse clicks and should + * not draw. Use XPGetWidgetGeometry to find out what area defines your + * widget's shape, but use this routine to find out what area to actually draw + * into. Note that the widget library does not use OpenGL clipping to keep + * frame rates up, although you could use it internally. * */ -WIDGET_API void XPGetWidgetExposedGeometry( - XPWidgetID inWidgetID, - int * outLeft, /* Can be NULL */ - int * outTop, /* Can be NULL */ - int * outRight, /* Can be NULL */ - int * outBottom); /* Can be NULL */ +WIDGET_API void XPGetWidgetExposedGeometry( + XPWidgetID inWidgetID, + int * outLeft, /* Can be NULL */ + int * outTop, /* Can be NULL */ + int * outRight, /* Can be NULL */ + int * outBottom); /* Can be NULL */ /*************************************************************************** * ACCESSING WIDGET DATA ***************************************************************************/ +/* + * + * + */ /* * XPSetWidgetDescriptor * - * Every widget has a descriptor, which is a text string. What the text string - * is used for varies from widget to widget; for example, a push button's text - * is its descriptor, a caption shows its descriptor, and a text field's - * descriptor is the text being edited. In other words, the usage for the text - * varies from widget to widget, but this API provides a universal and - * convenient way to get at it. While not all UI widgets need their - * descriptor, many do. + * Every widget has a descriptor, which is a text string. What the text string + * is used for varies from widget to widget; for example, a push button's text + * is its descriptor, a caption shows its descriptor, and a text field's + * descriptor is the text being edited. In other words, the usage for the text + * varies from widget to widget, but this API provides a universal and + * convenient way to get at it. While not all UI widgets need their + * descriptor, many do. * */ -WIDGET_API void XPSetWidgetDescriptor( - XPWidgetID inWidget, - const char * inDescriptor); +WIDGET_API void XPSetWidgetDescriptor( + XPWidgetID inWidget, + const char * inDescriptor); /* * XPGetWidgetDescriptor * - * This routine returns the widget's descriptor. Pass in the length of the - * buffer you are going to receive the descriptor in. The descriptor will be - * null terminated for you. This routine returns the length of the actual - * descriptor; if you pass NULL for outDescriptor, you can get the - * descriptor's length without getting its text. If the length of the - * descriptor exceeds your buffer length, the buffer will not be null - * terminated (this routine has 'strncpy' semantics). + * This routine returns the widget's descriptor. Pass in the length of the + * buffer you are going to receive the descriptor in. The descriptor will be + * null terminated for you. This routine returns the length of the actual + * descriptor; if you pass NULL for outDescriptor, you can get the + * descriptor's length without getting its text. If the length of the + * descriptor exceeds your buffer length, the buffer will not be null + * terminated (this routine has 'strncpy' semantics). * */ -WIDGET_API int XPGetWidgetDescriptor( - XPWidgetID inWidget, - char * outDescriptor, - int inMaxDescLength); +WIDGET_API int XPGetWidgetDescriptor( + XPWidgetID inWidget, + char * outDescriptor, + int inMaxDescLength); /* * XPGetWidgetUnderlyingWindow * - * Returns the window (from the XPLMDisplay API) that backs your widget - * window. If you have opted in to modern windows, via a call to - * XPLMEnableFeature("XPLM_USE_NATIVE_WIDGET_WINDOWS", 1), you can use the - * returned window ID for display APIs like XPLMSetWindowPositioningMode(), - * allowing you to pop the widget window out into a real OS window, or move it - * into VR. + * Returns the window (from the XPLMDisplay API) that backs your widget + * window. If you have opted in to modern windows, via a call to + * XPLMEnableFeature("XPLM_USE_NATIVE_WIDGET_WINDOWS", 1), you can use the + * returned window ID for display APIs like XPLMSetWindowPositioningMode(), + * allowing you to pop the widget window out into a real OS window, or move it + * into VR. * */ -WIDGET_API XPLMWindowID XPGetWidgetUnderlyingWindow( - XPWidgetID inWidget); +WIDGET_API XPLMWindowID XPGetWidgetUnderlyingWindow( + XPWidgetID inWidget); /* * XPSetWidgetProperty * - * This function sets a widget's property. Properties are arbitrary values - * associated by a widget by ID. + * This function sets a widget's property. Properties are arbitrary values + * associated by a widget by ID. * */ -WIDGET_API void XPSetWidgetProperty( - XPWidgetID inWidget, - XPWidgetPropertyID inProperty, - intptr_t inValue); +WIDGET_API void XPSetWidgetProperty( + XPWidgetID inWidget, + XPWidgetPropertyID inProperty, + intptr_t inValue); /* * XPGetWidgetProperty * - * This routine returns the value of a widget's property, or 0 if the property - * is not defined. If you need to know whether the property is defined, pass a - * pointer to an int for inExists; the existence of that property will be - * returned in the int. Pass NULL for inExists if you do not need this - * information. + * This routine returns the value of a widget's property, or 0 if the property + * is not defined. If you need to know whether the property is defined, pass a + * pointer to an int for inExists; the existence of that property will be + * returned in the int. Pass NULL for inExists if you do not need this + * information. * */ -WIDGET_API intptr_t XPGetWidgetProperty( - XPWidgetID inWidget, - XPWidgetPropertyID inProperty, - int * inExists); /* Can be NULL */ +WIDGET_API intptr_t XPGetWidgetProperty( + XPWidgetID inWidget, + XPWidgetPropertyID inProperty, + int * inExists); /* Can be NULL */ /*************************************************************************** * KEYBOARD MANAGEMENT ***************************************************************************/ +/* + * + * + */ /* * XPSetKeyboardFocus * - * Controls which widget will receive keystrokes. Pass the widget ID of the - * widget to get the keys. Note that if the widget does not care about - * keystrokes, they will go to the parent widget, and if no widget cares about - * them, they go to X-Plane. + * XPSetKeyboardFocus controls which widget will receive keystrokes. Pass the + * Widget ID of the widget to get the keys. Note that if the widget does not + * care about keystrokes, they will go to the parent widget, and if no widget + * cares about them, they go to X-Plane. * - * If you set the keyboard focus to widget ID 0, X-Plane gets keyboard focus. + * If you set the keyboard focus to Widget ID 0, X-Plane gets keyboard focus. * - * This routine returns the widget ID that ended up with keyboard focus, or 0 - * for X-Plane. + * This routine returns the widget ID that ended up with keyboard focus, or 0 + * for X-Plane. * - * Keyboard focus is not changed if the new widget will not accept it. For - * setting to X-Plane, keyboard focus is always accepted. - * + * Keyboard focus is not changed if the new widget will not accept it. For + * setting to X-Plane, keyboard focus is always accepted. + * + * * */ -WIDGET_API XPWidgetID XPSetKeyboardFocus( - XPWidgetID inWidget); +WIDGET_API XPWidgetID XPSetKeyboardFocus( + XPWidgetID inWidget); /* * XPLoseKeyboardFocus * - * This causes the specified widget to lose focus; focus is passed to its - * parent, or the next parent that will accept it. This routine does nothing - * if this widget does not have focus. + * This causes the specified widget to lose focus; focus is passed to its + * parent, or the next parent that will accept it. This routine does nothing + * if this widget does not have focus. * */ -WIDGET_API void XPLoseKeyboardFocus( - XPWidgetID inWidget); +WIDGET_API void XPLoseKeyboardFocus( + XPWidgetID inWidget); /* * XPGetWidgetWithFocus * - * This routine returns the widget that has keyboard focus, or 0 if X-Plane - * has keyboard focus or some other plugin window that does not have widgets - * has focus. + * This routine returns the widget that has keyboard focus, or 0 if X-Plane + * has keyboard focus or some other plugin window that does not have widgets + * has focus. * */ -WIDGET_API XPWidgetID XPGetWidgetWithFocus(void); +WIDGET_API XPWidgetID XPGetWidgetWithFocus(void); /*************************************************************************** * CREATING CUSTOM WIDGETS ***************************************************************************/ +/* + * + * + */ /* * XPAddWidgetCallback * - * This function adds a new widget callback to a widget. This widget callback - * supercedes any existing ones and will receive messages first; if it does - * not handle messages they will go on to be handled by pre-existing widgets. + * This function adds a new widget callback to a widget. This widget callback + * supercedes any existing ones and will receive messages first; if it does + * not handle messages they will go on to be handled by pre-existing widgets. * - * The widget function will remain on the widget for the life of the widget. - * The creation message will be sent to the new callback immediately with the - * widget ID, and the destruction message will be sent before the other widget - * function receives a destruction message. + * The widget function will remain on the widget for the life of the widget. + * The creation message will be sent to the new callback immediately with the + * widget ID, and the destruction message will be sent before the other widget + * function receives a destruction message. * - * This provides a way to 'subclass' an existing widget. By providing a second - * hook that only handles certain widget messages, you can customize or extend - * widget behavior. + * This provides a way to 'subclass' an existing widget. By providing a second + * hook that only handles certain widget messages, you can customize or extend + * widget behavior. * */ -WIDGET_API void XPAddWidgetCallback( - XPWidgetID inWidget, - XPWidgetFunc_t inNewCallback); +WIDGET_API void XPAddWidgetCallback( + XPWidgetID inWidget, + XPWidgetFunc_t inNewCallback); /* * XPGetWidgetClassFunc * - * Given a widget class, this function returns the callbacks that power that - * widget class. + * Given a widget class, this function returns the callbacks that power that + * widget class. * */ -WIDGET_API XPWidgetFunc_t XPGetWidgetClassFunc( - XPWidgetClass inWidgetClass); +WIDGET_API XPWidgetFunc_t XPGetWidgetClassFunc( + XPWidgetClass inWidgetClass); #ifdef __cplusplus } diff --git a/src/SDK/CHeaders/XPLM/XPLMCamera.h b/src/SDK/CHeaders/XPLM/XPLMCamera.h index db930ef8..e12a8dfb 100755 --- a/src/SDK/CHeaders/XPLM/XPLMCamera.h +++ b/src/SDK/CHeaders/XPLM/XPLMCamera.h @@ -2,46 +2,42 @@ #define _XPLMCamera_h_ /* - * 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 * */ -/*************************************************************************** - * XPLMCamera - ***************************************************************************/ /* - * The XPLMCamera APIs allow plug-ins to control the camera angle in X-Plane. - * This has a number of applications, including but not limited to: - * - * - Creating new views (including dynamic/user-controllable views) for the - * user. - * - Creating applications that use X-Plane as a renderer of scenery, - * aircrafts, or both. - * - * The camera is controlled via six parameters: a location in OpenGL - * coordinates and pitch, roll and yaw, similar to an airplane's position. - * OpenGL coordinate info is described in detail in the XPLMGraphics - * documentation; generally you should use the XPLMGraphics routines to - * convert from world to local coordinates. The camera's orientation starts - * facing level with the ground directly up the negative-Z axis (approximately - * north) with the horizon horizontal. It is then rotated clockwise for yaw, - * pitched up for positive pitch, and rolled clockwise around the vector it is - * looking along for roll. - * - * You control the camera either either until the user selects a new view or - * permanently (the later being similar to how UDP camera control works). You - * control the camera by registering a callback per frame from which you - * calculate the new camera positions. This guarantees smooth camera motion. - * - * Use the XPLMDataAccess APIs to get information like the position of the - * aircraft, etc. for complex camera positioning. - * - * Note: if your goal is to move the virtual pilot in the cockpit, this API is - * not needed; simply update the datarefs for the pilot's head position. - * - * For custom exterior cameras, set the camera's mode to an external view - * first to get correct sound and 2-d panel behavior. + * XPLMCamera - THEORY OF OPERATION The XPLMCamera APIs allow plug-ins to + * control the camera angle in X-Plane. This has a number of applications, + * including but not limited to: + * + * - Creating new views (including dynamic/user-controllable views) for the + * user. + * + * - Creating applications that use X-Plane as a renderer of scenery, + * aircrafts, or both. + * + * The camera is controlled via six parameters: a location in OpenGL + * coordinates and pitch, roll and yaw, similar to an airplane's position. + * OpenGL coordinate info is described in detail in the XPLMGraphics + * documentation; generally you should use the XPLMGraphics routines to + * convert from world to local coordinates. The camera's orientation starts + * facing level with the ground directly up the negative-Z axis (approximately + * north) with the horizon horizontal. It is then rotated clockwise for yaw, + * pitched up for positive pitch, and rolled clockwise around the vector it is + * looking along for roll. + * + * You control the camera either either until the user selects a new view or + * permanently (the later being similar to how UDP camera control works). You + * control the camera by registering a callback per frame from which you + * calculate the new camera positions. This guarantees smooth camera motion. + * + * Use the XPLMDataAccess APIs to get information like the position of the + * aircraft, etc. for complex camera positioning. * */ @@ -54,21 +50,25 @@ extern "C" { /*************************************************************************** * CAMERA CONTROL ***************************************************************************/ +/* + * + * + */ /* * XPLMCameraControlDuration * - * This enumeration states how long you want to retain control of the camera. - * You can retain it indefinitely or until the user selects a new view. + * This enumeration states how long you want to retain control of the camera. + * You can retain it indefinitely or until the user selects a new view. * */ enum { - /* Control the camera until the user picks a new view. */ - xplm_ControlCameraUntilViewChanges = 1, + /* Control the camera until the user picks a new view. */ + xplm_ControlCameraUntilViewChanges = 1 - /* Control the camera until your plugin is disabled or another plugin forcably* - * takes control. */ - xplm_ControlCameraForever = 2, + /* Control the camera until your plugin is disabled or another plugin forcably * + * takes control. */ + ,xplm_ControlCameraForever = 2 }; @@ -77,12 +77,12 @@ typedef int XPLMCameraControlDuration; /* * XPLMCameraPosition_t * - * This structure contains a full specification of the camera. X, Y, and Z are - * the camera's position in OpenGL coordiantes; pitch, roll, and yaw are - * rotations from a camera facing flat north in degrees. Positive pitch means - * nose up, positive roll means roll right, and positive yaw means yaw right, - * all in degrees. Zoom is a zoom factor, with 1.0 meaning normal zoom and 2.0 - * magnifying by 2x (objects appear larger). + * This structure contains a full specification of the camera. X, Y, and Z are + * the camera's position in OpenGL coordiantes; pitch, roll, and yaw are + * rotations from a camera facing flat north in degrees. Positive pitch means + * nose up, positive roll means roll right, and positive yaw means yaw right, + * all in degrees. Zoom is a zoom factor, with 1.0 meaning normal zoom and 2.0 + * magnifying by 2x (objects appear larger). * */ typedef struct { @@ -98,67 +98,67 @@ typedef struct { /* * XPLMCameraControl_f * - * You use an XPLMCameraControl function to provide continuous control over - * the camera. You are passed in a structure in which to put the new camera - * position; modify it and return 1 to reposition the camera. Return 0 to - * surrender control of the camera; camera control will be handled by X-Plane - * on this draw loop. The contents of the structure as you are called are - * undefined. + * You use an XPLMCameraControl function to provide continuous control over + * the camera. You are passed in a structure in which to put the new camera + * position; modify it and return 1 to reposition the camera. Return 0 to + * surrender control of the camera; camera control will be handled by X-Plane + * on this draw loop. The contents of the structure as you are called are + * undefined. * - * If X-Plane is taking camera control away from you, this function will be - * called with inIsLosingControl set to 1 and ioCameraPosition NULL. + * If X-Plane is taking camera control away from you, this function will be + * called with inIsLosingControl set to 1 and ioCameraPosition NULL. * */ typedef int (* XPLMCameraControl_f)( - XPLMCameraPosition_t * outCameraPosition, /* Can be NULL */ - int inIsLosingControl, - void * inRefcon); + XPLMCameraPosition_t * outCameraPosition, /* Can be NULL */ + int inIsLosingControl, + void * inRefcon); /* * XPLMControlCamera * - * This function repositions the camera on the next drawing cycle. You must - * pass a non-null control function. Specify in inHowLong how long you'd like - * control (indefinitely or until a new view mode is set by the user). + * This function repositions the camera on the next drawing cycle. You must + * pass a non-null control function. Specify in inHowLong how long you'd like + * control (indefinitely or until a key is pressed). * */ -XPLM_API void XPLMControlCamera( - XPLMCameraControlDuration inHowLong, - XPLMCameraControl_f inControlFunc, - void * inRefcon); +XPLM_API void XPLMControlCamera( + XPLMCameraControlDuration inHowLong, + XPLMCameraControl_f inControlFunc, + void * inRefcon); /* * XPLMDontControlCamera * - * This function stops you from controlling the camera. If you have a camera - * control function, it will not be called with an inIsLosingControl flag. - * X-Plane will control the camera on the next cycle. + * This function stops you from controlling the camera. If you have a camera + * control function, it will not be called with an inIsLosingControl flag. + * X-Plane will control the camera on the next cycle. * - * For maximum compatibility you should not use this routine unless you are in - * posession of the camera. + * For maximum compatibility you should not use this routine unless you are in + * posession of the camera. * */ -XPLM_API void XPLMDontControlCamera(void); +XPLM_API void XPLMDontControlCamera(void); /* * XPLMIsCameraBeingControlled * - * This routine returns 1 if the camera is being controlled, zero if it is - * not. If it is and you pass in a pointer to a camera control duration, the - * current control duration will be returned. + * This routine returns 1 if the camera is being controlled, zero if it is + * not. If it is and you pass in a pointer to a camera control duration, the + * current control duration will be returned. * */ -XPLM_API int XPLMIsCameraBeingControlled( - XPLMCameraControlDuration * outCameraControlDuration); /* Can be NULL */ +XPLM_API int XPLMIsCameraBeingControlled( + XPLMCameraControlDuration * outCameraControlDuration); /* Can be NULL */ /* * XPLMReadCameraPosition * - * This function reads the current camera position. + * This function reads the current camera position. * */ -XPLM_API void XPLMReadCameraPosition( - XPLMCameraPosition_t * outCameraPosition); +XPLM_API void XPLMReadCameraPosition( + XPLMCameraPosition_t * outCameraPosition); #ifdef __cplusplus } diff --git a/src/SDK/CHeaders/XPLM/XPLMDataAccess.h b/src/SDK/CHeaders/XPLM/XPLMDataAccess.h index d8d1418f..6ea77c50 100755 --- a/src/SDK/CHeaders/XPLM/XPLMDataAccess.h +++ b/src/SDK/CHeaders/XPLM/XPLMDataAccess.h @@ -2,82 +2,61 @@ #define _XPLMDataAccess_h_ /* - * 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 * */ -/*************************************************************************** - * XPLMDataAccess - ***************************************************************************/ /* - * The data access API gives you a generic, flexible, high performance way to - * read and write data to and from X-Plane and other plug-ins. For example, - * this API allows you to read and set the nav radios, get the plane location, - * determine the current effective graphics frame rate, etc. - * - * The data access APIs are the way that you read and write data from the sim - * as well as other plugins. - * - * The API works using opaque data references. A data reference is a source of - * data; you do not know where it comes from, but once you have it you can - * read the data quickly and possibly write it. + * XPLM Data Access API - Theory of Operation * - * Dataref Lookup - * -------------- + * The data access API gives you a generic, flexible, high performance way to + * read and write data to and from X-Plane and other plug-ins. For example, + * this API allows you to read and set the nav radios, get the plane location, + * determine the current effective graphics frame rate, etc. * - * Data references are identified by verbose, permanent string names; by - * convention these names use path separates to form a hierarchy of datarefs, - * e.g. (sim/cockpit/radios/nav1_freq_hz). The actual opaque numeric value of - * the data reference, as returned by the XPLM API, is implementation defined - * and changes each time X-Plane is launched; therefore you need to look up - * the dataref by path every time your plugin runs. + * The data access APIs are the way that you read and write data from the sim + * as well as other plugins. * - * The task of looking up a data reference is relatively expensive; look up - * your data references once based on the verbose path strings, and save the - * opaque data reference value for the duration of your plugin's operation. - * Reading and writing data references is relatively fast (the cost is - * equivalent to two function calls through function pointers). + * The API works using opaque data references. A data reference is a source of + * data; you do not know where it comes from, but once you have it you can + * read the data quickly and possibly write it. To get a data reference, you + * look it up. * - * X-Plane publishes over 4000 datarefs; a complete list may be found in the - * reference section of the SDK online documentation (from the SDK home page, - * choose Documentation). + * Data references are identified by verbose string names + * (sim/cockpit/radios/nav1_freq_hz). The actual numeric value of the data + * reference is implementation defined and is likely to change each time the + * simulator is run (or the plugin that provides the datareference is + * reloaded). * - * Dataref Types - * ------------- + * The task of looking up a data reference is relatively expensive; look up + * your data references once based on verbose strings, and save the opaque + * data reference value for the duration of your plugin's operation. Reading + * and writing data references is relatively fast (the cost is equivalent to + * two function calls through function pointers). * - * A note on typing: you must know the correct data type to read and write. - * APIs are provided for reading and writing data in a number of ways. You can - * also double check the data type for a data ref. Automatic type conversion - * is not done for you. + * This allows data access to be high performance, while leaving in + * abstraction; since data references are opaque and are searched for, the + * underlying data access system can be rebuilt. * - * Dataref types are a set, e.g. a dataref can be more than one type. When - * this happens, you can choose which API you want to use to read. For - * example, it is not uncommon for a dataref to be of type float and double. - * This means you can use either XPLMGetDatad or XPLMGetDataf to read it. + * A note on typing: you must know the correct data type to read and write. + * APIs are provided for reading and writing data in a number of ways. You can + * also double check the data type for a data ref. Note that automatic + * conversion is not done for you. * - * Creating New Datarefs - * --------------------- + * A note for plugins sharing data with other plugins: the load order of + * plugins is not guaranteed. To make sure that every plugin publishing data + * has published their data references before other plugins try to subscribe, + * publish your data references in your start routine but resolve them the + * first time your 'enable' routine is called, or the first time they are + * needed in code. * - * X-Plane provides datarefs that come with the sim, but plugins can also - * create their own datarefs. A plugin creates a dataref by registering - * function callbacks to read and write the dataref. The XPLM will call your - * plugin each time some other plugin (or X-Plane) tries to read or write the - * dataref. You must provide a read (and optional write) callback for each - * data type you support. - * - * A note for plugins sharing data with other plugins: the load order of - * plugins is not guaranteed. To make sure that every plugin publishing data - * has published their data references before other plugins try to subscribe, - * publish your data references in your start routine but resolve them the - * first time your 'enable' routine is called, or the first time they are - * needed in code. - * - * When a plugin that created a dataref is unloaded, it becomes "orphaned". - * The dataref handle continues to be usable, but the dataref is not writable, - * and reading it will always return 0 (or 0 items for arrays). If the plugin - * is reloaded and re-registers the dataref, the handle becomes un-orphaned - * and works again. + * X-Plane publishes well over 1000 datarefs; a complete list may be found in + * the reference section of the SDK online documentation (from the SDK home + * page, choose Documentation). * */ @@ -91,8 +70,8 @@ extern "C" { * READING AND WRITING DATA ***************************************************************************/ /* - * These routines allow you to access data from within X-Plane and sometimes - * modify it. + * These routines allow you to access a wide variety of data from within + * X-Plane and modify some of it. * */ @@ -100,10 +79,10 @@ extern "C" { /* * XPLMDataRef * - * A data ref is an opaque handle to data provided by the simulator or another - * plugin. It uniquely identifies one variable (or array of variables) over - * the lifetime of your plugin. You never hard code these values; you always - * get them from XPLMFindDataRef. + * A data ref is an opaque handle to data provided by the simulator or another + * plugin. It uniquely identifies one variable (or array of variables) over + * the lifetime of your plugin. You never hard code these values; you always + * get them from XPLMFindDataRef. * */ typedef void * XPLMDataRef; @@ -111,37 +90,35 @@ typedef void * XPLMDataRef; /* * XPLMDataTypeID * - * This is an enumeration that defines the type of the data behind a data - * reference. This allows you to sanity check that the data type matches what - * you expect. But for the most part, you will know the type of data you are - * expecting from the online documentation. + * This is an enumeration that defines the type of the data behind a data + * reference. This allows you to sanity check that the data type matches what + * you expect. But for the most part, you will know the type of data you are + * expecting from the online documentation. * - * Data types each take a bit field; it is legal to have a single dataref be - * more than one type of data. Whe this happens, you can pick any matching - * get/set API. + * Data types each take a bit field, so sets of data types may be formed. * */ enum { - /* Data of a type the current XPLM doesn't do. */ - xplmType_Unknown = 0, + /* Data of a type the current XPLM doesn't do. */ + xplmType_Unknown = 0 - /* A single 4-byte integer, native endian. */ - xplmType_Int = 1, + /* A single 4-byte integer, native endian. */ + ,xplmType_Int = 1 - /* A single 4-byte float, native endian. */ - xplmType_Float = 2, + /* A single 4-byte float, native endian. */ + ,xplmType_Float = 2 - /* A single 8-byte double, native endian. */ - xplmType_Double = 4, + /* A single 8-byte double, native endian. */ + ,xplmType_Double = 4 - /* An array of 4-byte floats, native endian. */ - xplmType_FloatArray = 8, + /* An array of 4-byte floats, native endian. */ + ,xplmType_FloatArray = 8 - /* An array of 4-byte integers, native endian. */ - xplmType_IntArray = 16, + /* An array of 4-byte integers, native endian. */ + ,xplmType_IntArray = 16 - /* A variable block of data. */ - xplmType_Data = 32, + /* A variable block of data. */ + ,xplmType_Data = 32 }; @@ -150,84 +127,76 @@ typedef int XPLMDataTypeID; /* * XPLMFindDataRef * - * Given a c-style string that names the data ref, this routine looks up the - * actual opaque XPLMDataRef that you use to read and write the data. The - * string names for datarefs are published on the X-Plane SDK web site. + * Given a c-style string that names the data ref, this routine looks up the + * actual opaque XPLMDataRef that you use to read and write the data. The + * string names for datarefs are published on the X-Plane SDK web site. * - * This function returns NULL if the data ref cannot be found. + * This function returns NULL if the data ref cannot be found. * - * NOTE: this function is relatively expensive; save the XPLMDataRef this - * function returns for future use. Do not look up your data ref by string - * every time you need to read or write it. + * NOTE: this function is relatively expensive; save the XPLMDataRef this + * function returns for future use. Do not look up your data ref by string + * every time you need to read or write it. * */ -XPLM_API XPLMDataRef XPLMFindDataRef( - const char * inDataRefName); +XPLM_API XPLMDataRef XPLMFindDataRef( + const char * inDataRefName); /* * XPLMCanWriteDataRef * - * Given a data ref, this routine returns true if you can successfully set the - * data, false otherwise. Some datarefs are read-only. - * - * NOTE: even if a dataref is marked writable, it may not act writable. This - * can happen for datarefs that X-Plane writes to on every frame of - * simulation. In some cases, the dataref is writable but you have to set a - * separate "override" dataref to 1 to stop X-Plane from writing it. + * Given a data ref, this routine returns true if you can successfully set the + * data, false otherwise. Some datarefs are read-only. * */ -XPLM_API int XPLMCanWriteDataRef( - XPLMDataRef inDataRef); +XPLM_API int XPLMCanWriteDataRef( + XPLMDataRef inDataRef); /* * XPLMIsDataRefGood * - * This function returns true if the passed in handle is a valid dataref that - * is not orphaned. + * WARNING: This function is deprecated and should not be used. Datarefs are + * valid until plugins are reloaded or the sim quits. Plugins sharing datarefs + * should support these semantics by not unregistering datarefs during + * operation. (You should however unregister datarefs when your plugin is + * unloaded, as part of general resource cleanup.) * - * Note: there is normally no need to call this function; datarefs returned by - * XPLMFindDataRef remain valid (but possibly orphaned) unless there is a - * complete plugin reload (in which case your plugin is reloaded anyway). - * Orphaned datarefs can be safely read and return 0. Therefore you never need - * to call XPLMIsDataRefGood to 'check' the safety of a dataref. - * (XPLMIsDatarefGood performs some slow checking of the handle validity, so - * it has a perormance cost.) + * This function returns whether a data ref is still valid. If it returns + * false, you should refind the data ref from its original string. Calling an + * accessor function on a bad data ref will return a default value, typically + * 0 or 0-length data. * */ -XPLM_API int XPLMIsDataRefGood( - XPLMDataRef inDataRef); +XPLM_API int XPLMIsDataRefGood( + XPLMDataRef inDataRef); /* * XPLMGetDataRefTypes * - * This routine returns the types of the data ref for accessor use. If a data - * ref is available in multiple data types, the bit-wise OR of these types - * will be returned. + * This routine returns the types of the data ref for accessor use. If a data + * ref is available in multiple data types, they will all be returned. * */ -XPLM_API XPLMDataTypeID XPLMGetDataRefTypes( - XPLMDataRef inDataRef); +XPLM_API XPLMDataTypeID XPLMGetDataRefTypes( + XPLMDataRef inDataRef); /*************************************************************************** * DATA ACCESSORS ***************************************************************************/ /* - * These routines read and write the data references. For each supported data - * type there is a reader and a writer. + * These routines read and write the data references. For each supported data + * type there is a reader and a writer. * - * If the data ref is orphaned or the plugin that provides it is disabled or - * there is a type mismatch, the functions that read data will return 0 as a - * default value or not modify the passed in memory. The plugins that write - * data will not write under these circumstances or if the data ref is - * read-only. + * If the data ref is invalid or the plugin that provides it is disabled or + * there is a type mismatch, the functions that read data will return 0 as a + * default value or not modify the passed in memory. The plugins that write + * data will not write under these circumstances or if the data ref is + * read-only. NOTE: to keep the overhead of reading datarefs low, these + * routines do not do full validation of a dataref; passing a junk value for a + * dataref can result in crashing the sim. * - * NOTE: to keep the overhead of reading datarefs low, these routines do not - * do full validation of a dataref; passing a junk value for a dataref can - * result in crashing the sim. The get/set APIs do check for NULL. - * - * For array-style datarefs, you specify the number of items to read/write and - * the offset into the array; the actual number of items read or written is - * returned. This may be less to prevent an array-out-of-bounds error. + * For array-style datarefs, you specify the number of items to read/write and + * the offset into the array; the actual number of items read or written is + * returned. This may be less to prevent an array-out-of-bounds error. * */ @@ -235,220 +204,222 @@ XPLM_API XPLMDataTypeID XPLMGetDataRefTypes( /* * XPLMGetDatai * - * Read an integer data ref and return its value. The return value is the - * dataref value or 0 if the dataref is NULL or the plugin is disabled. + * Read an integer data ref and return its value. The return value is the + * dataref value or 0 if the dataref is invalid/NULL or the plugin is + * disabled. * */ -XPLM_API int XPLMGetDatai( - XPLMDataRef inDataRef); +XPLM_API int XPLMGetDatai( + XPLMDataRef inDataRef); /* * XPLMSetDatai * - * Write a new value to an integer data ref. This routine is a no-op if the - * plugin publishing the dataref is disabled, the dataref is NULL, or the - * dataref is not writable. + * Write a new value to an integer data ref. This routine is a no-op if the + * plugin publishing the dataref is disabled, the dataref is invalid, or the + * dataref is not writable. * */ -XPLM_API void XPLMSetDatai( - XPLMDataRef inDataRef, - int inValue); +XPLM_API void XPLMSetDatai( + XPLMDataRef inDataRef, + int inValue); /* * XPLMGetDataf * - * Read a single precision floating point dataref and return its value. The - * return value is the dataref value or 0.0 if the dataref is NULL or the - * plugin is disabled. + * Read a single precision floating point dataref and return its value. The + * return value is the dataref value or 0.0 if the dataref is invalid/NULL or + * the plugin is disabled. * */ -XPLM_API float XPLMGetDataf( - XPLMDataRef inDataRef); +XPLM_API float XPLMGetDataf( + XPLMDataRef inDataRef); /* * XPLMSetDataf * - * Write a new value to a single precision floating point data ref. This - * routine is a no-op if the plugin publishing the dataref is disabled, the - * dataref is NULL, or the dataref is not writable. + * Write a new value to a single precision floating point data ref. This + * routine is a no-op if the plugin publishing the dataref is disabled, the + * dataref is invalid, or the dataref is not writable. * */ -XPLM_API void XPLMSetDataf( - XPLMDataRef inDataRef, - float inValue); +XPLM_API void XPLMSetDataf( + XPLMDataRef inDataRef, + float inValue); /* * XPLMGetDatad * - * Read a double precision floating point dataref and return its value. The - * return value is the dataref value or 0.0 if the dataref is NULL or the - * plugin is disabled. + * Read a double precision floating point dataref and return its value. The + * return value is the dataref value or 0.0 if the dataref is invalid/NULL or + * the plugin is disabled. * */ -XPLM_API double XPLMGetDatad( - XPLMDataRef inDataRef); +XPLM_API double XPLMGetDatad( + XPLMDataRef inDataRef); /* * XPLMSetDatad * - * Write a new value to a double precision floating point data ref. This - * routine is a no-op if the plugin publishing the dataref is disabled, the - * dataref is NULL, or the dataref is not writable. + * Write a new value to a double precision floating point data ref. This + * routine is a no-op if the plugin publishing the dataref is disabled, the + * dataref is invalid, or the dataref is not writable. * */ -XPLM_API void XPLMSetDatad( - XPLMDataRef inDataRef, - double inValue); +XPLM_API void XPLMSetDatad( + XPLMDataRef inDataRef, + double inValue); /* * XPLMGetDatavi * - * Read a part of an integer array dataref. If you pass NULL for outValues, - * the routine will return the size of the array, ignoring inOffset and inMax. + * Read a part of an integer array dataref. If you pass NULL for outVaules, + * the routine will return the size of the array, ignoring inOffset and inMax. + * * - * If outValues is not NULL, then up to inMax values are copied from the - * dataref into outValues, starting at inOffset in the dataref. If inMax + - * inOffset is larger than the size of the dataref, less than inMax values - * will be copied. The number of values copied is returned. + * If outValues is not NULL, then up to inMax values are copied from the + * dataref into outValues, starting at inOffset in the dataref. If inMax + + * inOffset is larger than the size of the dataref, less than inMax values + * will be copied. The number of values copied is returned. * - * Note: the semantics of array datarefs are entirely implemented by the - * plugin (or X-Plane) that provides the dataref, not the SDK itself; the - * above description is how these datarefs are intended to work, but a rogue - * plugin may have different behavior. + * Note: the semantics of array datarefs are entirely implemented by the + * plugin (or X-Plane) that provides the dataref, not the SDK itself; the + * above description is how these datarefs are intended to work, but a rogue + * plugin may have different behavior. * */ -XPLM_API int XPLMGetDatavi( - XPLMDataRef inDataRef, - int * outValues, /* Can be NULL */ - int inOffset, - int inMax); +XPLM_API int XPLMGetDatavi( + XPLMDataRef inDataRef, + int * outValues, /* Can be NULL */ + int inOffset, + int inMax); /* * XPLMSetDatavi * - * Write part or all of an integer array dataref. The values passed by - * inValues are written into the dataref starting at inOffset. Up to inCount - * values are written; however if the values would write "off the end" of the - * dataref array, then fewer values are written. + * Write part or all of an integer array dataref. The values passed by + * inValues are written into the dataref starting at inOffset. Up to inCount + * values are written; however if the values would write "off the end" of the + * dataref array, then fewer values are written. * - * Note: the semantics of array datarefs are entirely implemented by the - * plugin (or X-Plane) that provides the dataref, not the SDK itself; the - * above description is how these datarefs are intended to work, but a rogue - * plugin may have different behavior. + * Note: the semantics of array datarefs are entirely implemented by the + * plugin (or X-Plane) that provides the dataref, not the SDK itself; the + * above description is how these datarefs are intended to work, but a rogue + * plugin may have different behavior. * */ -XPLM_API void XPLMSetDatavi( - XPLMDataRef inDataRef, - int * inValues, - int inoffset, - int inCount); +XPLM_API void XPLMSetDatavi( + XPLMDataRef inDataRef, + int * inValues, + int inoffset, + int inCount); /* * XPLMGetDatavf * - * Read a part of a single precision floating point array dataref. If you pass - * NULL for outVaules, the routine will return the size of the array, ignoring - * inOffset and inMax. + * Read a part of a single precision floating point array dataref. If you pass + * NULL for outVaules, the routine will return the size of the array, ignoring + * inOffset and inMax. * - * If outValues is not NULL, then up to inMax values are copied from the - * dataref into outValues, starting at inOffset in the dataref. If inMax + - * inOffset is larger than the size of the dataref, less than inMax values - * will be copied. The number of values copied is returned. + * If outValues is not NULL, then up to inMax values are copied from the + * dataref into outValues, starting at inOffset in the dataref. If inMax + + * inOffset is larger than the size of the dataref, less than inMax values + * will be copied. The number of values copied is returned. * - * Note: the semantics of array datarefs are entirely implemented by the - * plugin (or X-Plane) that provides the dataref, not the SDK itself; the - * above description is how these datarefs are intended to work, but a rogue - * plugin may have different behavior. + * Note: the semantics of array datarefs are entirely implemented by the + * plugin (or X-Plane) that provides the dataref, not the SDK itself; the + * above description is how these datarefs are intended to work, but a rogue + * plugin may have different behavior. * */ -XPLM_API int XPLMGetDatavf( - XPLMDataRef inDataRef, - float * outValues, /* Can be NULL */ - int inOffset, - int inMax); +XPLM_API int XPLMGetDatavf( + XPLMDataRef inDataRef, + float * outValues, /* Can be NULL */ + int inOffset, + int inMax); /* * XPLMSetDatavf * - * Write part or all of a single precision floating point array dataref. The - * values passed by inValues are written into the dataref starting at - * inOffset. Up to inCount values are written; however if the values would - * write "off the end" of the dataref array, then fewer values are written. + * Write part or all of a single precision floating point array dataref. The + * values passed by inValues are written into the dataref starting at + * inOffset. Up to inCount values are written; however if the values would + * write "off the end" of the dataref array, then fewer values are written. * - * Note: the semantics of array datarefs are entirely implemented by the - * plugin (or X-Plane) that provides the dataref, not the SDK itself; the - * above description is how these datarefs are intended to work, but a rogue - * plugin may have different behavior. + * Note: the semantics of array datarefs are entirely implemented by the + * plugin (or X-Plane) that provides the dataref, not the SDK itself; the + * above description is how these datarefs are intended to work, but a rogue + * plugin may have different behavior. * */ -XPLM_API void XPLMSetDatavf( - XPLMDataRef inDataRef, - float * inValues, - int inoffset, - int inCount); +XPLM_API void XPLMSetDatavf( + XPLMDataRef inDataRef, + float * inValues, + int inoffset, + int inCount); /* * XPLMGetDatab * - * Read a part of a byte array dataref. If you pass NULL for outVaules, the - * routine will return the size of the array, ignoring inOffset and inMax. + * Read a part of a byte array dataref. If you pass NULL for outVaules, the + * routine will return the size of the array, ignoring inOffset and inMax. * - * If outValues is not NULL, then up to inMax values are copied from the - * dataref into outValues, starting at inOffset in the dataref. If inMax + - * inOffset is larger than the size of the dataref, less than inMax values - * will be copied. The number of values copied is returned. + * If outValues is not NULL, then up to inMax values are copied from the + * dataref into outValues, starting at inOffset in the dataref. If inMax + + * inOffset is larger than the size of the dataref, less than inMax values + * will be copied. The number of values copied is returned. * - * Note: the semantics of array datarefs are entirely implemented by the - * plugin (or X-Plane) that provides the dataref, not the SDK itself; the - * above description is how these datarefs are intended to work, but a rogue - * plugin may have different behavior. + * Note: the semantics of array datarefs are entirely implemented by the + * plugin (or X-Plane) that provides the dataref, not the SDK itself; the + * above description is how these datarefs are intended to work, but a rogue + * plugin may have different behavior. * */ -XPLM_API int XPLMGetDatab( - XPLMDataRef inDataRef, - void * outValue, /* Can be NULL */ - int inOffset, - int inMaxBytes); +XPLM_API int XPLMGetDatab( + XPLMDataRef inDataRef, + void * outValue, /* Can be NULL */ + int inOffset, + int inMaxBytes); /* * XPLMSetDatab * - * Write part or all of a byte array dataref. The values passed by inValues - * are written into the dataref starting at inOffset. Up to inCount values are - * written; however if the values would write "off the end" of the dataref - * array, then fewer values are written. + * Write part or all of a byte array dataref. The values passed by inValues + * are written into the dataref starting at inOffset. Up to inCount values are + * written; however if the values would write "off the end" of the dataref + * array, then fewer values are written. * - * Note: the semantics of array datarefs are entirely implemented by the - * plugin (or X-Plane) that provides the dataref, not the SDK itself; the - * above description is how these datarefs are intended to work, but a rogue - * plugin may have different behavior. + * Note: the semantics of array datarefs are entirely implemented by the + * plugin (or X-Plane) that provides the dataref, not the SDK itself; the + * above description is how these datarefs are intended to work, but a rogue + * plugin may have different behavior. * */ -XPLM_API void XPLMSetDatab( - XPLMDataRef inDataRef, - void * inValue, - int inOffset, - int inLength); +XPLM_API void XPLMSetDatab( + XPLMDataRef inDataRef, + void * inValue, + int inOffset, + int inLength); /*************************************************************************** - * PUBLISHING YOUR PLUGIN'S DATA + * PUBLISHING YOUR PLUGINS DATA ***************************************************************************/ /* - * These functions allow you to create data references that other plug-ins and - * X-Plane can access via the above data access APIs. Data references - * published by other plugins operate the same as ones published by X-Plane in - * all manners except that your data reference will not be available to other - * plugins if/when your plugin is disabled. + * These functions allow you to create data references that other plug-ins can + * access via the above data access APIs. Data references published by other + * plugins operate the same as ones published by X-Plane in all manners except + * that your data reference will not be available to other plugins if/when + * your plugin is disabled. * - * You share data by registering data provider callback functions. When a - * plug-in requests your data, these callbacks are then called. You provide - * one callback to return the value when a plugin 'reads' it and another to - * change the value when a plugin 'writes' it. + * You share data by registering data provider callback functions. When a + * plug-in requests your data, these callbacks are then called. You provide + * one callback to return the value when a plugin 'reads' it and another to + * change the value when a plugin 'writes' it. * - * Important: you must pick a prefix for your datarefs other than "sim/" - - * this prefix is reserved for X-Plane. The X-Plane SDK website contains a - * registry where authors can select a unique first word for dataref names, to - * prevent dataref collisions between plugins. + * Important: you must pick a prefix for your datarefs other than "sim/" - + * this prefix is reserved for X-Plane. The X-Plane SDK website contains a + * registry where authors can select a unique first word for dataref names, to + * prevent dataref collisions between plugins. * */ @@ -456,202 +427,218 @@ XPLM_API void XPLMSetDatab( /* * XPLMGetDatai_f * - * Data provider function pointers. + * Data provider function pointers. * - * These define the function pointers you provide to get or set data. Note - * that you are passed a generic pointer for each one. This is the same - * pointer you pass in your register routine; you can use it to locate plugin - * variables, etc. + * These define the function pointers you provide to get or set data. Note + * that you are passed a generic pointer for each one. This is the same + * pointer you pass in your register routine; you can use it to find global + * variables, etc. * - * The semantics of your callbacks are the same as the dataref accessor above - * - basically routines like XPLMGetDatai are just pass-throughs from a caller - * to your plugin. Be particularly mindful in implementing array dataref - * read-write accessors; you are responsible for avoiding overruns, supporting - * offset read/writes, and handling a read with a NULL buffer. + * The semantics of your callbacks are the same as the dataref accessor above + * - basically routines like XPLMGetDatai are just pass-throughs from a caller + * to your plugin. Be particularly mindful in implementing array dataref + * read-write accessors; you are responsible for avoiding overruns, supporting + * offset read/writes, and handling a read with a NULL buffer. * */ typedef int (* XPLMGetDatai_f)( - void * inRefcon); + void * inRefcon); /* - * XPLMSetDatai_f + * XPLMSetDatai_f + * * */ typedef void (* XPLMSetDatai_f)( - void * inRefcon, - int inValue); + void * inRefcon, + int inValue); /* - * XPLMGetDataf_f + * XPLMGetDataf_f + * * */ typedef float (* XPLMGetDataf_f)( - void * inRefcon); + void * inRefcon); /* - * XPLMSetDataf_f + * XPLMSetDataf_f + * * */ typedef void (* XPLMSetDataf_f)( - void * inRefcon, - float inValue); + void * inRefcon, + float inValue); /* - * XPLMGetDatad_f + * XPLMGetDatad_f + * * */ typedef double (* XPLMGetDatad_f)( - void * inRefcon); + void * inRefcon); /* - * XPLMSetDatad_f + * XPLMSetDatad_f + * * */ typedef void (* XPLMSetDatad_f)( - void * inRefcon, - double inValue); + void * inRefcon, + double inValue); /* - * XPLMGetDatavi_f + * XPLMGetDatavi_f + * * */ typedef int (* XPLMGetDatavi_f)( - void * inRefcon, - int * outValues, /* Can be NULL */ - int inOffset, - int inMax); + void * inRefcon, + int * outValues, /* Can be NULL */ + int inOffset, + int inMax); /* - * XPLMSetDatavi_f + * XPLMSetDatavi_f + * * */ typedef void (* XPLMSetDatavi_f)( - void * inRefcon, - int * inValues, - int inOffset, - int inCount); + void * inRefcon, + int * inValues, + int inOffset, + int inCount); /* - * XPLMGetDatavf_f + * XPLMGetDatavf_f + * * */ typedef int (* XPLMGetDatavf_f)( - void * inRefcon, - float * outValues, /* Can be NULL */ - int inOffset, - int inMax); + void * inRefcon, + float * outValues, /* Can be NULL */ + int inOffset, + int inMax); /* - * XPLMSetDatavf_f + * XPLMSetDatavf_f + * * */ typedef void (* XPLMSetDatavf_f)( - void * inRefcon, - float * inValues, - int inOffset, - int inCount); + void * inRefcon, + float * inValues, + int inOffset, + int inCount); /* - * XPLMGetDatab_f + * XPLMGetDatab_f + * * */ typedef int (* XPLMGetDatab_f)( - void * inRefcon, - void * outValue, /* Can be NULL */ - int inOffset, - int inMaxLength); + void * inRefcon, + void * outValue, /* Can be NULL */ + int inOffset, + int inMaxLength); /* - * XPLMSetDatab_f + * XPLMSetDatab_f + * * */ typedef void (* XPLMSetDatab_f)( - void * inRefcon, - void * inValue, - int inOffset, - int inLength); + void * inRefcon, + void * inValue, + int inOffset, + int inLength); /* * XPLMRegisterDataAccessor * - * This routine creates a new item of data that can be read and written. Pass - * in the data's full name for searching, the type(s) of the data for - * accessing, and whether the data can be written to. For each data type you - * support, pass in a read accessor function and a write accessor function if - * necessary. Pass NULL for data types you do not support or write accessors - * if you are read-only. - * - * You are returned a data ref for the new item of data created. You can use - * this data ref to unregister your data later or read or write from it. - * - */ -XPLM_API XPLMDataRef XPLMRegisterDataAccessor( - const char * inDataName, - XPLMDataTypeID inDataType, - int inIsWritable, - XPLMGetDatai_f inReadInt, - XPLMSetDatai_f inWriteInt, - XPLMGetDataf_f inReadFloat, - XPLMSetDataf_f inWriteFloat, - XPLMGetDatad_f inReadDouble, - XPLMSetDatad_f inWriteDouble, - XPLMGetDatavi_f inReadIntArray, - XPLMSetDatavi_f inWriteIntArray, - XPLMGetDatavf_f inReadFloatArray, - XPLMSetDatavf_f inWriteFloatArray, - XPLMGetDatab_f inReadData, - XPLMSetDatab_f inWriteData, - void * inReadRefcon, - void * inWriteRefcon); + * This routine creates a new item of data that can be read and written. Pass + * in the data's full name for searching, the type(s) of the data for + * accessing, and whether the data can be written to. For each data type you + * support, pass in a read accessor function and a write accessor function if + * necessary. Pass NULL for data types you do not support or write accessors + * if you are read-only. + * + * You are returned a data ref for the new item of data created. You can use + * this data ref to unregister your data later or read or write from it. + * + */ +XPLM_API XPLMDataRef XPLMRegisterDataAccessor( + const char * inDataName, + XPLMDataTypeID inDataType, + int inIsWritable, + XPLMGetDatai_f inReadInt, + XPLMSetDatai_f inWriteInt, + XPLMGetDataf_f inReadFloat, + XPLMSetDataf_f inWriteFloat, + XPLMGetDatad_f inReadDouble, + XPLMSetDatad_f inWriteDouble, + XPLMGetDatavi_f inReadIntArray, + XPLMSetDatavi_f inWriteIntArray, + XPLMGetDatavf_f inReadFloatArray, + XPLMSetDatavf_f inWriteFloatArray, + XPLMGetDatab_f inReadData, + XPLMSetDatab_f inWriteData, + void * inReadRefcon, + void * inWriteRefcon); /* * XPLMUnregisterDataAccessor * - * Use this routine to unregister any data accessors you may have registered. - * You unregister a data ref by the XPLMDataRef you get back from - * registration. Once you unregister a data ref, your function pointer will - * not be called anymore. + * Use this routine to unregister any data accessors you may have registered. + * You unregister a data ref by the XPLMDataRef you get back from + * registration. Once you unregister a data ref, your function pointer will + * not be called anymore. + * + * For maximum compatibility, do not unregister your data accessors until + * final shutdown (when your XPluginStop routine is called). This allows other + * plugins to find your data reference once and use it for their entire time + * of operation. * */ -XPLM_API void XPLMUnregisterDataAccessor( - XPLMDataRef inDataRef); +XPLM_API void XPLMUnregisterDataAccessor( + XPLMDataRef inDataRef); /*************************************************************************** * SHARING DATA BETWEEN MULTIPLE PLUGINS ***************************************************************************/ /* - * The data reference registration APIs from the previous section allow a - * plugin to publish data in a one-owner manner; the plugin that publishes the - * data reference owns the real memory that the data ref uses. This is - * satisfactory for most cases, but there are also cases where plugnis need to - * share actual data. + * The data reference registration APIs from the previous section allow a + * plugin to publish data in a one-owner manner; the plugin that publishes the + * data reference owns the real memory that the data ref uses. This is + * satisfactory for most cases, but there are also cases where plugnis need to + * share actual data. * - * With a shared data reference, no one plugin owns the actual memory for the - * data reference; the plugin SDK allocates that for you. When the first - * plugin asks to 'share' the data, the memory is allocated. When the data is - * changed, every plugin that is sharing the data is notified. + * With a shared data reference, no one plugin owns the actual memory for the + * data reference; the plugin SDK allocates that for you. When the first + * plugin asks to 'share' the data, the memory is allocated. When the data is + * changed, every plugin that is sharing the data is notified. * - * Shared data references differ from the 'owned' data references from the - * previous section in a few ways: + * Shared data references differ from the 'owned' data references from the + * previous section in a few ways: * - * * With shared data references, any plugin can create the data reference; - * with owned plugins one plugin must create the data reference and others - * subscribe. (This can be a problem if you don't know which set of plugins - * will be present). + * - With shared data references, any plugin can create the data reference; + * with owned plugins one plugin must create the data reference and others + * subscribe. (This can be a problem if you don't know which set of plugins + * will be present). * - * * With shared data references, every plugin that is sharing the data is - * notified when the data is changed. With owned data references, only the - * one owner is notified when the data is changed. + * - With shared data references, every plugin that is sharing the data is + * notified when the data is changed. With owned data references, only the one + * owner is notified when the data is changed. * - * * With shared data references, you cannot access the physical memory of the - * data reference; you must use the XPLMGet... and XPLMSet... APIs. With an - * owned data reference, the one owning data reference can manipulate the - * data reference's memory in any way it sees fit. + * - With shared data references, you cannot access the physical memory of the + * data reference; you must use the XPLMGet... and XPLMSet... APIs. With an + * owned data reference, the one owning data reference can manipulate the data + * reference's memory in any way it sees fit. * - * Shared data references solve two problems: if you need to have a data - * reference used by several plugins but do not know which plugins will be - * installed, or if all plugins sharing data need to be notified when that - * data is changed, use shared data references. + * Shared data references solve two problems: if you need to have a data + * reference used by several plugins but do not know which plugins will be + * installed, or if all plugins sharing data need to be notified when that + * data is changed, use shared data references. * */ @@ -659,55 +646,55 @@ XPLM_API void XPLMUnregisterDataAccessor( /* * XPLMDataChanged_f * - * An XPLMDataChanged_f is a callback that the XPLM calls whenever any other - * plug-in modifies shared data. A refcon you provide is passed back to help - * identify which data is being changed. In response, you may want to call one - * of the XPLMGetDataxxx routines to find the new value of the data. + * An XPLMDataChanged_f is a callback that the XPLM calls whenever any other + * plug-in modifies shared data. A refcon you provide is passed back to help + * identify which data is being changed. In response, you may want to call one + * of the XPLMGetDataxxx routines to find the new value of the data. * */ typedef void (* XPLMDataChanged_f)( - void * inRefcon); + void * inRefcon); /* * XPLMShareData * - * This routine connects a plug-in to shared data, creating the shared data if - * necessary. inDataName is a standard path for the data ref, and inDataType - * specifies the type. This function will create the data if it does not - * exist. If the data already exists but the type does not match, an error is - * returned, so it is important that plug-in authors collaborate to establish - * public standards for shared data. + * This routine connects a plug-in to shared data, creating the shared data if + * necessary. inDataName is a standard path for the data ref, and inDataType + * specifies the type. This function will create the data if it does not + * exist. If the data already exists but the type does not match, an error is + * returned, so it is important that plug-in authors collaborate to establish + * public standards for shared data. * - * If a notificationFunc is passed in and is not NULL, that notification - * function will be called whenever the data is modified. The notification - * refcon will be passed to it. This allows your plug-in to know which shared - * data was changed if multiple shared data are handled by one callback, or if - * the plug-in does not use global variables. + * If a notificationFunc is passed in and is not NULL, that notification + * function will be called whenever the data is modified. The notification + * refcon will be passed to it. This allows your plug-in to know which shared + * data was changed if multiple shared data are handled by one callback, or if + * the plug-in does not use global variables. * - * A one is returned for successfully creating or finding the shared data; a - * zero if the data already exists but is of the wrong type. + * A one is returned for successfully creating or finding the shared data; a + * zero if the data already exists but is of the wrong type. * */ -XPLM_API int XPLMShareData( - const char * inDataName, - XPLMDataTypeID inDataType, - XPLMDataChanged_f inNotificationFunc, - void * inNotificationRefcon); +XPLM_API int XPLMShareData( + const char * inDataName, + XPLMDataTypeID inDataType, + XPLMDataChanged_f inNotificationFunc, + void * inNotificationRefcon); /* * XPLMUnshareData * - * This routine removes your notification function for shared data. Call it - * when done with the data to stop receiving change notifications. Arguments - * must match XPLMShareData. The actual memory will not necessarily be freed, - * since other plug-ins could be using it. + * This routine removes your notification function for shared data. Call it + * when done with the data to stop receiving change notifications. Arguments + * must match XPLMShareData. The actual memory will not necessarily be freed, + * since other plug-ins could be using it. * */ -XPLM_API int XPLMUnshareData( - const char * inDataName, - XPLMDataTypeID inDataType, - XPLMDataChanged_f inNotificationFunc, - void * inNotificationRefcon); +XPLM_API int XPLMUnshareData( + const char * inDataName, + XPLMDataTypeID inDataType, + XPLMDataChanged_f inNotificationFunc, + void * inNotificationRefcon); #ifdef __cplusplus } diff --git a/src/SDK/CHeaders/XPLM/XPLMDefs.h b/src/SDK/CHeaders/XPLM/XPLMDefs.h index bb1fe2fb..9e4e04aa 100755 --- a/src/SDK/CHeaders/XPLM/XPLMDefs.h +++ b/src/SDK/CHeaders/XPLM/XPLMDefs.h @@ -2,23 +2,23 @@ #define _XPLMDefs_h_ /* - * 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 * */ -/*************************************************************************** - * XPLMDefs - ***************************************************************************/ /* - * 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. * */ @@ -36,13 +36,13 @@ extern "C" { * 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.) * */ @@ -125,7 +125,7 @@ extern "C" { * GLOBAL DEFINITIONS ***************************************************************************/ /* - * These definitions are used in all parts of the SDK. + * These definitions are used in all parts of the SDK. * */ @@ -133,62 +133,61 @@ extern "C" { /* * 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. This includes the unloading and - * reloading of plugins that are part of the user's aircraft. + * 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. * - * 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. * */ typedef int XPLMPluginID; -/* No plugin. */ +/* No plugin. */ #define XPLM_NO_PLUGIN_ID (-1) -/* X-Plane itself */ +/* X-Plane itself */ #define XPLM_PLUGIN_XPLANE (0) -/* The current XPLM revision is 3.03 (303). */ -#define kXPLM_Version (303) +/* The current XPLM revision is 3.01 (301). */ +#define kXPLM_Version (301) /* * 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. * */ enum { - /* The shift key is down */ - xplm_ShiftFlag = 1, + /* The shift key is down */ + xplm_ShiftFlag = 1 - /* The option or alt key is down */ - xplm_OptionAltFlag = 2, + /* The option or alt key is down */ + ,xplm_OptionAltFlag = 2 - /* The control key is down* */ - xplm_ControlFlag = 4, + /* The control key is down* */ + ,xplm_ControlFlag = 4 - /* The key is being pressed down */ - xplm_DownFlag = 8, + /* The key is being pressed down */ + ,xplm_DownFlag = 8 - /* The key is being released */ - xplm_UpFlag = 16, + /* The key is being released */ + ,xplm_UpFlag = 16 }; @@ -198,16 +197,15 @@ typedef int XPLMKeyFlags; * 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. * */ @@ -254,29 +252,31 @@ typedef int XPLMKeyFlags; * 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). + * + * To assign virtual key codes we started with the Microsoft set but made some + * additions and changes. A few differences: * - * 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). + * 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. * - * To assign virtual key codes we started with the Microsoft set but made some - * additions and changes. A few differences: + * 2. Some keys that do not exist on both Mac and PC keyboards are removed. * - * 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. + * 3. Do not assume that the values of these keystrokes are interchangeable + * with MS v-keys. * */ @@ -323,7 +323,7 @@ typedef int XPLMKeyFlags; #define XPLM_VK_HELP 0x2F -/* 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) */ #define XPLM_VK_0 0x30 #define XPLM_VK_1 0x31 @@ -344,7 +344,7 @@ typedef int XPLMKeyFlags; #define XPLM_VK_9 0x39 -/* 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) */ #define XPLM_VK_A 0x41 #define XPLM_VK_B 0x42 @@ -477,8 +477,8 @@ typedef int XPLMKeyFlags; #define XPLM_VK_F24 0x87 -/* 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. */ #define XPLM_VK_EQUAL 0xB0 #define XPLM_VK_MINUS 0xB1 diff --git a/src/SDK/CHeaders/XPLM/XPLMDisplay.h b/src/SDK/CHeaders/XPLM/XPLMDisplay.h index 48c7a700..75774495 100755 --- a/src/SDK/CHeaders/XPLM/XPLMDisplay.h +++ b/src/SDK/CHeaders/XPLM/XPLMDisplay.h @@ -2,80 +2,83 @@ #define _XPLMDisplay_h_ /* - * 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 * */ -/*************************************************************************** - * XPLMDisplay - ***************************************************************************/ /* - * This API provides the basic hooks to draw in X-Plane and create user - * interface. All X-Plane drawing is done in OpenGL. The X-Plane plug-in - * manager takes care of properly setting up the OpenGL context and matrices. - * You do not decide when in your code's execution to draw; X-Plane tells you - * (via callbacks) when it is ready to have your plugin draw. - * - * X-Plane's drawing strategy is straightforward: every "frame" the screen is - * rendered by drawing the 3-D scene (dome, ground, objects, airplanes, etc.) - * and then drawing the cockpit on top of it. Alpha blending is used to - * overlay the cockpit over the world (and the gauges over the panel, etc.). - * X-Plane user interface elements (including windows like the map, the main - * menu, etc.) are then drawn on top of the cockpit. - * - * There are two ways you can draw: directly and in a window. - * - * Direct drawing (deprecated!---more on that below) involves drawing to the - * screen before or after X-Plane finishes a phase of drawing. When you draw - * directly, you can specify whether X-Plane is to complete this phase or not. - * This allows you to do three things: draw before X-Plane does (under it), - * draw after X-Plane does (over it), or draw instead of X-Plane. - * - * To draw directly, you register a callback and specify which phase you want - * to intercept. The plug-in manager will call you over and over to draw that - * phase. - * - * Direct drawing allows you to override scenery, panels, or anything. Note - * that you cannot assume that you are the only plug-in drawing at this phase. - * - * Direct drawing is deprecated; at some point in the X-Plane 11 run, it will - * likely become unsupported entirely as X-Plane transitions from OpenGL to - * modern graphics API backends (e.g., Vulkan, Metal, etc.). In the long term, - * plugins should use the XPLMInstance API for drawing 3-D objects---this will - * be much more efficient than general 3-D OpenGL drawing, and it will - * actually be supported by the new graphics backends. We do not yet know what - * the post-transition API for generic 3-D drawing will look like (if it - * exists at all). - * - * In contrast to direct drawing, window drawing provides a higher level - * functionality. With window drawing, you create a 2-D window that takes up a - * portion of the screen. Window drawing is always two dimensional. Window - * drawing is front-to-back controlled; you can specify that you want your - * window to be brought on top, and other plug-ins may put their window on top - * of you. Window drawing also allows you to sign up for key presses and - * receive mouse clicks. - * - * There are three ways to get keystrokes: - * - * 1. If you create a window, the window can take keyboard focus. It will - * then receive all keystrokes. If no window has focus, X-Plane receives - * keystrokes. Use this to implement typing in dialog boxes, etc. Only - * one window may have focus at a time; your window will be notified if it - * loses focus. - * 2. If you need low level access to the keystroke stream, install a key - * sniffer. Key sniffers can be installed above everything or right in - * front of the sim. - * 3. If you would like to associate key strokes with commands/functions in - * your plug-in, you should simply register a command (via - * XPLMCreateCommand()) and allow users to bind whatever key they choose to - * that command. Another (now deprecated) method of doing so is to use a - * hot key---a key-specific callback. Hotkeys are sent based on virtual - * key strokes, so any key may be distinctly mapped with any modifiers. - * Hot keys can be remapped by other plug-ins. As a plug-in, you don't - * have to worry about what your hot key ends up mapped to; other plug-ins - * may provide a UI for remapping keystrokes. So hotkeys allow a user to - * resolve conflicts and customize keystrokes. + * This API provides the basic hooks to draw in X-Plane and create user + * interface. All X-Plane drawing is done in OpenGL. The X-Plane plug-in + * manager takes care of properly setting up the OpenGL context and matrices. + * You do not decide when in your code's execution to draw; X-Plane tells you + * (via callbacks) when it is ready to have your plugin draw. + * + * X-Plane's drawing strategy is straightforward: every "frame" the screen is + * rendered by drawing the 3-D scene (dome, ground, objects, airplanes, etc.) + * and then drawing the cockpit on top of it. Alpha blending is used to + * overlay the cockpit over the world (and the gauges over the panel, etc.). + * X-Plane user interface elements (including windows like the map, the main + * menu, etc.) are then drawn on top of the cockpit. + * + * There are two ways you can draw: directly and in a window. + * + * Direct drawing (deprecated!---more on that below) involves drawing to the + * screen before or after X-Plane finishes a phase of drawing. When you draw + * directly, you can specify whether X-Plane is to complete this phase or not. + * This allows you to do three things: draw before X-Plane does (under it), + * draw after X-Plane does (over it), or draw instead of X-Plane. + * + * To draw directly, you register a callback and specify which phase you want + * to intercept. The plug-in manager will call you over and over to draw that + * phase. + * + * Direct drawing allows you to override scenery, panels, or anything. Note + * that you cannot assume that you are the only plug-in drawing at this + * phase. + * + * Direct drawing is deprecated; at some point in the X-Plane 11 run, it will + * likely become unsupported entirely as X-Plane transitions from OpenGL to + * modern graphics API backends (e.g., Vulkan, Metal, etc.). In the long term, + * plugins should use the XPLMInstance API for drawing 3-D objects---this will + * be much more efficient than general 3-D OpenGL drawing, and it will + * actually be supported by the new graphics backends. We do not yet know what + * the post-transition API for generic 3-D drawing will look like (if it + * exists at all). + * + * In contrast to direct drawing, window drawing provides a higher level + * functionality. With window drawing, you create a 2-D window that takes up a + * portion of the screen. Window drawing is always two dimensional. Window + * drawing is front-to-back controlled; you can specify that you want your + * window to be brought on top, and other plug-ins may put their window on top + * of you. Window drawing also allows you to sign up for key presses and + * receive mouse clicks. + * + * There are three ways to get keystrokes: + * + * 1. If you create a window, the window can take keyboard focus. It will + * then receive all keystrokes. If no window has focus, X-Plane receives + * keystrokes. Use this to implement typing in dialog boxes, etc. Only one + * window may have focus at a time; your window will be notified if it loses + * focus. + * + * 2. If you need low level access to the keystroke stream, install a key + * sniffer. Key sniffers can be installed above everything or right in front + * of the sim. + * + * 3. If you would like to associate key strokes with commands/functions in + * your plug-in, you should simply register a command (via + * XPLMCreateCommand()) and allow users to bind whatever key they choose to + * that command. Another (now deprecated) method of doing so is to use a hot + * key---a key-specific callback. Hotkeys are sent based on virtual key + * strokes, so any key may be distinctly mapped with any modifiers. Hot keys + * can be remapped by other plug-ins. As a plug-in, you don't have to worry + * about what your hot key ends up mapped to; other plug-ins may provide a UI + * for remapping keystrokes. So hotkeys allow a user to resolve conflicts and + * customize keystrokes. * */ @@ -89,18 +92,18 @@ extern "C" { * DRAWING CALLBACKS ***************************************************************************/ /* - * Basic drawing callbacks, for low level intercepting of X-Plane's render - * loop. The purpose of drawing callbacks is to provide targeted additions or - * replacements to X-Plane's graphics environment (for example, to add extra - * custom objects, or replace drawing of the AI aircraft). Do not assume that - * the drawing callbacks will be called in the order implied by the - * enumerations. Also do not assume that each drawing phase ends before - * another begins; they may be nested. + * Basic drawing callbacks, for low level intercepting of X-Plane's render + * loop. The purpose of drawing callbacks is to provide targeted additions or + * replacements to X-Plane's graphics environment (for example, to add extra + * custom objects, or replace drawing of the AI aircraft). Do not assume that + * the drawing callbacks will be called in the order implied by the + * enumerations. Also do not assume that each drawing phase ends before + * another begins; they may be nested. * - * Note that all APIs in this section are deprecated, and will likely be - * removed during the X-Plane 11 run as part of the transition to - * Vulkan/Metal/etc. See the XPLMInstance API for future-proof drawing of 3-D - * objects. + * Note that all APIs in this section are deprecated, and will likely be + * removed during the X-Plane 11 run as part of the transition to + * Vulkan/Metal/etc. See the XPLMInstance API for future-proof drawing of 3-D + * objects. * */ @@ -108,101 +111,68 @@ extern "C" { /* * XPLMDrawingPhase * - * This constant indicates which part of drawing we are in. Drawing is done - * from the back to the front. We get a callback before or after each item. - * Metaphases provide access to the beginning and end of the 3d (scene) and - * 2d (cockpit) drawing in a manner that is independent of new phases added - * via X-Plane implementation. - * - * **NOTE**: As of XPLM302 the legacy 3D drawing phases (xplm_Phase_FirstScene - * to xplm_Phase_LastScene) are deprecated. When running under X-Plane 11.50 - * with the modern Vulkan or Metal backend, X-Plane will no longer call - * these drawing phases. There is a new drawing phase, xplm_Phase_Modern3D, - * which is supported under OpenGL and Vulkan which is called out roughly - * where the old before xplm_Phase_Airplanes phase was for blending. This - * phase is *NOT* supported under Metal and comes with potentially - * substantial performance overhead. Please do *NOT* opt into this phase if - * you don't do any actual drawing that requires the depth buffer in some - * way! - * - * **WARNING**: As X-Plane's scenery evolves, some drawing phases may cease to - * exist and new ones may be invented. If you need a particularly specific - * use of these codes, consult Austin and/or be prepared to revise your code - * as X-Plane evolves. + * This constant indicates which part of drawing we are in. Drawing is done + * from the back to the front. We get a callback before or after each item. + * Metaphases provide access to the beginning and end of the 3d (scene) and 2d + * (cockpit) drawing in a manner that is independent of new phases added via + * X-Plane implementation. + * + * WARNING: As X-Plane's scenery evolves, some drawing phases may cease to + * exist and new ones may be invented. If you need a particularly specific + * use of these codes, consult Austin and/or be prepared to revise your code + * as X-Plane evolves. * */ enum { -#if defined(XPLM_DEPRECATED) - /* Deprecated as of XPLM302. This is the earliest point at which you can draw * - * in 3-d. */ - xplm_Phase_FirstScene = 0, - -#endif /* XPLM_DEPRECATED */ -#if defined(XPLM_DEPRECATED) - /* Deprecated as of XPLM302. Drawing of land and water. */ - xplm_Phase_Terrain = 5, - -#endif /* XPLM_DEPRECATED */ -#if defined(XPLM_DEPRECATED) - /* Deprecated as of XPLM302. Drawing runways and other airport detail. */ - xplm_Phase_Airports = 10, - -#endif /* XPLM_DEPRECATED */ -#if defined(XPLM_DEPRECATED) - /* Deprecated as of XPLM302. Drawing roads, trails, trains, etc. */ - xplm_Phase_Vectors = 15, - -#endif /* XPLM_DEPRECATED */ -#if defined(XPLM_DEPRECATED) - /* Deprecated as of XPLM302. 3-d objects (houses, smokestacks, etc. */ - xplm_Phase_Objects = 20, - -#endif /* XPLM_DEPRECATED */ -#if defined(XPLM_DEPRECATED) - /* Deprecated as of XPLM302. External views of airplanes, both yours and the * - * AI aircraft. */ - xplm_Phase_Airplanes = 25, - -#endif /* XPLM_DEPRECATED */ -#if defined(XPLM_DEPRECATED) - /* Deprecated as of XPLM302. This is the last point at which you can draw in * - * 3-d. */ - xplm_Phase_LastScene = 30, - -#endif /* XPLM_DEPRECATED */ -#if defined(XPLM302) - /* A chance to do modern 3D drawing. */ - xplm_Phase_Modern3D = 31, - -#endif /* XPLM302 */ - /* This is the first phase where you can draw in 2-d. */ - xplm_Phase_FirstCockpit = 35, - - /* The non-moving parts of the aircraft panel. */ - xplm_Phase_Panel = 40, - - /* The moving parts of the aircraft panel. */ - xplm_Phase_Gauges = 45, - - /* Floating windows from plugins. */ - xplm_Phase_Window = 50, - - /* The last chance to draw in 2d. */ - xplm_Phase_LastCockpit = 55, + /* This is the earliest point at which you can draw in 3-d. */ + xplm_Phase_FirstScene = 0 + + /* Drawing of land and water. */ + ,xplm_Phase_Terrain = 5 + + /* Drawing runways and other airport detail. */ + ,xplm_Phase_Airports = 10 + + /* Drawing roads, trails, trains, etc. */ + ,xplm_Phase_Vectors = 15 + + /* 3-d objects (houses, smokestacks, etc. */ + ,xplm_Phase_Objects = 20 + + /* External views of airplanes, both yours and the AI aircraft. */ + ,xplm_Phase_Airplanes = 25 + + /* This is the last point at which you can draw in 3-d. */ + ,xplm_Phase_LastScene = 30 + + /* This is the first phase where you can draw in 2-d. */ + ,xplm_Phase_FirstCockpit = 35 + + /* The non-moving parts of the aircraft panel. */ + ,xplm_Phase_Panel = 40 + + /* The moving parts of the aircraft panel. */ + ,xplm_Phase_Gauges = 45 + + /* Floating windows from plugins. */ + ,xplm_Phase_Window = 50 + + /* The last change to draw in 2d. */ + ,xplm_Phase_LastCockpit = 55 #if defined(XPLM200) - /* Removed as of XPLM300; Use the full-blown XPLMMap API instead. */ - xplm_Phase_LocalMap3D = 100, + /* Removed as of XPLM300; Use the full-blown XPLMMap API instead. */ + ,xplm_Phase_LocalMap3D = 100 #endif /* XPLM200 */ #if defined(XPLM200) - /* Removed as of XPLM300; Use the full-blown XPLMMap API instead. */ - xplm_Phase_LocalMap2D = 101, + /* Removed as of XPLM300; Use the full-blown XPLMMap API instead. */ + ,xplm_Phase_LocalMap2D = 101 #endif /* XPLM200 */ #if defined(XPLM200) - /* Removed as of XPLM300; Use the full-blown XPLMMap API instead. */ - xplm_Phase_LocalMapProfile = 102, + /* Removed as of XPLM300; Use the full-blown XPLMMap API instead. */ + ,xplm_Phase_LocalMapProfile = 102 #endif /* XPLM200 */ @@ -212,100 +182,100 @@ typedef int XPLMDrawingPhase; /* * XPLMDrawCallback_f * - * This is the prototype for a low level drawing callback. You are passed in - * the phase and whether it is before or after. If you are before the phase, - * return 1 to let X-Plane draw or 0 to suppress X-Plane drawing. If you are - * after the phase the return value is ignored. + * This is the prototype for a low level drawing callback. You are passed in + * the phase and whether it is before or after. If you are before the phase, + * return 1 to let X-Plane draw or 0 to suppress X-Plane drawing. If you are + * after the phase the return value is ignored. * - * Refcon is a unique value that you specify when registering the callback, - * allowing you to slip a pointer to your own data to the callback. + * Refcon is a unique value that you specify when registering the callback, + * allowing you to slip a pointer to your own data to the callback. * - * Upon entry the OpenGL context will be correctly set up for you and OpenGL - * will be in 'local' coordinates for 3d drawing and panel coordinates for 2d - * drawing. The OpenGL state (texturing, etc.) will be unknown. + * Upon entry the OpenGL context will be correctly set up for you and OpenGL + * will be in 'local' coordinates for 3d drawing and panel coordinates for 2d + * drawing. The OpenGL state (texturing, etc.) will be unknown. * */ typedef int (* XPLMDrawCallback_f)( - XPLMDrawingPhase inPhase, - int inIsBefore, - void * inRefcon); + XPLMDrawingPhase inPhase, + int inIsBefore, + void * inRefcon); /* * XPLMRegisterDrawCallback * - * This routine registers a low level drawing callback. Pass in the phase you - * want to be called for and whether you want to be called before or after. - * This routine returns 1 if the registration was successful, or 0 if the - * phase does not exist in this version of X-Plane. You may register a - * callback multiple times for the same or different phases as long as the - * refcon is unique each time. + * This routine registers a low level drawing callback. Pass in the phase you + * want to be called for and whether you want to be called before or after. + * This routine returns 1 if the registration was successful, or 0 if the + * phase does not exist in this version of X-Plane. You may register a + * callback multiple times for the same or different phases as long as the + * refcon is unique each time. * - * Note that this function will likely be removed during the X-Plane 11 run as - * part of the transition to Vulkan/Metal/etc. See the XPLMInstance API for - * future-proof drawing of 3-D objects. + * Note that this function will likely be removed during the X-Plane 11 run as + * part of the transition to Vulkan/Metal/etc. See the XPLMInstance API for + * future-proof drawing of 3-D objects. * */ -XPLM_API int XPLMRegisterDrawCallback( - XPLMDrawCallback_f inCallback, - XPLMDrawingPhase inPhase, - int inWantsBefore, - void * inRefcon); +XPLM_API int XPLMRegisterDrawCallback( + XPLMDrawCallback_f inCallback, + XPLMDrawingPhase inPhase, + int inWantsBefore, + void * inRefcon); /* * XPLMUnregisterDrawCallback * - * This routine unregisters a draw callback. You must unregister a callback - * for each time you register a callback if you have registered it multiple - * times with different refcons. The routine returns 1 if it can find the - * callback to unregister, 0 otherwise. + * This routine unregisters a draw callback. You must unregister a callback + * for each time you register a callback if you have registered it multiple + * times with different refcons. The routine returns 1 if it can find the + * callback to unregister, 0 otherwise. * - * Note that this function will likely be removed during the X-Plane 11 run as - * part of the transition to Vulkan/Metal/etc. See the XPLMInstance API for - * future-proof drawing of 3-D objects. + * Note that this function will likely be removed during the X-Plane 11 run as + * part of the transition to Vulkan/Metal/etc. See the XPLMInstance API for + * future-proof drawing of 3-D objects. * */ -XPLM_API int XPLMUnregisterDrawCallback( - XPLMDrawCallback_f inCallback, - XPLMDrawingPhase inPhase, - int inWantsBefore, - void * inRefcon); +XPLM_API int XPLMUnregisterDrawCallback( + XPLMDrawCallback_f inCallback, + XPLMDrawingPhase inPhase, + int inWantsBefore, + void * inRefcon); /*************************************************************************** * WINDOW API ***************************************************************************/ /* - * The window API provides a high-level abstraction for drawing with UI - * interaction. + * The window API provides a high-level abstraction for drawing with UI + * interaction. * - * Windows may operate in one of two modes: legacy (for plugins compiled - * against old versions of the XPLM, as well as windows created via the - * deprecated XPLMCreateWindow() function, rather than XPLMCreateWindowEx()), - * or modern (for windows compiled against the XPLM300 or newer API, and - * created via XPLMCreateWindowEx()). + * Windows may operate in one of two modes: legacy (for plugins compiled + * against old versions of the XPLM, as well as windows created via the + * deprecated XPLMCreateWindow() function, rather than XPLMCreateWindowEx()), + * or modern (for windows compiled against the XPLM300 or newer API, and + * created via XPLMCreateWindowEx()). * - * Modern windows have access to new X-Plane 11 windowing features, like - * support for new positioning modes (including being "popped out" into their - * own first-class window in the operating system). They can also optionally - * be decorated in the style of X-Plane 11 windows (like the map). + * Modern windows have access to new X-Plane 11 windowing features, like + * support for new positioning modes (including being "popped out" into their + * own first-class window in the operating system). They can also optionally + * be decorated in the style of X-Plane 11 windows (like the map). * - * Modern windows operate in "boxel" units. A boxel ("box of pixels") is a - * unit of virtual pixels which, depending on X-Plane's scaling, may - * correspond to an arbitrary NxN "box" of real pixels on screen. Because - * X-Plane handles this scaling automatically, you can effectively treat the - * units as though you were simply drawing in pixels, and know that when - * X-Plane is running with 150% or 200% scaling, your drawing will be - * automatically scaled (and likewise all mouse coordinates, screen bounds, - * etc. will also be auto-scaled). + * Modern windows operate in "boxel" units. A boxel ("box of pixels") is a + * unit of virtual pixels which, depending on X-Plane's scaling, may + * correspond to an arbitrary NxN "box" of real pixels on screen. Because + * X-Plane handles this scaling automatically, you can effectively treat the + * units as though you were simply drawing in pixels, and know that when + * X-Plane is running with 150% or 200% scaling, your drawing will be + * automatically scaled (and likewise all mouse coordinates, screen bounds, + * etc. will also be auto-scaled). * - * In contrast, legacy windows draw in true screen pixels, and thus tend to - * look quite small when X-Plane is operating in a scaled mode. + * In contrast, legacy windows draw in true screen pixels, and thus tend to + * look quite small when X-Plane is operating in a scaled mode. * - * Legacy windows have their origin in the lower left of the main X-Plane - * window. In contrast, since modern windows are not constrained to the main - * window, they have their origin in the lower left of the entire global - * desktop space, and the lower left of the main X-Plane window is not - * guaranteed to be (0, 0). In both cases, x increases as you move left, and y - * increases as you move up. + * Legacy windows have their origin in the lower left of the main X-Plane + * window. In contrast, since modern windows are not constrained to the main + * window, they have their origin in the lower left of the entire global + * desktop space, and the lower left of the main X-Plane window is not + * guaranteed to be (0, 0). In both cases, x increases as you move left, and y + * increases as you move up. * */ @@ -313,10 +283,10 @@ XPLM_API int XPLMUnregisterDrawCallback( /* * XPLMWindowID * - * This is an opaque identifier for a window. You use it to control your - * window. When you create a window (via either XPLMCreateWindow() or - * XPLMCreateWindowEx()), you will specify callbacks to handle drawing, mouse - * interaction, etc. + * This is an opaque identifier for a window. You use it to control your + * window. When you create a window (via either XPLMCreateWindow() or + * XPLMCreateWindowEx()), you will specify callbacks to handle drawing, mouse + * interaction, etc. * */ typedef void * XPLMWindowID; @@ -324,60 +294,60 @@ typedef void * XPLMWindowID; /* * XPLMDrawWindow_f * - * A callback to handle 2-D drawing of your window. You are passed in your - * window and its refcon. Draw the window. You can use other XPLM functions - * from this header to find the current dimensions of your window, etc. When - * this callback is called, the OpenGL context will be set properly for 2-D - * window drawing. + * A callback to handle 2-D drawing of your window. You are passed in your + * window and its refcon. Draw the window. You can use other XPLM functions + * from this header to find the current dimensions of your window, etc. When + * this callback is called, the OpenGL context will be set properly for 2-D + * window drawing. * - * **Note**: Because you are drawing your window over a background, you can - * make a translucent window easily by simply not filling in your entire - * window's bounds. + * NOTE: Because you are drawing your window over a background, you can make a + * translucent window easily by simply not filling in your entire window's + * bounds. * */ typedef void (* XPLMDrawWindow_f)( - XPLMWindowID inWindowID, - void * inRefcon); + XPLMWindowID inWindowID, + void * inRefcon); /* * XPLMHandleKey_f * - * This function is called when a key is pressed or keyboard focus is taken - * away from your window. If losingFocus is 1, you are losing the keyboard - * focus, otherwise a key was pressed and inKey contains its character. You - * are also passed your window and a refcon. + * This function is called when a key is pressed or keyboard focus is taken + * away from your window. If losingFocus is 1, you are losing the keyboard + * focus, otherwise a key was pressed and inKey contains its character. You + * are also passed your window and a refcon. * - * Warning: this API declares virtual keys as a signed character; however the - * VKEY #define macros in XPLMDefs.h define the vkeys using unsigned values - * (that is 0x80 instead of -0x80). So you may need to cast the incoming vkey - * to an unsigned char to get correct comparisons in C. + * Warning: this API declares virtual keys as a signed character; however the + * VKEY #define macros in XPLMDefs.h define the vkeys using unsigned values + * (that is 0x80 instead of -0x80). So you may need to cast the incoming vkey + * to an unsigned char to get correct comparisons in C. * */ typedef void (* XPLMHandleKey_f)( - XPLMWindowID inWindowID, - char inKey, - XPLMKeyFlags inFlags, - char inVirtualKey, - void * inRefcon, - int losingFocus); + XPLMWindowID inWindowID, + char inKey, + XPLMKeyFlags inFlags, + char inVirtualKey, + void * inRefcon, + int losingFocus); /* * XPLMMouseStatus * - * When the mouse is clicked, your mouse click routine is called repeatedly. - * It is first called with the mouse down message. It is then called zero or - * more times with the mouse-drag message, and finally it is called once with - * the mouse up message. All of these messages will be directed to the same - * window; you are guaranteed to not receive a drag or mouse-up event without - * first receiving the corresponding mouse-down. + * When the mouse is clicked, your mouse click routine is called repeatedly. + * It is first called with the mouse down message. It is then called zero or + * more times with the mouse-drag message, and finally it is called once with + * the mouse up message. All of these messages will be directed to the same + * window; you are guaranteed to not receive a drag or mouse-up event without + * first receiving the corresponding mouse-down. * */ enum { - xplm_MouseDown = 1, + xplm_MouseDown = 1 - xplm_MouseDrag = 2, + ,xplm_MouseDrag = 2 - xplm_MouseUp = 3, + ,xplm_MouseUp = 3 }; @@ -386,55 +356,54 @@ typedef int XPLMMouseStatus; /* * XPLMHandleMouseClick_f * - * You receive this call for one of three events: + * You receive this call for one of three events: * - * - when the user clicks the mouse button down - * - (optionally) when the user drags the mouse after a down-click, but before - * the up-click - * - when the user releases the down-clicked mouse button. + * - when the user clicks the mouse button down - (optionally) when the user + * drags the mouse after a down-click, but before the up-click - when the user + * releases the down-clicked mouse button. * - * You receive the x and y of the click, your window, and a refcon. Return 1 - * to consume the click, or 0 to pass it through. + * You receive the x and y of the click, your window, and a refcon. Return 1 + * to consume the click, or 0 to pass it through. * - * WARNING: passing clicks through windows (as of this writing) causes mouse - * tracking problems in X-Plane; do not use this feature! + * WARNING: passing clicks through windows (as of this writing) causes mouse + * tracking problems in X-Plane; do not use this feature! * - * The units for x and y values match the units used in your window. Thus, for - * "modern" windows (those created via XPLMCreateWindowEx() and compiled - * against the XPLM300 library), the units are boxels, while legacy windows - * will get pixels. Legacy windows have their origin in the lower left of the - * main X-Plane window, while modern windows have their origin in the lower - * left of the global desktop space. In both cases, x increases as you move - * right, and y increases as you move up. + * The units for x and y values match the units used in your window. Thus, for + * "modern" windows (those created via XPLMCreateWindowEx() and compiled + * against the XPLM300 library), the units are boxels, while legacy windows + * will get pixels. Legacy windows have their origin in the lower left of the + * main X-Plane window, while modern windows have their origin in the lower + * left of the global desktop space. In both cases, x increases as you move + * left, and y increases as you move up. * */ typedef int (* XPLMHandleMouseClick_f)( - XPLMWindowID inWindowID, - int x, - int y, - XPLMMouseStatus inMouse, - void * inRefcon); + XPLMWindowID inWindowID, + int x, + int y, + XPLMMouseStatus inMouse, + void * inRefcon); #if defined(XPLM200) /* * XPLMCursorStatus * - * XPLMCursorStatus describes how you would like X-Plane to manage the cursor. - * See XPLMHandleCursor_f for more info. + * XPLMCursorStatus describes how you would like X-Plane to manage the cursor. + * See XPLMHandleCursor_f for more info. * */ enum { - /* X-Plane manages the cursor normally, plugin does not affect the cusrsor. */ - xplm_CursorDefault = 0, + /* X-Plane manages the cursor normally, plugin does not affect the cusrsor. */ + xplm_CursorDefault = 0 - /* X-Plane hides the cursor. */ - xplm_CursorHidden = 1, + /* X-Plane hides the cursor. */ + ,xplm_CursorHidden = 1 - /* X-Plane shows the cursor as the default arrow. */ - xplm_CursorArrow = 2, + /* X-Plane shows the cursor as the default arrow. */ + ,xplm_CursorArrow = 2 - /* X-Plane shows the cursor but lets you select an OS cursor. */ - xplm_CursorCustom = 3, + /* X-Plane shows the cursor but lets you select an OS cursor. */ + ,xplm_CursorCustom = 3 }; @@ -445,104 +414,104 @@ typedef int XPLMCursorStatus; /* * XPLMHandleCursor_f * - * The SDK calls your cursor status callback when the mouse is over your - * plugin window. Return a cursor status code to indicate how you would like - * X-Plane to manage the cursor. If you return xplm_CursorDefault, the SDK - * will try lower-Z-order plugin windows, then let the sim manage the cursor. - * - * Note: you should never show or hide the cursor yourself---these APIs are - * typically reference-counted and thus cannot safely and predictably be used - * by the SDK. Instead return one of xplm_CursorHidden to hide the cursor or - * xplm_CursorArrow/xplm_CursorCustom to show the cursor. - * - * If you want to implement a custom cursor by drawing a cursor in OpenGL, use - * xplm_CursorHidden to hide the OS cursor and draw the cursor using a 2-d - * drawing callback (after xplm_Phase_Window is probably a good choice, but - * see deprecation warnings on the drawing APIs!). If you want to use a - * custom OS-based cursor, use xplm_CursorCustom to ask X-Plane to show the - * cursor but not affect its image. You can then use an OS specific call like - * SetThemeCursor (Mac) or SetCursor/LoadCursor (Windows). - * - * The units for x and y values match the units used in your window. Thus, for - * "modern" windows (those created via XPLMCreateWindowEx() and compiled - * against the XPLM300 library), the units are boxels, while legacy windows - * will get pixels. Legacy windows have their origin in the lower left of the - * main X-Plane window, while modern windows have their origin in the lower - * left of the global desktop space. In both cases, x increases as you move - * right, and y increases as you move up. + * The SDK calls your cursor status callback when the mouse is over your + * plugin window. Return a cursor status code to indicate how you would like + * X-Plane to manage the cursor. If you return xplm_CursorDefault, the SDK + * will try lower-Z-order plugin windows, then let the sim manage the cursor. + * + * Note: you should never show or hide the cursor yourself---these APIs are + * typically reference-counted and thus cannot safely and predictably be used + * by the SDK. Instead return one of xplm_CursorHidden to hide the cursor or + * xplm_CursorArrow/xplm_CursorCustom to show the cursor. + * + * If you want to implement a custom cursor by drawing a cursor in OpenGL, use + * xplm_CursorHidden to hide the OS cursor and draw the cursor using a 2-d + * drawing callback (after xplm_Phase_Window is probably a good choice, but + * see deprecation warnings on the drawing APIs!). If you want to use a + * custom OS-based cursor, use xplm_CursorCustom to ask X-Plane to show the + * cursor but not affect its image. You can then use an OS specific call like + * SetThemeCursor (Mac) or SetCursor/LoadCursor (Windows). + * + * The units for x and y values match the units used in your window. Thus, for + * "modern" windows (those created via XPLMCreateWindowEx() and compiled + * against the XPLM300 library), the units are boxels, while legacy windows + * will get pixels. Legacy windows have their origin in the lower left of the + * main X-Plane window, while modern windows have their origin in the lower + * left of the global desktop space. In both cases, x increases as you move + * left, and y increases as you move up. * */ typedef XPLMCursorStatus (* XPLMHandleCursor_f)( - XPLMWindowID inWindowID, - int x, - int y, - void * inRefcon); + XPLMWindowID inWindowID, + int x, + int y, + void * inRefcon); #endif /* XPLM200 */ #if defined(XPLM200) /* * XPLMHandleMouseWheel_f * - * The SDK calls your mouse wheel callback when one of the mouse wheels is - * scrolled within your window. Return 1 to consume the mouse wheel movement - * or 0 to pass them on to a lower window. (If your window appears opaque to - * the user, you should consume mouse wheel scrolling even if it does - * nothing.) The number of "clicks" indicates how far the wheel was turned - * since the last callback. The wheel is 0 for the vertical axis or 1 for the - * horizontal axis (for OS/mouse combinations that support this). + * The SDK calls your mouse wheel callback when one of the mouse wheels is + * scrolled within your window. Return 1 to consume the mouse wheel movement + * or 0 to pass them on to a lower window. (If your window appears opaque to + * the user, you should consume mouse wheel scrolling even if it does + * nothing.) The number of "clicks" indicates how far the wheel was turned + * since the last callback. The wheel is 0 for the vertical axis or 1 for the + * horizontal axis (for OS/mouse combinations that support this). * - * The units for x and y values match the units used in your window. Thus, for - * "modern" windows (those created via XPLMCreateWindowEx() and compiled - * against the XPLM300 library), the units are boxels, while legacy windows - * will get pixels. Legacy windows have their origin in the lower left of the - * main X-Plane window, while modern windows have their origin in the lower - * left of the global desktop space. In both cases, x increases as you move - * right, and y increases as you move up. + * The units for x and y values match the units used in your window. Thus, for + * "modern" windows (those created via XPLMCreateWindowEx() and compiled + * against the XPLM300 library), the units are boxels, while legacy windows + * will get pixels. Legacy windows have their origin in the lower left of the + * main X-Plane window, while modern windows have their origin in the lower + * left of the global desktop space. In both cases, x increases as you move + * left, and y increases as you move up. * */ typedef int (* XPLMHandleMouseWheel_f)( - XPLMWindowID inWindowID, - int x, - int y, - int wheel, - int clicks, - void * inRefcon); + XPLMWindowID inWindowID, + int x, + int y, + int wheel, + int clicks, + void * inRefcon); #endif /* XPLM200 */ #if defined(XPLM300) /* * XPLMWindowLayer * - * XPLMWindowLayer describes where in the ordering of windows X-Plane should - * place a particular window. Windows in higher layers cover windows in lower - * layers. So, a given window might be at the top of its particular layer, but - * it might still be obscured by a window in a higher layer. (This happens - * frequently when floating windows, like X-Plane's map, are covered by a - * modal alert.) + * XPLMWindowLayer describes where in the ordering of windows X-Plane should + * place a particular window. Windows in higher layers cover windows in lower + * layers. So, a given window might be at the top of its particular layer, but + * it might still be obscured by a window in a higher layer. (This happens + * frequently when floating windows, like X-Plane's map, are covered by a + * modal alert.) * - * Your window's layer can only be specified when you create the window (in - * the XPLMCreateWindow_t you pass to XPLMCreateWindowEx()). For this reason, - * layering only applies to windows created with new X-Plane 11 GUI features. - * (Windows created using the older XPLMCreateWindow(), or windows compiled - * against a pre-XPLM300 version of the SDK will simply be placed in the - * flight overlay window layer.) + * Your window's layer can only be specified when you create the window (in + * the XPLMCreateWindow_t you pass to XPLMCreateWindowEx()). For this reason, + * layering only applies to windows created with new X-Plane 11 GUI features. + * (Windows created using the older XPLMCreateWindow(), or windows compiled + * against a pre-XPLM300 version of the SDK will simply be placed in the + * flight overlay window layer.) * */ enum { - /* The lowest layer, used for HUD-like displays while flying. */ - xplm_WindowLayerFlightOverlay = 0, + /* The lowest layer, used for HUD-like displays while flying. */ + xplm_WindowLayerFlightOverlay = 0 - /* Windows that "float" over the sim, like the X-Plane 11 map does. If you are* - * not sure which layer to create your window in, choose floating. */ - xplm_WindowLayerFloatingWindows = 1, + /* Windows that "float" over the sim, like the X-Plane 11 map does. If you are * + * not sure which layer to create your window in, choose floating. */ + ,xplm_WindowLayerFloatingWindows = 1 - /* An interruptive modal that covers the sim with a transparent black overlay * - * to draw the user's focus to the alert */ - xplm_WindowLayerModal = 2, + /* An interruptive modal that covers the sim with a transparent black overlay * + * to draw the user's focus to the alert */ + ,xplm_WindowLayerModal = 2 - /* "Growl"-style notifications that are visible in a corner of the screen, * - * even over modals */ - xplm_WindowLayerGrowlNotifications = 3, + /* "Growl"-style notifications that are visible in a corner of the screen, * + * even over modals */ + ,xplm_WindowLayerGrowlNotifications = 3 }; @@ -553,34 +522,34 @@ typedef int XPLMWindowLayer; /* * XPLMWindowDecoration * - * XPLMWindowDecoration describes how "modern" windows will be displayed. This - * impacts both how X-Plane draws your window as well as certain mouse - * handlers. + * XPLMWindowDecoration describes how "modern" windows will be displayed. This + * impacts both how X-Plane draws your window as well as certain mouse + * handlers. * - * Your window's decoration can only be specified when you create the window - * (in the XPLMCreateWindow_t you pass to XPLMCreateWindowEx()). + * Your window's decoration can only be specified when you create the window + * (in the XPLMCreateWindow_t you pass to XPLMCreateWindowEx()). * */ enum { - /* X-Plane will draw no decoration for your window, and apply no automatic * - * click handlers. The window will not stop click from passing through its * - * bounds. This is suitable for "windows" which request, say, the full screen * - * bounds, then only draw in a small portion of the available area. */ - xplm_WindowDecorationNone = 0, + /* X-Plane will draw no decoration for your window, and apply no automatic * + * click handlers. The window will not stop click from passing through its * + * bounds. This is suitable for "windows" which request, say, the full screen * + * bounds, then only draw in a small portion of the available area. */ + xplm_WindowDecorationNone = 0 - /* The default decoration for "native" windows, like the map. Provides a solid* - * background, as well as click handlers for resizing and dragging the window.*/ - xplm_WindowDecorationRoundRectangle = 1, + /* The default decoration for "native" windows, like the map. Provides a solid * + * background, as well as click handlers for resizing and dragging the window. */ + ,xplm_WindowDecorationRoundRectangle = 1 - /* X-Plane will draw no decoration for your window, nor will it provide resize* - * handlers for your window edges, but it will stop clicks from passing * - * through your windows bounds. */ - xplm_WindowDecorationSelfDecorated = 2, + /* X-Plane will draw no decoration for your window, nor will it provide resize * + * handlers for your window edges, but it will stop clicks from passing * + * through your windows bounds. */ + ,xplm_WindowDecorationSelfDecorated = 2 - /* Like self-decorated, but with resizing; X-Plane will draw no decoration for* - * your window, but it will stop clicks from passing through your windows * - * bounds, and provide automatic mouse handlers for resizing. */ - xplm_WindowDecorationSelfDecoratedResizable = 3, + /* Like self-decorated, but with resizing; X-Plane will draw no decoration for * + * your window, but it will stop clicks from passing through your windows * + * bounds, and provide automatic mouse handlers for resizing. */ + ,xplm_WindowDecorationSelfDecoratedResizable = 3 }; @@ -591,69 +560,69 @@ typedef int XPLMWindowDecoration; /* * XPLMCreateWindow_t * - * The XPMCreateWindow_t structure defines all of the parameters used to - * create a modern window using XPLMCreateWindowEx(). The structure will be - * expanded in future SDK APIs to include more features. Always set the - * structSize member to the size of your struct in bytes! - * - * All windows created by this function in the XPLM300 version of the API are - * created with the new X-Plane 11 GUI features. This means your plugin will - * get to "know" about the existence of X-Plane windows other than the main - * window. All drawing and mouse callbacks for your window will occur in - * "boxels," giving your windows automatic support for high-DPI scaling in - * X-Plane. In addition, your windows can opt-in to decoration with the - * X-Plane 11 window styling, and you can use the - * XPLMSetWindowPositioningMode() API to make your window "popped out" into a - * first-class operating system window. - * - * Note that this requires dealing with your window's bounds in "global - * desktop" positioning units, rather than the traditional panel coordinate - * system. In global desktop coordinates, the main X-Plane window may not have - * its origin at coordinate (0, 0), and your own window may have negative - * coordinates. Assuming you don't implicitly assume (0, 0) as your origin, - * the only API change you should need is to start using - * XPLMGetMouseLocationGlobal() rather than XPLMGetMouseLocation(), and - * XPLMGetScreenBoundsGlobal() instead of XPLMGetScreenSize(). - * - * If you ask to be decorated as a floating window, you'll get the blue window - * control bar and blue backing that you see in X-Plane 11's normal "floating" - * windows (like the map). + * The XPMCreateWindow_t structure defines all of the parameters used to + * create a modern window using XPLMCreateWindowEx(). The structure will be + * expanded in future SDK APIs to include more features. Always set the + * structSize member to the size of your struct in bytes! + * + * All windows created by this function in the XPLM300 version of the API are + * created with the new X-Plane 11 GUI features. This means your plugin will + * get to "know" about the existence of X-Plane windows other than the main + * window. All drawing and mouse callbacks for your window will occur in + * "boxels," giving your windows automatic support for high-DPI scaling in + * X-Plane. In addition, your windows can opt-in to decoration with the + * X-Plane 11 window styling, and you can use the + * XPLMSetWindowPositioningMode() API to make your window "popped out" into a + * first-class operating system window. + * + * Note that this requires dealing with your window's bounds in "global + * desktop" positioning units, rather than the traditional panel coordinate + * system. In global desktop coordinates, the main X-Plane window may not have + * its origin at coordinate (0, 0), and your own window may have negative + * coordinates. Assuming you don't implicitly assume (0, 0) as your origin, + * the only API change you should need is to start using + * XPLMGetMouseLocationGlobal() rather than XPLMGetMouseLocation(), and + * XPLMGetScreenBoundsGlobal() instead of XPLMGetScreenSize(). + * + * If you ask to be decorated as a floating window, you'll get the blue window + * control bar and blue backing that you see in X-Plane 11's normal "floating" + * windows (like the map). * */ typedef struct { - /* Used to inform XPLMCreateWindowEx() of the SDK version you compiled * - * against; should always be set to sizeof(XPLMCreateWindow_t) */ + /* Used to inform XPLMCreateWindowEx() of the SDK version you compiled * + * against; should always be set to sizeof(XPLMCreateWindow_t) */ int structSize; - /* Left bound, in global desktop boxels */ + /* Left bound, in global desktop boxels */ int left; - /* Top bound, in global desktop boxels */ + /* Top bound, in global desktop boxels */ int top; - /* Right bound, in global desktop boxels */ + /* Right bound, in global desktop boxels */ int right; - /* Bottom bound, in global desktop boxels */ + /* Bottom bound, in global desktop boxels */ int bottom; int visible; XPLMDrawWindow_f drawWindowFunc; - /* A callback to handle the user left-clicking within your window (or NULL to * - * ignore left clicks) */ + /* A callback to handle the user left-clicking within your window (or NULL to * + * ignore left clicks) */ XPLMHandleMouseClick_f handleMouseClickFunc; XPLMHandleKey_f handleKeyFunc; XPLMHandleCursor_f handleCursorFunc; XPLMHandleMouseWheel_f handleMouseWheelFunc; - /* A reference which will be passed into each of your window callbacks. Use * - * this to pass information to yourself as needed. */ + /* A reference which will be passed into each of your window callbacks. Use * + * this to pass information to yourself as needed. */ void * refcon; #if defined(XPLM301) - /* Specifies the type of X-Plane 11-style "wrapper" you want around your * - * window, if any */ + /* Specifies the type of X-Plane 11-style "wrapper" you want around your * + * window, if any */ XPLMWindowDecoration decorateAsFloatingWindow; #endif /* XPLM301 */ #if defined(XPLM300) XPLMWindowLayer layer; #endif /* XPLM300 */ #if defined(XPLM300) - /* A callback to handle the user right-clicking within your window (or NULL to* - * ignore right clicks) */ + /* A callback to handle the user right-clicking within your window (or NULL to * + * ignore right clicks) */ XPLMHandleMouseClick_f handleRightClickFunc; #endif /* XPLM300 */ } XPLMCreateWindow_t; @@ -663,516 +632,516 @@ typedef struct { /* * XPLMCreateWindowEx * - * This routine creates a new "modern" window. You pass in an - * XPLMCreateWindow_t structure with all of the fields set in. You must set - * the structSize of the structure to the size of the actual structure you - * used. Also, you must provide functions for every callback---you may not - * leave them null! (If you do not support the cursor or mouse wheel, use - * functions that return the default values.) + * This routine creates a new "modern" window. You pass in an + * XPLMCreateWindow_t structure with all of the fields set in. You must set + * the structSize of the structure to the size of the actual structure you + * used. Also, you must provide functions for every callback---you may not + * leave them null! (If you do not support the cursor or mouse wheel, use + * functions that return the default values.) * */ -XPLM_API XPLMWindowID XPLMCreateWindowEx( - XPLMCreateWindow_t * inParams); +XPLM_API XPLMWindowID XPLMCreateWindowEx( + XPLMCreateWindow_t * inParams); #endif /* XPLM200 */ /* * XPLMCreateWindow * - * Deprecated as of XPLM300. + * Deprecated as of XPLM300. * - * This routine creates a new legacy window. Unlike modern windows (created - * via XPLMCreateWindowEx()), legacy windows do not have access to X-Plane 11 - * features like automatic scaling for high-DPI screens, native window styles, - * or support for being "popped out" into first-class operating system - * windows. + * This routine creates a new legacy window. Unlike modern windows (created + * via XPLMCreateWindowEx()), legacy windows do not have access to X-Plane 11 + * features like automatic scaling for high-DPI screens, native window styles, + * or support for being "popped out" into first-class operating system + * windows. * - * Pass in the dimensions and offsets to the window's bottom left corner from - * the bottom left of the screen. You can specify whether the window is - * initially visible or not. Also, you pass in three callbacks to run the - * window and a refcon. This function returns a window ID you can use to - * refer to the new window. + * Pass in the dimensions and offsets to the window's bottom left corner from + * the bottom left of the screen. You can specify whether the window is + * initially visible or not. Also, you pass in three callbacks to run the + * window and a refcon. This function returns a window ID you can use to + * refer to the new window. * - * NOTE: Legacy windows do not have "frames"; you are responsible for drawing - * the background and frame of the window. Higher level libraries have - * routines which make this easy. + * NOTE: Legacy windows do not have "frames"; you are responsible for drawing + * the background and frame of the window. Higher level libraries have + * routines which make this easy. * */ -XPLM_API XPLMWindowID XPLMCreateWindow( - int inLeft, - int inTop, - int inRight, - int inBottom, - int inIsVisible, - XPLMDrawWindow_f inDrawCallback, - XPLMHandleKey_f inKeyCallback, - XPLMHandleMouseClick_f inMouseCallback, - void * inRefcon); +XPLM_API XPLMWindowID XPLMCreateWindow( + int inLeft, + int inTop, + int inRight, + int inBottom, + int inIsVisible, + XPLMDrawWindow_f inDrawCallback, + XPLMHandleKey_f inKeyCallback, + XPLMHandleMouseClick_f inMouseCallback, + void * inRefcon); /* * XPLMDestroyWindow * - * This routine destroys a window. The window's callbacks are not called - * after this call. Keyboard focus is removed from the window before - * destroying it. + * This routine destroys a window. The window's callbacks are not called + * after this call. Keyboard focus is removed from the window before + * destroying it. * */ -XPLM_API void XPLMDestroyWindow( - XPLMWindowID inWindowID); +XPLM_API void XPLMDestroyWindow( + XPLMWindowID inWindowID); /* * XPLMGetScreenSize * - * This routine returns the size of the main X-Plane OpenGL window in pixels. - * This number can be used to get a rough idea of the amount of detail the - * user will be able to see when drawing in 3-d. + * This routine returns the size of the main X-Plane OpenGL window in pixels. + * This number can be used to get a rough idea of the amount of detail the + * user will be able to see when drawing in 3-d. * */ -XPLM_API void XPLMGetScreenSize( - int * outWidth, /* Can be NULL */ - int * outHeight); /* Can be NULL */ +XPLM_API void XPLMGetScreenSize( + int * outWidth, /* Can be NULL */ + int * outHeight); /* Can be NULL */ #if defined(XPLM300) /* * XPLMGetScreenBoundsGlobal * - * This routine returns the bounds of the "global" X-Plane desktop, in boxels. - * Unlike the non-global version XPLMGetScreenSize(), this is multi-monitor - * aware. There are three primary consequences of multimonitor awareness. - * - * First, if the user is running X-Plane in full-screen on two or more - * monitors (typically configured using one full-screen window per monitor), - * the global desktop will be sized to include all X-Plane windows. - * - * Second, the origin of the screen coordinates is not guaranteed to be (0, - * 0). Suppose the user has two displays side-by-side, both running at 1080p. - * Suppose further that they've configured their OS to make the left display - * their "primary" monitor, and that X-Plane is running in full-screen on - * their right monitor only. In this case, the global desktop bounds would be - * the rectangle from (1920, 0) to (3840, 1080). If the user later asked - * X-Plane to draw on their primary monitor as well, the bounds would change - * to (0, 0) to (3840, 1080). - * - * Finally, if the usable area of the virtual desktop is not a perfect - * rectangle (for instance, because the monitors have different resolutions or - * because one monitor is configured in the operating system to be above and - * to the right of the other), the global desktop will include any wasted - * space. Thus, if you have two 1080p monitors, and monitor 2 is configured to - * have its bottom left touch monitor 1's upper right, your global desktop - * area would be the rectangle from (0, 0) to (3840, 2160). - * - * Note that popped-out windows (windows drawn in their own operating system - * windows, rather than "floating" within X-Plane) are not included in these - * bounds. - * - */ -XPLM_API void XPLMGetScreenBoundsGlobal( - int * outLeft, /* Can be NULL */ - int * outTop, /* Can be NULL */ - int * outRight, /* Can be NULL */ - int * outBottom); /* Can be NULL */ + * This routine returns the bounds of the "global" X-Plane desktop, in boxels. + * Unlike the non-global version XPLMGetScreenSize(), this is multi-monitor + * aware. There are three primary consequences of multimonitor awareness. + * + * First, if the user is running X-Plane in full-screen on two or more + * monitors (typically configured using one full-screen window per monitor), + * the global desktop will be sized to include all X-Plane windows. + * + * Second, the origin of the screen coordinates is not guaranteed to be (0, + * 0). Suppose the user has two displays side-by-side, both running at 1080p. + * Suppose further that they've configured their OS to make the left display + * their "primary" monitor, and that X-Plane is running in full-screen on + * their right monitor only. In this case, the global desktop bounds would be + * the rectangle from (1920, 0) to (3840, 1080). If the user later asked + * X-Plane to draw on their primary monitor as well, the bounds would change + * to (0, 0) to (3840, 1080). + * + * Finally, if the usable area of the virtual desktop is not a perfect + * rectangle (for instance, because the monitors have different resolutions or + * because one monitor is configured in the operating system to be above and + * to the right of the other), the global desktop will include any wasted + * space. Thus, if you have two 1080p monitors, and monitor 2 is configured to + * have its bottom left touch monitor 1's upper right, your global desktop + * area would be the rectangle from (0, 0) to (3840, 2160). + * + * Note that popped-out windows (windows drawn in their own operating system + * windows, rather than "floating" within X-Plane) are not included in these + * bounds. + * + */ +XPLM_API void XPLMGetScreenBoundsGlobal( + int * outLeft, /* Can be NULL */ + int * outTop, /* Can be NULL */ + int * outRight, /* Can be NULL */ + int * outBottom); /* Can be NULL */ #endif /* XPLM300 */ #if defined(XPLM300) /* * XPLMReceiveMonitorBoundsGlobal_f * - * This function is informed of the global bounds (in boxels) of a particular - * monitor within the X-Plane global desktop space. Note that X-Plane must be - * running in full screen on a monitor in order for that monitor to be passed - * to you in this callback. + * This function is informed of the global bounds (in boxels) of a particular + * monitor within the X-Plane global desktop space. Note that X-Plane must be + * running in full screen on a monitor in order for that monitor to be passed + * to you in this callback. * */ typedef void (* XPLMReceiveMonitorBoundsGlobal_f)( - int inMonitorIndex, - int inLeftBx, - int inTopBx, - int inRightBx, - int inBottomBx, - void * inRefcon); + int inMonitorIndex, + int inLeftBx, + int inTopBx, + int inRightBx, + int inBottomBx, + void * inRefcon); #endif /* XPLM300 */ #if defined(XPLM300) /* * XPLMGetAllMonitorBoundsGlobal * - * This routine immediately calls you back with the bounds (in boxels) of each - * full-screen X-Plane window within the X-Plane global desktop space. Note - * that if a monitor is *not* covered by an X-Plane window, you cannot get its - * bounds this way. Likewise, monitors with only an X-Plane window (not in - * full-screen mode) will not be included. - * - * If X-Plane is running in full-screen and your monitors are of the same size - * and configured contiguously in the OS, then the combined global bounds of - * all full-screen monitors will match the total global desktop bounds, as - * returned by XPLMGetScreenBoundsGlobal(). (Of course, if X-Plane is running - * in windowed mode, this will not be the case. Likewise, if you have - * differently sized monitors, the global desktop space will include wasted - * space.) - * - * Note that this function's monitor indices match those provided by - * XPLMGetAllMonitorBoundsOS(), but the coordinates are different (since the - * X-Plane global desktop may not match the operating system's global desktop, - * and one X-Plane boxel may be larger than one pixel due to 150% or 200% - * scaling). - * - */ -XPLM_API void XPLMGetAllMonitorBoundsGlobal( - XPLMReceiveMonitorBoundsGlobal_f inMonitorBoundsCallback, - void * inRefcon); + * This routine immediately calls you back with the bounds (in boxels) of each + * full-screen X-Plane window within the X-Plane global desktop space. Note + * that if a monitor is *not* covered by an X-Plane window, you cannot get its + * bounds this way. Likewise, monitors with only an X-Plane window (not in + * full-screen mode) will not be included. + * + * If X-Plane is running in full-screen and your monitors are of the same size + * and configured contiguously in the OS, then the combined global bounds of + * all full-screen monitors will match the total global desktop bounds, as + * returned by XPLMGetScreenBoundsGlobal(). (Of course, if X-Plane is running + * in windowed mode, this will not be the case. Likewise, if you have + * differently sized monitors, the global desktop space will include wasted + * space.) + * + * Note that this function's monitor indices match those provided by + * XPLMGetAllMonitorBoundsOS(), but the coordinates are different (since the + * X-Plane global desktop may not match the operating system's global desktop, + * and one X-Plane boxel may be larger than one pixel due to 150% or 200% + * scaling). + * + */ +XPLM_API void XPLMGetAllMonitorBoundsGlobal( + XPLMReceiveMonitorBoundsGlobal_f inMonitorBoundsCallback, + void * inRefcon); #endif /* XPLM300 */ #if defined(XPLM300) /* * XPLMReceiveMonitorBoundsOS_f * - * This function is informed of the global bounds (in pixels) of a particular - * monitor within the operating system's global desktop space. Note that a - * monitor index being passed to you here does not indicate that X-Plane is - * running in full screen on this monitor, or even that any X-Plane windows - * exist on this monitor. + * This function is informed of the global bounds (in pixels) of a particular + * monitor within the operating system's global desktop space. Note that a + * monitor index being passed to you here does not indicate that X-Plane is + * running in full screen on this monitor, or even that any X-Plane windows + * exist on this monitor. * */ typedef void (* XPLMReceiveMonitorBoundsOS_f)( - int inMonitorIndex, - int inLeftPx, - int inTopPx, - int inRightPx, - int inBottomPx, - void * inRefcon); + int inMonitorIndex, + int inLeftPx, + int inTopPx, + int inRightPx, + int inBottomPx, + void * inRefcon); #endif /* XPLM300 */ #if defined(XPLM300) /* * XPLMGetAllMonitorBoundsOS * - * This routine immediately calls you back with the bounds (in pixels) of each - * monitor within the operating system's global desktop space. Note that - * unlike XPLMGetAllMonitorBoundsGlobal(), this may include monitors that have - * no X-Plane window on them. + * This routine immediately calls you back with the bounds (in pixels) of each + * monitor within the operating system's global desktop space. Note that + * unlike XPLMGetAllMonitorBoundsGlobal(), this may include monitors that have + * no X-Plane window on them. * - * Note that this function's monitor indices match those provided by - * XPLMGetAllMonitorBoundsGlobal(), but the coordinates are different (since - * the X-Plane global desktop may not match the operating system's global - * desktop, and one X-Plane boxel may be larger than one pixel). + * Note that this function's monitor indices match those provided by + * XPLMGetAllMonitorBoundsGlobal(), but the coordinates are different (since + * the X-Plane global desktop may not match the operating system's global + * desktop, and one X-Plane boxel may be larger than one pixel). * */ -XPLM_API void XPLMGetAllMonitorBoundsOS( - XPLMReceiveMonitorBoundsOS_f inMonitorBoundsCallback, - void * inRefcon); +XPLM_API void XPLMGetAllMonitorBoundsOS( + XPLMReceiveMonitorBoundsOS_f inMonitorBoundsCallback, + void * inRefcon); #endif /* XPLM300 */ /* * XPLMGetMouseLocation * - * Deprecated in XPLM300. Modern windows should use - * XPLMGetMouseLocationGlobal() instead. + * Deprecated in XPLM300. Modern windows should use + * XPLMGetMouseLocationGlobal() instead. * - * This routine returns the current mouse location in pixels relative to the - * main X-Plane window. The bottom left corner of the main window is (0, 0). - * Pass NULL to not receive info about either parameter. + * This routine returns the current mouse location in pixels relative to the + * main X-Plane window. The bottom left corner of the main window is (0, 0). + * Pass NULL to not receive info about either parameter. * - * Because this function gives the mouse position relative to the main X-Plane - * window (rather than in global bounds), this function should only be used by - * legacy windows. Modern windows should instead get the mouse position in - * global desktop coordinates using XPLMGetMouseLocationGlobal(). + * Because this function gives the mouse position relative to the main X-Plane + * window (rather than in global bounds), this function should only be used by + * legacy windows. Modern windows should instead get the mouse position in + * global desktop coordinates using XPLMGetMouseLocationGlobal(). * - * Note that unlike XPLMGetMouseLocationGlobal(), if the mouse goes outside - * the user's main monitor (for instance, to a pop out window or a secondary - * monitor), this function will not reflect it. + * Note that unlike XPLMGetMouseLocationGlobal(), if the mouse goes outside + * the user's main monitor (for instance, to a pop out window or a secondary + * monitor), this function will not reflect it. * */ -XPLM_API void XPLMGetMouseLocation( - int * outX, /* Can be NULL */ - int * outY); /* Can be NULL */ +XPLM_API void XPLMGetMouseLocation( + int * outX, /* Can be NULL */ + int * outY); /* Can be NULL */ #if defined(XPLM300) /* * XPLMGetMouseLocationGlobal * - * Returns the current mouse location in global desktop boxels. Unlike - * XPLMGetMouseLocation(), the bottom left of the main X-Plane window is not - * guaranteed to be (0, 0)---instead, the origin is the lower left of the - * entire global desktop space. In addition, this routine gives the real mouse - * location when the mouse goes to X-Plane windows other than the primary - * display. Thus, it can be used with both pop-out windows and secondary - * monitors. + * Returns the current mouse location in global desktop boxels. Unlike + * XPLMGetMouseLocation(), the bottom left of the main X-Plane window is not + * guaranteed to be (0, 0)---instead, the origin is the lower left of the + * entire global desktop space. In addition, this routine gives the real mouse + * location when the mouse goes to X-Plane windows other than the primary + * display. Thus, it can be used with both pop-out windows and secondary + * monitors. * - * This is the mouse location function to use with modern windows (i.e., those - * created by XPLMCreateWindowEx()). + * This is the mouse location function to use with modern windows (i.e., those + * created by XPLMCreateWindowEx()). * - * Pass NULL to not receive info about either parameter. + * Pass NULL to not receive info about either parameter. * */ -XPLM_API void XPLMGetMouseLocationGlobal( - int * outX, /* Can be NULL */ - int * outY); /* Can be NULL */ +XPLM_API void XPLMGetMouseLocationGlobal( + int * outX, /* Can be NULL */ + int * outY); /* Can be NULL */ #endif /* XPLM300 */ /* * XPLMGetWindowGeometry * - * This routine returns the position and size of a window. The units and - * coordinate system vary depending on the type of window you have. + * This routine returns the position and size of a window. The units and + * coordinate system vary depending on the type of window you have. * - * If this is a legacy window (one compiled against a pre-XPLM300 version of - * the SDK, or an XPLM300 window that was not created using - * XPLMCreateWindowEx()), the units are pixels relative to the main X-Plane - * display. + * If this is a legacy window (one compiled against a pre-XPLM300 version of + * the SDK, or an XPLM300 window that was not created using + * XPLMCreateWindowEx()), the units are pixels relative to the main X-Plane + * display. * - * If, on the other hand, this is a new X-Plane 11-style window (compiled - * against the XPLM300 SDK and created using XPLMCreateWindowEx()), the units - * are global desktop boxels. + * If, on the other hand, this is a new X-Plane 11-style window (compiled + * against the XPLM300 SDK and created using XPLMCreateWindowEx()), the units + * are global desktop boxels. * - * Pass NULL to not receive any paramter. + * Pass NULL to not receive any paramter. * */ -XPLM_API void XPLMGetWindowGeometry( - XPLMWindowID inWindowID, - int * outLeft, /* Can be NULL */ - int * outTop, /* Can be NULL */ - int * outRight, /* Can be NULL */ - int * outBottom); /* Can be NULL */ +XPLM_API void XPLMGetWindowGeometry( + XPLMWindowID inWindowID, + int * outLeft, /* Can be NULL */ + int * outTop, /* Can be NULL */ + int * outRight, /* Can be NULL */ + int * outBottom); /* Can be NULL */ /* * XPLMSetWindowGeometry * - * This routine allows you to set the position and size of a window. + * This routine allows you to set the position and size of a window. * - * The units and coordinate system match those of XPLMGetWindowGeometry(). - * That is, modern windows use global desktop boxel coordinates, while legacy - * windows use pixels relative to the main X-Plane display. + * The units and coordinate system match those of XPLMGetWindowGeometry(). + * That is, modern windows use global desktop boxel coordinates, while legacy + * windows use pixels relative to the main X-Plane display. * - * Note that this only applies to "floating" windows (that is, windows that - * are drawn within the X-Plane simulation windows, rather than being "popped - * out" into their own first-class operating system windows). To set the - * position of windows whose positioning mode is xplm_WindowPopOut, you'll - * need to instead use XPLMSetWindowGeometryOS(). + * Note that this only applies to "floating" windows (that is, windows that + * are drawn within the X-Plane simulation windows, rather than being "popped + * out" into their own first-class operating system windows). To set the + * position of windows whose positioning mode is xplm_WindowPopOut, you'll + * need to instead use XPLMSetWindowGeometryOS(). * */ -XPLM_API void XPLMSetWindowGeometry( - XPLMWindowID inWindowID, - int inLeft, - int inTop, - int inRight, - int inBottom); +XPLM_API void XPLMSetWindowGeometry( + XPLMWindowID inWindowID, + int inLeft, + int inTop, + int inRight, + int inBottom); #if defined(XPLM300) /* * XPLMGetWindowGeometryOS * - * This routine returns the position and size of a "popped out" window (i.e., - * a window whose positioning mode is xplm_WindowPopOut), in operating system - * pixels. Pass NULL to not receive any parameter. + * This routine returns the position and size of a "popped out" window (i.e., + * a window whose positioning mode is xplm_WindowPopOut), in operating system + * pixels. Pass NULL to not receive any parameter. * */ -XPLM_API void XPLMGetWindowGeometryOS( - XPLMWindowID inWindowID, - int * outLeft, /* Can be NULL */ - int * outTop, /* Can be NULL */ - int * outRight, /* Can be NULL */ - int * outBottom); /* Can be NULL */ +XPLM_API void XPLMGetWindowGeometryOS( + XPLMWindowID inWindowID, + int * outLeft, /* Can be NULL */ + int * outTop, /* Can be NULL */ + int * outRight, /* Can be NULL */ + int * outBottom); /* Can be NULL */ #endif /* XPLM300 */ #if defined(XPLM300) /* * XPLMSetWindowGeometryOS * - * This routine allows you to set the position and size, in operating system - * pixel coordinates, of a popped out window (that is, a window whose - * positioning mode is xplm_WindowPopOut, which exists outside the X-Plane - * simulation window, in its own first-class operating system window). + * This routine allows you to set the position and size, in operating system + * pixel coordinates, of a popped out window (that is, a window whose + * positioning mode is xplm_WindowPopOut, which exists outside the X-Plane + * simulation window, in its own first-class operating system window). * - * Note that you are responsible for ensuring both that your window is popped - * out (using XPLMWindowIsPoppedOut()) and that a monitor really exists at the - * OS coordinates you provide (using XPLMGetAllMonitorBoundsOS()). + * Note that you are responsible for ensuring both that your window is popped + * out (using XPLMWindowIsPoppedOut()) and that a monitor really exists at the + * OS coordinates you provide (using XPLMGetAllMonitorBoundsOS()). * */ -XPLM_API void XPLMSetWindowGeometryOS( - XPLMWindowID inWindowID, - int inLeft, - int inTop, - int inRight, - int inBottom); +XPLM_API void XPLMSetWindowGeometryOS( + XPLMWindowID inWindowID, + int inLeft, + int inTop, + int inRight, + int inBottom); #endif /* XPLM300 */ #if defined(XPLM301) /* * XPLMGetWindowGeometryVR * - * Returns the width and height, in boxels, of a window in VR. Note that you - * are responsible for ensuring your window is in VR (using - * XPLMWindowIsInVR()). + * Returns the width and height, in boxels, of a window in VR. Note that you + * are responsible for ensuring your window is in VR (using + * XPLMWindowIsInVR()). * */ -XPLM_API void XPLMGetWindowGeometryVR( - XPLMWindowID inWindowID, - int * outWidthBoxels, /* Can be NULL */ - int * outHeightBoxels); /* Can be NULL */ +XPLM_API void XPLMGetWindowGeometryVR( + XPLMWindowID inWindowID, + int * outWidthBoxels, /* Can be NULL */ + int * outHeightBoxels); /* Can be NULL */ #endif /* XPLM301 */ #if defined(XPLM301) /* * XPLMSetWindowGeometryVR * - * This routine allows you to set the size, in boxels, of a window in VR (that - * is, a window whose positioning mode is xplm_WindowVR). + * This routine allows you to set the size, in boxels, of a window in VR (that + * is, a window whose positioning mode is xplm_WindowVR). * - * Note that you are responsible for ensuring your window is in VR (using - * XPLMWindowIsInVR()). + * Note that you are responsible for ensuring your window is in VR (using + * XPLMWindowIsInVR()). * */ -XPLM_API void XPLMSetWindowGeometryVR( - XPLMWindowID inWindowID, - int widthBoxels, - int heightBoxels); +XPLM_API void XPLMSetWindowGeometryVR( + XPLMWindowID inWindowID, + int widthBoxels, + int heightBoxels); #endif /* XPLM301 */ /* * XPLMGetWindowIsVisible * - * Returns true (1) if the specified window is visible. + * This routine returns whether a window is visible. * */ -XPLM_API int XPLMGetWindowIsVisible( - XPLMWindowID inWindowID); +XPLM_API int XPLMGetWindowIsVisible( + XPLMWindowID inWindowID); /* * XPLMSetWindowIsVisible * - * This routine shows or hides a window. + * This routine shows or hides a window. * */ -XPLM_API void XPLMSetWindowIsVisible( - XPLMWindowID inWindowID, - int inIsVisible); +XPLM_API void XPLMSetWindowIsVisible( + XPLMWindowID inWindowID, + int inIsVisible); #if defined(XPLM300) /* * XPLMWindowIsPoppedOut * - * True if this window has been popped out (making it a first-class window in - * the operating system), which in turn is true if and only if you have set - * the window's positioning mode to xplm_WindowPopOut. + * True if this window has been popped out (making it a first-class window in + * the operating system), which in turn is true if and only if you have set + * the window's positioning mode to xplm_WindowPopOut. * - * Only applies to modern windows. (Windows created using the deprecated - * XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of - * the SDK cannot be popped out.) + * Only applies to modern windows. (Windows created using the deprecated + * XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of + * the SDK cannot be popped out.) * */ -XPLM_API int XPLMWindowIsPoppedOut( - XPLMWindowID inWindowID); +XPLM_API int XPLMWindowIsPoppedOut( + XPLMWindowID inWindowID); #endif /* XPLM300 */ #if defined(XPLM301) /* * XPLMWindowIsInVR * - * True if this window has been moved to the virtual reality (VR) headset, - * which in turn is true if and only if you have set the window's positioning - * mode to xplm_WindowVR. + * True if this window has been moved to the virtual reality (VR) headset, + * which in turn is true if and only if you have set the window's positioning + * mode to xplm_WindowVR. * - * Only applies to modern windows. (Windows created using the deprecated - * XPLMCreateWindow(), or windows compiled against a pre-XPLM301 version of - * the SDK cannot be moved to VR.) + * Only applies to modern windows. (Windows created using the deprecated + * XPLMCreateWindow(), or windows compiled against a pre-XPLM301 version of + * the SDK cannot be moved to VR.) * */ -XPLM_API int XPLMWindowIsInVR( - XPLMWindowID inWindowID); +XPLM_API int XPLMWindowIsInVR( + XPLMWindowID inWindowID); #endif /* XPLM301 */ #if defined(XPLM300) /* * XPLMSetWindowGravity * - * A window's "gravity" controls how the window shifts as the whole X-Plane - * window resizes. A gravity of 1 means the window maintains its positioning - * relative to the right or top edges, 0 the left/bottom, and 0.5 keeps it - * centered. + * A window's "gravity" controls how the window shifts as the whole X-Plane + * window resizes. A gravity of 1 means the window maintains its positioning + * relative to the right or top edges, 0 the left/bottom, and 0.5 keeps it + * centered. * - * Default gravity is (0, 1, 0, 1), meaning your window will maintain its - * position relative to the top left and will not change size as its - * containing window grows. + * Default gravity is (0, 1, 0, 1), meaning your window will maintain its + * position relative to the top left and will not change size as its + * containing window grows. * - * If you wanted, say, a window that sticks to the top of the screen (with a - * constant height), but which grows to take the full width of the window, you - * would pass (0, 1, 1, 1). Because your left and right edges would maintain - * their positioning relative to their respective edges of the screen, the - * whole width of your window would change with the X-Plane window. + * If you wanted, say, a window that sticks to the top of the screen (with a + * constant height), but which grows to take the full width of the window, you + * would pass (0, 1, 1, 1). Because your left and right edges would maintain + * their positioning relative to their respective edges of the screen, the + * whole width of your window would change with the X-Plane window. * - * Only applies to modern windows. (Windows created using the deprecated - * XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of - * the SDK will simply get the default gravity.) + * Only applies to modern windows. (Windows created using the deprecated + * XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of + * the SDK will simply get the default gravity.) * */ -XPLM_API void XPLMSetWindowGravity( - XPLMWindowID inWindowID, - float inLeftGravity, - float inTopGravity, - float inRightGravity, - float inBottomGravity); +XPLM_API void XPLMSetWindowGravity( + XPLMWindowID inWindowID, + float inLeftGravity, + float inTopGravity, + float inRightGravity, + float inBottomGravity); #endif /* XPLM300 */ #if defined(XPLM300) /* * XPLMSetWindowResizingLimits * - * Sets the minimum and maximum size of the client rectangle of the given - * window. (That is, it does not include any window styling that you might - * have asked X-Plane to apply on your behalf.) All resizing operations are - * constrained to these sizes. + * Sets the minimum and maximum size of the client rectangle of the given + * window. (That is, it does not include any window styling that you might + * have asked X-Plane to apply on your behalf.) All resizing operations are + * constrained to these sizes. * - * Only applies to modern windows. (Windows created using the deprecated - * XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of - * the SDK will have no minimum or maximum size.) + * Only applies to modern windows. (Windows created using the deprecated + * XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of + * the SDK will have no minimum or maximum size.) * */ -XPLM_API void XPLMSetWindowResizingLimits( - XPLMWindowID inWindowID, - int inMinWidthBoxels, - int inMinHeightBoxels, - int inMaxWidthBoxels, - int inMaxHeightBoxels); +XPLM_API void XPLMSetWindowResizingLimits( + XPLMWindowID inWindowID, + int inMinWidthBoxels, + int inMinHeightBoxels, + int inMaxWidthBoxels, + int inMaxHeightBoxels); #endif /* XPLM300 */ #if defined(XPLM300) /* * XPLMWindowPositioningMode * - * XPLMWindowPositionMode describes how X-Plane will position your window on - * the user's screen. X-Plane will maintain this positioning mode even as the - * user resizes their window or adds/removes full-screen monitors. + * XPLMWindowPositionMode describes how X-Plane will position your window on + * the user's screen. X-Plane will maintain this positioning mode even as the + * user resizes their window or adds/removes full-screen monitors. * - * Positioning mode can only be set for "modern" windows (that is, windows - * created using XPLMCreateWindowEx() and compiled against the XPLM300 SDK). - * Windows created using the deprecated XPLMCreateWindow(), or windows - * compiled against a pre-XPLM300 version of the SDK will simply get the - * "free" positioning mode. + * Positioning mode can only be set for "modern" windows (that is, windows + * created using XPLMCreateWindowEx() and compiled against the XPLM300 SDK). + * Windows created using the deprecated XPLMCreateWindow(), or windows + * compiled against a pre-XPLM300 version of the SDK will simply get the + * "free" positioning mode. * */ enum { - /* The default positioning mode. Set the window geometry and its future * - * position will be determined by its window gravity, resizing limits, and * - * user interactions. */ - xplm_WindowPositionFree = 0, + /* The default positioning mode. Set the window geometry and its future * + * position will be determined by its window gravity, resizing limits, and * + * user interactions. */ + xplm_WindowPositionFree = 0 - /* Keep the window centered on the monitor you specify */ - xplm_WindowCenterOnMonitor = 1, + /* Keep the window centered on the monitor you specify */ + ,xplm_WindowCenterOnMonitor = 1 - /* Keep the window full screen on the monitor you specify */ - xplm_WindowFullScreenOnMonitor = 2, + /* Keep the window full screen on the monitor you specify */ + ,xplm_WindowFullScreenOnMonitor = 2 - /* Like gui_window_full_screen_on_monitor, but stretches over *all* monitors * - * and popout windows. This is an obscure one... unless you have a very good * - * reason to need it, you probably don't! */ - xplm_WindowFullScreenOnAllMonitors = 3, + /* Like gui_window_full_screen_on_monitor, but stretches over *all* monitors * + * and popout windows. This is an obscure one... unless you have a very good * + * reason to need it, you probably don't! */ + ,xplm_WindowFullScreenOnAllMonitors = 3 - /* A first-class window in the operating system, completely separate from the * - * X-Plane window(s) */ - xplm_WindowPopOut = 4, + /* A first-class window in the operating system, completely separate from the * + * X-Plane window(s) */ + ,xplm_WindowPopOut = 4 #if defined(XPLM301) - /* A floating window visible on the VR headset */ - xplm_WindowVR = 5, + /* A floating window visible on the VR headset */ + ,xplm_WindowVR = 5 #endif /* XPLM301 */ @@ -1184,133 +1153,127 @@ typedef int XPLMWindowPositioningMode; /* * XPLMSetWindowPositioningMode * - * Sets the policy for how X-Plane will position your window. + * Sets the policy for how X-Plane will position your window. * - * Some positioning modes apply to a particular monitor. For those modes, you - * can pass a negative monitor index to position the window on the main - * X-Plane monitor (the screen with the X-Plane menu bar at the top). Or, if - * you have a specific monitor you want to position your window on, you can - * pass a real monitor index as received from, e.g., - * XPLMGetAllMonitorBoundsOS(). + * Some positioning modes apply to a particular monitor. For those modes, you + * can pass a negative monitor index to position the window on the main + * X-Plane monitor (the screen with the X-Plane menu bar at the top). Or, if + * you have a specific monitor you want to position your window on, you can + * pass a real monitor index as received from, e.g., + * XPLMGetAllMonitorBoundsOS(). * - * Only applies to modern windows. (Windows created using the deprecated - * XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of - * the SDK will always use xplm_WindowPositionFree.) + * Only applies to modern windows. (Windows created using the deprecated + * XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of + * the SDK will always use xplm_WindowPositionFree.) * */ -XPLM_API void XPLMSetWindowPositioningMode( - XPLMWindowID inWindowID, - XPLMWindowPositioningMode inPositioningMode, - int inMonitorIndex); +XPLM_API void XPLMSetWindowPositioningMode( + XPLMWindowID inWindowID, + XPLMWindowPositioningMode inPositioningMode, + int inMonitorIndex); #endif /* XPLM300 */ #if defined(XPLM300) /* * XPLMSetWindowTitle * - * Sets the name for a window. This only applies to windows that opted-in to - * styling as an X-Plane 11 floating window (i.e., with styling mode - * xplm_WindowDecorationRoundRectangle) when they were created using - * XPLMCreateWindowEx(). + * Sets the name for a window. This only applies to windows that opted-in to + * styling as an X-Plane 11 floating window (i.e., with styling mode + * xplm_WindowDecorationRoundRectangle) when they were created using + * XPLMCreateWindowEx(). * */ -XPLM_API void XPLMSetWindowTitle( - XPLMWindowID inWindowID, - const char * inWindowTitle); +XPLM_API void XPLMSetWindowTitle( + XPLMWindowID inWindowID, + const char * inWindowTitle); #endif /* XPLM300 */ /* * XPLMGetWindowRefCon * - * Returns a window's reference constant, the unique value you can use for - * your own purposes. + * This routine returns a window's reference constant, the unique value you + * can use for your own purposes. * */ -XPLM_API void * XPLMGetWindowRefCon( - XPLMWindowID inWindowID); +XPLM_API void * XPLMGetWindowRefCon( + XPLMWindowID inWindowID); /* * XPLMSetWindowRefCon * - * Sets a window's reference constant. Use this to pass data to yourself in - * the callbacks. + * This routine sets a window's reference constant. Use this to pass data to + * yourself in the callbacks. * */ -XPLM_API void XPLMSetWindowRefCon( - XPLMWindowID inWindowID, - void * inRefcon); +XPLM_API void XPLMSetWindowRefCon( + XPLMWindowID inWindowID, + void * inRefcon); /* * XPLMTakeKeyboardFocus * - * This routine gives a specific window keyboard focus. Keystrokes will be - * sent to that window. Pass a window ID of 0 to remove keyboard focus from - * any plugin-created windows and instead pass keyboard strokes directly to - * X-Plane. + * This routine gives a specific window keyboard focus. Keystrokes will be + * sent to that window. Pass a window ID of 0 to remove keyboard focus from + * any plugin-created windows and instead pass keyboard strokes directly to + * X-Plane. * */ -XPLM_API void XPLMTakeKeyboardFocus( - XPLMWindowID inWindow); +XPLM_API void XPLMTakeKeyboardFocus( + XPLMWindowID inWindow); /* * XPLMHasKeyboardFocus * - * Returns true (1) if the indicated window has keyboard focus. Pass a window - * ID of 0 to see if no plugin window has focus, and all keystrokes will go - * directly to X-Plane. + * Returns true (1) if the indicated window has keyboard focus. Pass a window + * ID of 0 to see if no plugin window has focus, and all keystrokes will go + * directly to X-Plane. * */ -XPLM_API int XPLMHasKeyboardFocus( - XPLMWindowID inWindow); +XPLM_API int XPLMHasKeyboardFocus( + XPLMWindowID inWindow); /* * XPLMBringWindowToFront * - * This routine brings the window to the front of the Z-order for its layer. - * Windows are brought to the front automatically when they are created. - * Beyond that, you should make sure you are front before handling mouse - * clicks. + * This routine brings the window to the front of the Z-order for its layer. + * Windows are brought to the front automatically when they are created. + * Beyond that, you should make sure you are front before handling mouse + * clicks. * - * Note that this only brings your window to the front of its layer - * (XPLMWindowLayer). Thus, if you have a window in the floating window layer - * (xplm_WindowLayerFloatingWindows), but there is a modal window (in layer - * xplm_WindowLayerModal) above you, you would still not be the true frontmost - * window after calling this. (After all, the window layers are strictly - * ordered, and no window in a lower layer can ever be above any window in a - * higher one.) + * Note that this only brings your window to the front of its layer + * (XPLMWindowLayer). Thus, if you have a window in the floating window layer + * (xplm_WindowLayerFloatingWindows), but there is a modal window (in layer + * xplm_WindowLayerModal) above you, you would still not be the true frontmost + * window after calling this. (After all, the window layers are strictly + * ordered, and no window in a lower layer can ever be above any window in a + * higher one.) * */ -XPLM_API void XPLMBringWindowToFront( - XPLMWindowID inWindow); +XPLM_API void XPLMBringWindowToFront( + XPLMWindowID inWindow); /* * XPLMIsWindowInFront * - * This routine returns true if the window you passed in is the frontmost - * visible window in its layer (XPLMWindowLayer). - * - * Thus, if you have a window at the front of the floating window layer - * (xplm_WindowLayerFloatingWindows), this will return true even if there is a - * modal window (in layer xplm_WindowLayerModal) above you. (Not to worry, - * though: in such a case, X-Plane will not pass clicks or keyboard input down - * to your layer until the window above stops "eating" the input.) + * This routine returns true if the window you passed in is the frontmost + * visible window in its layer (XPLMWindowLayer). * - * Note that legacy windows are always placed in layer - * xplm_WindowLayerFlightOverlay, while modern-style windows default to - * xplm_WindowLayerFloatingWindows. This means it's perfectly consistent to - * have two different plugin-created windows (one legacy, one modern) *both* - * be in the front (of their different layers!) at the same time. + * Thus, if you have a window at the front of the floating window layer + * (xplm_WindowLayerFloatingWindows), this will return true even if there is a + * modal window (in layer xplm_WindowLayerModal) above you. (Not to worry, + * though: in such a case, X-Plane will not pass clicks or keyboard input down + * to your layer until the window above stops "eating" the input.) * */ -XPLM_API int XPLMIsWindowInFront( - XPLMWindowID inWindow); +XPLM_API int XPLMIsWindowInFront( + XPLMWindowID inWindow); /*************************************************************************** * KEY SNIFFERS ***************************************************************************/ /* - * Low-level keyboard handlers. Allows for intercepting keystrokes outside the - * normal rules of the user interface. + * Low-level keyboard handlers. Allows for intercepting keystrokes outside the + * normal rules of the user interface. * */ @@ -1318,68 +1281,68 @@ XPLM_API int XPLMIsWindowInFront( /* * XPLMKeySniffer_f * - * This is the prototype for a low level key-sniffing function. Window-based - * UI _should not use this_! The windowing system provides high-level - * mediated keyboard access, via the callbacks you attach to your - * XPLMCreateWindow_t. By comparison, the key sniffer provides low level - * keyboard access. + * This is the prototype for a low level key-sniffing function. Window-based + * UI _should not use this_! The windowing system provides high-level + * mediated keyboard access, via the callbacks you attach to your + * XPLMCreateWindow_t. By comparison, the key sniffer provides low level + * keyboard access. * - * Key sniffers are provided to allow libraries to provide non-windowed user - * interaction. For example, the MUI library uses a key sniffer to do pop-up - * text entry. + * Key sniffers are provided to allow libraries to provide non-windowed user + * interaction. For example, the MUI library uses a key sniffer to do pop-up + * text entry. * - * Return 1 to pass the key on to the next sniffer, the window manager, - * X-Plane, or whomever is down stream. Return 0 to consume the key. + * Return 1 to pass the key on to the next sniffer, the window manager, + * X-Plane, or whomever is down stream. Return 0 to consume the key. * - * Warning: this API declares virtual keys as a signed character; however the - * VKEY #define macros in XPLMDefs.h define the vkeys using unsigned values - * (that is 0x80 instead of -0x80). So you may need to cast the incoming vkey - * to an unsigned char to get correct comparisons in C. + * Warning: this API declares virtual keys as a signed character; however the + * VKEY #define macros in XPLMDefs.h define the vkeys using unsigned values + * (that is 0x80 instead of -0x80). So you may need to cast the incoming vkey + * to an unsigned char to get correct comparisons in C. * */ typedef int (* XPLMKeySniffer_f)( - char inChar, - XPLMKeyFlags inFlags, - char inVirtualKey, - void * inRefcon); + char inChar, + XPLMKeyFlags inFlags, + char inVirtualKey, + void * inRefcon); /* * XPLMRegisterKeySniffer * - * This routine registers a key sniffing callback. You specify whether you - * want to sniff before the window system, or only sniff keys the window - * system does not consume. You should ALMOST ALWAYS sniff non-control keys - * after the window system. When the window system consumes a key, it is - * because the user has "focused" a window. Consuming the key or taking - * action based on the key will produce very weird results. Returns - * 1 if successful. + * This routine registers a key sniffing callback. You specify whether you + * want to sniff before the window system, or only sniff keys the window + * system does not consume. You should ALMOST ALWAYS sniff non-control keys + * after the window system. When the window system consumes a key, it is + * because the user has "focused" a window. Consuming the key or taking + * action based on the key will produce very weird results. Returns 1 if + * successful. * */ -XPLM_API int XPLMRegisterKeySniffer( - XPLMKeySniffer_f inCallback, - int inBeforeWindows, - void * inRefcon); +XPLM_API int XPLMRegisterKeySniffer( + XPLMKeySniffer_f inCallback, + int inBeforeWindows, + void * inRefcon); /* * XPLMUnregisterKeySniffer * - * This routine unregisters a key sniffer. You must unregister a key sniffer - * for every time you register one with the exact same signature. Returns 1 - * if successful. + * This routine unregisters a key sniffer. You must unregister a key sniffer + * for every time you register one with the exact same signature. Returns 1 + * if successful. * */ -XPLM_API int XPLMUnregisterKeySniffer( - XPLMKeySniffer_f inCallback, - int inBeforeWindows, - void * inRefcon); +XPLM_API int XPLMUnregisterKeySniffer( + XPLMKeySniffer_f inCallback, + int inBeforeWindows, + void * inRefcon); /*************************************************************************** * HOT KEYS ***************************************************************************/ /* - * Keystrokes that can be managed by others. These are lower-level than window - * keyboard handlers (i.e., callbacks you attach to your XPLMCreateWindow_t), - * but higher level than key sniffers. + * Keystrokes that can be managed by others. These are lower-level than window + * keyboard handlers (i.e., callbacks you attach to your XPLMCreateWindow_t), + * but higher level than key sniffers. * */ @@ -1387,16 +1350,16 @@ XPLM_API int XPLMUnregisterKeySniffer( /* * XPLMHotKey_f * - * Your hot key callback simply takes a pointer of your choosing. + * Your hot key callback simply takes a pointer of your choosing. * */ typedef void (* XPLMHotKey_f)( - void * inRefcon); + void * inRefcon); /* * XPLMHotKeyID * - * An opaque ID used to identify a hot key. + * An opaque IDs used to identify a hot key. * */ typedef void * XPLMHotKeyID; @@ -1404,71 +1367,72 @@ typedef void * XPLMHotKeyID; /* * XPLMRegisterHotKey * - * This routine registers a hot key. You specify your preferred key stroke - * virtual key/flag combination, a description of what your callback does (so - * other plug-ins can describe the plug-in to the user for remapping) and a - * callback function and opaque pointer to pass in). A new hot key ID is - * returned. During execution, the actual key associated with your hot key - * may change, but you are insulated from this. + * This routine registers a hot key. You specify your preferred key stroke + * virtual key/flag combination, a description of what your callback does (so + * other plug-ins can describe the plug-in to the user for remapping) and a + * callback function and opaque pointer to pass in). A new hot key ID is + * returned. During execution, the actual key associated with your hot key + * may change, but you are insulated from this. * */ -XPLM_API XPLMHotKeyID XPLMRegisterHotKey( - char inVirtualKey, - XPLMKeyFlags inFlags, - const char * inDescription, - XPLMHotKey_f inCallback, - void * inRefcon); +XPLM_API XPLMHotKeyID XPLMRegisterHotKey( + char inVirtualKey, + XPLMKeyFlags inFlags, + const char * inDescription, + XPLMHotKey_f inCallback, + void * inRefcon); /* * XPLMUnregisterHotKey * - * Unregisters a hot key. You can only unregister your own hot keys. + * This API unregisters a hot key. You can only unregister your own hot keys. * */ -XPLM_API void XPLMUnregisterHotKey( - XPLMHotKeyID inHotKey); +XPLM_API void XPLMUnregisterHotKey( + XPLMHotKeyID inHotKey); /* * XPLMCountHotKeys * - * Returns the number of current hot keys. + * Returns the number of current hot keys. * */ -XPLM_API int XPLMCountHotKeys(void); +XPLM_API int XPLMCountHotKeys(void); /* * XPLMGetNthHotKey * - * Returns a hot key by index, for iteration on all hot keys. + * Returns a hot key by index, for iteration on all hot keys. * */ -XPLM_API XPLMHotKeyID XPLMGetNthHotKey( - int inIndex); +XPLM_API XPLMHotKeyID XPLMGetNthHotKey( + int inIndex); /* * XPLMGetHotKeyInfo * - * Returns information about the hot key. Return NULL for any parameter you - * don't want info about. The description should be at least 512 chars long. + * Returns information about the hot key. Return NULL for any parameter you + * don't want info about. The description should be at least 512 chars long. * */ -XPLM_API void XPLMGetHotKeyInfo( - XPLMHotKeyID inHotKey, - char * outVirtualKey, /* Can be NULL */ - XPLMKeyFlags * outFlags, /* Can be NULL */ - char * outDescription, /* Can be NULL */ - XPLMPluginID * outPlugin); /* Can be NULL */ +XPLM_API void XPLMGetHotKeyInfo( + XPLMHotKeyID inHotKey, + char * outVirtualKey, /* Can be NULL */ + XPLMKeyFlags * outFlags, /* Can be NULL */ + char * outDescription, /* Can be NULL */ + XPLMPluginID * outPlugin); /* Can be NULL */ /* * XPLMSetHotKeyCombination * - * Remaps a hot key's keystrokes. You may remap another plugin's keystrokes. + * XPLMSetHotKeyCombination remaps a hot keys keystrokes. You may remap + * another plugin's keystrokes. * */ -XPLM_API void XPLMSetHotKeyCombination( - XPLMHotKeyID inHotKey, - char inVirtualKey, - XPLMKeyFlags inFlags); +XPLM_API void XPLMSetHotKeyCombination( + XPLMHotKeyID inHotKey, + char inVirtualKey, + XPLMKeyFlags inFlags); #ifdef __cplusplus } diff --git a/src/SDK/CHeaders/XPLM/XPLMGraphics.h b/src/SDK/CHeaders/XPLM/XPLMGraphics.h index d7aef52f..3588dcc4 100755 --- a/src/SDK/CHeaders/XPLM/XPLMGraphics.h +++ b/src/SDK/CHeaders/XPLM/XPLMGraphics.h @@ -2,43 +2,44 @@ #define _XPLMGraphics_h_ /* - * 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 * */ -/*************************************************************************** - * XPLMGraphics - ***************************************************************************/ /* - * A few notes on coordinate systems: - * - * X-Plane uses three kinds of coordinates. Global coordinates are specified - * as latitude, longitude and elevation. This coordinate system never changes - * but is not very precise. - * - * OpenGL (or 'local') coordinates are cartesian and shift with the plane. - * They offer more precision and are used for 3-d OpenGL drawing. The X axis - * is aligned east-west with positive X meaning east. The Y axis is aligned - * straight up and down at the point 0,0,0 (but since the earth is round it is - * not truly straight up and down at other points). The Z axis is aligned - * north-south at 0, 0, 0 with positive Z pointing south (but since the earth - * is round it isn't exactly north-south as you move east or west of 0, 0, 0). - * One unit is one meter and the point 0,0,0 is on the surface of the earth at - * sea level for some latitude and longitude picked by the sim such that the - * user's aircraft is reasonably nearby. - * - * 2-d Panel coordinates are 2d, with the X axis horizontal and the Y axis - * vertical. The point 0,0 is the bottom left and 1024,768 is the upper - * right of the screen. This is true no matter what resolution the user's - * monitor is in; when running in higher resolution, graphics will be - * scaled. - * - * Use X-Plane's routines to convert between global and local coordinates. Do - * not attempt to do this conversion yourself; the precise 'roundness' of - * X-Plane's physics model may not match your own, and (to make things - * weirder) the user can potentially customize the physics of the current - * planet. + * Graphics routines for X-Plane and OpenGL. + * + * A few notes on coordinate systems: + * + * X-Plane uses three kinds of coordinates. Global coordinates are specified + * as latitude, longitude and elevation. This coordinate system never changes + * but is not very precise. + * + * OpenGL (or 'local') coordinates are cartesian and shift with the plane. + * They offer more precision and are used for 3-d OpenGL drawing. The X axis + * is aligned east-west with positive X meaning east. The Y axis is aligned + * straight up and down at the point 0,0,0 (but since the earth is round it is + * not truly straight up and down at other points). The Z axis is aligned + * north-south at 0, 0, 0 with positive Z pointing south (but since the earth + * is round it isn't exactly north-south as you move east or west of 0, 0, 0). + * One unit is one meter and the point 0,0,0 is on the surface of the earth + * at sea level for some latitude and longitude picked by the sim such that + * the user's aircraft is reasonably nearby. + * + * Cockpit coordinates are 2d, with the X axis horizontal and the Y axis + * vertical. The point 0,0 is the bottom left and 1024,768 is the upper right + * of the screen. This is true no matter what resolution the user's monitor is + * in; when running in higher resolution, graphics will be scaled. + * + * Use X-Plane's routines to convert between global and local coordinates. Do + * not attempt to do this conversion yourself; the precise 'roundness' of + * X-Plane's physics model may not match your own, and (to make things + * weirder) the user can potentially customize the physics of the current + * planet. * */ @@ -52,7 +53,7 @@ extern "C" { * X-PLANE GRAPHICS ***************************************************************************/ /* - * These routines allow you to use OpenGL with X-Plane. + * These routines allow you to use OpenGL with X-Plane. * */ @@ -60,28 +61,20 @@ extern "C" { /* * XPLMTextureID * - * XPLM Texture IDs name well-known textures in the sim for you to use. This - * allows you to recycle textures from X-Plane, saving VRAM. - * - * *Warning*: do not use these enums. The only remaining use they have is to - * access the legacy compatibility v10 UI texture; if you need this, get it - * via the Widgets library. + * XPLM Texture IDs name well-known textures in the sim for you to use. This + * allows you to recycle textures from X-Plane, saving VRAM. * */ enum { - /* The bitmap that contains window outlines, button outlines, fonts, etc. */ - xplm_Tex_GeneralInterface = 0, + /* The bitmap that contains window outlines, button outlines, fonts, etc. */ + xplm_Tex_GeneralInterface = 0 -#if defined(XPLM_DEPRECATED) - /* The exterior paint for the user's aircraft (daytime). */ - xplm_Tex_AircraftPaint = 1, + /* The exterior paint for the user's aircraft (daytime). */ + ,xplm_Tex_AircraftPaint = 1 -#endif /* XPLM_DEPRECATED */ -#if defined(XPLM_DEPRECATED) - /* The exterior light map for the user's aircraft. */ - xplm_Tex_AircraftLiteMap = 2, + /* The exterior light map for the user's aircraft. */ + ,xplm_Tex_AircraftLiteMap = 2 -#endif /* XPLM_DEPRECATED */ }; typedef int XPLMTextureID; @@ -89,269 +82,244 @@ typedef int XPLMTextureID; /* * XPLMSetGraphicsState * - * XPLMSetGraphicsState changes OpenGL's fixed function pipeline state. You - * are not responsible for restoring any state that is accessed via - * XPLMSetGraphicsState, but you are responsible for not accessing this state - * directly. - * - * - inEnableFog - enables or disables fog, equivalent to: glEnable(GL_FOG); - * - inNumberTexUnits - enables or disables a number of multitexturing units. - * If the number is 0, 2d texturing is disabled entirely, as in - * glDisable(GL_TEXTURE_2D); Otherwise, 2d texturing is enabled, and a - * number of multitexturing units are enabled sequentially, starting with - * unit 0, e.g. glActiveTextureARB(GL_TEXTURE0_ARB); glEnable - * (GL_TEXTURE_2D); - * - inEnableLighting - enables or disables OpenGL lighting, e.g. - * glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); - * - inEnableAlphaTesting - enables or disables the alpha test per pixel, e.g. - * glEnable(GL_ALPHA_TEST); - * - inEnableAlphaBlending - enables or disables alpha blending per pixel, - * e.g. glEnable(GL_BLEND); - * - inEnableDepthTesting - enables per pixel depth testing, as in - * glEnable(GL_DEPTH_TEST); - * - inEnableDepthWriting - enables writing back of depth information to the - * depth bufffer, as in glDepthMask(GL_TRUE); - * - * The purpose of this function is to change OpenGL state while keeping - * X-Plane aware of the state changes; this keeps X-Plane from getting - * surprised by OGL state changes, and prevents X-Plane and plug-ins from - * having to set all state before all draws; XPLMSetGraphicsState internally - * skips calls to change state that is already properly enabled. - * - * X-Plane does not have a 'default' OGL state for plug-ins with respect to - * the above state vector; plug-ins should totally set OGL state using this - * API before drawing. Use XPLMSetGraphicsState instead of any of the above - * OpenGL calls. - * - * WARNING: Any routine that performs drawing (e.g. XPLMDrawString or widget - * code) may change X-Plane's state. Always set state before drawing after - * unknown code has executed. - * - * *Deprecation Warnings*: X-Plane's lighting and fog environemnt is - * significantly more complex than the fixed function pipeline can express; - * do not assume that lighting and fog state is a good approximation for 3-d - * drawing. Prefer to use XPLMInstancing to draw objects. All calls to - * XPLMSetGraphicsState should have no fog or lighting. + * XPLMSetGraphicsState changes OpenGL's graphics state in a number of ways: + * + * inEnableFog - enables or disables fog, equivalent to: glEnable(GL_FOG); + * + * inNumberTexUnits - enables or disables a number of multitexturing units. If + * the number is 0, 2d texturing is disabled entirely, as in + * glDisable(GL_TEXTURE_2D); Otherwise, 2d texturing is enabled, and a + * number of multitexturing units are enabled sequentially, starting with + * unit 0, e.g. glActiveTextureARB(GL_TEXTURE0_ARB); glEnable + * (GL_TEXTURE_2D); + * + * inEnableLighting - enables or disables OpenGL lighting, e.g. + * glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); + * + * inEnableAlphaTesting - enables or disables the alpha test per pixel, e.g. + * glEnable(GL_ALPHA_TEST); + * + * inEnableAlphaBlending - enables or disables alpha blending per pixel, e.g. + * glEnable(GL_BLEND); + * + * inEnableDepthTesting - enables per pixel depth testing, as in + * glEnable(GL_DEPTH_TEST); + * + * inEnableDepthWriting - enables writing back of depth information to the + * depth bufffer, as in glDepthMask(GL_TRUE); + * + * The purpose of this function is to change OpenGL state while keeping + * X-Plane aware of the state changes; this keeps X-Plane from getting + * surprised by OGL state changes, and prevents X-Plane and plug-ins from + * having to set all state before all draws; XPLMSetGraphicsState internally + * skips calls to change state that is already properly enabled. + * + * X-Plane does not have a 'default' OGL state to plug-ins; plug-ins should + * totally set OGL state before drawing. Use XPLMSetGraphicsState instead of + * any of the above OpenGL calls. + * + * WARNING: Any routine that performs drawing (e.g. XPLMDrawString or widget + * code) may change X-Plane's state. Always set state before drawing after + * unknown code has executed. * */ -XPLM_API void XPLMSetGraphicsState( - int inEnableFog, - int inNumberTexUnits, - int inEnableLighting, - int inEnableAlphaTesting, - int inEnableAlphaBlending, - int inEnableDepthTesting, - int inEnableDepthWriting); +XPLM_API void XPLMSetGraphicsState( + int inEnableFog, + int inNumberTexUnits, + int inEnableLighting, + int inEnableAlphaTesting, + int inEnableAlphaBlending, + int inEnableDepthTesting, + int inEnableDepthWriting); /* * XPLMBindTexture2d * - * XPLMBindTexture2d changes what texture is bound to the 2d texturing - * target. This routine caches the current 2d texture across all texturing - * units in the sim and plug-ins, preventing extraneous binding. For - * example, consider several plug-ins running in series; if they all use the - * 'general interface' bitmap to do UI, calling this function will skip the - * rebinding of the general interface texture on all but the first plug-in, - * which can provide better frame rate son some graphics cards. + * XPLMBindTexture2d changes what texture is bound to the 2d texturing target. + * This routine caches the current 2d texture across all texturing units in + * the sim and plug-ins, preventing extraneous binding. For example, consider + * several plug-ins running in series; if they all use the 'general interface' + * bitmap to do UI, calling this function will skip the rebinding of the + * general interface texture on all but the first plug-in, which can provide + * better frame rate son some graphics cards. * - * inTextureID is the ID of the texture object to bind; inTextureUnit is a - * zero-based texture unit (e.g. 0 for the first one), up to a maximum of 4 - * units. (This number may increase in future versions of X-Plane.) + * inTextureID is the ID of the texture object to bind; inTextureUnit is a + * zero-based texture unit (e.g. 0 for the first one), up to a maximum of 4 + * units. (This number may increase in future versions of X-Plane.) * - * Use this routine instead of glBindTexture(GL_TEXTURE_2D, ....); + * Use this routine instead of glBindTexture(GL_TEXTURE_2D, ....); * */ -XPLM_API void XPLMBindTexture2d( - int inTextureNum, - int inTextureUnit); +XPLM_API void XPLMBindTexture2d( + int inTextureNum, + int inTextureUnit); /* * XPLMGenerateTextureNumbers * - * Use this routine instead of glGenTextures to generate new texture object - * IDs. This routine historically ensured that plugins don't use texure IDs - * that X-Plane is reserving for its own use. + * This routine generates unused texture numbers that a plug-in can use to + * safely bind textures. Use this routine instead of glGenTextures; + * glGenTextures will allocate texture numbers in ranges that X-Plane reserves + * for its own use but does not always use; for example, it might provide an + * ID within the range of textures reserved for terrain...loading a new .env + * file as the plane flies might then cause X-Plane to use this texture ID. + * X-Plane will then overwrite the plug-ins texture. This routine returns + * texture IDs that are out of X-Plane's usage range. * */ -XPLM_API void XPLMGenerateTextureNumbers( - int * outTextureIDs, - int inCount); +XPLM_API void XPLMGenerateTextureNumbers( + int * outTextureIDs, + int inCount); -#if defined(XPLM_DEPRECATED) /* * XPLMGetTexture * - * XPLMGetTexture returns the OpenGL texture ID of an X-Plane texture based on - * a generic identifying code. For example, you can get the texture for - * X-Plane's UI bitmaps. + * XPLMGetTexture returns the OpenGL texture enumeration of an X-Plane texture + * based on a generic identifying code. For example, you can get the texture + * for X-Plane's UI bitmaps. This allows you to build new gauges that take + * advantage of X-Plane's textures, for smooth artwork integration and also + * saving texture memory. Note that the texture might not be loaded yet, + * depending on what the plane's panel contains. + * + * OPEN ISSUE: We really need a way to make sure X-Plane loads this texture if + * it isn't around, or at least a way to find out whether it is loaded or not. * */ -XPLM_API int XPLMGetTexture( - XPLMTextureID inTexture); -#endif /* XPLM_DEPRECATED */ +XPLM_API int XPLMGetTexture( + XPLMTextureID inTexture); /* * XPLMWorldToLocal * - * This routine translates coordinates from latitude, longitude, and altitude - * to local scene coordinates. Latitude and longitude are in decimal degrees, - * and altitude is in meters MSL (mean sea level). The XYZ coordinates are in - * meters in the local OpenGL coordinate system. + * This routine translates coordinates from latitude, longitude, and altitude + * to local scene coordinates. Latitude and longitude are in decimal degrees, + * and altitude is in meters MSL (mean sea level). The XYZ coordinates are in + * meters in the local OpenGL coordinate system. * */ -XPLM_API void XPLMWorldToLocal( - double inLatitude, - double inLongitude, - double inAltitude, - double * outX, - double * outY, - double * outZ); +XPLM_API void XPLMWorldToLocal( + double inLatitude, + double inLongitude, + double inAltitude, + double * outX, + double * outY, + double * outZ); /* * XPLMLocalToWorld * - * This routine translates a local coordinate triplet back into latitude, - * longitude, and altitude. Latitude and longitude are in decimal degrees, - * and altitude is in meters MSL (mean sea level). The XYZ coordinates are in - * meters in the local OpenGL coordinate system. + * This routine translates a local coordinate triplet back into latitude, + * longitude, and altitude. Latitude and longitude are in decimal degrees, + * and altitude is in meters MSL (mean sea level). The XYZ coordinates are in + * meters in the local OpenGL coordinate system. * - * NOTE: world coordinates are less precise than local coordinates; you should - * try to avoid round tripping from local to world and back. + * NOTE: world coordinates are less precise than local coordinates; you should + * try to avoid round tripping from local to world and back. * */ -XPLM_API void XPLMLocalToWorld( - double inX, - double inY, - double inZ, - double * outLatitude, - double * outLongitude, - double * outAltitude); +XPLM_API void XPLMLocalToWorld( + double inX, + double inY, + double inZ, + double * outLatitude, + double * outLongitude, + double * outAltitude); /* * XPLMDrawTranslucentDarkBox * - * This routine draws a translucent dark box, partially obscuring parts of the - * screen but making text easy to read. This is the same graphics primitive - * used by X-Plane to show text files and ATC info. + * This routine draws a translucent dark box, partially obscuring parts of the + * screen but making text easy to read. This is the same graphics primitive + * used by X-Plane to show text files and ATC info. * */ -XPLM_API void XPLMDrawTranslucentDarkBox( - int inLeft, - int inTop, - int inRight, - int inBottom); +XPLM_API void XPLMDrawTranslucentDarkBox( + int inLeft, + int inTop, + int inRight, + int inBottom); /*************************************************************************** * X-PLANE TEXT ***************************************************************************/ +/* + * + * + */ /* * XPLMFontID * - * X-Plane features some fixed-character fonts. Each font may have its own - * metrics. + * X-Plane features some fixed-character fonts. Each font may have its own + * metrics. * - * WARNING: Some of these fonts are no longer supported or may have changed - * geometries. For maximum copmatibility, see the comments below. + * WARNING: Some of these fonts are no longer supported or may have changed + * geometries. For maximum copmatibility, see the comments below. * - * Note: X-Plane 7 supports proportional-spaced fonts. Since no measuring - * routine is available yet, the SDK will normally draw using a fixed-width - * font. You can use a dataref to enable proportional font drawing on XP7 if - * you want to. + * Note: X-Plane 7 supports proportional-spaced fonts. Since no measuring + * routine is available yet, the SDK will normally draw using a fixed-width + * font. You can use a dataref to enable proportional font drawing on XP7 if + * you want to. * */ enum { - /* Mono-spaced font for user interface. Available in all versions of the SDK.*/ - xplmFont_Basic = 0, - -#if defined(XPLM_DEPRECATED) - /* Deprecated, do not use. */ - xplmFont_Menus = 1, - -#endif /* XPLM_DEPRECATED */ -#if defined(XPLM_DEPRECATED) - /* Deprecated, do not use. */ - xplmFont_Metal = 2, - -#endif /* XPLM_DEPRECATED */ -#if defined(XPLM_DEPRECATED) - /* Deprecated, do not use. */ - xplmFont_Led = 3, - -#endif /* XPLM_DEPRECATED */ -#if defined(XPLM_DEPRECATED) - /* Deprecated, do not use. */ - xplmFont_LedWide = 4, - -#endif /* XPLM_DEPRECATED */ -#if defined(XPLM_DEPRECATED) - /* Deprecated, do not use. */ - xplmFont_PanelHUD = 5, - -#endif /* XPLM_DEPRECATED */ -#if defined(XPLM_DEPRECATED) - /* Deprecated, do not use. */ - xplmFont_PanelEFIS = 6, - -#endif /* XPLM_DEPRECATED */ -#if defined(XPLM_DEPRECATED) - /* Deprecated, do not use. */ - xplmFont_PanelGPS = 7, - -#endif /* XPLM_DEPRECATED */ -#if defined(XPLM_DEPRECATED) - /* Deprecated, do not use. */ - xplmFont_RadiosGA = 8, - -#endif /* XPLM_DEPRECATED */ -#if defined(XPLM_DEPRECATED) - /* Deprecated, do not use. */ - xplmFont_RadiosBC = 9, - -#endif /* XPLM_DEPRECATED */ -#if defined(XPLM_DEPRECATED) - /* Deprecated, do not use. */ - xplmFont_RadiosHM = 10, - -#endif /* XPLM_DEPRECATED */ -#if defined(XPLM_DEPRECATED) - /* Deprecated, do not use. */ - xplmFont_RadiosGANarrow = 11, - -#endif /* XPLM_DEPRECATED */ -#if defined(XPLM_DEPRECATED) - /* Deprecated, do not use. */ - xplmFont_RadiosBCNarrow = 12, - -#endif /* XPLM_DEPRECATED */ -#if defined(XPLM_DEPRECATED) - /* Deprecated, do not use. */ - xplmFont_RadiosHMNarrow = 13, - -#endif /* XPLM_DEPRECATED */ -#if defined(XPLM_DEPRECATED) - /* Deprecated, do not use. */ - xplmFont_Timer = 14, - -#endif /* XPLM_DEPRECATED */ -#if defined(XPLM_DEPRECATED) - /* Deprecated, do not use. */ - xplmFont_FullRound = 15, - -#endif /* XPLM_DEPRECATED */ -#if defined(XPLM_DEPRECATED) - /* Deprecated, do not use. */ - xplmFont_SmallRound = 16, - -#endif /* XPLM_DEPRECATED */ -#if defined(XPLM_DEPRECATED) - /* Deprecated, do not use. */ - xplmFont_Menus_Localized = 17, - -#endif /* XPLM_DEPRECATED */ + /* Mono-spaced font for user interface. Available in all versions of the SDK. */ + xplmFont_Basic = 0 + + /* Deprecated, do not use. */ + ,xplmFont_Menus = 1 + + /* Deprecated, do not use. */ + ,xplmFont_Metal = 2 + + /* Deprecated, do not use. */ + ,xplmFont_Led = 3 + + /* Deprecated, do not use. */ + ,xplmFont_LedWide = 4 + + /* Deprecated, do not use. */ + ,xplmFont_PanelHUD = 5 + + /* Deprecated, do not use. */ + ,xplmFont_PanelEFIS = 6 + + /* Deprecated, do not use. */ + ,xplmFont_PanelGPS = 7 + + /* Deprecated, do not use. */ + ,xplmFont_RadiosGA = 8 + + /* Deprecated, do not use. */ + ,xplmFont_RadiosBC = 9 + + /* Deprecated, do not use. */ + ,xplmFont_RadiosHM = 10 + + /* Deprecated, do not use. */ + ,xplmFont_RadiosGANarrow = 11 + + /* Deprecated, do not use. */ + ,xplmFont_RadiosBCNarrow = 12 + + /* Deprecated, do not use. */ + ,xplmFont_RadiosHMNarrow = 13 + + /* Deprecated, do not use. */ + ,xplmFont_Timer = 14 + + /* Deprecated, do not use. */ + ,xplmFont_FullRound = 15 + + /* Deprecated, do not use. */ + ,xplmFont_SmallRound = 16 + + /* Deprecated, do not use. */ + ,xplmFont_Menus_Localized = 17 + #if defined(XPLM200) - /* Proportional UI font. */ - xplmFont_Proportional = 18, + /* Proportional UI font. */ + ,xplmFont_Proportional = 18 #endif /* XPLM200 */ @@ -361,73 +329,73 @@ typedef int XPLMFontID; /* * XPLMDrawString * - * This routine draws a NULL termianted string in a given font. Pass in the - * lower left pixel that the character is to be drawn onto. Also pass the - * character and font ID. This function returns the x offset plus the width of - * all drawn characters. The color to draw in is specified as a pointer to an - * array of three floating point colors, representing RGB intensities from 0.0 - * to 1.0. + * This routine draws a NULL termianted string in a given font. Pass in the + * lower left pixel that the character is to be drawn onto. Also pass the + * character and font ID. This function returns the x offset plus the width of + * all drawn characters. The color to draw in is specified as a pointer to an + * array of three floating point colors, representing RGB intensities from 0.0 + * to 1.0. * */ -XPLM_API void XPLMDrawString( - float * inColorRGB, - int inXOffset, - int inYOffset, - char * inChar, - int * inWordWrapWidth, /* Can be NULL */ - XPLMFontID inFontID); +XPLM_API void XPLMDrawString( + float * inColorRGB, + int inXOffset, + int inYOffset, + char * inChar, + int * inWordWrapWidth, /* Can be NULL */ + XPLMFontID inFontID); /* * XPLMDrawNumber * - * This routine draws a number similar to the digit editing fields in - * PlaneMaker and data output display in X-Plane. Pass in a color, a - * position, a floating point value, and formatting info. Specify how many - * integer and how many decimal digits to show and whether to show a sign, as - * well as a character set. This routine returns the xOffset plus width of the - * string drawn. + * This routine draws a number similar to the digit editing fields in + * PlaneMaker and data output display in X-Plane. Pass in a color, a + * position, a floating point value, and formatting info. Specify how many + * integer and how many decimal digits to show and whether to show a sign, as + * well as a character set. This routine returns the xOffset plus width of the + * string drawn. * */ -XPLM_API void XPLMDrawNumber( - float * inColorRGB, - int inXOffset, - int inYOffset, - double inValue, - int inDigits, - int inDecimals, - int inShowSign, - XPLMFontID inFontID); +XPLM_API void XPLMDrawNumber( + float * inColorRGB, + int inXOffset, + int inYOffset, + double inValue, + int inDigits, + int inDecimals, + int inShowSign, + XPLMFontID inFontID); /* * XPLMGetFontDimensions * - * This routine returns the width and height of a character in a given font. - * It also tells you if the font only supports numeric digits. Pass NULL if - * you don't need a given field. Note that for a proportional font the width - * will be an arbitrary, hopefully average width. + * This routine returns the width and height of a character in a given font. + * It also tells you if the font only supports numeric digits. Pass NULL if + * you don't need a given field. Note that for a proportional font the width + * will be an arbitrary, hopefully average width. * */ -XPLM_API void XPLMGetFontDimensions( - XPLMFontID inFontID, - int * outCharWidth, /* Can be NULL */ - int * outCharHeight, /* Can be NULL */ - int * outDigitsOnly); /* Can be NULL */ +XPLM_API void XPLMGetFontDimensions( + XPLMFontID inFontID, + int * outCharWidth, /* Can be NULL */ + int * outCharHeight, /* Can be NULL */ + int * outDigitsOnly); /* Can be NULL */ #if defined(XPLM200) /* * XPLMMeasureString * - * This routine returns the width in pixels of a string using a given font. - * The string is passed as a pointer plus length (and does not need to be null - * terminated); this is used to allow for measuring substrings. The return - * value is floating point; it is possible that future font drawing may allow - * for fractional pixels. + * This routine returns the width in pixels of a string using a given font. + * The string is passed as a pointer plus length (and does not need to be null + * terminated); this is used to allow for measuring substrings. The return + * value is floating point; it is possible that future font drawing may allow + * for fractional pixels. * */ -XPLM_API float XPLMMeasureString( - XPLMFontID inFontID, - const char * inChar, - int inNumChars); +XPLM_API float XPLMMeasureString( + XPLMFontID inFontID, + const char * inChar, + int inNumChars); #endif /* XPLM200 */ #ifdef __cplusplus diff --git a/src/SDK/CHeaders/XPLM/XPLMInstance.h b/src/SDK/CHeaders/XPLM/XPLMInstance.h index d2a8f2c0..952b9912 100644 --- a/src/SDK/CHeaders/XPLM/XPLMInstance.h +++ b/src/SDK/CHeaders/XPLM/XPLMInstance.h @@ -2,40 +2,40 @@ #define _XPLMInstance_h_ /* - * 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 * */ -/*************************************************************************** - * XPLMInstance - ***************************************************************************/ /* - * This API provides instanced drawing of X-Plane objects (.obj files). In - * contrast to old drawing APIs, which required you to draw your own objects - * per-frame, the instancing API allows you to simply register an OBJ for - * drawing, then move or manipulate it later (as needed). + * This API provides instanced drawing of X-Plane objects (.obj files). In + * contrast to old drawing APIs, which required you to draw your own objects + * per-frame, the instancing API allows you to simply register an OBJ for + * drawing, then move or manipulate it later (as needed). * - * This provides one tremendous benefit: it keeps all dataref operations for - * your object in one place. Because datarefs are main thread only, allowing - * dataref access anywhere is a serious performance bottleneck for the - * simulator---the whole simulator has to pause and wait for each dataref - * access. This performance penalty will only grow worse as X-Plane moves - * toward an ever more heavily multithreaded engine. + * This provides one tremendous benefit: it keeps all dataref operations for + * your object in one place. Because datarefs are main thread only, allowing + * dataref access anywhere is a serious performance bottleneck for the + * simulator---the whole simulator has to pause and wait for each dataref + * access. This performance penalty will only grow worse as X-Plane moves + * toward an ever more heavily multithreaded engine. * - * The instancing API allows X-Plane to isolate all dataref manipulations for - * all plugin object drawing to one place, potentially providing huge - * performance gains. + * The instancing API allows X-Plane to isolate all dataref manipulations for + * all plugin object drawing to one place, potentially providing huge + * performance gains. * - * Here's how it works: + * Here's how it works: * - * When an instance is created, it provides a list of all datarefs you want to - * manipulate in for the OBJ in the future. This list of datarefs replaces the - * ad-hoc collections of dataref objects previously used by art assets. Then, - * per-frame, you can manipulate the instance by passing in a "block" of - * packed floats representing the current values of the datarefs for your - * instance. (Note that the ordering of this set of packed floats must exactly - * match the ordering of the datarefs when you created your instance.) + * When an instance is created, it provides a list of all datarefs you want to + * manipulate in for the OBJ in the future. This list of datarefs replaces the + * ad-hoc collections of dataref objects previously used by art assets. Then, + * per-frame, you can manipulate the instance by passing in a "block" of + * packed floats representing the current values of the datarefs for your + * instance. (Note that the ordering of this set of packed floats must exactly + * match the ordering of the datarefs when you created your instance.) * */ @@ -50,7 +50,7 @@ extern "C" { * Instance Creation and Destruction ***************************************************************************/ /* - * Registers and unregisters instances. + * Registers and unregisters instances. * */ @@ -58,7 +58,7 @@ extern "C" { /* * XPLMInstanceRef * - * An opaque handle to an instance. + * An opaque handle to an instance. * */ typedef void * XPLMInstanceRef; @@ -66,68 +66,41 @@ typedef void * XPLMInstanceRef; /* * XPLMCreateInstance * - * XPLMCreateInstance creates a new instance, managed by your plug-in, and - * returns a handle to the instance. A few important requirements: - * - * * The object passed in must be fully loaded and returned from the XPLM - * before you can create your instance; you cannot pass a null obj ref, nor - * can you change the ref later. - * - * * If you use any custom datarefs in your object, they must be registered - * before the object is loaded. This is true even if their data will be - * provided via the instance dataref list. - * - * * The instance dataref array must be a valid ptr to an array of at least - * one item that is null terminated. That is, if you do not want any - * datarefs, you must passa ptr to an array with a null item. You cannot - * pass null for this. + * Registers an instance of an X-Plane object. * */ -XPLM_API XPLMInstanceRef XPLMCreateInstance( - XPLMObjectRef obj, - const char ** datarefs); +XPLM_API XPLMInstanceRef XPLMCreateInstance( + XPLMObjectRef obj, + const char ** datarefs); /* * XPLMDestroyInstance * - * XPLMDestroyInstance destroys and deallocates your instance; once called, - * you are still responsible for releasing the OBJ ref. - * - * Tip: you can release your OBJ ref after you call XPLMCreateInstance as long - * as you never use it again; the instance will maintain its own reference to - * the OBJ and the object OBJ be deallocated when the instance is destroyed. + * Unregisters an instance. * */ -XPLM_API void XPLMDestroyInstance( - XPLMInstanceRef instance); +XPLM_API void XPLMDestroyInstance( + XPLMInstanceRef instance); /*************************************************************************** * Instance Manipulation ***************************************************************************/ +/* + * + * + */ /* * XPLMInstanceSetPosition * - * Updates both the position of the instance and all datarefs you registered - * for it. Call this from a flight loop callback or UI callback. - * - * __DO NOT__ call XPLMInstanceSetPosition from a drawing callback; the whole - * point of instancing is that you do not need any drawing callbacks. Setting - * instance data from a drawing callback may have undefined consequences, and - * the drawing callback hurts FPS unnecessarily. - * - * The memory pointed to by the data pointer must be large enough to hold one - * float for every data ref you have registered, and must contain valid - * floating point data. - * - * BUG: before X-Plane 11.50, if you have no dataref registered, you must - * still pass a valid pointer for data and not null. + * Updates both the position of the instance and all datarefs you registered + * for it. * */ -XPLM_API void XPLMInstanceSetPosition( - XPLMInstanceRef instance, - const XPLMDrawInfo_t * new_position, - const float * data); +XPLM_API void XPLMInstanceSetPosition( + XPLMInstanceRef instance, + const XPLMDrawInfo_t * new_position, + const float * data); #ifdef __cplusplus } diff --git a/src/SDK/CHeaders/XPLM/XPLMMap.h b/src/SDK/CHeaders/XPLM/XPLMMap.h index 18c055ac..86cf48b7 100644 --- a/src/SDK/CHeaders/XPLM/XPLMMap.h +++ b/src/SDK/CHeaders/XPLM/XPLMMap.h @@ -2,61 +2,59 @@ #define _XPLMMap_h_ /* - * 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 * */ -/*************************************************************************** - * XPLMMap - ***************************************************************************/ /* - * This API allows you to create new layers within X-Plane maps. Your layers - * can draw arbitrary OpenGL, but they conveniently also have access to - * X-Plane's built-in icon and label drawing functions. - * - * As of X-Plane 11, map drawing happens in three stages: - * - * 1. backgrounds and "fill," - * 2. icons, and - * 3. labels. - * - * Thus, all background drawing gets layered beneath all icons, which likewise - * get layered beneath all labels. Within each stage, the map obeys a - * consistent layer ordering, such that "fill" layers (layers that cover a - * large amount of map area, like the terrain and clouds) appear beneath - * "markings" layers (like airport icons). This ensures that layers with fine - * details don't get obscured by layers with larger details. - * - * The XPLM map API reflects both aspects of this draw layering: you can - * register a layer as providing either markings or fill, and X-Plane will - * draw your fill layers beneath your markings layers (regardless of - * registration order). Likewise, you are guaranteed that your layer's icons - * (added from within an icon callback) will go above your layer's OpenGL - * drawing, and your labels will go above your icons. - * - * The XPLM guarantees that all plugin-created fill layers go on top of all - * native X-Plane fill layers, and all plugin-created markings layers go on - * top of all X-Plane markings layers (with the exception of the aircraft - * icons). It also guarantees that the draw order of your own plugin's layers - * will be consistent. But, for layers created by different plugins, the only - * guarantee is that we will draw all of one plugin's layers of each type - * (fill, then markings), then all of the others'; we don't guarantee which - * plugin's fill and markings layers go on top of the other's. - * - * As of X-Plane 11, maps use true cartographic projections for their drawing, - * and different maps may use different projections. For that reason, all - * drawing calls include an opaque handle for the projection you should use to - * do the drawing. Any time you would draw at a particular latitude/longitude, - * you'll need to ask the projection to translate that position into "map - * coordinates." (Note that the projection is guaranteed not to change between - * calls to your prepare-cache hook, so if you cache your map coordinates - * ahead of time, there's no need to re-project them when you actually draw.) - * - * In addition to mapping normal latitude/longitude locations into map - * coordinates, the projection APIs also let you know the current heading for - * north. (Since X-Plane 11 maps can rotate to match the heading of the user's - * aircraft, it's not safe to assume that north is at zero degrees rotation.) + * This API allows you to create new layers within X-Plane maps. Your layers + * can draw arbitrary OpenGL, but they conveniently also have access to + * X-Plane's built-in icon and label drawing functions. + * + * As of X-Plane 11, map drawing happens in three stages: + * + * 1. backgrounds and "fill," 2. icons, and 3. labels. + * + * Thus, all background drawing gets layered beneath all icons, which likewise + * get layered beneath all labels. Within each stage, the map obeys a + * consistent layer ordering, such that "fill" layers (layers that cover a + * large amount of map area, like the terrain and clouds) appear beneath + * "markings" layers (like airport icons). This ensures that layers with fine + * details don't get obscured by layers with larger details. + * + * The XPLM map API reflects both aspects of this draw layering: you can + * register a layer as providing either markings or fill, and X-Plane will + * draw your fill layers beneath your markings layers (regardless of + * registration order). Likewise, you are guaranteed that your layer's icons + * (added from within an icon callback) will go above your layer's OpenGL + * drawing, and your labels will go above your icons. + * + * The XPLM guarantees that all plugin-created fill layers go on top of all + * native X-Plane fill layers, and all plugin-created markings layers go on + * top of all X-Plane markings layers (with the exception of the aircraft + * icons). It also guarantees that the draw order of your own plugin's layers + * will be consistent. But, for layers created by different plugins, the only + * guarantee is that we will draw all of one plugin's layers of each type + * (fill, then markings), then all of the others'; we don't guarantee which + * plugin's fill and markings layers go on top of the other's. + * + * As of X-Plane 11, maps use true cartographic projections for their drawing, + * and different maps may use different projections. For that reason, all + * drawing calls include an opaque handle for the projection you should use to + * do the drawing. Any time you would draw at a particular latitude/longitude, + * you'll need to ask the projection to translate that position into "map + * coordinates." (Note that the projection is guaranteed not to change between + * calls to your prepare-cache hook, so if you cache your map coordinates + * ahead of time, there's no need to re-project them when you actually draw.) + * + * In addition to mapping normal latitude/longitude locations into map + * coordinates, the projection APIs also let you know the current heading for + * north. (Since X-Plane 11 maps can rotate to match the heading of the user's + * aircraft, it's not safe to assume that north is at zero degrees rotation.) * */ @@ -71,11 +69,11 @@ extern "C" { * DRAWING CALLBACKS ***************************************************************************/ /* - * When you create a new map layer (using XPLMCreateMapLayer), you can provide - * any or all of these callbacks. They allow you to insert your own OpenGL - * drawing, text labels, and icons into the X-Plane map at the appropriate - * places, allowing your layer to behave as similarly to X-Plane's built-in - * layers as possible. + * When you create a new map layer (using XPLMCreateMapLayer), you can provide + * any or all of these callbacks. They allow you to insert your own OpenGL + * drawing, text labels, and icons into the X-Plane map at the appropriate + * places, allowing your layer to behave as similarly to X-Plane's built-in + * layers as possible. * */ @@ -83,8 +81,8 @@ extern "C" { /* * XPLMMapLayerID * - * This is an opaque handle for a plugin-created map layer. Pass it to the map - * drawing APIs from an appropriate callback to draw in the layer you created. + * This is an opaque handle for a plugin-created map layer. Pass it to the map + * drawing APIs from an appropriate callback to draw in the layer you created. * */ typedef void * XPLMMapLayerID; @@ -92,8 +90,8 @@ typedef void * XPLMMapLayerID; /* * XPLMMapProjectionID * - * This is an opaque handle for a map projection. Pass it to the projection - * APIs to translate between map coordinates and latitude/longitudes. + * This is an opaque handle for a map projection. Pass it to the projection + * APIs to translate between map coordinates and latitude/longitudes. * */ typedef void * XPLMMapProjectionID; @@ -101,20 +99,20 @@ typedef void * XPLMMapProjectionID; /* * XPLMMapStyle * - * Indicates the visual style being drawn by the map. In X-Plane, the user can - * choose between a number of map types, and different map types may have use - * a different visual representation for the same elements (for instance, the - * visual style of the terrain layer changes drastically between the VFR and - * IFR layers), or certain layers may be disabled entirely in some map types - * (e.g., localizers are only visible in the IFR low-enroute style). + * Indicates the visual style being drawn by the map. In X-Plane, the user can + * choose between a number of map types, and different map types may have use + * a different visual representation for the same elements (for instance, the + * visual style of the terrain layer changes drastically between the VFR and + * IFR layers), or certain layers may be disabled entirely in some map types + * (e.g., localizers are only visible in the IFR low-enroute style). * */ enum { - xplm_MapStyle_VFR_Sectional = 0, + xplm_MapStyle_VFR_Sectional = 0 - xplm_MapStyle_IFR_LowEnroute = 1, + ,xplm_MapStyle_IFR_LowEnroute = 1 - xplm_MapStyle_IFR_HighEnroute = 2, + ,xplm_MapStyle_IFR_HighEnroute = 2 }; @@ -123,78 +121,78 @@ typedef int XPLMMapStyle; /* * XPLMMapDrawingCallback_f * - * This is the OpenGL map drawing callback for plugin-created map layers. You - * can perform arbitrary OpenGL drawing from this callback, with one - * exception: changes to the Z-buffer are not permitted, and will result in - * map drawing errors. + * This is the OpenGL map drawing callback for plugin-created map layers. You + * can perform arbitrary OpenGL drawing from this callback, with one + * exception: changes to the Z-buffer are not permitted, and will result in + * map drawing errors. * - * All drawing done from within this callback appears beneath all built-in - * X-Plane icons and labels, but above the built-in "fill" layers (layers - * providing major details, like terrain and water). Note, however, that the - * relative ordering between the drawing callbacks of different plugins is not - * guaranteed. + * All drawing done from within this callback appears beneath all built-in + * X-Plane icons and labels, but above the built-in "fill" layers (layers + * providing major details, like terrain and water). Note, however, that the + * relative ordering between the drawing callbacks of different plugins is not + * guaranteed. * */ typedef void (* XPLMMapDrawingCallback_f)( - XPLMMapLayerID inLayer, - const float * inMapBoundsLeftTopRightBottom, - float zoomRatio, - float mapUnitsPerUserInterfaceUnit, - XPLMMapStyle mapStyle, - XPLMMapProjectionID projection, - void * inRefcon); + XPLMMapLayerID inLayer, + const float * inMapBoundsLeftTopRightBottom, + float zoomRatio, + float mapUnitsPerUserInterfaceUnit, + XPLMMapStyle mapStyle, + XPLMMapProjectionID projection, + void * inRefcon); /* * XPLMMapIconDrawingCallback_f * - * This is the icon drawing callback that enables plugin-created map layers to - * draw icons using X-Plane's built-in icon drawing functionality. You can - * request an arbitrary number of PNG icons to be drawn via - * XPLMDrawMapIconFromSheet() from within this callback, but you may not - * perform any OpenGL drawing here. - * - * Icons enqueued by this function will appear above all OpenGL drawing - * (performed by your optional XPLMMapDrawingCallback_f), and above all - * built-in X-Plane map icons of the same layer type ("fill" or "markings," as - * determined by the XPLMMapLayerType in your XPLMCreateMapLayer_t). Note, - * however, that the relative ordering between the drawing callbacks of - * different plugins is not guaranteed. + * This is the icon drawing callback that enables plugin-created map layers to + * draw icons using X-Plane's built-in icon drawing functionality. You can + * request an arbitrary number of PNG icons to be drawn via + * XPLMDrawMapIconFromSheet() from within this callback, but you may not + * perform any OpenGL drawing here. + * + * Icons enqueued by this function will appear above all OpenGL drawing + * (performed by your optional XPLMMapDrawingCallback_f), and above all + * built-in X-Plane map icons of the same layer type ("fill" or "markings," as + * determined by the XPLMMapLayerType in your XPLMCreateMapLayer_t). Note, + * however, that the relative ordering between the drawing callbacks of + * different plugins is not guaranteed. * */ typedef void (* XPLMMapIconDrawingCallback_f)( - XPLMMapLayerID inLayer, - const float * inMapBoundsLeftTopRightBottom, - float zoomRatio, - float mapUnitsPerUserInterfaceUnit, - XPLMMapStyle mapStyle, - XPLMMapProjectionID projection, - void * inRefcon); + XPLMMapLayerID inLayer, + const float * inMapBoundsLeftTopRightBottom, + float zoomRatio, + float mapUnitsPerUserInterfaceUnit, + XPLMMapStyle mapStyle, + XPLMMapProjectionID projection, + void * inRefcon); /* * XPLMMapLabelDrawingCallback_f * - * This is the label drawing callback that enables plugin-created map layers - * to draw text labels using X-Plane's built-in labeling functionality. You - * can request an arbitrary number of text labels to be drawn via - * XPLMDrawMapLabel() from within this callback, but you may not perform any - * OpenGL drawing here. - * - * Labels enqueued by this function will appear above all OpenGL drawing - * (performed by your optional XPLMMapDrawingCallback_f), and above all - * built-in map icons and labels of the same layer type ("fill" or "markings," - * as determined by the XPLMMapLayerType in your XPLMCreateMapLayer_t). Note, - * however, that the relative ordering between the drawing callbacks of - * different plugins is not guaranteed. + * This is the label drawing callback that enables plugin-created map layers + * to draw text labels using X-Plane's built-in labeling functionality. You + * can request an arbitrary number of text labels to be drawn via + * XPLMDrawMapLabel() from within this callback, but you may not perform any + * OpenGL drawing here. + * + * Labels enqueued by this function will appear above all OpenGL drawing + * (performed by your optional XPLMMapDrawingCallback_f), and above all + * built-in map icons and labels of the same layer type ("fill" or "markings," + * as determined by the XPLMMapLayerType in your XPLMCreateMapLayer_t). Note, + * however, that the relative ordering between the drawing callbacks of + * different plugins is not guaranteed. * */ typedef void (* XPLMMapLabelDrawingCallback_f)( - XPLMMapLayerID inLayer, - const float * inMapBoundsLeftTopRightBottom, - float zoomRatio, - float mapUnitsPerUserInterfaceUnit, - XPLMMapStyle mapStyle, - XPLMMapProjectionID projection, - void * inRefcon); + XPLMMapLayerID inLayer, + const float * inMapBoundsLeftTopRightBottom, + float zoomRatio, + float mapUnitsPerUserInterfaceUnit, + XPLMMapStyle mapStyle, + XPLMMapProjectionID projection, + void * inRefcon); #endif /* XPLM300 */ #if defined(XPLM300) @@ -202,10 +200,10 @@ typedef void (* XPLMMapLabelDrawingCallback_f)( * LAYER MANAGEMENT CALLBACKS ***************************************************************************/ /* - * These are various "bookkeeping" callbacks that your map layer can receive - * (if you provide the callback in your XPLMCreateMapLayer_t). They allow you - * to manage the lifecycle of your layer, as well as cache any - * computationally-intensive preparation you might need for drawing. + * These are various "bookkeeping" callbacks that your map layer can receive + * (if you provide the callback in your XPLMCreateMapLayer_t). They allow you + * to manage the lifecycle of your layer, as well as cache any + * computationally-intensive preparation you might need for drawing. * */ @@ -213,42 +211,42 @@ typedef void (* XPLMMapLabelDrawingCallback_f)( /* * XPLMMapPrepareCacheCallback_f * - * A callback used to allow you to cache whatever information your layer needs - * to draw in the current map area. + * A callback used to allow you to cache whatever information your layer needs + * to draw in the current map area. * - * This is called each time the map's total bounds change. This is typically - * triggered by new DSFs being loaded, such that X-Plane discards old, - * now-distant DSFs and pulls in new ones. At that point, the available bounds - * of the map also change to match the new DSF area. + * This is called each time the map's total bounds change. This is typically + * triggered by new DSFs being loaded, such that X-Plane discards old, + * now-distant DSFs and pulls in new ones. At that point, the available bounds + * of the map also change to match the new DSF area. * - * By caching just the information you need to draw in this area, your future - * draw calls can be made faster, since you'll be able to simply "splat" your - * precomputed information each frame. + * By caching just the information you need to draw in this area, your future + * draw calls can be made faster, since you'll be able to simply "splat" your + * precomputed information each frame. * - * We guarantee that the map projection will not change between successive - * prepare cache calls, nor will any draw call give you bounds outside these - * total map bounds. So, if you cache the projected map coordinates of all the - * items you might want to draw in the total map area, you can be guaranteed - * that no draw call will be asked to do any new work. + * We guarantee that the map projection will not change between successive + * prepare cache calls, nor will any draw call give you bounds outside these + * total map bounds. So, if you cache the projected map coordinates of all the + * items you might want to draw in the total map area, you can be guaranteed + * that no draw call will be asked to do any new work. * */ typedef void (* XPLMMapPrepareCacheCallback_f)( - XPLMMapLayerID inLayer, - const float * inTotalMapBoundsLeftTopRightBottom, - XPLMMapProjectionID projection, - void * inRefcon); + XPLMMapLayerID inLayer, + const float * inTotalMapBoundsLeftTopRightBottom, + XPLMMapProjectionID projection, + void * inRefcon); /* * XPLMMapWillBeDeletedCallback_f * - * Called just before your map layer gets deleted. Because SDK-created map - * layers have the same lifetime as the X-Plane map that contains them, if the - * map gets unloaded from memory, your layer will too. + * Called just before your map layer gets deleted. Because SDK-created map + * layers have the same lifetime as the X-Plane map that contains them, if the + * map gets unloaded from memory, your layer will too. * */ typedef void (* XPLMMapWillBeDeletedCallback_f)( - XPLMMapLayerID inLayer, - void * inRefcon); + XPLMMapLayerID inLayer, + void * inRefcon); #endif /* XPLM300 */ #if defined(XPLM300) @@ -256,16 +254,16 @@ typedef void (* XPLMMapWillBeDeletedCallback_f)( * MAP LAYER CREATION AND DESTRUCTION ***************************************************************************/ /* - * Enables the creation of new map layers. Layers are created for a particular - * instance of the X-Plane map. For instance, if you want your layer to appear - * in both the normal map interface and the Instructor Operator Station (IOS), - * you would need two separate calls to XPLMCreateMapLayer(), with two - * different values for your XPLMCreateMapLayer_t::layer_name. - * - * Your layer's lifetime will be determined by the lifetime of the map it is - * created in. If the map is destroyed (on the X-Plane side), your layer will - * be too, and you'll receive a callback to your - * XPLMMapWillBeDeletedCallback_f. + * Enables the creation of new map layers. Layers are created for a particular + * instance of the X-Plane map. For instance, if you want your layer to appear + * in both the normal map interface and the Instructor Operator Station (IOS), + * you would need two separate calls to XPLMCreateMapLayer(), with two + * different values for your XPLMCreateMapLayer_t::layer_name. + * + * Your layer's lifetime will be determined by the lifetime of the map it is + * created in. If the map is destroyed (on the X-Plane side), your layer will + * be too, and you'll receive a callback to your + * XPLMMapWillBeDeletedCallback_f. * */ @@ -273,152 +271,152 @@ typedef void (* XPLMMapWillBeDeletedCallback_f)( /* * XPLMMapLayerType * - * Indicates the type of map layer you are creating. Fill layers will always - * be drawn beneath markings layers. + * Indicates the type of map layer you are creating. Fill layers will always + * be drawn beneath markings layers. * */ enum { - /* A layer that draws "fill" graphics, like weather patterns, terrain, etc. * - * Fill layers frequently cover a large portion of the visible map area. */ - xplm_MapLayer_Fill = 0, + /* A layer that draws "fill" graphics, like weather patterns, terrain, etc. * + * Fill layers frequently cover a large portion of the visible map area. */ + xplm_MapLayer_Fill = 0 - /* A layer that provides markings for particular map features, like NAVAIDs, * - * airports, etc. Even dense markings layers cover a small portion of the * - * total map area. */ - xplm_MapLayer_Markings = 1, + /* A layer that provides markings for particular map features, like NAVAIDs, * + * airports, etc. Even dense markings layers cover a small portion of the * + * total map area. */ + ,xplm_MapLayer_Markings = 1 }; typedef int XPLMMapLayerType; -/* Globally unique identifier for X-Plane's Map window, used as the * - * mapToCreateLayerIn parameter in XPLMCreateMapLayer_t */ +/* Globally unique identifier for X-Plane's Map window, used as the * + * mapToCreateLayerIn parameter in XPLMCreateMapLayer_t */ #define XPLM_MAP_USER_INTERFACE "XPLM_MAP_USER_INTERFACE" -/* Globally unique identifier for X-Plane's Instructor Operator Station * - * window, used as the mapToCreateLayerIn parameter in XPLMCreateMapLayer_t */ +/* Globally unique identifier for X-Plane's Instructor Operator Station * + * window, used as the mapToCreateLayerIn parameter in XPLMCreateMapLayer_t */ #define XPLM_MAP_IOS "XPLM_MAP_IOS" /* * XPLMCreateMapLayer_t * - * This structure defines all of the parameters used to create a map layer - * using XPLMCreateMapLayer. The structure will be expanded in future SDK APIs - * to include more features. Always set the structSize member to the size of - * your struct in bytes! + * This structure defines all of the parameters used to create a map layer + * using XPLMCreateMapLayer. The structure will be expanded in future SDK APIs + * to include more features. Always set the structSize member to the size of + * your struct in bytes! * - * Each layer must be associated with exactly one map instance in X-Plane. - * That map, and that map alone, will call your callbacks. Likewise, when that - * map is deleted, your layer will be as well. + * Each layer must be associated with exactly one map instance in X-Plane. + * That map, and that map alone, will call your callbacks. Likewise, when that + * map is deleted, your layer will be as well. * */ typedef struct { - /* Used to inform XPLMCreateMapLayer() of the SDK version you compiled * - * against; should always be set to sizeof(XPLMCreateMapLayer_t) */ + /* Used to inform XPLMCreateMapLayer() of the SDK version you compiled * + * against; should always be set to sizeof(XPLMCreateMapLayer_t) */ int structSize; - /* Globally unique string identifying the map you want this layer to appear * - * in. As of XPLM300, this is limited to one of XPLM_MAP_USER_INTERFACE or * - * XPLM_MAP_IOS */ + /* Globally unique string identifying the map you want this layer to appear * + * in. As of XPLM300, this is limited to one of XPLM_MAP_USER_INTERFACE or * + * XPLM_MAP_IOS */ const char * mapToCreateLayerIn; - /* The type of layer you are creating, used to determine draw order (all * - * plugin-created markings layers are drawn above all plugin-created fill * - * layers) */ + /* The type of layer you are creating, used to determine draw order (all * + * plugin-created markings layers are drawn above all plugin-created fill * + * layers) */ XPLMMapLayerType layerType; - /* Optional callback to inform you this layer is being deleted (due to its * - * owning map being destroyed) */ + /* Optional callback to inform you this layer is being deleted (due to its * + * owning map being destroyed) */ XPLMMapWillBeDeletedCallback_f willBeDeletedCallback; - /* Optional callback you want to use to prepare your draw cache when the map * - * bounds change (set to NULL if you don't want this callback) */ + /* Optional callback you want to use to prepare your draw cache when the map * + * bounds change (set to NULL if you don't want this callback) */ XPLMMapPrepareCacheCallback_f prepCacheCallback; - /* Optional callback you want to use for arbitrary OpenGL drawing, which goes * - * beneath all icons in the map's layering system (set to NULL if you don't * - * want this callback) */ + /* Optional callback you want to use for arbitrary OpenGL drawing, which goes * + * beneath all icons in the map's layering system (set to NULL if you don't * + * want this callback) */ XPLMMapDrawingCallback_f drawCallback; - /* Optional callback you want to use for drawing icons, which go above all * - * built-in X-Plane icons (except the aircraft) in the map's layering system * - * (set to NULL if you don't want this callback) */ + /* Optional callback you want to use for drawing icons, which go above all * + * built-in X-Plane icons (except the aircraft) in the map's layering system * + * (set to NULL if you don't want this callback) */ XPLMMapIconDrawingCallback_f iconCallback; - /* Optional callback you want to use for drawing map labels, which go above * - * all built-in X-Plane icons and labels (except those of aircraft) in the * - * map's layering system (set to NULL if you don't want this callback) */ + /* Optional callback you want to use for drawing map labels, which go above * + * all built-in X-Plane icons and labels (except those of aircraft) in the * + * map's layering system (set to NULL if you don't want this callback) */ XPLMMapLabelDrawingCallback_f labelCallback; - /* True if you want a checkbox to be created in the map UI to toggle this * - * layer on and off; false if the layer should simply always be enabled */ + /* True if you want a checkbox to be created in the map UI to toggle this * + * layer on and off; false if the layer should simply always be enabled */ int showUiToggle; - /* Short label to use for this layer in the user interface */ + /* Short label to use for this layer in the user interface */ const char * layerName; - /* A reference to arbitrary data that will be passed to your callbacks */ + /* A reference to arbitrary data that will be passed to your callbacks */ void * refcon; } XPLMCreateMapLayer_t; /* * XPLMCreateMapLayer * - * This routine creates a new map layer. You pass in an XPLMCreateMapLayer_t - * structure with all of the fields set in. You must set the structSize of - * the structure to the size of the actual structure you used. + * This routine creates a new map layer. You pass in an XPLMCreateMapLayer_t + * structure with all of the fields set in. You must set the structSize of + * the structure to the size of the actual structure you used. * - * Returns NULL if the layer creation failed. This happens most frequently - * because the map you specified in your - * XPLMCreateMapLayer_t::mapToCreateLayerIn field doesn't exist (that is, if - * XPLMMapExists() returns 0 for the specified map). You can use - * XPLMRegisterMapCreationHook() to get a notification each time a new map is - * opened in X-Plane, at which time you can create layers in it. + * Returns NULL if the layer creation failed. This happens most frequently + * because the map you specified in your + * XPLMCreateMapLayer_t::mapToCreateLayerIn field doesn't exist (that is, if + * XPLMMapExists() returns 0 for the specified map). You can use + * XPLMRegisterMapCreationHook() to get a notification each time a new map is + * opened in X-Plane, at which time you can create layers in it. * */ -XPLM_API XPLMMapLayerID XPLMCreateMapLayer( - XPLMCreateMapLayer_t * inParams); +XPLM_API XPLMMapLayerID XPLMCreateMapLayer( + XPLMCreateMapLayer_t * inParams); /* * XPLMDestroyMapLayer * - * Destroys a map layer you created (calling your - * XPLMMapWillBeDeletedCallback_f if applicable). Returns true if a deletion - * took place. + * Destroys a map layer you created (calling your + * XPLMMapWillBeDeletedCallback_f if applicable). Returns true if a deletion + * took place. * */ -XPLM_API int XPLMDestroyMapLayer( - XPLMMapLayerID inLayer); +XPLM_API int XPLMDestroyMapLayer( + XPLMMapLayerID inLayer); /* * XPLMMapCreatedCallback_f * - * A callback to notify your plugin that a new map has been created in - * X-Plane. This is the best time to add a custom map layer using - * XPLMCreateMapLayer(). + * A callback to notify your plugin that a new map has been created in + * X-Plane. This is the best time to add a custom map layer using + * XPLMCreateMapLayer(). * - * No OpenGL drawing is permitted within this callback. + * No OpenGL drawing is permitted within this callback. * */ typedef void (* XPLMMapCreatedCallback_f)( - const char * mapIdentifier, - void * refcon); + const char * mapIdentifier, + void * refcon); /* * XPLMRegisterMapCreationHook * - * Registers your callback to receive a notification each time a new map is - * constructed in X-Plane. This callback is the best time to add your custom - * map layer using XPLMCreateMapLayer(). + * Registers your callback to receive a notification each time a new map is + * constructed in X-Plane. This callback is the best time to add your custom + * map layer using XPLMCreateMapLayer(). * - * Note that you will not be notified about any maps that already exist---you - * can use XPLMMapExists() to check for maps that were created previously. + * Note that you will not be notified about any maps that already exist---you + * can use XPLMMapExists() to check for maps that were created previously. * */ -XPLM_API void XPLMRegisterMapCreationHook( - XPLMMapCreatedCallback_f callback, - void * refcon); +XPLM_API void XPLMRegisterMapCreationHook( + XPLMMapCreatedCallback_f callback, + void * refcon); /* * XPLMMapExists * - * Returns 1 if the map with the specified identifier already exists in - * X-Plane. In that case, you can safely call XPLMCreateMapLayer() specifying - * that your layer should be added to that map. + * Returns 1 if the map with the specified identifier already exists in + * X-Plane. In that case, you can safely call XPLMCreateMapLayer() specifying + * that your layer should be added to that map. * */ -XPLM_API int XPLMMapExists( - const char * mapIdentifier); +XPLM_API int XPLMMapExists( + const char * mapIdentifier); #endif /* XPLM300 */ #if defined(XPLM300) @@ -426,18 +424,18 @@ XPLM_API int XPLMMapExists( * MAP DRAWING ***************************************************************************/ /* - * These APIs are only valid from within a map drawing callback (one of - * XPLMIconDrawingCallback_t or XPLMMapLabelDrawingCallback_f). Your drawing - * callbacks are registered when you create a new map layer as part of your - * XPLMCreateMapLayer_t. The functions here hook into X-Plane's built-in map - * drawing functionality for icons and labels, so that you get a consistent - * style with the rest of the X-Plane map. - * - * Note that the X-Plane 11 map introduces a strict ordering: layers of type - * xplm_MapLayer_Fill get drawn beneath all xplm_MapLayer_Markings layers. - * Likewise, all OpenGL drawing (performed in your layer's - * XPLMMapDrawingCallback_f) will appear beneath any icons and labels you - * draw. + * These APIs are only valid from within a map drawing callback (one of + * XPLMIconDrawingCallback_t or XPLMMapLabelDrawingCallback_f). Your drawing + * callbacks are registered when you create a new map layer as part of your + * XPLMCreateMapLayer_t. The functions here hook into X-Plane's built-in map + * drawing functionality for icons and labels, so that you get a consistent + * style with the rest of the X-Plane map. + * + * Note that the X-Plane 11 map introduces a strict ordering: layers of type + * xplm_MapLayer_Fill get drawn beneath all xplm_MapLayer_Markings layers. + * Likewise, all OpenGL drawing (performed in your layer's + * XPLMMapDrawingCallback_f) will appear beneath any icons and labels you + * draw. * */ @@ -445,20 +443,20 @@ XPLM_API int XPLMMapExists( /* * XPLMMapOrientation * - * Indicates whether a map element should be match its rotation to the map - * itself, or to the user interface. For instance, the map itself may be - * rotated such that "up" matches the user's aircraft, but you may want to - * draw a text label such that it is always rotated zero degrees relative to - * the user's perspective. In that case, you would have it draw with UI - * orientation. + * Indicates whether a map element should be match its rotation to the map + * itself, or to the user interface. For instance, the map itself may be + * rotated such that "up" matches the user's aircraft, but you may want to + * draw a text label such that it is always rotated zero degrees relative to + * the user's perspective. In that case, you would have it draw with UI + * orientation. * */ enum { - /* Orient such that a 0 degree rotation matches the map's north */ - xplm_MapOrientation_Map = 0, + /* Orient such that a 0 degree rotation matches the map's north */ + xplm_MapOrientation_Map = 0 - /* Orient such that a 0 degree rotation is "up" relative to the user interface*/ - xplm_MapOrientation_UI = 1, + /* Orient such that a 0 degree rotation is "up" relative to the user interface */ + ,xplm_MapOrientation_UI = 1 }; @@ -467,65 +465,65 @@ typedef int XPLMMapOrientation; /* * XPLMDrawMapIconFromSheet * - * Enables plugin-created map layers to draw PNG icons using X-Plane's - * built-in icon drawing functionality. Only valid from within an - * XPLMIconDrawingCallback_t (but you can request an arbitrary number of icons - * to be drawn from within your callback). - * - * X-Plane will automatically manage the memory for your texture so that it - * only has to be loaded from disk once as long as you continue drawing it - * per-frame. (When you stop drawing it, the memory may purged in a "garbage - * collection" pass, require a load from disk in the future.) - * - * Instead of having X-Plane draw a full PNG, this method allows you to use UV - * coordinates to request a portion of the image to be drawn. This allows you - * to use a single texture load (of an icon sheet, for example) to draw many - * icons. Doing so is much more efficient than drawing a dozen different small - * PNGs. - * - * The UV coordinates used here treat the texture you load as being comprised - * of a number of identically sized "cells." You specify the width and height - * in cells (ds and dt, respectively), as well as the coordinates within the - * cell grid for the sub-image you'd like to draw. - * - * Note that you can use different ds and dt values in subsequent calls with - * the same texture sheet. This enables you to use icons of different sizes in - * the same sheet if you arrange them properly in the PNG. - * - * This function is only valid from within an XPLMIconDrawingCallback_t (but - * you can request an arbitrary number of icons to be drawn from within your - * callback). + * Enables plugin-created map layers to draw PNG icons using X-Plane's + * built-in icon drawing functionality. Only valid from within an + * XPLMIconDrawingCallback_t (but you can request an arbitrary number of icons + * to be drawn from within your callback). + * + * X-Plane will automatically manage the memory for your texture so that it + * only has to be loaded from disk once as long as you continue drawing it + * per-frame. (When you stop drawing it, the memory may purged in a "garbage + * collection" pass, require a load from disk in the future.) + * + * Instead of having X-Plane draw a full PNG, this method allows you to use UV + * coordinates to request a portion of the image to be drawn. This allows you + * to use a single texture load (of an icon sheet, for example) to draw many + * icons. Doing so is much more efficient than drawing a dozen different small + * PNGs. + * + * The UV coordinates used here treat the texture you load as being comprised + * of a number of identically sized "cells." You specify the width and height + * in cells (ds and dt, respectively), as well as the coordinates within the + * cell grid for the sub-image you'd like to draw. + * + * Note that you can use different ds and dt values in subsequent calls with + * the same texture sheet. This enables you to use icons of different sizes in + * the same sheet if you arrange them properly in the PNG. + * + * This function is only valid from within an XPLMIconDrawingCallback_t (but + * you can request an arbitrary number of icons to be drawn from within your + * callback). * */ -XPLM_API void XPLMDrawMapIconFromSheet( - XPLMMapLayerID layer, - const char * inPngPath, - int s, - int t, - int ds, - int dt, - float mapX, - float mapY, - XPLMMapOrientation orientation, - float rotationDegrees, - float mapWidth); +XPLM_API void XPLMDrawMapIconFromSheet( + XPLMMapLayerID layer, + const char * inPngPath, + int s, + int t, + int ds, + int dt, + float mapX, + float mapY, + XPLMMapOrientation orientation, + float rotationDegrees, + float mapWidth); /* * XPLMDrawMapLabel * - * Enables plugin-created map layers to draw text labels using X-Plane's - * built-in labeling functionality. Only valid from within an - * XPLMMapLabelDrawingCallback_f (but you can request an arbitrary number of - * text labels to be drawn from within your callback). + * Enables plugin-created map layers to draw text labels using X-Plane's + * built-in labeling functionality. Only valid from within an + * XPLMMapLabelDrawingCallback_f (but you can request an arbitrary number of + * text labels to be drawn from within your callback). * */ -XPLM_API void XPLMDrawMapLabel( - XPLMMapLayerID layer, - const char * inText, - float mapX, - float mapY, - XPLMMapOrientation orientation, - float rotationDegrees); +XPLM_API void XPLMDrawMapLabel( + XPLMMapLayerID layer, + const char * inText, + float mapX, + float mapY, + XPLMMapOrientation orientation, + float rotationDegrees); #endif /* XPLM300 */ #if defined(XPLM300) @@ -533,18 +531,18 @@ XPLM_API void XPLMDrawMapLabel( * MAP PROJECTIONS ***************************************************************************/ /* - * As of X-Plane 11, the map draws using true cartographic projections, and - * different maps may use different projections. Thus, to draw at a particular - * latitude and longitude, you must first transform your real-world - * coordinates into map coordinates. - * - * The map projection is also responsible for giving you the current scale of - * the map. That is, the projection can tell you how many map units correspond - * to 1 meter at a given point. - * - * Finally, the map projection can give you the current rotation of the map. - * Since X-Plane 11 maps can rotate to match the heading of the aircraft, the - * map's rotation can potentially change every frame. + * As of X-Plane 11, the map draws using true cartographic projections, and + * different maps may use different projections. Thus, to draw at a particular + * latitude and longitude, you must first transform your real-world + * coordinates into map coordinates. + * + * The map projection is also responsible for giving you the current scale of + * the map. That is, the projection can tell you how many map units correspond + * to 1 meter at a given point. + * + * Finally, the map projection can give you the current rotation of the map. + * Since X-Plane 11 maps can rotate to match the heading of the aircraft, the + * map's rotation can potentially change every frame. * */ @@ -552,76 +550,76 @@ XPLM_API void XPLMDrawMapLabel( /* * XPLMMapProject * - * Projects a latitude/longitude into map coordinates. This is the inverse of - * XPLMMapUnproject(). + * Projects a latitude/longitude into map coordinates. This is the inverse of + * XPLMMapUnproject(). * - * Only valid from within a map layer callback (one of - * XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, - * XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) + * Only valid from within a map layer callback (one of + * XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, + * XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) * */ -XPLM_API void XPLMMapProject( - XPLMMapProjectionID projection, - double latitude, - double longitude, - float * outX, - float * outY); +XPLM_API void XPLMMapProject( + XPLMMapProjectionID projection, + double latitude, + double longitude, + float * outX, + float * outY); /* * XPLMMapUnproject * - * Transforms map coordinates back into a latitude and longitude. This is the - * inverse of XPLMMapProject(). + * Transforms map coordinates back into a latitude and longitude. This is the + * inverse of XPLMMapProject(). * - * Only valid from within a map layer callback (one of - * XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, - * XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) + * Only valid from within a map layer callback (one of + * XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, + * XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) * */ -XPLM_API void XPLMMapUnproject( - XPLMMapProjectionID projection, - float mapX, - float mapY, - double * outLatitude, - double * outLongitude); +XPLM_API void XPLMMapUnproject( + XPLMMapProjectionID projection, + float mapX, + float mapY, + double * outLatitude, + double * outLongitude); /* * XPLMMapScaleMeter * - * Returns the number of map units that correspond to a distance of one meter - * at a given set of map coordinates. + * Returns the number of map units that correspond to a distance of one meter + * at a given set of map coordinates. * - * Only valid from within a map layer callback (one of - * XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, - * XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) + * Only valid from within a map layer callback (one of + * XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, + * XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) * */ -XPLM_API float XPLMMapScaleMeter( - XPLMMapProjectionID projection, - float mapX, - float mapY); +XPLM_API float XPLMMapScaleMeter( + XPLMMapProjectionID projection, + float mapX, + float mapY); /* * XPLMMapGetNorthHeading * - * Returns the heading (in degrees clockwise from "up") that corresponds to - * north at a given point on the map. In other words, if your runway has a - * true heading of 360, you would use "north" as the Cartesian angle at which - * to draw the runway on the map. (You would add the result of - * XPLMMapGetNorthHeading() to your true heading to get the map angle.) + * Returns the heading (in degrees clockwise from "up") that corresponds to + * north at a given point on the map. In other words, if your runway has a + * true heading of 360, you would use "north" as the Cartesian angle at which + * to draw the runway on the map. (You would add the result of + * XPLMMapGetNorthHeading() to your true heading to get the map angle.) * - * This is necessary becuase X-Plane's map can be rotated to match your - * aircraft's orientation; north is not always "up." + * This is necessary becuase X-Plane's map can be rotated to match your + * aircraft's orientation; north is not always "up." * - * Only valid from within a map layer callback (one of - * XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, - * XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) + * Only valid from within a map layer callback (one of + * XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, + * XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) * */ -XPLM_API float XPLMMapGetNorthHeading( - XPLMMapProjectionID projection, - float mapX, - float mapY); +XPLM_API float XPLMMapGetNorthHeading( + XPLMMapProjectionID projection, + float mapX, + float mapY); #endif /* XPLM300 */ #ifdef __cplusplus diff --git a/src/SDK/CHeaders/XPLM/XPLMMenus.h b/src/SDK/CHeaders/XPLM/XPLMMenus.h index f5802ab8..935abb58 100755 --- a/src/SDK/CHeaders/XPLM/XPLMMenus.h +++ b/src/SDK/CHeaders/XPLM/XPLMMenus.h @@ -2,41 +2,38 @@ #define _XPLMMenus_h_ /* - * 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 * */ -/*************************************************************************** - * XPLMMenus - ***************************************************************************/ /* - * Plug-ins can create menus in the menu bar of X-Plane. This is done by - * creating a menu and then creating items. Menus are referred to by an - * opaque ID. Items are referred to by (zero-based) index number. + * Theory of Operation * - * Menus are "sandboxed" between plugins---no plugin can access the menus of - * any other plugin. Furthermore, all menu indices are relative to your - * plugin's menus only; if your plugin creates two sub-menus in the Plugins - * menu at different times, it doesn't matter how many other plugins also - * create sub-menus of Plugins in the intervening time: your sub-menus will be - * given menu indices 0 and 1. (The SDK does some work in the back-end to - * filter out menus that are irrelevant to your plugin in order to deliver - * this consistency for each plugin.) + * Plug-ins can create menus in the menu bar of X-Plane. This is done by + * creating a menu and then creating items. Menus are referred to by an + * opaque ID. Items are referred to by (zero-based) index number. * - * When you create a menu item, you specify how we should handle clicks on - * that menu item. You can either have the XPLM trigger a callback (the - * XPLMMenuHandler_f associated with the menu that contains the item), or you - * can simply have a command be triggered (with no associated call to your - * menu handler). The advantage of the latter method is that X-Plane will - * display any keyboard shortcuts associated with the command. (In contrast, - * there are no keyboard shortcuts associated with menu handler callbacks with - * specific parameters.) + * Menus are "sandboxed" between plugins---no plugin can access the menus of + * any other plugin. Furthermore, all menu indices are relative to your + * plugin's menus only; if your plugin creates two sub-menus in the Plugins + * menu at different times, it doesn't matter how many other plugins also + * create sub-menus of Plugins in the intervening time: your sub-menus will be + * given menu indices 0 and 1. (The SDK does some work in the back-end to + * filter out menus that are irrelevant to your plugin in order to deliver + * this consistency for each plugin.) * - * Menu text in X-Plane is UTF8; X-Plane's character set covers latin, greek - * and cyrillic characters, Katakana, as well as some Japanese symbols. Some - * APIs have a inDeprecatedAndIgnored parameter that used to select a - * character set; since X-Plane 9 all localization is done via UTF-8 only. + * When you create a menu item, you specify how we should handle clicks on + * that menu item. You can either have the XPLM trigger a callback (the + * XPLMMenuHandler_f associated with the menu that contains the item), or you + * can simply have a command be triggered (with no associated call to your + * menu handler). The advantage of the latter method is that X-Plane will + * display any keyboard shortcuts associated with the command. (In contrast, + * there are no keyboard shortcuts associated with menu handler callbacks with + * specific parameters.) * */ @@ -50,24 +47,28 @@ extern "C" { /*************************************************************************** * XPLM MENUS ***************************************************************************/ +/* + * + * + */ /* * XPLMMenuCheck * - * These enumerations define the various 'check' states for an X-Plane menu. - * 'checking' in X-Plane actually appears as a light which may or may not be - * lit. So there are three possible states. + * These enumerations define the various 'check' states for an X-Plane menu. + * 'checking' in X-Plane actually appears as a light which may or may not be + * lit. So there are three possible states. * */ enum { - /* there is no symbol to the left of the menu item. */ - xplm_Menu_NoCheck = 0, + /* there is no symbol to the left of the menu item. */ + xplm_Menu_NoCheck = 0 - /* the menu has a mark next to it that is unmarked (not lit). */ - xplm_Menu_Unchecked = 1, + /* the menu has a mark next to it that is unmarked (not lit). */ + ,xplm_Menu_Unchecked = 1 - /* the menu has a mark next to it that is checked (lit). */ - xplm_Menu_Checked = 2, + /* the menu has a mark next to it that is checked (lit). */ + ,xplm_Menu_Checked = 2 }; @@ -76,7 +77,7 @@ typedef int XPLMMenuCheck; /* * XPLMMenuID * - * This is a unique ID for each menu you create. + * This is a unique ID for each menu you create. * */ typedef void * XPLMMenuID; @@ -84,203 +85,203 @@ typedef void * XPLMMenuID; /* * XPLMMenuHandler_f * - * A menu handler function takes two reference pointers, one for the menu - * (specified when the menu was created) and one for the item (specified when - * the item was created). + * A menu handler function takes two reference pointers, one for the menu + * (specified when the menu was created) and one for the item (specified when + * the item was created). * */ typedef void (* XPLMMenuHandler_f)( - void * inMenuRef, - void * inItemRef); + void * inMenuRef, + void * inItemRef); /* * XPLMFindPluginsMenu * - * This function returns the ID of the plug-ins menu, which is created for you - * at startup. + * This function returns the ID of the plug-ins menu, which is created for you + * at startup. * */ -XPLM_API XPLMMenuID XPLMFindPluginsMenu(void); +XPLM_API XPLMMenuID XPLMFindPluginsMenu(void); #if defined(XPLM300) /* * XPLMFindAircraftMenu * - * This function returns the ID of the menu for the currently-loaded aircraft, - * used for showing aircraft-specific commands. + * This function returns the ID of the menu for the currently-loaded aircraft, + * used for showing aircraft-specific commands. * - * The aircraft menu is created by X-Plane at startup, but it remains hidden - * until it is populated via XPLMAppendMenuItem() or - * XPLMAppendMenuItemWithCommand(). + * The aircraft menu is created by X-Plane at startup, but it remains hidden + * until it is populated via XPLMAppendMenuItem() or + * XPLMAppendMenuItemWithCommand(). * - * Only plugins loaded with the user's current aircraft are allowed to access - * the aircraft menu. For all other plugins, this will return NULL, and any - * attempts to add menu items to it will fail. + * Only plugins loaded with the user's current aircraft are allowed to access + * the aircraft menu. For all other plugins, this will return NULL, and any + * attempts to add menu items to it will fail. * */ -XPLM_API XPLMMenuID XPLMFindAircraftMenu(void); +XPLM_API XPLMMenuID XPLMFindAircraftMenu(void); #endif /* XPLM300 */ /* * XPLMCreateMenu * - * This function creates a new menu and returns its ID. It returns NULL if - * the menu cannot be created. Pass in a parent menu ID and an item index to - * create a submenu, or NULL for the parent menu to put the menu in the menu - * bar. The menu's name is only used if the menu is in the menubar. You also - * pass a handler function and a menu reference value. Pass NULL for the - * handler if you do not need callbacks from the menu (for example, if it only - * contains submenus). + * This function creates a new menu and returns its ID. It returns NULL if + * the menu cannot be created. Pass in a parent menu ID and an item index to + * create a submenu, or NULL for the parent menu to put the menu in the menu + * bar. The menu's name is only used if the menu is in the menubar. You also + * pass a handler function and a menu reference value. Pass NULL for the + * handler if you do not need callbacks from the menu (for example, if it only + * contains submenus). * - * Important: you must pass a valid, non-empty menu title even if the menu is - * a submenu where the title is not visible. + * Important: you must pass a valid, non-empty menu title even if the menu is + * a submenu where the title is not visible. * */ -XPLM_API XPLMMenuID XPLMCreateMenu( - const char * inName, - XPLMMenuID inParentMenu, - int inParentItem, - XPLMMenuHandler_f inHandler, - void * inMenuRef); +XPLM_API XPLMMenuID XPLMCreateMenu( + const char * inName, + XPLMMenuID inParentMenu, + int inParentItem, + XPLMMenuHandler_f inHandler, + void * inMenuRef); /* * XPLMDestroyMenu * - * This function destroys a menu that you have created. Use this to remove a - * submenu if necessary. (Normally this function will not be necessary.) + * This function destroys a menu that you have created. Use this to remove a + * submenu if necessary. (Normally this function will not be necessary.) * */ -XPLM_API void XPLMDestroyMenu( - XPLMMenuID inMenuID); +XPLM_API void XPLMDestroyMenu( + XPLMMenuID inMenuID); /* * XPLMClearAllMenuItems * - * This function removes all menu items from a menu, allowing you to rebuild - * it. Use this function if you need to change the number of items on a menu. + * This function removes all menu items from a menu, allowing you to rebuild + * it. Use this function if you need to change the number of items on a menu. * */ -XPLM_API void XPLMClearAllMenuItems( - XPLMMenuID inMenuID); +XPLM_API void XPLMClearAllMenuItems( + XPLMMenuID inMenuID); /* * XPLMAppendMenuItem * - * This routine appends a new menu item to the bottom of a menu and returns - * its index. Pass in the menu to add the item to, the items name, and a void - * * ref for this item. + * This routine appends a new menu item to the bottom of a menu and returns + * its index. Pass in the menu to add the item to, the items name, and a void + * * ref for this item. * - * Returns a negative index if the append failed (due to an invalid parent - * menu argument). + * Returns a negative index if the append failed (due to an invalid parent + * menu argument). * - * Note that all menu indices returned are relative to your plugin's menus - * only; if your plugin creates two sub-menus in the Plugins menu at different - * times, it doesn't matter how many other plugins also create sub-menus of - * Plugins in the intervening time: your sub-menus will be given menu indices - * 0 and 1. (The SDK does some work in the back-end to filter out menus that - * are irrelevant to your plugin in order to deliver this consistency for each - * plugin.) + * Note that all menu indices returned are relative to your plugin's menus + * only; if your plugin creates two sub-menus in the Plugins menu at different + * times, it doesn't matter how many other plugins also create sub-menus of + * Plugins in the intervening time: your sub-menus will be given menu indices + * 0 and 1. (The SDK does some work in the back-end to filter out menus that + * are irrelevant to your plugin in order to deliver this consistency for each + * plugin.) * */ -XPLM_API int XPLMAppendMenuItem( - XPLMMenuID inMenu, - const char * inItemName, - void * inItemRef, - int inDeprecatedAndIgnored); +XPLM_API int XPLMAppendMenuItem( + XPLMMenuID inMenu, + const char * inItemName, + void * inItemRef, + int inDeprecatedAndIgnored); #if defined(XPLM300) /* * XPLMAppendMenuItemWithCommand * - * Like XPLMAppendMenuItem(), but instead of the new menu item triggering the - * XPLMMenuHandler_f of the containiner menu, it will simply execute the - * command you pass in. Using a command for your menu item allows the user to - * bind a keyboard shortcut to the command and see that shortcut represented - * in the menu. + * Like XPLMAppendMenuItem(), but instead of the new menu item triggering the + * XPLMMenuHandler_f of the containiner menu, it will simply execute the + * command you pass in. Using a command for your menu item allows the user to + * bind a keyboard shortcut to the command and see that shortcut represented + * in the menu. * - * Returns a negative index if the append failed (due to an invalid parent - * menu argument). + * Returns a negative index if the append failed (due to an invalid parent + * menu argument). * - * Like XPLMAppendMenuItem(), all menu indices are relative to your plugin's - * menus only. + * Like XPLMAppendMenuItem(), all menu indices are relative to your plugin's + * menus only. * */ -XPLM_API int XPLMAppendMenuItemWithCommand( - XPLMMenuID inMenu, - const char * inItemName, - XPLMCommandRef inCommandToExecute); +XPLM_API int XPLMAppendMenuItemWithCommand( + XPLMMenuID inMenu, + const char * inItemName, + XPLMCommandRef inCommandToExecute); #endif /* XPLM300 */ /* * XPLMAppendMenuSeparator * - * This routine adds a separator to the end of a menu. + * This routine adds a separator to the end of a menu. * - * Returns a negative index if the append failed (due to an invalid parent - * menu argument). + * Returns a negative index if the append failed (due to an invalid parent + * menu argument). * */ -XPLM_API void XPLMAppendMenuSeparator( - XPLMMenuID inMenu); +XPLM_API void XPLMAppendMenuSeparator( + XPLMMenuID inMenu); /* * XPLMSetMenuItemName * - * This routine changes the name of an existing menu item. Pass in the menu - * ID and the index of the menu item. + * This routine changes the name of an existing menu item. Pass in the menu + * ID and the index of the menu item. * */ -XPLM_API void XPLMSetMenuItemName( - XPLMMenuID inMenu, - int inIndex, - const char * inItemName, - int inDeprecatedAndIgnored); +XPLM_API void XPLMSetMenuItemName( + XPLMMenuID inMenu, + int inIndex, + const char * inItemName, + int inForceEnglish); /* * XPLMCheckMenuItem * - * Set whether a menu item is checked. Pass in the menu ID and item index. + * Set whether a menu item is checked. Pass in the menu ID and item index. * */ -XPLM_API void XPLMCheckMenuItem( - XPLMMenuID inMenu, - int index, - XPLMMenuCheck inCheck); +XPLM_API void XPLMCheckMenuItem( + XPLMMenuID inMenu, + int index, + XPLMMenuCheck inCheck); /* * XPLMCheckMenuItemState * - * This routine returns whether a menu item is checked or not. A menu item's - * check mark may be on or off, or a menu may not have an icon at all. + * This routine returns whether a menu item is checked or not. A menu item's + * check mark may be on or off, or a menu may not have an icon at all. * */ -XPLM_API void XPLMCheckMenuItemState( - XPLMMenuID inMenu, - int index, - XPLMMenuCheck * outCheck); +XPLM_API void XPLMCheckMenuItemState( + XPLMMenuID inMenu, + int index, + XPLMMenuCheck * outCheck); /* * XPLMEnableMenuItem * - * Sets whether this menu item is enabled. Items start out enabled. + * Sets whether this menu item is enabled. Items start out enabled. * */ -XPLM_API void XPLMEnableMenuItem( - XPLMMenuID inMenu, - int index, - int enabled); +XPLM_API void XPLMEnableMenuItem( + XPLMMenuID inMenu, + int index, + int enabled); #if defined(XPLM210) /* * XPLMRemoveMenuItem * - * Removes one item from a menu. Note that all menu items below are moved up - * one; your plugin must track the change in index numbers. + * Removes one item from a menu. Note that all menu items below are moved up + * one; your plugin must track the change in index numbers. * */ -XPLM_API void XPLMRemoveMenuItem( - XPLMMenuID inMenu, - int inIndex); +XPLM_API void XPLMRemoveMenuItem( + XPLMMenuID inMenu, + int inIndex); #endif /* XPLM210 */ #ifdef __cplusplus diff --git a/src/SDK/CHeaders/XPLM/XPLMNavigation.h b/src/SDK/CHeaders/XPLM/XPLMNavigation.h index 716caf04..90af7972 100755 --- a/src/SDK/CHeaders/XPLM/XPLMNavigation.h +++ b/src/SDK/CHeaders/XPLM/XPLMNavigation.h @@ -2,23 +2,25 @@ #define _XPLMNavigation_h_ /* - * 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 * */ -/*************************************************************************** - * XPLMNavigation - ***************************************************************************/ /* - * The XPLM Navigation APIs give you some access to the navigation databases - * inside X-Plane. X-Plane stores all navigation information in RAM, so by - * using these APIs you can gain access to most information without having to - * go to disk or parse the files yourself. - * - * You can also use this API to program the FMS. You must use the navigation - * APIs to find the nav-aids you want to program into the FMS, since the FMS - * is powered internally by X-Plane's navigation database. + * XPLMNavigation - THEORY OF OPERATION + * + * The XPLM Navigation APIs give you some access to the navigation databases + * inside X-Plane. X-Plane stores all navigation information in RAM, so by + * using these APIs you can gain access to most information without having to + * go to disk or parse the files yourself. + * + * You can also use this API to program the FMS. You must use the navigation + * APIs to find the nav-aids you want to program into the FMS, since the FMS + * is powered internally by X-Plane's navigation database. * */ @@ -31,46 +33,50 @@ extern "C" { /*************************************************************************** * NAVIGATION DATABASE ACCESS ***************************************************************************/ +/* + * + * + */ /* * XPLMNavType * - * These enumerations define the different types of navaids. They are each - * defined with a separate bit so that they may be bit-wise added together to - * form sets of nav-aid types. + * These enumerations define the different types of navaids. They are each + * defined with a separate bit so that they may be bit-wise added together to + * form sets of nav-aid types. * - * NOTE: xplm_Nav_LatLon is a specific lat-lon coordinate entered into the - * FMS. It will not exist in the database, and cannot be programmed into the - * FMS. Querying the FMS for navaids will return it. Use - * XPLMSetFMSEntryLatLon to set a lat/lon waypoint. + * NOTE: xplm_Nav_LatLon is a specific lat-lon coordinate entered into the + * FMS. It will not exist in the database, and cannot be programmed into the + * FMS. Querying the FMS for navaids will return it. Use + * XPLMSetFMSEntryLatLon to set a lat/lon waypoint. * */ enum { - xplm_Nav_Unknown = 0, + xplm_Nav_Unknown = 0 - xplm_Nav_Airport = 1, + ,xplm_Nav_Airport = 1 - xplm_Nav_NDB = 2, + ,xplm_Nav_NDB = 2 - xplm_Nav_VOR = 4, + ,xplm_Nav_VOR = 4 - xplm_Nav_ILS = 8, + ,xplm_Nav_ILS = 8 - xplm_Nav_Localizer = 16, + ,xplm_Nav_Localizer = 16 - xplm_Nav_GlideSlope = 32, + ,xplm_Nav_GlideSlope = 32 - xplm_Nav_OuterMarker = 64, + ,xplm_Nav_OuterMarker = 64 - xplm_Nav_MiddleMarker = 128, + ,xplm_Nav_MiddleMarker = 128 - xplm_Nav_InnerMarker = 256, + ,xplm_Nav_InnerMarker = 256 - xplm_Nav_Fix = 512, + ,xplm_Nav_Fix = 512 - xplm_Nav_DME = 1024, + ,xplm_Nav_DME = 1024 - xplm_Nav_LatLon = 2048, + ,xplm_Nav_LatLon = 2048 }; @@ -79,15 +85,15 @@ typedef int XPLMNavType; /* * XPLMNavRef * - * XPLMNavRef is an iterator into the navigation database. The navigation - * database is essentially an array, but it is not necessarily densely - * populated. The only assumption you can safely make is that like-typed - * nav-aids are grouped together. + * XPLMNavRef is an iterator into the navigation database. The navigation + * database is essentially an array, but it is not necessarily densely + * populated. The only assumption you can safely make is that like-typed + * nav-aids are grouped together. * - * Use XPLMNavRef to refer to a nav-aid. + * Use XPLMNavRef to refer to a nav-aid. * - * XPLM_NAV_NOT_FOUND is returned by functions that return an XPLMNavRef when - * the iterator must be invalid. + * XPLM_NAV_NOT_FOUND is returned by functions that return an XPLMNavRef when + * the iterator must be invalid. * */ typedef int XPLMNavRef; @@ -97,126 +103,138 @@ typedef int XPLMNavRef; /* * XPLMGetFirstNavAid * - * This returns the very first navaid in the database. Use this to traverse - * the entire database. Returns XPLM_NAV_NOT_FOUND if the nav database is - * empty. + * This returns the very first navaid in the database. Use this to traverse + * the entire database. Returns XPLM_NAV_NOT_FOUND if the nav database is + * empty. * */ -XPLM_API XPLMNavRef XPLMGetFirstNavAid(void); +XPLM_API XPLMNavRef XPLMGetFirstNavAid(void); /* * XPLMGetNextNavAid * - * Given a valid nav aid ref, this routine returns the next navaid. It - * returns XPLM_NAV_NOT_FOUND if the nav aid passed in was invalid or if the - * navaid passed in was the last one in the database. Use this routine to - * iterate across all like-typed navaids or the entire database. + * Given a nav aid ref, this routine returns the next navaid. It returns + * XPLM_NAV_NOT_FOUND if the nav aid passed in was invalid or if the navaid + * passed in was the last one in the database. Use this routine to iterate + * across all like-typed navaids or the entire database. + * + * WARNING: due to a bug in the SDK, when fix loading is disabled in the + * rendering settings screen, calling this routine with the last airport + * returns a bogus nav aid. Using this nav aid can crash X-Plane. * */ -XPLM_API XPLMNavRef XPLMGetNextNavAid( - XPLMNavRef inNavAidRef); +XPLM_API XPLMNavRef XPLMGetNextNavAid( + XPLMNavRef inNavAidRef); /* * XPLMFindFirstNavAidOfType * - * This routine returns the ref of the first navaid of the given type in the - * database or XPLM_NAV_NOT_FOUND if there are no navaids of that type in the - * database. You must pass exactly one nav aid type to this routine. + * This routine returns the ref of the first navaid of the given type in the + * database or XPLM_NAV_NOT_FOUND if there are no navaids of that type in the + * database. You must pass exactly one nav aid type to this routine. + * + * WARNING: due to a bug in the SDK, when fix loading is disabled in the + * rendering settings screen, calling this routine with fixes returns a bogus + * nav aid. Using this nav aid can crash X-Plane. * */ -XPLM_API XPLMNavRef XPLMFindFirstNavAidOfType( - XPLMNavType inType); +XPLM_API XPLMNavRef XPLMFindFirstNavAidOfType( + XPLMNavType inType); /* * XPLMFindLastNavAidOfType * - * This routine returns the ref of the last navaid of the given type in the - * database or XPLM_NAV_NOT_FOUND if there are no navaids of that type in the - * database. You must pass exactly one nav aid type to this routine. + * This routine returns the ref of the last navaid of the given type in the + * database or XPLM_NAV_NOT_FOUND if there are no navaids of that type in the + * database. You must pass exactly one nav aid type to this routine. + * + * WARNING: due to a bug in the SDK, when fix loading is disabled in the + * rendering settings screen, calling this routine with fixes returns a bogus + * nav aid. Using this nav aid can crash X-Plane. * */ -XPLM_API XPLMNavRef XPLMFindLastNavAidOfType( - XPLMNavType inType); +XPLM_API XPLMNavRef XPLMFindLastNavAidOfType( + XPLMNavType inType); /* * XPLMFindNavAid * - * This routine provides a number of searching capabilities for the nav - * database. XPLMFindNavAid will search through every nav aid whose type is - * within inType (multiple types may be added together) and return any - * nav-aids found based on the following rules: + * This routine provides a number of searching capabilities for the nav + * database. XPLMFindNavAid will search through every nav aid whose type is + * within inType (multiple types may be added together) and return any + * nav-aids found based on the following rules: + * + * If inLat and inLon are not NULL, the navaid nearest to that lat/lon will be + * returned, otherwise the last navaid found will be returned. * - * * If inLat and inLon are not NULL, the navaid nearest to that lat/lon will - * be returned, otherwise the last navaid found will be returned. + * If inFrequency is not NULL, then any navaids considered must match this + * frequency. Note that this will screen out radio beacons that do not have + * frequency data published (like inner markers) but not fixes and airports. * - * * If inFrequency is not NULL, then any navaids considered must match this - * frequency. Note that this will screen out radio beacons that do not have - * frequency data published (like inner markers) but not fixes and airports. + * If inNameFragment is not NULL, only navaids that contain the fragment in + * their name will be returned. * - * * If inNameFragment is not NULL, only navaids that contain the fragment in - * their name will be returned. + * If inIDFragment is not NULL, only navaids that contain the fragment in + * their IDs will be returned. * - * * If inIDFragment is not NULL, only navaids that contain the fragment in - * their IDs will be returned. + * This routine provides a simple way to do a number of useful searches: * - * This routine provides a simple way to do a number of useful searches: - * * Find the nearest navaid on this frequency. - * * Find the nearest airport. - * * Find the VOR whose ID is "KBOS". - * * Find the nearest airport whose name contains "Chicago". + * Find the nearest navaid on this frequency. Find the nearest airport. Find + * the VOR whose ID is "KBOS". Find the nearest airport whose name contains + * "Chicago". * */ -XPLM_API XPLMNavRef XPLMFindNavAid( - const char * inNameFragment, /* Can be NULL */ - const char * inIDFragment, /* Can be NULL */ - float * inLat, /* Can be NULL */ - float * inLon, /* Can be NULL */ - int * inFrequency, /* Can be NULL */ - XPLMNavType inType); +XPLM_API XPLMNavRef XPLMFindNavAid( + const char * inNameFragment, /* Can be NULL */ + const char * inIDFragment, /* Can be NULL */ + float * inLat, /* Can be NULL */ + float * inLon, /* Can be NULL */ + int * inFrequency, /* Can be NULL */ + XPLMNavType inType); /* * XPLMGetNavAidInfo * - * This routine returns information about a navaid. Any non-null field is - * filled out with information if it is available. + * This routine returns information about a navaid. Any non-null field is + * filled out with information if it is available. * - * Frequencies are in the nav.dat convention as described in the X-Plane nav - * database FAQ: NDB frequencies are exact, all others are multiplied by 100. + * Frequencies are in the nav.dat convention as described in the X-Plane nav + * database FAQ: NDB frequencies are exact, all others are multiplied by 100. * - * The buffer for IDs should be at least 6 chars and the buffer for names - * should be at least 41 chars, but since these values are likely to go up, I - * recommend passing at least 32 chars for IDs and 256 chars for names when - * possible. + * The buffer for IDs should be at least 6 chars and the buffer for names + * should be at least 41 chars, but since these values are likely to go up, I + * recommend passing at least 32 chars for IDs and 256 chars for names when + * possible. * - * The outReg parameter tells if the navaid is within the local "region" of - * loaded DSFs. (This information may not be particularly useful to plugins.) - * The parameter is a single byte value 1 for true or 0 for false, not a C - * string. + * The outReg parameter tells if the navaid is within the local "region" of + * loaded DSFs. (This information may not be particularly useful to plugins.) + * The parameter is a single byte value 1 for true or 0 for false, not a C + * string. * */ -XPLM_API void XPLMGetNavAidInfo( - XPLMNavRef inRef, - XPLMNavType * outType, /* Can be NULL */ - float * outLatitude, /* Can be NULL */ - float * outLongitude, /* Can be NULL */ - float * outHeight, /* Can be NULL */ - int * outFrequency, /* Can be NULL */ - float * outHeading, /* Can be NULL */ - char * outID, /* Can be NULL */ - char * outName, /* Can be NULL */ - char * outReg); /* Can be NULL */ +XPLM_API void XPLMGetNavAidInfo( + XPLMNavRef inRef, + XPLMNavType * outType, /* Can be NULL */ + float * outLatitude, /* Can be NULL */ + float * outLongitude, /* Can be NULL */ + float * outHeight, /* Can be NULL */ + int * outFrequency, /* Can be NULL */ + float * outHeading, /* Can be NULL */ + char * outID, /* Can be NULL */ + char * outName, /* Can be NULL */ + char * outReg); /* Can be NULL */ /*************************************************************************** * FLIGHT MANAGEMENT COMPUTER ***************************************************************************/ /* - * Note: the FMS works based on an array of entries. Indices into the array - * are zero-based. Each entry is a nav-aid plus an altitude. The FMS tracks - * the currently displayed entry and the entry that it is flying to. + * Note: the FMS works based on an array of entries. Indices into the array + * are zero-based. Each entry is a nav-aid plus an altitude. The FMS tracks + * the currently displayed entry and the entry that it is flying to. * - * The FMS must be programmed with contiguous entries, so clearing an entry at - * the end shortens the effective flight plan. There is a max of 100 - * waypoints in the flight plan. + * The FMS must be programmed with contiguous entries, so clearing an entry at + * the end shortens the effective flight plan. There is a max of 100 + * waypoints in the flight plan. * */ @@ -224,136 +242,127 @@ XPLM_API void XPLMGetNavAidInfo( /* * XPLMCountFMSEntries * - * This routine returns the number of entries in the FMS. + * This routine returns the number of entries in the FMS. * */ -XPLM_API int XPLMCountFMSEntries(void); +XPLM_API int XPLMCountFMSEntries(void); /* * XPLMGetDisplayedFMSEntry * - * This routine returns the index of the entry the pilot is viewing. + * This routine returns the index of the entry the pilot is viewing. * */ -XPLM_API int XPLMGetDisplayedFMSEntry(void); +XPLM_API int XPLMGetDisplayedFMSEntry(void); /* * XPLMGetDestinationFMSEntry * - * This routine returns the index of the entry the FMS is flying to. + * This routine returns the index of the entry the FMS is flying to. * */ -XPLM_API int XPLMGetDestinationFMSEntry(void); +XPLM_API int XPLMGetDestinationFMSEntry(void); /* * XPLMSetDisplayedFMSEntry * - * This routine changes which entry the FMS is showing to the index specified. - * + * This routine changes which entry the FMS is showing to the index specified. + * * */ -XPLM_API void XPLMSetDisplayedFMSEntry( - int inIndex); +XPLM_API void XPLMSetDisplayedFMSEntry( + int inIndex); /* * XPLMSetDestinationFMSEntry * - * This routine changes which entry the FMS is flying the aircraft toward. + * This routine changes which entry the FMS is flying the aircraft toward. * */ -XPLM_API void XPLMSetDestinationFMSEntry( - int inIndex); +XPLM_API void XPLMSetDestinationFMSEntry( + int inIndex); /* * XPLMGetFMSEntryInfo * - * This routine returns information about a given FMS entry. If the entry is - * an airport or navaid, a reference to a nav entry can be returned allowing - * you to find additional information (such as a frequency, ILS heading, name, - * etc.). Note that this reference can be XPLM_NAV_NOT_FOUND until the - * information has been looked up asynchronously, so after flightplan changes, - * it might take up to a second for this field to become populated. The other - * information is available immediately. For a lat/lon entry, the lat/lon is - * returned by this routine but the navaid cannot be looked up (and the - * reference will be XPLM_NAV_NOT_FOUND). FMS name entry buffers should be at - * least 256 chars in length. - * - * WARNING: Due to a bug in X-Plane prior to 11.31, the navaid reference will - * not be set to XPLM_NAV_NOT_FOUND while no data is available, and instead - * just remain the value of the variable that you passed the pointer to. - * Therefore, always initialize the variable to XPLM_NAV_NOT_FOUND before - * passing the pointer to this function. + * This routine returns information about a given FMS entry. A reference to a + * navaid can be returned allowing you to find additional information (such as + * a frequency, ILS heading, name, etc.). Some information is available + * immediately. For a lat/lon entry, the lat/lon is returned by this routine + * but the navaid cannot be looked up (and the reference will be + * XPLM_NAV_NOT_FOUND. FMS name entry buffers should be at least 256 chars in + * length. * */ -XPLM_API void XPLMGetFMSEntryInfo( - int inIndex, - XPLMNavType * outType, /* Can be NULL */ - char * outID, /* Can be NULL */ - XPLMNavRef * outRef, /* Can be NULL */ - int * outAltitude, /* Can be NULL */ - float * outLat, /* Can be NULL */ - float * outLon); /* Can be NULL */ +XPLM_API void XPLMGetFMSEntryInfo( + int inIndex, + XPLMNavType * outType, /* Can be NULL */ + char * outID, /* Can be NULL */ + XPLMNavRef * outRef, /* Can be NULL */ + int * outAltitude, /* Can be NULL */ + float * outLat, /* Can be NULL */ + float * outLon); /* Can be NULL */ /* * XPLMSetFMSEntryInfo * - * This routine changes an entry in the FMS to have the destination navaid - * passed in and the altitude specified. Use this only for airports, fixes, - * and radio-beacon navaids. Currently of radio beacons, the FMS can only - * support VORs and NDBs. Use the routines below to clear or fly to a lat/lon. + * This routine changes an entry in the FMS to have the destination navaid + * passed in and the altitude specified. Use this only for airports, fixes, + * and radio-beacon navaids. Currently of radio beacons, the FMS can only + * support VORs and NDBs. Use the routines below to clear or fly to a lat/lon. * */ -XPLM_API void XPLMSetFMSEntryInfo( - int inIndex, - XPLMNavRef inRef, - int inAltitude); +XPLM_API void XPLMSetFMSEntryInfo( + int inIndex, + XPLMNavRef inRef, + int inAltitude); /* * XPLMSetFMSEntryLatLon * - * This routine changes the entry in the FMS to a lat/lon entry with the given - * coordinates. + * This routine changes the entry in the FMS to a lat/lon entry with the given + * coordinates. * */ -XPLM_API void XPLMSetFMSEntryLatLon( - int inIndex, - float inLat, - float inLon, - int inAltitude); +XPLM_API void XPLMSetFMSEntryLatLon( + int inIndex, + float inLat, + float inLon, + int inAltitude); /* * XPLMClearFMSEntry * - * This routine clears the given entry, potentially shortening the flight - * plan. + * This routine clears the given entry, potentially shortening the flight + * plan. * */ -XPLM_API void XPLMClearFMSEntry( - int inIndex); +XPLM_API void XPLMClearFMSEntry( + int inIndex); /*************************************************************************** * GPS RECEIVER ***************************************************************************/ /* - * These APIs let you read data from the GPS unit. + * These APIs let you read data from the GPS unit. * */ /* * XPLMGetGPSDestinationType * - * This routine returns the type of the currently selected GPS destination, - * one of fix, airport, VOR or NDB. + * This routine returns the type of the currently selected GPS destination, + * one of fix, airport, VOR or NDB. * */ -XPLM_API XPLMNavType XPLMGetGPSDestinationType(void); +XPLM_API XPLMNavType XPLMGetGPSDestinationType(void); /* * XPLMGetGPSDestination * - * This routine returns the current GPS destination. + * This routine returns the current GPS destination. * */ -XPLM_API XPLMNavRef XPLMGetGPSDestination(void); +XPLM_API XPLMNavRef XPLMGetGPSDestination(void); #ifdef __cplusplus } diff --git a/src/SDK/CHeaders/XPLM/XPLMPlanes.h b/src/SDK/CHeaders/XPLM/XPLMPlanes.h index 486302db..26879082 100755 --- a/src/SDK/CHeaders/XPLM/XPLMPlanes.h +++ b/src/SDK/CHeaders/XPLM/XPLMPlanes.h @@ -2,21 +2,17 @@ #define _XPLMPlanes_h_ /* - * 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 * */ -/*************************************************************************** - * XPLMPlanes - ***************************************************************************/ /* - * The XPLMPlanes APIs allow you to control the various aircraft in X-Plane, - * both the user's and the sim's. - * - * *Note*: unlike almost all other APIs in the SDK, aircraft paths are _full_ - * file system paths for historical reasons. You'll need to prefix all - * relative paths with the X-Plane path as accessed via XPLMGetSystemPath. + * The XPLMPlanes APIs allow you to control the various aircraft in X-Plane, + * both the user's and the sim's. * */ @@ -29,128 +25,134 @@ extern "C" { /*************************************************************************** * USER AIRCRAFT ACCESS ***************************************************************************/ +/* + * + * + */ /* * XPLMSetUsersAircraft * - * This routine changes the user's aircraft. Note that this will reinitialize - * the user to be on the nearest airport's first runway. Pass in a full path - * (hard drive and everything including the .acf extension) to the .acf file. + * This routine changes the user's aircraft. Note that this will reinitialize + * the user to be on the nearest airport's first runway. Pass in a full path + * (hard drive and everything including the .acf extension) to the .acf file. * */ -XPLM_API void XPLMSetUsersAircraft( - const char * inAircraftPath); +XPLM_API void XPLMSetUsersAircraft( + const char * inAircraftPath); /* * XPLMPlaceUserAtAirport * - * This routine places the user at a given airport. Specify the airport by - * its X-Plane airport ID (e.g. 'KBOS'). + * This routine places the user at a given airport. Specify the airport by + * its ICAO code (e.g. 'KBOS'). * */ -XPLM_API void XPLMPlaceUserAtAirport( - const char * inAirportCode); +XPLM_API void XPLMPlaceUserAtAirport( + const char * inAirportCode); #if defined(XPLM300) /* * XPLMPlaceUserAtLocation * - * Places the user at a specific location after performing any necessary - * scenery loads. + * Places the user at a specific location after performing any necessary + * scenery loads. * - * As with in-air starts initiated from the X-Plane user interface, the - * aircraft will always start with its engines running, regardless of the - * user's preferences (i.e., regardless of what the dataref - * `sim/operation/prefs/startup_running` says). + * As with in-air starts initiated from the X-Plane user interface, the + * aircraft will always start with its engines running, regardless of the + * user's preferences (i.e., regardless of what the dataref + * sim/operation/prefs/startup_running says). * */ -XPLM_API void XPLMPlaceUserAtLocation( - double latitudeDegrees, - double longitudeDegrees, - float elevationMetersMSL, - float headingDegreesTrue, - float speedMetersPerSecond); +XPLM_API void XPLMPlaceUserAtLocation( + double latitudeDegrees, + double longitudeDegrees, + float elevationMetersMSL, + float headingDegreesTrue, + float speedMetersPerSecond); #endif /* XPLM300 */ /*************************************************************************** * GLOBAL AIRCRAFT ACCESS ***************************************************************************/ +/* + * + * + */ -/* The user's aircraft is always index 0. */ +/* The user's aircraft is always index 0. */ #define XPLM_USER_AIRCRAFT 0 -#if defined(XPLM_DEPRECATED) /* * XPLMPlaneDrawState_t * - * This structure contains additional plane parameter info to be passed to - * draw plane. Make sure to fill in the size of the structure field with - * sizeof(XPLMDrawPlaneState_t) so that the XPLM can tell how many fields you - * knew about when compiling your plugin (since more fields may be added - * later). + * This structure contains additional plane parameter info to be passed to + * draw plane. Make sure to fill in the size of the structure field with + * sizeof(XPLMDrawPlaneState_t) so that the XPLM can tell how many fields you + * knew about when compiling your plugin (since more fields may be added + * later). * - * Most of these fields are ratios from 0 to 1 for control input. X-Plane - * calculates what the actual controls look like based on the .acf file for - * that airplane. Note for the yoke inputs, this is what the pilot of the - * plane has commanded (post artificial stability system if there were one) - * and affects aelerons, rudder, etc. It is not necessarily related to the - * actual position of the plane! + * Most of these fields are ratios from 0 to 1 for control input. X-Plane + * calculates what the actual controls look like based on the .acf file for + * that airplane. Note for the yoke inputs, this is what the pilot of the + * plane has commanded (post artificial stability system if there were one) + * and affects aelerons, rudder, etc. It is not necessarily related to the + * actual position of the plane! * */ typedef struct { - /* The size of the draw state struct. */ + /* The size of the draw state struct. */ int structSize; - /* A ratio from [0..1] describing how far the landing gear is extended. */ + /* A ratio from [0..1] describing how far the landing gear is extended. */ float gearPosition; - /* Ratio of flap deployment, 0 = up, 1 = full deploy. */ + /* Ratio of flap deployment, 0 = up, 1 = full deploy. */ float flapRatio; - /* Ratio of spoiler deployment, 0 = none, 1 = full deploy. */ + /* Ratio of spoiler deployment, 0 = none, 1 = full deploy. */ float spoilerRatio; - /* Ratio of speed brake deployment, 0 = none, 1 = full deploy. */ + /* Ratio of speed brake deployment, 0 = none, 1 = full deploy. */ float speedBrakeRatio; - /* Ratio of slat deployment, 0 = none, 1 = full deploy. */ + /* Ratio of slat deployment, 0 = none, 1 = full deploy. */ float slatRatio; - /* Wing sweep ratio, 0 = forward, 1 = swept. */ + /* Wing sweep ratio, 0 = forward, 1 = swept. */ float wingSweep; - /* Thrust power, 0 = none, 1 = full fwd, -1 = full reverse. */ + /* Thrust power, 0 = none, 1 = full fwd, -1 = full reverse. */ float thrust; - /* Total pitch input for this plane. */ + /* Total pitch input for this plane. */ float yokePitch; - /* Total Heading input for this plane. */ + /* Total Heading input for this plane. */ float yokeHeading; - /* Total Roll input for this plane. */ + /* Total Roll input for this plane. */ float yokeRoll; } XPLMPlaneDrawState_t; -#endif /* XPLM_DEPRECATED */ /* * XPLMCountAircraft * - * This function returns the number of aircraft X-Plane is capable of having, - * as well as the number of aircraft that are currently active. These numbers - * count the user's aircraft. It can also return the plugin that is currently - * controlling aircraft. In X-Plane 7, this routine reflects the number of - * aircraft the user has enabled in the rendering options window. + * This function returns the number of aircraft X-Plane is capable of having, + * as well as the number of aircraft that are currently active. These numbers + * count the user's aircraft. It can also return the plugin that is currently + * controlling aircraft. In X-Plane 7, this routine reflects the number of + * aircraft the user has enabled in the rendering options window. * */ -XPLM_API void XPLMCountAircraft( - int * outTotalAircraft, - int * outActiveAircraft, - XPLMPluginID * outController); +XPLM_API void XPLMCountAircraft( + int * outTotalAircraft, + int * outActiveAircraft, + XPLMPluginID * outController); /* * XPLMGetNthAircraftModel * - * This function returns the aircraft model for the Nth aircraft. Indices are - * zero based, with zero being the user's aircraft. The file name should be - * at least 256 chars in length; the path should be at least 512 chars in - * length. + * This function returns the aircraft model for the Nth aircraft. Indices are + * zero based, with zero being the user's aircraft. The file name should be + * at least 256 chars in length; the path should be at least 512 chars in + * length. * */ -XPLM_API void XPLMGetNthAircraftModel( - int inIndex, - char * outFileName, - char * outPath); +XPLM_API void XPLMGetNthAircraftModel( + int inIndex, + char * outFileName, + char * outPath); /*************************************************************************** * EXCLUSIVE AIRCRAFT ACCESS ***************************************************************************/ /* - * The following routines require exclusive access to the airplane APIs. Only - * one plugin may have this access at a time. + * The following routines require exclusive access to the airplane APIs. Only + * one plugin may have this access at a time. * */ @@ -158,127 +160,113 @@ XPLM_API void XPLMGetNthAircraftModel( /* * XPLMPlanesAvailable_f * - * Your airplanes available callback is called when another plugin gives up - * access to the multiplayer planes. Use this to wait for access to - * multiplayer. + * Your airplanes available callback is called when another plugin gives up + * access to the multiplayer planes. Use this to wait for access to + * multiplayer. * */ typedef void (* XPLMPlanesAvailable_f)( - void * inRefcon); + void * inRefcon); /* * XPLMAcquirePlanes * - * XPLMAcquirePlanes grants your plugin exclusive access to the aircraft. It - * returns 1 if you gain access, 0 if you do not. - * - * inAircraft - pass in an array of pointers to strings specifying the planes - * you want loaded. For any plane index you do not want loaded, pass a - * 0-length string. Other strings should be full paths with the .acf - * extension. NULL terminates this array, or pass NULL if there are no planes - * you want loaded. - * - * If you pass in a callback and do not receive access to the planes your - * callback will be called when the airplanes are available. If you do receive - * airplane access, your callback will not be called. + * XPLMAcquirePlanes grants your plugin exclusive access to the aircraft. It + * returns 1 if you gain access, 0 if you do not. inAircraft - pass in an + * array of pointers to strings specifying the planes you want loaded. For + * any plane index you do not want loaded, pass a 0-length string. Other + * strings should be full paths with the .acf extension. NULL terminates this + * array, or pass NULL if there are no planes you want loaded. If you pass in + * a callback and do not receive access to the planes your callback will be + * called when the airplanes are available. If you do receive airplane access, + * your callback will not be called. * */ -XPLM_API int XPLMAcquirePlanes( - char ** inAircraft, /* Can be NULL */ - XPLMPlanesAvailable_f inCallback, - void * inRefcon); +XPLM_API int XPLMAcquirePlanes( + char ** inAircraft, /* Can be NULL */ + XPLMPlanesAvailable_f inCallback, + void * inRefcon); /* * XPLMReleasePlanes * - * Call this function to release access to the planes. Note that if you are - * disabled, access to planes is released for you and you must reacquire it. + * Call this function to release access to the planes. Note that if you are + * disabled, access to planes is released for you and you must reacquire it. * */ -XPLM_API void XPLMReleasePlanes(void); +XPLM_API void XPLMReleasePlanes(void); /* * XPLMSetActiveAircraftCount * - * This routine sets the number of active planes. If you pass in a number - * higher than the total number of planes availables, only the total number of - * planes available is actually used. + * This routine sets the number of active planes. If you pass in a number + * higher than the total number of planes availables, only the total number of + * planes available is actually used. * */ -XPLM_API void XPLMSetActiveAircraftCount( - int inCount); +XPLM_API void XPLMSetActiveAircraftCount( + int inCount); /* * XPLMSetAircraftModel * - * This routine loads an aircraft model. It may only be called if you have - * exclusive access to the airplane APIs. Pass in the path of the model with - * the .acf extension. The index is zero based, but you may not pass in 0 - * (use XPLMSetUsersAircraft to load the user's aircracft). + * This routine loads an aircraft model. It may only be called if you have + * exclusive access to the airplane APIs. Pass in the path of the model with + * the .acf extension. The index is zero based, but you may not pass in 0 + * (use XPLMSetUsersAircraft to load the user's aircracft). * */ -XPLM_API void XPLMSetAircraftModel( - int inIndex, - const char * inAircraftPath); +XPLM_API void XPLMSetAircraftModel( + int inIndex, + const char * inAircraftPath); /* * XPLMDisableAIForPlane * - * This routine turns off X-Plane's AI for a given plane. The plane will - * continue to draw and be a real plane in X-Plane, but will not move itself. + * This routine turns off X-Plane's AI for a given plane. The plane will + * continue to draw and be a real plane in X-Plane, but will not move itself. * */ -XPLM_API void XPLMDisableAIForPlane( - int inPlaneIndex); +XPLM_API void XPLMDisableAIForPlane( + int inPlaneIndex); -#if defined(XPLM_DEPRECATED) /* * XPLMDrawAircraft * - * WARNING: Aircraft drawing via this API is deprecated and will not work in - * future versions of X-Plane. Use XPLMInstance for 3-d drawing of custom - * aircraft models. - * - * This routine draws an aircraft. It can only be called from a 3-d drawing - * callback. Pass in the position of the plane in OpenGL local coordinates - * and the orientation of the plane. A 1 for full drawing indicates that the - * whole plane must be drawn; a 0 indicates you only need the nav lights - * drawn. (This saves rendering time when planes are far away.) + * This routine draws an aircraft. It can only be called from a 3-d drawing + * callback. Pass in the position of the plane in OpenGL local coordinates + * and the orientation of the plane. A 1 for full drawing indicates that the + * whole plane must be drawn; a 0 indicates you only need the nav lights + * drawn. (This saves rendering time when planes are far away.) * */ -XPLM_API void XPLMDrawAircraft( - int inPlaneIndex, - float inX, - float inY, - float inZ, - float inPitch, - float inRoll, - float inYaw, - int inFullDraw, - XPLMPlaneDrawState_t * inDrawStateInfo); -#endif /* XPLM_DEPRECATED */ +XPLM_API void XPLMDrawAircraft( + int inPlaneIndex, + float inX, + float inY, + float inZ, + float inPitch, + float inRoll, + float inYaw, + int inFullDraw, + XPLMPlaneDrawState_t * inDrawStateInfo); -#if defined(XPLM_DEPRECATED) /* * XPLMReinitUsersPlane * - * WARNING: DO NOT USE. Use XPLMPlaceUserAtAirport or - * XPLMPlaceUserAtLocation. - * - * This function recomputes the derived flight model data from the aircraft - * structure in memory. If you have used the data access layer to modify the - * aircraft structure, use this routine to resynchronize X-Plane; since - * X-Plane works at least partly from derived values, the sim will not behave - * properly until this is called. + * This function recomputes the derived flight model data from the aircraft + * structure in memory. If you have used the data access layer to modify the + * aircraft structure, use this routine to resynchronize X-Plane; since + * X-Plane works at least partly from derived values, the sim will not behave + * properly until this is called. * - * WARNING: this routine does not necessarily place the airplane at the - * airport; use XPLMSetUsersAircraft to be compatible. This routine is - * provided to do special experimentation with flight models without resetting - * flight. + * WARNING: this routine does not necessarily place the airplane at the + * airport; use XPLMSetUsersAircraft to be compatible. This routine is + * provided to do special experimentation with flight models without resetting + * flight. * */ -XPLM_API void XPLMReinitUsersPlane(void); -#endif /* XPLM_DEPRECATED */ +XPLM_API void XPLMReinitUsersPlane(void); #ifdef __cplusplus } diff --git a/src/SDK/CHeaders/XPLM/XPLMPlugin.h b/src/SDK/CHeaders/XPLM/XPLMPlugin.h index be5d06ca..b526e15d 100755 --- a/src/SDK/CHeaders/XPLM/XPLMPlugin.h +++ b/src/SDK/CHeaders/XPLM/XPLMPlugin.h @@ -2,17 +2,17 @@ #define _XPLMPlugin_h_ /* - * 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 * */ -/*************************************************************************** - * XPLMPlugin - ***************************************************************************/ /* - * These APIs provide facilities to find and work with other plugins and - * manage other plugins. + * These APIs provide facilities to find and work with other plugins and + * manage other plugins. * */ @@ -26,10 +26,10 @@ extern "C" { * FINDING PLUGINS ***************************************************************************/ /* - * These APIs allow you to find another plugin or yourself, or iterate across - * all plugins. For example, if you wrote an FMS plugin that needed to talk - * to an autopilot plugin, you could use these APIs to locate the autopilot - * plugin. + * These APIs allow you to find another plugin or yourself, or iterate across + * all plugins. For example, if you wrote an FMS plugin that needed to talk + * to an autopilot plugin, you could use these APIs to locate the autopilot + * plugin. * */ @@ -37,83 +37,83 @@ extern "C" { /* * XPLMGetMyID * - * This routine returns the plugin ID of the calling plug-in. Call this to - * get your own ID. + * This routine returns the plugin ID of the calling plug-in. Call this to + * get your own ID. * */ -XPLM_API XPLMPluginID XPLMGetMyID(void); +XPLM_API XPLMPluginID XPLMGetMyID(void); /* * XPLMCountPlugins * - * This routine returns the total number of plug-ins that are loaded, both - * disabled and enabled. + * This routine returns the total number of plug-ins that are loaded, both + * disabled and enabled. * */ -XPLM_API int XPLMCountPlugins(void); +XPLM_API int XPLMCountPlugins(void); /* * XPLMGetNthPlugin * - * This routine returns the ID of a plug-in by index. Index is 0 based from 0 - * to XPLMCountPlugins-1, inclusive. Plugins may be returned in any arbitrary - * order. + * This routine returns the ID of a plug-in by index. Index is 0 based from 0 + * to XPLMCountPlugins-1, inclusive. Plugins may be returned in any arbitrary + * order. * */ -XPLM_API XPLMPluginID XPLMGetNthPlugin( - int inIndex); +XPLM_API XPLMPluginID XPLMGetNthPlugin( + int inIndex); /* * XPLMFindPluginByPath * - * This routine returns the plug-in ID of the plug-in whose file exists at the - * passed in absolute file system path. XPLM_NO_PLUGIN_ID is returned if the - * path does not point to a currently loaded plug-in. + * This routine returns the plug-in ID of the plug-in whose file exists at the + * passed in absolute file system path. XPLM_NO_PLUGIN_ID is returned if the + * path does not point to a currently loaded plug-in. * */ -XPLM_API XPLMPluginID XPLMFindPluginByPath( - const char * inPath); +XPLM_API XPLMPluginID XPLMFindPluginByPath( + const char * inPath); /* * XPLMFindPluginBySignature * - * This routine returns the plug-in ID of the plug-in whose signature matches - * what is passed in or XPLM_NO_PLUGIN_ID if no running plug-in has this - * signature. Signatures are the best way to identify another plug-in as they - * are independent of the file system path of a plug-in or the human-readable - * plug-in name, and should be unique for all plug-ins. Use this routine to - * locate another plugin that your plugin interoperates with + * This routine returns the plug-in ID of the plug-in whose signature matches + * what is passed in or XPLM_NO_PLUGIN_ID if no running plug-in has this + * signature. Signatures are the best way to identify another plug-in as they + * are independent of the file system path of a plug-in or the human-readable + * plug-in name, and should be unique for all plug-ins. Use this routine to + * locate another plugin that your plugin interoperates with * */ -XPLM_API XPLMPluginID XPLMFindPluginBySignature( - const char * inSignature); +XPLM_API XPLMPluginID XPLMFindPluginBySignature( + const char * inSignature); /* * XPLMGetPluginInfo * - * This routine returns information about a plug-in. Each parameter should be - * a pointer to a buffer of at least - * 256 characters, or NULL to not receive the information. + * This routine returns information about a plug-in. Each parameter should be + * a pointer to a buffer of at least 256 characters, or NULL to not receive + * the information. * - * outName - the human-readable name of the plug-in. outFilePath - the - * absolute file path to the file that contains this plug-in. outSignature - a - * unique string that identifies this plug-in. outDescription - a - * human-readable description of this plug-in. + * outName - the human-readable name of the plug-in. outFilePath - the + * absolute file path to the file that contains this plug-in. outSignature - a + * unique string that identifies this plug-in. outDescription - a + * human-readable description of this plug-in. * */ -XPLM_API void XPLMGetPluginInfo( - XPLMPluginID inPlugin, - char * outName, /* Can be NULL */ - char * outFilePath, /* Can be NULL */ - char * outSignature, /* Can be NULL */ - char * outDescription); /* Can be NULL */ +XPLM_API void XPLMGetPluginInfo( + XPLMPluginID inPlugin, + char * outName, /* Can be NULL */ + char * outFilePath, /* Can be NULL */ + char * outSignature, /* Can be NULL */ + char * outDescription); /* Can be NULL */ /*************************************************************************** * ENABLING/DISABLING PLUG-INS ***************************************************************************/ /* - * These routines are used to work with plug-ins and manage them. Most - * plugins will not need to use these APIs. + * These routines are used to work with plug-ins and manage them. Most + * plugins will not need to use these APIs. * */ @@ -121,238 +121,156 @@ XPLM_API void XPLMGetPluginInfo( /* * XPLMIsPluginEnabled * - * Returns whether the specified plug-in is enabled for running. + * Returns whether the specified plug-in is enabled for running. * */ -XPLM_API int XPLMIsPluginEnabled( - XPLMPluginID inPluginID); +XPLM_API int XPLMIsPluginEnabled( + XPLMPluginID inPluginID); /* * XPLMEnablePlugin * - * This routine enables a plug-in if it is not already enabled. It returns 1 - * if the plugin was enabled or successfully enables itself, 0 if it does not. - * Plugins may fail to enable (for example, if resources cannot be acquired) - * by returning 0 from their XPluginEnable callback. + * This routine enables a plug-in if it is not already enabled. It returns 1 + * if the plugin was enabled or successfully enables itself, 0 if it does not. + * Plugins may fail to enable (for example, if resources cannot be acquired) + * by returning 0 from their XPluginEnable callback. * */ -XPLM_API int XPLMEnablePlugin( - XPLMPluginID inPluginID); +XPLM_API int XPLMEnablePlugin( + XPLMPluginID inPluginID); /* * XPLMDisablePlugin * - * This routine disableds an enabled plug-in. + * This routine disableds an enabled plug-in. * */ -XPLM_API void XPLMDisablePlugin( - XPLMPluginID inPluginID); +XPLM_API void XPLMDisablePlugin( + XPLMPluginID inPluginID); /* * XPLMReloadPlugins * - * This routine reloads all plug-ins. Once this routine is called and you - * return from the callback you were within (e.g. a menu select callback) you - * will receive your XPluginDisable and XPluginStop callbacks and your DLL - * will be unloaded, then the start process happens as if the sim was starting - * up. + * This routine reloads all plug-ins. Once this routine is called and you + * return from the callback you were within (e.g. a menu select callback) you + * will receive your XPluginDisable and XPluginStop callbacks and your DLL + * will be unloaded, then the start process happens as if the sim was starting + * up. * */ -XPLM_API void XPLMReloadPlugins(void); +XPLM_API void XPLMReloadPlugins(void); /*************************************************************************** * INTERPLUGIN MESSAGING ***************************************************************************/ /* - * Plugin messages are defined as 32-bit integers. Messages below 0x00FFFFFF - * are reserved for X-Plane and the plugin SDK. - * - * Messages come with a pointer parameter; the meaning of this pointer depends - * on the message itself. In some messages, the pointer parameter contains an - * actual typed pointer to data that can be inspected in the plugin; in these - * cases the documentation will state that the parameter "points to" - * information. - * - * in other cases, the value of the pointer is actually an integral number - * stuffed into the pointer's storage. In these second cases, the pointer - * parameter needs to be cast, not dereferenced. In these caess, the - * documentation will state that the parameter "contains" a value, which will - * always be an integral type. + * Plugin messages are defined as 32-bit integers. Messages below 0x00FFFFFF + * are reserved for X-Plane and the plugin SDK. * - * Some messages don't use the pointer parameter - in this case your plugin - * should ignore it. + * Messages have two conceptual uses: notifications and commands. Commands + * are sent from one plugin to another to induce behavior; notifications are + * sent from one plugin to all others for informational purposes. It is + * important that commands and notifications not have the same values because + * this could cause a notification sent by one plugin to accidentally induce a + * command in another. * - * Messages have two conceptual uses: notifications and commands. Commands - * are sent from one plugin to another to induce behavior; notifications are - * sent from one plugin to all others for informational purposes. It is - * important that commands and notifications not have the same values because - * this could cause a notification sent by one plugin to accidentally induce a - * command in another. + * By convention, plugin-defined notifications should have the high bit set + * (e.g. be greater or equal to unsigned 0x8000000) while commands should have + * this bit be cleared. * - * By convention, plugin-defined notifications should have the high bit set - * (e.g. be greater or equal to unsigned 0x8000000) while commands should have - * this bit be cleared. - * - * The following messages are sent to your plugin by X-Plane. + * The following messages are sent to your plugin by X-Plane. * */ -/* This message is sent to your plugin whenever the user's plane crashes. The * - * parameter is ignored. */ +/* This message is sent to your plugin whenever the user's plane crashes. */ #define XPLM_MSG_PLANE_CRASHED 101 -/* This message is sent to your plugin whenever a new plane is loaded. The * - * parameter contains the index number of the plane being loaded; 0 indicates * - * the user's plane. */ +/* This message is sent to your plugin whenever a new plane is loaded. The * + * parameter is the number of the plane being loaded; 0 indicates the user's * + * plane. */ #define XPLM_MSG_PLANE_LOADED 102 -/* This messages is sent whenever the user's plane is positioned at a new * - * airport. The parameter is ignored. */ +/* This messages is called whenever the user's plane is positioned at a new * + * airport. */ #define XPLM_MSG_AIRPORT_LOADED 103 -/* This message is sent whenever new scenery is loaded. Use datarefs to * - * determine the new scenery files that were loaded. The parameter is ignored.*/ +/* This message is sent whenever new scenery is loaded. Use datarefs to * + * determine the new scenery files that were loaded. */ #define XPLM_MSG_SCENERY_LOADED 104 -/* This message is sent whenever the user adjusts the number of X-Plane * - * aircraft models. You must use XPLMCountPlanes to find out how many planes * - * are now available. This message will only be sent in XP7 and higher * - * because in XP6 the number of aircraft is not user-adjustable. The parameter* - * is ignored. */ +/* This message is sent whenever the user adjusts the number of X-Plane * + * aircraft models. You must use XPLMCountPlanes to find out how many planes * + * are now available. This message will only be sent in XP7 and higher * + * because in XP6 the number of aircraft is not user-adjustable. */ #define XPLM_MSG_AIRPLANE_COUNT_CHANGED 105 #if defined(XPLM200) -/* This message is sent to your plugin whenever a plane is unloaded. The * - * parameter contains the index number of the plane being unloaded; 0 * - * indicates the user's plane. The parameter is of type int, passed as the * - * value of the pointer. (That is: the parameter is an int, not a pointer to * - * an int.) */ +/* This message is sent to your plugin whenever a plane is unloaded. The * + * parameter is the number of the plane being unloaded; 0 indicates the user's * + * plane. The parameter is of type int, passed as the value of the pointer. * + * (That is: the parameter is an int, not a pointer to an int.) */ #define XPLM_MSG_PLANE_UNLOADED 106 #endif /* XPLM200 */ #if defined(XPLM210) -/* This message is sent to your plugin right before X-Plane writes its * - * preferences file. You can use this for two purposes: to write your own * - * preferences, and to modify any datarefs to influence preferences output. * - * For example, if your plugin temporarily modifies saved preferences, you can* - * put them back to their default values here to avoid having the tweaks be * - * persisted if your plugin is not loaded on the next invocation of X-Plane. * - * The parameter is ignored. */ +/* This message is sent to your plugin right before X-Plane writes its * + * preferences file. You can use this for two purposes: to write your own * + * preferences, and to modify any datarefs to influence preferences output. * + * For example, if your plugin temporarily modifies saved preferences, you can * + * put them back to their default values here to avoid having the tweaks be * + * persisted if your plugin is not loaded on the next invocation of X-Plane. */ #define XPLM_MSG_WILL_WRITE_PREFS 107 #endif /* XPLM210 */ #if defined(XPLM210) -/* This message is sent to your plugin right after a livery is loaded for an * - * airplane. You can use this to check the new livery (via datarefs) and * - * react accordingly. The parameter contains the index number of the aircraft* - * whose livery is changing. */ +/* This message is sent to your plugin right after a livery is loaded for an * + * airplane. You can use this to check the new livery (via datarefs) and * + * react accordingly. The parameter is of type int, passed as the value of a * + * pointer and represents the aicraft plane number - 0 is the user's plane. */ #define XPLM_MSG_LIVERY_LOADED 108 #endif /* XPLM210 */ #if defined(XPLM301) -/* Sent to your plugin right before X-Plane enters virtual reality mode (at * - * which time any windows that are not positioned in VR mode will no longer be* - * visible to the user). The parameter is unused and should be ignored. */ +/* Sent to your plugin right before X-Plane enters virtual reality mode (at * + * which time any windows that are not positioned in VR mode will no longer be * + * visible to the user). */ #define XPLM_MSG_ENTERED_VR 109 #endif /* XPLM301 */ #if defined(XPLM301) -/* Sent to your plugin right before X-Plane leaves virtual reality mode (at * - * which time you may want to clean up windows that are positioned in VR * - * mode). The parameter is unused and should be ignored. */ +/* Sent to your plugin right before X-Plane leaves virtual reality mode (at * + * which time you may want to clean up windows that are positioned in VR * + * mode). */ #define XPLM_MSG_EXITING_VR 110 #endif /* XPLM301 */ -#if defined(XPLM303) -/* Sent to your plugin if another plugin wants to take over AI planes. If you * - * are a synthetic traffic provider, that probably means a plugin for an * - * online network has connected and wants to supply aircraft flown by real * - * humans and you should cease to provide synthetic traffic. If however you * - * are providing online traffic from real humans, you probably don't want to * - * disconnect, in which case you just ignore this message. The sender is the * - * plugin ID of the plugin asking for control of the planes now. You can use * - * it to find out who is requesting and whether you should yield to them. * - * Synthetic traffic providers should always yield to online networks. The * - * parameter is unused and should be ignored. */ -#define XPLM_MSG_RELEASE_PLANES 111 -#endif /* XPLM303 */ - /* * XPLMSendMessageToPlugin * - * This function sends a message to another plug-in or X-Plane. Pass - * XPLM_NO_PLUGIN_ID to broadcast to all plug-ins. Only enabled plug-ins with - * a message receive function receive the message. + * This function sends a message to another plug-in or X-Plane. Pass + * XPLM_NO_PLUGIN_ID to broadcast to all plug-ins. Only enabled plug-ins with + * a message receive function receive the message. * */ -XPLM_API void XPLMSendMessageToPlugin( - XPLMPluginID inPlugin, - int inMessage, - void * inParam); +XPLM_API void XPLMSendMessageToPlugin( + XPLMPluginID inPlugin, + int inMessage, + void * inParam); #if defined(XPLM200) /*************************************************************************** * Plugin Features API ***************************************************************************/ /* - * The plugin features API allows your plugin to "sign up" for additional - * capabilities and plugin system features that are normally disabled for - * backward compatibility. This allows advanced plugins to "opt-in" to new - * behavior. - * - * Each feature is defined by a permanent string name. The feature string - * names will vary with the particular installation of X-Plane, so plugins - * should not expect a feature to be guaranteed present. - * - * XPLM_WANTS_REFLECTIONS - * ---------------------- - * - * Available in the SDK 2.0 and later for X-Plane 9, enabling this capability - * causes your plugin to receive drawing hook callbacks when X-Plane builds - * its off-screen reflection and shadow rendering passes. Plugins should - * enable this and examine the dataref sim/graphics/view/plane_render_type to - * determine whether the drawing callback is for a reflection, shadow - * calculation, or the main screen. Rendering can be simlified or omitted for - * reflections, and non-solid drawing should be skipped for shadow - * calculations. - * - * **Note**: direct drawing via draw callbacks is not recommended; use the - * XPLMInstance API to create object models instead. - * - * XPLM_USE_NATIVE_PATHS - * --------------------- - * - * available in the SDK 2.1 and later for X-Plane 10, this modifies the plugin - * system to use Unix-style paths on all operating systems. With this enabled: - * - * * OS X paths will match the native OS X Unix. - * * Windows will use forward slashes but preserve C:\ or another drive letter - * when using complete file paths. - * * Linux uses its native file system path scheme. - * - * Without this enabled: - * - * * OS X will use CFM file paths separated by a colon. - * * Windows will use back-slashes and conventional DOS paths. - * * Linux uses its native file system path scheme. - * - * All plugins should enable this feature on OS X to access the native file - * system. - * - * XPLM_USE_NATIVE_WIDGET_WINDOWS - * ------------------------------ - * - * Available in the SDK 3.0.2 SDK, this capability tells the widgets library - * to use new, modern X-Plane backed XPLMDisplay windows to anchor all widget - * trees. Without it, widgets will always use legacy windows. - * - * Plugins should enable this to allow their widget hierarchies to respond to - * the user's UI size settings and to map widget-based windwos to a VR HMD. - * - * Before enabling this, make sure any custom widget code in your plugin is - * prepared to cope with the UI coordinate system not being th same as the - * OpenGL window coordinate system. + * The plugin features API allows your plugin to "sign up" for additional + * capabilities and plugin system features that are normally disabled for + * backward compatibility. This allows advanced plugins to "opt-in" to new + * behavior. + * + * Each feature is defined by a permanent string name. The feature string + * names will vary with the particular installation of X-Plane, so plugins + * should not expect a feature to be guaranteed present. * */ @@ -360,59 +278,59 @@ XPLM_API void XPLMSendMessageToPlugin( /* * XPLMFeatureEnumerator_f * - * You pass an XPLMFeatureEnumerator_f to get a list of all features supported - * by a given version running version of X-Plane. This routine is called once - * for each feature. + * You pass an XPLMFeatureEnumerator_f to get a list of all features supported + * by a given version running version of X-Plane. This routine is called once + * for each feature. * */ typedef void (* XPLMFeatureEnumerator_f)( - const char * inFeature, - void * inRef); + const char * inFeature, + void * inRef); /* * XPLMHasFeature * - * This returns 1 if the given installation of X-Plane supports a feature, or - * 0 if it does not. + * This returns 1 if the given installation of X-Plane supports a feature, or + * 0 if it does not. * */ -XPLM_API int XPLMHasFeature( - const char * inFeature); +XPLM_API int XPLMHasFeature( + const char * inFeature); /* * XPLMIsFeatureEnabled * - * This returns 1 if a feature is currently enabled for your plugin, or 0 if - * it is not enabled. It is an error to call this routine with an unsupported - * feature. + * This returns 1 if a feature is currently enabled for your plugin, or 0 if + * it is not enabled. It is an error to call this routine with an unsupported + * feature. * */ -XPLM_API int XPLMIsFeatureEnabled( - const char * inFeature); +XPLM_API int XPLMIsFeatureEnabled( + const char * inFeature); /* * XPLMEnableFeature * - * This routine enables or disables a feature for your plugin. This will - * change the running behavior of X-Plane and your plugin in some way, - * depending on the feature. + * This routine enables or disables a feature for your plugin. This will + * change the running behavior of X-Plane and your plugin in some way, + * depending on the feature. * */ -XPLM_API void XPLMEnableFeature( - const char * inFeature, - int inEnable); +XPLM_API void XPLMEnableFeature( + const char * inFeature, + int inEnable); /* * XPLMEnumerateFeatures * - * This routine calls your enumerator callback once for each feature that this - * running version of X-Plane supports. Use this routine to determine all of - * the features that X-Plane can support. + * This routine calls your enumerator callback once for each feature that this + * running version of X-Plane supports. Use this routine to determine all of + * the features that X-Plane can support. * */ -XPLM_API void XPLMEnumerateFeatures( - XPLMFeatureEnumerator_f inEnumerator, - void * inRef); +XPLM_API void XPLMEnumerateFeatures( + XPLMFeatureEnumerator_f inEnumerator, + void * inRef); #endif /* XPLM200 */ #ifdef __cplusplus diff --git a/src/SDK/CHeaders/XPLM/XPLMProcessing.h b/src/SDK/CHeaders/XPLM/XPLMProcessing.h index 94ef0c46..a9250714 100755 --- a/src/SDK/CHeaders/XPLM/XPLMProcessing.h +++ b/src/SDK/CHeaders/XPLM/XPLMProcessing.h @@ -2,38 +2,23 @@ #define _XPLMProcessing_h_ /* - * 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 * */ -/*************************************************************************** - * XPLMProcessing - ***************************************************************************/ /* - * This API allows you to get regular callbacks during the flight loop, the - * part of X-Plane where the plane's position calculates the physics of - * flight, etc. Use these APIs to accomplish periodic tasks like logging data - * and performing I/O. - * - * You can receive a callback either just before or just after the per-frame - * physics calculations happen - you can use post-FM callbacks to "patch" the - * flight model after it has run. - * - * If the user has set the number of flight model iterations per frame greater - * than one your plugin will _not_ see this; these integrations run on the - * sub-section of the flight model where iterations improve responsiveness - * (e.g. physical integration, not simple systems tracking) and are thus - * opaque to plugins. - * - * Flight loop scheduling, when scheduled by time, is scheduled by a "first - * callback after the deadline" schedule, e.g. your callbacks will always be - * slightly late to ensure that we don't run faster than your deadline. - * - * WARNING: Do NOT use these callbacks to draw! You cannot draw during flight - * loop callbacks. Use the drawing callbacks (see XPLMDisplay for more info) - * for graphics. (One exception: you can use a post-flight loop callback to - * update your own off-screen FBOs.) + * This API allows you to get regular callbacks during the flight loop, the + * part of X-Plane where the plane's position calculates the physics of + * flight, etc. Use these APIs to accomplish periodic tasks like logging data + * and performing I/O. + * + * WARNING: Do NOT use these callbacks to draw! You cannot draw during flight + * loop callbacks. Use the drawing callbacks (see XPLMDisplay for more info) + * for graphics. * */ @@ -46,21 +31,25 @@ extern "C" { /*************************************************************************** * FLIGHT LOOP CALLBACKS ***************************************************************************/ +/* + * + * + */ #if defined(XPLM210) /* * XPLMFlightLoopPhaseType * - * You can register a flight loop callback to run either before or after the - * flight model is integrated by X-Plane. + * You can register a flight loop callback to run either before or after the + * flight model is integrated by X-Plane. * */ enum { - /* Your callback runs before X-Plane integrates the flight model. */ - xplm_FlightLoop_Phase_BeforeFlightModel = 0, + /* Your callback runs before X-Plane integrates the flight model. */ + xplm_FlightLoop_Phase_BeforeFlightModel = 0 - /* Your callback runs after X-Plane integrates the flight model. */ - xplm_FlightLoop_Phase_AfterFlightModel = 1, + /* Your callback runs after X-Plane integrates the flight model. */ + ,xplm_FlightLoop_Phase_AfterFlightModel = 1 }; @@ -71,9 +60,9 @@ typedef int XPLMFlightLoopPhaseType; /* * XPLMFlightLoopID * - * This is an opaque identifier for a flight loop callback. You can use this - * identifier to easily track and remove your callbacks, or to use the new - * flight loop APIs. + * This is an opaque identifier for a flight loop callback. You can use this + * identifier to easily track and remove your callbacks, or to use the new + * flight loop APIs. * */ typedef void * XPLMFlightLoopID; @@ -82,49 +71,39 @@ typedef void * XPLMFlightLoopID; /* * XPLMFlightLoop_f * - * This is your flight loop callback. Each time the flight loop is iterated - * through, you receive this call at the end. + * This is your flight loop callback. Each time the flight loop is iterated + * through, you receive this call at the end. You receive a time since you + * were last called and a time since the last loop, as well as a loop counter. + * The 'phase' parameter is deprecated and should be ignored. * - * Flight loop callbacks receive a number of input timing parameters. These - * input timing parameters are not particularly useful; you may need to track - * your own timing data (e.g. by reading datarefs). The input parameters are: + * Your return value controls when you will next be called. Return 0 to stop + * receiving callbacks. Pass a positive number to specify how many seconds + * until the next callback. (You will be called at or after this time, not + * before.) Pass a negative number to specify how many loops must go by until + * you are called. For example, -1.0 means call me the very next loop. Try to + * run your flight loop as infrequently as is practical, and suspend it (using + * return value 0) when you do not need it; lots of flight loop callbacks that + * do nothing lowers X-Plane's frame rate. * - * - inElapsedSinceLastCall: the wall time since your last callback. - * - inElapsedTimeSinceLastFlightLoop: the wall time since any flight loop was - * dispatched. - * - inCounter: a monotonically increasing counter, bumped once per flight - * loop dispatch from the sim. - * - inRefcon: your own ptr constant from when you regitered yor callback. + * Your callback will NOT be unregistered if you return 0; it will merely be + * inactive. * - * Your return value controls when you will next be called. - * - * - Return 0 to stop receiving callbacks. - * - Pass a positive number to specify how many seconds until the next - * callback. (You will be called at or after this time, not before.) - * - Pass a negative number to specify how many loops must go by until you - * are called. For example, -1.0 means call me the very next loop. - * - * Try to run your flight loop as infrequently as is practical, and suspend it - * (using return value 0) when you do not need it; lots of flight loop - * callbacks that do nothing lowers X-Plane's frame rate. - * - * Your callback will NOT be unregistered if you return 0; it will merely be - * inactive. + * The reference constant you passed to your loop is passed back to you. * */ typedef float (* XPLMFlightLoop_f)( - float inElapsedSinceLastCall, - float inElapsedTimeSinceLastFlightLoop, - int inCounter, - void * inRefcon); + float inElapsedSinceLastCall, + float inElapsedTimeSinceLastFlightLoop, + int inCounter, + void * inRefcon); #if defined(XPLM210) /* * XPLMCreateFlightLoop_t * - * XPLMCreateFlightLoop_t contains the parameters to create a new flight loop - * callback. The strsucture can be expanded in future SDKs - always set - * structSize to the size of your structure in bytes. + * XPLMCreateFlightLoop_t contains the parameters to create a new flight loop + * callback. The strsucture can be expanded in future SDKs - always set + * structSize to the size of your structure in bytes. * */ typedef struct { @@ -138,123 +117,132 @@ typedef struct { /* * XPLMGetElapsedTime * - * This routine returns the elapsed time since the sim started up in decimal - * seconds. This is a wall timer; it keeps counting upward even if the sim is - * pasued. - * - * __WARNING__: XPLMGetElapsedTime is not a very good timer! It lacks - * precision in both its data type and its source. Do not attempt to use it - * for timing critical applications like network multiplayer. + * This routine returns the elapsed time since the sim started up in decimal + * seconds. * */ -XPLM_API float XPLMGetElapsedTime(void); +XPLM_API float XPLMGetElapsedTime(void); /* * XPLMGetCycleNumber * - * This routine returns a counter starting at zero for each sim cycle - * computed/video frame rendered. + * This routine returns a counter starting at zero for each sim cycle + * computed/video frame rendered. * */ -XPLM_API int XPLMGetCycleNumber(void); +XPLM_API int XPLMGetCycleNumber(void); /* * XPLMRegisterFlightLoopCallback * - * This routine registers your flight loop callback. Pass in a pointer to a - * flight loop function and a refcon. inInterval defines when you will be - * called. Pass in a positive number to specify seconds from registration time - * to the next callback. Pass in a negative number to indicate when you will - * be called (e.g. pass -1 to be called at the next cylcle). Pass 0 to not be - * called; your callback will be inactive. - * - * (This legacy function only installs pre-flight-loop callbacks; use - * XPLMCreateFlightLoop for more control.) + * This routine registers your flight loop callback. Pass in a pointer to a + * flight loop function and a refcon. inInterval defines when you will be + * called. Pass in a positive number to specify seconds from registration time + * to the next callback. Pass in a negative number to indicate when you will + * be called (e.g. pass -1 to be called at the next cylcle). Pass 0 to not be + * called; your callback will be inactive. * */ -XPLM_API void XPLMRegisterFlightLoopCallback( - XPLMFlightLoop_f inFlightLoop, - float inInterval, - void * inRefcon); +XPLM_API void XPLMRegisterFlightLoopCallback( + XPLMFlightLoop_f inFlightLoop, + float inInterval, + void * inRefcon); /* * XPLMUnregisterFlightLoopCallback * - * This routine unregisters your flight loop callback. Do NOT call it from - * your flight loop callback. Once your flight loop callback is unregistered, - * it will not be called again. - * - * Only use this on flight loops registered via - * XPLMRegisterFlightLoopCallback. + * This routine unregisters your flight loop callback. Do NOT call it from + * your flight loop callback. Once your flight loop callback is unregistered, + * it will not be called again. * */ -XPLM_API void XPLMUnregisterFlightLoopCallback( - XPLMFlightLoop_f inFlightLoop, - void * inRefcon); +XPLM_API void XPLMUnregisterFlightLoopCallback( + XPLMFlightLoop_f inFlightLoop, + void * inRefcon); /* * XPLMSetFlightLoopCallbackInterval * - * This routine sets when a callback will be called. Do NOT call it from your - * callback; use the return value of the callback to change your callback - * interval from inside your callback. + * This routine sets when a callback will be called. Do NOT call it from your + * callback; use the return value of the callback to change your callback + * interval from inside your callback. * - * inInterval is formatted the same way as in XPLMRegisterFlightLoopCallback; - * positive for seconds, negative for cycles, and 0 for deactivating the - * callback. If inRelativeToNow is 1, times are from the time of this call; - * otherwise they are from the time the callback was last called (or the time - * it was registered if it has never been called. + * inInterval is formatted the same way as in XPLMRegisterFlightLoopCallback; + * positive for seconds, negative for cycles, and 0 for deactivating the + * callback. If inRelativeToNow is 1, times are from the time of this call; + * otherwise they are from the time the callback was last called (or the time + * it was registered if it has never been called. * */ -XPLM_API void XPLMSetFlightLoopCallbackInterval( - XPLMFlightLoop_f inFlightLoop, - float inInterval, - int inRelativeToNow, - void * inRefcon); +XPLM_API void XPLMSetFlightLoopCallbackInterval( + XPLMFlightLoop_f inFlightLoop, + float inInterval, + int inRelativeToNow, + void * inRefcon); #if defined(XPLM210) /* * XPLMCreateFlightLoop * - * This routine creates a flight loop callback and returns its ID. The flight - * loop callback is created using the input param struct, and is inited to be - * unscheduled. + * This routine creates a flight loop callback and returns its ID. The flight + * loop callback is created using the input param struct, and is inited to be + * unscheduled. * */ -XPLM_API XPLMFlightLoopID XPLMCreateFlightLoop( - XPLMCreateFlightLoop_t * inParams); +XPLM_API XPLMFlightLoopID XPLMCreateFlightLoop( + XPLMCreateFlightLoop_t * inParams); #endif /* XPLM210 */ #if defined(XPLM210) /* * XPLMDestroyFlightLoop * - * This routine destroys a flight loop callback by ID. Only call it on flight - * loops created with the newer XPLMCreateFlightLoop API. + * This routine destroys a flight loop callback by ID. * */ -XPLM_API void XPLMDestroyFlightLoop( - XPLMFlightLoopID inFlightLoopID); +XPLM_API void XPLMDestroyFlightLoop( + XPLMFlightLoopID inFlightLoopID); #endif /* XPLM210 */ #if defined(XPLM210) /* * XPLMScheduleFlightLoop * - * This routine schedules a flight loop callback for future execution. If - * inInterval is negative, it is run in a certain number of frames based on - * the absolute value of the input. If the interval is positive, it is a - * duration in seconds. + * This routine schedules a flight loop callback for future execution. If + * inInterval is negative, it is run in a certain number of frames based on + * the absolute value of the input. If the interval is positive, it is a + * duration in seconds. + * + * If inRelativeToNow is true, ties are interpretted relative to the time this + * routine is called; otherwise they are relative to the last call time or the + * time the flight loop was registered (if never called). + * + * THREAD SAFETY: it is legal to call this routine from any thread under the + * following conditions: + * + * 1. The call must be between the beginning of an XPLMEnable and the end of + * an XPLMDisable sequence. (That is, you must not call this routine from + * thread activity when your plugin was supposed to be disabled. Since plugins + * are only enabled while loaded, this also implies you cannot run this + * routine outside an XPLMStart/XPLMStop sequence.) + * + * 2. You may not call this routine re-entrantly for a single flight loop ID. + * (That is, you can't enable from multiple threads at the same time.) + * + * 3. You must call this routine between the time after XPLMCreateFlightLoop + * returns a value and the time you call XPLMDestroyFlightLoop. (That is, you + * must ensure that your threaded activity is within the life of the object. + * The SDK does not check this for you, nor does it synchronize destruction of + * the object.) * - * If inRelativeToNow is true, ties are interpretted relative to the time this - * routine is called; otherwise they are relative to the last call time or the - * time the flight loop was registered (if never called). + * 4. The object must be unscheduled if this routine is to be called from a + * thread other than the main thread. * */ -XPLM_API void XPLMScheduleFlightLoop( - XPLMFlightLoopID inFlightLoopID, - float inInterval, - int inRelativeToNow); +XPLM_API void XPLMScheduleFlightLoop( + XPLMFlightLoopID inFlightLoopID, + float inInterval, + int inRelativeToNow); #endif /* XPLM210 */ #ifdef __cplusplus diff --git a/src/SDK/CHeaders/XPLM/XPLMScenery.h b/src/SDK/CHeaders/XPLM/XPLMScenery.h index 452bac95..875468e5 100644 --- a/src/SDK/CHeaders/XPLM/XPLMScenery.h +++ b/src/SDK/CHeaders/XPLM/XPLMScenery.h @@ -2,16 +2,16 @@ #define _XPLMScenery_h_ /* - * 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 * */ -/*************************************************************************** - * XPLMScenery - ***************************************************************************/ /* - * This package contains APIs to interact with X-Plane's scenery system. + * This package contains APIs to interact with X-Plane's scenery system. * */ @@ -26,33 +26,30 @@ extern "C" { * Terrain Y-Testing ***************************************************************************/ /* - * The Y-testing API allows you to locate the physical scenery mesh. This - * would be used to place dynamic graphics on top of the ground in a plausible - * way or do physics interactions. - * - * The Y-test API works via probe objects, which are allocated by your plugin - * and used to query terrain. Probe objects exist both to capture which - * algorithm you have requested (see probe types) and also to cache query - * information. - * - * Performance Guidelines - * ---------------------- - * - * It is generally faster to use the same probe for nearby points and - * different probes for different points. Try not to allocate more than - * "hundreds" of probes at most. Share probes if you need more. Generally, - * probing operations are expensive, and should be avoided via caching when - * possible. - * - * Y testing returns a location on the terrain, a normal vectory, and a - * velocity vector. The normal vector tells you the slope of the terrain at - * that point. The velocity vector tells you if that terrain is moving (and is - * in meters/second). For example, if your Y test hits the aircraft carrier - * deck, this tells you the velocity of that point on the deck. - * - * Note: the Y-testing API is limited to probing the loaded scenery area, - * which is approximately 300x300 km in X-Plane 9. Probes outside this area - * will return the height of a 0 MSL sphere. + * The Y-testing API allows you to locate the physical scenery mesh. This + * would be used to place dynamic graphics on top of the ground in a plausible + * way or do physics interactions. + * + * The Y-test API works via probe objects, which are allocated by your plugin + * and used to query terrain. Probe objects exist both to capture which + * algorithm you have requested (see probe types) and also to cache query + * information. + * + * Performance guidelines: It is generally faster to use the same probe for + * nearby points and different probes for different points. Try not to + * allocate more than "hundreds" of probes at most. Share probes if you need + * more. Generally, probing operations are expensive, and should be avoided + * via caching when possible. + * + * Y testing returns a location on the terrain, a normal vectory, and a + * velocity vector. The normal vector tells you the slope of the terrain at + * that point. The velocity vector tells you if that terrain is moving (and is + * in meters/second). For example, if your Y test hits the aircraft carrier + * deck, this tells you the velocity of that point on the deck. + * + * Note: the Y-testing API is limited to probing the loaded scenery area, + * which is approximately 300x300 km in X-Plane 9. Probes outside this area + * will return the height of a 0 MSL sphere. * */ @@ -60,15 +57,15 @@ extern "C" { /* * XPLMProbeType * - * XPLMProbeType defines the type of terrain probe - each probe has a - * different algorithm. (Only one type of probe is provided right now, but - * future APIs will expose more flexible or poewrful or useful probes. + * XPLMProbeType defines the type of terrain probe - each probe has a + * different algorithm. (Only one type of probe is provided right now, but + * future APIs will expose more flexible or poewrful or useful probes. * */ enum { - /* The Y probe gives you the location of the tallest physical scenery along * - * the Y axis going through the queried point. */ - xplm_ProbeY = 0, + /* The Y probe gives you the location of the tallest physical scenery along * + * the Y axis going through the queried point. */ + xplm_ProbeY = 0 }; @@ -77,20 +74,20 @@ typedef int XPLMProbeType; /* * XPLMProbeResult * - * Probe results - possible results from a probe query. + * Probe results - possible results from a probe query. * */ enum { - /* The probe hit terrain and returned valid values. */ - xplm_ProbeHitTerrain = 0, + /* The probe hit terrain and returned valid values. */ + xplm_ProbeHitTerrain = 0 - /* An error in the API call. Either the probe struct size is bad, or the * - * probe is invalid or the type is mismatched for the specific query call. */ - xplm_ProbeError = 1, + /* An error in the API call. Either the probe struct size is bad, or the * + * probe is invalid or the type is mismatched for the specific query call. */ + ,xplm_ProbeError = 1 - /* The probe call succeeded but there is no terrain under this point (perhaps * - * it is off the side of the planet?) */ - xplm_ProbeMissed = 2, + /* The probe call succeeded but there is no terrain under this point (perhaps * + * it is off the side of the planet?) */ + ,xplm_ProbeMissed = 2 }; @@ -99,8 +96,8 @@ typedef int XPLMProbeResult; /* * XPLMProbeRef * - * An XPLMProbeRef is an opaque handle to a probe, used for querying the - * terrain. + * An XPLMProbeRef is an opaque handle to a probe, used for querying the + * terrain. * */ typedef void * XPLMProbeRef; @@ -108,71 +105,71 @@ typedef void * XPLMProbeRef; /* * XPLMProbeInfo_t * - * XPLMProbeInfo_t contains the results of a probe call. Make sure to set - * structSize to the size of the struct before using it. + * XPLMProbeInfo_t contains the results of a probe call. Make sure to set + * structSize to the size of the struct before using it. * */ typedef struct { - /* Size of structure in bytes - always set this before calling the XPLM. */ + /* Size of structure in bytes - always set this before calling the XPLM. */ int structSize; - /* Resulting X location of the terrain point we hit, in local OpenGL * - * coordinates. */ + /* Resulting X location of the terrain point we hit, in local OpenGL * + * coordinates. */ float locationX; - /* Resulting Y location of the terrain point we hit, in local OpenGL * - * coordinates. */ + /* Resulting Y location of the terrain point we hit, in local OpenGL * + * coordinates. */ float locationY; - /* Resulting Z location of the terrain point we hit, in local OpenGL * - * coordinates. */ + /* Resulting Z location of the terrain point we hit, in local OpenGL * + * coordinates. */ float locationZ; - /* X component of the normal vector to the terrain we found. */ + /* X component of the normal vector to the terrain we found. */ float normalX; - /* Y component of the normal vector to the terrain we found. */ + /* Y component of the normal vector to the terrain we found. */ float normalY; - /* Z component of the normal vector to the terrain we found. */ + /* Z component of the normal vector to the terrain we found. */ float normalZ; - /* X component of the velocity vector of the terrain we found. */ + /* X component of the velocity vector of the terrain we found. */ float velocityX; - /* Y component of the velocity vector of the terrain we found. */ + /* Y component of the velocity vector of the terrain we found. */ float velocityY; - /* Z component of the velocity vector of the terrain we found. */ + /* Z component of the velocity vector of the terrain we found. */ float velocityZ; - /* Tells if the surface we hit is water (otherwise it is land). */ + /* Tells if the surface we hit is water (otherwise it is land). */ int is_wet; } XPLMProbeInfo_t; /* * XPLMCreateProbe * - * Creates a new probe object of a given type and returns. + * Creates a new probe object of a given type and returns. * */ -XPLM_API XPLMProbeRef XPLMCreateProbe( - XPLMProbeType inProbeType); +XPLM_API XPLMProbeRef XPLMCreateProbe( + XPLMProbeType inProbeType); /* * XPLMDestroyProbe * - * Deallocates an existing probe object. + * Deallocates an existing probe object. * */ -XPLM_API void XPLMDestroyProbe( - XPLMProbeRef inProbe); +XPLM_API void XPLMDestroyProbe( + XPLMProbeRef inProbe); /* * XPLMProbeTerrainXYZ * - * Probes the terrain. Pass in the XYZ coordinate of the probe point, a probe - * object, and an XPLMProbeInfo_t struct that has its structSize member set - * properly. Other fields are filled in if we hit terrain, and a probe result - * is returned. + * Probes the terrain. Pass in the XYZ coordinate of the probe point, a probe + * object, and an XPLMProbeInfo_t struct that has its structSize member set + * properly. Other fields are filled in if we hit terrain, and a probe result + * is returned. * */ -XPLM_API XPLMProbeResult XPLMProbeTerrainXYZ( - XPLMProbeRef inProbe, - float inX, - float inY, - float inZ, - XPLMProbeInfo_t * outInfo); +XPLM_API XPLMProbeResult XPLMProbeTerrainXYZ( + XPLMProbeRef inProbe, + float inX, + float inY, + float inZ, + XPLMProbeInfo_t * outInfo); #endif /* XPLM200 */ #if defined(XPLM300) @@ -180,16 +177,16 @@ XPLM_API XPLMProbeResult XPLMProbeTerrainXYZ( * Magnetic Variation ***************************************************************************/ /* - * Use the magnetic variation (more properly, the "magnetic declination") API - * to find the offset of magnetic north from true north at a given latitude - * and longitude within the simulator. + * Use the magnetic variation (more properly, the "magnetic declination") API + * to find the offset of magnetic north from true north at a given latitude + * and longitude within the simulator. * - * In the real world, the Earth's magnetic field is irregular, such that true - * north (the direction along a meridian toward the north pole) does not - * necessarily match what a magnetic compass shows as north. + * In the real world, the Earth's magnetic field is irregular, such that true + * north (the direction along a meridian toward the north pole) does not + * necessarily match what a magnetic compass shows as north. * - * Using this API ensures that you present the same offsets to users as - * X-Plane's built-in instruments. + * Using this API ensures that you present the same offsets to users as + * X-Plane's built-in instruments. * */ @@ -197,43 +194,43 @@ XPLM_API XPLMProbeResult XPLMProbeTerrainXYZ( /* * XPLMGetMagneticVariation * - * Returns X-Plane's simulated magnetic variation (declination) at the - * indication latitude and longitude. + * Returns X-Plane's simulated magnetic variation (declination) at the + * indication latitude and longitude. * */ -XPLM_API float XPLMGetMagneticVariation( - double latitude, - double longitude); +XPLM_API float XPLMGetMagneticVariation( + double latitude, + double longitude); /* * XPLMDegTrueToDegMagnetic * - * Converts a heading in degrees relative to true north into a value relative - * to magnetic north at the user's current location. + * Converts a heading in degrees relative to true north into a value relative + * to magnetic north at the user's current location. * */ -XPLM_API float XPLMDegTrueToDegMagnetic( - float headingDegreesTrue); +XPLM_API float XPLMDegTrueToDegMagnetic( + float headingDegreesTrue); /* * XPLMDegMagneticToDegTrue * - * Converts a heading in degrees relative to magnetic north at the user's - * current location into a value relative to true north. + * Converts a heading in degrees relative to magnetic north at the user's + * current location into a value relative to true north. * */ -XPLM_API float XPLMDegMagneticToDegTrue( - float headingDegreesMagnetic); +XPLM_API float XPLMDegMagneticToDegTrue( + float headingDegreesMagnetic); #endif /* XPLM300 */ /*************************************************************************** * Object Drawing ***************************************************************************/ /* - * The object drawing routines let you load and draw X-Plane OBJ files. - * Objects are loaded by file path and managed via an opaque handle. X-Plane - * naturally reference counts objects, so it is important that you balance - * every successful call to XPLMLoadObject with a call to XPLMUnloadObject! + * The object drawing routines let you load and draw X-Plane OBJ files. + * Objects are loaded by file path and managed via an opaque handle. X-Plane + * naturally reference counts objects, so it is important that you balance + * every successful call to XPLMLoadObject with a call to XPLMUnloadObject! * */ @@ -242,8 +239,8 @@ XPLM_API float XPLMDegMagneticToDegTrue( /* * XPLMObjectRef * - * An XPLMObjectRef is a opaque handle to an .obj file that has been loaded - * into memory. + * An XPLMObjectRef is a opaque handle to an .obj file that has been loaded + * into memory. * */ typedef void * XPLMObjectRef; @@ -253,25 +250,25 @@ typedef void * XPLMObjectRef; /* * XPLMDrawInfo_t * - * The XPLMDrawInfo_t structure contains positioning info for one object that - * is to be drawn. Be sure to set structSize to the size of the structure for - * future expansion. + * The XPLMDrawInfo_t structure contains positioning info for one object that + * is to be drawn. Be sure to set structSize to the size of the structure for + * future expansion. * */ typedef struct { - /* Set this to the size of this structure! */ + /* Set this to the size of this structure! */ int structSize; - /* X location of the object in local coordinates. */ + /* X location of the object in local coordinates. */ float x; - /* Y location of the object in local coordinates. */ + /* Y location of the object in local coordinates. */ float y; - /* Z location of the object in local coordinates. */ + /* Z location of the object in local coordinates. */ float z; - /* Pitch in degres to rotate the object, positive is up. */ + /* Pitch in degres to rotate the object, positive is up. */ float pitch; - /* Heading in local coordinates to rotate the object, clockwise. */ + /* Heading in local coordinates to rotate the object, clockwise. */ float heading; - /* Roll to rotate the object. */ + /* Roll to rotate the object. */ float roll; } XPLMDrawInfo_t; #endif /* XPLM200 */ @@ -280,120 +277,119 @@ typedef struct { /* * XPLMObjectLoaded_f * - * You provide this callback when loading an object asynchronously; it will be - * called once the object is loaded. Your refcon is passed back. The object - * ref passed in is the newly loaded object (ready for use) or NULL if an - * error occured. + * You provide this callback when loading an object asynchronously; it will be + * called once the object is loaded. Your refcon is passed back. The object + * ref passed in is the newly loaded object (ready for use) or NULL if an + * error occured. * - * If your plugin is disabled, this callback will be delivered as soon as the - * plugin is re-enabled. If your plugin is unloaded before this callback is - * ever called, the SDK will release the object handle for you. + * If your plugin is disabled, this callback will be delivered as soon as the + * plugin is re-enabled. If your plugin is unloaded before this callback is + * ever called, the SDK will release the object handle for you. * */ typedef void (* XPLMObjectLoaded_f)( - XPLMObjectRef inObject, - void * inRefcon); + XPLMObjectRef inObject, + void * inRefcon); #endif /* XPLM210 */ #if defined(XPLM200) /* * XPLMLoadObject * - * This routine loads an OBJ file and returns a handle to it. If X-Plane has - * already loaded the object, the handle to the existing object is returned. - * Do not assume you will get the same handle back twice, but do make sure to - * call unload once for every load to avoid "leaking" objects. The object will - * be purged from memory when no plugins and no scenery are using it. + * This routine loads an OBJ file and returns a handle to it. If X-Plane has + * already loaded the object, the handle to the existing object is returned. + * Do not assume you will get the same handle back twice, but do make sure to + * call unload once for every load to avoid "leaking" objects. The object will + * be purged from memory when no plugins and no scenery are using it. * - * The path for the object must be relative to the X-System base folder. If - * the path is in the root of the X-System folder you may need to prepend ./ - * to it; loading objects in the root of the X-System folder is STRONGLY - * discouraged - your plugin should not dump art resources in the root folder! + * The path for the object must be relative to the X-System base folder. If + * the path is in the root of the X-System folder you may need to prepend ./ + * to it; loading objects in the root of the X-System folder is STRONGLY + * discouraged - your plugin should not dump art resources in the root folder! * - * XPLMLoadObject will return NULL if the object cannot be loaded (either - * because it is not found or the file is misformatted). This routine will - * load any object that can be used in the X-Plane scenery system. * - * It is important that the datarefs an object uses for animation already be - * loaded before you load the object. For this reason it may be necessary to - * defer object loading until the sim has fully started. + * XPLMLoadObject will return NULL if the object cannot be loaded (either + * because it is not found or the file is misformatted). This routine will + * load any object that can be used in the X-Plane scenery system. + * + * It is important that the datarefs an object uses for animation already be + * loaded before you load the object. For this reason it may be necessary to + * defer object loading until the sim has fully started. * */ -XPLM_API XPLMObjectRef XPLMLoadObject( - const char * inPath); +XPLM_API XPLMObjectRef XPLMLoadObject( + const char * inPath); #endif /* XPLM200 */ #if defined(XPLM210) /* * XPLMLoadObjectAsync * - * This routine loads an object asynchronously; control is returned to you - * immediately while X-Plane loads the object. The sim will not stop flying - * while the object loads. For large objects, it may be several seconds before - * the load finishes. + * This routine loads an object asynchronously; control is returned to you + * immediately while X-Plane loads the object. The sim will not stop flying + * while the object loads. For large objects, it may be several seconds before + * the load finishes. * - * You provide a callback function that is called once the load has completed. - * Note that if the object cannot be loaded, you will not find out until the - * callback function is called with a NULL object handle. + * You provide a callback function that is called once the load has completed. + * Note that if the object cannot be loaded, you will not find out until the + * callback function is called with a NULL object handle. * - * There is no way to cancel an asynchronous object load; you must wait for - * the load to complete and then release the object if it is no longer - * desired. + * There is no way to cancel an asynchronous object load; you must wait for + * the load to complete and then release the object if it is no longer + * desired. * */ -XPLM_API void XPLMLoadObjectAsync( - const char * inPath, - XPLMObjectLoaded_f inCallback, - void * inRefcon); +XPLM_API void XPLMLoadObjectAsync( + const char * inPath, + XPLMObjectLoaded_f inCallback, + void * inRefcon); #endif /* XPLM210 */ -#if defined(XPLM_DEPRECATED) +#if defined(XPLM200) /* * XPLMDrawObjects * - * __Deprecation Warning__: use XPLMInstancing to draw 3-d objects by creating - * instances, rather than these APIs from draw callbacks. + * XPLMDrawObjects draws an object from an OBJ file one or more times. You + * pass in the object and an array of XPLMDrawInfo_t structs, one for each + * place you would like the object to be drawn. * - * XPLMDrawObjects draws an object from an OBJ file one or more times. You - * pass in the object and an array of XPLMDrawInfo_t structs, one for each - * place you would like the object to be drawn. + * X-Plane will attempt to cull the objects based on LOD and visibility, and + * will pick the appropriate LOD. * - * X-Plane will attempt to cull the objects based on LOD and visibility, and - * will pick the appropriate LOD. + * Lighting is a boolean; pass 1 to show the night version of object with + * night-only lights lit up. Pass 0 to show the daytime version of the object. * - * Lighting is a boolean; pass 1 to show the night version of object with - * night-only lights lit up. Pass 0 to show the daytime version of the object. * - * earth_relative controls the coordinate system. If this is 1, the rotations - * you specify are applied to the object after its coordinate system is - * transformed from local to earth-relative coordinates -- that is, an object - * with no rotations will point toward true north and the Y axis will be up - * against gravity. If this is 0, the object is drawn with your rotations from - * local coordanates -- that is, an object with no rotations is drawn pointing - * down the -Z axis and the Y axis of the object matches the local coordinate - * Y axis. + * earth_relative controls the coordinate system. If this is 1, the rotations + * you specify are applied to the object after its coordinate system is + * transformed from local to earth-relative coordinates -- that is, an object + * with no rotations will point toward true north and the Y axis will be up + * against gravity. If this is 0, the object is drawn with your rotations from + * local coordanates -- that is, an object with no rotations is drawn pointing + * down the -Z axis and the Y axis of the object matches the local coordinate + * Y axis. * */ -XPLM_API void XPLMDrawObjects( - XPLMObjectRef inObject, - int inCount, - XPLMDrawInfo_t * inLocations, - int lighting, - int earth_relative); -#endif /* XPLM_DEPRECATED */ +XPLM_API void XPLMDrawObjects( + XPLMObjectRef inObject, + int inCount, + XPLMDrawInfo_t * inLocations, + int lighting, + int earth_relative); +#endif /* XPLM200 */ #if defined(XPLM200) /* * XPLMUnloadObject * - * This routine marks an object as no longer being used by your plugin. - * Objects are reference counted: once no plugins are using an object, it is - * purged from memory. Make sure to call XPLMUnloadObject once for each - * successful call to XPLMLoadObject. + * This routine marks an object as no longer being used by your plugin. + * Objects are reference counted: once no plugins are using an object, it is + * purged from memory. Make sure to call XPLMUnloadObject once for each + * successful call to XPLMLoadObject. * */ -XPLM_API void XPLMUnloadObject( - XPLMObjectRef inObject); +XPLM_API void XPLMUnloadObject( + XPLMObjectRef inObject); #endif /* XPLM200 */ #if defined(XPLM200) @@ -401,10 +397,10 @@ XPLM_API void XPLMUnloadObject( * Library Access ***************************************************************************/ /* - * The library access routines allow you to locate scenery objects via the - * X-Plane library system. Right now library access is only provided for - * objects, allowing plugin-drawn objects to be extended using the library - * system. + * The library access routines allow you to locate scenery objects via the + * X-Plane library system. Right now library access is only provided for + * objects, allowing plugin-drawn objects to be extended using the library + * system. * */ @@ -412,35 +408,35 @@ XPLM_API void XPLMUnloadObject( /* * XPLMLibraryEnumerator_f * - * An XPLMLibraryEnumerator_f is a callback you provide that is called once - * for each library element that is located. The returned paths will be - * relative to the X-System folder. + * An XPLMLibraryEnumerator_f is a callback you provide that is called once + * for each library element that is located. The returned paths will be + * relative to the X-System folder. * */ typedef void (* XPLMLibraryEnumerator_f)( - const char * inFilePath, - void * inRef); + const char * inFilePath, + void * inRef); /* * XPLMLookupObjects * - * This routine looks up a virtual path in the library system and returns all - * matching elements. You provide a callback - one virtual path may match many - * objects in the library. XPLMLookupObjects returns the number of objects - * found. + * This routine looks up a virtual path in the library system and returns all + * matching elements. You provide a callback - one virtual path may match many + * objects in the library. XPLMLookupObjects returns the number of objects + * found. * - * The latitude and longitude parameters specify the location the object will - * be used. The library system allows for scenery packages to only provide - * objects to certain local locations. Only objects that are allowed at the - * latitude/longitude you provide will be returned. + * The latitude and longitude parameters specify the location the object will + * be used. The library system allows for scenery packages to only provide + * objects to certain local locations. Only objects that are allowed at the + * latitude/longitude you provide will be returned. * */ -XPLM_API int XPLMLookupObjects( - const char * inPath, - float inLatitude, - float inLongitude, - XPLMLibraryEnumerator_f enumerator, - void * ref); +XPLM_API int XPLMLookupObjects( + const char * inPath, + float inLatitude, + float inLongitude, + XPLMLibraryEnumerator_f enumerator, + void * ref); #endif /* XPLM200 */ #ifdef __cplusplus diff --git a/src/SDK/CHeaders/XPLM/XPLMUtilities.h b/src/SDK/CHeaders/XPLM/XPLMUtilities.h index bec319e1..a3bab8c8 100755 --- a/src/SDK/CHeaders/XPLM/XPLMUtilities.h +++ b/src/SDK/CHeaders/XPLM/XPLMUtilities.h @@ -2,14 +2,18 @@ #define _XPLMUtilities_h_ /* - * 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 * */ -/*************************************************************************** - * XPLMUtilities - ***************************************************************************/ +/* + * + * + */ #include "XPLMDefs.h" @@ -18,512 +22,668 @@ extern "C" { #endif /*************************************************************************** - * FILE UTILITIES + * X-PLANE USER INTERACTION ***************************************************************************/ /* - * The XPLMUtilities file APIs provide some basic file and path functions for - * use with X-Plane. - * - * Directory Separators - * -------------------- - * - * The XPLM has two modes it can work in: - * - * * X-Plane native paths: all paths are UTF8 strings, using the unix forward - * slash (/) as the directory separating character. In native path mode, - * you use the same path format for all three operating systems. - * - * * Legacy OS paths: the directroy separator is \ for Windows, : for OS X, - * and / for Linux; OS paths are encoded in MacRoman for OS X using legacy - * HFS conventions, use the application code page for multi-byte encoding - * on Unix using DOS path conventions, and use UTF-8 for Linux. - * - * While legacy OS paths are the default, we strongly encourage you to opt in - * to native paths using the XPLMEnableFeature API. - * - * * All OS X plugins should enable native paths all of the time; if you do - * not do this, you will have to convert all paths back from HFS to Unix - * (and deal with MacRoman) - code written using native paths and the C - * file APIs "just works" on OS X. + * The user interaction APIs let you simulate commands the user can do with a + * joystick, keyboard etc. Note that it is generally safer for future + * compatibility to use one of these commands than to manipulate the + * underlying sim data. + * + */ + + +/* + * XPLMCommandKeyID * - * * For Linux plugins, there is no difference between the two encodings. + * These enums represent all the keystrokes available within X-Plane. They can + * be sent to X-Plane directly. For example, you can reverse thrust using + * these enumerations. + * + */ +enum { + xplm_key_pause=0, + xplm_key_revthrust, + xplm_key_jettison, + xplm_key_brakesreg, + xplm_key_brakesmax, + xplm_key_gear, + xplm_key_timedn, + xplm_key_timeup, + xplm_key_fadec, + xplm_key_otto_dis, + xplm_key_otto_atr, + xplm_key_otto_asi, + xplm_key_otto_hdg, + xplm_key_otto_gps, + xplm_key_otto_lev, + xplm_key_otto_hnav, + xplm_key_otto_alt, + xplm_key_otto_vvi, + xplm_key_otto_vnav, + xplm_key_otto_nav1, + xplm_key_otto_nav2, + xplm_key_targ_dn, + xplm_key_targ_up, + xplm_key_hdgdn, + xplm_key_hdgup, + xplm_key_barodn, + xplm_key_baroup, + xplm_key_obs1dn, + xplm_key_obs1up, + xplm_key_obs2dn, + xplm_key_obs2up, + xplm_key_com1_1, + xplm_key_com1_2, + xplm_key_com1_3, + xplm_key_com1_4, + xplm_key_nav1_1, + xplm_key_nav1_2, + xplm_key_nav1_3, + xplm_key_nav1_4, + xplm_key_com2_1, + xplm_key_com2_2, + xplm_key_com2_3, + xplm_key_com2_4, + xplm_key_nav2_1, + xplm_key_nav2_2, + xplm_key_nav2_3, + xplm_key_nav2_4, + xplm_key_adf_1, + xplm_key_adf_2, + xplm_key_adf_3, + xplm_key_adf_4, + xplm_key_adf_5, + xplm_key_adf_6, + xplm_key_transpon_1, + xplm_key_transpon_2, + xplm_key_transpon_3, + xplm_key_transpon_4, + xplm_key_transpon_5, + xplm_key_transpon_6, + xplm_key_transpon_7, + xplm_key_transpon_8, + xplm_key_flapsup, + xplm_key_flapsdn, + xplm_key_cheatoff, + xplm_key_cheaton, + xplm_key_sbrkoff, + xplm_key_sbrkon, + xplm_key_ailtrimL, + xplm_key_ailtrimR, + xplm_key_rudtrimL, + xplm_key_rudtrimR, + xplm_key_elvtrimD, + xplm_key_elvtrimU, + xplm_key_forward, + xplm_key_down, + xplm_key_left, + xplm_key_right, + xplm_key_back, + xplm_key_tower, + xplm_key_runway, + xplm_key_chase, + xplm_key_free1, + xplm_key_free2, + xplm_key_spot, + xplm_key_fullscrn1, + xplm_key_fullscrn2, + xplm_key_tanspan, + xplm_key_smoke, + xplm_key_map, + xplm_key_zoomin, + xplm_key_zoomout, + xplm_key_cycledump, + xplm_key_replay, + xplm_key_tranID, + xplm_key_max +}; +typedef int XPLMCommandKeyID; + +/* + * XPLMCommandButtonID * - * * Windows plugins will need to convert the UTF8 file paths to UTF16 for - * use with the "wide" APIs. While it might seem tempting to stick with - * legacy OS paths (and just use the "ANSI" Windows APIs), X-Plane is fully - * unicode-capable, and will often be installed in paths where the user's - * directories have no ACP encoding. + * These are enumerations for all of the things you can do with a joystick + * button in X-Plane. They currently match the buttons menu in the equipment + * setup dialog, but these enums will be stable even if they change in + * X-Plane. + * + */ +enum { + xplm_joy_nothing=0, + xplm_joy_start_all, + xplm_joy_start_0, + xplm_joy_start_1, + xplm_joy_start_2, + xplm_joy_start_3, + xplm_joy_start_4, + xplm_joy_start_5, + xplm_joy_start_6, + xplm_joy_start_7, + xplm_joy_throt_up, + xplm_joy_throt_dn, + xplm_joy_prop_up, + xplm_joy_prop_dn, + xplm_joy_mixt_up, + xplm_joy_mixt_dn, + xplm_joy_carb_tog, + xplm_joy_carb_on, + xplm_joy_carb_off, + xplm_joy_trev, + xplm_joy_trm_up, + xplm_joy_trm_dn, + xplm_joy_rot_trm_up, + xplm_joy_rot_trm_dn, + xplm_joy_rud_lft, + xplm_joy_rud_cntr, + xplm_joy_rud_rgt, + xplm_joy_ail_lft, + xplm_joy_ail_cntr, + xplm_joy_ail_rgt, + xplm_joy_B_rud_lft, + xplm_joy_B_rud_rgt, + xplm_joy_look_up, + xplm_joy_look_dn, + xplm_joy_look_lft, + xplm_joy_look_rgt, + xplm_joy_glance_l, + xplm_joy_glance_r, + xplm_joy_v_fnh, + xplm_joy_v_fwh, + xplm_joy_v_tra, + xplm_joy_v_twr, + xplm_joy_v_run, + xplm_joy_v_cha, + xplm_joy_v_fr1, + xplm_joy_v_fr2, + xplm_joy_v_spo, + xplm_joy_flapsup, + xplm_joy_flapsdn, + xplm_joy_vctswpfwd, + xplm_joy_vctswpaft, + xplm_joy_gear_tog, + xplm_joy_gear_up, + xplm_joy_gear_down, + xplm_joy_lft_brake, + xplm_joy_rgt_brake, + xplm_joy_brakesREG, + xplm_joy_brakesMAX, + xplm_joy_speedbrake, + xplm_joy_ott_dis, + xplm_joy_ott_atr, + xplm_joy_ott_asi, + xplm_joy_ott_hdg, + xplm_joy_ott_alt, + xplm_joy_ott_vvi, + xplm_joy_tim_start, + xplm_joy_tim_reset, + xplm_joy_ecam_up, + xplm_joy_ecam_dn, + xplm_joy_fadec, + xplm_joy_yaw_damp, + xplm_joy_art_stab, + xplm_joy_chute, + xplm_joy_JATO, + xplm_joy_arrest, + xplm_joy_jettison, + xplm_joy_fuel_dump, + xplm_joy_puffsmoke, + xplm_joy_prerotate, + xplm_joy_UL_prerot, + xplm_joy_UL_collec, + xplm_joy_TOGA, + xplm_joy_shutdown, + xplm_joy_con_atc, + xplm_joy_fail_now, + xplm_joy_pause, + xplm_joy_rock_up, + xplm_joy_rock_dn, + xplm_joy_rock_lft, + xplm_joy_rock_rgt, + xplm_joy_rock_for, + xplm_joy_rock_aft, + xplm_joy_idle_hilo, + xplm_joy_lanlights, + xplm_joy_max +}; +typedef int XPLMCommandButtonID; + +/* + * XPLMHostApplicationID * - * Full and Relative Paths - * ----------------------- + * The plug-in system is based on Austin's cross-platform OpenGL framework and + * could theoretically be adapted to run in other apps like WorldMaker. The + * plug-in system also runs against a test harness for internal development + * and could be adapted to another flight sim (in theory at least). So an ID + * is providing allowing plug-ins to indentify what app they are running + * under. + * + */ +enum { + xplm_Host_Unknown = 0 + + ,xplm_Host_XPlane = 1 + + ,xplm_Host_PlaneMaker = 2 + + ,xplm_Host_WorldMaker = 3 + + ,xplm_Host_Briefer = 4 + + ,xplm_Host_PartMaker = 5 + + ,xplm_Host_YoungsMod = 6 + + ,xplm_Host_XAuto = 7 + + +}; +typedef int XPLMHostApplicationID; + +/* + * XPLMLanguageCode * - * Some of these APIs use full paths, but others use paths relative to the - * user's X-Plane installation. This is documented on a per-API basis. + * These enums define what language the sim is running in. These enumerations + * do not imply that the sim can or does run in all of these languages; they + * simply provide a known encoding in the event that a given sim version is + * localized to a certain language. * */ +enum { + xplm_Language_Unknown = 0 + ,xplm_Language_English = 1 + + ,xplm_Language_French = 2 + + ,xplm_Language_German = 3 + + ,xplm_Language_Italian = 4 + + ,xplm_Language_Spanish = 5 + + ,xplm_Language_Korean = 6 + +#if defined(XPLM200) + ,xplm_Language_Russian = 7 + +#endif /* XPLM200 */ +#if defined(XPLM200) + ,xplm_Language_Greek = 8 + +#endif /* XPLM200 */ +#if defined(XPLM200) + ,xplm_Language_Japanese = 9 + +#endif /* XPLM200 */ +#if defined(XPLM200) + ,xplm_Language_Chinese = 10 + +#endif /* XPLM200 */ + +}; +typedef int XPLMLanguageCode; #if defined(XPLM200) /* * XPLMDataFileType * - * These enums define types of data files you can load or unload using the - * SDK. + * These enums define types of data files you can load or unload using the + * SDK. * */ enum { - /* A situation (.sit) file, which starts off a flight in a given * - * configuration. */ - xplm_DataFile_Situation = 1, + /* A situation (.sit) file, which starts off a flight in a given * + * configuration. */ + xplm_DataFile_Situation = 1 - /* A situation movie (.smo) file, which replays a past flight. */ - xplm_DataFile_ReplayMovie = 2, + /* A situation movie (.smo) file, which replays a past flight. */ + ,xplm_DataFile_ReplayMovie = 2 }; typedef int XPLMDataFileType; #endif /* XPLM200 */ +#if defined(XPLM200) /* - * XPLMGetSystemPath - * - * This function returns the full path to the X-System folder. Note that this - * is a directory path, so it ends in a trailing : or /. + * XPLMError_f * - * The buffer you pass should be at least 512 characters long. The path is - * returned using the current native or OS path conventions. + * An XPLM error callback is a function that you provide to receive debugging + * information from the plugin SDK. See XPLMSetErrorCallback for more + * information. NOTE: for the sake of debugging, your error callback will be + * called even if your plugin is not enabled, allowing you to receive debug + * info in your XPluginStart and XPluginStop callbacks. To avoid causing logic + * errors in the management code, do not call any other plugin routines from + * your error callback - it is only meant for logging! * */ -XPLM_API void XPLMGetSystemPath( - char * outSystemPath); +typedef void (* XPLMError_f)( + const char * inMessage); +#endif /* XPLM200 */ /* - * XPLMGetPrefsPath + * XPLMSimulateKeyPress * - * This routine returns a full path to a file that is within X-Plane's - * preferences directory. (You should remove the file name back to the last - * directory separator to get the preferences directory using - * XPLMExtractFileAndPath.) + * This function simulates a key being pressed for X-Plane. The keystroke goes + * directly to X-Plane; it is never sent to any plug-ins. However, since this + * is a raw key stroke it may be mapped by the keys file or enter text into a + * field. * - * The buffer you pass should be at least 512 characters long. The path is - * returned using the current native or OS path conventions. + * WARNING: This function will be deprecated; do not use it. Instead use + * XPLMCommandKeyStroke. * */ -XPLM_API void XPLMGetPrefsPath( - char * outPrefsPath); +XPLM_API void XPLMSimulateKeyPress( + int inKeyType, + int inKey); /* - * XPLMGetDirectorySeparator + * XPLMSpeakString * - * This routine returns a string with one char and a null terminator that is - * the directory separator for the current platform. This allows you to write - * code that concatinates directory paths without having to #ifdef for - * platform. The character returned will reflect the current file path mode. + * This function displays the string in a translucent overlay over the current + * display and also speaks the string if text-to-speech is enabled. The string + * is spoken asynchronously, this function returns immediately. * */ -XPLM_API const char * XPLMGetDirectorySeparator(void); +XPLM_API void XPLMSpeakString( + const char * inString); /* - * XPLMExtractFileAndPath + * XPLMCommandKeyStroke * - * Given a full path to a file, this routine separates the path from the file. - * If the path is a partial directory (e.g. ends in : or \) the trailing - * directory separator is removed. This routine works in-place; a pointer to - * the file part of the buffer is returned; the original buffer still starts - * with the path and is null terminated with no trailing separator. + * This routine simulates a command-key stroke. However, the keys are done by + * function, not by actual letter, so this function works even if the user has + * remapped their keyboard. Examples of things you might do with this include + * pausing the simulator. * */ -XPLM_API char * XPLMExtractFileAndPath( - char * inFullPath); +XPLM_API void XPLMCommandKeyStroke( + XPLMCommandKeyID inKey); /* - * XPLMGetDirectoryContents - * - * This routine returns a list of files in a directory (specified by a full - * path, no trailing : or \). The output is returned as a list of NULL - * terminated strings. An index array (if specified) is filled with pointers - * into the strings. The last file is indicated by a zero-length string (and - * NULL in the indices). This routine will return 1 if you had capacity for - * all files or 0 if you did not. You can also skip a given number of files. - * - * * inDirectoryPath - a null terminated C string containing the full path to - * the directory with no trailing directory char. - * - * * inFirstReturn - the zero-based index of the first file in the directory - * to return. (Usually zero to fetch all in one pass.) - * - * * outFileNames - a buffer to receive a series of sequential null - * terminated C-string file names. A zero-length C string will be appended - * to the very end. - * - * * inFileNameBufSize - the size of the file name buffer in bytes. - * - * * outIndices - a pointer to an array of character pointers that will - * become an index into the directory. The last file will be followed by a - * NULL value. Pass NULL if you do not want indexing information. - * - * * inIndexCount - the max size of the index in entries. - * - * * outTotalFiles - if not NULL, this is filled in with the number of files - * in the directory. - * - * * outReturnedFiles - if not NULL, the number of files returned by this - * iteration. - * - * Return value: 1 if all info could be returned, 0 if there was a buffer - * overrun. + * XPLMCommandButtonPress * - * WARNING: Before X-Plane 7 this routine did not properly iterate through - * directories. If X-Plane - * 6 compatibility is needed, use your own code to iterate directories. + * This function simulates any of the actions that might be taken by pressing + * a joystick button. However, this lets you call the command directly rather + * than have to know which button is mapped where. Important: you must release + * each button you press. The APIs are separate so that you can 'hold down' a + * button for a fixed amount of time. * */ -XPLM_API int XPLMGetDirectoryContents( - const char * inDirectoryPath, - int inFirstReturn, - char * outFileNames, - int inFileNameBufSize, - char ** outIndices, /* Can be NULL */ - int inIndexCount, - int * outTotalFiles, /* Can be NULL */ - int * outReturnedFiles); /* Can be NULL */ +XPLM_API void XPLMCommandButtonPress( + XPLMCommandButtonID inButton); -#if defined(XPLM200) /* - * XPLMLoadDataFile + * XPLMCommandButtonRelease * - * Loads a data file of a given type. Paths must be relative to the X-System - * folder. To clear the replay, pass a NULL file name (this is only valid with - * replay movies, not sit files). + * This function simulates any of the actions that might be taken by pressing + * a joystick button. See XPLMCommandButtonPress * */ -XPLM_API int XPLMLoadDataFile( - XPLMDataFileType inFileType, - const char * inFilePath); /* Can be NULL */ -#endif /* XPLM200 */ +XPLM_API void XPLMCommandButtonRelease( + XPLMCommandButtonID inButton); -#if defined(XPLM200) /* - * XPLMSaveDataFile + * XPLMGetVirtualKeyDescription * - * Saves the current situation or replay; paths are relative to the X-System - * folder. + * Given a virtual key code (as defined in XPLMDefs.h) this routine returns a + * human-readable string describing the character. This routine is provided + * for showing users what keyboard mappings they have set up. The string may + * read 'unknown' or be a blank or NULL string if the virtual key is unknown. * */ -XPLM_API int XPLMSaveDataFile( - XPLMDataFileType inFileType, - const char * inFilePath); -#endif /* XPLM200 */ +XPLM_API const char * XPLMGetVirtualKeyDescription( + char inVirtualKey); /*************************************************************************** * X-PLANE MISC ***************************************************************************/ - /* - * XPLMHostApplicationID - * - * While the plug-in SDK is only accessible to plugins running inside X-Plane, - * the original authors considered extending the API to other applications - * that shared basic infrastructure with X-Plane. These enumerations are - * hold-overs from that original roadmap; all values other than X-Plane are - * deprecated. Your plugin should never need this enumeration. + * * */ -enum { - xplm_Host_Unknown = 0, - - xplm_Host_XPlane = 1, - -#if defined(XPLM_DEPRECATED) - xplm_Host_PlaneMaker = 2, - -#endif /* XPLM_DEPRECATED */ -#if defined(XPLM_DEPRECATED) - xplm_Host_WorldMaker = 3, - -#endif /* XPLM_DEPRECATED */ -#if defined(XPLM_DEPRECATED) - xplm_Host_Briefer = 4, - -#endif /* XPLM_DEPRECATED */ -#if defined(XPLM_DEPRECATED) - xplm_Host_PartMaker = 5, - -#endif /* XPLM_DEPRECATED */ -#if defined(XPLM_DEPRECATED) - xplm_Host_YoungsMod = 6, - -#endif /* XPLM_DEPRECATED */ -#if defined(XPLM_DEPRECATED) - xplm_Host_XAuto = 7, - -#endif /* XPLM_DEPRECATED */ - -}; -typedef int XPLMHostApplicationID; /* - * XPLMLanguageCode + * XPLMReloadScenery * - * These enums define what language the sim is running in. These enumerations - * do not imply that the sim can or does run in all of these languages; they - * simply provide a known encoding in the event that a given sim version is - * localized to a certain language. + * XPLMReloadScenery reloads the current set of scenery. You can use this + * function in two typical ways: simply call it to reload the scenery, picking + * up any new installed scenery, .env files, etc. from disk. Or, change the + * lat/ref and lon/ref data refs and then call this function to shift the + * scenery environment. * */ -enum { - xplm_Language_Unknown = 0, - - xplm_Language_English = 1, - - xplm_Language_French = 2, +XPLM_API void XPLMReloadScenery(void); - xplm_Language_German = 3, - - xplm_Language_Italian = 4, - - xplm_Language_Spanish = 5, - - xplm_Language_Korean = 6, - -#if defined(XPLM200) - xplm_Language_Russian = 7, - -#endif /* XPLM200 */ -#if defined(XPLM200) - xplm_Language_Greek = 8, - -#endif /* XPLM200 */ -#if defined(XPLM200) - xplm_Language_Japanese = 9, - -#endif /* XPLM200 */ -#if defined(XPLM300) - xplm_Language_Chinese = 10, - -#endif /* XPLM300 */ - -}; -typedef int XPLMLanguageCode; - -#if defined(XPLM200) /* - * XPLMError_f + * XPLMGetSystemPath * - * An XPLM error callback is a function that you provide to receive debugging - * information from the plugin SDK. See XPLMSetErrorCallback for more - * information. NOTE: for the sake of debugging, your error callback will be - * called even if your plugin is not enabled, allowing you to receive debug - * info in your XPluginStart and XPluginStop callbacks. To avoid causing logic - * errors in the management code, do not call any other plugin routines from - * your error callback - it is only meant for catching errors in the - * debugging. + * This function returns the full path to the X-System folder. Note that this + * is a directory path, so it ends in a trailing : or /. The buffer you pass + * should be at least 512 characters long. * */ -typedef void (* XPLMError_f)( - const char * inMessage); -#endif /* XPLM200 */ +XPLM_API void XPLMGetSystemPath( + char * outSystemPath); -#if defined(XPLM_DEPRECATED) /* - * XPLMInitialized - * - * Deprecated: This function returns 1 if X-Plane has properly initialized the - * plug-in system. If this routine returns 0, many XPLM functions will not - * work. + * XPLMGetPrefsPath * - * NOTE: because plugins are always called from within the XPLM, there is no - * need to check for initialization; it will always return 1. This routine is - * deprecated - you do not need to check it before continuing within your - * plugin. + * This routine returns a full path to a file that is within X-Plane's + * preferences directory. (You should remove the file name back to the last + * directory separator to get the preferences directory. The buffer you pass + * should be at least 512 characters long. * */ -XPLM_API int XPLMInitialized(void); -#endif /* XPLM_DEPRECATED */ +XPLM_API void XPLMGetPrefsPath( + char * outPrefsPath); /* - * XPLMGetVersions - * - * This routine returns the revision of both X-Plane and the XPLM DLL. All - * versions are three-digit decimal numbers (e.g. 606 for version 6.06 of - * X-Plane); the current revision of the XPLM is 200 (2.00). This routine also - * returns the host ID of the app running us. + * XPLMGetDirectorySeparator * - * The most common use of this routine is to special-case around X-Plane - * version-specific behavior. + * This routine returns a string with one char and a null terminator that is + * the directory separator for the current platform. This allows you to write + * code that concatinates directory paths without having to #ifdef for + * platform. * */ -XPLM_API void XPLMGetVersions( - int * outXPlaneVersion, - int * outXPLMVersion, - XPLMHostApplicationID * outHostID); +XPLM_API const char * XPLMGetDirectorySeparator(void); /* - * XPLMGetLanguage + * XPLMExtractFileAndPath * - * This routine returns the langauge the sim is running in. + * Given a full path to a file, this routine separates the path from the file. + * If the path is a partial directory (e.g. ends in : or \) the trailing + * directory separator is removed. This routine works in-place; a pointer to + * the file part of the buffer is returned; the original buffer still starts + * with the path. * */ -XPLM_API XPLMLanguageCode XPLMGetLanguage(void); +XPLM_API char * XPLMExtractFileAndPath( + char * inFullPath); -#if defined(XPLM200) /* - * XPLMFindSymbol + * XPLMGetDirectoryContents + * + * This routine returns a list of files in a directory (specified by a full + * path, no trailing : or \). The output is returned as a list of NULL + * terminated strings. An index array (if specified) is filled with pointers + * into the strings. This routine The last file is indicated by a zero-length + * string (and NULL in the indices). This routine will return 1 if you had + * capacity for all files or 0 if you did not. You can also skip a given + * number of files. + * + * inDirectoryPath - a null terminated C string containing the full path to + * the directory with no trailing directory char. * - * This routine will attempt to find the symbol passed in the inString - * parameter. If the symbol is found a pointer the function is returned, - * othewise the function will return NULL. + * inFirstReturn - the zero-based index of the first file in the directory to + * return. (Usually zero to fetch all in one pass.) * - * You can use XPLMFindSymbol to utilize newer SDK API features without - * requiring newer versions of the SDK (and X-Plane) as your minimum X-Plane - * version as follows: + * outFileNames - a buffer to receive a series of sequential null terminated + * C-string file names. A zero-length C string will be appended to the very + * end. * - * * Define the XPLMnnn macro to the minimum required XPLM version you will - * ship with (e.g. XPLM210 for X-Plane 10 compatibility). + * inFileNameBufSize - the size of the file name buffer in bytes. * - * * Use XPLMGetVersions and XPLMFindSymbol to detect that the host sim is - * new enough to use new functions and resolve function pointers. + * outIndices - a pointer to an array of character pointers that will become + * an index into the directory. The last file will be followed by a NULL + * value. Pass NULL if you do not want indexing information. * - * * Conditionally use the new functions if and only if XPLMFindSymbol only - * returns a non- NULL pointer. + * inIndexCount - the max size of the index in entries. * - * Warning: you should always check the XPLM API version as well as the - * results of XPLMFindSymbol to determine if funtionality is safe to use. + * outTotalFiles - if not NULL, this is filled in with the number of files in + * the directory. * - * To use functionality via XPLMFindSymbol you will need to copy your own - * definitions of the X-Plane API prototypes and cast the returned pointer to - * the correct type. + * outReturnedFiles - if not NULL, the number of files returned by this + * iteration. + * + * Return value - 1 if all info could be returned, 0 if there was a buffer + * overrun. + * + * WARNING: Before X-Plane 7 this routine did not properly iterate through + * directories. If X-Plane 6 compatibility is needed, use your own code to + * iterate directories. * */ -XPLM_API void * XPLMFindSymbol( - const char * inString); -#endif /* XPLM200 */ +XPLM_API int XPLMGetDirectoryContents( + const char * inDirectoryPath, + int inFirstReturn, + char * outFileNames, + int inFileNameBufSize, + char ** outIndices, /* Can be NULL */ + int inIndexCount, + int * outTotalFiles, /* Can be NULL */ + int * outReturnedFiles); /* Can be NULL */ -#if defined(XPLM200) /* - * XPLMSetErrorCallback + * XPLMInitialized * - * XPLMSetErrorCallback installs an error-reporting callback for your plugin. - * Normally the plugin system performs minimum diagnostics to maximize - * performance. When you install an error callback, you will receive calls due - * to certain plugin errors, such as passing bad parameters or incorrect data. + * This function returns 1 if X-Plane has properly initialized the plug-in + * system. If this routine returns 0, many XPLM functions will not work. + * + * NOTE: Under normal circumstances a plug-in should never be running while + * the plug-in manager is not initialized. + * + * WARNING: This function is generally not needed and may be deprecated in the + * future. + * + */ +XPLM_API int XPLMInitialized(void); + +/* + * XPLMGetVersions * - * Important: the error callback determines *programming* errors, e.g. bad API - * parameters. Every error that is returned by the error callback represents a - * mistake in your plugin that you should fix. Error callbacks are not used to - * report expected run-time problems (e.g. disk I/O errors). + * This routine returns the revision of both X-Plane and the XPLM DLL. All + * versions are three-digit decimal numbers (e.g. 606 for version 6.06 of + * X-Plane); the current revision of the XPLM is 200 (2.00). This routine also + * returns the host ID of the app running us. * - * The intention is for you to install the error callback during debug - * sections and put a break-point inside your callback. This will cause you to - * break into the debugger from within the SDK at the point in your plugin - * where you made an illegal call. + * The most common use of this routine is to special-case around X-Plane + * version-specific behavior. + * + */ +XPLM_API void XPLMGetVersions( + int * outXPlaneVersion, + int * outXPLMVersion, + XPLMHostApplicationID * outHostID); + +/* + * XPLMGetLanguage * - * Installing an error callback may activate error checking code that would - * not normally run, and this may adversely affect performance, so do not - * leave error callbacks installed in shipping plugins. Since the only useful - * response to an error is to change code, error callbacks are not useful "in - * the field". + * This routine returns the langauge the sim is running in. * */ -XPLM_API void XPLMSetErrorCallback( - XPLMError_f inCallback); -#endif /* XPLM200 */ +XPLM_API XPLMLanguageCode XPLMGetLanguage(void); /* * XPLMDebugString * - * This routine outputs a C-style string to the Log.txt file. The file is - * immediately flushed so you will not lose data. (This does cause a - * performance penalty.) + * This routine outputs a C-style string to the Log.txt file. The file is + * immediately flushed so you will not lose data. (This does cause a + * performance penalty.) + * + */ +XPLM_API void XPLMDebugString( + const char * inString); + +#if defined(XPLM200) +/* + * XPLMSetErrorCallback + * + * XPLMSetErrorCallback installs an error-reporting callback for your plugin. + * Normally the plugin system performs minimum diagnostics to maximize + * performance. When you install an error callback, you will receive calls due + * to certain plugin errors, such as passing bad parameters or incorrect data. + * * - * Please do *not* leave routine diagnostic logging enabled in your shipping - * plugin. The X-Plane Log file is shared by X-Plane and every plugin in the - * system, and plugins that (when functioning normally) print verbose log - * output make it difficult for developers to find error conditions from other - * parts of the system. + * The intention is for you to install the error callback during debug + * sections and put a break-point inside your callback. This will cause you to + * break into the debugger from within the SDK at the point in your plugin + * where you made an illegal call. + * + * Installing an error callback may activate error checking code that would + * not normally run, and this may adversely affect performance, so do not + * leave error callbacks installed in shipping plugins. * */ -XPLM_API void XPLMDebugString( - const char * inString); +XPLM_API void XPLMSetErrorCallback( + XPLMError_f inCallback); +#endif /* XPLM200 */ +#if defined(XPLM200) /* - * XPLMSpeakString + * XPLMFindSymbol * - * This function displays the string in a translucent overlay over the current - * display and also speaks the string if text-to-speech is enabled. The string - * is spoken asynchronously, this function returns immediately. This function - * may not speak or print depending on user preferences. + * This routine will attempt to find the symbol passed in the inString + * parameter. If the symbol is found a pointer the function is returned, + * othewise the function will return NULL. * */ -XPLM_API void XPLMSpeakString( - const char * inString); +XPLM_API void * XPLMFindSymbol( + const char * inString); +#endif /* XPLM200 */ +#if defined(XPLM200) /* - * XPLMGetVirtualKeyDescription + * XPLMLoadDataFile * - * Given a virtual key code (as defined in XPLMDefs.h) this routine returns a - * human-readable string describing the character. This routine is provided - * for showing users what keyboard mappings they have set up. The string may - * read 'unknown' or be a blank or NULL string if the virtual key is unknown. + * Loads a data file of a given type. Paths must be relative to the X-System + * folder. To clear the replay, pass a NULL file name (this is only valid with + * replay movies, not sit files). * */ -XPLM_API const char * XPLMGetVirtualKeyDescription( - char inVirtualKey); +XPLM_API int XPLMLoadDataFile( + XPLMDataFileType inFileType, + const char * inFilePath); /* Can be NULL */ +#endif /* XPLM200 */ +#if defined(XPLM200) /* - * XPLMReloadScenery + * XPLMSaveDataFile * - * XPLMReloadScenery reloads the current set of scenery. You can use this - * function in two typical ways: simply call it to reload the scenery, picking - * up any new installed scenery, .env files, etc. from disk. Or, change the - * lat/ref and lon/ref data refs and then call this function to shift the - * scenery environment. This routine is equivalent to picking "reload - * scenery" from the developer menu. + * Saves the current situation or replay; paths are relative to the X-System + * folder. * */ -XPLM_API void XPLMReloadScenery(void); +XPLM_API int XPLMSaveDataFile( + XPLMDataFileType inFileType, + const char * inFilePath); +#endif /* XPLM200 */ #if defined(XPLM200) /*************************************************************************** * X-PLANE COMMAND MANAGEMENT ***************************************************************************/ /* - * The command management APIs let plugins interact with the command-system in - * X-Plane, the abstraction behind keyboard presses and joystick buttons. This - * API lets you create new commands and modify the behavior (or get - * notification) of existing ones. - * - * X-Plane Command Phases - * ---------------------- - * - * X-Plane commands are not instantaneous; they operate over a duration. - * (Think of a joystick button press - you can press, hold down, and then - * release the joystick button; X-Plane commands model this entire process.) - * - * An X-Plane command consists of three phases: a beginning, continuous - * repetition, and an ending. The command may be repeated zero times in its - * duration, followed by one command ending. Command begin and end messges are - * balanced, but a command may be bound to more than one event source (e.g. a - * keyboard key and a joystick button), in which case you may receive a second - * begin during before any end). + * The command management APIs let plugins interact with the command-system in + * X-Plane, the abstraction behind keyboard presses and joystick buttons. This + * API lets you create new commands and modify the behavior (or get + * notification) of existing ones. * - * When you issue commands in the plugin system, you *must* balance every call - * to XPLMCommandBegin with a call to XPLMCommandEnd with the same command - * reference. - * - * Command Behavior Modification - * ----------------------------- - * - * You can register a callback to handle a command either before or after - * X-Plane does; if you receive the command before X-Plane you have the option - * to either let X-Plane handle the command or hide the command from X-Plane. - * This lets plugins both augment commands and replace them. - * - * If you register for an existing command, be sure that you are *consistent* - * in letting X-Plane handle or not handle the command; you are responsible - * for passing a *balanced* number of begin and end messages to X-Plane. (E.g. - * it is not legal to pass all the begin messages to X-Plane but hide all the - * end messages). + * An X-Plane command consists of three phases: a beginning, continuous + * repetition, and an ending. The command may be repeated zero times in the + * event that the user presses a button only momentarily. * */ @@ -531,18 +691,18 @@ XPLM_API void XPLMReloadScenery(void); /* * XPLMCommandPhase * - * The phases of a command. + * The phases of a command. * */ enum { - /* The command is being started. */ - xplm_CommandBegin = 0, + /* The command is being started. */ + xplm_CommandBegin = 0 - /* The command is continuing to execute. */ - xplm_CommandContinue = 1, + /* The command is continuing to execute. */ + ,xplm_CommandContinue = 1 - /* The command has ended. */ - xplm_CommandEnd = 2, + /* The command has ended. */ + ,xplm_CommandEnd = 2 }; @@ -551,14 +711,14 @@ typedef int XPLMCommandPhase; /* * XPLMCommandRef * - * A command ref is an opaque identifier for an X-Plane command. Command - * references stay the same for the life of your plugin but not between - * executions of X-Plane. Command refs are used to execute commands, create - * commands, and create callbacks for particular commands. + * A command ref is an opaque identifier for an X-Plane command. Command + * references stay the same for the life of your plugin but not between + * executions of X-Plane. Command refs are used to execute commands, create + * commands, and create callbacks for particular commands. * - * Note that a command is not "owned" by a particular plugin. Since many - * plugins may participate in a command's execution, the command does not go - * away if the plugin that created it is unloaded. + * Note that a command is not "owned" by a particular plugin. Since many + * plugins may participate in a command's execution, the command does not go + * away if the plugin that created it is unloaded. * */ typedef void * XPLMCommandRef; @@ -566,403 +726,108 @@ typedef void * XPLMCommandRef; /* * XPLMCommandCallback_f * - * A command callback is a function in your plugin that is called when a - * command is pressed. Your callback receives the command reference for the - * particular command, the phase of the command that is executing, and a - * reference pointer that you specify when registering the callback. + * A command callback is a function in your plugin that is called when a + * command is pressed. Your callback receives the command reference for the + * particular command, the phase of the command that is executing, and a + * reference pointer that you specify when registering the callback. * - * Your command handler should return 1 to let processing of the command - * continue to other plugins and X-Plane, or 0 to halt processing, potentially - * bypassing X-Plane code. + * Your command handler should return 1 to let processing of the command + * continue to other plugins and X-Plane, or 0 to halt processing, potentially + * bypassing X-Plane code. * */ typedef int (* XPLMCommandCallback_f)( - XPLMCommandRef inCommand, - XPLMCommandPhase inPhase, - void * inRefcon); + XPLMCommandRef inCommand, + XPLMCommandPhase inPhase, + void * inRefcon); /* * XPLMFindCommand * - * XPLMFindCommand looks up a command by name, and returns its command - * reference or NULL if the command does not exist. + * XPLMFindCommand looks up a command by name, and returns its command + * reference or NULL if the command does not exist. * */ -XPLM_API XPLMCommandRef XPLMFindCommand( - const char * inName); +XPLM_API XPLMCommandRef XPLMFindCommand( + const char * inName); /* * XPLMCommandBegin * - * XPLMCommandBegin starts the execution of a command, specified by its - * command reference. The command is "held down" until XPLMCommandEnd is - * called. You must balance each XPLMCommandBegin call with an XPLMCommandEnd - * call. + * XPLMCommandBegin starts the execution of a command, specified by its + * command reference. The command is "held down" until XPLMCommandEnd is + * called. * */ -XPLM_API void XPLMCommandBegin( - XPLMCommandRef inCommand); +XPLM_API void XPLMCommandBegin( + XPLMCommandRef inCommand); /* * XPLMCommandEnd * - * XPLMCommandEnd ends the execution of a given command that was started with - * XPLMCommandBegin. You must not issue XPLMCommandEnd for a command you did - * not begin. + * XPLMCommandEnd ends the execution of a given command that was started with + * XPLMCommandBegin. * */ -XPLM_API void XPLMCommandEnd( - XPLMCommandRef inCommand); +XPLM_API void XPLMCommandEnd( + XPLMCommandRef inCommand); /* * XPLMCommandOnce * - * This executes a given command momentarily, that is, the command begins and - * ends immediately. This is the equivalent of calling XPLMCommandBegin() and - * XPLMCommandEnd() back ot back. + * This executes a given command momentarily, that is, the command begins and + * ends immediately. * */ -XPLM_API void XPLMCommandOnce( - XPLMCommandRef inCommand); +XPLM_API void XPLMCommandOnce( + XPLMCommandRef inCommand); /* * XPLMCreateCommand * - * XPLMCreateCommand creates a new command for a given string. If the command - * already exists, the existing command reference is returned. The description - * may appear in user interface contexts, such as the joystick configuration - * screen. + * XPLMCreateCommand creates a new command for a given string. If the command + * already exists, the existing command reference is returned. The description + * may appear in user interface contexts, such as the joystick configuration + * screen. * */ -XPLM_API XPLMCommandRef XPLMCreateCommand( - const char * inName, - const char * inDescription); +XPLM_API XPLMCommandRef XPLMCreateCommand( + const char * inName, + const char * inDescription); /* * XPLMRegisterCommandHandler * - * XPLMRegisterCommandHandler registers a callback to be called when a command - * is executed. You provide a callback with a reference pointer. + * XPLMRegisterCommandHandler registers a callback to be called when a command + * is executed. You provide a callback with a reference pointer. * - * If inBefore is true, your command handler callback will be executed before - * X-Plane executes the command, and returning 0 from your callback will - * disable X-Plane's processing of the command. If inBefore is false, your - * callback will run after X-Plane. (You can register a single callback both - * before and after a command.) + * If inBefore is true, your command handler callback will be executed before + * X-Plane executes the command, and returning 0 from your callback will + * disable X-Plane's processing of the command. If inBefore is false, your + * callback will run after X-Plane. (You can register a single callback both + * before and after a command.) * */ -XPLM_API void XPLMRegisterCommandHandler( - XPLMCommandRef inComand, - XPLMCommandCallback_f inHandler, - int inBefore, - void * inRefcon); +XPLM_API void XPLMRegisterCommandHandler( + XPLMCommandRef inComand, + XPLMCommandCallback_f inHandler, + int inBefore, + void * inRefcon); /* * XPLMUnregisterCommandHandler * - * XPLMUnregisterCommandHandler removes a command callback registered with - * XPLMRegisterCommandHandler. + * XPLMUnregisterCommandHandler removes a command callback registered with + * XPLMRegisterCommandHandler. * */ -XPLM_API void XPLMUnregisterCommandHandler( - XPLMCommandRef inComand, - XPLMCommandCallback_f inHandler, - int inBefore, - void * inRefcon); +XPLM_API void XPLMUnregisterCommandHandler( + XPLMCommandRef inComand, + XPLMCommandCallback_f inHandler, + int inBefore, + void * inRefcon); #endif /* XPLM200 */ -#if defined(XPLM_DEPRECATED) -/*************************************************************************** - * X-PLANE USER INTERACTION - ***************************************************************************/ -/* - * WARNING: The legacy user interaction API is deprecated; while it was the - * only way to run commands in X-Plane 6,7 and 8, it is obsolete, and was - * replaced by the command system API in X-Plane 9. You should not use this - * API; replace any of the calls below with XPLMCommand invocations based on - * persistent command strings. The documentation that follows is for historic - * reference only. - * - * The legacy user interaction APIs let you simulate commands the user can do - * with a joystick, keyboard etc. Note that it is generally safer for future - * compatibility to use one of these commands than to manipulate the - * underlying sim data. - * - */ - - -/* - * XPLMCommandKeyID - * - * These enums represent all the keystrokes available within X-Plane. They can - * be sent to X-Plane directly. For example, you can reverse thrust using - * these enumerations. - * - */ -enum { - xplm_key_pause=0, - xplm_key_revthrust, - xplm_key_jettison, - xplm_key_brakesreg, - xplm_key_brakesmax, - xplm_key_gear, - xplm_key_timedn, - xplm_key_timeup, - xplm_key_fadec, - xplm_key_otto_dis, - xplm_key_otto_atr, - xplm_key_otto_asi, - xplm_key_otto_hdg, - xplm_key_otto_gps, - xplm_key_otto_lev, - xplm_key_otto_hnav, - xplm_key_otto_alt, - xplm_key_otto_vvi, - xplm_key_otto_vnav, - xplm_key_otto_nav1, - xplm_key_otto_nav2, - xplm_key_targ_dn, - xplm_key_targ_up, - xplm_key_hdgdn, - xplm_key_hdgup, - xplm_key_barodn, - xplm_key_baroup, - xplm_key_obs1dn, - xplm_key_obs1up, - xplm_key_obs2dn, - xplm_key_obs2up, - xplm_key_com1_1, - xplm_key_com1_2, - xplm_key_com1_3, - xplm_key_com1_4, - xplm_key_nav1_1, - xplm_key_nav1_2, - xplm_key_nav1_3, - xplm_key_nav1_4, - xplm_key_com2_1, - xplm_key_com2_2, - xplm_key_com2_3, - xplm_key_com2_4, - xplm_key_nav2_1, - xplm_key_nav2_2, - xplm_key_nav2_3, - xplm_key_nav2_4, - xplm_key_adf_1, - xplm_key_adf_2, - xplm_key_adf_3, - xplm_key_adf_4, - xplm_key_adf_5, - xplm_key_adf_6, - xplm_key_transpon_1, - xplm_key_transpon_2, - xplm_key_transpon_3, - xplm_key_transpon_4, - xplm_key_transpon_5, - xplm_key_transpon_6, - xplm_key_transpon_7, - xplm_key_transpon_8, - xplm_key_flapsup, - xplm_key_flapsdn, - xplm_key_cheatoff, - xplm_key_cheaton, - xplm_key_sbrkoff, - xplm_key_sbrkon, - xplm_key_ailtrimL, - xplm_key_ailtrimR, - xplm_key_rudtrimL, - xplm_key_rudtrimR, - xplm_key_elvtrimD, - xplm_key_elvtrimU, - xplm_key_forward, - xplm_key_down, - xplm_key_left, - xplm_key_right, - xplm_key_back, - xplm_key_tower, - xplm_key_runway, - xplm_key_chase, - xplm_key_free1, - xplm_key_free2, - xplm_key_spot, - xplm_key_fullscrn1, - xplm_key_fullscrn2, - xplm_key_tanspan, - xplm_key_smoke, - xplm_key_map, - xplm_key_zoomin, - xplm_key_zoomout, - xplm_key_cycledump, - xplm_key_replay, - xplm_key_tranID, - xplm_key_max -}; -typedef int XPLMCommandKeyID; - -/* - * XPLMCommandButtonID - * - * These are enumerations for all of the things you can do with a joystick - * button in X-Plane. They currently match the buttons menu in the equipment - * setup dialog, but these enums will be stable even if they change in - * X-Plane. - * - */ -enum { - xplm_joy_nothing=0, - xplm_joy_start_all, - xplm_joy_start_0, - xplm_joy_start_1, - xplm_joy_start_2, - xplm_joy_start_3, - xplm_joy_start_4, - xplm_joy_start_5, - xplm_joy_start_6, - xplm_joy_start_7, - xplm_joy_throt_up, - xplm_joy_throt_dn, - xplm_joy_prop_up, - xplm_joy_prop_dn, - xplm_joy_mixt_up, - xplm_joy_mixt_dn, - xplm_joy_carb_tog, - xplm_joy_carb_on, - xplm_joy_carb_off, - xplm_joy_trev, - xplm_joy_trm_up, - xplm_joy_trm_dn, - xplm_joy_rot_trm_up, - xplm_joy_rot_trm_dn, - xplm_joy_rud_lft, - xplm_joy_rud_cntr, - xplm_joy_rud_rgt, - xplm_joy_ail_lft, - xplm_joy_ail_cntr, - xplm_joy_ail_rgt, - xplm_joy_B_rud_lft, - xplm_joy_B_rud_rgt, - xplm_joy_look_up, - xplm_joy_look_dn, - xplm_joy_look_lft, - xplm_joy_look_rgt, - xplm_joy_glance_l, - xplm_joy_glance_r, - xplm_joy_v_fnh, - xplm_joy_v_fwh, - xplm_joy_v_tra, - xplm_joy_v_twr, - xplm_joy_v_run, - xplm_joy_v_cha, - xplm_joy_v_fr1, - xplm_joy_v_fr2, - xplm_joy_v_spo, - xplm_joy_flapsup, - xplm_joy_flapsdn, - xplm_joy_vctswpfwd, - xplm_joy_vctswpaft, - xplm_joy_gear_tog, - xplm_joy_gear_up, - xplm_joy_gear_down, - xplm_joy_lft_brake, - xplm_joy_rgt_brake, - xplm_joy_brakesREG, - xplm_joy_brakesMAX, - xplm_joy_speedbrake, - xplm_joy_ott_dis, - xplm_joy_ott_atr, - xplm_joy_ott_asi, - xplm_joy_ott_hdg, - xplm_joy_ott_alt, - xplm_joy_ott_vvi, - xplm_joy_tim_start, - xplm_joy_tim_reset, - xplm_joy_ecam_up, - xplm_joy_ecam_dn, - xplm_joy_fadec, - xplm_joy_yaw_damp, - xplm_joy_art_stab, - xplm_joy_chute, - xplm_joy_JATO, - xplm_joy_arrest, - xplm_joy_jettison, - xplm_joy_fuel_dump, - xplm_joy_puffsmoke, - xplm_joy_prerotate, - xplm_joy_UL_prerot, - xplm_joy_UL_collec, - xplm_joy_TOGA, - xplm_joy_shutdown, - xplm_joy_con_atc, - xplm_joy_fail_now, - xplm_joy_pause, - xplm_joy_rock_up, - xplm_joy_rock_dn, - xplm_joy_rock_lft, - xplm_joy_rock_rgt, - xplm_joy_rock_for, - xplm_joy_rock_aft, - xplm_joy_idle_hilo, - xplm_joy_lanlights, - xplm_joy_max -}; -typedef int XPLMCommandButtonID; - -/* - * XPLMSimulateKeyPress - * - * This function simulates a key being pressed for X-Plane. The keystroke goes - * directly to X-Plane; it is never sent to any plug-ins. However, since this - * is a raw key stroke it may be mapped by the keys file or enter text into a - * field. - * - * Deprecated: use XPLMCommandOnce - * - */ -XPLM_API void XPLMSimulateKeyPress( - int inKeyType, - int inKey); - -/* - * XPLMCommandKeyStroke - * - * This routine simulates a command-key stroke. However, the keys are done by - * function, not by actual letter, so this function works even if the user has - * remapped their keyboard. Examples of things you might do with this include - * pausing the simulator. - * - * Deprecated: use XPLMCommandOnce - * - */ -XPLM_API void XPLMCommandKeyStroke( - XPLMCommandKeyID inKey); - -/* - * XPLMCommandButtonPress - * - * This function simulates any of the actions that might be taken by pressing - * a joystick button. However, this lets you call the command directly rather - * than have to know which button is mapped where. Important: you must release - * each button you press. The APIs are separate so that you can 'hold down' a - * button for a fixed amount of time. - * - * Deprecated: use XPLMCommandBegin. - * - */ -XPLM_API void XPLMCommandButtonPress( - XPLMCommandButtonID inButton); - -/* - * XPLMCommandButtonRelease - * - * This function simulates any of the actions that might be taken by pressing - * a joystick button. See XPLMCommandButtonPress. - * - * Deprecated: use XPLMCommandEnd. - * - */ -XPLM_API void XPLMCommandButtonRelease( - XPLMCommandButtonID inButton); - -#endif /* XPLM_DEPRECATED */ #ifdef __cplusplus } #endif diff --git a/src/SDK/Delphi/Widgets/XPStandardWidgets.pas b/src/SDK/Delphi/Widgets/XPStandardWidgets.pas index d77f3838..f8e0364a 100755 --- a/src/SDK/Delphi/Widgets/XPStandardWidgets.pas +++ b/src/SDK/Delphi/Widgets/XPStandardWidgets.pas @@ -1,37 +1,42 @@ { - 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 XPStandardWidgets; INTERFACE { - ## THEORY OF OPERATION + XPStandardWidgets - THEORY OF OPERATION - The standard widgets are widgets built into the widgets library. While you - can gain access to the widget function that drives them, you generally use - them by calling XPCreateWidget and then listening for special messages, - etc. + The standard widgets are widgets built into the widgets library. While you + can gain access to the widget function that drives them, you generally use + them by calling XPCreateWidget and then listening for special messages, + etc. - The standard widgets often send mesages to themselves when the user - performs an event; these messages are sent up the widget hierarchy until - they are handled. So you can add a widget proc directly to a push button - (for example) to intercept the message when it is clicked, or you can put - one widget proc on a window for all of the push buttons in the window. Most - of these messages contain the original widget ID as a parameter so you can - know which widget is messaging no matter who it is sent to. + The standard widgets often send mesages to themselves when the user + performs an event; these messages are sent up the widget hierarchy until + they are handled. So you can add a widget proc directly to a push button + (for example) to intercept the message when it is clicked, or you can put + one widget proc on a window for all of the push buttons in the window. Most + of these messages contain the original widget ID as a parameter so you can + know which widget is messaging no matter who it is sent to. } -USES - XPWidgetDefs; +USES XPWidgetDefs; {$A4} +{$IFDEF MSWINDOWS} + {$DEFINE DELPHI} +{$ENDIF} {___________________________________________________________________________ * MAIN WINDOW ___________________________________________________________________________} { - The main window widget class provides a "window" as the user knows it. - These windows are dragable and can be selected. Use them to create floating - windows and non-modal dialogs. + The main window widget class provides a "window" as the user knows it. + These windows are dragable and can be selected. Use them to create floating + windows and non-modal dialogs. } @@ -41,31 +46,33 @@ { Main Window Type Values - These type values are used to control the appearance of a main window. + These type values are used to control the appearance of a main window. } - { The standard main window; pin stripes on XP7, metal frame on XP 6. } + { The standard main window; pin stripes on XP7, metal frame on XP 6. } xpMainWindowStyle_MainWindow = 0 ; - { A translucent dark gray window, like the one ATC messages appear in. } + { A translucent dark gray window, like the one ATC messages appear in. } xpMainWindowStyle_Translucent = 1 ; { - Main Window Properties + Main Window Properties + } - { This property specifies the type of window. Set to one of the main window } - { types above. } + { This property specifies the type of window. Set to one of the main window } + { types above. } xpProperty_MainWindowType = 1100 ; - { This property specifies whether the main window has close boxes in its } - { corners. } + { This property specifies whether the main window has close boxes in its } + { corners. } xpProperty_MainWindowHasCloseBoxes = 1200 ; { - MainWindow Messages + MainWindow Messages + } - { This message is sent when the close buttons are pressed for your window. } + { This message is sent when the close buttons are pressed for your window. } xpMessage_CloseButtonPushed = 1200 ; @@ -73,9 +80,9 @@ * SUB WINDOW ___________________________________________________________________________} { - X-Plane dialogs are divided into separate areas; the sub window widgets - allow you to make these areas. Create one main window and place several - subwindows inside it. Then place your controls inside the subwindows. + X-Plane dialogs are divided into separate areas; the sub window widgets + allow you to make these areas. Create one main window and place several + subwindows inside it. Then place your controls inside the subwindows. } @@ -85,23 +92,24 @@ { SubWindow Type Values - These values control the appearance of the subwindow. + These values control the appearance of the subwindow. } - { A panel that sits inside a main window. } + { A panel that sits inside a main window. } xpSubWindowStyle_SubWindow = 0 ; - { A screen that sits inside a panel for showing text information. } + { A screen that sits inside a panel for showing text information. } xpSubWindowStyle_Screen = 2 ; - { A list view for scrolling lists. } + { A list view for scrolling lists. } xpSubWindowStyle_ListView = 3 ; { - SubWindow Properties + SubWindow Properties + } - { This property specifies the type of window. Set to one of the subwindow } - { types above. } + { This property specifies the type of window. Set to one of the subwindow } + { types above. } xpProperty_SubWindowType = 1200 ; @@ -109,22 +117,22 @@ * BUTTON ___________________________________________________________________________} { - The button class provides a number of different button styles and - behaviors, including push buttons, radio buttons, check boxes, etc. The - button label appears on or next to the button depending on the button's - appearance, or type. + The button class provides a number of different button styles and + behaviors, including push buttons, radio buttons, check boxes, etc. The + button label appears on or next to the button depending on the button's + appearance, or type. - The button's behavior is a separate property that dictates who it hilights - and what kinds of messages it sends. Since behavior and type are different, - you can do strange things like make check boxes that act as push buttons or - push buttons with radio button behavior. + The button's behavior is a separate property that dictates who it hilights + and what kinds of messages it sends. Since behavior and type are different, + you can do strange things like make check boxes that act as push buttons or + push buttons with radio button behavior. - In X-Plane 6 there were no check box graphics. The result is the following - behavior: in X-Plane - 6 all check box and radio buttons are round (radio-button style) buttons; - in X-Plane 7 they are all square (check-box style) buttons. In a future - version of X-Plane, the xpButtonBehavior enums will provide the correct - graphic (check box or radio button) giving the expected result. + In X-Plane 6 there were no check box graphics. The result is the following + behavior: in X-Plane 6 all check box and radio buttons are round + (radio-button style) buttons; in X-Plane 7 they are all square (check-box + style) buttons. In a future version of X-Plane, the xpButtonBehavior enums + will provide the correct graphic (check box or radio button) giving the + expected result. } @@ -134,83 +142,84 @@ { Button Types - These define the visual appearance of buttons but not how they respond to - the mouse. + These define the visual appearance of buttons but not how they respond to + the mouse. } - { This is a standard push button, like an 'OK' or 'Cancel' button in a dialog} - { box. } + { This is a standard push button, like an 'OK' or 'Cancel' button in a dialog } + { box. } xpPushButton = 0 ; - { A check box or radio button. Use this and the button behaviors below to } - { get the desired behavior. } + { A check box or radio button. Use this and the button behaviors below to } + { get the desired behavior. } xpRadioButton = 1 ; - { A window close box. } + { A window close box. } xpWindowCloseBox = 3 ; - { A small down arrow. } + { A small down arrow. } xpLittleDownArrow = 5 ; - { A small up arrow. } + { A small up arrow. } xpLittleUpArrow = 6 ; { Button Behavior Values - These define how the button responds to mouse clicks. + These define how the button responds to mouse clicks. } - { Standard push button behavior. The button hilites while the mouse is } - { clicked over it and unhilites when the mouse is moved outside of it or } - { released. If the mouse is released over the button, the } - { xpMsg_PushButtonPressed message is sent. } + { Standard push button behavior. The button hilites while the mouse is } + { clicked over it and unhilites when the mouse is moved outside of it or } + { released. If the mouse is released over the button, the } + { xpMsg_PushButtonPressed message is sent. } xpButtonBehaviorPushButton = 0 ; - { Check box behavior. The button immediately toggles its value when the mouse} - { is clicked and sends out a xpMsg_ButtonStateChanged message. } + { Check box behavior. The button immediately toggles its value when the mouse } + { is clicked and sends out a xpMsg_ButtonStateChanged message. } xpButtonBehaviorCheckBox = 1 ; - { Radio button behavior. The button immediately sets its state to one and } - { sends out a xpMsg_ButtonStateChanged message if it was not already set to } - { one. You must turn off other radio buttons in a group in your code. } + { Radio button behavior. The button immediately sets its state to one and } + { sends out a xpMsg_ButtonStateChanged message if it was not already set to } + { one. You must turn off other radio buttons in a group in your code. } xpButtonBehaviorRadioButton = 2 ; { - Button Properties + Button Properties + } - { This property sets the visual type of button. Use one of the button types } - { above. } + { This property sets the visual type of button. Use one of the button types } + { above. } xpProperty_ButtonType = 1300 ; - { This property sets the button's behavior. Use one of the button behaviors } - { above. } + { This property sets the button's behavior. Use one of the button behaviors } + { above. } xpProperty_ButtonBehavior = 1301 ; - { This property tells whether a check box or radio button is "checked" or } - { not. Not used for push buttons. } + { This property tells whether a check box or radio button is "checked" or } + { not. Not used for push buttons. } xpProperty_ButtonState = 1302 ; { Button Messages - These messages are sent by the button to itself and then up the widget - chain when the button is clicked. (You may intercept them by providing a - widget handler for the button itself or by providing a handler in a parent - widget.) + These messages are sent by the button to itself and then up the widget + chain when the button is clicked. (You may intercept them by providing a + widget handler for the button itself or by providing a handler in a parent + widget.) } - { This message is sent when the user completes a click and release in a } - { button with push button behavior. Parameter one of the message is the } - { widget ID of the button. This message is dispatched up the widget } - { hierarchy. } + { This message is sent when the user completes a click and release in a } + { button with push button behavior. Parameter one of the message is the } + { widget ID of the button. This message is dispatched up the widget } + { hierarchy. } xpMsg_PushButtonPressed = 1300 ; - { This message is sent when a button is clicked that has radio button or } - { check box behavior and its value changes. (Note that if the value changes } - { by setting a property you do not receive this message!) Parameter one is } - { the widget ID of the button, parameter 2 is the new state value, either } - { zero or one. This message is dispatched up the widget hierarchy. } + { This message is sent when a button is clicked that has radio button or } + { check box behavior and its value changes. (Note that if the value changes } + { by setting a property you do not receive this message!) Parameter one is } + { the widget ID of the button, parameter 2 is the new state value, either } + { zero or one. This message is dispatched up the widget hierarchy. } xpMsg_ButtonStateChanged = 1301 ; @@ -218,21 +227,21 @@ * TEXT FIELD ___________________________________________________________________________} { - The text field widget provides an editable text field including mouse - selection and keyboard navigation. The contents of the text field are its - descriptor. (The descriptor changes as the user types.) + The text field widget provides an editable text field including mouse + selection and keyboard navigation. The contents of the text field are its + descriptor. (The descriptor changes as the user types.) - The text field can have a number of types, that effect the visual layout of - the text field. The text field sends messages to itself so you may control - its behavior. + The text field can have a number of types, that effect the visual layout of + the text field. The text field sends messages to itself so you may control + its behavior. - If you need to filter keystrokes, add a new handler and intercept the key - press message. Since key presses are passed by pointer, you can modify the - keystroke and pass it through to the text field widget. + If you need to filter keystrokes, add a new handler and intercept the key + press message. Since key presses are passed by pointer, you can modify the + keystroke and pass it through to the text field widget. - WARNING: in X-Plane before 7.10 (including 6.70) null characters could - crash X-Plane. To prevent this, wrap this object with a filter function - (more instructions can be found on the SDK website). + WARNING: in X-Plane before 7.10 (including 6.70) null characters could + crash X-Plane. To prevent this, wrap this object with a filter function + (more instructions can be found on the SDK website). } @@ -242,62 +251,66 @@ { Text Field Type Values - These control the look of the text field. + These control the look of the text field. } - { A field for text entry. } + { A field for text entry. } xpTextEntryField = 0 ; - { A transparent text field. The user can type and the text is drawn, but no } - { background is drawn. You can draw your own background by adding a widget } - { handler and prehandling the draw message. } + { A transparent text field. The user can type and the text is drawn, but no } + { background is drawn. You can draw your own background by adding a widget } + { handler and prehandling the draw message. } xpTextTransparent = 3 ; - { A translucent edit field, dark gray. } + { A translucent edit field, dark gray. } xpTextTranslucent = 4 ; { - Text Field Properties + Text Field Properties + } - { This is the character position the selection starts at, zero based. If it } - { is the same as the end insertion point, the insertion point is not a } - { selection. } + { This is the character position the selection starts at, zero based. If it } + { is the same as the end insertion point, the insertion point is not a } + { selection. } xpProperty_EditFieldSelStart = 1400 ; - { This is the character position of the end of the selection. } + { This is the character position of the end of the selection. } xpProperty_EditFieldSelEnd = 1401 ; - { This is the character position a drag was started at if the user is } - { dragging to select text, or -1 if a drag is not in progress. } + { This is the character position a drag was started at if the user is } + { dragging to select text, or -1 if a drag is not in progress. } xpProperty_EditFieldSelDragStart = 1402 ; - { This is the type of text field to display, from the above list. } + { This is the type of text field to display, from the above list. } xpProperty_TextFieldType = 1403 ; - { Set this property to 1 to password protect the field. Characters will be } - { drawn as *s even though the descriptor will contain plain-text. } + { Set this property to 1 to password protect the field. Characters will be } + { drawn as *s even though the descriptor will contain plain-text. } xpProperty_PasswordMode = 1404 ; - { The max number of characters you can enter, if limited. Zero means } - { unlimited. } + { The max number of characters you can enter, if limited. Zero means } + { unlimited. } xpProperty_MaxCharacters = 1405 ; - { The first visible character on the left. This effectively scrolls the text} - { field. } + { The first visible character on the left. This effectively scrolls the text } + { field. } xpProperty_ScrollPosition = 1406 ; - { The font to draw the field's text with. (An XPLMFontID.) } + { The font to draw the field's text with. (An XPLMFontID.) } xpProperty_Font = 1407 ; - { This is the active side of the insert selection. (Internal) } + { This is the active side of the insert selection. (Internal) } xpProperty_ActiveEditSide = 1408 ; { - Text Field Messages + Text Field Messages + } - { The text field sends this message to itself when its text changes. It sends} - { the message up the call chain; param1 is the text field's widget ID. } + { Text Field Messages } + { } + { The text field sends this message to itself when its text changes. It sends } + { the message up the call chain; param1 is the text field's widget ID. } xpMsg_TextFieldChanged = 1400 ; @@ -305,9 +318,9 @@ * SCROLL BAR ___________________________________________________________________________} { - A standard scroll bar or slider control. The scroll bar has a minimum, - maximum and current value that is updated when the user drags it. The - scroll bar sends continuous messages as it is dragged. + A standard scroll bar or slider control. The scroll bar has a minimum, + maximum and current value that is updated when the user drags it. The + scroll bar sends continuous messages as it is dragged. } @@ -317,43 +330,47 @@ { Scroll Bar Type Values - This defines how the scroll bar looks. + This defines how the scroll bar looks. } - { A standard X-Plane scroll bar (with arrows on the ends). } + { Scroll bar types. } + { } + { A standard X-Plane scroll bar (with arrows on the ends). } xpScrollBarTypeScrollBar = 0 ; - { A slider, no arrows. } + { A slider, no arrows. } xpScrollBarTypeSlider = 1 ; { - Scroll Bar Properties + Scroll Bar Properties + } - { The current position of the thumb (in between the min and max, inclusive) } + { The current position of the thumb (in between the min and max, inclusive) } xpProperty_ScrollBarSliderPosition = 1500 ; - { The value the scroll bar has when the thumb is in the lowest position. } + { The value the scroll bar has when the thumb is in the lowest position. } xpProperty_ScrollBarMin = 1501 ; - { The value the scroll bar has when the thumb is in the highest position. } + { The value the scroll bar has when the thumb is in the highest position. } xpProperty_ScrollBarMax = 1502 ; - { How many units to move the scroll bar when clicking next to the thumb. The } - { scroll bar always moves one unit when the arrows are clicked. } + { How many units to moev the scroll bar when clicking next to the thumb. The } + { scroll bar always moves one unit when the arrows are clicked. } xpProperty_ScrollBarPageAmount = 1503 ; - { The type of scrollbar from the enums above. } + { The type of scrollbar from the enums above. } xpProperty_ScrollBarType = 1504 ; - { Used internally. } + { Used internally. } xpProperty_ScrollBarSlop = 1505 ; { - Scroll Bar Messages + Scroll Bar Messages + } - { The scroll bar sends this message when the slider position changes. It } - { sends the message up the call chain; param1 is the Scroll Bar widget ID. } + { The Scroll Bar sends this message when the slider position changes. It } + { sends the message up the call chain; param1 is the Scroll Bar widget ID. } xpMsg_ScrollBarSliderPositionChanged = 1500 ; @@ -361,9 +378,9 @@ * CAPTION ___________________________________________________________________________} { - A caption is a simple widget that shows its descriptor as a string, useful - for labeling parts of a window. It always shows its descriptor as its - string and is otherwise transparent. + A caption is a simple widget that shows its descriptor as a string, useful + for labeling parts of a window. It always shows its descriptor as its + string and is otherwise transparent. } @@ -371,10 +388,11 @@ xpWidgetClass_Caption = 6; { - Caption Properties + Caption Properties + } - { This property specifies whether the caption is lit; use lit captions } - { against screens. } + { This property specifies whether the caption is lit; use lit captions } + { against screens. } xpProperty_CaptionLit = 1600 ; @@ -382,8 +400,8 @@ * GENERAL GRAPHICS ___________________________________________________________________________} { - The general graphics widget can show one of many icons available from - X-Plane. + The general graphics widget can show one of many icons available from + X-Plane. } @@ -393,7 +411,7 @@ { General Graphics Types Values - These define the icon for the general graphics. + These define the icon for the general graphics. } xpShip = 4 ; @@ -435,9 +453,10 @@ ; { - General Graphics Properties + General Graphics Properties + } - { This property controls the type of icon that is drawn. } + { This property controls the type of icon that is drawn. } xpProperty_GeneralGraphicsType = 1700 ; @@ -445,26 +464,25 @@ * PROGRESS INDICATOR ___________________________________________________________________________} { - This widget implements a progress indicator as seen when X-Plane starts up. + This widget implements a progress indicator as seen when X-Plane starts up. } CONST xpWidgetClass_Progress = 8; { - Progress Indicator Properties + Progress Indicator Properties + } - { This is the current value of the progress indicator. } + { This is the current value of the progress indicator. } xpProperty_ProgressPosition = 1800 ; - { This is the minimum value, equivalent to 0% filled. } + { This is the minimum value, equivalent to 0% filled. } xpProperty_ProgressMin = 1801 ; - { This is the maximum value, equivalent to 100% filled. } + { This is the maximum value, equivalent to 100% filled. } xpProperty_ProgressMax = 1802 ; - IMPLEMENTATION - END. diff --git a/src/SDK/Delphi/Widgets/XPUIGraphics.pas b/src/SDK/Delphi/Widgets/XPUIGraphics.pas index 65e06365..05bb28a1 100755 --- a/src/SDK/Delphi/Widgets/XPUIGraphics.pas +++ b/src/SDK/Delphi/Widgets/XPUIGraphics.pas @@ -1,53 +1,64 @@ { - 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 XPUIGraphics; INTERFACE +{ + +} -USES - XPWidgetDefs; +USES XPWidgetDefs; {$A4} +{$IFDEF MSWINDOWS} + {$DEFINE DELPHI} +{$ENDIF} {___________________________________________________________________________ * UI GRAPHICS ___________________________________________________________________________} +{ + +} { XPWindowStyle - There are a few built-in window styles in X-Plane that you can use. + There are a few built-in window styles in X-Plane that you can use. - Note that X-Plane 6 does not offer real shadow-compositing; you must make - sure to put a window on top of another window of the right style to the - shadows work, etc. This applies to elements with insets and shadows. The - rules are: + Note that X-Plane 6 does not offer real shadow-compositing; you must make + sure to put a window on top of another window of the right style to the + shadows work, etc. This applies to elements with insets and shadows. The + rules are: - Sub windows must go on top of main windows, and screens and list views on - top of subwindows. Only help and main windows can be over the main screen. + Sub windows must go on top of main windows, and screens and list views on + top of subwindows. Only help and main windows can be over the main screen. - With X-Plane 7 any window or element may be placed over any other element. + With X-Plane 7 any window or element may be placed over any other element. - Some windows are scaled by stretching, some by repeating. The drawing - routines know which scaling method to use. The list view cannot be rescaled - in X-Plane 6 because it has both a repeating pattern and a gradient in one - element. All other elements can be rescaled. + Some windows are scaled by stretching, some by repeating. The drawing + routines know which scaling method to use. The list view cannot be rescaled + in X-Plane 6 because it has both a repeating pattern and a gradient in one + element. All other elements can be rescaled. } TYPE XPWindowStyle = ( - { An LCD screen that shows help. } + { An LCD screen that shows help. } xpWindow_Help = 0 - { A dialog box window. } + { A dialog box window. } ,xpWindow_MainWindow = 1 - { A panel or frame within a dialog box window. } + { A panel or frame within a dialog box window. } ,xpWindow_SubWindow = 2 - { An LCD screen within a panel to hold text displays. } + { An LCD screen within a panel to hold text displays. } ,xpWindow_Screen = 4 - { A list view within a panel for scrolling file names, etc. } + { A list view within a panel for scrolling file names, etc. } ,xpWindow_ListView = 5 ); @@ -56,152 +67,160 @@ { XPDrawWindow - This routine draws a window of the given dimensions at the given offset on - the virtual screen in a given style. The window is automatically scaled as - appropriate using a bitmap scaling technique (scaling or repeating) as - appropriate to the style. + This routine draws a window of the given dimensions at the given offset on + the virtual screen in a given style. The window is automatically scaled as + appropriate using a bitmap scaling technique (scaling or repeating) as + appropriate to the style. } PROCEDURE XPDrawWindow( - inX1 : Integer; - inY1 : Integer; - inX2 : Integer; - inY2 : Integer; + inX1 : integer; + inY1 : integer; + inX2 : integer; + inY2 : integer; inStyle : XPWindowStyle); - cdecl; external XPWIDGETS.DLL; +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPGetWindowDefaultDimensions - This routine returns the default dimensions for a window. Output is either - a minimum or fixed value depending on whether the window is scalable. + This routine returns the default dimensions for a window. Output is either + a minimum or fixed value depending on whether the window is scalable. } PROCEDURE XPGetWindowDefaultDimensions( inStyle : XPWindowStyle; - outWidth : PInteger; { Can be nil } - outHeight : PInteger); { Can be nil } - cdecl; external XPWIDGETS.DLL; + outWidth : Pinteger; { Can be nil } + outHeight : Pinteger); { Can be nil } +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPElementStyle - Elements are individually drawable UI things like push buttons, etc. The - style defines what kind of element you are drawing. Elements can be - stretched in one or two dimensions (depending on the element). Some - elements can be lit. + Elements are individually drawable UI things like push buttons, etc. The + style defines what kind of element you are drawing. Elements can be + stretched in one or two dimensions (depending on the element). Some + elements can be lit. - In X-Plane 6 some elements must be drawn over metal. Some are scalable and - some are not. Any element can be drawn anywhere in X-Plane 7. + In X-Plane 6 some elements must be drawn over metal. Some are scalable and + some are not. Any element can be drawn anywhere in X-Plane 7. - Scalable Axis Required Background + Scalable Axis Required Background } TYPE XPElementStyle = ( - { x metal } + { x metal } xpElement_TextField = 6 - { none metal } + { none metal } ,xpElement_CheckBox = 9 - { none metal } + { none metal } ,xpElement_CheckBoxLit = 10 - { none window header } + { none window header } ,xpElement_WindowCloseBox = 14 - { none window header } + { none window header } ,xpElement_WindowCloseBoxPressed = 15 - { x metal } + { x metal } ,xpElement_PushButton = 16 - { x metal } + { x metal } ,xpElement_PushButtonLit = 17 - { none any } + { none any } ,xpElement_OilPlatform = 24 - { none any } + { none any } ,xpElement_OilPlatformSmall = 25 - { none any } + { none any } ,xpElement_Ship = 26 - { none any } + { none any } ,xpElement_ILSGlideScope = 27 - { none any } + { none any } ,xpElement_MarkerLeft = 28 - { none any } + { none any } ,xpElement_Airport = 29 - { none any } + { none any } ,xpElement_Waypoint = 30 - { none any } + { none any } ,xpElement_NDB = 31 - { none any } + { none any } ,xpElement_VOR = 32 - { none any } + { none any } ,xpElement_RadioTower = 33 - { none any } + { none any } ,xpElement_AircraftCarrier = 34 - { none any } + { none any } ,xpElement_Fire = 35 - { none any } + { none any } ,xpElement_MarkerRight = 36 - { none any } + { none any } ,xpElement_CustomObject = 37 - { none any } + { none any } ,xpElement_CoolingTower = 38 - { none any } + { none any } ,xpElement_SmokeStack = 39 - { none any } + { none any } ,xpElement_Building = 40 - { none any } + { none any } ,xpElement_PowerLine = 41 - { none metal } + { none metal } ,xpElement_CopyButtons = 45 - { none metal } + { none metal } ,xpElement_CopyButtonsWithEditingGrid = 46 - { x, y metal } + { x, y metal } ,xpElement_EditingGrid = 47 - { THIS CAN PROBABLY BE REMOVED } + { THIS CAN PROBABLY BE REMOVED } ,xpElement_ScrollBar = 48 - { none any } + { none any } ,xpElement_VORWithCompassRose = 49 - { none metal } + { none metal } ,xpElement_Zoomer = 51 - { x, y metal } + { x, y metal } ,xpElement_TextFieldMiddle = 52 - { none metal } + { none metal } ,xpElement_LittleDownArrow = 53 - { none metal } + { none metal } ,xpElement_LittleUpArrow = 54 - { none metal } + { none metal } ,xpElement_WindowDragBar = 61 - { none metal } + { none metal } ,xpElement_WindowDragBarSmooth = 62 ); @@ -210,60 +229,66 @@ { XPDrawElement - XPDrawElement draws a given element at an offset on the virtual screen in - set dimensions. - *Even* if the element is not scalable, it will be scaled if the width and - height do not match the preferred dimensions; it'll just look ugly. Pass - inLit to see the lit version of the element; if the element cannot be lit - this is ignored. + XPDrawElement draws a given element at an offset on the virtual screen in + set dimensions. EVEN if the element is not scalable, it will be scaled if + the width and height do not match the preferred dimensions; it'll just look + ugly. Pass inLit to see the lit version of the element; if the element + cannot be lit this is ignored. } PROCEDURE XPDrawElement( - inX1 : Integer; - inY1 : Integer; - inX2 : Integer; - inY2 : Integer; + inX1 : integer; + inY1 : integer; + inX2 : integer; + inY2 : integer; inStyle : XPElementStyle; - inLit : Integer); - cdecl; external XPWIDGETS.DLL; + inLit : integer); +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPGetElementDefaultDimensions - This routine returns the recommended or minimum dimensions of a given UI - element. outCanBeLit tells whether the element has both a lit and unlit - state. Pass `NULL` to not receive any of these parameters. + This routine returns the recommended or minimum dimensions of a given UI + element. outCanBeLit tells whether the element has both a lit and unlit + state. Pass NULL to not receive any of these parameters. } PROCEDURE XPGetElementDefaultDimensions( inStyle : XPElementStyle; - outWidth : PInteger; { Can be nil } - outHeight : PInteger; { Can be nil } - outCanBeLit : PInteger); { Can be nil } - cdecl; external XPWIDGETS.DLL; + outWidth : Pinteger; { Can be nil } + outHeight : Pinteger; { Can be nil } + outCanBeLit : Pinteger); { Can be nil } +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPTrackStyle - A track is a UI element that displays a value vertically or horizontally. - X-Plane has three kinds of tracks: scroll bars, sliders, and progress bars. - Tracks can be displayed either horizontally or vertically; tracks will - choose their own layout based on the larger dimension of their dimensions - (e.g. they know if they are tall or wide). Sliders may be lit or unlit - (showing the user manipulating them). + A track is a UI element that displays a value vertically or horizontally. + X-Plane has three kinds of tracks: scroll bars, sliders, and progress bars. + Tracks can be displayed either horizontally or vertically; tracks will + choose their own layout based on the larger dimension of their dimensions + (e.g. they know if they are tall or wide). Sliders may be lit or unlit + (showing the user manipulating them). - - ScrollBar: this is a standard scroll bar with arrows and a thumb to drag. - - Slider: this is a simple track with a ball in the middle that can be - slid. - - Progress: this is a progress indicator showing how a long task is going. + ScrollBar - this is a standard scroll bar with arrows and a thumb to drag. + Slider - this is a simple track with a ball in the middle that can be slid. + Progress - this is a progress indicator showing how a long task is going. } TYPE XPTrackStyle = ( - { not over metal can be lit can be rotated } + { not over metal can be lit can be rotated } xpTrack_ScrollBar = 0 - { over metal can be lit can be rotated } + { over metal can be lit can be rotated } ,xpTrack_Slider = 1 - { over metal cannot be lit cannot be rotated } + { over metal cannot be lit cannot be rotated } ,xpTrack_Progress = 2 ); @@ -272,71 +297,81 @@ { XPDrawTrack - This routine draws a track. You pass in the track dimensions and size; the - track picks the optimal orientation for these dimensions. Pass in the - track's minimum current and maximum values; the indicator will be - positioned appropriately. You can also specify whether the track is lit or - not. + This routine draws a track. You pass in the track dimensions and size; the + track picks the optimal orientation for these dimensions. Pass in the + track's minimum current and maximum values; the indicator will be + positioned appropriately. You can also specify whether the track is lit or + not. } PROCEDURE XPDrawTrack( - inX1 : Integer; - inY1 : Integer; - inX2 : Integer; - inY2 : Integer; - inMin : Integer; - inMax : Integer; - inValue : Integer; + inX1 : integer; + inY1 : integer; + inX2 : integer; + inY2 : integer; + inMin : integer; + inMax : integer; + inValue : integer; inTrackStyle : XPTrackStyle; - inLit : Integer); - cdecl; external XPWIDGETS.DLL; + inLit : integer); +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPGetTrackDefaultDimensions - This routine returns a track's default smaller dimension; all tracks are - scalable in the larger dimension. It also returns whether a track can be - lit. + This routine returns a track's default smaller dimension; all tracks are + scalable in the larger dimension. It also returns whether a track can be + lit. } PROCEDURE XPGetTrackDefaultDimensions( inStyle : XPTrackStyle; - outWidth : PInteger; - outCanBeLit : PInteger); - cdecl; external XPWIDGETS.DLL; + outWidth : Pinteger; + outCanBeLit : Pinteger); +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPGetTrackMetrics - This routine returns the metrics of a track. If you want to write UI code - to manipulate a track, this routine helps you know where the mouse - locations are. For most other elements, the rectangle the element is drawn - in is enough information. However, the scrollbar drawing routine does some - automatic placement; this routine lets you know where things ended up. You - pass almost everything you would pass to the draw routine. You get out the - orientation, and other useful stuff. + This routine returns the metrics of a track. If you want to write UI code + to manipulate a track, this routine helps you know where the mouse + locations are. For most other elements, the rectangle the element is drawn + in is enough information. However, the scrollbar drawing routine does some + automatic placement; this routine lets you know where things ended up. You + pass almost everything you would pass to the draw routine. You get out the + orientation, and other useful stuff. - Besides orientation, you get five dimensions for the five parts of a - scrollbar, which are the down button, down area (area before the thumb), - the thumb, and the up area and button. For horizontal scrollers, the left - button decreases; for vertical scrollers, the top button decreases. + Besides orientation, you get five dimensions for the five parts of a + scrollbar, which are the down button, down area (area before the thumb), + the thumb, and the up area and button. For horizontal scrollers, the left + button decreases; for vertical scrollers, the top button decreases. } PROCEDURE XPGetTrackMetrics( - inX1 : Integer; - inY1 : Integer; - inX2 : Integer; - inY2 : Integer; - inMin : Integer; - inMax : Integer; - inValue : Integer; + inX1 : integer; + inY1 : integer; + inX2 : integer; + inY2 : integer; + inMin : integer; + inMax : integer; + inValue : integer; inTrackStyle : XPTrackStyle; - outIsVertical : PInteger; - outDownBtnSize : PInteger; - outDownPageSize : PInteger; - outThumbSize : PInteger; - outUpPageSize : PInteger; - outUpBtnSize : PInteger); - cdecl; external XPWIDGETS.DLL; - + outIsVertical : Pinteger; + outDownBtnSize : Pinteger; + outDownPageSize : Pinteger; + outThumbSize : Pinteger; + outUpPageSize : Pinteger; + outUpBtnSize : Pinteger); +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} IMPLEMENTATION - END. diff --git a/src/SDK/Delphi/Widgets/XPWidgetDefs.pas b/src/SDK/Delphi/Widgets/XPWidgetDefs.pas index 1cc342ff..8a38482d 100755 --- a/src/SDK/Delphi/Widgets/XPWidgetDefs.pas +++ b/src/SDK/Delphi/Widgets/XPWidgetDefs.pas @@ -1,23 +1,31 @@ { - 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 XPWidgetDefs; INTERFACE +{ + +} -USES - XPLMDefs; +USES XPLMDefs; {$A4} +{$IFDEF MSWINDOWS} + {$DEFINE DELPHI} +{$ENDIF} {___________________________________________________________________________ * WIDGET DEFINITIONS ___________________________________________________________________________} { - A widget is a call-back driven screen entity like a push-button, window, - text entry field, etc. + A widget is a call-back driven screen entity like a push-button, window, + text entry field, etc. - Use the widget API to create widgets of various classes. You can nest them - into trees of widgets to create complex user interfaces. + Use the widget API to create widgets of various classes. You can nest them + into trees of widgets to create complex user interfaces. } @@ -25,10 +33,10 @@ { XPWidgetID - A Widget ID is an opaque unique non-zero handle identifying your widget. - Use 0 to specify "no widget". This type is defined as wide enough to hold a - pointer. You receive a widget ID when you create a new widget and then use - that widget ID to further refer to the widget. + A Widget ID is an opaque unique non-zero handle identifying your widget. + Use 0 to specify "no widget". This type is defined as wide enough to hold a + pointer. You receive a widget ID when you create a new widget and then use + that widget ID to further refer to the widget. } XPWidgetID = pointer; PXPWidgetID = ^XPWidgetID; @@ -36,48 +44,46 @@ { XPWidgetPropertyID - Properties are values attached to instances of your widgets. A property is - identified by a 32-bit ID and its value is the width of a pointer. + Properties are values attached to instances of your widgets. A property is + identified by a 32-bit ID and its value is the width of a pointer. - Each widget instance may have a property or not have it. When you set a - property on a widget for the first time, the property is added to the - widget; it then stays there for the life of the widget. + Each widget instance may have a property or not have it. When you set a + property on a widget for the first time, the property is added to the + widget; it then stays there for the life of the widget. - Some property IDs are predefined by the widget package; you can make up - your own property IDs as well. + Some property IDs are predefined by the widget package; you can make up + your own property IDs as well. } XPWidgetPropertyID = ( - { A window's refcon is an opaque value used by client code to find other data} - { based on it. } + { A window's refcon is an opaque value used by client code to find other data } + { based on it. } xpProperty_Refcon = 0 - { These properties are used by the utlities to implement dragging. } + { These properties are used by the utlities to implement dragging. } ,xpProperty_Dragging = 1 ,xpProperty_DragXOff = 2 ,xpProperty_DragYOff = 3 - { Is the widget hilited? (For widgets that support this kind of thing.) } + { Is the widget hilited? (For widgets that support this kind of thing.) } ,xpProperty_Hilited = 4 - { Is there a C++ object attached to this widget? } + { Is there a C++ object attached to this widget? } ,xpProperty_Object = 5 - { If this property is 1, the widget package will use OpenGL to restrict } - { drawing to the Wiget's exposed rectangle. } + { If this property is 1, the widget package will use OpenGL to restrict } + { drawing to the Wiget's exposed rectangle. } ,xpProperty_Clip = 6 - { Is this widget enabled (for those that have a disabled state too)? } + { Is this widget enabled (for those that have a disabled state too)? } ,xpProperty_Enabled = 7 - { NOTE: Property IDs 1 - 999 are reserved for the widgets library. } - { } - { NOTE: Property IDs 1000 - 9999 are allocated to the standard widget classes} - { provided with the library. } - { } - { Properties 1000 - 1099 are for widget class 0, 1100 - 1199 for widget class} - { 1, etc. } + { NOTE: Property IDs 1 - 999 are reserved for the widget's library. } + { } + { NOTE: Property IDs 1000 - 9999 are allocated to the standard widget classes } + { provided with the library Properties 1000 - 1099 are for widget class 0, } + { 1100 - 1199 for widget class 1, etc. } ,xpProperty_UserStart = 10000 ); @@ -86,78 +92,78 @@ { XPMouseState_t - When the mouse is clicked or dragged, a pointer to this structure is passed - to your widget function. + When the mouse is clicked or dragged, a pointer to this structure is passed + to your widget function. } XPMouseState_t = RECORD - x : Integer; - y : Integer; - { Mouse Button number, left = 0 (right button not yet supported. } - button : Integer; + x : integer; + y : integer; + { Mouse Button number, left = 0 (right button not yet supported. } + button : integer; {$IFDEF XPLM200} - { Scroll wheel delta (button in this case would be the wheel axis number). } - delta : Integer; -{$ENDIF XPLM200} + { Scroll wheel delta (button in this case would be the wheel axis number). } + delta : integer; +{$ENDIF} END; PXPMouseState_t = ^XPMouseState_t; { XPKeyState_t - When a key is pressed, a pointer to this struct is passed to your widget - function. + When a key is pressed, a pointer to this struct is passed to your widget + function. } XPKeyState_t = RECORD - { The ASCII key that was pressed. WARNING: this may be 0 for some non-ASCII } - { key sequences. } - key : XPLMChar; - { The flags. Make sure to check this if you only want key-downs! } + { The ASCII key that was pressed. WARNING: this may be 0 for some non-ASCII } + { key sequences. } + key : char; + { The flags. Make sure to check this if you only want key-downs! } flags : XPLMKeyFlags; - { The virtual key code for the key } - vkey : XPLMChar; + { The virtual key code for the key } + vkey : char; END; PXPKeyState_t = ^XPKeyState_t; { XPWidgetGeometryChange_t - This structure contains the deltas for your widget's geometry when it - changes. + This structure contains the deltas for your widget's geometry when it + changes. } XPWidgetGeometryChange_t = RECORD - dx : Integer; - { +Y = the widget moved up } - dy : Integer; - dwidth : Integer; - dheight : Integer; + dx : integer; + { +Y = the widget moved up } + dy : integer; + dwidth : integer; + dheight : integer; END; PXPWidgetGeometryChange_t = ^XPWidgetGeometryChange_t; { XPDispatchMode - The dispatching modes describe how the widgets library sends out messages. - Currently there are three modes: + The dispatching modes describe how the widgets library sends out messages. + Currently there are three modes: } XPDispatchMode = ( - { The message will only be sent to the target widget. } + { The message will only be sent to the target widget. } xpMode_Direct = 0 - { The message is sent to the target widget, then up the chain of parents } - { until the message is handled or a parentless widget is reached. } + { The message is sent to the target widget, then up the chain of parents } + { until the message is handled or a parentless widget is reached. } ,xpMode_UpChain = 1 - { The message is sent to the target widget and then all of its children } - { recursively depth-first. } + { The message is sent to the target widget and then all of its children } + { recursively depth-first. } ,xpMode_Recursive = 2 - { The message is snet just to the target, but goes to every callback, even if} - { it is handled. } + { The message is snet just to the target, but goes to every callback, even if } + { it is handled. } ,xpMode_DirectAllCallbacks = 3 - { The message is only sent to the very first handler even if it is not } - { accepted. (This is really only useful for some internal widget library } - { functions.) } + { The message is only sent to the very first handler even if it is not } + { accepted. (This is really only useful for some internal Widget Lib } + { functions. } ,xpMode_Once = 4 ); @@ -166,235 +172,238 @@ { XPWidgetClass - Widget classes define predefined widget types. A widget class basically - specifies from a library the widget function to be used for the widget. - Most widgets can be made right from classes. + Widget classes define predefined widget types. A widget class basically + specifies from a library the widget function to be used for the widget. + Most widgets can be made right from classes. } - XPWidgetClass = Integer; + XPWidgetClass = integer; PXPWidgetClass = ^XPWidgetClass; CONST - { An unspecified widget class. Other widget classes are in } - { XPStandardWidgets.h } + { An unspecified widget class. Other widget classes are in } + { XPStandardWidgets.h } xpWidgetClass_None = 0; {___________________________________________________________________________ * WIDGET MESSAGES ___________________________________________________________________________} +{ + +} { XPWidgetMessage - Widgets receive 32-bit messages indicating what action is to be taken or - notifications of events. The list of messages may be expanded. + Widgets receive 32-bit messages indicating what action is to be taken or + notifications of events. The list of messages may be expanded. } TYPE XPWidgetMessage = ( - { No message, should not be sent. } + { No message, should not be sent. } xpMsg_None = 0 - { The create message is sent once per widget that is created with your widget} - { function and once for any widget that has your widget function attached. } - { } - { Dispatching: Direct } - { } - { Param 1: 1 if you are being added as a subclass, 0 if the widget is first } - { being created. } + { The create message is sent once per widget that is created with your widget } + { function and once for any widget that has your widget function attached. } + { } + { Dispatching: Direct } + { } + { Param 1: 1 if you are being added as a subclass, 0 if the widget is first } + { being created. } ,xpMsg_Create = 1 - { The destroy message is sent once for each message that is destroyed that } - { has your widget function. } - { } - { Dispatching: Direct for all } - { } - { Param 1: 1 if being deleted by a recursive delete to the parent, 0 for } - { explicit deletion. } + { The destroy message is sent once for each message that is destroyed that } + { has your widget function. } + { } + { Dispatching: Direct for all } + { } + { Param 1: 1 if being deleted by a recursive delete to the parent, 0 for } + { explicit deletion. } ,xpMsg_Destroy = 2 - { The paint message is sent to your widget to draw itself. The paint message } - { is the bare-bones message; in response you must draw yourself, draw your } - { children, set up clipping and culling, check for visibility, etc. If you } - { don't want to do all of this, ignore the paint message and a draw message } - { (see below) will be sent to you. } - { } - { Dispatching: Direct } + { The paint message is sent to your widget to draw itself. The paint message } + { is the bare-bones message; in response you must draw yourself, draw your } + { children, set up clipping and culling, check for visibility, etc. If you } + { don't want to do all of this, ignore the paint message and a draw message } + { (see below) will be sent to you. } + { } + { Dispatching: Direct } ,xpMsg_Paint = 3 - { The draw message is sent to your widget when it is time to draw yourself. } - { OpenGL will be set up to draw in 2-d global screen coordinates, but you } - { should use the XPLM to set up OpenGL state. } - { } - { Dispatching: Direct } + { The draw message is sent to your widget when it is time to draw yourself. } + { OpenGL will be set up to draw in 2-d global screen coordinates, but you } + { should use the XPLM to set up OpenGL state. } + { } + { Dispatching: Direct } ,xpMsg_Draw = 4 - { The key press message is sent once per key that is pressed. The first } - { parameter is the type of key code (integer or char) and the second is the } - { code itself. By handling this event, you consume the key stroke. } - { } - { Handling this message 'consumes' the keystroke; not handling it passes it } - { to your parent widget. } - { } - { Dispatching: Up Chain } - { } - { Param 1: A pointer to an XPKeyState_t structure with the keystroke. } + { The key press message is sent once per key that is pressed. The first } + { parameter is the type of key code (integer or char) and the second is the } + { code itself. By handling this event, you consume the key stroke. } + { } + { Handling this message 'consumes' the keystroke; not handling it passes it } + { to your parent widget. } + { } + { Dispatching: Up Chain } + { } + { : Param 1: A pointer to an XPKeyState_t structure with the keystroke. } ,xpMsg_KeyPress = 5 - { Keyboard focus is being given to you. By handling this message you accept } - { keyboard focus. The first parameter will be one if a child of yours gave up} - { focus to you, 0 if someone set focus on you explicitly. } - { } - { Handling this message accepts focus; not handling refuses focus. } - { } - { Dispatching: direct } - { } - { Param 1: 1 if you are gaining focus because your child is giving it up, 0 } - { if someone is explicitly giving you focus. } + { Keyboard focus is being given to you. By handling this message you accept } + { keyboard focus. The first parameter will be one if a child of yours gave up } + { focus to you, 0 if someone set focus on you explicitly. } + { } + { : Handling this message accepts focus; not handling refuses focus. } + { } + { Dispatching: direct } + { } + { Param 1: 1 if you are gaining focus because your child is giving it up, 0 } + { if someone is explicitly giving you focus. } ,xpMsg_KeyTakeFocus = 6 - { Keyboard focus is being taken away from you. The first parameter will be } - { one if you are losing focus because another widget is taking it, or 0 if } - { someone called the API to make you lose focus explicitly. } - { } - { Dispatching: Direct } - { } - { Param 1: 1 if focus is being taken by another widget, 0 if code requested } - { to remove focus. } + { Keyboard focus is being taken away from you. The first parameter will be } + { one if you are losing focus because another widget is taking it, or 0 if } + { someone called the API to make you lose focus explicitly. } + { } + { Dispatching: Direct } + { } + { Param 1: 1 if focus is being taken by another widget, 0 if code requested } + { to remove focus. } ,xpMsg_KeyLoseFocus = 7 - { You receive one mousedown event per click with a mouse-state structure } - { pointed to by parameter 1, by accepting this you eat the click, otherwise } - { your parent gets it. You will not receive drag and mouse up messages if you} - { do not accept the down message. } - { } - { Handling this message consumes the mouse click, not handling it passes it } - { to the next widget. You can act 'transparent' as a window by never handling} - { moues clicks to certain areas. } - { } - { Dispatching: Up chain NOTE: Technically this is direct dispatched, but the } - { widgets library will shop it to each widget until one consumes the click, } - { making it effectively "up chain". } - { } - { Param 1: A pointer to an XPMouseState_t containing the mouse status. } + { You receive one mousedown event per click with a mouse-state structure } + { pointed to by parameter 1, by accepting this you eat the click, otherwise } + { your parent gets it. You will not receive drag and mouse up messages if you } + { do not accept the down message. } + { } + { Handling this message consumes the mouse click, not handling it passes it } + { to the next widget. You can act 'transparent' as a window by never handling } + { moues clicks to certain areas. } + { } + { Dispatching: Up chain NOTE: Technically this is direct dispatched, but the } + { widgets library will shop it to each widget until one consumes the click, } + { making it effectively "up chain". } + { } + { Param 1: A pointer to an XPMouseState_t containing the mouse status. } ,xpMsg_MouseDown = 8 - { You receive a series of mouse drag messages (typically one per frame in the} - { sim) as the mouse is moved once you have accepted a mouse down message. } - { Parameter one points to a mouse-state structure describing the mouse } - { location. You will continue to receive these until the mouse button is } - { released. You may receive multiple mouse state messages with the same mouse} - { position. You will receive mouse drag events even if the mouse is dragged } - { out of your current or original bounds at the time of the mouse down. } - { } - { Dispatching: Direct } - { } - { Param 1: A pointer to an XPMouseState_t containing the mouse status. } + { You receive a series of mouse drag messages (typically one per frame in the } + { sim) as the mouse is moved once you have accepted a mouse down message. } + { Parameter one points to a mouse-state structure describing the mouse } + { location. You will continue to receive these until the mouse button is } + { released. You may receive multiple mouse state messages with the same mouse } + { position. You will receive mouse drag events even if the mouse is dragged } + { out of your current or original bounds at the time of the mouse down. } + { } + { Dispatching: Direct } + { } + { Param 1: A pointer to an XPMouseState_t containing the mouse status. } ,xpMsg_MouseDrag = 9 - { The mouseup event is sent once when the mouse button is released after a } - { drag or click. You only receive this message if you accept the mouseDown } - { message. Parameter one points to a mouse state structure. } - { } - { Dispatching: Direct } - { } - { Param 1: A pointer to an XPMouseState_t containing the mouse status. } + { The mouseup event is sent once when the mouse button is released after a } + { drag or click. You only receive this message if you accept the mouseDown } + { message. Parameter one points to a mouse state structure. } + { } + { Dispatching: Direct } + { } + { Param 1: A pointer to an XPMouseState_t containing the mouse status. } ,xpMsg_MouseUp = 10 - { Your geometry or a child's geometry is being changed. } - { } - { Dispatching: Up chain } - { } - { Param 1: The widget ID of the original reshaped target. } - { } - { Param 2: A pointer to a XPWidgetGeometryChange_t struct describing the } - { change. } + { Your geometry or a child's geometry is being changed. } + { } + { Dispatching: Up chain } + { } + { Param 1: The widget ID of the original reshaped target. } + { } + { Param 2: A pointer to a XPWidgetGeometryChange_t struct describing the } + { change. } ,xpMsg_Reshape = 11 - { Your exposed area has changed. } - { } - { Dispatching: Direct } + { Your exposed area has changed. } + { } + { Dispatching: Direct } ,xpMsg_ExposedChanged = 12 - { A child has been added to you. The child's ID is passed in parameter one. } - { } - { Dispatching: Direct } - { } - { Param 1: The Widget ID of the child being added. } + { A child has been added to you. The child's ID is passed in parameter one. } + { } + { Dispatching: Direct } + { } + { Param 1: The Widget ID of the child being added. } ,xpMsg_AcceptChild = 13 - { A child has been removed from to you. The child's ID is passed in parameter} - { one. } - { } - { Dispatching: Direct } - { } - { Param 1: The Widget ID of the child being removed. } + { A child has been removed from to you. The child's ID is passed in parameter } + { one. } + { } + { Dispatching: Direct } + { } + { Param 1: The Widget ID of the child being removed. } ,xpMsg_LoseChild = 14 - { You now have a new parent, or have no parent. The parent's ID is passed in,} - { or 0 for no parent. } - { } - { Dispatching: Direct } - { } - { Param 1: The Widget ID of your parent } + { You now have a new parent, or have no parent. The parent's ID is passed in, } + { or 0 for no parent. } + { } + { Dispatching: Direct } + { } + { Param 1: The Widget ID of your parent } ,xpMsg_AcceptParent = 15 - { You or a child has been shown. Note that this does not include you being } - { shown because your parent was shown, you were put in a new parent, your } - { root was shown, etc. } - { } - { Dispatching: Up chain } - { } - { Param 1: The widget ID of the shown widget. } + { You or a child has been shown. Note that this does not include you being } + { shown because your parent was shown, you were put in a new parent, your } + { root was shown, etc. } + { } + { Dispatching: Up chain } + { } + { Param 1: The widget ID of the shown widget. } ,xpMsg_Shown = 16 - { You have been hidden. See limitations above. } - { } - { Dispatching: Up chain } - { } - { Param 1: The widget ID of the hidden widget. } + { You have been hidden. See limitations above. } + { } + { Dispatching: Up chain } + { } + { Param 1: The widget ID of the hidden widget. } ,xpMsg_Hidden = 17 - { Your descriptor has changed. } - { } - { Dispatching: Direct } + { Your descriptor has changed. } + { } + { Dispatching: Direct } ,xpMsg_DescriptorChanged = 18 - { A property has changed. Param 1 contains the property ID. } - { } - { Dispatching: Direct } - { } - { Param 1: The Property ID being changed. } - { } - { Param 2: The new property value } + { A property has changed. Param 1 contains the property ID. } + { } + { Dispatching: Direct } + { } + { Param 1: The Property ID being changed. } + { } + { Param 2: The new property value } ,xpMsg_PropertyChanged = 19 {$IFDEF XPLM200} - { The mouse wheel has moved. } - { } - { Return 1 to consume the mouse wheel move, or 0 to pass the message to a } - { parent. Dispatching: Up chain } - { } - { Param 1: A pointer to an XPMouseState_t containing the mouse status. } + { The mouse wheel has moved. } + { } + { Return 1 to consume the mouse wheel move, or 0 to pass the message to a } + { parent. Dispatching: Up chain } + { } + { Param 1: A pointer to an XPMouseState_t containing the mouse status. } ,xpMsg_MouseWheel = 20 -{$ENDIF XPLM200} +{$ENDIF} {$IFDEF XPLM200} - { The cursor is over your widget. If you consume this message, change the } - { XPLMCursorStatus value to indicate the desired result, with the same rules } - { as in XPLMDisplay.h. } - { } - { Return 1 to consume this message, 0 to pass it on. } - { } - { Dispatching: Up chain Param 1: A pointer to an XPMouseState_t struct } - { containing the mouse status. } - { } - { Param 2: A pointer to a XPLMCursorStatus - set this to the cursor result } - { you desire. } + { The cursor is over your widget. If you consume this message, change the } + { XPLMCursorStatus value to indicate the desired result, with the same rules } + { as in XPLMDisplay.h. } + { } + { Return 1 to consume this message, 0 to pass it on. } + { } + { Dispatching: Up chain Param 1: A pointer to an XPMouseState_t struct } + { containing the mouse status. } + { } + { Param 2: A pointer to a XPLMCursorStatus - set this to the cursor result } + { you desire. } ,xpMsg_CursorAdjust = 21 -{$ENDIF XPLM200} +{$ENDIF} - { NOTE: Message IDs 1000 - 9999 are allocated to the standard widget classes } - { provided with the library with 1000 - 1099 for widget class 0, 1100 - 1199 } - { for widget class 1, etc. Message IDs 10,000 and beyond are for plugin use. } + { NOTE: Message IDs 1000 - 9999 are allocated to the standard widget classes } + { provided with the library with 1000 - 1099 for widget class 0, 1100 - 1199 } + { for widget class 1, etc. Message IDs 10,000 and beyond are for plugin use. } ,xpMsg_UserStart = 10000 ); @@ -403,25 +412,26 @@ {___________________________________________________________________________ * WIDGET CALLBACK FUNCTION ___________________________________________________________________________} +{ + +} { XPWidgetFunc_t - This function defines your custom widget's behavior. It will be called by - the widgets library to send messages to your widget. The message and widget - ID are passed in, as well as two ptr-width signed parameters whose meaning - varies with the message. Return 1 to indicate that you have processed the - message, 0 to indicate that you have not. For any message that is not - understood, return 0. + This function defines your custom widget's behavior. It will be called by + the widgets library to send messages to your widget. The message and widget + ID are passed in, as well as two ptr-width signed parameters whose meaning + varies with the message. Return 1 to indicate that you have processed the + message, 0 to indicate that you have not. For any message that is not + understood, return 0. } TYPE XPWidgetFunc_t = FUNCTION( inMessage : XPWidgetMessage; inWidget : XPWidgetID; inParam1 : intptr_t; - inParam2 : intptr_t) : Integer; cdecl; - + inParam2 : intptr_t) : integer; cdecl; IMPLEMENTATION - END. diff --git a/src/SDK/Delphi/Widgets/XPWidgetUtils.pas b/src/SDK/Delphi/Widgets/XPWidgetUtils.pas index 9621126f..80ef7a3d 100755 --- a/src/SDK/Delphi/Widgets/XPWidgetUtils.pas +++ b/src/SDK/Delphi/Widgets/XPWidgetUtils.pas @@ -1,70 +1,74 @@ { - 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 XPWidgetUtils; INTERFACE { - ## USAGE NOTES + XPWidgetUtils - USAGE NOTES + + The XPWidgetUtils library contains useful functions that make writing and + using widgets less of a pain. - The XPWidgetUtils library contains useful functions that make writing and - using widgets less of a pain. + One set of functions are the widget behavior functions. These functions + each add specific useful behaviors to widgets. They can be used in two + manners: - One set of functions are the widget behavior functions. These functions - each add specific useful behaviors to widgets. They can be used in two - manners: + 1. You can add a widget behavior function to a widget as a callback proc + using the XPAddWidgetCallback function. The widget will gain that behavior. + Remember that the last function you add has highest priority. You can use + this to change or augment the behavior of an existing finished widget. - 1. You can add a widget behavior function to a widget as a callback proc - using the XPAddWidgetCallback function. The widget will gain that - behavior. Remember that the last function you add has highest priority. - You can use this to change or augment the behavior of an existing - finished widget. - 2. You can call a widget function from inside your own widget function. - This allows you to include useful behaviors in custom-built widgets. A - number of the standard widgets get their behavior from this library. To - do this, call the behavior function from your function first. If it - returns 1, that means it handled the event and you don't need to; simply - return 1. + 2. You can call a widget function from inside your own widget function. + This allows you to include useful behaviors in custom-built widgets. A + number of the standard widgets get their behavior from this library. To do + this, call the behavior function from your function first. If it returns 1, + that means it handled the event and you don't need to; simply return 1. } -USES - XPWidgetDefs; +USES XPWidgetDefs; {$A4} +{$IFDEF MSWINDOWS} + {$DEFINE DELPHI} +{$ENDIF} {___________________________________________________________________________ * GENERAL UTILITIES ___________________________________________________________________________} +{ + +} { XPWidgetCreate_t - This structure contains all of the parameters needed to create a wiget. It - is used with XPUCreateWidgets to create widgets in bulk from an array. All - parameters correspond to those of XPCreateWidget except for the container - index. - - If the container index is equal to the index of a widget in the array, the - widget in the array passed to XPUCreateWidgets is used as the parent of - this widget. Note that if you pass an index greater than your own position - in the array, the parent you are requesting will not exist yet. - - If the container index is NO_PARENT, the parent widget is specified as - NULL. If the container index is PARAM_PARENT, the widget passed into - XPUCreateWidgets is used. + This structure contains all of the parameters needed to create a wiget. It + is used with XPUCreateWidgets to create widgets in bulk from an array. All + parameters correspond to those of XPCreateWidget except for the container + index. If the container index is equal to the index of a widget in the + array, the widget in the array passed to XPUCreateWidgets is used as the + parent of this widget. Note that if you pass an index greater than your own + position in the array, the parent you are requesting will not exist yet. If + the container index is NO_PARENT, the parent widget is specified as NULL. + If the container index is PARAM_PARENT, the widget passed into + XPUCreateWidgets is used. } TYPE XPWidgetCreate_t = RECORD - left : Integer; - top : Integer; - right : Integer; - bottom : Integer; - visible : Integer; - descriptor : XPLMString; - { Whether ethis widget is a root wiget } - isRoot : Integer; - { The index of the widget to contain within, or a constant } - containerIndex : Integer; + left : integer; + top : integer; + right : integer; + bottom : integer; + visible : integer; + descriptor : Pchar; + { Whether ethis widget is a root wiget } + isRoot : integer; + { The index of the widget to contain within, or a constant } + containerIndex : integer; widgetClass : XPWidgetClass; END; PXPWidgetCreate_t = ^XPWidgetCreate_t; @@ -78,120 +82,142 @@ { XPUCreateWidgets - This function creates a series of widgets from a table (see - XPCreateWidget_t above). Pass in an array of widget creation structures and - an array of widget IDs that will receive each widget. + This function creates a series of widgets from a table...see + XPCreateWidget_t above. Pass in an array of widget creation structures and + an array of widget IDs that will receive each widget. - Widget parents are specified by index into the created widget table, - allowing you to create nested widget structures. You can create multiple - widget trees in one table. Generally you should create widget trees from - the top down. + Widget parents are specified by index into the created widget table, + allowing you to create nested widget structures. You can create multiple + widget trees in one table. Generally you should create widget trees from + the top down. - You can also pass in a widget ID that will be used when the widget's parent - is listed as PARAM_PARENT; this allows you to embed widgets created with - XPUCreateWidgets in a widget created previously. + You can also pass in a widget ID that will be used when the widget's parent + is listed as PARAM_PARENT; this allows you to embed widgets created with + XPUCreateWidgets in a widget created previously. } PROCEDURE XPUCreateWidgets( inWidgetDefs : PXPWidgetCreate_t; - inCount : Integer; + inCount : integer; inParamParent : XPWidgetID; ioWidgets : PXPWidgetID); - cdecl; external XPWIDGETS.DLL; +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPUMoveWidgetBy - Simply moves a widget by an amount, +x = right, +y=up, without resizing the - widget. + Simply moves a widget by an amount, +x = right, +y=up, without resizing the + widget. } PROCEDURE XPUMoveWidgetBy( inWidget : XPWidgetID; - inDeltaX : Integer; - inDeltaY : Integer); - cdecl; external XPWIDGETS.DLL; + inDeltaX : integer; + inDeltaY : integer); +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} {___________________________________________________________________________ * LAYOUT MANAGERS ___________________________________________________________________________} { - The layout managers are widget behavior functions for handling where - widgets move. Layout managers can be called from a widget function or - attached to a widget later. + The layout managers are widget behavior functions for handling where + widgets move. Layout managers can be called from a widget function or + attached to a widget later. } { XPUFixedLayout - This function causes the widget to maintain its children in fixed position - relative to itself as it is resized. Use this on the top level 'window' - widget for your window. + This function causes the widget to maintain its children in fixed position + relative to itself as it is resized. Use this on the top level 'window' + widget for your window. } FUNCTION XPUFixedLayout( inMessage : XPWidgetMessage; inWidget : XPWidgetID; inParam1 : intptr_t; - inParam2 : intptr_t) : Integer; - cdecl; external XPWIDGETS.DLL; + inParam2 : intptr_t) : integer; +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} {___________________________________________________________________________ * WIDGET PROC BEHAVIORS ___________________________________________________________________________} { - These widget behavior functions add other useful behaviors to widgets. - These functions cannot be attached to a widget; they must be called from - your widget function. + These widget behavior functions add other useful behaviors to widgets. + These functions cannot be attached to a widget; they must be called from + your widget function. } { XPUSelectIfNeeded - This causes the widget to bring its window to the foreground if it is not - already. inEatClick specifies whether clicks in the background should be - consumed by bringin the window to the foreground. + This causes the widget to bring its window to the foreground if it is not + already. inEatClick specifies whether clicks in the background should be + consumed by bringin the window to the foreground. } FUNCTION XPUSelectIfNeeded( inMessage : XPWidgetMessage; inWidget : XPWidgetID; inParam1 : intptr_t; inParam2 : intptr_t; - inEatClick : Integer) : Integer; - cdecl; external XPWIDGETS.DLL; + inEatClick : integer) : integer; +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPUDefocusKeyboard - This causes a click in the widget to send keyboard focus back to X-Plane. - This stops editing of any text fields, etc. + This causes a click in the widget to send keyboard focus back to X-Plane. + This stops editing of any text fields, etc. } FUNCTION XPUDefocusKeyboard( inMessage : XPWidgetMessage; inWidget : XPWidgetID; inParam1 : intptr_t; inParam2 : intptr_t; - inEatClick : Integer) : Integer; - cdecl; external XPWIDGETS.DLL; + inEatClick : integer) : integer; +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPUDragWidget - XPUDragWidget drags the widget in response to mouse clicks. Pass in not - only the event, but the global coordinates of the drag region, which might - be a sub-region of your widget (for example, a title bar). + XPUDragWidget drags the widget in response to mouse clicks. Pass in not + only the event, but the global coordinates of the drag region, which might + be a sub-region of your widget (for example, a title bar). } FUNCTION XPUDragWidget( inMessage : XPWidgetMessage; inWidget : XPWidgetID; inParam1 : intptr_t; inParam2 : intptr_t; - inLeft : Integer; - inTop : Integer; - inRight : Integer; - inBottom : Integer) : Integer; - cdecl; external XPWIDGETS.DLL; - + inLeft : integer; + inTop : integer; + inRight : integer; + inBottom : integer) : integer; +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} IMPLEMENTATION - END. diff --git a/src/SDK/Delphi/Widgets/XPWidgets.pas b/src/SDK/Delphi/Widgets/XPWidgets.pas index 46ae5422..fe002d0e 100755 --- a/src/SDK/Delphi/Widgets/XPWidgets.pas +++ b/src/SDK/Delphi/Widgets/XPWidgets.pas @@ -1,527 +1,678 @@ { - 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 XPWidgets; INTERFACE { - ## THEORY OF OPERATION AND NOTES + WIDGETS - THEORY OF OPERATION AND NOTES + + Widgets are persistent view 'objects' for X-Plane. A widget is an object + referenced by its opaque handle (widget ID) and the APIs in this file. You + cannot access the widget's guts directly. Every Widget has the following + intrinsic data: + + - A bounding box defined in global screen coordinates with 0,0 in the + bottom left and +y = up, +x = right. + + - A visible box, which is the intersection of the bounding box with the + widget's parents visible box. + + - Zero or one parent widgets. (Always zero if the widget is a root widget. + + - Zero or more child widgets. + + - Whether the widget is a root. Root widgets are the top level plugin + windows. + + - Whether the widget is visible. + + - A text string descriptor, whose meaning varies from widget to widget. - Widgets are persistent view 'objects' for X-Plane. A widget is an object - referenced by its opaque handle (widget ID) and the APIs in this file. You - cannot access the widget's guts directly. Every Widget has the following - intrinsic data: + - An arbitrary set of 32 bit integral properties defined by 32-bit integral + keys. This is how specific widgets - - A bounding box defined in global screen coordinates with 0,0 in the - bottom left and +y = up, +x = right. - - A visible box, which is the intersection of the bounding box with the - widget's parents visible box. - - Zero or one parent widgets. (Always zero if the widget is a root widget. - - Zero or more child widgets. - - Whether the widget is a root. Root widgets are the top level plugin - windows. - - Whether the widget is visible. - - A text string descriptor, whose meaning varies from widget to widget. - - An arbitrary set of 32 bit integral properties defined by 32-bit integral - keys. This is how specific widgets store specific data. - - A list of widget callbacks proc that implements the widgets behaviors. + store specific data. - The Widgets library sends messages to widgets to request specific behaviors - or notify the widget of things. + - A list of widget callbacks proc that implements the widgets behaviors. - Widgets may have more than one callback function, in which case messages - are sent to the most recently added callback function until the message is - handled. Messages may also be sent to parents or children; see the - XPWidgetDefs.h header file for the different widget message dispatching - functions. By adding a callback function to a window you can 'subclass' its - behavior. + The Widgets library sends messages to widgets to request specific behaviors + or notify the widget of things. - A set of standard widgets are provided that serve common UI purposes. You - can also customize or implement entirely custom widgets. + Widgets may have more than one callback function, in which case messages + are sent to the most recently added callback function until the message is + handled. Messages may also be sent to parents or children; see the + XPWidgetDefs.h header file for the different widget message dispatching + functions. By adding a callback function to a window you can 'subclass' its + behavior. - Widgets are different than other view hierarchies (most notably Win32, - which they bear a striking resemblance to) in the following ways: + A set of standard widgets are provided that serve common UI purposes. You + can also customize or implement entirely custom widgets. - - Not all behavior can be patched. State that is managed by the XPWidgets - DLL and not by individual widgets cannot be customized. - - All coordinates are in global screen coordinates. Coordinates are not - relative to an enclosing widget, nor are they relative to a display - window. - - Widget messages are always dispatched synchronously, and there is no - concept of scheduling an update or a dirty region. Messages originate - from X-Plane as the sim cycle goes by. Since X-Plane is constantly - redrawing, so are widgets; there is no need to mark a part of a widget as - 'needing redrawing' because redrawing happens frequently whether the - widget needs it or not. - - Any widget may be a 'root' widget, causing it to be drawn; there is no - relationship between widget class and rootness. Root widgets are - imlemented as XPLMDisply windows. + Widgets are different than other view hierarchies (most notably Win32, + which they bear a striking resemblance to) in the following ways: + + - Not all behavior can be patched. State that is managed by the XPWidgets + DLL and not by individual widgets cannot be customized. + + - All coordinates are in global screen coordinates. Coordinates are not + relative to an enclosing widget, nor are they relative to a display window. + + + - Widget messages are always dispatched synchronously, and there is no + concept of scheduling an update or a dirty region. Messages originate from + X-Plane as the sim cycle goes by. Since X-Plane is constantly redrawing, so + are widgets; there is no need to mark a part of a widget as 'needing + redrawing' because redrawing happens frequently whether the widget needs it + or not. + + - Any widget may be a 'root' widget, causing it to be drawn; there is no + relationship between widget class and rootness. Root widgets are imlemented + as XPLMDisply windows. } -USES - XPWidgetDefs, XPLMDisplay; +USES XPWidgetDefs; +USES XPLMDisplay; {$A4} +{$IFDEF MSWINDOWS} + {$DEFINE DELPHI} +{$ENDIF} {___________________________________________________________________________ * WIDGET CREATION AND MANAGEMENT ___________________________________________________________________________} +{ + +} { XPCreateWidget - This function creates a new widget and returns the new widget's ID to you. - If the widget creation fails for some reason, it returns NULL. Widget - creation will fail either if you pass a bad class ID or if there is not - adequate memory. - - Input Parameters: - - - Top, left, bottom, and right in global screen coordinates defining the - widget's location on the screen. - - inVisible is 1 if the widget should be drawn, 0 to start the widget as - hidden. - - inDescriptor is a null terminated string that will become the widget's - descriptor. - - inIsRoot is 1 if this is going to be a root widget, 0 if it will not be. - - inContainer is the ID of this widget's container. It must be 0 for a root - widget. for a non-root widget, pass the widget ID of the widget to place - this widget within. If this widget is not going to start inside another - widget, pass 0; this new widget will then just be floating off in space - (and will not be drawn until it is placed in a widget. - - inClass is the class of the widget to draw. Use one of the predefined - class-IDs to create a standard widget. - - A note on widget embedding: a widget is only called (and will be drawn, - etc.) if it is placed within a widget that will be called. Root widgets are - always called. So it is possible to have whole chains of widgets that are - simply not called. You can preconstruct widget trees and then place them - into root widgets later to activate them if you wish. + This function creates a new widget and returns the new widget's ID to you. + If the widget creation fails for some reason, it returns NULL. Widget + creation will fail either if you pass a bad class ID or if there is not + adequate memory. + + Input Parameters: + + - Top, left, bottom, and right in global screen coordinates defining the + widget's location on the screen. + + - inVisible is 1 if the widget should be drawn, 0 to start the widget as + hidden. + + - inDescriptor is a null terminated string that will become the widget's + descriptor. + + - inIsRoot is 1 if this is going to be a root widget, 0 if it will not be. + + - inContainer is the ID of this widget's container. It must be 0 for a root + widget. for a non-root widget, pass the widget ID of the widget to place + this widget within. If this widget is not going to start inside another + widget, pass 0; this new widget will then just be floating off in space + (and will not be drawn until it is placed in a widget. + + - inClass is the class of the widget to draw. Use one of the predefined + class-IDs to create a standard widget. + + A note on widget embedding: a widget is only called (and will be drawn, + etc.) if it is placed within a widget that will be called. Root widgets are + always called. So it is possible to have whole chains of widgets that are + simply not called. You can preconstruct widget trees and then place them + into root widgets later to activate them if you wish. } FUNCTION XPCreateWidget( - inLeft : Integer; - inTop : Integer; - inRight : Integer; - inBottom : Integer; - inVisible : Integer; - inDescriptor : XPLMString; - inIsRoot : Integer; + inLeft : integer; + inTop : integer; + inRight : integer; + inBottom : integer; + inVisible : integer; + inDescriptor : Pchar; + inIsRoot : integer; inContainer : XPWidgetID; inClass : XPWidgetClass) : XPWidgetID; - cdecl; external XPWIDGETS.DLL; +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPCreateCustomWidget - This function is the same as XPCreateWidget except that instead of passing - a class ID, you pass your widget callback function pointer defining the - widget. Use this function to define a custom widget. All parameters are the - same as XPCreateWidget, except that the widget class has been replaced with - the widget function. + This function is the same as XPCreateWidget except that instead of passing + a class ID, you pass your widget callback function pointer defining the + widget. Use this function to define a custom widget. All parameters are the + same as XPCreateWidget, except that the widget class has been replaced with + the widget function. } FUNCTION XPCreateCustomWidget( - inLeft : Integer; - inTop : Integer; - inRight : Integer; - inBottom : Integer; - inVisible : Integer; - inDescriptor : XPLMString; - inIsRoot : Integer; + inLeft : integer; + inTop : integer; + inRight : integer; + inBottom : integer; + inVisible : integer; + inDescriptor : Pchar; + inIsRoot : integer; inContainer : XPWidgetID; inCallback : XPWidgetFunc_t) : XPWidgetID; - cdecl; external XPWIDGETS.DLL; +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPDestroyWidget - This class destroys a widget. Pass in the ID of the widget to kill. If you - pass 1 for inDestroyChilren, the widget's children will be destroyed first, - then this widget will be destroyed. (Furthermore, the widget's children - will be destroyed with the inDestroyChildren flag set to 1, so the - destruction will recurse down the widget tree.) If you pass 0 for this - flag, the child widgets will simply end up with their parent set to 0. + This class destroys a widget. Pass in the ID of the widget to kill. If you + pass 1 for inDestroyChilren, the widget's children will be destroyed first, + then this widget will be destroyed. (Furthermore, the widget's children + will be destroyed with the inDestroyChildren flag set to 1, so the + destruction will recurse down the widget tree.) If you pass 0 for this + flag, the child widgets will simply end up with their parent set to 0. } PROCEDURE XPDestroyWidget( inWidget : XPWidgetID; - inDestroyChildren : Integer); - cdecl; external XPWIDGETS.DLL; + inDestroyChildren : integer); +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPSendMessageToWidget - This sends any message to a widget. You should probably not go around - simulating the predefined messages that the widgets library defines for - you. You may however define custom messages for your widgets and send them - with this method. + This sends any message to a widget. You should probably not go around + simulating the predefined messages that the widgets library defines for + you. You may however define custom messages for your widgets and send them + with this method. - This method supports several dispatching patterns; see XPDispatchMode for - more info. The function returns 1 if the message was handled, 0 if it was - not. + This method supports several dispatching patterns; see XPDispatchMode for + more info. The function returns 1 if the message was handled, 0 if it was + not. - For each widget that receives the message (see the dispatching modes), each - widget function from the most recently installed to the oldest one receives - the message in order until it is handled. + For each widget that receives the message (see the dispatching modes), each + widget function from the most recently installed to the oldest one receives + the message in order until it is handled. } FUNCTION XPSendMessageToWidget( inWidget : XPWidgetID; inMessage : XPWidgetMessage; inMode : XPDispatchMode; inParam1 : intptr_t; - inParam2 : intptr_t) : Integer; - cdecl; external XPWIDGETS.DLL; + inParam2 : intptr_t) : integer; +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} {___________________________________________________________________________ * WIDGET POSITIONING AND VISIBILITY ___________________________________________________________________________} +{ + +} { XPPlaceWidgetWithin - This function changes which container a widget resides in. You may NOT use - this function on a root widget! inSubWidget is the widget that will be - moved. Pass a widget ID in inContainer to make inSubWidget be a child of - inContainer. It will become the last/closest widget in the container. Pass - 0 to remove the widget from any container. Any call to this other than - passing the widget ID of the old parent of the affected widget will cause - the widget to be removed from its old parent. Placing a widget within its - own parent simply makes it the last widget. - - NOTE: this routine does not reposition the sub widget in global - coordinates. If the container has layout management code, it will - reposition the subwidget for you, otherwise you must do it with - SetWidgetGeometry. + This function changes which container a widget resides in. You may NOT use + this function on a root widget! inSubWidget is the widget that will be + moved. Pass a widget ID in inContainer to make inSubWidget be a child of + inContainer. It will become the last/closest widget in the container. Pass + 0 to remove the widget from any container. Any call to this other than + passing the widget ID of the old parent of the affected widget will cause + the widget to be removed from its old parent. Placing a widget within its + own parent simply makes it the last widget. + + NOTE: this routine does not reposition the sub widget in global + coordinates. If the container has layout management code, it will + reposition the subwidget for you, otherwise you must do it with + SetWidgetGeometry. } PROCEDURE XPPlaceWidgetWithin( inSubWidget : XPWidgetID; inContainer : XPWidgetID); - cdecl; external XPWIDGETS.DLL; +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPCountChildWidgets - This routine returns the number of widgets another widget contains. + This routine returns the number of widgets another widget contains. } FUNCTION XPCountChildWidgets( - inWidget : XPWidgetID) : Integer; - cdecl; external XPWIDGETS.DLL; + inWidget : XPWidgetID) : integer; +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPGetNthChildWidget - This routine returns the widget ID of a child widget by index. Indexes are - 0 based, from 0 to one minus the number of widgets in the parent, - inclusive. If the index is invalid, 0 is returned. + This routine returns the widget ID of a child widget by index. Indexes are + 0 based, from 0 to one minus the number of widgets in the parent, + inclusive. If the index is invalid, 0 is returned. } FUNCTION XPGetNthChildWidget( inWidget : XPWidgetID; - inIndex : Integer) : XPWidgetID; - cdecl; external XPWIDGETS.DLL; + inIndex : integer) : XPWidgetID; +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPGetParentWidget - Returns the parent of a widget, or 0 if the widget has no parent. Root - widgets never have parents and therefore always return 0. + This routine returns the parent of a widget, or 0 if the widget has no + parent. Root widgets never have parents and therefore always return 0. } FUNCTION XPGetParentWidget( inWidget : XPWidgetID) : XPWidgetID; - cdecl; external XPWIDGETS.DLL; +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPShowWidget - This routine makes a widget visible if it is not already. Note that if a - widget is not in a rooted widget hierarchy or one of its parents is not - visible, it will still not be visible to the user. + This routine makes a widget visible if it is not already. Note that if a + widget is not in a rooted widget hierarchy or one of its parents is not + visible, it will still not be visible to the user. } PROCEDURE XPShowWidget( inWidget : XPWidgetID); - cdecl; external XPWIDGETS.DLL; +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPHideWidget - Makes a widget invisible. See XPShowWidget for considerations of when a - widget might not be visible despite its own visibility state. + Makes a widget invisible. See XPShowWidget for considerations of when a + widget might not be visible despite its own visibility state. } PROCEDURE XPHideWidget( inWidget : XPWidgetID); - cdecl; external XPWIDGETS.DLL; +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPIsWidgetVisible - This returns 1 if a widget is visible, 0 if it is not. Note that this - routine takes into consideration whether a parent is invisible. Use this - routine to tell if the user can see the widget. + This returns 1 if a widget is visible, 0 if it is not. Note that this + routine takes into consideration whether a parent is invisible. Use this + routine to tell if the user can see the widget. } FUNCTION XPIsWidgetVisible( - inWidget : XPWidgetID) : Integer; - cdecl; external XPWIDGETS.DLL; + inWidget : XPWidgetID) : integer; +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPFindRootWidget - Returns the Widget ID of the root widget that contains the passed in widget - or NULL if the passed in widget is not in a rooted hierarchy. + XPFindRootWidget returns the Widget ID of the root widget that contains the + passed in widget or NULL if the passed in widget is not in a rooted + hierarchy. } FUNCTION XPFindRootWidget( inWidget : XPWidgetID) : XPWidgetID; - cdecl; external XPWIDGETS.DLL; +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPBringRootWidgetToFront - This routine makes the specified widget be in the front most widget - hierarchy. If this widget is a root widget, its widget hierarchy comes to - front, otherwise the widget's root is brought to the front. If this widget - is not in an active widget hiearchy (e.g. there is no root widget at the - top of the tree), this routine does nothing. + This routine makes the specified widget be in the front most widget + hierarchy. If this widget is a root widget, its widget hierarchy comes to + front, otherwise the widget's root is brought to the front. If this widget + is not in an active widget hiearchy (e.g. there is no root widget at the + top of the tree), this routine does nothing. } PROCEDURE XPBringRootWidgetToFront( inWidget : XPWidgetID); - cdecl; external XPWIDGETS.DLL; +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPIsWidgetInFront - This routine returns true if this widget's hierarchy is the front most - hierarchy. It returns false if the widget's hierarchy is not in front, or - if the widget is not in a rooted hierarchy. + This routine returns true if this widget's hierarchy is the front most + hierarchy. It returns false if the widget's hierarchy is not in front, or + if the widget is not in a rooted hierarchy. } FUNCTION XPIsWidgetInFront( - inWidget : XPWidgetID) : Integer; - cdecl; external XPWIDGETS.DLL; + inWidget : XPWidgetID) : integer; +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPGetWidgetGeometry - This routine returns the bounding box of a widget in global coordinates. - Pass NULL for any parameter you are not interested in. + This routine returns the bounding box of a widget in global coordinates. + Pass NULL for any parameter you are not interested in. } PROCEDURE XPGetWidgetGeometry( inWidget : XPWidgetID; - outLeft : PInteger; { Can be nil } - outTop : PInteger; { Can be nil } - outRight : PInteger; { Can be nil } - outBottom : PInteger); { Can be nil } - cdecl; external XPWIDGETS.DLL; + outLeft : Pinteger; { Can be nil } + outTop : Pinteger; { Can be nil } + outRight : Pinteger; { Can be nil } + outBottom : Pinteger); { Can be nil } +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPSetWidgetGeometry - This function changes the bounding box of a widget. + This function changes the bounding box of a widget. } PROCEDURE XPSetWidgetGeometry( inWidget : XPWidgetID; - inLeft : Integer; - inTop : Integer; - inRight : Integer; - inBottom : Integer); - cdecl; external XPWIDGETS.DLL; + inLeft : integer; + inTop : integer; + inRight : integer; + inBottom : integer); +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPGetWidgetForLocation - Given a widget and a location, this routine returns the widget ID of the - child of that widget that owns that location. If inRecursive is true then - this will return a child of a child of a widget as it tries to find the - deepest widget at that location. If inVisibleOnly is true, then only - visible widgets are considered, otherwise all widgets are considered. The - widget ID passed for inContainer will be returned if the location is in - that widget but not in a child widget. 0 is returned if the location is not - in the container. - - NOTE: if a widget's geometry extends outside its parents geometry, it will - not be returned by this call for mouse locations outside the parent - geometry. The parent geometry limits the child's eligibility for mouse - location. + Given a widget and a location, this routine returns the widget ID of the + child of that widget that owns that location. If inRecursive is true then + this will return a child of a child of a widget as it tries to find the + deepest widget at that location. If inVisibleOnly is true, then only + visible widgets are considered, otherwise all widgets are considered. The + widget ID passed for inContainer will be returned if the location is in + that widget but not in a child widget. 0 is returned if the location is not + in the container. + + NOTE: if a widget's geometry extends outside its parents geometry, it will + not be returned by this call for mouse locations outside the parent + geometry. The parent geometry limits the child's eligibility for mouse + location. } FUNCTION XPGetWidgetForLocation( inContainer : XPWidgetID; - inXOffset : Integer; - inYOffset : Integer; - inRecursive : Integer; - inVisibleOnly : Integer) : XPWidgetID; - cdecl; external XPWIDGETS.DLL; + inXOffset : integer; + inYOffset : integer; + inRecursive : integer; + inVisibleOnly : integer) : XPWidgetID; +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPGetWidgetExposedGeometry - This routine returns the bounds of the area of a widget that is completely - within its parent widgets. Since a widget's bounding box can be outside its - parent, part of its area will not be elligible for mouse clicks and should - not draw. Use XPGetWidgetGeometry to find out what area defines your - widget's shape, but use this routine to find out what area to actually draw - into. Note that the widget library does not use OpenGL clipping to keep - frame rates up, although you could use it internally. + This routine returns the bounds of the area of a widget that is completely + within its parent widgets. Since a widget's bounding box can be outside its + parent, part of its area will not be elligible for mouse clicks and should + not draw. Use XPGetWidgetGeometry to find out what area defines your + widget's shape, but use this routine to find out what area to actually draw + into. Note that the widget library does not use OpenGL clipping to keep + frame rates up, although you could use it internally. } PROCEDURE XPGetWidgetExposedGeometry( inWidgetID : XPWidgetID; - outLeft : PInteger; { Can be nil } - outTop : PInteger; { Can be nil } - outRight : PInteger; { Can be nil } - outBottom : PInteger); { Can be nil } - cdecl; external XPWIDGETS.DLL; + outLeft : Pinteger; { Can be nil } + outTop : Pinteger; { Can be nil } + outRight : Pinteger; { Can be nil } + outBottom : Pinteger); { Can be nil } +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} {___________________________________________________________________________ * ACCESSING WIDGET DATA ___________________________________________________________________________} +{ + +} { XPSetWidgetDescriptor - Every widget has a descriptor, which is a text string. What the text string - is used for varies from widget to widget; for example, a push button's text - is its descriptor, a caption shows its descriptor, and a text field's - descriptor is the text being edited. In other words, the usage for the text - varies from widget to widget, but this API provides a universal and - convenient way to get at it. While not all UI widgets need their - descriptor, many do. + Every widget has a descriptor, which is a text string. What the text string + is used for varies from widget to widget; for example, a push button's text + is its descriptor, a caption shows its descriptor, and a text field's + descriptor is the text being edited. In other words, the usage for the text + varies from widget to widget, but this API provides a universal and + convenient way to get at it. While not all UI widgets need their + descriptor, many do. } PROCEDURE XPSetWidgetDescriptor( inWidget : XPWidgetID; - inDescriptor : XPLMString); - cdecl; external XPWIDGETS.DLL; + inDescriptor : Pchar); +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPGetWidgetDescriptor - This routine returns the widget's descriptor. Pass in the length of the - buffer you are going to receive the descriptor in. The descriptor will be - null terminated for you. This routine returns the length of the actual - descriptor; if you pass NULL for outDescriptor, you can get the - descriptor's length without getting its text. If the length of the - descriptor exceeds your buffer length, the buffer will not be null - terminated (this routine has 'strncpy' semantics). + This routine returns the widget's descriptor. Pass in the length of the + buffer you are going to receive the descriptor in. The descriptor will be + null terminated for you. This routine returns the length of the actual + descriptor; if you pass NULL for outDescriptor, you can get the + descriptor's length without getting its text. If the length of the + descriptor exceeds your buffer length, the buffer will not be null + terminated (this routine has 'strncpy' semantics). } FUNCTION XPGetWidgetDescriptor( inWidget : XPWidgetID; - outDescriptor : XPLMString; - inMaxDescLength : Integer) : Integer; - cdecl; external XPWIDGETS.DLL; + outDescriptor : Pchar; + inMaxDescLength : integer) : integer; +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPGetWidgetUnderlyingWindow - Returns the window (from the XPLMDisplay API) that backs your widget - window. If you have opted in to modern windows, via a call to - XPLMEnableFeature("XPLM_USE_NATIVE_WIDGET_WINDOWS", 1), you can use the - returned window ID for display APIs like XPLMSetWindowPositioningMode(), - allowing you to pop the widget window out into a real OS window, or move it - into VR. + Returns the window (from the XPLMDisplay API) that backs your widget + window. If you have opted in to modern windows, via a call to + XPLMEnableFeature("XPLM_USE_NATIVE_WIDGET_WINDOWS", 1), you can use the + returned window ID for display APIs like XPLMSetWindowPositioningMode(), + allowing you to pop the widget window out into a real OS window, or move it + into VR. } FUNCTION XPGetWidgetUnderlyingWindow( inWidget : XPWidgetID) : XPLMWindowID; - cdecl; external XPWIDGETS.DLL; +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPSetWidgetProperty - This function sets a widget's property. Properties are arbitrary values - associated by a widget by ID. + This function sets a widget's property. Properties are arbitrary values + associated by a widget by ID. } PROCEDURE XPSetWidgetProperty( inWidget : XPWidgetID; inProperty : XPWidgetPropertyID; inValue : intptr_t); - cdecl; external XPWIDGETS.DLL; +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPGetWidgetProperty - This routine returns the value of a widget's property, or 0 if the property - is not defined. If you need to know whether the property is defined, pass a - pointer to an int for inExists; the existence of that property will be - returned in the int. Pass NULL for inExists if you do not need this - information. + This routine returns the value of a widget's property, or 0 if the property + is not defined. If you need to know whether the property is defined, pass a + pointer to an int for inExists; the existence of that property will be + returned in the int. Pass NULL for inExists if you do not need this + information. } FUNCTION XPGetWidgetProperty( inWidget : XPWidgetID; inProperty : XPWidgetPropertyID; - inExists : PInteger) : intptr_t; { Can be nil } - cdecl; external XPWIDGETS.DLL; + inExists : Pinteger) : intptr_t; { Can be nil } +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} {___________________________________________________________________________ * KEYBOARD MANAGEMENT ___________________________________________________________________________} +{ + +} { XPSetKeyboardFocus - Controls which widget will receive keystrokes. Pass the widget ID of the - widget to get the keys. Note that if the widget does not care about - keystrokes, they will go to the parent widget, and if no widget cares about - them, they go to X-Plane. + XPSetKeyboardFocus controls which widget will receive keystrokes. Pass the + Widget ID of the widget to get the keys. Note that if the widget does not + care about keystrokes, they will go to the parent widget, and if no widget + cares about them, they go to X-Plane. - If you set the keyboard focus to widget ID 0, X-Plane gets keyboard focus. + If you set the keyboard focus to Widget ID 0, X-Plane gets keyboard focus. - This routine returns the widget ID that ended up with keyboard focus, or 0 - for X-Plane. + This routine returns the widget ID that ended up with keyboard focus, or 0 + for X-Plane. - Keyboard focus is not changed if the new widget will not accept it. For - setting to X-Plane, keyboard focus is always accepted. - } + Keyboard focus is not changed if the new widget will not accept it. For + setting to X-Plane, keyboard focus is always accepted. + + } FUNCTION XPSetKeyboardFocus( inWidget : XPWidgetID) : XPWidgetID; - cdecl; external XPWIDGETS.DLL; +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLoseKeyboardFocus - This causes the specified widget to lose focus; focus is passed to its - parent, or the next parent that will accept it. This routine does nothing - if this widget does not have focus. + This causes the specified widget to lose focus; focus is passed to its + parent, or the next parent that will accept it. This routine does nothing + if this widget does not have focus. } PROCEDURE XPLoseKeyboardFocus( inWidget : XPWidgetID); - cdecl; external XPWIDGETS.DLL; +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPGetWidgetWithFocus - This routine returns the widget that has keyboard focus, or 0 if X-Plane - has keyboard focus or some other plugin window that does not have widgets - has focus. + This routine returns the widget that has keyboard focus, or 0 if X-Plane + has keyboard focus or some other plugin window that does not have widgets + has focus. } FUNCTION XPGetWidgetWithFocus: XPWidgetID; - cdecl; external XPWIDGETS.DLL; +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} {___________________________________________________________________________ * CREATING CUSTOM WIDGETS ___________________________________________________________________________} +{ + +} { XPAddWidgetCallback - This function adds a new widget callback to a widget. This widget callback - supercedes any existing ones and will receive messages first; if it does - not handle messages they will go on to be handled by pre-existing widgets. + This function adds a new widget callback to a widget. This widget callback + supercedes any existing ones and will receive messages first; if it does + not handle messages they will go on to be handled by pre-existing widgets. - The widget function will remain on the widget for the life of the widget. - The creation message will be sent to the new callback immediately with the - widget ID, and the destruction message will be sent before the other widget - function receives a destruction message. + The widget function will remain on the widget for the life of the widget. + The creation message will be sent to the new callback immediately with the + widget ID, and the destruction message will be sent before the other widget + function receives a destruction message. - This provides a way to 'subclass' an existing widget. By providing a second - hook that only handles certain widget messages, you can customize or extend - widget behavior. + This provides a way to 'subclass' an existing widget. By providing a second + hook that only handles certain widget messages, you can customize or extend + widget behavior. } PROCEDURE XPAddWidgetCallback( inWidget : XPWidgetID; inNewCallback : XPWidgetFunc_t); - cdecl; external XPWIDGETS.DLL; +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPGetWidgetClassFunc - Given a widget class, this function returns the callbacks that power that - widget class. + Given a widget class, this function returns the callbacks that power that + widget class. } FUNCTION XPGetWidgetClassFunc( inWidgetClass : XPWidgetClass) : XPWidgetFunc_t; - cdecl; external XPWIDGETS.DLL; - +{$IFDEF DELPHI} + cdecl; external 'XPWIDGETS.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} IMPLEMENTATION - END. diff --git a/src/SDK/Delphi/XPLM/XPLMCamera.pas b/src/SDK/Delphi/XPLM/XPLMCamera.pas index ad76fa4d..af3f9160 100755 --- a/src/SDK/Delphi/XPLM/XPLMCamera.pas +++ b/src/SDK/Delphi/XPLM/XPLMCamera.pas @@ -1,64 +1,68 @@ { - 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 XPLMCamera; INTERFACE { - The XPLMCamera APIs allow plug-ins to control the camera angle in X-Plane. - This has a number of applications, including but not limited to: + XPLMCamera - THEORY OF OPERATION The XPLMCamera APIs allow plug-ins to + control the camera angle in X-Plane. This has a number of applications, + including but not limited to: - - Creating new views (including dynamic/user-controllable views) for the - user. - - Creating applications that use X-Plane as a renderer of scenery, - aircrafts, or both. + - Creating new views (including dynamic/user-controllable views) for the + user. - The camera is controlled via six parameters: a location in OpenGL - coordinates and pitch, roll and yaw, similar to an airplane's position. - OpenGL coordinate info is described in detail in the XPLMGraphics - documentation; generally you should use the XPLMGraphics routines to - convert from world to local coordinates. The camera's orientation starts - facing level with the ground directly up the negative-Z axis (approximately - north) with the horizon horizontal. It is then rotated clockwise for yaw, - pitched up for positive pitch, and rolled clockwise around the vector it is - looking along for roll. + - Creating applications that use X-Plane as a renderer of scenery, + aircrafts, or both. - You control the camera either either until the user selects a new view or - permanently (the later being similar to how UDP camera control works). You - control the camera by registering a callback per frame from which you - calculate the new camera positions. This guarantees smooth camera motion. + The camera is controlled via six parameters: a location in OpenGL + coordinates and pitch, roll and yaw, similar to an airplane's position. + OpenGL coordinate info is described in detail in the XPLMGraphics + documentation; generally you should use the XPLMGraphics routines to + convert from world to local coordinates. The camera's orientation starts + facing level with the ground directly up the negative-Z axis (approximately + north) with the horizon horizontal. It is then rotated clockwise for yaw, + pitched up for positive pitch, and rolled clockwise around the vector it is + looking along for roll. - Use the XPLMDataAccess APIs to get information like the position of the - aircraft, etc. for complex camera positioning. + You control the camera either either until the user selects a new view or + permanently (the later being similar to how UDP camera control works). You + control the camera by registering a callback per frame from which you + calculate the new camera positions. This guarantees smooth camera motion. - Note: if your goal is to move the virtual pilot in the cockpit, this API is - not needed; simply update the datarefs for the pilot's head position. - - For custom exterior cameras, set the camera's mode to an external view - first to get correct sound and 2-d panel behavior. + Use the XPLMDataAccess APIs to get information like the position of the + aircraft, etc. for complex camera positioning. } -USES - XPLMDefs; +USES XPLMDefs; {$A4} +{$IFDEF MSWINDOWS} + {$DEFINE DELPHI} +{$ENDIF} {___________________________________________________________________________ * CAMERA CONTROL ___________________________________________________________________________} +{ + +} { XPLMCameraControlDuration - This enumeration states how long you want to retain control of the camera. - You can retain it indefinitely or until the user selects a new view. + This enumeration states how long you want to retain control of the camera. + You can retain it indefinitely or until the user selects a new view. } TYPE XPLMCameraControlDuration = ( - { Control the camera until the user picks a new view. } + { Control the camera until the user picks a new view. } xplm_ControlCameraUntilViewChanges = 1 - { Control the camera until your plugin is disabled or another plugin forcably} - { takes control. } + { Control the camera until your plugin is disabled or another plugin forcably } + { takes control. } ,xplm_ControlCameraForever = 2 ); @@ -67,89 +71,103 @@ { XPLMCameraPosition_t - This structure contains a full specification of the camera. X, Y, and Z are - the camera's position in OpenGL coordiantes; pitch, roll, and yaw are - rotations from a camera facing flat north in degrees. Positive pitch means - nose up, positive roll means roll right, and positive yaw means yaw right, - all in degrees. Zoom is a zoom factor, with 1.0 meaning normal zoom and 2.0 - magnifying by 2x (objects appear larger). + This structure contains a full specification of the camera. X, Y, and Z are + the camera's position in OpenGL coordiantes; pitch, roll, and yaw are + rotations from a camera facing flat north in degrees. Positive pitch means + nose up, positive roll means roll right, and positive yaw means yaw right, + all in degrees. Zoom is a zoom factor, with 1.0 meaning normal zoom and 2.0 + magnifying by 2x (objects appear larger). } XPLMCameraPosition_t = RECORD - x : Single; - y : Single; - z : Single; - pitch : Single; - heading : Single; - roll : Single; - zoom : Single; + x : single; + y : single; + z : single; + pitch : single; + heading : single; + roll : single; + zoom : single; END; PXPLMCameraPosition_t = ^XPLMCameraPosition_t; { XPLMCameraControl_f - You use an XPLMCameraControl function to provide continuous control over - the camera. You are passed in a structure in which to put the new camera - position; modify it and return 1 to reposition the camera. Return 0 to - surrender control of the camera; camera control will be handled by X-Plane - on this draw loop. The contents of the structure as you are called are - undefined. + You use an XPLMCameraControl function to provide continuous control over + the camera. You are passed in a structure in which to put the new camera + position; modify it and return 1 to reposition the camera. Return 0 to + surrender control of the camera; camera control will be handled by X-Plane + on this draw loop. The contents of the structure as you are called are + undefined. - If X-Plane is taking camera control away from you, this function will be - called with inIsLosingControl set to 1 and ioCameraPosition NULL. + If X-Plane is taking camera control away from you, this function will be + called with inIsLosingControl set to 1 and ioCameraPosition NULL. } XPLMCameraControl_f = FUNCTION( outCameraPosition : PXPLMCameraPosition_t; { Can be nil } - inIsLosingControl : Integer; - inRefcon : pointer) : Integer; cdecl; + inIsLosingControl : integer; + inRefcon : pointer) : integer; cdecl; { XPLMControlCamera - This function repositions the camera on the next drawing cycle. You must - pass a non-null control function. Specify in inHowLong how long you'd like - control (indefinitely or until a new view mode is set by the user). + This function repositions the camera on the next drawing cycle. You must + pass a non-null control function. Specify in inHowLong how long you'd like + control (indefinitely or until a key is pressed). } PROCEDURE XPLMControlCamera( inHowLong : XPLMCameraControlDuration; inControlFunc : XPLMCameraControl_f; inRefcon : pointer); - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMDontControlCamera - This function stops you from controlling the camera. If you have a camera - control function, it will not be called with an inIsLosingControl flag. - X-Plane will control the camera on the next cycle. + This function stops you from controlling the camera. If you have a camera + control function, it will not be called with an inIsLosingControl flag. + X-Plane will control the camera on the next cycle. - For maximum compatibility you should not use this routine unless you are in - posession of the camera. + For maximum compatibility you should not use this routine unless you are in + posession of the camera. } PROCEDURE XPLMDontControlCamera; - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMIsCameraBeingControlled - This routine returns 1 if the camera is being controlled, zero if it is - not. If it is and you pass in a pointer to a camera control duration, the - current control duration will be returned. + This routine returns 1 if the camera is being controlled, zero if it is + not. If it is and you pass in a pointer to a camera control duration, the + current control duration will be returned. } FUNCTION XPLMIsCameraBeingControlled( - outCameraControlDuration: PXPLMCameraControlDuration) : Integer; { Can be nil } - cdecl; external XPLM_DLL; + outCameraControlDuration: PXPLMCameraControlDuration) : integer; { Can be nil } +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMReadCameraPosition - This function reads the current camera position. + This function reads the current camera position. } PROCEDURE XPLMReadCameraPosition( outCameraPosition : PXPLMCameraPosition_t); - cdecl; external XPLM_DLL; - +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} IMPLEMENTATION - END. diff --git a/src/SDK/Delphi/XPLM/XPLMDataAccess.pas b/src/SDK/Delphi/XPLM/XPLMDataAccess.pas index 1ad210e3..164dcfa7 100755 --- a/src/SDK/Delphi/XPLM/XPLMDataAccess.pas +++ b/src/SDK/Delphi/XPLM/XPLMDataAccess.pas @@ -1,89 +1,73 @@ { - 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 XPLMDataAccess; INTERFACE { - The data access API gives you a generic, flexible, high performance way to - read and write data to and from X-Plane and other plug-ins. For example, - this API allows you to read and set the nav radios, get the plane location, - determine the current effective graphics frame rate, etc. - - The data access APIs are the way that you read and write data from the sim - as well as other plugins. - - The API works using opaque data references. A data reference is a source of - data; you do not know where it comes from, but once you have it you can - read the data quickly and possibly write it. - - Dataref Lookup - -------------- - - Data references are identified by verbose, permanent string names; by - convention these names use path separates to form a hierarchy of datarefs, - e.g. (sim/cockpit/radios/nav1_freq_hz). The actual opaque numeric value of - the data reference, as returned by the XPLM API, is implementation defined - and changes each time X-Plane is launched; therefore you need to look up - the dataref by path every time your plugin runs. + XPLM Data Access API - Theory of Operation - The task of looking up a data reference is relatively expensive; look up - your data references once based on the verbose path strings, and save the - opaque data reference value for the duration of your plugin's operation. - Reading and writing data references is relatively fast (the cost is - equivalent to two function calls through function pointers). + The data access API gives you a generic, flexible, high performance way to + read and write data to and from X-Plane and other plug-ins. For example, + this API allows you to read and set the nav radios, get the plane location, + determine the current effective graphics frame rate, etc. - X-Plane publishes over 4000 datarefs; a complete list may be found in the - reference section of the SDK online documentation (from the SDK home page, - choose Documentation). + The data access APIs are the way that you read and write data from the sim + as well as other plugins. - Dataref Types - ------------- + The API works using opaque data references. A data reference is a source of + data; you do not know where it comes from, but once you have it you can + read the data quickly and possibly write it. To get a data reference, you + look it up. - A note on typing: you must know the correct data type to read and write. - APIs are provided for reading and writing data in a number of ways. You can - also double check the data type for a data ref. Automatic type conversion - is not done for you. + Data references are identified by verbose string names + (sim/cockpit/radios/nav1_freq_hz). The actual numeric value of the data + reference is implementation defined and is likely to change each time the + simulator is run (or the plugin that provides the datareference is + reloaded). - Dataref types are a set, e.g. a dataref can be more than one type. When - this happens, you can choose which API you want to use to read. For - example, it is not uncommon for a dataref to be of type float and double. - This means you can use either XPLMGetDatad or XPLMGetDataf to read it. + The task of looking up a data reference is relatively expensive; look up + your data references once based on verbose strings, and save the opaque + data reference value for the duration of your plugin's operation. Reading + and writing data references is relatively fast (the cost is equivalent to + two function calls through function pointers). - Creating New Datarefs - --------------------- + This allows data access to be high performance, while leaving in + abstraction; since data references are opaque and are searched for, the + underlying data access system can be rebuilt. - X-Plane provides datarefs that come with the sim, but plugins can also - create their own datarefs. A plugin creates a dataref by registering - function callbacks to read and write the dataref. The XPLM will call your - plugin each time some other plugin (or X-Plane) tries to read or write the - dataref. You must provide a read (and optional write) callback for each - data type you support. + A note on typing: you must know the correct data type to read and write. + APIs are provided for reading and writing data in a number of ways. You can + also double check the data type for a data ref. Note that automatic + conversion is not done for you. - A note for plugins sharing data with other plugins: the load order of - plugins is not guaranteed. To make sure that every plugin publishing data - has published their data references before other plugins try to subscribe, - publish your data references in your start routine but resolve them the - first time your 'enable' routine is called, or the first time they are - needed in code. + A note for plugins sharing data with other plugins: the load order of + plugins is not guaranteed. To make sure that every plugin publishing data + has published their data references before other plugins try to subscribe, + publish your data references in your start routine but resolve them the + first time your 'enable' routine is called, or the first time they are + needed in code. - When a plugin that created a dataref is unloaded, it becomes "orphaned". - The dataref handle continues to be usable, but the dataref is not writable, - and reading it will always return 0 (or 0 items for arrays). If the plugin - is reloaded and re-registers the dataref, the handle becomes un-orphaned - and works again. + X-Plane publishes well over 1000 datarefs; a complete list may be found in + the reference section of the SDK online documentation (from the SDK home + page, choose Documentation). } -USES - XPLMDefs; +USES XPLMDefs; {$A4} +{$IFDEF MSWINDOWS} + {$DEFINE DELPHI} +{$ENDIF} {___________________________________________________________________________ * READING AND WRITING DATA ___________________________________________________________________________} { - These routines allow you to access data from within X-Plane and sometimes - modify it. + These routines allow you to access a wide variety of data from within + X-Plane and modify some of it. } @@ -91,10 +75,10 @@ { XPLMDataRef - A data ref is an opaque handle to data provided by the simulator or another - plugin. It uniquely identifies one variable (or array of variables) over - the lifetime of your plugin. You never hard code these values; you always - get them from XPLMFindDataRef. + A data ref is an opaque handle to data provided by the simulator or another + plugin. It uniquely identifies one variable (or array of variables) over + the lifetime of your plugin. You never hard code these values; you always + get them from XPLMFindDataRef. } XPLMDataRef = pointer; PXPLMDataRef = ^XPLMDataRef; @@ -102,35 +86,33 @@ { XPLMDataTypeID - This is an enumeration that defines the type of the data behind a data - reference. This allows you to sanity check that the data type matches what - you expect. But for the most part, you will know the type of data you are - expecting from the online documentation. + This is an enumeration that defines the type of the data behind a data + reference. This allows you to sanity check that the data type matches what + you expect. But for the most part, you will know the type of data you are + expecting from the online documentation. - Data types each take a bit field; it is legal to have a single dataref be - more than one type of data. Whe this happens, you can pick any matching - get/set API. + Data types each take a bit field, so sets of data types may be formed. } XPLMDataTypeID = ( - { Data of a type the current XPLM doesn't do. } + { Data of a type the current XPLM doesn't do. } xplmType_Unknown = 0 - { A single 4-byte integer, native endian. } + { A single 4-byte integer, native endian. } ,xplmType_Int = 1 - { A single 4-byte float, native endian. } + { A single 4-byte float, native endian. } ,xplmType_Float = 2 - { A single 8-byte double, native endian. } + { A single 8-byte double, native endian. } ,xplmType_Double = 4 - { An array of 4-byte floats, native endian. } + { An array of 4-byte floats, native endian. } ,xplmType_FloatArray = 8 - { An array of 4-byte integers, native endian. } + { An array of 4-byte integers, native endian. } ,xplmType_IntArray = 16 - { A variable block of data. } + { A variable block of data. } ,xplmType_Data = 32 ); @@ -139,431 +121,500 @@ { XPLMFindDataRef - Given a c-style string that names the data ref, this routine looks up the - actual opaque XPLMDataRef that you use to read and write the data. The - string names for datarefs are published on the X-Plane SDK web site. + Given a c-style string that names the data ref, this routine looks up the + actual opaque XPLMDataRef that you use to read and write the data. The + string names for datarefs are published on the X-Plane SDK web site. - This function returns NULL if the data ref cannot be found. + This function returns NULL if the data ref cannot be found. - NOTE: this function is relatively expensive; save the XPLMDataRef this - function returns for future use. Do not look up your data ref by string - every time you need to read or write it. + NOTE: this function is relatively expensive; save the XPLMDataRef this + function returns for future use. Do not look up your data ref by string + every time you need to read or write it. } FUNCTION XPLMFindDataRef( - inDataRefName : XPLMString) : XPLMDataRef; - cdecl; external XPLM_DLL; + inDataRefName : Pchar) : XPLMDataRef; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMCanWriteDataRef - Given a data ref, this routine returns true if you can successfully set the - data, false otherwise. Some datarefs are read-only. - - NOTE: even if a dataref is marked writable, it may not act writable. This - can happen for datarefs that X-Plane writes to on every frame of - simulation. In some cases, the dataref is writable but you have to set a - separate "override" dataref to 1 to stop X-Plane from writing it. + Given a data ref, this routine returns true if you can successfully set the + data, false otherwise. Some datarefs are read-only. } FUNCTION XPLMCanWriteDataRef( - inDataRef : XPLMDataRef) : Integer; - cdecl; external XPLM_DLL; + inDataRef : XPLMDataRef) : integer; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMIsDataRefGood - This function returns true if the passed in handle is a valid dataref that - is not orphaned. + WARNING: This function is deprecated and should not be used. Datarefs are + valid until plugins are reloaded or the sim quits. Plugins sharing datarefs + should support these semantics by not unregistering datarefs during + operation. (You should however unregister datarefs when your plugin is + unloaded, as part of general resource cleanup.) - Note: there is normally no need to call this function; datarefs returned by - XPLMFindDataRef remain valid (but possibly orphaned) unless there is a - complete plugin reload (in which case your plugin is reloaded anyway). - Orphaned datarefs can be safely read and return 0. Therefore you never need - to call XPLMIsDataRefGood to 'check' the safety of a dataref. - (XPLMIsDatarefGood performs some slow checking of the handle validity, so - it has a perormance cost.) + This function returns whether a data ref is still valid. If it returns + false, you should refind the data ref from its original string. Calling an + accessor function on a bad data ref will return a default value, typically + 0 or 0-length data. } FUNCTION XPLMIsDataRefGood( - inDataRef : XPLMDataRef) : Integer; - cdecl; external XPLM_DLL; + inDataRef : XPLMDataRef) : integer; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMGetDataRefTypes - This routine returns the types of the data ref for accessor use. If a data - ref is available in multiple data types, the bit-wise OR of these types - will be returned. + This routine returns the types of the data ref for accessor use. If a data + ref is available in multiple data types, they will all be returned. } FUNCTION XPLMGetDataRefTypes( inDataRef : XPLMDataRef) : XPLMDataTypeID; - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} {___________________________________________________________________________ * DATA ACCESSORS ___________________________________________________________________________} { - These routines read and write the data references. For each supported data - type there is a reader and a writer. - - If the data ref is orphaned or the plugin that provides it is disabled or - there is a type mismatch, the functions that read data will return 0 as a - default value or not modify the passed in memory. The plugins that write - data will not write under these circumstances or if the data ref is - read-only. + These routines read and write the data references. For each supported data + type there is a reader and a writer. - NOTE: to keep the overhead of reading datarefs low, these routines do not - do full validation of a dataref; passing a junk value for a dataref can - result in crashing the sim. The get/set APIs do check for NULL. + If the data ref is invalid or the plugin that provides it is disabled or + there is a type mismatch, the functions that read data will return 0 as a + default value or not modify the passed in memory. The plugins that write + data will not write under these circumstances or if the data ref is + read-only. NOTE: to keep the overhead of reading datarefs low, these + routines do not do full validation of a dataref; passing a junk value for a + dataref can result in crashing the sim. - For array-style datarefs, you specify the number of items to read/write and - the offset into the array; the actual number of items read or written is - returned. This may be less to prevent an array-out-of-bounds error. + For array-style datarefs, you specify the number of items to read/write and + the offset into the array; the actual number of items read or written is + returned. This may be less to prevent an array-out-of-bounds error. } { XPLMGetDatai - Read an integer data ref and return its value. The return value is the - dataref value or 0 if the dataref is NULL or the plugin is disabled. + Read an integer data ref and return its value. The return value is the + dataref value or 0 if the dataref is invalid/NULL or the plugin is + disabled. } FUNCTION XPLMGetDatai( - inDataRef : XPLMDataRef) : Integer; - cdecl; external XPLM_DLL; + inDataRef : XPLMDataRef) : integer; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMSetDatai - Write a new value to an integer data ref. This routine is a no-op if the - plugin publishing the dataref is disabled, the dataref is NULL, or the - dataref is not writable. + Write a new value to an integer data ref. This routine is a no-op if the + plugin publishing the dataref is disabled, the dataref is invalid, or the + dataref is not writable. } PROCEDURE XPLMSetDatai( inDataRef : XPLMDataRef; - inValue : Integer); - cdecl; external XPLM_DLL; + inValue : integer); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMGetDataf - Read a single precision floating point dataref and return its value. The - return value is the dataref value or 0.0 if the dataref is NULL or the - plugin is disabled. + Read a single precision floating point dataref and return its value. The + return value is the dataref value or 0.0 if the dataref is invalid/NULL or + the plugin is disabled. } FUNCTION XPLMGetDataf( - inDataRef : XPLMDataRef) : Single; - cdecl; external XPLM_DLL; + inDataRef : XPLMDataRef) : single; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMSetDataf - Write a new value to a single precision floating point data ref. This - routine is a no-op if the plugin publishing the dataref is disabled, the - dataref is NULL, or the dataref is not writable. + Write a new value to a single precision floating point data ref. This + routine is a no-op if the plugin publishing the dataref is disabled, the + dataref is invalid, or the dataref is not writable. } PROCEDURE XPLMSetDataf( inDataRef : XPLMDataRef; - inValue : Single); - cdecl; external XPLM_DLL; + inValue : single); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMGetDatad - Read a double precision floating point dataref and return its value. The - return value is the dataref value or 0.0 if the dataref is NULL or the - plugin is disabled. + Read a double precision floating point dataref and return its value. The + return value is the dataref value or 0.0 if the dataref is invalid/NULL or + the plugin is disabled. } FUNCTION XPLMGetDatad( - inDataRef : XPLMDataRef) : Real; - cdecl; external XPLM_DLL; + inDataRef : XPLMDataRef) : real; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMSetDatad - Write a new value to a double precision floating point data ref. This - routine is a no-op if the plugin publishing the dataref is disabled, the - dataref is NULL, or the dataref is not writable. + Write a new value to a double precision floating point data ref. This + routine is a no-op if the plugin publishing the dataref is disabled, the + dataref is invalid, or the dataref is not writable. } PROCEDURE XPLMSetDatad( inDataRef : XPLMDataRef; - inValue : Real); - cdecl; external XPLM_DLL; + inValue : real); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMGetDatavi - Read a part of an integer array dataref. If you pass NULL for outValues, - the routine will return the size of the array, ignoring inOffset and inMax. + Read a part of an integer array dataref. If you pass NULL for outVaules, + the routine will return the size of the array, ignoring inOffset and inMax. + - If outValues is not NULL, then up to inMax values are copied from the - dataref into outValues, starting at inOffset in the dataref. If inMax + - inOffset is larger than the size of the dataref, less than inMax values - will be copied. The number of values copied is returned. + If outValues is not NULL, then up to inMax values are copied from the + dataref into outValues, starting at inOffset in the dataref. If inMax + + inOffset is larger than the size of the dataref, less than inMax values + will be copied. The number of values copied is returned. - Note: the semantics of array datarefs are entirely implemented by the - plugin (or X-Plane) that provides the dataref, not the SDK itself; the - above description is how these datarefs are intended to work, but a rogue - plugin may have different behavior. + Note: the semantics of array datarefs are entirely implemented by the + plugin (or X-Plane) that provides the dataref, not the SDK itself; the + above description is how these datarefs are intended to work, but a rogue + plugin may have different behavior. } FUNCTION XPLMGetDatavi( inDataRef : XPLMDataRef; - outValues : PInteger; { Can be nil } - inOffset : Integer; - inMax : Integer) : Integer; - cdecl; external XPLM_DLL; + outValues : Pinteger; { Can be nil } + inOffset : integer; + inMax : integer) : integer; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMSetDatavi - Write part or all of an integer array dataref. The values passed by - inValues are written into the dataref starting at inOffset. Up to inCount - values are written; however if the values would write "off the end" of the - dataref array, then fewer values are written. + Write part or all of an integer array dataref. The values passed by + inValues are written into the dataref starting at inOffset. Up to inCount + values are written; however if the values would write "off the end" of the + dataref array, then fewer values are written. - Note: the semantics of array datarefs are entirely implemented by the - plugin (or X-Plane) that provides the dataref, not the SDK itself; the - above description is how these datarefs are intended to work, but a rogue - plugin may have different behavior. + Note: the semantics of array datarefs are entirely implemented by the + plugin (or X-Plane) that provides the dataref, not the SDK itself; the + above description is how these datarefs are intended to work, but a rogue + plugin may have different behavior. } PROCEDURE XPLMSetDatavi( inDataRef : XPLMDataRef; - inValues : PInteger; - inoffset : Integer; - inCount : Integer); - cdecl; external XPLM_DLL; + inValues : Pinteger; + inoffset : integer; + inCount : integer); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMGetDatavf - Read a part of a single precision floating point array dataref. If you pass - NULL for outVaules, the routine will return the size of the array, ignoring - inOffset and inMax. + Read a part of a single precision floating point array dataref. If you pass + NULL for outVaules, the routine will return the size of the array, ignoring + inOffset and inMax. - If outValues is not NULL, then up to inMax values are copied from the - dataref into outValues, starting at inOffset in the dataref. If inMax + - inOffset is larger than the size of the dataref, less than inMax values - will be copied. The number of values copied is returned. + If outValues is not NULL, then up to inMax values are copied from the + dataref into outValues, starting at inOffset in the dataref. If inMax + + inOffset is larger than the size of the dataref, less than inMax values + will be copied. The number of values copied is returned. - Note: the semantics of array datarefs are entirely implemented by the - plugin (or X-Plane) that provides the dataref, not the SDK itself; the - above description is how these datarefs are intended to work, but a rogue - plugin may have different behavior. + Note: the semantics of array datarefs are entirely implemented by the + plugin (or X-Plane) that provides the dataref, not the SDK itself; the + above description is how these datarefs are intended to work, but a rogue + plugin may have different behavior. } FUNCTION XPLMGetDatavf( inDataRef : XPLMDataRef; - outValues : PSingle; { Can be nil } - inOffset : Integer; - inMax : Integer) : Integer; - cdecl; external XPLM_DLL; + outValues : Psingle; { Can be nil } + inOffset : integer; + inMax : integer) : integer; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMSetDatavf - Write part or all of a single precision floating point array dataref. The - values passed by inValues are written into the dataref starting at - inOffset. Up to inCount values are written; however if the values would - write "off the end" of the dataref array, then fewer values are written. + Write part or all of a single precision floating point array dataref. The + values passed by inValues are written into the dataref starting at + inOffset. Up to inCount values are written; however if the values would + write "off the end" of the dataref array, then fewer values are written. - Note: the semantics of array datarefs are entirely implemented by the - plugin (or X-Plane) that provides the dataref, not the SDK itself; the - above description is how these datarefs are intended to work, but a rogue - plugin may have different behavior. + Note: the semantics of array datarefs are entirely implemented by the + plugin (or X-Plane) that provides the dataref, not the SDK itself; the + above description is how these datarefs are intended to work, but a rogue + plugin may have different behavior. } PROCEDURE XPLMSetDatavf( inDataRef : XPLMDataRef; - inValues : PSingle; - inoffset : Integer; - inCount : Integer); - cdecl; external XPLM_DLL; + inValues : Psingle; + inoffset : integer; + inCount : integer); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMGetDatab - Read a part of a byte array dataref. If you pass NULL for outVaules, the - routine will return the size of the array, ignoring inOffset and inMax. + Read a part of a byte array dataref. If you pass NULL for outVaules, the + routine will return the size of the array, ignoring inOffset and inMax. - If outValues is not NULL, then up to inMax values are copied from the - dataref into outValues, starting at inOffset in the dataref. If inMax + - inOffset is larger than the size of the dataref, less than inMax values - will be copied. The number of values copied is returned. + If outValues is not NULL, then up to inMax values are copied from the + dataref into outValues, starting at inOffset in the dataref. If inMax + + inOffset is larger than the size of the dataref, less than inMax values + will be copied. The number of values copied is returned. - Note: the semantics of array datarefs are entirely implemented by the - plugin (or X-Plane) that provides the dataref, not the SDK itself; the - above description is how these datarefs are intended to work, but a rogue - plugin may have different behavior. + Note: the semantics of array datarefs are entirely implemented by the + plugin (or X-Plane) that provides the dataref, not the SDK itself; the + above description is how these datarefs are intended to work, but a rogue + plugin may have different behavior. } FUNCTION XPLMGetDatab( inDataRef : XPLMDataRef; outValue : pointer; { Can be nil } - inOffset : Integer; - inMaxBytes : Integer) : Integer; - cdecl; external XPLM_DLL; + inOffset : integer; + inMaxBytes : integer) : integer; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMSetDatab - Write part or all of a byte array dataref. The values passed by inValues - are written into the dataref starting at inOffset. Up to inCount values are - written; however if the values would write "off the end" of the dataref - array, then fewer values are written. + Write part or all of a byte array dataref. The values passed by inValues + are written into the dataref starting at inOffset. Up to inCount values are + written; however if the values would write "off the end" of the dataref + array, then fewer values are written. - Note: the semantics of array datarefs are entirely implemented by the - plugin (or X-Plane) that provides the dataref, not the SDK itself; the - above description is how these datarefs are intended to work, but a rogue - plugin may have different behavior. + Note: the semantics of array datarefs are entirely implemented by the + plugin (or X-Plane) that provides the dataref, not the SDK itself; the + above description is how these datarefs are intended to work, but a rogue + plugin may have different behavior. } PROCEDURE XPLMSetDatab( inDataRef : XPLMDataRef; inValue : pointer; - inOffset : Integer; - inLength : Integer); - cdecl; external XPLM_DLL; + inOffset : integer; + inLength : integer); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} {___________________________________________________________________________ - * PUBLISHING YOUR PLUGIN'S DATA + * PUBLISHING YOUR PLUGINS DATA ___________________________________________________________________________} { - These functions allow you to create data references that other plug-ins and - X-Plane can access via the above data access APIs. Data references - published by other plugins operate the same as ones published by X-Plane in - all manners except that your data reference will not be available to other - plugins if/when your plugin is disabled. + These functions allow you to create data references that other plug-ins can + access via the above data access APIs. Data references published by other + plugins operate the same as ones published by X-Plane in all manners except + that your data reference will not be available to other plugins if/when + your plugin is disabled. - You share data by registering data provider callback functions. When a - plug-in requests your data, these callbacks are then called. You provide - one callback to return the value when a plugin 'reads' it and another to - change the value when a plugin 'writes' it. + You share data by registering data provider callback functions. When a + plug-in requests your data, these callbacks are then called. You provide + one callback to return the value when a plugin 'reads' it and another to + change the value when a plugin 'writes' it. - Important: you must pick a prefix for your datarefs other than "sim/" - - this prefix is reserved for X-Plane. The X-Plane SDK website contains a - registry where authors can select a unique first word for dataref names, to - prevent dataref collisions between plugins. + Important: you must pick a prefix for your datarefs other than "sim/" - + this prefix is reserved for X-Plane. The X-Plane SDK website contains a + registry where authors can select a unique first word for dataref names, to + prevent dataref collisions between plugins. } { XPLMGetDatai_f - Data provider function pointers. + Data provider function pointers. - These define the function pointers you provide to get or set data. Note - that you are passed a generic pointer for each one. This is the same - pointer you pass in your register routine; you can use it to locate plugin - variables, etc. + These define the function pointers you provide to get or set data. Note + that you are passed a generic pointer for each one. This is the same + pointer you pass in your register routine; you can use it to find global + variables, etc. - The semantics of your callbacks are the same as the dataref accessor above - - basically routines like XPLMGetDatai are just pass-throughs from a caller - to your plugin. Be particularly mindful in implementing array dataref - read-write accessors; you are responsible for avoiding overruns, supporting - offset read/writes, and handling a read with a NULL buffer. + The semantics of your callbacks are the same as the dataref accessor above + - basically routines like XPLMGetDatai are just pass-throughs from a caller + to your plugin. Be particularly mindful in implementing array dataref + read-write accessors; you are responsible for avoiding overruns, supporting + offset read/writes, and handling a read with a NULL buffer. } TYPE XPLMGetDatai_f = FUNCTION( - inRefcon : pointer) : Integer; cdecl; + inRefcon : pointer) : integer; cdecl; { - XPLMSetDatai_f + XPLMSetDatai_f + } XPLMSetDatai_f = PROCEDURE( inRefcon : pointer; - inValue : Integer); cdecl; + inValue : integer); cdecl; { - XPLMGetDataf_f + XPLMGetDataf_f + } XPLMGetDataf_f = FUNCTION( - inRefcon : pointer) : Single; cdecl; + inRefcon : pointer) : single; cdecl; { - XPLMSetDataf_f + XPLMSetDataf_f + } XPLMSetDataf_f = PROCEDURE( inRefcon : pointer; - inValue : Single); cdecl; + inValue : single); cdecl; { - XPLMGetDatad_f + XPLMGetDatad_f + } XPLMGetDatad_f = FUNCTION( - inRefcon : pointer) : Real; cdecl; + inRefcon : pointer) : real; cdecl; { - XPLMSetDatad_f + XPLMSetDatad_f + } XPLMSetDatad_f = PROCEDURE( inRefcon : pointer; - inValue : Real); cdecl; + inValue : real); cdecl; { - XPLMGetDatavi_f + XPLMGetDatavi_f + } XPLMGetDatavi_f = FUNCTION( inRefcon : pointer; - outValues : PInteger; { Can be nil } - inOffset : Integer; - inMax : Integer) : Integer; cdecl; + outValues : Pinteger; { Can be nil } + inOffset : integer; + inMax : integer) : integer; cdecl; { - XPLMSetDatavi_f + XPLMSetDatavi_f + } XPLMSetDatavi_f = PROCEDURE( inRefcon : pointer; - inValues : PInteger; - inOffset : Integer; - inCount : Integer); cdecl; + inValues : Pinteger; + inOffset : integer; + inCount : integer); cdecl; { - XPLMGetDatavf_f + XPLMGetDatavf_f + } XPLMGetDatavf_f = FUNCTION( inRefcon : pointer; - outValues : PSingle; { Can be nil } - inOffset : Integer; - inMax : Integer) : Integer; cdecl; + outValues : Psingle; { Can be nil } + inOffset : integer; + inMax : integer) : integer; cdecl; { - XPLMSetDatavf_f + XPLMSetDatavf_f + } XPLMSetDatavf_f = PROCEDURE( inRefcon : pointer; - inValues : PSingle; - inOffset : Integer; - inCount : Integer); cdecl; + inValues : Psingle; + inOffset : integer; + inCount : integer); cdecl; { - XPLMGetDatab_f + XPLMGetDatab_f + } XPLMGetDatab_f = FUNCTION( inRefcon : pointer; outValue : pointer; { Can be nil } - inOffset : Integer; - inMaxLength : Integer) : Integer; cdecl; + inOffset : integer; + inMaxLength : integer) : integer; cdecl; { - XPLMSetDatab_f + XPLMSetDatab_f + } XPLMSetDatab_f = PROCEDURE( inRefcon : pointer; inValue : pointer; - inOffset : Integer; - inLength : Integer); cdecl; + inOffset : integer; + inLength : integer); cdecl; { XPLMRegisterDataAccessor - This routine creates a new item of data that can be read and written. Pass - in the data's full name for searching, the type(s) of the data for - accessing, and whether the data can be written to. For each data type you - support, pass in a read accessor function and a write accessor function if - necessary. Pass NULL for data types you do not support or write accessors - if you are read-only. + This routine creates a new item of data that can be read and written. Pass + in the data's full name for searching, the type(s) of the data for + accessing, and whether the data can be written to. For each data type you + support, pass in a read accessor function and a write accessor function if + necessary. Pass NULL for data types you do not support or write accessors + if you are read-only. - You are returned a data ref for the new item of data created. You can use - this data ref to unregister your data later or read or write from it. + You are returned a data ref for the new item of data created. You can use + this data ref to unregister your data later or read or write from it. } FUNCTION XPLMRegisterDataAccessor( - inDataName : XPLMString; + inDataName : Pchar; inDataType : XPLMDataTypeID; - inIsWritable : Integer; + inIsWritable : integer; inReadInt : XPLMGetDatai_f; inWriteInt : XPLMSetDatai_f; inReadFloat : XPLMGetDataf_f; @@ -578,66 +629,79 @@ inWriteData : XPLMSetDatab_f; inReadRefcon : pointer; inWriteRefcon : pointer) : XPLMDataRef; - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMUnregisterDataAccessor - Use this routine to unregister any data accessors you may have registered. - You unregister a data ref by the XPLMDataRef you get back from - registration. Once you unregister a data ref, your function pointer will - not be called anymore. + Use this routine to unregister any data accessors you may have registered. + You unregister a data ref by the XPLMDataRef you get back from + registration. Once you unregister a data ref, your function pointer will + not be called anymore. + + For maximum compatibility, do not unregister your data accessors until + final shutdown (when your XPluginStop routine is called). This allows other + plugins to find your data reference once and use it for their entire time + of operation. } PROCEDURE XPLMUnregisterDataAccessor( inDataRef : XPLMDataRef); - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} {___________________________________________________________________________ * SHARING DATA BETWEEN MULTIPLE PLUGINS ___________________________________________________________________________} { - The data reference registration APIs from the previous section allow a - plugin to publish data in a one-owner manner; the plugin that publishes the - data reference owns the real memory that the data ref uses. This is - satisfactory for most cases, but there are also cases where plugnis need to - share actual data. + The data reference registration APIs from the previous section allow a + plugin to publish data in a one-owner manner; the plugin that publishes the + data reference owns the real memory that the data ref uses. This is + satisfactory for most cases, but there are also cases where plugnis need to + share actual data. - With a shared data reference, no one plugin owns the actual memory for the - data reference; the plugin SDK allocates that for you. When the first - plugin asks to 'share' the data, the memory is allocated. When the data is - changed, every plugin that is sharing the data is notified. + With a shared data reference, no one plugin owns the actual memory for the + data reference; the plugin SDK allocates that for you. When the first + plugin asks to 'share' the data, the memory is allocated. When the data is + changed, every plugin that is sharing the data is notified. - Shared data references differ from the 'owned' data references from the - previous section in a few ways: + Shared data references differ from the 'owned' data references from the + previous section in a few ways: - * With shared data references, any plugin can create the data reference; - with owned plugins one plugin must create the data reference and others - subscribe. (This can be a problem if you don't know which set of plugins - will be present). + - With shared data references, any plugin can create the data reference; + with owned plugins one plugin must create the data reference and others + subscribe. (This can be a problem if you don't know which set of plugins + will be present). - * With shared data references, every plugin that is sharing the data is - notified when the data is changed. With owned data references, only the - one owner is notified when the data is changed. + - With shared data references, every plugin that is sharing the data is + notified when the data is changed. With owned data references, only the one + owner is notified when the data is changed. - * With shared data references, you cannot access the physical memory of the - data reference; you must use the XPLMGet... and XPLMSet... APIs. With an - owned data reference, the one owning data reference can manipulate the - data reference's memory in any way it sees fit. + - With shared data references, you cannot access the physical memory of the + data reference; you must use the XPLMGet... and XPLMSet... APIs. With an + owned data reference, the one owning data reference can manipulate the data + reference's memory in any way it sees fit. - Shared data references solve two problems: if you need to have a data - reference used by several plugins but do not know which plugins will be - installed, or if all plugins sharing data need to be notified when that - data is changed, use shared data references. + Shared data references solve two problems: if you need to have a data + reference used by several plugins but do not know which plugins will be + installed, or if all plugins sharing data need to be notified when that + data is changed, use shared data references. } { XPLMDataChanged_f - An XPLMDataChanged_f is a callback that the XPLM calls whenever any other - plug-in modifies shared data. A refcon you provide is passed back to help - identify which data is being changed. In response, you may want to call one - of the XPLMGetDataxxx routines to find the new value of the data. + An XPLMDataChanged_f is a callback that the XPLM calls whenever any other + plug-in modifies shared data. A refcon you provide is passed back to help + identify which data is being changed. In response, you may want to call one + of the XPLMGetDataxxx routines to find the new value of the data. } TYPE XPLMDataChanged_f = PROCEDURE( @@ -646,45 +710,51 @@ { XPLMShareData - This routine connects a plug-in to shared data, creating the shared data if - necessary. inDataName is a standard path for the data ref, and inDataType - specifies the type. This function will create the data if it does not - exist. If the data already exists but the type does not match, an error is - returned, so it is important that plug-in authors collaborate to establish - public standards for shared data. + This routine connects a plug-in to shared data, creating the shared data if + necessary. inDataName is a standard path for the data ref, and inDataType + specifies the type. This function will create the data if it does not + exist. If the data already exists but the type does not match, an error is + returned, so it is important that plug-in authors collaborate to establish + public standards for shared data. - If a notificationFunc is passed in and is not NULL, that notification - function will be called whenever the data is modified. The notification - refcon will be passed to it. This allows your plug-in to know which shared - data was changed if multiple shared data are handled by one callback, or if - the plug-in does not use global variables. + If a notificationFunc is passed in and is not NULL, that notification + function will be called whenever the data is modified. The notification + refcon will be passed to it. This allows your plug-in to know which shared + data was changed if multiple shared data are handled by one callback, or if + the plug-in does not use global variables. - A one is returned for successfully creating or finding the shared data; a - zero if the data already exists but is of the wrong type. + A one is returned for successfully creating or finding the shared data; a + zero if the data already exists but is of the wrong type. } FUNCTION XPLMShareData( - inDataName : XPLMString; + inDataName : Pchar; inDataType : XPLMDataTypeID; inNotificationFunc : XPLMDataChanged_f; - inNotificationRefcon: pointer) : Integer; - cdecl; external XPLM_DLL; + inNotificationRefcon: pointer) : integer; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMUnshareData - This routine removes your notification function for shared data. Call it - when done with the data to stop receiving change notifications. Arguments - must match XPLMShareData. The actual memory will not necessarily be freed, - since other plug-ins could be using it. + This routine removes your notification function for shared data. Call it + when done with the data to stop receiving change notifications. Arguments + must match XPLMShareData. The actual memory will not necessarily be freed, + since other plug-ins could be using it. } FUNCTION XPLMUnshareData( - inDataName : XPLMString; + inDataName : Pchar; inDataType : XPLMDataTypeID; inNotificationFunc : XPLMDataChanged_f; - inNotificationRefcon: pointer) : Integer; - cdecl; external XPLM_DLL; - + inNotificationRefcon: pointer) : integer; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} IMPLEMENTATION - END. diff --git a/src/SDK/Delphi/XPLM/XPLMDefs.pas b/src/SDK/Delphi/XPLM/XPLMDefs.pas index 91bd774a..48ec73bc 100755 --- a/src/SDK/Delphi/XPLM/XPLMDefs.pas +++ b/src/SDK/Delphi/XPLM/XPLMDefs.pas @@ -1,22 +1,28 @@ { - 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} @@ -35,13 +41,13 @@ * 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.) } @@ -50,7 +56,7 @@ * GLOBAL DEFINITIONS ___________________________________________________________________________} { - These definitions are used in all parts of the SDK. + These definitions are used in all parts of the SDK. } @@ -58,62 +64,61 @@ { 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. This includes the unloading and - reloading of plugins that are part of the user's aircraft. + 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. - 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 3.03 (303). } - kXPLM_Version = (303); + { The current XPLM revision is 3.01 (301). } + kXPLM_Version = (301); { 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 ); @@ -123,16 +128,15 @@ * 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. } @@ -179,29 +183,31 @@ * 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. } @@ -248,7 +254,7 @@ 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; @@ -269,7 +275,7 @@ 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; @@ -402,8 +408,8 @@ 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; @@ -432,7 +438,5 @@ XPLM_VK_NUMPAD_EQ = $BD; - IMPLEMENTATION - END. diff --git a/src/SDK/Delphi/XPLM/XPLMDisplay.pas b/src/SDK/Delphi/XPLM/XPLMDisplay.pas index a100fd0a..9dd1ab49 100755 --- a/src/SDK/Delphi/XPLM/XPLMDisplay.pas +++ b/src/SDK/Delphi/XPLM/XPLMDisplay.pas @@ -1,199 +1,174 @@ { - 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 XPLMDisplay; INTERFACE { - This API provides the basic hooks to draw in X-Plane and create user - interface. All X-Plane drawing is done in OpenGL. The X-Plane plug-in - manager takes care of properly setting up the OpenGL context and matrices. - You do not decide when in your code's execution to draw; X-Plane tells you - (via callbacks) when it is ready to have your plugin draw. + This API provides the basic hooks to draw in X-Plane and create user + interface. All X-Plane drawing is done in OpenGL. The X-Plane plug-in + manager takes care of properly setting up the OpenGL context and matrices. + You do not decide when in your code's execution to draw; X-Plane tells you + (via callbacks) when it is ready to have your plugin draw. + + X-Plane's drawing strategy is straightforward: every "frame" the screen is + rendered by drawing the 3-D scene (dome, ground, objects, airplanes, etc.) + and then drawing the cockpit on top of it. Alpha blending is used to + overlay the cockpit over the world (and the gauges over the panel, etc.). + X-Plane user interface elements (including windows like the map, the main + menu, etc.) are then drawn on top of the cockpit. + + There are two ways you can draw: directly and in a window. - X-Plane's drawing strategy is straightforward: every "frame" the screen is - rendered by drawing the 3-D scene (dome, ground, objects, airplanes, etc.) - and then drawing the cockpit on top of it. Alpha blending is used to - overlay the cockpit over the world (and the gauges over the panel, etc.). - X-Plane user interface elements (including windows like the map, the main - menu, etc.) are then drawn on top of the cockpit. + Direct drawing (deprecated!---more on that below) involves drawing to the + screen before or after X-Plane finishes a phase of drawing. When you draw + directly, you can specify whether X-Plane is to complete this phase or not. + This allows you to do three things: draw before X-Plane does (under it), + draw after X-Plane does (over it), or draw instead of X-Plane. - There are two ways you can draw: directly and in a window. + To draw directly, you register a callback and specify which phase you want + to intercept. The plug-in manager will call you over and over to draw that + phase. - Direct drawing (deprecated!---more on that below) involves drawing to the - screen before or after X-Plane finishes a phase of drawing. When you draw - directly, you can specify whether X-Plane is to complete this phase or not. - This allows you to do three things: draw before X-Plane does (under it), - draw after X-Plane does (over it), or draw instead of X-Plane. + Direct drawing allows you to override scenery, panels, or anything. Note + that you cannot assume that you are the only plug-in drawing at this + phase. - To draw directly, you register a callback and specify which phase you want - to intercept. The plug-in manager will call you over and over to draw that - phase. + Direct drawing is deprecated; at some point in the X-Plane 11 run, it will + likely become unsupported entirely as X-Plane transitions from OpenGL to + modern graphics API backends (e.g., Vulkan, Metal, etc.). In the long term, + plugins should use the XPLMInstance API for drawing 3-D objects---this will + be much more efficient than general 3-D OpenGL drawing, and it will + actually be supported by the new graphics backends. We do not yet know what + the post-transition API for generic 3-D drawing will look like (if it + exists at all). - Direct drawing allows you to override scenery, panels, or anything. Note - that you cannot assume that you are the only plug-in drawing at this phase. + In contrast to direct drawing, window drawing provides a higher level + functionality. With window drawing, you create a 2-D window that takes up a + portion of the screen. Window drawing is always two dimensional. Window + drawing is front-to-back controlled; you can specify that you want your + window to be brought on top, and other plug-ins may put their window on top + of you. Window drawing also allows you to sign up for key presses and + receive mouse clicks. - Direct drawing is deprecated; at some point in the X-Plane 11 run, it will - likely become unsupported entirely as X-Plane transitions from OpenGL to - modern graphics API backends (e.g., Vulkan, Metal, etc.). In the long term, - plugins should use the XPLMInstance API for drawing 3-D objects---this will - be much more efficient than general 3-D OpenGL drawing, and it will - actually be supported by the new graphics backends. We do not yet know what - the post-transition API for generic 3-D drawing will look like (if it - exists at all). + There are three ways to get keystrokes: - In contrast to direct drawing, window drawing provides a higher level - functionality. With window drawing, you create a 2-D window that takes up a - portion of the screen. Window drawing is always two dimensional. Window - drawing is front-to-back controlled; you can specify that you want your - window to be brought on top, and other plug-ins may put their window on top - of you. Window drawing also allows you to sign up for key presses and - receive mouse clicks. + 1. If you create a window, the window can take keyboard focus. It will + then receive all keystrokes. If no window has focus, X-Plane receives + keystrokes. Use this to implement typing in dialog boxes, etc. Only one + window may have focus at a time; your window will be notified if it loses + focus. - There are three ways to get keystrokes: + 2. If you need low level access to the keystroke stream, install a key + sniffer. Key sniffers can be installed above everything or right in front + of the sim. - 1. If you create a window, the window can take keyboard focus. It will - then receive all keystrokes. If no window has focus, X-Plane receives - keystrokes. Use this to implement typing in dialog boxes, etc. Only - one window may have focus at a time; your window will be notified if it - loses focus. - 2. If you need low level access to the keystroke stream, install a key - sniffer. Key sniffers can be installed above everything or right in - front of the sim. - 3. If you would like to associate key strokes with commands/functions in - your plug-in, you should simply register a command (via - XPLMCreateCommand()) and allow users to bind whatever key they choose to - that command. Another (now deprecated) method of doing so is to use a - hot key---a key-specific callback. Hotkeys are sent based on virtual - key strokes, so any key may be distinctly mapped with any modifiers. - Hot keys can be remapped by other plug-ins. As a plug-in, you don't - have to worry about what your hot key ends up mapped to; other plug-ins - may provide a UI for remapping keystrokes. So hotkeys allow a user to - resolve conflicts and customize keystrokes. + 3. If you would like to associate key strokes with commands/functions in + your plug-in, you should simply register a command (via + XPLMCreateCommand()) and allow users to bind whatever key they choose to + that command. Another (now deprecated) method of doing so is to use a hot + key---a key-specific callback. Hotkeys are sent based on virtual key + strokes, so any key may be distinctly mapped with any modifiers. Hot keys + can be remapped by other plug-ins. As a plug-in, you don't have to worry + about what your hot key ends up mapped to; other plug-ins may provide a UI + for remapping keystrokes. So hotkeys allow a user to resolve conflicts and + customize keystrokes. } -USES - XPLMDefs; +USES XPLMDefs; {$A4} +{$IFDEF MSWINDOWS} + {$DEFINE DELPHI} +{$ENDIF} {___________________________________________________________________________ * DRAWING CALLBACKS ___________________________________________________________________________} { - Basic drawing callbacks, for low level intercepting of X-Plane's render - loop. The purpose of drawing callbacks is to provide targeted additions or - replacements to X-Plane's graphics environment (for example, to add extra - custom objects, or replace drawing of the AI aircraft). Do not assume that - the drawing callbacks will be called in the order implied by the - enumerations. Also do not assume that each drawing phase ends before - another begins; they may be nested. + Basic drawing callbacks, for low level intercepting of X-Plane's render + loop. The purpose of drawing callbacks is to provide targeted additions or + replacements to X-Plane's graphics environment (for example, to add extra + custom objects, or replace drawing of the AI aircraft). Do not assume that + the drawing callbacks will be called in the order implied by the + enumerations. Also do not assume that each drawing phase ends before + another begins; they may be nested. - Note that all APIs in this section are deprecated, and will likely be - removed during the X-Plane 11 run as part of the transition to - Vulkan/Metal/etc. See the XPLMInstance API for future-proof drawing of 3-D - objects. + Note that all APIs in this section are deprecated, and will likely be + removed during the X-Plane 11 run as part of the transition to + Vulkan/Metal/etc. See the XPLMInstance API for future-proof drawing of 3-D + objects. } { XPLMDrawingPhase - This constant indicates which part of drawing we are in. Drawing is done - from the back to the front. We get a callback before or after each item. - Metaphases provide access to the beginning and end of the 3d (scene) and - 2d (cockpit) drawing in a manner that is independent of new phases added - via X-Plane implementation. - - **NOTE**: As of XPLM302 the legacy 3D drawing phases (xplm_Phase_FirstScene - to xplm_Phase_LastScene) are deprecated. When running under X-Plane 11.50 - with the modern Vulkan or Metal backend, X-Plane will no longer call - these drawing phases. There is a new drawing phase, xplm_Phase_Modern3D, - which is supported under OpenGL and Vulkan which is called out roughly - where the old before xplm_Phase_Airplanes phase was for blending. This - phase is *NOT* supported under Metal and comes with potentially - substantial performance overhead. Please do *NOT* opt into this phase if - you don't do any actual drawing that requires the depth buffer in some - way! - - **WARNING**: As X-Plane's scenery evolves, some drawing phases may cease to - exist and new ones may be invented. If you need a particularly specific - use of these codes, consult Austin and/or be prepared to revise your code - as X-Plane evolves. + This constant indicates which part of drawing we are in. Drawing is done + from the back to the front. We get a callback before or after each item. + Metaphases provide access to the beginning and end of the 3d (scene) and 2d + (cockpit) drawing in a manner that is independent of new phases added via + X-Plane implementation. + + WARNING: As X-Plane's scenery evolves, some drawing phases may cease to + exist and new ones may be invented. If you need a particularly specific + use of these codes, consult Austin and/or be prepared to revise your code + as X-Plane evolves. } TYPE XPLMDrawingPhase = ( -{$IFDEF XPLM_DEPRECATED} - { Deprecated as of XPLM302. This is the earliest point at which you can draw } - { in 3-d. } + { This is the earliest point at which you can draw in 3-d. } xplm_Phase_FirstScene = 0 -{$ENDIF XPLM_DEPRECATED} -{$IFDEF XPLM_DEPRECATED} - { Deprecated as of XPLM302. Drawing of land and water. } + { Drawing of land and water. } ,xplm_Phase_Terrain = 5 -{$ENDIF XPLM_DEPRECATED} -{$IFDEF XPLM_DEPRECATED} - { Deprecated as of XPLM302. Drawing runways and other airport detail. } + { Drawing runways and other airport detail. } ,xplm_Phase_Airports = 10 -{$ENDIF XPLM_DEPRECATED} -{$IFDEF XPLM_DEPRECATED} - { Deprecated as of XPLM302. Drawing roads, trails, trains, etc. } + { Drawing roads, trails, trains, etc. } ,xplm_Phase_Vectors = 15 -{$ENDIF XPLM_DEPRECATED} -{$IFDEF XPLM_DEPRECATED} - { Deprecated as of XPLM302. 3-d objects (houses, smokestacks, etc. } + { 3-d objects (houses, smokestacks, etc. } ,xplm_Phase_Objects = 20 -{$ENDIF XPLM_DEPRECATED} -{$IFDEF XPLM_DEPRECATED} - { Deprecated as of XPLM302. External views of airplanes, both yours and the } - { AI aircraft. } + { External views of airplanes, both yours and the AI aircraft. } ,xplm_Phase_Airplanes = 25 -{$ENDIF XPLM_DEPRECATED} -{$IFDEF XPLM_DEPRECATED} - { Deprecated as of XPLM302. This is the last point at which you can draw in } - { 3-d. } + { This is the last point at which you can draw in 3-d. } ,xplm_Phase_LastScene = 30 -{$ENDIF XPLM_DEPRECATED} - -{$IFDEF XPLM302} - { A chance to do modern 3D drawing. } - ,xplm_Phase_Modern3D = 31 -{$ENDIF XPLM302} - { This is the first phase where you can draw in 2-d. } + { This is the first phase where you can draw in 2-d. } ,xplm_Phase_FirstCockpit = 35 - { The non-moving parts of the aircraft panel. } + { The non-moving parts of the aircraft panel. } ,xplm_Phase_Panel = 40 - { The moving parts of the aircraft panel. } + { The moving parts of the aircraft panel. } ,xplm_Phase_Gauges = 45 - { Floating windows from plugins. } + { Floating windows from plugins. } ,xplm_Phase_Window = 50 - { The last chance to draw in 2d. } + { The last change to draw in 2d. } ,xplm_Phase_LastCockpit = 55 {$IFDEF XPLM200} - { Removed as of XPLM300; Use the full-blown XPLMMap API instead. } + { Removed as of XPLM300; Use the full-blown XPLMMap API instead. } ,xplm_Phase_LocalMap3D = 100 -{$ENDIF XPLM200} +{$ENDIF} {$IFDEF XPLM200} - { Removed as of XPLM300; Use the full-blown XPLMMap API instead. } + { Removed as of XPLM300; Use the full-blown XPLMMap API instead. } ,xplm_Phase_LocalMap2D = 101 -{$ENDIF XPLM200} +{$ENDIF} {$IFDEF XPLM200} - { Removed as of XPLM300; Use the full-blown XPLMMap API instead. } + { Removed as of XPLM300; Use the full-blown XPLMMap API instead. } ,xplm_Phase_LocalMapProfile = 102 -{$ENDIF XPLM200} +{$ENDIF} ); PXPLMDrawingPhase = ^XPLMDrawingPhase; @@ -201,99 +176,107 @@ { XPLMDrawCallback_f - This is the prototype for a low level drawing callback. You are passed in - the phase and whether it is before or after. If you are before the phase, - return 1 to let X-Plane draw or 0 to suppress X-Plane drawing. If you are - after the phase the return value is ignored. + This is the prototype for a low level drawing callback. You are passed in + the phase and whether it is before or after. If you are before the phase, + return 1 to let X-Plane draw or 0 to suppress X-Plane drawing. If you are + after the phase the return value is ignored. - Refcon is a unique value that you specify when registering the callback, - allowing you to slip a pointer to your own data to the callback. + Refcon is a unique value that you specify when registering the callback, + allowing you to slip a pointer to your own data to the callback. - Upon entry the OpenGL context will be correctly set up for you and OpenGL - will be in 'local' coordinates for 3d drawing and panel coordinates for 2d - drawing. The OpenGL state (texturing, etc.) will be unknown. + Upon entry the OpenGL context will be correctly set up for you and OpenGL + will be in 'local' coordinates for 3d drawing and panel coordinates for 2d + drawing. The OpenGL state (texturing, etc.) will be unknown. } XPLMDrawCallback_f = FUNCTION( inPhase : XPLMDrawingPhase; - inIsBefore : Integer; - inRefcon : pointer) : Integer; cdecl; + inIsBefore : integer; + inRefcon : pointer) : integer; cdecl; { XPLMRegisterDrawCallback - This routine registers a low level drawing callback. Pass in the phase you - want to be called for and whether you want to be called before or after. - This routine returns 1 if the registration was successful, or 0 if the - phase does not exist in this version of X-Plane. You may register a - callback multiple times for the same or different phases as long as the - refcon is unique each time. + This routine registers a low level drawing callback. Pass in the phase you + want to be called for and whether you want to be called before or after. + This routine returns 1 if the registration was successful, or 0 if the + phase does not exist in this version of X-Plane. You may register a + callback multiple times for the same or different phases as long as the + refcon is unique each time. - Note that this function will likely be removed during the X-Plane 11 run as - part of the transition to Vulkan/Metal/etc. See the XPLMInstance API for - future-proof drawing of 3-D objects. + Note that this function will likely be removed during the X-Plane 11 run as + part of the transition to Vulkan/Metal/etc. See the XPLMInstance API for + future-proof drawing of 3-D objects. } FUNCTION XPLMRegisterDrawCallback( inCallback : XPLMDrawCallback_f; inPhase : XPLMDrawingPhase; - inWantsBefore : Integer; - inRefcon : pointer) : Integer; - cdecl; external XPLM_DLL; + inWantsBefore : integer; + inRefcon : pointer) : integer; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMUnregisterDrawCallback - This routine unregisters a draw callback. You must unregister a callback - for each time you register a callback if you have registered it multiple - times with different refcons. The routine returns 1 if it can find the - callback to unregister, 0 otherwise. + This routine unregisters a draw callback. You must unregister a callback + for each time you register a callback if you have registered it multiple + times with different refcons. The routine returns 1 if it can find the + callback to unregister, 0 otherwise. - Note that this function will likely be removed during the X-Plane 11 run as - part of the transition to Vulkan/Metal/etc. See the XPLMInstance API for - future-proof drawing of 3-D objects. + Note that this function will likely be removed during the X-Plane 11 run as + part of the transition to Vulkan/Metal/etc. See the XPLMInstance API for + future-proof drawing of 3-D objects. } FUNCTION XPLMUnregisterDrawCallback( inCallback : XPLMDrawCallback_f; inPhase : XPLMDrawingPhase; - inWantsBefore : Integer; - inRefcon : pointer) : Integer; - cdecl; external XPLM_DLL; + inWantsBefore : integer; + inRefcon : pointer) : integer; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} {___________________________________________________________________________ * WINDOW API ___________________________________________________________________________} { - The window API provides a high-level abstraction for drawing with UI - interaction. + The window API provides a high-level abstraction for drawing with UI + interaction. - Windows may operate in one of two modes: legacy (for plugins compiled - against old versions of the XPLM, as well as windows created via the - deprecated XPLMCreateWindow() function, rather than XPLMCreateWindowEx()), - or modern (for windows compiled against the XPLM300 or newer API, and - created via XPLMCreateWindowEx()). + Windows may operate in one of two modes: legacy (for plugins compiled + against old versions of the XPLM, as well as windows created via the + deprecated XPLMCreateWindow() function, rather than XPLMCreateWindowEx()), + or modern (for windows compiled against the XPLM300 or newer API, and + created via XPLMCreateWindowEx()). - Modern windows have access to new X-Plane 11 windowing features, like - support for new positioning modes (including being "popped out" into their - own first-class window in the operating system). They can also optionally - be decorated in the style of X-Plane 11 windows (like the map). + Modern windows have access to new X-Plane 11 windowing features, like + support for new positioning modes (including being "popped out" into their + own first-class window in the operating system). They can also optionally + be decorated in the style of X-Plane 11 windows (like the map). - Modern windows operate in "boxel" units. A boxel ("box of pixels") is a - unit of virtual pixels which, depending on X-Plane's scaling, may - correspond to an arbitrary NxN "box" of real pixels on screen. Because - X-Plane handles this scaling automatically, you can effectively treat the - units as though you were simply drawing in pixels, and know that when - X-Plane is running with 150% or 200% scaling, your drawing will be - automatically scaled (and likewise all mouse coordinates, screen bounds, - etc. will also be auto-scaled). + Modern windows operate in "boxel" units. A boxel ("box of pixels") is a + unit of virtual pixels which, depending on X-Plane's scaling, may + correspond to an arbitrary NxN "box" of real pixels on screen. Because + X-Plane handles this scaling automatically, you can effectively treat the + units as though you were simply drawing in pixels, and know that when + X-Plane is running with 150% or 200% scaling, your drawing will be + automatically scaled (and likewise all mouse coordinates, screen bounds, + etc. will also be auto-scaled). - In contrast, legacy windows draw in true screen pixels, and thus tend to - look quite small when X-Plane is operating in a scaled mode. + In contrast, legacy windows draw in true screen pixels, and thus tend to + look quite small when X-Plane is operating in a scaled mode. - Legacy windows have their origin in the lower left of the main X-Plane - window. In contrast, since modern windows are not constrained to the main - window, they have their origin in the lower left of the entire global - desktop space, and the lower left of the main X-Plane window is not - guaranteed to be (0, 0). In both cases, x increases as you move left, and y - increases as you move up. + Legacy windows have their origin in the lower left of the main X-Plane + window. In contrast, since modern windows are not constrained to the main + window, they have their origin in the lower left of the entire global + desktop space, and the lower left of the main X-Plane window is not + guaranteed to be (0, 0). In both cases, x increases as you move left, and y + increases as you move up. } @@ -301,10 +284,10 @@ { XPLMWindowID - This is an opaque identifier for a window. You use it to control your - window. When you create a window (via either XPLMCreateWindow() or - XPLMCreateWindowEx()), you will specify callbacks to handle drawing, mouse - interaction, etc. + This is an opaque identifier for a window. You use it to control your + window. When you create a window (via either XPLMCreateWindow() or + XPLMCreateWindowEx()), you will specify callbacks to handle drawing, mouse + interaction, etc. } XPLMWindowID = pointer; PXPLMWindowID = ^XPLMWindowID; @@ -312,15 +295,15 @@ { XPLMDrawWindow_f - A callback to handle 2-D drawing of your window. You are passed in your - window and its refcon. Draw the window. You can use other XPLM functions - from this header to find the current dimensions of your window, etc. When - this callback is called, the OpenGL context will be set properly for 2-D - window drawing. + A callback to handle 2-D drawing of your window. You are passed in your + window and its refcon. Draw the window. You can use other XPLM functions + from this header to find the current dimensions of your window, etc. When + this callback is called, the OpenGL context will be set properly for 2-D + window drawing. - **Note**: Because you are drawing your window over a background, you can - make a translucent window easily by simply not filling in your entire - window's bounds. + NOTE: Because you are drawing your window over a background, you can make a + translucent window easily by simply not filling in your entire window's + bounds. } XPLMDrawWindow_f = PROCEDURE( inWindowID : XPLMWindowID; @@ -329,33 +312,33 @@ { XPLMHandleKey_f - This function is called when a key is pressed or keyboard focus is taken - away from your window. If losingFocus is 1, you are losing the keyboard - focus, otherwise a key was pressed and inKey contains its character. You - are also passed your window and a refcon. + This function is called when a key is pressed or keyboard focus is taken + away from your window. If losingFocus is 1, you are losing the keyboard + focus, otherwise a key was pressed and inKey contains its character. You + are also passed your window and a refcon. - Warning: this API declares virtual keys as a signed character; however the - VKEY #define macros in XPLMDefs.h define the vkeys using unsigned values - (that is 0x80 instead of -0x80). So you may need to cast the incoming vkey - to an unsigned char to get correct comparisons in C. + Warning: this API declares virtual keys as a signed character; however the + VKEY #define macros in XPLMDefs.h define the vkeys using unsigned values + (that is 0x80 instead of -0x80). So you may need to cast the incoming vkey + to an unsigned char to get correct comparisons in C. } XPLMHandleKey_f = PROCEDURE( inWindowID : XPLMWindowID; - inKey : XPLMChar; + inKey : char; inFlags : XPLMKeyFlags; - inVirtualKey : XPLMChar; + inVirtualKey : char; inRefcon : pointer; - losingFocus : Integer); cdecl; + losingFocus : integer); cdecl; { XPLMMouseStatus - When the mouse is clicked, your mouse click routine is called repeatedly. - It is first called with the mouse down message. It is then called zero or - more times with the mouse-drag message, and finally it is called once with - the mouse up message. All of these messages will be directed to the same - window; you are guaranteed to not receive a drag or mouse-up event without - first receiving the corresponding mouse-down. + When the mouse is clicked, your mouse click routine is called repeatedly. + It is first called with the mouse down message. It is then called zero or + more times with the mouse-drag message, and finally it is called once with + the mouse up message. All of these messages will be directed to the same + window; you are guaranteed to not receive a drag or mouse-up event without + first receiving the corresponding mouse-down. } XPLMMouseStatus = ( xplm_MouseDown = 1 @@ -370,1000 +353,1113 @@ { XPLMHandleMouseClick_f - You receive this call for one of three events: + You receive this call for one of three events: - - when the user clicks the mouse button down - - (optionally) when the user drags the mouse after a down-click, but before - the up-click - - when the user releases the down-clicked mouse button. + - when the user clicks the mouse button down - (optionally) when the user + drags the mouse after a down-click, but before the up-click - when the user + releases the down-clicked mouse button. - You receive the x and y of the click, your window, and a refcon. Return 1 - to consume the click, or 0 to pass it through. + You receive the x and y of the click, your window, and a refcon. Return 1 + to consume the click, or 0 to pass it through. - WARNING: passing clicks through windows (as of this writing) causes mouse - tracking problems in X-Plane; do not use this feature! + WARNING: passing clicks through windows (as of this writing) causes mouse + tracking problems in X-Plane; do not use this feature! - The units for x and y values match the units used in your window. Thus, for - "modern" windows (those created via XPLMCreateWindowEx() and compiled - against the XPLM300 library), the units are boxels, while legacy windows - will get pixels. Legacy windows have their origin in the lower left of the - main X-Plane window, while modern windows have their origin in the lower - left of the global desktop space. In both cases, x increases as you move - right, and y increases as you move up. + The units for x and y values match the units used in your window. Thus, for + "modern" windows (those created via XPLMCreateWindowEx() and compiled + against the XPLM300 library), the units are boxels, while legacy windows + will get pixels. Legacy windows have their origin in the lower left of the + main X-Plane window, while modern windows have their origin in the lower + left of the global desktop space. In both cases, x increases as you move + left, and y increases as you move up. } XPLMHandleMouseClick_f = FUNCTION( inWindowID : XPLMWindowID; - x : Integer; - y : Integer; + x : integer; + y : integer; inMouse : XPLMMouseStatus; - inRefcon : pointer) : Integer; cdecl; + inRefcon : pointer) : integer; cdecl; {$IFDEF XPLM200} { XPLMCursorStatus - XPLMCursorStatus describes how you would like X-Plane to manage the cursor. - See XPLMHandleCursor_f for more info. + XPLMCursorStatus describes how you would like X-Plane to manage the cursor. + See XPLMHandleCursor_f for more info. } -TYPE XPLMCursorStatus = ( - { X-Plane manages the cursor normally, plugin does not affect the cusrsor. } + { X-Plane manages the cursor normally, plugin does not affect the cusrsor. } xplm_CursorDefault = 0 - { X-Plane hides the cursor. } + { X-Plane hides the cursor. } ,xplm_CursorHidden = 1 - { X-Plane shows the cursor as the default arrow. } + { X-Plane shows the cursor as the default arrow. } ,xplm_CursorArrow = 2 - { X-Plane shows the cursor but lets you select an OS cursor. } + { X-Plane shows the cursor but lets you select an OS cursor. } ,xplm_CursorCustom = 3 ); PXPLMCursorStatus = ^XPLMCursorStatus; -{$ENDIF XPLM200} +{$ENDIF} {$IFDEF XPLM200} { XPLMHandleCursor_f - The SDK calls your cursor status callback when the mouse is over your - plugin window. Return a cursor status code to indicate how you would like - X-Plane to manage the cursor. If you return xplm_CursorDefault, the SDK - will try lower-Z-order plugin windows, then let the sim manage the cursor. - - Note: you should never show or hide the cursor yourself---these APIs are - typically reference-counted and thus cannot safely and predictably be used - by the SDK. Instead return one of xplm_CursorHidden to hide the cursor or - xplm_CursorArrow/xplm_CursorCustom to show the cursor. - - If you want to implement a custom cursor by drawing a cursor in OpenGL, use - xplm_CursorHidden to hide the OS cursor and draw the cursor using a 2-d - drawing callback (after xplm_Phase_Window is probably a good choice, but - see deprecation warnings on the drawing APIs!). If you want to use a - custom OS-based cursor, use xplm_CursorCustom to ask X-Plane to show the - cursor but not affect its image. You can then use an OS specific call like - SetThemeCursor (Mac) or SetCursor/LoadCursor (Windows). - - The units for x and y values match the units used in your window. Thus, for - "modern" windows (those created via XPLMCreateWindowEx() and compiled - against the XPLM300 library), the units are boxels, while legacy windows - will get pixels. Legacy windows have their origin in the lower left of the - main X-Plane window, while modern windows have their origin in the lower - left of the global desktop space. In both cases, x increases as you move - right, and y increases as you move up. + The SDK calls your cursor status callback when the mouse is over your + plugin window. Return a cursor status code to indicate how you would like + X-Plane to manage the cursor. If you return xplm_CursorDefault, the SDK + will try lower-Z-order plugin windows, then let the sim manage the cursor. + + Note: you should never show or hide the cursor yourself---these APIs are + typically reference-counted and thus cannot safely and predictably be used + by the SDK. Instead return one of xplm_CursorHidden to hide the cursor or + xplm_CursorArrow/xplm_CursorCustom to show the cursor. + + If you want to implement a custom cursor by drawing a cursor in OpenGL, use + xplm_CursorHidden to hide the OS cursor and draw the cursor using a 2-d + drawing callback (after xplm_Phase_Window is probably a good choice, but + see deprecation warnings on the drawing APIs!). If you want to use a + custom OS-based cursor, use xplm_CursorCustom to ask X-Plane to show the + cursor but not affect its image. You can then use an OS specific call like + SetThemeCursor (Mac) or SetCursor/LoadCursor (Windows). + + The units for x and y values match the units used in your window. Thus, for + "modern" windows (those created via XPLMCreateWindowEx() and compiled + against the XPLM300 library), the units are boxels, while legacy windows + will get pixels. Legacy windows have their origin in the lower left of the + main X-Plane window, while modern windows have their origin in the lower + left of the global desktop space. In both cases, x increases as you move + left, and y increases as you move up. } XPLMHandleCursor_f = FUNCTION( inWindowID : XPLMWindowID; - x : Integer; - y : Integer; + x : integer; + y : integer; inRefcon : pointer) : XPLMCursorStatus; cdecl; -{$ENDIF XPLM200} +{$ENDIF} {$IFDEF XPLM200} { XPLMHandleMouseWheel_f - The SDK calls your mouse wheel callback when one of the mouse wheels is - scrolled within your window. Return 1 to consume the mouse wheel movement - or 0 to pass them on to a lower window. (If your window appears opaque to - the user, you should consume mouse wheel scrolling even if it does - nothing.) The number of "clicks" indicates how far the wheel was turned - since the last callback. The wheel is 0 for the vertical axis or 1 for the - horizontal axis (for OS/mouse combinations that support this). - - The units for x and y values match the units used in your window. Thus, for - "modern" windows (those created via XPLMCreateWindowEx() and compiled - against the XPLM300 library), the units are boxels, while legacy windows - will get pixels. Legacy windows have their origin in the lower left of the - main X-Plane window, while modern windows have their origin in the lower - left of the global desktop space. In both cases, x increases as you move - right, and y increases as you move up. + The SDK calls your mouse wheel callback when one of the mouse wheels is + scrolled within your window. Return 1 to consume the mouse wheel movement + or 0 to pass them on to a lower window. (If your window appears opaque to + the user, you should consume mouse wheel scrolling even if it does + nothing.) The number of "clicks" indicates how far the wheel was turned + since the last callback. The wheel is 0 for the vertical axis or 1 for the + horizontal axis (for OS/mouse combinations that support this). + + The units for x and y values match the units used in your window. Thus, for + "modern" windows (those created via XPLMCreateWindowEx() and compiled + against the XPLM300 library), the units are boxels, while legacy windows + will get pixels. Legacy windows have their origin in the lower left of the + main X-Plane window, while modern windows have their origin in the lower + left of the global desktop space. In both cases, x increases as you move + left, and y increases as you move up. } XPLMHandleMouseWheel_f = FUNCTION( inWindowID : XPLMWindowID; - x : Integer; - y : Integer; - wheel : Integer; - clicks : Integer; - inRefcon : pointer) : Integer; cdecl; -{$ENDIF XPLM200} + x : integer; + y : integer; + wheel : integer; + clicks : integer; + inRefcon : pointer) : integer; cdecl; +{$ENDIF} {$IFDEF XPLM300} { XPLMWindowLayer - XPLMWindowLayer describes where in the ordering of windows X-Plane should - place a particular window. Windows in higher layers cover windows in lower - layers. So, a given window might be at the top of its particular layer, but - it might still be obscured by a window in a higher layer. (This happens - frequently when floating windows, like X-Plane's map, are covered by a - modal alert.) - - Your window's layer can only be specified when you create the window (in - the XPLMCreateWindow_t you pass to XPLMCreateWindowEx()). For this reason, - layering only applies to windows created with new X-Plane 11 GUI features. - (Windows created using the older XPLMCreateWindow(), or windows compiled - against a pre-XPLM300 version of the SDK will simply be placed in the - flight overlay window layer.) + XPLMWindowLayer describes where in the ordering of windows X-Plane should + place a particular window. Windows in higher layers cover windows in lower + layers. So, a given window might be at the top of its particular layer, but + it might still be obscured by a window in a higher layer. (This happens + frequently when floating windows, like X-Plane's map, are covered by a + modal alert.) + + Your window's layer can only be specified when you create the window (in + the XPLMCreateWindow_t you pass to XPLMCreateWindowEx()). For this reason, + layering only applies to windows created with new X-Plane 11 GUI features. + (Windows created using the older XPLMCreateWindow(), or windows compiled + against a pre-XPLM300 version of the SDK will simply be placed in the + flight overlay window layer.) } -TYPE XPLMWindowLayer = ( - { The lowest layer, used for HUD-like displays while flying. } + { The lowest layer, used for HUD-like displays while flying. } xplm_WindowLayerFlightOverlay = 0 - { Windows that "float" over the sim, like the X-Plane 11 map does. If you are} - { not sure which layer to create your window in, choose floating. } + { Windows that "float" over the sim, like the X-Plane 11 map does. If you are } + { not sure which layer to create your window in, choose floating. } ,xplm_WindowLayerFloatingWindows = 1 - { An interruptive modal that covers the sim with a transparent black overlay } - { to draw the user's focus to the alert } + { An interruptive modal that covers the sim with a transparent black overlay } + { to draw the user's focus to the alert } ,xplm_WindowLayerModal = 2 - { "Growl"-style notifications that are visible in a corner of the screen, } - { even over modals } + { "Growl"-style notifications that are visible in a corner of the screen, } + { even over modals } ,xplm_WindowLayerGrowlNotifications = 3 ); PXPLMWindowLayer = ^XPLMWindowLayer; -{$ENDIF XPLM300} +{$ENDIF} {$IFDEF XPLM301} { XPLMWindowDecoration - XPLMWindowDecoration describes how "modern" windows will be displayed. This - impacts both how X-Plane draws your window as well as certain mouse - handlers. + XPLMWindowDecoration describes how "modern" windows will be displayed. This + impacts both how X-Plane draws your window as well as certain mouse + handlers. - Your window's decoration can only be specified when you create the window - (in the XPLMCreateWindow_t you pass to XPLMCreateWindowEx()). + Your window's decoration can only be specified when you create the window + (in the XPLMCreateWindow_t you pass to XPLMCreateWindowEx()). } -TYPE XPLMWindowDecoration = ( - { X-Plane will draw no decoration for your window, and apply no automatic } - { click handlers. The window will not stop click from passing through its } - { bounds. This is suitable for "windows" which request, say, the full screen } - { bounds, then only draw in a small portion of the available area. } + { X-Plane will draw no decoration for your window, and apply no automatic } + { click handlers. The window will not stop click from passing through its } + { bounds. This is suitable for "windows" which request, say, the full screen } + { bounds, then only draw in a small portion of the available area. } xplm_WindowDecorationNone = 0 - { The default decoration for "native" windows, like the map. Provides a solid} - { background, as well as click handlers for resizing and dragging the window.} + { The default decoration for "native" windows, like the map. Provides a solid } + { background, as well as click handlers for resizing and dragging the window. } ,xplm_WindowDecorationRoundRectangle = 1 - { X-Plane will draw no decoration for your window, nor will it provide resize} - { handlers for your window edges, but it will stop clicks from passing } - { through your windows bounds. } + { X-Plane will draw no decoration for your window, nor will it provide resize } + { handlers for your window edges, but it will stop clicks from passing } + { through your windows bounds. } ,xplm_WindowDecorationSelfDecorated = 2 - { Like self-decorated, but with resizing; X-Plane will draw no decoration for} - { your window, but it will stop clicks from passing through your windows } - { bounds, and provide automatic mouse handlers for resizing. } + { Like self-decorated, but with resizing; X-Plane will draw no decoration for } + { your window, but it will stop clicks from passing through your windows } + { bounds, and provide automatic mouse handlers for resizing. } ,xplm_WindowDecorationSelfDecoratedResizable = 3 ); PXPLMWindowDecoration = ^XPLMWindowDecoration; -{$ENDIF XPLM301} +{$ENDIF} {$IFDEF XPLM200} { XPLMCreateWindow_t - The XPMCreateWindow_t structure defines all of the parameters used to - create a modern window using XPLMCreateWindowEx(). The structure will be - expanded in future SDK APIs to include more features. Always set the - structSize member to the size of your struct in bytes! - - All windows created by this function in the XPLM300 version of the API are - created with the new X-Plane 11 GUI features. This means your plugin will - get to "know" about the existence of X-Plane windows other than the main - window. All drawing and mouse callbacks for your window will occur in - "boxels," giving your windows automatic support for high-DPI scaling in - X-Plane. In addition, your windows can opt-in to decoration with the - X-Plane 11 window styling, and you can use the - XPLMSetWindowPositioningMode() API to make your window "popped out" into a - first-class operating system window. - - Note that this requires dealing with your window's bounds in "global - desktop" positioning units, rather than the traditional panel coordinate - system. In global desktop coordinates, the main X-Plane window may not have - its origin at coordinate (0, 0), and your own window may have negative - coordinates. Assuming you don't implicitly assume (0, 0) as your origin, - the only API change you should need is to start using - XPLMGetMouseLocationGlobal() rather than XPLMGetMouseLocation(), and - XPLMGetScreenBoundsGlobal() instead of XPLMGetScreenSize(). - - If you ask to be decorated as a floating window, you'll get the blue window - control bar and blue backing that you see in X-Plane 11's normal "floating" - windows (like the map). + The XPMCreateWindow_t structure defines all of the parameters used to + create a modern window using XPLMCreateWindowEx(). The structure will be + expanded in future SDK APIs to include more features. Always set the + structSize member to the size of your struct in bytes! + + All windows created by this function in the XPLM300 version of the API are + created with the new X-Plane 11 GUI features. This means your plugin will + get to "know" about the existence of X-Plane windows other than the main + window. All drawing and mouse callbacks for your window will occur in + "boxels," giving your windows automatic support for high-DPI scaling in + X-Plane. In addition, your windows can opt-in to decoration with the + X-Plane 11 window styling, and you can use the + XPLMSetWindowPositioningMode() API to make your window "popped out" into a + first-class operating system window. + + Note that this requires dealing with your window's bounds in "global + desktop" positioning units, rather than the traditional panel coordinate + system. In global desktop coordinates, the main X-Plane window may not have + its origin at coordinate (0, 0), and your own window may have negative + coordinates. Assuming you don't implicitly assume (0, 0) as your origin, + the only API change you should need is to start using + XPLMGetMouseLocationGlobal() rather than XPLMGetMouseLocation(), and + XPLMGetScreenBoundsGlobal() instead of XPLMGetScreenSize(). + + If you ask to be decorated as a floating window, you'll get the blue window + control bar and blue backing that you see in X-Plane 11's normal "floating" + windows (like the map). } -TYPE XPLMCreateWindow_t = RECORD - { Used to inform XPLMCreateWindowEx() of the SDK version you compiled } - { against; should always be set to sizeof(XPLMCreateWindow_t) } - structSize : Integer; - { Left bound, in global desktop boxels } - left : Integer; - { Top bound, in global desktop boxels } - top : Integer; - { Right bound, in global desktop boxels } - right : Integer; - { Bottom bound, in global desktop boxels } - bottom : Integer; - visible : Integer; + { Used to inform XPLMCreateWindowEx() of the SDK version you compiled } + { against; should always be set to sizeof(XPLMCreateWindow_t) } + structSize : integer; + { Left bound, in global desktop boxels } + left : integer; + { Top bound, in global desktop boxels } + top : integer; + { Right bound, in global desktop boxels } + right : integer; + { Bottom bound, in global desktop boxels } + bottom : integer; + visible : integer; drawWindowFunc : XPLMDrawWindow_f; - { A callback to handle the user left-clicking within your window (or NULL to } - { ignore left clicks) } + { A callback to handle the user left-clicking within your window (or NULL to } + { ignore left clicks) } handleMouseClickFunc : XPLMHandleMouseClick_f; handleKeyFunc : XPLMHandleKey_f; handleCursorFunc : XPLMHandleCursor_f; handleMouseWheelFunc : XPLMHandleMouseWheel_f; - { A reference which will be passed into each of your window callbacks. Use } - { this to pass information to yourself as needed. } + { A reference which will be passed into each of your window callbacks. Use } + { this to pass information to yourself as needed. } refcon : pointer; {$IFDEF XPLM301} - { Specifies the type of X-Plane 11-style "wrapper" you want around your } - { window, if any } + { Specifies the type of X-Plane 11-style "wrapper" you want around your } + { window, if any } decorateAsFloatingWindow : XPLMWindowDecoration; -{$ENDIF XPLM301} +{$ENDIF} {$IFDEF XPLM300} layer : XPLMWindowLayer; -{$ENDIF XPLM300} +{$ENDIF} {$IFDEF XPLM300} - { A callback to handle the user right-clicking within your window (or NULL to} - { ignore right clicks) } + { A callback to handle the user right-clicking within your window (or NULL to } + { ignore right clicks) } handleRightClickFunc : XPLMHandleMouseClick_f; -{$ENDIF XPLM300} +{$ENDIF} END; PXPLMCreateWindow_t = ^XPLMCreateWindow_t; -{$ENDIF XPLM200} +{$ENDIF} {$IFDEF XPLM200} { XPLMCreateWindowEx - This routine creates a new "modern" window. You pass in an - XPLMCreateWindow_t structure with all of the fields set in. You must set - the structSize of the structure to the size of the actual structure you - used. Also, you must provide functions for every callback---you may not - leave them null! (If you do not support the cursor or mouse wheel, use - functions that return the default values.) + This routine creates a new "modern" window. You pass in an + XPLMCreateWindow_t structure with all of the fields set in. You must set + the structSize of the structure to the size of the actual structure you + used. Also, you must provide functions for every callback---you may not + leave them null! (If you do not support the cursor or mouse wheel, use + functions that return the default values.) } FUNCTION XPLMCreateWindowEx( inParams : PXPLMCreateWindow_t) : XPLMWindowID; - cdecl; external XPLM_DLL; -{$ENDIF XPLM200} +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} +{$ENDIF} { XPLMCreateWindow - Deprecated as of XPLM300. + Deprecated as of XPLM300. - This routine creates a new legacy window. Unlike modern windows (created - via XPLMCreateWindowEx()), legacy windows do not have access to X-Plane 11 - features like automatic scaling for high-DPI screens, native window styles, - or support for being "popped out" into first-class operating system - windows. + This routine creates a new legacy window. Unlike modern windows (created + via XPLMCreateWindowEx()), legacy windows do not have access to X-Plane 11 + features like automatic scaling for high-DPI screens, native window styles, + or support for being "popped out" into first-class operating system + windows. - Pass in the dimensions and offsets to the window's bottom left corner from - the bottom left of the screen. You can specify whether the window is - initially visible or not. Also, you pass in three callbacks to run the - window and a refcon. This function returns a window ID you can use to - refer to the new window. + Pass in the dimensions and offsets to the window's bottom left corner from + the bottom left of the screen. You can specify whether the window is + initially visible or not. Also, you pass in three callbacks to run the + window and a refcon. This function returns a window ID you can use to + refer to the new window. - NOTE: Legacy windows do not have "frames"; you are responsible for drawing - the background and frame of the window. Higher level libraries have - routines which make this easy. + NOTE: Legacy windows do not have "frames"; you are responsible for drawing + the background and frame of the window. Higher level libraries have + routines which make this easy. } FUNCTION XPLMCreateWindow( - inLeft : Integer; - inTop : Integer; - inRight : Integer; - inBottom : Integer; - inIsVisible : Integer; + inLeft : integer; + inTop : integer; + inRight : integer; + inBottom : integer; + inIsVisible : integer; inDrawCallback : XPLMDrawWindow_f; inKeyCallback : XPLMHandleKey_f; inMouseCallback : XPLMHandleMouseClick_f; inRefcon : pointer) : XPLMWindowID; - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMDestroyWindow - This routine destroys a window. The window's callbacks are not called - after this call. Keyboard focus is removed from the window before - destroying it. + This routine destroys a window. The window's callbacks are not called + after this call. Keyboard focus is removed from the window before + destroying it. } PROCEDURE XPLMDestroyWindow( inWindowID : XPLMWindowID); - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMGetScreenSize - This routine returns the size of the main X-Plane OpenGL window in pixels. - This number can be used to get a rough idea of the amount of detail the - user will be able to see when drawing in 3-d. + This routine returns the size of the main X-Plane OpenGL window in pixels. + This number can be used to get a rough idea of the amount of detail the + user will be able to see when drawing in 3-d. } PROCEDURE XPLMGetScreenSize( - outWidth : PInteger; { Can be nil } - outHeight : PInteger); { Can be nil } - cdecl; external XPLM_DLL; + outWidth : Pinteger; { Can be nil } + outHeight : Pinteger); { Can be nil } +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} {$IFDEF XPLM300} { XPLMGetScreenBoundsGlobal - This routine returns the bounds of the "global" X-Plane desktop, in boxels. - Unlike the non-global version XPLMGetScreenSize(), this is multi-monitor - aware. There are three primary consequences of multimonitor awareness. - - First, if the user is running X-Plane in full-screen on two or more - monitors (typically configured using one full-screen window per monitor), - the global desktop will be sized to include all X-Plane windows. - - Second, the origin of the screen coordinates is not guaranteed to be (0, - 0). Suppose the user has two displays side-by-side, both running at 1080p. - Suppose further that they've configured their OS to make the left display - their "primary" monitor, and that X-Plane is running in full-screen on - their right monitor only. In this case, the global desktop bounds would be - the rectangle from (1920, 0) to (3840, 1080). If the user later asked - X-Plane to draw on their primary monitor as well, the bounds would change - to (0, 0) to (3840, 1080). - - Finally, if the usable area of the virtual desktop is not a perfect - rectangle (for instance, because the monitors have different resolutions or - because one monitor is configured in the operating system to be above and - to the right of the other), the global desktop will include any wasted - space. Thus, if you have two 1080p monitors, and monitor 2 is configured to - have its bottom left touch monitor 1's upper right, your global desktop - area would be the rectangle from (0, 0) to (3840, 2160). - - Note that popped-out windows (windows drawn in their own operating system - windows, rather than "floating" within X-Plane) are not included in these - bounds. + This routine returns the bounds of the "global" X-Plane desktop, in boxels. + Unlike the non-global version XPLMGetScreenSize(), this is multi-monitor + aware. There are three primary consequences of multimonitor awareness. + + First, if the user is running X-Plane in full-screen on two or more + monitors (typically configured using one full-screen window per monitor), + the global desktop will be sized to include all X-Plane windows. + + Second, the origin of the screen coordinates is not guaranteed to be (0, + 0). Suppose the user has two displays side-by-side, both running at 1080p. + Suppose further that they've configured their OS to make the left display + their "primary" monitor, and that X-Plane is running in full-screen on + their right monitor only. In this case, the global desktop bounds would be + the rectangle from (1920, 0) to (3840, 1080). If the user later asked + X-Plane to draw on their primary monitor as well, the bounds would change + to (0, 0) to (3840, 1080). + + Finally, if the usable area of the virtual desktop is not a perfect + rectangle (for instance, because the monitors have different resolutions or + because one monitor is configured in the operating system to be above and + to the right of the other), the global desktop will include any wasted + space. Thus, if you have two 1080p monitors, and monitor 2 is configured to + have its bottom left touch monitor 1's upper right, your global desktop + area would be the rectangle from (0, 0) to (3840, 2160). + + Note that popped-out windows (windows drawn in their own operating system + windows, rather than "floating" within X-Plane) are not included in these + bounds. } PROCEDURE XPLMGetScreenBoundsGlobal( - outLeft : PInteger; { Can be nil } - outTop : PInteger; { Can be nil } - outRight : PInteger; { Can be nil } - outBottom : PInteger); { Can be nil } - cdecl; external XPLM_DLL; -{$ENDIF XPLM300} + outLeft : Pinteger; { Can be nil } + outTop : Pinteger; { Can be nil } + outRight : Pinteger; { Can be nil } + outBottom : Pinteger); { Can be nil } +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} +{$ENDIF} {$IFDEF XPLM300} { XPLMReceiveMonitorBoundsGlobal_f - This function is informed of the global bounds (in boxels) of a particular - monitor within the X-Plane global desktop space. Note that X-Plane must be - running in full screen on a monitor in order for that monitor to be passed - to you in this callback. + This function is informed of the global bounds (in boxels) of a particular + monitor within the X-Plane global desktop space. Note that X-Plane must be + running in full screen on a monitor in order for that monitor to be passed + to you in this callback. } TYPE XPLMReceiveMonitorBoundsGlobal_f = PROCEDURE( - inMonitorIndex : Integer; - inLeftBx : Integer; - inTopBx : Integer; - inRightBx : Integer; - inBottomBx : Integer; + inMonitorIndex : integer; + inLeftBx : integer; + inTopBx : integer; + inRightBx : integer; + inBottomBx : integer; inRefcon : pointer); cdecl; -{$ENDIF XPLM300} +{$ENDIF} {$IFDEF XPLM300} { XPLMGetAllMonitorBoundsGlobal - This routine immediately calls you back with the bounds (in boxels) of each - full-screen X-Plane window within the X-Plane global desktop space. Note - that if a monitor is *not* covered by an X-Plane window, you cannot get its - bounds this way. Likewise, monitors with only an X-Plane window (not in - full-screen mode) will not be included. - - If X-Plane is running in full-screen and your monitors are of the same size - and configured contiguously in the OS, then the combined global bounds of - all full-screen monitors will match the total global desktop bounds, as - returned by XPLMGetScreenBoundsGlobal(). (Of course, if X-Plane is running - in windowed mode, this will not be the case. Likewise, if you have - differently sized monitors, the global desktop space will include wasted - space.) - - Note that this function's monitor indices match those provided by - XPLMGetAllMonitorBoundsOS(), but the coordinates are different (since the - X-Plane global desktop may not match the operating system's global desktop, - and one X-Plane boxel may be larger than one pixel due to 150% or 200% - scaling). + This routine immediately calls you back with the bounds (in boxels) of each + full-screen X-Plane window within the X-Plane global desktop space. Note + that if a monitor is *not* covered by an X-Plane window, you cannot get its + bounds this way. Likewise, monitors with only an X-Plane window (not in + full-screen mode) will not be included. + + If X-Plane is running in full-screen and your monitors are of the same size + and configured contiguously in the OS, then the combined global bounds of + all full-screen monitors will match the total global desktop bounds, as + returned by XPLMGetScreenBoundsGlobal(). (Of course, if X-Plane is running + in windowed mode, this will not be the case. Likewise, if you have + differently sized monitors, the global desktop space will include wasted + space.) + + Note that this function's monitor indices match those provided by + XPLMGetAllMonitorBoundsOS(), but the coordinates are different (since the + X-Plane global desktop may not match the operating system's global desktop, + and one X-Plane boxel may be larger than one pixel due to 150% or 200% + scaling). } PROCEDURE XPLMGetAllMonitorBoundsGlobal( inMonitorBoundsCallback: XPLMReceiveMonitorBoundsGlobal_f; inRefcon : pointer); - cdecl; external XPLM_DLL; -{$ENDIF XPLM300} +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} +{$ENDIF} {$IFDEF XPLM300} { XPLMReceiveMonitorBoundsOS_f - This function is informed of the global bounds (in pixels) of a particular - monitor within the operating system's global desktop space. Note that a - monitor index being passed to you here does not indicate that X-Plane is - running in full screen on this monitor, or even that any X-Plane windows - exist on this monitor. + This function is informed of the global bounds (in pixels) of a particular + monitor within the operating system's global desktop space. Note that a + monitor index being passed to you here does not indicate that X-Plane is + running in full screen on this monitor, or even that any X-Plane windows + exist on this monitor. } TYPE XPLMReceiveMonitorBoundsOS_f = PROCEDURE( - inMonitorIndex : Integer; - inLeftPx : Integer; - inTopPx : Integer; - inRightPx : Integer; - inBottomPx : Integer; + inMonitorIndex : integer; + inLeftPx : integer; + inTopPx : integer; + inRightPx : integer; + inBottomPx : integer; inRefcon : pointer); cdecl; -{$ENDIF XPLM300} +{$ENDIF} {$IFDEF XPLM300} { XPLMGetAllMonitorBoundsOS - This routine immediately calls you back with the bounds (in pixels) of each - monitor within the operating system's global desktop space. Note that - unlike XPLMGetAllMonitorBoundsGlobal(), this may include monitors that have - no X-Plane window on them. + This routine immediately calls you back with the bounds (in pixels) of each + monitor within the operating system's global desktop space. Note that + unlike XPLMGetAllMonitorBoundsGlobal(), this may include monitors that have + no X-Plane window on them. - Note that this function's monitor indices match those provided by - XPLMGetAllMonitorBoundsGlobal(), but the coordinates are different (since - the X-Plane global desktop may not match the operating system's global - desktop, and one X-Plane boxel may be larger than one pixel). + Note that this function's monitor indices match those provided by + XPLMGetAllMonitorBoundsGlobal(), but the coordinates are different (since + the X-Plane global desktop may not match the operating system's global + desktop, and one X-Plane boxel may be larger than one pixel). } PROCEDURE XPLMGetAllMonitorBoundsOS( inMonitorBoundsCallback: XPLMReceiveMonitorBoundsOS_f; inRefcon : pointer); - cdecl; external XPLM_DLL; -{$ENDIF XPLM300} +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} +{$ENDIF} { XPLMGetMouseLocation - Deprecated in XPLM300. Modern windows should use - XPLMGetMouseLocationGlobal() instead. + Deprecated in XPLM300. Modern windows should use + XPLMGetMouseLocationGlobal() instead. - This routine returns the current mouse location in pixels relative to the - main X-Plane window. The bottom left corner of the main window is (0, 0). - Pass NULL to not receive info about either parameter. + This routine returns the current mouse location in pixels relative to the + main X-Plane window. The bottom left corner of the main window is (0, 0). + Pass NULL to not receive info about either parameter. - Because this function gives the mouse position relative to the main X-Plane - window (rather than in global bounds), this function should only be used by - legacy windows. Modern windows should instead get the mouse position in - global desktop coordinates using XPLMGetMouseLocationGlobal(). + Because this function gives the mouse position relative to the main X-Plane + window (rather than in global bounds), this function should only be used by + legacy windows. Modern windows should instead get the mouse position in + global desktop coordinates using XPLMGetMouseLocationGlobal(). - Note that unlike XPLMGetMouseLocationGlobal(), if the mouse goes outside - the user's main monitor (for instance, to a pop out window or a secondary - monitor), this function will not reflect it. + Note that unlike XPLMGetMouseLocationGlobal(), if the mouse goes outside + the user's main monitor (for instance, to a pop out window or a secondary + monitor), this function will not reflect it. } PROCEDURE XPLMGetMouseLocation( - outX : PInteger; { Can be nil } - outY : PInteger); { Can be nil } - cdecl; external XPLM_DLL; + outX : Pinteger; { Can be nil } + outY : Pinteger); { Can be nil } +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} {$IFDEF XPLM300} { XPLMGetMouseLocationGlobal - Returns the current mouse location in global desktop boxels. Unlike - XPLMGetMouseLocation(), the bottom left of the main X-Plane window is not - guaranteed to be (0, 0)---instead, the origin is the lower left of the - entire global desktop space. In addition, this routine gives the real mouse - location when the mouse goes to X-Plane windows other than the primary - display. Thus, it can be used with both pop-out windows and secondary - monitors. + Returns the current mouse location in global desktop boxels. Unlike + XPLMGetMouseLocation(), the bottom left of the main X-Plane window is not + guaranteed to be (0, 0)---instead, the origin is the lower left of the + entire global desktop space. In addition, this routine gives the real mouse + location when the mouse goes to X-Plane windows other than the primary + display. Thus, it can be used with both pop-out windows and secondary + monitors. - This is the mouse location function to use with modern windows (i.e., those - created by XPLMCreateWindowEx()). + This is the mouse location function to use with modern windows (i.e., those + created by XPLMCreateWindowEx()). - Pass NULL to not receive info about either parameter. + Pass NULL to not receive info about either parameter. } PROCEDURE XPLMGetMouseLocationGlobal( - outX : PInteger; { Can be nil } - outY : PInteger); { Can be nil } - cdecl; external XPLM_DLL; -{$ENDIF XPLM300} + outX : Pinteger; { Can be nil } + outY : Pinteger); { Can be nil } +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} +{$ENDIF} { XPLMGetWindowGeometry - This routine returns the position and size of a window. The units and - coordinate system vary depending on the type of window you have. + This routine returns the position and size of a window. The units and + coordinate system vary depending on the type of window you have. - If this is a legacy window (one compiled against a pre-XPLM300 version of - the SDK, or an XPLM300 window that was not created using - XPLMCreateWindowEx()), the units are pixels relative to the main X-Plane - display. + If this is a legacy window (one compiled against a pre-XPLM300 version of + the SDK, or an XPLM300 window that was not created using + XPLMCreateWindowEx()), the units are pixels relative to the main X-Plane + display. - If, on the other hand, this is a new X-Plane 11-style window (compiled - against the XPLM300 SDK and created using XPLMCreateWindowEx()), the units - are global desktop boxels. + If, on the other hand, this is a new X-Plane 11-style window (compiled + against the XPLM300 SDK and created using XPLMCreateWindowEx()), the units + are global desktop boxels. - Pass NULL to not receive any paramter. + Pass NULL to not receive any paramter. } PROCEDURE XPLMGetWindowGeometry( inWindowID : XPLMWindowID; - outLeft : PInteger; { Can be nil } - outTop : PInteger; { Can be nil } - outRight : PInteger; { Can be nil } - outBottom : PInteger); { Can be nil } - cdecl; external XPLM_DLL; + outLeft : Pinteger; { Can be nil } + outTop : Pinteger; { Can be nil } + outRight : Pinteger; { Can be nil } + outBottom : Pinteger); { Can be nil } +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMSetWindowGeometry - This routine allows you to set the position and size of a window. + This routine allows you to set the position and size of a window. - The units and coordinate system match those of XPLMGetWindowGeometry(). - That is, modern windows use global desktop boxel coordinates, while legacy - windows use pixels relative to the main X-Plane display. + The units and coordinate system match those of XPLMGetWindowGeometry(). + That is, modern windows use global desktop boxel coordinates, while legacy + windows use pixels relative to the main X-Plane display. - Note that this only applies to "floating" windows (that is, windows that - are drawn within the X-Plane simulation windows, rather than being "popped - out" into their own first-class operating system windows). To set the - position of windows whose positioning mode is xplm_WindowPopOut, you'll - need to instead use XPLMSetWindowGeometryOS(). + Note that this only applies to "floating" windows (that is, windows that + are drawn within the X-Plane simulation windows, rather than being "popped + out" into their own first-class operating system windows). To set the + position of windows whose positioning mode is xplm_WindowPopOut, you'll + need to instead use XPLMSetWindowGeometryOS(). } PROCEDURE XPLMSetWindowGeometry( inWindowID : XPLMWindowID; - inLeft : Integer; - inTop : Integer; - inRight : Integer; - inBottom : Integer); - cdecl; external XPLM_DLL; + inLeft : integer; + inTop : integer; + inRight : integer; + inBottom : integer); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} {$IFDEF XPLM300} { XPLMGetWindowGeometryOS - This routine returns the position and size of a "popped out" window (i.e., - a window whose positioning mode is xplm_WindowPopOut), in operating system - pixels. Pass NULL to not receive any parameter. + This routine returns the position and size of a "popped out" window (i.e., + a window whose positioning mode is xplm_WindowPopOut), in operating system + pixels. Pass NULL to not receive any parameter. } PROCEDURE XPLMGetWindowGeometryOS( inWindowID : XPLMWindowID; - outLeft : PInteger; { Can be nil } - outTop : PInteger; { Can be nil } - outRight : PInteger; { Can be nil } - outBottom : PInteger); { Can be nil } - cdecl; external XPLM_DLL; -{$ENDIF XPLM300} + outLeft : Pinteger; { Can be nil } + outTop : Pinteger; { Can be nil } + outRight : Pinteger; { Can be nil } + outBottom : Pinteger); { Can be nil } +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} +{$ENDIF} {$IFDEF XPLM300} { XPLMSetWindowGeometryOS - This routine allows you to set the position and size, in operating system - pixel coordinates, of a popped out window (that is, a window whose - positioning mode is xplm_WindowPopOut, which exists outside the X-Plane - simulation window, in its own first-class operating system window). + This routine allows you to set the position and size, in operating system + pixel coordinates, of a popped out window (that is, a window whose + positioning mode is xplm_WindowPopOut, which exists outside the X-Plane + simulation window, in its own first-class operating system window). - Note that you are responsible for ensuring both that your window is popped - out (using XPLMWindowIsPoppedOut()) and that a monitor really exists at the - OS coordinates you provide (using XPLMGetAllMonitorBoundsOS()). + Note that you are responsible for ensuring both that your window is popped + out (using XPLMWindowIsPoppedOut()) and that a monitor really exists at the + OS coordinates you provide (using XPLMGetAllMonitorBoundsOS()). } PROCEDURE XPLMSetWindowGeometryOS( inWindowID : XPLMWindowID; - inLeft : Integer; - inTop : Integer; - inRight : Integer; - inBottom : Integer); - cdecl; external XPLM_DLL; -{$ENDIF XPLM300} + inLeft : integer; + inTop : integer; + inRight : integer; + inBottom : integer); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} +{$ENDIF} {$IFDEF XPLM301} { XPLMGetWindowGeometryVR - Returns the width and height, in boxels, of a window in VR. Note that you - are responsible for ensuring your window is in VR (using - XPLMWindowIsInVR()). + Returns the width and height, in boxels, of a window in VR. Note that you + are responsible for ensuring your window is in VR (using + XPLMWindowIsInVR()). } PROCEDURE XPLMGetWindowGeometryVR( inWindowID : XPLMWindowID; - outWidthBoxels : PInteger; { Can be nil } - outHeightBoxels : PInteger); { Can be nil } - cdecl; external XPLM_DLL; -{$ENDIF XPLM301} + outWidthBoxels : Pinteger; { Can be nil } + outHeightBoxels : Pinteger); { Can be nil } +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} +{$ENDIF} {$IFDEF XPLM301} { XPLMSetWindowGeometryVR - This routine allows you to set the size, in boxels, of a window in VR (that - is, a window whose positioning mode is xplm_WindowVR). + This routine allows you to set the size, in boxels, of a window in VR (that + is, a window whose positioning mode is xplm_WindowVR). - Note that you are responsible for ensuring your window is in VR (using - XPLMWindowIsInVR()). + Note that you are responsible for ensuring your window is in VR (using + XPLMWindowIsInVR()). } PROCEDURE XPLMSetWindowGeometryVR( inWindowID : XPLMWindowID; - widthBoxels : Integer; - heightBoxels : Integer); - cdecl; external XPLM_DLL; -{$ENDIF XPLM301} + widthBoxels : integer; + heightBoxels : integer); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} +{$ENDIF} { XPLMGetWindowIsVisible - Returns true (1) if the specified window is visible. + This routine returns whether a window is visible. } FUNCTION XPLMGetWindowIsVisible( - inWindowID : XPLMWindowID) : Integer; - cdecl; external XPLM_DLL; + inWindowID : XPLMWindowID) : integer; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMSetWindowIsVisible - This routine shows or hides a window. + This routine shows or hides a window. } PROCEDURE XPLMSetWindowIsVisible( inWindowID : XPLMWindowID; - inIsVisible : Integer); - cdecl; external XPLM_DLL; + inIsVisible : integer); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} {$IFDEF XPLM300} { XPLMWindowIsPoppedOut - True if this window has been popped out (making it a first-class window in - the operating system), which in turn is true if and only if you have set - the window's positioning mode to xplm_WindowPopOut. + True if this window has been popped out (making it a first-class window in + the operating system), which in turn is true if and only if you have set + the window's positioning mode to xplm_WindowPopOut. - Only applies to modern windows. (Windows created using the deprecated - XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of - the SDK cannot be popped out.) + Only applies to modern windows. (Windows created using the deprecated + XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of + the SDK cannot be popped out.) } FUNCTION XPLMWindowIsPoppedOut( - inWindowID : XPLMWindowID) : Integer; - cdecl; external XPLM_DLL; -{$ENDIF XPLM300} + inWindowID : XPLMWindowID) : integer; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} +{$ENDIF} {$IFDEF XPLM301} { XPLMWindowIsInVR - True if this window has been moved to the virtual reality (VR) headset, - which in turn is true if and only if you have set the window's positioning - mode to xplm_WindowVR. + True if this window has been moved to the virtual reality (VR) headset, + which in turn is true if and only if you have set the window's positioning + mode to xplm_WindowVR. - Only applies to modern windows. (Windows created using the deprecated - XPLMCreateWindow(), or windows compiled against a pre-XPLM301 version of - the SDK cannot be moved to VR.) + Only applies to modern windows. (Windows created using the deprecated + XPLMCreateWindow(), or windows compiled against a pre-XPLM301 version of + the SDK cannot be moved to VR.) } FUNCTION XPLMWindowIsInVR( - inWindowID : XPLMWindowID) : Integer; - cdecl; external XPLM_DLL; -{$ENDIF XPLM301} + inWindowID : XPLMWindowID) : integer; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} +{$ENDIF} {$IFDEF XPLM300} { XPLMSetWindowGravity - A window's "gravity" controls how the window shifts as the whole X-Plane - window resizes. A gravity of 1 means the window maintains its positioning - relative to the right or top edges, 0 the left/bottom, and 0.5 keeps it - centered. + A window's "gravity" controls how the window shifts as the whole X-Plane + window resizes. A gravity of 1 means the window maintains its positioning + relative to the right or top edges, 0 the left/bottom, and 0.5 keeps it + centered. - Default gravity is (0, 1, 0, 1), meaning your window will maintain its - position relative to the top left and will not change size as its - containing window grows. + Default gravity is (0, 1, 0, 1), meaning your window will maintain its + position relative to the top left and will not change size as its + containing window grows. - If you wanted, say, a window that sticks to the top of the screen (with a - constant height), but which grows to take the full width of the window, you - would pass (0, 1, 1, 1). Because your left and right edges would maintain - their positioning relative to their respective edges of the screen, the - whole width of your window would change with the X-Plane window. + If you wanted, say, a window that sticks to the top of the screen (with a + constant height), but which grows to take the full width of the window, you + would pass (0, 1, 1, 1). Because your left and right edges would maintain + their positioning relative to their respective edges of the screen, the + whole width of your window would change with the X-Plane window. - Only applies to modern windows. (Windows created using the deprecated - XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of - the SDK will simply get the default gravity.) + Only applies to modern windows. (Windows created using the deprecated + XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of + the SDK will simply get the default gravity.) } PROCEDURE XPLMSetWindowGravity( inWindowID : XPLMWindowID; - inLeftGravity : Single; - inTopGravity : Single; - inRightGravity : Single; - inBottomGravity : Single); - cdecl; external XPLM_DLL; -{$ENDIF XPLM300} + inLeftGravity : single; + inTopGravity : single; + inRightGravity : single; + inBottomGravity : single); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} +{$ENDIF} {$IFDEF XPLM300} { XPLMSetWindowResizingLimits - Sets the minimum and maximum size of the client rectangle of the given - window. (That is, it does not include any window styling that you might - have asked X-Plane to apply on your behalf.) All resizing operations are - constrained to these sizes. + Sets the minimum and maximum size of the client rectangle of the given + window. (That is, it does not include any window styling that you might + have asked X-Plane to apply on your behalf.) All resizing operations are + constrained to these sizes. - Only applies to modern windows. (Windows created using the deprecated - XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of - the SDK will have no minimum or maximum size.) + Only applies to modern windows. (Windows created using the deprecated + XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of + the SDK will have no minimum or maximum size.) } PROCEDURE XPLMSetWindowResizingLimits( inWindowID : XPLMWindowID; - inMinWidthBoxels : Integer; - inMinHeightBoxels : Integer; - inMaxWidthBoxels : Integer; - inMaxHeightBoxels : Integer); - cdecl; external XPLM_DLL; -{$ENDIF XPLM300} + inMinWidthBoxels : integer; + inMinHeightBoxels : integer; + inMaxWidthBoxels : integer; + inMaxHeightBoxels : integer); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} +{$ENDIF} {$IFDEF XPLM300} { XPLMWindowPositioningMode - XPLMWindowPositionMode describes how X-Plane will position your window on - the user's screen. X-Plane will maintain this positioning mode even as the - user resizes their window or adds/removes full-screen monitors. + XPLMWindowPositionMode describes how X-Plane will position your window on + the user's screen. X-Plane will maintain this positioning mode even as the + user resizes their window or adds/removes full-screen monitors. - Positioning mode can only be set for "modern" windows (that is, windows - created using XPLMCreateWindowEx() and compiled against the XPLM300 SDK). - Windows created using the deprecated XPLMCreateWindow(), or windows - compiled against a pre-XPLM300 version of the SDK will simply get the - "free" positioning mode. + Positioning mode can only be set for "modern" windows (that is, windows + created using XPLMCreateWindowEx() and compiled against the XPLM300 SDK). + Windows created using the deprecated XPLMCreateWindow(), or windows + compiled against a pre-XPLM300 version of the SDK will simply get the + "free" positioning mode. } TYPE XPLMWindowPositioningMode = ( - { The default positioning mode. Set the window geometry and its future } - { position will be determined by its window gravity, resizing limits, and } - { user interactions. } + { The default positioning mode. Set the window geometry and its future } + { position will be determined by its window gravity, resizing limits, and } + { user interactions. } xplm_WindowPositionFree = 0 - { Keep the window centered on the monitor you specify } + { Keep the window centered on the monitor you specify } ,xplm_WindowCenterOnMonitor = 1 - { Keep the window full screen on the monitor you specify } + { Keep the window full screen on the monitor you specify } ,xplm_WindowFullScreenOnMonitor = 2 - { Like gui_window_full_screen_on_monitor, but stretches over *all* monitors } - { and popout windows. This is an obscure one... unless you have a very good } - { reason to need it, you probably don't! } + { Like gui_window_full_screen_on_monitor, but stretches over *all* monitors } + { and popout windows. This is an obscure one... unless you have a very good } + { reason to need it, you probably don't! } ,xplm_WindowFullScreenOnAllMonitors = 3 - { A first-class window in the operating system, completely separate from the } - { X-Plane window(s) } + { A first-class window in the operating system, completely separate from the } + { X-Plane window(s) } ,xplm_WindowPopOut = 4 {$IFDEF XPLM301} - { A floating window visible on the VR headset } + { A floating window visible on the VR headset } ,xplm_WindowVR = 5 -{$ENDIF XPLM301} +{$ENDIF} ); PXPLMWindowPositioningMode = ^XPLMWindowPositioningMode; -{$ENDIF XPLM300} +{$ENDIF} {$IFDEF XPLM300} { XPLMSetWindowPositioningMode - Sets the policy for how X-Plane will position your window. + Sets the policy for how X-Plane will position your window. - Some positioning modes apply to a particular monitor. For those modes, you - can pass a negative monitor index to position the window on the main - X-Plane monitor (the screen with the X-Plane menu bar at the top). Or, if - you have a specific monitor you want to position your window on, you can - pass a real monitor index as received from, e.g., - XPLMGetAllMonitorBoundsOS(). + Some positioning modes apply to a particular monitor. For those modes, you + can pass a negative monitor index to position the window on the main + X-Plane monitor (the screen with the X-Plane menu bar at the top). Or, if + you have a specific monitor you want to position your window on, you can + pass a real monitor index as received from, e.g., + XPLMGetAllMonitorBoundsOS(). - Only applies to modern windows. (Windows created using the deprecated - XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of - the SDK will always use xplm_WindowPositionFree.) + Only applies to modern windows. (Windows created using the deprecated + XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of + the SDK will always use xplm_WindowPositionFree.) } PROCEDURE XPLMSetWindowPositioningMode( inWindowID : XPLMWindowID; inPositioningMode : XPLMWindowPositioningMode; - inMonitorIndex : Integer); - cdecl; external XPLM_DLL; -{$ENDIF XPLM300} + inMonitorIndex : integer); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} +{$ENDIF} {$IFDEF XPLM300} { XPLMSetWindowTitle - Sets the name for a window. This only applies to windows that opted-in to - styling as an X-Plane 11 floating window (i.e., with styling mode - xplm_WindowDecorationRoundRectangle) when they were created using - XPLMCreateWindowEx(). + Sets the name for a window. This only applies to windows that opted-in to + styling as an X-Plane 11 floating window (i.e., with styling mode + xplm_WindowDecorationRoundRectangle) when they were created using + XPLMCreateWindowEx(). } PROCEDURE XPLMSetWindowTitle( inWindowID : XPLMWindowID; - inWindowTitle : XPLMString); - cdecl; external XPLM_DLL; -{$ENDIF XPLM300} + inWindowTitle : Pchar); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} +{$ENDIF} { XPLMGetWindowRefCon - Returns a window's reference constant, the unique value you can use for - your own purposes. + This routine returns a window's reference constant, the unique value you + can use for your own purposes. } FUNCTION XPLMGetWindowRefCon( inWindowID : XPLMWindowID) : pointer; - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMSetWindowRefCon - Sets a window's reference constant. Use this to pass data to yourself in - the callbacks. + This routine sets a window's reference constant. Use this to pass data to + yourself in the callbacks. } PROCEDURE XPLMSetWindowRefCon( inWindowID : XPLMWindowID; inRefcon : pointer); - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMTakeKeyboardFocus - This routine gives a specific window keyboard focus. Keystrokes will be - sent to that window. Pass a window ID of 0 to remove keyboard focus from - any plugin-created windows and instead pass keyboard strokes directly to - X-Plane. + This routine gives a specific window keyboard focus. Keystrokes will be + sent to that window. Pass a window ID of 0 to remove keyboard focus from + any plugin-created windows and instead pass keyboard strokes directly to + X-Plane. } PROCEDURE XPLMTakeKeyboardFocus( inWindow : XPLMWindowID); - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMHasKeyboardFocus - Returns true (1) if the indicated window has keyboard focus. Pass a window - ID of 0 to see if no plugin window has focus, and all keystrokes will go - directly to X-Plane. + Returns true (1) if the indicated window has keyboard focus. Pass a window + ID of 0 to see if no plugin window has focus, and all keystrokes will go + directly to X-Plane. } FUNCTION XPLMHasKeyboardFocus( - inWindow : XPLMWindowID) : Integer; - cdecl; external XPLM_DLL; + inWindow : XPLMWindowID) : integer; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMBringWindowToFront - This routine brings the window to the front of the Z-order for its layer. - Windows are brought to the front automatically when they are created. - Beyond that, you should make sure you are front before handling mouse - clicks. - - Note that this only brings your window to the front of its layer - (XPLMWindowLayer). Thus, if you have a window in the floating window layer - (xplm_WindowLayerFloatingWindows), but there is a modal window (in layer - xplm_WindowLayerModal) above you, you would still not be the true frontmost - window after calling this. (After all, the window layers are strictly - ordered, and no window in a lower layer can ever be above any window in a - higher one.) + This routine brings the window to the front of the Z-order for its layer. + Windows are brought to the front automatically when they are created. + Beyond that, you should make sure you are front before handling mouse + clicks. + + Note that this only brings your window to the front of its layer + (XPLMWindowLayer). Thus, if you have a window in the floating window layer + (xplm_WindowLayerFloatingWindows), but there is a modal window (in layer + xplm_WindowLayerModal) above you, you would still not be the true frontmost + window after calling this. (After all, the window layers are strictly + ordered, and no window in a lower layer can ever be above any window in a + higher one.) } PROCEDURE XPLMBringWindowToFront( inWindow : XPLMWindowID); - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMIsWindowInFront - This routine returns true if the window you passed in is the frontmost - visible window in its layer (XPLMWindowLayer). + This routine returns true if the window you passed in is the frontmost + visible window in its layer (XPLMWindowLayer). - Thus, if you have a window at the front of the floating window layer - (xplm_WindowLayerFloatingWindows), this will return true even if there is a - modal window (in layer xplm_WindowLayerModal) above you. (Not to worry, - though: in such a case, X-Plane will not pass clicks or keyboard input down - to your layer until the window above stops "eating" the input.) - - Note that legacy windows are always placed in layer - xplm_WindowLayerFlightOverlay, while modern-style windows default to - xplm_WindowLayerFloatingWindows. This means it's perfectly consistent to - have two different plugin-created windows (one legacy, one modern) *both* - be in the front (of their different layers!) at the same time. + Thus, if you have a window at the front of the floating window layer + (xplm_WindowLayerFloatingWindows), this will return true even if there is a + modal window (in layer xplm_WindowLayerModal) above you. (Not to worry, + though: in such a case, X-Plane will not pass clicks or keyboard input down + to your layer until the window above stops "eating" the input.) } FUNCTION XPLMIsWindowInFront( - inWindow : XPLMWindowID) : Integer; - cdecl; external XPLM_DLL; + inWindow : XPLMWindowID) : integer; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} {___________________________________________________________________________ * KEY SNIFFERS ___________________________________________________________________________} { - Low-level keyboard handlers. Allows for intercepting keystrokes outside the - normal rules of the user interface. + Low-level keyboard handlers. Allows for intercepting keystrokes outside the + normal rules of the user interface. } { XPLMKeySniffer_f - This is the prototype for a low level key-sniffing function. Window-based - UI _should not use this_! The windowing system provides high-level - mediated keyboard access, via the callbacks you attach to your - XPLMCreateWindow_t. By comparison, the key sniffer provides low level - keyboard access. + This is the prototype for a low level key-sniffing function. Window-based + UI _should not use this_! The windowing system provides high-level + mediated keyboard access, via the callbacks you attach to your + XPLMCreateWindow_t. By comparison, the key sniffer provides low level + keyboard access. - Key sniffers are provided to allow libraries to provide non-windowed user - interaction. For example, the MUI library uses a key sniffer to do pop-up - text entry. + Key sniffers are provided to allow libraries to provide non-windowed user + interaction. For example, the MUI library uses a key sniffer to do pop-up + text entry. - Return 1 to pass the key on to the next sniffer, the window manager, - X-Plane, or whomever is down stream. Return 0 to consume the key. + Return 1 to pass the key on to the next sniffer, the window manager, + X-Plane, or whomever is down stream. Return 0 to consume the key. - Warning: this API declares virtual keys as a signed character; however the - VKEY #define macros in XPLMDefs.h define the vkeys using unsigned values - (that is 0x80 instead of -0x80). So you may need to cast the incoming vkey - to an unsigned char to get correct comparisons in C. + Warning: this API declares virtual keys as a signed character; however the + VKEY #define macros in XPLMDefs.h define the vkeys using unsigned values + (that is 0x80 instead of -0x80). So you may need to cast the incoming vkey + to an unsigned char to get correct comparisons in C. } TYPE XPLMKeySniffer_f = FUNCTION( - inChar : XPLMChar; + inChar : char; inFlags : XPLMKeyFlags; - inVirtualKey : XPLMChar; - inRefcon : pointer) : Integer; cdecl; + inVirtualKey : char; + inRefcon : pointer) : integer; cdecl; { XPLMRegisterKeySniffer - This routine registers a key sniffing callback. You specify whether you - want to sniff before the window system, or only sniff keys the window - system does not consume. You should ALMOST ALWAYS sniff non-control keys - after the window system. When the window system consumes a key, it is - because the user has "focused" a window. Consuming the key or taking - action based on the key will produce very weird results. Returns - 1 if successful. + This routine registers a key sniffing callback. You specify whether you + want to sniff before the window system, or only sniff keys the window + system does not consume. You should ALMOST ALWAYS sniff non-control keys + after the window system. When the window system consumes a key, it is + because the user has "focused" a window. Consuming the key or taking + action based on the key will produce very weird results. Returns 1 if + successful. } FUNCTION XPLMRegisterKeySniffer( inCallback : XPLMKeySniffer_f; - inBeforeWindows : Integer; - inRefcon : pointer) : Integer; - cdecl; external XPLM_DLL; + inBeforeWindows : integer; + inRefcon : pointer) : integer; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMUnregisterKeySniffer - This routine unregisters a key sniffer. You must unregister a key sniffer - for every time you register one with the exact same signature. Returns 1 - if successful. + This routine unregisters a key sniffer. You must unregister a key sniffer + for every time you register one with the exact same signature. Returns 1 + if successful. } FUNCTION XPLMUnregisterKeySniffer( inCallback : XPLMKeySniffer_f; - inBeforeWindows : Integer; - inRefcon : pointer) : Integer; - cdecl; external XPLM_DLL; + inBeforeWindows : integer; + inRefcon : pointer) : integer; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} {___________________________________________________________________________ * HOT KEYS ___________________________________________________________________________} { - Keystrokes that can be managed by others. These are lower-level than window - keyboard handlers (i.e., callbacks you attach to your XPLMCreateWindow_t), - but higher level than key sniffers. + Keystrokes that can be managed by others. These are lower-level than window + keyboard handlers (i.e., callbacks you attach to your XPLMCreateWindow_t), + but higher level than key sniffers. } { XPLMHotKey_f - Your hot key callback simply takes a pointer of your choosing. + Your hot key callback simply takes a pointer of your choosing. } TYPE XPLMHotKey_f = PROCEDURE( @@ -1372,7 +1468,7 @@ { XPLMHotKeyID - An opaque ID used to identify a hot key. + An opaque IDs used to identify a hot key. } XPLMHotKeyID = pointer; PXPLMHotKeyID = ^XPLMHotKeyID; @@ -1380,73 +1476,96 @@ { XPLMRegisterHotKey - This routine registers a hot key. You specify your preferred key stroke - virtual key/flag combination, a description of what your callback does (so - other plug-ins can describe the plug-in to the user for remapping) and a - callback function and opaque pointer to pass in). A new hot key ID is - returned. During execution, the actual key associated with your hot key - may change, but you are insulated from this. + This routine registers a hot key. You specify your preferred key stroke + virtual key/flag combination, a description of what your callback does (so + other plug-ins can describe the plug-in to the user for remapping) and a + callback function and opaque pointer to pass in). A new hot key ID is + returned. During execution, the actual key associated with your hot key + may change, but you are insulated from this. } FUNCTION XPLMRegisterHotKey( - inVirtualKey : XPLMChar; + inVirtualKey : char; inFlags : XPLMKeyFlags; - inDescription : XPLMString; + inDescription : Pchar; inCallback : XPLMHotKey_f; inRefcon : pointer) : XPLMHotKeyID; - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMUnregisterHotKey - Unregisters a hot key. You can only unregister your own hot keys. + This API unregisters a hot key. You can only unregister your own hot keys. } PROCEDURE XPLMUnregisterHotKey( inHotKey : XPLMHotKeyID); - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMCountHotKeys - Returns the number of current hot keys. + Returns the number of current hot keys. } - FUNCTION XPLMCountHotKeys: Integer; - cdecl; external XPLM_DLL; + FUNCTION XPLMCountHotKeys: integer; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMGetNthHotKey - Returns a hot key by index, for iteration on all hot keys. + Returns a hot key by index, for iteration on all hot keys. } FUNCTION XPLMGetNthHotKey( - inIndex : Integer) : XPLMHotKeyID; - cdecl; external XPLM_DLL; + inIndex : integer) : XPLMHotKeyID; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMGetHotKeyInfo - Returns information about the hot key. Return NULL for any parameter you - don't want info about. The description should be at least 512 chars long. + Returns information about the hot key. Return NULL for any parameter you + don't want info about. The description should be at least 512 chars long. } PROCEDURE XPLMGetHotKeyInfo( inHotKey : XPLMHotKeyID; - outVirtualKey : XPLMString; { Can be nil } + outVirtualKey : Pchar; { Can be nil } outFlags : PXPLMKeyFlags; { Can be nil } - outDescription : XPLMString; { Can be nil } + outDescription : Pchar; { Can be nil } outPlugin : PXPLMPluginID); { Can be nil } - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMSetHotKeyCombination - Remaps a hot key's keystrokes. You may remap another plugin's keystrokes. + XPLMSetHotKeyCombination remaps a hot keys keystrokes. You may remap + another plugin's keystrokes. } PROCEDURE XPLMSetHotKeyCombination( inHotKey : XPLMHotKeyID; - inVirtualKey : XPLMChar; + inVirtualKey : char; inFlags : XPLMKeyFlags); - cdecl; external XPLM_DLL; - +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} IMPLEMENTATION - END. diff --git a/src/SDK/Delphi/XPLM/XPLMGraphics.pas b/src/SDK/Delphi/XPLM/XPLMGraphics.pas index 20ff61a9..7c712f28 100755 --- a/src/SDK/Delphi/XPLM/XPLMGraphics.pas +++ b/src/SDK/Delphi/XPLM/XPLMGraphics.pas @@ -1,76 +1,74 @@ { - 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 XPLMGraphics; INTERFACE { - A few notes on coordinate systems: + Graphics routines for X-Plane and OpenGL. - X-Plane uses three kinds of coordinates. Global coordinates are specified - as latitude, longitude and elevation. This coordinate system never changes - but is not very precise. + A few notes on coordinate systems: - OpenGL (or 'local') coordinates are cartesian and shift with the plane. - They offer more precision and are used for 3-d OpenGL drawing. The X axis - is aligned east-west with positive X meaning east. The Y axis is aligned - straight up and down at the point 0,0,0 (but since the earth is round it is - not truly straight up and down at other points). The Z axis is aligned - north-south at 0, 0, 0 with positive Z pointing south (but since the earth - is round it isn't exactly north-south as you move east or west of 0, 0, 0). - One unit is one meter and the point 0,0,0 is on the surface of the earth at - sea level for some latitude and longitude picked by the sim such that the - user's aircraft is reasonably nearby. + X-Plane uses three kinds of coordinates. Global coordinates are specified + as latitude, longitude and elevation. This coordinate system never changes + but is not very precise. - 2-d Panel coordinates are 2d, with the X axis horizontal and the Y axis - vertical. The point 0,0 is the bottom left and 1024,768 is the upper - right of the screen. This is true no matter what resolution the user's - monitor is in; when running in higher resolution, graphics will be - scaled. + OpenGL (or 'local') coordinates are cartesian and shift with the plane. + They offer more precision and are used for 3-d OpenGL drawing. The X axis + is aligned east-west with positive X meaning east. The Y axis is aligned + straight up and down at the point 0,0,0 (but since the earth is round it is + not truly straight up and down at other points). The Z axis is aligned + north-south at 0, 0, 0 with positive Z pointing south (but since the earth + is round it isn't exactly north-south as you move east or west of 0, 0, 0). + One unit is one meter and the point 0,0,0 is on the surface of the earth + at sea level for some latitude and longitude picked by the sim such that + the user's aircraft is reasonably nearby. - Use X-Plane's routines to convert between global and local coordinates. Do - not attempt to do this conversion yourself; the precise 'roundness' of - X-Plane's physics model may not match your own, and (to make things - weirder) the user can potentially customize the physics of the current - planet. + Cockpit coordinates are 2d, with the X axis horizontal and the Y axis + vertical. The point 0,0 is the bottom left and 1024,768 is the upper right + of the screen. This is true no matter what resolution the user's monitor is + in; when running in higher resolution, graphics will be scaled. + + Use X-Plane's routines to convert between global and local coordinates. Do + not attempt to do this conversion yourself; the precise 'roundness' of + X-Plane's physics model may not match your own, and (to make things + weirder) the user can potentially customize the physics of the current + planet. } -USES - XPLMDefs; +USES XPLMDefs; {$A4} +{$IFDEF MSWINDOWS} + {$DEFINE DELPHI} +{$ENDIF} {___________________________________________________________________________ * X-PLANE GRAPHICS ___________________________________________________________________________} { - These routines allow you to use OpenGL with X-Plane. + These routines allow you to use OpenGL with X-Plane. } { XPLMTextureID - XPLM Texture IDs name well-known textures in the sim for you to use. This - allows you to recycle textures from X-Plane, saving VRAM. - - *Warning*: do not use these enums. The only remaining use they have is to - access the legacy compatibility v10 UI texture; if you need this, get it - via the Widgets library. + XPLM Texture IDs name well-known textures in the sim for you to use. This + allows you to recycle textures from X-Plane, saving VRAM. } TYPE XPLMTextureID = ( - { The bitmap that contains window outlines, button outlines, fonts, etc. } + { The bitmap that contains window outlines, button outlines, fonts, etc. } xplm_Tex_GeneralInterface = 0 -{$IFDEF XPLM_DEPRECATED} - { The exterior paint for the user's aircraft (daytime). } + { The exterior paint for the user's aircraft (daytime). } ,xplm_Tex_AircraftPaint = 1 -{$ENDIF XPLM_DEPRECATED} -{$IFDEF XPLM_DEPRECATED} - { The exterior light map for the user's aircraft. } + { The exterior light map for the user's aircraft. } ,xplm_Tex_AircraftLiteMap = 2 -{$ENDIF XPLM_DEPRECATED} ); PXPLMTextureID = ^XPLMTextureID; @@ -78,270 +76,272 @@ { XPLMSetGraphicsState - XPLMSetGraphicsState changes OpenGL's fixed function pipeline state. You - are not responsible for restoring any state that is accessed via - XPLMSetGraphicsState, but you are responsible for not accessing this state - directly. + XPLMSetGraphicsState changes OpenGL's graphics state in a number of ways: + + inEnableFog - enables or disables fog, equivalent to: glEnable(GL_FOG); + + inNumberTexUnits - enables or disables a number of multitexturing units. If + the number is 0, 2d texturing is disabled entirely, as in + glDisable(GL_TEXTURE_2D); Otherwise, 2d texturing is enabled, and a + number of multitexturing units are enabled sequentially, starting with + unit 0, e.g. glActiveTextureARB(GL_TEXTURE0_ARB); glEnable + (GL_TEXTURE_2D); + + inEnableLighting - enables or disables OpenGL lighting, e.g. + glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); - - inEnableFog - enables or disables fog, equivalent to: glEnable(GL_FOG); - - inNumberTexUnits - enables or disables a number of multitexturing units. - If the number is 0, 2d texturing is disabled entirely, as in - glDisable(GL_TEXTURE_2D); Otherwise, 2d texturing is enabled, and a - number of multitexturing units are enabled sequentially, starting with - unit 0, e.g. glActiveTextureARB(GL_TEXTURE0_ARB); glEnable - (GL_TEXTURE_2D); - - inEnableLighting - enables or disables OpenGL lighting, e.g. - glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); - - inEnableAlphaTesting - enables or disables the alpha test per pixel, e.g. - glEnable(GL_ALPHA_TEST); - - inEnableAlphaBlending - enables or disables alpha blending per pixel, - e.g. glEnable(GL_BLEND); - - inEnableDepthTesting - enables per pixel depth testing, as in - glEnable(GL_DEPTH_TEST); - - inEnableDepthWriting - enables writing back of depth information to the - depth bufffer, as in glDepthMask(GL_TRUE); + inEnableAlphaTesting - enables or disables the alpha test per pixel, e.g. + glEnable(GL_ALPHA_TEST); - The purpose of this function is to change OpenGL state while keeping - X-Plane aware of the state changes; this keeps X-Plane from getting - surprised by OGL state changes, and prevents X-Plane and plug-ins from - having to set all state before all draws; XPLMSetGraphicsState internally - skips calls to change state that is already properly enabled. + inEnableAlphaBlending - enables or disables alpha blending per pixel, e.g. + glEnable(GL_BLEND); - X-Plane does not have a 'default' OGL state for plug-ins with respect to - the above state vector; plug-ins should totally set OGL state using this - API before drawing. Use XPLMSetGraphicsState instead of any of the above - OpenGL calls. + inEnableDepthTesting - enables per pixel depth testing, as in + glEnable(GL_DEPTH_TEST); - WARNING: Any routine that performs drawing (e.g. XPLMDrawString or widget - code) may change X-Plane's state. Always set state before drawing after - unknown code has executed. + inEnableDepthWriting - enables writing back of depth information to the + depth bufffer, as in glDepthMask(GL_TRUE); - *Deprecation Warnings*: X-Plane's lighting and fog environemnt is - significantly more complex than the fixed function pipeline can express; - do not assume that lighting and fog state is a good approximation for 3-d - drawing. Prefer to use XPLMInstancing to draw objects. All calls to - XPLMSetGraphicsState should have no fog or lighting. + The purpose of this function is to change OpenGL state while keeping + X-Plane aware of the state changes; this keeps X-Plane from getting + surprised by OGL state changes, and prevents X-Plane and plug-ins from + having to set all state before all draws; XPLMSetGraphicsState internally + skips calls to change state that is already properly enabled. + + X-Plane does not have a 'default' OGL state to plug-ins; plug-ins should + totally set OGL state before drawing. Use XPLMSetGraphicsState instead of + any of the above OpenGL calls. + + WARNING: Any routine that performs drawing (e.g. XPLMDrawString or widget + code) may change X-Plane's state. Always set state before drawing after + unknown code has executed. } PROCEDURE XPLMSetGraphicsState( - inEnableFog : Integer; - inNumberTexUnits : Integer; - inEnableLighting : Integer; - inEnableAlphaTesting: Integer; - inEnableAlphaBlending: Integer; - inEnableDepthTesting: Integer; - inEnableDepthWriting: Integer); - cdecl; external XPLM_DLL; + inEnableFog : integer; + inNumberTexUnits : integer; + inEnableLighting : integer; + inEnableAlphaTesting: integer; + inEnableAlphaBlending: integer; + inEnableDepthTesting: integer; + inEnableDepthWriting: integer); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMBindTexture2d - XPLMBindTexture2d changes what texture is bound to the 2d texturing - target. This routine caches the current 2d texture across all texturing - units in the sim and plug-ins, preventing extraneous binding. For - example, consider several plug-ins running in series; if they all use the - 'general interface' bitmap to do UI, calling this function will skip the - rebinding of the general interface texture on all but the first plug-in, - which can provide better frame rate son some graphics cards. + XPLMBindTexture2d changes what texture is bound to the 2d texturing target. + This routine caches the current 2d texture across all texturing units in + the sim and plug-ins, preventing extraneous binding. For example, consider + several plug-ins running in series; if they all use the 'general interface' + bitmap to do UI, calling this function will skip the rebinding of the + general interface texture on all but the first plug-in, which can provide + better frame rate son some graphics cards. - inTextureID is the ID of the texture object to bind; inTextureUnit is a - zero-based texture unit (e.g. 0 for the first one), up to a maximum of 4 - units. (This number may increase in future versions of X-Plane.) + inTextureID is the ID of the texture object to bind; inTextureUnit is a + zero-based texture unit (e.g. 0 for the first one), up to a maximum of 4 + units. (This number may increase in future versions of X-Plane.) - Use this routine instead of glBindTexture(GL_TEXTURE_2D, ....); + Use this routine instead of glBindTexture(GL_TEXTURE_2D, ....); } PROCEDURE XPLMBindTexture2d( - inTextureNum : Integer; - inTextureUnit : Integer); - cdecl; external XPLM_DLL; + inTextureNum : integer; + inTextureUnit : integer); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMGenerateTextureNumbers - Use this routine instead of glGenTextures to generate new texture object - IDs. This routine historically ensured that plugins don't use texure IDs - that X-Plane is reserving for its own use. + This routine generates unused texture numbers that a plug-in can use to + safely bind textures. Use this routine instead of glGenTextures; + glGenTextures will allocate texture numbers in ranges that X-Plane reserves + for its own use but does not always use; for example, it might provide an + ID within the range of textures reserved for terrain...loading a new .env + file as the plane flies might then cause X-Plane to use this texture ID. + X-Plane will then overwrite the plug-ins texture. This routine returns + texture IDs that are out of X-Plane's usage range. } PROCEDURE XPLMGenerateTextureNumbers( - outTextureIDs : PInteger; - inCount : Integer); - cdecl; external XPLM_DLL; + outTextureIDs : Pinteger; + inCount : integer); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} -{$IFDEF XPLM_DEPRECATED} { XPLMGetTexture - XPLMGetTexture returns the OpenGL texture ID of an X-Plane texture based on - a generic identifying code. For example, you can get the texture for - X-Plane's UI bitmaps. + XPLMGetTexture returns the OpenGL texture enumeration of an X-Plane texture + based on a generic identifying code. For example, you can get the texture + for X-Plane's UI bitmaps. This allows you to build new gauges that take + advantage of X-Plane's textures, for smooth artwork integration and also + saving texture memory. Note that the texture might not be loaded yet, + depending on what the plane's panel contains. + + OPEN ISSUE: We really need a way to make sure X-Plane loads this texture if + it isn't around, or at least a way to find out whether it is loaded or not. } FUNCTION XPLMGetTexture( - inTexture : XPLMTextureID) : Integer; - cdecl; external XPLM_DLL; -{$ENDIF XPLM_DEPRECATED} + inTexture : XPLMTextureID) : integer; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMWorldToLocal - This routine translates coordinates from latitude, longitude, and altitude - to local scene coordinates. Latitude and longitude are in decimal degrees, - and altitude is in meters MSL (mean sea level). The XYZ coordinates are in - meters in the local OpenGL coordinate system. + This routine translates coordinates from latitude, longitude, and altitude + to local scene coordinates. Latitude and longitude are in decimal degrees, + and altitude is in meters MSL (mean sea level). The XYZ coordinates are in + meters in the local OpenGL coordinate system. } PROCEDURE XPLMWorldToLocal( - inLatitude : Real; - inLongitude : Real; - inAltitude : Real; - outX : PReal; - outY : PReal; - outZ : PReal); - cdecl; external XPLM_DLL; + inLatitude : real; + inLongitude : real; + inAltitude : real; + outX : Preal; + outY : Preal; + outZ : Preal); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMLocalToWorld - This routine translates a local coordinate triplet back into latitude, - longitude, and altitude. Latitude and longitude are in decimal degrees, - and altitude is in meters MSL (mean sea level). The XYZ coordinates are in - meters in the local OpenGL coordinate system. + This routine translates a local coordinate triplet back into latitude, + longitude, and altitude. Latitude and longitude are in decimal degrees, + and altitude is in meters MSL (mean sea level). The XYZ coordinates are in + meters in the local OpenGL coordinate system. - NOTE: world coordinates are less precise than local coordinates; you should - try to avoid round tripping from local to world and back. + NOTE: world coordinates are less precise than local coordinates; you should + try to avoid round tripping from local to world and back. } PROCEDURE XPLMLocalToWorld( - inX : Real; - inY : Real; - inZ : Real; - outLatitude : PReal; - outLongitude : PReal; - outAltitude : PReal); - cdecl; external XPLM_DLL; + inX : real; + inY : real; + inZ : real; + outLatitude : Preal; + outLongitude : Preal; + outAltitude : Preal); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMDrawTranslucentDarkBox - This routine draws a translucent dark box, partially obscuring parts of the - screen but making text easy to read. This is the same graphics primitive - used by X-Plane to show text files and ATC info. + This routine draws a translucent dark box, partially obscuring parts of the + screen but making text easy to read. This is the same graphics primitive + used by X-Plane to show text files and ATC info. } PROCEDURE XPLMDrawTranslucentDarkBox( - inLeft : Integer; - inTop : Integer; - inRight : Integer; - inBottom : Integer); - cdecl; external XPLM_DLL; + inLeft : integer; + inTop : integer; + inRight : integer; + inBottom : integer); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} {___________________________________________________________________________ * X-PLANE TEXT ___________________________________________________________________________} +{ + +} { XPLMFontID - X-Plane features some fixed-character fonts. Each font may have its own - metrics. + X-Plane features some fixed-character fonts. Each font may have its own + metrics. - WARNING: Some of these fonts are no longer supported or may have changed - geometries. For maximum copmatibility, see the comments below. + WARNING: Some of these fonts are no longer supported or may have changed + geometries. For maximum copmatibility, see the comments below. - Note: X-Plane 7 supports proportional-spaced fonts. Since no measuring - routine is available yet, the SDK will normally draw using a fixed-width - font. You can use a dataref to enable proportional font drawing on XP7 if - you want to. + Note: X-Plane 7 supports proportional-spaced fonts. Since no measuring + routine is available yet, the SDK will normally draw using a fixed-width + font. You can use a dataref to enable proportional font drawing on XP7 if + you want to. } TYPE XPLMFontID = ( - { Mono-spaced font for user interface. Available in all versions of the SDK.} + { Mono-spaced font for user interface. Available in all versions of the SDK. } xplmFont_Basic = 0 -{$IFDEF XPLM_DEPRECATED} - { Deprecated, do not use. } + { Deprecated, do not use. } ,xplmFont_Menus = 1 -{$ENDIF XPLM_DEPRECATED} -{$IFDEF XPLM_DEPRECATED} - { Deprecated, do not use. } + { Deprecated, do not use. } ,xplmFont_Metal = 2 -{$ENDIF XPLM_DEPRECATED} -{$IFDEF XPLM_DEPRECATED} - { Deprecated, do not use. } + { Deprecated, do not use. } ,xplmFont_Led = 3 -{$ENDIF XPLM_DEPRECATED} -{$IFDEF XPLM_DEPRECATED} - { Deprecated, do not use. } + { Deprecated, do not use. } ,xplmFont_LedWide = 4 -{$ENDIF XPLM_DEPRECATED} -{$IFDEF XPLM_DEPRECATED} - { Deprecated, do not use. } + { Deprecated, do not use. } ,xplmFont_PanelHUD = 5 -{$ENDIF XPLM_DEPRECATED} -{$IFDEF XPLM_DEPRECATED} - { Deprecated, do not use. } + { Deprecated, do not use. } ,xplmFont_PanelEFIS = 6 -{$ENDIF XPLM_DEPRECATED} -{$IFDEF XPLM_DEPRECATED} - { Deprecated, do not use. } + { Deprecated, do not use. } ,xplmFont_PanelGPS = 7 -{$ENDIF XPLM_DEPRECATED} -{$IFDEF XPLM_DEPRECATED} - { Deprecated, do not use. } + { Deprecated, do not use. } ,xplmFont_RadiosGA = 8 -{$ENDIF XPLM_DEPRECATED} -{$IFDEF XPLM_DEPRECATED} - { Deprecated, do not use. } + { Deprecated, do not use. } ,xplmFont_RadiosBC = 9 -{$ENDIF XPLM_DEPRECATED} -{$IFDEF XPLM_DEPRECATED} - { Deprecated, do not use. } + { Deprecated, do not use. } ,xplmFont_RadiosHM = 10 -{$ENDIF XPLM_DEPRECATED} -{$IFDEF XPLM_DEPRECATED} - { Deprecated, do not use. } + { Deprecated, do not use. } ,xplmFont_RadiosGANarrow = 11 -{$ENDIF XPLM_DEPRECATED} -{$IFDEF XPLM_DEPRECATED} - { Deprecated, do not use. } + { Deprecated, do not use. } ,xplmFont_RadiosBCNarrow = 12 -{$ENDIF XPLM_DEPRECATED} -{$IFDEF XPLM_DEPRECATED} - { Deprecated, do not use. } + { Deprecated, do not use. } ,xplmFont_RadiosHMNarrow = 13 -{$ENDIF XPLM_DEPRECATED} -{$IFDEF XPLM_DEPRECATED} - { Deprecated, do not use. } + { Deprecated, do not use. } ,xplmFont_Timer = 14 -{$ENDIF XPLM_DEPRECATED} -{$IFDEF XPLM_DEPRECATED} - { Deprecated, do not use. } + { Deprecated, do not use. } ,xplmFont_FullRound = 15 -{$ENDIF XPLM_DEPRECATED} -{$IFDEF XPLM_DEPRECATED} - { Deprecated, do not use. } + { Deprecated, do not use. } ,xplmFont_SmallRound = 16 -{$ENDIF XPLM_DEPRECATED} -{$IFDEF XPLM_DEPRECATED} - { Deprecated, do not use. } + { Deprecated, do not use. } ,xplmFont_Menus_Localized = 17 -{$ENDIF XPLM_DEPRECATED} {$IFDEF XPLM200} - { Proportional UI font. } + { Proportional UI font. } ,xplmFont_Proportional = 18 -{$ENDIF XPLM200} +{$ENDIF} ); PXPLMFontID = ^XPLMFontID; @@ -349,76 +349,90 @@ { XPLMDrawString - This routine draws a NULL termianted string in a given font. Pass in the - lower left pixel that the character is to be drawn onto. Also pass the - character and font ID. This function returns the x offset plus the width of - all drawn characters. The color to draw in is specified as a pointer to an - array of three floating point colors, representing RGB intensities from 0.0 - to 1.0. + This routine draws a NULL termianted string in a given font. Pass in the + lower left pixel that the character is to be drawn onto. Also pass the + character and font ID. This function returns the x offset plus the width of + all drawn characters. The color to draw in is specified as a pointer to an + array of three floating point colors, representing RGB intensities from 0.0 + to 1.0. } PROCEDURE XPLMDrawString( - inColorRGB : PSingle; - inXOffset : Integer; - inYOffset : Integer; - inChar : XPLMString; - inWordWrapWidth : PInteger; { Can be nil } + inColorRGB : Psingle; + inXOffset : integer; + inYOffset : integer; + inChar : Pchar; + inWordWrapWidth : Pinteger; { Can be nil } inFontID : XPLMFontID); - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMDrawNumber - This routine draws a number similar to the digit editing fields in - PlaneMaker and data output display in X-Plane. Pass in a color, a - position, a floating point value, and formatting info. Specify how many - integer and how many decimal digits to show and whether to show a sign, as - well as a character set. This routine returns the xOffset plus width of the - string drawn. + This routine draws a number similar to the digit editing fields in + PlaneMaker and data output display in X-Plane. Pass in a color, a + position, a floating point value, and formatting info. Specify how many + integer and how many decimal digits to show and whether to show a sign, as + well as a character set. This routine returns the xOffset plus width of the + string drawn. } PROCEDURE XPLMDrawNumber( - inColorRGB : PSingle; - inXOffset : Integer; - inYOffset : Integer; - inValue : Real; - inDigits : Integer; - inDecimals : Integer; - inShowSign : Integer; + inColorRGB : Psingle; + inXOffset : integer; + inYOffset : integer; + inValue : real; + inDigits : integer; + inDecimals : integer; + inShowSign : integer; inFontID : XPLMFontID); - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMGetFontDimensions - This routine returns the width and height of a character in a given font. - It also tells you if the font only supports numeric digits. Pass NULL if - you don't need a given field. Note that for a proportional font the width - will be an arbitrary, hopefully average width. + This routine returns the width and height of a character in a given font. + It also tells you if the font only supports numeric digits. Pass NULL if + you don't need a given field. Note that for a proportional font the width + will be an arbitrary, hopefully average width. } PROCEDURE XPLMGetFontDimensions( inFontID : XPLMFontID; - outCharWidth : PInteger; { Can be nil } - outCharHeight : PInteger; { Can be nil } - outDigitsOnly : PInteger); { Can be nil } - cdecl; external XPLM_DLL; + outCharWidth : Pinteger; { Can be nil } + outCharHeight : Pinteger; { Can be nil } + outDigitsOnly : Pinteger); { Can be nil } +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} {$IFDEF XPLM200} { XPLMMeasureString - This routine returns the width in pixels of a string using a given font. - The string is passed as a pointer plus length (and does not need to be null - terminated); this is used to allow for measuring substrings. The return - value is floating point; it is possible that future font drawing may allow - for fractional pixels. + This routine returns the width in pixels of a string using a given font. + The string is passed as a pointer plus length (and does not need to be null + terminated); this is used to allow for measuring substrings. The return + value is floating point; it is possible that future font drawing may allow + for fractional pixels. } FUNCTION XPLMMeasureString( inFontID : XPLMFontID; - inChar : XPLMString; - inNumChars : Integer) : Single; - cdecl; external XPLM_DLL; -{$ENDIF XPLM200} - + inChar : Pchar; + inNumChars : integer) : single; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} +{$ENDIF} IMPLEMENTATION - END. diff --git a/src/SDK/Delphi/XPLM/XPLMInstance.pas b/src/SDK/Delphi/XPLM/XPLMInstance.pas index a38d2bb8..9daac4d7 100644 --- a/src/SDK/Delphi/XPLM/XPLMInstance.pas +++ b/src/SDK/Delphi/XPLM/XPLMInstance.pas @@ -1,46 +1,52 @@ { - 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 XPLMInstance; INTERFACE { - This API provides instanced drawing of X-Plane objects (.obj files). In - contrast to old drawing APIs, which required you to draw your own objects - per-frame, the instancing API allows you to simply register an OBJ for - drawing, then move or manipulate it later (as needed). + This API provides instanced drawing of X-Plane objects (.obj files). In + contrast to old drawing APIs, which required you to draw your own objects + per-frame, the instancing API allows you to simply register an OBJ for + drawing, then move or manipulate it later (as needed). - This provides one tremendous benefit: it keeps all dataref operations for - your object in one place. Because datarefs are main thread only, allowing - dataref access anywhere is a serious performance bottleneck for the - simulator---the whole simulator has to pause and wait for each dataref - access. This performance penalty will only grow worse as X-Plane moves - toward an ever more heavily multithreaded engine. + This provides one tremendous benefit: it keeps all dataref operations for + your object in one place. Because datarefs are main thread only, allowing + dataref access anywhere is a serious performance bottleneck for the + simulator---the whole simulator has to pause and wait for each dataref + access. This performance penalty will only grow worse as X-Plane moves + toward an ever more heavily multithreaded engine. - The instancing API allows X-Plane to isolate all dataref manipulations for - all plugin object drawing to one place, potentially providing huge - performance gains. + The instancing API allows X-Plane to isolate all dataref manipulations for + all plugin object drawing to one place, potentially providing huge + performance gains. - Here's how it works: + Here's how it works: - When an instance is created, it provides a list of all datarefs you want to - manipulate in for the OBJ in the future. This list of datarefs replaces the - ad-hoc collections of dataref objects previously used by art assets. Then, - per-frame, you can manipulate the instance by passing in a "block" of - packed floats representing the current values of the datarefs for your - instance. (Note that the ordering of this set of packed floats must exactly - match the ordering of the datarefs when you created your instance.) + When an instance is created, it provides a list of all datarefs you want to + manipulate in for the OBJ in the future. This list of datarefs replaces the + ad-hoc collections of dataref objects previously used by art assets. Then, + per-frame, you can manipulate the instance by passing in a "block" of + packed floats representing the current values of the datarefs for your + instance. (Note that the ordering of this set of packed floats must exactly + match the ordering of the datarefs when you created your instance.) } -USES - XPLMDefs, XPLMScenery; +USES XPLMDefs; +USES XPLMScenery; {$A4} +{$IFDEF MSWINDOWS} + {$DEFINE DELPHI} +{$ENDIF} {___________________________________________________________________________ * Instance Creation and Destruction ___________________________________________________________________________} { - Registers and unregisters instances. + Registers and unregisters instances. } @@ -48,7 +54,7 @@ { XPLMInstanceRef - An opaque handle to an instance. + An opaque handle to an instance. } XPLMInstanceRef = pointer; PXPLMInstanceRef = ^XPLMInstanceRef; @@ -56,70 +62,52 @@ { XPLMCreateInstance - XPLMCreateInstance creates a new instance, managed by your plug-in, and - returns a handle to the instance. A few important requirements: - - * The object passed in must be fully loaded and returned from the XPLM - before you can create your instance; you cannot pass a null obj ref, nor - can you change the ref later. - - * If you use any custom datarefs in your object, they must be registered - before the object is loaded. This is true even if their data will be - provided via the instance dataref list. - - * The instance dataref array must be a valid ptr to an array of at least - one item that is null terminated. That is, if you do not want any - datarefs, you must passa ptr to an array with a null item. You cannot - pass null for this. + Registers an instance of an X-Plane object. } FUNCTION XPLMCreateInstance( obj : XPLMObjectRef; - datarefs : PXPLMString) : XPLMInstanceRef; - cdecl; external XPLM_DLL; + datarefs : PPchar) : XPLMInstanceRef; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMDestroyInstance - XPLMDestroyInstance destroys and deallocates your instance; once called, - you are still responsible for releasing the OBJ ref. - - Tip: you can release your OBJ ref after you call XPLMCreateInstance as long - as you never use it again; the instance will maintain its own reference to - the OBJ and the object OBJ be deallocated when the instance is destroyed. + Unregisters an instance. } PROCEDURE XPLMDestroyInstance( instance : XPLMInstanceRef); - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} {___________________________________________________________________________ * Instance Manipulation ___________________________________________________________________________} +{ + +} { XPLMInstanceSetPosition - Updates both the position of the instance and all datarefs you registered - for it. Call this from a flight loop callback or UI callback. - - __DO NOT__ call XPLMInstanceSetPosition from a drawing callback; the whole - point of instancing is that you do not need any drawing callbacks. Setting - instance data from a drawing callback may have undefined consequences, and - the drawing callback hurts FPS unnecessarily. - - The memory pointed to by the data pointer must be large enough to hold one - float for every data ref you have registered, and must contain valid - floating point data. - - BUG: before X-Plane 11.50, if you have no dataref registered, you must - still pass a valid pointer for data and not null. + Updates both the position of the instance and all datarefs you registered + for it. } PROCEDURE XPLMInstanceSetPosition( instance : XPLMInstanceRef; new_position : PXPLMDrawInfo_t; - data : PSingle); - cdecl; external XPLM_DLL; - + data : Psingle); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} IMPLEMENTATION - END. diff --git a/src/SDK/Delphi/XPLM/XPLMMap.pas b/src/SDK/Delphi/XPLM/XPLMMap.pas index 61c82dcf..f07a2b23 100644 --- a/src/SDK/Delphi/XPLM/XPLMMap.pas +++ b/src/SDK/Delphi/XPLM/XPLMMap.pas @@ -1,72 +1,75 @@ { - 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 XPLMMap; INTERFACE { - This API allows you to create new layers within X-Plane maps. Your layers - can draw arbitrary OpenGL, but they conveniently also have access to - X-Plane's built-in icon and label drawing functions. + This API allows you to create new layers within X-Plane maps. Your layers + can draw arbitrary OpenGL, but they conveniently also have access to + X-Plane's built-in icon and label drawing functions. - As of X-Plane 11, map drawing happens in three stages: + As of X-Plane 11, map drawing happens in three stages: - 1. backgrounds and "fill," - 2. icons, and - 3. labels. + 1. backgrounds and "fill," 2. icons, and 3. labels. - Thus, all background drawing gets layered beneath all icons, which likewise - get layered beneath all labels. Within each stage, the map obeys a - consistent layer ordering, such that "fill" layers (layers that cover a - large amount of map area, like the terrain and clouds) appear beneath - "markings" layers (like airport icons). This ensures that layers with fine - details don't get obscured by layers with larger details. + Thus, all background drawing gets layered beneath all icons, which likewise + get layered beneath all labels. Within each stage, the map obeys a + consistent layer ordering, such that "fill" layers (layers that cover a + large amount of map area, like the terrain and clouds) appear beneath + "markings" layers (like airport icons). This ensures that layers with fine + details don't get obscured by layers with larger details. - The XPLM map API reflects both aspects of this draw layering: you can - register a layer as providing either markings or fill, and X-Plane will - draw your fill layers beneath your markings layers (regardless of - registration order). Likewise, you are guaranteed that your layer's icons - (added from within an icon callback) will go above your layer's OpenGL - drawing, and your labels will go above your icons. + The XPLM map API reflects both aspects of this draw layering: you can + register a layer as providing either markings or fill, and X-Plane will + draw your fill layers beneath your markings layers (regardless of + registration order). Likewise, you are guaranteed that your layer's icons + (added from within an icon callback) will go above your layer's OpenGL + drawing, and your labels will go above your icons. - The XPLM guarantees that all plugin-created fill layers go on top of all - native X-Plane fill layers, and all plugin-created markings layers go on - top of all X-Plane markings layers (with the exception of the aircraft - icons). It also guarantees that the draw order of your own plugin's layers - will be consistent. But, for layers created by different plugins, the only - guarantee is that we will draw all of one plugin's layers of each type - (fill, then markings), then all of the others'; we don't guarantee which - plugin's fill and markings layers go on top of the other's. + The XPLM guarantees that all plugin-created fill layers go on top of all + native X-Plane fill layers, and all plugin-created markings layers go on + top of all X-Plane markings layers (with the exception of the aircraft + icons). It also guarantees that the draw order of your own plugin's layers + will be consistent. But, for layers created by different plugins, the only + guarantee is that we will draw all of one plugin's layers of each type + (fill, then markings), then all of the others'; we don't guarantee which + plugin's fill and markings layers go on top of the other's. - As of X-Plane 11, maps use true cartographic projections for their drawing, - and different maps may use different projections. For that reason, all - drawing calls include an opaque handle for the projection you should use to - do the drawing. Any time you would draw at a particular latitude/longitude, - you'll need to ask the projection to translate that position into "map - coordinates." (Note that the projection is guaranteed not to change between - calls to your prepare-cache hook, so if you cache your map coordinates - ahead of time, there's no need to re-project them when you actually draw.) + As of X-Plane 11, maps use true cartographic projections for their drawing, + and different maps may use different projections. For that reason, all + drawing calls include an opaque handle for the projection you should use to + do the drawing. Any time you would draw at a particular latitude/longitude, + you'll need to ask the projection to translate that position into "map + coordinates." (Note that the projection is guaranteed not to change between + calls to your prepare-cache hook, so if you cache your map coordinates + ahead of time, there's no need to re-project them when you actually draw.) - In addition to mapping normal latitude/longitude locations into map - coordinates, the projection APIs also let you know the current heading for - north. (Since X-Plane 11 maps can rotate to match the heading of the user's - aircraft, it's not safe to assume that north is at zero degrees rotation.) + In addition to mapping normal latitude/longitude locations into map + coordinates, the projection APIs also let you know the current heading for + north. (Since X-Plane 11 maps can rotate to match the heading of the user's + aircraft, it's not safe to assume that north is at zero degrees rotation.) } -USES - XPLMDefs; +USES XPLMDefs; {$A4} +{$IFDEF MSWINDOWS} + {$DEFINE DELPHI} +{$ENDIF} {$IFDEF XPLM300} {___________________________________________________________________________ * DRAWING CALLBACKS ___________________________________________________________________________} { - When you create a new map layer (using XPLMCreateMapLayer), you can provide - any or all of these callbacks. They allow you to insert your own OpenGL - drawing, text labels, and icons into the X-Plane map at the appropriate - places, allowing your layer to behave as similarly to X-Plane's built-in - layers as possible. + When you create a new map layer (using XPLMCreateMapLayer), you can provide + any or all of these callbacks. They allow you to insert your own OpenGL + drawing, text labels, and icons into the X-Plane map at the appropriate + places, allowing your layer to behave as similarly to X-Plane's built-in + layers as possible. } @@ -74,8 +77,8 @@ { XPLMMapLayerID - This is an opaque handle for a plugin-created map layer. Pass it to the map - drawing APIs from an appropriate callback to draw in the layer you created. + This is an opaque handle for a plugin-created map layer. Pass it to the map + drawing APIs from an appropriate callback to draw in the layer you created. } XPLMMapLayerID = pointer; PXPLMMapLayerID = ^XPLMMapLayerID; @@ -83,8 +86,8 @@ { XPLMMapProjectionID - This is an opaque handle for a map projection. Pass it to the projection - APIs to translate between map coordinates and latitude/longitudes. + This is an opaque handle for a map projection. Pass it to the projection + APIs to translate between map coordinates and latitude/longitudes. } XPLMMapProjectionID = pointer; PXPLMMapProjectionID = ^XPLMMapProjectionID; @@ -92,12 +95,12 @@ { XPLMMapStyle - Indicates the visual style being drawn by the map. In X-Plane, the user can - choose between a number of map types, and different map types may have use - a different visual representation for the same elements (for instance, the - visual style of the terrain layer changes drastically between the VFR and - IFR layers), or certain layers may be disabled entirely in some map types - (e.g., localizers are only visible in the IFR low-enroute style). + Indicates the visual style being drawn by the map. In X-Plane, the user can + choose between a number of map types, and different map types may have use + a different visual representation for the same elements (for instance, the + visual style of the terrain layer changes drastically between the VFR and + IFR layers), or certain layers may be disabled entirely in some map types + (e.g., localizers are only visible in the IFR low-enroute style). } XPLMMapStyle = ( xplm_MapStyle_VFR_Sectional = 0 @@ -112,22 +115,22 @@ { XPLMMapDrawingCallback_f - This is the OpenGL map drawing callback for plugin-created map layers. You - can perform arbitrary OpenGL drawing from this callback, with one - exception: changes to the Z-buffer are not permitted, and will result in - map drawing errors. + This is the OpenGL map drawing callback for plugin-created map layers. You + can perform arbitrary OpenGL drawing from this callback, with one + exception: changes to the Z-buffer are not permitted, and will result in + map drawing errors. - All drawing done from within this callback appears beneath all built-in - X-Plane icons and labels, but above the built-in "fill" layers (layers - providing major details, like terrain and water). Note, however, that the - relative ordering between the drawing callbacks of different plugins is not - guaranteed. + All drawing done from within this callback appears beneath all built-in + X-Plane icons and labels, but above the built-in "fill" layers (layers + providing major details, like terrain and water). Note, however, that the + relative ordering between the drawing callbacks of different plugins is not + guaranteed. } XPLMMapDrawingCallback_f = PROCEDURE( inLayer : XPLMMapLayerID; - inMapBoundsLeftTopRightBottom: PSingle; - zoomRatio : Single; - mapUnitsPerUserInterfaceUnit: Single; + inMapBoundsLeftTopRightBottom: Psingle; + zoomRatio : single; + mapUnitsPerUserInterfaceUnit: single; mapStyle : XPLMMapStyle; projection : XPLMMapProjectionID; inRefcon : pointer); cdecl; @@ -135,24 +138,24 @@ { XPLMMapIconDrawingCallback_f - This is the icon drawing callback that enables plugin-created map layers to - draw icons using X-Plane's built-in icon drawing functionality. You can - request an arbitrary number of PNG icons to be drawn via - XPLMDrawMapIconFromSheet() from within this callback, but you may not - perform any OpenGL drawing here. - - Icons enqueued by this function will appear above all OpenGL drawing - (performed by your optional XPLMMapDrawingCallback_f), and above all - built-in X-Plane map icons of the same layer type ("fill" or "markings," as - determined by the XPLMMapLayerType in your XPLMCreateMapLayer_t). Note, - however, that the relative ordering between the drawing callbacks of - different plugins is not guaranteed. + This is the icon drawing callback that enables plugin-created map layers to + draw icons using X-Plane's built-in icon drawing functionality. You can + request an arbitrary number of PNG icons to be drawn via + XPLMDrawMapIconFromSheet() from within this callback, but you may not + perform any OpenGL drawing here. + + Icons enqueued by this function will appear above all OpenGL drawing + (performed by your optional XPLMMapDrawingCallback_f), and above all + built-in X-Plane map icons of the same layer type ("fill" or "markings," as + determined by the XPLMMapLayerType in your XPLMCreateMapLayer_t). Note, + however, that the relative ordering between the drawing callbacks of + different plugins is not guaranteed. } XPLMMapIconDrawingCallback_f = PROCEDURE( inLayer : XPLMMapLayerID; - inMapBoundsLeftTopRightBottom: PSingle; - zoomRatio : Single; - mapUnitsPerUserInterfaceUnit: Single; + inMapBoundsLeftTopRightBottom: Psingle; + zoomRatio : single; + mapUnitsPerUserInterfaceUnit: single; mapStyle : XPLMMapStyle; projection : XPLMMapProjectionID; inRefcon : pointer); cdecl; @@ -160,177 +163,177 @@ { XPLMMapLabelDrawingCallback_f - This is the label drawing callback that enables plugin-created map layers - to draw text labels using X-Plane's built-in labeling functionality. You - can request an arbitrary number of text labels to be drawn via - XPLMDrawMapLabel() from within this callback, but you may not perform any - OpenGL drawing here. - - Labels enqueued by this function will appear above all OpenGL drawing - (performed by your optional XPLMMapDrawingCallback_f), and above all - built-in map icons and labels of the same layer type ("fill" or "markings," - as determined by the XPLMMapLayerType in your XPLMCreateMapLayer_t). Note, - however, that the relative ordering between the drawing callbacks of - different plugins is not guaranteed. + This is the label drawing callback that enables plugin-created map layers + to draw text labels using X-Plane's built-in labeling functionality. You + can request an arbitrary number of text labels to be drawn via + XPLMDrawMapLabel() from within this callback, but you may not perform any + OpenGL drawing here. + + Labels enqueued by this function will appear above all OpenGL drawing + (performed by your optional XPLMMapDrawingCallback_f), and above all + built-in map icons and labels of the same layer type ("fill" or "markings," + as determined by the XPLMMapLayerType in your XPLMCreateMapLayer_t). Note, + however, that the relative ordering between the drawing callbacks of + different plugins is not guaranteed. } XPLMMapLabelDrawingCallback_f = PROCEDURE( inLayer : XPLMMapLayerID; - inMapBoundsLeftTopRightBottom: PSingle; - zoomRatio : Single; - mapUnitsPerUserInterfaceUnit: Single; + inMapBoundsLeftTopRightBottom: Psingle; + zoomRatio : single; + mapUnitsPerUserInterfaceUnit: single; mapStyle : XPLMMapStyle; projection : XPLMMapProjectionID; inRefcon : pointer); cdecl; -{$ENDIF XPLM300} +{$ENDIF} {$IFDEF XPLM300} {___________________________________________________________________________ * LAYER MANAGEMENT CALLBACKS ___________________________________________________________________________} { - These are various "bookkeeping" callbacks that your map layer can receive - (if you provide the callback in your XPLMCreateMapLayer_t). They allow you - to manage the lifecycle of your layer, as well as cache any - computationally-intensive preparation you might need for drawing. + These are various "bookkeeping" callbacks that your map layer can receive + (if you provide the callback in your XPLMCreateMapLayer_t). They allow you + to manage the lifecycle of your layer, as well as cache any + computationally-intensive preparation you might need for drawing. } { XPLMMapPrepareCacheCallback_f - A callback used to allow you to cache whatever information your layer needs - to draw in the current map area. + A callback used to allow you to cache whatever information your layer needs + to draw in the current map area. - This is called each time the map's total bounds change. This is typically - triggered by new DSFs being loaded, such that X-Plane discards old, - now-distant DSFs and pulls in new ones. At that point, the available bounds - of the map also change to match the new DSF area. + This is called each time the map's total bounds change. This is typically + triggered by new DSFs being loaded, such that X-Plane discards old, + now-distant DSFs and pulls in new ones. At that point, the available bounds + of the map also change to match the new DSF area. - By caching just the information you need to draw in this area, your future - draw calls can be made faster, since you'll be able to simply "splat" your - precomputed information each frame. + By caching just the information you need to draw in this area, your future + draw calls can be made faster, since you'll be able to simply "splat" your + precomputed information each frame. - We guarantee that the map projection will not change between successive - prepare cache calls, nor will any draw call give you bounds outside these - total map bounds. So, if you cache the projected map coordinates of all the - items you might want to draw in the total map area, you can be guaranteed - that no draw call will be asked to do any new work. + We guarantee that the map projection will not change between successive + prepare cache calls, nor will any draw call give you bounds outside these + total map bounds. So, if you cache the projected map coordinates of all the + items you might want to draw in the total map area, you can be guaranteed + that no draw call will be asked to do any new work. } TYPE XPLMMapPrepareCacheCallback_f = PROCEDURE( inLayer : XPLMMapLayerID; - inTotalMapBoundsLeftTopRightBottom: PSingle; + inTotalMapBoundsLeftTopRightBottom: Psingle; projection : XPLMMapProjectionID; inRefcon : pointer); cdecl; { XPLMMapWillBeDeletedCallback_f - Called just before your map layer gets deleted. Because SDK-created map - layers have the same lifetime as the X-Plane map that contains them, if the - map gets unloaded from memory, your layer will too. + Called just before your map layer gets deleted. Because SDK-created map + layers have the same lifetime as the X-Plane map that contains them, if the + map gets unloaded from memory, your layer will too. } XPLMMapWillBeDeletedCallback_f = PROCEDURE( inLayer : XPLMMapLayerID; inRefcon : pointer); cdecl; -{$ENDIF XPLM300} +{$ENDIF} {$IFDEF XPLM300} {___________________________________________________________________________ * MAP LAYER CREATION AND DESTRUCTION ___________________________________________________________________________} { - Enables the creation of new map layers. Layers are created for a particular - instance of the X-Plane map. For instance, if you want your layer to appear - in both the normal map interface and the Instructor Operator Station (IOS), - you would need two separate calls to XPLMCreateMapLayer(), with two - different values for your XPLMCreateMapLayer_t::layer_name. + Enables the creation of new map layers. Layers are created for a particular + instance of the X-Plane map. For instance, if you want your layer to appear + in both the normal map interface and the Instructor Operator Station (IOS), + you would need two separate calls to XPLMCreateMapLayer(), with two + different values for your XPLMCreateMapLayer_t::layer_name. - Your layer's lifetime will be determined by the lifetime of the map it is - created in. If the map is destroyed (on the X-Plane side), your layer will - be too, and you'll receive a callback to your - XPLMMapWillBeDeletedCallback_f. + Your layer's lifetime will be determined by the lifetime of the map it is + created in. If the map is destroyed (on the X-Plane side), your layer will + be too, and you'll receive a callback to your + XPLMMapWillBeDeletedCallback_f. } { XPLMMapLayerType - Indicates the type of map layer you are creating. Fill layers will always - be drawn beneath markings layers. + Indicates the type of map layer you are creating. Fill layers will always + be drawn beneath markings layers. } TYPE XPLMMapLayerType = ( - { A layer that draws "fill" graphics, like weather patterns, terrain, etc. } - { Fill layers frequently cover a large portion of the visible map area. } + { A layer that draws "fill" graphics, like weather patterns, terrain, etc. } + { Fill layers frequently cover a large portion of the visible map area. } xplm_MapLayer_Fill = 0 - { A layer that provides markings for particular map features, like NAVAIDs, } - { airports, etc. Even dense markings layers cover a small portion of the } - { total map area. } + { A layer that provides markings for particular map features, like NAVAIDs, } + { airports, etc. Even dense markings layers cover a small portion of the } + { total map area. } ,xplm_MapLayer_Markings = 1 ); PXPLMMapLayerType = ^XPLMMapLayerType; CONST - { Globally unique identifier for X-Plane's Map window, used as the } - { mapToCreateLayerIn parameter in XPLMCreateMapLayer_t } + { Globally unique identifier for X-Plane's Map window, used as the } + { mapToCreateLayerIn parameter in XPLMCreateMapLayer_t } XPLM_MAP_USER_INTERFACE = "XPLM_MAP_USER_INTERFACE"; - { Globally unique identifier for X-Plane's Instructor Operator Station } - { window, used as the mapToCreateLayerIn parameter in XPLMCreateMapLayer_t } + { Globally unique identifier for X-Plane's Instructor Operator Station } + { window, used as the mapToCreateLayerIn parameter in XPLMCreateMapLayer_t } XPLM_MAP_IOS = "XPLM_MAP_IOS"; { XPLMCreateMapLayer_t - This structure defines all of the parameters used to create a map layer - using XPLMCreateMapLayer. The structure will be expanded in future SDK APIs - to include more features. Always set the structSize member to the size of - your struct in bytes! + This structure defines all of the parameters used to create a map layer + using XPLMCreateMapLayer. The structure will be expanded in future SDK APIs + to include more features. Always set the structSize member to the size of + your struct in bytes! - Each layer must be associated with exactly one map instance in X-Plane. - That map, and that map alone, will call your callbacks. Likewise, when that - map is deleted, your layer will be as well. + Each layer must be associated with exactly one map instance in X-Plane. + That map, and that map alone, will call your callbacks. Likewise, when that + map is deleted, your layer will be as well. } TYPE XPLMCreateMapLayer_t = RECORD - { Used to inform XPLMCreateMapLayer() of the SDK version you compiled } - { against; should always be set to sizeof(XPLMCreateMapLayer_t) } - structSize : Integer; - { Globally unique string identifying the map you want this layer to appear } - { in. As of XPLM300, this is limited to one of XPLM_MAP_USER_INTERFACE or } - { XPLM_MAP_IOS } - mapToCreateLayerIn : XPLMString; - { The type of layer you are creating, used to determine draw order (all } - { plugin-created markings layers are drawn above all plugin-created fill } - { layers) } + { Used to inform XPLMCreateMapLayer() of the SDK version you compiled } + { against; should always be set to sizeof(XPLMCreateMapLayer_t) } + structSize : integer; + { Globally unique string identifying the map you want this layer to appear } + { in. As of XPLM300, this is limited to one of XPLM_MAP_USER_INTERFACE or } + { XPLM_MAP_IOS } + mapToCreateLayerIn : Pchar; + { The type of layer you are creating, used to determine draw order (all } + { plugin-created markings layers are drawn above all plugin-created fill } + { layers) } layerType : XPLMMapLayerType; - { Optional callback to inform you this layer is being deleted (due to its } - { owning map being destroyed) } + { Optional callback to inform you this layer is being deleted (due to its } + { owning map being destroyed) } willBeDeletedCallback : XPLMMapWillBeDeletedCallback_f; - { Optional callback you want to use to prepare your draw cache when the map } - { bounds change (set to NULL if you don't want this callback) } + { Optional callback you want to use to prepare your draw cache when the map } + { bounds change (set to NULL if you don't want this callback) } prepCacheCallback : XPLMMapPrepareCacheCallback_f; - { Optional callback you want to use for arbitrary OpenGL drawing, which goes } - { beneath all icons in the map's layering system (set to NULL if you don't } - { want this callback) } + { Optional callback you want to use for arbitrary OpenGL drawing, which goes } + { beneath all icons in the map's layering system (set to NULL if you don't } + { want this callback) } drawCallback : XPLMMapDrawingCallback_f; - { Optional callback you want to use for drawing icons, which go above all } - { built-in X-Plane icons (except the aircraft) in the map's layering system } - { (set to NULL if you don't want this callback) } + { Optional callback you want to use for drawing icons, which go above all } + { built-in X-Plane icons (except the aircraft) in the map's layering system } + { (set to NULL if you don't want this callback) } iconCallback : XPLMMapIconDrawingCallback_f; - { Optional callback you want to use for drawing map labels, which go above } - { all built-in X-Plane icons and labels (except those of aircraft) in the } - { map's layering system (set to NULL if you don't want this callback) } + { Optional callback you want to use for drawing map labels, which go above } + { all built-in X-Plane icons and labels (except those of aircraft) in the } + { map's layering system (set to NULL if you don't want this callback) } labelCallback : XPLMMapLabelDrawingCallback_f; - { True if you want a checkbox to be created in the map UI to toggle this } - { layer on and off; false if the layer should simply always be enabled } - showUiToggle : Integer; - { Short label to use for this layer in the user interface } - layerName : XPLMString; - { A reference to arbitrary data that will be passed to your callbacks } + { True if you want a checkbox to be created in the map UI to toggle this } + { layer on and off; false if the layer should simply always be enabled } + showUiToggle : integer; + { Short label to use for this layer in the user interface } + layerName : Pchar; + { A reference to arbitrary data that will be passed to your callbacks } refcon : pointer; END; PXPLMCreateMapLayer_t = ^XPLMCreateMapLayer_t; @@ -338,109 +341,125 @@ { XPLMCreateMapLayer - This routine creates a new map layer. You pass in an XPLMCreateMapLayer_t - structure with all of the fields set in. You must set the structSize of - the structure to the size of the actual structure you used. + This routine creates a new map layer. You pass in an XPLMCreateMapLayer_t + structure with all of the fields set in. You must set the structSize of + the structure to the size of the actual structure you used. - Returns NULL if the layer creation failed. This happens most frequently - because the map you specified in your - XPLMCreateMapLayer_t::mapToCreateLayerIn field doesn't exist (that is, if - XPLMMapExists() returns 0 for the specified map). You can use - XPLMRegisterMapCreationHook() to get a notification each time a new map is - opened in X-Plane, at which time you can create layers in it. + Returns NULL if the layer creation failed. This happens most frequently + because the map you specified in your + XPLMCreateMapLayer_t::mapToCreateLayerIn field doesn't exist (that is, if + XPLMMapExists() returns 0 for the specified map). You can use + XPLMRegisterMapCreationHook() to get a notification each time a new map is + opened in X-Plane, at which time you can create layers in it. } FUNCTION XPLMCreateMapLayer( inParams : PXPLMCreateMapLayer_t) : XPLMMapLayerID; - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMDestroyMapLayer - Destroys a map layer you created (calling your - XPLMMapWillBeDeletedCallback_f if applicable). Returns true if a deletion - took place. + Destroys a map layer you created (calling your + XPLMMapWillBeDeletedCallback_f if applicable). Returns true if a deletion + took place. } FUNCTION XPLMDestroyMapLayer( - inLayer : XPLMMapLayerID) : Integer; - cdecl; external XPLM_DLL; + inLayer : XPLMMapLayerID) : integer; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMMapCreatedCallback_f - A callback to notify your plugin that a new map has been created in - X-Plane. This is the best time to add a custom map layer using - XPLMCreateMapLayer(). + A callback to notify your plugin that a new map has been created in + X-Plane. This is the best time to add a custom map layer using + XPLMCreateMapLayer(). - No OpenGL drawing is permitted within this callback. + No OpenGL drawing is permitted within this callback. } TYPE XPLMMapCreatedCallback_f = PROCEDURE( - mapIdentifier : XPLMString; + mapIdentifier : Pchar; refcon : pointer); cdecl; { XPLMRegisterMapCreationHook - Registers your callback to receive a notification each time a new map is - constructed in X-Plane. This callback is the best time to add your custom - map layer using XPLMCreateMapLayer(). + Registers your callback to receive a notification each time a new map is + constructed in X-Plane. This callback is the best time to add your custom + map layer using XPLMCreateMapLayer(). - Note that you will not be notified about any maps that already exist---you - can use XPLMMapExists() to check for maps that were created previously. + Note that you will not be notified about any maps that already exist---you + can use XPLMMapExists() to check for maps that were created previously. } PROCEDURE XPLMRegisterMapCreationHook( callback : XPLMMapCreatedCallback_f; refcon : pointer); - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMMapExists - Returns 1 if the map with the specified identifier already exists in - X-Plane. In that case, you can safely call XPLMCreateMapLayer() specifying - that your layer should be added to that map. + Returns 1 if the map with the specified identifier already exists in + X-Plane. In that case, you can safely call XPLMCreateMapLayer() specifying + that your layer should be added to that map. } FUNCTION XPLMMapExists( - mapIdentifier : XPLMString) : Integer; - cdecl; external XPLM_DLL; - -{$ENDIF XPLM300} + mapIdentifier : Pchar) : integer; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} + +{$ENDIF} {$IFDEF XPLM300} {___________________________________________________________________________ * MAP DRAWING ___________________________________________________________________________} { - These APIs are only valid from within a map drawing callback (one of - XPLMIconDrawingCallback_t or XPLMMapLabelDrawingCallback_f). Your drawing - callbacks are registered when you create a new map layer as part of your - XPLMCreateMapLayer_t. The functions here hook into X-Plane's built-in map - drawing functionality for icons and labels, so that you get a consistent - style with the rest of the X-Plane map. + These APIs are only valid from within a map drawing callback (one of + XPLMIconDrawingCallback_t or XPLMMapLabelDrawingCallback_f). Your drawing + callbacks are registered when you create a new map layer as part of your + XPLMCreateMapLayer_t. The functions here hook into X-Plane's built-in map + drawing functionality for icons and labels, so that you get a consistent + style with the rest of the X-Plane map. - Note that the X-Plane 11 map introduces a strict ordering: layers of type - xplm_MapLayer_Fill get drawn beneath all xplm_MapLayer_Markings layers. - Likewise, all OpenGL drawing (performed in your layer's - XPLMMapDrawingCallback_f) will appear beneath any icons and labels you - draw. + Note that the X-Plane 11 map introduces a strict ordering: layers of type + xplm_MapLayer_Fill get drawn beneath all xplm_MapLayer_Markings layers. + Likewise, all OpenGL drawing (performed in your layer's + XPLMMapDrawingCallback_f) will appear beneath any icons and labels you + draw. } { XPLMMapOrientation - Indicates whether a map element should be match its rotation to the map - itself, or to the user interface. For instance, the map itself may be - rotated such that "up" matches the user's aircraft, but you may want to - draw a text label such that it is always rotated zero degrees relative to - the user's perspective. In that case, you would have it draw with UI - orientation. + Indicates whether a map element should be match its rotation to the map + itself, or to the user interface. For instance, the map itself may be + rotated such that "up" matches the user's aircraft, but you may want to + draw a text label such that it is always rotated zero degrees relative to + the user's perspective. In that case, you would have it draw with UI + orientation. } TYPE XPLMMapOrientation = ( - { Orient such that a 0 degree rotation matches the map's north } + { Orient such that a 0 degree rotation matches the map's north } xplm_MapOrientation_Map = 0 - { Orient such that a 0 degree rotation is "up" relative to the user interface} + { Orient such that a 0 degree rotation is "up" relative to the user interface } ,xplm_MapOrientation_UI = 1 ); @@ -449,163 +468,185 @@ { XPLMDrawMapIconFromSheet - Enables plugin-created map layers to draw PNG icons using X-Plane's - built-in icon drawing functionality. Only valid from within an - XPLMIconDrawingCallback_t (but you can request an arbitrary number of icons - to be drawn from within your callback). - - X-Plane will automatically manage the memory for your texture so that it - only has to be loaded from disk once as long as you continue drawing it - per-frame. (When you stop drawing it, the memory may purged in a "garbage - collection" pass, require a load from disk in the future.) - - Instead of having X-Plane draw a full PNG, this method allows you to use UV - coordinates to request a portion of the image to be drawn. This allows you - to use a single texture load (of an icon sheet, for example) to draw many - icons. Doing so is much more efficient than drawing a dozen different small - PNGs. - - The UV coordinates used here treat the texture you load as being comprised - of a number of identically sized "cells." You specify the width and height - in cells (ds and dt, respectively), as well as the coordinates within the - cell grid for the sub-image you'd like to draw. - - Note that you can use different ds and dt values in subsequent calls with - the same texture sheet. This enables you to use icons of different sizes in - the same sheet if you arrange them properly in the PNG. - - This function is only valid from within an XPLMIconDrawingCallback_t (but - you can request an arbitrary number of icons to be drawn from within your - callback). + Enables plugin-created map layers to draw PNG icons using X-Plane's + built-in icon drawing functionality. Only valid from within an + XPLMIconDrawingCallback_t (but you can request an arbitrary number of icons + to be drawn from within your callback). + + X-Plane will automatically manage the memory for your texture so that it + only has to be loaded from disk once as long as you continue drawing it + per-frame. (When you stop drawing it, the memory may purged in a "garbage + collection" pass, require a load from disk in the future.) + + Instead of having X-Plane draw a full PNG, this method allows you to use UV + coordinates to request a portion of the image to be drawn. This allows you + to use a single texture load (of an icon sheet, for example) to draw many + icons. Doing so is much more efficient than drawing a dozen different small + PNGs. + + The UV coordinates used here treat the texture you load as being comprised + of a number of identically sized "cells." You specify the width and height + in cells (ds and dt, respectively), as well as the coordinates within the + cell grid for the sub-image you'd like to draw. + + Note that you can use different ds and dt values in subsequent calls with + the same texture sheet. This enables you to use icons of different sizes in + the same sheet if you arrange them properly in the PNG. + + This function is only valid from within an XPLMIconDrawingCallback_t (but + you can request an arbitrary number of icons to be drawn from within your + callback). } PROCEDURE XPLMDrawMapIconFromSheet( layer : XPLMMapLayerID; - inPngPath : XPLMString; - s : Integer; - t : Integer; - ds : Integer; - dt : Integer; - mapX : Single; - mapY : Single; + inPngPath : Pchar; + s : integer; + t : integer; + ds : integer; + dt : integer; + mapX : single; + mapY : single; orientation : XPLMMapOrientation; - rotationDegrees : Single; - mapWidth : Single); - cdecl; external XPLM_DLL; + rotationDegrees : single; + mapWidth : single); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMDrawMapLabel - Enables plugin-created map layers to draw text labels using X-Plane's - built-in labeling functionality. Only valid from within an - XPLMMapLabelDrawingCallback_f (but you can request an arbitrary number of - text labels to be drawn from within your callback). + Enables plugin-created map layers to draw text labels using X-Plane's + built-in labeling functionality. Only valid from within an + XPLMMapLabelDrawingCallback_f (but you can request an arbitrary number of + text labels to be drawn from within your callback). } PROCEDURE XPLMDrawMapLabel( layer : XPLMMapLayerID; - inText : XPLMString; - mapX : Single; - mapY : Single; + inText : Pchar; + mapX : single; + mapY : single; orientation : XPLMMapOrientation; - rotationDegrees : Single); - cdecl; external XPLM_DLL; - -{$ENDIF XPLM300} + rotationDegrees : single); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} + +{$ENDIF} {$IFDEF XPLM300} {___________________________________________________________________________ * MAP PROJECTIONS ___________________________________________________________________________} { - As of X-Plane 11, the map draws using true cartographic projections, and - different maps may use different projections. Thus, to draw at a particular - latitude and longitude, you must first transform your real-world - coordinates into map coordinates. + As of X-Plane 11, the map draws using true cartographic projections, and + different maps may use different projections. Thus, to draw at a particular + latitude and longitude, you must first transform your real-world + coordinates into map coordinates. - The map projection is also responsible for giving you the current scale of - the map. That is, the projection can tell you how many map units correspond - to 1 meter at a given point. + The map projection is also responsible for giving you the current scale of + the map. That is, the projection can tell you how many map units correspond + to 1 meter at a given point. - Finally, the map projection can give you the current rotation of the map. - Since X-Plane 11 maps can rotate to match the heading of the aircraft, the - map's rotation can potentially change every frame. + Finally, the map projection can give you the current rotation of the map. + Since X-Plane 11 maps can rotate to match the heading of the aircraft, the + map's rotation can potentially change every frame. } { XPLMMapProject - Projects a latitude/longitude into map coordinates. This is the inverse of - XPLMMapUnproject(). + Projects a latitude/longitude into map coordinates. This is the inverse of + XPLMMapUnproject(). - Only valid from within a map layer callback (one of - XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, - XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) + Only valid from within a map layer callback (one of + XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, + XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) } PROCEDURE XPLMMapProject( projection : XPLMMapProjectionID; - latitude : Real; - longitude : Real; - outX : PSingle; - outY : PSingle); - cdecl; external XPLM_DLL; + latitude : real; + longitude : real; + outX : Psingle; + outY : Psingle); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMMapUnproject - Transforms map coordinates back into a latitude and longitude. This is the - inverse of XPLMMapProject(). + Transforms map coordinates back into a latitude and longitude. This is the + inverse of XPLMMapProject(). - Only valid from within a map layer callback (one of - XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, - XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) + Only valid from within a map layer callback (one of + XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, + XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) } PROCEDURE XPLMMapUnproject( projection : XPLMMapProjectionID; - mapX : Single; - mapY : Single; - outLatitude : PReal; - outLongitude : PReal); - cdecl; external XPLM_DLL; + mapX : single; + mapY : single; + outLatitude : Preal; + outLongitude : Preal); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMMapScaleMeter - Returns the number of map units that correspond to a distance of one meter - at a given set of map coordinates. + Returns the number of map units that correspond to a distance of one meter + at a given set of map coordinates. - Only valid from within a map layer callback (one of - XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, - XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) + Only valid from within a map layer callback (one of + XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, + XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) } FUNCTION XPLMMapScaleMeter( projection : XPLMMapProjectionID; - mapX : Single; - mapY : Single) : Single; - cdecl; external XPLM_DLL; + mapX : single; + mapY : single) : single; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMMapGetNorthHeading - Returns the heading (in degrees clockwise from "up") that corresponds to - north at a given point on the map. In other words, if your runway has a - true heading of 360, you would use "north" as the Cartesian angle at which - to draw the runway on the map. (You would add the result of - XPLMMapGetNorthHeading() to your true heading to get the map angle.) + Returns the heading (in degrees clockwise from "up") that corresponds to + north at a given point on the map. In other words, if your runway has a + true heading of 360, you would use "north" as the Cartesian angle at which + to draw the runway on the map. (You would add the result of + XPLMMapGetNorthHeading() to your true heading to get the map angle.) - This is necessary becuase X-Plane's map can be rotated to match your - aircraft's orientation; north is not always "up." + This is necessary becuase X-Plane's map can be rotated to match your + aircraft's orientation; north is not always "up." - Only valid from within a map layer callback (one of - XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, - XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) + Only valid from within a map layer callback (one of + XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, + XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) } FUNCTION XPLMMapGetNorthHeading( projection : XPLMMapProjectionID; - mapX : Single; - mapY : Single) : Single; - cdecl; external XPLM_DLL; - -{$ENDIF XPLM300} - + mapX : single; + mapY : single) : single; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} + +{$ENDIF} IMPLEMENTATION - END. diff --git a/src/SDK/Delphi/XPLM/XPLMMenus.pas b/src/SDK/Delphi/XPLM/XPLMMenus.pas index 754a4347..98db8101 100755 --- a/src/SDK/Delphi/XPLM/XPLMMenus.pas +++ b/src/SDK/Delphi/XPLM/XPLMMenus.pas @@ -1,62 +1,68 @@ { - 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 XPLMMenus; INTERFACE { - Plug-ins can create menus in the menu bar of X-Plane. This is done by - creating a menu and then creating items. Menus are referred to by an - opaque ID. Items are referred to by (zero-based) index number. + Theory of Operation - Menus are "sandboxed" between plugins---no plugin can access the menus of - any other plugin. Furthermore, all menu indices are relative to your - plugin's menus only; if your plugin creates two sub-menus in the Plugins - menu at different times, it doesn't matter how many other plugins also - create sub-menus of Plugins in the intervening time: your sub-menus will be - given menu indices 0 and 1. (The SDK does some work in the back-end to - filter out menus that are irrelevant to your plugin in order to deliver - this consistency for each plugin.) + Plug-ins can create menus in the menu bar of X-Plane. This is done by + creating a menu and then creating items. Menus are referred to by an + opaque ID. Items are referred to by (zero-based) index number. - When you create a menu item, you specify how we should handle clicks on - that menu item. You can either have the XPLM trigger a callback (the - XPLMMenuHandler_f associated with the menu that contains the item), or you - can simply have a command be triggered (with no associated call to your - menu handler). The advantage of the latter method is that X-Plane will - display any keyboard shortcuts associated with the command. (In contrast, - there are no keyboard shortcuts associated with menu handler callbacks with - specific parameters.) + Menus are "sandboxed" between plugins---no plugin can access the menus of + any other plugin. Furthermore, all menu indices are relative to your + plugin's menus only; if your plugin creates two sub-menus in the Plugins + menu at different times, it doesn't matter how many other plugins also + create sub-menus of Plugins in the intervening time: your sub-menus will be + given menu indices 0 and 1. (The SDK does some work in the back-end to + filter out menus that are irrelevant to your plugin in order to deliver + this consistency for each plugin.) - Menu text in X-Plane is UTF8; X-Plane's character set covers latin, greek - and cyrillic characters, Katakana, as well as some Japanese symbols. Some - APIs have a inDeprecatedAndIgnored parameter that used to select a - character set; since X-Plane 9 all localization is done via UTF-8 only. + When you create a menu item, you specify how we should handle clicks on + that menu item. You can either have the XPLM trigger a callback (the + XPLMMenuHandler_f associated with the menu that contains the item), or you + can simply have a command be triggered (with no associated call to your + menu handler). The advantage of the latter method is that X-Plane will + display any keyboard shortcuts associated with the command. (In contrast, + there are no keyboard shortcuts associated with menu handler callbacks with + specific parameters.) } -USES - XPLMDefs, XPLMUtilities; +USES XPLMDefs; +USES XPLMUtilities; {$A4} +{$IFDEF MSWINDOWS} + {$DEFINE DELPHI} +{$ENDIF} {___________________________________________________________________________ * XPLM MENUS ___________________________________________________________________________} +{ + +} { XPLMMenuCheck - These enumerations define the various 'check' states for an X-Plane menu. - 'checking' in X-Plane actually appears as a light which may or may not be - lit. So there are three possible states. + These enumerations define the various 'check' states for an X-Plane menu. + 'checking' in X-Plane actually appears as a light which may or may not be + lit. So there are three possible states. } TYPE XPLMMenuCheck = ( - { there is no symbol to the left of the menu item. } + { there is no symbol to the left of the menu item. } xplm_Menu_NoCheck = 0 - { the menu has a mark next to it that is unmarked (not lit). } + { the menu has a mark next to it that is unmarked (not lit). } ,xplm_Menu_Unchecked = 1 - { the menu has a mark next to it that is checked (lit). } + { the menu has a mark next to it that is checked (lit). } ,xplm_Menu_Checked = 2 ); @@ -65,7 +71,7 @@ { XPLMMenuID - This is a unique ID for each menu you create. + This is a unique ID for each menu you create. } XPLMMenuID = pointer; PXPLMMenuID = ^XPLMMenuID; @@ -73,9 +79,9 @@ { XPLMMenuHandler_f - A menu handler function takes two reference pointers, one for the menu - (specified when the menu was created) and one for the item (specified when - the item was created). + A menu handler function takes two reference pointers, one for the menu + (specified when the menu was created) and one for the item (specified when + the item was created). } XPLMMenuHandler_f = PROCEDURE( inMenuRef : pointer; @@ -84,194 +90,244 @@ { XPLMFindPluginsMenu - This function returns the ID of the plug-ins menu, which is created for you - at startup. + This function returns the ID of the plug-ins menu, which is created for you + at startup. } FUNCTION XPLMFindPluginsMenu: XPLMMenuID; - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} {$IFDEF XPLM300} { XPLMFindAircraftMenu - This function returns the ID of the menu for the currently-loaded aircraft, - used for showing aircraft-specific commands. + This function returns the ID of the menu for the currently-loaded aircraft, + used for showing aircraft-specific commands. - The aircraft menu is created by X-Plane at startup, but it remains hidden - until it is populated via XPLMAppendMenuItem() or - XPLMAppendMenuItemWithCommand(). + The aircraft menu is created by X-Plane at startup, but it remains hidden + until it is populated via XPLMAppendMenuItem() or + XPLMAppendMenuItemWithCommand(). - Only plugins loaded with the user's current aircraft are allowed to access - the aircraft menu. For all other plugins, this will return NULL, and any - attempts to add menu items to it will fail. + Only plugins loaded with the user's current aircraft are allowed to access + the aircraft menu. For all other plugins, this will return NULL, and any + attempts to add menu items to it will fail. } FUNCTION XPLMFindAircraftMenu: XPLMMenuID; - cdecl; external XPLM_DLL; -{$ENDIF XPLM300} +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} +{$ENDIF} { XPLMCreateMenu - This function creates a new menu and returns its ID. It returns NULL if - the menu cannot be created. Pass in a parent menu ID and an item index to - create a submenu, or NULL for the parent menu to put the menu in the menu - bar. The menu's name is only used if the menu is in the menubar. You also - pass a handler function and a menu reference value. Pass NULL for the - handler if you do not need callbacks from the menu (for example, if it only - contains submenus). + This function creates a new menu and returns its ID. It returns NULL if + the menu cannot be created. Pass in a parent menu ID and an item index to + create a submenu, or NULL for the parent menu to put the menu in the menu + bar. The menu's name is only used if the menu is in the menubar. You also + pass a handler function and a menu reference value. Pass NULL for the + handler if you do not need callbacks from the menu (for example, if it only + contains submenus). - Important: you must pass a valid, non-empty menu title even if the menu is - a submenu where the title is not visible. + Important: you must pass a valid, non-empty menu title even if the menu is + a submenu where the title is not visible. } FUNCTION XPLMCreateMenu( - inName : XPLMString; + inName : Pchar; inParentMenu : XPLMMenuID; - inParentItem : Integer; + inParentItem : integer; inHandler : XPLMMenuHandler_f; inMenuRef : pointer) : XPLMMenuID; - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMDestroyMenu - This function destroys a menu that you have created. Use this to remove a - submenu if necessary. (Normally this function will not be necessary.) + This function destroys a menu that you have created. Use this to remove a + submenu if necessary. (Normally this function will not be necessary.) } PROCEDURE XPLMDestroyMenu( inMenuID : XPLMMenuID); - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMClearAllMenuItems - This function removes all menu items from a menu, allowing you to rebuild - it. Use this function if you need to change the number of items on a menu. + This function removes all menu items from a menu, allowing you to rebuild + it. Use this function if you need to change the number of items on a menu. } PROCEDURE XPLMClearAllMenuItems( inMenuID : XPLMMenuID); - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMAppendMenuItem - This routine appends a new menu item to the bottom of a menu and returns - its index. Pass in the menu to add the item to, the items name, and a void - * ref for this item. + This routine appends a new menu item to the bottom of a menu and returns + its index. Pass in the menu to add the item to, the items name, and a void + * ref for this item. - Returns a negative index if the append failed (due to an invalid parent - menu argument). + Returns a negative index if the append failed (due to an invalid parent + menu argument). - Note that all menu indices returned are relative to your plugin's menus - only; if your plugin creates two sub-menus in the Plugins menu at different - times, it doesn't matter how many other plugins also create sub-menus of - Plugins in the intervening time: your sub-menus will be given menu indices - 0 and 1. (The SDK does some work in the back-end to filter out menus that - are irrelevant to your plugin in order to deliver this consistency for each - plugin.) + Note that all menu indices returned are relative to your plugin's menus + only; if your plugin creates two sub-menus in the Plugins menu at different + times, it doesn't matter how many other plugins also create sub-menus of + Plugins in the intervening time: your sub-menus will be given menu indices + 0 and 1. (The SDK does some work in the back-end to filter out menus that + are irrelevant to your plugin in order to deliver this consistency for each + plugin.) } FUNCTION XPLMAppendMenuItem( inMenu : XPLMMenuID; - inItemName : XPLMString; + inItemName : Pchar; inItemRef : pointer; - inDeprecatedAndIgnored: Integer) : Integer; - cdecl; external XPLM_DLL; + inDeprecatedAndIgnored: integer) : integer; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} {$IFDEF XPLM300} { XPLMAppendMenuItemWithCommand - Like XPLMAppendMenuItem(), but instead of the new menu item triggering the - XPLMMenuHandler_f of the containiner menu, it will simply execute the - command you pass in. Using a command for your menu item allows the user to - bind a keyboard shortcut to the command and see that shortcut represented - in the menu. + Like XPLMAppendMenuItem(), but instead of the new menu item triggering the + XPLMMenuHandler_f of the containiner menu, it will simply execute the + command you pass in. Using a command for your menu item allows the user to + bind a keyboard shortcut to the command and see that shortcut represented + in the menu. - Returns a negative index if the append failed (due to an invalid parent - menu argument). + Returns a negative index if the append failed (due to an invalid parent + menu argument). - Like XPLMAppendMenuItem(), all menu indices are relative to your plugin's - menus only. + Like XPLMAppendMenuItem(), all menu indices are relative to your plugin's + menus only. } FUNCTION XPLMAppendMenuItemWithCommand( inMenu : XPLMMenuID; - inItemName : XPLMString; - inCommandToExecute : XPLMCommandRef) : Integer; - cdecl; external XPLM_DLL; -{$ENDIF XPLM300} + inItemName : Pchar; + inCommandToExecute : XPLMCommandRef) : integer; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} +{$ENDIF} { XPLMAppendMenuSeparator - This routine adds a separator to the end of a menu. + This routine adds a separator to the end of a menu. - Returns a negative index if the append failed (due to an invalid parent - menu argument). + Returns a negative index if the append failed (due to an invalid parent + menu argument). } PROCEDURE XPLMAppendMenuSeparator( inMenu : XPLMMenuID); - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMSetMenuItemName - This routine changes the name of an existing menu item. Pass in the menu - ID and the index of the menu item. + This routine changes the name of an existing menu item. Pass in the menu + ID and the index of the menu item. } PROCEDURE XPLMSetMenuItemName( inMenu : XPLMMenuID; - inIndex : Integer; - inItemName : XPLMString; - inDeprecatedAndIgnored: Integer); - cdecl; external XPLM_DLL; + inIndex : integer; + inItemName : Pchar; + inForceEnglish : integer); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMCheckMenuItem - Set whether a menu item is checked. Pass in the menu ID and item index. + Set whether a menu item is checked. Pass in the menu ID and item index. } PROCEDURE XPLMCheckMenuItem( inMenu : XPLMMenuID; - index : Integer; + index : integer; inCheck : XPLMMenuCheck); - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMCheckMenuItemState - This routine returns whether a menu item is checked or not. A menu item's - check mark may be on or off, or a menu may not have an icon at all. + This routine returns whether a menu item is checked or not. A menu item's + check mark may be on or off, or a menu may not have an icon at all. } PROCEDURE XPLMCheckMenuItemState( inMenu : XPLMMenuID; - index : Integer; + index : integer; outCheck : PXPLMMenuCheck); - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMEnableMenuItem - Sets whether this menu item is enabled. Items start out enabled. + Sets whether this menu item is enabled. Items start out enabled. } PROCEDURE XPLMEnableMenuItem( inMenu : XPLMMenuID; - index : Integer; - enabled : Integer); - cdecl; external XPLM_DLL; + index : integer; + enabled : integer); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} {$IFDEF XPLM210} { XPLMRemoveMenuItem - Removes one item from a menu. Note that all menu items below are moved up - one; your plugin must track the change in index numbers. + Removes one item from a menu. Note that all menu items below are moved up + one; your plugin must track the change in index numbers. } PROCEDURE XPLMRemoveMenuItem( inMenu : XPLMMenuID; - inIndex : Integer); - cdecl; external XPLM_DLL; -{$ENDIF XPLM210} - + inIndex : integer); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} +{$ENDIF} IMPLEMENTATION - END. diff --git a/src/SDK/Delphi/XPLM/XPLMNavigation.pas b/src/SDK/Delphi/XPLM/XPLMNavigation.pas index 044b99b5..10b046f9 100755 --- a/src/SDK/Delphi/XPLM/XPLMNavigation.pas +++ b/src/SDK/Delphi/XPLM/XPLMNavigation.pas @@ -1,39 +1,49 @@ { - 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 XPLMNavigation; INTERFACE { - The XPLM Navigation APIs give you some access to the navigation databases - inside X-Plane. X-Plane stores all navigation information in RAM, so by - using these APIs you can gain access to most information without having to - go to disk or parse the files yourself. + XPLMNavigation - THEORY OF OPERATION + + The XPLM Navigation APIs give you some access to the navigation databases + inside X-Plane. X-Plane stores all navigation information in RAM, so by + using these APIs you can gain access to most information without having to + go to disk or parse the files yourself. - You can also use this API to program the FMS. You must use the navigation - APIs to find the nav-aids you want to program into the FMS, since the FMS - is powered internally by X-Plane's navigation database. + You can also use this API to program the FMS. You must use the navigation + APIs to find the nav-aids you want to program into the FMS, since the FMS + is powered internally by X-Plane's navigation database. } -USES - XPLMDefs; +USES XPLMDefs; {$A4} +{$IFDEF MSWINDOWS} + {$DEFINE DELPHI} +{$ENDIF} {___________________________________________________________________________ * NAVIGATION DATABASE ACCESS ___________________________________________________________________________} +{ + +} { XPLMNavType - These enumerations define the different types of navaids. They are each - defined with a separate bit so that they may be bit-wise added together to - form sets of nav-aid types. + These enumerations define the different types of navaids. They are each + defined with a separate bit so that they may be bit-wise added together to + form sets of nav-aid types. - NOTE: xplm_Nav_LatLon is a specific lat-lon coordinate entered into the - FMS. It will not exist in the database, and cannot be programmed into the - FMS. Querying the FMS for navaids will return it. Use - XPLMSetFMSEntryLatLon to set a lat/lon waypoint. + NOTE: xplm_Nav_LatLon is a specific lat-lon coordinate entered into the + FMS. It will not exist in the database, and cannot be programmed into the + FMS. Querying the FMS for navaids will return it. Use + XPLMSetFMSEntryLatLon to set a lat/lon waypoint. } TYPE XPLMNavType = ( @@ -69,17 +79,17 @@ { XPLMNavRef - XPLMNavRef is an iterator into the navigation database. The navigation - database is essentially an array, but it is not necessarily densely - populated. The only assumption you can safely make is that like-typed - nav-aids are grouped together. + XPLMNavRef is an iterator into the navigation database. The navigation + database is essentially an array, but it is not necessarily densely + populated. The only assumption you can safely make is that like-typed + nav-aids are grouped together. - Use XPLMNavRef to refer to a nav-aid. + Use XPLMNavRef to refer to a nav-aid. - XPLM_NAV_NOT_FOUND is returned by functions that return an XPLMNavRef when - the iterator must be invalid. + XPLM_NAV_NOT_FOUND is returned by functions that return an XPLMNavRef when + the iterator must be invalid. } - XPLMNavRef = Integer; + XPLMNavRef = integer; PXPLMNavRef = ^XPLMNavRef; CONST @@ -88,263 +98,332 @@ { XPLMGetFirstNavAid - This returns the very first navaid in the database. Use this to traverse - the entire database. Returns XPLM_NAV_NOT_FOUND if the nav database is - empty. + This returns the very first navaid in the database. Use this to traverse + the entire database. Returns XPLM_NAV_NOT_FOUND if the nav database is + empty. } FUNCTION XPLMGetFirstNavAid: XPLMNavRef; - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMGetNextNavAid - Given a valid nav aid ref, this routine returns the next navaid. It - returns XPLM_NAV_NOT_FOUND if the nav aid passed in was invalid or if the - navaid passed in was the last one in the database. Use this routine to - iterate across all like-typed navaids or the entire database. + Given a nav aid ref, this routine returns the next navaid. It returns + XPLM_NAV_NOT_FOUND if the nav aid passed in was invalid or if the navaid + passed in was the last one in the database. Use this routine to iterate + across all like-typed navaids or the entire database. + + WARNING: due to a bug in the SDK, when fix loading is disabled in the + rendering settings screen, calling this routine with the last airport + returns a bogus nav aid. Using this nav aid can crash X-Plane. } FUNCTION XPLMGetNextNavAid( inNavAidRef : XPLMNavRef) : XPLMNavRef; - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMFindFirstNavAidOfType - This routine returns the ref of the first navaid of the given type in the - database or XPLM_NAV_NOT_FOUND if there are no navaids of that type in the - database. You must pass exactly one nav aid type to this routine. + This routine returns the ref of the first navaid of the given type in the + database or XPLM_NAV_NOT_FOUND if there are no navaids of that type in the + database. You must pass exactly one nav aid type to this routine. + + WARNING: due to a bug in the SDK, when fix loading is disabled in the + rendering settings screen, calling this routine with fixes returns a bogus + nav aid. Using this nav aid can crash X-Plane. } FUNCTION XPLMFindFirstNavAidOfType( inType : XPLMNavType) : XPLMNavRef; - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMFindLastNavAidOfType - This routine returns the ref of the last navaid of the given type in the - database or XPLM_NAV_NOT_FOUND if there are no navaids of that type in the - database. You must pass exactly one nav aid type to this routine. + This routine returns the ref of the last navaid of the given type in the + database or XPLM_NAV_NOT_FOUND if there are no navaids of that type in the + database. You must pass exactly one nav aid type to this routine. + + WARNING: due to a bug in the SDK, when fix loading is disabled in the + rendering settings screen, calling this routine with fixes returns a bogus + nav aid. Using this nav aid can crash X-Plane. } FUNCTION XPLMFindLastNavAidOfType( inType : XPLMNavType) : XPLMNavRef; - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMFindNavAid - This routine provides a number of searching capabilities for the nav - database. XPLMFindNavAid will search through every nav aid whose type is - within inType (multiple types may be added together) and return any - nav-aids found based on the following rules: + This routine provides a number of searching capabilities for the nav + database. XPLMFindNavAid will search through every nav aid whose type is + within inType (multiple types may be added together) and return any + nav-aids found based on the following rules: + + If inLat and inLon are not NULL, the navaid nearest to that lat/lon will be + returned, otherwise the last navaid found will be returned. - * If inLat and inLon are not NULL, the navaid nearest to that lat/lon will - be returned, otherwise the last navaid found will be returned. + If inFrequency is not NULL, then any navaids considered must match this + frequency. Note that this will screen out radio beacons that do not have + frequency data published (like inner markers) but not fixes and airports. - * If inFrequency is not NULL, then any navaids considered must match this - frequency. Note that this will screen out radio beacons that do not have - frequency data published (like inner markers) but not fixes and airports. + If inNameFragment is not NULL, only navaids that contain the fragment in + their name will be returned. - * If inNameFragment is not NULL, only navaids that contain the fragment in - their name will be returned. + If inIDFragment is not NULL, only navaids that contain the fragment in + their IDs will be returned. - * If inIDFragment is not NULL, only navaids that contain the fragment in - their IDs will be returned. + This routine provides a simple way to do a number of useful searches: - This routine provides a simple way to do a number of useful searches: - * Find the nearest navaid on this frequency. - * Find the nearest airport. - * Find the VOR whose ID is "KBOS". - * Find the nearest airport whose name contains "Chicago". + Find the nearest navaid on this frequency. Find the nearest airport. Find + the VOR whose ID is "KBOS". Find the nearest airport whose name contains + "Chicago". } FUNCTION XPLMFindNavAid( - inNameFragment : XPLMString; { Can be nil } - inIDFragment : XPLMString; { Can be nil } - inLat : PSingle; { Can be nil } - inLon : PSingle; { Can be nil } - inFrequency : PInteger; { Can be nil } + inNameFragment : Pchar; { Can be nil } + inIDFragment : Pchar; { Can be nil } + inLat : Psingle; { Can be nil } + inLon : Psingle; { Can be nil } + inFrequency : Pinteger; { Can be nil } inType : XPLMNavType) : XPLMNavRef; - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMGetNavAidInfo - This routine returns information about a navaid. Any non-null field is - filled out with information if it is available. + This routine returns information about a navaid. Any non-null field is + filled out with information if it is available. - Frequencies are in the nav.dat convention as described in the X-Plane nav - database FAQ: NDB frequencies are exact, all others are multiplied by 100. + Frequencies are in the nav.dat convention as described in the X-Plane nav + database FAQ: NDB frequencies are exact, all others are multiplied by 100. - The buffer for IDs should be at least 6 chars and the buffer for names - should be at least 41 chars, but since these values are likely to go up, I - recommend passing at least 32 chars for IDs and 256 chars for names when - possible. + The buffer for IDs should be at least 6 chars and the buffer for names + should be at least 41 chars, but since these values are likely to go up, I + recommend passing at least 32 chars for IDs and 256 chars for names when + possible. - The outReg parameter tells if the navaid is within the local "region" of - loaded DSFs. (This information may not be particularly useful to plugins.) - The parameter is a single byte value 1 for true or 0 for false, not a C - string. + The outReg parameter tells if the navaid is within the local "region" of + loaded DSFs. (This information may not be particularly useful to plugins.) + The parameter is a single byte value 1 for true or 0 for false, not a C + string. } PROCEDURE XPLMGetNavAidInfo( inRef : XPLMNavRef; outType : PXPLMNavType; { Can be nil } - outLatitude : PSingle; { Can be nil } - outLongitude : PSingle; { Can be nil } - outHeight : PSingle; { Can be nil } - outFrequency : PInteger; { Can be nil } - outHeading : PSingle; { Can be nil } - outID : XPLMString; { Can be nil } - outName : XPLMString; { Can be nil } - outReg : XPLMString); { Can be nil } - cdecl; external XPLM_DLL; + outLatitude : Psingle; { Can be nil } + outLongitude : Psingle; { Can be nil } + outHeight : Psingle; { Can be nil } + outFrequency : Pinteger; { Can be nil } + outHeading : Psingle; { Can be nil } + outID : Pchar; { Can be nil } + outName : Pchar; { Can be nil } + outReg : Pchar); { Can be nil } +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} {___________________________________________________________________________ * FLIGHT MANAGEMENT COMPUTER ___________________________________________________________________________} { - Note: the FMS works based on an array of entries. Indices into the array - are zero-based. Each entry is a nav-aid plus an altitude. The FMS tracks - the currently displayed entry and the entry that it is flying to. + Note: the FMS works based on an array of entries. Indices into the array + are zero-based. Each entry is a nav-aid plus an altitude. The FMS tracks + the currently displayed entry and the entry that it is flying to. - The FMS must be programmed with contiguous entries, so clearing an entry at - the end shortens the effective flight plan. There is a max of 100 - waypoints in the flight plan. + The FMS must be programmed with contiguous entries, so clearing an entry at + the end shortens the effective flight plan. There is a max of 100 + waypoints in the flight plan. } { XPLMCountFMSEntries - This routine returns the number of entries in the FMS. + This routine returns the number of entries in the FMS. } - FUNCTION XPLMCountFMSEntries: Integer; - cdecl; external XPLM_DLL; + FUNCTION XPLMCountFMSEntries: integer; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMGetDisplayedFMSEntry - This routine returns the index of the entry the pilot is viewing. + This routine returns the index of the entry the pilot is viewing. } - FUNCTION XPLMGetDisplayedFMSEntry: Integer; - cdecl; external XPLM_DLL; + FUNCTION XPLMGetDisplayedFMSEntry: integer; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMGetDestinationFMSEntry - This routine returns the index of the entry the FMS is flying to. + This routine returns the index of the entry the FMS is flying to. } - FUNCTION XPLMGetDestinationFMSEntry: Integer; - cdecl; external XPLM_DLL; + FUNCTION XPLMGetDestinationFMSEntry: integer; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMSetDisplayedFMSEntry - This routine changes which entry the FMS is showing to the index specified. - } + This routine changes which entry the FMS is showing to the index specified. + } PROCEDURE XPLMSetDisplayedFMSEntry( - inIndex : Integer); - cdecl; external XPLM_DLL; + inIndex : integer); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMSetDestinationFMSEntry - This routine changes which entry the FMS is flying the aircraft toward. + This routine changes which entry the FMS is flying the aircraft toward. } PROCEDURE XPLMSetDestinationFMSEntry( - inIndex : Integer); - cdecl; external XPLM_DLL; + inIndex : integer); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMGetFMSEntryInfo - This routine returns information about a given FMS entry. If the entry is - an airport or navaid, a reference to a nav entry can be returned allowing - you to find additional information (such as a frequency, ILS heading, name, - etc.). Note that this reference can be XPLM_NAV_NOT_FOUND until the - information has been looked up asynchronously, so after flightplan changes, - it might take up to a second for this field to become populated. The other - information is available immediately. For a lat/lon entry, the lat/lon is - returned by this routine but the navaid cannot be looked up (and the - reference will be XPLM_NAV_NOT_FOUND). FMS name entry buffers should be at - least 256 chars in length. - - WARNING: Due to a bug in X-Plane prior to 11.31, the navaid reference will - not be set to XPLM_NAV_NOT_FOUND while no data is available, and instead - just remain the value of the variable that you passed the pointer to. - Therefore, always initialize the variable to XPLM_NAV_NOT_FOUND before - passing the pointer to this function. + This routine returns information about a given FMS entry. A reference to a + navaid can be returned allowing you to find additional information (such as + a frequency, ILS heading, name, etc.). Some information is available + immediately. For a lat/lon entry, the lat/lon is returned by this routine + but the navaid cannot be looked up (and the reference will be + XPLM_NAV_NOT_FOUND. FMS name entry buffers should be at least 256 chars in + length. } PROCEDURE XPLMGetFMSEntryInfo( - inIndex : Integer; + inIndex : integer; outType : PXPLMNavType; { Can be nil } - outID : XPLMString; { Can be nil } + outID : Pchar; { Can be nil } outRef : PXPLMNavRef; { Can be nil } - outAltitude : PInteger; { Can be nil } - outLat : PSingle; { Can be nil } - outLon : PSingle); { Can be nil } - cdecl; external XPLM_DLL; + outAltitude : Pinteger; { Can be nil } + outLat : Psingle; { Can be nil } + outLon : Psingle); { Can be nil } +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMSetFMSEntryInfo - This routine changes an entry in the FMS to have the destination navaid - passed in and the altitude specified. Use this only for airports, fixes, - and radio-beacon navaids. Currently of radio beacons, the FMS can only - support VORs and NDBs. Use the routines below to clear or fly to a lat/lon. + This routine changes an entry in the FMS to have the destination navaid + passed in and the altitude specified. Use this only for airports, fixes, + and radio-beacon navaids. Currently of radio beacons, the FMS can only + support VORs and NDBs. Use the routines below to clear or fly to a lat/lon. } PROCEDURE XPLMSetFMSEntryInfo( - inIndex : Integer; + inIndex : integer; inRef : XPLMNavRef; - inAltitude : Integer); - cdecl; external XPLM_DLL; + inAltitude : integer); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMSetFMSEntryLatLon - This routine changes the entry in the FMS to a lat/lon entry with the given - coordinates. + This routine changes the entry in the FMS to a lat/lon entry with the given + coordinates. } PROCEDURE XPLMSetFMSEntryLatLon( - inIndex : Integer; - inLat : Single; - inLon : Single; - inAltitude : Integer); - cdecl; external XPLM_DLL; + inIndex : integer; + inLat : single; + inLon : single; + inAltitude : integer); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMClearFMSEntry - This routine clears the given entry, potentially shortening the flight - plan. + This routine clears the given entry, potentially shortening the flight + plan. } PROCEDURE XPLMClearFMSEntry( - inIndex : Integer); - cdecl; external XPLM_DLL; + inIndex : integer); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} {___________________________________________________________________________ * GPS RECEIVER ___________________________________________________________________________} { - These APIs let you read data from the GPS unit. + These APIs let you read data from the GPS unit. } { XPLMGetGPSDestinationType - This routine returns the type of the currently selected GPS destination, - one of fix, airport, VOR or NDB. + This routine returns the type of the currently selected GPS destination, + one of fix, airport, VOR or NDB. } FUNCTION XPLMGetGPSDestinationType: XPLMNavType; - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMGetGPSDestination - This routine returns the current GPS destination. + This routine returns the current GPS destination. } FUNCTION XPLMGetGPSDestination: XPLMNavRef; - cdecl; external XPLM_DLL; - +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} IMPLEMENTATION - END. diff --git a/src/SDK/Delphi/XPLM/XPLMPlanes.pas b/src/SDK/Delphi/XPLM/XPLMPlanes.pas index 3801f0ac..bac0ef7d 100755 --- a/src/SDK/Delphi/XPLM/XPLMPlanes.pas +++ b/src/SDK/Delphi/XPLM/XPLMPlanes.pas @@ -1,158 +1,183 @@ { - 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 XPLMPlanes; INTERFACE { - The XPLMPlanes APIs allow you to control the various aircraft in X-Plane, - both the user's and the sim's. - - *Note*: unlike almost all other APIs in the SDK, aircraft paths are _full_ - file system paths for historical reasons. You'll need to prefix all - relative paths with the X-Plane path as accessed via XPLMGetSystemPath. + The XPLMPlanes APIs allow you to control the various aircraft in X-Plane, + both the user's and the sim's. } -USES - XPLMDefs; +USES XPLMDefs; {$A4} +{$IFDEF MSWINDOWS} + {$DEFINE DELPHI} +{$ENDIF} {___________________________________________________________________________ * USER AIRCRAFT ACCESS ___________________________________________________________________________} +{ + +} { XPLMSetUsersAircraft - This routine changes the user's aircraft. Note that this will reinitialize - the user to be on the nearest airport's first runway. Pass in a full path - (hard drive and everything including the .acf extension) to the .acf file. + This routine changes the user's aircraft. Note that this will reinitialize + the user to be on the nearest airport's first runway. Pass in a full path + (hard drive and everything including the .acf extension) to the .acf file. } PROCEDURE XPLMSetUsersAircraft( - inAircraftPath : XPLMString); - cdecl; external XPLM_DLL; + inAircraftPath : Pchar); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMPlaceUserAtAirport - This routine places the user at a given airport. Specify the airport by - its X-Plane airport ID (e.g. 'KBOS'). + This routine places the user at a given airport. Specify the airport by + its ICAO code (e.g. 'KBOS'). } PROCEDURE XPLMPlaceUserAtAirport( - inAirportCode : XPLMString); - cdecl; external XPLM_DLL; + inAirportCode : Pchar); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} {$IFDEF XPLM300} { XPLMPlaceUserAtLocation - Places the user at a specific location after performing any necessary - scenery loads. + Places the user at a specific location after performing any necessary + scenery loads. - As with in-air starts initiated from the X-Plane user interface, the - aircraft will always start with its engines running, regardless of the - user's preferences (i.e., regardless of what the dataref - `sim/operation/prefs/startup_running` says). + As with in-air starts initiated from the X-Plane user interface, the + aircraft will always start with its engines running, regardless of the + user's preferences (i.e., regardless of what the dataref + sim/operation/prefs/startup_running says). } PROCEDURE XPLMPlaceUserAtLocation( - latitudeDegrees : Real; - longitudeDegrees : Real; - elevationMetersMSL : Single; - headingDegreesTrue : Single; - speedMetersPerSecond: Single); - cdecl; external XPLM_DLL; -{$ENDIF XPLM300} + latitudeDegrees : real; + longitudeDegrees : real; + elevationMetersMSL : single; + headingDegreesTrue : single; + speedMetersPerSecond: single); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} +{$ENDIF} {___________________________________________________________________________ * GLOBAL AIRCRAFT ACCESS ___________________________________________________________________________} +{ + +} CONST - { The user's aircraft is always index 0. } + { The user's aircraft is always index 0. } XPLM_USER_AIRCRAFT = 0; -{$IFDEF XPLM_DEPRECATED} { XPLMPlaneDrawState_t - This structure contains additional plane parameter info to be passed to - draw plane. Make sure to fill in the size of the structure field with - sizeof(XPLMDrawPlaneState_t) so that the XPLM can tell how many fields you - knew about when compiling your plugin (since more fields may be added - later). + This structure contains additional plane parameter info to be passed to + draw plane. Make sure to fill in the size of the structure field with + sizeof(XPLMDrawPlaneState_t) so that the XPLM can tell how many fields you + knew about when compiling your plugin (since more fields may be added + later). - Most of these fields are ratios from 0 to 1 for control input. X-Plane - calculates what the actual controls look like based on the .acf file for - that airplane. Note for the yoke inputs, this is what the pilot of the - plane has commanded (post artificial stability system if there were one) - and affects aelerons, rudder, etc. It is not necessarily related to the - actual position of the plane! + Most of these fields are ratios from 0 to 1 for control input. X-Plane + calculates what the actual controls look like based on the .acf file for + that airplane. Note for the yoke inputs, this is what the pilot of the + plane has commanded (post artificial stability system if there were one) + and affects aelerons, rudder, etc. It is not necessarily related to the + actual position of the plane! } TYPE XPLMPlaneDrawState_t = RECORD - { The size of the draw state struct. } - structSize : Integer; - { A ratio from [0..1] describing how far the landing gear is extended. } - gearPosition : Single; - { Ratio of flap deployment, 0 = up, 1 = full deploy. } - flapRatio : Single; - { Ratio of spoiler deployment, 0 = none, 1 = full deploy. } - spoilerRatio : Single; - { Ratio of speed brake deployment, 0 = none, 1 = full deploy. } - speedBrakeRatio : Single; - { Ratio of slat deployment, 0 = none, 1 = full deploy. } - slatRatio : Single; - { Wing sweep ratio, 0 = forward, 1 = swept. } - wingSweep : Single; - { Thrust power, 0 = none, 1 = full fwd, -1 = full reverse. } - thrust : Single; - { Total pitch input for this plane. } - yokePitch : Single; - { Total Heading input for this plane. } - yokeHeading : Single; - { Total Roll input for this plane. } - yokeRoll : Single; + { The size of the draw state struct. } + structSize : integer; + { A ratio from [0..1] describing how far the landing gear is extended. } + gearPosition : single; + { Ratio of flap deployment, 0 = up, 1 = full deploy. } + flapRatio : single; + { Ratio of spoiler deployment, 0 = none, 1 = full deploy. } + spoilerRatio : single; + { Ratio of speed brake deployment, 0 = none, 1 = full deploy. } + speedBrakeRatio : single; + { Ratio of slat deployment, 0 = none, 1 = full deploy. } + slatRatio : single; + { Wing sweep ratio, 0 = forward, 1 = swept. } + wingSweep : single; + { Thrust power, 0 = none, 1 = full fwd, -1 = full reverse. } + thrust : single; + { Total pitch input for this plane. } + yokePitch : single; + { Total Heading input for this plane. } + yokeHeading : single; + { Total Roll input for this plane. } + yokeRoll : single; END; PXPLMPlaneDrawState_t = ^XPLMPlaneDrawState_t; -{$ENDIF XPLM_DEPRECATED} { XPLMCountAircraft - This function returns the number of aircraft X-Plane is capable of having, - as well as the number of aircraft that are currently active. These numbers - count the user's aircraft. It can also return the plugin that is currently - controlling aircraft. In X-Plane 7, this routine reflects the number of - aircraft the user has enabled in the rendering options window. + This function returns the number of aircraft X-Plane is capable of having, + as well as the number of aircraft that are currently active. These numbers + count the user's aircraft. It can also return the plugin that is currently + controlling aircraft. In X-Plane 7, this routine reflects the number of + aircraft the user has enabled in the rendering options window. } PROCEDURE XPLMCountAircraft( - outTotalAircraft : PInteger; - outActiveAircraft : PInteger; + outTotalAircraft : Pinteger; + outActiveAircraft : Pinteger; outController : PXPLMPluginID); - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMGetNthAircraftModel - This function returns the aircraft model for the Nth aircraft. Indices are - zero based, with zero being the user's aircraft. The file name should be - at least 256 chars in length; the path should be at least 512 chars in - length. + This function returns the aircraft model for the Nth aircraft. Indices are + zero based, with zero being the user's aircraft. The file name should be + at least 256 chars in length; the path should be at least 512 chars in + length. } PROCEDURE XPLMGetNthAircraftModel( - inIndex : Integer; - outFileName : XPLMString; - outPath : XPLMString); - cdecl; external XPLM_DLL; + inIndex : integer; + outFileName : Pchar; + outPath : Pchar); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} {___________________________________________________________________________ * EXCLUSIVE AIRCRAFT ACCESS ___________________________________________________________________________} { - The following routines require exclusive access to the airplane APIs. Only - one plugin may have this access at a time. + The following routines require exclusive access to the airplane APIs. Only + one plugin may have this access at a time. } { XPLMPlanesAvailable_f - Your airplanes available callback is called when another plugin gives up - access to the multiplayer planes. Use this to wait for access to - multiplayer. + Your airplanes available callback is called when another plugin gives up + access to the multiplayer planes. Use this to wait for access to + multiplayer. } TYPE XPLMPlanesAvailable_f = PROCEDURE( @@ -161,118 +186,130 @@ { XPLMAcquirePlanes - XPLMAcquirePlanes grants your plugin exclusive access to the aircraft. It - returns 1 if you gain access, 0 if you do not. - - inAircraft - pass in an array of pointers to strings specifying the planes - you want loaded. For any plane index you do not want loaded, pass a - 0-length string. Other strings should be full paths with the .acf - extension. NULL terminates this array, or pass NULL if there are no planes - you want loaded. - - If you pass in a callback and do not receive access to the planes your - callback will be called when the airplanes are available. If you do receive - airplane access, your callback will not be called. + XPLMAcquirePlanes grants your plugin exclusive access to the aircraft. It + returns 1 if you gain access, 0 if you do not. inAircraft - pass in an + array of pointers to strings specifying the planes you want loaded. For + any plane index you do not want loaded, pass a 0-length string. Other + strings should be full paths with the .acf extension. NULL terminates this + array, or pass NULL if there are no planes you want loaded. If you pass in + a callback and do not receive access to the planes your callback will be + called when the airplanes are available. If you do receive airplane access, + your callback will not be called. } FUNCTION XPLMAcquirePlanes( - inAircraft : PXPLMString; { Can be nil } + inAircraft : PPchar; { Can be nil } inCallback : XPLMPlanesAvailable_f; - inRefcon : pointer) : Integer; - cdecl; external XPLM_DLL; + inRefcon : pointer) : integer; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMReleasePlanes - Call this function to release access to the planes. Note that if you are - disabled, access to planes is released for you and you must reacquire it. + Call this function to release access to the planes. Note that if you are + disabled, access to planes is released for you and you must reacquire it. } PROCEDURE XPLMReleasePlanes; - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMSetActiveAircraftCount - This routine sets the number of active planes. If you pass in a number - higher than the total number of planes availables, only the total number of - planes available is actually used. + This routine sets the number of active planes. If you pass in a number + higher than the total number of planes availables, only the total number of + planes available is actually used. } PROCEDURE XPLMSetActiveAircraftCount( - inCount : Integer); - cdecl; external XPLM_DLL; + inCount : integer); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMSetAircraftModel - This routine loads an aircraft model. It may only be called if you have - exclusive access to the airplane APIs. Pass in the path of the model with - the .acf extension. The index is zero based, but you may not pass in 0 - (use XPLMSetUsersAircraft to load the user's aircracft). + This routine loads an aircraft model. It may only be called if you have + exclusive access to the airplane APIs. Pass in the path of the model with + the .acf extension. The index is zero based, but you may not pass in 0 + (use XPLMSetUsersAircraft to load the user's aircracft). } PROCEDURE XPLMSetAircraftModel( - inIndex : Integer; - inAircraftPath : XPLMString); - cdecl; external XPLM_DLL; + inIndex : integer; + inAircraftPath : Pchar); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMDisableAIForPlane - This routine turns off X-Plane's AI for a given plane. The plane will - continue to draw and be a real plane in X-Plane, but will not move itself. + This routine turns off X-Plane's AI for a given plane. The plane will + continue to draw and be a real plane in X-Plane, but will not move itself. } PROCEDURE XPLMDisableAIForPlane( - inPlaneIndex : Integer); - cdecl; external XPLM_DLL; + inPlaneIndex : integer); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} -{$IFDEF XPLM_DEPRECATED} { XPLMDrawAircraft - WARNING: Aircraft drawing via this API is deprecated and will not work in - future versions of X-Plane. Use XPLMInstance for 3-d drawing of custom - aircraft models. - - This routine draws an aircraft. It can only be called from a 3-d drawing - callback. Pass in the position of the plane in OpenGL local coordinates - and the orientation of the plane. A 1 for full drawing indicates that the - whole plane must be drawn; a 0 indicates you only need the nav lights - drawn. (This saves rendering time when planes are far away.) + This routine draws an aircraft. It can only be called from a 3-d drawing + callback. Pass in the position of the plane in OpenGL local coordinates + and the orientation of the plane. A 1 for full drawing indicates that the + whole plane must be drawn; a 0 indicates you only need the nav lights + drawn. (This saves rendering time when planes are far away.) } PROCEDURE XPLMDrawAircraft( - inPlaneIndex : Integer; - inX : Single; - inY : Single; - inZ : Single; - inPitch : Single; - inRoll : Single; - inYaw : Single; - inFullDraw : Integer; + inPlaneIndex : integer; + inX : single; + inY : single; + inZ : single; + inPitch : single; + inRoll : single; + inYaw : single; + inFullDraw : integer; inDrawStateInfo : PXPLMPlaneDrawState_t); - cdecl; external XPLM_DLL; -{$ENDIF XPLM_DEPRECATED} +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} -{$IFDEF XPLM_DEPRECATED} { XPLMReinitUsersPlane - WARNING: DO NOT USE. Use XPLMPlaceUserAtAirport or - XPLMPlaceUserAtLocation. + This function recomputes the derived flight model data from the aircraft + structure in memory. If you have used the data access layer to modify the + aircraft structure, use this routine to resynchronize X-Plane; since + X-Plane works at least partly from derived values, the sim will not behave + properly until this is called. - This function recomputes the derived flight model data from the aircraft - structure in memory. If you have used the data access layer to modify the - aircraft structure, use this routine to resynchronize X-Plane; since - X-Plane works at least partly from derived values, the sim will not behave - properly until this is called. - - WARNING: this routine does not necessarily place the airplane at the - airport; use XPLMSetUsersAircraft to be compatible. This routine is - provided to do special experimentation with flight models without resetting - flight. + WARNING: this routine does not necessarily place the airplane at the + airport; use XPLMSetUsersAircraft to be compatible. This routine is + provided to do special experimentation with flight models without resetting + flight. } PROCEDURE XPLMReinitUsersPlane; - cdecl; external XPLM_DLL; -{$ENDIF XPLM_DEPRECATED} - +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} IMPLEMENTATION - END. diff --git a/src/SDK/Delphi/XPLM/XPLMPlugin.pas b/src/SDK/Delphi/XPLM/XPLMPlugin.pas index 83fbb736..d61ca83e 100755 --- a/src/SDK/Delphi/XPLM/XPLMPlugin.pas +++ b/src/SDK/Delphi/XPLM/XPLMPlugin.pas @@ -1,413 +1,390 @@ { - 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 XPLMPlugin; INTERFACE { - These APIs provide facilities to find and work with other plugins and - manage other plugins. + These APIs provide facilities to find and work with other plugins and + manage other plugins. } -USES - XPLMDefs; +USES XPLMDefs; {$A4} +{$IFDEF MSWINDOWS} + {$DEFINE DELPHI} +{$ENDIF} {___________________________________________________________________________ * FINDING PLUGINS ___________________________________________________________________________} { - These APIs allow you to find another plugin or yourself, or iterate across - all plugins. For example, if you wrote an FMS plugin that needed to talk - to an autopilot plugin, you could use these APIs to locate the autopilot - plugin. + These APIs allow you to find another plugin or yourself, or iterate across + all plugins. For example, if you wrote an FMS plugin that needed to talk + to an autopilot plugin, you could use these APIs to locate the autopilot + plugin. } { XPLMGetMyID - This routine returns the plugin ID of the calling plug-in. Call this to - get your own ID. + This routine returns the plugin ID of the calling plug-in. Call this to + get your own ID. } FUNCTION XPLMGetMyID: XPLMPluginID; - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMCountPlugins - This routine returns the total number of plug-ins that are loaded, both - disabled and enabled. + This routine returns the total number of plug-ins that are loaded, both + disabled and enabled. } - FUNCTION XPLMCountPlugins: Integer; - cdecl; external XPLM_DLL; + FUNCTION XPLMCountPlugins: integer; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMGetNthPlugin - This routine returns the ID of a plug-in by index. Index is 0 based from 0 - to XPLMCountPlugins-1, inclusive. Plugins may be returned in any arbitrary - order. + This routine returns the ID of a plug-in by index. Index is 0 based from 0 + to XPLMCountPlugins-1, inclusive. Plugins may be returned in any arbitrary + order. } FUNCTION XPLMGetNthPlugin( - inIndex : Integer) : XPLMPluginID; - cdecl; external XPLM_DLL; + inIndex : integer) : XPLMPluginID; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMFindPluginByPath - This routine returns the plug-in ID of the plug-in whose file exists at the - passed in absolute file system path. XPLM_NO_PLUGIN_ID is returned if the - path does not point to a currently loaded plug-in. + This routine returns the plug-in ID of the plug-in whose file exists at the + passed in absolute file system path. XPLM_NO_PLUGIN_ID is returned if the + path does not point to a currently loaded plug-in. } FUNCTION XPLMFindPluginByPath( - inPath : XPLMString) : XPLMPluginID; - cdecl; external XPLM_DLL; + inPath : Pchar) : XPLMPluginID; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMFindPluginBySignature - This routine returns the plug-in ID of the plug-in whose signature matches - what is passed in or XPLM_NO_PLUGIN_ID if no running plug-in has this - signature. Signatures are the best way to identify another plug-in as they - are independent of the file system path of a plug-in or the human-readable - plug-in name, and should be unique for all plug-ins. Use this routine to - locate another plugin that your plugin interoperates with + This routine returns the plug-in ID of the plug-in whose signature matches + what is passed in or XPLM_NO_PLUGIN_ID if no running plug-in has this + signature. Signatures are the best way to identify another plug-in as they + are independent of the file system path of a plug-in or the human-readable + plug-in name, and should be unique for all plug-ins. Use this routine to + locate another plugin that your plugin interoperates with } FUNCTION XPLMFindPluginBySignature( - inSignature : XPLMString) : XPLMPluginID; - cdecl; external XPLM_DLL; + inSignature : Pchar) : XPLMPluginID; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMGetPluginInfo - This routine returns information about a plug-in. Each parameter should be - a pointer to a buffer of at least - 256 characters, or NULL to not receive the information. + This routine returns information about a plug-in. Each parameter should be + a pointer to a buffer of at least 256 characters, or NULL to not receive + the information. - outName - the human-readable name of the plug-in. outFilePath - the - absolute file path to the file that contains this plug-in. outSignature - a - unique string that identifies this plug-in. outDescription - a - human-readable description of this plug-in. + outName - the human-readable name of the plug-in. outFilePath - the + absolute file path to the file that contains this plug-in. outSignature - a + unique string that identifies this plug-in. outDescription - a + human-readable description of this plug-in. } PROCEDURE XPLMGetPluginInfo( inPlugin : XPLMPluginID; - outName : XPLMString; { Can be nil } - outFilePath : XPLMString; { Can be nil } - outSignature : XPLMString; { Can be nil } - outDescription : XPLMString); { Can be nil } - cdecl; external XPLM_DLL; + outName : Pchar; { Can be nil } + outFilePath : Pchar; { Can be nil } + outSignature : Pchar; { Can be nil } + outDescription : Pchar); { Can be nil } +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} {___________________________________________________________________________ * ENABLING/DISABLING PLUG-INS ___________________________________________________________________________} { - These routines are used to work with plug-ins and manage them. Most - plugins will not need to use these APIs. + These routines are used to work with plug-ins and manage them. Most + plugins will not need to use these APIs. } { XPLMIsPluginEnabled - Returns whether the specified plug-in is enabled for running. + Returns whether the specified plug-in is enabled for running. } FUNCTION XPLMIsPluginEnabled( - inPluginID : XPLMPluginID) : Integer; - cdecl; external XPLM_DLL; + inPluginID : XPLMPluginID) : integer; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMEnablePlugin - This routine enables a plug-in if it is not already enabled. It returns 1 - if the plugin was enabled or successfully enables itself, 0 if it does not. - Plugins may fail to enable (for example, if resources cannot be acquired) - by returning 0 from their XPluginEnable callback. + This routine enables a plug-in if it is not already enabled. It returns 1 + if the plugin was enabled or successfully enables itself, 0 if it does not. + Plugins may fail to enable (for example, if resources cannot be acquired) + by returning 0 from their XPluginEnable callback. } FUNCTION XPLMEnablePlugin( - inPluginID : XPLMPluginID) : Integer; - cdecl; external XPLM_DLL; + inPluginID : XPLMPluginID) : integer; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMDisablePlugin - This routine disableds an enabled plug-in. + This routine disableds an enabled plug-in. } PROCEDURE XPLMDisablePlugin( inPluginID : XPLMPluginID); - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMReloadPlugins - This routine reloads all plug-ins. Once this routine is called and you - return from the callback you were within (e.g. a menu select callback) you - will receive your XPluginDisable and XPluginStop callbacks and your DLL - will be unloaded, then the start process happens as if the sim was starting - up. + This routine reloads all plug-ins. Once this routine is called and you + return from the callback you were within (e.g. a menu select callback) you + will receive your XPluginDisable and XPluginStop callbacks and your DLL + will be unloaded, then the start process happens as if the sim was starting + up. } PROCEDURE XPLMReloadPlugins; - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} {___________________________________________________________________________ * INTERPLUGIN MESSAGING ___________________________________________________________________________} { - Plugin messages are defined as 32-bit integers. Messages below 0x00FFFFFF - are reserved for X-Plane and the plugin SDK. - - Messages come with a pointer parameter; the meaning of this pointer depends - on the message itself. In some messages, the pointer parameter contains an - actual typed pointer to data that can be inspected in the plugin; in these - cases the documentation will state that the parameter "points to" - information. - - in other cases, the value of the pointer is actually an integral number - stuffed into the pointer's storage. In these second cases, the pointer - parameter needs to be cast, not dereferenced. In these caess, the - documentation will state that the parameter "contains" a value, which will - always be an integral type. + Plugin messages are defined as 32-bit integers. Messages below 0x00FFFFFF + are reserved for X-Plane and the plugin SDK. - Some messages don't use the pointer parameter - in this case your plugin - should ignore it. + Messages have two conceptual uses: notifications and commands. Commands + are sent from one plugin to another to induce behavior; notifications are + sent from one plugin to all others for informational purposes. It is + important that commands and notifications not have the same values because + this could cause a notification sent by one plugin to accidentally induce a + command in another. - Messages have two conceptual uses: notifications and commands. Commands - are sent from one plugin to another to induce behavior; notifications are - sent from one plugin to all others for informational purposes. It is - important that commands and notifications not have the same values because - this could cause a notification sent by one plugin to accidentally induce a - command in another. + By convention, plugin-defined notifications should have the high bit set + (e.g. be greater or equal to unsigned 0x8000000) while commands should have + this bit be cleared. - By convention, plugin-defined notifications should have the high bit set - (e.g. be greater or equal to unsigned 0x8000000) while commands should have - this bit be cleared. - - The following messages are sent to your plugin by X-Plane. + The following messages are sent to your plugin by X-Plane. } CONST - { This message is sent to your plugin whenever the user's plane crashes. The } - { parameter is ignored. } + { This message is sent to your plugin whenever the user's plane crashes. } XPLM_MSG_PLANE_CRASHED = 101; - { This message is sent to your plugin whenever a new plane is loaded. The } - { parameter contains the index number of the plane being loaded; 0 indicates } - { the user's plane. } + { This message is sent to your plugin whenever a new plane is loaded. The } + { parameter is the number of the plane being loaded; 0 indicates the user's } + { plane. } XPLM_MSG_PLANE_LOADED = 102; - { This messages is sent whenever the user's plane is positioned at a new } - { airport. The parameter is ignored. } + { This messages is called whenever the user's plane is positioned at a new } + { airport. } XPLM_MSG_AIRPORT_LOADED = 103; - { This message is sent whenever new scenery is loaded. Use datarefs to } - { determine the new scenery files that were loaded. The parameter is ignored.} + { This message is sent whenever new scenery is loaded. Use datarefs to } + { determine the new scenery files that were loaded. } XPLM_MSG_SCENERY_LOADED = 104; - { This message is sent whenever the user adjusts the number of X-Plane } - { aircraft models. You must use XPLMCountPlanes to find out how many planes } - { are now available. This message will only be sent in XP7 and higher } - { because in XP6 the number of aircraft is not user-adjustable. The parameter} - { is ignored. } + { This message is sent whenever the user adjusts the number of X-Plane } + { aircraft models. You must use XPLMCountPlanes to find out how many planes } + { are now available. This message will only be sent in XP7 and higher } + { because in XP6 the number of aircraft is not user-adjustable. } XPLM_MSG_AIRPLANE_COUNT_CHANGED = 105; {$IFDEF XPLM200} -CONST - { This message is sent to your plugin whenever a plane is unloaded. The } - { parameter contains the index number of the plane being unloaded; 0 } - { indicates the user's plane. The parameter is of type int, passed as the } - { value of the pointer. (That is: the parameter is an int, not a pointer to } - { an int.) } + { This message is sent to your plugin whenever a plane is unloaded. The } + { parameter is the number of the plane being unloaded; 0 indicates the user's } + { plane. The parameter is of type int, passed as the value of the pointer. } + { (That is: the parameter is an int, not a pointer to an int.) } XPLM_MSG_PLANE_UNLOADED = 106; -{$ENDIF XPLM200} +{$ENDIF} {$IFDEF XPLM210} -CONST - { This message is sent to your plugin right before X-Plane writes its } - { preferences file. You can use this for two purposes: to write your own } - { preferences, and to modify any datarefs to influence preferences output. } - { For example, if your plugin temporarily modifies saved preferences, you can} - { put them back to their default values here to avoid having the tweaks be } - { persisted if your plugin is not loaded on the next invocation of X-Plane. } - { The parameter is ignored. } + { This message is sent to your plugin right before X-Plane writes its } + { preferences file. You can use this for two purposes: to write your own } + { preferences, and to modify any datarefs to influence preferences output. } + { For example, if your plugin temporarily modifies saved preferences, you can } + { put them back to their default values here to avoid having the tweaks be } + { persisted if your plugin is not loaded on the next invocation of X-Plane. } XPLM_MSG_WILL_WRITE_PREFS = 107; -{$ENDIF XPLM210} +{$ENDIF} {$IFDEF XPLM210} - { This message is sent to your plugin right after a livery is loaded for an } - { airplane. You can use this to check the new livery (via datarefs) and } - { react accordingly. The parameter contains the index number of the aircraft} - { whose livery is changing. } + { This message is sent to your plugin right after a livery is loaded for an } + { airplane. You can use this to check the new livery (via datarefs) and } + { react accordingly. The parameter is of type int, passed as the value of a } + { pointer and represents the aicraft plane number - 0 is the user's plane. } XPLM_MSG_LIVERY_LOADED = 108; -{$ENDIF XPLM210} +{$ENDIF} {$IFDEF XPLM301} -CONST - { Sent to your plugin right before X-Plane enters virtual reality mode (at } - { which time any windows that are not positioned in VR mode will no longer be} - { visible to the user). The parameter is unused and should be ignored. } + { Sent to your plugin right before X-Plane enters virtual reality mode (at } + { which time any windows that are not positioned in VR mode will no longer be } + { visible to the user). } XPLM_MSG_ENTERED_VR = 109; -{$ENDIF XPLM301} +{$ENDIF} {$IFDEF XPLM301} - { Sent to your plugin right before X-Plane leaves virtual reality mode (at } - { which time you may want to clean up windows that are positioned in VR } - { mode). The parameter is unused and should be ignored. } + { Sent to your plugin right before X-Plane leaves virtual reality mode (at } + { which time you may want to clean up windows that are positioned in VR } + { mode). } XPLM_MSG_EXITING_VR = 110; -{$ENDIF XPLM301} - -{$IFDEF XPLM303} -CONST - { Sent to your plugin if another plugin wants to take over AI planes. If you } - { are a synthetic traffic provider, that probably means a plugin for an } - { online network has connected and wants to supply aircraft flown by real } - { humans and you should cease to provide synthetic traffic. If however you } - { are providing online traffic from real humans, you probably don't want to } - { disconnect, in which case you just ignore this message. The sender is the } - { plugin ID of the plugin asking for control of the planes now. You can use } - { it to find out who is requesting and whether you should yield to them. } - { Synthetic traffic providers should always yield to online networks. The } - { parameter is unused and should be ignored. } - XPLM_MSG_RELEASE_PLANES = 111; -{$ENDIF XPLM303} +{$ENDIF} { XPLMSendMessageToPlugin - This function sends a message to another plug-in or X-Plane. Pass - XPLM_NO_PLUGIN_ID to broadcast to all plug-ins. Only enabled plug-ins with - a message receive function receive the message. + This function sends a message to another plug-in or X-Plane. Pass + XPLM_NO_PLUGIN_ID to broadcast to all plug-ins. Only enabled plug-ins with + a message receive function receive the message. } PROCEDURE XPLMSendMessageToPlugin( inPlugin : XPLMPluginID; - inMessage : Integer; + inMessage : integer; inParam : pointer); - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} {$IFDEF XPLM200} {___________________________________________________________________________ * Plugin Features API ___________________________________________________________________________} { - The plugin features API allows your plugin to "sign up" for additional - capabilities and plugin system features that are normally disabled for - backward compatibility. This allows advanced plugins to "opt-in" to new - behavior. - - Each feature is defined by a permanent string name. The feature string - names will vary with the particular installation of X-Plane, so plugins - should not expect a feature to be guaranteed present. - - XPLM_WANTS_REFLECTIONS - ---------------------- - - Available in the SDK 2.0 and later for X-Plane 9, enabling this capability - causes your plugin to receive drawing hook callbacks when X-Plane builds - its off-screen reflection and shadow rendering passes. Plugins should - enable this and examine the dataref sim/graphics/view/plane_render_type to - determine whether the drawing callback is for a reflection, shadow - calculation, or the main screen. Rendering can be simlified or omitted for - reflections, and non-solid drawing should be skipped for shadow - calculations. + The plugin features API allows your plugin to "sign up" for additional + capabilities and plugin system features that are normally disabled for + backward compatibility. This allows advanced plugins to "opt-in" to new + behavior. - **Note**: direct drawing via draw callbacks is not recommended; use the - XPLMInstance API to create object models instead. - - XPLM_USE_NATIVE_PATHS - --------------------- - - available in the SDK 2.1 and later for X-Plane 10, this modifies the plugin - system to use Unix-style paths on all operating systems. With this enabled: - - * OS X paths will match the native OS X Unix. - * Windows will use forward slashes but preserve C:\ or another drive letter - when using complete file paths. - * Linux uses its native file system path scheme. - - Without this enabled: - - * OS X will use CFM file paths separated by a colon. - * Windows will use back-slashes and conventional DOS paths. - * Linux uses its native file system path scheme. - - All plugins should enable this feature on OS X to access the native file - system. - - XPLM_USE_NATIVE_WIDGET_WINDOWS - ------------------------------ - - Available in the SDK 3.0.2 SDK, this capability tells the widgets library - to use new, modern X-Plane backed XPLMDisplay windows to anchor all widget - trees. Without it, widgets will always use legacy windows. - - Plugins should enable this to allow their widget hierarchies to respond to - the user's UI size settings and to map widget-based windwos to a VR HMD. - - Before enabling this, make sure any custom widget code in your plugin is - prepared to cope with the UI coordinate system not being th same as the - OpenGL window coordinate system. + Each feature is defined by a permanent string name. The feature string + names will vary with the particular installation of X-Plane, so plugins + should not expect a feature to be guaranteed present. } { XPLMFeatureEnumerator_f - You pass an XPLMFeatureEnumerator_f to get a list of all features supported - by a given version running version of X-Plane. This routine is called once - for each feature. + You pass an XPLMFeatureEnumerator_f to get a list of all features supported + by a given version running version of X-Plane. This routine is called once + for each feature. } TYPE XPLMFeatureEnumerator_f = PROCEDURE( - inFeature : XPLMString; + inFeature : Pchar; inRef : pointer); cdecl; { XPLMHasFeature - This returns 1 if the given installation of X-Plane supports a feature, or - 0 if it does not. + This returns 1 if the given installation of X-Plane supports a feature, or + 0 if it does not. } FUNCTION XPLMHasFeature( - inFeature : XPLMString) : Integer; - cdecl; external XPLM_DLL; + inFeature : Pchar) : integer; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMIsFeatureEnabled - This returns 1 if a feature is currently enabled for your plugin, or 0 if - it is not enabled. It is an error to call this routine with an unsupported - feature. + This returns 1 if a feature is currently enabled for your plugin, or 0 if + it is not enabled. It is an error to call this routine with an unsupported + feature. } FUNCTION XPLMIsFeatureEnabled( - inFeature : XPLMString) : Integer; - cdecl; external XPLM_DLL; + inFeature : Pchar) : integer; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMEnableFeature - This routine enables or disables a feature for your plugin. This will - change the running behavior of X-Plane and your plugin in some way, - depending on the feature. + This routine enables or disables a feature for your plugin. This will + change the running behavior of X-Plane and your plugin in some way, + depending on the feature. } PROCEDURE XPLMEnableFeature( - inFeature : XPLMString; - inEnable : Integer); - cdecl; external XPLM_DLL; + inFeature : Pchar; + inEnable : integer); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMEnumerateFeatures - This routine calls your enumerator callback once for each feature that this - running version of X-Plane supports. Use this routine to determine all of - the features that X-Plane can support. + This routine calls your enumerator callback once for each feature that this + running version of X-Plane supports. Use this routine to determine all of + the features that X-Plane can support. } PROCEDURE XPLMEnumerateFeatures( inEnumerator : XPLMFeatureEnumerator_f; inRef : pointer); - cdecl; external XPLM_DLL; - -{$ENDIF XPLM200} +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} +{$ENDIF} IMPLEMENTATION - END. diff --git a/src/SDK/Delphi/XPLM/XPLMProcessing.pas b/src/SDK/Delphi/XPLM/XPLMProcessing.pas index e09b6e56..b2925c36 100755 --- a/src/SDK/Delphi/XPLM/XPLMProcessing.pas +++ b/src/SDK/Delphi/XPLM/XPLMProcessing.pas @@ -1,254 +1,274 @@ { - 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 XPLMProcessing; INTERFACE { - This API allows you to get regular callbacks during the flight loop, the - part of X-Plane where the plane's position calculates the physics of - flight, etc. Use these APIs to accomplish periodic tasks like logging data - and performing I/O. - - You can receive a callback either just before or just after the per-frame - physics calculations happen - you can use post-FM callbacks to "patch" the - flight model after it has run. + This API allows you to get regular callbacks during the flight loop, the + part of X-Plane where the plane's position calculates the physics of + flight, etc. Use these APIs to accomplish periodic tasks like logging data + and performing I/O. - If the user has set the number of flight model iterations per frame greater - than one your plugin will _not_ see this; these integrations run on the - sub-section of the flight model where iterations improve responsiveness - (e.g. physical integration, not simple systems tracking) and are thus - opaque to plugins. - - Flight loop scheduling, when scheduled by time, is scheduled by a "first - callback after the deadline" schedule, e.g. your callbacks will always be - slightly late to ensure that we don't run faster than your deadline. - - WARNING: Do NOT use these callbacks to draw! You cannot draw during flight - loop callbacks. Use the drawing callbacks (see XPLMDisplay for more info) - for graphics. (One exception: you can use a post-flight loop callback to - update your own off-screen FBOs.) + WARNING: Do NOT use these callbacks to draw! You cannot draw during flight + loop callbacks. Use the drawing callbacks (see XPLMDisplay for more info) + for graphics. } -USES - XPLMDefs; +USES XPLMDefs; {$A4} +{$IFDEF MSWINDOWS} + {$DEFINE DELPHI} +{$ENDIF} {___________________________________________________________________________ * FLIGHT LOOP CALLBACKS ___________________________________________________________________________} +{ + +} {$IFDEF XPLM210} { XPLMFlightLoopPhaseType - You can register a flight loop callback to run either before or after the - flight model is integrated by X-Plane. + You can register a flight loop callback to run either before or after the + flight model is integrated by X-Plane. } TYPE XPLMFlightLoopPhaseType = ( - { Your callback runs before X-Plane integrates the flight model. } + { Your callback runs before X-Plane integrates the flight model. } xplm_FlightLoop_Phase_BeforeFlightModel = 0 - { Your callback runs after X-Plane integrates the flight model. } + { Your callback runs after X-Plane integrates the flight model. } ,xplm_FlightLoop_Phase_AfterFlightModel = 1 ); PXPLMFlightLoopPhaseType = ^XPLMFlightLoopPhaseType; -{$ENDIF XPLM210} +{$ENDIF} {$IFDEF XPLM210} { XPLMFlightLoopID - This is an opaque identifier for a flight loop callback. You can use this - identifier to easily track and remove your callbacks, or to use the new - flight loop APIs. + This is an opaque identifier for a flight loop callback. You can use this + identifier to easily track and remove your callbacks, or to use the new + flight loop APIs. } XPLMFlightLoopID = pointer; PXPLMFlightLoopID = ^XPLMFlightLoopID; -{$ENDIF XPLM210} +{$ENDIF} { XPLMFlightLoop_f - This is your flight loop callback. Each time the flight loop is iterated - through, you receive this call at the end. - - Flight loop callbacks receive a number of input timing parameters. These - input timing parameters are not particularly useful; you may need to track - your own timing data (e.g. by reading datarefs). The input parameters are: - - - inElapsedSinceLastCall: the wall time since your last callback. - - inElapsedTimeSinceLastFlightLoop: the wall time since any flight loop was - dispatched. - - inCounter: a monotonically increasing counter, bumped once per flight - loop dispatch from the sim. - - inRefcon: your own ptr constant from when you regitered yor callback. + This is your flight loop callback. Each time the flight loop is iterated + through, you receive this call at the end. You receive a time since you + were last called and a time since the last loop, as well as a loop counter. + The 'phase' parameter is deprecated and should be ignored. - Your return value controls when you will next be called. + Your return value controls when you will next be called. Return 0 to stop + receiving callbacks. Pass a positive number to specify how many seconds + until the next callback. (You will be called at or after this time, not + before.) Pass a negative number to specify how many loops must go by until + you are called. For example, -1.0 means call me the very next loop. Try to + run your flight loop as infrequently as is practical, and suspend it (using + return value 0) when you do not need it; lots of flight loop callbacks that + do nothing lowers X-Plane's frame rate. - - Return 0 to stop receiving callbacks. - - Pass a positive number to specify how many seconds until the next - callback. (You will be called at or after this time, not before.) - - Pass a negative number to specify how many loops must go by until you - are called. For example, -1.0 means call me the very next loop. + Your callback will NOT be unregistered if you return 0; it will merely be + inactive. - Try to run your flight loop as infrequently as is practical, and suspend it - (using return value 0) when you do not need it; lots of flight loop - callbacks that do nothing lowers X-Plane's frame rate. - - Your callback will NOT be unregistered if you return 0; it will merely be - inactive. + The reference constant you passed to your loop is passed back to you. } -TYPE XPLMFlightLoop_f = FUNCTION( - inElapsedSinceLastCall: Single; - inElapsedTimeSinceLastFlightLoop: Single; - inCounter : Integer; - inRefcon : pointer) : Single; cdecl; + inElapsedSinceLastCall: single; + inElapsedTimeSinceLastFlightLoop: single; + inCounter : integer; + inRefcon : pointer) : single; cdecl; {$IFDEF XPLM210} { XPLMCreateFlightLoop_t - XPLMCreateFlightLoop_t contains the parameters to create a new flight loop - callback. The strsucture can be expanded in future SDKs - always set - structSize to the size of your structure in bytes. + XPLMCreateFlightLoop_t contains the parameters to create a new flight loop + callback. The strsucture can be expanded in future SDKs - always set + structSize to the size of your structure in bytes. } -TYPE XPLMCreateFlightLoop_t = RECORD - structSize : Integer; + structSize : integer; phase : XPLMFlightLoopPhaseType; callbackFunc : XPLMFlightLoop_f; refcon : pointer; END; PXPLMCreateFlightLoop_t = ^XPLMCreateFlightLoop_t; -{$ENDIF XPLM210} +{$ENDIF} { XPLMGetElapsedTime - This routine returns the elapsed time since the sim started up in decimal - seconds. This is a wall timer; it keeps counting upward even if the sim is - pasued. - - __WARNING__: XPLMGetElapsedTime is not a very good timer! It lacks - precision in both its data type and its source. Do not attempt to use it - for timing critical applications like network multiplayer. + This routine returns the elapsed time since the sim started up in decimal + seconds. } - FUNCTION XPLMGetElapsedTime: Single; - cdecl; external XPLM_DLL; + FUNCTION XPLMGetElapsedTime: single; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMGetCycleNumber - This routine returns a counter starting at zero for each sim cycle - computed/video frame rendered. + This routine returns a counter starting at zero for each sim cycle + computed/video frame rendered. } - FUNCTION XPLMGetCycleNumber: Integer; - cdecl; external XPLM_DLL; + FUNCTION XPLMGetCycleNumber: integer; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMRegisterFlightLoopCallback - This routine registers your flight loop callback. Pass in a pointer to a - flight loop function and a refcon. inInterval defines when you will be - called. Pass in a positive number to specify seconds from registration time - to the next callback. Pass in a negative number to indicate when you will - be called (e.g. pass -1 to be called at the next cylcle). Pass 0 to not be - called; your callback will be inactive. - - (This legacy function only installs pre-flight-loop callbacks; use - XPLMCreateFlightLoop for more control.) + This routine registers your flight loop callback. Pass in a pointer to a + flight loop function and a refcon. inInterval defines when you will be + called. Pass in a positive number to specify seconds from registration time + to the next callback. Pass in a negative number to indicate when you will + be called (e.g. pass -1 to be called at the next cylcle). Pass 0 to not be + called; your callback will be inactive. } PROCEDURE XPLMRegisterFlightLoopCallback( inFlightLoop : XPLMFlightLoop_f; - inInterval : Single; + inInterval : single; inRefcon : pointer); - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMUnregisterFlightLoopCallback - This routine unregisters your flight loop callback. Do NOT call it from - your flight loop callback. Once your flight loop callback is unregistered, - it will not be called again. - - Only use this on flight loops registered via - XPLMRegisterFlightLoopCallback. + This routine unregisters your flight loop callback. Do NOT call it from + your flight loop callback. Once your flight loop callback is unregistered, + it will not be called again. } PROCEDURE XPLMUnregisterFlightLoopCallback( inFlightLoop : XPLMFlightLoop_f; inRefcon : pointer); - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMSetFlightLoopCallbackInterval - This routine sets when a callback will be called. Do NOT call it from your - callback; use the return value of the callback to change your callback - interval from inside your callback. + This routine sets when a callback will be called. Do NOT call it from your + callback; use the return value of the callback to change your callback + interval from inside your callback. - inInterval is formatted the same way as in XPLMRegisterFlightLoopCallback; - positive for seconds, negative for cycles, and 0 for deactivating the - callback. If inRelativeToNow is 1, times are from the time of this call; - otherwise they are from the time the callback was last called (or the time - it was registered if it has never been called. + inInterval is formatted the same way as in XPLMRegisterFlightLoopCallback; + positive for seconds, negative for cycles, and 0 for deactivating the + callback. If inRelativeToNow is 1, times are from the time of this call; + otherwise they are from the time the callback was last called (or the time + it was registered if it has never been called. } PROCEDURE XPLMSetFlightLoopCallbackInterval( inFlightLoop : XPLMFlightLoop_f; - inInterval : Single; - inRelativeToNow : Integer; + inInterval : single; + inRelativeToNow : integer; inRefcon : pointer); - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} {$IFDEF XPLM210} { XPLMCreateFlightLoop - This routine creates a flight loop callback and returns its ID. The flight - loop callback is created using the input param struct, and is inited to be - unscheduled. + This routine creates a flight loop callback and returns its ID. The flight + loop callback is created using the input param struct, and is inited to be + unscheduled. } FUNCTION XPLMCreateFlightLoop( inParams : PXPLMCreateFlightLoop_t) : XPLMFlightLoopID; - cdecl; external XPLM_DLL; -{$ENDIF XPLM210} +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} +{$ENDIF} {$IFDEF XPLM210} { XPLMDestroyFlightLoop - This routine destroys a flight loop callback by ID. Only call it on flight - loops created with the newer XPLMCreateFlightLoop API. + This routine destroys a flight loop callback by ID. } PROCEDURE XPLMDestroyFlightLoop( inFlightLoopID : XPLMFlightLoopID); - cdecl; external XPLM_DLL; -{$ENDIF XPLM210} +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} +{$ENDIF} {$IFDEF XPLM210} { XPLMScheduleFlightLoop - This routine schedules a flight loop callback for future execution. If - inInterval is negative, it is run in a certain number of frames based on - the absolute value of the input. If the interval is positive, it is a - duration in seconds. + This routine schedules a flight loop callback for future execution. If + inInterval is negative, it is run in a certain number of frames based on + the absolute value of the input. If the interval is positive, it is a + duration in seconds. + + If inRelativeToNow is true, ties are interpretted relative to the time this + routine is called; otherwise they are relative to the last call time or the + time the flight loop was registered (if never called). + + THREAD SAFETY: it is legal to call this routine from any thread under the + following conditions: - If inRelativeToNow is true, ties are interpretted relative to the time this - routine is called; otherwise they are relative to the last call time or the - time the flight loop was registered (if never called). + 1. The call must be between the beginning of an XPLMEnable and the end of + an XPLMDisable sequence. (That is, you must not call this routine from + thread activity when your plugin was supposed to be disabled. Since plugins + are only enabled while loaded, this also implies you cannot run this + routine outside an XPLMStart/XPLMStop sequence.) + + 2. You may not call this routine re-entrantly for a single flight loop ID. + (That is, you can't enable from multiple threads at the same time.) + + 3. You must call this routine between the time after XPLMCreateFlightLoop + returns a value and the time you call XPLMDestroyFlightLoop. (That is, you + must ensure that your threaded activity is within the life of the object. + The SDK does not check this for you, nor does it synchronize destruction of + the object.) + + 4. The object must be unscheduled if this routine is to be called from a + thread other than the main thread. } PROCEDURE XPLMScheduleFlightLoop( inFlightLoopID : XPLMFlightLoopID; - inInterval : Single; - inRelativeToNow : Integer); - cdecl; external XPLM_DLL; -{$ENDIF XPLM210} - + inInterval : single; + inRelativeToNow : integer); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} +{$ENDIF} IMPLEMENTATION - END. diff --git a/src/SDK/Delphi/XPLM/XPLMScenery.pas b/src/SDK/Delphi/XPLM/XPLMScenery.pas index a585830c..d68b33a5 100644 --- a/src/SDK/Delphi/XPLM/XPLMScenery.pas +++ b/src/SDK/Delphi/XPLM/XPLMScenery.pas @@ -1,63 +1,65 @@ { - 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 XPLMScenery; INTERFACE { - This package contains APIs to interact with X-Plane's scenery system. + This package contains APIs to interact with X-Plane's scenery system. } -USES - XPLMDefs; +USES XPLMDefs; {$A4} +{$IFDEF MSWINDOWS} + {$DEFINE DELPHI} +{$ENDIF} {$IFDEF XPLM200} {___________________________________________________________________________ * Terrain Y-Testing ___________________________________________________________________________} { - The Y-testing API allows you to locate the physical scenery mesh. This - would be used to place dynamic graphics on top of the ground in a plausible - way or do physics interactions. + The Y-testing API allows you to locate the physical scenery mesh. This + would be used to place dynamic graphics on top of the ground in a plausible + way or do physics interactions. - The Y-test API works via probe objects, which are allocated by your plugin - and used to query terrain. Probe objects exist both to capture which - algorithm you have requested (see probe types) and also to cache query - information. + The Y-test API works via probe objects, which are allocated by your plugin + and used to query terrain. Probe objects exist both to capture which + algorithm you have requested (see probe types) and also to cache query + information. - Performance Guidelines - ---------------------- + Performance guidelines: It is generally faster to use the same probe for + nearby points and different probes for different points. Try not to + allocate more than "hundreds" of probes at most. Share probes if you need + more. Generally, probing operations are expensive, and should be avoided + via caching when possible. - It is generally faster to use the same probe for nearby points and - different probes for different points. Try not to allocate more than - "hundreds" of probes at most. Share probes if you need more. Generally, - probing operations are expensive, and should be avoided via caching when - possible. + Y testing returns a location on the terrain, a normal vectory, and a + velocity vector. The normal vector tells you the slope of the terrain at + that point. The velocity vector tells you if that terrain is moving (and is + in meters/second). For example, if your Y test hits the aircraft carrier + deck, this tells you the velocity of that point on the deck. - Y testing returns a location on the terrain, a normal vectory, and a - velocity vector. The normal vector tells you the slope of the terrain at - that point. The velocity vector tells you if that terrain is moving (and is - in meters/second). For example, if your Y test hits the aircraft carrier - deck, this tells you the velocity of that point on the deck. - - Note: the Y-testing API is limited to probing the loaded scenery area, - which is approximately 300x300 km in X-Plane 9. Probes outside this area - will return the height of a 0 MSL sphere. + Note: the Y-testing API is limited to probing the loaded scenery area, + which is approximately 300x300 km in X-Plane 9. Probes outside this area + will return the height of a 0 MSL sphere. } { XPLMProbeType - XPLMProbeType defines the type of terrain probe - each probe has a - different algorithm. (Only one type of probe is provided right now, but - future APIs will expose more flexible or poewrful or useful probes. + XPLMProbeType defines the type of terrain probe - each probe has a + different algorithm. (Only one type of probe is provided right now, but + future APIs will expose more flexible or poewrful or useful probes. } TYPE XPLMProbeType = ( - { The Y probe gives you the location of the tallest physical scenery along } - { the Y axis going through the queried point. } + { The Y probe gives you the location of the tallest physical scenery along } + { the Y axis going through the queried point. } xplm_ProbeY = 0 ); @@ -66,18 +68,18 @@ { XPLMProbeResult - Probe results - possible results from a probe query. + Probe results - possible results from a probe query. } XPLMProbeResult = ( - { The probe hit terrain and returned valid values. } + { The probe hit terrain and returned valid values. } xplm_ProbeHitTerrain = 0 - { An error in the API call. Either the probe struct size is bad, or the } - { probe is invalid or the type is mismatched for the specific query call. } + { An error in the API call. Either the probe struct size is bad, or the } + { probe is invalid or the type is mismatched for the specific query call. } ,xplm_ProbeError = 1 - { The probe call succeeded but there is no terrain under this point (perhaps } - { it is off the side of the planet?) } + { The probe call succeeded but there is no terrain under this point (perhaps } + { it is off the side of the planet?) } ,xplm_ProbeMissed = 2 ); @@ -86,8 +88,8 @@ { XPLMProbeRef - An XPLMProbeRef is an opaque handle to a probe, used for querying the - terrain. + An XPLMProbeRef is an opaque handle to a probe, used for querying the + terrain. } XPLMProbeRef = pointer; PXPLMProbeRef = ^XPLMProbeRef; @@ -95,131 +97,155 @@ { XPLMProbeInfo_t - XPLMProbeInfo_t contains the results of a probe call. Make sure to set - structSize to the size of the struct before using it. + XPLMProbeInfo_t contains the results of a probe call. Make sure to set + structSize to the size of the struct before using it. } XPLMProbeInfo_t = RECORD - { Size of structure in bytes - always set this before calling the XPLM. } - structSize : Integer; - { Resulting X location of the terrain point we hit, in local OpenGL } - { coordinates. } - locationX : Single; - { Resulting Y location of the terrain point we hit, in local OpenGL } - { coordinates. } - locationY : Single; - { Resulting Z location of the terrain point we hit, in local OpenGL } - { coordinates. } - locationZ : Single; - { X component of the normal vector to the terrain we found. } - normalX : Single; - { Y component of the normal vector to the terrain we found. } - normalY : Single; - { Z component of the normal vector to the terrain we found. } - normalZ : Single; - { X component of the velocity vector of the terrain we found. } - velocityX : Single; - { Y component of the velocity vector of the terrain we found. } - velocityY : Single; - { Z component of the velocity vector of the terrain we found. } - velocityZ : Single; - { Tells if the surface we hit is water (otherwise it is land). } - is_wet : Integer; + { Size of structure in bytes - always set this before calling the XPLM. } + structSize : integer; + { Resulting X location of the terrain point we hit, in local OpenGL } + { coordinates. } + locationX : single; + { Resulting Y location of the terrain point we hit, in local OpenGL } + { coordinates. } + locationY : single; + { Resulting Z location of the terrain point we hit, in local OpenGL } + { coordinates. } + locationZ : single; + { X component of the normal vector to the terrain we found. } + normalX : single; + { Y component of the normal vector to the terrain we found. } + normalY : single; + { Z component of the normal vector to the terrain we found. } + normalZ : single; + { X component of the velocity vector of the terrain we found. } + velocityX : single; + { Y component of the velocity vector of the terrain we found. } + velocityY : single; + { Z component of the velocity vector of the terrain we found. } + velocityZ : single; + { Tells if the surface we hit is water (otherwise it is land). } + is_wet : integer; END; PXPLMProbeInfo_t = ^XPLMProbeInfo_t; { XPLMCreateProbe - Creates a new probe object of a given type and returns. + Creates a new probe object of a given type and returns. } FUNCTION XPLMCreateProbe( inProbeType : XPLMProbeType) : XPLMProbeRef; - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMDestroyProbe - Deallocates an existing probe object. + Deallocates an existing probe object. } PROCEDURE XPLMDestroyProbe( inProbe : XPLMProbeRef); - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMProbeTerrainXYZ - Probes the terrain. Pass in the XYZ coordinate of the probe point, a probe - object, and an XPLMProbeInfo_t struct that has its structSize member set - properly. Other fields are filled in if we hit terrain, and a probe result - is returned. + Probes the terrain. Pass in the XYZ coordinate of the probe point, a probe + object, and an XPLMProbeInfo_t struct that has its structSize member set + properly. Other fields are filled in if we hit terrain, and a probe result + is returned. } FUNCTION XPLMProbeTerrainXYZ( inProbe : XPLMProbeRef; - inX : Single; - inY : Single; - inZ : Single; + inX : single; + inY : single; + inZ : single; outInfo : PXPLMProbeInfo_t) : XPLMProbeResult; - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} -{$ENDIF XPLM200} +{$ENDIF} {$IFDEF XPLM300} {___________________________________________________________________________ * Magnetic Variation ___________________________________________________________________________} { - Use the magnetic variation (more properly, the "magnetic declination") API - to find the offset of magnetic north from true north at a given latitude - and longitude within the simulator. + Use the magnetic variation (more properly, the "magnetic declination") API + to find the offset of magnetic north from true north at a given latitude + and longitude within the simulator. - In the real world, the Earth's magnetic field is irregular, such that true - north (the direction along a meridian toward the north pole) does not - necessarily match what a magnetic compass shows as north. + In the real world, the Earth's magnetic field is irregular, such that true + north (the direction along a meridian toward the north pole) does not + necessarily match what a magnetic compass shows as north. - Using this API ensures that you present the same offsets to users as - X-Plane's built-in instruments. + Using this API ensures that you present the same offsets to users as + X-Plane's built-in instruments. } { XPLMGetMagneticVariation - Returns X-Plane's simulated magnetic variation (declination) at the - indication latitude and longitude. + Returns X-Plane's simulated magnetic variation (declination) at the + indication latitude and longitude. } FUNCTION XPLMGetMagneticVariation( - latitude : Real; - longitude : Real) : Single; - cdecl; external XPLM_DLL; + latitude : real; + longitude : real) : single; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMDegTrueToDegMagnetic - Converts a heading in degrees relative to true north into a value relative - to magnetic north at the user's current location. + Converts a heading in degrees relative to true north into a value relative + to magnetic north at the user's current location. } FUNCTION XPLMDegTrueToDegMagnetic( - headingDegreesTrue : Single) : Single; - cdecl; external XPLM_DLL; + headingDegreesTrue : single) : single; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMDegMagneticToDegTrue - Converts a heading in degrees relative to magnetic north at the user's - current location into a value relative to true north. + Converts a heading in degrees relative to magnetic north at the user's + current location into a value relative to true north. } FUNCTION XPLMDegMagneticToDegTrue( - headingDegreesMagnetic: Single) : Single; - cdecl; external XPLM_DLL; + headingDegreesMagnetic: single) : single; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} -{$ENDIF XPLM300} +{$ENDIF} {___________________________________________________________________________ * Object Drawing ___________________________________________________________________________} { - The object drawing routines let you load and draw X-Plane OBJ files. - Objects are loaded by file path and managed via an opaque handle. X-Plane - naturally reference counts objects, so it is important that you balance - every successful call to XPLMLoadObject with a call to XPLMUnloadObject! + The object drawing routines let you load and draw X-Plane OBJ files. + Objects are loaded by file path and managed via an opaque handle. X-Plane + naturally reference counts objects, so it is important that you balance + every successful call to XPLMLoadObject with a call to XPLMUnloadObject! } @@ -228,207 +254,223 @@ { XPLMObjectRef - An XPLMObjectRef is a opaque handle to an .obj file that has been loaded - into memory. + An XPLMObjectRef is a opaque handle to an .obj file that has been loaded + into memory. } XPLMObjectRef = pointer; PXPLMObjectRef = ^XPLMObjectRef; -{$ENDIF XPLM200} +{$ENDIF} {$IFDEF XPLM200} { XPLMDrawInfo_t - The XPLMDrawInfo_t structure contains positioning info for one object that - is to be drawn. Be sure to set structSize to the size of the structure for - future expansion. + The XPLMDrawInfo_t structure contains positioning info for one object that + is to be drawn. Be sure to set structSize to the size of the structure for + future expansion. } XPLMDrawInfo_t = RECORD - { Set this to the size of this structure! } - structSize : Integer; - { X location of the object in local coordinates. } - x : Single; - { Y location of the object in local coordinates. } - y : Single; - { Z location of the object in local coordinates. } - z : Single; - { Pitch in degres to rotate the object, positive is up. } - pitch : Single; - { Heading in local coordinates to rotate the object, clockwise. } - heading : Single; - { Roll to rotate the object. } - roll : Single; + { Set this to the size of this structure! } + structSize : integer; + { X location of the object in local coordinates. } + x : single; + { Y location of the object in local coordinates. } + y : single; + { Z location of the object in local coordinates. } + z : single; + { Pitch in degres to rotate the object, positive is up. } + pitch : single; + { Heading in local coordinates to rotate the object, clockwise. } + heading : single; + { Roll to rotate the object. } + roll : single; END; PXPLMDrawInfo_t = ^XPLMDrawInfo_t; -{$ENDIF XPLM200} +{$ENDIF} {$IFDEF XPLM210} { XPLMObjectLoaded_f - You provide this callback when loading an object asynchronously; it will be - called once the object is loaded. Your refcon is passed back. The object - ref passed in is the newly loaded object (ready for use) or NULL if an - error occured. + You provide this callback when loading an object asynchronously; it will be + called once the object is loaded. Your refcon is passed back. The object + ref passed in is the newly loaded object (ready for use) or NULL if an + error occured. - If your plugin is disabled, this callback will be delivered as soon as the - plugin is re-enabled. If your plugin is unloaded before this callback is - ever called, the SDK will release the object handle for you. + If your plugin is disabled, this callback will be delivered as soon as the + plugin is re-enabled. If your plugin is unloaded before this callback is + ever called, the SDK will release the object handle for you. } -TYPE XPLMObjectLoaded_f = PROCEDURE( inObject : XPLMObjectRef; inRefcon : pointer); cdecl; -{$ENDIF XPLM210} +{$ENDIF} {$IFDEF XPLM200} { XPLMLoadObject - This routine loads an OBJ file and returns a handle to it. If X-Plane has - already loaded the object, the handle to the existing object is returned. - Do not assume you will get the same handle back twice, but do make sure to - call unload once for every load to avoid "leaking" objects. The object will - be purged from memory when no plugins and no scenery are using it. + This routine loads an OBJ file and returns a handle to it. If X-Plane has + already loaded the object, the handle to the existing object is returned. + Do not assume you will get the same handle back twice, but do make sure to + call unload once for every load to avoid "leaking" objects. The object will + be purged from memory when no plugins and no scenery are using it. - The path for the object must be relative to the X-System base folder. If - the path is in the root of the X-System folder you may need to prepend ./ - to it; loading objects in the root of the X-System folder is STRONGLY - discouraged - your plugin should not dump art resources in the root folder! + The path for the object must be relative to the X-System base folder. If + the path is in the root of the X-System folder you may need to prepend ./ + to it; loading objects in the root of the X-System folder is STRONGLY + discouraged - your plugin should not dump art resources in the root folder! - XPLMLoadObject will return NULL if the object cannot be loaded (either - because it is not found or the file is misformatted). This routine will - load any object that can be used in the X-Plane scenery system. - It is important that the datarefs an object uses for animation already be - loaded before you load the object. For this reason it may be necessary to - defer object loading until the sim has fully started. + XPLMLoadObject will return NULL if the object cannot be loaded (either + because it is not found or the file is misformatted). This routine will + load any object that can be used in the X-Plane scenery system. + + It is important that the datarefs an object uses for animation already be + loaded before you load the object. For this reason it may be necessary to + defer object loading until the sim has fully started. } FUNCTION XPLMLoadObject( - inPath : XPLMString) : XPLMObjectRef; - cdecl; external XPLM_DLL; -{$ENDIF XPLM200} + inPath : Pchar) : XPLMObjectRef; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} +{$ENDIF} {$IFDEF XPLM210} { XPLMLoadObjectAsync - This routine loads an object asynchronously; control is returned to you - immediately while X-Plane loads the object. The sim will not stop flying - while the object loads. For large objects, it may be several seconds before - the load finishes. + This routine loads an object asynchronously; control is returned to you + immediately while X-Plane loads the object. The sim will not stop flying + while the object loads. For large objects, it may be several seconds before + the load finishes. - You provide a callback function that is called once the load has completed. - Note that if the object cannot be loaded, you will not find out until the - callback function is called with a NULL object handle. + You provide a callback function that is called once the load has completed. + Note that if the object cannot be loaded, you will not find out until the + callback function is called with a NULL object handle. - There is no way to cancel an asynchronous object load; you must wait for - the load to complete and then release the object if it is no longer - desired. + There is no way to cancel an asynchronous object load; you must wait for + the load to complete and then release the object if it is no longer + desired. } PROCEDURE XPLMLoadObjectAsync( - inPath : XPLMString; + inPath : Pchar; inCallback : XPLMObjectLoaded_f; inRefcon : pointer); - cdecl; external XPLM_DLL; -{$ENDIF XPLM210} +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} +{$ENDIF} -{$IFDEF XPLM_DEPRECATED} +{$IFDEF XPLM200} { XPLMDrawObjects - __Deprecation Warning__: use XPLMInstancing to draw 3-d objects by creating - instances, rather than these APIs from draw callbacks. + XPLMDrawObjects draws an object from an OBJ file one or more times. You + pass in the object and an array of XPLMDrawInfo_t structs, one for each + place you would like the object to be drawn. - XPLMDrawObjects draws an object from an OBJ file one or more times. You - pass in the object and an array of XPLMDrawInfo_t structs, one for each - place you would like the object to be drawn. + X-Plane will attempt to cull the objects based on LOD and visibility, and + will pick the appropriate LOD. - X-Plane will attempt to cull the objects based on LOD and visibility, and - will pick the appropriate LOD. + Lighting is a boolean; pass 1 to show the night version of object with + night-only lights lit up. Pass 0 to show the daytime version of the object. - Lighting is a boolean; pass 1 to show the night version of object with - night-only lights lit up. Pass 0 to show the daytime version of the object. - earth_relative controls the coordinate system. If this is 1, the rotations - you specify are applied to the object after its coordinate system is - transformed from local to earth-relative coordinates -- that is, an object - with no rotations will point toward true north and the Y axis will be up - against gravity. If this is 0, the object is drawn with your rotations from - local coordanates -- that is, an object with no rotations is drawn pointing - down the -Z axis and the Y axis of the object matches the local coordinate - Y axis. + earth_relative controls the coordinate system. If this is 1, the rotations + you specify are applied to the object after its coordinate system is + transformed from local to earth-relative coordinates -- that is, an object + with no rotations will point toward true north and the Y axis will be up + against gravity. If this is 0, the object is drawn with your rotations from + local coordanates -- that is, an object with no rotations is drawn pointing + down the -Z axis and the Y axis of the object matches the local coordinate + Y axis. } PROCEDURE XPLMDrawObjects( inObject : XPLMObjectRef; - inCount : Integer; + inCount : integer; inLocations : PXPLMDrawInfo_t; - lighting : Integer; - earth_relative : Integer); - cdecl; external XPLM_DLL; -{$ENDIF XPLM_DEPRECATED} + lighting : integer; + earth_relative : integer); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} +{$ENDIF} {$IFDEF XPLM200} { XPLMUnloadObject - This routine marks an object as no longer being used by your plugin. - Objects are reference counted: once no plugins are using an object, it is - purged from memory. Make sure to call XPLMUnloadObject once for each - successful call to XPLMLoadObject. + This routine marks an object as no longer being used by your plugin. + Objects are reference counted: once no plugins are using an object, it is + purged from memory. Make sure to call XPLMUnloadObject once for each + successful call to XPLMLoadObject. } PROCEDURE XPLMUnloadObject( inObject : XPLMObjectRef); - cdecl; external XPLM_DLL; -{$ENDIF XPLM200} +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} +{$ENDIF} {$IFDEF XPLM200} {___________________________________________________________________________ * Library Access ___________________________________________________________________________} { - The library access routines allow you to locate scenery objects via the - X-Plane library system. Right now library access is only provided for - objects, allowing plugin-drawn objects to be extended using the library - system. + The library access routines allow you to locate scenery objects via the + X-Plane library system. Right now library access is only provided for + objects, allowing plugin-drawn objects to be extended using the library + system. } { XPLMLibraryEnumerator_f - An XPLMLibraryEnumerator_f is a callback you provide that is called once - for each library element that is located. The returned paths will be - relative to the X-System folder. + An XPLMLibraryEnumerator_f is a callback you provide that is called once + for each library element that is located. The returned paths will be + relative to the X-System folder. } TYPE XPLMLibraryEnumerator_f = PROCEDURE( - inFilePath : XPLMString; + inFilePath : Pchar; inRef : pointer); cdecl; { XPLMLookupObjects - This routine looks up a virtual path in the library system and returns all - matching elements. You provide a callback - one virtual path may match many - objects in the library. XPLMLookupObjects returns the number of objects - found. + This routine looks up a virtual path in the library system and returns all + matching elements. You provide a callback - one virtual path may match many + objects in the library. XPLMLookupObjects returns the number of objects + found. - The latitude and longitude parameters specify the location the object will - be used. The library system allows for scenery packages to only provide - objects to certain local locations. Only objects that are allowed at the - latitude/longitude you provide will be returned. + The latitude and longitude parameters specify the location the object will + be used. The library system allows for scenery packages to only provide + objects to certain local locations. Only objects that are allowed at the + latitude/longitude you provide will be returned. } FUNCTION XPLMLookupObjects( - inPath : XPLMString; - inLatitude : Single; - inLongitude : Single; + inPath : Pchar; + inLatitude : single; + inLongitude : single; enumerator : XPLMLibraryEnumerator_f; - ref : pointer) : Integer; - cdecl; external XPLM_DLL; - -{$ENDIF XPLM200} + ref : pointer) : integer; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} +{$ENDIF} IMPLEMENTATION - END. diff --git a/src/SDK/Delphi/XPLM/XPLMUtilities.pas b/src/SDK/Delphi/XPLM/XPLMUtilities.pas index 121e28b3..b8de3657 100755 --- a/src/SDK/Delphi/XPLM/XPLMUtilities.pas +++ b/src/SDK/Delphi/XPLM/XPLMUtilities.pas @@ -1,252 +1,273 @@ { - 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 XPLMUtilities; INTERFACE +{ + +} -USES - XPLMDefs; +USES XPLMDefs; {$A4} +{$IFDEF MSWINDOWS} + {$DEFINE DELPHI} +{$ENDIF} {___________________________________________________________________________ - * FILE UTILITIES + * X-PLANE USER INTERACTION ___________________________________________________________________________} { - The XPLMUtilities file APIs provide some basic file and path functions for - use with X-Plane. - - Directory Separators - -------------------- - - The XPLM has two modes it can work in: - - * X-Plane native paths: all paths are UTF8 strings, using the unix forward - slash (/) as the directory separating character. In native path mode, - you use the same path format for all three operating systems. - - * Legacy OS paths: the directroy separator is \ for Windows, : for OS X, - and / for Linux; OS paths are encoded in MacRoman for OS X using legacy - HFS conventions, use the application code page for multi-byte encoding - on Unix using DOS path conventions, and use UTF-8 for Linux. - - While legacy OS paths are the default, we strongly encourage you to opt in - to native paths using the XPLMEnableFeature API. - - * All OS X plugins should enable native paths all of the time; if you do - not do this, you will have to convert all paths back from HFS to Unix - (and deal with MacRoman) - code written using native paths and the C - file APIs "just works" on OS X. - - * For Linux plugins, there is no difference between the two encodings. - - * Windows plugins will need to convert the UTF8 file paths to UTF16 for - use with the "wide" APIs. While it might seem tempting to stick with - legacy OS paths (and just use the "ANSI" Windows APIs), X-Plane is fully - unicode-capable, and will often be installed in paths where the user's - directories have no ACP encoding. - - Full and Relative Paths - ----------------------- - - Some of these APIs use full paths, but others use paths relative to the - user's X-Plane installation. This is documented on a per-API basis. + The user interaction APIs let you simulate commands the user can do with a + joystick, keyboard etc. Note that it is generally safer for future + compatibility to use one of these commands than to manipulate the + underlying sim data. } -{$IFDEF XPLM200} { - XPLMDataFileType + XPLMCommandKeyID - These enums define types of data files you can load or unload using the - SDK. + These enums represent all the keystrokes available within X-Plane. They can + be sent to X-Plane directly. For example, you can reverse thrust using + these enumerations. } TYPE - XPLMDataFileType = ( - { A situation (.sit) file, which starts off a flight in a given } - { configuration. } - xplm_DataFile_Situation = 1 - - { A situation movie (.smo) file, which replays a past flight. } - ,xplm_DataFile_ReplayMovie = 2 - + XPLMCommandKeyID = ( + xplm_key_pause=0, + xplm_key_revthrust, + xplm_key_jettison, + xplm_key_brakesreg, + xplm_key_brakesmax, + xplm_key_gear, + xplm_key_timedn, + xplm_key_timeup, + xplm_key_fadec, + xplm_key_otto_dis, + xplm_key_otto_atr, + xplm_key_otto_asi, + xplm_key_otto_hdg, + xplm_key_otto_gps, + xplm_key_otto_lev, + xplm_key_otto_hnav, + xplm_key_otto_alt, + xplm_key_otto_vvi, + xplm_key_otto_vnav, + xplm_key_otto_nav1, + xplm_key_otto_nav2, + xplm_key_targ_dn, + xplm_key_targ_up, + xplm_key_hdgdn, + xplm_key_hdgup, + xplm_key_barodn, + xplm_key_baroup, + xplm_key_obs1dn, + xplm_key_obs1up, + xplm_key_obs2dn, + xplm_key_obs2up, + xplm_key_com1_1, + xplm_key_com1_2, + xplm_key_com1_3, + xplm_key_com1_4, + xplm_key_nav1_1, + xplm_key_nav1_2, + xplm_key_nav1_3, + xplm_key_nav1_4, + xplm_key_com2_1, + xplm_key_com2_2, + xplm_key_com2_3, + xplm_key_com2_4, + xplm_key_nav2_1, + xplm_key_nav2_2, + xplm_key_nav2_3, + xplm_key_nav2_4, + xplm_key_adf_1, + xplm_key_adf_2, + xplm_key_adf_3, + xplm_key_adf_4, + xplm_key_adf_5, + xplm_key_adf_6, + xplm_key_transpon_1, + xplm_key_transpon_2, + xplm_key_transpon_3, + xplm_key_transpon_4, + xplm_key_transpon_5, + xplm_key_transpon_6, + xplm_key_transpon_7, + xplm_key_transpon_8, + xplm_key_flapsup, + xplm_key_flapsdn, + xplm_key_cheatoff, + xplm_key_cheaton, + xplm_key_sbrkoff, + xplm_key_sbrkon, + xplm_key_ailtrimL, + xplm_key_ailtrimR, + xplm_key_rudtrimL, + xplm_key_rudtrimR, + xplm_key_elvtrimD, + xplm_key_elvtrimU, + xplm_key_forward, + xplm_key_down, + xplm_key_left, + xplm_key_right, + xplm_key_back, + xplm_key_tower, + xplm_key_runway, + xplm_key_chase, + xplm_key_free1, + xplm_key_free2, + xplm_key_spot, + xplm_key_fullscrn1, + xplm_key_fullscrn2, + xplm_key_tanspan, + xplm_key_smoke, + xplm_key_map, + xplm_key_zoomin, + xplm_key_zoomout, + xplm_key_cycledump, + xplm_key_replay, + xplm_key_tranID, + xplm_key_max ); - PXPLMDataFileType = ^XPLMDataFileType; -{$ENDIF XPLM200} - - { - XPLMGetSystemPath - - This function returns the full path to the X-System folder. Note that this - is a directory path, so it ends in a trailing : or /. - - The buffer you pass should be at least 512 characters long. The path is - returned using the current native or OS path conventions. - } - PROCEDURE XPLMGetSystemPath( - outSystemPath : XPLMString); - cdecl; external XPLM_DLL; - - { - XPLMGetPrefsPath - - This routine returns a full path to a file that is within X-Plane's - preferences directory. (You should remove the file name back to the last - directory separator to get the preferences directory using - XPLMExtractFileAndPath.) - - The buffer you pass should be at least 512 characters long. The path is - returned using the current native or OS path conventions. - } - PROCEDURE XPLMGetPrefsPath( - outPrefsPath : XPLMString); - cdecl; external XPLM_DLL; - - { - XPLMGetDirectorySeparator - - This routine returns a string with one char and a null terminator that is - the directory separator for the current platform. This allows you to write - code that concatinates directory paths without having to #ifdef for - platform. The character returned will reflect the current file path mode. - } - FUNCTION XPLMGetDirectorySeparator: XPLMString; - cdecl; external XPLM_DLL; - - { - XPLMExtractFileAndPath - - Given a full path to a file, this routine separates the path from the file. - If the path is a partial directory (e.g. ends in : or \) the trailing - directory separator is removed. This routine works in-place; a pointer to - the file part of the buffer is returned; the original buffer still starts - with the path and is null terminated with no trailing separator. - } - FUNCTION XPLMExtractFileAndPath( - inFullPath : XPLMString) : XPLMString; - cdecl; external XPLM_DLL; - - { - XPLMGetDirectoryContents - - This routine returns a list of files in a directory (specified by a full - path, no trailing : or \). The output is returned as a list of NULL - terminated strings. An index array (if specified) is filled with pointers - into the strings. The last file is indicated by a zero-length string (and - NULL in the indices). This routine will return 1 if you had capacity for - all files or 0 if you did not. You can also skip a given number of files. - - * inDirectoryPath - a null terminated C string containing the full path to - the directory with no trailing directory char. - - * inFirstReturn - the zero-based index of the first file in the directory - to return. (Usually zero to fetch all in one pass.) - - * outFileNames - a buffer to receive a series of sequential null - terminated C-string file names. A zero-length C string will be appended - to the very end. - - * inFileNameBufSize - the size of the file name buffer in bytes. - - * outIndices - a pointer to an array of character pointers that will - become an index into the directory. The last file will be followed by a - NULL value. Pass NULL if you do not want indexing information. - - * inIndexCount - the max size of the index in entries. - - * outTotalFiles - if not NULL, this is filled in with the number of files - in the directory. - - * outReturnedFiles - if not NULL, the number of files returned by this - iteration. - - Return value: 1 if all info could be returned, 0 if there was a buffer - overrun. - - WARNING: Before X-Plane 7 this routine did not properly iterate through - directories. If X-Plane - 6 compatibility is needed, use your own code to iterate directories. - } - FUNCTION XPLMGetDirectoryContents( - inDirectoryPath : XPLMString; - inFirstReturn : Integer; - outFileNames : XPLMString; - inFileNameBufSize : Integer; - outIndices : PXPLMString; { Can be nil } - inIndexCount : Integer; - outTotalFiles : PInteger; { Can be nil } - outReturnedFiles : PInteger) : Integer; { Can be nil } - cdecl; external XPLM_DLL; - -{$IFDEF XPLM200} - { - XPLMLoadDataFile - - Loads a data file of a given type. Paths must be relative to the X-System - folder. To clear the replay, pass a NULL file name (this is only valid with - replay movies, not sit files). - } - FUNCTION XPLMLoadDataFile( - inFileType : XPLMDataFileType; - inFilePath : XPLMString) : Integer; { Can be nil } - cdecl; external XPLM_DLL; -{$ENDIF XPLM200} + PXPLMCommandKeyID = ^XPLMCommandKeyID; -{$IFDEF XPLM200} { - XPLMSaveDataFile + XPLMCommandButtonID - Saves the current situation or replay; paths are relative to the X-System - folder. + These are enumerations for all of the things you can do with a joystick + button in X-Plane. They currently match the buttons menu in the equipment + setup dialog, but these enums will be stable even if they change in + X-Plane. } - FUNCTION XPLMSaveDataFile( - inFileType : XPLMDataFileType; - inFilePath : XPLMString) : Integer; - cdecl; external XPLM_DLL; -{$ENDIF XPLM200} - -{___________________________________________________________________________ - * X-PLANE MISC - ___________________________________________________________________________} + XPLMCommandButtonID = ( + xplm_joy_nothing=0, + xplm_joy_start_all, + xplm_joy_start_0, + xplm_joy_start_1, + xplm_joy_start_2, + xplm_joy_start_3, + xplm_joy_start_4, + xplm_joy_start_5, + xplm_joy_start_6, + xplm_joy_start_7, + xplm_joy_throt_up, + xplm_joy_throt_dn, + xplm_joy_prop_up, + xplm_joy_prop_dn, + xplm_joy_mixt_up, + xplm_joy_mixt_dn, + xplm_joy_carb_tog, + xplm_joy_carb_on, + xplm_joy_carb_off, + xplm_joy_trev, + xplm_joy_trm_up, + xplm_joy_trm_dn, + xplm_joy_rot_trm_up, + xplm_joy_rot_trm_dn, + xplm_joy_rud_lft, + xplm_joy_rud_cntr, + xplm_joy_rud_rgt, + xplm_joy_ail_lft, + xplm_joy_ail_cntr, + xplm_joy_ail_rgt, + xplm_joy_B_rud_lft, + xplm_joy_B_rud_rgt, + xplm_joy_look_up, + xplm_joy_look_dn, + xplm_joy_look_lft, + xplm_joy_look_rgt, + xplm_joy_glance_l, + xplm_joy_glance_r, + xplm_joy_v_fnh, + xplm_joy_v_fwh, + xplm_joy_v_tra, + xplm_joy_v_twr, + xplm_joy_v_run, + xplm_joy_v_cha, + xplm_joy_v_fr1, + xplm_joy_v_fr2, + xplm_joy_v_spo, + xplm_joy_flapsup, + xplm_joy_flapsdn, + xplm_joy_vctswpfwd, + xplm_joy_vctswpaft, + xplm_joy_gear_tog, + xplm_joy_gear_up, + xplm_joy_gear_down, + xplm_joy_lft_brake, + xplm_joy_rgt_brake, + xplm_joy_brakesREG, + xplm_joy_brakesMAX, + xplm_joy_speedbrake, + xplm_joy_ott_dis, + xplm_joy_ott_atr, + xplm_joy_ott_asi, + xplm_joy_ott_hdg, + xplm_joy_ott_alt, + xplm_joy_ott_vvi, + xplm_joy_tim_start, + xplm_joy_tim_reset, + xplm_joy_ecam_up, + xplm_joy_ecam_dn, + xplm_joy_fadec, + xplm_joy_yaw_damp, + xplm_joy_art_stab, + xplm_joy_chute, + xplm_joy_JATO, + xplm_joy_arrest, + xplm_joy_jettison, + xplm_joy_fuel_dump, + xplm_joy_puffsmoke, + xplm_joy_prerotate, + xplm_joy_UL_prerot, + xplm_joy_UL_collec, + xplm_joy_TOGA, + xplm_joy_shutdown, + xplm_joy_con_atc, + xplm_joy_fail_now, + xplm_joy_pause, + xplm_joy_rock_up, + xplm_joy_rock_dn, + xplm_joy_rock_lft, + xplm_joy_rock_rgt, + xplm_joy_rock_for, + xplm_joy_rock_aft, + xplm_joy_idle_hilo, + xplm_joy_lanlights, + xplm_joy_max + ); + PXPLMCommandButtonID = ^XPLMCommandButtonID; { XPLMHostApplicationID - While the plug-in SDK is only accessible to plugins running inside X-Plane, - the original authors considered extending the API to other applications - that shared basic infrastructure with X-Plane. These enumerations are - hold-overs from that original roadmap; all values other than X-Plane are - deprecated. Your plugin should never need this enumeration. + The plug-in system is based on Austin's cross-platform OpenGL framework and + could theoretically be adapted to run in other apps like WorldMaker. The + plug-in system also runs against a test harness for internal development + and could be adapted to another flight sim (in theory at least). So an ID + is providing allowing plug-ins to indentify what app they are running + under. } -TYPE XPLMHostApplicationID = ( xplm_Host_Unknown = 0 ,xplm_Host_XPlane = 1 -{$IFDEF XPLM_DEPRECATED} ,xplm_Host_PlaneMaker = 2 -{$ENDIF XPLM_DEPRECATED} -{$IFDEF XPLM_DEPRECATED} ,xplm_Host_WorldMaker = 3 -{$ENDIF XPLM_DEPRECATED} -{$IFDEF XPLM_DEPRECATED} ,xplm_Host_Briefer = 4 -{$ENDIF XPLM_DEPRECATED} -{$IFDEF XPLM_DEPRECATED} ,xplm_Host_PartMaker = 5 -{$ENDIF XPLM_DEPRECATED} -{$IFDEF XPLM_DEPRECATED} ,xplm_Host_YoungsMod = 6 -{$ENDIF XPLM_DEPRECATED} -{$IFDEF XPLM_DEPRECATED} ,xplm_Host_XAuto = 7 -{$ENDIF XPLM_DEPRECATED} ); PXPLMHostApplicationID = ^XPLMHostApplicationID; @@ -254,10 +275,10 @@ { XPLMLanguageCode - These enums define what language the sim is running in. These enumerations - do not imply that the sim can or does run in all of these languages; they - simply provide a known encoding in the event that a given sim version is - localized to a certain language. + These enums define what language the sim is running in. These enumerations + do not imply that the sim can or does run in all of these languages; they + simply provide a known encoding in the event that a given sim version is + localized to a certain language. } XPLMLanguageCode = ( xplm_Language_Unknown = 0 @@ -276,258 +297,476 @@ {$IFDEF XPLM200} ,xplm_Language_Russian = 7 -{$ENDIF XPLM200} +{$ENDIF} {$IFDEF XPLM200} ,xplm_Language_Greek = 8 -{$ENDIF XPLM200} +{$ENDIF} {$IFDEF XPLM200} ,xplm_Language_Japanese = 9 -{$ENDIF XPLM200} +{$ENDIF} -{$IFDEF XPLM300} +{$IFDEF XPLM200} ,xplm_Language_Chinese = 10 -{$ENDIF XPLM300} +{$ENDIF} ); PXPLMLanguageCode = ^XPLMLanguageCode; +{$IFDEF XPLM200} + { + XPLMDataFileType + + These enums define types of data files you can load or unload using the + SDK. + } + XPLMDataFileType = ( + { A situation (.sit) file, which starts off a flight in a given } + { configuration. } + xplm_DataFile_Situation = 1 + + { A situation movie (.smo) file, which replays a past flight. } + ,xplm_DataFile_ReplayMovie = 2 + + ); + PXPLMDataFileType = ^XPLMDataFileType; +{$ENDIF} + {$IFDEF XPLM200} { XPLMError_f - An XPLM error callback is a function that you provide to receive debugging - information from the plugin SDK. See XPLMSetErrorCallback for more - information. NOTE: for the sake of debugging, your error callback will be - called even if your plugin is not enabled, allowing you to receive debug - info in your XPluginStart and XPluginStop callbacks. To avoid causing logic - errors in the management code, do not call any other plugin routines from - your error callback - it is only meant for catching errors in the - debugging. + An XPLM error callback is a function that you provide to receive debugging + information from the plugin SDK. See XPLMSetErrorCallback for more + information. NOTE: for the sake of debugging, your error callback will be + called even if your plugin is not enabled, allowing you to receive debug + info in your XPluginStart and XPluginStop callbacks. To avoid causing logic + errors in the management code, do not call any other plugin routines from + your error callback - it is only meant for logging! } -TYPE XPLMError_f = PROCEDURE( - inMessage : XPLMString); cdecl; -{$ENDIF XPLM200} + inMessage : Pchar); cdecl; +{$ENDIF} -{$IFDEF XPLM_DEPRECATED} { - XPLMInitialized + XPLMSimulateKeyPress - Deprecated: This function returns 1 if X-Plane has properly initialized the - plug-in system. If this routine returns 0, many XPLM functions will not - work. + This function simulates a key being pressed for X-Plane. The keystroke goes + directly to X-Plane; it is never sent to any plug-ins. However, since this + is a raw key stroke it may be mapped by the keys file or enter text into a + field. - NOTE: because plugins are always called from within the XPLM, there is no - need to check for initialization; it will always return 1. This routine is - deprecated - you do not need to check it before continuing within your - plugin. + WARNING: This function will be deprecated; do not use it. Instead use + XPLMCommandKeyStroke. } - FUNCTION XPLMInitialized: Integer; - cdecl; external XPLM_DLL; -{$ENDIF XPLM_DEPRECATED} + PROCEDURE XPLMSimulateKeyPress( + inKeyType : integer; + inKey : integer); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { - XPLMGetVersions + XPLMSpeakString - This routine returns the revision of both X-Plane and the XPLM DLL. All - versions are three-digit decimal numbers (e.g. 606 for version 6.06 of - X-Plane); the current revision of the XPLM is 200 (2.00). This routine also - returns the host ID of the app running us. + This function displays the string in a translucent overlay over the current + display and also speaks the string if text-to-speech is enabled. The string + is spoken asynchronously, this function returns immediately. + } + PROCEDURE XPLMSpeakString( + inString : Pchar); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} + + { + XPLMCommandKeyStroke - The most common use of this routine is to special-case around X-Plane - version-specific behavior. + This routine simulates a command-key stroke. However, the keys are done by + function, not by actual letter, so this function works even if the user has + remapped their keyboard. Examples of things you might do with this include + pausing the simulator. } - PROCEDURE XPLMGetVersions( - outXPlaneVersion : PInteger; - outXPLMVersion : PInteger; - outHostID : PXPLMHostApplicationID); - cdecl; external XPLM_DLL; + PROCEDURE XPLMCommandKeyStroke( + inKey : XPLMCommandKeyID); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { - XPLMGetLanguage + XPLMCommandButtonPress - This routine returns the langauge the sim is running in. + This function simulates any of the actions that might be taken by pressing + a joystick button. However, this lets you call the command directly rather + than have to know which button is mapped where. Important: you must release + each button you press. The APIs are separate so that you can 'hold down' a + button for a fixed amount of time. } - FUNCTION XPLMGetLanguage: XPLMLanguageCode; - cdecl; external XPLM_DLL; + PROCEDURE XPLMCommandButtonPress( + inButton : XPLMCommandButtonID); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} -{$IFDEF XPLM200} { - XPLMFindSymbol + XPLMCommandButtonRelease - This routine will attempt to find the symbol passed in the inString - parameter. If the symbol is found a pointer the function is returned, - othewise the function will return NULL. + This function simulates any of the actions that might be taken by pressing + a joystick button. See XPLMCommandButtonPress + } + PROCEDURE XPLMCommandButtonRelease( + inButton : XPLMCommandButtonID); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} + + { + XPLMGetVirtualKeyDescription - You can use XPLMFindSymbol to utilize newer SDK API features without - requiring newer versions of the SDK (and X-Plane) as your minimum X-Plane - version as follows: + Given a virtual key code (as defined in XPLMDefs.h) this routine returns a + human-readable string describing the character. This routine is provided + for showing users what keyboard mappings they have set up. The string may + read 'unknown' or be a blank or NULL string if the virtual key is unknown. + } + FUNCTION XPLMGetVirtualKeyDescription( + inVirtualKey : char) : Pchar; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} + +{___________________________________________________________________________ + * X-PLANE MISC + ___________________________________________________________________________} +{ + +} + + { + XPLMReloadScenery - * Define the XPLMnnn macro to the minimum required XPLM version you will - ship with (e.g. XPLM210 for X-Plane 10 compatibility). + XPLMReloadScenery reloads the current set of scenery. You can use this + function in two typical ways: simply call it to reload the scenery, picking + up any new installed scenery, .env files, etc. from disk. Or, change the + lat/ref and lon/ref data refs and then call this function to shift the + scenery environment. + } + PROCEDURE XPLMReloadScenery; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} + + { + XPLMGetSystemPath - * Use XPLMGetVersions and XPLMFindSymbol to detect that the host sim is - new enough to use new functions and resolve function pointers. + This function returns the full path to the X-System folder. Note that this + is a directory path, so it ends in a trailing : or /. The buffer you pass + should be at least 512 characters long. + } + PROCEDURE XPLMGetSystemPath( + outSystemPath : Pchar); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} + + { + XPLMGetPrefsPath - * Conditionally use the new functions if and only if XPLMFindSymbol only - returns a non- NULL pointer. + This routine returns a full path to a file that is within X-Plane's + preferences directory. (You should remove the file name back to the last + directory separator to get the preferences directory. The buffer you pass + should be at least 512 characters long. + } + PROCEDURE XPLMGetPrefsPath( + outPrefsPath : Pchar); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} + + { + XPLMGetDirectorySeparator - Warning: you should always check the XPLM API version as well as the - results of XPLMFindSymbol to determine if funtionality is safe to use. + This routine returns a string with one char and a null terminator that is + the directory separator for the current platform. This allows you to write + code that concatinates directory paths without having to #ifdef for + platform. + } + FUNCTION XPLMGetDirectorySeparator: Pchar; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} + + { + XPLMExtractFileAndPath - To use functionality via XPLMFindSymbol you will need to copy your own - definitions of the X-Plane API prototypes and cast the returned pointer to - the correct type. + Given a full path to a file, this routine separates the path from the file. + If the path is a partial directory (e.g. ends in : or \) the trailing + directory separator is removed. This routine works in-place; a pointer to + the file part of the buffer is returned; the original buffer still starts + with the path. } - FUNCTION XPLMFindSymbol( - inString : XPLMString) : pointer; - cdecl; external XPLM_DLL; -{$ENDIF XPLM200} + FUNCTION XPLMExtractFileAndPath( + inFullPath : Pchar) : Pchar; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} -{$IFDEF XPLM200} { - XPLMSetErrorCallback + XPLMGetDirectoryContents + + This routine returns a list of files in a directory (specified by a full + path, no trailing : or \). The output is returned as a list of NULL + terminated strings. An index array (if specified) is filled with pointers + into the strings. This routine The last file is indicated by a zero-length + string (and NULL in the indices). This routine will return 1 if you had + capacity for all files or 0 if you did not. You can also skip a given + number of files. + + inDirectoryPath - a null terminated C string containing the full path to + the directory with no trailing directory char. + + inFirstReturn - the zero-based index of the first file in the directory to + return. (Usually zero to fetch all in one pass.) + + outFileNames - a buffer to receive a series of sequential null terminated + C-string file names. A zero-length C string will be appended to the very + end. + + inFileNameBufSize - the size of the file name buffer in bytes. + + outIndices - a pointer to an array of character pointers that will become + an index into the directory. The last file will be followed by a NULL + value. Pass NULL if you do not want indexing information. + + inIndexCount - the max size of the index in entries. - XPLMSetErrorCallback installs an error-reporting callback for your plugin. - Normally the plugin system performs minimum diagnostics to maximize - performance. When you install an error callback, you will receive calls due - to certain plugin errors, such as passing bad parameters or incorrect data. + outTotalFiles - if not NULL, this is filled in with the number of files in + the directory. - Important: the error callback determines *programming* errors, e.g. bad API - parameters. Every error that is returned by the error callback represents a - mistake in your plugin that you should fix. Error callbacks are not used to - report expected run-time problems (e.g. disk I/O errors). + outReturnedFiles - if not NULL, the number of files returned by this + iteration. - The intention is for you to install the error callback during debug - sections and put a break-point inside your callback. This will cause you to - break into the debugger from within the SDK at the point in your plugin - where you made an illegal call. + Return value - 1 if all info could be returned, 0 if there was a buffer + overrun. - Installing an error callback may activate error checking code that would - not normally run, and this may adversely affect performance, so do not - leave error callbacks installed in shipping plugins. Since the only useful - response to an error is to change code, error callbacks are not useful "in - the field". + WARNING: Before X-Plane 7 this routine did not properly iterate through + directories. If X-Plane 6 compatibility is needed, use your own code to + iterate directories. } - PROCEDURE XPLMSetErrorCallback( - inCallback : XPLMError_f); - cdecl; external XPLM_DLL; -{$ENDIF XPLM200} + FUNCTION XPLMGetDirectoryContents( + inDirectoryPath : Pchar; + inFirstReturn : integer; + outFileNames : Pchar; + inFileNameBufSize : integer; + outIndices : PPchar; { Can be nil } + inIndexCount : integer; + outTotalFiles : Pinteger; { Can be nil } + outReturnedFiles : Pinteger) : integer; { Can be nil } +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { - XPLMDebugString + XPLMInitialized + + This function returns 1 if X-Plane has properly initialized the plug-in + system. If this routine returns 0, many XPLM functions will not work. + + NOTE: Under normal circumstances a plug-in should never be running while + the plug-in manager is not initialized. + + WARNING: This function is generally not needed and may be deprecated in the + future. + } + FUNCTION XPLMInitialized: integer; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} + + { + XPLMGetVersions + + This routine returns the revision of both X-Plane and the XPLM DLL. All + versions are three-digit decimal numbers (e.g. 606 for version 6.06 of + X-Plane); the current revision of the XPLM is 200 (2.00). This routine also + returns the host ID of the app running us. - This routine outputs a C-style string to the Log.txt file. The file is - immediately flushed so you will not lose data. (This does cause a - performance penalty.) + The most common use of this routine is to special-case around X-Plane + version-specific behavior. + } + PROCEDURE XPLMGetVersions( + outXPlaneVersion : Pinteger; + outXPLMVersion : Pinteger; + outHostID : PXPLMHostApplicationID); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} + + { + XPLMGetLanguage - Please do *not* leave routine diagnostic logging enabled in your shipping - plugin. The X-Plane Log file is shared by X-Plane and every plugin in the - system, and plugins that (when functioning normally) print verbose log - output make it difficult for developers to find error conditions from other - parts of the system. + This routine returns the langauge the sim is running in. + } + FUNCTION XPLMGetLanguage: XPLMLanguageCode; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} + + { + XPLMDebugString + + This routine outputs a C-style string to the Log.txt file. The file is + immediately flushed so you will not lose data. (This does cause a + performance penalty.) } PROCEDURE XPLMDebugString( - inString : XPLMString); - cdecl; external XPLM_DLL; + inString : Pchar); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} +{$IFDEF XPLM200} { - XPLMSpeakString + XPLMSetErrorCallback + + XPLMSetErrorCallback installs an error-reporting callback for your plugin. + Normally the plugin system performs minimum diagnostics to maximize + performance. When you install an error callback, you will receive calls due + to certain plugin errors, such as passing bad parameters or incorrect data. + - This function displays the string in a translucent overlay over the current - display and also speaks the string if text-to-speech is enabled. The string - is spoken asynchronously, this function returns immediately. This function - may not speak or print depending on user preferences. + The intention is for you to install the error callback during debug + sections and put a break-point inside your callback. This will cause you to + break into the debugger from within the SDK at the point in your plugin + where you made an illegal call. + + Installing an error callback may activate error checking code that would + not normally run, and this may adversely affect performance, so do not + leave error callbacks installed in shipping plugins. } - PROCEDURE XPLMSpeakString( - inString : XPLMString); - cdecl; external XPLM_DLL; + PROCEDURE XPLMSetErrorCallback( + inCallback : XPLMError_f); +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} +{$ENDIF} +{$IFDEF XPLM200} { - XPLMGetVirtualKeyDescription + XPLMFindSymbol - Given a virtual key code (as defined in XPLMDefs.h) this routine returns a - human-readable string describing the character. This routine is provided - for showing users what keyboard mappings they have set up. The string may - read 'unknown' or be a blank or NULL string if the virtual key is unknown. + This routine will attempt to find the symbol passed in the inString + parameter. If the symbol is found a pointer the function is returned, + othewise the function will return NULL. } - FUNCTION XPLMGetVirtualKeyDescription( - inVirtualKey : XPLMChar) : XPLMString; - cdecl; external XPLM_DLL; + FUNCTION XPLMFindSymbol( + inString : Pchar) : pointer; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} +{$ENDIF} +{$IFDEF XPLM200} { - XPLMReloadScenery + XPLMLoadDataFile - XPLMReloadScenery reloads the current set of scenery. You can use this - function in two typical ways: simply call it to reload the scenery, picking - up any new installed scenery, .env files, etc. from disk. Or, change the - lat/ref and lon/ref data refs and then call this function to shift the - scenery environment. This routine is equivalent to picking "reload - scenery" from the developer menu. + Loads a data file of a given type. Paths must be relative to the X-System + folder. To clear the replay, pass a NULL file name (this is only valid with + replay movies, not sit files). } - PROCEDURE XPLMReloadScenery; - cdecl; external XPLM_DLL; + FUNCTION XPLMLoadDataFile( + inFileType : XPLMDataFileType; + inFilePath : Pchar) : integer; { Can be nil } +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} +{$ENDIF} + +{$IFDEF XPLM200} + { + XPLMSaveDataFile + + Saves the current situation or replay; paths are relative to the X-System + folder. + } + FUNCTION XPLMSaveDataFile( + inFileType : XPLMDataFileType; + inFilePath : Pchar) : integer; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} +{$ENDIF} {$IFDEF XPLM200} {___________________________________________________________________________ * X-PLANE COMMAND MANAGEMENT ___________________________________________________________________________} { - The command management APIs let plugins interact with the command-system in - X-Plane, the abstraction behind keyboard presses and joystick buttons. This - API lets you create new commands and modify the behavior (or get - notification) of existing ones. - - X-Plane Command Phases - ---------------------- - - X-Plane commands are not instantaneous; they operate over a duration. - (Think of a joystick button press - you can press, hold down, and then - release the joystick button; X-Plane commands model this entire process.) - - An X-Plane command consists of three phases: a beginning, continuous - repetition, and an ending. The command may be repeated zero times in its - duration, followed by one command ending. Command begin and end messges are - balanced, but a command may be bound to more than one event source (e.g. a - keyboard key and a joystick button), in which case you may receive a second - begin during before any end). - - When you issue commands in the plugin system, you *must* balance every call - to XPLMCommandBegin with a call to XPLMCommandEnd with the same command - reference. - - Command Behavior Modification - ----------------------------- - - You can register a callback to handle a command either before or after - X-Plane does; if you receive the command before X-Plane you have the option - to either let X-Plane handle the command or hide the command from X-Plane. - This lets plugins both augment commands and replace them. + The command management APIs let plugins interact with the command-system in + X-Plane, the abstraction behind keyboard presses and joystick buttons. This + API lets you create new commands and modify the behavior (or get + notification) of existing ones. - If you register for an existing command, be sure that you are *consistent* - in letting X-Plane handle or not handle the command; you are responsible - for passing a *balanced* number of begin and end messages to X-Plane. (E.g. - it is not legal to pass all the begin messages to X-Plane but hide all the - end messages). + An X-Plane command consists of three phases: a beginning, continuous + repetition, and an ending. The command may be repeated zero times in the + event that the user presses a button only momentarily. } { XPLMCommandPhase - The phases of a command. + The phases of a command. } TYPE XPLMCommandPhase = ( - { The command is being started. } + { The command is being started. } xplm_CommandBegin = 0 - { The command is continuing to execute. } + { The command is continuing to execute. } ,xplm_CommandContinue = 1 - { The command has ended. } + { The command has ended. } ,xplm_CommandEnd = 2 ); @@ -536,14 +775,14 @@ { XPLMCommandRef - A command ref is an opaque identifier for an X-Plane command. Command - references stay the same for the life of your plugin but not between - executions of X-Plane. Command refs are used to execute commands, create - commands, and create callbacks for particular commands. + A command ref is an opaque identifier for an X-Plane command. Command + references stay the same for the life of your plugin but not between + executions of X-Plane. Command refs are used to execute commands, create + commands, and create callbacks for particular commands. - Note that a command is not "owned" by a particular plugin. Since many - plugins may participate in a command's execution, the command does not go - away if the plugin that created it is unloaded. + Note that a command is not "owned" by a particular plugin. Since many + plugins may participate in a command's execution, the command does not go + away if the plugin that created it is unloaded. } XPLMCommandRef = pointer; PXPLMCommandRef = ^XPLMCommandRef; @@ -551,401 +790,134 @@ { XPLMCommandCallback_f - A command callback is a function in your plugin that is called when a - command is pressed. Your callback receives the command reference for the - particular command, the phase of the command that is executing, and a - reference pointer that you specify when registering the callback. + A command callback is a function in your plugin that is called when a + command is pressed. Your callback receives the command reference for the + particular command, the phase of the command that is executing, and a + reference pointer that you specify when registering the callback. - Your command handler should return 1 to let processing of the command - continue to other plugins and X-Plane, or 0 to halt processing, potentially - bypassing X-Plane code. + Your command handler should return 1 to let processing of the command + continue to other plugins and X-Plane, or 0 to halt processing, potentially + bypassing X-Plane code. } XPLMCommandCallback_f = FUNCTION( inCommand : XPLMCommandRef; inPhase : XPLMCommandPhase; - inRefcon : pointer) : Integer; cdecl; + inRefcon : pointer) : integer; cdecl; { XPLMFindCommand - XPLMFindCommand looks up a command by name, and returns its command - reference or NULL if the command does not exist. + XPLMFindCommand looks up a command by name, and returns its command + reference or NULL if the command does not exist. } FUNCTION XPLMFindCommand( - inName : XPLMString) : XPLMCommandRef; - cdecl; external XPLM_DLL; + inName : Pchar) : XPLMCommandRef; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMCommandBegin - XPLMCommandBegin starts the execution of a command, specified by its - command reference. The command is "held down" until XPLMCommandEnd is - called. You must balance each XPLMCommandBegin call with an XPLMCommandEnd - call. + XPLMCommandBegin starts the execution of a command, specified by its + command reference. The command is "held down" until XPLMCommandEnd is + called. } PROCEDURE XPLMCommandBegin( inCommand : XPLMCommandRef); - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMCommandEnd - XPLMCommandEnd ends the execution of a given command that was started with - XPLMCommandBegin. You must not issue XPLMCommandEnd for a command you did - not begin. + XPLMCommandEnd ends the execution of a given command that was started with + XPLMCommandBegin. } PROCEDURE XPLMCommandEnd( inCommand : XPLMCommandRef); - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMCommandOnce - This executes a given command momentarily, that is, the command begins and - ends immediately. This is the equivalent of calling XPLMCommandBegin() and - XPLMCommandEnd() back ot back. + This executes a given command momentarily, that is, the command begins and + ends immediately. } PROCEDURE XPLMCommandOnce( inCommand : XPLMCommandRef); - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMCreateCommand - XPLMCreateCommand creates a new command for a given string. If the command - already exists, the existing command reference is returned. The description - may appear in user interface contexts, such as the joystick configuration - screen. + XPLMCreateCommand creates a new command for a given string. If the command + already exists, the existing command reference is returned. The description + may appear in user interface contexts, such as the joystick configuration + screen. } FUNCTION XPLMCreateCommand( - inName : XPLMString; - inDescription : XPLMString) : XPLMCommandRef; - cdecl; external XPLM_DLL; + inName : Pchar; + inDescription : Pchar) : XPLMCommandRef; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMRegisterCommandHandler - XPLMRegisterCommandHandler registers a callback to be called when a command - is executed. You provide a callback with a reference pointer. + XPLMRegisterCommandHandler registers a callback to be called when a command + is executed. You provide a callback with a reference pointer. - If inBefore is true, your command handler callback will be executed before - X-Plane executes the command, and returning 0 from your callback will - disable X-Plane's processing of the command. If inBefore is false, your - callback will run after X-Plane. (You can register a single callback both - before and after a command.) + If inBefore is true, your command handler callback will be executed before + X-Plane executes the command, and returning 0 from your callback will + disable X-Plane's processing of the command. If inBefore is false, your + callback will run after X-Plane. (You can register a single callback both + before and after a command.) } PROCEDURE XPLMRegisterCommandHandler( inComand : XPLMCommandRef; inHandler : XPLMCommandCallback_f; - inBefore : Integer; + inBefore : integer; inRefcon : pointer); - cdecl; external XPLM_DLL; +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} { XPLMUnregisterCommandHandler - XPLMUnregisterCommandHandler removes a command callback registered with - XPLMRegisterCommandHandler. + XPLMUnregisterCommandHandler removes a command callback registered with + XPLMRegisterCommandHandler. } PROCEDURE XPLMUnregisterCommandHandler( inComand : XPLMCommandRef; inHandler : XPLMCommandCallback_f; - inBefore : Integer; + inBefore : integer; inRefcon : pointer); - cdecl; external XPLM_DLL; - -{$ENDIF XPLM200} -{$IFDEF XPLM_DEPRECATED} -{___________________________________________________________________________ - * X-PLANE USER INTERACTION - ___________________________________________________________________________} -{ - WARNING: The legacy user interaction API is deprecated; while it was the - only way to run commands in X-Plane 6,7 and 8, it is obsolete, and was - replaced by the command system API in X-Plane 9. You should not use this - API; replace any of the calls below with XPLMCommand invocations based on - persistent command strings. The documentation that follows is for historic - reference only. - - The legacy user interaction APIs let you simulate commands the user can do - with a joystick, keyboard etc. Note that it is generally safer for future - compatibility to use one of these commands than to manipulate the - underlying sim data. -} - - - { - XPLMCommandKeyID - - These enums represent all the keystrokes available within X-Plane. They can - be sent to X-Plane directly. For example, you can reverse thrust using - these enumerations. - } -TYPE - XPLMCommandKeyID = ( - xplm_key_pause=0, - xplm_key_revthrust, - xplm_key_jettison, - xplm_key_brakesreg, - xplm_key_brakesmax, - xplm_key_gear, - xplm_key_timedn, - xplm_key_timeup, - xplm_key_fadec, - xplm_key_otto_dis, - xplm_key_otto_atr, - xplm_key_otto_asi, - xplm_key_otto_hdg, - xplm_key_otto_gps, - xplm_key_otto_lev, - xplm_key_otto_hnav, - xplm_key_otto_alt, - xplm_key_otto_vvi, - xplm_key_otto_vnav, - xplm_key_otto_nav1, - xplm_key_otto_nav2, - xplm_key_targ_dn, - xplm_key_targ_up, - xplm_key_hdgdn, - xplm_key_hdgup, - xplm_key_barodn, - xplm_key_baroup, - xplm_key_obs1dn, - xplm_key_obs1up, - xplm_key_obs2dn, - xplm_key_obs2up, - xplm_key_com1_1, - xplm_key_com1_2, - xplm_key_com1_3, - xplm_key_com1_4, - xplm_key_nav1_1, - xplm_key_nav1_2, - xplm_key_nav1_3, - xplm_key_nav1_4, - xplm_key_com2_1, - xplm_key_com2_2, - xplm_key_com2_3, - xplm_key_com2_4, - xplm_key_nav2_1, - xplm_key_nav2_2, - xplm_key_nav2_3, - xplm_key_nav2_4, - xplm_key_adf_1, - xplm_key_adf_2, - xplm_key_adf_3, - xplm_key_adf_4, - xplm_key_adf_5, - xplm_key_adf_6, - xplm_key_transpon_1, - xplm_key_transpon_2, - xplm_key_transpon_3, - xplm_key_transpon_4, - xplm_key_transpon_5, - xplm_key_transpon_6, - xplm_key_transpon_7, - xplm_key_transpon_8, - xplm_key_flapsup, - xplm_key_flapsdn, - xplm_key_cheatoff, - xplm_key_cheaton, - xplm_key_sbrkoff, - xplm_key_sbrkon, - xplm_key_ailtrimL, - xplm_key_ailtrimR, - xplm_key_rudtrimL, - xplm_key_rudtrimR, - xplm_key_elvtrimD, - xplm_key_elvtrimU, - xplm_key_forward, - xplm_key_down, - xplm_key_left, - xplm_key_right, - xplm_key_back, - xplm_key_tower, - xplm_key_runway, - xplm_key_chase, - xplm_key_free1, - xplm_key_free2, - xplm_key_spot, - xplm_key_fullscrn1, - xplm_key_fullscrn2, - xplm_key_tanspan, - xplm_key_smoke, - xplm_key_map, - xplm_key_zoomin, - xplm_key_zoomout, - xplm_key_cycledump, - xplm_key_replay, - xplm_key_tranID, - xplm_key_max - ); - PXPLMCommandKeyID = ^XPLMCommandKeyID; - - { - XPLMCommandButtonID - - These are enumerations for all of the things you can do with a joystick - button in X-Plane. They currently match the buttons menu in the equipment - setup dialog, but these enums will be stable even if they change in - X-Plane. - } - XPLMCommandButtonID = ( - xplm_joy_nothing=0, - xplm_joy_start_all, - xplm_joy_start_0, - xplm_joy_start_1, - xplm_joy_start_2, - xplm_joy_start_3, - xplm_joy_start_4, - xplm_joy_start_5, - xplm_joy_start_6, - xplm_joy_start_7, - xplm_joy_throt_up, - xplm_joy_throt_dn, - xplm_joy_prop_up, - xplm_joy_prop_dn, - xplm_joy_mixt_up, - xplm_joy_mixt_dn, - xplm_joy_carb_tog, - xplm_joy_carb_on, - xplm_joy_carb_off, - xplm_joy_trev, - xplm_joy_trm_up, - xplm_joy_trm_dn, - xplm_joy_rot_trm_up, - xplm_joy_rot_trm_dn, - xplm_joy_rud_lft, - xplm_joy_rud_cntr, - xplm_joy_rud_rgt, - xplm_joy_ail_lft, - xplm_joy_ail_cntr, - xplm_joy_ail_rgt, - xplm_joy_B_rud_lft, - xplm_joy_B_rud_rgt, - xplm_joy_look_up, - xplm_joy_look_dn, - xplm_joy_look_lft, - xplm_joy_look_rgt, - xplm_joy_glance_l, - xplm_joy_glance_r, - xplm_joy_v_fnh, - xplm_joy_v_fwh, - xplm_joy_v_tra, - xplm_joy_v_twr, - xplm_joy_v_run, - xplm_joy_v_cha, - xplm_joy_v_fr1, - xplm_joy_v_fr2, - xplm_joy_v_spo, - xplm_joy_flapsup, - xplm_joy_flapsdn, - xplm_joy_vctswpfwd, - xplm_joy_vctswpaft, - xplm_joy_gear_tog, - xplm_joy_gear_up, - xplm_joy_gear_down, - xplm_joy_lft_brake, - xplm_joy_rgt_brake, - xplm_joy_brakesREG, - xplm_joy_brakesMAX, - xplm_joy_speedbrake, - xplm_joy_ott_dis, - xplm_joy_ott_atr, - xplm_joy_ott_asi, - xplm_joy_ott_hdg, - xplm_joy_ott_alt, - xplm_joy_ott_vvi, - xplm_joy_tim_start, - xplm_joy_tim_reset, - xplm_joy_ecam_up, - xplm_joy_ecam_dn, - xplm_joy_fadec, - xplm_joy_yaw_damp, - xplm_joy_art_stab, - xplm_joy_chute, - xplm_joy_JATO, - xplm_joy_arrest, - xplm_joy_jettison, - xplm_joy_fuel_dump, - xplm_joy_puffsmoke, - xplm_joy_prerotate, - xplm_joy_UL_prerot, - xplm_joy_UL_collec, - xplm_joy_TOGA, - xplm_joy_shutdown, - xplm_joy_con_atc, - xplm_joy_fail_now, - xplm_joy_pause, - xplm_joy_rock_up, - xplm_joy_rock_dn, - xplm_joy_rock_lft, - xplm_joy_rock_rgt, - xplm_joy_rock_for, - xplm_joy_rock_aft, - xplm_joy_idle_hilo, - xplm_joy_lanlights, - xplm_joy_max - ); - PXPLMCommandButtonID = ^XPLMCommandButtonID; - - { - XPLMSimulateKeyPress - - This function simulates a key being pressed for X-Plane. The keystroke goes - directly to X-Plane; it is never sent to any plug-ins. However, since this - is a raw key stroke it may be mapped by the keys file or enter text into a - field. - - Deprecated: use XPLMCommandOnce - } - PROCEDURE XPLMSimulateKeyPress( - inKeyType : Integer; - inKey : Integer); - cdecl; external XPLM_DLL; - - { - XPLMCommandKeyStroke - - This routine simulates a command-key stroke. However, the keys are done by - function, not by actual letter, so this function works even if the user has - remapped their keyboard. Examples of things you might do with this include - pausing the simulator. - - Deprecated: use XPLMCommandOnce - } - PROCEDURE XPLMCommandKeyStroke( - inKey : XPLMCommandKeyID); - cdecl; external XPLM_DLL; - - { - XPLMCommandButtonPress - - This function simulates any of the actions that might be taken by pressing - a joystick button. However, this lets you call the command directly rather - than have to know which button is mapped where. Important: you must release - each button you press. The APIs are separate so that you can 'hold down' a - button for a fixed amount of time. - - Deprecated: use XPLMCommandBegin. - } - PROCEDURE XPLMCommandButtonPress( - inButton : XPLMCommandButtonID); - cdecl; external XPLM_DLL; - - { - XPLMCommandButtonRelease - - This function simulates any of the actions that might be taken by pressing - a joystick button. See XPLMCommandButtonPress. - - Deprecated: use XPLMCommandEnd. - } - PROCEDURE XPLMCommandButtonRelease( - inButton : XPLMCommandButtonID); - cdecl; external XPLM_DLL; - -{$ENDIF XPLM_DEPRECATED} +{$IFDEF DELPHI} + cdecl; external 'XPLM.DLL'; +{$ELSE} + cdecl; external ''; +{$ENDIF} +{$ENDIF} IMPLEMENTATION - END. diff --git a/src/SDK/Libraries/Mac/XPLM.framework/XPLM b/src/SDK/Libraries/Mac/XPLM.framework/XPLM index 334071184538ea16492dd9756e7132a1ac807b8d..b7542d5469d0028aaa56a30c7af0bdac6143d6b9 100755 GIT binary patch literal 206576 zcmeFae|%KM)jz%qSqMnnfS^GIQjIkc#6*l{4Z$qQ!d=)E6j7?ipb-QSh-6nnAsD(z z<$AkH`)I|gmG-H9XssHpV59& zoomWsHy>5R zN%Y-OR#rN#vT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|Znbs~ZBa*_ From fe6599ece969966f1afa98c9ab496b9cc5ccdce8 Mon Sep 17 00:00:00 2001 From: sparker256 Date: Sat, 6 Nov 2021 14:36:42 -0400 Subject: [PATCH 5/8] Fixed bug so we can now use SDK 303 --- src/FlyWithLua.cpp | 16 - src/SDK/CHeaders/Widgets/XPStandardWidgets.h | 477 +++-- src/SDK/CHeaders/Widgets/XPUIGraphics.h | 420 +++-- src/SDK/CHeaders/Widgets/XPWidgetDefs.h | 590 +++--- src/SDK/CHeaders/Widgets/XPWidgetUtils.h | 202 +- src/SDK/CHeaders/Widgets/XPWidgets.h | 686 ++++--- src/SDK/CHeaders/XPLM/XPLMCamera.h | 162 +- src/SDK/CHeaders/XPLM/XPLMDataAccess.h | 819 ++++---- src/SDK/CHeaders/XPLM/XPLMDefs.h | 174 +- src/SDK/CHeaders/XPLM/XPLMDisplay.h | 1744 ++++++++--------- src/SDK/CHeaders/XPLM/XPLMGraphics.h | 576 +++--- src/SDK/CHeaders/XPLM/XPLMInstance.h | 117 +- src/SDK/CHeaders/XPLM/XPLMMap.h | 738 ++++---- src/SDK/CHeaders/XPLM/XPLMMenus.h | 283 ++- src/SDK/CHeaders/XPLM/XPLMNavigation.h | 361 ++-- src/SDK/CHeaders/XPLM/XPLMPlanes.h | 290 +-- src/SDK/CHeaders/XPLM/XPLMPlugin.h | 388 ++-- src/SDK/CHeaders/XPLM/XPLMProcessing.h | 258 +-- src/SDK/CHeaders/XPLM/XPLMScenery.h | 422 ++--- src/SDK/CHeaders/XPLM/XPLMUtilities.h | 1333 +++++++------ src/SDK/Delphi/Widgets/XPStandardWidgets.pas | 346 ++-- src/SDK/Delphi/Widgets/XPUIGraphics.pas | 349 ++-- src/SDK/Delphi/Widgets/XPWidgetDefs.pas | 502 +++-- src/SDK/Delphi/Widgets/XPWidgetUtils.pas | 208 +-- src/SDK/Delphi/Widgets/XPWidgets.pas | 713 +++---- src/SDK/Delphi/XPLM/XPLMCamera.pas | 172 +- src/SDK/Delphi/XPLM/XPLMDataAccess.pas | 796 ++++---- src/SDK/Delphi/XPLM/XPLMDefs.pas | 168 +- src/SDK/Delphi/XPLM/XPLMDisplay.pas | 1757 ++++++++---------- src/SDK/Delphi/XPLM/XPLMGraphics.pas | 522 +++--- src/SDK/Delphi/XPLM/XPLMInstance.pas | 126 +- src/SDK/Delphi/XPLM/XPLMMap.pas | 713 ++++--- src/SDK/Delphi/XPLM/XPLMMenus.pas | 304 ++- src/SDK/Delphi/XPLM/XPLMNavigation.pas | 395 ++-- src/SDK/Delphi/XPLM/XPLMPlanes.pas | 357 ++-- src/SDK/Delphi/XPLM/XPLMPlugin.pas | 455 ++--- src/SDK/Delphi/XPLM/XPLMProcessing.pas | 290 ++- src/SDK/Delphi/XPLM/XPLMScenery.pas | 484 +++-- src/SDK/Delphi/XPLM/XPLMUtilities.pas | 1414 +++++++------- src/SDK/Libraries/Mac/XPLM.framework/XPLM | Bin 206576 -> 214288 bytes src/SDK/Libraries/Win/XPLM_64.lib | Bin 48750 -> 49542 bytes src/SDK/Libraries/Win/XPWidgets_64.lib | Bin 10830 -> 10830 bytes 42 files changed, 9854 insertions(+), 10273 deletions(-) diff --git a/src/FlyWithLua.cpp b/src/FlyWithLua.cpp index acefabc4..22cdd198 100644 --- a/src/FlyWithLua.cpp +++ b/src/FlyWithLua.cpp @@ -6688,14 +6688,6 @@ bool ReadAllScriptFiles() lua_pushstring(FWLLua, PlaneAuthor); lua_setglobal(FWLLua, "PLANE_AUTHOR"); - // if we are still in boot phase of X-Plane, we do not want to load files - if (XPLMInitialized() == 0) - { - logMsg(logToDevCon, "FlyWithLua Info: X-Plane is still booting, we do not want to read files during startup."); - CrashReportDisplayed = false; - return true; - } - // run through the init script std::ostringstream oss_IntPathAndName; oss_IntPathAndName << internalsDir << "FlyWithLua.ini"; @@ -6915,14 +6907,6 @@ bool ReadAllQuarantinedScriptFiles() char* QtFileIndex[250]; int Qt_result; - // if we are still in boot phase of X-Plane, we do not want to load files - if (XPLMInitialized() == 0) - { - logMsg(logToDevCon, "FlyWithLua Info: X-Plane is still booting, we do not want to read files during startup."); - CrashReportDisplayed = false; - return true; - } - if (XPLMGetDirectoryContents(quarantineDir.c_str(), 0, QtFilesInFolder, sizeof(QtFilesInFolder), QtFileIndex, 250, reinterpret_cast(&TotalNumberOfQtFiles), reinterpret_cast(&NumberOfQtFiles))) { diff --git a/src/SDK/CHeaders/Widgets/XPStandardWidgets.h b/src/SDK/CHeaders/Widgets/XPStandardWidgets.h index f0c65545..42d49876 100755 --- a/src/SDK/CHeaders/Widgets/XPStandardWidgets.h +++ b/src/SDK/CHeaders/Widgets/XPStandardWidgets.h @@ -2,29 +2,29 @@ #define _XPStandardWidgets_h_ /* - * 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 * */ +/*************************************************************************** + * XPStandardWidgets + ***************************************************************************/ /* - * XPStandardWidgets - THEORY OF OPERATION + * ## THEORY OF OPERATION * - * The standard widgets are widgets built into the widgets library. While you - * can gain access to the widget function that drives them, you generally use - * them by calling XPCreateWidget and then listening for special messages, - * etc. + * The standard widgets are widgets built into the widgets library. While you + * can gain access to the widget function that drives them, you generally use + * them by calling XPCreateWidget and then listening for special messages, + * etc. * - * The standard widgets often send mesages to themselves when the user - * performs an event; these messages are sent up the widget hierarchy until - * they are handled. So you can add a widget proc directly to a push button - * (for example) to intercept the message when it is clicked, or you can put - * one widget proc on a window for all of the push buttons in the window. Most - * of these messages contain the original widget ID as a parameter so you can - * know which widget is messaging no matter who it is sent to. + * The standard widgets often send mesages to themselves when the user + * performs an event; these messages are sent up the widget hierarchy until + * they are handled. So you can add a widget proc directly to a push button + * (for example) to intercept the message when it is clicked, or you can put + * one widget proc on a window for all of the push buttons in the window. Most + * of these messages contain the original widget ID as a parameter so you can + * know which widget is messaging no matter who it is sent to. * */ @@ -38,9 +38,9 @@ extern "C" { * MAIN WINDOW ***************************************************************************/ /* - * The main window widget class provides a "window" as the user knows it. - * These windows are dragable and can be selected. Use them to create floating - * windows and non-modal dialogs. + * The main window widget class provides a "window" as the user knows it. + * These windows are dragable and can be selected. Use them to create floating + * windows and non-modal dialogs. * */ @@ -50,44 +50,42 @@ extern "C" { /* * Main Window Type Values * - * These type values are used to control the appearance of a main window. + * These type values are used to control the appearance of a main window. * */ enum { - /* The standard main window; pin stripes on XP7, metal frame on XP 6. */ - xpMainWindowStyle_MainWindow = 0 + /* The standard main window; pin stripes on XP7, metal frame on XP 6. */ + xpMainWindowStyle_MainWindow = 0, - /* A translucent dark gray window, like the one ATC messages appear in. */ - ,xpMainWindowStyle_Translucent = 1 + /* A translucent dark gray window, like the one ATC messages appear in. */ + xpMainWindowStyle_Translucent = 1, }; /* - * Main Window Properties - * + * Main Window Properties * */ enum { - /* This property specifies the type of window. Set to one of the main window * - * types above. */ - xpProperty_MainWindowType = 1100 + /* This property specifies the type of window. Set to one of the main window * + * types above. */ + xpProperty_MainWindowType = 1100, - /* This property specifies whether the main window has close boxes in its * - * corners. */ - ,xpProperty_MainWindowHasCloseBoxes = 1200 + /* This property specifies whether the main window has close boxes in its * + * corners. */ + xpProperty_MainWindowHasCloseBoxes = 1200, }; /* - * MainWindow Messages - * + * MainWindow Messages * */ enum { - /* This message is sent when the close buttons are pressed for your window. */ - xpMessage_CloseButtonPushed = 1200 + /* This message is sent when the close buttons are pressed for your window. */ + xpMessage_CloseButtonPushed = 1200, }; @@ -96,9 +94,9 @@ enum { * SUB WINDOW ***************************************************************************/ /* - * X-Plane dialogs are divided into separate areas; the sub window widgets - * allow you to make these areas. Create one main window and place several - * subwindows inside it. Then place your controls inside the subwindows. + * X-Plane dialogs are divided into separate areas; the sub window widgets + * allow you to make these areas. Create one main window and place several + * subwindows inside it. Then place your controls inside the subwindows. * */ @@ -108,31 +106,30 @@ enum { /* * SubWindow Type Values * - * These values control the appearance of the subwindow. + * These values control the appearance of the subwindow. * */ enum { - /* A panel that sits inside a main window. */ - xpSubWindowStyle_SubWindow = 0 + /* A panel that sits inside a main window. */ + xpSubWindowStyle_SubWindow = 0, - /* A screen that sits inside a panel for showing text information. */ - ,xpSubWindowStyle_Screen = 2 + /* A screen that sits inside a panel for showing text information. */ + xpSubWindowStyle_Screen = 2, - /* A list view for scrolling lists. */ - ,xpSubWindowStyle_ListView = 3 + /* A list view for scrolling lists. */ + xpSubWindowStyle_ListView = 3, }; /* - * SubWindow Properties - * + * SubWindow Properties * */ enum { - /* This property specifies the type of window. Set to one of the subwindow * - * types above. */ - xpProperty_SubWindowType = 1200 + /* This property specifies the type of window. Set to one of the subwindow * + * types above. */ + xpProperty_SubWindowType = 1200, }; @@ -141,22 +138,22 @@ enum { * BUTTON ***************************************************************************/ /* - * The button class provides a number of different button styles and - * behaviors, including push buttons, radio buttons, check boxes, etc. The - * button label appears on or next to the button depending on the button's - * appearance, or type. + * The button class provides a number of different button styles and + * behaviors, including push buttons, radio buttons, check boxes, etc. The + * button label appears on or next to the button depending on the button's + * appearance, or type. * - * The button's behavior is a separate property that dictates who it hilights - * and what kinds of messages it sends. Since behavior and type are different, - * you can do strange things like make check boxes that act as push buttons or - * push buttons with radio button behavior. + * The button's behavior is a separate property that dictates who it hilights + * and what kinds of messages it sends. Since behavior and type are different, + * you can do strange things like make check boxes that act as push buttons or + * push buttons with radio button behavior. * - * In X-Plane 6 there were no check box graphics. The result is the following - * behavior: in X-Plane 6 all check box and radio buttons are round - * (radio-button style) buttons; in X-Plane 7 they are all square (check-box - * style) buttons. In a future version of X-Plane, the xpButtonBehavior enums - * will provide the correct graphic (check box or radio button) giving the - * expected result. + * In X-Plane 6 there were no check box graphics. The result is the following + * behavior: in X-Plane + * 6 all check box and radio buttons are round (radio-button style) buttons; + * in X-Plane 7 they are all square (check-box style) buttons. In a future + * version of X-Plane, the xpButtonBehavior enums will provide the correct + * graphic (check box or radio button) giving the expected result. * */ @@ -166,27 +163,27 @@ enum { /* * Button Types * - * These define the visual appearance of buttons but not how they respond to - * the mouse. + * These define the visual appearance of buttons but not how they respond to + * the mouse. * */ enum { - /* This is a standard push button, like an 'OK' or 'Cancel' button in a dialog * - * box. */ - xpPushButton = 0 + /* This is a standard push button, like an 'OK' or 'Cancel' button in a dialog* + * box. */ + xpPushButton = 0, - /* A check box or radio button. Use this and the button behaviors below to * - * get the desired behavior. */ - ,xpRadioButton = 1 + /* A check box or radio button. Use this and the button behaviors below to * + * get the desired behavior. */ + xpRadioButton = 1, - /* A window close box. */ - ,xpWindowCloseBox = 3 + /* A window close box. */ + xpWindowCloseBox = 3, - /* A small down arrow. */ - ,xpLittleDownArrow = 5 + /* A small down arrow. */ + xpLittleDownArrow = 5, - /* A small up arrow. */ - ,xpLittleUpArrow = 6 + /* A small up arrow. */ + xpLittleUpArrow = 6, }; @@ -194,45 +191,44 @@ enum { /* * Button Behavior Values * - * These define how the button responds to mouse clicks. + * These define how the button responds to mouse clicks. * */ enum { - /* Standard push button behavior. The button hilites while the mouse is * - * clicked over it and unhilites when the mouse is moved outside of it or * - * released. If the mouse is released over the button, the * - * xpMsg_PushButtonPressed message is sent. */ - xpButtonBehaviorPushButton = 0 + /* Standard push button behavior. The button hilites while the mouse is * + * clicked over it and unhilites when the mouse is moved outside of it or * + * released. If the mouse is released over the button, the * + * xpMsg_PushButtonPressed message is sent. */ + xpButtonBehaviorPushButton = 0, - /* Check box behavior. The button immediately toggles its value when the mouse * - * is clicked and sends out a xpMsg_ButtonStateChanged message. */ - ,xpButtonBehaviorCheckBox = 1 + /* Check box behavior. The button immediately toggles its value when the mouse* + * is clicked and sends out a xpMsg_ButtonStateChanged message. */ + xpButtonBehaviorCheckBox = 1, - /* Radio button behavior. The button immediately sets its state to one and * - * sends out a xpMsg_ButtonStateChanged message if it was not already set to * - * one. You must turn off other radio buttons in a group in your code. */ - ,xpButtonBehaviorRadioButton = 2 + /* Radio button behavior. The button immediately sets its state to one and * + * sends out a xpMsg_ButtonStateChanged message if it was not already set to * + * one. You must turn off other radio buttons in a group in your code. */ + xpButtonBehaviorRadioButton = 2, }; /* - * Button Properties - * + * Button Properties * */ enum { - /* This property sets the visual type of button. Use one of the button types * - * above. */ - xpProperty_ButtonType = 1300 + /* This property sets the visual type of button. Use one of the button types * + * above. */ + xpProperty_ButtonType = 1300, - /* This property sets the button's behavior. Use one of the button behaviors * - * above. */ - ,xpProperty_ButtonBehavior = 1301 + /* This property sets the button's behavior. Use one of the button behaviors * + * above. */ + xpProperty_ButtonBehavior = 1301, - /* This property tells whether a check box or radio button is "checked" or * - * not. Not used for push buttons. */ - ,xpProperty_ButtonState = 1302 + /* This property tells whether a check box or radio button is "checked" or * + * not. Not used for push buttons. */ + xpProperty_ButtonState = 1302, }; @@ -240,25 +236,25 @@ enum { /* * Button Messages * - * These messages are sent by the button to itself and then up the widget - * chain when the button is clicked. (You may intercept them by providing a - * widget handler for the button itself or by providing a handler in a parent - * widget.) + * These messages are sent by the button to itself and then up the widget + * chain when the button is clicked. (You may intercept them by providing a + * widget handler for the button itself or by providing a handler in a parent + * widget.) * */ enum { - /* This message is sent when the user completes a click and release in a * - * button with push button behavior. Parameter one of the message is the * - * widget ID of the button. This message is dispatched up the widget * - * hierarchy. */ - xpMsg_PushButtonPressed = 1300 + /* This message is sent when the user completes a click and release in a * + * button with push button behavior. Parameter one of the message is the * + * widget ID of the button. This message is dispatched up the widget * + * hierarchy. */ + xpMsg_PushButtonPressed = 1300, - /* This message is sent when a button is clicked that has radio button or * - * check box behavior and its value changes. (Note that if the value changes * - * by setting a property you do not receive this message!) Parameter one is * - * the widget ID of the button, parameter 2 is the new state value, either * - * zero or one. This message is dispatched up the widget hierarchy. */ - ,xpMsg_ButtonStateChanged = 1301 + /* This message is sent when a button is clicked that has radio button or * + * check box behavior and its value changes. (Note that if the value changes * + * by setting a property you do not receive this message!) Parameter one is * + * the widget ID of the button, parameter 2 is the new state value, either * + * zero or one. This message is dispatched up the widget hierarchy. */ + xpMsg_ButtonStateChanged = 1301, }; @@ -267,21 +263,21 @@ enum { * TEXT FIELD ***************************************************************************/ /* - * The text field widget provides an editable text field including mouse - * selection and keyboard navigation. The contents of the text field are its - * descriptor. (The descriptor changes as the user types.) + * The text field widget provides an editable text field including mouse + * selection and keyboard navigation. The contents of the text field are its + * descriptor. (The descriptor changes as the user types.) * - * The text field can have a number of types, that effect the visual layout of - * the text field. The text field sends messages to itself so you may control - * its behavior. + * The text field can have a number of types, that effect the visual layout of + * the text field. The text field sends messages to itself so you may control + * its behavior. * - * If you need to filter keystrokes, add a new handler and intercept the key - * press message. Since key presses are passed by pointer, you can modify the - * keystroke and pass it through to the text field widget. + * If you need to filter keystrokes, add a new handler and intercept the key + * press message. Since key presses are passed by pointer, you can modify the + * keystroke and pass it through to the text field widget. * - * WARNING: in X-Plane before 7.10 (including 6.70) null characters could - * crash X-Plane. To prevent this, wrap this object with a filter function - * (more instructions can be found on the SDK website). + * WARNING: in X-Plane before 7.10 (including 6.70) null characters could + * crash X-Plane. To prevent this, wrap this object with a filter function + * (more instructions can be found on the SDK website). * */ @@ -291,77 +287,73 @@ enum { /* * Text Field Type Values * - * These control the look of the text field. + * These control the look of the text field. * */ enum { - /* A field for text entry. */ - xpTextEntryField = 0 + /* A field for text entry. */ + xpTextEntryField = 0, - /* A transparent text field. The user can type and the text is drawn, but no * - * background is drawn. You can draw your own background by adding a widget * - * handler and prehandling the draw message. */ - ,xpTextTransparent = 3 + /* A transparent text field. The user can type and the text is drawn, but no * + * background is drawn. You can draw your own background by adding a widget * + * handler and prehandling the draw message. */ + xpTextTransparent = 3, - /* A translucent edit field, dark gray. */ - ,xpTextTranslucent = 4 + /* A translucent edit field, dark gray. */ + xpTextTranslucent = 4, }; /* - * Text Field Properties - * + * Text Field Properties * */ enum { - /* This is the character position the selection starts at, zero based. If it * - * is the same as the end insertion point, the insertion point is not a * - * selection. */ - xpProperty_EditFieldSelStart = 1400 + /* This is the character position the selection starts at, zero based. If it * + * is the same as the end insertion point, the insertion point is not a * + * selection. */ + xpProperty_EditFieldSelStart = 1400, - /* This is the character position of the end of the selection. */ - ,xpProperty_EditFieldSelEnd = 1401 + /* This is the character position of the end of the selection. */ + xpProperty_EditFieldSelEnd = 1401, - /* This is the character position a drag was started at if the user is * - * dragging to select text, or -1 if a drag is not in progress. */ - ,xpProperty_EditFieldSelDragStart = 1402 + /* This is the character position a drag was started at if the user is * + * dragging to select text, or -1 if a drag is not in progress. */ + xpProperty_EditFieldSelDragStart = 1402, - /* This is the type of text field to display, from the above list. */ - ,xpProperty_TextFieldType = 1403 + /* This is the type of text field to display, from the above list. */ + xpProperty_TextFieldType = 1403, - /* Set this property to 1 to password protect the field. Characters will be * - * drawn as *s even though the descriptor will contain plain-text. */ - ,xpProperty_PasswordMode = 1404 + /* Set this property to 1 to password protect the field. Characters will be * + * drawn as *s even though the descriptor will contain plain-text. */ + xpProperty_PasswordMode = 1404, - /* The max number of characters you can enter, if limited. Zero means * - * unlimited. */ - ,xpProperty_MaxCharacters = 1405 + /* The max number of characters you can enter, if limited. Zero means * + * unlimited. */ + xpProperty_MaxCharacters = 1405, - /* The first visible character on the left. This effectively scrolls the text * - * field. */ - ,xpProperty_ScrollPosition = 1406 + /* The first visible character on the left. This effectively scrolls the text* + * field. */ + xpProperty_ScrollPosition = 1406, - /* The font to draw the field's text with. (An XPLMFontID.) */ - ,xpProperty_Font = 1407 + /* The font to draw the field's text with. (An XPLMFontID.) */ + xpProperty_Font = 1407, - /* This is the active side of the insert selection. (Internal) */ - ,xpProperty_ActiveEditSide = 1408 + /* This is the active side of the insert selection. (Internal) */ + xpProperty_ActiveEditSide = 1408, }; /* - * Text Field Messages - * + * Text Field Messages * */ enum { - /* Text Field Messages * - * * - * The text field sends this message to itself when its text changes. It sends * - * the message up the call chain; param1 is the text field's widget ID. */ - xpMsg_TextFieldChanged = 1400 + /* The text field sends this message to itself when its text changes. It sends* + * the message up the call chain; param1 is the text field's widget ID. */ + xpMsg_TextFieldChanged = 1400, }; @@ -370,9 +362,9 @@ enum { * SCROLL BAR ***************************************************************************/ /* - * A standard scroll bar or slider control. The scroll bar has a minimum, - * maximum and current value that is updated when the user drags it. The - * scroll bar sends continuous messages as it is dragged. + * A standard scroll bar or slider control. The scroll bar has a minimum, + * maximum and current value that is updated when the user drags it. The + * scroll bar sends continuous messages as it is dragged. * */ @@ -382,58 +374,54 @@ enum { /* * Scroll Bar Type Values * - * This defines how the scroll bar looks. + * This defines how the scroll bar looks. * */ enum { - /* Scroll bar types. * - * * - * A standard X-Plane scroll bar (with arrows on the ends). */ - xpScrollBarTypeScrollBar = 0 + /* A standard X-Plane scroll bar (with arrows on the ends). */ + xpScrollBarTypeScrollBar = 0, - /* A slider, no arrows. */ - ,xpScrollBarTypeSlider = 1 + /* A slider, no arrows. */ + xpScrollBarTypeSlider = 1, }; /* - * Scroll Bar Properties - * + * Scroll Bar Properties * */ enum { - /* The current position of the thumb (in between the min and max, inclusive) */ - xpProperty_ScrollBarSliderPosition = 1500 + /* The current position of the thumb (in between the min and max, inclusive) */ + xpProperty_ScrollBarSliderPosition = 1500, - /* The value the scroll bar has when the thumb is in the lowest position. */ - ,xpProperty_ScrollBarMin = 1501 + /* The value the scroll bar has when the thumb is in the lowest position. */ + xpProperty_ScrollBarMin = 1501, - /* The value the scroll bar has when the thumb is in the highest position. */ - ,xpProperty_ScrollBarMax = 1502 + /* The value the scroll bar has when the thumb is in the highest position. */ + xpProperty_ScrollBarMax = 1502, - /* How many units to moev the scroll bar when clicking next to the thumb. The * - * scroll bar always moves one unit when the arrows are clicked. */ - ,xpProperty_ScrollBarPageAmount = 1503 + /* How many units to move the scroll bar when clicking next to the thumb. The * + * scroll bar always moves one unit when the arrows are clicked. */ + xpProperty_ScrollBarPageAmount = 1503, - /* The type of scrollbar from the enums above. */ - ,xpProperty_ScrollBarType = 1504 + /* The type of scrollbar from the enums above. */ + xpProperty_ScrollBarType = 1504, - /* Used internally. */ - ,xpProperty_ScrollBarSlop = 1505 + /* Used internally. */ + xpProperty_ScrollBarSlop = 1505, }; /* - * Scroll Bar Messages - * + * Scroll Bar Messages * */ enum { - /* The Scroll Bar sends this message when the slider position changes. It * - * sends the message up the call chain; param1 is the Scroll Bar widget ID. */ - xpMsg_ScrollBarSliderPositionChanged = 1500 + /* The scroll bar sends this message when the slider position changes. It * + * sends the message up the call chain; param1 is the Scroll Bar widget ID. */ + xpMsg_ScrollBarSliderPositionChanged = 1500, }; @@ -442,9 +430,9 @@ enum { * CAPTION ***************************************************************************/ /* - * A caption is a simple widget that shows its descriptor as a string, useful - * for labeling parts of a window. It always shows its descriptor as its - * string and is otherwise transparent. + * A caption is a simple widget that shows its descriptor as a string, useful + * for labeling parts of a window. It always shows its descriptor as its + * string and is otherwise transparent. * */ @@ -452,14 +440,13 @@ enum { #define xpWidgetClass_Caption 6 /* - * Caption Properties - * + * Caption Properties * */ enum { - /* This property specifies whether the caption is lit; use lit captions * - * against screens. */ - xpProperty_CaptionLit = 1600 + /* This property specifies whether the caption is lit; use lit captions * + * against screens. */ + xpProperty_CaptionLit = 1600, }; @@ -468,8 +455,8 @@ enum { * GENERAL GRAPHICS ***************************************************************************/ /* - * The general graphics widget can show one of many icons available from - * X-Plane. + * The general graphics widget can show one of many icons available from + * X-Plane. * */ @@ -479,59 +466,58 @@ enum { /* * General Graphics Types Values * - * These define the icon for the general graphics. + * These define the icon for the general graphics. * */ enum { - xpShip = 4 + xpShip = 4, - ,xpILSGlideScope = 5 + xpILSGlideScope = 5, - ,xpMarkerLeft = 6 + xpMarkerLeft = 6, - ,xp_Airport = 7 + xp_Airport = 7, - ,xpNDB = 8 + xpNDB = 8, - ,xpVOR = 9 + xpVOR = 9, - ,xpRadioTower = 10 + xpRadioTower = 10, - ,xpAircraftCarrier = 11 + xpAircraftCarrier = 11, - ,xpFire = 12 + xpFire = 12, - ,xpMarkerRight = 13 + xpMarkerRight = 13, - ,xpCustomObject = 14 + xpCustomObject = 14, - ,xpCoolingTower = 15 + xpCoolingTower = 15, - ,xpSmokeStack = 16 + xpSmokeStack = 16, - ,xpBuilding = 17 + xpBuilding = 17, - ,xpPowerLine = 18 + xpPowerLine = 18, - ,xpVORWithCompassRose = 19 + xpVORWithCompassRose = 19, - ,xpOilPlatform = 21 + xpOilPlatform = 21, - ,xpOilPlatformSmall = 22 + xpOilPlatformSmall = 22, - ,xpWayPoint = 23 + xpWayPoint = 23, }; /* - * General Graphics Properties - * + * General Graphics Properties * */ enum { - /* This property controls the type of icon that is drawn. */ - xpProperty_GeneralGraphicsType = 1700 + /* This property controls the type of icon that is drawn. */ + xpProperty_GeneralGraphicsType = 1700, }; @@ -540,26 +526,25 @@ enum { * PROGRESS INDICATOR ***************************************************************************/ /* - * This widget implements a progress indicator as seen when X-Plane starts up. + * This widget implements a progress indicator as seen when X-Plane starts up. * */ #define xpWidgetClass_Progress 8 /* - * Progress Indicator Properties - * + * Progress Indicator Properties * */ enum { - /* This is the current value of the progress indicator. */ - xpProperty_ProgressPosition = 1800 + /* This is the current value of the progress indicator. */ + xpProperty_ProgressPosition = 1800, - /* This is the minimum value, equivalent to 0% filled. */ - ,xpProperty_ProgressMin = 1801 + /* This is the minimum value, equivalent to 0% filled. */ + xpProperty_ProgressMin = 1801, - /* This is the maximum value, equivalent to 100% filled. */ - ,xpProperty_ProgressMax = 1802 + /* This is the maximum value, equivalent to 100% filled. */ + xpProperty_ProgressMax = 1802, }; diff --git a/src/SDK/CHeaders/Widgets/XPUIGraphics.h b/src/SDK/CHeaders/Widgets/XPUIGraphics.h index bbf510a1..b70e0f65 100755 --- a/src/SDK/CHeaders/Widgets/XPUIGraphics.h +++ b/src/SDK/CHeaders/Widgets/XPUIGraphics.h @@ -2,18 +2,14 @@ #define _XPUIGraphics_h_ /* - * 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 * */ -/* - * - * - */ +/*************************************************************************** + * XPUIGraphics + ***************************************************************************/ #include "XPWidgetDefs.h" @@ -24,47 +20,43 @@ extern "C" { /*************************************************************************** * UI GRAPHICS ***************************************************************************/ -/* - * - * - */ /* * XPWindowStyle * - * There are a few built-in window styles in X-Plane that you can use. + * There are a few built-in window styles in X-Plane that you can use. * - * Note that X-Plane 6 does not offer real shadow-compositing; you must make - * sure to put a window on top of another window of the right style to the - * shadows work, etc. This applies to elements with insets and shadows. The - * rules are: + * Note that X-Plane 6 does not offer real shadow-compositing; you must make + * sure to put a window on top of another window of the right style to the + * shadows work, etc. This applies to elements with insets and shadows. The + * rules are: * - * Sub windows must go on top of main windows, and screens and list views on - * top of subwindows. Only help and main windows can be over the main screen. + * Sub windows must go on top of main windows, and screens and list views on + * top of subwindows. Only help and main windows can be over the main screen. * - * With X-Plane 7 any window or element may be placed over any other element. + * With X-Plane 7 any window or element may be placed over any other element. * - * Some windows are scaled by stretching, some by repeating. The drawing - * routines know which scaling method to use. The list view cannot be rescaled - * in X-Plane 6 because it has both a repeating pattern and a gradient in one - * element. All other elements can be rescaled. + * Some windows are scaled by stretching, some by repeating. The drawing + * routines know which scaling method to use. The list view cannot be rescaled + * in X-Plane 6 because it has both a repeating pattern and a gradient in one + * element. All other elements can be rescaled. * */ enum { - /* An LCD screen that shows help. */ - xpWindow_Help = 0 + /* An LCD screen that shows help. */ + xpWindow_Help = 0, - /* A dialog box window. */ - ,xpWindow_MainWindow = 1 + /* A dialog box window. */ + xpWindow_MainWindow = 1, - /* A panel or frame within a dialog box window. */ - ,xpWindow_SubWindow = 2 + /* A panel or frame within a dialog box window. */ + xpWindow_SubWindow = 2, - /* An LCD screen within a panel to hold text displays. */ - ,xpWindow_Screen = 4 + /* An LCD screen within a panel to hold text displays. */ + xpWindow_Screen = 4, - /* A list view within a panel for scrolling file names, etc. */ - ,xpWindow_ListView = 5 + /* A list view within a panel for scrolling file names, etc. */ + xpWindow_ListView = 5, }; @@ -73,153 +65,153 @@ typedef int XPWindowStyle; /* * XPDrawWindow * - * This routine draws a window of the given dimensions at the given offset on - * the virtual screen in a given style. The window is automatically scaled as - * appropriate using a bitmap scaling technique (scaling or repeating) as - * appropriate to the style. + * This routine draws a window of the given dimensions at the given offset on + * the virtual screen in a given style. The window is automatically scaled as + * appropriate using a bitmap scaling technique (scaling or repeating) as + * appropriate to the style. * */ -WIDGET_API void XPDrawWindow( - int inX1, - int inY1, - int inX2, - int inY2, - XPWindowStyle inStyle); +WIDGET_API void XPDrawWindow( + int inX1, + int inY1, + int inX2, + int inY2, + XPWindowStyle inStyle); /* * XPGetWindowDefaultDimensions * - * This routine returns the default dimensions for a window. Output is either - * a minimum or fixed value depending on whether the window is scalable. + * This routine returns the default dimensions for a window. Output is either + * a minimum or fixed value depending on whether the window is scalable. * */ -WIDGET_API void XPGetWindowDefaultDimensions( - XPWindowStyle inStyle, - int * outWidth, /* Can be NULL */ - int * outHeight); /* Can be NULL */ +WIDGET_API void XPGetWindowDefaultDimensions( + XPWindowStyle inStyle, + int * outWidth, /* Can be NULL */ + int * outHeight); /* Can be NULL */ /* * XPElementStyle * - * Elements are individually drawable UI things like push buttons, etc. The - * style defines what kind of element you are drawing. Elements can be - * stretched in one or two dimensions (depending on the element). Some - * elements can be lit. + * Elements are individually drawable UI things like push buttons, etc. The + * style defines what kind of element you are drawing. Elements can be + * stretched in one or two dimensions (depending on the element). Some + * elements can be lit. * - * In X-Plane 6 some elements must be drawn over metal. Some are scalable and - * some are not. Any element can be drawn anywhere in X-Plane 7. + * In X-Plane 6 some elements must be drawn over metal. Some are scalable and + * some are not. Any element can be drawn anywhere in X-Plane 7. * - * Scalable Axis Required Background + * Scalable Axis Required Background * */ enum { - /* x metal */ - xpElement_TextField = 6 + /* x metal */ + xpElement_TextField = 6, - /* none metal */ - ,xpElement_CheckBox = 9 + /* none metal */ + xpElement_CheckBox = 9, - /* none metal */ - ,xpElement_CheckBoxLit = 10 + /* none metal */ + xpElement_CheckBoxLit = 10, - /* none window header */ - ,xpElement_WindowCloseBox = 14 + /* none window header */ + xpElement_WindowCloseBox = 14, - /* none window header */ - ,xpElement_WindowCloseBoxPressed = 15 + /* none window header */ + xpElement_WindowCloseBoxPressed = 15, - /* x metal */ - ,xpElement_PushButton = 16 + /* x metal */ + xpElement_PushButton = 16, - /* x metal */ - ,xpElement_PushButtonLit = 17 + /* x metal */ + xpElement_PushButtonLit = 17, - /* none any */ - ,xpElement_OilPlatform = 24 + /* none any */ + xpElement_OilPlatform = 24, - /* none any */ - ,xpElement_OilPlatformSmall = 25 + /* none any */ + xpElement_OilPlatformSmall = 25, - /* none any */ - ,xpElement_Ship = 26 + /* none any */ + xpElement_Ship = 26, - /* none any */ - ,xpElement_ILSGlideScope = 27 + /* none any */ + xpElement_ILSGlideScope = 27, - /* none any */ - ,xpElement_MarkerLeft = 28 + /* none any */ + xpElement_MarkerLeft = 28, - /* none any */ - ,xpElement_Airport = 29 + /* none any */ + xpElement_Airport = 29, - /* none any */ - ,xpElement_Waypoint = 30 + /* none any */ + xpElement_Waypoint = 30, - /* none any */ - ,xpElement_NDB = 31 + /* none any */ + xpElement_NDB = 31, - /* none any */ - ,xpElement_VOR = 32 + /* none any */ + xpElement_VOR = 32, - /* none any */ - ,xpElement_RadioTower = 33 + /* none any */ + xpElement_RadioTower = 33, - /* none any */ - ,xpElement_AircraftCarrier = 34 + /* none any */ + xpElement_AircraftCarrier = 34, - /* none any */ - ,xpElement_Fire = 35 + /* none any */ + xpElement_Fire = 35, - /* none any */ - ,xpElement_MarkerRight = 36 + /* none any */ + xpElement_MarkerRight = 36, - /* none any */ - ,xpElement_CustomObject = 37 + /* none any */ + xpElement_CustomObject = 37, - /* none any */ - ,xpElement_CoolingTower = 38 + /* none any */ + xpElement_CoolingTower = 38, - /* none any */ - ,xpElement_SmokeStack = 39 + /* none any */ + xpElement_SmokeStack = 39, - /* none any */ - ,xpElement_Building = 40 + /* none any */ + xpElement_Building = 40, - /* none any */ - ,xpElement_PowerLine = 41 + /* none any */ + xpElement_PowerLine = 41, - /* none metal */ - ,xpElement_CopyButtons = 45 + /* none metal */ + xpElement_CopyButtons = 45, - /* none metal */ - ,xpElement_CopyButtonsWithEditingGrid = 46 + /* none metal */ + xpElement_CopyButtonsWithEditingGrid = 46, - /* x, y metal */ - ,xpElement_EditingGrid = 47 + /* x, y metal */ + xpElement_EditingGrid = 47, - /* THIS CAN PROBABLY BE REMOVED */ - ,xpElement_ScrollBar = 48 + /* THIS CAN PROBABLY BE REMOVED */ + xpElement_ScrollBar = 48, - /* none any */ - ,xpElement_VORWithCompassRose = 49 + /* none any */ + xpElement_VORWithCompassRose = 49, - /* none metal */ - ,xpElement_Zoomer = 51 + /* none metal */ + xpElement_Zoomer = 51, - /* x, y metal */ - ,xpElement_TextFieldMiddle = 52 + /* x, y metal */ + xpElement_TextFieldMiddle = 52, - /* none metal */ - ,xpElement_LittleDownArrow = 53 + /* none metal */ + xpElement_LittleDownArrow = 53, - /* none metal */ - ,xpElement_LittleUpArrow = 54 + /* none metal */ + xpElement_LittleUpArrow = 54, - /* none metal */ - ,xpElement_WindowDragBar = 61 + /* none metal */ + xpElement_WindowDragBar = 61, - /* none metal */ - ,xpElement_WindowDragBarSmooth = 62 + /* none metal */ + xpElement_WindowDragBarSmooth = 62, }; @@ -228,59 +220,61 @@ typedef int XPElementStyle; /* * XPDrawElement * - * XPDrawElement draws a given element at an offset on the virtual screen in - * set dimensions. EVEN if the element is not scalable, it will be scaled if - * the width and height do not match the preferred dimensions; it'll just look - * ugly. Pass inLit to see the lit version of the element; if the element - * cannot be lit this is ignored. + * XPDrawElement draws a given element at an offset on the virtual screen in + * set dimensions. + * *Even* if the element is not scalable, it will be scaled if the width and + * height do not match the preferred dimensions; it'll just look ugly. Pass + * inLit to see the lit version of the element; if the element cannot be lit + * this is ignored. * */ -WIDGET_API void XPDrawElement( - int inX1, - int inY1, - int inX2, - int inY2, - XPElementStyle inStyle, - int inLit); +WIDGET_API void XPDrawElement( + int inX1, + int inY1, + int inX2, + int inY2, + XPElementStyle inStyle, + int inLit); /* * XPGetElementDefaultDimensions * - * This routine returns the recommended or minimum dimensions of a given UI - * element. outCanBeLit tells whether the element has both a lit and unlit - * state. Pass NULL to not receive any of these parameters. + * This routine returns the recommended or minimum dimensions of a given UI + * element. outCanBeLit tells whether the element has both a lit and unlit + * state. Pass `NULL` to not receive any of these parameters. * */ -WIDGET_API void XPGetElementDefaultDimensions( - XPElementStyle inStyle, - int * outWidth, /* Can be NULL */ - int * outHeight, /* Can be NULL */ - int * outCanBeLit); /* Can be NULL */ +WIDGET_API void XPGetElementDefaultDimensions( + XPElementStyle inStyle, + int * outWidth, /* Can be NULL */ + int * outHeight, /* Can be NULL */ + int * outCanBeLit); /* Can be NULL */ /* * XPTrackStyle * - * A track is a UI element that displays a value vertically or horizontally. - * X-Plane has three kinds of tracks: scroll bars, sliders, and progress bars. - * Tracks can be displayed either horizontally or vertically; tracks will - * choose their own layout based on the larger dimension of their dimensions - * (e.g. they know if they are tall or wide). Sliders may be lit or unlit - * (showing the user manipulating them). + * A track is a UI element that displays a value vertically or horizontally. + * X-Plane has three kinds of tracks: scroll bars, sliders, and progress bars. + * Tracks can be displayed either horizontally or vertically; tracks will + * choose their own layout based on the larger dimension of their dimensions + * (e.g. they know if they are tall or wide). Sliders may be lit or unlit + * (showing the user manipulating them). * - * ScrollBar - this is a standard scroll bar with arrows and a thumb to drag. - * Slider - this is a simple track with a ball in the middle that can be slid. - * Progress - this is a progress indicator showing how a long task is going. + * - ScrollBar: this is a standard scroll bar with arrows and a thumb to drag. + * - Slider: this is a simple track with a ball in the middle that can be + * slid. + * - Progress: this is a progress indicator showing how a long task is going. * */ enum { - /* not over metal can be lit can be rotated */ - xpTrack_ScrollBar = 0 + /* not over metal can be lit can be rotated */ + xpTrack_ScrollBar = 0, - /* over metal can be lit can be rotated */ - ,xpTrack_Slider = 1 + /* over metal can be lit can be rotated */ + xpTrack_Slider = 1, - /* over metal cannot be lit cannot be rotated */ - ,xpTrack_Progress = 2 + /* over metal cannot be lit cannot be rotated */ + xpTrack_Progress = 2, }; @@ -289,69 +283,69 @@ typedef int XPTrackStyle; /* * XPDrawTrack * - * This routine draws a track. You pass in the track dimensions and size; the - * track picks the optimal orientation for these dimensions. Pass in the - * track's minimum current and maximum values; the indicator will be - * positioned appropriately. You can also specify whether the track is lit or - * not. + * This routine draws a track. You pass in the track dimensions and size; the + * track picks the optimal orientation for these dimensions. Pass in the + * track's minimum current and maximum values; the indicator will be + * positioned appropriately. You can also specify whether the track is lit or + * not. * */ -WIDGET_API void XPDrawTrack( - int inX1, - int inY1, - int inX2, - int inY2, - int inMin, - int inMax, - int inValue, - XPTrackStyle inTrackStyle, - int inLit); +WIDGET_API void XPDrawTrack( + int inX1, + int inY1, + int inX2, + int inY2, + int inMin, + int inMax, + int inValue, + XPTrackStyle inTrackStyle, + int inLit); /* * XPGetTrackDefaultDimensions * - * This routine returns a track's default smaller dimension; all tracks are - * scalable in the larger dimension. It also returns whether a track can be - * lit. + * This routine returns a track's default smaller dimension; all tracks are + * scalable in the larger dimension. It also returns whether a track can be + * lit. * */ -WIDGET_API void XPGetTrackDefaultDimensions( - XPTrackStyle inStyle, - int * outWidth, - int * outCanBeLit); +WIDGET_API void XPGetTrackDefaultDimensions( + XPTrackStyle inStyle, + int * outWidth, + int * outCanBeLit); /* * XPGetTrackMetrics * - * This routine returns the metrics of a track. If you want to write UI code - * to manipulate a track, this routine helps you know where the mouse - * locations are. For most other elements, the rectangle the element is drawn - * in is enough information. However, the scrollbar drawing routine does some - * automatic placement; this routine lets you know where things ended up. You - * pass almost everything you would pass to the draw routine. You get out the - * orientation, and other useful stuff. + * This routine returns the metrics of a track. If you want to write UI code + * to manipulate a track, this routine helps you know where the mouse + * locations are. For most other elements, the rectangle the element is drawn + * in is enough information. However, the scrollbar drawing routine does some + * automatic placement; this routine lets you know where things ended up. You + * pass almost everything you would pass to the draw routine. You get out the + * orientation, and other useful stuff. * - * Besides orientation, you get five dimensions for the five parts of a - * scrollbar, which are the down button, down area (area before the thumb), - * the thumb, and the up area and button. For horizontal scrollers, the left - * button decreases; for vertical scrollers, the top button decreases. + * Besides orientation, you get five dimensions for the five parts of a + * scrollbar, which are the down button, down area (area before the thumb), + * the thumb, and the up area and button. For horizontal scrollers, the left + * button decreases; for vertical scrollers, the top button decreases. * */ -WIDGET_API void XPGetTrackMetrics( - int inX1, - int inY1, - int inX2, - int inY2, - int inMin, - int inMax, - int inValue, - XPTrackStyle inTrackStyle, - int * outIsVertical, - int * outDownBtnSize, - int * outDownPageSize, - int * outThumbSize, - int * outUpPageSize, - int * outUpBtnSize); +WIDGET_API void XPGetTrackMetrics( + int inX1, + int inY1, + int inX2, + int inY2, + int inMin, + int inMax, + int inValue, + XPTrackStyle inTrackStyle, + int * outIsVertical, + int * outDownBtnSize, + int * outDownPageSize, + int * outThumbSize, + int * outUpPageSize, + int * outUpBtnSize); #ifdef __cplusplus } diff --git a/src/SDK/CHeaders/Widgets/XPWidgetDefs.h b/src/SDK/CHeaders/Widgets/XPWidgetDefs.h index f01d3a38..c1b2341f 100755 --- a/src/SDK/CHeaders/Widgets/XPWidgetDefs.h +++ b/src/SDK/CHeaders/Widgets/XPWidgetDefs.h @@ -2,18 +2,14 @@ #define _XPWidgetDefs_h_ /* - * 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 * */ -/* - * - * - */ +/*************************************************************************** + * XPWidgetDefs + ***************************************************************************/ #include "XPLMDefs.h" @@ -57,11 +53,11 @@ extern "C" { * WIDGET DEFINITIONS ***************************************************************************/ /* - * A widget is a call-back driven screen entity like a push-button, window, - * text entry field, etc. + * A widget is a call-back driven screen entity like a push-button, window, + * text entry field, etc. * - * Use the widget API to create widgets of various classes. You can nest them - * into trees of widgets to create complex user interfaces. + * Use the widget API to create widgets of various classes. You can nest them + * into trees of widgets to create complex user interfaces. * */ @@ -69,10 +65,10 @@ extern "C" { /* * XPWidgetID * - * A Widget ID is an opaque unique non-zero handle identifying your widget. - * Use 0 to specify "no widget". This type is defined as wide enough to hold a - * pointer. You receive a widget ID when you create a new widget and then use - * that widget ID to further refer to the widget. + * A Widget ID is an opaque unique non-zero handle identifying your widget. + * Use 0 to specify "no widget". This type is defined as wide enough to hold a + * pointer. You receive a widget ID when you create a new widget and then use + * that widget ID to further refer to the widget. * */ typedef void * XPWidgetID; @@ -80,48 +76,50 @@ typedef void * XPWidgetID; /* * XPWidgetPropertyID * - * Properties are values attached to instances of your widgets. A property is - * identified by a 32-bit ID and its value is the width of a pointer. + * Properties are values attached to instances of your widgets. A property is + * identified by a 32-bit ID and its value is the width of a pointer. * - * Each widget instance may have a property or not have it. When you set a - * property on a widget for the first time, the property is added to the - * widget; it then stays there for the life of the widget. + * Each widget instance may have a property or not have it. When you set a + * property on a widget for the first time, the property is added to the + * widget; it then stays there for the life of the widget. * - * Some property IDs are predefined by the widget package; you can make up - * your own property IDs as well. + * Some property IDs are predefined by the widget package; you can make up + * your own property IDs as well. * */ enum { - /* A window's refcon is an opaque value used by client code to find other data * - * based on it. */ - xpProperty_Refcon = 0 + /* A window's refcon is an opaque value used by client code to find other data* + * based on it. */ + xpProperty_Refcon = 0, - /* These properties are used by the utlities to implement dragging. */ - ,xpProperty_Dragging = 1 + /* These properties are used by the utlities to implement dragging. */ + xpProperty_Dragging = 1, - ,xpProperty_DragXOff = 2 + xpProperty_DragXOff = 2, - ,xpProperty_DragYOff = 3 + xpProperty_DragYOff = 3, - /* Is the widget hilited? (For widgets that support this kind of thing.) */ - ,xpProperty_Hilited = 4 + /* Is the widget hilited? (For widgets that support this kind of thing.) */ + xpProperty_Hilited = 4, - /* Is there a C++ object attached to this widget? */ - ,xpProperty_Object = 5 + /* Is there a C++ object attached to this widget? */ + xpProperty_Object = 5, - /* If this property is 1, the widget package will use OpenGL to restrict * - * drawing to the Wiget's exposed rectangle. */ - ,xpProperty_Clip = 6 + /* If this property is 1, the widget package will use OpenGL to restrict * + * drawing to the Wiget's exposed rectangle. */ + xpProperty_Clip = 6, - /* Is this widget enabled (for those that have a disabled state too)? */ - ,xpProperty_Enabled = 7 + /* Is this widget enabled (for those that have a disabled state too)? */ + xpProperty_Enabled = 7, - /* NOTE: Property IDs 1 - 999 are reserved for the widget's library. * - * * - * NOTE: Property IDs 1000 - 9999 are allocated to the standard widget classes * - * provided with the library Properties 1000 - 1099 are for widget class 0, * - * 1100 - 1199 for widget class 1, etc. */ - ,xpProperty_UserStart = 10000 + /* NOTE: Property IDs 1 - 999 are reserved for the widgets library. * + * * + * NOTE: Property IDs 1000 - 9999 are allocated to the standard widget classes* + * provided with the library. * + * * + * Properties 1000 - 1099 are for widget class 0, 1100 - 1199 for widget class* + * 1, etc. */ + xpProperty_UserStart = 10000, }; @@ -130,17 +128,17 @@ typedef int XPWidgetPropertyID; /* * XPMouseState_t * - * When the mouse is clicked or dragged, a pointer to this structure is passed - * to your widget function. + * When the mouse is clicked or dragged, a pointer to this structure is passed + * to your widget function. * */ typedef struct { int x; int y; - /* Mouse Button number, left = 0 (right button not yet supported. */ + /* Mouse Button number, left = 0 (right button not yet supported. */ int button; #if defined(XPLM200) - /* Scroll wheel delta (button in this case would be the wheel axis number). */ + /* Scroll wheel delta (button in this case would be the wheel axis number). */ int delta; #endif /* XPLM200 */ } XPMouseState_t; @@ -148,30 +146,30 @@ typedef struct { /* * XPKeyState_t * - * When a key is pressed, a pointer to this struct is passed to your widget - * function. + * When a key is pressed, a pointer to this struct is passed to your widget + * function. * */ typedef struct { - /* The ASCII key that was pressed. WARNING: this may be 0 for some non-ASCII * - * key sequences. */ + /* The ASCII key that was pressed. WARNING: this may be 0 for some non-ASCII * + * key sequences. */ char key; - /* The flags. Make sure to check this if you only want key-downs! */ + /* The flags. Make sure to check this if you only want key-downs! */ XPLMKeyFlags flags; - /* The virtual key code for the key */ + /* The virtual key code for the key */ char vkey; } XPKeyState_t; /* * XPWidgetGeometryChange_t * - * This structure contains the deltas for your widget's geometry when it - * changes. + * This structure contains the deltas for your widget's geometry when it + * changes. * */ typedef struct { int dx; - /* +Y = the widget moved up */ + /* +Y = the widget moved up */ int dy; int dwidth; int dheight; @@ -180,30 +178,30 @@ typedef struct { /* * XPDispatchMode * - * The dispatching modes describe how the widgets library sends out messages. - * Currently there are three modes: + * The dispatching modes describe how the widgets library sends out messages. + * Currently there are three modes: * */ enum { - /* The message will only be sent to the target widget. */ - xpMode_Direct = 0 + /* The message will only be sent to the target widget. */ + xpMode_Direct = 0, - /* The message is sent to the target widget, then up the chain of parents * - * until the message is handled or a parentless widget is reached. */ - ,xpMode_UpChain = 1 + /* The message is sent to the target widget, then up the chain of parents * + * until the message is handled or a parentless widget is reached. */ + xpMode_UpChain = 1, - /* The message is sent to the target widget and then all of its children * - * recursively depth-first. */ - ,xpMode_Recursive = 2 + /* The message is sent to the target widget and then all of its children * + * recursively depth-first. */ + xpMode_Recursive = 2, - /* The message is snet just to the target, but goes to every callback, even if * - * it is handled. */ - ,xpMode_DirectAllCallbacks = 3 + /* The message is snet just to the target, but goes to every callback, even if* + * it is handled. */ + xpMode_DirectAllCallbacks = 3, - /* The message is only sent to the very first handler even if it is not * - * accepted. (This is really only useful for some internal Widget Lib * - * functions. */ - ,xpMode_Once = 4 + /* The message is only sent to the very first handler even if it is not * + * accepted. (This is really only useful for some internal widget library * + * functions.) */ + xpMode_Once = 4, }; @@ -212,239 +210,235 @@ typedef int XPDispatchMode; /* * XPWidgetClass * - * Widget classes define predefined widget types. A widget class basically - * specifies from a library the widget function to be used for the widget. - * Most widgets can be made right from classes. + * Widget classes define predefined widget types. A widget class basically + * specifies from a library the widget function to be used for the widget. + * Most widgets can be made right from classes. * */ typedef int XPWidgetClass; -/* An unspecified widget class. Other widget classes are in * - * XPStandardWidgets.h */ +/* An unspecified widget class. Other widget classes are in * + * XPStandardWidgets.h */ #define xpWidgetClass_None 0 /*************************************************************************** * WIDGET MESSAGES ***************************************************************************/ -/* - * - * - */ /* * XPWidgetMessage * - * Widgets receive 32-bit messages indicating what action is to be taken or - * notifications of events. The list of messages may be expanded. + * Widgets receive 32-bit messages indicating what action is to be taken or + * notifications of events. The list of messages may be expanded. * */ enum { - /* No message, should not be sent. */ - xpMsg_None = 0 - - /* The create message is sent once per widget that is created with your widget * - * function and once for any widget that has your widget function attached. * - * * - * Dispatching: Direct * - * * - * Param 1: 1 if you are being added as a subclass, 0 if the widget is first * - * being created. */ - ,xpMsg_Create = 1 - - /* The destroy message is sent once for each message that is destroyed that * - * has your widget function. * - * * - * Dispatching: Direct for all * - * * - * Param 1: 1 if being deleted by a recursive delete to the parent, 0 for * - * explicit deletion. */ - ,xpMsg_Destroy = 2 - - /* The paint message is sent to your widget to draw itself. The paint message * - * is the bare-bones message; in response you must draw yourself, draw your * - * children, set up clipping and culling, check for visibility, etc. If you * - * don't want to do all of this, ignore the paint message and a draw message * - * (see below) will be sent to you. * - * * - * Dispatching: Direct */ - ,xpMsg_Paint = 3 - - /* The draw message is sent to your widget when it is time to draw yourself. * - * OpenGL will be set up to draw in 2-d global screen coordinates, but you * - * should use the XPLM to set up OpenGL state. * - * * - * Dispatching: Direct */ - ,xpMsg_Draw = 4 - - /* The key press message is sent once per key that is pressed. The first * - * parameter is the type of key code (integer or char) and the second is the * - * code itself. By handling this event, you consume the key stroke. * - * * - * Handling this message 'consumes' the keystroke; not handling it passes it * - * to your parent widget. * - * * - * Dispatching: Up Chain * - * * - * : Param 1: A pointer to an XPKeyState_t structure with the keystroke. */ - ,xpMsg_KeyPress = 5 - - /* Keyboard focus is being given to you. By handling this message you accept * - * keyboard focus. The first parameter will be one if a child of yours gave up * - * focus to you, 0 if someone set focus on you explicitly. * - * * - * : Handling this message accepts focus; not handling refuses focus. * - * * - * Dispatching: direct * - * * - * Param 1: 1 if you are gaining focus because your child is giving it up, 0 * - * if someone is explicitly giving you focus. */ - ,xpMsg_KeyTakeFocus = 6 - - /* Keyboard focus is being taken away from you. The first parameter will be * - * one if you are losing focus because another widget is taking it, or 0 if * - * someone called the API to make you lose focus explicitly. * - * * - * Dispatching: Direct * - * * - * Param 1: 1 if focus is being taken by another widget, 0 if code requested * - * to remove focus. */ - ,xpMsg_KeyLoseFocus = 7 - - /* You receive one mousedown event per click with a mouse-state structure * - * pointed to by parameter 1, by accepting this you eat the click, otherwise * - * your parent gets it. You will not receive drag and mouse up messages if you * - * do not accept the down message. * - * * - * Handling this message consumes the mouse click, not handling it passes it * - * to the next widget. You can act 'transparent' as a window by never handling * - * moues clicks to certain areas. * - * * - * Dispatching: Up chain NOTE: Technically this is direct dispatched, but the * - * widgets library will shop it to each widget until one consumes the click, * - * making it effectively "up chain". * - * * - * Param 1: A pointer to an XPMouseState_t containing the mouse status. */ - ,xpMsg_MouseDown = 8 - - /* You receive a series of mouse drag messages (typically one per frame in the * - * sim) as the mouse is moved once you have accepted a mouse down message. * - * Parameter one points to a mouse-state structure describing the mouse * - * location. You will continue to receive these until the mouse button is * - * released. You may receive multiple mouse state messages with the same mouse * - * position. You will receive mouse drag events even if the mouse is dragged * - * out of your current or original bounds at the time of the mouse down. * - * * - * Dispatching: Direct * - * * - * Param 1: A pointer to an XPMouseState_t containing the mouse status. */ - ,xpMsg_MouseDrag = 9 - - /* The mouseup event is sent once when the mouse button is released after a * - * drag or click. You only receive this message if you accept the mouseDown * - * message. Parameter one points to a mouse state structure. * - * * - * Dispatching: Direct * - * * - * Param 1: A pointer to an XPMouseState_t containing the mouse status. */ - ,xpMsg_MouseUp = 10 - - /* Your geometry or a child's geometry is being changed. * - * * - * Dispatching: Up chain * - * * - * Param 1: The widget ID of the original reshaped target. * - * * - * Param 2: A pointer to a XPWidgetGeometryChange_t struct describing the * - * change. */ - ,xpMsg_Reshape = 11 - - /* Your exposed area has changed. * - * * - * Dispatching: Direct */ - ,xpMsg_ExposedChanged = 12 - - /* A child has been added to you. The child's ID is passed in parameter one. * - * * - * Dispatching: Direct * - * * - * Param 1: The Widget ID of the child being added. */ - ,xpMsg_AcceptChild = 13 - - /* A child has been removed from to you. The child's ID is passed in parameter * - * one. * - * * - * Dispatching: Direct * - * * - * Param 1: The Widget ID of the child being removed. */ - ,xpMsg_LoseChild = 14 - - /* You now have a new parent, or have no parent. The parent's ID is passed in, * - * or 0 for no parent. * - * * - * Dispatching: Direct * - * * - * Param 1: The Widget ID of your parent */ - ,xpMsg_AcceptParent = 15 - - /* You or a child has been shown. Note that this does not include you being * - * shown because your parent was shown, you were put in a new parent, your * - * root was shown, etc. * - * * - * Dispatching: Up chain * - * * - * Param 1: The widget ID of the shown widget. */ - ,xpMsg_Shown = 16 - - /* You have been hidden. See limitations above. * - * * - * Dispatching: Up chain * - * * - * Param 1: The widget ID of the hidden widget. */ - ,xpMsg_Hidden = 17 - - /* Your descriptor has changed. * - * * - * Dispatching: Direct */ - ,xpMsg_DescriptorChanged = 18 - - /* A property has changed. Param 1 contains the property ID. * - * * - * Dispatching: Direct * - * * - * Param 1: The Property ID being changed. * - * * - * Param 2: The new property value */ - ,xpMsg_PropertyChanged = 19 + /* No message, should not be sent. */ + xpMsg_None = 0, + + /* The create message is sent once per widget that is created with your widget* + * function and once for any widget that has your widget function attached. * + * * + * Dispatching: Direct * + * * + * Param 1: 1 if you are being added as a subclass, 0 if the widget is first * + * being created. */ + xpMsg_Create = 1, + + /* The destroy message is sent once for each message that is destroyed that * + * has your widget function. * + * * + * Dispatching: Direct for all * + * * + * Param 1: 1 if being deleted by a recursive delete to the parent, 0 for * + * explicit deletion. */ + xpMsg_Destroy = 2, + + /* The paint message is sent to your widget to draw itself. The paint message * + * is the bare-bones message; in response you must draw yourself, draw your * + * children, set up clipping and culling, check for visibility, etc. If you * + * don't want to do all of this, ignore the paint message and a draw message * + * (see below) will be sent to you. * + * * + * Dispatching: Direct */ + xpMsg_Paint = 3, + + /* The draw message is sent to your widget when it is time to draw yourself. * + * OpenGL will be set up to draw in 2-d global screen coordinates, but you * + * should use the XPLM to set up OpenGL state. * + * * + * Dispatching: Direct */ + xpMsg_Draw = 4, + + /* The key press message is sent once per key that is pressed. The first * + * parameter is the type of key code (integer or char) and the second is the * + * code itself. By handling this event, you consume the key stroke. * + * * + * Handling this message 'consumes' the keystroke; not handling it passes it * + * to your parent widget. * + * * + * Dispatching: Up Chain * + * * + * Param 1: A pointer to an XPKeyState_t structure with the keystroke. */ + xpMsg_KeyPress = 5, + + /* Keyboard focus is being given to you. By handling this message you accept * + * keyboard focus. The first parameter will be one if a child of yours gave up* + * focus to you, 0 if someone set focus on you explicitly. * + * * + * Handling this message accepts focus; not handling refuses focus. * + * * + * Dispatching: direct * + * * + * Param 1: 1 if you are gaining focus because your child is giving it up, 0 * + * if someone is explicitly giving you focus. */ + xpMsg_KeyTakeFocus = 6, + + /* Keyboard focus is being taken away from you. The first parameter will be * + * one if you are losing focus because another widget is taking it, or 0 if * + * someone called the API to make you lose focus explicitly. * + * * + * Dispatching: Direct * + * * + * Param 1: 1 if focus is being taken by another widget, 0 if code requested * + * to remove focus. */ + xpMsg_KeyLoseFocus = 7, + + /* You receive one mousedown event per click with a mouse-state structure * + * pointed to by parameter 1, by accepting this you eat the click, otherwise * + * your parent gets it. You will not receive drag and mouse up messages if you* + * do not accept the down message. * + * * + * Handling this message consumes the mouse click, not handling it passes it * + * to the next widget. You can act 'transparent' as a window by never handling* + * moues clicks to certain areas. * + * * + * Dispatching: Up chain NOTE: Technically this is direct dispatched, but the * + * widgets library will shop it to each widget until one consumes the click, * + * making it effectively "up chain". * + * * + * Param 1: A pointer to an XPMouseState_t containing the mouse status. */ + xpMsg_MouseDown = 8, + + /* You receive a series of mouse drag messages (typically one per frame in the* + * sim) as the mouse is moved once you have accepted a mouse down message. * + * Parameter one points to a mouse-state structure describing the mouse * + * location. You will continue to receive these until the mouse button is * + * released. You may receive multiple mouse state messages with the same mouse* + * position. You will receive mouse drag events even if the mouse is dragged * + * out of your current or original bounds at the time of the mouse down. * + * * + * Dispatching: Direct * + * * + * Param 1: A pointer to an XPMouseState_t containing the mouse status. */ + xpMsg_MouseDrag = 9, + + /* The mouseup event is sent once when the mouse button is released after a * + * drag or click. You only receive this message if you accept the mouseDown * + * message. Parameter one points to a mouse state structure. * + * * + * Dispatching: Direct * + * * + * Param 1: A pointer to an XPMouseState_t containing the mouse status. */ + xpMsg_MouseUp = 10, + + /* Your geometry or a child's geometry is being changed. * + * * + * Dispatching: Up chain * + * * + * Param 1: The widget ID of the original reshaped target. * + * * + * Param 2: A pointer to a XPWidgetGeometryChange_t struct describing the * + * change. */ + xpMsg_Reshape = 11, + + /* Your exposed area has changed. * + * * + * Dispatching: Direct */ + xpMsg_ExposedChanged = 12, + + /* A child has been added to you. The child's ID is passed in parameter one. * + * * + * Dispatching: Direct * + * * + * Param 1: The Widget ID of the child being added. */ + xpMsg_AcceptChild = 13, + + /* A child has been removed from to you. The child's ID is passed in parameter* + * one. * + * * + * Dispatching: Direct * + * * + * Param 1: The Widget ID of the child being removed. */ + xpMsg_LoseChild = 14, + + /* You now have a new parent, or have no parent. The parent's ID is passed in,* + * or 0 for no parent. * + * * + * Dispatching: Direct * + * * + * Param 1: The Widget ID of your parent */ + xpMsg_AcceptParent = 15, + + /* You or a child has been shown. Note that this does not include you being * + * shown because your parent was shown, you were put in a new parent, your * + * root was shown, etc. * + * * + * Dispatching: Up chain * + * * + * Param 1: The widget ID of the shown widget. */ + xpMsg_Shown = 16, + + /* You have been hidden. See limitations above. * + * * + * Dispatching: Up chain * + * * + * Param 1: The widget ID of the hidden widget. */ + xpMsg_Hidden = 17, + + /* Your descriptor has changed. * + * * + * Dispatching: Direct */ + xpMsg_DescriptorChanged = 18, + + /* A property has changed. Param 1 contains the property ID. * + * * + * Dispatching: Direct * + * * + * Param 1: The Property ID being changed. * + * * + * Param 2: The new property value */ + xpMsg_PropertyChanged = 19, #if defined(XPLM200) - /* The mouse wheel has moved. * - * * - * Return 1 to consume the mouse wheel move, or 0 to pass the message to a * - * parent. Dispatching: Up chain * - * * - * Param 1: A pointer to an XPMouseState_t containing the mouse status. */ - ,xpMsg_MouseWheel = 20 + /* The mouse wheel has moved. * + * * + * Return 1 to consume the mouse wheel move, or 0 to pass the message to a * + * parent. Dispatching: Up chain * + * * + * Param 1: A pointer to an XPMouseState_t containing the mouse status. */ + xpMsg_MouseWheel = 20, #endif /* XPLM200 */ #if defined(XPLM200) - /* The cursor is over your widget. If you consume this message, change the * - * XPLMCursorStatus value to indicate the desired result, with the same rules * - * as in XPLMDisplay.h. * - * * - * Return 1 to consume this message, 0 to pass it on. * - * * - * Dispatching: Up chain Param 1: A pointer to an XPMouseState_t struct * - * containing the mouse status. * - * * - * Param 2: A pointer to a XPLMCursorStatus - set this to the cursor result * - * you desire. */ - ,xpMsg_CursorAdjust = 21 + /* The cursor is over your widget. If you consume this message, change the * + * XPLMCursorStatus value to indicate the desired result, with the same rules * + * as in XPLMDisplay.h. * + * * + * Return 1 to consume this message, 0 to pass it on. * + * * + * Dispatching: Up chain Param 1: A pointer to an XPMouseState_t struct * + * containing the mouse status. * + * * + * Param 2: A pointer to a XPLMCursorStatus - set this to the cursor result * + * you desire. */ + xpMsg_CursorAdjust = 21, #endif /* XPLM200 */ - /* NOTE: Message IDs 1000 - 9999 are allocated to the standard widget classes * - * provided with the library with 1000 - 1099 for widget class 0, 1100 - 1199 * - * for widget class 1, etc. Message IDs 10,000 and beyond are for plugin use. */ - ,xpMsg_UserStart = 10000 + /* NOTE: Message IDs 1000 - 9999 are allocated to the standard widget classes * + * provided with the library with 1000 - 1099 for widget class 0, 1100 - 1199 * + * for widget class 1, etc. Message IDs 10,000 and beyond are for plugin use. */ + xpMsg_UserStart = 10000, }; @@ -453,27 +447,23 @@ typedef int XPWidgetMessage; /*************************************************************************** * WIDGET CALLBACK FUNCTION ***************************************************************************/ -/* - * - * - */ /* * XPWidgetFunc_t * - * This function defines your custom widget's behavior. It will be called by - * the widgets library to send messages to your widget. The message and widget - * ID are passed in, as well as two ptr-width signed parameters whose meaning - * varies with the message. Return 1 to indicate that you have processed the - * message, 0 to indicate that you have not. For any message that is not - * understood, return 0. + * This function defines your custom widget's behavior. It will be called by + * the widgets library to send messages to your widget. The message and widget + * ID are passed in, as well as two ptr-width signed parameters whose meaning + * varies with the message. Return 1 to indicate that you have processed the + * message, 0 to indicate that you have not. For any message that is not + * understood, return 0. * */ typedef int (* XPWidgetFunc_t)( - XPWidgetMessage inMessage, - XPWidgetID inWidget, - intptr_t inParam1, - intptr_t inParam2); + XPWidgetMessage inMessage, + XPWidgetID inWidget, + intptr_t inParam1, + intptr_t inParam2); #ifdef __cplusplus } diff --git a/src/SDK/CHeaders/Widgets/XPWidgetUtils.h b/src/SDK/CHeaders/Widgets/XPWidgetUtils.h index f2fcffd0..ff757f79 100755 --- a/src/SDK/CHeaders/Widgets/XPWidgetUtils.h +++ b/src/SDK/CHeaders/Widgets/XPWidgetUtils.h @@ -2,34 +2,35 @@ #define _XPWidgetUtils_h_ /* - * 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 * */ +/*************************************************************************** + * XPWidgetUtils + ***************************************************************************/ /* - * XPWidgetUtils - USAGE NOTES - * - * The XPWidgetUtils library contains useful functions that make writing and - * using widgets less of a pain. + * ## USAGE NOTES * - * One set of functions are the widget behavior functions. These functions - * each add specific useful behaviors to widgets. They can be used in two - * manners: + * The XPWidgetUtils library contains useful functions that make writing and + * using widgets less of a pain. * - * 1. You can add a widget behavior function to a widget as a callback proc - * using the XPAddWidgetCallback function. The widget will gain that behavior. - * Remember that the last function you add has highest priority. You can use - * this to change or augment the behavior of an existing finished widget. + * One set of functions are the widget behavior functions. These functions + * each add specific useful behaviors to widgets. They can be used in two + * manners: * - * 2. You can call a widget function from inside your own widget function. - * This allows you to include useful behaviors in custom-built widgets. A - * number of the standard widgets get their behavior from this library. To do - * this, call the behavior function from your function first. If it returns 1, - * that means it handled the event and you don't need to; simply return 1. + * 1. You can add a widget behavior function to a widget as a callback proc + * using the XPAddWidgetCallback function. The widget will gain that + * behavior. Remember that the last function you add has highest priority. + * You can use this to change or augment the behavior of an existing + * finished widget. + * 2. You can call a widget function from inside your own widget function. + * This allows you to include useful behaviors in custom-built widgets. A + * number of the standard widgets get their behavior from this library. To + * do this, call the behavior function from your function first. If it + * returns 1, that means it handled the event and you don't need to; simply + * return 1. * */ @@ -42,10 +43,6 @@ extern "C" { /*************************************************************************** * GENERAL UTILITIES ***************************************************************************/ -/* - * - * - */ @@ -75,16 +72,19 @@ extern "C" { /* * XPWidgetCreate_t * - * This structure contains all of the parameters needed to create a wiget. It - * is used with XPUCreateWidgets to create widgets in bulk from an array. All - * parameters correspond to those of XPCreateWidget except for the container - * index. If the container index is equal to the index of a widget in the - * array, the widget in the array passed to XPUCreateWidgets is used as the - * parent of this widget. Note that if you pass an index greater than your own - * position in the array, the parent you are requesting will not exist yet. If - * the container index is NO_PARENT, the parent widget is specified as NULL. - * If the container index is PARAM_PARENT, the widget passed into - * XPUCreateWidgets is used. + * This structure contains all of the parameters needed to create a wiget. It + * is used with XPUCreateWidgets to create widgets in bulk from an array. All + * parameters correspond to those of XPCreateWidget except for the container + * index. + * + * If the container index is equal to the index of a widget in the array, the + * widget in the array passed to XPUCreateWidgets is used as the parent of + * this widget. Note that if you pass an index greater than your own position + * in the array, the parent you are requesting will not exist yet. + * + * If the container index is NO_PARENT, the parent widget is specified as + * NULL. If the container index is PARAM_PARENT, the widget passed into + * XPUCreateWidgets is used. * */ typedef struct { @@ -94,9 +94,9 @@ typedef struct { int bottom; int visible; const char * descriptor; - /* Whether ethis widget is a root wiget */ + /* Whether ethis widget is a root wiget */ int isRoot; - /* The index of the widget to contain within, or a constant */ + /* The index of the widget to contain within, or a constant */ int containerIndex; XPWidgetClass widgetClass; } XPWidgetCreate_t; @@ -110,45 +110,45 @@ typedef struct { /* * XPUCreateWidgets * - * This function creates a series of widgets from a table...see - * XPCreateWidget_t above. Pass in an array of widget creation structures and - * an array of widget IDs that will receive each widget. + * This function creates a series of widgets from a table (see + * XPCreateWidget_t above). Pass in an array of widget creation structures and + * an array of widget IDs that will receive each widget. * - * Widget parents are specified by index into the created widget table, - * allowing you to create nested widget structures. You can create multiple - * widget trees in one table. Generally you should create widget trees from - * the top down. + * Widget parents are specified by index into the created widget table, + * allowing you to create nested widget structures. You can create multiple + * widget trees in one table. Generally you should create widget trees from + * the top down. * - * You can also pass in a widget ID that will be used when the widget's parent - * is listed as PARAM_PARENT; this allows you to embed widgets created with - * XPUCreateWidgets in a widget created previously. + * You can also pass in a widget ID that will be used when the widget's parent + * is listed as PARAM_PARENT; this allows you to embed widgets created with + * XPUCreateWidgets in a widget created previously. * */ -WIDGET_API void XPUCreateWidgets( - const XPWidgetCreate_t * inWidgetDefs, - int inCount, - XPWidgetID inParamParent, - XPWidgetID * ioWidgets); +WIDGET_API void XPUCreateWidgets( + const XPWidgetCreate_t * inWidgetDefs, + int inCount, + XPWidgetID inParamParent, + XPWidgetID * ioWidgets); /* * XPUMoveWidgetBy * - * Simply moves a widget by an amount, +x = right, +y=up, without resizing the - * widget. + * Simply moves a widget by an amount, +x = right, +y=up, without resizing the + * widget. * */ -WIDGET_API void XPUMoveWidgetBy( - XPWidgetID inWidget, - int inDeltaX, - int inDeltaY); +WIDGET_API void XPUMoveWidgetBy( + XPWidgetID inWidget, + int inDeltaX, + int inDeltaY); /*************************************************************************** * LAYOUT MANAGERS ***************************************************************************/ /* - * The layout managers are widget behavior functions for handling where - * widgets move. Layout managers can be called from a widget function or - * attached to a widget later. + * The layout managers are widget behavior functions for handling where + * widgets move. Layout managers can be called from a widget function or + * attached to a widget later. * */ @@ -156,24 +156,24 @@ WIDGET_API void XPUMoveWidgetBy( /* * XPUFixedLayout * - * This function causes the widget to maintain its children in fixed position - * relative to itself as it is resized. Use this on the top level 'window' - * widget for your window. + * This function causes the widget to maintain its children in fixed position + * relative to itself as it is resized. Use this on the top level 'window' + * widget for your window. * */ -WIDGET_API int XPUFixedLayout( - XPWidgetMessage inMessage, - XPWidgetID inWidget, - intptr_t inParam1, - intptr_t inParam2); +WIDGET_API int XPUFixedLayout( + XPWidgetMessage inMessage, + XPWidgetID inWidget, + intptr_t inParam1, + intptr_t inParam2); /*************************************************************************** * WIDGET PROC BEHAVIORS ***************************************************************************/ /* - * These widget behavior functions add other useful behaviors to widgets. - * These functions cannot be attached to a widget; they must be called from - * your widget function. + * These widget behavior functions add other useful behaviors to widgets. + * These functions cannot be attached to a widget; they must be called from + * your widget function. * */ @@ -181,49 +181,49 @@ WIDGET_API int XPUFixedLayout( /* * XPUSelectIfNeeded * - * This causes the widget to bring its window to the foreground if it is not - * already. inEatClick specifies whether clicks in the background should be - * consumed by bringin the window to the foreground. + * This causes the widget to bring its window to the foreground if it is not + * already. inEatClick specifies whether clicks in the background should be + * consumed by bringin the window to the foreground. * */ -WIDGET_API int XPUSelectIfNeeded( - XPWidgetMessage inMessage, - XPWidgetID inWidget, - intptr_t inParam1, - intptr_t inParam2, - int inEatClick); +WIDGET_API int XPUSelectIfNeeded( + XPWidgetMessage inMessage, + XPWidgetID inWidget, + intptr_t inParam1, + intptr_t inParam2, + int inEatClick); /* * XPUDefocusKeyboard * - * This causes a click in the widget to send keyboard focus back to X-Plane. - * This stops editing of any text fields, etc. + * This causes a click in the widget to send keyboard focus back to X-Plane. + * This stops editing of any text fields, etc. * */ -WIDGET_API int XPUDefocusKeyboard( - XPWidgetMessage inMessage, - XPWidgetID inWidget, - intptr_t inParam1, - intptr_t inParam2, - int inEatClick); +WIDGET_API int XPUDefocusKeyboard( + XPWidgetMessage inMessage, + XPWidgetID inWidget, + intptr_t inParam1, + intptr_t inParam2, + int inEatClick); /* * XPUDragWidget * - * XPUDragWidget drags the widget in response to mouse clicks. Pass in not - * only the event, but the global coordinates of the drag region, which might - * be a sub-region of your widget (for example, a title bar). + * XPUDragWidget drags the widget in response to mouse clicks. Pass in not + * only the event, but the global coordinates of the drag region, which might + * be a sub-region of your widget (for example, a title bar). * */ -WIDGET_API int XPUDragWidget( - XPWidgetMessage inMessage, - XPWidgetID inWidget, - intptr_t inParam1, - intptr_t inParam2, - int inLeft, - int inTop, - int inRight, - int inBottom); +WIDGET_API int XPUDragWidget( + XPWidgetMessage inMessage, + XPWidgetID inWidget, + intptr_t inParam1, + intptr_t inParam2, + int inLeft, + int inTop, + int inRight, + int inBottom); #ifdef __cplusplus } diff --git a/src/SDK/CHeaders/Widgets/XPWidgets.h b/src/SDK/CHeaders/Widgets/XPWidgets.h index 84ce15c5..f4423e2c 100755 --- a/src/SDK/CHeaders/Widgets/XPWidgets.h +++ b/src/SDK/CHeaders/Widgets/XPWidgets.h @@ -2,79 +2,66 @@ #define _XPWidgets_h_ /* - * 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 * */ +/*************************************************************************** + * XPWidgets + ***************************************************************************/ /* - * WIDGETS - THEORY OF OPERATION AND NOTES - * - * Widgets are persistent view 'objects' for X-Plane. A widget is an object - * referenced by its opaque handle (widget ID) and the APIs in this file. You - * cannot access the widget's guts directly. Every Widget has the following - * intrinsic data: - * - * - A bounding box defined in global screen coordinates with 0,0 in the - * bottom left and +y = up, +x = right. - * - * - A visible box, which is the intersection of the bounding box with the - * widget's parents visible box. - * - * - Zero or one parent widgets. (Always zero if the widget is a root widget. - * - * - Zero or more child widgets. - * - * - Whether the widget is a root. Root widgets are the top level plugin - * windows. - * - * - Whether the widget is visible. - * - * - A text string descriptor, whose meaning varies from widget to widget. - * - * - An arbitrary set of 32 bit integral properties defined by 32-bit integral - * keys. This is how specific widgets - * - * store specific data. - * - * - A list of widget callbacks proc that implements the widgets behaviors. - * - * The Widgets library sends messages to widgets to request specific behaviors - * or notify the widget of things. - * - * Widgets may have more than one callback function, in which case messages - * are sent to the most recently added callback function until the message is - * handled. Messages may also be sent to parents or children; see the - * XPWidgetDefs.h header file for the different widget message dispatching - * functions. By adding a callback function to a window you can 'subclass' its - * behavior. - * - * A set of standard widgets are provided that serve common UI purposes. You - * can also customize or implement entirely custom widgets. - * - * Widgets are different than other view hierarchies (most notably Win32, - * which they bear a striking resemblance to) in the following ways: - * - * - Not all behavior can be patched. State that is managed by the XPWidgets - * DLL and not by individual widgets cannot be customized. - * - * - All coordinates are in global screen coordinates. Coordinates are not - * relative to an enclosing widget, nor are they relative to a display window. - * - * - * - Widget messages are always dispatched synchronously, and there is no - * concept of scheduling an update or a dirty region. Messages originate from - * X-Plane as the sim cycle goes by. Since X-Plane is constantly redrawing, so - * are widgets; there is no need to mark a part of a widget as 'needing - * redrawing' because redrawing happens frequently whether the widget needs it - * or not. - * - * - Any widget may be a 'root' widget, causing it to be drawn; there is no - * relationship between widget class and rootness. Root widgets are imlemented - * as XPLMDisply windows. + * ## THEORY OF OPERATION AND NOTES + * + * Widgets are persistent view 'objects' for X-Plane. A widget is an object + * referenced by its opaque handle (widget ID) and the APIs in this file. You + * cannot access the widget's guts directly. Every Widget has the following + * intrinsic data: + * + * - A bounding box defined in global screen coordinates with 0,0 in the + * bottom left and +y = up, +x = right. + * - A visible box, which is the intersection of the bounding box with the + * widget's parents visible box. + * - Zero or one parent widgets. (Always zero if the widget is a root widget. + * - Zero or more child widgets. + * - Whether the widget is a root. Root widgets are the top level plugin + * windows. + * - Whether the widget is visible. + * - A text string descriptor, whose meaning varies from widget to widget. + * - An arbitrary set of 32 bit integral properties defined by 32-bit integral + * keys. This is how specific widgets store specific data. + * - A list of widget callbacks proc that implements the widgets behaviors. + * + * The Widgets library sends messages to widgets to request specific behaviors + * or notify the widget of things. + * + * Widgets may have more than one callback function, in which case messages + * are sent to the most recently added callback function until the message is + * handled. Messages may also be sent to parents or children; see the + * XPWidgetDefs.h header file for the different widget message dispatching + * functions. By adding a callback function to a window you can 'subclass' its + * behavior. + * + * A set of standard widgets are provided that serve common UI purposes. You + * can also customize or implement entirely custom widgets. + * + * Widgets are different than other view hierarchies (most notably Win32, + * which they bear a striking resemblance to) in the following ways: + * + * - Not all behavior can be patched. State that is managed by the XPWidgets + * DLL and not by individual widgets cannot be customized. + * - All coordinates are in global screen coordinates. Coordinates are not + * relative to an enclosing widget, nor are they relative to a display + * window. + * - Widget messages are always dispatched synchronously, and there is no + * concept of scheduling an update or a dirty region. Messages originate + * from X-Plane as the sim cycle goes by. Since X-Plane is constantly + * redrawing, so are widgets; there is no need to mark a part of a widget as + * 'needing redrawing' because redrawing happens frequently whether the + * widget needs it or not. + * - Any widget may be a 'root' widget, causing it to be drawn; there is no + * relationship between widget class and rootness. Root widgets are + * imlemented as XPLMDisply windows. * */ @@ -88,488 +75,461 @@ extern "C" { /*************************************************************************** * WIDGET CREATION AND MANAGEMENT ***************************************************************************/ -/* - * - * - */ /* * XPCreateWidget * - * This function creates a new widget and returns the new widget's ID to you. - * If the widget creation fails for some reason, it returns NULL. Widget - * creation will fail either if you pass a bad class ID or if there is not - * adequate memory. - * - * Input Parameters: - * - * - Top, left, bottom, and right in global screen coordinates defining the - * widget's location on the screen. - * - * - inVisible is 1 if the widget should be drawn, 0 to start the widget as - * hidden. - * - * - inDescriptor is a null terminated string that will become the widget's - * descriptor. - * - * - inIsRoot is 1 if this is going to be a root widget, 0 if it will not be. - * - * - inContainer is the ID of this widget's container. It must be 0 for a root - * widget. for a non-root widget, pass the widget ID of the widget to place - * this widget within. If this widget is not going to start inside another - * widget, pass 0; this new widget will then just be floating off in space - * (and will not be drawn until it is placed in a widget. - * - * - inClass is the class of the widget to draw. Use one of the predefined - * class-IDs to create a standard widget. - * - * A note on widget embedding: a widget is only called (and will be drawn, - * etc.) if it is placed within a widget that will be called. Root widgets are - * always called. So it is possible to have whole chains of widgets that are - * simply not called. You can preconstruct widget trees and then place them - * into root widgets later to activate them if you wish. - * - */ -WIDGET_API XPWidgetID XPCreateWidget( - int inLeft, - int inTop, - int inRight, - int inBottom, - int inVisible, - const char * inDescriptor, - int inIsRoot, - XPWidgetID inContainer, - XPWidgetClass inClass); + * This function creates a new widget and returns the new widget's ID to you. + * If the widget creation fails for some reason, it returns NULL. Widget + * creation will fail either if you pass a bad class ID or if there is not + * adequate memory. + * + * Input Parameters: + * + * - Top, left, bottom, and right in global screen coordinates defining the + * widget's location on the screen. + * - inVisible is 1 if the widget should be drawn, 0 to start the widget as + * hidden. + * - inDescriptor is a null terminated string that will become the widget's + * descriptor. + * - inIsRoot is 1 if this is going to be a root widget, 0 if it will not be. + * - inContainer is the ID of this widget's container. It must be 0 for a root + * widget. for a non-root widget, pass the widget ID of the widget to place + * this widget within. If this widget is not going to start inside another + * widget, pass 0; this new widget will then just be floating off in space + * (and will not be drawn until it is placed in a widget. + * - inClass is the class of the widget to draw. Use one of the predefined + * class-IDs to create a standard widget. + * + * A note on widget embedding: a widget is only called (and will be drawn, + * etc.) if it is placed within a widget that will be called. Root widgets are + * always called. So it is possible to have whole chains of widgets that are + * simply not called. You can preconstruct widget trees and then place them + * into root widgets later to activate them if you wish. + * + */ +WIDGET_API XPWidgetID XPCreateWidget( + int inLeft, + int inTop, + int inRight, + int inBottom, + int inVisible, + const char * inDescriptor, + int inIsRoot, + XPWidgetID inContainer, + XPWidgetClass inClass); /* * XPCreateCustomWidget * - * This function is the same as XPCreateWidget except that instead of passing - * a class ID, you pass your widget callback function pointer defining the - * widget. Use this function to define a custom widget. All parameters are the - * same as XPCreateWidget, except that the widget class has been replaced with - * the widget function. + * This function is the same as XPCreateWidget except that instead of passing + * a class ID, you pass your widget callback function pointer defining the + * widget. Use this function to define a custom widget. All parameters are the + * same as XPCreateWidget, except that the widget class has been replaced with + * the widget function. * */ -WIDGET_API XPWidgetID XPCreateCustomWidget( - int inLeft, - int inTop, - int inRight, - int inBottom, - int inVisible, - const char * inDescriptor, - int inIsRoot, - XPWidgetID inContainer, - XPWidgetFunc_t inCallback); +WIDGET_API XPWidgetID XPCreateCustomWidget( + int inLeft, + int inTop, + int inRight, + int inBottom, + int inVisible, + const char * inDescriptor, + int inIsRoot, + XPWidgetID inContainer, + XPWidgetFunc_t inCallback); /* * XPDestroyWidget * - * This class destroys a widget. Pass in the ID of the widget to kill. If you - * pass 1 for inDestroyChilren, the widget's children will be destroyed first, - * then this widget will be destroyed. (Furthermore, the widget's children - * will be destroyed with the inDestroyChildren flag set to 1, so the - * destruction will recurse down the widget tree.) If you pass 0 for this - * flag, the child widgets will simply end up with their parent set to 0. + * This class destroys a widget. Pass in the ID of the widget to kill. If you + * pass 1 for inDestroyChilren, the widget's children will be destroyed first, + * then this widget will be destroyed. (Furthermore, the widget's children + * will be destroyed with the inDestroyChildren flag set to 1, so the + * destruction will recurse down the widget tree.) If you pass 0 for this + * flag, the child widgets will simply end up with their parent set to 0. * */ -WIDGET_API void XPDestroyWidget( - XPWidgetID inWidget, - int inDestroyChildren); +WIDGET_API void XPDestroyWidget( + XPWidgetID inWidget, + int inDestroyChildren); /* * XPSendMessageToWidget * - * This sends any message to a widget. You should probably not go around - * simulating the predefined messages that the widgets library defines for - * you. You may however define custom messages for your widgets and send them - * with this method. + * This sends any message to a widget. You should probably not go around + * simulating the predefined messages that the widgets library defines for + * you. You may however define custom messages for your widgets and send them + * with this method. * - * This method supports several dispatching patterns; see XPDispatchMode for - * more info. The function returns 1 if the message was handled, 0 if it was - * not. + * This method supports several dispatching patterns; see XPDispatchMode for + * more info. The function returns 1 if the message was handled, 0 if it was + * not. * - * For each widget that receives the message (see the dispatching modes), each - * widget function from the most recently installed to the oldest one receives - * the message in order until it is handled. + * For each widget that receives the message (see the dispatching modes), each + * widget function from the most recently installed to the oldest one receives + * the message in order until it is handled. * */ -WIDGET_API int XPSendMessageToWidget( - XPWidgetID inWidget, - XPWidgetMessage inMessage, - XPDispatchMode inMode, - intptr_t inParam1, - intptr_t inParam2); +WIDGET_API int XPSendMessageToWidget( + XPWidgetID inWidget, + XPWidgetMessage inMessage, + XPDispatchMode inMode, + intptr_t inParam1, + intptr_t inParam2); /*************************************************************************** * WIDGET POSITIONING AND VISIBILITY ***************************************************************************/ -/* - * - * - */ /* * XPPlaceWidgetWithin * - * This function changes which container a widget resides in. You may NOT use - * this function on a root widget! inSubWidget is the widget that will be - * moved. Pass a widget ID in inContainer to make inSubWidget be a child of - * inContainer. It will become the last/closest widget in the container. Pass - * 0 to remove the widget from any container. Any call to this other than - * passing the widget ID of the old parent of the affected widget will cause - * the widget to be removed from its old parent. Placing a widget within its - * own parent simply makes it the last widget. - * - * NOTE: this routine does not reposition the sub widget in global - * coordinates. If the container has layout management code, it will - * reposition the subwidget for you, otherwise you must do it with - * SetWidgetGeometry. + * This function changes which container a widget resides in. You may NOT use + * this function on a root widget! inSubWidget is the widget that will be + * moved. Pass a widget ID in inContainer to make inSubWidget be a child of + * inContainer. It will become the last/closest widget in the container. Pass + * 0 to remove the widget from any container. Any call to this other than + * passing the widget ID of the old parent of the affected widget will cause + * the widget to be removed from its old parent. Placing a widget within its + * own parent simply makes it the last widget. + * + * NOTE: this routine does not reposition the sub widget in global + * coordinates. If the container has layout management code, it will + * reposition the subwidget for you, otherwise you must do it with + * SetWidgetGeometry. * */ -WIDGET_API void XPPlaceWidgetWithin( - XPWidgetID inSubWidget, - XPWidgetID inContainer); +WIDGET_API void XPPlaceWidgetWithin( + XPWidgetID inSubWidget, + XPWidgetID inContainer); /* * XPCountChildWidgets * - * This routine returns the number of widgets another widget contains. + * This routine returns the number of widgets another widget contains. * */ -WIDGET_API int XPCountChildWidgets( - XPWidgetID inWidget); +WIDGET_API int XPCountChildWidgets( + XPWidgetID inWidget); /* * XPGetNthChildWidget * - * This routine returns the widget ID of a child widget by index. Indexes are - * 0 based, from 0 to one minus the number of widgets in the parent, - * inclusive. If the index is invalid, 0 is returned. + * This routine returns the widget ID of a child widget by index. Indexes are + * 0 based, from 0 to one minus the number of widgets in the parent, + * inclusive. If the index is invalid, 0 is returned. * */ -WIDGET_API XPWidgetID XPGetNthChildWidget( - XPWidgetID inWidget, - int inIndex); +WIDGET_API XPWidgetID XPGetNthChildWidget( + XPWidgetID inWidget, + int inIndex); /* * XPGetParentWidget * - * This routine returns the parent of a widget, or 0 if the widget has no - * parent. Root widgets never have parents and therefore always return 0. + * Returns the parent of a widget, or 0 if the widget has no parent. Root + * widgets never have parents and therefore always return 0. * */ -WIDGET_API XPWidgetID XPGetParentWidget( - XPWidgetID inWidget); +WIDGET_API XPWidgetID XPGetParentWidget( + XPWidgetID inWidget); /* * XPShowWidget * - * This routine makes a widget visible if it is not already. Note that if a - * widget is not in a rooted widget hierarchy or one of its parents is not - * visible, it will still not be visible to the user. + * This routine makes a widget visible if it is not already. Note that if a + * widget is not in a rooted widget hierarchy or one of its parents is not + * visible, it will still not be visible to the user. * */ -WIDGET_API void XPShowWidget( - XPWidgetID inWidget); +WIDGET_API void XPShowWidget( + XPWidgetID inWidget); /* * XPHideWidget * - * Makes a widget invisible. See XPShowWidget for considerations of when a - * widget might not be visible despite its own visibility state. + * Makes a widget invisible. See XPShowWidget for considerations of when a + * widget might not be visible despite its own visibility state. * */ -WIDGET_API void XPHideWidget( - XPWidgetID inWidget); +WIDGET_API void XPHideWidget( + XPWidgetID inWidget); /* * XPIsWidgetVisible * - * This returns 1 if a widget is visible, 0 if it is not. Note that this - * routine takes into consideration whether a parent is invisible. Use this - * routine to tell if the user can see the widget. + * This returns 1 if a widget is visible, 0 if it is not. Note that this + * routine takes into consideration whether a parent is invisible. Use this + * routine to tell if the user can see the widget. * */ -WIDGET_API int XPIsWidgetVisible( - XPWidgetID inWidget); +WIDGET_API int XPIsWidgetVisible( + XPWidgetID inWidget); /* * XPFindRootWidget * - * XPFindRootWidget returns the Widget ID of the root widget that contains the - * passed in widget or NULL if the passed in widget is not in a rooted - * hierarchy. + * Returns the Widget ID of the root widget that contains the passed in widget + * or NULL if the passed in widget is not in a rooted hierarchy. * */ -WIDGET_API XPWidgetID XPFindRootWidget( - XPWidgetID inWidget); +WIDGET_API XPWidgetID XPFindRootWidget( + XPWidgetID inWidget); /* * XPBringRootWidgetToFront * - * This routine makes the specified widget be in the front most widget - * hierarchy. If this widget is a root widget, its widget hierarchy comes to - * front, otherwise the widget's root is brought to the front. If this widget - * is not in an active widget hiearchy (e.g. there is no root widget at the - * top of the tree), this routine does nothing. + * This routine makes the specified widget be in the front most widget + * hierarchy. If this widget is a root widget, its widget hierarchy comes to + * front, otherwise the widget's root is brought to the front. If this widget + * is not in an active widget hiearchy (e.g. there is no root widget at the + * top of the tree), this routine does nothing. * */ -WIDGET_API void XPBringRootWidgetToFront( - XPWidgetID inWidget); +WIDGET_API void XPBringRootWidgetToFront( + XPWidgetID inWidget); /* * XPIsWidgetInFront * - * This routine returns true if this widget's hierarchy is the front most - * hierarchy. It returns false if the widget's hierarchy is not in front, or - * if the widget is not in a rooted hierarchy. + * This routine returns true if this widget's hierarchy is the front most + * hierarchy. It returns false if the widget's hierarchy is not in front, or + * if the widget is not in a rooted hierarchy. * */ -WIDGET_API int XPIsWidgetInFront( - XPWidgetID inWidget); +WIDGET_API int XPIsWidgetInFront( + XPWidgetID inWidget); /* * XPGetWidgetGeometry * - * This routine returns the bounding box of a widget in global coordinates. - * Pass NULL for any parameter you are not interested in. + * This routine returns the bounding box of a widget in global coordinates. + * Pass NULL for any parameter you are not interested in. * */ -WIDGET_API void XPGetWidgetGeometry( - XPWidgetID inWidget, - int * outLeft, /* Can be NULL */ - int * outTop, /* Can be NULL */ - int * outRight, /* Can be NULL */ - int * outBottom); /* Can be NULL */ +WIDGET_API void XPGetWidgetGeometry( + XPWidgetID inWidget, + int * outLeft, /* Can be NULL */ + int * outTop, /* Can be NULL */ + int * outRight, /* Can be NULL */ + int * outBottom); /* Can be NULL */ /* * XPSetWidgetGeometry * - * This function changes the bounding box of a widget. + * This function changes the bounding box of a widget. * */ -WIDGET_API void XPSetWidgetGeometry( - XPWidgetID inWidget, - int inLeft, - int inTop, - int inRight, - int inBottom); +WIDGET_API void XPSetWidgetGeometry( + XPWidgetID inWidget, + int inLeft, + int inTop, + int inRight, + int inBottom); /* * XPGetWidgetForLocation * - * Given a widget and a location, this routine returns the widget ID of the - * child of that widget that owns that location. If inRecursive is true then - * this will return a child of a child of a widget as it tries to find the - * deepest widget at that location. If inVisibleOnly is true, then only - * visible widgets are considered, otherwise all widgets are considered. The - * widget ID passed for inContainer will be returned if the location is in - * that widget but not in a child widget. 0 is returned if the location is not - * in the container. - * - * NOTE: if a widget's geometry extends outside its parents geometry, it will - * not be returned by this call for mouse locations outside the parent - * geometry. The parent geometry limits the child's eligibility for mouse - * location. + * Given a widget and a location, this routine returns the widget ID of the + * child of that widget that owns that location. If inRecursive is true then + * this will return a child of a child of a widget as it tries to find the + * deepest widget at that location. If inVisibleOnly is true, then only + * visible widgets are considered, otherwise all widgets are considered. The + * widget ID passed for inContainer will be returned if the location is in + * that widget but not in a child widget. 0 is returned if the location is not + * in the container. + * + * NOTE: if a widget's geometry extends outside its parents geometry, it will + * not be returned by this call for mouse locations outside the parent + * geometry. The parent geometry limits the child's eligibility for mouse + * location. * */ -WIDGET_API XPWidgetID XPGetWidgetForLocation( - XPWidgetID inContainer, - int inXOffset, - int inYOffset, - int inRecursive, - int inVisibleOnly); +WIDGET_API XPWidgetID XPGetWidgetForLocation( + XPWidgetID inContainer, + int inXOffset, + int inYOffset, + int inRecursive, + int inVisibleOnly); /* * XPGetWidgetExposedGeometry * - * This routine returns the bounds of the area of a widget that is completely - * within its parent widgets. Since a widget's bounding box can be outside its - * parent, part of its area will not be elligible for mouse clicks and should - * not draw. Use XPGetWidgetGeometry to find out what area defines your - * widget's shape, but use this routine to find out what area to actually draw - * into. Note that the widget library does not use OpenGL clipping to keep - * frame rates up, although you could use it internally. + * This routine returns the bounds of the area of a widget that is completely + * within its parent widgets. Since a widget's bounding box can be outside its + * parent, part of its area will not be elligible for mouse clicks and should + * not draw. Use XPGetWidgetGeometry to find out what area defines your + * widget's shape, but use this routine to find out what area to actually draw + * into. Note that the widget library does not use OpenGL clipping to keep + * frame rates up, although you could use it internally. * */ -WIDGET_API void XPGetWidgetExposedGeometry( - XPWidgetID inWidgetID, - int * outLeft, /* Can be NULL */ - int * outTop, /* Can be NULL */ - int * outRight, /* Can be NULL */ - int * outBottom); /* Can be NULL */ +WIDGET_API void XPGetWidgetExposedGeometry( + XPWidgetID inWidgetID, + int * outLeft, /* Can be NULL */ + int * outTop, /* Can be NULL */ + int * outRight, /* Can be NULL */ + int * outBottom); /* Can be NULL */ /*************************************************************************** * ACCESSING WIDGET DATA ***************************************************************************/ -/* - * - * - */ /* * XPSetWidgetDescriptor * - * Every widget has a descriptor, which is a text string. What the text string - * is used for varies from widget to widget; for example, a push button's text - * is its descriptor, a caption shows its descriptor, and a text field's - * descriptor is the text being edited. In other words, the usage for the text - * varies from widget to widget, but this API provides a universal and - * convenient way to get at it. While not all UI widgets need their - * descriptor, many do. + * Every widget has a descriptor, which is a text string. What the text string + * is used for varies from widget to widget; for example, a push button's text + * is its descriptor, a caption shows its descriptor, and a text field's + * descriptor is the text being edited. In other words, the usage for the text + * varies from widget to widget, but this API provides a universal and + * convenient way to get at it. While not all UI widgets need their + * descriptor, many do. * */ -WIDGET_API void XPSetWidgetDescriptor( - XPWidgetID inWidget, - const char * inDescriptor); +WIDGET_API void XPSetWidgetDescriptor( + XPWidgetID inWidget, + const char * inDescriptor); /* * XPGetWidgetDescriptor * - * This routine returns the widget's descriptor. Pass in the length of the - * buffer you are going to receive the descriptor in. The descriptor will be - * null terminated for you. This routine returns the length of the actual - * descriptor; if you pass NULL for outDescriptor, you can get the - * descriptor's length without getting its text. If the length of the - * descriptor exceeds your buffer length, the buffer will not be null - * terminated (this routine has 'strncpy' semantics). + * This routine returns the widget's descriptor. Pass in the length of the + * buffer you are going to receive the descriptor in. The descriptor will be + * null terminated for you. This routine returns the length of the actual + * descriptor; if you pass NULL for outDescriptor, you can get the + * descriptor's length without getting its text. If the length of the + * descriptor exceeds your buffer length, the buffer will not be null + * terminated (this routine has 'strncpy' semantics). * */ -WIDGET_API int XPGetWidgetDescriptor( - XPWidgetID inWidget, - char * outDescriptor, - int inMaxDescLength); +WIDGET_API int XPGetWidgetDescriptor( + XPWidgetID inWidget, + char * outDescriptor, + int inMaxDescLength); /* * XPGetWidgetUnderlyingWindow * - * Returns the window (from the XPLMDisplay API) that backs your widget - * window. If you have opted in to modern windows, via a call to - * XPLMEnableFeature("XPLM_USE_NATIVE_WIDGET_WINDOWS", 1), you can use the - * returned window ID for display APIs like XPLMSetWindowPositioningMode(), - * allowing you to pop the widget window out into a real OS window, or move it - * into VR. + * Returns the window (from the XPLMDisplay API) that backs your widget + * window. If you have opted in to modern windows, via a call to + * XPLMEnableFeature("XPLM_USE_NATIVE_WIDGET_WINDOWS", 1), you can use the + * returned window ID for display APIs like XPLMSetWindowPositioningMode(), + * allowing you to pop the widget window out into a real OS window, or move it + * into VR. * */ -WIDGET_API XPLMWindowID XPGetWidgetUnderlyingWindow( - XPWidgetID inWidget); +WIDGET_API XPLMWindowID XPGetWidgetUnderlyingWindow( + XPWidgetID inWidget); /* * XPSetWidgetProperty * - * This function sets a widget's property. Properties are arbitrary values - * associated by a widget by ID. + * This function sets a widget's property. Properties are arbitrary values + * associated by a widget by ID. * */ -WIDGET_API void XPSetWidgetProperty( - XPWidgetID inWidget, - XPWidgetPropertyID inProperty, - intptr_t inValue); +WIDGET_API void XPSetWidgetProperty( + XPWidgetID inWidget, + XPWidgetPropertyID inProperty, + intptr_t inValue); /* * XPGetWidgetProperty * - * This routine returns the value of a widget's property, or 0 if the property - * is not defined. If you need to know whether the property is defined, pass a - * pointer to an int for inExists; the existence of that property will be - * returned in the int. Pass NULL for inExists if you do not need this - * information. + * This routine returns the value of a widget's property, or 0 if the property + * is not defined. If you need to know whether the property is defined, pass a + * pointer to an int for inExists; the existence of that property will be + * returned in the int. Pass NULL for inExists if you do not need this + * information. * */ -WIDGET_API intptr_t XPGetWidgetProperty( - XPWidgetID inWidget, - XPWidgetPropertyID inProperty, - int * inExists); /* Can be NULL */ +WIDGET_API intptr_t XPGetWidgetProperty( + XPWidgetID inWidget, + XPWidgetPropertyID inProperty, + int * inExists); /* Can be NULL */ /*************************************************************************** * KEYBOARD MANAGEMENT ***************************************************************************/ -/* - * - * - */ /* * XPSetKeyboardFocus * - * XPSetKeyboardFocus controls which widget will receive keystrokes. Pass the - * Widget ID of the widget to get the keys. Note that if the widget does not - * care about keystrokes, they will go to the parent widget, and if no widget - * cares about them, they go to X-Plane. - * - * If you set the keyboard focus to Widget ID 0, X-Plane gets keyboard focus. + * Controls which widget will receive keystrokes. Pass the widget ID of the + * widget to get the keys. Note that if the widget does not care about + * keystrokes, they will go to the parent widget, and if no widget cares about + * them, they go to X-Plane. * - * This routine returns the widget ID that ended up with keyboard focus, or 0 - * for X-Plane. + * If you set the keyboard focus to widget ID 0, X-Plane gets keyboard focus. * - * Keyboard focus is not changed if the new widget will not accept it. For - * setting to X-Plane, keyboard focus is always accepted. + * This routine returns the widget ID that ended up with keyboard focus, or 0 + * for X-Plane. * - * * + * Keyboard focus is not changed if the new widget will not accept it. For + * setting to X-Plane, keyboard focus is always accepted. + * */ -WIDGET_API XPWidgetID XPSetKeyboardFocus( - XPWidgetID inWidget); +WIDGET_API XPWidgetID XPSetKeyboardFocus( + XPWidgetID inWidget); /* * XPLoseKeyboardFocus * - * This causes the specified widget to lose focus; focus is passed to its - * parent, or the next parent that will accept it. This routine does nothing - * if this widget does not have focus. + * This causes the specified widget to lose focus; focus is passed to its + * parent, or the next parent that will accept it. This routine does nothing + * if this widget does not have focus. * */ -WIDGET_API void XPLoseKeyboardFocus( - XPWidgetID inWidget); +WIDGET_API void XPLoseKeyboardFocus( + XPWidgetID inWidget); /* * XPGetWidgetWithFocus * - * This routine returns the widget that has keyboard focus, or 0 if X-Plane - * has keyboard focus or some other plugin window that does not have widgets - * has focus. + * This routine returns the widget that has keyboard focus, or 0 if X-Plane + * has keyboard focus or some other plugin window that does not have widgets + * has focus. * */ -WIDGET_API XPWidgetID XPGetWidgetWithFocus(void); +WIDGET_API XPWidgetID XPGetWidgetWithFocus(void); /*************************************************************************** * CREATING CUSTOM WIDGETS ***************************************************************************/ -/* - * - * - */ /* * XPAddWidgetCallback * - * This function adds a new widget callback to a widget. This widget callback - * supercedes any existing ones and will receive messages first; if it does - * not handle messages they will go on to be handled by pre-existing widgets. + * This function adds a new widget callback to a widget. This widget callback + * supercedes any existing ones and will receive messages first; if it does + * not handle messages they will go on to be handled by pre-existing widgets. * - * The widget function will remain on the widget for the life of the widget. - * The creation message will be sent to the new callback immediately with the - * widget ID, and the destruction message will be sent before the other widget - * function receives a destruction message. + * The widget function will remain on the widget for the life of the widget. + * The creation message will be sent to the new callback immediately with the + * widget ID, and the destruction message will be sent before the other widget + * function receives a destruction message. * - * This provides a way to 'subclass' an existing widget. By providing a second - * hook that only handles certain widget messages, you can customize or extend - * widget behavior. + * This provides a way to 'subclass' an existing widget. By providing a second + * hook that only handles certain widget messages, you can customize or extend + * widget behavior. * */ -WIDGET_API void XPAddWidgetCallback( - XPWidgetID inWidget, - XPWidgetFunc_t inNewCallback); +WIDGET_API void XPAddWidgetCallback( + XPWidgetID inWidget, + XPWidgetFunc_t inNewCallback); /* * XPGetWidgetClassFunc * - * Given a widget class, this function returns the callbacks that power that - * widget class. + * Given a widget class, this function returns the callbacks that power that + * widget class. * */ -WIDGET_API XPWidgetFunc_t XPGetWidgetClassFunc( - XPWidgetClass inWidgetClass); +WIDGET_API XPWidgetFunc_t XPGetWidgetClassFunc( + XPWidgetClass inWidgetClass); #ifdef __cplusplus } diff --git a/src/SDK/CHeaders/XPLM/XPLMCamera.h b/src/SDK/CHeaders/XPLM/XPLMCamera.h index e12a8dfb..db930ef8 100755 --- a/src/SDK/CHeaders/XPLM/XPLMCamera.h +++ b/src/SDK/CHeaders/XPLM/XPLMCamera.h @@ -2,42 +2,46 @@ #define _XPLMCamera_h_ /* - * 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 * */ +/*************************************************************************** + * XPLMCamera + ***************************************************************************/ /* - * XPLMCamera - THEORY OF OPERATION The XPLMCamera APIs allow plug-ins to - * control the camera angle in X-Plane. This has a number of applications, - * including but not limited to: - * - * - Creating new views (including dynamic/user-controllable views) for the - * user. - * - * - Creating applications that use X-Plane as a renderer of scenery, - * aircrafts, or both. - * - * The camera is controlled via six parameters: a location in OpenGL - * coordinates and pitch, roll and yaw, similar to an airplane's position. - * OpenGL coordinate info is described in detail in the XPLMGraphics - * documentation; generally you should use the XPLMGraphics routines to - * convert from world to local coordinates. The camera's orientation starts - * facing level with the ground directly up the negative-Z axis (approximately - * north) with the horizon horizontal. It is then rotated clockwise for yaw, - * pitched up for positive pitch, and rolled clockwise around the vector it is - * looking along for roll. - * - * You control the camera either either until the user selects a new view or - * permanently (the later being similar to how UDP camera control works). You - * control the camera by registering a callback per frame from which you - * calculate the new camera positions. This guarantees smooth camera motion. - * - * Use the XPLMDataAccess APIs to get information like the position of the - * aircraft, etc. for complex camera positioning. + * The XPLMCamera APIs allow plug-ins to control the camera angle in X-Plane. + * This has a number of applications, including but not limited to: + * + * - Creating new views (including dynamic/user-controllable views) for the + * user. + * - Creating applications that use X-Plane as a renderer of scenery, + * aircrafts, or both. + * + * The camera is controlled via six parameters: a location in OpenGL + * coordinates and pitch, roll and yaw, similar to an airplane's position. + * OpenGL coordinate info is described in detail in the XPLMGraphics + * documentation; generally you should use the XPLMGraphics routines to + * convert from world to local coordinates. The camera's orientation starts + * facing level with the ground directly up the negative-Z axis (approximately + * north) with the horizon horizontal. It is then rotated clockwise for yaw, + * pitched up for positive pitch, and rolled clockwise around the vector it is + * looking along for roll. + * + * You control the camera either either until the user selects a new view or + * permanently (the later being similar to how UDP camera control works). You + * control the camera by registering a callback per frame from which you + * calculate the new camera positions. This guarantees smooth camera motion. + * + * Use the XPLMDataAccess APIs to get information like the position of the + * aircraft, etc. for complex camera positioning. + * + * Note: if your goal is to move the virtual pilot in the cockpit, this API is + * not needed; simply update the datarefs for the pilot's head position. + * + * For custom exterior cameras, set the camera's mode to an external view + * first to get correct sound and 2-d panel behavior. * */ @@ -50,25 +54,21 @@ extern "C" { /*************************************************************************** * CAMERA CONTROL ***************************************************************************/ -/* - * - * - */ /* * XPLMCameraControlDuration * - * This enumeration states how long you want to retain control of the camera. - * You can retain it indefinitely or until the user selects a new view. + * This enumeration states how long you want to retain control of the camera. + * You can retain it indefinitely or until the user selects a new view. * */ enum { - /* Control the camera until the user picks a new view. */ - xplm_ControlCameraUntilViewChanges = 1 + /* Control the camera until the user picks a new view. */ + xplm_ControlCameraUntilViewChanges = 1, - /* Control the camera until your plugin is disabled or another plugin forcably * - * takes control. */ - ,xplm_ControlCameraForever = 2 + /* Control the camera until your plugin is disabled or another plugin forcably* + * takes control. */ + xplm_ControlCameraForever = 2, }; @@ -77,12 +77,12 @@ typedef int XPLMCameraControlDuration; /* * XPLMCameraPosition_t * - * This structure contains a full specification of the camera. X, Y, and Z are - * the camera's position in OpenGL coordiantes; pitch, roll, and yaw are - * rotations from a camera facing flat north in degrees. Positive pitch means - * nose up, positive roll means roll right, and positive yaw means yaw right, - * all in degrees. Zoom is a zoom factor, with 1.0 meaning normal zoom and 2.0 - * magnifying by 2x (objects appear larger). + * This structure contains a full specification of the camera. X, Y, and Z are + * the camera's position in OpenGL coordiantes; pitch, roll, and yaw are + * rotations from a camera facing flat north in degrees. Positive pitch means + * nose up, positive roll means roll right, and positive yaw means yaw right, + * all in degrees. Zoom is a zoom factor, with 1.0 meaning normal zoom and 2.0 + * magnifying by 2x (objects appear larger). * */ typedef struct { @@ -98,67 +98,67 @@ typedef struct { /* * XPLMCameraControl_f * - * You use an XPLMCameraControl function to provide continuous control over - * the camera. You are passed in a structure in which to put the new camera - * position; modify it and return 1 to reposition the camera. Return 0 to - * surrender control of the camera; camera control will be handled by X-Plane - * on this draw loop. The contents of the structure as you are called are - * undefined. + * You use an XPLMCameraControl function to provide continuous control over + * the camera. You are passed in a structure in which to put the new camera + * position; modify it and return 1 to reposition the camera. Return 0 to + * surrender control of the camera; camera control will be handled by X-Plane + * on this draw loop. The contents of the structure as you are called are + * undefined. * - * If X-Plane is taking camera control away from you, this function will be - * called with inIsLosingControl set to 1 and ioCameraPosition NULL. + * If X-Plane is taking camera control away from you, this function will be + * called with inIsLosingControl set to 1 and ioCameraPosition NULL. * */ typedef int (* XPLMCameraControl_f)( - XPLMCameraPosition_t * outCameraPosition, /* Can be NULL */ - int inIsLosingControl, - void * inRefcon); + XPLMCameraPosition_t * outCameraPosition, /* Can be NULL */ + int inIsLosingControl, + void * inRefcon); /* * XPLMControlCamera * - * This function repositions the camera on the next drawing cycle. You must - * pass a non-null control function. Specify in inHowLong how long you'd like - * control (indefinitely or until a key is pressed). + * This function repositions the camera on the next drawing cycle. You must + * pass a non-null control function. Specify in inHowLong how long you'd like + * control (indefinitely or until a new view mode is set by the user). * */ -XPLM_API void XPLMControlCamera( - XPLMCameraControlDuration inHowLong, - XPLMCameraControl_f inControlFunc, - void * inRefcon); +XPLM_API void XPLMControlCamera( + XPLMCameraControlDuration inHowLong, + XPLMCameraControl_f inControlFunc, + void * inRefcon); /* * XPLMDontControlCamera * - * This function stops you from controlling the camera. If you have a camera - * control function, it will not be called with an inIsLosingControl flag. - * X-Plane will control the camera on the next cycle. + * This function stops you from controlling the camera. If you have a camera + * control function, it will not be called with an inIsLosingControl flag. + * X-Plane will control the camera on the next cycle. * - * For maximum compatibility you should not use this routine unless you are in - * posession of the camera. + * For maximum compatibility you should not use this routine unless you are in + * posession of the camera. * */ -XPLM_API void XPLMDontControlCamera(void); +XPLM_API void XPLMDontControlCamera(void); /* * XPLMIsCameraBeingControlled * - * This routine returns 1 if the camera is being controlled, zero if it is - * not. If it is and you pass in a pointer to a camera control duration, the - * current control duration will be returned. + * This routine returns 1 if the camera is being controlled, zero if it is + * not. If it is and you pass in a pointer to a camera control duration, the + * current control duration will be returned. * */ -XPLM_API int XPLMIsCameraBeingControlled( - XPLMCameraControlDuration * outCameraControlDuration); /* Can be NULL */ +XPLM_API int XPLMIsCameraBeingControlled( + XPLMCameraControlDuration * outCameraControlDuration); /* Can be NULL */ /* * XPLMReadCameraPosition * - * This function reads the current camera position. + * This function reads the current camera position. * */ -XPLM_API void XPLMReadCameraPosition( - XPLMCameraPosition_t * outCameraPosition); +XPLM_API void XPLMReadCameraPosition( + XPLMCameraPosition_t * outCameraPosition); #ifdef __cplusplus } diff --git a/src/SDK/CHeaders/XPLM/XPLMDataAccess.h b/src/SDK/CHeaders/XPLM/XPLMDataAccess.h index 6ea77c50..d8d1418f 100755 --- a/src/SDK/CHeaders/XPLM/XPLMDataAccess.h +++ b/src/SDK/CHeaders/XPLM/XPLMDataAccess.h @@ -2,61 +2,82 @@ #define _XPLMDataAccess_h_ /* - * 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 * */ +/*************************************************************************** + * XPLMDataAccess + ***************************************************************************/ /* - * XPLM Data Access API - Theory of Operation + * The data access API gives you a generic, flexible, high performance way to + * read and write data to and from X-Plane and other plug-ins. For example, + * this API allows you to read and set the nav radios, get the plane location, + * determine the current effective graphics frame rate, etc. + * + * The data access APIs are the way that you read and write data from the sim + * as well as other plugins. + * + * The API works using opaque data references. A data reference is a source of + * data; you do not know where it comes from, but once you have it you can + * read the data quickly and possibly write it. * - * The data access API gives you a generic, flexible, high performance way to - * read and write data to and from X-Plane and other plug-ins. For example, - * this API allows you to read and set the nav radios, get the plane location, - * determine the current effective graphics frame rate, etc. + * Dataref Lookup + * -------------- * - * The data access APIs are the way that you read and write data from the sim - * as well as other plugins. + * Data references are identified by verbose, permanent string names; by + * convention these names use path separates to form a hierarchy of datarefs, + * e.g. (sim/cockpit/radios/nav1_freq_hz). The actual opaque numeric value of + * the data reference, as returned by the XPLM API, is implementation defined + * and changes each time X-Plane is launched; therefore you need to look up + * the dataref by path every time your plugin runs. * - * The API works using opaque data references. A data reference is a source of - * data; you do not know where it comes from, but once you have it you can - * read the data quickly and possibly write it. To get a data reference, you - * look it up. + * The task of looking up a data reference is relatively expensive; look up + * your data references once based on the verbose path strings, and save the + * opaque data reference value for the duration of your plugin's operation. + * Reading and writing data references is relatively fast (the cost is + * equivalent to two function calls through function pointers). * - * Data references are identified by verbose string names - * (sim/cockpit/radios/nav1_freq_hz). The actual numeric value of the data - * reference is implementation defined and is likely to change each time the - * simulator is run (or the plugin that provides the datareference is - * reloaded). + * X-Plane publishes over 4000 datarefs; a complete list may be found in the + * reference section of the SDK online documentation (from the SDK home page, + * choose Documentation). * - * The task of looking up a data reference is relatively expensive; look up - * your data references once based on verbose strings, and save the opaque - * data reference value for the duration of your plugin's operation. Reading - * and writing data references is relatively fast (the cost is equivalent to - * two function calls through function pointers). + * Dataref Types + * ------------- * - * This allows data access to be high performance, while leaving in - * abstraction; since data references are opaque and are searched for, the - * underlying data access system can be rebuilt. + * A note on typing: you must know the correct data type to read and write. + * APIs are provided for reading and writing data in a number of ways. You can + * also double check the data type for a data ref. Automatic type conversion + * is not done for you. * - * A note on typing: you must know the correct data type to read and write. - * APIs are provided for reading and writing data in a number of ways. You can - * also double check the data type for a data ref. Note that automatic - * conversion is not done for you. + * Dataref types are a set, e.g. a dataref can be more than one type. When + * this happens, you can choose which API you want to use to read. For + * example, it is not uncommon for a dataref to be of type float and double. + * This means you can use either XPLMGetDatad or XPLMGetDataf to read it. * - * A note for plugins sharing data with other plugins: the load order of - * plugins is not guaranteed. To make sure that every plugin publishing data - * has published their data references before other plugins try to subscribe, - * publish your data references in your start routine but resolve them the - * first time your 'enable' routine is called, or the first time they are - * needed in code. + * Creating New Datarefs + * --------------------- * - * X-Plane publishes well over 1000 datarefs; a complete list may be found in - * the reference section of the SDK online documentation (from the SDK home - * page, choose Documentation). + * X-Plane provides datarefs that come with the sim, but plugins can also + * create their own datarefs. A plugin creates a dataref by registering + * function callbacks to read and write the dataref. The XPLM will call your + * plugin each time some other plugin (or X-Plane) tries to read or write the + * dataref. You must provide a read (and optional write) callback for each + * data type you support. + * + * A note for plugins sharing data with other plugins: the load order of + * plugins is not guaranteed. To make sure that every plugin publishing data + * has published their data references before other plugins try to subscribe, + * publish your data references in your start routine but resolve them the + * first time your 'enable' routine is called, or the first time they are + * needed in code. + * + * When a plugin that created a dataref is unloaded, it becomes "orphaned". + * The dataref handle continues to be usable, but the dataref is not writable, + * and reading it will always return 0 (or 0 items for arrays). If the plugin + * is reloaded and re-registers the dataref, the handle becomes un-orphaned + * and works again. * */ @@ -70,8 +91,8 @@ extern "C" { * READING AND WRITING DATA ***************************************************************************/ /* - * These routines allow you to access a wide variety of data from within - * X-Plane and modify some of it. + * These routines allow you to access data from within X-Plane and sometimes + * modify it. * */ @@ -79,10 +100,10 @@ extern "C" { /* * XPLMDataRef * - * A data ref is an opaque handle to data provided by the simulator or another - * plugin. It uniquely identifies one variable (or array of variables) over - * the lifetime of your plugin. You never hard code these values; you always - * get them from XPLMFindDataRef. + * A data ref is an opaque handle to data provided by the simulator or another + * plugin. It uniquely identifies one variable (or array of variables) over + * the lifetime of your plugin. You never hard code these values; you always + * get them from XPLMFindDataRef. * */ typedef void * XPLMDataRef; @@ -90,35 +111,37 @@ typedef void * XPLMDataRef; /* * XPLMDataTypeID * - * This is an enumeration that defines the type of the data behind a data - * reference. This allows you to sanity check that the data type matches what - * you expect. But for the most part, you will know the type of data you are - * expecting from the online documentation. + * This is an enumeration that defines the type of the data behind a data + * reference. This allows you to sanity check that the data type matches what + * you expect. But for the most part, you will know the type of data you are + * expecting from the online documentation. * - * Data types each take a bit field, so sets of data types may be formed. + * Data types each take a bit field; it is legal to have a single dataref be + * more than one type of data. Whe this happens, you can pick any matching + * get/set API. * */ enum { - /* Data of a type the current XPLM doesn't do. */ - xplmType_Unknown = 0 + /* Data of a type the current XPLM doesn't do. */ + xplmType_Unknown = 0, - /* A single 4-byte integer, native endian. */ - ,xplmType_Int = 1 + /* A single 4-byte integer, native endian. */ + xplmType_Int = 1, - /* A single 4-byte float, native endian. */ - ,xplmType_Float = 2 + /* A single 4-byte float, native endian. */ + xplmType_Float = 2, - /* A single 8-byte double, native endian. */ - ,xplmType_Double = 4 + /* A single 8-byte double, native endian. */ + xplmType_Double = 4, - /* An array of 4-byte floats, native endian. */ - ,xplmType_FloatArray = 8 + /* An array of 4-byte floats, native endian. */ + xplmType_FloatArray = 8, - /* An array of 4-byte integers, native endian. */ - ,xplmType_IntArray = 16 + /* An array of 4-byte integers, native endian. */ + xplmType_IntArray = 16, - /* A variable block of data. */ - ,xplmType_Data = 32 + /* A variable block of data. */ + xplmType_Data = 32, }; @@ -127,76 +150,84 @@ typedef int XPLMDataTypeID; /* * XPLMFindDataRef * - * Given a c-style string that names the data ref, this routine looks up the - * actual opaque XPLMDataRef that you use to read and write the data. The - * string names for datarefs are published on the X-Plane SDK web site. + * Given a c-style string that names the data ref, this routine looks up the + * actual opaque XPLMDataRef that you use to read and write the data. The + * string names for datarefs are published on the X-Plane SDK web site. * - * This function returns NULL if the data ref cannot be found. + * This function returns NULL if the data ref cannot be found. * - * NOTE: this function is relatively expensive; save the XPLMDataRef this - * function returns for future use. Do not look up your data ref by string - * every time you need to read or write it. + * NOTE: this function is relatively expensive; save the XPLMDataRef this + * function returns for future use. Do not look up your data ref by string + * every time you need to read or write it. * */ -XPLM_API XPLMDataRef XPLMFindDataRef( - const char * inDataRefName); +XPLM_API XPLMDataRef XPLMFindDataRef( + const char * inDataRefName); /* * XPLMCanWriteDataRef * - * Given a data ref, this routine returns true if you can successfully set the - * data, false otherwise. Some datarefs are read-only. + * Given a data ref, this routine returns true if you can successfully set the + * data, false otherwise. Some datarefs are read-only. + * + * NOTE: even if a dataref is marked writable, it may not act writable. This + * can happen for datarefs that X-Plane writes to on every frame of + * simulation. In some cases, the dataref is writable but you have to set a + * separate "override" dataref to 1 to stop X-Plane from writing it. * */ -XPLM_API int XPLMCanWriteDataRef( - XPLMDataRef inDataRef); +XPLM_API int XPLMCanWriteDataRef( + XPLMDataRef inDataRef); /* * XPLMIsDataRefGood * - * WARNING: This function is deprecated and should not be used. Datarefs are - * valid until plugins are reloaded or the sim quits. Plugins sharing datarefs - * should support these semantics by not unregistering datarefs during - * operation. (You should however unregister datarefs when your plugin is - * unloaded, as part of general resource cleanup.) + * This function returns true if the passed in handle is a valid dataref that + * is not orphaned. * - * This function returns whether a data ref is still valid. If it returns - * false, you should refind the data ref from its original string. Calling an - * accessor function on a bad data ref will return a default value, typically - * 0 or 0-length data. + * Note: there is normally no need to call this function; datarefs returned by + * XPLMFindDataRef remain valid (but possibly orphaned) unless there is a + * complete plugin reload (in which case your plugin is reloaded anyway). + * Orphaned datarefs can be safely read and return 0. Therefore you never need + * to call XPLMIsDataRefGood to 'check' the safety of a dataref. + * (XPLMIsDatarefGood performs some slow checking of the handle validity, so + * it has a perormance cost.) * */ -XPLM_API int XPLMIsDataRefGood( - XPLMDataRef inDataRef); +XPLM_API int XPLMIsDataRefGood( + XPLMDataRef inDataRef); /* * XPLMGetDataRefTypes * - * This routine returns the types of the data ref for accessor use. If a data - * ref is available in multiple data types, they will all be returned. + * This routine returns the types of the data ref for accessor use. If a data + * ref is available in multiple data types, the bit-wise OR of these types + * will be returned. * */ -XPLM_API XPLMDataTypeID XPLMGetDataRefTypes( - XPLMDataRef inDataRef); +XPLM_API XPLMDataTypeID XPLMGetDataRefTypes( + XPLMDataRef inDataRef); /*************************************************************************** * DATA ACCESSORS ***************************************************************************/ /* - * These routines read and write the data references. For each supported data - * type there is a reader and a writer. + * These routines read and write the data references. For each supported data + * type there is a reader and a writer. * - * If the data ref is invalid or the plugin that provides it is disabled or - * there is a type mismatch, the functions that read data will return 0 as a - * default value or not modify the passed in memory. The plugins that write - * data will not write under these circumstances or if the data ref is - * read-only. NOTE: to keep the overhead of reading datarefs low, these - * routines do not do full validation of a dataref; passing a junk value for a - * dataref can result in crashing the sim. + * If the data ref is orphaned or the plugin that provides it is disabled or + * there is a type mismatch, the functions that read data will return 0 as a + * default value or not modify the passed in memory. The plugins that write + * data will not write under these circumstances or if the data ref is + * read-only. * - * For array-style datarefs, you specify the number of items to read/write and - * the offset into the array; the actual number of items read or written is - * returned. This may be less to prevent an array-out-of-bounds error. + * NOTE: to keep the overhead of reading datarefs low, these routines do not + * do full validation of a dataref; passing a junk value for a dataref can + * result in crashing the sim. The get/set APIs do check for NULL. + * + * For array-style datarefs, you specify the number of items to read/write and + * the offset into the array; the actual number of items read or written is + * returned. This may be less to prevent an array-out-of-bounds error. * */ @@ -204,222 +235,220 @@ XPLM_API XPLMDataTypeID XPLMGetDataRefTypes( /* * XPLMGetDatai * - * Read an integer data ref and return its value. The return value is the - * dataref value or 0 if the dataref is invalid/NULL or the plugin is - * disabled. + * Read an integer data ref and return its value. The return value is the + * dataref value or 0 if the dataref is NULL or the plugin is disabled. * */ -XPLM_API int XPLMGetDatai( - XPLMDataRef inDataRef); +XPLM_API int XPLMGetDatai( + XPLMDataRef inDataRef); /* * XPLMSetDatai * - * Write a new value to an integer data ref. This routine is a no-op if the - * plugin publishing the dataref is disabled, the dataref is invalid, or the - * dataref is not writable. + * Write a new value to an integer data ref. This routine is a no-op if the + * plugin publishing the dataref is disabled, the dataref is NULL, or the + * dataref is not writable. * */ -XPLM_API void XPLMSetDatai( - XPLMDataRef inDataRef, - int inValue); +XPLM_API void XPLMSetDatai( + XPLMDataRef inDataRef, + int inValue); /* * XPLMGetDataf * - * Read a single precision floating point dataref and return its value. The - * return value is the dataref value or 0.0 if the dataref is invalid/NULL or - * the plugin is disabled. + * Read a single precision floating point dataref and return its value. The + * return value is the dataref value or 0.0 if the dataref is NULL or the + * plugin is disabled. * */ -XPLM_API float XPLMGetDataf( - XPLMDataRef inDataRef); +XPLM_API float XPLMGetDataf( + XPLMDataRef inDataRef); /* * XPLMSetDataf * - * Write a new value to a single precision floating point data ref. This - * routine is a no-op if the plugin publishing the dataref is disabled, the - * dataref is invalid, or the dataref is not writable. + * Write a new value to a single precision floating point data ref. This + * routine is a no-op if the plugin publishing the dataref is disabled, the + * dataref is NULL, or the dataref is not writable. * */ -XPLM_API void XPLMSetDataf( - XPLMDataRef inDataRef, - float inValue); +XPLM_API void XPLMSetDataf( + XPLMDataRef inDataRef, + float inValue); /* * XPLMGetDatad * - * Read a double precision floating point dataref and return its value. The - * return value is the dataref value or 0.0 if the dataref is invalid/NULL or - * the plugin is disabled. + * Read a double precision floating point dataref and return its value. The + * return value is the dataref value or 0.0 if the dataref is NULL or the + * plugin is disabled. * */ -XPLM_API double XPLMGetDatad( - XPLMDataRef inDataRef); +XPLM_API double XPLMGetDatad( + XPLMDataRef inDataRef); /* * XPLMSetDatad * - * Write a new value to a double precision floating point data ref. This - * routine is a no-op if the plugin publishing the dataref is disabled, the - * dataref is invalid, or the dataref is not writable. + * Write a new value to a double precision floating point data ref. This + * routine is a no-op if the plugin publishing the dataref is disabled, the + * dataref is NULL, or the dataref is not writable. * */ -XPLM_API void XPLMSetDatad( - XPLMDataRef inDataRef, - double inValue); +XPLM_API void XPLMSetDatad( + XPLMDataRef inDataRef, + double inValue); /* * XPLMGetDatavi * - * Read a part of an integer array dataref. If you pass NULL for outVaules, - * the routine will return the size of the array, ignoring inOffset and inMax. - * + * Read a part of an integer array dataref. If you pass NULL for outValues, + * the routine will return the size of the array, ignoring inOffset and inMax. * - * If outValues is not NULL, then up to inMax values are copied from the - * dataref into outValues, starting at inOffset in the dataref. If inMax + - * inOffset is larger than the size of the dataref, less than inMax values - * will be copied. The number of values copied is returned. + * If outValues is not NULL, then up to inMax values are copied from the + * dataref into outValues, starting at inOffset in the dataref. If inMax + + * inOffset is larger than the size of the dataref, less than inMax values + * will be copied. The number of values copied is returned. * - * Note: the semantics of array datarefs are entirely implemented by the - * plugin (or X-Plane) that provides the dataref, not the SDK itself; the - * above description is how these datarefs are intended to work, but a rogue - * plugin may have different behavior. + * Note: the semantics of array datarefs are entirely implemented by the + * plugin (or X-Plane) that provides the dataref, not the SDK itself; the + * above description is how these datarefs are intended to work, but a rogue + * plugin may have different behavior. * */ -XPLM_API int XPLMGetDatavi( - XPLMDataRef inDataRef, - int * outValues, /* Can be NULL */ - int inOffset, - int inMax); +XPLM_API int XPLMGetDatavi( + XPLMDataRef inDataRef, + int * outValues, /* Can be NULL */ + int inOffset, + int inMax); /* * XPLMSetDatavi * - * Write part or all of an integer array dataref. The values passed by - * inValues are written into the dataref starting at inOffset. Up to inCount - * values are written; however if the values would write "off the end" of the - * dataref array, then fewer values are written. + * Write part or all of an integer array dataref. The values passed by + * inValues are written into the dataref starting at inOffset. Up to inCount + * values are written; however if the values would write "off the end" of the + * dataref array, then fewer values are written. * - * Note: the semantics of array datarefs are entirely implemented by the - * plugin (or X-Plane) that provides the dataref, not the SDK itself; the - * above description is how these datarefs are intended to work, but a rogue - * plugin may have different behavior. + * Note: the semantics of array datarefs are entirely implemented by the + * plugin (or X-Plane) that provides the dataref, not the SDK itself; the + * above description is how these datarefs are intended to work, but a rogue + * plugin may have different behavior. * */ -XPLM_API void XPLMSetDatavi( - XPLMDataRef inDataRef, - int * inValues, - int inoffset, - int inCount); +XPLM_API void XPLMSetDatavi( + XPLMDataRef inDataRef, + int * inValues, + int inoffset, + int inCount); /* * XPLMGetDatavf * - * Read a part of a single precision floating point array dataref. If you pass - * NULL for outVaules, the routine will return the size of the array, ignoring - * inOffset and inMax. + * Read a part of a single precision floating point array dataref. If you pass + * NULL for outVaules, the routine will return the size of the array, ignoring + * inOffset and inMax. * - * If outValues is not NULL, then up to inMax values are copied from the - * dataref into outValues, starting at inOffset in the dataref. If inMax + - * inOffset is larger than the size of the dataref, less than inMax values - * will be copied. The number of values copied is returned. + * If outValues is not NULL, then up to inMax values are copied from the + * dataref into outValues, starting at inOffset in the dataref. If inMax + + * inOffset is larger than the size of the dataref, less than inMax values + * will be copied. The number of values copied is returned. * - * Note: the semantics of array datarefs are entirely implemented by the - * plugin (or X-Plane) that provides the dataref, not the SDK itself; the - * above description is how these datarefs are intended to work, but a rogue - * plugin may have different behavior. + * Note: the semantics of array datarefs are entirely implemented by the + * plugin (or X-Plane) that provides the dataref, not the SDK itself; the + * above description is how these datarefs are intended to work, but a rogue + * plugin may have different behavior. * */ -XPLM_API int XPLMGetDatavf( - XPLMDataRef inDataRef, - float * outValues, /* Can be NULL */ - int inOffset, - int inMax); +XPLM_API int XPLMGetDatavf( + XPLMDataRef inDataRef, + float * outValues, /* Can be NULL */ + int inOffset, + int inMax); /* * XPLMSetDatavf * - * Write part or all of a single precision floating point array dataref. The - * values passed by inValues are written into the dataref starting at - * inOffset. Up to inCount values are written; however if the values would - * write "off the end" of the dataref array, then fewer values are written. + * Write part or all of a single precision floating point array dataref. The + * values passed by inValues are written into the dataref starting at + * inOffset. Up to inCount values are written; however if the values would + * write "off the end" of the dataref array, then fewer values are written. * - * Note: the semantics of array datarefs are entirely implemented by the - * plugin (or X-Plane) that provides the dataref, not the SDK itself; the - * above description is how these datarefs are intended to work, but a rogue - * plugin may have different behavior. + * Note: the semantics of array datarefs are entirely implemented by the + * plugin (or X-Plane) that provides the dataref, not the SDK itself; the + * above description is how these datarefs are intended to work, but a rogue + * plugin may have different behavior. * */ -XPLM_API void XPLMSetDatavf( - XPLMDataRef inDataRef, - float * inValues, - int inoffset, - int inCount); +XPLM_API void XPLMSetDatavf( + XPLMDataRef inDataRef, + float * inValues, + int inoffset, + int inCount); /* * XPLMGetDatab * - * Read a part of a byte array dataref. If you pass NULL for outVaules, the - * routine will return the size of the array, ignoring inOffset and inMax. + * Read a part of a byte array dataref. If you pass NULL for outVaules, the + * routine will return the size of the array, ignoring inOffset and inMax. * - * If outValues is not NULL, then up to inMax values are copied from the - * dataref into outValues, starting at inOffset in the dataref. If inMax + - * inOffset is larger than the size of the dataref, less than inMax values - * will be copied. The number of values copied is returned. + * If outValues is not NULL, then up to inMax values are copied from the + * dataref into outValues, starting at inOffset in the dataref. If inMax + + * inOffset is larger than the size of the dataref, less than inMax values + * will be copied. The number of values copied is returned. * - * Note: the semantics of array datarefs are entirely implemented by the - * plugin (or X-Plane) that provides the dataref, not the SDK itself; the - * above description is how these datarefs are intended to work, but a rogue - * plugin may have different behavior. + * Note: the semantics of array datarefs are entirely implemented by the + * plugin (or X-Plane) that provides the dataref, not the SDK itself; the + * above description is how these datarefs are intended to work, but a rogue + * plugin may have different behavior. * */ -XPLM_API int XPLMGetDatab( - XPLMDataRef inDataRef, - void * outValue, /* Can be NULL */ - int inOffset, - int inMaxBytes); +XPLM_API int XPLMGetDatab( + XPLMDataRef inDataRef, + void * outValue, /* Can be NULL */ + int inOffset, + int inMaxBytes); /* * XPLMSetDatab * - * Write part or all of a byte array dataref. The values passed by inValues - * are written into the dataref starting at inOffset. Up to inCount values are - * written; however if the values would write "off the end" of the dataref - * array, then fewer values are written. + * Write part or all of a byte array dataref. The values passed by inValues + * are written into the dataref starting at inOffset. Up to inCount values are + * written; however if the values would write "off the end" of the dataref + * array, then fewer values are written. * - * Note: the semantics of array datarefs are entirely implemented by the - * plugin (or X-Plane) that provides the dataref, not the SDK itself; the - * above description is how these datarefs are intended to work, but a rogue - * plugin may have different behavior. + * Note: the semantics of array datarefs are entirely implemented by the + * plugin (or X-Plane) that provides the dataref, not the SDK itself; the + * above description is how these datarefs are intended to work, but a rogue + * plugin may have different behavior. * */ -XPLM_API void XPLMSetDatab( - XPLMDataRef inDataRef, - void * inValue, - int inOffset, - int inLength); +XPLM_API void XPLMSetDatab( + XPLMDataRef inDataRef, + void * inValue, + int inOffset, + int inLength); /*************************************************************************** - * PUBLISHING YOUR PLUGINS DATA + * PUBLISHING YOUR PLUGIN'S DATA ***************************************************************************/ /* - * These functions allow you to create data references that other plug-ins can - * access via the above data access APIs. Data references published by other - * plugins operate the same as ones published by X-Plane in all manners except - * that your data reference will not be available to other plugins if/when - * your plugin is disabled. + * These functions allow you to create data references that other plug-ins and + * X-Plane can access via the above data access APIs. Data references + * published by other plugins operate the same as ones published by X-Plane in + * all manners except that your data reference will not be available to other + * plugins if/when your plugin is disabled. * - * You share data by registering data provider callback functions. When a - * plug-in requests your data, these callbacks are then called. You provide - * one callback to return the value when a plugin 'reads' it and another to - * change the value when a plugin 'writes' it. + * You share data by registering data provider callback functions. When a + * plug-in requests your data, these callbacks are then called. You provide + * one callback to return the value when a plugin 'reads' it and another to + * change the value when a plugin 'writes' it. * - * Important: you must pick a prefix for your datarefs other than "sim/" - - * this prefix is reserved for X-Plane. The X-Plane SDK website contains a - * registry where authors can select a unique first word for dataref names, to - * prevent dataref collisions between plugins. + * Important: you must pick a prefix for your datarefs other than "sim/" - + * this prefix is reserved for X-Plane. The X-Plane SDK website contains a + * registry where authors can select a unique first word for dataref names, to + * prevent dataref collisions between plugins. * */ @@ -427,218 +456,202 @@ XPLM_API void XPLMSetDatab( /* * XPLMGetDatai_f * - * Data provider function pointers. + * Data provider function pointers. * - * These define the function pointers you provide to get or set data. Note - * that you are passed a generic pointer for each one. This is the same - * pointer you pass in your register routine; you can use it to find global - * variables, etc. + * These define the function pointers you provide to get or set data. Note + * that you are passed a generic pointer for each one. This is the same + * pointer you pass in your register routine; you can use it to locate plugin + * variables, etc. * - * The semantics of your callbacks are the same as the dataref accessor above - * - basically routines like XPLMGetDatai are just pass-throughs from a caller - * to your plugin. Be particularly mindful in implementing array dataref - * read-write accessors; you are responsible for avoiding overruns, supporting - * offset read/writes, and handling a read with a NULL buffer. + * The semantics of your callbacks are the same as the dataref accessor above + * - basically routines like XPLMGetDatai are just pass-throughs from a caller + * to your plugin. Be particularly mindful in implementing array dataref + * read-write accessors; you are responsible for avoiding overruns, supporting + * offset read/writes, and handling a read with a NULL buffer. * */ typedef int (* XPLMGetDatai_f)( - void * inRefcon); + void * inRefcon); /* - * XPLMSetDatai_f - * + * XPLMSetDatai_f * */ typedef void (* XPLMSetDatai_f)( - void * inRefcon, - int inValue); + void * inRefcon, + int inValue); /* - * XPLMGetDataf_f - * + * XPLMGetDataf_f * */ typedef float (* XPLMGetDataf_f)( - void * inRefcon); + void * inRefcon); /* - * XPLMSetDataf_f - * + * XPLMSetDataf_f * */ typedef void (* XPLMSetDataf_f)( - void * inRefcon, - float inValue); + void * inRefcon, + float inValue); /* - * XPLMGetDatad_f - * + * XPLMGetDatad_f * */ typedef double (* XPLMGetDatad_f)( - void * inRefcon); + void * inRefcon); /* - * XPLMSetDatad_f - * + * XPLMSetDatad_f * */ typedef void (* XPLMSetDatad_f)( - void * inRefcon, - double inValue); + void * inRefcon, + double inValue); /* - * XPLMGetDatavi_f - * + * XPLMGetDatavi_f * */ typedef int (* XPLMGetDatavi_f)( - void * inRefcon, - int * outValues, /* Can be NULL */ - int inOffset, - int inMax); + void * inRefcon, + int * outValues, /* Can be NULL */ + int inOffset, + int inMax); /* - * XPLMSetDatavi_f - * + * XPLMSetDatavi_f * */ typedef void (* XPLMSetDatavi_f)( - void * inRefcon, - int * inValues, - int inOffset, - int inCount); + void * inRefcon, + int * inValues, + int inOffset, + int inCount); /* - * XPLMGetDatavf_f - * + * XPLMGetDatavf_f * */ typedef int (* XPLMGetDatavf_f)( - void * inRefcon, - float * outValues, /* Can be NULL */ - int inOffset, - int inMax); + void * inRefcon, + float * outValues, /* Can be NULL */ + int inOffset, + int inMax); /* - * XPLMSetDatavf_f - * + * XPLMSetDatavf_f * */ typedef void (* XPLMSetDatavf_f)( - void * inRefcon, - float * inValues, - int inOffset, - int inCount); + void * inRefcon, + float * inValues, + int inOffset, + int inCount); /* - * XPLMGetDatab_f - * + * XPLMGetDatab_f * */ typedef int (* XPLMGetDatab_f)( - void * inRefcon, - void * outValue, /* Can be NULL */ - int inOffset, - int inMaxLength); + void * inRefcon, + void * outValue, /* Can be NULL */ + int inOffset, + int inMaxLength); /* - * XPLMSetDatab_f - * + * XPLMSetDatab_f * */ typedef void (* XPLMSetDatab_f)( - void * inRefcon, - void * inValue, - int inOffset, - int inLength); + void * inRefcon, + void * inValue, + int inOffset, + int inLength); /* * XPLMRegisterDataAccessor * - * This routine creates a new item of data that can be read and written. Pass - * in the data's full name for searching, the type(s) of the data for - * accessing, and whether the data can be written to. For each data type you - * support, pass in a read accessor function and a write accessor function if - * necessary. Pass NULL for data types you do not support or write accessors - * if you are read-only. - * - * You are returned a data ref for the new item of data created. You can use - * this data ref to unregister your data later or read or write from it. - * - */ -XPLM_API XPLMDataRef XPLMRegisterDataAccessor( - const char * inDataName, - XPLMDataTypeID inDataType, - int inIsWritable, - XPLMGetDatai_f inReadInt, - XPLMSetDatai_f inWriteInt, - XPLMGetDataf_f inReadFloat, - XPLMSetDataf_f inWriteFloat, - XPLMGetDatad_f inReadDouble, - XPLMSetDatad_f inWriteDouble, - XPLMGetDatavi_f inReadIntArray, - XPLMSetDatavi_f inWriteIntArray, - XPLMGetDatavf_f inReadFloatArray, - XPLMSetDatavf_f inWriteFloatArray, - XPLMGetDatab_f inReadData, - XPLMSetDatab_f inWriteData, - void * inReadRefcon, - void * inWriteRefcon); + * This routine creates a new item of data that can be read and written. Pass + * in the data's full name for searching, the type(s) of the data for + * accessing, and whether the data can be written to. For each data type you + * support, pass in a read accessor function and a write accessor function if + * necessary. Pass NULL for data types you do not support or write accessors + * if you are read-only. + * + * You are returned a data ref for the new item of data created. You can use + * this data ref to unregister your data later or read or write from it. + * + */ +XPLM_API XPLMDataRef XPLMRegisterDataAccessor( + const char * inDataName, + XPLMDataTypeID inDataType, + int inIsWritable, + XPLMGetDatai_f inReadInt, + XPLMSetDatai_f inWriteInt, + XPLMGetDataf_f inReadFloat, + XPLMSetDataf_f inWriteFloat, + XPLMGetDatad_f inReadDouble, + XPLMSetDatad_f inWriteDouble, + XPLMGetDatavi_f inReadIntArray, + XPLMSetDatavi_f inWriteIntArray, + XPLMGetDatavf_f inReadFloatArray, + XPLMSetDatavf_f inWriteFloatArray, + XPLMGetDatab_f inReadData, + XPLMSetDatab_f inWriteData, + void * inReadRefcon, + void * inWriteRefcon); /* * XPLMUnregisterDataAccessor * - * Use this routine to unregister any data accessors you may have registered. - * You unregister a data ref by the XPLMDataRef you get back from - * registration. Once you unregister a data ref, your function pointer will - * not be called anymore. - * - * For maximum compatibility, do not unregister your data accessors until - * final shutdown (when your XPluginStop routine is called). This allows other - * plugins to find your data reference once and use it for their entire time - * of operation. + * Use this routine to unregister any data accessors you may have registered. + * You unregister a data ref by the XPLMDataRef you get back from + * registration. Once you unregister a data ref, your function pointer will + * not be called anymore. * */ -XPLM_API void XPLMUnregisterDataAccessor( - XPLMDataRef inDataRef); +XPLM_API void XPLMUnregisterDataAccessor( + XPLMDataRef inDataRef); /*************************************************************************** * SHARING DATA BETWEEN MULTIPLE PLUGINS ***************************************************************************/ /* - * The data reference registration APIs from the previous section allow a - * plugin to publish data in a one-owner manner; the plugin that publishes the - * data reference owns the real memory that the data ref uses. This is - * satisfactory for most cases, but there are also cases where plugnis need to - * share actual data. + * The data reference registration APIs from the previous section allow a + * plugin to publish data in a one-owner manner; the plugin that publishes the + * data reference owns the real memory that the data ref uses. This is + * satisfactory for most cases, but there are also cases where plugnis need to + * share actual data. * - * With a shared data reference, no one plugin owns the actual memory for the - * data reference; the plugin SDK allocates that for you. When the first - * plugin asks to 'share' the data, the memory is allocated. When the data is - * changed, every plugin that is sharing the data is notified. + * With a shared data reference, no one plugin owns the actual memory for the + * data reference; the plugin SDK allocates that for you. When the first + * plugin asks to 'share' the data, the memory is allocated. When the data is + * changed, every plugin that is sharing the data is notified. * - * Shared data references differ from the 'owned' data references from the - * previous section in a few ways: + * Shared data references differ from the 'owned' data references from the + * previous section in a few ways: * - * - With shared data references, any plugin can create the data reference; - * with owned plugins one plugin must create the data reference and others - * subscribe. (This can be a problem if you don't know which set of plugins - * will be present). + * * With shared data references, any plugin can create the data reference; + * with owned plugins one plugin must create the data reference and others + * subscribe. (This can be a problem if you don't know which set of plugins + * will be present). * - * - With shared data references, every plugin that is sharing the data is - * notified when the data is changed. With owned data references, only the one - * owner is notified when the data is changed. + * * With shared data references, every plugin that is sharing the data is + * notified when the data is changed. With owned data references, only the + * one owner is notified when the data is changed. * - * - With shared data references, you cannot access the physical memory of the - * data reference; you must use the XPLMGet... and XPLMSet... APIs. With an - * owned data reference, the one owning data reference can manipulate the data - * reference's memory in any way it sees fit. + * * With shared data references, you cannot access the physical memory of the + * data reference; you must use the XPLMGet... and XPLMSet... APIs. With an + * owned data reference, the one owning data reference can manipulate the + * data reference's memory in any way it sees fit. * - * Shared data references solve two problems: if you need to have a data - * reference used by several plugins but do not know which plugins will be - * installed, or if all plugins sharing data need to be notified when that - * data is changed, use shared data references. + * Shared data references solve two problems: if you need to have a data + * reference used by several plugins but do not know which plugins will be + * installed, or if all plugins sharing data need to be notified when that + * data is changed, use shared data references. * */ @@ -646,55 +659,55 @@ XPLM_API void XPLMUnregisterDataAccessor( /* * XPLMDataChanged_f * - * An XPLMDataChanged_f is a callback that the XPLM calls whenever any other - * plug-in modifies shared data. A refcon you provide is passed back to help - * identify which data is being changed. In response, you may want to call one - * of the XPLMGetDataxxx routines to find the new value of the data. + * An XPLMDataChanged_f is a callback that the XPLM calls whenever any other + * plug-in modifies shared data. A refcon you provide is passed back to help + * identify which data is being changed. In response, you may want to call one + * of the XPLMGetDataxxx routines to find the new value of the data. * */ typedef void (* XPLMDataChanged_f)( - void * inRefcon); + void * inRefcon); /* * XPLMShareData * - * This routine connects a plug-in to shared data, creating the shared data if - * necessary. inDataName is a standard path for the data ref, and inDataType - * specifies the type. This function will create the data if it does not - * exist. If the data already exists but the type does not match, an error is - * returned, so it is important that plug-in authors collaborate to establish - * public standards for shared data. + * This routine connects a plug-in to shared data, creating the shared data if + * necessary. inDataName is a standard path for the data ref, and inDataType + * specifies the type. This function will create the data if it does not + * exist. If the data already exists but the type does not match, an error is + * returned, so it is important that plug-in authors collaborate to establish + * public standards for shared data. * - * If a notificationFunc is passed in and is not NULL, that notification - * function will be called whenever the data is modified. The notification - * refcon will be passed to it. This allows your plug-in to know which shared - * data was changed if multiple shared data are handled by one callback, or if - * the plug-in does not use global variables. + * If a notificationFunc is passed in and is not NULL, that notification + * function will be called whenever the data is modified. The notification + * refcon will be passed to it. This allows your plug-in to know which shared + * data was changed if multiple shared data are handled by one callback, or if + * the plug-in does not use global variables. * - * A one is returned for successfully creating or finding the shared data; a - * zero if the data already exists but is of the wrong type. + * A one is returned for successfully creating or finding the shared data; a + * zero if the data already exists but is of the wrong type. * */ -XPLM_API int XPLMShareData( - const char * inDataName, - XPLMDataTypeID inDataType, - XPLMDataChanged_f inNotificationFunc, - void * inNotificationRefcon); +XPLM_API int XPLMShareData( + const char * inDataName, + XPLMDataTypeID inDataType, + XPLMDataChanged_f inNotificationFunc, + void * inNotificationRefcon); /* * XPLMUnshareData * - * This routine removes your notification function for shared data. Call it - * when done with the data to stop receiving change notifications. Arguments - * must match XPLMShareData. The actual memory will not necessarily be freed, - * since other plug-ins could be using it. + * This routine removes your notification function for shared data. Call it + * when done with the data to stop receiving change notifications. Arguments + * must match XPLMShareData. The actual memory will not necessarily be freed, + * since other plug-ins could be using it. * */ -XPLM_API int XPLMUnshareData( - const char * inDataName, - XPLMDataTypeID inDataType, - XPLMDataChanged_f inNotificationFunc, - void * inNotificationRefcon); +XPLM_API int XPLMUnshareData( + const char * inDataName, + XPLMDataTypeID inDataType, + XPLMDataChanged_f inNotificationFunc, + void * inNotificationRefcon); #ifdef __cplusplus } diff --git a/src/SDK/CHeaders/XPLM/XPLMDefs.h b/src/SDK/CHeaders/XPLM/XPLMDefs.h index 9e4e04aa..bb1fe2fb 100755 --- a/src/SDK/CHeaders/XPLM/XPLMDefs.h +++ b/src/SDK/CHeaders/XPLM/XPLMDefs.h @@ -2,23 +2,23 @@ #define _XPLMDefs_h_ /* - * 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 * */ +/*************************************************************************** + * XPLMDefs + ***************************************************************************/ /* - * 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. * */ @@ -36,13 +36,13 @@ extern "C" { * 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.) * */ @@ -125,7 +125,7 @@ extern "C" { * GLOBAL DEFINITIONS ***************************************************************************/ /* - * These definitions are used in all parts of the SDK. + * These definitions are used in all parts of the SDK. * */ @@ -133,61 +133,62 @@ extern "C" { /* * 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. * */ typedef int XPLMPluginID; -/* No plugin. */ +/* No plugin. */ #define XPLM_NO_PLUGIN_ID (-1) -/* X-Plane itself */ +/* X-Plane itself */ #define XPLM_PLUGIN_XPLANE (0) -/* The current XPLM revision is 3.01 (301). */ -#define kXPLM_Version (301) +/* The current XPLM revision is 3.03 (303). */ +#define kXPLM_Version (303) /* * 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. * */ enum { - /* The shift key is down */ - xplm_ShiftFlag = 1 + /* The shift key is down */ + xplm_ShiftFlag = 1, - /* The option or alt key is down */ - ,xplm_OptionAltFlag = 2 + /* The option or alt key is down */ + xplm_OptionAltFlag = 2, - /* The control key is down* */ - ,xplm_ControlFlag = 4 + /* The control key is down* */ + xplm_ControlFlag = 4, - /* The key is being pressed down */ - ,xplm_DownFlag = 8 + /* The key is being pressed down */ + xplm_DownFlag = 8, - /* The key is being released */ - ,xplm_UpFlag = 16 + /* The key is being released */ + xplm_UpFlag = 16, }; @@ -197,15 +198,16 @@ typedef int XPLMKeyFlags; * 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. * */ @@ -252,31 +254,29 @@ typedef int XPLMKeyFlags; * 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). - * - * 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: + * 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). * - * 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. + * 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). * - * 2. Some keys that do not exist on both Mac and PC keyboards are removed. + * To assign virtual key codes we started with the Microsoft set but made some + * additions and changes. A few differences: * - * 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. * */ @@ -323,7 +323,7 @@ typedef int XPLMKeyFlags; #define XPLM_VK_HELP 0x2F -/* 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) */ #define XPLM_VK_0 0x30 #define XPLM_VK_1 0x31 @@ -344,7 +344,7 @@ typedef int XPLMKeyFlags; #define XPLM_VK_9 0x39 -/* 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) */ #define XPLM_VK_A 0x41 #define XPLM_VK_B 0x42 @@ -477,8 +477,8 @@ typedef int XPLMKeyFlags; #define XPLM_VK_F24 0x87 -/* 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. */ #define XPLM_VK_EQUAL 0xB0 #define XPLM_VK_MINUS 0xB1 diff --git a/src/SDK/CHeaders/XPLM/XPLMDisplay.h b/src/SDK/CHeaders/XPLM/XPLMDisplay.h index 75774495..48c7a700 100755 --- a/src/SDK/CHeaders/XPLM/XPLMDisplay.h +++ b/src/SDK/CHeaders/XPLM/XPLMDisplay.h @@ -2,83 +2,80 @@ #define _XPLMDisplay_h_ /* - * 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 * */ +/*************************************************************************** + * XPLMDisplay + ***************************************************************************/ /* - * This API provides the basic hooks to draw in X-Plane and create user - * interface. All X-Plane drawing is done in OpenGL. The X-Plane plug-in - * manager takes care of properly setting up the OpenGL context and matrices. - * You do not decide when in your code's execution to draw; X-Plane tells you - * (via callbacks) when it is ready to have your plugin draw. - * - * X-Plane's drawing strategy is straightforward: every "frame" the screen is - * rendered by drawing the 3-D scene (dome, ground, objects, airplanes, etc.) - * and then drawing the cockpit on top of it. Alpha blending is used to - * overlay the cockpit over the world (and the gauges over the panel, etc.). - * X-Plane user interface elements (including windows like the map, the main - * menu, etc.) are then drawn on top of the cockpit. - * - * There are two ways you can draw: directly and in a window. - * - * Direct drawing (deprecated!---more on that below) involves drawing to the - * screen before or after X-Plane finishes a phase of drawing. When you draw - * directly, you can specify whether X-Plane is to complete this phase or not. - * This allows you to do three things: draw before X-Plane does (under it), - * draw after X-Plane does (over it), or draw instead of X-Plane. - * - * To draw directly, you register a callback and specify which phase you want - * to intercept. The plug-in manager will call you over and over to draw that - * phase. - * - * Direct drawing allows you to override scenery, panels, or anything. Note - * that you cannot assume that you are the only plug-in drawing at this - * phase. - * - * Direct drawing is deprecated; at some point in the X-Plane 11 run, it will - * likely become unsupported entirely as X-Plane transitions from OpenGL to - * modern graphics API backends (e.g., Vulkan, Metal, etc.). In the long term, - * plugins should use the XPLMInstance API for drawing 3-D objects---this will - * be much more efficient than general 3-D OpenGL drawing, and it will - * actually be supported by the new graphics backends. We do not yet know what - * the post-transition API for generic 3-D drawing will look like (if it - * exists at all). - * - * In contrast to direct drawing, window drawing provides a higher level - * functionality. With window drawing, you create a 2-D window that takes up a - * portion of the screen. Window drawing is always two dimensional. Window - * drawing is front-to-back controlled; you can specify that you want your - * window to be brought on top, and other plug-ins may put their window on top - * of you. Window drawing also allows you to sign up for key presses and - * receive mouse clicks. - * - * There are three ways to get keystrokes: - * - * 1. If you create a window, the window can take keyboard focus. It will - * then receive all keystrokes. If no window has focus, X-Plane receives - * keystrokes. Use this to implement typing in dialog boxes, etc. Only one - * window may have focus at a time; your window will be notified if it loses - * focus. - * - * 2. If you need low level access to the keystroke stream, install a key - * sniffer. Key sniffers can be installed above everything or right in front - * of the sim. - * - * 3. If you would like to associate key strokes with commands/functions in - * your plug-in, you should simply register a command (via - * XPLMCreateCommand()) and allow users to bind whatever key they choose to - * that command. Another (now deprecated) method of doing so is to use a hot - * key---a key-specific callback. Hotkeys are sent based on virtual key - * strokes, so any key may be distinctly mapped with any modifiers. Hot keys - * can be remapped by other plug-ins. As a plug-in, you don't have to worry - * about what your hot key ends up mapped to; other plug-ins may provide a UI - * for remapping keystrokes. So hotkeys allow a user to resolve conflicts and - * customize keystrokes. + * This API provides the basic hooks to draw in X-Plane and create user + * interface. All X-Plane drawing is done in OpenGL. The X-Plane plug-in + * manager takes care of properly setting up the OpenGL context and matrices. + * You do not decide when in your code's execution to draw; X-Plane tells you + * (via callbacks) when it is ready to have your plugin draw. + * + * X-Plane's drawing strategy is straightforward: every "frame" the screen is + * rendered by drawing the 3-D scene (dome, ground, objects, airplanes, etc.) + * and then drawing the cockpit on top of it. Alpha blending is used to + * overlay the cockpit over the world (and the gauges over the panel, etc.). + * X-Plane user interface elements (including windows like the map, the main + * menu, etc.) are then drawn on top of the cockpit. + * + * There are two ways you can draw: directly and in a window. + * + * Direct drawing (deprecated!---more on that below) involves drawing to the + * screen before or after X-Plane finishes a phase of drawing. When you draw + * directly, you can specify whether X-Plane is to complete this phase or not. + * This allows you to do three things: draw before X-Plane does (under it), + * draw after X-Plane does (over it), or draw instead of X-Plane. + * + * To draw directly, you register a callback and specify which phase you want + * to intercept. The plug-in manager will call you over and over to draw that + * phase. + * + * Direct drawing allows you to override scenery, panels, or anything. Note + * that you cannot assume that you are the only plug-in drawing at this phase. + * + * Direct drawing is deprecated; at some point in the X-Plane 11 run, it will + * likely become unsupported entirely as X-Plane transitions from OpenGL to + * modern graphics API backends (e.g., Vulkan, Metal, etc.). In the long term, + * plugins should use the XPLMInstance API for drawing 3-D objects---this will + * be much more efficient than general 3-D OpenGL drawing, and it will + * actually be supported by the new graphics backends. We do not yet know what + * the post-transition API for generic 3-D drawing will look like (if it + * exists at all). + * + * In contrast to direct drawing, window drawing provides a higher level + * functionality. With window drawing, you create a 2-D window that takes up a + * portion of the screen. Window drawing is always two dimensional. Window + * drawing is front-to-back controlled; you can specify that you want your + * window to be brought on top, and other plug-ins may put their window on top + * of you. Window drawing also allows you to sign up for key presses and + * receive mouse clicks. + * + * There are three ways to get keystrokes: + * + * 1. If you create a window, the window can take keyboard focus. It will + * then receive all keystrokes. If no window has focus, X-Plane receives + * keystrokes. Use this to implement typing in dialog boxes, etc. Only + * one window may have focus at a time; your window will be notified if it + * loses focus. + * 2. If you need low level access to the keystroke stream, install a key + * sniffer. Key sniffers can be installed above everything or right in + * front of the sim. + * 3. If you would like to associate key strokes with commands/functions in + * your plug-in, you should simply register a command (via + * XPLMCreateCommand()) and allow users to bind whatever key they choose to + * that command. Another (now deprecated) method of doing so is to use a + * hot key---a key-specific callback. Hotkeys are sent based on virtual + * key strokes, so any key may be distinctly mapped with any modifiers. + * Hot keys can be remapped by other plug-ins. As a plug-in, you don't + * have to worry about what your hot key ends up mapped to; other plug-ins + * may provide a UI for remapping keystrokes. So hotkeys allow a user to + * resolve conflicts and customize keystrokes. * */ @@ -92,18 +89,18 @@ extern "C" { * DRAWING CALLBACKS ***************************************************************************/ /* - * Basic drawing callbacks, for low level intercepting of X-Plane's render - * loop. The purpose of drawing callbacks is to provide targeted additions or - * replacements to X-Plane's graphics environment (for example, to add extra - * custom objects, or replace drawing of the AI aircraft). Do not assume that - * the drawing callbacks will be called in the order implied by the - * enumerations. Also do not assume that each drawing phase ends before - * another begins; they may be nested. + * Basic drawing callbacks, for low level intercepting of X-Plane's render + * loop. The purpose of drawing callbacks is to provide targeted additions or + * replacements to X-Plane's graphics environment (for example, to add extra + * custom objects, or replace drawing of the AI aircraft). Do not assume that + * the drawing callbacks will be called in the order implied by the + * enumerations. Also do not assume that each drawing phase ends before + * another begins; they may be nested. * - * Note that all APIs in this section are deprecated, and will likely be - * removed during the X-Plane 11 run as part of the transition to - * Vulkan/Metal/etc. See the XPLMInstance API for future-proof drawing of 3-D - * objects. + * Note that all APIs in this section are deprecated, and will likely be + * removed during the X-Plane 11 run as part of the transition to + * Vulkan/Metal/etc. See the XPLMInstance API for future-proof drawing of 3-D + * objects. * */ @@ -111,68 +108,101 @@ extern "C" { /* * XPLMDrawingPhase * - * This constant indicates which part of drawing we are in. Drawing is done - * from the back to the front. We get a callback before or after each item. - * Metaphases provide access to the beginning and end of the 3d (scene) and 2d - * (cockpit) drawing in a manner that is independent of new phases added via - * X-Plane implementation. - * - * WARNING: As X-Plane's scenery evolves, some drawing phases may cease to - * exist and new ones may be invented. If you need a particularly specific - * use of these codes, consult Austin and/or be prepared to revise your code - * as X-Plane evolves. + * This constant indicates which part of drawing we are in. Drawing is done + * from the back to the front. We get a callback before or after each item. + * Metaphases provide access to the beginning and end of the 3d (scene) and + * 2d (cockpit) drawing in a manner that is independent of new phases added + * via X-Plane implementation. + * + * **NOTE**: As of XPLM302 the legacy 3D drawing phases (xplm_Phase_FirstScene + * to xplm_Phase_LastScene) are deprecated. When running under X-Plane 11.50 + * with the modern Vulkan or Metal backend, X-Plane will no longer call + * these drawing phases. There is a new drawing phase, xplm_Phase_Modern3D, + * which is supported under OpenGL and Vulkan which is called out roughly + * where the old before xplm_Phase_Airplanes phase was for blending. This + * phase is *NOT* supported under Metal and comes with potentially + * substantial performance overhead. Please do *NOT* opt into this phase if + * you don't do any actual drawing that requires the depth buffer in some + * way! + * + * **WARNING**: As X-Plane's scenery evolves, some drawing phases may cease to + * exist and new ones may be invented. If you need a particularly specific + * use of these codes, consult Austin and/or be prepared to revise your code + * as X-Plane evolves. * */ enum { - /* This is the earliest point at which you can draw in 3-d. */ - xplm_Phase_FirstScene = 0 - - /* Drawing of land and water. */ - ,xplm_Phase_Terrain = 5 - - /* Drawing runways and other airport detail. */ - ,xplm_Phase_Airports = 10 - - /* Drawing roads, trails, trains, etc. */ - ,xplm_Phase_Vectors = 15 - - /* 3-d objects (houses, smokestacks, etc. */ - ,xplm_Phase_Objects = 20 - - /* External views of airplanes, both yours and the AI aircraft. */ - ,xplm_Phase_Airplanes = 25 - - /* This is the last point at which you can draw in 3-d. */ - ,xplm_Phase_LastScene = 30 - - /* This is the first phase where you can draw in 2-d. */ - ,xplm_Phase_FirstCockpit = 35 - - /* The non-moving parts of the aircraft panel. */ - ,xplm_Phase_Panel = 40 - - /* The moving parts of the aircraft panel. */ - ,xplm_Phase_Gauges = 45 - - /* Floating windows from plugins. */ - ,xplm_Phase_Window = 50 - - /* The last change to draw in 2d. */ - ,xplm_Phase_LastCockpit = 55 +#if defined(XPLM_DEPRECATED) + /* Deprecated as of XPLM302. This is the earliest point at which you can draw * + * in 3-d. */ + xplm_Phase_FirstScene = 0, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated as of XPLM302. Drawing of land and water. */ + xplm_Phase_Terrain = 5, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated as of XPLM302. Drawing runways and other airport detail. */ + xplm_Phase_Airports = 10, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated as of XPLM302. Drawing roads, trails, trains, etc. */ + xplm_Phase_Vectors = 15, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated as of XPLM302. 3-d objects (houses, smokestacks, etc. */ + xplm_Phase_Objects = 20, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated as of XPLM302. External views of airplanes, both yours and the * + * AI aircraft. */ + xplm_Phase_Airplanes = 25, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated as of XPLM302. This is the last point at which you can draw in * + * 3-d. */ + xplm_Phase_LastScene = 30, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM302) + /* A chance to do modern 3D drawing. */ + xplm_Phase_Modern3D = 31, + +#endif /* XPLM302 */ + /* This is the first phase where you can draw in 2-d. */ + xplm_Phase_FirstCockpit = 35, + + /* The non-moving parts of the aircraft panel. */ + xplm_Phase_Panel = 40, + + /* The moving parts of the aircraft panel. */ + xplm_Phase_Gauges = 45, + + /* Floating windows from plugins. */ + xplm_Phase_Window = 50, + + /* The last chance to draw in 2d. */ + xplm_Phase_LastCockpit = 55, #if defined(XPLM200) - /* Removed as of XPLM300; Use the full-blown XPLMMap API instead. */ - ,xplm_Phase_LocalMap3D = 100 + /* Removed as of XPLM300; Use the full-blown XPLMMap API instead. */ + xplm_Phase_LocalMap3D = 100, #endif /* XPLM200 */ #if defined(XPLM200) - /* Removed as of XPLM300; Use the full-blown XPLMMap API instead. */ - ,xplm_Phase_LocalMap2D = 101 + /* Removed as of XPLM300; Use the full-blown XPLMMap API instead. */ + xplm_Phase_LocalMap2D = 101, #endif /* XPLM200 */ #if defined(XPLM200) - /* Removed as of XPLM300; Use the full-blown XPLMMap API instead. */ - ,xplm_Phase_LocalMapProfile = 102 + /* Removed as of XPLM300; Use the full-blown XPLMMap API instead. */ + xplm_Phase_LocalMapProfile = 102, #endif /* XPLM200 */ @@ -182,100 +212,100 @@ typedef int XPLMDrawingPhase; /* * XPLMDrawCallback_f * - * This is the prototype for a low level drawing callback. You are passed in - * the phase and whether it is before or after. If you are before the phase, - * return 1 to let X-Plane draw or 0 to suppress X-Plane drawing. If you are - * after the phase the return value is ignored. + * This is the prototype for a low level drawing callback. You are passed in + * the phase and whether it is before or after. If you are before the phase, + * return 1 to let X-Plane draw or 0 to suppress X-Plane drawing. If you are + * after the phase the return value is ignored. * - * Refcon is a unique value that you specify when registering the callback, - * allowing you to slip a pointer to your own data to the callback. + * Refcon is a unique value that you specify when registering the callback, + * allowing you to slip a pointer to your own data to the callback. * - * Upon entry the OpenGL context will be correctly set up for you and OpenGL - * will be in 'local' coordinates for 3d drawing and panel coordinates for 2d - * drawing. The OpenGL state (texturing, etc.) will be unknown. + * Upon entry the OpenGL context will be correctly set up for you and OpenGL + * will be in 'local' coordinates for 3d drawing and panel coordinates for 2d + * drawing. The OpenGL state (texturing, etc.) will be unknown. * */ typedef int (* XPLMDrawCallback_f)( - XPLMDrawingPhase inPhase, - int inIsBefore, - void * inRefcon); + XPLMDrawingPhase inPhase, + int inIsBefore, + void * inRefcon); /* * XPLMRegisterDrawCallback * - * This routine registers a low level drawing callback. Pass in the phase you - * want to be called for and whether you want to be called before or after. - * This routine returns 1 if the registration was successful, or 0 if the - * phase does not exist in this version of X-Plane. You may register a - * callback multiple times for the same or different phases as long as the - * refcon is unique each time. + * This routine registers a low level drawing callback. Pass in the phase you + * want to be called for and whether you want to be called before or after. + * This routine returns 1 if the registration was successful, or 0 if the + * phase does not exist in this version of X-Plane. You may register a + * callback multiple times for the same or different phases as long as the + * refcon is unique each time. * - * Note that this function will likely be removed during the X-Plane 11 run as - * part of the transition to Vulkan/Metal/etc. See the XPLMInstance API for - * future-proof drawing of 3-D objects. + * Note that this function will likely be removed during the X-Plane 11 run as + * part of the transition to Vulkan/Metal/etc. See the XPLMInstance API for + * future-proof drawing of 3-D objects. * */ -XPLM_API int XPLMRegisterDrawCallback( - XPLMDrawCallback_f inCallback, - XPLMDrawingPhase inPhase, - int inWantsBefore, - void * inRefcon); +XPLM_API int XPLMRegisterDrawCallback( + XPLMDrawCallback_f inCallback, + XPLMDrawingPhase inPhase, + int inWantsBefore, + void * inRefcon); /* * XPLMUnregisterDrawCallback * - * This routine unregisters a draw callback. You must unregister a callback - * for each time you register a callback if you have registered it multiple - * times with different refcons. The routine returns 1 if it can find the - * callback to unregister, 0 otherwise. + * This routine unregisters a draw callback. You must unregister a callback + * for each time you register a callback if you have registered it multiple + * times with different refcons. The routine returns 1 if it can find the + * callback to unregister, 0 otherwise. * - * Note that this function will likely be removed during the X-Plane 11 run as - * part of the transition to Vulkan/Metal/etc. See the XPLMInstance API for - * future-proof drawing of 3-D objects. + * Note that this function will likely be removed during the X-Plane 11 run as + * part of the transition to Vulkan/Metal/etc. See the XPLMInstance API for + * future-proof drawing of 3-D objects. * */ -XPLM_API int XPLMUnregisterDrawCallback( - XPLMDrawCallback_f inCallback, - XPLMDrawingPhase inPhase, - int inWantsBefore, - void * inRefcon); +XPLM_API int XPLMUnregisterDrawCallback( + XPLMDrawCallback_f inCallback, + XPLMDrawingPhase inPhase, + int inWantsBefore, + void * inRefcon); /*************************************************************************** * WINDOW API ***************************************************************************/ /* - * The window API provides a high-level abstraction for drawing with UI - * interaction. + * The window API provides a high-level abstraction for drawing with UI + * interaction. * - * Windows may operate in one of two modes: legacy (for plugins compiled - * against old versions of the XPLM, as well as windows created via the - * deprecated XPLMCreateWindow() function, rather than XPLMCreateWindowEx()), - * or modern (for windows compiled against the XPLM300 or newer API, and - * created via XPLMCreateWindowEx()). + * Windows may operate in one of two modes: legacy (for plugins compiled + * against old versions of the XPLM, as well as windows created via the + * deprecated XPLMCreateWindow() function, rather than XPLMCreateWindowEx()), + * or modern (for windows compiled against the XPLM300 or newer API, and + * created via XPLMCreateWindowEx()). * - * Modern windows have access to new X-Plane 11 windowing features, like - * support for new positioning modes (including being "popped out" into their - * own first-class window in the operating system). They can also optionally - * be decorated in the style of X-Plane 11 windows (like the map). + * Modern windows have access to new X-Plane 11 windowing features, like + * support for new positioning modes (including being "popped out" into their + * own first-class window in the operating system). They can also optionally + * be decorated in the style of X-Plane 11 windows (like the map). * - * Modern windows operate in "boxel" units. A boxel ("box of pixels") is a - * unit of virtual pixels which, depending on X-Plane's scaling, may - * correspond to an arbitrary NxN "box" of real pixels on screen. Because - * X-Plane handles this scaling automatically, you can effectively treat the - * units as though you were simply drawing in pixels, and know that when - * X-Plane is running with 150% or 200% scaling, your drawing will be - * automatically scaled (and likewise all mouse coordinates, screen bounds, - * etc. will also be auto-scaled). + * Modern windows operate in "boxel" units. A boxel ("box of pixels") is a + * unit of virtual pixels which, depending on X-Plane's scaling, may + * correspond to an arbitrary NxN "box" of real pixels on screen. Because + * X-Plane handles this scaling automatically, you can effectively treat the + * units as though you were simply drawing in pixels, and know that when + * X-Plane is running with 150% or 200% scaling, your drawing will be + * automatically scaled (and likewise all mouse coordinates, screen bounds, + * etc. will also be auto-scaled). * - * In contrast, legacy windows draw in true screen pixels, and thus tend to - * look quite small when X-Plane is operating in a scaled mode. + * In contrast, legacy windows draw in true screen pixels, and thus tend to + * look quite small when X-Plane is operating in a scaled mode. * - * Legacy windows have their origin in the lower left of the main X-Plane - * window. In contrast, since modern windows are not constrained to the main - * window, they have their origin in the lower left of the entire global - * desktop space, and the lower left of the main X-Plane window is not - * guaranteed to be (0, 0). In both cases, x increases as you move left, and y - * increases as you move up. + * Legacy windows have their origin in the lower left of the main X-Plane + * window. In contrast, since modern windows are not constrained to the main + * window, they have their origin in the lower left of the entire global + * desktop space, and the lower left of the main X-Plane window is not + * guaranteed to be (0, 0). In both cases, x increases as you move left, and y + * increases as you move up. * */ @@ -283,10 +313,10 @@ XPLM_API int XPLMUnregisterDrawCallback( /* * XPLMWindowID * - * This is an opaque identifier for a window. You use it to control your - * window. When you create a window (via either XPLMCreateWindow() or - * XPLMCreateWindowEx()), you will specify callbacks to handle drawing, mouse - * interaction, etc. + * This is an opaque identifier for a window. You use it to control your + * window. When you create a window (via either XPLMCreateWindow() or + * XPLMCreateWindowEx()), you will specify callbacks to handle drawing, mouse + * interaction, etc. * */ typedef void * XPLMWindowID; @@ -294,60 +324,60 @@ typedef void * XPLMWindowID; /* * XPLMDrawWindow_f * - * A callback to handle 2-D drawing of your window. You are passed in your - * window and its refcon. Draw the window. You can use other XPLM functions - * from this header to find the current dimensions of your window, etc. When - * this callback is called, the OpenGL context will be set properly for 2-D - * window drawing. + * A callback to handle 2-D drawing of your window. You are passed in your + * window and its refcon. Draw the window. You can use other XPLM functions + * from this header to find the current dimensions of your window, etc. When + * this callback is called, the OpenGL context will be set properly for 2-D + * window drawing. * - * NOTE: Because you are drawing your window over a background, you can make a - * translucent window easily by simply not filling in your entire window's - * bounds. + * **Note**: Because you are drawing your window over a background, you can + * make a translucent window easily by simply not filling in your entire + * window's bounds. * */ typedef void (* XPLMDrawWindow_f)( - XPLMWindowID inWindowID, - void * inRefcon); + XPLMWindowID inWindowID, + void * inRefcon); /* * XPLMHandleKey_f * - * This function is called when a key is pressed or keyboard focus is taken - * away from your window. If losingFocus is 1, you are losing the keyboard - * focus, otherwise a key was pressed and inKey contains its character. You - * are also passed your window and a refcon. + * This function is called when a key is pressed or keyboard focus is taken + * away from your window. If losingFocus is 1, you are losing the keyboard + * focus, otherwise a key was pressed and inKey contains its character. You + * are also passed your window and a refcon. * - * Warning: this API declares virtual keys as a signed character; however the - * VKEY #define macros in XPLMDefs.h define the vkeys using unsigned values - * (that is 0x80 instead of -0x80). So you may need to cast the incoming vkey - * to an unsigned char to get correct comparisons in C. + * Warning: this API declares virtual keys as a signed character; however the + * VKEY #define macros in XPLMDefs.h define the vkeys using unsigned values + * (that is 0x80 instead of -0x80). So you may need to cast the incoming vkey + * to an unsigned char to get correct comparisons in C. * */ typedef void (* XPLMHandleKey_f)( - XPLMWindowID inWindowID, - char inKey, - XPLMKeyFlags inFlags, - char inVirtualKey, - void * inRefcon, - int losingFocus); + XPLMWindowID inWindowID, + char inKey, + XPLMKeyFlags inFlags, + char inVirtualKey, + void * inRefcon, + int losingFocus); /* * XPLMMouseStatus * - * When the mouse is clicked, your mouse click routine is called repeatedly. - * It is first called with the mouse down message. It is then called zero or - * more times with the mouse-drag message, and finally it is called once with - * the mouse up message. All of these messages will be directed to the same - * window; you are guaranteed to not receive a drag or mouse-up event without - * first receiving the corresponding mouse-down. + * When the mouse is clicked, your mouse click routine is called repeatedly. + * It is first called with the mouse down message. It is then called zero or + * more times with the mouse-drag message, and finally it is called once with + * the mouse up message. All of these messages will be directed to the same + * window; you are guaranteed to not receive a drag or mouse-up event without + * first receiving the corresponding mouse-down. * */ enum { - xplm_MouseDown = 1 + xplm_MouseDown = 1, - ,xplm_MouseDrag = 2 + xplm_MouseDrag = 2, - ,xplm_MouseUp = 3 + xplm_MouseUp = 3, }; @@ -356,54 +386,55 @@ typedef int XPLMMouseStatus; /* * XPLMHandleMouseClick_f * - * You receive this call for one of three events: + * You receive this call for one of three events: * - * - when the user clicks the mouse button down - (optionally) when the user - * drags the mouse after a down-click, but before the up-click - when the user - * releases the down-clicked mouse button. + * - when the user clicks the mouse button down + * - (optionally) when the user drags the mouse after a down-click, but before + * the up-click + * - when the user releases the down-clicked mouse button. * - * You receive the x and y of the click, your window, and a refcon. Return 1 - * to consume the click, or 0 to pass it through. + * You receive the x and y of the click, your window, and a refcon. Return 1 + * to consume the click, or 0 to pass it through. * - * WARNING: passing clicks through windows (as of this writing) causes mouse - * tracking problems in X-Plane; do not use this feature! + * WARNING: passing clicks through windows (as of this writing) causes mouse + * tracking problems in X-Plane; do not use this feature! * - * The units for x and y values match the units used in your window. Thus, for - * "modern" windows (those created via XPLMCreateWindowEx() and compiled - * against the XPLM300 library), the units are boxels, while legacy windows - * will get pixels. Legacy windows have their origin in the lower left of the - * main X-Plane window, while modern windows have their origin in the lower - * left of the global desktop space. In both cases, x increases as you move - * left, and y increases as you move up. + * The units for x and y values match the units used in your window. Thus, for + * "modern" windows (those created via XPLMCreateWindowEx() and compiled + * against the XPLM300 library), the units are boxels, while legacy windows + * will get pixels. Legacy windows have their origin in the lower left of the + * main X-Plane window, while modern windows have their origin in the lower + * left of the global desktop space. In both cases, x increases as you move + * right, and y increases as you move up. * */ typedef int (* XPLMHandleMouseClick_f)( - XPLMWindowID inWindowID, - int x, - int y, - XPLMMouseStatus inMouse, - void * inRefcon); + XPLMWindowID inWindowID, + int x, + int y, + XPLMMouseStatus inMouse, + void * inRefcon); #if defined(XPLM200) /* * XPLMCursorStatus * - * XPLMCursorStatus describes how you would like X-Plane to manage the cursor. - * See XPLMHandleCursor_f for more info. + * XPLMCursorStatus describes how you would like X-Plane to manage the cursor. + * See XPLMHandleCursor_f for more info. * */ enum { - /* X-Plane manages the cursor normally, plugin does not affect the cusrsor. */ - xplm_CursorDefault = 0 + /* X-Plane manages the cursor normally, plugin does not affect the cusrsor. */ + xplm_CursorDefault = 0, - /* X-Plane hides the cursor. */ - ,xplm_CursorHidden = 1 + /* X-Plane hides the cursor. */ + xplm_CursorHidden = 1, - /* X-Plane shows the cursor as the default arrow. */ - ,xplm_CursorArrow = 2 + /* X-Plane shows the cursor as the default arrow. */ + xplm_CursorArrow = 2, - /* X-Plane shows the cursor but lets you select an OS cursor. */ - ,xplm_CursorCustom = 3 + /* X-Plane shows the cursor but lets you select an OS cursor. */ + xplm_CursorCustom = 3, }; @@ -414,104 +445,104 @@ typedef int XPLMCursorStatus; /* * XPLMHandleCursor_f * - * The SDK calls your cursor status callback when the mouse is over your - * plugin window. Return a cursor status code to indicate how you would like - * X-Plane to manage the cursor. If you return xplm_CursorDefault, the SDK - * will try lower-Z-order plugin windows, then let the sim manage the cursor. - * - * Note: you should never show or hide the cursor yourself---these APIs are - * typically reference-counted and thus cannot safely and predictably be used - * by the SDK. Instead return one of xplm_CursorHidden to hide the cursor or - * xplm_CursorArrow/xplm_CursorCustom to show the cursor. - * - * If you want to implement a custom cursor by drawing a cursor in OpenGL, use - * xplm_CursorHidden to hide the OS cursor and draw the cursor using a 2-d - * drawing callback (after xplm_Phase_Window is probably a good choice, but - * see deprecation warnings on the drawing APIs!). If you want to use a - * custom OS-based cursor, use xplm_CursorCustom to ask X-Plane to show the - * cursor but not affect its image. You can then use an OS specific call like - * SetThemeCursor (Mac) or SetCursor/LoadCursor (Windows). - * - * The units for x and y values match the units used in your window. Thus, for - * "modern" windows (those created via XPLMCreateWindowEx() and compiled - * against the XPLM300 library), the units are boxels, while legacy windows - * will get pixels. Legacy windows have their origin in the lower left of the - * main X-Plane window, while modern windows have their origin in the lower - * left of the global desktop space. In both cases, x increases as you move - * left, and y increases as you move up. + * The SDK calls your cursor status callback when the mouse is over your + * plugin window. Return a cursor status code to indicate how you would like + * X-Plane to manage the cursor. If you return xplm_CursorDefault, the SDK + * will try lower-Z-order plugin windows, then let the sim manage the cursor. + * + * Note: you should never show or hide the cursor yourself---these APIs are + * typically reference-counted and thus cannot safely and predictably be used + * by the SDK. Instead return one of xplm_CursorHidden to hide the cursor or + * xplm_CursorArrow/xplm_CursorCustom to show the cursor. + * + * If you want to implement a custom cursor by drawing a cursor in OpenGL, use + * xplm_CursorHidden to hide the OS cursor and draw the cursor using a 2-d + * drawing callback (after xplm_Phase_Window is probably a good choice, but + * see deprecation warnings on the drawing APIs!). If you want to use a + * custom OS-based cursor, use xplm_CursorCustom to ask X-Plane to show the + * cursor but not affect its image. You can then use an OS specific call like + * SetThemeCursor (Mac) or SetCursor/LoadCursor (Windows). + * + * The units for x and y values match the units used in your window. Thus, for + * "modern" windows (those created via XPLMCreateWindowEx() and compiled + * against the XPLM300 library), the units are boxels, while legacy windows + * will get pixels. Legacy windows have their origin in the lower left of the + * main X-Plane window, while modern windows have their origin in the lower + * left of the global desktop space. In both cases, x increases as you move + * right, and y increases as you move up. * */ typedef XPLMCursorStatus (* XPLMHandleCursor_f)( - XPLMWindowID inWindowID, - int x, - int y, - void * inRefcon); + XPLMWindowID inWindowID, + int x, + int y, + void * inRefcon); #endif /* XPLM200 */ #if defined(XPLM200) /* * XPLMHandleMouseWheel_f * - * The SDK calls your mouse wheel callback when one of the mouse wheels is - * scrolled within your window. Return 1 to consume the mouse wheel movement - * or 0 to pass them on to a lower window. (If your window appears opaque to - * the user, you should consume mouse wheel scrolling even if it does - * nothing.) The number of "clicks" indicates how far the wheel was turned - * since the last callback. The wheel is 0 for the vertical axis or 1 for the - * horizontal axis (for OS/mouse combinations that support this). + * The SDK calls your mouse wheel callback when one of the mouse wheels is + * scrolled within your window. Return 1 to consume the mouse wheel movement + * or 0 to pass them on to a lower window. (If your window appears opaque to + * the user, you should consume mouse wheel scrolling even if it does + * nothing.) The number of "clicks" indicates how far the wheel was turned + * since the last callback. The wheel is 0 for the vertical axis or 1 for the + * horizontal axis (for OS/mouse combinations that support this). * - * The units for x and y values match the units used in your window. Thus, for - * "modern" windows (those created via XPLMCreateWindowEx() and compiled - * against the XPLM300 library), the units are boxels, while legacy windows - * will get pixels. Legacy windows have their origin in the lower left of the - * main X-Plane window, while modern windows have their origin in the lower - * left of the global desktop space. In both cases, x increases as you move - * left, and y increases as you move up. + * The units for x and y values match the units used in your window. Thus, for + * "modern" windows (those created via XPLMCreateWindowEx() and compiled + * against the XPLM300 library), the units are boxels, while legacy windows + * will get pixels. Legacy windows have their origin in the lower left of the + * main X-Plane window, while modern windows have their origin in the lower + * left of the global desktop space. In both cases, x increases as you move + * right, and y increases as you move up. * */ typedef int (* XPLMHandleMouseWheel_f)( - XPLMWindowID inWindowID, - int x, - int y, - int wheel, - int clicks, - void * inRefcon); + XPLMWindowID inWindowID, + int x, + int y, + int wheel, + int clicks, + void * inRefcon); #endif /* XPLM200 */ #if defined(XPLM300) /* * XPLMWindowLayer * - * XPLMWindowLayer describes where in the ordering of windows X-Plane should - * place a particular window. Windows in higher layers cover windows in lower - * layers. So, a given window might be at the top of its particular layer, but - * it might still be obscured by a window in a higher layer. (This happens - * frequently when floating windows, like X-Plane's map, are covered by a - * modal alert.) + * XPLMWindowLayer describes where in the ordering of windows X-Plane should + * place a particular window. Windows in higher layers cover windows in lower + * layers. So, a given window might be at the top of its particular layer, but + * it might still be obscured by a window in a higher layer. (This happens + * frequently when floating windows, like X-Plane's map, are covered by a + * modal alert.) * - * Your window's layer can only be specified when you create the window (in - * the XPLMCreateWindow_t you pass to XPLMCreateWindowEx()). For this reason, - * layering only applies to windows created with new X-Plane 11 GUI features. - * (Windows created using the older XPLMCreateWindow(), or windows compiled - * against a pre-XPLM300 version of the SDK will simply be placed in the - * flight overlay window layer.) + * Your window's layer can only be specified when you create the window (in + * the XPLMCreateWindow_t you pass to XPLMCreateWindowEx()). For this reason, + * layering only applies to windows created with new X-Plane 11 GUI features. + * (Windows created using the older XPLMCreateWindow(), or windows compiled + * against a pre-XPLM300 version of the SDK will simply be placed in the + * flight overlay window layer.) * */ enum { - /* The lowest layer, used for HUD-like displays while flying. */ - xplm_WindowLayerFlightOverlay = 0 + /* The lowest layer, used for HUD-like displays while flying. */ + xplm_WindowLayerFlightOverlay = 0, - /* Windows that "float" over the sim, like the X-Plane 11 map does. If you are * - * not sure which layer to create your window in, choose floating. */ - ,xplm_WindowLayerFloatingWindows = 1 + /* Windows that "float" over the sim, like the X-Plane 11 map does. If you are* + * not sure which layer to create your window in, choose floating. */ + xplm_WindowLayerFloatingWindows = 1, - /* An interruptive modal that covers the sim with a transparent black overlay * - * to draw the user's focus to the alert */ - ,xplm_WindowLayerModal = 2 + /* An interruptive modal that covers the sim with a transparent black overlay * + * to draw the user's focus to the alert */ + xplm_WindowLayerModal = 2, - /* "Growl"-style notifications that are visible in a corner of the screen, * - * even over modals */ - ,xplm_WindowLayerGrowlNotifications = 3 + /* "Growl"-style notifications that are visible in a corner of the screen, * + * even over modals */ + xplm_WindowLayerGrowlNotifications = 3, }; @@ -522,34 +553,34 @@ typedef int XPLMWindowLayer; /* * XPLMWindowDecoration * - * XPLMWindowDecoration describes how "modern" windows will be displayed. This - * impacts both how X-Plane draws your window as well as certain mouse - * handlers. + * XPLMWindowDecoration describes how "modern" windows will be displayed. This + * impacts both how X-Plane draws your window as well as certain mouse + * handlers. * - * Your window's decoration can only be specified when you create the window - * (in the XPLMCreateWindow_t you pass to XPLMCreateWindowEx()). + * Your window's decoration can only be specified when you create the window + * (in the XPLMCreateWindow_t you pass to XPLMCreateWindowEx()). * */ enum { - /* X-Plane will draw no decoration for your window, and apply no automatic * - * click handlers. The window will not stop click from passing through its * - * bounds. This is suitable for "windows" which request, say, the full screen * - * bounds, then only draw in a small portion of the available area. */ - xplm_WindowDecorationNone = 0 + /* X-Plane will draw no decoration for your window, and apply no automatic * + * click handlers. The window will not stop click from passing through its * + * bounds. This is suitable for "windows" which request, say, the full screen * + * bounds, then only draw in a small portion of the available area. */ + xplm_WindowDecorationNone = 0, - /* The default decoration for "native" windows, like the map. Provides a solid * - * background, as well as click handlers for resizing and dragging the window. */ - ,xplm_WindowDecorationRoundRectangle = 1 + /* The default decoration for "native" windows, like the map. Provides a solid* + * background, as well as click handlers for resizing and dragging the window.*/ + xplm_WindowDecorationRoundRectangle = 1, - /* X-Plane will draw no decoration for your window, nor will it provide resize * - * handlers for your window edges, but it will stop clicks from passing * - * through your windows bounds. */ - ,xplm_WindowDecorationSelfDecorated = 2 + /* X-Plane will draw no decoration for your window, nor will it provide resize* + * handlers for your window edges, but it will stop clicks from passing * + * through your windows bounds. */ + xplm_WindowDecorationSelfDecorated = 2, - /* Like self-decorated, but with resizing; X-Plane will draw no decoration for * - * your window, but it will stop clicks from passing through your windows * - * bounds, and provide automatic mouse handlers for resizing. */ - ,xplm_WindowDecorationSelfDecoratedResizable = 3 + /* Like self-decorated, but with resizing; X-Plane will draw no decoration for* + * your window, but it will stop clicks from passing through your windows * + * bounds, and provide automatic mouse handlers for resizing. */ + xplm_WindowDecorationSelfDecoratedResizable = 3, }; @@ -560,69 +591,69 @@ typedef int XPLMWindowDecoration; /* * XPLMCreateWindow_t * - * The XPMCreateWindow_t structure defines all of the parameters used to - * create a modern window using XPLMCreateWindowEx(). The structure will be - * expanded in future SDK APIs to include more features. Always set the - * structSize member to the size of your struct in bytes! - * - * All windows created by this function in the XPLM300 version of the API are - * created with the new X-Plane 11 GUI features. This means your plugin will - * get to "know" about the existence of X-Plane windows other than the main - * window. All drawing and mouse callbacks for your window will occur in - * "boxels," giving your windows automatic support for high-DPI scaling in - * X-Plane. In addition, your windows can opt-in to decoration with the - * X-Plane 11 window styling, and you can use the - * XPLMSetWindowPositioningMode() API to make your window "popped out" into a - * first-class operating system window. - * - * Note that this requires dealing with your window's bounds in "global - * desktop" positioning units, rather than the traditional panel coordinate - * system. In global desktop coordinates, the main X-Plane window may not have - * its origin at coordinate (0, 0), and your own window may have negative - * coordinates. Assuming you don't implicitly assume (0, 0) as your origin, - * the only API change you should need is to start using - * XPLMGetMouseLocationGlobal() rather than XPLMGetMouseLocation(), and - * XPLMGetScreenBoundsGlobal() instead of XPLMGetScreenSize(). - * - * If you ask to be decorated as a floating window, you'll get the blue window - * control bar and blue backing that you see in X-Plane 11's normal "floating" - * windows (like the map). + * The XPMCreateWindow_t structure defines all of the parameters used to + * create a modern window using XPLMCreateWindowEx(). The structure will be + * expanded in future SDK APIs to include more features. Always set the + * structSize member to the size of your struct in bytes! + * + * All windows created by this function in the XPLM300 version of the API are + * created with the new X-Plane 11 GUI features. This means your plugin will + * get to "know" about the existence of X-Plane windows other than the main + * window. All drawing and mouse callbacks for your window will occur in + * "boxels," giving your windows automatic support for high-DPI scaling in + * X-Plane. In addition, your windows can opt-in to decoration with the + * X-Plane 11 window styling, and you can use the + * XPLMSetWindowPositioningMode() API to make your window "popped out" into a + * first-class operating system window. + * + * Note that this requires dealing with your window's bounds in "global + * desktop" positioning units, rather than the traditional panel coordinate + * system. In global desktop coordinates, the main X-Plane window may not have + * its origin at coordinate (0, 0), and your own window may have negative + * coordinates. Assuming you don't implicitly assume (0, 0) as your origin, + * the only API change you should need is to start using + * XPLMGetMouseLocationGlobal() rather than XPLMGetMouseLocation(), and + * XPLMGetScreenBoundsGlobal() instead of XPLMGetScreenSize(). + * + * If you ask to be decorated as a floating window, you'll get the blue window + * control bar and blue backing that you see in X-Plane 11's normal "floating" + * windows (like the map). * */ typedef struct { - /* Used to inform XPLMCreateWindowEx() of the SDK version you compiled * - * against; should always be set to sizeof(XPLMCreateWindow_t) */ + /* Used to inform XPLMCreateWindowEx() of the SDK version you compiled * + * against; should always be set to sizeof(XPLMCreateWindow_t) */ int structSize; - /* Left bound, in global desktop boxels */ + /* Left bound, in global desktop boxels */ int left; - /* Top bound, in global desktop boxels */ + /* Top bound, in global desktop boxels */ int top; - /* Right bound, in global desktop boxels */ + /* Right bound, in global desktop boxels */ int right; - /* Bottom bound, in global desktop boxels */ + /* Bottom bound, in global desktop boxels */ int bottom; int visible; XPLMDrawWindow_f drawWindowFunc; - /* A callback to handle the user left-clicking within your window (or NULL to * - * ignore left clicks) */ + /* A callback to handle the user left-clicking within your window (or NULL to * + * ignore left clicks) */ XPLMHandleMouseClick_f handleMouseClickFunc; XPLMHandleKey_f handleKeyFunc; XPLMHandleCursor_f handleCursorFunc; XPLMHandleMouseWheel_f handleMouseWheelFunc; - /* A reference which will be passed into each of your window callbacks. Use * - * this to pass information to yourself as needed. */ + /* A reference which will be passed into each of your window callbacks. Use * + * this to pass information to yourself as needed. */ void * refcon; #if defined(XPLM301) - /* Specifies the type of X-Plane 11-style "wrapper" you want around your * - * window, if any */ + /* Specifies the type of X-Plane 11-style "wrapper" you want around your * + * window, if any */ XPLMWindowDecoration decorateAsFloatingWindow; #endif /* XPLM301 */ #if defined(XPLM300) XPLMWindowLayer layer; #endif /* XPLM300 */ #if defined(XPLM300) - /* A callback to handle the user right-clicking within your window (or NULL to * - * ignore right clicks) */ + /* A callback to handle the user right-clicking within your window (or NULL to* + * ignore right clicks) */ XPLMHandleMouseClick_f handleRightClickFunc; #endif /* XPLM300 */ } XPLMCreateWindow_t; @@ -632,516 +663,516 @@ typedef struct { /* * XPLMCreateWindowEx * - * This routine creates a new "modern" window. You pass in an - * XPLMCreateWindow_t structure with all of the fields set in. You must set - * the structSize of the structure to the size of the actual structure you - * used. Also, you must provide functions for every callback---you may not - * leave them null! (If you do not support the cursor or mouse wheel, use - * functions that return the default values.) + * This routine creates a new "modern" window. You pass in an + * XPLMCreateWindow_t structure with all of the fields set in. You must set + * the structSize of the structure to the size of the actual structure you + * used. Also, you must provide functions for every callback---you may not + * leave them null! (If you do not support the cursor or mouse wheel, use + * functions that return the default values.) * */ -XPLM_API XPLMWindowID XPLMCreateWindowEx( - XPLMCreateWindow_t * inParams); +XPLM_API XPLMWindowID XPLMCreateWindowEx( + XPLMCreateWindow_t * inParams); #endif /* XPLM200 */ /* * XPLMCreateWindow * - * Deprecated as of XPLM300. + * Deprecated as of XPLM300. * - * This routine creates a new legacy window. Unlike modern windows (created - * via XPLMCreateWindowEx()), legacy windows do not have access to X-Plane 11 - * features like automatic scaling for high-DPI screens, native window styles, - * or support for being "popped out" into first-class operating system - * windows. + * This routine creates a new legacy window. Unlike modern windows (created + * via XPLMCreateWindowEx()), legacy windows do not have access to X-Plane 11 + * features like automatic scaling for high-DPI screens, native window styles, + * or support for being "popped out" into first-class operating system + * windows. * - * Pass in the dimensions and offsets to the window's bottom left corner from - * the bottom left of the screen. You can specify whether the window is - * initially visible or not. Also, you pass in three callbacks to run the - * window and a refcon. This function returns a window ID you can use to - * refer to the new window. + * Pass in the dimensions and offsets to the window's bottom left corner from + * the bottom left of the screen. You can specify whether the window is + * initially visible or not. Also, you pass in three callbacks to run the + * window and a refcon. This function returns a window ID you can use to + * refer to the new window. * - * NOTE: Legacy windows do not have "frames"; you are responsible for drawing - * the background and frame of the window. Higher level libraries have - * routines which make this easy. + * NOTE: Legacy windows do not have "frames"; you are responsible for drawing + * the background and frame of the window. Higher level libraries have + * routines which make this easy. * */ -XPLM_API XPLMWindowID XPLMCreateWindow( - int inLeft, - int inTop, - int inRight, - int inBottom, - int inIsVisible, - XPLMDrawWindow_f inDrawCallback, - XPLMHandleKey_f inKeyCallback, - XPLMHandleMouseClick_f inMouseCallback, - void * inRefcon); +XPLM_API XPLMWindowID XPLMCreateWindow( + int inLeft, + int inTop, + int inRight, + int inBottom, + int inIsVisible, + XPLMDrawWindow_f inDrawCallback, + XPLMHandleKey_f inKeyCallback, + XPLMHandleMouseClick_f inMouseCallback, + void * inRefcon); /* * XPLMDestroyWindow * - * This routine destroys a window. The window's callbacks are not called - * after this call. Keyboard focus is removed from the window before - * destroying it. + * This routine destroys a window. The window's callbacks are not called + * after this call. Keyboard focus is removed from the window before + * destroying it. * */ -XPLM_API void XPLMDestroyWindow( - XPLMWindowID inWindowID); +XPLM_API void XPLMDestroyWindow( + XPLMWindowID inWindowID); /* * XPLMGetScreenSize * - * This routine returns the size of the main X-Plane OpenGL window in pixels. - * This number can be used to get a rough idea of the amount of detail the - * user will be able to see when drawing in 3-d. + * This routine returns the size of the main X-Plane OpenGL window in pixels. + * This number can be used to get a rough idea of the amount of detail the + * user will be able to see when drawing in 3-d. * */ -XPLM_API void XPLMGetScreenSize( - int * outWidth, /* Can be NULL */ - int * outHeight); /* Can be NULL */ +XPLM_API void XPLMGetScreenSize( + int * outWidth, /* Can be NULL */ + int * outHeight); /* Can be NULL */ #if defined(XPLM300) /* * XPLMGetScreenBoundsGlobal * - * This routine returns the bounds of the "global" X-Plane desktop, in boxels. - * Unlike the non-global version XPLMGetScreenSize(), this is multi-monitor - * aware. There are three primary consequences of multimonitor awareness. - * - * First, if the user is running X-Plane in full-screen on two or more - * monitors (typically configured using one full-screen window per monitor), - * the global desktop will be sized to include all X-Plane windows. - * - * Second, the origin of the screen coordinates is not guaranteed to be (0, - * 0). Suppose the user has two displays side-by-side, both running at 1080p. - * Suppose further that they've configured their OS to make the left display - * their "primary" monitor, and that X-Plane is running in full-screen on - * their right monitor only. In this case, the global desktop bounds would be - * the rectangle from (1920, 0) to (3840, 1080). If the user later asked - * X-Plane to draw on their primary monitor as well, the bounds would change - * to (0, 0) to (3840, 1080). - * - * Finally, if the usable area of the virtual desktop is not a perfect - * rectangle (for instance, because the monitors have different resolutions or - * because one monitor is configured in the operating system to be above and - * to the right of the other), the global desktop will include any wasted - * space. Thus, if you have two 1080p monitors, and monitor 2 is configured to - * have its bottom left touch monitor 1's upper right, your global desktop - * area would be the rectangle from (0, 0) to (3840, 2160). - * - * Note that popped-out windows (windows drawn in their own operating system - * windows, rather than "floating" within X-Plane) are not included in these - * bounds. - * - */ -XPLM_API void XPLMGetScreenBoundsGlobal( - int * outLeft, /* Can be NULL */ - int * outTop, /* Can be NULL */ - int * outRight, /* Can be NULL */ - int * outBottom); /* Can be NULL */ + * This routine returns the bounds of the "global" X-Plane desktop, in boxels. + * Unlike the non-global version XPLMGetScreenSize(), this is multi-monitor + * aware. There are three primary consequences of multimonitor awareness. + * + * First, if the user is running X-Plane in full-screen on two or more + * monitors (typically configured using one full-screen window per monitor), + * the global desktop will be sized to include all X-Plane windows. + * + * Second, the origin of the screen coordinates is not guaranteed to be (0, + * 0). Suppose the user has two displays side-by-side, both running at 1080p. + * Suppose further that they've configured their OS to make the left display + * their "primary" monitor, and that X-Plane is running in full-screen on + * their right monitor only. In this case, the global desktop bounds would be + * the rectangle from (1920, 0) to (3840, 1080). If the user later asked + * X-Plane to draw on their primary monitor as well, the bounds would change + * to (0, 0) to (3840, 1080). + * + * Finally, if the usable area of the virtual desktop is not a perfect + * rectangle (for instance, because the monitors have different resolutions or + * because one monitor is configured in the operating system to be above and + * to the right of the other), the global desktop will include any wasted + * space. Thus, if you have two 1080p monitors, and monitor 2 is configured to + * have its bottom left touch monitor 1's upper right, your global desktop + * area would be the rectangle from (0, 0) to (3840, 2160). + * + * Note that popped-out windows (windows drawn in their own operating system + * windows, rather than "floating" within X-Plane) are not included in these + * bounds. + * + */ +XPLM_API void XPLMGetScreenBoundsGlobal( + int * outLeft, /* Can be NULL */ + int * outTop, /* Can be NULL */ + int * outRight, /* Can be NULL */ + int * outBottom); /* Can be NULL */ #endif /* XPLM300 */ #if defined(XPLM300) /* * XPLMReceiveMonitorBoundsGlobal_f * - * This function is informed of the global bounds (in boxels) of a particular - * monitor within the X-Plane global desktop space. Note that X-Plane must be - * running in full screen on a monitor in order for that monitor to be passed - * to you in this callback. + * This function is informed of the global bounds (in boxels) of a particular + * monitor within the X-Plane global desktop space. Note that X-Plane must be + * running in full screen on a monitor in order for that monitor to be passed + * to you in this callback. * */ typedef void (* XPLMReceiveMonitorBoundsGlobal_f)( - int inMonitorIndex, - int inLeftBx, - int inTopBx, - int inRightBx, - int inBottomBx, - void * inRefcon); + int inMonitorIndex, + int inLeftBx, + int inTopBx, + int inRightBx, + int inBottomBx, + void * inRefcon); #endif /* XPLM300 */ #if defined(XPLM300) /* * XPLMGetAllMonitorBoundsGlobal * - * This routine immediately calls you back with the bounds (in boxels) of each - * full-screen X-Plane window within the X-Plane global desktop space. Note - * that if a monitor is *not* covered by an X-Plane window, you cannot get its - * bounds this way. Likewise, monitors with only an X-Plane window (not in - * full-screen mode) will not be included. - * - * If X-Plane is running in full-screen and your monitors are of the same size - * and configured contiguously in the OS, then the combined global bounds of - * all full-screen monitors will match the total global desktop bounds, as - * returned by XPLMGetScreenBoundsGlobal(). (Of course, if X-Plane is running - * in windowed mode, this will not be the case. Likewise, if you have - * differently sized monitors, the global desktop space will include wasted - * space.) - * - * Note that this function's monitor indices match those provided by - * XPLMGetAllMonitorBoundsOS(), but the coordinates are different (since the - * X-Plane global desktop may not match the operating system's global desktop, - * and one X-Plane boxel may be larger than one pixel due to 150% or 200% - * scaling). - * - */ -XPLM_API void XPLMGetAllMonitorBoundsGlobal( - XPLMReceiveMonitorBoundsGlobal_f inMonitorBoundsCallback, - void * inRefcon); + * This routine immediately calls you back with the bounds (in boxels) of each + * full-screen X-Plane window within the X-Plane global desktop space. Note + * that if a monitor is *not* covered by an X-Plane window, you cannot get its + * bounds this way. Likewise, monitors with only an X-Plane window (not in + * full-screen mode) will not be included. + * + * If X-Plane is running in full-screen and your monitors are of the same size + * and configured contiguously in the OS, then the combined global bounds of + * all full-screen monitors will match the total global desktop bounds, as + * returned by XPLMGetScreenBoundsGlobal(). (Of course, if X-Plane is running + * in windowed mode, this will not be the case. Likewise, if you have + * differently sized monitors, the global desktop space will include wasted + * space.) + * + * Note that this function's monitor indices match those provided by + * XPLMGetAllMonitorBoundsOS(), but the coordinates are different (since the + * X-Plane global desktop may not match the operating system's global desktop, + * and one X-Plane boxel may be larger than one pixel due to 150% or 200% + * scaling). + * + */ +XPLM_API void XPLMGetAllMonitorBoundsGlobal( + XPLMReceiveMonitorBoundsGlobal_f inMonitorBoundsCallback, + void * inRefcon); #endif /* XPLM300 */ #if defined(XPLM300) /* * XPLMReceiveMonitorBoundsOS_f * - * This function is informed of the global bounds (in pixels) of a particular - * monitor within the operating system's global desktop space. Note that a - * monitor index being passed to you here does not indicate that X-Plane is - * running in full screen on this monitor, or even that any X-Plane windows - * exist on this monitor. + * This function is informed of the global bounds (in pixels) of a particular + * monitor within the operating system's global desktop space. Note that a + * monitor index being passed to you here does not indicate that X-Plane is + * running in full screen on this monitor, or even that any X-Plane windows + * exist on this monitor. * */ typedef void (* XPLMReceiveMonitorBoundsOS_f)( - int inMonitorIndex, - int inLeftPx, - int inTopPx, - int inRightPx, - int inBottomPx, - void * inRefcon); + int inMonitorIndex, + int inLeftPx, + int inTopPx, + int inRightPx, + int inBottomPx, + void * inRefcon); #endif /* XPLM300 */ #if defined(XPLM300) /* * XPLMGetAllMonitorBoundsOS * - * This routine immediately calls you back with the bounds (in pixels) of each - * monitor within the operating system's global desktop space. Note that - * unlike XPLMGetAllMonitorBoundsGlobal(), this may include monitors that have - * no X-Plane window on them. + * This routine immediately calls you back with the bounds (in pixels) of each + * monitor within the operating system's global desktop space. Note that + * unlike XPLMGetAllMonitorBoundsGlobal(), this may include monitors that have + * no X-Plane window on them. * - * Note that this function's monitor indices match those provided by - * XPLMGetAllMonitorBoundsGlobal(), but the coordinates are different (since - * the X-Plane global desktop may not match the operating system's global - * desktop, and one X-Plane boxel may be larger than one pixel). + * Note that this function's monitor indices match those provided by + * XPLMGetAllMonitorBoundsGlobal(), but the coordinates are different (since + * the X-Plane global desktop may not match the operating system's global + * desktop, and one X-Plane boxel may be larger than one pixel). * */ -XPLM_API void XPLMGetAllMonitorBoundsOS( - XPLMReceiveMonitorBoundsOS_f inMonitorBoundsCallback, - void * inRefcon); +XPLM_API void XPLMGetAllMonitorBoundsOS( + XPLMReceiveMonitorBoundsOS_f inMonitorBoundsCallback, + void * inRefcon); #endif /* XPLM300 */ /* * XPLMGetMouseLocation * - * Deprecated in XPLM300. Modern windows should use - * XPLMGetMouseLocationGlobal() instead. + * Deprecated in XPLM300. Modern windows should use + * XPLMGetMouseLocationGlobal() instead. * - * This routine returns the current mouse location in pixels relative to the - * main X-Plane window. The bottom left corner of the main window is (0, 0). - * Pass NULL to not receive info about either parameter. + * This routine returns the current mouse location in pixels relative to the + * main X-Plane window. The bottom left corner of the main window is (0, 0). + * Pass NULL to not receive info about either parameter. * - * Because this function gives the mouse position relative to the main X-Plane - * window (rather than in global bounds), this function should only be used by - * legacy windows. Modern windows should instead get the mouse position in - * global desktop coordinates using XPLMGetMouseLocationGlobal(). + * Because this function gives the mouse position relative to the main X-Plane + * window (rather than in global bounds), this function should only be used by + * legacy windows. Modern windows should instead get the mouse position in + * global desktop coordinates using XPLMGetMouseLocationGlobal(). * - * Note that unlike XPLMGetMouseLocationGlobal(), if the mouse goes outside - * the user's main monitor (for instance, to a pop out window or a secondary - * monitor), this function will not reflect it. + * Note that unlike XPLMGetMouseLocationGlobal(), if the mouse goes outside + * the user's main monitor (for instance, to a pop out window or a secondary + * monitor), this function will not reflect it. * */ -XPLM_API void XPLMGetMouseLocation( - int * outX, /* Can be NULL */ - int * outY); /* Can be NULL */ +XPLM_API void XPLMGetMouseLocation( + int * outX, /* Can be NULL */ + int * outY); /* Can be NULL */ #if defined(XPLM300) /* * XPLMGetMouseLocationGlobal * - * Returns the current mouse location in global desktop boxels. Unlike - * XPLMGetMouseLocation(), the bottom left of the main X-Plane window is not - * guaranteed to be (0, 0)---instead, the origin is the lower left of the - * entire global desktop space. In addition, this routine gives the real mouse - * location when the mouse goes to X-Plane windows other than the primary - * display. Thus, it can be used with both pop-out windows and secondary - * monitors. + * Returns the current mouse location in global desktop boxels. Unlike + * XPLMGetMouseLocation(), the bottom left of the main X-Plane window is not + * guaranteed to be (0, 0)---instead, the origin is the lower left of the + * entire global desktop space. In addition, this routine gives the real mouse + * location when the mouse goes to X-Plane windows other than the primary + * display. Thus, it can be used with both pop-out windows and secondary + * monitors. * - * This is the mouse location function to use with modern windows (i.e., those - * created by XPLMCreateWindowEx()). + * This is the mouse location function to use with modern windows (i.e., those + * created by XPLMCreateWindowEx()). * - * Pass NULL to not receive info about either parameter. + * Pass NULL to not receive info about either parameter. * */ -XPLM_API void XPLMGetMouseLocationGlobal( - int * outX, /* Can be NULL */ - int * outY); /* Can be NULL */ +XPLM_API void XPLMGetMouseLocationGlobal( + int * outX, /* Can be NULL */ + int * outY); /* Can be NULL */ #endif /* XPLM300 */ /* * XPLMGetWindowGeometry * - * This routine returns the position and size of a window. The units and - * coordinate system vary depending on the type of window you have. + * This routine returns the position and size of a window. The units and + * coordinate system vary depending on the type of window you have. * - * If this is a legacy window (one compiled against a pre-XPLM300 version of - * the SDK, or an XPLM300 window that was not created using - * XPLMCreateWindowEx()), the units are pixels relative to the main X-Plane - * display. + * If this is a legacy window (one compiled against a pre-XPLM300 version of + * the SDK, or an XPLM300 window that was not created using + * XPLMCreateWindowEx()), the units are pixels relative to the main X-Plane + * display. * - * If, on the other hand, this is a new X-Plane 11-style window (compiled - * against the XPLM300 SDK and created using XPLMCreateWindowEx()), the units - * are global desktop boxels. + * If, on the other hand, this is a new X-Plane 11-style window (compiled + * against the XPLM300 SDK and created using XPLMCreateWindowEx()), the units + * are global desktop boxels. * - * Pass NULL to not receive any paramter. + * Pass NULL to not receive any paramter. * */ -XPLM_API void XPLMGetWindowGeometry( - XPLMWindowID inWindowID, - int * outLeft, /* Can be NULL */ - int * outTop, /* Can be NULL */ - int * outRight, /* Can be NULL */ - int * outBottom); /* Can be NULL */ +XPLM_API void XPLMGetWindowGeometry( + XPLMWindowID inWindowID, + int * outLeft, /* Can be NULL */ + int * outTop, /* Can be NULL */ + int * outRight, /* Can be NULL */ + int * outBottom); /* Can be NULL */ /* * XPLMSetWindowGeometry * - * This routine allows you to set the position and size of a window. + * This routine allows you to set the position and size of a window. * - * The units and coordinate system match those of XPLMGetWindowGeometry(). - * That is, modern windows use global desktop boxel coordinates, while legacy - * windows use pixels relative to the main X-Plane display. + * The units and coordinate system match those of XPLMGetWindowGeometry(). + * That is, modern windows use global desktop boxel coordinates, while legacy + * windows use pixels relative to the main X-Plane display. * - * Note that this only applies to "floating" windows (that is, windows that - * are drawn within the X-Plane simulation windows, rather than being "popped - * out" into their own first-class operating system windows). To set the - * position of windows whose positioning mode is xplm_WindowPopOut, you'll - * need to instead use XPLMSetWindowGeometryOS(). + * Note that this only applies to "floating" windows (that is, windows that + * are drawn within the X-Plane simulation windows, rather than being "popped + * out" into their own first-class operating system windows). To set the + * position of windows whose positioning mode is xplm_WindowPopOut, you'll + * need to instead use XPLMSetWindowGeometryOS(). * */ -XPLM_API void XPLMSetWindowGeometry( - XPLMWindowID inWindowID, - int inLeft, - int inTop, - int inRight, - int inBottom); +XPLM_API void XPLMSetWindowGeometry( + XPLMWindowID inWindowID, + int inLeft, + int inTop, + int inRight, + int inBottom); #if defined(XPLM300) /* * XPLMGetWindowGeometryOS * - * This routine returns the position and size of a "popped out" window (i.e., - * a window whose positioning mode is xplm_WindowPopOut), in operating system - * pixels. Pass NULL to not receive any parameter. + * This routine returns the position and size of a "popped out" window (i.e., + * a window whose positioning mode is xplm_WindowPopOut), in operating system + * pixels. Pass NULL to not receive any parameter. * */ -XPLM_API void XPLMGetWindowGeometryOS( - XPLMWindowID inWindowID, - int * outLeft, /* Can be NULL */ - int * outTop, /* Can be NULL */ - int * outRight, /* Can be NULL */ - int * outBottom); /* Can be NULL */ +XPLM_API void XPLMGetWindowGeometryOS( + XPLMWindowID inWindowID, + int * outLeft, /* Can be NULL */ + int * outTop, /* Can be NULL */ + int * outRight, /* Can be NULL */ + int * outBottom); /* Can be NULL */ #endif /* XPLM300 */ #if defined(XPLM300) /* * XPLMSetWindowGeometryOS * - * This routine allows you to set the position and size, in operating system - * pixel coordinates, of a popped out window (that is, a window whose - * positioning mode is xplm_WindowPopOut, which exists outside the X-Plane - * simulation window, in its own first-class operating system window). + * This routine allows you to set the position and size, in operating system + * pixel coordinates, of a popped out window (that is, a window whose + * positioning mode is xplm_WindowPopOut, which exists outside the X-Plane + * simulation window, in its own first-class operating system window). * - * Note that you are responsible for ensuring both that your window is popped - * out (using XPLMWindowIsPoppedOut()) and that a monitor really exists at the - * OS coordinates you provide (using XPLMGetAllMonitorBoundsOS()). + * Note that you are responsible for ensuring both that your window is popped + * out (using XPLMWindowIsPoppedOut()) and that a monitor really exists at the + * OS coordinates you provide (using XPLMGetAllMonitorBoundsOS()). * */ -XPLM_API void XPLMSetWindowGeometryOS( - XPLMWindowID inWindowID, - int inLeft, - int inTop, - int inRight, - int inBottom); +XPLM_API void XPLMSetWindowGeometryOS( + XPLMWindowID inWindowID, + int inLeft, + int inTop, + int inRight, + int inBottom); #endif /* XPLM300 */ #if defined(XPLM301) /* * XPLMGetWindowGeometryVR * - * Returns the width and height, in boxels, of a window in VR. Note that you - * are responsible for ensuring your window is in VR (using - * XPLMWindowIsInVR()). + * Returns the width and height, in boxels, of a window in VR. Note that you + * are responsible for ensuring your window is in VR (using + * XPLMWindowIsInVR()). * */ -XPLM_API void XPLMGetWindowGeometryVR( - XPLMWindowID inWindowID, - int * outWidthBoxels, /* Can be NULL */ - int * outHeightBoxels); /* Can be NULL */ +XPLM_API void XPLMGetWindowGeometryVR( + XPLMWindowID inWindowID, + int * outWidthBoxels, /* Can be NULL */ + int * outHeightBoxels); /* Can be NULL */ #endif /* XPLM301 */ #if defined(XPLM301) /* * XPLMSetWindowGeometryVR * - * This routine allows you to set the size, in boxels, of a window in VR (that - * is, a window whose positioning mode is xplm_WindowVR). + * This routine allows you to set the size, in boxels, of a window in VR (that + * is, a window whose positioning mode is xplm_WindowVR). * - * Note that you are responsible for ensuring your window is in VR (using - * XPLMWindowIsInVR()). + * Note that you are responsible for ensuring your window is in VR (using + * XPLMWindowIsInVR()). * */ -XPLM_API void XPLMSetWindowGeometryVR( - XPLMWindowID inWindowID, - int widthBoxels, - int heightBoxels); +XPLM_API void XPLMSetWindowGeometryVR( + XPLMWindowID inWindowID, + int widthBoxels, + int heightBoxels); #endif /* XPLM301 */ /* * XPLMGetWindowIsVisible * - * This routine returns whether a window is visible. + * Returns true (1) if the specified window is visible. * */ -XPLM_API int XPLMGetWindowIsVisible( - XPLMWindowID inWindowID); +XPLM_API int XPLMGetWindowIsVisible( + XPLMWindowID inWindowID); /* * XPLMSetWindowIsVisible * - * This routine shows or hides a window. + * This routine shows or hides a window. * */ -XPLM_API void XPLMSetWindowIsVisible( - XPLMWindowID inWindowID, - int inIsVisible); +XPLM_API void XPLMSetWindowIsVisible( + XPLMWindowID inWindowID, + int inIsVisible); #if defined(XPLM300) /* * XPLMWindowIsPoppedOut * - * True if this window has been popped out (making it a first-class window in - * the operating system), which in turn is true if and only if you have set - * the window's positioning mode to xplm_WindowPopOut. + * True if this window has been popped out (making it a first-class window in + * the operating system), which in turn is true if and only if you have set + * the window's positioning mode to xplm_WindowPopOut. * - * Only applies to modern windows. (Windows created using the deprecated - * XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of - * the SDK cannot be popped out.) + * Only applies to modern windows. (Windows created using the deprecated + * XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of + * the SDK cannot be popped out.) * */ -XPLM_API int XPLMWindowIsPoppedOut( - XPLMWindowID inWindowID); +XPLM_API int XPLMWindowIsPoppedOut( + XPLMWindowID inWindowID); #endif /* XPLM300 */ #if defined(XPLM301) /* * XPLMWindowIsInVR * - * True if this window has been moved to the virtual reality (VR) headset, - * which in turn is true if and only if you have set the window's positioning - * mode to xplm_WindowVR. + * True if this window has been moved to the virtual reality (VR) headset, + * which in turn is true if and only if you have set the window's positioning + * mode to xplm_WindowVR. * - * Only applies to modern windows. (Windows created using the deprecated - * XPLMCreateWindow(), or windows compiled against a pre-XPLM301 version of - * the SDK cannot be moved to VR.) + * Only applies to modern windows. (Windows created using the deprecated + * XPLMCreateWindow(), or windows compiled against a pre-XPLM301 version of + * the SDK cannot be moved to VR.) * */ -XPLM_API int XPLMWindowIsInVR( - XPLMWindowID inWindowID); +XPLM_API int XPLMWindowIsInVR( + XPLMWindowID inWindowID); #endif /* XPLM301 */ #if defined(XPLM300) /* * XPLMSetWindowGravity * - * A window's "gravity" controls how the window shifts as the whole X-Plane - * window resizes. A gravity of 1 means the window maintains its positioning - * relative to the right or top edges, 0 the left/bottom, and 0.5 keeps it - * centered. + * A window's "gravity" controls how the window shifts as the whole X-Plane + * window resizes. A gravity of 1 means the window maintains its positioning + * relative to the right or top edges, 0 the left/bottom, and 0.5 keeps it + * centered. * - * Default gravity is (0, 1, 0, 1), meaning your window will maintain its - * position relative to the top left and will not change size as its - * containing window grows. + * Default gravity is (0, 1, 0, 1), meaning your window will maintain its + * position relative to the top left and will not change size as its + * containing window grows. * - * If you wanted, say, a window that sticks to the top of the screen (with a - * constant height), but which grows to take the full width of the window, you - * would pass (0, 1, 1, 1). Because your left and right edges would maintain - * their positioning relative to their respective edges of the screen, the - * whole width of your window would change with the X-Plane window. + * If you wanted, say, a window that sticks to the top of the screen (with a + * constant height), but which grows to take the full width of the window, you + * would pass (0, 1, 1, 1). Because your left and right edges would maintain + * their positioning relative to their respective edges of the screen, the + * whole width of your window would change with the X-Plane window. * - * Only applies to modern windows. (Windows created using the deprecated - * XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of - * the SDK will simply get the default gravity.) + * Only applies to modern windows. (Windows created using the deprecated + * XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of + * the SDK will simply get the default gravity.) * */ -XPLM_API void XPLMSetWindowGravity( - XPLMWindowID inWindowID, - float inLeftGravity, - float inTopGravity, - float inRightGravity, - float inBottomGravity); +XPLM_API void XPLMSetWindowGravity( + XPLMWindowID inWindowID, + float inLeftGravity, + float inTopGravity, + float inRightGravity, + float inBottomGravity); #endif /* XPLM300 */ #if defined(XPLM300) /* * XPLMSetWindowResizingLimits * - * Sets the minimum and maximum size of the client rectangle of the given - * window. (That is, it does not include any window styling that you might - * have asked X-Plane to apply on your behalf.) All resizing operations are - * constrained to these sizes. + * Sets the minimum and maximum size of the client rectangle of the given + * window. (That is, it does not include any window styling that you might + * have asked X-Plane to apply on your behalf.) All resizing operations are + * constrained to these sizes. * - * Only applies to modern windows. (Windows created using the deprecated - * XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of - * the SDK will have no minimum or maximum size.) + * Only applies to modern windows. (Windows created using the deprecated + * XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of + * the SDK will have no minimum or maximum size.) * */ -XPLM_API void XPLMSetWindowResizingLimits( - XPLMWindowID inWindowID, - int inMinWidthBoxels, - int inMinHeightBoxels, - int inMaxWidthBoxels, - int inMaxHeightBoxels); +XPLM_API void XPLMSetWindowResizingLimits( + XPLMWindowID inWindowID, + int inMinWidthBoxels, + int inMinHeightBoxels, + int inMaxWidthBoxels, + int inMaxHeightBoxels); #endif /* XPLM300 */ #if defined(XPLM300) /* * XPLMWindowPositioningMode * - * XPLMWindowPositionMode describes how X-Plane will position your window on - * the user's screen. X-Plane will maintain this positioning mode even as the - * user resizes their window or adds/removes full-screen monitors. + * XPLMWindowPositionMode describes how X-Plane will position your window on + * the user's screen. X-Plane will maintain this positioning mode even as the + * user resizes their window or adds/removes full-screen monitors. * - * Positioning mode can only be set for "modern" windows (that is, windows - * created using XPLMCreateWindowEx() and compiled against the XPLM300 SDK). - * Windows created using the deprecated XPLMCreateWindow(), or windows - * compiled against a pre-XPLM300 version of the SDK will simply get the - * "free" positioning mode. + * Positioning mode can only be set for "modern" windows (that is, windows + * created using XPLMCreateWindowEx() and compiled against the XPLM300 SDK). + * Windows created using the deprecated XPLMCreateWindow(), or windows + * compiled against a pre-XPLM300 version of the SDK will simply get the + * "free" positioning mode. * */ enum { - /* The default positioning mode. Set the window geometry and its future * - * position will be determined by its window gravity, resizing limits, and * - * user interactions. */ - xplm_WindowPositionFree = 0 + /* The default positioning mode. Set the window geometry and its future * + * position will be determined by its window gravity, resizing limits, and * + * user interactions. */ + xplm_WindowPositionFree = 0, - /* Keep the window centered on the monitor you specify */ - ,xplm_WindowCenterOnMonitor = 1 + /* Keep the window centered on the monitor you specify */ + xplm_WindowCenterOnMonitor = 1, - /* Keep the window full screen on the monitor you specify */ - ,xplm_WindowFullScreenOnMonitor = 2 + /* Keep the window full screen on the monitor you specify */ + xplm_WindowFullScreenOnMonitor = 2, - /* Like gui_window_full_screen_on_monitor, but stretches over *all* monitors * - * and popout windows. This is an obscure one... unless you have a very good * - * reason to need it, you probably don't! */ - ,xplm_WindowFullScreenOnAllMonitors = 3 + /* Like gui_window_full_screen_on_monitor, but stretches over *all* monitors * + * and popout windows. This is an obscure one... unless you have a very good * + * reason to need it, you probably don't! */ + xplm_WindowFullScreenOnAllMonitors = 3, - /* A first-class window in the operating system, completely separate from the * - * X-Plane window(s) */ - ,xplm_WindowPopOut = 4 + /* A first-class window in the operating system, completely separate from the * + * X-Plane window(s) */ + xplm_WindowPopOut = 4, #if defined(XPLM301) - /* A floating window visible on the VR headset */ - ,xplm_WindowVR = 5 + /* A floating window visible on the VR headset */ + xplm_WindowVR = 5, #endif /* XPLM301 */ @@ -1153,127 +1184,133 @@ typedef int XPLMWindowPositioningMode; /* * XPLMSetWindowPositioningMode * - * Sets the policy for how X-Plane will position your window. + * Sets the policy for how X-Plane will position your window. * - * Some positioning modes apply to a particular monitor. For those modes, you - * can pass a negative monitor index to position the window on the main - * X-Plane monitor (the screen with the X-Plane menu bar at the top). Or, if - * you have a specific monitor you want to position your window on, you can - * pass a real monitor index as received from, e.g., - * XPLMGetAllMonitorBoundsOS(). + * Some positioning modes apply to a particular monitor. For those modes, you + * can pass a negative monitor index to position the window on the main + * X-Plane monitor (the screen with the X-Plane menu bar at the top). Or, if + * you have a specific monitor you want to position your window on, you can + * pass a real monitor index as received from, e.g., + * XPLMGetAllMonitorBoundsOS(). * - * Only applies to modern windows. (Windows created using the deprecated - * XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of - * the SDK will always use xplm_WindowPositionFree.) + * Only applies to modern windows. (Windows created using the deprecated + * XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of + * the SDK will always use xplm_WindowPositionFree.) * */ -XPLM_API void XPLMSetWindowPositioningMode( - XPLMWindowID inWindowID, - XPLMWindowPositioningMode inPositioningMode, - int inMonitorIndex); +XPLM_API void XPLMSetWindowPositioningMode( + XPLMWindowID inWindowID, + XPLMWindowPositioningMode inPositioningMode, + int inMonitorIndex); #endif /* XPLM300 */ #if defined(XPLM300) /* * XPLMSetWindowTitle * - * Sets the name for a window. This only applies to windows that opted-in to - * styling as an X-Plane 11 floating window (i.e., with styling mode - * xplm_WindowDecorationRoundRectangle) when they were created using - * XPLMCreateWindowEx(). + * Sets the name for a window. This only applies to windows that opted-in to + * styling as an X-Plane 11 floating window (i.e., with styling mode + * xplm_WindowDecorationRoundRectangle) when they were created using + * XPLMCreateWindowEx(). * */ -XPLM_API void XPLMSetWindowTitle( - XPLMWindowID inWindowID, - const char * inWindowTitle); +XPLM_API void XPLMSetWindowTitle( + XPLMWindowID inWindowID, + const char * inWindowTitle); #endif /* XPLM300 */ /* * XPLMGetWindowRefCon * - * This routine returns a window's reference constant, the unique value you - * can use for your own purposes. + * Returns a window's reference constant, the unique value you can use for + * your own purposes. * */ -XPLM_API void * XPLMGetWindowRefCon( - XPLMWindowID inWindowID); +XPLM_API void * XPLMGetWindowRefCon( + XPLMWindowID inWindowID); /* * XPLMSetWindowRefCon * - * This routine sets a window's reference constant. Use this to pass data to - * yourself in the callbacks. + * Sets a window's reference constant. Use this to pass data to yourself in + * the callbacks. * */ -XPLM_API void XPLMSetWindowRefCon( - XPLMWindowID inWindowID, - void * inRefcon); +XPLM_API void XPLMSetWindowRefCon( + XPLMWindowID inWindowID, + void * inRefcon); /* * XPLMTakeKeyboardFocus * - * This routine gives a specific window keyboard focus. Keystrokes will be - * sent to that window. Pass a window ID of 0 to remove keyboard focus from - * any plugin-created windows and instead pass keyboard strokes directly to - * X-Plane. + * This routine gives a specific window keyboard focus. Keystrokes will be + * sent to that window. Pass a window ID of 0 to remove keyboard focus from + * any plugin-created windows and instead pass keyboard strokes directly to + * X-Plane. * */ -XPLM_API void XPLMTakeKeyboardFocus( - XPLMWindowID inWindow); +XPLM_API void XPLMTakeKeyboardFocus( + XPLMWindowID inWindow); /* * XPLMHasKeyboardFocus * - * Returns true (1) if the indicated window has keyboard focus. Pass a window - * ID of 0 to see if no plugin window has focus, and all keystrokes will go - * directly to X-Plane. + * Returns true (1) if the indicated window has keyboard focus. Pass a window + * ID of 0 to see if no plugin window has focus, and all keystrokes will go + * directly to X-Plane. * */ -XPLM_API int XPLMHasKeyboardFocus( - XPLMWindowID inWindow); +XPLM_API int XPLMHasKeyboardFocus( + XPLMWindowID inWindow); /* * XPLMBringWindowToFront * - * This routine brings the window to the front of the Z-order for its layer. - * Windows are brought to the front automatically when they are created. - * Beyond that, you should make sure you are front before handling mouse - * clicks. + * This routine brings the window to the front of the Z-order for its layer. + * Windows are brought to the front automatically when they are created. + * Beyond that, you should make sure you are front before handling mouse + * clicks. * - * Note that this only brings your window to the front of its layer - * (XPLMWindowLayer). Thus, if you have a window in the floating window layer - * (xplm_WindowLayerFloatingWindows), but there is a modal window (in layer - * xplm_WindowLayerModal) above you, you would still not be the true frontmost - * window after calling this. (After all, the window layers are strictly - * ordered, and no window in a lower layer can ever be above any window in a - * higher one.) + * Note that this only brings your window to the front of its layer + * (XPLMWindowLayer). Thus, if you have a window in the floating window layer + * (xplm_WindowLayerFloatingWindows), but there is a modal window (in layer + * xplm_WindowLayerModal) above you, you would still not be the true frontmost + * window after calling this. (After all, the window layers are strictly + * ordered, and no window in a lower layer can ever be above any window in a + * higher one.) * */ -XPLM_API void XPLMBringWindowToFront( - XPLMWindowID inWindow); +XPLM_API void XPLMBringWindowToFront( + XPLMWindowID inWindow); /* * XPLMIsWindowInFront * - * This routine returns true if the window you passed in is the frontmost - * visible window in its layer (XPLMWindowLayer). + * This routine returns true if the window you passed in is the frontmost + * visible window in its layer (XPLMWindowLayer). + * + * Thus, if you have a window at the front of the floating window layer + * (xplm_WindowLayerFloatingWindows), this will return true even if there is a + * modal window (in layer xplm_WindowLayerModal) above you. (Not to worry, + * though: in such a case, X-Plane will not pass clicks or keyboard input down + * to your layer until the window above stops "eating" the input.) * - * Thus, if you have a window at the front of the floating window layer - * (xplm_WindowLayerFloatingWindows), this will return true even if there is a - * modal window (in layer xplm_WindowLayerModal) above you. (Not to worry, - * though: in such a case, X-Plane will not pass clicks or keyboard input down - * to your layer until the window above stops "eating" the input.) + * Note that legacy windows are always placed in layer + * xplm_WindowLayerFlightOverlay, while modern-style windows default to + * xplm_WindowLayerFloatingWindows. This means it's perfectly consistent to + * have two different plugin-created windows (one legacy, one modern) *both* + * be in the front (of their different layers!) at the same time. * */ -XPLM_API int XPLMIsWindowInFront( - XPLMWindowID inWindow); +XPLM_API int XPLMIsWindowInFront( + XPLMWindowID inWindow); /*************************************************************************** * KEY SNIFFERS ***************************************************************************/ /* - * Low-level keyboard handlers. Allows for intercepting keystrokes outside the - * normal rules of the user interface. + * Low-level keyboard handlers. Allows for intercepting keystrokes outside the + * normal rules of the user interface. * */ @@ -1281,68 +1318,68 @@ XPLM_API int XPLMIsWindowInFront( /* * XPLMKeySniffer_f * - * This is the prototype for a low level key-sniffing function. Window-based - * UI _should not use this_! The windowing system provides high-level - * mediated keyboard access, via the callbacks you attach to your - * XPLMCreateWindow_t. By comparison, the key sniffer provides low level - * keyboard access. + * This is the prototype for a low level key-sniffing function. Window-based + * UI _should not use this_! The windowing system provides high-level + * mediated keyboard access, via the callbacks you attach to your + * XPLMCreateWindow_t. By comparison, the key sniffer provides low level + * keyboard access. * - * Key sniffers are provided to allow libraries to provide non-windowed user - * interaction. For example, the MUI library uses a key sniffer to do pop-up - * text entry. + * Key sniffers are provided to allow libraries to provide non-windowed user + * interaction. For example, the MUI library uses a key sniffer to do pop-up + * text entry. * - * Return 1 to pass the key on to the next sniffer, the window manager, - * X-Plane, or whomever is down stream. Return 0 to consume the key. + * Return 1 to pass the key on to the next sniffer, the window manager, + * X-Plane, or whomever is down stream. Return 0 to consume the key. * - * Warning: this API declares virtual keys as a signed character; however the - * VKEY #define macros in XPLMDefs.h define the vkeys using unsigned values - * (that is 0x80 instead of -0x80). So you may need to cast the incoming vkey - * to an unsigned char to get correct comparisons in C. + * Warning: this API declares virtual keys as a signed character; however the + * VKEY #define macros in XPLMDefs.h define the vkeys using unsigned values + * (that is 0x80 instead of -0x80). So you may need to cast the incoming vkey + * to an unsigned char to get correct comparisons in C. * */ typedef int (* XPLMKeySniffer_f)( - char inChar, - XPLMKeyFlags inFlags, - char inVirtualKey, - void * inRefcon); + char inChar, + XPLMKeyFlags inFlags, + char inVirtualKey, + void * inRefcon); /* * XPLMRegisterKeySniffer * - * This routine registers a key sniffing callback. You specify whether you - * want to sniff before the window system, or only sniff keys the window - * system does not consume. You should ALMOST ALWAYS sniff non-control keys - * after the window system. When the window system consumes a key, it is - * because the user has "focused" a window. Consuming the key or taking - * action based on the key will produce very weird results. Returns 1 if - * successful. + * This routine registers a key sniffing callback. You specify whether you + * want to sniff before the window system, or only sniff keys the window + * system does not consume. You should ALMOST ALWAYS sniff non-control keys + * after the window system. When the window system consumes a key, it is + * because the user has "focused" a window. Consuming the key or taking + * action based on the key will produce very weird results. Returns + * 1 if successful. * */ -XPLM_API int XPLMRegisterKeySniffer( - XPLMKeySniffer_f inCallback, - int inBeforeWindows, - void * inRefcon); +XPLM_API int XPLMRegisterKeySniffer( + XPLMKeySniffer_f inCallback, + int inBeforeWindows, + void * inRefcon); /* * XPLMUnregisterKeySniffer * - * This routine unregisters a key sniffer. You must unregister a key sniffer - * for every time you register one with the exact same signature. Returns 1 - * if successful. + * This routine unregisters a key sniffer. You must unregister a key sniffer + * for every time you register one with the exact same signature. Returns 1 + * if successful. * */ -XPLM_API int XPLMUnregisterKeySniffer( - XPLMKeySniffer_f inCallback, - int inBeforeWindows, - void * inRefcon); +XPLM_API int XPLMUnregisterKeySniffer( + XPLMKeySniffer_f inCallback, + int inBeforeWindows, + void * inRefcon); /*************************************************************************** * HOT KEYS ***************************************************************************/ /* - * Keystrokes that can be managed by others. These are lower-level than window - * keyboard handlers (i.e., callbacks you attach to your XPLMCreateWindow_t), - * but higher level than key sniffers. + * Keystrokes that can be managed by others. These are lower-level than window + * keyboard handlers (i.e., callbacks you attach to your XPLMCreateWindow_t), + * but higher level than key sniffers. * */ @@ -1350,16 +1387,16 @@ XPLM_API int XPLMUnregisterKeySniffer( /* * XPLMHotKey_f * - * Your hot key callback simply takes a pointer of your choosing. + * Your hot key callback simply takes a pointer of your choosing. * */ typedef void (* XPLMHotKey_f)( - void * inRefcon); + void * inRefcon); /* * XPLMHotKeyID * - * An opaque IDs used to identify a hot key. + * An opaque ID used to identify a hot key. * */ typedef void * XPLMHotKeyID; @@ -1367,72 +1404,71 @@ typedef void * XPLMHotKeyID; /* * XPLMRegisterHotKey * - * This routine registers a hot key. You specify your preferred key stroke - * virtual key/flag combination, a description of what your callback does (so - * other plug-ins can describe the plug-in to the user for remapping) and a - * callback function and opaque pointer to pass in). A new hot key ID is - * returned. During execution, the actual key associated with your hot key - * may change, but you are insulated from this. + * This routine registers a hot key. You specify your preferred key stroke + * virtual key/flag combination, a description of what your callback does (so + * other plug-ins can describe the plug-in to the user for remapping) and a + * callback function and opaque pointer to pass in). A new hot key ID is + * returned. During execution, the actual key associated with your hot key + * may change, but you are insulated from this. * */ -XPLM_API XPLMHotKeyID XPLMRegisterHotKey( - char inVirtualKey, - XPLMKeyFlags inFlags, - const char * inDescription, - XPLMHotKey_f inCallback, - void * inRefcon); +XPLM_API XPLMHotKeyID XPLMRegisterHotKey( + char inVirtualKey, + XPLMKeyFlags inFlags, + const char * inDescription, + XPLMHotKey_f inCallback, + void * inRefcon); /* * XPLMUnregisterHotKey * - * This API unregisters a hot key. You can only unregister your own hot keys. + * Unregisters a hot key. You can only unregister your own hot keys. * */ -XPLM_API void XPLMUnregisterHotKey( - XPLMHotKeyID inHotKey); +XPLM_API void XPLMUnregisterHotKey( + XPLMHotKeyID inHotKey); /* * XPLMCountHotKeys * - * Returns the number of current hot keys. + * Returns the number of current hot keys. * */ -XPLM_API int XPLMCountHotKeys(void); +XPLM_API int XPLMCountHotKeys(void); /* * XPLMGetNthHotKey * - * Returns a hot key by index, for iteration on all hot keys. + * Returns a hot key by index, for iteration on all hot keys. * */ -XPLM_API XPLMHotKeyID XPLMGetNthHotKey( - int inIndex); +XPLM_API XPLMHotKeyID XPLMGetNthHotKey( + int inIndex); /* * XPLMGetHotKeyInfo * - * Returns information about the hot key. Return NULL for any parameter you - * don't want info about. The description should be at least 512 chars long. + * Returns information about the hot key. Return NULL for any parameter you + * don't want info about. The description should be at least 512 chars long. * */ -XPLM_API void XPLMGetHotKeyInfo( - XPLMHotKeyID inHotKey, - char * outVirtualKey, /* Can be NULL */ - XPLMKeyFlags * outFlags, /* Can be NULL */ - char * outDescription, /* Can be NULL */ - XPLMPluginID * outPlugin); /* Can be NULL */ +XPLM_API void XPLMGetHotKeyInfo( + XPLMHotKeyID inHotKey, + char * outVirtualKey, /* Can be NULL */ + XPLMKeyFlags * outFlags, /* Can be NULL */ + char * outDescription, /* Can be NULL */ + XPLMPluginID * outPlugin); /* Can be NULL */ /* * XPLMSetHotKeyCombination * - * XPLMSetHotKeyCombination remaps a hot keys keystrokes. You may remap - * another plugin's keystrokes. + * Remaps a hot key's keystrokes. You may remap another plugin's keystrokes. * */ -XPLM_API void XPLMSetHotKeyCombination( - XPLMHotKeyID inHotKey, - char inVirtualKey, - XPLMKeyFlags inFlags); +XPLM_API void XPLMSetHotKeyCombination( + XPLMHotKeyID inHotKey, + char inVirtualKey, + XPLMKeyFlags inFlags); #ifdef __cplusplus } diff --git a/src/SDK/CHeaders/XPLM/XPLMGraphics.h b/src/SDK/CHeaders/XPLM/XPLMGraphics.h index 3588dcc4..d7aef52f 100755 --- a/src/SDK/CHeaders/XPLM/XPLMGraphics.h +++ b/src/SDK/CHeaders/XPLM/XPLMGraphics.h @@ -2,44 +2,43 @@ #define _XPLMGraphics_h_ /* - * 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 * */ +/*************************************************************************** + * XPLMGraphics + ***************************************************************************/ /* - * Graphics routines for X-Plane and OpenGL. - * - * A few notes on coordinate systems: - * - * X-Plane uses three kinds of coordinates. Global coordinates are specified - * as latitude, longitude and elevation. This coordinate system never changes - * but is not very precise. - * - * OpenGL (or 'local') coordinates are cartesian and shift with the plane. - * They offer more precision and are used for 3-d OpenGL drawing. The X axis - * is aligned east-west with positive X meaning east. The Y axis is aligned - * straight up and down at the point 0,0,0 (but since the earth is round it is - * not truly straight up and down at other points). The Z axis is aligned - * north-south at 0, 0, 0 with positive Z pointing south (but since the earth - * is round it isn't exactly north-south as you move east or west of 0, 0, 0). - * One unit is one meter and the point 0,0,0 is on the surface of the earth - * at sea level for some latitude and longitude picked by the sim such that - * the user's aircraft is reasonably nearby. - * - * Cockpit coordinates are 2d, with the X axis horizontal and the Y axis - * vertical. The point 0,0 is the bottom left and 1024,768 is the upper right - * of the screen. This is true no matter what resolution the user's monitor is - * in; when running in higher resolution, graphics will be scaled. - * - * Use X-Plane's routines to convert between global and local coordinates. Do - * not attempt to do this conversion yourself; the precise 'roundness' of - * X-Plane's physics model may not match your own, and (to make things - * weirder) the user can potentially customize the physics of the current - * planet. + * A few notes on coordinate systems: + * + * X-Plane uses three kinds of coordinates. Global coordinates are specified + * as latitude, longitude and elevation. This coordinate system never changes + * but is not very precise. + * + * OpenGL (or 'local') coordinates are cartesian and shift with the plane. + * They offer more precision and are used for 3-d OpenGL drawing. The X axis + * is aligned east-west with positive X meaning east. The Y axis is aligned + * straight up and down at the point 0,0,0 (but since the earth is round it is + * not truly straight up and down at other points). The Z axis is aligned + * north-south at 0, 0, 0 with positive Z pointing south (but since the earth + * is round it isn't exactly north-south as you move east or west of 0, 0, 0). + * One unit is one meter and the point 0,0,0 is on the surface of the earth at + * sea level for some latitude and longitude picked by the sim such that the + * user's aircraft is reasonably nearby. + * + * 2-d Panel coordinates are 2d, with the X axis horizontal and the Y axis + * vertical. The point 0,0 is the bottom left and 1024,768 is the upper + * right of the screen. This is true no matter what resolution the user's + * monitor is in; when running in higher resolution, graphics will be + * scaled. + * + * Use X-Plane's routines to convert between global and local coordinates. Do + * not attempt to do this conversion yourself; the precise 'roundness' of + * X-Plane's physics model may not match your own, and (to make things + * weirder) the user can potentially customize the physics of the current + * planet. * */ @@ -53,7 +52,7 @@ extern "C" { * X-PLANE GRAPHICS ***************************************************************************/ /* - * These routines allow you to use OpenGL with X-Plane. + * These routines allow you to use OpenGL with X-Plane. * */ @@ -61,20 +60,28 @@ extern "C" { /* * XPLMTextureID * - * XPLM Texture IDs name well-known textures in the sim for you to use. This - * allows you to recycle textures from X-Plane, saving VRAM. + * XPLM Texture IDs name well-known textures in the sim for you to use. This + * allows you to recycle textures from X-Plane, saving VRAM. + * + * *Warning*: do not use these enums. The only remaining use they have is to + * access the legacy compatibility v10 UI texture; if you need this, get it + * via the Widgets library. * */ enum { - /* The bitmap that contains window outlines, button outlines, fonts, etc. */ - xplm_Tex_GeneralInterface = 0 + /* The bitmap that contains window outlines, button outlines, fonts, etc. */ + xplm_Tex_GeneralInterface = 0, - /* The exterior paint for the user's aircraft (daytime). */ - ,xplm_Tex_AircraftPaint = 1 +#if defined(XPLM_DEPRECATED) + /* The exterior paint for the user's aircraft (daytime). */ + xplm_Tex_AircraftPaint = 1, - /* The exterior light map for the user's aircraft. */ - ,xplm_Tex_AircraftLiteMap = 2 +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* The exterior light map for the user's aircraft. */ + xplm_Tex_AircraftLiteMap = 2, +#endif /* XPLM_DEPRECATED */ }; typedef int XPLMTextureID; @@ -82,244 +89,269 @@ typedef int XPLMTextureID; /* * XPLMSetGraphicsState * - * XPLMSetGraphicsState changes OpenGL's graphics state in a number of ways: - * - * inEnableFog - enables or disables fog, equivalent to: glEnable(GL_FOG); - * - * inNumberTexUnits - enables or disables a number of multitexturing units. If - * the number is 0, 2d texturing is disabled entirely, as in - * glDisable(GL_TEXTURE_2D); Otherwise, 2d texturing is enabled, and a - * number of multitexturing units are enabled sequentially, starting with - * unit 0, e.g. glActiveTextureARB(GL_TEXTURE0_ARB); glEnable - * (GL_TEXTURE_2D); - * - * inEnableLighting - enables or disables OpenGL lighting, e.g. - * glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); - * - * inEnableAlphaTesting - enables or disables the alpha test per pixel, e.g. - * glEnable(GL_ALPHA_TEST); - * - * inEnableAlphaBlending - enables or disables alpha blending per pixel, e.g. - * glEnable(GL_BLEND); - * - * inEnableDepthTesting - enables per pixel depth testing, as in - * glEnable(GL_DEPTH_TEST); - * - * inEnableDepthWriting - enables writing back of depth information to the - * depth bufffer, as in glDepthMask(GL_TRUE); - * - * The purpose of this function is to change OpenGL state while keeping - * X-Plane aware of the state changes; this keeps X-Plane from getting - * surprised by OGL state changes, and prevents X-Plane and plug-ins from - * having to set all state before all draws; XPLMSetGraphicsState internally - * skips calls to change state that is already properly enabled. - * - * X-Plane does not have a 'default' OGL state to plug-ins; plug-ins should - * totally set OGL state before drawing. Use XPLMSetGraphicsState instead of - * any of the above OpenGL calls. - * - * WARNING: Any routine that performs drawing (e.g. XPLMDrawString or widget - * code) may change X-Plane's state. Always set state before drawing after - * unknown code has executed. + * XPLMSetGraphicsState changes OpenGL's fixed function pipeline state. You + * are not responsible for restoring any state that is accessed via + * XPLMSetGraphicsState, but you are responsible for not accessing this state + * directly. + * + * - inEnableFog - enables or disables fog, equivalent to: glEnable(GL_FOG); + * - inNumberTexUnits - enables or disables a number of multitexturing units. + * If the number is 0, 2d texturing is disabled entirely, as in + * glDisable(GL_TEXTURE_2D); Otherwise, 2d texturing is enabled, and a + * number of multitexturing units are enabled sequentially, starting with + * unit 0, e.g. glActiveTextureARB(GL_TEXTURE0_ARB); glEnable + * (GL_TEXTURE_2D); + * - inEnableLighting - enables or disables OpenGL lighting, e.g. + * glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); + * - inEnableAlphaTesting - enables or disables the alpha test per pixel, e.g. + * glEnable(GL_ALPHA_TEST); + * - inEnableAlphaBlending - enables or disables alpha blending per pixel, + * e.g. glEnable(GL_BLEND); + * - inEnableDepthTesting - enables per pixel depth testing, as in + * glEnable(GL_DEPTH_TEST); + * - inEnableDepthWriting - enables writing back of depth information to the + * depth bufffer, as in glDepthMask(GL_TRUE); + * + * The purpose of this function is to change OpenGL state while keeping + * X-Plane aware of the state changes; this keeps X-Plane from getting + * surprised by OGL state changes, and prevents X-Plane and plug-ins from + * having to set all state before all draws; XPLMSetGraphicsState internally + * skips calls to change state that is already properly enabled. + * + * X-Plane does not have a 'default' OGL state for plug-ins with respect to + * the above state vector; plug-ins should totally set OGL state using this + * API before drawing. Use XPLMSetGraphicsState instead of any of the above + * OpenGL calls. + * + * WARNING: Any routine that performs drawing (e.g. XPLMDrawString or widget + * code) may change X-Plane's state. Always set state before drawing after + * unknown code has executed. + * + * *Deprecation Warnings*: X-Plane's lighting and fog environemnt is + * significantly more complex than the fixed function pipeline can express; + * do not assume that lighting and fog state is a good approximation for 3-d + * drawing. Prefer to use XPLMInstancing to draw objects. All calls to + * XPLMSetGraphicsState should have no fog or lighting. * */ -XPLM_API void XPLMSetGraphicsState( - int inEnableFog, - int inNumberTexUnits, - int inEnableLighting, - int inEnableAlphaTesting, - int inEnableAlphaBlending, - int inEnableDepthTesting, - int inEnableDepthWriting); +XPLM_API void XPLMSetGraphicsState( + int inEnableFog, + int inNumberTexUnits, + int inEnableLighting, + int inEnableAlphaTesting, + int inEnableAlphaBlending, + int inEnableDepthTesting, + int inEnableDepthWriting); /* * XPLMBindTexture2d * - * XPLMBindTexture2d changes what texture is bound to the 2d texturing target. - * This routine caches the current 2d texture across all texturing units in - * the sim and plug-ins, preventing extraneous binding. For example, consider - * several plug-ins running in series; if they all use the 'general interface' - * bitmap to do UI, calling this function will skip the rebinding of the - * general interface texture on all but the first plug-in, which can provide - * better frame rate son some graphics cards. + * XPLMBindTexture2d changes what texture is bound to the 2d texturing + * target. This routine caches the current 2d texture across all texturing + * units in the sim and plug-ins, preventing extraneous binding. For + * example, consider several plug-ins running in series; if they all use the + * 'general interface' bitmap to do UI, calling this function will skip the + * rebinding of the general interface texture on all but the first plug-in, + * which can provide better frame rate son some graphics cards. * - * inTextureID is the ID of the texture object to bind; inTextureUnit is a - * zero-based texture unit (e.g. 0 for the first one), up to a maximum of 4 - * units. (This number may increase in future versions of X-Plane.) + * inTextureID is the ID of the texture object to bind; inTextureUnit is a + * zero-based texture unit (e.g. 0 for the first one), up to a maximum of 4 + * units. (This number may increase in future versions of X-Plane.) * - * Use this routine instead of glBindTexture(GL_TEXTURE_2D, ....); + * Use this routine instead of glBindTexture(GL_TEXTURE_2D, ....); * */ -XPLM_API void XPLMBindTexture2d( - int inTextureNum, - int inTextureUnit); +XPLM_API void XPLMBindTexture2d( + int inTextureNum, + int inTextureUnit); /* * XPLMGenerateTextureNumbers * - * This routine generates unused texture numbers that a plug-in can use to - * safely bind textures. Use this routine instead of glGenTextures; - * glGenTextures will allocate texture numbers in ranges that X-Plane reserves - * for its own use but does not always use; for example, it might provide an - * ID within the range of textures reserved for terrain...loading a new .env - * file as the plane flies might then cause X-Plane to use this texture ID. - * X-Plane will then overwrite the plug-ins texture. This routine returns - * texture IDs that are out of X-Plane's usage range. + * Use this routine instead of glGenTextures to generate new texture object + * IDs. This routine historically ensured that plugins don't use texure IDs + * that X-Plane is reserving for its own use. * */ -XPLM_API void XPLMGenerateTextureNumbers( - int * outTextureIDs, - int inCount); +XPLM_API void XPLMGenerateTextureNumbers( + int * outTextureIDs, + int inCount); +#if defined(XPLM_DEPRECATED) /* * XPLMGetTexture * - * XPLMGetTexture returns the OpenGL texture enumeration of an X-Plane texture - * based on a generic identifying code. For example, you can get the texture - * for X-Plane's UI bitmaps. This allows you to build new gauges that take - * advantage of X-Plane's textures, for smooth artwork integration and also - * saving texture memory. Note that the texture might not be loaded yet, - * depending on what the plane's panel contains. - * - * OPEN ISSUE: We really need a way to make sure X-Plane loads this texture if - * it isn't around, or at least a way to find out whether it is loaded or not. + * XPLMGetTexture returns the OpenGL texture ID of an X-Plane texture based on + * a generic identifying code. For example, you can get the texture for + * X-Plane's UI bitmaps. * */ -XPLM_API int XPLMGetTexture( - XPLMTextureID inTexture); +XPLM_API int XPLMGetTexture( + XPLMTextureID inTexture); +#endif /* XPLM_DEPRECATED */ /* * XPLMWorldToLocal * - * This routine translates coordinates from latitude, longitude, and altitude - * to local scene coordinates. Latitude and longitude are in decimal degrees, - * and altitude is in meters MSL (mean sea level). The XYZ coordinates are in - * meters in the local OpenGL coordinate system. + * This routine translates coordinates from latitude, longitude, and altitude + * to local scene coordinates. Latitude and longitude are in decimal degrees, + * and altitude is in meters MSL (mean sea level). The XYZ coordinates are in + * meters in the local OpenGL coordinate system. * */ -XPLM_API void XPLMWorldToLocal( - double inLatitude, - double inLongitude, - double inAltitude, - double * outX, - double * outY, - double * outZ); +XPLM_API void XPLMWorldToLocal( + double inLatitude, + double inLongitude, + double inAltitude, + double * outX, + double * outY, + double * outZ); /* * XPLMLocalToWorld * - * This routine translates a local coordinate triplet back into latitude, - * longitude, and altitude. Latitude and longitude are in decimal degrees, - * and altitude is in meters MSL (mean sea level). The XYZ coordinates are in - * meters in the local OpenGL coordinate system. + * This routine translates a local coordinate triplet back into latitude, + * longitude, and altitude. Latitude and longitude are in decimal degrees, + * and altitude is in meters MSL (mean sea level). The XYZ coordinates are in + * meters in the local OpenGL coordinate system. * - * NOTE: world coordinates are less precise than local coordinates; you should - * try to avoid round tripping from local to world and back. + * NOTE: world coordinates are less precise than local coordinates; you should + * try to avoid round tripping from local to world and back. * */ -XPLM_API void XPLMLocalToWorld( - double inX, - double inY, - double inZ, - double * outLatitude, - double * outLongitude, - double * outAltitude); +XPLM_API void XPLMLocalToWorld( + double inX, + double inY, + double inZ, + double * outLatitude, + double * outLongitude, + double * outAltitude); /* * XPLMDrawTranslucentDarkBox * - * This routine draws a translucent dark box, partially obscuring parts of the - * screen but making text easy to read. This is the same graphics primitive - * used by X-Plane to show text files and ATC info. + * This routine draws a translucent dark box, partially obscuring parts of the + * screen but making text easy to read. This is the same graphics primitive + * used by X-Plane to show text files and ATC info. * */ -XPLM_API void XPLMDrawTranslucentDarkBox( - int inLeft, - int inTop, - int inRight, - int inBottom); +XPLM_API void XPLMDrawTranslucentDarkBox( + int inLeft, + int inTop, + int inRight, + int inBottom); /*************************************************************************** * X-PLANE TEXT ***************************************************************************/ -/* - * - * - */ /* * XPLMFontID * - * X-Plane features some fixed-character fonts. Each font may have its own - * metrics. + * X-Plane features some fixed-character fonts. Each font may have its own + * metrics. * - * WARNING: Some of these fonts are no longer supported or may have changed - * geometries. For maximum copmatibility, see the comments below. + * WARNING: Some of these fonts are no longer supported or may have changed + * geometries. For maximum copmatibility, see the comments below. * - * Note: X-Plane 7 supports proportional-spaced fonts. Since no measuring - * routine is available yet, the SDK will normally draw using a fixed-width - * font. You can use a dataref to enable proportional font drawing on XP7 if - * you want to. + * Note: X-Plane 7 supports proportional-spaced fonts. Since no measuring + * routine is available yet, the SDK will normally draw using a fixed-width + * font. You can use a dataref to enable proportional font drawing on XP7 if + * you want to. * */ enum { - /* Mono-spaced font for user interface. Available in all versions of the SDK. */ - xplmFont_Basic = 0 - - /* Deprecated, do not use. */ - ,xplmFont_Menus = 1 - - /* Deprecated, do not use. */ - ,xplmFont_Metal = 2 - - /* Deprecated, do not use. */ - ,xplmFont_Led = 3 - - /* Deprecated, do not use. */ - ,xplmFont_LedWide = 4 - - /* Deprecated, do not use. */ - ,xplmFont_PanelHUD = 5 - - /* Deprecated, do not use. */ - ,xplmFont_PanelEFIS = 6 - - /* Deprecated, do not use. */ - ,xplmFont_PanelGPS = 7 - - /* Deprecated, do not use. */ - ,xplmFont_RadiosGA = 8 - - /* Deprecated, do not use. */ - ,xplmFont_RadiosBC = 9 - - /* Deprecated, do not use. */ - ,xplmFont_RadiosHM = 10 - - /* Deprecated, do not use. */ - ,xplmFont_RadiosGANarrow = 11 - - /* Deprecated, do not use. */ - ,xplmFont_RadiosBCNarrow = 12 - - /* Deprecated, do not use. */ - ,xplmFont_RadiosHMNarrow = 13 - - /* Deprecated, do not use. */ - ,xplmFont_Timer = 14 - - /* Deprecated, do not use. */ - ,xplmFont_FullRound = 15 - - /* Deprecated, do not use. */ - ,xplmFont_SmallRound = 16 - - /* Deprecated, do not use. */ - ,xplmFont_Menus_Localized = 17 - + /* Mono-spaced font for user interface. Available in all versions of the SDK.*/ + xplmFont_Basic = 0, + +#if defined(XPLM_DEPRECATED) + /* Deprecated, do not use. */ + xplmFont_Menus = 1, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated, do not use. */ + xplmFont_Metal = 2, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated, do not use. */ + xplmFont_Led = 3, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated, do not use. */ + xplmFont_LedWide = 4, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated, do not use. */ + xplmFont_PanelHUD = 5, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated, do not use. */ + xplmFont_PanelEFIS = 6, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated, do not use. */ + xplmFont_PanelGPS = 7, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated, do not use. */ + xplmFont_RadiosGA = 8, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated, do not use. */ + xplmFont_RadiosBC = 9, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated, do not use. */ + xplmFont_RadiosHM = 10, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated, do not use. */ + xplmFont_RadiosGANarrow = 11, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated, do not use. */ + xplmFont_RadiosBCNarrow = 12, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated, do not use. */ + xplmFont_RadiosHMNarrow = 13, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated, do not use. */ + xplmFont_Timer = 14, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated, do not use. */ + xplmFont_FullRound = 15, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated, do not use. */ + xplmFont_SmallRound = 16, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + /* Deprecated, do not use. */ + xplmFont_Menus_Localized = 17, + +#endif /* XPLM_DEPRECATED */ #if defined(XPLM200) - /* Proportional UI font. */ - ,xplmFont_Proportional = 18 + /* Proportional UI font. */ + xplmFont_Proportional = 18, #endif /* XPLM200 */ @@ -329,73 +361,73 @@ typedef int XPLMFontID; /* * XPLMDrawString * - * This routine draws a NULL termianted string in a given font. Pass in the - * lower left pixel that the character is to be drawn onto. Also pass the - * character and font ID. This function returns the x offset plus the width of - * all drawn characters. The color to draw in is specified as a pointer to an - * array of three floating point colors, representing RGB intensities from 0.0 - * to 1.0. + * This routine draws a NULL termianted string in a given font. Pass in the + * lower left pixel that the character is to be drawn onto. Also pass the + * character and font ID. This function returns the x offset plus the width of + * all drawn characters. The color to draw in is specified as a pointer to an + * array of three floating point colors, representing RGB intensities from 0.0 + * to 1.0. * */ -XPLM_API void XPLMDrawString( - float * inColorRGB, - int inXOffset, - int inYOffset, - char * inChar, - int * inWordWrapWidth, /* Can be NULL */ - XPLMFontID inFontID); +XPLM_API void XPLMDrawString( + float * inColorRGB, + int inXOffset, + int inYOffset, + char * inChar, + int * inWordWrapWidth, /* Can be NULL */ + XPLMFontID inFontID); /* * XPLMDrawNumber * - * This routine draws a number similar to the digit editing fields in - * PlaneMaker and data output display in X-Plane. Pass in a color, a - * position, a floating point value, and formatting info. Specify how many - * integer and how many decimal digits to show and whether to show a sign, as - * well as a character set. This routine returns the xOffset plus width of the - * string drawn. + * This routine draws a number similar to the digit editing fields in + * PlaneMaker and data output display in X-Plane. Pass in a color, a + * position, a floating point value, and formatting info. Specify how many + * integer and how many decimal digits to show and whether to show a sign, as + * well as a character set. This routine returns the xOffset plus width of the + * string drawn. * */ -XPLM_API void XPLMDrawNumber( - float * inColorRGB, - int inXOffset, - int inYOffset, - double inValue, - int inDigits, - int inDecimals, - int inShowSign, - XPLMFontID inFontID); +XPLM_API void XPLMDrawNumber( + float * inColorRGB, + int inXOffset, + int inYOffset, + double inValue, + int inDigits, + int inDecimals, + int inShowSign, + XPLMFontID inFontID); /* * XPLMGetFontDimensions * - * This routine returns the width and height of a character in a given font. - * It also tells you if the font only supports numeric digits. Pass NULL if - * you don't need a given field. Note that for a proportional font the width - * will be an arbitrary, hopefully average width. + * This routine returns the width and height of a character in a given font. + * It also tells you if the font only supports numeric digits. Pass NULL if + * you don't need a given field. Note that for a proportional font the width + * will be an arbitrary, hopefully average width. * */ -XPLM_API void XPLMGetFontDimensions( - XPLMFontID inFontID, - int * outCharWidth, /* Can be NULL */ - int * outCharHeight, /* Can be NULL */ - int * outDigitsOnly); /* Can be NULL */ +XPLM_API void XPLMGetFontDimensions( + XPLMFontID inFontID, + int * outCharWidth, /* Can be NULL */ + int * outCharHeight, /* Can be NULL */ + int * outDigitsOnly); /* Can be NULL */ #if defined(XPLM200) /* * XPLMMeasureString * - * This routine returns the width in pixels of a string using a given font. - * The string is passed as a pointer plus length (and does not need to be null - * terminated); this is used to allow for measuring substrings. The return - * value is floating point; it is possible that future font drawing may allow - * for fractional pixels. + * This routine returns the width in pixels of a string using a given font. + * The string is passed as a pointer plus length (and does not need to be null + * terminated); this is used to allow for measuring substrings. The return + * value is floating point; it is possible that future font drawing may allow + * for fractional pixels. * */ -XPLM_API float XPLMMeasureString( - XPLMFontID inFontID, - const char * inChar, - int inNumChars); +XPLM_API float XPLMMeasureString( + XPLMFontID inFontID, + const char * inChar, + int inNumChars); #endif /* XPLM200 */ #ifdef __cplusplus diff --git a/src/SDK/CHeaders/XPLM/XPLMInstance.h b/src/SDK/CHeaders/XPLM/XPLMInstance.h index 952b9912..d2a8f2c0 100644 --- a/src/SDK/CHeaders/XPLM/XPLMInstance.h +++ b/src/SDK/CHeaders/XPLM/XPLMInstance.h @@ -2,40 +2,40 @@ #define _XPLMInstance_h_ /* - * 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 * */ +/*************************************************************************** + * XPLMInstance + ***************************************************************************/ /* - * This API provides instanced drawing of X-Plane objects (.obj files). In - * contrast to old drawing APIs, which required you to draw your own objects - * per-frame, the instancing API allows you to simply register an OBJ for - * drawing, then move or manipulate it later (as needed). + * This API provides instanced drawing of X-Plane objects (.obj files). In + * contrast to old drawing APIs, which required you to draw your own objects + * per-frame, the instancing API allows you to simply register an OBJ for + * drawing, then move or manipulate it later (as needed). * - * This provides one tremendous benefit: it keeps all dataref operations for - * your object in one place. Because datarefs are main thread only, allowing - * dataref access anywhere is a serious performance bottleneck for the - * simulator---the whole simulator has to pause and wait for each dataref - * access. This performance penalty will only grow worse as X-Plane moves - * toward an ever more heavily multithreaded engine. + * This provides one tremendous benefit: it keeps all dataref operations for + * your object in one place. Because datarefs are main thread only, allowing + * dataref access anywhere is a serious performance bottleneck for the + * simulator---the whole simulator has to pause and wait for each dataref + * access. This performance penalty will only grow worse as X-Plane moves + * toward an ever more heavily multithreaded engine. * - * The instancing API allows X-Plane to isolate all dataref manipulations for - * all plugin object drawing to one place, potentially providing huge - * performance gains. + * The instancing API allows X-Plane to isolate all dataref manipulations for + * all plugin object drawing to one place, potentially providing huge + * performance gains. * - * Here's how it works: + * Here's how it works: * - * When an instance is created, it provides a list of all datarefs you want to - * manipulate in for the OBJ in the future. This list of datarefs replaces the - * ad-hoc collections of dataref objects previously used by art assets. Then, - * per-frame, you can manipulate the instance by passing in a "block" of - * packed floats representing the current values of the datarefs for your - * instance. (Note that the ordering of this set of packed floats must exactly - * match the ordering of the datarefs when you created your instance.) + * When an instance is created, it provides a list of all datarefs you want to + * manipulate in for the OBJ in the future. This list of datarefs replaces the + * ad-hoc collections of dataref objects previously used by art assets. Then, + * per-frame, you can manipulate the instance by passing in a "block" of + * packed floats representing the current values of the datarefs for your + * instance. (Note that the ordering of this set of packed floats must exactly + * match the ordering of the datarefs when you created your instance.) * */ @@ -50,7 +50,7 @@ extern "C" { * Instance Creation and Destruction ***************************************************************************/ /* - * Registers and unregisters instances. + * Registers and unregisters instances. * */ @@ -58,7 +58,7 @@ extern "C" { /* * XPLMInstanceRef * - * An opaque handle to an instance. + * An opaque handle to an instance. * */ typedef void * XPLMInstanceRef; @@ -66,41 +66,68 @@ typedef void * XPLMInstanceRef; /* * XPLMCreateInstance * - * Registers an instance of an X-Plane object. + * XPLMCreateInstance creates a new instance, managed by your plug-in, and + * returns a handle to the instance. A few important requirements: + * + * * The object passed in must be fully loaded and returned from the XPLM + * before you can create your instance; you cannot pass a null obj ref, nor + * can you change the ref later. + * + * * If you use any custom datarefs in your object, they must be registered + * before the object is loaded. This is true even if their data will be + * provided via the instance dataref list. + * + * * The instance dataref array must be a valid ptr to an array of at least + * one item that is null terminated. That is, if you do not want any + * datarefs, you must passa ptr to an array with a null item. You cannot + * pass null for this. * */ -XPLM_API XPLMInstanceRef XPLMCreateInstance( - XPLMObjectRef obj, - const char ** datarefs); +XPLM_API XPLMInstanceRef XPLMCreateInstance( + XPLMObjectRef obj, + const char ** datarefs); /* * XPLMDestroyInstance * - * Unregisters an instance. + * XPLMDestroyInstance destroys and deallocates your instance; once called, + * you are still responsible for releasing the OBJ ref. + * + * Tip: you can release your OBJ ref after you call XPLMCreateInstance as long + * as you never use it again; the instance will maintain its own reference to + * the OBJ and the object OBJ be deallocated when the instance is destroyed. * */ -XPLM_API void XPLMDestroyInstance( - XPLMInstanceRef instance); +XPLM_API void XPLMDestroyInstance( + XPLMInstanceRef instance); /*************************************************************************** * Instance Manipulation ***************************************************************************/ -/* - * - * - */ /* * XPLMInstanceSetPosition * - * Updates both the position of the instance and all datarefs you registered - * for it. + * Updates both the position of the instance and all datarefs you registered + * for it. Call this from a flight loop callback or UI callback. + * + * __DO NOT__ call XPLMInstanceSetPosition from a drawing callback; the whole + * point of instancing is that you do not need any drawing callbacks. Setting + * instance data from a drawing callback may have undefined consequences, and + * the drawing callback hurts FPS unnecessarily. + * + * The memory pointed to by the data pointer must be large enough to hold one + * float for every data ref you have registered, and must contain valid + * floating point data. + * + * BUG: before X-Plane 11.50, if you have no dataref registered, you must + * still pass a valid pointer for data and not null. * */ -XPLM_API void XPLMInstanceSetPosition( - XPLMInstanceRef instance, - const XPLMDrawInfo_t * new_position, - const float * data); +XPLM_API void XPLMInstanceSetPosition( + XPLMInstanceRef instance, + const XPLMDrawInfo_t * new_position, + const float * data); #ifdef __cplusplus } diff --git a/src/SDK/CHeaders/XPLM/XPLMMap.h b/src/SDK/CHeaders/XPLM/XPLMMap.h index 86cf48b7..18c055ac 100644 --- a/src/SDK/CHeaders/XPLM/XPLMMap.h +++ b/src/SDK/CHeaders/XPLM/XPLMMap.h @@ -2,59 +2,61 @@ #define _XPLMMap_h_ /* - * 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 * */ +/*************************************************************************** + * XPLMMap + ***************************************************************************/ /* - * This API allows you to create new layers within X-Plane maps. Your layers - * can draw arbitrary OpenGL, but they conveniently also have access to - * X-Plane's built-in icon and label drawing functions. - * - * As of X-Plane 11, map drawing happens in three stages: - * - * 1. backgrounds and "fill," 2. icons, and 3. labels. - * - * Thus, all background drawing gets layered beneath all icons, which likewise - * get layered beneath all labels. Within each stage, the map obeys a - * consistent layer ordering, such that "fill" layers (layers that cover a - * large amount of map area, like the terrain and clouds) appear beneath - * "markings" layers (like airport icons). This ensures that layers with fine - * details don't get obscured by layers with larger details. - * - * The XPLM map API reflects both aspects of this draw layering: you can - * register a layer as providing either markings or fill, and X-Plane will - * draw your fill layers beneath your markings layers (regardless of - * registration order). Likewise, you are guaranteed that your layer's icons - * (added from within an icon callback) will go above your layer's OpenGL - * drawing, and your labels will go above your icons. - * - * The XPLM guarantees that all plugin-created fill layers go on top of all - * native X-Plane fill layers, and all plugin-created markings layers go on - * top of all X-Plane markings layers (with the exception of the aircraft - * icons). It also guarantees that the draw order of your own plugin's layers - * will be consistent. But, for layers created by different plugins, the only - * guarantee is that we will draw all of one plugin's layers of each type - * (fill, then markings), then all of the others'; we don't guarantee which - * plugin's fill and markings layers go on top of the other's. - * - * As of X-Plane 11, maps use true cartographic projections for their drawing, - * and different maps may use different projections. For that reason, all - * drawing calls include an opaque handle for the projection you should use to - * do the drawing. Any time you would draw at a particular latitude/longitude, - * you'll need to ask the projection to translate that position into "map - * coordinates." (Note that the projection is guaranteed not to change between - * calls to your prepare-cache hook, so if you cache your map coordinates - * ahead of time, there's no need to re-project them when you actually draw.) - * - * In addition to mapping normal latitude/longitude locations into map - * coordinates, the projection APIs also let you know the current heading for - * north. (Since X-Plane 11 maps can rotate to match the heading of the user's - * aircraft, it's not safe to assume that north is at zero degrees rotation.) + * This API allows you to create new layers within X-Plane maps. Your layers + * can draw arbitrary OpenGL, but they conveniently also have access to + * X-Plane's built-in icon and label drawing functions. + * + * As of X-Plane 11, map drawing happens in three stages: + * + * 1. backgrounds and "fill," + * 2. icons, and + * 3. labels. + * + * Thus, all background drawing gets layered beneath all icons, which likewise + * get layered beneath all labels. Within each stage, the map obeys a + * consistent layer ordering, such that "fill" layers (layers that cover a + * large amount of map area, like the terrain and clouds) appear beneath + * "markings" layers (like airport icons). This ensures that layers with fine + * details don't get obscured by layers with larger details. + * + * The XPLM map API reflects both aspects of this draw layering: you can + * register a layer as providing either markings or fill, and X-Plane will + * draw your fill layers beneath your markings layers (regardless of + * registration order). Likewise, you are guaranteed that your layer's icons + * (added from within an icon callback) will go above your layer's OpenGL + * drawing, and your labels will go above your icons. + * + * The XPLM guarantees that all plugin-created fill layers go on top of all + * native X-Plane fill layers, and all plugin-created markings layers go on + * top of all X-Plane markings layers (with the exception of the aircraft + * icons). It also guarantees that the draw order of your own plugin's layers + * will be consistent. But, for layers created by different plugins, the only + * guarantee is that we will draw all of one plugin's layers of each type + * (fill, then markings), then all of the others'; we don't guarantee which + * plugin's fill and markings layers go on top of the other's. + * + * As of X-Plane 11, maps use true cartographic projections for their drawing, + * and different maps may use different projections. For that reason, all + * drawing calls include an opaque handle for the projection you should use to + * do the drawing. Any time you would draw at a particular latitude/longitude, + * you'll need to ask the projection to translate that position into "map + * coordinates." (Note that the projection is guaranteed not to change between + * calls to your prepare-cache hook, so if you cache your map coordinates + * ahead of time, there's no need to re-project them when you actually draw.) + * + * In addition to mapping normal latitude/longitude locations into map + * coordinates, the projection APIs also let you know the current heading for + * north. (Since X-Plane 11 maps can rotate to match the heading of the user's + * aircraft, it's not safe to assume that north is at zero degrees rotation.) * */ @@ -69,11 +71,11 @@ extern "C" { * DRAWING CALLBACKS ***************************************************************************/ /* - * When you create a new map layer (using XPLMCreateMapLayer), you can provide - * any or all of these callbacks. They allow you to insert your own OpenGL - * drawing, text labels, and icons into the X-Plane map at the appropriate - * places, allowing your layer to behave as similarly to X-Plane's built-in - * layers as possible. + * When you create a new map layer (using XPLMCreateMapLayer), you can provide + * any or all of these callbacks. They allow you to insert your own OpenGL + * drawing, text labels, and icons into the X-Plane map at the appropriate + * places, allowing your layer to behave as similarly to X-Plane's built-in + * layers as possible. * */ @@ -81,8 +83,8 @@ extern "C" { /* * XPLMMapLayerID * - * This is an opaque handle for a plugin-created map layer. Pass it to the map - * drawing APIs from an appropriate callback to draw in the layer you created. + * This is an opaque handle for a plugin-created map layer. Pass it to the map + * drawing APIs from an appropriate callback to draw in the layer you created. * */ typedef void * XPLMMapLayerID; @@ -90,8 +92,8 @@ typedef void * XPLMMapLayerID; /* * XPLMMapProjectionID * - * This is an opaque handle for a map projection. Pass it to the projection - * APIs to translate between map coordinates and latitude/longitudes. + * This is an opaque handle for a map projection. Pass it to the projection + * APIs to translate between map coordinates and latitude/longitudes. * */ typedef void * XPLMMapProjectionID; @@ -99,20 +101,20 @@ typedef void * XPLMMapProjectionID; /* * XPLMMapStyle * - * Indicates the visual style being drawn by the map. In X-Plane, the user can - * choose between a number of map types, and different map types may have use - * a different visual representation for the same elements (for instance, the - * visual style of the terrain layer changes drastically between the VFR and - * IFR layers), or certain layers may be disabled entirely in some map types - * (e.g., localizers are only visible in the IFR low-enroute style). + * Indicates the visual style being drawn by the map. In X-Plane, the user can + * choose between a number of map types, and different map types may have use + * a different visual representation for the same elements (for instance, the + * visual style of the terrain layer changes drastically between the VFR and + * IFR layers), or certain layers may be disabled entirely in some map types + * (e.g., localizers are only visible in the IFR low-enroute style). * */ enum { - xplm_MapStyle_VFR_Sectional = 0 + xplm_MapStyle_VFR_Sectional = 0, - ,xplm_MapStyle_IFR_LowEnroute = 1 + xplm_MapStyle_IFR_LowEnroute = 1, - ,xplm_MapStyle_IFR_HighEnroute = 2 + xplm_MapStyle_IFR_HighEnroute = 2, }; @@ -121,78 +123,78 @@ typedef int XPLMMapStyle; /* * XPLMMapDrawingCallback_f * - * This is the OpenGL map drawing callback for plugin-created map layers. You - * can perform arbitrary OpenGL drawing from this callback, with one - * exception: changes to the Z-buffer are not permitted, and will result in - * map drawing errors. + * This is the OpenGL map drawing callback for plugin-created map layers. You + * can perform arbitrary OpenGL drawing from this callback, with one + * exception: changes to the Z-buffer are not permitted, and will result in + * map drawing errors. * - * All drawing done from within this callback appears beneath all built-in - * X-Plane icons and labels, but above the built-in "fill" layers (layers - * providing major details, like terrain and water). Note, however, that the - * relative ordering between the drawing callbacks of different plugins is not - * guaranteed. + * All drawing done from within this callback appears beneath all built-in + * X-Plane icons and labels, but above the built-in "fill" layers (layers + * providing major details, like terrain and water). Note, however, that the + * relative ordering between the drawing callbacks of different plugins is not + * guaranteed. * */ typedef void (* XPLMMapDrawingCallback_f)( - XPLMMapLayerID inLayer, - const float * inMapBoundsLeftTopRightBottom, - float zoomRatio, - float mapUnitsPerUserInterfaceUnit, - XPLMMapStyle mapStyle, - XPLMMapProjectionID projection, - void * inRefcon); + XPLMMapLayerID inLayer, + const float * inMapBoundsLeftTopRightBottom, + float zoomRatio, + float mapUnitsPerUserInterfaceUnit, + XPLMMapStyle mapStyle, + XPLMMapProjectionID projection, + void * inRefcon); /* * XPLMMapIconDrawingCallback_f * - * This is the icon drawing callback that enables plugin-created map layers to - * draw icons using X-Plane's built-in icon drawing functionality. You can - * request an arbitrary number of PNG icons to be drawn via - * XPLMDrawMapIconFromSheet() from within this callback, but you may not - * perform any OpenGL drawing here. - * - * Icons enqueued by this function will appear above all OpenGL drawing - * (performed by your optional XPLMMapDrawingCallback_f), and above all - * built-in X-Plane map icons of the same layer type ("fill" or "markings," as - * determined by the XPLMMapLayerType in your XPLMCreateMapLayer_t). Note, - * however, that the relative ordering between the drawing callbacks of - * different plugins is not guaranteed. + * This is the icon drawing callback that enables plugin-created map layers to + * draw icons using X-Plane's built-in icon drawing functionality. You can + * request an arbitrary number of PNG icons to be drawn via + * XPLMDrawMapIconFromSheet() from within this callback, but you may not + * perform any OpenGL drawing here. + * + * Icons enqueued by this function will appear above all OpenGL drawing + * (performed by your optional XPLMMapDrawingCallback_f), and above all + * built-in X-Plane map icons of the same layer type ("fill" or "markings," as + * determined by the XPLMMapLayerType in your XPLMCreateMapLayer_t). Note, + * however, that the relative ordering between the drawing callbacks of + * different plugins is not guaranteed. * */ typedef void (* XPLMMapIconDrawingCallback_f)( - XPLMMapLayerID inLayer, - const float * inMapBoundsLeftTopRightBottom, - float zoomRatio, - float mapUnitsPerUserInterfaceUnit, - XPLMMapStyle mapStyle, - XPLMMapProjectionID projection, - void * inRefcon); + XPLMMapLayerID inLayer, + const float * inMapBoundsLeftTopRightBottom, + float zoomRatio, + float mapUnitsPerUserInterfaceUnit, + XPLMMapStyle mapStyle, + XPLMMapProjectionID projection, + void * inRefcon); /* * XPLMMapLabelDrawingCallback_f * - * This is the label drawing callback that enables plugin-created map layers - * to draw text labels using X-Plane's built-in labeling functionality. You - * can request an arbitrary number of text labels to be drawn via - * XPLMDrawMapLabel() from within this callback, but you may not perform any - * OpenGL drawing here. - * - * Labels enqueued by this function will appear above all OpenGL drawing - * (performed by your optional XPLMMapDrawingCallback_f), and above all - * built-in map icons and labels of the same layer type ("fill" or "markings," - * as determined by the XPLMMapLayerType in your XPLMCreateMapLayer_t). Note, - * however, that the relative ordering between the drawing callbacks of - * different plugins is not guaranteed. + * This is the label drawing callback that enables plugin-created map layers + * to draw text labels using X-Plane's built-in labeling functionality. You + * can request an arbitrary number of text labels to be drawn via + * XPLMDrawMapLabel() from within this callback, but you may not perform any + * OpenGL drawing here. + * + * Labels enqueued by this function will appear above all OpenGL drawing + * (performed by your optional XPLMMapDrawingCallback_f), and above all + * built-in map icons and labels of the same layer type ("fill" or "markings," + * as determined by the XPLMMapLayerType in your XPLMCreateMapLayer_t). Note, + * however, that the relative ordering between the drawing callbacks of + * different plugins is not guaranteed. * */ typedef void (* XPLMMapLabelDrawingCallback_f)( - XPLMMapLayerID inLayer, - const float * inMapBoundsLeftTopRightBottom, - float zoomRatio, - float mapUnitsPerUserInterfaceUnit, - XPLMMapStyle mapStyle, - XPLMMapProjectionID projection, - void * inRefcon); + XPLMMapLayerID inLayer, + const float * inMapBoundsLeftTopRightBottom, + float zoomRatio, + float mapUnitsPerUserInterfaceUnit, + XPLMMapStyle mapStyle, + XPLMMapProjectionID projection, + void * inRefcon); #endif /* XPLM300 */ #if defined(XPLM300) @@ -200,10 +202,10 @@ typedef void (* XPLMMapLabelDrawingCallback_f)( * LAYER MANAGEMENT CALLBACKS ***************************************************************************/ /* - * These are various "bookkeeping" callbacks that your map layer can receive - * (if you provide the callback in your XPLMCreateMapLayer_t). They allow you - * to manage the lifecycle of your layer, as well as cache any - * computationally-intensive preparation you might need for drawing. + * These are various "bookkeeping" callbacks that your map layer can receive + * (if you provide the callback in your XPLMCreateMapLayer_t). They allow you + * to manage the lifecycle of your layer, as well as cache any + * computationally-intensive preparation you might need for drawing. * */ @@ -211,42 +213,42 @@ typedef void (* XPLMMapLabelDrawingCallback_f)( /* * XPLMMapPrepareCacheCallback_f * - * A callback used to allow you to cache whatever information your layer needs - * to draw in the current map area. + * A callback used to allow you to cache whatever information your layer needs + * to draw in the current map area. * - * This is called each time the map's total bounds change. This is typically - * triggered by new DSFs being loaded, such that X-Plane discards old, - * now-distant DSFs and pulls in new ones. At that point, the available bounds - * of the map also change to match the new DSF area. + * This is called each time the map's total bounds change. This is typically + * triggered by new DSFs being loaded, such that X-Plane discards old, + * now-distant DSFs and pulls in new ones. At that point, the available bounds + * of the map also change to match the new DSF area. * - * By caching just the information you need to draw in this area, your future - * draw calls can be made faster, since you'll be able to simply "splat" your - * precomputed information each frame. + * By caching just the information you need to draw in this area, your future + * draw calls can be made faster, since you'll be able to simply "splat" your + * precomputed information each frame. * - * We guarantee that the map projection will not change between successive - * prepare cache calls, nor will any draw call give you bounds outside these - * total map bounds. So, if you cache the projected map coordinates of all the - * items you might want to draw in the total map area, you can be guaranteed - * that no draw call will be asked to do any new work. + * We guarantee that the map projection will not change between successive + * prepare cache calls, nor will any draw call give you bounds outside these + * total map bounds. So, if you cache the projected map coordinates of all the + * items you might want to draw in the total map area, you can be guaranteed + * that no draw call will be asked to do any new work. * */ typedef void (* XPLMMapPrepareCacheCallback_f)( - XPLMMapLayerID inLayer, - const float * inTotalMapBoundsLeftTopRightBottom, - XPLMMapProjectionID projection, - void * inRefcon); + XPLMMapLayerID inLayer, + const float * inTotalMapBoundsLeftTopRightBottom, + XPLMMapProjectionID projection, + void * inRefcon); /* * XPLMMapWillBeDeletedCallback_f * - * Called just before your map layer gets deleted. Because SDK-created map - * layers have the same lifetime as the X-Plane map that contains them, if the - * map gets unloaded from memory, your layer will too. + * Called just before your map layer gets deleted. Because SDK-created map + * layers have the same lifetime as the X-Plane map that contains them, if the + * map gets unloaded from memory, your layer will too. * */ typedef void (* XPLMMapWillBeDeletedCallback_f)( - XPLMMapLayerID inLayer, - void * inRefcon); + XPLMMapLayerID inLayer, + void * inRefcon); #endif /* XPLM300 */ #if defined(XPLM300) @@ -254,16 +256,16 @@ typedef void (* XPLMMapWillBeDeletedCallback_f)( * MAP LAYER CREATION AND DESTRUCTION ***************************************************************************/ /* - * Enables the creation of new map layers. Layers are created for a particular - * instance of the X-Plane map. For instance, if you want your layer to appear - * in both the normal map interface and the Instructor Operator Station (IOS), - * you would need two separate calls to XPLMCreateMapLayer(), with two - * different values for your XPLMCreateMapLayer_t::layer_name. - * - * Your layer's lifetime will be determined by the lifetime of the map it is - * created in. If the map is destroyed (on the X-Plane side), your layer will - * be too, and you'll receive a callback to your - * XPLMMapWillBeDeletedCallback_f. + * Enables the creation of new map layers. Layers are created for a particular + * instance of the X-Plane map. For instance, if you want your layer to appear + * in both the normal map interface and the Instructor Operator Station (IOS), + * you would need two separate calls to XPLMCreateMapLayer(), with two + * different values for your XPLMCreateMapLayer_t::layer_name. + * + * Your layer's lifetime will be determined by the lifetime of the map it is + * created in. If the map is destroyed (on the X-Plane side), your layer will + * be too, and you'll receive a callback to your + * XPLMMapWillBeDeletedCallback_f. * */ @@ -271,152 +273,152 @@ typedef void (* XPLMMapWillBeDeletedCallback_f)( /* * XPLMMapLayerType * - * Indicates the type of map layer you are creating. Fill layers will always - * be drawn beneath markings layers. + * Indicates the type of map layer you are creating. Fill layers will always + * be drawn beneath markings layers. * */ enum { - /* A layer that draws "fill" graphics, like weather patterns, terrain, etc. * - * Fill layers frequently cover a large portion of the visible map area. */ - xplm_MapLayer_Fill = 0 + /* A layer that draws "fill" graphics, like weather patterns, terrain, etc. * + * Fill layers frequently cover a large portion of the visible map area. */ + xplm_MapLayer_Fill = 0, - /* A layer that provides markings for particular map features, like NAVAIDs, * - * airports, etc. Even dense markings layers cover a small portion of the * - * total map area. */ - ,xplm_MapLayer_Markings = 1 + /* A layer that provides markings for particular map features, like NAVAIDs, * + * airports, etc. Even dense markings layers cover a small portion of the * + * total map area. */ + xplm_MapLayer_Markings = 1, }; typedef int XPLMMapLayerType; -/* Globally unique identifier for X-Plane's Map window, used as the * - * mapToCreateLayerIn parameter in XPLMCreateMapLayer_t */ +/* Globally unique identifier for X-Plane's Map window, used as the * + * mapToCreateLayerIn parameter in XPLMCreateMapLayer_t */ #define XPLM_MAP_USER_INTERFACE "XPLM_MAP_USER_INTERFACE" -/* Globally unique identifier for X-Plane's Instructor Operator Station * - * window, used as the mapToCreateLayerIn parameter in XPLMCreateMapLayer_t */ +/* Globally unique identifier for X-Plane's Instructor Operator Station * + * window, used as the mapToCreateLayerIn parameter in XPLMCreateMapLayer_t */ #define XPLM_MAP_IOS "XPLM_MAP_IOS" /* * XPLMCreateMapLayer_t * - * This structure defines all of the parameters used to create a map layer - * using XPLMCreateMapLayer. The structure will be expanded in future SDK APIs - * to include more features. Always set the structSize member to the size of - * your struct in bytes! + * This structure defines all of the parameters used to create a map layer + * using XPLMCreateMapLayer. The structure will be expanded in future SDK APIs + * to include more features. Always set the structSize member to the size of + * your struct in bytes! * - * Each layer must be associated with exactly one map instance in X-Plane. - * That map, and that map alone, will call your callbacks. Likewise, when that - * map is deleted, your layer will be as well. + * Each layer must be associated with exactly one map instance in X-Plane. + * That map, and that map alone, will call your callbacks. Likewise, when that + * map is deleted, your layer will be as well. * */ typedef struct { - /* Used to inform XPLMCreateMapLayer() of the SDK version you compiled * - * against; should always be set to sizeof(XPLMCreateMapLayer_t) */ + /* Used to inform XPLMCreateMapLayer() of the SDK version you compiled * + * against; should always be set to sizeof(XPLMCreateMapLayer_t) */ int structSize; - /* Globally unique string identifying the map you want this layer to appear * - * in. As of XPLM300, this is limited to one of XPLM_MAP_USER_INTERFACE or * - * XPLM_MAP_IOS */ + /* Globally unique string identifying the map you want this layer to appear * + * in. As of XPLM300, this is limited to one of XPLM_MAP_USER_INTERFACE or * + * XPLM_MAP_IOS */ const char * mapToCreateLayerIn; - /* The type of layer you are creating, used to determine draw order (all * - * plugin-created markings layers are drawn above all plugin-created fill * - * layers) */ + /* The type of layer you are creating, used to determine draw order (all * + * plugin-created markings layers are drawn above all plugin-created fill * + * layers) */ XPLMMapLayerType layerType; - /* Optional callback to inform you this layer is being deleted (due to its * - * owning map being destroyed) */ + /* Optional callback to inform you this layer is being deleted (due to its * + * owning map being destroyed) */ XPLMMapWillBeDeletedCallback_f willBeDeletedCallback; - /* Optional callback you want to use to prepare your draw cache when the map * - * bounds change (set to NULL if you don't want this callback) */ + /* Optional callback you want to use to prepare your draw cache when the map * + * bounds change (set to NULL if you don't want this callback) */ XPLMMapPrepareCacheCallback_f prepCacheCallback; - /* Optional callback you want to use for arbitrary OpenGL drawing, which goes * - * beneath all icons in the map's layering system (set to NULL if you don't * - * want this callback) */ + /* Optional callback you want to use for arbitrary OpenGL drawing, which goes * + * beneath all icons in the map's layering system (set to NULL if you don't * + * want this callback) */ XPLMMapDrawingCallback_f drawCallback; - /* Optional callback you want to use for drawing icons, which go above all * - * built-in X-Plane icons (except the aircraft) in the map's layering system * - * (set to NULL if you don't want this callback) */ + /* Optional callback you want to use for drawing icons, which go above all * + * built-in X-Plane icons (except the aircraft) in the map's layering system * + * (set to NULL if you don't want this callback) */ XPLMMapIconDrawingCallback_f iconCallback; - /* Optional callback you want to use for drawing map labels, which go above * - * all built-in X-Plane icons and labels (except those of aircraft) in the * - * map's layering system (set to NULL if you don't want this callback) */ + /* Optional callback you want to use for drawing map labels, which go above * + * all built-in X-Plane icons and labels (except those of aircraft) in the * + * map's layering system (set to NULL if you don't want this callback) */ XPLMMapLabelDrawingCallback_f labelCallback; - /* True if you want a checkbox to be created in the map UI to toggle this * - * layer on and off; false if the layer should simply always be enabled */ + /* True if you want a checkbox to be created in the map UI to toggle this * + * layer on and off; false if the layer should simply always be enabled */ int showUiToggle; - /* Short label to use for this layer in the user interface */ + /* Short label to use for this layer in the user interface */ const char * layerName; - /* A reference to arbitrary data that will be passed to your callbacks */ + /* A reference to arbitrary data that will be passed to your callbacks */ void * refcon; } XPLMCreateMapLayer_t; /* * XPLMCreateMapLayer * - * This routine creates a new map layer. You pass in an XPLMCreateMapLayer_t - * structure with all of the fields set in. You must set the structSize of - * the structure to the size of the actual structure you used. + * This routine creates a new map layer. You pass in an XPLMCreateMapLayer_t + * structure with all of the fields set in. You must set the structSize of + * the structure to the size of the actual structure you used. * - * Returns NULL if the layer creation failed. This happens most frequently - * because the map you specified in your - * XPLMCreateMapLayer_t::mapToCreateLayerIn field doesn't exist (that is, if - * XPLMMapExists() returns 0 for the specified map). You can use - * XPLMRegisterMapCreationHook() to get a notification each time a new map is - * opened in X-Plane, at which time you can create layers in it. + * Returns NULL if the layer creation failed. This happens most frequently + * because the map you specified in your + * XPLMCreateMapLayer_t::mapToCreateLayerIn field doesn't exist (that is, if + * XPLMMapExists() returns 0 for the specified map). You can use + * XPLMRegisterMapCreationHook() to get a notification each time a new map is + * opened in X-Plane, at which time you can create layers in it. * */ -XPLM_API XPLMMapLayerID XPLMCreateMapLayer( - XPLMCreateMapLayer_t * inParams); +XPLM_API XPLMMapLayerID XPLMCreateMapLayer( + XPLMCreateMapLayer_t * inParams); /* * XPLMDestroyMapLayer * - * Destroys a map layer you created (calling your - * XPLMMapWillBeDeletedCallback_f if applicable). Returns true if a deletion - * took place. + * Destroys a map layer you created (calling your + * XPLMMapWillBeDeletedCallback_f if applicable). Returns true if a deletion + * took place. * */ -XPLM_API int XPLMDestroyMapLayer( - XPLMMapLayerID inLayer); +XPLM_API int XPLMDestroyMapLayer( + XPLMMapLayerID inLayer); /* * XPLMMapCreatedCallback_f * - * A callback to notify your plugin that a new map has been created in - * X-Plane. This is the best time to add a custom map layer using - * XPLMCreateMapLayer(). + * A callback to notify your plugin that a new map has been created in + * X-Plane. This is the best time to add a custom map layer using + * XPLMCreateMapLayer(). * - * No OpenGL drawing is permitted within this callback. + * No OpenGL drawing is permitted within this callback. * */ typedef void (* XPLMMapCreatedCallback_f)( - const char * mapIdentifier, - void * refcon); + const char * mapIdentifier, + void * refcon); /* * XPLMRegisterMapCreationHook * - * Registers your callback to receive a notification each time a new map is - * constructed in X-Plane. This callback is the best time to add your custom - * map layer using XPLMCreateMapLayer(). + * Registers your callback to receive a notification each time a new map is + * constructed in X-Plane. This callback is the best time to add your custom + * map layer using XPLMCreateMapLayer(). * - * Note that you will not be notified about any maps that already exist---you - * can use XPLMMapExists() to check for maps that were created previously. + * Note that you will not be notified about any maps that already exist---you + * can use XPLMMapExists() to check for maps that were created previously. * */ -XPLM_API void XPLMRegisterMapCreationHook( - XPLMMapCreatedCallback_f callback, - void * refcon); +XPLM_API void XPLMRegisterMapCreationHook( + XPLMMapCreatedCallback_f callback, + void * refcon); /* * XPLMMapExists * - * Returns 1 if the map with the specified identifier already exists in - * X-Plane. In that case, you can safely call XPLMCreateMapLayer() specifying - * that your layer should be added to that map. + * Returns 1 if the map with the specified identifier already exists in + * X-Plane. In that case, you can safely call XPLMCreateMapLayer() specifying + * that your layer should be added to that map. * */ -XPLM_API int XPLMMapExists( - const char * mapIdentifier); +XPLM_API int XPLMMapExists( + const char * mapIdentifier); #endif /* XPLM300 */ #if defined(XPLM300) @@ -424,18 +426,18 @@ XPLM_API int XPLMMapExists( * MAP DRAWING ***************************************************************************/ /* - * These APIs are only valid from within a map drawing callback (one of - * XPLMIconDrawingCallback_t or XPLMMapLabelDrawingCallback_f). Your drawing - * callbacks are registered when you create a new map layer as part of your - * XPLMCreateMapLayer_t. The functions here hook into X-Plane's built-in map - * drawing functionality for icons and labels, so that you get a consistent - * style with the rest of the X-Plane map. - * - * Note that the X-Plane 11 map introduces a strict ordering: layers of type - * xplm_MapLayer_Fill get drawn beneath all xplm_MapLayer_Markings layers. - * Likewise, all OpenGL drawing (performed in your layer's - * XPLMMapDrawingCallback_f) will appear beneath any icons and labels you - * draw. + * These APIs are only valid from within a map drawing callback (one of + * XPLMIconDrawingCallback_t or XPLMMapLabelDrawingCallback_f). Your drawing + * callbacks are registered when you create a new map layer as part of your + * XPLMCreateMapLayer_t. The functions here hook into X-Plane's built-in map + * drawing functionality for icons and labels, so that you get a consistent + * style with the rest of the X-Plane map. + * + * Note that the X-Plane 11 map introduces a strict ordering: layers of type + * xplm_MapLayer_Fill get drawn beneath all xplm_MapLayer_Markings layers. + * Likewise, all OpenGL drawing (performed in your layer's + * XPLMMapDrawingCallback_f) will appear beneath any icons and labels you + * draw. * */ @@ -443,20 +445,20 @@ XPLM_API int XPLMMapExists( /* * XPLMMapOrientation * - * Indicates whether a map element should be match its rotation to the map - * itself, or to the user interface. For instance, the map itself may be - * rotated such that "up" matches the user's aircraft, but you may want to - * draw a text label such that it is always rotated zero degrees relative to - * the user's perspective. In that case, you would have it draw with UI - * orientation. + * Indicates whether a map element should be match its rotation to the map + * itself, or to the user interface. For instance, the map itself may be + * rotated such that "up" matches the user's aircraft, but you may want to + * draw a text label such that it is always rotated zero degrees relative to + * the user's perspective. In that case, you would have it draw with UI + * orientation. * */ enum { - /* Orient such that a 0 degree rotation matches the map's north */ - xplm_MapOrientation_Map = 0 + /* Orient such that a 0 degree rotation matches the map's north */ + xplm_MapOrientation_Map = 0, - /* Orient such that a 0 degree rotation is "up" relative to the user interface */ - ,xplm_MapOrientation_UI = 1 + /* Orient such that a 0 degree rotation is "up" relative to the user interface*/ + xplm_MapOrientation_UI = 1, }; @@ -465,65 +467,65 @@ typedef int XPLMMapOrientation; /* * XPLMDrawMapIconFromSheet * - * Enables plugin-created map layers to draw PNG icons using X-Plane's - * built-in icon drawing functionality. Only valid from within an - * XPLMIconDrawingCallback_t (but you can request an arbitrary number of icons - * to be drawn from within your callback). - * - * X-Plane will automatically manage the memory for your texture so that it - * only has to be loaded from disk once as long as you continue drawing it - * per-frame. (When you stop drawing it, the memory may purged in a "garbage - * collection" pass, require a load from disk in the future.) - * - * Instead of having X-Plane draw a full PNG, this method allows you to use UV - * coordinates to request a portion of the image to be drawn. This allows you - * to use a single texture load (of an icon sheet, for example) to draw many - * icons. Doing so is much more efficient than drawing a dozen different small - * PNGs. - * - * The UV coordinates used here treat the texture you load as being comprised - * of a number of identically sized "cells." You specify the width and height - * in cells (ds and dt, respectively), as well as the coordinates within the - * cell grid for the sub-image you'd like to draw. - * - * Note that you can use different ds and dt values in subsequent calls with - * the same texture sheet. This enables you to use icons of different sizes in - * the same sheet if you arrange them properly in the PNG. - * - * This function is only valid from within an XPLMIconDrawingCallback_t (but - * you can request an arbitrary number of icons to be drawn from within your - * callback). + * Enables plugin-created map layers to draw PNG icons using X-Plane's + * built-in icon drawing functionality. Only valid from within an + * XPLMIconDrawingCallback_t (but you can request an arbitrary number of icons + * to be drawn from within your callback). + * + * X-Plane will automatically manage the memory for your texture so that it + * only has to be loaded from disk once as long as you continue drawing it + * per-frame. (When you stop drawing it, the memory may purged in a "garbage + * collection" pass, require a load from disk in the future.) + * + * Instead of having X-Plane draw a full PNG, this method allows you to use UV + * coordinates to request a portion of the image to be drawn. This allows you + * to use a single texture load (of an icon sheet, for example) to draw many + * icons. Doing so is much more efficient than drawing a dozen different small + * PNGs. + * + * The UV coordinates used here treat the texture you load as being comprised + * of a number of identically sized "cells." You specify the width and height + * in cells (ds and dt, respectively), as well as the coordinates within the + * cell grid for the sub-image you'd like to draw. + * + * Note that you can use different ds and dt values in subsequent calls with + * the same texture sheet. This enables you to use icons of different sizes in + * the same sheet if you arrange them properly in the PNG. + * + * This function is only valid from within an XPLMIconDrawingCallback_t (but + * you can request an arbitrary number of icons to be drawn from within your + * callback). * */ -XPLM_API void XPLMDrawMapIconFromSheet( - XPLMMapLayerID layer, - const char * inPngPath, - int s, - int t, - int ds, - int dt, - float mapX, - float mapY, - XPLMMapOrientation orientation, - float rotationDegrees, - float mapWidth); +XPLM_API void XPLMDrawMapIconFromSheet( + XPLMMapLayerID layer, + const char * inPngPath, + int s, + int t, + int ds, + int dt, + float mapX, + float mapY, + XPLMMapOrientation orientation, + float rotationDegrees, + float mapWidth); /* * XPLMDrawMapLabel * - * Enables plugin-created map layers to draw text labels using X-Plane's - * built-in labeling functionality. Only valid from within an - * XPLMMapLabelDrawingCallback_f (but you can request an arbitrary number of - * text labels to be drawn from within your callback). + * Enables plugin-created map layers to draw text labels using X-Plane's + * built-in labeling functionality. Only valid from within an + * XPLMMapLabelDrawingCallback_f (but you can request an arbitrary number of + * text labels to be drawn from within your callback). * */ -XPLM_API void XPLMDrawMapLabel( - XPLMMapLayerID layer, - const char * inText, - float mapX, - float mapY, - XPLMMapOrientation orientation, - float rotationDegrees); +XPLM_API void XPLMDrawMapLabel( + XPLMMapLayerID layer, + const char * inText, + float mapX, + float mapY, + XPLMMapOrientation orientation, + float rotationDegrees); #endif /* XPLM300 */ #if defined(XPLM300) @@ -531,18 +533,18 @@ XPLM_API void XPLMDrawMapLabel( * MAP PROJECTIONS ***************************************************************************/ /* - * As of X-Plane 11, the map draws using true cartographic projections, and - * different maps may use different projections. Thus, to draw at a particular - * latitude and longitude, you must first transform your real-world - * coordinates into map coordinates. - * - * The map projection is also responsible for giving you the current scale of - * the map. That is, the projection can tell you how many map units correspond - * to 1 meter at a given point. - * - * Finally, the map projection can give you the current rotation of the map. - * Since X-Plane 11 maps can rotate to match the heading of the aircraft, the - * map's rotation can potentially change every frame. + * As of X-Plane 11, the map draws using true cartographic projections, and + * different maps may use different projections. Thus, to draw at a particular + * latitude and longitude, you must first transform your real-world + * coordinates into map coordinates. + * + * The map projection is also responsible for giving you the current scale of + * the map. That is, the projection can tell you how many map units correspond + * to 1 meter at a given point. + * + * Finally, the map projection can give you the current rotation of the map. + * Since X-Plane 11 maps can rotate to match the heading of the aircraft, the + * map's rotation can potentially change every frame. * */ @@ -550,76 +552,76 @@ XPLM_API void XPLMDrawMapLabel( /* * XPLMMapProject * - * Projects a latitude/longitude into map coordinates. This is the inverse of - * XPLMMapUnproject(). + * Projects a latitude/longitude into map coordinates. This is the inverse of + * XPLMMapUnproject(). * - * Only valid from within a map layer callback (one of - * XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, - * XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) + * Only valid from within a map layer callback (one of + * XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, + * XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) * */ -XPLM_API void XPLMMapProject( - XPLMMapProjectionID projection, - double latitude, - double longitude, - float * outX, - float * outY); +XPLM_API void XPLMMapProject( + XPLMMapProjectionID projection, + double latitude, + double longitude, + float * outX, + float * outY); /* * XPLMMapUnproject * - * Transforms map coordinates back into a latitude and longitude. This is the - * inverse of XPLMMapProject(). + * Transforms map coordinates back into a latitude and longitude. This is the + * inverse of XPLMMapProject(). * - * Only valid from within a map layer callback (one of - * XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, - * XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) + * Only valid from within a map layer callback (one of + * XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, + * XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) * */ -XPLM_API void XPLMMapUnproject( - XPLMMapProjectionID projection, - float mapX, - float mapY, - double * outLatitude, - double * outLongitude); +XPLM_API void XPLMMapUnproject( + XPLMMapProjectionID projection, + float mapX, + float mapY, + double * outLatitude, + double * outLongitude); /* * XPLMMapScaleMeter * - * Returns the number of map units that correspond to a distance of one meter - * at a given set of map coordinates. + * Returns the number of map units that correspond to a distance of one meter + * at a given set of map coordinates. * - * Only valid from within a map layer callback (one of - * XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, - * XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) + * Only valid from within a map layer callback (one of + * XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, + * XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) * */ -XPLM_API float XPLMMapScaleMeter( - XPLMMapProjectionID projection, - float mapX, - float mapY); +XPLM_API float XPLMMapScaleMeter( + XPLMMapProjectionID projection, + float mapX, + float mapY); /* * XPLMMapGetNorthHeading * - * Returns the heading (in degrees clockwise from "up") that corresponds to - * north at a given point on the map. In other words, if your runway has a - * true heading of 360, you would use "north" as the Cartesian angle at which - * to draw the runway on the map. (You would add the result of - * XPLMMapGetNorthHeading() to your true heading to get the map angle.) + * Returns the heading (in degrees clockwise from "up") that corresponds to + * north at a given point on the map. In other words, if your runway has a + * true heading of 360, you would use "north" as the Cartesian angle at which + * to draw the runway on the map. (You would add the result of + * XPLMMapGetNorthHeading() to your true heading to get the map angle.) * - * This is necessary becuase X-Plane's map can be rotated to match your - * aircraft's orientation; north is not always "up." + * This is necessary becuase X-Plane's map can be rotated to match your + * aircraft's orientation; north is not always "up." * - * Only valid from within a map layer callback (one of - * XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, - * XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) + * Only valid from within a map layer callback (one of + * XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, + * XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) * */ -XPLM_API float XPLMMapGetNorthHeading( - XPLMMapProjectionID projection, - float mapX, - float mapY); +XPLM_API float XPLMMapGetNorthHeading( + XPLMMapProjectionID projection, + float mapX, + float mapY); #endif /* XPLM300 */ #ifdef __cplusplus diff --git a/src/SDK/CHeaders/XPLM/XPLMMenus.h b/src/SDK/CHeaders/XPLM/XPLMMenus.h index 935abb58..f5802ab8 100755 --- a/src/SDK/CHeaders/XPLM/XPLMMenus.h +++ b/src/SDK/CHeaders/XPLM/XPLMMenus.h @@ -2,38 +2,41 @@ #define _XPLMMenus_h_ /* - * 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 * */ +/*************************************************************************** + * XPLMMenus + ***************************************************************************/ /* - * Theory of Operation + * Plug-ins can create menus in the menu bar of X-Plane. This is done by + * creating a menu and then creating items. Menus are referred to by an + * opaque ID. Items are referred to by (zero-based) index number. * - * Plug-ins can create menus in the menu bar of X-Plane. This is done by - * creating a menu and then creating items. Menus are referred to by an - * opaque ID. Items are referred to by (zero-based) index number. + * Menus are "sandboxed" between plugins---no plugin can access the menus of + * any other plugin. Furthermore, all menu indices are relative to your + * plugin's menus only; if your plugin creates two sub-menus in the Plugins + * menu at different times, it doesn't matter how many other plugins also + * create sub-menus of Plugins in the intervening time: your sub-menus will be + * given menu indices 0 and 1. (The SDK does some work in the back-end to + * filter out menus that are irrelevant to your plugin in order to deliver + * this consistency for each plugin.) * - * Menus are "sandboxed" between plugins---no plugin can access the menus of - * any other plugin. Furthermore, all menu indices are relative to your - * plugin's menus only; if your plugin creates two sub-menus in the Plugins - * menu at different times, it doesn't matter how many other plugins also - * create sub-menus of Plugins in the intervening time: your sub-menus will be - * given menu indices 0 and 1. (The SDK does some work in the back-end to - * filter out menus that are irrelevant to your plugin in order to deliver - * this consistency for each plugin.) + * When you create a menu item, you specify how we should handle clicks on + * that menu item. You can either have the XPLM trigger a callback (the + * XPLMMenuHandler_f associated with the menu that contains the item), or you + * can simply have a command be triggered (with no associated call to your + * menu handler). The advantage of the latter method is that X-Plane will + * display any keyboard shortcuts associated with the command. (In contrast, + * there are no keyboard shortcuts associated with menu handler callbacks with + * specific parameters.) * - * When you create a menu item, you specify how we should handle clicks on - * that menu item. You can either have the XPLM trigger a callback (the - * XPLMMenuHandler_f associated with the menu that contains the item), or you - * can simply have a command be triggered (with no associated call to your - * menu handler). The advantage of the latter method is that X-Plane will - * display any keyboard shortcuts associated with the command. (In contrast, - * there are no keyboard shortcuts associated with menu handler callbacks with - * specific parameters.) + * Menu text in X-Plane is UTF8; X-Plane's character set covers latin, greek + * and cyrillic characters, Katakana, as well as some Japanese symbols. Some + * APIs have a inDeprecatedAndIgnored parameter that used to select a + * character set; since X-Plane 9 all localization is done via UTF-8 only. * */ @@ -47,28 +50,24 @@ extern "C" { /*************************************************************************** * XPLM MENUS ***************************************************************************/ -/* - * - * - */ /* * XPLMMenuCheck * - * These enumerations define the various 'check' states for an X-Plane menu. - * 'checking' in X-Plane actually appears as a light which may or may not be - * lit. So there are three possible states. + * These enumerations define the various 'check' states for an X-Plane menu. + * 'checking' in X-Plane actually appears as a light which may or may not be + * lit. So there are three possible states. * */ enum { - /* there is no symbol to the left of the menu item. */ - xplm_Menu_NoCheck = 0 + /* there is no symbol to the left of the menu item. */ + xplm_Menu_NoCheck = 0, - /* the menu has a mark next to it that is unmarked (not lit). */ - ,xplm_Menu_Unchecked = 1 + /* the menu has a mark next to it that is unmarked (not lit). */ + xplm_Menu_Unchecked = 1, - /* the menu has a mark next to it that is checked (lit). */ - ,xplm_Menu_Checked = 2 + /* the menu has a mark next to it that is checked (lit). */ + xplm_Menu_Checked = 2, }; @@ -77,7 +76,7 @@ typedef int XPLMMenuCheck; /* * XPLMMenuID * - * This is a unique ID for each menu you create. + * This is a unique ID for each menu you create. * */ typedef void * XPLMMenuID; @@ -85,203 +84,203 @@ typedef void * XPLMMenuID; /* * XPLMMenuHandler_f * - * A menu handler function takes two reference pointers, one for the menu - * (specified when the menu was created) and one for the item (specified when - * the item was created). + * A menu handler function takes two reference pointers, one for the menu + * (specified when the menu was created) and one for the item (specified when + * the item was created). * */ typedef void (* XPLMMenuHandler_f)( - void * inMenuRef, - void * inItemRef); + void * inMenuRef, + void * inItemRef); /* * XPLMFindPluginsMenu * - * This function returns the ID of the plug-ins menu, which is created for you - * at startup. + * This function returns the ID of the plug-ins menu, which is created for you + * at startup. * */ -XPLM_API XPLMMenuID XPLMFindPluginsMenu(void); +XPLM_API XPLMMenuID XPLMFindPluginsMenu(void); #if defined(XPLM300) /* * XPLMFindAircraftMenu * - * This function returns the ID of the menu for the currently-loaded aircraft, - * used for showing aircraft-specific commands. + * This function returns the ID of the menu for the currently-loaded aircraft, + * used for showing aircraft-specific commands. * - * The aircraft menu is created by X-Plane at startup, but it remains hidden - * until it is populated via XPLMAppendMenuItem() or - * XPLMAppendMenuItemWithCommand(). + * The aircraft menu is created by X-Plane at startup, but it remains hidden + * until it is populated via XPLMAppendMenuItem() or + * XPLMAppendMenuItemWithCommand(). * - * Only plugins loaded with the user's current aircraft are allowed to access - * the aircraft menu. For all other plugins, this will return NULL, and any - * attempts to add menu items to it will fail. + * Only plugins loaded with the user's current aircraft are allowed to access + * the aircraft menu. For all other plugins, this will return NULL, and any + * attempts to add menu items to it will fail. * */ -XPLM_API XPLMMenuID XPLMFindAircraftMenu(void); +XPLM_API XPLMMenuID XPLMFindAircraftMenu(void); #endif /* XPLM300 */ /* * XPLMCreateMenu * - * This function creates a new menu and returns its ID. It returns NULL if - * the menu cannot be created. Pass in a parent menu ID and an item index to - * create a submenu, or NULL for the parent menu to put the menu in the menu - * bar. The menu's name is only used if the menu is in the menubar. You also - * pass a handler function and a menu reference value. Pass NULL for the - * handler if you do not need callbacks from the menu (for example, if it only - * contains submenus). + * This function creates a new menu and returns its ID. It returns NULL if + * the menu cannot be created. Pass in a parent menu ID and an item index to + * create a submenu, or NULL for the parent menu to put the menu in the menu + * bar. The menu's name is only used if the menu is in the menubar. You also + * pass a handler function and a menu reference value. Pass NULL for the + * handler if you do not need callbacks from the menu (for example, if it only + * contains submenus). * - * Important: you must pass a valid, non-empty menu title even if the menu is - * a submenu where the title is not visible. + * Important: you must pass a valid, non-empty menu title even if the menu is + * a submenu where the title is not visible. * */ -XPLM_API XPLMMenuID XPLMCreateMenu( - const char * inName, - XPLMMenuID inParentMenu, - int inParentItem, - XPLMMenuHandler_f inHandler, - void * inMenuRef); +XPLM_API XPLMMenuID XPLMCreateMenu( + const char * inName, + XPLMMenuID inParentMenu, + int inParentItem, + XPLMMenuHandler_f inHandler, + void * inMenuRef); /* * XPLMDestroyMenu * - * This function destroys a menu that you have created. Use this to remove a - * submenu if necessary. (Normally this function will not be necessary.) + * This function destroys a menu that you have created. Use this to remove a + * submenu if necessary. (Normally this function will not be necessary.) * */ -XPLM_API void XPLMDestroyMenu( - XPLMMenuID inMenuID); +XPLM_API void XPLMDestroyMenu( + XPLMMenuID inMenuID); /* * XPLMClearAllMenuItems * - * This function removes all menu items from a menu, allowing you to rebuild - * it. Use this function if you need to change the number of items on a menu. + * This function removes all menu items from a menu, allowing you to rebuild + * it. Use this function if you need to change the number of items on a menu. * */ -XPLM_API void XPLMClearAllMenuItems( - XPLMMenuID inMenuID); +XPLM_API void XPLMClearAllMenuItems( + XPLMMenuID inMenuID); /* * XPLMAppendMenuItem * - * This routine appends a new menu item to the bottom of a menu and returns - * its index. Pass in the menu to add the item to, the items name, and a void - * * ref for this item. + * This routine appends a new menu item to the bottom of a menu and returns + * its index. Pass in the menu to add the item to, the items name, and a void + * * ref for this item. * - * Returns a negative index if the append failed (due to an invalid parent - * menu argument). + * Returns a negative index if the append failed (due to an invalid parent + * menu argument). * - * Note that all menu indices returned are relative to your plugin's menus - * only; if your plugin creates two sub-menus in the Plugins menu at different - * times, it doesn't matter how many other plugins also create sub-menus of - * Plugins in the intervening time: your sub-menus will be given menu indices - * 0 and 1. (The SDK does some work in the back-end to filter out menus that - * are irrelevant to your plugin in order to deliver this consistency for each - * plugin.) + * Note that all menu indices returned are relative to your plugin's menus + * only; if your plugin creates two sub-menus in the Plugins menu at different + * times, it doesn't matter how many other plugins also create sub-menus of + * Plugins in the intervening time: your sub-menus will be given menu indices + * 0 and 1. (The SDK does some work in the back-end to filter out menus that + * are irrelevant to your plugin in order to deliver this consistency for each + * plugin.) * */ -XPLM_API int XPLMAppendMenuItem( - XPLMMenuID inMenu, - const char * inItemName, - void * inItemRef, - int inDeprecatedAndIgnored); +XPLM_API int XPLMAppendMenuItem( + XPLMMenuID inMenu, + const char * inItemName, + void * inItemRef, + int inDeprecatedAndIgnored); #if defined(XPLM300) /* * XPLMAppendMenuItemWithCommand * - * Like XPLMAppendMenuItem(), but instead of the new menu item triggering the - * XPLMMenuHandler_f of the containiner menu, it will simply execute the - * command you pass in. Using a command for your menu item allows the user to - * bind a keyboard shortcut to the command and see that shortcut represented - * in the menu. + * Like XPLMAppendMenuItem(), but instead of the new menu item triggering the + * XPLMMenuHandler_f of the containiner menu, it will simply execute the + * command you pass in. Using a command for your menu item allows the user to + * bind a keyboard shortcut to the command and see that shortcut represented + * in the menu. * - * Returns a negative index if the append failed (due to an invalid parent - * menu argument). + * Returns a negative index if the append failed (due to an invalid parent + * menu argument). * - * Like XPLMAppendMenuItem(), all menu indices are relative to your plugin's - * menus only. + * Like XPLMAppendMenuItem(), all menu indices are relative to your plugin's + * menus only. * */ -XPLM_API int XPLMAppendMenuItemWithCommand( - XPLMMenuID inMenu, - const char * inItemName, - XPLMCommandRef inCommandToExecute); +XPLM_API int XPLMAppendMenuItemWithCommand( + XPLMMenuID inMenu, + const char * inItemName, + XPLMCommandRef inCommandToExecute); #endif /* XPLM300 */ /* * XPLMAppendMenuSeparator * - * This routine adds a separator to the end of a menu. + * This routine adds a separator to the end of a menu. * - * Returns a negative index if the append failed (due to an invalid parent - * menu argument). + * Returns a negative index if the append failed (due to an invalid parent + * menu argument). * */ -XPLM_API void XPLMAppendMenuSeparator( - XPLMMenuID inMenu); +XPLM_API void XPLMAppendMenuSeparator( + XPLMMenuID inMenu); /* * XPLMSetMenuItemName * - * This routine changes the name of an existing menu item. Pass in the menu - * ID and the index of the menu item. + * This routine changes the name of an existing menu item. Pass in the menu + * ID and the index of the menu item. * */ -XPLM_API void XPLMSetMenuItemName( - XPLMMenuID inMenu, - int inIndex, - const char * inItemName, - int inForceEnglish); +XPLM_API void XPLMSetMenuItemName( + XPLMMenuID inMenu, + int inIndex, + const char * inItemName, + int inDeprecatedAndIgnored); /* * XPLMCheckMenuItem * - * Set whether a menu item is checked. Pass in the menu ID and item index. + * Set whether a menu item is checked. Pass in the menu ID and item index. * */ -XPLM_API void XPLMCheckMenuItem( - XPLMMenuID inMenu, - int index, - XPLMMenuCheck inCheck); +XPLM_API void XPLMCheckMenuItem( + XPLMMenuID inMenu, + int index, + XPLMMenuCheck inCheck); /* * XPLMCheckMenuItemState * - * This routine returns whether a menu item is checked or not. A menu item's - * check mark may be on or off, or a menu may not have an icon at all. + * This routine returns whether a menu item is checked or not. A menu item's + * check mark may be on or off, or a menu may not have an icon at all. * */ -XPLM_API void XPLMCheckMenuItemState( - XPLMMenuID inMenu, - int index, - XPLMMenuCheck * outCheck); +XPLM_API void XPLMCheckMenuItemState( + XPLMMenuID inMenu, + int index, + XPLMMenuCheck * outCheck); /* * XPLMEnableMenuItem * - * Sets whether this menu item is enabled. Items start out enabled. + * Sets whether this menu item is enabled. Items start out enabled. * */ -XPLM_API void XPLMEnableMenuItem( - XPLMMenuID inMenu, - int index, - int enabled); +XPLM_API void XPLMEnableMenuItem( + XPLMMenuID inMenu, + int index, + int enabled); #if defined(XPLM210) /* * XPLMRemoveMenuItem * - * Removes one item from a menu. Note that all menu items below are moved up - * one; your plugin must track the change in index numbers. + * Removes one item from a menu. Note that all menu items below are moved up + * one; your plugin must track the change in index numbers. * */ -XPLM_API void XPLMRemoveMenuItem( - XPLMMenuID inMenu, - int inIndex); +XPLM_API void XPLMRemoveMenuItem( + XPLMMenuID inMenu, + int inIndex); #endif /* XPLM210 */ #ifdef __cplusplus diff --git a/src/SDK/CHeaders/XPLM/XPLMNavigation.h b/src/SDK/CHeaders/XPLM/XPLMNavigation.h index 90af7972..716caf04 100755 --- a/src/SDK/CHeaders/XPLM/XPLMNavigation.h +++ b/src/SDK/CHeaders/XPLM/XPLMNavigation.h @@ -2,25 +2,23 @@ #define _XPLMNavigation_h_ /* - * 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 * */ +/*************************************************************************** + * XPLMNavigation + ***************************************************************************/ /* - * XPLMNavigation - THEORY OF OPERATION - * - * The XPLM Navigation APIs give you some access to the navigation databases - * inside X-Plane. X-Plane stores all navigation information in RAM, so by - * using these APIs you can gain access to most information without having to - * go to disk or parse the files yourself. - * - * You can also use this API to program the FMS. You must use the navigation - * APIs to find the nav-aids you want to program into the FMS, since the FMS - * is powered internally by X-Plane's navigation database. + * The XPLM Navigation APIs give you some access to the navigation databases + * inside X-Plane. X-Plane stores all navigation information in RAM, so by + * using these APIs you can gain access to most information without having to + * go to disk or parse the files yourself. + * + * You can also use this API to program the FMS. You must use the navigation + * APIs to find the nav-aids you want to program into the FMS, since the FMS + * is powered internally by X-Plane's navigation database. * */ @@ -33,50 +31,46 @@ extern "C" { /*************************************************************************** * NAVIGATION DATABASE ACCESS ***************************************************************************/ -/* - * - * - */ /* * XPLMNavType * - * These enumerations define the different types of navaids. They are each - * defined with a separate bit so that they may be bit-wise added together to - * form sets of nav-aid types. + * These enumerations define the different types of navaids. They are each + * defined with a separate bit so that they may be bit-wise added together to + * form sets of nav-aid types. * - * NOTE: xplm_Nav_LatLon is a specific lat-lon coordinate entered into the - * FMS. It will not exist in the database, and cannot be programmed into the - * FMS. Querying the FMS for navaids will return it. Use - * XPLMSetFMSEntryLatLon to set a lat/lon waypoint. + * NOTE: xplm_Nav_LatLon is a specific lat-lon coordinate entered into the + * FMS. It will not exist in the database, and cannot be programmed into the + * FMS. Querying the FMS for navaids will return it. Use + * XPLMSetFMSEntryLatLon to set a lat/lon waypoint. * */ enum { - xplm_Nav_Unknown = 0 + xplm_Nav_Unknown = 0, - ,xplm_Nav_Airport = 1 + xplm_Nav_Airport = 1, - ,xplm_Nav_NDB = 2 + xplm_Nav_NDB = 2, - ,xplm_Nav_VOR = 4 + xplm_Nav_VOR = 4, - ,xplm_Nav_ILS = 8 + xplm_Nav_ILS = 8, - ,xplm_Nav_Localizer = 16 + xplm_Nav_Localizer = 16, - ,xplm_Nav_GlideSlope = 32 + xplm_Nav_GlideSlope = 32, - ,xplm_Nav_OuterMarker = 64 + xplm_Nav_OuterMarker = 64, - ,xplm_Nav_MiddleMarker = 128 + xplm_Nav_MiddleMarker = 128, - ,xplm_Nav_InnerMarker = 256 + xplm_Nav_InnerMarker = 256, - ,xplm_Nav_Fix = 512 + xplm_Nav_Fix = 512, - ,xplm_Nav_DME = 1024 + xplm_Nav_DME = 1024, - ,xplm_Nav_LatLon = 2048 + xplm_Nav_LatLon = 2048, }; @@ -85,15 +79,15 @@ typedef int XPLMNavType; /* * XPLMNavRef * - * XPLMNavRef is an iterator into the navigation database. The navigation - * database is essentially an array, but it is not necessarily densely - * populated. The only assumption you can safely make is that like-typed - * nav-aids are grouped together. + * XPLMNavRef is an iterator into the navigation database. The navigation + * database is essentially an array, but it is not necessarily densely + * populated. The only assumption you can safely make is that like-typed + * nav-aids are grouped together. * - * Use XPLMNavRef to refer to a nav-aid. + * Use XPLMNavRef to refer to a nav-aid. * - * XPLM_NAV_NOT_FOUND is returned by functions that return an XPLMNavRef when - * the iterator must be invalid. + * XPLM_NAV_NOT_FOUND is returned by functions that return an XPLMNavRef when + * the iterator must be invalid. * */ typedef int XPLMNavRef; @@ -103,138 +97,126 @@ typedef int XPLMNavRef; /* * XPLMGetFirstNavAid * - * This returns the very first navaid in the database. Use this to traverse - * the entire database. Returns XPLM_NAV_NOT_FOUND if the nav database is - * empty. + * This returns the very first navaid in the database. Use this to traverse + * the entire database. Returns XPLM_NAV_NOT_FOUND if the nav database is + * empty. * */ -XPLM_API XPLMNavRef XPLMGetFirstNavAid(void); +XPLM_API XPLMNavRef XPLMGetFirstNavAid(void); /* * XPLMGetNextNavAid * - * Given a nav aid ref, this routine returns the next navaid. It returns - * XPLM_NAV_NOT_FOUND if the nav aid passed in was invalid or if the navaid - * passed in was the last one in the database. Use this routine to iterate - * across all like-typed navaids or the entire database. - * - * WARNING: due to a bug in the SDK, when fix loading is disabled in the - * rendering settings screen, calling this routine with the last airport - * returns a bogus nav aid. Using this nav aid can crash X-Plane. + * Given a valid nav aid ref, this routine returns the next navaid. It + * returns XPLM_NAV_NOT_FOUND if the nav aid passed in was invalid or if the + * navaid passed in was the last one in the database. Use this routine to + * iterate across all like-typed navaids or the entire database. * */ -XPLM_API XPLMNavRef XPLMGetNextNavAid( - XPLMNavRef inNavAidRef); +XPLM_API XPLMNavRef XPLMGetNextNavAid( + XPLMNavRef inNavAidRef); /* * XPLMFindFirstNavAidOfType * - * This routine returns the ref of the first navaid of the given type in the - * database or XPLM_NAV_NOT_FOUND if there are no navaids of that type in the - * database. You must pass exactly one nav aid type to this routine. - * - * WARNING: due to a bug in the SDK, when fix loading is disabled in the - * rendering settings screen, calling this routine with fixes returns a bogus - * nav aid. Using this nav aid can crash X-Plane. + * This routine returns the ref of the first navaid of the given type in the + * database or XPLM_NAV_NOT_FOUND if there are no navaids of that type in the + * database. You must pass exactly one nav aid type to this routine. * */ -XPLM_API XPLMNavRef XPLMFindFirstNavAidOfType( - XPLMNavType inType); +XPLM_API XPLMNavRef XPLMFindFirstNavAidOfType( + XPLMNavType inType); /* * XPLMFindLastNavAidOfType * - * This routine returns the ref of the last navaid of the given type in the - * database or XPLM_NAV_NOT_FOUND if there are no navaids of that type in the - * database. You must pass exactly one nav aid type to this routine. - * - * WARNING: due to a bug in the SDK, when fix loading is disabled in the - * rendering settings screen, calling this routine with fixes returns a bogus - * nav aid. Using this nav aid can crash X-Plane. + * This routine returns the ref of the last navaid of the given type in the + * database or XPLM_NAV_NOT_FOUND if there are no navaids of that type in the + * database. You must pass exactly one nav aid type to this routine. * */ -XPLM_API XPLMNavRef XPLMFindLastNavAidOfType( - XPLMNavType inType); +XPLM_API XPLMNavRef XPLMFindLastNavAidOfType( + XPLMNavType inType); /* * XPLMFindNavAid * - * This routine provides a number of searching capabilities for the nav - * database. XPLMFindNavAid will search through every nav aid whose type is - * within inType (multiple types may be added together) and return any - * nav-aids found based on the following rules: - * - * If inLat and inLon are not NULL, the navaid nearest to that lat/lon will be - * returned, otherwise the last navaid found will be returned. + * This routine provides a number of searching capabilities for the nav + * database. XPLMFindNavAid will search through every nav aid whose type is + * within inType (multiple types may be added together) and return any + * nav-aids found based on the following rules: * - * If inFrequency is not NULL, then any navaids considered must match this - * frequency. Note that this will screen out radio beacons that do not have - * frequency data published (like inner markers) but not fixes and airports. + * * If inLat and inLon are not NULL, the navaid nearest to that lat/lon will + * be returned, otherwise the last navaid found will be returned. * - * If inNameFragment is not NULL, only navaids that contain the fragment in - * their name will be returned. + * * If inFrequency is not NULL, then any navaids considered must match this + * frequency. Note that this will screen out radio beacons that do not have + * frequency data published (like inner markers) but not fixes and airports. * - * If inIDFragment is not NULL, only navaids that contain the fragment in - * their IDs will be returned. + * * If inNameFragment is not NULL, only navaids that contain the fragment in + * their name will be returned. * - * This routine provides a simple way to do a number of useful searches: + * * If inIDFragment is not NULL, only navaids that contain the fragment in + * their IDs will be returned. * - * Find the nearest navaid on this frequency. Find the nearest airport. Find - * the VOR whose ID is "KBOS". Find the nearest airport whose name contains - * "Chicago". + * This routine provides a simple way to do a number of useful searches: + * * Find the nearest navaid on this frequency. + * * Find the nearest airport. + * * Find the VOR whose ID is "KBOS". + * * Find the nearest airport whose name contains "Chicago". * */ -XPLM_API XPLMNavRef XPLMFindNavAid( - const char * inNameFragment, /* Can be NULL */ - const char * inIDFragment, /* Can be NULL */ - float * inLat, /* Can be NULL */ - float * inLon, /* Can be NULL */ - int * inFrequency, /* Can be NULL */ - XPLMNavType inType); +XPLM_API XPLMNavRef XPLMFindNavAid( + const char * inNameFragment, /* Can be NULL */ + const char * inIDFragment, /* Can be NULL */ + float * inLat, /* Can be NULL */ + float * inLon, /* Can be NULL */ + int * inFrequency, /* Can be NULL */ + XPLMNavType inType); /* * XPLMGetNavAidInfo * - * This routine returns information about a navaid. Any non-null field is - * filled out with information if it is available. + * This routine returns information about a navaid. Any non-null field is + * filled out with information if it is available. * - * Frequencies are in the nav.dat convention as described in the X-Plane nav - * database FAQ: NDB frequencies are exact, all others are multiplied by 100. + * Frequencies are in the nav.dat convention as described in the X-Plane nav + * database FAQ: NDB frequencies are exact, all others are multiplied by 100. * - * The buffer for IDs should be at least 6 chars and the buffer for names - * should be at least 41 chars, but since these values are likely to go up, I - * recommend passing at least 32 chars for IDs and 256 chars for names when - * possible. + * The buffer for IDs should be at least 6 chars and the buffer for names + * should be at least 41 chars, but since these values are likely to go up, I + * recommend passing at least 32 chars for IDs and 256 chars for names when + * possible. * - * The outReg parameter tells if the navaid is within the local "region" of - * loaded DSFs. (This information may not be particularly useful to plugins.) - * The parameter is a single byte value 1 for true or 0 for false, not a C - * string. + * The outReg parameter tells if the navaid is within the local "region" of + * loaded DSFs. (This information may not be particularly useful to plugins.) + * The parameter is a single byte value 1 for true or 0 for false, not a C + * string. * */ -XPLM_API void XPLMGetNavAidInfo( - XPLMNavRef inRef, - XPLMNavType * outType, /* Can be NULL */ - float * outLatitude, /* Can be NULL */ - float * outLongitude, /* Can be NULL */ - float * outHeight, /* Can be NULL */ - int * outFrequency, /* Can be NULL */ - float * outHeading, /* Can be NULL */ - char * outID, /* Can be NULL */ - char * outName, /* Can be NULL */ - char * outReg); /* Can be NULL */ +XPLM_API void XPLMGetNavAidInfo( + XPLMNavRef inRef, + XPLMNavType * outType, /* Can be NULL */ + float * outLatitude, /* Can be NULL */ + float * outLongitude, /* Can be NULL */ + float * outHeight, /* Can be NULL */ + int * outFrequency, /* Can be NULL */ + float * outHeading, /* Can be NULL */ + char * outID, /* Can be NULL */ + char * outName, /* Can be NULL */ + char * outReg); /* Can be NULL */ /*************************************************************************** * FLIGHT MANAGEMENT COMPUTER ***************************************************************************/ /* - * Note: the FMS works based on an array of entries. Indices into the array - * are zero-based. Each entry is a nav-aid plus an altitude. The FMS tracks - * the currently displayed entry and the entry that it is flying to. + * Note: the FMS works based on an array of entries. Indices into the array + * are zero-based. Each entry is a nav-aid plus an altitude. The FMS tracks + * the currently displayed entry and the entry that it is flying to. * - * The FMS must be programmed with contiguous entries, so clearing an entry at - * the end shortens the effective flight plan. There is a max of 100 - * waypoints in the flight plan. + * The FMS must be programmed with contiguous entries, so clearing an entry at + * the end shortens the effective flight plan. There is a max of 100 + * waypoints in the flight plan. * */ @@ -242,127 +224,136 @@ XPLM_API void XPLMGetNavAidInfo( /* * XPLMCountFMSEntries * - * This routine returns the number of entries in the FMS. + * This routine returns the number of entries in the FMS. * */ -XPLM_API int XPLMCountFMSEntries(void); +XPLM_API int XPLMCountFMSEntries(void); /* * XPLMGetDisplayedFMSEntry * - * This routine returns the index of the entry the pilot is viewing. + * This routine returns the index of the entry the pilot is viewing. * */ -XPLM_API int XPLMGetDisplayedFMSEntry(void); +XPLM_API int XPLMGetDisplayedFMSEntry(void); /* * XPLMGetDestinationFMSEntry * - * This routine returns the index of the entry the FMS is flying to. + * This routine returns the index of the entry the FMS is flying to. * */ -XPLM_API int XPLMGetDestinationFMSEntry(void); +XPLM_API int XPLMGetDestinationFMSEntry(void); /* * XPLMSetDisplayedFMSEntry * - * This routine changes which entry the FMS is showing to the index specified. - * * + * This routine changes which entry the FMS is showing to the index specified. + * */ -XPLM_API void XPLMSetDisplayedFMSEntry( - int inIndex); +XPLM_API void XPLMSetDisplayedFMSEntry( + int inIndex); /* * XPLMSetDestinationFMSEntry * - * This routine changes which entry the FMS is flying the aircraft toward. + * This routine changes which entry the FMS is flying the aircraft toward. * */ -XPLM_API void XPLMSetDestinationFMSEntry( - int inIndex); +XPLM_API void XPLMSetDestinationFMSEntry( + int inIndex); /* * XPLMGetFMSEntryInfo * - * This routine returns information about a given FMS entry. A reference to a - * navaid can be returned allowing you to find additional information (such as - * a frequency, ILS heading, name, etc.). Some information is available - * immediately. For a lat/lon entry, the lat/lon is returned by this routine - * but the navaid cannot be looked up (and the reference will be - * XPLM_NAV_NOT_FOUND. FMS name entry buffers should be at least 256 chars in - * length. + * This routine returns information about a given FMS entry. If the entry is + * an airport or navaid, a reference to a nav entry can be returned allowing + * you to find additional information (such as a frequency, ILS heading, name, + * etc.). Note that this reference can be XPLM_NAV_NOT_FOUND until the + * information has been looked up asynchronously, so after flightplan changes, + * it might take up to a second for this field to become populated. The other + * information is available immediately. For a lat/lon entry, the lat/lon is + * returned by this routine but the navaid cannot be looked up (and the + * reference will be XPLM_NAV_NOT_FOUND). FMS name entry buffers should be at + * least 256 chars in length. + * + * WARNING: Due to a bug in X-Plane prior to 11.31, the navaid reference will + * not be set to XPLM_NAV_NOT_FOUND while no data is available, and instead + * just remain the value of the variable that you passed the pointer to. + * Therefore, always initialize the variable to XPLM_NAV_NOT_FOUND before + * passing the pointer to this function. * */ -XPLM_API void XPLMGetFMSEntryInfo( - int inIndex, - XPLMNavType * outType, /* Can be NULL */ - char * outID, /* Can be NULL */ - XPLMNavRef * outRef, /* Can be NULL */ - int * outAltitude, /* Can be NULL */ - float * outLat, /* Can be NULL */ - float * outLon); /* Can be NULL */ +XPLM_API void XPLMGetFMSEntryInfo( + int inIndex, + XPLMNavType * outType, /* Can be NULL */ + char * outID, /* Can be NULL */ + XPLMNavRef * outRef, /* Can be NULL */ + int * outAltitude, /* Can be NULL */ + float * outLat, /* Can be NULL */ + float * outLon); /* Can be NULL */ /* * XPLMSetFMSEntryInfo * - * This routine changes an entry in the FMS to have the destination navaid - * passed in and the altitude specified. Use this only for airports, fixes, - * and radio-beacon navaids. Currently of radio beacons, the FMS can only - * support VORs and NDBs. Use the routines below to clear or fly to a lat/lon. + * This routine changes an entry in the FMS to have the destination navaid + * passed in and the altitude specified. Use this only for airports, fixes, + * and radio-beacon navaids. Currently of radio beacons, the FMS can only + * support VORs and NDBs. Use the routines below to clear or fly to a lat/lon. * */ -XPLM_API void XPLMSetFMSEntryInfo( - int inIndex, - XPLMNavRef inRef, - int inAltitude); +XPLM_API void XPLMSetFMSEntryInfo( + int inIndex, + XPLMNavRef inRef, + int inAltitude); /* * XPLMSetFMSEntryLatLon * - * This routine changes the entry in the FMS to a lat/lon entry with the given - * coordinates. + * This routine changes the entry in the FMS to a lat/lon entry with the given + * coordinates. * */ -XPLM_API void XPLMSetFMSEntryLatLon( - int inIndex, - float inLat, - float inLon, - int inAltitude); +XPLM_API void XPLMSetFMSEntryLatLon( + int inIndex, + float inLat, + float inLon, + int inAltitude); /* * XPLMClearFMSEntry * - * This routine clears the given entry, potentially shortening the flight - * plan. + * This routine clears the given entry, potentially shortening the flight + * plan. * */ -XPLM_API void XPLMClearFMSEntry( - int inIndex); +XPLM_API void XPLMClearFMSEntry( + int inIndex); /*************************************************************************** * GPS RECEIVER ***************************************************************************/ /* - * These APIs let you read data from the GPS unit. + * These APIs let you read data from the GPS unit. * */ /* * XPLMGetGPSDestinationType * - * This routine returns the type of the currently selected GPS destination, - * one of fix, airport, VOR or NDB. + * This routine returns the type of the currently selected GPS destination, + * one of fix, airport, VOR or NDB. * */ -XPLM_API XPLMNavType XPLMGetGPSDestinationType(void); +XPLM_API XPLMNavType XPLMGetGPSDestinationType(void); /* * XPLMGetGPSDestination * - * This routine returns the current GPS destination. + * This routine returns the current GPS destination. * */ -XPLM_API XPLMNavRef XPLMGetGPSDestination(void); +XPLM_API XPLMNavRef XPLMGetGPSDestination(void); #ifdef __cplusplus } diff --git a/src/SDK/CHeaders/XPLM/XPLMPlanes.h b/src/SDK/CHeaders/XPLM/XPLMPlanes.h index 26879082..486302db 100755 --- a/src/SDK/CHeaders/XPLM/XPLMPlanes.h +++ b/src/SDK/CHeaders/XPLM/XPLMPlanes.h @@ -2,17 +2,21 @@ #define _XPLMPlanes_h_ /* - * 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 * */ +/*************************************************************************** + * XPLMPlanes + ***************************************************************************/ /* - * The XPLMPlanes APIs allow you to control the various aircraft in X-Plane, - * both the user's and the sim's. + * The XPLMPlanes APIs allow you to control the various aircraft in X-Plane, + * both the user's and the sim's. + * + * *Note*: unlike almost all other APIs in the SDK, aircraft paths are _full_ + * file system paths for historical reasons. You'll need to prefix all + * relative paths with the X-Plane path as accessed via XPLMGetSystemPath. * */ @@ -25,134 +29,128 @@ extern "C" { /*************************************************************************** * USER AIRCRAFT ACCESS ***************************************************************************/ -/* - * - * - */ /* * XPLMSetUsersAircraft * - * This routine changes the user's aircraft. Note that this will reinitialize - * the user to be on the nearest airport's first runway. Pass in a full path - * (hard drive and everything including the .acf extension) to the .acf file. + * This routine changes the user's aircraft. Note that this will reinitialize + * the user to be on the nearest airport's first runway. Pass in a full path + * (hard drive and everything including the .acf extension) to the .acf file. * */ -XPLM_API void XPLMSetUsersAircraft( - const char * inAircraftPath); +XPLM_API void XPLMSetUsersAircraft( + const char * inAircraftPath); /* * XPLMPlaceUserAtAirport * - * This routine places the user at a given airport. Specify the airport by - * its ICAO code (e.g. 'KBOS'). + * This routine places the user at a given airport. Specify the airport by + * its X-Plane airport ID (e.g. 'KBOS'). * */ -XPLM_API void XPLMPlaceUserAtAirport( - const char * inAirportCode); +XPLM_API void XPLMPlaceUserAtAirport( + const char * inAirportCode); #if defined(XPLM300) /* * XPLMPlaceUserAtLocation * - * Places the user at a specific location after performing any necessary - * scenery loads. + * Places the user at a specific location after performing any necessary + * scenery loads. * - * As with in-air starts initiated from the X-Plane user interface, the - * aircraft will always start with its engines running, regardless of the - * user's preferences (i.e., regardless of what the dataref - * sim/operation/prefs/startup_running says). + * As with in-air starts initiated from the X-Plane user interface, the + * aircraft will always start with its engines running, regardless of the + * user's preferences (i.e., regardless of what the dataref + * `sim/operation/prefs/startup_running` says). * */ -XPLM_API void XPLMPlaceUserAtLocation( - double latitudeDegrees, - double longitudeDegrees, - float elevationMetersMSL, - float headingDegreesTrue, - float speedMetersPerSecond); +XPLM_API void XPLMPlaceUserAtLocation( + double latitudeDegrees, + double longitudeDegrees, + float elevationMetersMSL, + float headingDegreesTrue, + float speedMetersPerSecond); #endif /* XPLM300 */ /*************************************************************************** * GLOBAL AIRCRAFT ACCESS ***************************************************************************/ -/* - * - * - */ -/* The user's aircraft is always index 0. */ +/* The user's aircraft is always index 0. */ #define XPLM_USER_AIRCRAFT 0 +#if defined(XPLM_DEPRECATED) /* * XPLMPlaneDrawState_t * - * This structure contains additional plane parameter info to be passed to - * draw plane. Make sure to fill in the size of the structure field with - * sizeof(XPLMDrawPlaneState_t) so that the XPLM can tell how many fields you - * knew about when compiling your plugin (since more fields may be added - * later). + * This structure contains additional plane parameter info to be passed to + * draw plane. Make sure to fill in the size of the structure field with + * sizeof(XPLMDrawPlaneState_t) so that the XPLM can tell how many fields you + * knew about when compiling your plugin (since more fields may be added + * later). * - * Most of these fields are ratios from 0 to 1 for control input. X-Plane - * calculates what the actual controls look like based on the .acf file for - * that airplane. Note for the yoke inputs, this is what the pilot of the - * plane has commanded (post artificial stability system if there were one) - * and affects aelerons, rudder, etc. It is not necessarily related to the - * actual position of the plane! + * Most of these fields are ratios from 0 to 1 for control input. X-Plane + * calculates what the actual controls look like based on the .acf file for + * that airplane. Note for the yoke inputs, this is what the pilot of the + * plane has commanded (post artificial stability system if there were one) + * and affects aelerons, rudder, etc. It is not necessarily related to the + * actual position of the plane! * */ typedef struct { - /* The size of the draw state struct. */ + /* The size of the draw state struct. */ int structSize; - /* A ratio from [0..1] describing how far the landing gear is extended. */ + /* A ratio from [0..1] describing how far the landing gear is extended. */ float gearPosition; - /* Ratio of flap deployment, 0 = up, 1 = full deploy. */ + /* Ratio of flap deployment, 0 = up, 1 = full deploy. */ float flapRatio; - /* Ratio of spoiler deployment, 0 = none, 1 = full deploy. */ + /* Ratio of spoiler deployment, 0 = none, 1 = full deploy. */ float spoilerRatio; - /* Ratio of speed brake deployment, 0 = none, 1 = full deploy. */ + /* Ratio of speed brake deployment, 0 = none, 1 = full deploy. */ float speedBrakeRatio; - /* Ratio of slat deployment, 0 = none, 1 = full deploy. */ + /* Ratio of slat deployment, 0 = none, 1 = full deploy. */ float slatRatio; - /* Wing sweep ratio, 0 = forward, 1 = swept. */ + /* Wing sweep ratio, 0 = forward, 1 = swept. */ float wingSweep; - /* Thrust power, 0 = none, 1 = full fwd, -1 = full reverse. */ + /* Thrust power, 0 = none, 1 = full fwd, -1 = full reverse. */ float thrust; - /* Total pitch input for this plane. */ + /* Total pitch input for this plane. */ float yokePitch; - /* Total Heading input for this plane. */ + /* Total Heading input for this plane. */ float yokeHeading; - /* Total Roll input for this plane. */ + /* Total Roll input for this plane. */ float yokeRoll; } XPLMPlaneDrawState_t; +#endif /* XPLM_DEPRECATED */ /* * XPLMCountAircraft * - * This function returns the number of aircraft X-Plane is capable of having, - * as well as the number of aircraft that are currently active. These numbers - * count the user's aircraft. It can also return the plugin that is currently - * controlling aircraft. In X-Plane 7, this routine reflects the number of - * aircraft the user has enabled in the rendering options window. + * This function returns the number of aircraft X-Plane is capable of having, + * as well as the number of aircraft that are currently active. These numbers + * count the user's aircraft. It can also return the plugin that is currently + * controlling aircraft. In X-Plane 7, this routine reflects the number of + * aircraft the user has enabled in the rendering options window. * */ -XPLM_API void XPLMCountAircraft( - int * outTotalAircraft, - int * outActiveAircraft, - XPLMPluginID * outController); +XPLM_API void XPLMCountAircraft( + int * outTotalAircraft, + int * outActiveAircraft, + XPLMPluginID * outController); /* * XPLMGetNthAircraftModel * - * This function returns the aircraft model for the Nth aircraft. Indices are - * zero based, with zero being the user's aircraft. The file name should be - * at least 256 chars in length; the path should be at least 512 chars in - * length. + * This function returns the aircraft model for the Nth aircraft. Indices are + * zero based, with zero being the user's aircraft. The file name should be + * at least 256 chars in length; the path should be at least 512 chars in + * length. * */ -XPLM_API void XPLMGetNthAircraftModel( - int inIndex, - char * outFileName, - char * outPath); +XPLM_API void XPLMGetNthAircraftModel( + int inIndex, + char * outFileName, + char * outPath); /*************************************************************************** * EXCLUSIVE AIRCRAFT ACCESS ***************************************************************************/ /* - * The following routines require exclusive access to the airplane APIs. Only - * one plugin may have this access at a time. + * The following routines require exclusive access to the airplane APIs. Only + * one plugin may have this access at a time. * */ @@ -160,113 +158,127 @@ XPLM_API void XPLMGetNthAircraftModel( /* * XPLMPlanesAvailable_f * - * Your airplanes available callback is called when another plugin gives up - * access to the multiplayer planes. Use this to wait for access to - * multiplayer. + * Your airplanes available callback is called when another plugin gives up + * access to the multiplayer planes. Use this to wait for access to + * multiplayer. * */ typedef void (* XPLMPlanesAvailable_f)( - void * inRefcon); + void * inRefcon); /* * XPLMAcquirePlanes * - * XPLMAcquirePlanes grants your plugin exclusive access to the aircraft. It - * returns 1 if you gain access, 0 if you do not. inAircraft - pass in an - * array of pointers to strings specifying the planes you want loaded. For - * any plane index you do not want loaded, pass a 0-length string. Other - * strings should be full paths with the .acf extension. NULL terminates this - * array, or pass NULL if there are no planes you want loaded. If you pass in - * a callback and do not receive access to the planes your callback will be - * called when the airplanes are available. If you do receive airplane access, - * your callback will not be called. + * XPLMAcquirePlanes grants your plugin exclusive access to the aircraft. It + * returns 1 if you gain access, 0 if you do not. + * + * inAircraft - pass in an array of pointers to strings specifying the planes + * you want loaded. For any plane index you do not want loaded, pass a + * 0-length string. Other strings should be full paths with the .acf + * extension. NULL terminates this array, or pass NULL if there are no planes + * you want loaded. + * + * If you pass in a callback and do not receive access to the planes your + * callback will be called when the airplanes are available. If you do receive + * airplane access, your callback will not be called. * */ -XPLM_API int XPLMAcquirePlanes( - char ** inAircraft, /* Can be NULL */ - XPLMPlanesAvailable_f inCallback, - void * inRefcon); +XPLM_API int XPLMAcquirePlanes( + char ** inAircraft, /* Can be NULL */ + XPLMPlanesAvailable_f inCallback, + void * inRefcon); /* * XPLMReleasePlanes * - * Call this function to release access to the planes. Note that if you are - * disabled, access to planes is released for you and you must reacquire it. + * Call this function to release access to the planes. Note that if you are + * disabled, access to planes is released for you and you must reacquire it. * */ -XPLM_API void XPLMReleasePlanes(void); +XPLM_API void XPLMReleasePlanes(void); /* * XPLMSetActiveAircraftCount * - * This routine sets the number of active planes. If you pass in a number - * higher than the total number of planes availables, only the total number of - * planes available is actually used. + * This routine sets the number of active planes. If you pass in a number + * higher than the total number of planes availables, only the total number of + * planes available is actually used. * */ -XPLM_API void XPLMSetActiveAircraftCount( - int inCount); +XPLM_API void XPLMSetActiveAircraftCount( + int inCount); /* * XPLMSetAircraftModel * - * This routine loads an aircraft model. It may only be called if you have - * exclusive access to the airplane APIs. Pass in the path of the model with - * the .acf extension. The index is zero based, but you may not pass in 0 - * (use XPLMSetUsersAircraft to load the user's aircracft). + * This routine loads an aircraft model. It may only be called if you have + * exclusive access to the airplane APIs. Pass in the path of the model with + * the .acf extension. The index is zero based, but you may not pass in 0 + * (use XPLMSetUsersAircraft to load the user's aircracft). * */ -XPLM_API void XPLMSetAircraftModel( - int inIndex, - const char * inAircraftPath); +XPLM_API void XPLMSetAircraftModel( + int inIndex, + const char * inAircraftPath); /* * XPLMDisableAIForPlane * - * This routine turns off X-Plane's AI for a given plane. The plane will - * continue to draw and be a real plane in X-Plane, but will not move itself. + * This routine turns off X-Plane's AI for a given plane. The plane will + * continue to draw and be a real plane in X-Plane, but will not move itself. * */ -XPLM_API void XPLMDisableAIForPlane( - int inPlaneIndex); +XPLM_API void XPLMDisableAIForPlane( + int inPlaneIndex); +#if defined(XPLM_DEPRECATED) /* * XPLMDrawAircraft * - * This routine draws an aircraft. It can only be called from a 3-d drawing - * callback. Pass in the position of the plane in OpenGL local coordinates - * and the orientation of the plane. A 1 for full drawing indicates that the - * whole plane must be drawn; a 0 indicates you only need the nav lights - * drawn. (This saves rendering time when planes are far away.) + * WARNING: Aircraft drawing via this API is deprecated and will not work in + * future versions of X-Plane. Use XPLMInstance for 3-d drawing of custom + * aircraft models. + * + * This routine draws an aircraft. It can only be called from a 3-d drawing + * callback. Pass in the position of the plane in OpenGL local coordinates + * and the orientation of the plane. A 1 for full drawing indicates that the + * whole plane must be drawn; a 0 indicates you only need the nav lights + * drawn. (This saves rendering time when planes are far away.) * */ -XPLM_API void XPLMDrawAircraft( - int inPlaneIndex, - float inX, - float inY, - float inZ, - float inPitch, - float inRoll, - float inYaw, - int inFullDraw, - XPLMPlaneDrawState_t * inDrawStateInfo); +XPLM_API void XPLMDrawAircraft( + int inPlaneIndex, + float inX, + float inY, + float inZ, + float inPitch, + float inRoll, + float inYaw, + int inFullDraw, + XPLMPlaneDrawState_t * inDrawStateInfo); +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) /* * XPLMReinitUsersPlane * - * This function recomputes the derived flight model data from the aircraft - * structure in memory. If you have used the data access layer to modify the - * aircraft structure, use this routine to resynchronize X-Plane; since - * X-Plane works at least partly from derived values, the sim will not behave - * properly until this is called. + * WARNING: DO NOT USE. Use XPLMPlaceUserAtAirport or + * XPLMPlaceUserAtLocation. + * + * This function recomputes the derived flight model data from the aircraft + * structure in memory. If you have used the data access layer to modify the + * aircraft structure, use this routine to resynchronize X-Plane; since + * X-Plane works at least partly from derived values, the sim will not behave + * properly until this is called. * - * WARNING: this routine does not necessarily place the airplane at the - * airport; use XPLMSetUsersAircraft to be compatible. This routine is - * provided to do special experimentation with flight models without resetting - * flight. + * WARNING: this routine does not necessarily place the airplane at the + * airport; use XPLMSetUsersAircraft to be compatible. This routine is + * provided to do special experimentation with flight models without resetting + * flight. * */ -XPLM_API void XPLMReinitUsersPlane(void); +XPLM_API void XPLMReinitUsersPlane(void); +#endif /* XPLM_DEPRECATED */ #ifdef __cplusplus } diff --git a/src/SDK/CHeaders/XPLM/XPLMPlugin.h b/src/SDK/CHeaders/XPLM/XPLMPlugin.h index b526e15d..be5d06ca 100755 --- a/src/SDK/CHeaders/XPLM/XPLMPlugin.h +++ b/src/SDK/CHeaders/XPLM/XPLMPlugin.h @@ -2,17 +2,17 @@ #define _XPLMPlugin_h_ /* - * 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 * */ +/*************************************************************************** + * XPLMPlugin + ***************************************************************************/ /* - * These APIs provide facilities to find and work with other plugins and - * manage other plugins. + * These APIs provide facilities to find and work with other plugins and + * manage other plugins. * */ @@ -26,10 +26,10 @@ extern "C" { * FINDING PLUGINS ***************************************************************************/ /* - * These APIs allow you to find another plugin or yourself, or iterate across - * all plugins. For example, if you wrote an FMS plugin that needed to talk - * to an autopilot plugin, you could use these APIs to locate the autopilot - * plugin. + * These APIs allow you to find another plugin or yourself, or iterate across + * all plugins. For example, if you wrote an FMS plugin that needed to talk + * to an autopilot plugin, you could use these APIs to locate the autopilot + * plugin. * */ @@ -37,83 +37,83 @@ extern "C" { /* * XPLMGetMyID * - * This routine returns the plugin ID of the calling plug-in. Call this to - * get your own ID. + * This routine returns the plugin ID of the calling plug-in. Call this to + * get your own ID. * */ -XPLM_API XPLMPluginID XPLMGetMyID(void); +XPLM_API XPLMPluginID XPLMGetMyID(void); /* * XPLMCountPlugins * - * This routine returns the total number of plug-ins that are loaded, both - * disabled and enabled. + * This routine returns the total number of plug-ins that are loaded, both + * disabled and enabled. * */ -XPLM_API int XPLMCountPlugins(void); +XPLM_API int XPLMCountPlugins(void); /* * XPLMGetNthPlugin * - * This routine returns the ID of a plug-in by index. Index is 0 based from 0 - * to XPLMCountPlugins-1, inclusive. Plugins may be returned in any arbitrary - * order. + * This routine returns the ID of a plug-in by index. Index is 0 based from 0 + * to XPLMCountPlugins-1, inclusive. Plugins may be returned in any arbitrary + * order. * */ -XPLM_API XPLMPluginID XPLMGetNthPlugin( - int inIndex); +XPLM_API XPLMPluginID XPLMGetNthPlugin( + int inIndex); /* * XPLMFindPluginByPath * - * This routine returns the plug-in ID of the plug-in whose file exists at the - * passed in absolute file system path. XPLM_NO_PLUGIN_ID is returned if the - * path does not point to a currently loaded plug-in. + * This routine returns the plug-in ID of the plug-in whose file exists at the + * passed in absolute file system path. XPLM_NO_PLUGIN_ID is returned if the + * path does not point to a currently loaded plug-in. * */ -XPLM_API XPLMPluginID XPLMFindPluginByPath( - const char * inPath); +XPLM_API XPLMPluginID XPLMFindPluginByPath( + const char * inPath); /* * XPLMFindPluginBySignature * - * This routine returns the plug-in ID of the plug-in whose signature matches - * what is passed in or XPLM_NO_PLUGIN_ID if no running plug-in has this - * signature. Signatures are the best way to identify another plug-in as they - * are independent of the file system path of a plug-in or the human-readable - * plug-in name, and should be unique for all plug-ins. Use this routine to - * locate another plugin that your plugin interoperates with + * This routine returns the plug-in ID of the plug-in whose signature matches + * what is passed in or XPLM_NO_PLUGIN_ID if no running plug-in has this + * signature. Signatures are the best way to identify another plug-in as they + * are independent of the file system path of a plug-in or the human-readable + * plug-in name, and should be unique for all plug-ins. Use this routine to + * locate another plugin that your plugin interoperates with * */ -XPLM_API XPLMPluginID XPLMFindPluginBySignature( - const char * inSignature); +XPLM_API XPLMPluginID XPLMFindPluginBySignature( + const char * inSignature); /* * XPLMGetPluginInfo * - * This routine returns information about a plug-in. Each parameter should be - * a pointer to a buffer of at least 256 characters, or NULL to not receive - * the information. + * This routine returns information about a plug-in. Each parameter should be + * a pointer to a buffer of at least + * 256 characters, or NULL to not receive the information. * - * outName - the human-readable name of the plug-in. outFilePath - the - * absolute file path to the file that contains this plug-in. outSignature - a - * unique string that identifies this plug-in. outDescription - a - * human-readable description of this plug-in. + * outName - the human-readable name of the plug-in. outFilePath - the + * absolute file path to the file that contains this plug-in. outSignature - a + * unique string that identifies this plug-in. outDescription - a + * human-readable description of this plug-in. * */ -XPLM_API void XPLMGetPluginInfo( - XPLMPluginID inPlugin, - char * outName, /* Can be NULL */ - char * outFilePath, /* Can be NULL */ - char * outSignature, /* Can be NULL */ - char * outDescription); /* Can be NULL */ +XPLM_API void XPLMGetPluginInfo( + XPLMPluginID inPlugin, + char * outName, /* Can be NULL */ + char * outFilePath, /* Can be NULL */ + char * outSignature, /* Can be NULL */ + char * outDescription); /* Can be NULL */ /*************************************************************************** * ENABLING/DISABLING PLUG-INS ***************************************************************************/ /* - * These routines are used to work with plug-ins and manage them. Most - * plugins will not need to use these APIs. + * These routines are used to work with plug-ins and manage them. Most + * plugins will not need to use these APIs. * */ @@ -121,156 +121,238 @@ XPLM_API void XPLMGetPluginInfo( /* * XPLMIsPluginEnabled * - * Returns whether the specified plug-in is enabled for running. + * Returns whether the specified plug-in is enabled for running. * */ -XPLM_API int XPLMIsPluginEnabled( - XPLMPluginID inPluginID); +XPLM_API int XPLMIsPluginEnabled( + XPLMPluginID inPluginID); /* * XPLMEnablePlugin * - * This routine enables a plug-in if it is not already enabled. It returns 1 - * if the plugin was enabled or successfully enables itself, 0 if it does not. - * Plugins may fail to enable (for example, if resources cannot be acquired) - * by returning 0 from their XPluginEnable callback. + * This routine enables a plug-in if it is not already enabled. It returns 1 + * if the plugin was enabled or successfully enables itself, 0 if it does not. + * Plugins may fail to enable (for example, if resources cannot be acquired) + * by returning 0 from their XPluginEnable callback. * */ -XPLM_API int XPLMEnablePlugin( - XPLMPluginID inPluginID); +XPLM_API int XPLMEnablePlugin( + XPLMPluginID inPluginID); /* * XPLMDisablePlugin * - * This routine disableds an enabled plug-in. + * This routine disableds an enabled plug-in. * */ -XPLM_API void XPLMDisablePlugin( - XPLMPluginID inPluginID); +XPLM_API void XPLMDisablePlugin( + XPLMPluginID inPluginID); /* * XPLMReloadPlugins * - * This routine reloads all plug-ins. Once this routine is called and you - * return from the callback you were within (e.g. a menu select callback) you - * will receive your XPluginDisable and XPluginStop callbacks and your DLL - * will be unloaded, then the start process happens as if the sim was starting - * up. + * This routine reloads all plug-ins. Once this routine is called and you + * return from the callback you were within (e.g. a menu select callback) you + * will receive your XPluginDisable and XPluginStop callbacks and your DLL + * will be unloaded, then the start process happens as if the sim was starting + * up. * */ -XPLM_API void XPLMReloadPlugins(void); +XPLM_API void XPLMReloadPlugins(void); /*************************************************************************** * INTERPLUGIN MESSAGING ***************************************************************************/ /* - * Plugin messages are defined as 32-bit integers. Messages below 0x00FFFFFF - * are reserved for X-Plane and the plugin SDK. + * Plugin messages are defined as 32-bit integers. Messages below 0x00FFFFFF + * are reserved for X-Plane and the plugin SDK. + * + * Messages come with a pointer parameter; the meaning of this pointer depends + * on the message itself. In some messages, the pointer parameter contains an + * actual typed pointer to data that can be inspected in the plugin; in these + * cases the documentation will state that the parameter "points to" + * information. + * + * in other cases, the value of the pointer is actually an integral number + * stuffed into the pointer's storage. In these second cases, the pointer + * parameter needs to be cast, not dereferenced. In these caess, the + * documentation will state that the parameter "contains" a value, which will + * always be an integral type. * - * Messages have two conceptual uses: notifications and commands. Commands - * are sent from one plugin to another to induce behavior; notifications are - * sent from one plugin to all others for informational purposes. It is - * important that commands and notifications not have the same values because - * this could cause a notification sent by one plugin to accidentally induce a - * command in another. + * Some messages don't use the pointer parameter - in this case your plugin + * should ignore it. * - * By convention, plugin-defined notifications should have the high bit set - * (e.g. be greater or equal to unsigned 0x8000000) while commands should have - * this bit be cleared. + * Messages have two conceptual uses: notifications and commands. Commands + * are sent from one plugin to another to induce behavior; notifications are + * sent from one plugin to all others for informational purposes. It is + * important that commands and notifications not have the same values because + * this could cause a notification sent by one plugin to accidentally induce a + * command in another. * - * The following messages are sent to your plugin by X-Plane. + * By convention, plugin-defined notifications should have the high bit set + * (e.g. be greater or equal to unsigned 0x8000000) while commands should have + * this bit be cleared. + * + * The following messages are sent to your plugin by X-Plane. * */ -/* This message is sent to your plugin whenever the user's plane crashes. */ +/* This message is sent to your plugin whenever the user's plane crashes. The * + * parameter is ignored. */ #define XPLM_MSG_PLANE_CRASHED 101 -/* This message is sent to your plugin whenever a new plane is loaded. The * - * parameter is the number of the plane being loaded; 0 indicates the user's * - * plane. */ +/* This message is sent to your plugin whenever a new plane is loaded. The * + * parameter contains the index number of the plane being loaded; 0 indicates * + * the user's plane. */ #define XPLM_MSG_PLANE_LOADED 102 -/* This messages is called whenever the user's plane is positioned at a new * - * airport. */ +/* This messages is sent whenever the user's plane is positioned at a new * + * airport. The parameter is ignored. */ #define XPLM_MSG_AIRPORT_LOADED 103 -/* This message is sent whenever new scenery is loaded. Use datarefs to * - * determine the new scenery files that were loaded. */ +/* This message is sent whenever new scenery is loaded. Use datarefs to * + * determine the new scenery files that were loaded. The parameter is ignored.*/ #define XPLM_MSG_SCENERY_LOADED 104 -/* This message is sent whenever the user adjusts the number of X-Plane * - * aircraft models. You must use XPLMCountPlanes to find out how many planes * - * are now available. This message will only be sent in XP7 and higher * - * because in XP6 the number of aircraft is not user-adjustable. */ +/* This message is sent whenever the user adjusts the number of X-Plane * + * aircraft models. You must use XPLMCountPlanes to find out how many planes * + * are now available. This message will only be sent in XP7 and higher * + * because in XP6 the number of aircraft is not user-adjustable. The parameter* + * is ignored. */ #define XPLM_MSG_AIRPLANE_COUNT_CHANGED 105 #if defined(XPLM200) -/* This message is sent to your plugin whenever a plane is unloaded. The * - * parameter is the number of the plane being unloaded; 0 indicates the user's * - * plane. The parameter is of type int, passed as the value of the pointer. * - * (That is: the parameter is an int, not a pointer to an int.) */ +/* This message is sent to your plugin whenever a plane is unloaded. The * + * parameter contains the index number of the plane being unloaded; 0 * + * indicates the user's plane. The parameter is of type int, passed as the * + * value of the pointer. (That is: the parameter is an int, not a pointer to * + * an int.) */ #define XPLM_MSG_PLANE_UNLOADED 106 #endif /* XPLM200 */ #if defined(XPLM210) -/* This message is sent to your plugin right before X-Plane writes its * - * preferences file. You can use this for two purposes: to write your own * - * preferences, and to modify any datarefs to influence preferences output. * - * For example, if your plugin temporarily modifies saved preferences, you can * - * put them back to their default values here to avoid having the tweaks be * - * persisted if your plugin is not loaded on the next invocation of X-Plane. */ +/* This message is sent to your plugin right before X-Plane writes its * + * preferences file. You can use this for two purposes: to write your own * + * preferences, and to modify any datarefs to influence preferences output. * + * For example, if your plugin temporarily modifies saved preferences, you can* + * put them back to their default values here to avoid having the tweaks be * + * persisted if your plugin is not loaded on the next invocation of X-Plane. * + * The parameter is ignored. */ #define XPLM_MSG_WILL_WRITE_PREFS 107 #endif /* XPLM210 */ #if defined(XPLM210) -/* This message is sent to your plugin right after a livery is loaded for an * - * airplane. You can use this to check the new livery (via datarefs) and * - * react accordingly. The parameter is of type int, passed as the value of a * - * pointer and represents the aicraft plane number - 0 is the user's plane. */ +/* This message is sent to your plugin right after a livery is loaded for an * + * airplane. You can use this to check the new livery (via datarefs) and * + * react accordingly. The parameter contains the index number of the aircraft* + * whose livery is changing. */ #define XPLM_MSG_LIVERY_LOADED 108 #endif /* XPLM210 */ #if defined(XPLM301) -/* Sent to your plugin right before X-Plane enters virtual reality mode (at * - * which time any windows that are not positioned in VR mode will no longer be * - * visible to the user). */ +/* Sent to your plugin right before X-Plane enters virtual reality mode (at * + * which time any windows that are not positioned in VR mode will no longer be* + * visible to the user). The parameter is unused and should be ignored. */ #define XPLM_MSG_ENTERED_VR 109 #endif /* XPLM301 */ #if defined(XPLM301) -/* Sent to your plugin right before X-Plane leaves virtual reality mode (at * - * which time you may want to clean up windows that are positioned in VR * - * mode). */ +/* Sent to your plugin right before X-Plane leaves virtual reality mode (at * + * which time you may want to clean up windows that are positioned in VR * + * mode). The parameter is unused and should be ignored. */ #define XPLM_MSG_EXITING_VR 110 #endif /* XPLM301 */ +#if defined(XPLM303) +/* Sent to your plugin if another plugin wants to take over AI planes. If you * + * are a synthetic traffic provider, that probably means a plugin for an * + * online network has connected and wants to supply aircraft flown by real * + * humans and you should cease to provide synthetic traffic. If however you * + * are providing online traffic from real humans, you probably don't want to * + * disconnect, in which case you just ignore this message. The sender is the * + * plugin ID of the plugin asking for control of the planes now. You can use * + * it to find out who is requesting and whether you should yield to them. * + * Synthetic traffic providers should always yield to online networks. The * + * parameter is unused and should be ignored. */ +#define XPLM_MSG_RELEASE_PLANES 111 +#endif /* XPLM303 */ + /* * XPLMSendMessageToPlugin * - * This function sends a message to another plug-in or X-Plane. Pass - * XPLM_NO_PLUGIN_ID to broadcast to all plug-ins. Only enabled plug-ins with - * a message receive function receive the message. + * This function sends a message to another plug-in or X-Plane. Pass + * XPLM_NO_PLUGIN_ID to broadcast to all plug-ins. Only enabled plug-ins with + * a message receive function receive the message. * */ -XPLM_API void XPLMSendMessageToPlugin( - XPLMPluginID inPlugin, - int inMessage, - void * inParam); +XPLM_API void XPLMSendMessageToPlugin( + XPLMPluginID inPlugin, + int inMessage, + void * inParam); #if defined(XPLM200) /*************************************************************************** * Plugin Features API ***************************************************************************/ /* - * The plugin features API allows your plugin to "sign up" for additional - * capabilities and plugin system features that are normally disabled for - * backward compatibility. This allows advanced plugins to "opt-in" to new - * behavior. - * - * Each feature is defined by a permanent string name. The feature string - * names will vary with the particular installation of X-Plane, so plugins - * should not expect a feature to be guaranteed present. + * The plugin features API allows your plugin to "sign up" for additional + * capabilities and plugin system features that are normally disabled for + * backward compatibility. This allows advanced plugins to "opt-in" to new + * behavior. + * + * Each feature is defined by a permanent string name. The feature string + * names will vary with the particular installation of X-Plane, so plugins + * should not expect a feature to be guaranteed present. + * + * XPLM_WANTS_REFLECTIONS + * ---------------------- + * + * Available in the SDK 2.0 and later for X-Plane 9, enabling this capability + * causes your plugin to receive drawing hook callbacks when X-Plane builds + * its off-screen reflection and shadow rendering passes. Plugins should + * enable this and examine the dataref sim/graphics/view/plane_render_type to + * determine whether the drawing callback is for a reflection, shadow + * calculation, or the main screen. Rendering can be simlified or omitted for + * reflections, and non-solid drawing should be skipped for shadow + * calculations. + * + * **Note**: direct drawing via draw callbacks is not recommended; use the + * XPLMInstance API to create object models instead. + * + * XPLM_USE_NATIVE_PATHS + * --------------------- + * + * available in the SDK 2.1 and later for X-Plane 10, this modifies the plugin + * system to use Unix-style paths on all operating systems. With this enabled: + * + * * OS X paths will match the native OS X Unix. + * * Windows will use forward slashes but preserve C:\ or another drive letter + * when using complete file paths. + * * Linux uses its native file system path scheme. + * + * Without this enabled: + * + * * OS X will use CFM file paths separated by a colon. + * * Windows will use back-slashes and conventional DOS paths. + * * Linux uses its native file system path scheme. + * + * All plugins should enable this feature on OS X to access the native file + * system. + * + * XPLM_USE_NATIVE_WIDGET_WINDOWS + * ------------------------------ + * + * Available in the SDK 3.0.2 SDK, this capability tells the widgets library + * to use new, modern X-Plane backed XPLMDisplay windows to anchor all widget + * trees. Without it, widgets will always use legacy windows. + * + * Plugins should enable this to allow their widget hierarchies to respond to + * the user's UI size settings and to map widget-based windwos to a VR HMD. + * + * Before enabling this, make sure any custom widget code in your plugin is + * prepared to cope with the UI coordinate system not being th same as the + * OpenGL window coordinate system. * */ @@ -278,59 +360,59 @@ XPLM_API void XPLMSendMessageToPlugin( /* * XPLMFeatureEnumerator_f * - * You pass an XPLMFeatureEnumerator_f to get a list of all features supported - * by a given version running version of X-Plane. This routine is called once - * for each feature. + * You pass an XPLMFeatureEnumerator_f to get a list of all features supported + * by a given version running version of X-Plane. This routine is called once + * for each feature. * */ typedef void (* XPLMFeatureEnumerator_f)( - const char * inFeature, - void * inRef); + const char * inFeature, + void * inRef); /* * XPLMHasFeature * - * This returns 1 if the given installation of X-Plane supports a feature, or - * 0 if it does not. + * This returns 1 if the given installation of X-Plane supports a feature, or + * 0 if it does not. * */ -XPLM_API int XPLMHasFeature( - const char * inFeature); +XPLM_API int XPLMHasFeature( + const char * inFeature); /* * XPLMIsFeatureEnabled * - * This returns 1 if a feature is currently enabled for your plugin, or 0 if - * it is not enabled. It is an error to call this routine with an unsupported - * feature. + * This returns 1 if a feature is currently enabled for your plugin, or 0 if + * it is not enabled. It is an error to call this routine with an unsupported + * feature. * */ -XPLM_API int XPLMIsFeatureEnabled( - const char * inFeature); +XPLM_API int XPLMIsFeatureEnabled( + const char * inFeature); /* * XPLMEnableFeature * - * This routine enables or disables a feature for your plugin. This will - * change the running behavior of X-Plane and your plugin in some way, - * depending on the feature. + * This routine enables or disables a feature for your plugin. This will + * change the running behavior of X-Plane and your plugin in some way, + * depending on the feature. * */ -XPLM_API void XPLMEnableFeature( - const char * inFeature, - int inEnable); +XPLM_API void XPLMEnableFeature( + const char * inFeature, + int inEnable); /* * XPLMEnumerateFeatures * - * This routine calls your enumerator callback once for each feature that this - * running version of X-Plane supports. Use this routine to determine all of - * the features that X-Plane can support. + * This routine calls your enumerator callback once for each feature that this + * running version of X-Plane supports. Use this routine to determine all of + * the features that X-Plane can support. * */ -XPLM_API void XPLMEnumerateFeatures( - XPLMFeatureEnumerator_f inEnumerator, - void * inRef); +XPLM_API void XPLMEnumerateFeatures( + XPLMFeatureEnumerator_f inEnumerator, + void * inRef); #endif /* XPLM200 */ #ifdef __cplusplus diff --git a/src/SDK/CHeaders/XPLM/XPLMProcessing.h b/src/SDK/CHeaders/XPLM/XPLMProcessing.h index a9250714..94ef0c46 100755 --- a/src/SDK/CHeaders/XPLM/XPLMProcessing.h +++ b/src/SDK/CHeaders/XPLM/XPLMProcessing.h @@ -2,23 +2,38 @@ #define _XPLMProcessing_h_ /* - * 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 * */ +/*************************************************************************** + * XPLMProcessing + ***************************************************************************/ /* - * This API allows you to get regular callbacks during the flight loop, the - * part of X-Plane where the plane's position calculates the physics of - * flight, etc. Use these APIs to accomplish periodic tasks like logging data - * and performing I/O. - * - * WARNING: Do NOT use these callbacks to draw! You cannot draw during flight - * loop callbacks. Use the drawing callbacks (see XPLMDisplay for more info) - * for graphics. + * This API allows you to get regular callbacks during the flight loop, the + * part of X-Plane where the plane's position calculates the physics of + * flight, etc. Use these APIs to accomplish periodic tasks like logging data + * and performing I/O. + * + * You can receive a callback either just before or just after the per-frame + * physics calculations happen - you can use post-FM callbacks to "patch" the + * flight model after it has run. + * + * If the user has set the number of flight model iterations per frame greater + * than one your plugin will _not_ see this; these integrations run on the + * sub-section of the flight model where iterations improve responsiveness + * (e.g. physical integration, not simple systems tracking) and are thus + * opaque to plugins. + * + * Flight loop scheduling, when scheduled by time, is scheduled by a "first + * callback after the deadline" schedule, e.g. your callbacks will always be + * slightly late to ensure that we don't run faster than your deadline. + * + * WARNING: Do NOT use these callbacks to draw! You cannot draw during flight + * loop callbacks. Use the drawing callbacks (see XPLMDisplay for more info) + * for graphics. (One exception: you can use a post-flight loop callback to + * update your own off-screen FBOs.) * */ @@ -31,25 +46,21 @@ extern "C" { /*************************************************************************** * FLIGHT LOOP CALLBACKS ***************************************************************************/ -/* - * - * - */ #if defined(XPLM210) /* * XPLMFlightLoopPhaseType * - * You can register a flight loop callback to run either before or after the - * flight model is integrated by X-Plane. + * You can register a flight loop callback to run either before or after the + * flight model is integrated by X-Plane. * */ enum { - /* Your callback runs before X-Plane integrates the flight model. */ - xplm_FlightLoop_Phase_BeforeFlightModel = 0 + /* Your callback runs before X-Plane integrates the flight model. */ + xplm_FlightLoop_Phase_BeforeFlightModel = 0, - /* Your callback runs after X-Plane integrates the flight model. */ - ,xplm_FlightLoop_Phase_AfterFlightModel = 1 + /* Your callback runs after X-Plane integrates the flight model. */ + xplm_FlightLoop_Phase_AfterFlightModel = 1, }; @@ -60,9 +71,9 @@ typedef int XPLMFlightLoopPhaseType; /* * XPLMFlightLoopID * - * This is an opaque identifier for a flight loop callback. You can use this - * identifier to easily track and remove your callbacks, or to use the new - * flight loop APIs. + * This is an opaque identifier for a flight loop callback. You can use this + * identifier to easily track and remove your callbacks, or to use the new + * flight loop APIs. * */ typedef void * XPLMFlightLoopID; @@ -71,39 +82,49 @@ typedef void * XPLMFlightLoopID; /* * XPLMFlightLoop_f * - * This is your flight loop callback. Each time the flight loop is iterated - * through, you receive this call at the end. You receive a time since you - * were last called and a time since the last loop, as well as a loop counter. - * The 'phase' parameter is deprecated and should be ignored. + * This is your flight loop callback. Each time the flight loop is iterated + * through, you receive this call at the end. * - * Your return value controls when you will next be called. Return 0 to stop - * receiving callbacks. Pass a positive number to specify how many seconds - * until the next callback. (You will be called at or after this time, not - * before.) Pass a negative number to specify how many loops must go by until - * you are called. For example, -1.0 means call me the very next loop. Try to - * run your flight loop as infrequently as is practical, and suspend it (using - * return value 0) when you do not need it; lots of flight loop callbacks that - * do nothing lowers X-Plane's frame rate. + * Flight loop callbacks receive a number of input timing parameters. These + * input timing parameters are not particularly useful; you may need to track + * your own timing data (e.g. by reading datarefs). The input parameters are: * - * Your callback will NOT be unregistered if you return 0; it will merely be - * inactive. + * - inElapsedSinceLastCall: the wall time since your last callback. + * - inElapsedTimeSinceLastFlightLoop: the wall time since any flight loop was + * dispatched. + * - inCounter: a monotonically increasing counter, bumped once per flight + * loop dispatch from the sim. + * - inRefcon: your own ptr constant from when you regitered yor callback. * - * The reference constant you passed to your loop is passed back to you. + * Your return value controls when you will next be called. + * + * - Return 0 to stop receiving callbacks. + * - Pass a positive number to specify how many seconds until the next + * callback. (You will be called at or after this time, not before.) + * - Pass a negative number to specify how many loops must go by until you + * are called. For example, -1.0 means call me the very next loop. + * + * Try to run your flight loop as infrequently as is practical, and suspend it + * (using return value 0) when you do not need it; lots of flight loop + * callbacks that do nothing lowers X-Plane's frame rate. + * + * Your callback will NOT be unregistered if you return 0; it will merely be + * inactive. * */ typedef float (* XPLMFlightLoop_f)( - float inElapsedSinceLastCall, - float inElapsedTimeSinceLastFlightLoop, - int inCounter, - void * inRefcon); + float inElapsedSinceLastCall, + float inElapsedTimeSinceLastFlightLoop, + int inCounter, + void * inRefcon); #if defined(XPLM210) /* * XPLMCreateFlightLoop_t * - * XPLMCreateFlightLoop_t contains the parameters to create a new flight loop - * callback. The strsucture can be expanded in future SDKs - always set - * structSize to the size of your structure in bytes. + * XPLMCreateFlightLoop_t contains the parameters to create a new flight loop + * callback. The strsucture can be expanded in future SDKs - always set + * structSize to the size of your structure in bytes. * */ typedef struct { @@ -117,132 +138,123 @@ typedef struct { /* * XPLMGetElapsedTime * - * This routine returns the elapsed time since the sim started up in decimal - * seconds. + * This routine returns the elapsed time since the sim started up in decimal + * seconds. This is a wall timer; it keeps counting upward even if the sim is + * pasued. + * + * __WARNING__: XPLMGetElapsedTime is not a very good timer! It lacks + * precision in both its data type and its source. Do not attempt to use it + * for timing critical applications like network multiplayer. * */ -XPLM_API float XPLMGetElapsedTime(void); +XPLM_API float XPLMGetElapsedTime(void); /* * XPLMGetCycleNumber * - * This routine returns a counter starting at zero for each sim cycle - * computed/video frame rendered. + * This routine returns a counter starting at zero for each sim cycle + * computed/video frame rendered. * */ -XPLM_API int XPLMGetCycleNumber(void); +XPLM_API int XPLMGetCycleNumber(void); /* * XPLMRegisterFlightLoopCallback * - * This routine registers your flight loop callback. Pass in a pointer to a - * flight loop function and a refcon. inInterval defines when you will be - * called. Pass in a positive number to specify seconds from registration time - * to the next callback. Pass in a negative number to indicate when you will - * be called (e.g. pass -1 to be called at the next cylcle). Pass 0 to not be - * called; your callback will be inactive. + * This routine registers your flight loop callback. Pass in a pointer to a + * flight loop function and a refcon. inInterval defines when you will be + * called. Pass in a positive number to specify seconds from registration time + * to the next callback. Pass in a negative number to indicate when you will + * be called (e.g. pass -1 to be called at the next cylcle). Pass 0 to not be + * called; your callback will be inactive. + * + * (This legacy function only installs pre-flight-loop callbacks; use + * XPLMCreateFlightLoop for more control.) * */ -XPLM_API void XPLMRegisterFlightLoopCallback( - XPLMFlightLoop_f inFlightLoop, - float inInterval, - void * inRefcon); +XPLM_API void XPLMRegisterFlightLoopCallback( + XPLMFlightLoop_f inFlightLoop, + float inInterval, + void * inRefcon); /* * XPLMUnregisterFlightLoopCallback * - * This routine unregisters your flight loop callback. Do NOT call it from - * your flight loop callback. Once your flight loop callback is unregistered, - * it will not be called again. + * This routine unregisters your flight loop callback. Do NOT call it from + * your flight loop callback. Once your flight loop callback is unregistered, + * it will not be called again. + * + * Only use this on flight loops registered via + * XPLMRegisterFlightLoopCallback. * */ -XPLM_API void XPLMUnregisterFlightLoopCallback( - XPLMFlightLoop_f inFlightLoop, - void * inRefcon); +XPLM_API void XPLMUnregisterFlightLoopCallback( + XPLMFlightLoop_f inFlightLoop, + void * inRefcon); /* * XPLMSetFlightLoopCallbackInterval * - * This routine sets when a callback will be called. Do NOT call it from your - * callback; use the return value of the callback to change your callback - * interval from inside your callback. + * This routine sets when a callback will be called. Do NOT call it from your + * callback; use the return value of the callback to change your callback + * interval from inside your callback. * - * inInterval is formatted the same way as in XPLMRegisterFlightLoopCallback; - * positive for seconds, negative for cycles, and 0 for deactivating the - * callback. If inRelativeToNow is 1, times are from the time of this call; - * otherwise they are from the time the callback was last called (or the time - * it was registered if it has never been called. + * inInterval is formatted the same way as in XPLMRegisterFlightLoopCallback; + * positive for seconds, negative for cycles, and 0 for deactivating the + * callback. If inRelativeToNow is 1, times are from the time of this call; + * otherwise they are from the time the callback was last called (or the time + * it was registered if it has never been called. * */ -XPLM_API void XPLMSetFlightLoopCallbackInterval( - XPLMFlightLoop_f inFlightLoop, - float inInterval, - int inRelativeToNow, - void * inRefcon); +XPLM_API void XPLMSetFlightLoopCallbackInterval( + XPLMFlightLoop_f inFlightLoop, + float inInterval, + int inRelativeToNow, + void * inRefcon); #if defined(XPLM210) /* * XPLMCreateFlightLoop * - * This routine creates a flight loop callback and returns its ID. The flight - * loop callback is created using the input param struct, and is inited to be - * unscheduled. + * This routine creates a flight loop callback and returns its ID. The flight + * loop callback is created using the input param struct, and is inited to be + * unscheduled. * */ -XPLM_API XPLMFlightLoopID XPLMCreateFlightLoop( - XPLMCreateFlightLoop_t * inParams); +XPLM_API XPLMFlightLoopID XPLMCreateFlightLoop( + XPLMCreateFlightLoop_t * inParams); #endif /* XPLM210 */ #if defined(XPLM210) /* * XPLMDestroyFlightLoop * - * This routine destroys a flight loop callback by ID. + * This routine destroys a flight loop callback by ID. Only call it on flight + * loops created with the newer XPLMCreateFlightLoop API. * */ -XPLM_API void XPLMDestroyFlightLoop( - XPLMFlightLoopID inFlightLoopID); +XPLM_API void XPLMDestroyFlightLoop( + XPLMFlightLoopID inFlightLoopID); #endif /* XPLM210 */ #if defined(XPLM210) /* * XPLMScheduleFlightLoop * - * This routine schedules a flight loop callback for future execution. If - * inInterval is negative, it is run in a certain number of frames based on - * the absolute value of the input. If the interval is positive, it is a - * duration in seconds. - * - * If inRelativeToNow is true, ties are interpretted relative to the time this - * routine is called; otherwise they are relative to the last call time or the - * time the flight loop was registered (if never called). - * - * THREAD SAFETY: it is legal to call this routine from any thread under the - * following conditions: - * - * 1. The call must be between the beginning of an XPLMEnable and the end of - * an XPLMDisable sequence. (That is, you must not call this routine from - * thread activity when your plugin was supposed to be disabled. Since plugins - * are only enabled while loaded, this also implies you cannot run this - * routine outside an XPLMStart/XPLMStop sequence.) - * - * 2. You may not call this routine re-entrantly for a single flight loop ID. - * (That is, you can't enable from multiple threads at the same time.) - * - * 3. You must call this routine between the time after XPLMCreateFlightLoop - * returns a value and the time you call XPLMDestroyFlightLoop. (That is, you - * must ensure that your threaded activity is within the life of the object. - * The SDK does not check this for you, nor does it synchronize destruction of - * the object.) + * This routine schedules a flight loop callback for future execution. If + * inInterval is negative, it is run in a certain number of frames based on + * the absolute value of the input. If the interval is positive, it is a + * duration in seconds. * - * 4. The object must be unscheduled if this routine is to be called from a - * thread other than the main thread. + * If inRelativeToNow is true, ties are interpretted relative to the time this + * routine is called; otherwise they are relative to the last call time or the + * time the flight loop was registered (if never called). * */ -XPLM_API void XPLMScheduleFlightLoop( - XPLMFlightLoopID inFlightLoopID, - float inInterval, - int inRelativeToNow); +XPLM_API void XPLMScheduleFlightLoop( + XPLMFlightLoopID inFlightLoopID, + float inInterval, + int inRelativeToNow); #endif /* XPLM210 */ #ifdef __cplusplus diff --git a/src/SDK/CHeaders/XPLM/XPLMScenery.h b/src/SDK/CHeaders/XPLM/XPLMScenery.h index 875468e5..452bac95 100644 --- a/src/SDK/CHeaders/XPLM/XPLMScenery.h +++ b/src/SDK/CHeaders/XPLM/XPLMScenery.h @@ -2,16 +2,16 @@ #define _XPLMScenery_h_ /* - * 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 * */ +/*************************************************************************** + * XPLMScenery + ***************************************************************************/ /* - * This package contains APIs to interact with X-Plane's scenery system. + * This package contains APIs to interact with X-Plane's scenery system. * */ @@ -26,30 +26,33 @@ extern "C" { * Terrain Y-Testing ***************************************************************************/ /* - * The Y-testing API allows you to locate the physical scenery mesh. This - * would be used to place dynamic graphics on top of the ground in a plausible - * way or do physics interactions. - * - * The Y-test API works via probe objects, which are allocated by your plugin - * and used to query terrain. Probe objects exist both to capture which - * algorithm you have requested (see probe types) and also to cache query - * information. - * - * Performance guidelines: It is generally faster to use the same probe for - * nearby points and different probes for different points. Try not to - * allocate more than "hundreds" of probes at most. Share probes if you need - * more. Generally, probing operations are expensive, and should be avoided - * via caching when possible. - * - * Y testing returns a location on the terrain, a normal vectory, and a - * velocity vector. The normal vector tells you the slope of the terrain at - * that point. The velocity vector tells you if that terrain is moving (and is - * in meters/second). For example, if your Y test hits the aircraft carrier - * deck, this tells you the velocity of that point on the deck. - * - * Note: the Y-testing API is limited to probing the loaded scenery area, - * which is approximately 300x300 km in X-Plane 9. Probes outside this area - * will return the height of a 0 MSL sphere. + * The Y-testing API allows you to locate the physical scenery mesh. This + * would be used to place dynamic graphics on top of the ground in a plausible + * way or do physics interactions. + * + * The Y-test API works via probe objects, which are allocated by your plugin + * and used to query terrain. Probe objects exist both to capture which + * algorithm you have requested (see probe types) and also to cache query + * information. + * + * Performance Guidelines + * ---------------------- + * + * It is generally faster to use the same probe for nearby points and + * different probes for different points. Try not to allocate more than + * "hundreds" of probes at most. Share probes if you need more. Generally, + * probing operations are expensive, and should be avoided via caching when + * possible. + * + * Y testing returns a location on the terrain, a normal vectory, and a + * velocity vector. The normal vector tells you the slope of the terrain at + * that point. The velocity vector tells you if that terrain is moving (and is + * in meters/second). For example, if your Y test hits the aircraft carrier + * deck, this tells you the velocity of that point on the deck. + * + * Note: the Y-testing API is limited to probing the loaded scenery area, + * which is approximately 300x300 km in X-Plane 9. Probes outside this area + * will return the height of a 0 MSL sphere. * */ @@ -57,15 +60,15 @@ extern "C" { /* * XPLMProbeType * - * XPLMProbeType defines the type of terrain probe - each probe has a - * different algorithm. (Only one type of probe is provided right now, but - * future APIs will expose more flexible or poewrful or useful probes. + * XPLMProbeType defines the type of terrain probe - each probe has a + * different algorithm. (Only one type of probe is provided right now, but + * future APIs will expose more flexible or poewrful or useful probes. * */ enum { - /* The Y probe gives you the location of the tallest physical scenery along * - * the Y axis going through the queried point. */ - xplm_ProbeY = 0 + /* The Y probe gives you the location of the tallest physical scenery along * + * the Y axis going through the queried point. */ + xplm_ProbeY = 0, }; @@ -74,20 +77,20 @@ typedef int XPLMProbeType; /* * XPLMProbeResult * - * Probe results - possible results from a probe query. + * Probe results - possible results from a probe query. * */ enum { - /* The probe hit terrain and returned valid values. */ - xplm_ProbeHitTerrain = 0 + /* The probe hit terrain and returned valid values. */ + xplm_ProbeHitTerrain = 0, - /* An error in the API call. Either the probe struct size is bad, or the * - * probe is invalid or the type is mismatched for the specific query call. */ - ,xplm_ProbeError = 1 + /* An error in the API call. Either the probe struct size is bad, or the * + * probe is invalid or the type is mismatched for the specific query call. */ + xplm_ProbeError = 1, - /* The probe call succeeded but there is no terrain under this point (perhaps * - * it is off the side of the planet?) */ - ,xplm_ProbeMissed = 2 + /* The probe call succeeded but there is no terrain under this point (perhaps * + * it is off the side of the planet?) */ + xplm_ProbeMissed = 2, }; @@ -96,8 +99,8 @@ typedef int XPLMProbeResult; /* * XPLMProbeRef * - * An XPLMProbeRef is an opaque handle to a probe, used for querying the - * terrain. + * An XPLMProbeRef is an opaque handle to a probe, used for querying the + * terrain. * */ typedef void * XPLMProbeRef; @@ -105,71 +108,71 @@ typedef void * XPLMProbeRef; /* * XPLMProbeInfo_t * - * XPLMProbeInfo_t contains the results of a probe call. Make sure to set - * structSize to the size of the struct before using it. + * XPLMProbeInfo_t contains the results of a probe call. Make sure to set + * structSize to the size of the struct before using it. * */ typedef struct { - /* Size of structure in bytes - always set this before calling the XPLM. */ + /* Size of structure in bytes - always set this before calling the XPLM. */ int structSize; - /* Resulting X location of the terrain point we hit, in local OpenGL * - * coordinates. */ + /* Resulting X location of the terrain point we hit, in local OpenGL * + * coordinates. */ float locationX; - /* Resulting Y location of the terrain point we hit, in local OpenGL * - * coordinates. */ + /* Resulting Y location of the terrain point we hit, in local OpenGL * + * coordinates. */ float locationY; - /* Resulting Z location of the terrain point we hit, in local OpenGL * - * coordinates. */ + /* Resulting Z location of the terrain point we hit, in local OpenGL * + * coordinates. */ float locationZ; - /* X component of the normal vector to the terrain we found. */ + /* X component of the normal vector to the terrain we found. */ float normalX; - /* Y component of the normal vector to the terrain we found. */ + /* Y component of the normal vector to the terrain we found. */ float normalY; - /* Z component of the normal vector to the terrain we found. */ + /* Z component of the normal vector to the terrain we found. */ float normalZ; - /* X component of the velocity vector of the terrain we found. */ + /* X component of the velocity vector of the terrain we found. */ float velocityX; - /* Y component of the velocity vector of the terrain we found. */ + /* Y component of the velocity vector of the terrain we found. */ float velocityY; - /* Z component of the velocity vector of the terrain we found. */ + /* Z component of the velocity vector of the terrain we found. */ float velocityZ; - /* Tells if the surface we hit is water (otherwise it is land). */ + /* Tells if the surface we hit is water (otherwise it is land). */ int is_wet; } XPLMProbeInfo_t; /* * XPLMCreateProbe * - * Creates a new probe object of a given type and returns. + * Creates a new probe object of a given type and returns. * */ -XPLM_API XPLMProbeRef XPLMCreateProbe( - XPLMProbeType inProbeType); +XPLM_API XPLMProbeRef XPLMCreateProbe( + XPLMProbeType inProbeType); /* * XPLMDestroyProbe * - * Deallocates an existing probe object. + * Deallocates an existing probe object. * */ -XPLM_API void XPLMDestroyProbe( - XPLMProbeRef inProbe); +XPLM_API void XPLMDestroyProbe( + XPLMProbeRef inProbe); /* * XPLMProbeTerrainXYZ * - * Probes the terrain. Pass in the XYZ coordinate of the probe point, a probe - * object, and an XPLMProbeInfo_t struct that has its structSize member set - * properly. Other fields are filled in if we hit terrain, and a probe result - * is returned. + * Probes the terrain. Pass in the XYZ coordinate of the probe point, a probe + * object, and an XPLMProbeInfo_t struct that has its structSize member set + * properly. Other fields are filled in if we hit terrain, and a probe result + * is returned. * */ -XPLM_API XPLMProbeResult XPLMProbeTerrainXYZ( - XPLMProbeRef inProbe, - float inX, - float inY, - float inZ, - XPLMProbeInfo_t * outInfo); +XPLM_API XPLMProbeResult XPLMProbeTerrainXYZ( + XPLMProbeRef inProbe, + float inX, + float inY, + float inZ, + XPLMProbeInfo_t * outInfo); #endif /* XPLM200 */ #if defined(XPLM300) @@ -177,16 +180,16 @@ XPLM_API XPLMProbeResult XPLMProbeTerrainXYZ( * Magnetic Variation ***************************************************************************/ /* - * Use the magnetic variation (more properly, the "magnetic declination") API - * to find the offset of magnetic north from true north at a given latitude - * and longitude within the simulator. + * Use the magnetic variation (more properly, the "magnetic declination") API + * to find the offset of magnetic north from true north at a given latitude + * and longitude within the simulator. * - * In the real world, the Earth's magnetic field is irregular, such that true - * north (the direction along a meridian toward the north pole) does not - * necessarily match what a magnetic compass shows as north. + * In the real world, the Earth's magnetic field is irregular, such that true + * north (the direction along a meridian toward the north pole) does not + * necessarily match what a magnetic compass shows as north. * - * Using this API ensures that you present the same offsets to users as - * X-Plane's built-in instruments. + * Using this API ensures that you present the same offsets to users as + * X-Plane's built-in instruments. * */ @@ -194,43 +197,43 @@ XPLM_API XPLMProbeResult XPLMProbeTerrainXYZ( /* * XPLMGetMagneticVariation * - * Returns X-Plane's simulated magnetic variation (declination) at the - * indication latitude and longitude. + * Returns X-Plane's simulated magnetic variation (declination) at the + * indication latitude and longitude. * */ -XPLM_API float XPLMGetMagneticVariation( - double latitude, - double longitude); +XPLM_API float XPLMGetMagneticVariation( + double latitude, + double longitude); /* * XPLMDegTrueToDegMagnetic * - * Converts a heading in degrees relative to true north into a value relative - * to magnetic north at the user's current location. + * Converts a heading in degrees relative to true north into a value relative + * to magnetic north at the user's current location. * */ -XPLM_API float XPLMDegTrueToDegMagnetic( - float headingDegreesTrue); +XPLM_API float XPLMDegTrueToDegMagnetic( + float headingDegreesTrue); /* * XPLMDegMagneticToDegTrue * - * Converts a heading in degrees relative to magnetic north at the user's - * current location into a value relative to true north. + * Converts a heading in degrees relative to magnetic north at the user's + * current location into a value relative to true north. * */ -XPLM_API float XPLMDegMagneticToDegTrue( - float headingDegreesMagnetic); +XPLM_API float XPLMDegMagneticToDegTrue( + float headingDegreesMagnetic); #endif /* XPLM300 */ /*************************************************************************** * Object Drawing ***************************************************************************/ /* - * The object drawing routines let you load and draw X-Plane OBJ files. - * Objects are loaded by file path and managed via an opaque handle. X-Plane - * naturally reference counts objects, so it is important that you balance - * every successful call to XPLMLoadObject with a call to XPLMUnloadObject! + * The object drawing routines let you load and draw X-Plane OBJ files. + * Objects are loaded by file path and managed via an opaque handle. X-Plane + * naturally reference counts objects, so it is important that you balance + * every successful call to XPLMLoadObject with a call to XPLMUnloadObject! * */ @@ -239,8 +242,8 @@ XPLM_API float XPLMDegMagneticToDegTrue( /* * XPLMObjectRef * - * An XPLMObjectRef is a opaque handle to an .obj file that has been loaded - * into memory. + * An XPLMObjectRef is a opaque handle to an .obj file that has been loaded + * into memory. * */ typedef void * XPLMObjectRef; @@ -250,25 +253,25 @@ typedef void * XPLMObjectRef; /* * XPLMDrawInfo_t * - * The XPLMDrawInfo_t structure contains positioning info for one object that - * is to be drawn. Be sure to set structSize to the size of the structure for - * future expansion. + * The XPLMDrawInfo_t structure contains positioning info for one object that + * is to be drawn. Be sure to set structSize to the size of the structure for + * future expansion. * */ typedef struct { - /* Set this to the size of this structure! */ + /* Set this to the size of this structure! */ int structSize; - /* X location of the object in local coordinates. */ + /* X location of the object in local coordinates. */ float x; - /* Y location of the object in local coordinates. */ + /* Y location of the object in local coordinates. */ float y; - /* Z location of the object in local coordinates. */ + /* Z location of the object in local coordinates. */ float z; - /* Pitch in degres to rotate the object, positive is up. */ + /* Pitch in degres to rotate the object, positive is up. */ float pitch; - /* Heading in local coordinates to rotate the object, clockwise. */ + /* Heading in local coordinates to rotate the object, clockwise. */ float heading; - /* Roll to rotate the object. */ + /* Roll to rotate the object. */ float roll; } XPLMDrawInfo_t; #endif /* XPLM200 */ @@ -277,119 +280,120 @@ typedef struct { /* * XPLMObjectLoaded_f * - * You provide this callback when loading an object asynchronously; it will be - * called once the object is loaded. Your refcon is passed back. The object - * ref passed in is the newly loaded object (ready for use) or NULL if an - * error occured. + * You provide this callback when loading an object asynchronously; it will be + * called once the object is loaded. Your refcon is passed back. The object + * ref passed in is the newly loaded object (ready for use) or NULL if an + * error occured. * - * If your plugin is disabled, this callback will be delivered as soon as the - * plugin is re-enabled. If your plugin is unloaded before this callback is - * ever called, the SDK will release the object handle for you. + * If your plugin is disabled, this callback will be delivered as soon as the + * plugin is re-enabled. If your plugin is unloaded before this callback is + * ever called, the SDK will release the object handle for you. * */ typedef void (* XPLMObjectLoaded_f)( - XPLMObjectRef inObject, - void * inRefcon); + XPLMObjectRef inObject, + void * inRefcon); #endif /* XPLM210 */ #if defined(XPLM200) /* * XPLMLoadObject * - * This routine loads an OBJ file and returns a handle to it. If X-Plane has - * already loaded the object, the handle to the existing object is returned. - * Do not assume you will get the same handle back twice, but do make sure to - * call unload once for every load to avoid "leaking" objects. The object will - * be purged from memory when no plugins and no scenery are using it. + * This routine loads an OBJ file and returns a handle to it. If X-Plane has + * already loaded the object, the handle to the existing object is returned. + * Do not assume you will get the same handle back twice, but do make sure to + * call unload once for every load to avoid "leaking" objects. The object will + * be purged from memory when no plugins and no scenery are using it. * - * The path for the object must be relative to the X-System base folder. If - * the path is in the root of the X-System folder you may need to prepend ./ - * to it; loading objects in the root of the X-System folder is STRONGLY - * discouraged - your plugin should not dump art resources in the root folder! + * The path for the object must be relative to the X-System base folder. If + * the path is in the root of the X-System folder you may need to prepend ./ + * to it; loading objects in the root of the X-System folder is STRONGLY + * discouraged - your plugin should not dump art resources in the root folder! * + * XPLMLoadObject will return NULL if the object cannot be loaded (either + * because it is not found or the file is misformatted). This routine will + * load any object that can be used in the X-Plane scenery system. * - * XPLMLoadObject will return NULL if the object cannot be loaded (either - * because it is not found or the file is misformatted). This routine will - * load any object that can be used in the X-Plane scenery system. - * - * It is important that the datarefs an object uses for animation already be - * loaded before you load the object. For this reason it may be necessary to - * defer object loading until the sim has fully started. + * It is important that the datarefs an object uses for animation already be + * loaded before you load the object. For this reason it may be necessary to + * defer object loading until the sim has fully started. * */ -XPLM_API XPLMObjectRef XPLMLoadObject( - const char * inPath); +XPLM_API XPLMObjectRef XPLMLoadObject( + const char * inPath); #endif /* XPLM200 */ #if defined(XPLM210) /* * XPLMLoadObjectAsync * - * This routine loads an object asynchronously; control is returned to you - * immediately while X-Plane loads the object. The sim will not stop flying - * while the object loads. For large objects, it may be several seconds before - * the load finishes. + * This routine loads an object asynchronously; control is returned to you + * immediately while X-Plane loads the object. The sim will not stop flying + * while the object loads. For large objects, it may be several seconds before + * the load finishes. * - * You provide a callback function that is called once the load has completed. - * Note that if the object cannot be loaded, you will not find out until the - * callback function is called with a NULL object handle. + * You provide a callback function that is called once the load has completed. + * Note that if the object cannot be loaded, you will not find out until the + * callback function is called with a NULL object handle. * - * There is no way to cancel an asynchronous object load; you must wait for - * the load to complete and then release the object if it is no longer - * desired. + * There is no way to cancel an asynchronous object load; you must wait for + * the load to complete and then release the object if it is no longer + * desired. * */ -XPLM_API void XPLMLoadObjectAsync( - const char * inPath, - XPLMObjectLoaded_f inCallback, - void * inRefcon); +XPLM_API void XPLMLoadObjectAsync( + const char * inPath, + XPLMObjectLoaded_f inCallback, + void * inRefcon); #endif /* XPLM210 */ -#if defined(XPLM200) +#if defined(XPLM_DEPRECATED) /* * XPLMDrawObjects * - * XPLMDrawObjects draws an object from an OBJ file one or more times. You - * pass in the object and an array of XPLMDrawInfo_t structs, one for each - * place you would like the object to be drawn. + * __Deprecation Warning__: use XPLMInstancing to draw 3-d objects by creating + * instances, rather than these APIs from draw callbacks. * - * X-Plane will attempt to cull the objects based on LOD and visibility, and - * will pick the appropriate LOD. + * XPLMDrawObjects draws an object from an OBJ file one or more times. You + * pass in the object and an array of XPLMDrawInfo_t structs, one for each + * place you would like the object to be drawn. * - * Lighting is a boolean; pass 1 to show the night version of object with - * night-only lights lit up. Pass 0 to show the daytime version of the object. + * X-Plane will attempt to cull the objects based on LOD and visibility, and + * will pick the appropriate LOD. * + * Lighting is a boolean; pass 1 to show the night version of object with + * night-only lights lit up. Pass 0 to show the daytime version of the object. * - * earth_relative controls the coordinate system. If this is 1, the rotations - * you specify are applied to the object after its coordinate system is - * transformed from local to earth-relative coordinates -- that is, an object - * with no rotations will point toward true north and the Y axis will be up - * against gravity. If this is 0, the object is drawn with your rotations from - * local coordanates -- that is, an object with no rotations is drawn pointing - * down the -Z axis and the Y axis of the object matches the local coordinate - * Y axis. + * earth_relative controls the coordinate system. If this is 1, the rotations + * you specify are applied to the object after its coordinate system is + * transformed from local to earth-relative coordinates -- that is, an object + * with no rotations will point toward true north and the Y axis will be up + * against gravity. If this is 0, the object is drawn with your rotations from + * local coordanates -- that is, an object with no rotations is drawn pointing + * down the -Z axis and the Y axis of the object matches the local coordinate + * Y axis. * */ -XPLM_API void XPLMDrawObjects( - XPLMObjectRef inObject, - int inCount, - XPLMDrawInfo_t * inLocations, - int lighting, - int earth_relative); -#endif /* XPLM200 */ +XPLM_API void XPLMDrawObjects( + XPLMObjectRef inObject, + int inCount, + XPLMDrawInfo_t * inLocations, + int lighting, + int earth_relative); +#endif /* XPLM_DEPRECATED */ #if defined(XPLM200) /* * XPLMUnloadObject * - * This routine marks an object as no longer being used by your plugin. - * Objects are reference counted: once no plugins are using an object, it is - * purged from memory. Make sure to call XPLMUnloadObject once for each - * successful call to XPLMLoadObject. + * This routine marks an object as no longer being used by your plugin. + * Objects are reference counted: once no plugins are using an object, it is + * purged from memory. Make sure to call XPLMUnloadObject once for each + * successful call to XPLMLoadObject. * */ -XPLM_API void XPLMUnloadObject( - XPLMObjectRef inObject); +XPLM_API void XPLMUnloadObject( + XPLMObjectRef inObject); #endif /* XPLM200 */ #if defined(XPLM200) @@ -397,10 +401,10 @@ XPLM_API void XPLMUnloadObject( * Library Access ***************************************************************************/ /* - * The library access routines allow you to locate scenery objects via the - * X-Plane library system. Right now library access is only provided for - * objects, allowing plugin-drawn objects to be extended using the library - * system. + * The library access routines allow you to locate scenery objects via the + * X-Plane library system. Right now library access is only provided for + * objects, allowing plugin-drawn objects to be extended using the library + * system. * */ @@ -408,35 +412,35 @@ XPLM_API void XPLMUnloadObject( /* * XPLMLibraryEnumerator_f * - * An XPLMLibraryEnumerator_f is a callback you provide that is called once - * for each library element that is located. The returned paths will be - * relative to the X-System folder. + * An XPLMLibraryEnumerator_f is a callback you provide that is called once + * for each library element that is located. The returned paths will be + * relative to the X-System folder. * */ typedef void (* XPLMLibraryEnumerator_f)( - const char * inFilePath, - void * inRef); + const char * inFilePath, + void * inRef); /* * XPLMLookupObjects * - * This routine looks up a virtual path in the library system and returns all - * matching elements. You provide a callback - one virtual path may match many - * objects in the library. XPLMLookupObjects returns the number of objects - * found. + * This routine looks up a virtual path in the library system and returns all + * matching elements. You provide a callback - one virtual path may match many + * objects in the library. XPLMLookupObjects returns the number of objects + * found. * - * The latitude and longitude parameters specify the location the object will - * be used. The library system allows for scenery packages to only provide - * objects to certain local locations. Only objects that are allowed at the - * latitude/longitude you provide will be returned. + * The latitude and longitude parameters specify the location the object will + * be used. The library system allows for scenery packages to only provide + * objects to certain local locations. Only objects that are allowed at the + * latitude/longitude you provide will be returned. * */ -XPLM_API int XPLMLookupObjects( - const char * inPath, - float inLatitude, - float inLongitude, - XPLMLibraryEnumerator_f enumerator, - void * ref); +XPLM_API int XPLMLookupObjects( + const char * inPath, + float inLatitude, + float inLongitude, + XPLMLibraryEnumerator_f enumerator, + void * ref); #endif /* XPLM200 */ #ifdef __cplusplus diff --git a/src/SDK/CHeaders/XPLM/XPLMUtilities.h b/src/SDK/CHeaders/XPLM/XPLMUtilities.h index a3bab8c8..bec319e1 100755 --- a/src/SDK/CHeaders/XPLM/XPLMUtilities.h +++ b/src/SDK/CHeaders/XPLM/XPLMUtilities.h @@ -2,18 +2,14 @@ #define _XPLMUtilities_h_ /* - * 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 * */ -/* - * - * - */ +/*************************************************************************** + * XPLMUtilities + ***************************************************************************/ #include "XPLMDefs.h" @@ -22,668 +18,512 @@ extern "C" { #endif /*************************************************************************** - * X-PLANE USER INTERACTION + * FILE UTILITIES ***************************************************************************/ /* - * The user interaction APIs let you simulate commands the user can do with a - * joystick, keyboard etc. Note that it is generally safer for future - * compatibility to use one of these commands than to manipulate the - * underlying sim data. - * - */ - - -/* - * XPLMCommandKeyID + * The XPLMUtilities file APIs provide some basic file and path functions for + * use with X-Plane. * - * These enums represent all the keystrokes available within X-Plane. They can - * be sent to X-Plane directly. For example, you can reverse thrust using - * these enumerations. - * - */ -enum { - xplm_key_pause=0, - xplm_key_revthrust, - xplm_key_jettison, - xplm_key_brakesreg, - xplm_key_brakesmax, - xplm_key_gear, - xplm_key_timedn, - xplm_key_timeup, - xplm_key_fadec, - xplm_key_otto_dis, - xplm_key_otto_atr, - xplm_key_otto_asi, - xplm_key_otto_hdg, - xplm_key_otto_gps, - xplm_key_otto_lev, - xplm_key_otto_hnav, - xplm_key_otto_alt, - xplm_key_otto_vvi, - xplm_key_otto_vnav, - xplm_key_otto_nav1, - xplm_key_otto_nav2, - xplm_key_targ_dn, - xplm_key_targ_up, - xplm_key_hdgdn, - xplm_key_hdgup, - xplm_key_barodn, - xplm_key_baroup, - xplm_key_obs1dn, - xplm_key_obs1up, - xplm_key_obs2dn, - xplm_key_obs2up, - xplm_key_com1_1, - xplm_key_com1_2, - xplm_key_com1_3, - xplm_key_com1_4, - xplm_key_nav1_1, - xplm_key_nav1_2, - xplm_key_nav1_3, - xplm_key_nav1_4, - xplm_key_com2_1, - xplm_key_com2_2, - xplm_key_com2_3, - xplm_key_com2_4, - xplm_key_nav2_1, - xplm_key_nav2_2, - xplm_key_nav2_3, - xplm_key_nav2_4, - xplm_key_adf_1, - xplm_key_adf_2, - xplm_key_adf_3, - xplm_key_adf_4, - xplm_key_adf_5, - xplm_key_adf_6, - xplm_key_transpon_1, - xplm_key_transpon_2, - xplm_key_transpon_3, - xplm_key_transpon_4, - xplm_key_transpon_5, - xplm_key_transpon_6, - xplm_key_transpon_7, - xplm_key_transpon_8, - xplm_key_flapsup, - xplm_key_flapsdn, - xplm_key_cheatoff, - xplm_key_cheaton, - xplm_key_sbrkoff, - xplm_key_sbrkon, - xplm_key_ailtrimL, - xplm_key_ailtrimR, - xplm_key_rudtrimL, - xplm_key_rudtrimR, - xplm_key_elvtrimD, - xplm_key_elvtrimU, - xplm_key_forward, - xplm_key_down, - xplm_key_left, - xplm_key_right, - xplm_key_back, - xplm_key_tower, - xplm_key_runway, - xplm_key_chase, - xplm_key_free1, - xplm_key_free2, - xplm_key_spot, - xplm_key_fullscrn1, - xplm_key_fullscrn2, - xplm_key_tanspan, - xplm_key_smoke, - xplm_key_map, - xplm_key_zoomin, - xplm_key_zoomout, - xplm_key_cycledump, - xplm_key_replay, - xplm_key_tranID, - xplm_key_max -}; -typedef int XPLMCommandKeyID; - -/* - * XPLMCommandButtonID + * Directory Separators + * -------------------- * - * These are enumerations for all of the things you can do with a joystick - * button in X-Plane. They currently match the buttons menu in the equipment - * setup dialog, but these enums will be stable even if they change in - * X-Plane. - * - */ -enum { - xplm_joy_nothing=0, - xplm_joy_start_all, - xplm_joy_start_0, - xplm_joy_start_1, - xplm_joy_start_2, - xplm_joy_start_3, - xplm_joy_start_4, - xplm_joy_start_5, - xplm_joy_start_6, - xplm_joy_start_7, - xplm_joy_throt_up, - xplm_joy_throt_dn, - xplm_joy_prop_up, - xplm_joy_prop_dn, - xplm_joy_mixt_up, - xplm_joy_mixt_dn, - xplm_joy_carb_tog, - xplm_joy_carb_on, - xplm_joy_carb_off, - xplm_joy_trev, - xplm_joy_trm_up, - xplm_joy_trm_dn, - xplm_joy_rot_trm_up, - xplm_joy_rot_trm_dn, - xplm_joy_rud_lft, - xplm_joy_rud_cntr, - xplm_joy_rud_rgt, - xplm_joy_ail_lft, - xplm_joy_ail_cntr, - xplm_joy_ail_rgt, - xplm_joy_B_rud_lft, - xplm_joy_B_rud_rgt, - xplm_joy_look_up, - xplm_joy_look_dn, - xplm_joy_look_lft, - xplm_joy_look_rgt, - xplm_joy_glance_l, - xplm_joy_glance_r, - xplm_joy_v_fnh, - xplm_joy_v_fwh, - xplm_joy_v_tra, - xplm_joy_v_twr, - xplm_joy_v_run, - xplm_joy_v_cha, - xplm_joy_v_fr1, - xplm_joy_v_fr2, - xplm_joy_v_spo, - xplm_joy_flapsup, - xplm_joy_flapsdn, - xplm_joy_vctswpfwd, - xplm_joy_vctswpaft, - xplm_joy_gear_tog, - xplm_joy_gear_up, - xplm_joy_gear_down, - xplm_joy_lft_brake, - xplm_joy_rgt_brake, - xplm_joy_brakesREG, - xplm_joy_brakesMAX, - xplm_joy_speedbrake, - xplm_joy_ott_dis, - xplm_joy_ott_atr, - xplm_joy_ott_asi, - xplm_joy_ott_hdg, - xplm_joy_ott_alt, - xplm_joy_ott_vvi, - xplm_joy_tim_start, - xplm_joy_tim_reset, - xplm_joy_ecam_up, - xplm_joy_ecam_dn, - xplm_joy_fadec, - xplm_joy_yaw_damp, - xplm_joy_art_stab, - xplm_joy_chute, - xplm_joy_JATO, - xplm_joy_arrest, - xplm_joy_jettison, - xplm_joy_fuel_dump, - xplm_joy_puffsmoke, - xplm_joy_prerotate, - xplm_joy_UL_prerot, - xplm_joy_UL_collec, - xplm_joy_TOGA, - xplm_joy_shutdown, - xplm_joy_con_atc, - xplm_joy_fail_now, - xplm_joy_pause, - xplm_joy_rock_up, - xplm_joy_rock_dn, - xplm_joy_rock_lft, - xplm_joy_rock_rgt, - xplm_joy_rock_for, - xplm_joy_rock_aft, - xplm_joy_idle_hilo, - xplm_joy_lanlights, - xplm_joy_max -}; -typedef int XPLMCommandButtonID; - -/* - * XPLMHostApplicationID + * The XPLM has two modes it can work in: * - * The plug-in system is based on Austin's cross-platform OpenGL framework and - * could theoretically be adapted to run in other apps like WorldMaker. The - * plug-in system also runs against a test harness for internal development - * and could be adapted to another flight sim (in theory at least). So an ID - * is providing allowing plug-ins to indentify what app they are running - * under. - * - */ -enum { - xplm_Host_Unknown = 0 - - ,xplm_Host_XPlane = 1 - - ,xplm_Host_PlaneMaker = 2 - - ,xplm_Host_WorldMaker = 3 - - ,xplm_Host_Briefer = 4 - - ,xplm_Host_PartMaker = 5 - - ,xplm_Host_YoungsMod = 6 - - ,xplm_Host_XAuto = 7 - - -}; -typedef int XPLMHostApplicationID; - -/* - * XPLMLanguageCode + * * X-Plane native paths: all paths are UTF8 strings, using the unix forward + * slash (/) as the directory separating character. In native path mode, + * you use the same path format for all three operating systems. + * + * * Legacy OS paths: the directroy separator is \ for Windows, : for OS X, + * and / for Linux; OS paths are encoded in MacRoman for OS X using legacy + * HFS conventions, use the application code page for multi-byte encoding + * on Unix using DOS path conventions, and use UTF-8 for Linux. * - * These enums define what language the sim is running in. These enumerations - * do not imply that the sim can or does run in all of these languages; they - * simply provide a known encoding in the event that a given sim version is - * localized to a certain language. + * While legacy OS paths are the default, we strongly encourage you to opt in + * to native paths using the XPLMEnableFeature API. + * + * * All OS X plugins should enable native paths all of the time; if you do + * not do this, you will have to convert all paths back from HFS to Unix + * (and deal with MacRoman) - code written using native paths and the C + * file APIs "just works" on OS X. + * + * * For Linux plugins, there is no difference between the two encodings. + * + * * Windows plugins will need to convert the UTF8 file paths to UTF16 for + * use with the "wide" APIs. While it might seem tempting to stick with + * legacy OS paths (and just use the "ANSI" Windows APIs), X-Plane is fully + * unicode-capable, and will often be installed in paths where the user's + * directories have no ACP encoding. + * + * Full and Relative Paths + * ----------------------- + * + * Some of these APIs use full paths, but others use paths relative to the + * user's X-Plane installation. This is documented on a per-API basis. * */ -enum { - xplm_Language_Unknown = 0 - ,xplm_Language_English = 1 - - ,xplm_Language_French = 2 - - ,xplm_Language_German = 3 - - ,xplm_Language_Italian = 4 - - ,xplm_Language_Spanish = 5 - - ,xplm_Language_Korean = 6 - -#if defined(XPLM200) - ,xplm_Language_Russian = 7 - -#endif /* XPLM200 */ -#if defined(XPLM200) - ,xplm_Language_Greek = 8 - -#endif /* XPLM200 */ -#if defined(XPLM200) - ,xplm_Language_Japanese = 9 - -#endif /* XPLM200 */ -#if defined(XPLM200) - ,xplm_Language_Chinese = 10 - -#endif /* XPLM200 */ - -}; -typedef int XPLMLanguageCode; #if defined(XPLM200) /* * XPLMDataFileType * - * These enums define types of data files you can load or unload using the - * SDK. + * These enums define types of data files you can load or unload using the + * SDK. * */ enum { - /* A situation (.sit) file, which starts off a flight in a given * - * configuration. */ - xplm_DataFile_Situation = 1 + /* A situation (.sit) file, which starts off a flight in a given * + * configuration. */ + xplm_DataFile_Situation = 1, - /* A situation movie (.smo) file, which replays a past flight. */ - ,xplm_DataFile_ReplayMovie = 2 + /* A situation movie (.smo) file, which replays a past flight. */ + xplm_DataFile_ReplayMovie = 2, }; typedef int XPLMDataFileType; #endif /* XPLM200 */ -#if defined(XPLM200) /* - * XPLMError_f + * XPLMGetSystemPath * - * An XPLM error callback is a function that you provide to receive debugging - * information from the plugin SDK. See XPLMSetErrorCallback for more - * information. NOTE: for the sake of debugging, your error callback will be - * called even if your plugin is not enabled, allowing you to receive debug - * info in your XPluginStart and XPluginStop callbacks. To avoid causing logic - * errors in the management code, do not call any other plugin routines from - * your error callback - it is only meant for logging! + * This function returns the full path to the X-System folder. Note that this + * is a directory path, so it ends in a trailing : or /. + * + * The buffer you pass should be at least 512 characters long. The path is + * returned using the current native or OS path conventions. * */ -typedef void (* XPLMError_f)( - const char * inMessage); -#endif /* XPLM200 */ +XPLM_API void XPLMGetSystemPath( + char * outSystemPath); /* - * XPLMSimulateKeyPress + * XPLMGetPrefsPath * - * This function simulates a key being pressed for X-Plane. The keystroke goes - * directly to X-Plane; it is never sent to any plug-ins. However, since this - * is a raw key stroke it may be mapped by the keys file or enter text into a - * field. + * This routine returns a full path to a file that is within X-Plane's + * preferences directory. (You should remove the file name back to the last + * directory separator to get the preferences directory using + * XPLMExtractFileAndPath.) * - * WARNING: This function will be deprecated; do not use it. Instead use - * XPLMCommandKeyStroke. + * The buffer you pass should be at least 512 characters long. The path is + * returned using the current native or OS path conventions. * */ -XPLM_API void XPLMSimulateKeyPress( - int inKeyType, - int inKey); +XPLM_API void XPLMGetPrefsPath( + char * outPrefsPath); /* - * XPLMSpeakString + * XPLMGetDirectorySeparator * - * This function displays the string in a translucent overlay over the current - * display and also speaks the string if text-to-speech is enabled. The string - * is spoken asynchronously, this function returns immediately. + * This routine returns a string with one char and a null terminator that is + * the directory separator for the current platform. This allows you to write + * code that concatinates directory paths without having to #ifdef for + * platform. The character returned will reflect the current file path mode. * */ -XPLM_API void XPLMSpeakString( - const char * inString); +XPLM_API const char * XPLMGetDirectorySeparator(void); /* - * XPLMCommandKeyStroke + * XPLMExtractFileAndPath * - * This routine simulates a command-key stroke. However, the keys are done by - * function, not by actual letter, so this function works even if the user has - * remapped their keyboard. Examples of things you might do with this include - * pausing the simulator. + * Given a full path to a file, this routine separates the path from the file. + * If the path is a partial directory (e.g. ends in : or \) the trailing + * directory separator is removed. This routine works in-place; a pointer to + * the file part of the buffer is returned; the original buffer still starts + * with the path and is null terminated with no trailing separator. * */ -XPLM_API void XPLMCommandKeyStroke( - XPLMCommandKeyID inKey); +XPLM_API char * XPLMExtractFileAndPath( + char * inFullPath); /* - * XPLMCommandButtonPress + * XPLMGetDirectoryContents + * + * This routine returns a list of files in a directory (specified by a full + * path, no trailing : or \). The output is returned as a list of NULL + * terminated strings. An index array (if specified) is filled with pointers + * into the strings. The last file is indicated by a zero-length string (and + * NULL in the indices). This routine will return 1 if you had capacity for + * all files or 0 if you did not. You can also skip a given number of files. * - * This function simulates any of the actions that might be taken by pressing - * a joystick button. However, this lets you call the command directly rather - * than have to know which button is mapped where. Important: you must release - * each button you press. The APIs are separate so that you can 'hold down' a - * button for a fixed amount of time. + * * inDirectoryPath - a null terminated C string containing the full path to + * the directory with no trailing directory char. + * + * * inFirstReturn - the zero-based index of the first file in the directory + * to return. (Usually zero to fetch all in one pass.) + * + * * outFileNames - a buffer to receive a series of sequential null + * terminated C-string file names. A zero-length C string will be appended + * to the very end. + * + * * inFileNameBufSize - the size of the file name buffer in bytes. + * + * * outIndices - a pointer to an array of character pointers that will + * become an index into the directory. The last file will be followed by a + * NULL value. Pass NULL if you do not want indexing information. + * + * * inIndexCount - the max size of the index in entries. + * + * * outTotalFiles - if not NULL, this is filled in with the number of files + * in the directory. + * + * * outReturnedFiles - if not NULL, the number of files returned by this + * iteration. + * + * Return value: 1 if all info could be returned, 0 if there was a buffer + * overrun. + * + * WARNING: Before X-Plane 7 this routine did not properly iterate through + * directories. If X-Plane + * 6 compatibility is needed, use your own code to iterate directories. * */ -XPLM_API void XPLMCommandButtonPress( - XPLMCommandButtonID inButton); +XPLM_API int XPLMGetDirectoryContents( + const char * inDirectoryPath, + int inFirstReturn, + char * outFileNames, + int inFileNameBufSize, + char ** outIndices, /* Can be NULL */ + int inIndexCount, + int * outTotalFiles, /* Can be NULL */ + int * outReturnedFiles); /* Can be NULL */ +#if defined(XPLM200) /* - * XPLMCommandButtonRelease + * XPLMLoadDataFile * - * This function simulates any of the actions that might be taken by pressing - * a joystick button. See XPLMCommandButtonPress + * Loads a data file of a given type. Paths must be relative to the X-System + * folder. To clear the replay, pass a NULL file name (this is only valid with + * replay movies, not sit files). * */ -XPLM_API void XPLMCommandButtonRelease( - XPLMCommandButtonID inButton); +XPLM_API int XPLMLoadDataFile( + XPLMDataFileType inFileType, + const char * inFilePath); /* Can be NULL */ +#endif /* XPLM200 */ +#if defined(XPLM200) /* - * XPLMGetVirtualKeyDescription + * XPLMSaveDataFile * - * Given a virtual key code (as defined in XPLMDefs.h) this routine returns a - * human-readable string describing the character. This routine is provided - * for showing users what keyboard mappings they have set up. The string may - * read 'unknown' or be a blank or NULL string if the virtual key is unknown. + * Saves the current situation or replay; paths are relative to the X-System + * folder. * */ -XPLM_API const char * XPLMGetVirtualKeyDescription( - char inVirtualKey); +XPLM_API int XPLMSaveDataFile( + XPLMDataFileType inFileType, + const char * inFilePath); +#endif /* XPLM200 */ /*************************************************************************** * X-PLANE MISC ***************************************************************************/ -/* - * - * - */ /* - * XPLMReloadScenery + * XPLMHostApplicationID * - * XPLMReloadScenery reloads the current set of scenery. You can use this - * function in two typical ways: simply call it to reload the scenery, picking - * up any new installed scenery, .env files, etc. from disk. Or, change the - * lat/ref and lon/ref data refs and then call this function to shift the - * scenery environment. + * While the plug-in SDK is only accessible to plugins running inside X-Plane, + * the original authors considered extending the API to other applications + * that shared basic infrastructure with X-Plane. These enumerations are + * hold-overs from that original roadmap; all values other than X-Plane are + * deprecated. Your plugin should never need this enumeration. * */ -XPLM_API void XPLMReloadScenery(void); +enum { + xplm_Host_Unknown = 0, -/* - * XPLMGetSystemPath - * - * This function returns the full path to the X-System folder. Note that this - * is a directory path, so it ends in a trailing : or /. The buffer you pass - * should be at least 512 characters long. - * - */ -XPLM_API void XPLMGetSystemPath( - char * outSystemPath); + xplm_Host_XPlane = 1, -/* - * XPLMGetPrefsPath - * - * This routine returns a full path to a file that is within X-Plane's - * preferences directory. (You should remove the file name back to the last - * directory separator to get the preferences directory. The buffer you pass - * should be at least 512 characters long. - * - */ -XPLM_API void XPLMGetPrefsPath( - char * outPrefsPath); +#if defined(XPLM_DEPRECATED) + xplm_Host_PlaneMaker = 2, -/* - * XPLMGetDirectorySeparator - * - * This routine returns a string with one char and a null terminator that is - * the directory separator for the current platform. This allows you to write - * code that concatinates directory paths without having to #ifdef for - * platform. - * - */ -XPLM_API const char * XPLMGetDirectorySeparator(void); +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + xplm_Host_WorldMaker = 3, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + xplm_Host_Briefer = 4, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + xplm_Host_PartMaker = 5, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + xplm_Host_YoungsMod = 6, + +#endif /* XPLM_DEPRECATED */ +#if defined(XPLM_DEPRECATED) + xplm_Host_XAuto = 7, + +#endif /* XPLM_DEPRECATED */ + +}; +typedef int XPLMHostApplicationID; /* - * XPLMExtractFileAndPath + * XPLMLanguageCode * - * Given a full path to a file, this routine separates the path from the file. - * If the path is a partial directory (e.g. ends in : or \) the trailing - * directory separator is removed. This routine works in-place; a pointer to - * the file part of the buffer is returned; the original buffer still starts - * with the path. + * These enums define what language the sim is running in. These enumerations + * do not imply that the sim can or does run in all of these languages; they + * simply provide a known encoding in the event that a given sim version is + * localized to a certain language. * */ -XPLM_API char * XPLMExtractFileAndPath( - char * inFullPath); +enum { + xplm_Language_Unknown = 0, + xplm_Language_English = 1, + + xplm_Language_French = 2, + + xplm_Language_German = 3, + + xplm_Language_Italian = 4, + + xplm_Language_Spanish = 5, + + xplm_Language_Korean = 6, + +#if defined(XPLM200) + xplm_Language_Russian = 7, + +#endif /* XPLM200 */ +#if defined(XPLM200) + xplm_Language_Greek = 8, + +#endif /* XPLM200 */ +#if defined(XPLM200) + xplm_Language_Japanese = 9, + +#endif /* XPLM200 */ +#if defined(XPLM300) + xplm_Language_Chinese = 10, + +#endif /* XPLM300 */ + +}; +typedef int XPLMLanguageCode; + +#if defined(XPLM200) /* - * XPLMGetDirectoryContents - * - * This routine returns a list of files in a directory (specified by a full - * path, no trailing : or \). The output is returned as a list of NULL - * terminated strings. An index array (if specified) is filled with pointers - * into the strings. This routine The last file is indicated by a zero-length - * string (and NULL in the indices). This routine will return 1 if you had - * capacity for all files or 0 if you did not. You can also skip a given - * number of files. - * - * inDirectoryPath - a null terminated C string containing the full path to - * the directory with no trailing directory char. - * - * inFirstReturn - the zero-based index of the first file in the directory to - * return. (Usually zero to fetch all in one pass.) - * - * outFileNames - a buffer to receive a series of sequential null terminated - * C-string file names. A zero-length C string will be appended to the very - * end. - * - * inFileNameBufSize - the size of the file name buffer in bytes. - * - * outIndices - a pointer to an array of character pointers that will become - * an index into the directory. The last file will be followed by a NULL - * value. Pass NULL if you do not want indexing information. - * - * inIndexCount - the max size of the index in entries. - * - * outTotalFiles - if not NULL, this is filled in with the number of files in - * the directory. - * - * outReturnedFiles - if not NULL, the number of files returned by this - * iteration. - * - * Return value - 1 if all info could be returned, 0 if there was a buffer - * overrun. + * XPLMError_f * - * WARNING: Before X-Plane 7 this routine did not properly iterate through - * directories. If X-Plane 6 compatibility is needed, use your own code to - * iterate directories. + * An XPLM error callback is a function that you provide to receive debugging + * information from the plugin SDK. See XPLMSetErrorCallback for more + * information. NOTE: for the sake of debugging, your error callback will be + * called even if your plugin is not enabled, allowing you to receive debug + * info in your XPluginStart and XPluginStop callbacks. To avoid causing logic + * errors in the management code, do not call any other plugin routines from + * your error callback - it is only meant for catching errors in the + * debugging. * */ -XPLM_API int XPLMGetDirectoryContents( - const char * inDirectoryPath, - int inFirstReturn, - char * outFileNames, - int inFileNameBufSize, - char ** outIndices, /* Can be NULL */ - int inIndexCount, - int * outTotalFiles, /* Can be NULL */ - int * outReturnedFiles); /* Can be NULL */ +typedef void (* XPLMError_f)( + const char * inMessage); +#endif /* XPLM200 */ +#if defined(XPLM_DEPRECATED) /* * XPLMInitialized * - * This function returns 1 if X-Plane has properly initialized the plug-in - * system. If this routine returns 0, many XPLM functions will not work. - * - * NOTE: Under normal circumstances a plug-in should never be running while - * the plug-in manager is not initialized. + * Deprecated: This function returns 1 if X-Plane has properly initialized the + * plug-in system. If this routine returns 0, many XPLM functions will not + * work. * - * WARNING: This function is generally not needed and may be deprecated in the - * future. + * NOTE: because plugins are always called from within the XPLM, there is no + * need to check for initialization; it will always return 1. This routine is + * deprecated - you do not need to check it before continuing within your + * plugin. * */ -XPLM_API int XPLMInitialized(void); +XPLM_API int XPLMInitialized(void); +#endif /* XPLM_DEPRECATED */ /* * XPLMGetVersions * - * This routine returns the revision of both X-Plane and the XPLM DLL. All - * versions are three-digit decimal numbers (e.g. 606 for version 6.06 of - * X-Plane); the current revision of the XPLM is 200 (2.00). This routine also - * returns the host ID of the app running us. + * This routine returns the revision of both X-Plane and the XPLM DLL. All + * versions are three-digit decimal numbers (e.g. 606 for version 6.06 of + * X-Plane); the current revision of the XPLM is 200 (2.00). This routine also + * returns the host ID of the app running us. * - * The most common use of this routine is to special-case around X-Plane - * version-specific behavior. + * The most common use of this routine is to special-case around X-Plane + * version-specific behavior. * */ -XPLM_API void XPLMGetVersions( - int * outXPlaneVersion, - int * outXPLMVersion, - XPLMHostApplicationID * outHostID); +XPLM_API void XPLMGetVersions( + int * outXPlaneVersion, + int * outXPLMVersion, + XPLMHostApplicationID * outHostID); /* * XPLMGetLanguage * - * This routine returns the langauge the sim is running in. + * This routine returns the langauge the sim is running in. * */ -XPLM_API XPLMLanguageCode XPLMGetLanguage(void); +XPLM_API XPLMLanguageCode XPLMGetLanguage(void); +#if defined(XPLM200) /* - * XPLMDebugString + * XPLMFindSymbol + * + * This routine will attempt to find the symbol passed in the inString + * parameter. If the symbol is found a pointer the function is returned, + * othewise the function will return NULL. + * + * You can use XPLMFindSymbol to utilize newer SDK API features without + * requiring newer versions of the SDK (and X-Plane) as your minimum X-Plane + * version as follows: + * + * * Define the XPLMnnn macro to the minimum required XPLM version you will + * ship with (e.g. XPLM210 for X-Plane 10 compatibility). * - * This routine outputs a C-style string to the Log.txt file. The file is - * immediately flushed so you will not lose data. (This does cause a - * performance penalty.) + * * Use XPLMGetVersions and XPLMFindSymbol to detect that the host sim is + * new enough to use new functions and resolve function pointers. + * + * * Conditionally use the new functions if and only if XPLMFindSymbol only + * returns a non- NULL pointer. + * + * Warning: you should always check the XPLM API version as well as the + * results of XPLMFindSymbol to determine if funtionality is safe to use. + * + * To use functionality via XPLMFindSymbol you will need to copy your own + * definitions of the X-Plane API prototypes and cast the returned pointer to + * the correct type. * */ -XPLM_API void XPLMDebugString( - const char * inString); +XPLM_API void * XPLMFindSymbol( + const char * inString); +#endif /* XPLM200 */ #if defined(XPLM200) /* * XPLMSetErrorCallback * - * XPLMSetErrorCallback installs an error-reporting callback for your plugin. - * Normally the plugin system performs minimum diagnostics to maximize - * performance. When you install an error callback, you will receive calls due - * to certain plugin errors, such as passing bad parameters or incorrect data. + * XPLMSetErrorCallback installs an error-reporting callback for your plugin. + * Normally the plugin system performs minimum diagnostics to maximize + * performance. When you install an error callback, you will receive calls due + * to certain plugin errors, such as passing bad parameters or incorrect data. * + * Important: the error callback determines *programming* errors, e.g. bad API + * parameters. Every error that is returned by the error callback represents a + * mistake in your plugin that you should fix. Error callbacks are not used to + * report expected run-time problems (e.g. disk I/O errors). * - * The intention is for you to install the error callback during debug - * sections and put a break-point inside your callback. This will cause you to - * break into the debugger from within the SDK at the point in your plugin - * where you made an illegal call. + * The intention is for you to install the error callback during debug + * sections and put a break-point inside your callback. This will cause you to + * break into the debugger from within the SDK at the point in your plugin + * where you made an illegal call. * - * Installing an error callback may activate error checking code that would - * not normally run, and this may adversely affect performance, so do not - * leave error callbacks installed in shipping plugins. + * Installing an error callback may activate error checking code that would + * not normally run, and this may adversely affect performance, so do not + * leave error callbacks installed in shipping plugins. Since the only useful + * response to an error is to change code, error callbacks are not useful "in + * the field". * */ -XPLM_API void XPLMSetErrorCallback( - XPLMError_f inCallback); +XPLM_API void XPLMSetErrorCallback( + XPLMError_f inCallback); #endif /* XPLM200 */ -#if defined(XPLM200) /* - * XPLMFindSymbol + * XPLMDebugString + * + * This routine outputs a C-style string to the Log.txt file. The file is + * immediately flushed so you will not lose data. (This does cause a + * performance penalty.) * - * This routine will attempt to find the symbol passed in the inString - * parameter. If the symbol is found a pointer the function is returned, - * othewise the function will return NULL. + * Please do *not* leave routine diagnostic logging enabled in your shipping + * plugin. The X-Plane Log file is shared by X-Plane and every plugin in the + * system, and plugins that (when functioning normally) print verbose log + * output make it difficult for developers to find error conditions from other + * parts of the system. * */ -XPLM_API void * XPLMFindSymbol( - const char * inString); -#endif /* XPLM200 */ +XPLM_API void XPLMDebugString( + const char * inString); -#if defined(XPLM200) /* - * XPLMLoadDataFile + * XPLMSpeakString + * + * This function displays the string in a translucent overlay over the current + * display and also speaks the string if text-to-speech is enabled. The string + * is spoken asynchronously, this function returns immediately. This function + * may not speak or print depending on user preferences. + * + */ +XPLM_API void XPLMSpeakString( + const char * inString); + +/* + * XPLMGetVirtualKeyDescription * - * Loads a data file of a given type. Paths must be relative to the X-System - * folder. To clear the replay, pass a NULL file name (this is only valid with - * replay movies, not sit files). + * Given a virtual key code (as defined in XPLMDefs.h) this routine returns a + * human-readable string describing the character. This routine is provided + * for showing users what keyboard mappings they have set up. The string may + * read 'unknown' or be a blank or NULL string if the virtual key is unknown. * */ -XPLM_API int XPLMLoadDataFile( - XPLMDataFileType inFileType, - const char * inFilePath); /* Can be NULL */ -#endif /* XPLM200 */ +XPLM_API const char * XPLMGetVirtualKeyDescription( + char inVirtualKey); -#if defined(XPLM200) /* - * XPLMSaveDataFile + * XPLMReloadScenery * - * Saves the current situation or replay; paths are relative to the X-System - * folder. + * XPLMReloadScenery reloads the current set of scenery. You can use this + * function in two typical ways: simply call it to reload the scenery, picking + * up any new installed scenery, .env files, etc. from disk. Or, change the + * lat/ref and lon/ref data refs and then call this function to shift the + * scenery environment. This routine is equivalent to picking "reload + * scenery" from the developer menu. * */ -XPLM_API int XPLMSaveDataFile( - XPLMDataFileType inFileType, - const char * inFilePath); -#endif /* XPLM200 */ +XPLM_API void XPLMReloadScenery(void); #if defined(XPLM200) /*************************************************************************** * X-PLANE COMMAND MANAGEMENT ***************************************************************************/ /* - * The command management APIs let plugins interact with the command-system in - * X-Plane, the abstraction behind keyboard presses and joystick buttons. This - * API lets you create new commands and modify the behavior (or get - * notification) of existing ones. + * The command management APIs let plugins interact with the command-system in + * X-Plane, the abstraction behind keyboard presses and joystick buttons. This + * API lets you create new commands and modify the behavior (or get + * notification) of existing ones. + * + * X-Plane Command Phases + * ---------------------- + * + * X-Plane commands are not instantaneous; they operate over a duration. + * (Think of a joystick button press - you can press, hold down, and then + * release the joystick button; X-Plane commands model this entire process.) + * + * An X-Plane command consists of three phases: a beginning, continuous + * repetition, and an ending. The command may be repeated zero times in its + * duration, followed by one command ending. Command begin and end messges are + * balanced, but a command may be bound to more than one event source (e.g. a + * keyboard key and a joystick button), in which case you may receive a second + * begin during before any end). * - * An X-Plane command consists of three phases: a beginning, continuous - * repetition, and an ending. The command may be repeated zero times in the - * event that the user presses a button only momentarily. + * When you issue commands in the plugin system, you *must* balance every call + * to XPLMCommandBegin with a call to XPLMCommandEnd with the same command + * reference. + * + * Command Behavior Modification + * ----------------------------- + * + * You can register a callback to handle a command either before or after + * X-Plane does; if you receive the command before X-Plane you have the option + * to either let X-Plane handle the command or hide the command from X-Plane. + * This lets plugins both augment commands and replace them. + * + * If you register for an existing command, be sure that you are *consistent* + * in letting X-Plane handle or not handle the command; you are responsible + * for passing a *balanced* number of begin and end messages to X-Plane. (E.g. + * it is not legal to pass all the begin messages to X-Plane but hide all the + * end messages). * */ @@ -691,18 +531,18 @@ XPLM_API int XPLMSaveDataFile( /* * XPLMCommandPhase * - * The phases of a command. + * The phases of a command. * */ enum { - /* The command is being started. */ - xplm_CommandBegin = 0 + /* The command is being started. */ + xplm_CommandBegin = 0, - /* The command is continuing to execute. */ - ,xplm_CommandContinue = 1 + /* The command is continuing to execute. */ + xplm_CommandContinue = 1, - /* The command has ended. */ - ,xplm_CommandEnd = 2 + /* The command has ended. */ + xplm_CommandEnd = 2, }; @@ -711,14 +551,14 @@ typedef int XPLMCommandPhase; /* * XPLMCommandRef * - * A command ref is an opaque identifier for an X-Plane command. Command - * references stay the same for the life of your plugin but not between - * executions of X-Plane. Command refs are used to execute commands, create - * commands, and create callbacks for particular commands. + * A command ref is an opaque identifier for an X-Plane command. Command + * references stay the same for the life of your plugin but not between + * executions of X-Plane. Command refs are used to execute commands, create + * commands, and create callbacks for particular commands. * - * Note that a command is not "owned" by a particular plugin. Since many - * plugins may participate in a command's execution, the command does not go - * away if the plugin that created it is unloaded. + * Note that a command is not "owned" by a particular plugin. Since many + * plugins may participate in a command's execution, the command does not go + * away if the plugin that created it is unloaded. * */ typedef void * XPLMCommandRef; @@ -726,108 +566,403 @@ typedef void * XPLMCommandRef; /* * XPLMCommandCallback_f * - * A command callback is a function in your plugin that is called when a - * command is pressed. Your callback receives the command reference for the - * particular command, the phase of the command that is executing, and a - * reference pointer that you specify when registering the callback. + * A command callback is a function in your plugin that is called when a + * command is pressed. Your callback receives the command reference for the + * particular command, the phase of the command that is executing, and a + * reference pointer that you specify when registering the callback. * - * Your command handler should return 1 to let processing of the command - * continue to other plugins and X-Plane, or 0 to halt processing, potentially - * bypassing X-Plane code. + * Your command handler should return 1 to let processing of the command + * continue to other plugins and X-Plane, or 0 to halt processing, potentially + * bypassing X-Plane code. * */ typedef int (* XPLMCommandCallback_f)( - XPLMCommandRef inCommand, - XPLMCommandPhase inPhase, - void * inRefcon); + XPLMCommandRef inCommand, + XPLMCommandPhase inPhase, + void * inRefcon); /* * XPLMFindCommand * - * XPLMFindCommand looks up a command by name, and returns its command - * reference or NULL if the command does not exist. + * XPLMFindCommand looks up a command by name, and returns its command + * reference or NULL if the command does not exist. * */ -XPLM_API XPLMCommandRef XPLMFindCommand( - const char * inName); +XPLM_API XPLMCommandRef XPLMFindCommand( + const char * inName); /* * XPLMCommandBegin * - * XPLMCommandBegin starts the execution of a command, specified by its - * command reference. The command is "held down" until XPLMCommandEnd is - * called. + * XPLMCommandBegin starts the execution of a command, specified by its + * command reference. The command is "held down" until XPLMCommandEnd is + * called. You must balance each XPLMCommandBegin call with an XPLMCommandEnd + * call. * */ -XPLM_API void XPLMCommandBegin( - XPLMCommandRef inCommand); +XPLM_API void XPLMCommandBegin( + XPLMCommandRef inCommand); /* * XPLMCommandEnd * - * XPLMCommandEnd ends the execution of a given command that was started with - * XPLMCommandBegin. + * XPLMCommandEnd ends the execution of a given command that was started with + * XPLMCommandBegin. You must not issue XPLMCommandEnd for a command you did + * not begin. * */ -XPLM_API void XPLMCommandEnd( - XPLMCommandRef inCommand); +XPLM_API void XPLMCommandEnd( + XPLMCommandRef inCommand); /* * XPLMCommandOnce * - * This executes a given command momentarily, that is, the command begins and - * ends immediately. + * This executes a given command momentarily, that is, the command begins and + * ends immediately. This is the equivalent of calling XPLMCommandBegin() and + * XPLMCommandEnd() back ot back. * */ -XPLM_API void XPLMCommandOnce( - XPLMCommandRef inCommand); +XPLM_API void XPLMCommandOnce( + XPLMCommandRef inCommand); /* * XPLMCreateCommand * - * XPLMCreateCommand creates a new command for a given string. If the command - * already exists, the existing command reference is returned. The description - * may appear in user interface contexts, such as the joystick configuration - * screen. + * XPLMCreateCommand creates a new command for a given string. If the command + * already exists, the existing command reference is returned. The description + * may appear in user interface contexts, such as the joystick configuration + * screen. * */ -XPLM_API XPLMCommandRef XPLMCreateCommand( - const char * inName, - const char * inDescription); +XPLM_API XPLMCommandRef XPLMCreateCommand( + const char * inName, + const char * inDescription); /* * XPLMRegisterCommandHandler * - * XPLMRegisterCommandHandler registers a callback to be called when a command - * is executed. You provide a callback with a reference pointer. + * XPLMRegisterCommandHandler registers a callback to be called when a command + * is executed. You provide a callback with a reference pointer. * - * If inBefore is true, your command handler callback will be executed before - * X-Plane executes the command, and returning 0 from your callback will - * disable X-Plane's processing of the command. If inBefore is false, your - * callback will run after X-Plane. (You can register a single callback both - * before and after a command.) + * If inBefore is true, your command handler callback will be executed before + * X-Plane executes the command, and returning 0 from your callback will + * disable X-Plane's processing of the command. If inBefore is false, your + * callback will run after X-Plane. (You can register a single callback both + * before and after a command.) * */ -XPLM_API void XPLMRegisterCommandHandler( - XPLMCommandRef inComand, - XPLMCommandCallback_f inHandler, - int inBefore, - void * inRefcon); +XPLM_API void XPLMRegisterCommandHandler( + XPLMCommandRef inComand, + XPLMCommandCallback_f inHandler, + int inBefore, + void * inRefcon); /* * XPLMUnregisterCommandHandler * - * XPLMUnregisterCommandHandler removes a command callback registered with - * XPLMRegisterCommandHandler. + * XPLMUnregisterCommandHandler removes a command callback registered with + * XPLMRegisterCommandHandler. * */ -XPLM_API void XPLMUnregisterCommandHandler( - XPLMCommandRef inComand, - XPLMCommandCallback_f inHandler, - int inBefore, - void * inRefcon); +XPLM_API void XPLMUnregisterCommandHandler( + XPLMCommandRef inComand, + XPLMCommandCallback_f inHandler, + int inBefore, + void * inRefcon); #endif /* XPLM200 */ +#if defined(XPLM_DEPRECATED) +/*************************************************************************** + * X-PLANE USER INTERACTION + ***************************************************************************/ +/* + * WARNING: The legacy user interaction API is deprecated; while it was the + * only way to run commands in X-Plane 6,7 and 8, it is obsolete, and was + * replaced by the command system API in X-Plane 9. You should not use this + * API; replace any of the calls below with XPLMCommand invocations based on + * persistent command strings. The documentation that follows is for historic + * reference only. + * + * The legacy user interaction APIs let you simulate commands the user can do + * with a joystick, keyboard etc. Note that it is generally safer for future + * compatibility to use one of these commands than to manipulate the + * underlying sim data. + * + */ + + +/* + * XPLMCommandKeyID + * + * These enums represent all the keystrokes available within X-Plane. They can + * be sent to X-Plane directly. For example, you can reverse thrust using + * these enumerations. + * + */ +enum { + xplm_key_pause=0, + xplm_key_revthrust, + xplm_key_jettison, + xplm_key_brakesreg, + xplm_key_brakesmax, + xplm_key_gear, + xplm_key_timedn, + xplm_key_timeup, + xplm_key_fadec, + xplm_key_otto_dis, + xplm_key_otto_atr, + xplm_key_otto_asi, + xplm_key_otto_hdg, + xplm_key_otto_gps, + xplm_key_otto_lev, + xplm_key_otto_hnav, + xplm_key_otto_alt, + xplm_key_otto_vvi, + xplm_key_otto_vnav, + xplm_key_otto_nav1, + xplm_key_otto_nav2, + xplm_key_targ_dn, + xplm_key_targ_up, + xplm_key_hdgdn, + xplm_key_hdgup, + xplm_key_barodn, + xplm_key_baroup, + xplm_key_obs1dn, + xplm_key_obs1up, + xplm_key_obs2dn, + xplm_key_obs2up, + xplm_key_com1_1, + xplm_key_com1_2, + xplm_key_com1_3, + xplm_key_com1_4, + xplm_key_nav1_1, + xplm_key_nav1_2, + xplm_key_nav1_3, + xplm_key_nav1_4, + xplm_key_com2_1, + xplm_key_com2_2, + xplm_key_com2_3, + xplm_key_com2_4, + xplm_key_nav2_1, + xplm_key_nav2_2, + xplm_key_nav2_3, + xplm_key_nav2_4, + xplm_key_adf_1, + xplm_key_adf_2, + xplm_key_adf_3, + xplm_key_adf_4, + xplm_key_adf_5, + xplm_key_adf_6, + xplm_key_transpon_1, + xplm_key_transpon_2, + xplm_key_transpon_3, + xplm_key_transpon_4, + xplm_key_transpon_5, + xplm_key_transpon_6, + xplm_key_transpon_7, + xplm_key_transpon_8, + xplm_key_flapsup, + xplm_key_flapsdn, + xplm_key_cheatoff, + xplm_key_cheaton, + xplm_key_sbrkoff, + xplm_key_sbrkon, + xplm_key_ailtrimL, + xplm_key_ailtrimR, + xplm_key_rudtrimL, + xplm_key_rudtrimR, + xplm_key_elvtrimD, + xplm_key_elvtrimU, + xplm_key_forward, + xplm_key_down, + xplm_key_left, + xplm_key_right, + xplm_key_back, + xplm_key_tower, + xplm_key_runway, + xplm_key_chase, + xplm_key_free1, + xplm_key_free2, + xplm_key_spot, + xplm_key_fullscrn1, + xplm_key_fullscrn2, + xplm_key_tanspan, + xplm_key_smoke, + xplm_key_map, + xplm_key_zoomin, + xplm_key_zoomout, + xplm_key_cycledump, + xplm_key_replay, + xplm_key_tranID, + xplm_key_max +}; +typedef int XPLMCommandKeyID; + +/* + * XPLMCommandButtonID + * + * These are enumerations for all of the things you can do with a joystick + * button in X-Plane. They currently match the buttons menu in the equipment + * setup dialog, but these enums will be stable even if they change in + * X-Plane. + * + */ +enum { + xplm_joy_nothing=0, + xplm_joy_start_all, + xplm_joy_start_0, + xplm_joy_start_1, + xplm_joy_start_2, + xplm_joy_start_3, + xplm_joy_start_4, + xplm_joy_start_5, + xplm_joy_start_6, + xplm_joy_start_7, + xplm_joy_throt_up, + xplm_joy_throt_dn, + xplm_joy_prop_up, + xplm_joy_prop_dn, + xplm_joy_mixt_up, + xplm_joy_mixt_dn, + xplm_joy_carb_tog, + xplm_joy_carb_on, + xplm_joy_carb_off, + xplm_joy_trev, + xplm_joy_trm_up, + xplm_joy_trm_dn, + xplm_joy_rot_trm_up, + xplm_joy_rot_trm_dn, + xplm_joy_rud_lft, + xplm_joy_rud_cntr, + xplm_joy_rud_rgt, + xplm_joy_ail_lft, + xplm_joy_ail_cntr, + xplm_joy_ail_rgt, + xplm_joy_B_rud_lft, + xplm_joy_B_rud_rgt, + xplm_joy_look_up, + xplm_joy_look_dn, + xplm_joy_look_lft, + xplm_joy_look_rgt, + xplm_joy_glance_l, + xplm_joy_glance_r, + xplm_joy_v_fnh, + xplm_joy_v_fwh, + xplm_joy_v_tra, + xplm_joy_v_twr, + xplm_joy_v_run, + xplm_joy_v_cha, + xplm_joy_v_fr1, + xplm_joy_v_fr2, + xplm_joy_v_spo, + xplm_joy_flapsup, + xplm_joy_flapsdn, + xplm_joy_vctswpfwd, + xplm_joy_vctswpaft, + xplm_joy_gear_tog, + xplm_joy_gear_up, + xplm_joy_gear_down, + xplm_joy_lft_brake, + xplm_joy_rgt_brake, + xplm_joy_brakesREG, + xplm_joy_brakesMAX, + xplm_joy_speedbrake, + xplm_joy_ott_dis, + xplm_joy_ott_atr, + xplm_joy_ott_asi, + xplm_joy_ott_hdg, + xplm_joy_ott_alt, + xplm_joy_ott_vvi, + xplm_joy_tim_start, + xplm_joy_tim_reset, + xplm_joy_ecam_up, + xplm_joy_ecam_dn, + xplm_joy_fadec, + xplm_joy_yaw_damp, + xplm_joy_art_stab, + xplm_joy_chute, + xplm_joy_JATO, + xplm_joy_arrest, + xplm_joy_jettison, + xplm_joy_fuel_dump, + xplm_joy_puffsmoke, + xplm_joy_prerotate, + xplm_joy_UL_prerot, + xplm_joy_UL_collec, + xplm_joy_TOGA, + xplm_joy_shutdown, + xplm_joy_con_atc, + xplm_joy_fail_now, + xplm_joy_pause, + xplm_joy_rock_up, + xplm_joy_rock_dn, + xplm_joy_rock_lft, + xplm_joy_rock_rgt, + xplm_joy_rock_for, + xplm_joy_rock_aft, + xplm_joy_idle_hilo, + xplm_joy_lanlights, + xplm_joy_max +}; +typedef int XPLMCommandButtonID; + +/* + * XPLMSimulateKeyPress + * + * This function simulates a key being pressed for X-Plane. The keystroke goes + * directly to X-Plane; it is never sent to any plug-ins. However, since this + * is a raw key stroke it may be mapped by the keys file or enter text into a + * field. + * + * Deprecated: use XPLMCommandOnce + * + */ +XPLM_API void XPLMSimulateKeyPress( + int inKeyType, + int inKey); + +/* + * XPLMCommandKeyStroke + * + * This routine simulates a command-key stroke. However, the keys are done by + * function, not by actual letter, so this function works even if the user has + * remapped their keyboard. Examples of things you might do with this include + * pausing the simulator. + * + * Deprecated: use XPLMCommandOnce + * + */ +XPLM_API void XPLMCommandKeyStroke( + XPLMCommandKeyID inKey); + +/* + * XPLMCommandButtonPress + * + * This function simulates any of the actions that might be taken by pressing + * a joystick button. However, this lets you call the command directly rather + * than have to know which button is mapped where. Important: you must release + * each button you press. The APIs are separate so that you can 'hold down' a + * button for a fixed amount of time. + * + * Deprecated: use XPLMCommandBegin. + * + */ +XPLM_API void XPLMCommandButtonPress( + XPLMCommandButtonID inButton); + +/* + * XPLMCommandButtonRelease + * + * This function simulates any of the actions that might be taken by pressing + * a joystick button. See XPLMCommandButtonPress. + * + * Deprecated: use XPLMCommandEnd. + * + */ +XPLM_API void XPLMCommandButtonRelease( + XPLMCommandButtonID inButton); + +#endif /* XPLM_DEPRECATED */ #ifdef __cplusplus } #endif diff --git a/src/SDK/Delphi/Widgets/XPStandardWidgets.pas b/src/SDK/Delphi/Widgets/XPStandardWidgets.pas index f8e0364a..d77f3838 100755 --- a/src/SDK/Delphi/Widgets/XPStandardWidgets.pas +++ b/src/SDK/Delphi/Widgets/XPStandardWidgets.pas @@ -1,42 +1,37 @@ { - 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 XPStandardWidgets; INTERFACE { - XPStandardWidgets - THEORY OF OPERATION + ## THEORY OF OPERATION - The standard widgets are widgets built into the widgets library. While you - can gain access to the widget function that drives them, you generally use - them by calling XPCreateWidget and then listening for special messages, - etc. + The standard widgets are widgets built into the widgets library. While you + can gain access to the widget function that drives them, you generally use + them by calling XPCreateWidget and then listening for special messages, + etc. - The standard widgets often send mesages to themselves when the user - performs an event; these messages are sent up the widget hierarchy until - they are handled. So you can add a widget proc directly to a push button - (for example) to intercept the message when it is clicked, or you can put - one widget proc on a window for all of the push buttons in the window. Most - of these messages contain the original widget ID as a parameter so you can - know which widget is messaging no matter who it is sent to. + The standard widgets often send mesages to themselves when the user + performs an event; these messages are sent up the widget hierarchy until + they are handled. So you can add a widget proc directly to a push button + (for example) to intercept the message when it is clicked, or you can put + one widget proc on a window for all of the push buttons in the window. Most + of these messages contain the original widget ID as a parameter so you can + know which widget is messaging no matter who it is sent to. } -USES XPWidgetDefs; +USES + XPWidgetDefs; {$A4} -{$IFDEF MSWINDOWS} - {$DEFINE DELPHI} -{$ENDIF} {___________________________________________________________________________ * MAIN WINDOW ___________________________________________________________________________} { - The main window widget class provides a "window" as the user knows it. - These windows are dragable and can be selected. Use them to create floating - windows and non-modal dialogs. + The main window widget class provides a "window" as the user knows it. + These windows are dragable and can be selected. Use them to create floating + windows and non-modal dialogs. } @@ -46,33 +41,31 @@ { Main Window Type Values - These type values are used to control the appearance of a main window. + These type values are used to control the appearance of a main window. } - { The standard main window; pin stripes on XP7, metal frame on XP 6. } + { The standard main window; pin stripes on XP7, metal frame on XP 6. } xpMainWindowStyle_MainWindow = 0 ; - { A translucent dark gray window, like the one ATC messages appear in. } + { A translucent dark gray window, like the one ATC messages appear in. } xpMainWindowStyle_Translucent = 1 ; { - Main Window Properties - + Main Window Properties } - { This property specifies the type of window. Set to one of the main window } - { types above. } + { This property specifies the type of window. Set to one of the main window } + { types above. } xpProperty_MainWindowType = 1100 ; - { This property specifies whether the main window has close boxes in its } - { corners. } + { This property specifies whether the main window has close boxes in its } + { corners. } xpProperty_MainWindowHasCloseBoxes = 1200 ; { - MainWindow Messages - + MainWindow Messages } - { This message is sent when the close buttons are pressed for your window. } + { This message is sent when the close buttons are pressed for your window. } xpMessage_CloseButtonPushed = 1200 ; @@ -80,9 +73,9 @@ * SUB WINDOW ___________________________________________________________________________} { - X-Plane dialogs are divided into separate areas; the sub window widgets - allow you to make these areas. Create one main window and place several - subwindows inside it. Then place your controls inside the subwindows. + X-Plane dialogs are divided into separate areas; the sub window widgets + allow you to make these areas. Create one main window and place several + subwindows inside it. Then place your controls inside the subwindows. } @@ -92,24 +85,23 @@ { SubWindow Type Values - These values control the appearance of the subwindow. + These values control the appearance of the subwindow. } - { A panel that sits inside a main window. } + { A panel that sits inside a main window. } xpSubWindowStyle_SubWindow = 0 ; - { A screen that sits inside a panel for showing text information. } + { A screen that sits inside a panel for showing text information. } xpSubWindowStyle_Screen = 2 ; - { A list view for scrolling lists. } + { A list view for scrolling lists. } xpSubWindowStyle_ListView = 3 ; { - SubWindow Properties - + SubWindow Properties } - { This property specifies the type of window. Set to one of the subwindow } - { types above. } + { This property specifies the type of window. Set to one of the subwindow } + { types above. } xpProperty_SubWindowType = 1200 ; @@ -117,22 +109,22 @@ * BUTTON ___________________________________________________________________________} { - The button class provides a number of different button styles and - behaviors, including push buttons, radio buttons, check boxes, etc. The - button label appears on or next to the button depending on the button's - appearance, or type. + The button class provides a number of different button styles and + behaviors, including push buttons, radio buttons, check boxes, etc. The + button label appears on or next to the button depending on the button's + appearance, or type. - The button's behavior is a separate property that dictates who it hilights - and what kinds of messages it sends. Since behavior and type are different, - you can do strange things like make check boxes that act as push buttons or - push buttons with radio button behavior. + The button's behavior is a separate property that dictates who it hilights + and what kinds of messages it sends. Since behavior and type are different, + you can do strange things like make check boxes that act as push buttons or + push buttons with radio button behavior. - In X-Plane 6 there were no check box graphics. The result is the following - behavior: in X-Plane 6 all check box and radio buttons are round - (radio-button style) buttons; in X-Plane 7 they are all square (check-box - style) buttons. In a future version of X-Plane, the xpButtonBehavior enums - will provide the correct graphic (check box or radio button) giving the - expected result. + In X-Plane 6 there were no check box graphics. The result is the following + behavior: in X-Plane + 6 all check box and radio buttons are round (radio-button style) buttons; + in X-Plane 7 they are all square (check-box style) buttons. In a future + version of X-Plane, the xpButtonBehavior enums will provide the correct + graphic (check box or radio button) giving the expected result. } @@ -142,84 +134,83 @@ { Button Types - These define the visual appearance of buttons but not how they respond to - the mouse. + These define the visual appearance of buttons but not how they respond to + the mouse. } - { This is a standard push button, like an 'OK' or 'Cancel' button in a dialog } - { box. } + { This is a standard push button, like an 'OK' or 'Cancel' button in a dialog} + { box. } xpPushButton = 0 ; - { A check box or radio button. Use this and the button behaviors below to } - { get the desired behavior. } + { A check box or radio button. Use this and the button behaviors below to } + { get the desired behavior. } xpRadioButton = 1 ; - { A window close box. } + { A window close box. } xpWindowCloseBox = 3 ; - { A small down arrow. } + { A small down arrow. } xpLittleDownArrow = 5 ; - { A small up arrow. } + { A small up arrow. } xpLittleUpArrow = 6 ; { Button Behavior Values - These define how the button responds to mouse clicks. + These define how the button responds to mouse clicks. } - { Standard push button behavior. The button hilites while the mouse is } - { clicked over it and unhilites when the mouse is moved outside of it or } - { released. If the mouse is released over the button, the } - { xpMsg_PushButtonPressed message is sent. } + { Standard push button behavior. The button hilites while the mouse is } + { clicked over it and unhilites when the mouse is moved outside of it or } + { released. If the mouse is released over the button, the } + { xpMsg_PushButtonPressed message is sent. } xpButtonBehaviorPushButton = 0 ; - { Check box behavior. The button immediately toggles its value when the mouse } - { is clicked and sends out a xpMsg_ButtonStateChanged message. } + { Check box behavior. The button immediately toggles its value when the mouse} + { is clicked and sends out a xpMsg_ButtonStateChanged message. } xpButtonBehaviorCheckBox = 1 ; - { Radio button behavior. The button immediately sets its state to one and } - { sends out a xpMsg_ButtonStateChanged message if it was not already set to } - { one. You must turn off other radio buttons in a group in your code. } + { Radio button behavior. The button immediately sets its state to one and } + { sends out a xpMsg_ButtonStateChanged message if it was not already set to } + { one. You must turn off other radio buttons in a group in your code. } xpButtonBehaviorRadioButton = 2 ; { - Button Properties - + Button Properties } - { This property sets the visual type of button. Use one of the button types } - { above. } + { This property sets the visual type of button. Use one of the button types } + { above. } xpProperty_ButtonType = 1300 ; - { This property sets the button's behavior. Use one of the button behaviors } - { above. } + { This property sets the button's behavior. Use one of the button behaviors } + { above. } xpProperty_ButtonBehavior = 1301 ; - { This property tells whether a check box or radio button is "checked" or } - { not. Not used for push buttons. } + { This property tells whether a check box or radio button is "checked" or } + { not. Not used for push buttons. } xpProperty_ButtonState = 1302 ; { Button Messages - These messages are sent by the button to itself and then up the widget - chain when the button is clicked. (You may intercept them by providing a - widget handler for the button itself or by providing a handler in a parent - widget.) + These messages are sent by the button to itself and then up the widget + chain when the button is clicked. (You may intercept them by providing a + widget handler for the button itself or by providing a handler in a parent + widget.) } - { This message is sent when the user completes a click and release in a } - { button with push button behavior. Parameter one of the message is the } - { widget ID of the button. This message is dispatched up the widget } - { hierarchy. } + { This message is sent when the user completes a click and release in a } + { button with push button behavior. Parameter one of the message is the } + { widget ID of the button. This message is dispatched up the widget } + { hierarchy. } xpMsg_PushButtonPressed = 1300 ; - { This message is sent when a button is clicked that has radio button or } - { check box behavior and its value changes. (Note that if the value changes } - { by setting a property you do not receive this message!) Parameter one is } - { the widget ID of the button, parameter 2 is the new state value, either } - { zero or one. This message is dispatched up the widget hierarchy. } + { This message is sent when a button is clicked that has radio button or } + { check box behavior and its value changes. (Note that if the value changes } + { by setting a property you do not receive this message!) Parameter one is } + { the widget ID of the button, parameter 2 is the new state value, either } + { zero or one. This message is dispatched up the widget hierarchy. } xpMsg_ButtonStateChanged = 1301 ; @@ -227,21 +218,21 @@ * TEXT FIELD ___________________________________________________________________________} { - The text field widget provides an editable text field including mouse - selection and keyboard navigation. The contents of the text field are its - descriptor. (The descriptor changes as the user types.) + The text field widget provides an editable text field including mouse + selection and keyboard navigation. The contents of the text field are its + descriptor. (The descriptor changes as the user types.) - The text field can have a number of types, that effect the visual layout of - the text field. The text field sends messages to itself so you may control - its behavior. + The text field can have a number of types, that effect the visual layout of + the text field. The text field sends messages to itself so you may control + its behavior. - If you need to filter keystrokes, add a new handler and intercept the key - press message. Since key presses are passed by pointer, you can modify the - keystroke and pass it through to the text field widget. + If you need to filter keystrokes, add a new handler and intercept the key + press message. Since key presses are passed by pointer, you can modify the + keystroke and pass it through to the text field widget. - WARNING: in X-Plane before 7.10 (including 6.70) null characters could - crash X-Plane. To prevent this, wrap this object with a filter function - (more instructions can be found on the SDK website). + WARNING: in X-Plane before 7.10 (including 6.70) null characters could + crash X-Plane. To prevent this, wrap this object with a filter function + (more instructions can be found on the SDK website). } @@ -251,66 +242,62 @@ { Text Field Type Values - These control the look of the text field. + These control the look of the text field. } - { A field for text entry. } + { A field for text entry. } xpTextEntryField = 0 ; - { A transparent text field. The user can type and the text is drawn, but no } - { background is drawn. You can draw your own background by adding a widget } - { handler and prehandling the draw message. } + { A transparent text field. The user can type and the text is drawn, but no } + { background is drawn. You can draw your own background by adding a widget } + { handler and prehandling the draw message. } xpTextTransparent = 3 ; - { A translucent edit field, dark gray. } + { A translucent edit field, dark gray. } xpTextTranslucent = 4 ; { - Text Field Properties - + Text Field Properties } - { This is the character position the selection starts at, zero based. If it } - { is the same as the end insertion point, the insertion point is not a } - { selection. } + { This is the character position the selection starts at, zero based. If it } + { is the same as the end insertion point, the insertion point is not a } + { selection. } xpProperty_EditFieldSelStart = 1400 ; - { This is the character position of the end of the selection. } + { This is the character position of the end of the selection. } xpProperty_EditFieldSelEnd = 1401 ; - { This is the character position a drag was started at if the user is } - { dragging to select text, or -1 if a drag is not in progress. } + { This is the character position a drag was started at if the user is } + { dragging to select text, or -1 if a drag is not in progress. } xpProperty_EditFieldSelDragStart = 1402 ; - { This is the type of text field to display, from the above list. } + { This is the type of text field to display, from the above list. } xpProperty_TextFieldType = 1403 ; - { Set this property to 1 to password protect the field. Characters will be } - { drawn as *s even though the descriptor will contain plain-text. } + { Set this property to 1 to password protect the field. Characters will be } + { drawn as *s even though the descriptor will contain plain-text. } xpProperty_PasswordMode = 1404 ; - { The max number of characters you can enter, if limited. Zero means } - { unlimited. } + { The max number of characters you can enter, if limited. Zero means } + { unlimited. } xpProperty_MaxCharacters = 1405 ; - { The first visible character on the left. This effectively scrolls the text } - { field. } + { The first visible character on the left. This effectively scrolls the text} + { field. } xpProperty_ScrollPosition = 1406 ; - { The font to draw the field's text with. (An XPLMFontID.) } + { The font to draw the field's text with. (An XPLMFontID.) } xpProperty_Font = 1407 ; - { This is the active side of the insert selection. (Internal) } + { This is the active side of the insert selection. (Internal) } xpProperty_ActiveEditSide = 1408 ; { - Text Field Messages - + Text Field Messages } - { Text Field Messages } - { } - { The text field sends this message to itself when its text changes. It sends } - { the message up the call chain; param1 is the text field's widget ID. } + { The text field sends this message to itself when its text changes. It sends} + { the message up the call chain; param1 is the text field's widget ID. } xpMsg_TextFieldChanged = 1400 ; @@ -318,9 +305,9 @@ * SCROLL BAR ___________________________________________________________________________} { - A standard scroll bar or slider control. The scroll bar has a minimum, - maximum and current value that is updated when the user drags it. The - scroll bar sends continuous messages as it is dragged. + A standard scroll bar or slider control. The scroll bar has a minimum, + maximum and current value that is updated when the user drags it. The + scroll bar sends continuous messages as it is dragged. } @@ -330,47 +317,43 @@ { Scroll Bar Type Values - This defines how the scroll bar looks. + This defines how the scroll bar looks. } - { Scroll bar types. } - { } - { A standard X-Plane scroll bar (with arrows on the ends). } + { A standard X-Plane scroll bar (with arrows on the ends). } xpScrollBarTypeScrollBar = 0 ; - { A slider, no arrows. } + { A slider, no arrows. } xpScrollBarTypeSlider = 1 ; { - Scroll Bar Properties - + Scroll Bar Properties } - { The current position of the thumb (in between the min and max, inclusive) } + { The current position of the thumb (in between the min and max, inclusive) } xpProperty_ScrollBarSliderPosition = 1500 ; - { The value the scroll bar has when the thumb is in the lowest position. } + { The value the scroll bar has when the thumb is in the lowest position. } xpProperty_ScrollBarMin = 1501 ; - { The value the scroll bar has when the thumb is in the highest position. } + { The value the scroll bar has when the thumb is in the highest position. } xpProperty_ScrollBarMax = 1502 ; - { How many units to moev the scroll bar when clicking next to the thumb. The } - { scroll bar always moves one unit when the arrows are clicked. } + { How many units to move the scroll bar when clicking next to the thumb. The } + { scroll bar always moves one unit when the arrows are clicked. } xpProperty_ScrollBarPageAmount = 1503 ; - { The type of scrollbar from the enums above. } + { The type of scrollbar from the enums above. } xpProperty_ScrollBarType = 1504 ; - { Used internally. } + { Used internally. } xpProperty_ScrollBarSlop = 1505 ; { - Scroll Bar Messages - + Scroll Bar Messages } - { The Scroll Bar sends this message when the slider position changes. It } - { sends the message up the call chain; param1 is the Scroll Bar widget ID. } + { The scroll bar sends this message when the slider position changes. It } + { sends the message up the call chain; param1 is the Scroll Bar widget ID. } xpMsg_ScrollBarSliderPositionChanged = 1500 ; @@ -378,9 +361,9 @@ * CAPTION ___________________________________________________________________________} { - A caption is a simple widget that shows its descriptor as a string, useful - for labeling parts of a window. It always shows its descriptor as its - string and is otherwise transparent. + A caption is a simple widget that shows its descriptor as a string, useful + for labeling parts of a window. It always shows its descriptor as its + string and is otherwise transparent. } @@ -388,11 +371,10 @@ xpWidgetClass_Caption = 6; { - Caption Properties - + Caption Properties } - { This property specifies whether the caption is lit; use lit captions } - { against screens. } + { This property specifies whether the caption is lit; use lit captions } + { against screens. } xpProperty_CaptionLit = 1600 ; @@ -400,8 +382,8 @@ * GENERAL GRAPHICS ___________________________________________________________________________} { - The general graphics widget can show one of many icons available from - X-Plane. + The general graphics widget can show one of many icons available from + X-Plane. } @@ -411,7 +393,7 @@ { General Graphics Types Values - These define the icon for the general graphics. + These define the icon for the general graphics. } xpShip = 4 ; @@ -453,10 +435,9 @@ ; { - General Graphics Properties - + General Graphics Properties } - { This property controls the type of icon that is drawn. } + { This property controls the type of icon that is drawn. } xpProperty_GeneralGraphicsType = 1700 ; @@ -464,25 +445,26 @@ * PROGRESS INDICATOR ___________________________________________________________________________} { - This widget implements a progress indicator as seen when X-Plane starts up. + This widget implements a progress indicator as seen when X-Plane starts up. } CONST xpWidgetClass_Progress = 8; { - Progress Indicator Properties - + Progress Indicator Properties } - { This is the current value of the progress indicator. } + { This is the current value of the progress indicator. } xpProperty_ProgressPosition = 1800 ; - { This is the minimum value, equivalent to 0% filled. } + { This is the minimum value, equivalent to 0% filled. } xpProperty_ProgressMin = 1801 ; - { This is the maximum value, equivalent to 100% filled. } + { This is the maximum value, equivalent to 100% filled. } xpProperty_ProgressMax = 1802 ; + IMPLEMENTATION + END. diff --git a/src/SDK/Delphi/Widgets/XPUIGraphics.pas b/src/SDK/Delphi/Widgets/XPUIGraphics.pas index 05bb28a1..65e06365 100755 --- a/src/SDK/Delphi/Widgets/XPUIGraphics.pas +++ b/src/SDK/Delphi/Widgets/XPUIGraphics.pas @@ -1,64 +1,53 @@ { - 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 XPUIGraphics; INTERFACE -{ - -} -USES XPWidgetDefs; +USES + XPWidgetDefs; {$A4} -{$IFDEF MSWINDOWS} - {$DEFINE DELPHI} -{$ENDIF} {___________________________________________________________________________ * UI GRAPHICS ___________________________________________________________________________} -{ - -} { XPWindowStyle - There are a few built-in window styles in X-Plane that you can use. + There are a few built-in window styles in X-Plane that you can use. - Note that X-Plane 6 does not offer real shadow-compositing; you must make - sure to put a window on top of another window of the right style to the - shadows work, etc. This applies to elements with insets and shadows. The - rules are: + Note that X-Plane 6 does not offer real shadow-compositing; you must make + sure to put a window on top of another window of the right style to the + shadows work, etc. This applies to elements with insets and shadows. The + rules are: - Sub windows must go on top of main windows, and screens and list views on - top of subwindows. Only help and main windows can be over the main screen. + Sub windows must go on top of main windows, and screens and list views on + top of subwindows. Only help and main windows can be over the main screen. - With X-Plane 7 any window or element may be placed over any other element. + With X-Plane 7 any window or element may be placed over any other element. - Some windows are scaled by stretching, some by repeating. The drawing - routines know which scaling method to use. The list view cannot be rescaled - in X-Plane 6 because it has both a repeating pattern and a gradient in one - element. All other elements can be rescaled. + Some windows are scaled by stretching, some by repeating. The drawing + routines know which scaling method to use. The list view cannot be rescaled + in X-Plane 6 because it has both a repeating pattern and a gradient in one + element. All other elements can be rescaled. } TYPE XPWindowStyle = ( - { An LCD screen that shows help. } + { An LCD screen that shows help. } xpWindow_Help = 0 - { A dialog box window. } + { A dialog box window. } ,xpWindow_MainWindow = 1 - { A panel or frame within a dialog box window. } + { A panel or frame within a dialog box window. } ,xpWindow_SubWindow = 2 - { An LCD screen within a panel to hold text displays. } + { An LCD screen within a panel to hold text displays. } ,xpWindow_Screen = 4 - { A list view within a panel for scrolling file names, etc. } + { A list view within a panel for scrolling file names, etc. } ,xpWindow_ListView = 5 ); @@ -67,160 +56,152 @@ { XPDrawWindow - This routine draws a window of the given dimensions at the given offset on - the virtual screen in a given style. The window is automatically scaled as - appropriate using a bitmap scaling technique (scaling or repeating) as - appropriate to the style. + This routine draws a window of the given dimensions at the given offset on + the virtual screen in a given style. The window is automatically scaled as + appropriate using a bitmap scaling technique (scaling or repeating) as + appropriate to the style. } PROCEDURE XPDrawWindow( - inX1 : integer; - inY1 : integer; - inX2 : integer; - inY2 : integer; + inX1 : Integer; + inY1 : Integer; + inX2 : Integer; + inY2 : Integer; inStyle : XPWindowStyle); -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPWIDGETS.DLL; { XPGetWindowDefaultDimensions - This routine returns the default dimensions for a window. Output is either - a minimum or fixed value depending on whether the window is scalable. + This routine returns the default dimensions for a window. Output is either + a minimum or fixed value depending on whether the window is scalable. } PROCEDURE XPGetWindowDefaultDimensions( inStyle : XPWindowStyle; - outWidth : Pinteger; { Can be nil } - outHeight : Pinteger); { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + outWidth : PInteger; { Can be nil } + outHeight : PInteger); { Can be nil } + cdecl; external XPWIDGETS.DLL; { XPElementStyle - Elements are individually drawable UI things like push buttons, etc. The - style defines what kind of element you are drawing. Elements can be - stretched in one or two dimensions (depending on the element). Some - elements can be lit. + Elements are individually drawable UI things like push buttons, etc. The + style defines what kind of element you are drawing. Elements can be + stretched in one or two dimensions (depending on the element). Some + elements can be lit. - In X-Plane 6 some elements must be drawn over metal. Some are scalable and - some are not. Any element can be drawn anywhere in X-Plane 7. + In X-Plane 6 some elements must be drawn over metal. Some are scalable and + some are not. Any element can be drawn anywhere in X-Plane 7. - Scalable Axis Required Background + Scalable Axis Required Background } TYPE XPElementStyle = ( - { x metal } + { x metal } xpElement_TextField = 6 - { none metal } + { none metal } ,xpElement_CheckBox = 9 - { none metal } + { none metal } ,xpElement_CheckBoxLit = 10 - { none window header } + { none window header } ,xpElement_WindowCloseBox = 14 - { none window header } + { none window header } ,xpElement_WindowCloseBoxPressed = 15 - { x metal } + { x metal } ,xpElement_PushButton = 16 - { x metal } + { x metal } ,xpElement_PushButtonLit = 17 - { none any } + { none any } ,xpElement_OilPlatform = 24 - { none any } + { none any } ,xpElement_OilPlatformSmall = 25 - { none any } + { none any } ,xpElement_Ship = 26 - { none any } + { none any } ,xpElement_ILSGlideScope = 27 - { none any } + { none any } ,xpElement_MarkerLeft = 28 - { none any } + { none any } ,xpElement_Airport = 29 - { none any } + { none any } ,xpElement_Waypoint = 30 - { none any } + { none any } ,xpElement_NDB = 31 - { none any } + { none any } ,xpElement_VOR = 32 - { none any } + { none any } ,xpElement_RadioTower = 33 - { none any } + { none any } ,xpElement_AircraftCarrier = 34 - { none any } + { none any } ,xpElement_Fire = 35 - { none any } + { none any } ,xpElement_MarkerRight = 36 - { none any } + { none any } ,xpElement_CustomObject = 37 - { none any } + { none any } ,xpElement_CoolingTower = 38 - { none any } + { none any } ,xpElement_SmokeStack = 39 - { none any } + { none any } ,xpElement_Building = 40 - { none any } + { none any } ,xpElement_PowerLine = 41 - { none metal } + { none metal } ,xpElement_CopyButtons = 45 - { none metal } + { none metal } ,xpElement_CopyButtonsWithEditingGrid = 46 - { x, y metal } + { x, y metal } ,xpElement_EditingGrid = 47 - { THIS CAN PROBABLY BE REMOVED } + { THIS CAN PROBABLY BE REMOVED } ,xpElement_ScrollBar = 48 - { none any } + { none any } ,xpElement_VORWithCompassRose = 49 - { none metal } + { none metal } ,xpElement_Zoomer = 51 - { x, y metal } + { x, y metal } ,xpElement_TextFieldMiddle = 52 - { none metal } + { none metal } ,xpElement_LittleDownArrow = 53 - { none metal } + { none metal } ,xpElement_LittleUpArrow = 54 - { none metal } + { none metal } ,xpElement_WindowDragBar = 61 - { none metal } + { none metal } ,xpElement_WindowDragBarSmooth = 62 ); @@ -229,66 +210,60 @@ { XPDrawElement - XPDrawElement draws a given element at an offset on the virtual screen in - set dimensions. EVEN if the element is not scalable, it will be scaled if - the width and height do not match the preferred dimensions; it'll just look - ugly. Pass inLit to see the lit version of the element; if the element - cannot be lit this is ignored. + XPDrawElement draws a given element at an offset on the virtual screen in + set dimensions. + *Even* if the element is not scalable, it will be scaled if the width and + height do not match the preferred dimensions; it'll just look ugly. Pass + inLit to see the lit version of the element; if the element cannot be lit + this is ignored. } PROCEDURE XPDrawElement( - inX1 : integer; - inY1 : integer; - inX2 : integer; - inY2 : integer; + inX1 : Integer; + inY1 : Integer; + inX2 : Integer; + inY2 : Integer; inStyle : XPElementStyle; - inLit : integer); -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inLit : Integer); + cdecl; external XPWIDGETS.DLL; { XPGetElementDefaultDimensions - This routine returns the recommended or minimum dimensions of a given UI - element. outCanBeLit tells whether the element has both a lit and unlit - state. Pass NULL to not receive any of these parameters. + This routine returns the recommended or minimum dimensions of a given UI + element. outCanBeLit tells whether the element has both a lit and unlit + state. Pass `NULL` to not receive any of these parameters. } PROCEDURE XPGetElementDefaultDimensions( inStyle : XPElementStyle; - outWidth : Pinteger; { Can be nil } - outHeight : Pinteger; { Can be nil } - outCanBeLit : Pinteger); { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + outWidth : PInteger; { Can be nil } + outHeight : PInteger; { Can be nil } + outCanBeLit : PInteger); { Can be nil } + cdecl; external XPWIDGETS.DLL; { XPTrackStyle - A track is a UI element that displays a value vertically or horizontally. - X-Plane has three kinds of tracks: scroll bars, sliders, and progress bars. - Tracks can be displayed either horizontally or vertically; tracks will - choose their own layout based on the larger dimension of their dimensions - (e.g. they know if they are tall or wide). Sliders may be lit or unlit - (showing the user manipulating them). + A track is a UI element that displays a value vertically or horizontally. + X-Plane has three kinds of tracks: scroll bars, sliders, and progress bars. + Tracks can be displayed either horizontally or vertically; tracks will + choose their own layout based on the larger dimension of their dimensions + (e.g. they know if they are tall or wide). Sliders may be lit or unlit + (showing the user manipulating them). - ScrollBar - this is a standard scroll bar with arrows and a thumb to drag. - Slider - this is a simple track with a ball in the middle that can be slid. - Progress - this is a progress indicator showing how a long task is going. + - ScrollBar: this is a standard scroll bar with arrows and a thumb to drag. + - Slider: this is a simple track with a ball in the middle that can be + slid. + - Progress: this is a progress indicator showing how a long task is going. } TYPE XPTrackStyle = ( - { not over metal can be lit can be rotated } + { not over metal can be lit can be rotated } xpTrack_ScrollBar = 0 - { over metal can be lit can be rotated } + { over metal can be lit can be rotated } ,xpTrack_Slider = 1 - { over metal cannot be lit cannot be rotated } + { over metal cannot be lit cannot be rotated } ,xpTrack_Progress = 2 ); @@ -297,81 +272,71 @@ { XPDrawTrack - This routine draws a track. You pass in the track dimensions and size; the - track picks the optimal orientation for these dimensions. Pass in the - track's minimum current and maximum values; the indicator will be - positioned appropriately. You can also specify whether the track is lit or - not. + This routine draws a track. You pass in the track dimensions and size; the + track picks the optimal orientation for these dimensions. Pass in the + track's minimum current and maximum values; the indicator will be + positioned appropriately. You can also specify whether the track is lit or + not. } PROCEDURE XPDrawTrack( - inX1 : integer; - inY1 : integer; - inX2 : integer; - inY2 : integer; - inMin : integer; - inMax : integer; - inValue : integer; + inX1 : Integer; + inY1 : Integer; + inX2 : Integer; + inY2 : Integer; + inMin : Integer; + inMax : Integer; + inValue : Integer; inTrackStyle : XPTrackStyle; - inLit : integer); -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inLit : Integer); + cdecl; external XPWIDGETS.DLL; { XPGetTrackDefaultDimensions - This routine returns a track's default smaller dimension; all tracks are - scalable in the larger dimension. It also returns whether a track can be - lit. + This routine returns a track's default smaller dimension; all tracks are + scalable in the larger dimension. It also returns whether a track can be + lit. } PROCEDURE XPGetTrackDefaultDimensions( inStyle : XPTrackStyle; - outWidth : Pinteger; - outCanBeLit : Pinteger); -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + outWidth : PInteger; + outCanBeLit : PInteger); + cdecl; external XPWIDGETS.DLL; { XPGetTrackMetrics - This routine returns the metrics of a track. If you want to write UI code - to manipulate a track, this routine helps you know where the mouse - locations are. For most other elements, the rectangle the element is drawn - in is enough information. However, the scrollbar drawing routine does some - automatic placement; this routine lets you know where things ended up. You - pass almost everything you would pass to the draw routine. You get out the - orientation, and other useful stuff. + This routine returns the metrics of a track. If you want to write UI code + to manipulate a track, this routine helps you know where the mouse + locations are. For most other elements, the rectangle the element is drawn + in is enough information. However, the scrollbar drawing routine does some + automatic placement; this routine lets you know where things ended up. You + pass almost everything you would pass to the draw routine. You get out the + orientation, and other useful stuff. - Besides orientation, you get five dimensions for the five parts of a - scrollbar, which are the down button, down area (area before the thumb), - the thumb, and the up area and button. For horizontal scrollers, the left - button decreases; for vertical scrollers, the top button decreases. + Besides orientation, you get five dimensions for the five parts of a + scrollbar, which are the down button, down area (area before the thumb), + the thumb, and the up area and button. For horizontal scrollers, the left + button decreases; for vertical scrollers, the top button decreases. } PROCEDURE XPGetTrackMetrics( - inX1 : integer; - inY1 : integer; - inX2 : integer; - inY2 : integer; - inMin : integer; - inMax : integer; - inValue : integer; + inX1 : Integer; + inY1 : Integer; + inX2 : Integer; + inY2 : Integer; + inMin : Integer; + inMax : Integer; + inValue : Integer; inTrackStyle : XPTrackStyle; - outIsVertical : Pinteger; - outDownBtnSize : Pinteger; - outDownPageSize : Pinteger; - outThumbSize : Pinteger; - outUpPageSize : Pinteger; - outUpBtnSize : Pinteger); -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + outIsVertical : PInteger; + outDownBtnSize : PInteger; + outDownPageSize : PInteger; + outThumbSize : PInteger; + outUpPageSize : PInteger; + outUpBtnSize : PInteger); + cdecl; external XPWIDGETS.DLL; + IMPLEMENTATION + END. diff --git a/src/SDK/Delphi/Widgets/XPWidgetDefs.pas b/src/SDK/Delphi/Widgets/XPWidgetDefs.pas index 8a38482d..1cc342ff 100755 --- a/src/SDK/Delphi/Widgets/XPWidgetDefs.pas +++ b/src/SDK/Delphi/Widgets/XPWidgetDefs.pas @@ -1,31 +1,23 @@ { - 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 XPWidgetDefs; INTERFACE -{ - -} -USES XPLMDefs; +USES + XPLMDefs; {$A4} -{$IFDEF MSWINDOWS} - {$DEFINE DELPHI} -{$ENDIF} {___________________________________________________________________________ * WIDGET DEFINITIONS ___________________________________________________________________________} { - A widget is a call-back driven screen entity like a push-button, window, - text entry field, etc. + A widget is a call-back driven screen entity like a push-button, window, + text entry field, etc. - Use the widget API to create widgets of various classes. You can nest them - into trees of widgets to create complex user interfaces. + Use the widget API to create widgets of various classes. You can nest them + into trees of widgets to create complex user interfaces. } @@ -33,10 +25,10 @@ { XPWidgetID - A Widget ID is an opaque unique non-zero handle identifying your widget. - Use 0 to specify "no widget". This type is defined as wide enough to hold a - pointer. You receive a widget ID when you create a new widget and then use - that widget ID to further refer to the widget. + A Widget ID is an opaque unique non-zero handle identifying your widget. + Use 0 to specify "no widget". This type is defined as wide enough to hold a + pointer. You receive a widget ID when you create a new widget and then use + that widget ID to further refer to the widget. } XPWidgetID = pointer; PXPWidgetID = ^XPWidgetID; @@ -44,46 +36,48 @@ { XPWidgetPropertyID - Properties are values attached to instances of your widgets. A property is - identified by a 32-bit ID and its value is the width of a pointer. + Properties are values attached to instances of your widgets. A property is + identified by a 32-bit ID and its value is the width of a pointer. - Each widget instance may have a property or not have it. When you set a - property on a widget for the first time, the property is added to the - widget; it then stays there for the life of the widget. + Each widget instance may have a property or not have it. When you set a + property on a widget for the first time, the property is added to the + widget; it then stays there for the life of the widget. - Some property IDs are predefined by the widget package; you can make up - your own property IDs as well. + Some property IDs are predefined by the widget package; you can make up + your own property IDs as well. } XPWidgetPropertyID = ( - { A window's refcon is an opaque value used by client code to find other data } - { based on it. } + { A window's refcon is an opaque value used by client code to find other data} + { based on it. } xpProperty_Refcon = 0 - { These properties are used by the utlities to implement dragging. } + { These properties are used by the utlities to implement dragging. } ,xpProperty_Dragging = 1 ,xpProperty_DragXOff = 2 ,xpProperty_DragYOff = 3 - { Is the widget hilited? (For widgets that support this kind of thing.) } + { Is the widget hilited? (For widgets that support this kind of thing.) } ,xpProperty_Hilited = 4 - { Is there a C++ object attached to this widget? } + { Is there a C++ object attached to this widget? } ,xpProperty_Object = 5 - { If this property is 1, the widget package will use OpenGL to restrict } - { drawing to the Wiget's exposed rectangle. } + { If this property is 1, the widget package will use OpenGL to restrict } + { drawing to the Wiget's exposed rectangle. } ,xpProperty_Clip = 6 - { Is this widget enabled (for those that have a disabled state too)? } + { Is this widget enabled (for those that have a disabled state too)? } ,xpProperty_Enabled = 7 - { NOTE: Property IDs 1 - 999 are reserved for the widget's library. } - { } - { NOTE: Property IDs 1000 - 9999 are allocated to the standard widget classes } - { provided with the library Properties 1000 - 1099 are for widget class 0, } - { 1100 - 1199 for widget class 1, etc. } + { NOTE: Property IDs 1 - 999 are reserved for the widgets library. } + { } + { NOTE: Property IDs 1000 - 9999 are allocated to the standard widget classes} + { provided with the library. } + { } + { Properties 1000 - 1099 are for widget class 0, 1100 - 1199 for widget class} + { 1, etc. } ,xpProperty_UserStart = 10000 ); @@ -92,78 +86,78 @@ { XPMouseState_t - When the mouse is clicked or dragged, a pointer to this structure is passed - to your widget function. + When the mouse is clicked or dragged, a pointer to this structure is passed + to your widget function. } XPMouseState_t = RECORD - x : integer; - y : integer; - { Mouse Button number, left = 0 (right button not yet supported. } - button : integer; + x : Integer; + y : Integer; + { Mouse Button number, left = 0 (right button not yet supported. } + button : Integer; {$IFDEF XPLM200} - { Scroll wheel delta (button in this case would be the wheel axis number). } - delta : integer; -{$ENDIF} + { Scroll wheel delta (button in this case would be the wheel axis number). } + delta : Integer; +{$ENDIF XPLM200} END; PXPMouseState_t = ^XPMouseState_t; { XPKeyState_t - When a key is pressed, a pointer to this struct is passed to your widget - function. + When a key is pressed, a pointer to this struct is passed to your widget + function. } XPKeyState_t = RECORD - { The ASCII key that was pressed. WARNING: this may be 0 for some non-ASCII } - { key sequences. } - key : char; - { The flags. Make sure to check this if you only want key-downs! } + { The ASCII key that was pressed. WARNING: this may be 0 for some non-ASCII } + { key sequences. } + key : XPLMChar; + { The flags. Make sure to check this if you only want key-downs! } flags : XPLMKeyFlags; - { The virtual key code for the key } - vkey : char; + { The virtual key code for the key } + vkey : XPLMChar; END; PXPKeyState_t = ^XPKeyState_t; { XPWidgetGeometryChange_t - This structure contains the deltas for your widget's geometry when it - changes. + This structure contains the deltas for your widget's geometry when it + changes. } XPWidgetGeometryChange_t = RECORD - dx : integer; - { +Y = the widget moved up } - dy : integer; - dwidth : integer; - dheight : integer; + dx : Integer; + { +Y = the widget moved up } + dy : Integer; + dwidth : Integer; + dheight : Integer; END; PXPWidgetGeometryChange_t = ^XPWidgetGeometryChange_t; { XPDispatchMode - The dispatching modes describe how the widgets library sends out messages. - Currently there are three modes: + The dispatching modes describe how the widgets library sends out messages. + Currently there are three modes: } XPDispatchMode = ( - { The message will only be sent to the target widget. } + { The message will only be sent to the target widget. } xpMode_Direct = 0 - { The message is sent to the target widget, then up the chain of parents } - { until the message is handled or a parentless widget is reached. } + { The message is sent to the target widget, then up the chain of parents } + { until the message is handled or a parentless widget is reached. } ,xpMode_UpChain = 1 - { The message is sent to the target widget and then all of its children } - { recursively depth-first. } + { The message is sent to the target widget and then all of its children } + { recursively depth-first. } ,xpMode_Recursive = 2 - { The message is snet just to the target, but goes to every callback, even if } - { it is handled. } + { The message is snet just to the target, but goes to every callback, even if} + { it is handled. } ,xpMode_DirectAllCallbacks = 3 - { The message is only sent to the very first handler even if it is not } - { accepted. (This is really only useful for some internal Widget Lib } - { functions. } + { The message is only sent to the very first handler even if it is not } + { accepted. (This is really only useful for some internal widget library } + { functions.) } ,xpMode_Once = 4 ); @@ -172,238 +166,235 @@ { XPWidgetClass - Widget classes define predefined widget types. A widget class basically - specifies from a library the widget function to be used for the widget. - Most widgets can be made right from classes. + Widget classes define predefined widget types. A widget class basically + specifies from a library the widget function to be used for the widget. + Most widgets can be made right from classes. } - XPWidgetClass = integer; + XPWidgetClass = Integer; PXPWidgetClass = ^XPWidgetClass; CONST - { An unspecified widget class. Other widget classes are in } - { XPStandardWidgets.h } + { An unspecified widget class. Other widget classes are in } + { XPStandardWidgets.h } xpWidgetClass_None = 0; {___________________________________________________________________________ * WIDGET MESSAGES ___________________________________________________________________________} -{ - -} { XPWidgetMessage - Widgets receive 32-bit messages indicating what action is to be taken or - notifications of events. The list of messages may be expanded. + Widgets receive 32-bit messages indicating what action is to be taken or + notifications of events. The list of messages may be expanded. } TYPE XPWidgetMessage = ( - { No message, should not be sent. } + { No message, should not be sent. } xpMsg_None = 0 - { The create message is sent once per widget that is created with your widget } - { function and once for any widget that has your widget function attached. } - { } - { Dispatching: Direct } - { } - { Param 1: 1 if you are being added as a subclass, 0 if the widget is first } - { being created. } + { The create message is sent once per widget that is created with your widget} + { function and once for any widget that has your widget function attached. } + { } + { Dispatching: Direct } + { } + { Param 1: 1 if you are being added as a subclass, 0 if the widget is first } + { being created. } ,xpMsg_Create = 1 - { The destroy message is sent once for each message that is destroyed that } - { has your widget function. } - { } - { Dispatching: Direct for all } - { } - { Param 1: 1 if being deleted by a recursive delete to the parent, 0 for } - { explicit deletion. } + { The destroy message is sent once for each message that is destroyed that } + { has your widget function. } + { } + { Dispatching: Direct for all } + { } + { Param 1: 1 if being deleted by a recursive delete to the parent, 0 for } + { explicit deletion. } ,xpMsg_Destroy = 2 - { The paint message is sent to your widget to draw itself. The paint message } - { is the bare-bones message; in response you must draw yourself, draw your } - { children, set up clipping and culling, check for visibility, etc. If you } - { don't want to do all of this, ignore the paint message and a draw message } - { (see below) will be sent to you. } - { } - { Dispatching: Direct } + { The paint message is sent to your widget to draw itself. The paint message } + { is the bare-bones message; in response you must draw yourself, draw your } + { children, set up clipping and culling, check for visibility, etc. If you } + { don't want to do all of this, ignore the paint message and a draw message } + { (see below) will be sent to you. } + { } + { Dispatching: Direct } ,xpMsg_Paint = 3 - { The draw message is sent to your widget when it is time to draw yourself. } - { OpenGL will be set up to draw in 2-d global screen coordinates, but you } - { should use the XPLM to set up OpenGL state. } - { } - { Dispatching: Direct } + { The draw message is sent to your widget when it is time to draw yourself. } + { OpenGL will be set up to draw in 2-d global screen coordinates, but you } + { should use the XPLM to set up OpenGL state. } + { } + { Dispatching: Direct } ,xpMsg_Draw = 4 - { The key press message is sent once per key that is pressed. The first } - { parameter is the type of key code (integer or char) and the second is the } - { code itself. By handling this event, you consume the key stroke. } - { } - { Handling this message 'consumes' the keystroke; not handling it passes it } - { to your parent widget. } - { } - { Dispatching: Up Chain } - { } - { : Param 1: A pointer to an XPKeyState_t structure with the keystroke. } + { The key press message is sent once per key that is pressed. The first } + { parameter is the type of key code (integer or char) and the second is the } + { code itself. By handling this event, you consume the key stroke. } + { } + { Handling this message 'consumes' the keystroke; not handling it passes it } + { to your parent widget. } + { } + { Dispatching: Up Chain } + { } + { Param 1: A pointer to an XPKeyState_t structure with the keystroke. } ,xpMsg_KeyPress = 5 - { Keyboard focus is being given to you. By handling this message you accept } - { keyboard focus. The first parameter will be one if a child of yours gave up } - { focus to you, 0 if someone set focus on you explicitly. } - { } - { : Handling this message accepts focus; not handling refuses focus. } - { } - { Dispatching: direct } - { } - { Param 1: 1 if you are gaining focus because your child is giving it up, 0 } - { if someone is explicitly giving you focus. } + { Keyboard focus is being given to you. By handling this message you accept } + { keyboard focus. The first parameter will be one if a child of yours gave up} + { focus to you, 0 if someone set focus on you explicitly. } + { } + { Handling this message accepts focus; not handling refuses focus. } + { } + { Dispatching: direct } + { } + { Param 1: 1 if you are gaining focus because your child is giving it up, 0 } + { if someone is explicitly giving you focus. } ,xpMsg_KeyTakeFocus = 6 - { Keyboard focus is being taken away from you. The first parameter will be } - { one if you are losing focus because another widget is taking it, or 0 if } - { someone called the API to make you lose focus explicitly. } - { } - { Dispatching: Direct } - { } - { Param 1: 1 if focus is being taken by another widget, 0 if code requested } - { to remove focus. } + { Keyboard focus is being taken away from you. The first parameter will be } + { one if you are losing focus because another widget is taking it, or 0 if } + { someone called the API to make you lose focus explicitly. } + { } + { Dispatching: Direct } + { } + { Param 1: 1 if focus is being taken by another widget, 0 if code requested } + { to remove focus. } ,xpMsg_KeyLoseFocus = 7 - { You receive one mousedown event per click with a mouse-state structure } - { pointed to by parameter 1, by accepting this you eat the click, otherwise } - { your parent gets it. You will not receive drag and mouse up messages if you } - { do not accept the down message. } - { } - { Handling this message consumes the mouse click, not handling it passes it } - { to the next widget. You can act 'transparent' as a window by never handling } - { moues clicks to certain areas. } - { } - { Dispatching: Up chain NOTE: Technically this is direct dispatched, but the } - { widgets library will shop it to each widget until one consumes the click, } - { making it effectively "up chain". } - { } - { Param 1: A pointer to an XPMouseState_t containing the mouse status. } + { You receive one mousedown event per click with a mouse-state structure } + { pointed to by parameter 1, by accepting this you eat the click, otherwise } + { your parent gets it. You will not receive drag and mouse up messages if you} + { do not accept the down message. } + { } + { Handling this message consumes the mouse click, not handling it passes it } + { to the next widget. You can act 'transparent' as a window by never handling} + { moues clicks to certain areas. } + { } + { Dispatching: Up chain NOTE: Technically this is direct dispatched, but the } + { widgets library will shop it to each widget until one consumes the click, } + { making it effectively "up chain". } + { } + { Param 1: A pointer to an XPMouseState_t containing the mouse status. } ,xpMsg_MouseDown = 8 - { You receive a series of mouse drag messages (typically one per frame in the } - { sim) as the mouse is moved once you have accepted a mouse down message. } - { Parameter one points to a mouse-state structure describing the mouse } - { location. You will continue to receive these until the mouse button is } - { released. You may receive multiple mouse state messages with the same mouse } - { position. You will receive mouse drag events even if the mouse is dragged } - { out of your current or original bounds at the time of the mouse down. } - { } - { Dispatching: Direct } - { } - { Param 1: A pointer to an XPMouseState_t containing the mouse status. } + { You receive a series of mouse drag messages (typically one per frame in the} + { sim) as the mouse is moved once you have accepted a mouse down message. } + { Parameter one points to a mouse-state structure describing the mouse } + { location. You will continue to receive these until the mouse button is } + { released. You may receive multiple mouse state messages with the same mouse} + { position. You will receive mouse drag events even if the mouse is dragged } + { out of your current or original bounds at the time of the mouse down. } + { } + { Dispatching: Direct } + { } + { Param 1: A pointer to an XPMouseState_t containing the mouse status. } ,xpMsg_MouseDrag = 9 - { The mouseup event is sent once when the mouse button is released after a } - { drag or click. You only receive this message if you accept the mouseDown } - { message. Parameter one points to a mouse state structure. } - { } - { Dispatching: Direct } - { } - { Param 1: A pointer to an XPMouseState_t containing the mouse status. } + { The mouseup event is sent once when the mouse button is released after a } + { drag or click. You only receive this message if you accept the mouseDown } + { message. Parameter one points to a mouse state structure. } + { } + { Dispatching: Direct } + { } + { Param 1: A pointer to an XPMouseState_t containing the mouse status. } ,xpMsg_MouseUp = 10 - { Your geometry or a child's geometry is being changed. } - { } - { Dispatching: Up chain } - { } - { Param 1: The widget ID of the original reshaped target. } - { } - { Param 2: A pointer to a XPWidgetGeometryChange_t struct describing the } - { change. } + { Your geometry or a child's geometry is being changed. } + { } + { Dispatching: Up chain } + { } + { Param 1: The widget ID of the original reshaped target. } + { } + { Param 2: A pointer to a XPWidgetGeometryChange_t struct describing the } + { change. } ,xpMsg_Reshape = 11 - { Your exposed area has changed. } - { } - { Dispatching: Direct } + { Your exposed area has changed. } + { } + { Dispatching: Direct } ,xpMsg_ExposedChanged = 12 - { A child has been added to you. The child's ID is passed in parameter one. } - { } - { Dispatching: Direct } - { } - { Param 1: The Widget ID of the child being added. } + { A child has been added to you. The child's ID is passed in parameter one. } + { } + { Dispatching: Direct } + { } + { Param 1: The Widget ID of the child being added. } ,xpMsg_AcceptChild = 13 - { A child has been removed from to you. The child's ID is passed in parameter } - { one. } - { } - { Dispatching: Direct } - { } - { Param 1: The Widget ID of the child being removed. } + { A child has been removed from to you. The child's ID is passed in parameter} + { one. } + { } + { Dispatching: Direct } + { } + { Param 1: The Widget ID of the child being removed. } ,xpMsg_LoseChild = 14 - { You now have a new parent, or have no parent. The parent's ID is passed in, } - { or 0 for no parent. } - { } - { Dispatching: Direct } - { } - { Param 1: The Widget ID of your parent } + { You now have a new parent, or have no parent. The parent's ID is passed in,} + { or 0 for no parent. } + { } + { Dispatching: Direct } + { } + { Param 1: The Widget ID of your parent } ,xpMsg_AcceptParent = 15 - { You or a child has been shown. Note that this does not include you being } - { shown because your parent was shown, you were put in a new parent, your } - { root was shown, etc. } - { } - { Dispatching: Up chain } - { } - { Param 1: The widget ID of the shown widget. } + { You or a child has been shown. Note that this does not include you being } + { shown because your parent was shown, you were put in a new parent, your } + { root was shown, etc. } + { } + { Dispatching: Up chain } + { } + { Param 1: The widget ID of the shown widget. } ,xpMsg_Shown = 16 - { You have been hidden. See limitations above. } - { } - { Dispatching: Up chain } - { } - { Param 1: The widget ID of the hidden widget. } + { You have been hidden. See limitations above. } + { } + { Dispatching: Up chain } + { } + { Param 1: The widget ID of the hidden widget. } ,xpMsg_Hidden = 17 - { Your descriptor has changed. } - { } - { Dispatching: Direct } + { Your descriptor has changed. } + { } + { Dispatching: Direct } ,xpMsg_DescriptorChanged = 18 - { A property has changed. Param 1 contains the property ID. } - { } - { Dispatching: Direct } - { } - { Param 1: The Property ID being changed. } - { } - { Param 2: The new property value } + { A property has changed. Param 1 contains the property ID. } + { } + { Dispatching: Direct } + { } + { Param 1: The Property ID being changed. } + { } + { Param 2: The new property value } ,xpMsg_PropertyChanged = 19 {$IFDEF XPLM200} - { The mouse wheel has moved. } - { } - { Return 1 to consume the mouse wheel move, or 0 to pass the message to a } - { parent. Dispatching: Up chain } - { } - { Param 1: A pointer to an XPMouseState_t containing the mouse status. } + { The mouse wheel has moved. } + { } + { Return 1 to consume the mouse wheel move, or 0 to pass the message to a } + { parent. Dispatching: Up chain } + { } + { Param 1: A pointer to an XPMouseState_t containing the mouse status. } ,xpMsg_MouseWheel = 20 -{$ENDIF} +{$ENDIF XPLM200} {$IFDEF XPLM200} - { The cursor is over your widget. If you consume this message, change the } - { XPLMCursorStatus value to indicate the desired result, with the same rules } - { as in XPLMDisplay.h. } - { } - { Return 1 to consume this message, 0 to pass it on. } - { } - { Dispatching: Up chain Param 1: A pointer to an XPMouseState_t struct } - { containing the mouse status. } - { } - { Param 2: A pointer to a XPLMCursorStatus - set this to the cursor result } - { you desire. } + { The cursor is over your widget. If you consume this message, change the } + { XPLMCursorStatus value to indicate the desired result, with the same rules } + { as in XPLMDisplay.h. } + { } + { Return 1 to consume this message, 0 to pass it on. } + { } + { Dispatching: Up chain Param 1: A pointer to an XPMouseState_t struct } + { containing the mouse status. } + { } + { Param 2: A pointer to a XPLMCursorStatus - set this to the cursor result } + { you desire. } ,xpMsg_CursorAdjust = 21 -{$ENDIF} +{$ENDIF XPLM200} - { NOTE: Message IDs 1000 - 9999 are allocated to the standard widget classes } - { provided with the library with 1000 - 1099 for widget class 0, 1100 - 1199 } - { for widget class 1, etc. Message IDs 10,000 and beyond are for plugin use. } + { NOTE: Message IDs 1000 - 9999 are allocated to the standard widget classes } + { provided with the library with 1000 - 1099 for widget class 0, 1100 - 1199 } + { for widget class 1, etc. Message IDs 10,000 and beyond are for plugin use. } ,xpMsg_UserStart = 10000 ); @@ -412,26 +403,25 @@ {___________________________________________________________________________ * WIDGET CALLBACK FUNCTION ___________________________________________________________________________} -{ - -} { XPWidgetFunc_t - This function defines your custom widget's behavior. It will be called by - the widgets library to send messages to your widget. The message and widget - ID are passed in, as well as two ptr-width signed parameters whose meaning - varies with the message. Return 1 to indicate that you have processed the - message, 0 to indicate that you have not. For any message that is not - understood, return 0. + This function defines your custom widget's behavior. It will be called by + the widgets library to send messages to your widget. The message and widget + ID are passed in, as well as two ptr-width signed parameters whose meaning + varies with the message. Return 1 to indicate that you have processed the + message, 0 to indicate that you have not. For any message that is not + understood, return 0. } TYPE XPWidgetFunc_t = FUNCTION( inMessage : XPWidgetMessage; inWidget : XPWidgetID; inParam1 : intptr_t; - inParam2 : intptr_t) : integer; cdecl; + inParam2 : intptr_t) : Integer; cdecl; + IMPLEMENTATION + END. diff --git a/src/SDK/Delphi/Widgets/XPWidgetUtils.pas b/src/SDK/Delphi/Widgets/XPWidgetUtils.pas index 80ef7a3d..9621126f 100755 --- a/src/SDK/Delphi/Widgets/XPWidgetUtils.pas +++ b/src/SDK/Delphi/Widgets/XPWidgetUtils.pas @@ -1,74 +1,70 @@ { - 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 XPWidgetUtils; INTERFACE { - XPWidgetUtils - USAGE NOTES - - The XPWidgetUtils library contains useful functions that make writing and - using widgets less of a pain. + ## USAGE NOTES - One set of functions are the widget behavior functions. These functions - each add specific useful behaviors to widgets. They can be used in two - manners: + The XPWidgetUtils library contains useful functions that make writing and + using widgets less of a pain. - 1. You can add a widget behavior function to a widget as a callback proc - using the XPAddWidgetCallback function. The widget will gain that behavior. - Remember that the last function you add has highest priority. You can use - this to change or augment the behavior of an existing finished widget. + One set of functions are the widget behavior functions. These functions + each add specific useful behaviors to widgets. They can be used in two + manners: - 2. You can call a widget function from inside your own widget function. - This allows you to include useful behaviors in custom-built widgets. A - number of the standard widgets get their behavior from this library. To do - this, call the behavior function from your function first. If it returns 1, - that means it handled the event and you don't need to; simply return 1. + 1. You can add a widget behavior function to a widget as a callback proc + using the XPAddWidgetCallback function. The widget will gain that + behavior. Remember that the last function you add has highest priority. + You can use this to change or augment the behavior of an existing + finished widget. + 2. You can call a widget function from inside your own widget function. + This allows you to include useful behaviors in custom-built widgets. A + number of the standard widgets get their behavior from this library. To + do this, call the behavior function from your function first. If it + returns 1, that means it handled the event and you don't need to; simply + return 1. } -USES XPWidgetDefs; +USES + XPWidgetDefs; {$A4} -{$IFDEF MSWINDOWS} - {$DEFINE DELPHI} -{$ENDIF} {___________________________________________________________________________ * GENERAL UTILITIES ___________________________________________________________________________} -{ - -} { XPWidgetCreate_t - This structure contains all of the parameters needed to create a wiget. It - is used with XPUCreateWidgets to create widgets in bulk from an array. All - parameters correspond to those of XPCreateWidget except for the container - index. If the container index is equal to the index of a widget in the - array, the widget in the array passed to XPUCreateWidgets is used as the - parent of this widget. Note that if you pass an index greater than your own - position in the array, the parent you are requesting will not exist yet. If - the container index is NO_PARENT, the parent widget is specified as NULL. - If the container index is PARAM_PARENT, the widget passed into - XPUCreateWidgets is used. + This structure contains all of the parameters needed to create a wiget. It + is used with XPUCreateWidgets to create widgets in bulk from an array. All + parameters correspond to those of XPCreateWidget except for the container + index. + + If the container index is equal to the index of a widget in the array, the + widget in the array passed to XPUCreateWidgets is used as the parent of + this widget. Note that if you pass an index greater than your own position + in the array, the parent you are requesting will not exist yet. + + If the container index is NO_PARENT, the parent widget is specified as + NULL. If the container index is PARAM_PARENT, the widget passed into + XPUCreateWidgets is used. } TYPE XPWidgetCreate_t = RECORD - left : integer; - top : integer; - right : integer; - bottom : integer; - visible : integer; - descriptor : Pchar; - { Whether ethis widget is a root wiget } - isRoot : integer; - { The index of the widget to contain within, or a constant } - containerIndex : integer; + left : Integer; + top : Integer; + right : Integer; + bottom : Integer; + visible : Integer; + descriptor : XPLMString; + { Whether ethis widget is a root wiget } + isRoot : Integer; + { The index of the widget to contain within, or a constant } + containerIndex : Integer; widgetClass : XPWidgetClass; END; PXPWidgetCreate_t = ^XPWidgetCreate_t; @@ -82,142 +78,120 @@ { XPUCreateWidgets - This function creates a series of widgets from a table...see - XPCreateWidget_t above. Pass in an array of widget creation structures and - an array of widget IDs that will receive each widget. + This function creates a series of widgets from a table (see + XPCreateWidget_t above). Pass in an array of widget creation structures and + an array of widget IDs that will receive each widget. - Widget parents are specified by index into the created widget table, - allowing you to create nested widget structures. You can create multiple - widget trees in one table. Generally you should create widget trees from - the top down. + Widget parents are specified by index into the created widget table, + allowing you to create nested widget structures. You can create multiple + widget trees in one table. Generally you should create widget trees from + the top down. - You can also pass in a widget ID that will be used when the widget's parent - is listed as PARAM_PARENT; this allows you to embed widgets created with - XPUCreateWidgets in a widget created previously. + You can also pass in a widget ID that will be used when the widget's parent + is listed as PARAM_PARENT; this allows you to embed widgets created with + XPUCreateWidgets in a widget created previously. } PROCEDURE XPUCreateWidgets( inWidgetDefs : PXPWidgetCreate_t; - inCount : integer; + inCount : Integer; inParamParent : XPWidgetID; ioWidgets : PXPWidgetID); -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPWIDGETS.DLL; { XPUMoveWidgetBy - Simply moves a widget by an amount, +x = right, +y=up, without resizing the - widget. + Simply moves a widget by an amount, +x = right, +y=up, without resizing the + widget. } PROCEDURE XPUMoveWidgetBy( inWidget : XPWidgetID; - inDeltaX : integer; - inDeltaY : integer); -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inDeltaX : Integer; + inDeltaY : Integer); + cdecl; external XPWIDGETS.DLL; {___________________________________________________________________________ * LAYOUT MANAGERS ___________________________________________________________________________} { - The layout managers are widget behavior functions for handling where - widgets move. Layout managers can be called from a widget function or - attached to a widget later. + The layout managers are widget behavior functions for handling where + widgets move. Layout managers can be called from a widget function or + attached to a widget later. } { XPUFixedLayout - This function causes the widget to maintain its children in fixed position - relative to itself as it is resized. Use this on the top level 'window' - widget for your window. + This function causes the widget to maintain its children in fixed position + relative to itself as it is resized. Use this on the top level 'window' + widget for your window. } FUNCTION XPUFixedLayout( inMessage : XPWidgetMessage; inWidget : XPWidgetID; inParam1 : intptr_t; - inParam2 : intptr_t) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inParam2 : intptr_t) : Integer; + cdecl; external XPWIDGETS.DLL; {___________________________________________________________________________ * WIDGET PROC BEHAVIORS ___________________________________________________________________________} { - These widget behavior functions add other useful behaviors to widgets. - These functions cannot be attached to a widget; they must be called from - your widget function. + These widget behavior functions add other useful behaviors to widgets. + These functions cannot be attached to a widget; they must be called from + your widget function. } { XPUSelectIfNeeded - This causes the widget to bring its window to the foreground if it is not - already. inEatClick specifies whether clicks in the background should be - consumed by bringin the window to the foreground. + This causes the widget to bring its window to the foreground if it is not + already. inEatClick specifies whether clicks in the background should be + consumed by bringin the window to the foreground. } FUNCTION XPUSelectIfNeeded( inMessage : XPWidgetMessage; inWidget : XPWidgetID; inParam1 : intptr_t; inParam2 : intptr_t; - inEatClick : integer) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inEatClick : Integer) : Integer; + cdecl; external XPWIDGETS.DLL; { XPUDefocusKeyboard - This causes a click in the widget to send keyboard focus back to X-Plane. - This stops editing of any text fields, etc. + This causes a click in the widget to send keyboard focus back to X-Plane. + This stops editing of any text fields, etc. } FUNCTION XPUDefocusKeyboard( inMessage : XPWidgetMessage; inWidget : XPWidgetID; inParam1 : intptr_t; inParam2 : intptr_t; - inEatClick : integer) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inEatClick : Integer) : Integer; + cdecl; external XPWIDGETS.DLL; { XPUDragWidget - XPUDragWidget drags the widget in response to mouse clicks. Pass in not - only the event, but the global coordinates of the drag region, which might - be a sub-region of your widget (for example, a title bar). + XPUDragWidget drags the widget in response to mouse clicks. Pass in not + only the event, but the global coordinates of the drag region, which might + be a sub-region of your widget (for example, a title bar). } FUNCTION XPUDragWidget( inMessage : XPWidgetMessage; inWidget : XPWidgetID; inParam1 : intptr_t; inParam2 : intptr_t; - inLeft : integer; - inTop : integer; - inRight : integer; - inBottom : integer) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inLeft : Integer; + inTop : Integer; + inRight : Integer; + inBottom : Integer) : Integer; + cdecl; external XPWIDGETS.DLL; + IMPLEMENTATION + END. diff --git a/src/SDK/Delphi/Widgets/XPWidgets.pas b/src/SDK/Delphi/Widgets/XPWidgets.pas index fe002d0e..46ae5422 100755 --- a/src/SDK/Delphi/Widgets/XPWidgets.pas +++ b/src/SDK/Delphi/Widgets/XPWidgets.pas @@ -1,678 +1,527 @@ { - 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 XPWidgets; INTERFACE { - WIDGETS - THEORY OF OPERATION AND NOTES - - Widgets are persistent view 'objects' for X-Plane. A widget is an object - referenced by its opaque handle (widget ID) and the APIs in this file. You - cannot access the widget's guts directly. Every Widget has the following - intrinsic data: - - - A bounding box defined in global screen coordinates with 0,0 in the - bottom left and +y = up, +x = right. - - - A visible box, which is the intersection of the bounding box with the - widget's parents visible box. - - - Zero or one parent widgets. (Always zero if the widget is a root widget. - - - Zero or more child widgets. - - - Whether the widget is a root. Root widgets are the top level plugin - windows. - - - Whether the widget is visible. - - - A text string descriptor, whose meaning varies from widget to widget. + ## THEORY OF OPERATION AND NOTES - - An arbitrary set of 32 bit integral properties defined by 32-bit integral - keys. This is how specific widgets + Widgets are persistent view 'objects' for X-Plane. A widget is an object + referenced by its opaque handle (widget ID) and the APIs in this file. You + cannot access the widget's guts directly. Every Widget has the following + intrinsic data: - store specific data. + - A bounding box defined in global screen coordinates with 0,0 in the + bottom left and +y = up, +x = right. + - A visible box, which is the intersection of the bounding box with the + widget's parents visible box. + - Zero or one parent widgets. (Always zero if the widget is a root widget. + - Zero or more child widgets. + - Whether the widget is a root. Root widgets are the top level plugin + windows. + - Whether the widget is visible. + - A text string descriptor, whose meaning varies from widget to widget. + - An arbitrary set of 32 bit integral properties defined by 32-bit integral + keys. This is how specific widgets store specific data. + - A list of widget callbacks proc that implements the widgets behaviors. - - A list of widget callbacks proc that implements the widgets behaviors. + The Widgets library sends messages to widgets to request specific behaviors + or notify the widget of things. - The Widgets library sends messages to widgets to request specific behaviors - or notify the widget of things. + Widgets may have more than one callback function, in which case messages + are sent to the most recently added callback function until the message is + handled. Messages may also be sent to parents or children; see the + XPWidgetDefs.h header file for the different widget message dispatching + functions. By adding a callback function to a window you can 'subclass' its + behavior. - Widgets may have more than one callback function, in which case messages - are sent to the most recently added callback function until the message is - handled. Messages may also be sent to parents or children; see the - XPWidgetDefs.h header file for the different widget message dispatching - functions. By adding a callback function to a window you can 'subclass' its - behavior. + A set of standard widgets are provided that serve common UI purposes. You + can also customize or implement entirely custom widgets. - A set of standard widgets are provided that serve common UI purposes. You - can also customize or implement entirely custom widgets. + Widgets are different than other view hierarchies (most notably Win32, + which they bear a striking resemblance to) in the following ways: - Widgets are different than other view hierarchies (most notably Win32, - which they bear a striking resemblance to) in the following ways: - - - Not all behavior can be patched. State that is managed by the XPWidgets - DLL and not by individual widgets cannot be customized. - - - All coordinates are in global screen coordinates. Coordinates are not - relative to an enclosing widget, nor are they relative to a display window. - - - - Widget messages are always dispatched synchronously, and there is no - concept of scheduling an update or a dirty region. Messages originate from - X-Plane as the sim cycle goes by. Since X-Plane is constantly redrawing, so - are widgets; there is no need to mark a part of a widget as 'needing - redrawing' because redrawing happens frequently whether the widget needs it - or not. - - - Any widget may be a 'root' widget, causing it to be drawn; there is no - relationship between widget class and rootness. Root widgets are imlemented - as XPLMDisply windows. + - Not all behavior can be patched. State that is managed by the XPWidgets + DLL and not by individual widgets cannot be customized. + - All coordinates are in global screen coordinates. Coordinates are not + relative to an enclosing widget, nor are they relative to a display + window. + - Widget messages are always dispatched synchronously, and there is no + concept of scheduling an update or a dirty region. Messages originate + from X-Plane as the sim cycle goes by. Since X-Plane is constantly + redrawing, so are widgets; there is no need to mark a part of a widget as + 'needing redrawing' because redrawing happens frequently whether the + widget needs it or not. + - Any widget may be a 'root' widget, causing it to be drawn; there is no + relationship between widget class and rootness. Root widgets are + imlemented as XPLMDisply windows. } -USES XPWidgetDefs; -USES XPLMDisplay; +USES + XPWidgetDefs, XPLMDisplay; {$A4} -{$IFDEF MSWINDOWS} - {$DEFINE DELPHI} -{$ENDIF} {___________________________________________________________________________ * WIDGET CREATION AND MANAGEMENT ___________________________________________________________________________} -{ - -} { XPCreateWidget - This function creates a new widget and returns the new widget's ID to you. - If the widget creation fails for some reason, it returns NULL. Widget - creation will fail either if you pass a bad class ID or if there is not - adequate memory. - - Input Parameters: - - - Top, left, bottom, and right in global screen coordinates defining the - widget's location on the screen. - - - inVisible is 1 if the widget should be drawn, 0 to start the widget as - hidden. - - - inDescriptor is a null terminated string that will become the widget's - descriptor. - - - inIsRoot is 1 if this is going to be a root widget, 0 if it will not be. - - - inContainer is the ID of this widget's container. It must be 0 for a root - widget. for a non-root widget, pass the widget ID of the widget to place - this widget within. If this widget is not going to start inside another - widget, pass 0; this new widget will then just be floating off in space - (and will not be drawn until it is placed in a widget. - - - inClass is the class of the widget to draw. Use one of the predefined - class-IDs to create a standard widget. - - A note on widget embedding: a widget is only called (and will be drawn, - etc.) if it is placed within a widget that will be called. Root widgets are - always called. So it is possible to have whole chains of widgets that are - simply not called. You can preconstruct widget trees and then place them - into root widgets later to activate them if you wish. + This function creates a new widget and returns the new widget's ID to you. + If the widget creation fails for some reason, it returns NULL. Widget + creation will fail either if you pass a bad class ID or if there is not + adequate memory. + + Input Parameters: + + - Top, left, bottom, and right in global screen coordinates defining the + widget's location on the screen. + - inVisible is 1 if the widget should be drawn, 0 to start the widget as + hidden. + - inDescriptor is a null terminated string that will become the widget's + descriptor. + - inIsRoot is 1 if this is going to be a root widget, 0 if it will not be. + - inContainer is the ID of this widget's container. It must be 0 for a root + widget. for a non-root widget, pass the widget ID of the widget to place + this widget within. If this widget is not going to start inside another + widget, pass 0; this new widget will then just be floating off in space + (and will not be drawn until it is placed in a widget. + - inClass is the class of the widget to draw. Use one of the predefined + class-IDs to create a standard widget. + + A note on widget embedding: a widget is only called (and will be drawn, + etc.) if it is placed within a widget that will be called. Root widgets are + always called. So it is possible to have whole chains of widgets that are + simply not called. You can preconstruct widget trees and then place them + into root widgets later to activate them if you wish. } FUNCTION XPCreateWidget( - inLeft : integer; - inTop : integer; - inRight : integer; - inBottom : integer; - inVisible : integer; - inDescriptor : Pchar; - inIsRoot : integer; + inLeft : Integer; + inTop : Integer; + inRight : Integer; + inBottom : Integer; + inVisible : Integer; + inDescriptor : XPLMString; + inIsRoot : Integer; inContainer : XPWidgetID; inClass : XPWidgetClass) : XPWidgetID; -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPWIDGETS.DLL; { XPCreateCustomWidget - This function is the same as XPCreateWidget except that instead of passing - a class ID, you pass your widget callback function pointer defining the - widget. Use this function to define a custom widget. All parameters are the - same as XPCreateWidget, except that the widget class has been replaced with - the widget function. + This function is the same as XPCreateWidget except that instead of passing + a class ID, you pass your widget callback function pointer defining the + widget. Use this function to define a custom widget. All parameters are the + same as XPCreateWidget, except that the widget class has been replaced with + the widget function. } FUNCTION XPCreateCustomWidget( - inLeft : integer; - inTop : integer; - inRight : integer; - inBottom : integer; - inVisible : integer; - inDescriptor : Pchar; - inIsRoot : integer; + inLeft : Integer; + inTop : Integer; + inRight : Integer; + inBottom : Integer; + inVisible : Integer; + inDescriptor : XPLMString; + inIsRoot : Integer; inContainer : XPWidgetID; inCallback : XPWidgetFunc_t) : XPWidgetID; -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPWIDGETS.DLL; { XPDestroyWidget - This class destroys a widget. Pass in the ID of the widget to kill. If you - pass 1 for inDestroyChilren, the widget's children will be destroyed first, - then this widget will be destroyed. (Furthermore, the widget's children - will be destroyed with the inDestroyChildren flag set to 1, so the - destruction will recurse down the widget tree.) If you pass 0 for this - flag, the child widgets will simply end up with their parent set to 0. + This class destroys a widget. Pass in the ID of the widget to kill. If you + pass 1 for inDestroyChilren, the widget's children will be destroyed first, + then this widget will be destroyed. (Furthermore, the widget's children + will be destroyed with the inDestroyChildren flag set to 1, so the + destruction will recurse down the widget tree.) If you pass 0 for this + flag, the child widgets will simply end up with their parent set to 0. } PROCEDURE XPDestroyWidget( inWidget : XPWidgetID; - inDestroyChildren : integer); -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inDestroyChildren : Integer); + cdecl; external XPWIDGETS.DLL; { XPSendMessageToWidget - This sends any message to a widget. You should probably not go around - simulating the predefined messages that the widgets library defines for - you. You may however define custom messages for your widgets and send them - with this method. + This sends any message to a widget. You should probably not go around + simulating the predefined messages that the widgets library defines for + you. You may however define custom messages for your widgets and send them + with this method. - This method supports several dispatching patterns; see XPDispatchMode for - more info. The function returns 1 if the message was handled, 0 if it was - not. + This method supports several dispatching patterns; see XPDispatchMode for + more info. The function returns 1 if the message was handled, 0 if it was + not. - For each widget that receives the message (see the dispatching modes), each - widget function from the most recently installed to the oldest one receives - the message in order until it is handled. + For each widget that receives the message (see the dispatching modes), each + widget function from the most recently installed to the oldest one receives + the message in order until it is handled. } FUNCTION XPSendMessageToWidget( inWidget : XPWidgetID; inMessage : XPWidgetMessage; inMode : XPDispatchMode; inParam1 : intptr_t; - inParam2 : intptr_t) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inParam2 : intptr_t) : Integer; + cdecl; external XPWIDGETS.DLL; {___________________________________________________________________________ * WIDGET POSITIONING AND VISIBILITY ___________________________________________________________________________} -{ - -} { XPPlaceWidgetWithin - This function changes which container a widget resides in. You may NOT use - this function on a root widget! inSubWidget is the widget that will be - moved. Pass a widget ID in inContainer to make inSubWidget be a child of - inContainer. It will become the last/closest widget in the container. Pass - 0 to remove the widget from any container. Any call to this other than - passing the widget ID of the old parent of the affected widget will cause - the widget to be removed from its old parent. Placing a widget within its - own parent simply makes it the last widget. - - NOTE: this routine does not reposition the sub widget in global - coordinates. If the container has layout management code, it will - reposition the subwidget for you, otherwise you must do it with - SetWidgetGeometry. + This function changes which container a widget resides in. You may NOT use + this function on a root widget! inSubWidget is the widget that will be + moved. Pass a widget ID in inContainer to make inSubWidget be a child of + inContainer. It will become the last/closest widget in the container. Pass + 0 to remove the widget from any container. Any call to this other than + passing the widget ID of the old parent of the affected widget will cause + the widget to be removed from its old parent. Placing a widget within its + own parent simply makes it the last widget. + + NOTE: this routine does not reposition the sub widget in global + coordinates. If the container has layout management code, it will + reposition the subwidget for you, otherwise you must do it with + SetWidgetGeometry. } PROCEDURE XPPlaceWidgetWithin( inSubWidget : XPWidgetID; inContainer : XPWidgetID); -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPWIDGETS.DLL; { XPCountChildWidgets - This routine returns the number of widgets another widget contains. + This routine returns the number of widgets another widget contains. } FUNCTION XPCountChildWidgets( - inWidget : XPWidgetID) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inWidget : XPWidgetID) : Integer; + cdecl; external XPWIDGETS.DLL; { XPGetNthChildWidget - This routine returns the widget ID of a child widget by index. Indexes are - 0 based, from 0 to one minus the number of widgets in the parent, - inclusive. If the index is invalid, 0 is returned. + This routine returns the widget ID of a child widget by index. Indexes are + 0 based, from 0 to one minus the number of widgets in the parent, + inclusive. If the index is invalid, 0 is returned. } FUNCTION XPGetNthChildWidget( inWidget : XPWidgetID; - inIndex : integer) : XPWidgetID; -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inIndex : Integer) : XPWidgetID; + cdecl; external XPWIDGETS.DLL; { XPGetParentWidget - This routine returns the parent of a widget, or 0 if the widget has no - parent. Root widgets never have parents and therefore always return 0. + Returns the parent of a widget, or 0 if the widget has no parent. Root + widgets never have parents and therefore always return 0. } FUNCTION XPGetParentWidget( inWidget : XPWidgetID) : XPWidgetID; -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPWIDGETS.DLL; { XPShowWidget - This routine makes a widget visible if it is not already. Note that if a - widget is not in a rooted widget hierarchy or one of its parents is not - visible, it will still not be visible to the user. + This routine makes a widget visible if it is not already. Note that if a + widget is not in a rooted widget hierarchy or one of its parents is not + visible, it will still not be visible to the user. } PROCEDURE XPShowWidget( inWidget : XPWidgetID); -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPWIDGETS.DLL; { XPHideWidget - Makes a widget invisible. See XPShowWidget for considerations of when a - widget might not be visible despite its own visibility state. + Makes a widget invisible. See XPShowWidget for considerations of when a + widget might not be visible despite its own visibility state. } PROCEDURE XPHideWidget( inWidget : XPWidgetID); -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPWIDGETS.DLL; { XPIsWidgetVisible - This returns 1 if a widget is visible, 0 if it is not. Note that this - routine takes into consideration whether a parent is invisible. Use this - routine to tell if the user can see the widget. + This returns 1 if a widget is visible, 0 if it is not. Note that this + routine takes into consideration whether a parent is invisible. Use this + routine to tell if the user can see the widget. } FUNCTION XPIsWidgetVisible( - inWidget : XPWidgetID) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inWidget : XPWidgetID) : Integer; + cdecl; external XPWIDGETS.DLL; { XPFindRootWidget - XPFindRootWidget returns the Widget ID of the root widget that contains the - passed in widget or NULL if the passed in widget is not in a rooted - hierarchy. + Returns the Widget ID of the root widget that contains the passed in widget + or NULL if the passed in widget is not in a rooted hierarchy. } FUNCTION XPFindRootWidget( inWidget : XPWidgetID) : XPWidgetID; -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPWIDGETS.DLL; { XPBringRootWidgetToFront - This routine makes the specified widget be in the front most widget - hierarchy. If this widget is a root widget, its widget hierarchy comes to - front, otherwise the widget's root is brought to the front. If this widget - is not in an active widget hiearchy (e.g. there is no root widget at the - top of the tree), this routine does nothing. + This routine makes the specified widget be in the front most widget + hierarchy. If this widget is a root widget, its widget hierarchy comes to + front, otherwise the widget's root is brought to the front. If this widget + is not in an active widget hiearchy (e.g. there is no root widget at the + top of the tree), this routine does nothing. } PROCEDURE XPBringRootWidgetToFront( inWidget : XPWidgetID); -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPWIDGETS.DLL; { XPIsWidgetInFront - This routine returns true if this widget's hierarchy is the front most - hierarchy. It returns false if the widget's hierarchy is not in front, or - if the widget is not in a rooted hierarchy. + This routine returns true if this widget's hierarchy is the front most + hierarchy. It returns false if the widget's hierarchy is not in front, or + if the widget is not in a rooted hierarchy. } FUNCTION XPIsWidgetInFront( - inWidget : XPWidgetID) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inWidget : XPWidgetID) : Integer; + cdecl; external XPWIDGETS.DLL; { XPGetWidgetGeometry - This routine returns the bounding box of a widget in global coordinates. - Pass NULL for any parameter you are not interested in. + This routine returns the bounding box of a widget in global coordinates. + Pass NULL for any parameter you are not interested in. } PROCEDURE XPGetWidgetGeometry( inWidget : XPWidgetID; - outLeft : Pinteger; { Can be nil } - outTop : Pinteger; { Can be nil } - outRight : Pinteger; { Can be nil } - outBottom : Pinteger); { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + outLeft : PInteger; { Can be nil } + outTop : PInteger; { Can be nil } + outRight : PInteger; { Can be nil } + outBottom : PInteger); { Can be nil } + cdecl; external XPWIDGETS.DLL; { XPSetWidgetGeometry - This function changes the bounding box of a widget. + This function changes the bounding box of a widget. } PROCEDURE XPSetWidgetGeometry( inWidget : XPWidgetID; - inLeft : integer; - inTop : integer; - inRight : integer; - inBottom : integer); -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inLeft : Integer; + inTop : Integer; + inRight : Integer; + inBottom : Integer); + cdecl; external XPWIDGETS.DLL; { XPGetWidgetForLocation - Given a widget and a location, this routine returns the widget ID of the - child of that widget that owns that location. If inRecursive is true then - this will return a child of a child of a widget as it tries to find the - deepest widget at that location. If inVisibleOnly is true, then only - visible widgets are considered, otherwise all widgets are considered. The - widget ID passed for inContainer will be returned if the location is in - that widget but not in a child widget. 0 is returned if the location is not - in the container. - - NOTE: if a widget's geometry extends outside its parents geometry, it will - not be returned by this call for mouse locations outside the parent - geometry. The parent geometry limits the child's eligibility for mouse - location. + Given a widget and a location, this routine returns the widget ID of the + child of that widget that owns that location. If inRecursive is true then + this will return a child of a child of a widget as it tries to find the + deepest widget at that location. If inVisibleOnly is true, then only + visible widgets are considered, otherwise all widgets are considered. The + widget ID passed for inContainer will be returned if the location is in + that widget but not in a child widget. 0 is returned if the location is not + in the container. + + NOTE: if a widget's geometry extends outside its parents geometry, it will + not be returned by this call for mouse locations outside the parent + geometry. The parent geometry limits the child's eligibility for mouse + location. } FUNCTION XPGetWidgetForLocation( inContainer : XPWidgetID; - inXOffset : integer; - inYOffset : integer; - inRecursive : integer; - inVisibleOnly : integer) : XPWidgetID; -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inXOffset : Integer; + inYOffset : Integer; + inRecursive : Integer; + inVisibleOnly : Integer) : XPWidgetID; + cdecl; external XPWIDGETS.DLL; { XPGetWidgetExposedGeometry - This routine returns the bounds of the area of a widget that is completely - within its parent widgets. Since a widget's bounding box can be outside its - parent, part of its area will not be elligible for mouse clicks and should - not draw. Use XPGetWidgetGeometry to find out what area defines your - widget's shape, but use this routine to find out what area to actually draw - into. Note that the widget library does not use OpenGL clipping to keep - frame rates up, although you could use it internally. + This routine returns the bounds of the area of a widget that is completely + within its parent widgets. Since a widget's bounding box can be outside its + parent, part of its area will not be elligible for mouse clicks and should + not draw. Use XPGetWidgetGeometry to find out what area defines your + widget's shape, but use this routine to find out what area to actually draw + into. Note that the widget library does not use OpenGL clipping to keep + frame rates up, although you could use it internally. } PROCEDURE XPGetWidgetExposedGeometry( inWidgetID : XPWidgetID; - outLeft : Pinteger; { Can be nil } - outTop : Pinteger; { Can be nil } - outRight : Pinteger; { Can be nil } - outBottom : Pinteger); { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + outLeft : PInteger; { Can be nil } + outTop : PInteger; { Can be nil } + outRight : PInteger; { Can be nil } + outBottom : PInteger); { Can be nil } + cdecl; external XPWIDGETS.DLL; {___________________________________________________________________________ * ACCESSING WIDGET DATA ___________________________________________________________________________} -{ - -} { XPSetWidgetDescriptor - Every widget has a descriptor, which is a text string. What the text string - is used for varies from widget to widget; for example, a push button's text - is its descriptor, a caption shows its descriptor, and a text field's - descriptor is the text being edited. In other words, the usage for the text - varies from widget to widget, but this API provides a universal and - convenient way to get at it. While not all UI widgets need their - descriptor, many do. + Every widget has a descriptor, which is a text string. What the text string + is used for varies from widget to widget; for example, a push button's text + is its descriptor, a caption shows its descriptor, and a text field's + descriptor is the text being edited. In other words, the usage for the text + varies from widget to widget, but this API provides a universal and + convenient way to get at it. While not all UI widgets need their + descriptor, many do. } PROCEDURE XPSetWidgetDescriptor( inWidget : XPWidgetID; - inDescriptor : Pchar); -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inDescriptor : XPLMString); + cdecl; external XPWIDGETS.DLL; { XPGetWidgetDescriptor - This routine returns the widget's descriptor. Pass in the length of the - buffer you are going to receive the descriptor in. The descriptor will be - null terminated for you. This routine returns the length of the actual - descriptor; if you pass NULL for outDescriptor, you can get the - descriptor's length without getting its text. If the length of the - descriptor exceeds your buffer length, the buffer will not be null - terminated (this routine has 'strncpy' semantics). + This routine returns the widget's descriptor. Pass in the length of the + buffer you are going to receive the descriptor in. The descriptor will be + null terminated for you. This routine returns the length of the actual + descriptor; if you pass NULL for outDescriptor, you can get the + descriptor's length without getting its text. If the length of the + descriptor exceeds your buffer length, the buffer will not be null + terminated (this routine has 'strncpy' semantics). } FUNCTION XPGetWidgetDescriptor( inWidget : XPWidgetID; - outDescriptor : Pchar; - inMaxDescLength : integer) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + outDescriptor : XPLMString; + inMaxDescLength : Integer) : Integer; + cdecl; external XPWIDGETS.DLL; { XPGetWidgetUnderlyingWindow - Returns the window (from the XPLMDisplay API) that backs your widget - window. If you have opted in to modern windows, via a call to - XPLMEnableFeature("XPLM_USE_NATIVE_WIDGET_WINDOWS", 1), you can use the - returned window ID for display APIs like XPLMSetWindowPositioningMode(), - allowing you to pop the widget window out into a real OS window, or move it - into VR. + Returns the window (from the XPLMDisplay API) that backs your widget + window. If you have opted in to modern windows, via a call to + XPLMEnableFeature("XPLM_USE_NATIVE_WIDGET_WINDOWS", 1), you can use the + returned window ID for display APIs like XPLMSetWindowPositioningMode(), + allowing you to pop the widget window out into a real OS window, or move it + into VR. } FUNCTION XPGetWidgetUnderlyingWindow( inWidget : XPWidgetID) : XPLMWindowID; -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPWIDGETS.DLL; { XPSetWidgetProperty - This function sets a widget's property. Properties are arbitrary values - associated by a widget by ID. + This function sets a widget's property. Properties are arbitrary values + associated by a widget by ID. } PROCEDURE XPSetWidgetProperty( inWidget : XPWidgetID; inProperty : XPWidgetPropertyID; inValue : intptr_t); -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPWIDGETS.DLL; { XPGetWidgetProperty - This routine returns the value of a widget's property, or 0 if the property - is not defined. If you need to know whether the property is defined, pass a - pointer to an int for inExists; the existence of that property will be - returned in the int. Pass NULL for inExists if you do not need this - information. + This routine returns the value of a widget's property, or 0 if the property + is not defined. If you need to know whether the property is defined, pass a + pointer to an int for inExists; the existence of that property will be + returned in the int. Pass NULL for inExists if you do not need this + information. } FUNCTION XPGetWidgetProperty( inWidget : XPWidgetID; inProperty : XPWidgetPropertyID; - inExists : Pinteger) : intptr_t; { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inExists : PInteger) : intptr_t; { Can be nil } + cdecl; external XPWIDGETS.DLL; {___________________________________________________________________________ * KEYBOARD MANAGEMENT ___________________________________________________________________________} -{ - -} { XPSetKeyboardFocus - XPSetKeyboardFocus controls which widget will receive keystrokes. Pass the - Widget ID of the widget to get the keys. Note that if the widget does not - care about keystrokes, they will go to the parent widget, and if no widget - cares about them, they go to X-Plane. + Controls which widget will receive keystrokes. Pass the widget ID of the + widget to get the keys. Note that if the widget does not care about + keystrokes, they will go to the parent widget, and if no widget cares about + them, they go to X-Plane. - If you set the keyboard focus to Widget ID 0, X-Plane gets keyboard focus. + If you set the keyboard focus to widget ID 0, X-Plane gets keyboard focus. - This routine returns the widget ID that ended up with keyboard focus, or 0 - for X-Plane. + This routine returns the widget ID that ended up with keyboard focus, or 0 + for X-Plane. - Keyboard focus is not changed if the new widget will not accept it. For - setting to X-Plane, keyboard focus is always accepted. - - } + Keyboard focus is not changed if the new widget will not accept it. For + setting to X-Plane, keyboard focus is always accepted. + } FUNCTION XPSetKeyboardFocus( inWidget : XPWidgetID) : XPWidgetID; -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPWIDGETS.DLL; { XPLoseKeyboardFocus - This causes the specified widget to lose focus; focus is passed to its - parent, or the next parent that will accept it. This routine does nothing - if this widget does not have focus. + This causes the specified widget to lose focus; focus is passed to its + parent, or the next parent that will accept it. This routine does nothing + if this widget does not have focus. } PROCEDURE XPLoseKeyboardFocus( inWidget : XPWidgetID); -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPWIDGETS.DLL; { XPGetWidgetWithFocus - This routine returns the widget that has keyboard focus, or 0 if X-Plane - has keyboard focus or some other plugin window that does not have widgets - has focus. + This routine returns the widget that has keyboard focus, or 0 if X-Plane + has keyboard focus or some other plugin window that does not have widgets + has focus. } FUNCTION XPGetWidgetWithFocus: XPWidgetID; -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPWIDGETS.DLL; {___________________________________________________________________________ * CREATING CUSTOM WIDGETS ___________________________________________________________________________} -{ - -} { XPAddWidgetCallback - This function adds a new widget callback to a widget. This widget callback - supercedes any existing ones and will receive messages first; if it does - not handle messages they will go on to be handled by pre-existing widgets. + This function adds a new widget callback to a widget. This widget callback + supercedes any existing ones and will receive messages first; if it does + not handle messages they will go on to be handled by pre-existing widgets. - The widget function will remain on the widget for the life of the widget. - The creation message will be sent to the new callback immediately with the - widget ID, and the destruction message will be sent before the other widget - function receives a destruction message. + The widget function will remain on the widget for the life of the widget. + The creation message will be sent to the new callback immediately with the + widget ID, and the destruction message will be sent before the other widget + function receives a destruction message. - This provides a way to 'subclass' an existing widget. By providing a second - hook that only handles certain widget messages, you can customize or extend - widget behavior. + This provides a way to 'subclass' an existing widget. By providing a second + hook that only handles certain widget messages, you can customize or extend + widget behavior. } PROCEDURE XPAddWidgetCallback( inWidget : XPWidgetID; inNewCallback : XPWidgetFunc_t); -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPWIDGETS.DLL; { XPGetWidgetClassFunc - Given a widget class, this function returns the callbacks that power that - widget class. + Given a widget class, this function returns the callbacks that power that + widget class. } FUNCTION XPGetWidgetClassFunc( inWidgetClass : XPWidgetClass) : XPWidgetFunc_t; -{$IFDEF DELPHI} - cdecl; external 'XPWIDGETS.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPWIDGETS.DLL; + IMPLEMENTATION + END. diff --git a/src/SDK/Delphi/XPLM/XPLMCamera.pas b/src/SDK/Delphi/XPLM/XPLMCamera.pas index af3f9160..ad76fa4d 100755 --- a/src/SDK/Delphi/XPLM/XPLMCamera.pas +++ b/src/SDK/Delphi/XPLM/XPLMCamera.pas @@ -1,68 +1,64 @@ { - 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 XPLMCamera; INTERFACE { - XPLMCamera - THEORY OF OPERATION The XPLMCamera APIs allow plug-ins to - control the camera angle in X-Plane. This has a number of applications, - including but not limited to: + The XPLMCamera APIs allow plug-ins to control the camera angle in X-Plane. + This has a number of applications, including but not limited to: - - Creating new views (including dynamic/user-controllable views) for the - user. + - Creating new views (including dynamic/user-controllable views) for the + user. + - Creating applications that use X-Plane as a renderer of scenery, + aircrafts, or both. - - Creating applications that use X-Plane as a renderer of scenery, - aircrafts, or both. + The camera is controlled via six parameters: a location in OpenGL + coordinates and pitch, roll and yaw, similar to an airplane's position. + OpenGL coordinate info is described in detail in the XPLMGraphics + documentation; generally you should use the XPLMGraphics routines to + convert from world to local coordinates. The camera's orientation starts + facing level with the ground directly up the negative-Z axis (approximately + north) with the horizon horizontal. It is then rotated clockwise for yaw, + pitched up for positive pitch, and rolled clockwise around the vector it is + looking along for roll. - The camera is controlled via six parameters: a location in OpenGL - coordinates and pitch, roll and yaw, similar to an airplane's position. - OpenGL coordinate info is described in detail in the XPLMGraphics - documentation; generally you should use the XPLMGraphics routines to - convert from world to local coordinates. The camera's orientation starts - facing level with the ground directly up the negative-Z axis (approximately - north) with the horizon horizontal. It is then rotated clockwise for yaw, - pitched up for positive pitch, and rolled clockwise around the vector it is - looking along for roll. + You control the camera either either until the user selects a new view or + permanently (the later being similar to how UDP camera control works). You + control the camera by registering a callback per frame from which you + calculate the new camera positions. This guarantees smooth camera motion. - You control the camera either either until the user selects a new view or - permanently (the later being similar to how UDP camera control works). You - control the camera by registering a callback per frame from which you - calculate the new camera positions. This guarantees smooth camera motion. + Use the XPLMDataAccess APIs to get information like the position of the + aircraft, etc. for complex camera positioning. - Use the XPLMDataAccess APIs to get information like the position of the - aircraft, etc. for complex camera positioning. + Note: if your goal is to move the virtual pilot in the cockpit, this API is + not needed; simply update the datarefs for the pilot's head position. + + For custom exterior cameras, set the camera's mode to an external view + first to get correct sound and 2-d panel behavior. } -USES XPLMDefs; +USES + XPLMDefs; {$A4} -{$IFDEF MSWINDOWS} - {$DEFINE DELPHI} -{$ENDIF} {___________________________________________________________________________ * CAMERA CONTROL ___________________________________________________________________________} -{ - -} { XPLMCameraControlDuration - This enumeration states how long you want to retain control of the camera. - You can retain it indefinitely or until the user selects a new view. + This enumeration states how long you want to retain control of the camera. + You can retain it indefinitely or until the user selects a new view. } TYPE XPLMCameraControlDuration = ( - { Control the camera until the user picks a new view. } + { Control the camera until the user picks a new view. } xplm_ControlCameraUntilViewChanges = 1 - { Control the camera until your plugin is disabled or another plugin forcably } - { takes control. } + { Control the camera until your plugin is disabled or another plugin forcably} + { takes control. } ,xplm_ControlCameraForever = 2 ); @@ -71,103 +67,89 @@ { XPLMCameraPosition_t - This structure contains a full specification of the camera. X, Y, and Z are - the camera's position in OpenGL coordiantes; pitch, roll, and yaw are - rotations from a camera facing flat north in degrees. Positive pitch means - nose up, positive roll means roll right, and positive yaw means yaw right, - all in degrees. Zoom is a zoom factor, with 1.0 meaning normal zoom and 2.0 - magnifying by 2x (objects appear larger). + This structure contains a full specification of the camera. X, Y, and Z are + the camera's position in OpenGL coordiantes; pitch, roll, and yaw are + rotations from a camera facing flat north in degrees. Positive pitch means + nose up, positive roll means roll right, and positive yaw means yaw right, + all in degrees. Zoom is a zoom factor, with 1.0 meaning normal zoom and 2.0 + magnifying by 2x (objects appear larger). } XPLMCameraPosition_t = RECORD - x : single; - y : single; - z : single; - pitch : single; - heading : single; - roll : single; - zoom : single; + x : Single; + y : Single; + z : Single; + pitch : Single; + heading : Single; + roll : Single; + zoom : Single; END; PXPLMCameraPosition_t = ^XPLMCameraPosition_t; { XPLMCameraControl_f - You use an XPLMCameraControl function to provide continuous control over - the camera. You are passed in a structure in which to put the new camera - position; modify it and return 1 to reposition the camera. Return 0 to - surrender control of the camera; camera control will be handled by X-Plane - on this draw loop. The contents of the structure as you are called are - undefined. + You use an XPLMCameraControl function to provide continuous control over + the camera. You are passed in a structure in which to put the new camera + position; modify it and return 1 to reposition the camera. Return 0 to + surrender control of the camera; camera control will be handled by X-Plane + on this draw loop. The contents of the structure as you are called are + undefined. - If X-Plane is taking camera control away from you, this function will be - called with inIsLosingControl set to 1 and ioCameraPosition NULL. + If X-Plane is taking camera control away from you, this function will be + called with inIsLosingControl set to 1 and ioCameraPosition NULL. } XPLMCameraControl_f = FUNCTION( outCameraPosition : PXPLMCameraPosition_t; { Can be nil } - inIsLosingControl : integer; - inRefcon : pointer) : integer; cdecl; + inIsLosingControl : Integer; + inRefcon : pointer) : Integer; cdecl; { XPLMControlCamera - This function repositions the camera on the next drawing cycle. You must - pass a non-null control function. Specify in inHowLong how long you'd like - control (indefinitely or until a key is pressed). + This function repositions the camera on the next drawing cycle. You must + pass a non-null control function. Specify in inHowLong how long you'd like + control (indefinitely or until a new view mode is set by the user). } PROCEDURE XPLMControlCamera( inHowLong : XPLMCameraControlDuration; inControlFunc : XPLMCameraControl_f; inRefcon : pointer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMDontControlCamera - This function stops you from controlling the camera. If you have a camera - control function, it will not be called with an inIsLosingControl flag. - X-Plane will control the camera on the next cycle. + This function stops you from controlling the camera. If you have a camera + control function, it will not be called with an inIsLosingControl flag. + X-Plane will control the camera on the next cycle. - For maximum compatibility you should not use this routine unless you are in - posession of the camera. + For maximum compatibility you should not use this routine unless you are in + posession of the camera. } PROCEDURE XPLMDontControlCamera; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMIsCameraBeingControlled - This routine returns 1 if the camera is being controlled, zero if it is - not. If it is and you pass in a pointer to a camera control duration, the - current control duration will be returned. + This routine returns 1 if the camera is being controlled, zero if it is + not. If it is and you pass in a pointer to a camera control duration, the + current control duration will be returned. } FUNCTION XPLMIsCameraBeingControlled( - outCameraControlDuration: PXPLMCameraControlDuration) : integer; { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + outCameraControlDuration: PXPLMCameraControlDuration) : Integer; { Can be nil } + cdecl; external XPLM_DLL; { XPLMReadCameraPosition - This function reads the current camera position. + This function reads the current camera position. } PROCEDURE XPLMReadCameraPosition( outCameraPosition : PXPLMCameraPosition_t); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; + IMPLEMENTATION + END. diff --git a/src/SDK/Delphi/XPLM/XPLMDataAccess.pas b/src/SDK/Delphi/XPLM/XPLMDataAccess.pas index 164dcfa7..1ad210e3 100755 --- a/src/SDK/Delphi/XPLM/XPLMDataAccess.pas +++ b/src/SDK/Delphi/XPLM/XPLMDataAccess.pas @@ -1,73 +1,89 @@ { - 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 XPLMDataAccess; INTERFACE { - XPLM Data Access API - Theory of Operation + The data access API gives you a generic, flexible, high performance way to + read and write data to and from X-Plane and other plug-ins. For example, + this API allows you to read and set the nav radios, get the plane location, + determine the current effective graphics frame rate, etc. + + The data access APIs are the way that you read and write data from the sim + as well as other plugins. + + The API works using opaque data references. A data reference is a source of + data; you do not know where it comes from, but once you have it you can + read the data quickly and possibly write it. + + Dataref Lookup + -------------- + + Data references are identified by verbose, permanent string names; by + convention these names use path separates to form a hierarchy of datarefs, + e.g. (sim/cockpit/radios/nav1_freq_hz). The actual opaque numeric value of + the data reference, as returned by the XPLM API, is implementation defined + and changes each time X-Plane is launched; therefore you need to look up + the dataref by path every time your plugin runs. - The data access API gives you a generic, flexible, high performance way to - read and write data to and from X-Plane and other plug-ins. For example, - this API allows you to read and set the nav radios, get the plane location, - determine the current effective graphics frame rate, etc. + The task of looking up a data reference is relatively expensive; look up + your data references once based on the verbose path strings, and save the + opaque data reference value for the duration of your plugin's operation. + Reading and writing data references is relatively fast (the cost is + equivalent to two function calls through function pointers). - The data access APIs are the way that you read and write data from the sim - as well as other plugins. + X-Plane publishes over 4000 datarefs; a complete list may be found in the + reference section of the SDK online documentation (from the SDK home page, + choose Documentation). - The API works using opaque data references. A data reference is a source of - data; you do not know where it comes from, but once you have it you can - read the data quickly and possibly write it. To get a data reference, you - look it up. + Dataref Types + ------------- - Data references are identified by verbose string names - (sim/cockpit/radios/nav1_freq_hz). The actual numeric value of the data - reference is implementation defined and is likely to change each time the - simulator is run (or the plugin that provides the datareference is - reloaded). + A note on typing: you must know the correct data type to read and write. + APIs are provided for reading and writing data in a number of ways. You can + also double check the data type for a data ref. Automatic type conversion + is not done for you. - The task of looking up a data reference is relatively expensive; look up - your data references once based on verbose strings, and save the opaque - data reference value for the duration of your plugin's operation. Reading - and writing data references is relatively fast (the cost is equivalent to - two function calls through function pointers). + Dataref types are a set, e.g. a dataref can be more than one type. When + this happens, you can choose which API you want to use to read. For + example, it is not uncommon for a dataref to be of type float and double. + This means you can use either XPLMGetDatad or XPLMGetDataf to read it. - This allows data access to be high performance, while leaving in - abstraction; since data references are opaque and are searched for, the - underlying data access system can be rebuilt. + Creating New Datarefs + --------------------- - A note on typing: you must know the correct data type to read and write. - APIs are provided for reading and writing data in a number of ways. You can - also double check the data type for a data ref. Note that automatic - conversion is not done for you. + X-Plane provides datarefs that come with the sim, but plugins can also + create their own datarefs. A plugin creates a dataref by registering + function callbacks to read and write the dataref. The XPLM will call your + plugin each time some other plugin (or X-Plane) tries to read or write the + dataref. You must provide a read (and optional write) callback for each + data type you support. - A note for plugins sharing data with other plugins: the load order of - plugins is not guaranteed. To make sure that every plugin publishing data - has published their data references before other plugins try to subscribe, - publish your data references in your start routine but resolve them the - first time your 'enable' routine is called, or the first time they are - needed in code. + A note for plugins sharing data with other plugins: the load order of + plugins is not guaranteed. To make sure that every plugin publishing data + has published their data references before other plugins try to subscribe, + publish your data references in your start routine but resolve them the + first time your 'enable' routine is called, or the first time they are + needed in code. - X-Plane publishes well over 1000 datarefs; a complete list may be found in - the reference section of the SDK online documentation (from the SDK home - page, choose Documentation). + When a plugin that created a dataref is unloaded, it becomes "orphaned". + The dataref handle continues to be usable, but the dataref is not writable, + and reading it will always return 0 (or 0 items for arrays). If the plugin + is reloaded and re-registers the dataref, the handle becomes un-orphaned + and works again. } -USES XPLMDefs; +USES + XPLMDefs; {$A4} -{$IFDEF MSWINDOWS} - {$DEFINE DELPHI} -{$ENDIF} {___________________________________________________________________________ * READING AND WRITING DATA ___________________________________________________________________________} { - These routines allow you to access a wide variety of data from within - X-Plane and modify some of it. + These routines allow you to access data from within X-Plane and sometimes + modify it. } @@ -75,10 +91,10 @@ { XPLMDataRef - A data ref is an opaque handle to data provided by the simulator or another - plugin. It uniquely identifies one variable (or array of variables) over - the lifetime of your plugin. You never hard code these values; you always - get them from XPLMFindDataRef. + A data ref is an opaque handle to data provided by the simulator or another + plugin. It uniquely identifies one variable (or array of variables) over + the lifetime of your plugin. You never hard code these values; you always + get them from XPLMFindDataRef. } XPLMDataRef = pointer; PXPLMDataRef = ^XPLMDataRef; @@ -86,33 +102,35 @@ { XPLMDataTypeID - This is an enumeration that defines the type of the data behind a data - reference. This allows you to sanity check that the data type matches what - you expect. But for the most part, you will know the type of data you are - expecting from the online documentation. + This is an enumeration that defines the type of the data behind a data + reference. This allows you to sanity check that the data type matches what + you expect. But for the most part, you will know the type of data you are + expecting from the online documentation. - Data types each take a bit field, so sets of data types may be formed. + Data types each take a bit field; it is legal to have a single dataref be + more than one type of data. Whe this happens, you can pick any matching + get/set API. } XPLMDataTypeID = ( - { Data of a type the current XPLM doesn't do. } + { Data of a type the current XPLM doesn't do. } xplmType_Unknown = 0 - { A single 4-byte integer, native endian. } + { A single 4-byte integer, native endian. } ,xplmType_Int = 1 - { A single 4-byte float, native endian. } + { A single 4-byte float, native endian. } ,xplmType_Float = 2 - { A single 8-byte double, native endian. } + { A single 8-byte double, native endian. } ,xplmType_Double = 4 - { An array of 4-byte floats, native endian. } + { An array of 4-byte floats, native endian. } ,xplmType_FloatArray = 8 - { An array of 4-byte integers, native endian. } + { An array of 4-byte integers, native endian. } ,xplmType_IntArray = 16 - { A variable block of data. } + { A variable block of data. } ,xplmType_Data = 32 ); @@ -121,500 +139,431 @@ { XPLMFindDataRef - Given a c-style string that names the data ref, this routine looks up the - actual opaque XPLMDataRef that you use to read and write the data. The - string names for datarefs are published on the X-Plane SDK web site. + Given a c-style string that names the data ref, this routine looks up the + actual opaque XPLMDataRef that you use to read and write the data. The + string names for datarefs are published on the X-Plane SDK web site. - This function returns NULL if the data ref cannot be found. + This function returns NULL if the data ref cannot be found. - NOTE: this function is relatively expensive; save the XPLMDataRef this - function returns for future use. Do not look up your data ref by string - every time you need to read or write it. + NOTE: this function is relatively expensive; save the XPLMDataRef this + function returns for future use. Do not look up your data ref by string + every time you need to read or write it. } FUNCTION XPLMFindDataRef( - inDataRefName : Pchar) : XPLMDataRef; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inDataRefName : XPLMString) : XPLMDataRef; + cdecl; external XPLM_DLL; { XPLMCanWriteDataRef - Given a data ref, this routine returns true if you can successfully set the - data, false otherwise. Some datarefs are read-only. + Given a data ref, this routine returns true if you can successfully set the + data, false otherwise. Some datarefs are read-only. + + NOTE: even if a dataref is marked writable, it may not act writable. This + can happen for datarefs that X-Plane writes to on every frame of + simulation. In some cases, the dataref is writable but you have to set a + separate "override" dataref to 1 to stop X-Plane from writing it. } FUNCTION XPLMCanWriteDataRef( - inDataRef : XPLMDataRef) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inDataRef : XPLMDataRef) : Integer; + cdecl; external XPLM_DLL; { XPLMIsDataRefGood - WARNING: This function is deprecated and should not be used. Datarefs are - valid until plugins are reloaded or the sim quits. Plugins sharing datarefs - should support these semantics by not unregistering datarefs during - operation. (You should however unregister datarefs when your plugin is - unloaded, as part of general resource cleanup.) + This function returns true if the passed in handle is a valid dataref that + is not orphaned. - This function returns whether a data ref is still valid. If it returns - false, you should refind the data ref from its original string. Calling an - accessor function on a bad data ref will return a default value, typically - 0 or 0-length data. + Note: there is normally no need to call this function; datarefs returned by + XPLMFindDataRef remain valid (but possibly orphaned) unless there is a + complete plugin reload (in which case your plugin is reloaded anyway). + Orphaned datarefs can be safely read and return 0. Therefore you never need + to call XPLMIsDataRefGood to 'check' the safety of a dataref. + (XPLMIsDatarefGood performs some slow checking of the handle validity, so + it has a perormance cost.) } FUNCTION XPLMIsDataRefGood( - inDataRef : XPLMDataRef) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inDataRef : XPLMDataRef) : Integer; + cdecl; external XPLM_DLL; { XPLMGetDataRefTypes - This routine returns the types of the data ref for accessor use. If a data - ref is available in multiple data types, they will all be returned. + This routine returns the types of the data ref for accessor use. If a data + ref is available in multiple data types, the bit-wise OR of these types + will be returned. } FUNCTION XPLMGetDataRefTypes( inDataRef : XPLMDataRef) : XPLMDataTypeID; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; {___________________________________________________________________________ * DATA ACCESSORS ___________________________________________________________________________} { - These routines read and write the data references. For each supported data - type there is a reader and a writer. + These routines read and write the data references. For each supported data + type there is a reader and a writer. + + If the data ref is orphaned or the plugin that provides it is disabled or + there is a type mismatch, the functions that read data will return 0 as a + default value or not modify the passed in memory. The plugins that write + data will not write under these circumstances or if the data ref is + read-only. - If the data ref is invalid or the plugin that provides it is disabled or - there is a type mismatch, the functions that read data will return 0 as a - default value or not modify the passed in memory. The plugins that write - data will not write under these circumstances or if the data ref is - read-only. NOTE: to keep the overhead of reading datarefs low, these - routines do not do full validation of a dataref; passing a junk value for a - dataref can result in crashing the sim. + NOTE: to keep the overhead of reading datarefs low, these routines do not + do full validation of a dataref; passing a junk value for a dataref can + result in crashing the sim. The get/set APIs do check for NULL. - For array-style datarefs, you specify the number of items to read/write and - the offset into the array; the actual number of items read or written is - returned. This may be less to prevent an array-out-of-bounds error. + For array-style datarefs, you specify the number of items to read/write and + the offset into the array; the actual number of items read or written is + returned. This may be less to prevent an array-out-of-bounds error. } { XPLMGetDatai - Read an integer data ref and return its value. The return value is the - dataref value or 0 if the dataref is invalid/NULL or the plugin is - disabled. + Read an integer data ref and return its value. The return value is the + dataref value or 0 if the dataref is NULL or the plugin is disabled. } FUNCTION XPLMGetDatai( - inDataRef : XPLMDataRef) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inDataRef : XPLMDataRef) : Integer; + cdecl; external XPLM_DLL; { XPLMSetDatai - Write a new value to an integer data ref. This routine is a no-op if the - plugin publishing the dataref is disabled, the dataref is invalid, or the - dataref is not writable. + Write a new value to an integer data ref. This routine is a no-op if the + plugin publishing the dataref is disabled, the dataref is NULL, or the + dataref is not writable. } PROCEDURE XPLMSetDatai( inDataRef : XPLMDataRef; - inValue : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inValue : Integer); + cdecl; external XPLM_DLL; { XPLMGetDataf - Read a single precision floating point dataref and return its value. The - return value is the dataref value or 0.0 if the dataref is invalid/NULL or - the plugin is disabled. + Read a single precision floating point dataref and return its value. The + return value is the dataref value or 0.0 if the dataref is NULL or the + plugin is disabled. } FUNCTION XPLMGetDataf( - inDataRef : XPLMDataRef) : single; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inDataRef : XPLMDataRef) : Single; + cdecl; external XPLM_DLL; { XPLMSetDataf - Write a new value to a single precision floating point data ref. This - routine is a no-op if the plugin publishing the dataref is disabled, the - dataref is invalid, or the dataref is not writable. + Write a new value to a single precision floating point data ref. This + routine is a no-op if the plugin publishing the dataref is disabled, the + dataref is NULL, or the dataref is not writable. } PROCEDURE XPLMSetDataf( inDataRef : XPLMDataRef; - inValue : single); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inValue : Single); + cdecl; external XPLM_DLL; { XPLMGetDatad - Read a double precision floating point dataref and return its value. The - return value is the dataref value or 0.0 if the dataref is invalid/NULL or - the plugin is disabled. + Read a double precision floating point dataref and return its value. The + return value is the dataref value or 0.0 if the dataref is NULL or the + plugin is disabled. } FUNCTION XPLMGetDatad( - inDataRef : XPLMDataRef) : real; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inDataRef : XPLMDataRef) : Real; + cdecl; external XPLM_DLL; { XPLMSetDatad - Write a new value to a double precision floating point data ref. This - routine is a no-op if the plugin publishing the dataref is disabled, the - dataref is invalid, or the dataref is not writable. + Write a new value to a double precision floating point data ref. This + routine is a no-op if the plugin publishing the dataref is disabled, the + dataref is NULL, or the dataref is not writable. } PROCEDURE XPLMSetDatad( inDataRef : XPLMDataRef; - inValue : real); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inValue : Real); + cdecl; external XPLM_DLL; { XPLMGetDatavi - Read a part of an integer array dataref. If you pass NULL for outVaules, - the routine will return the size of the array, ignoring inOffset and inMax. - + Read a part of an integer array dataref. If you pass NULL for outValues, + the routine will return the size of the array, ignoring inOffset and inMax. - If outValues is not NULL, then up to inMax values are copied from the - dataref into outValues, starting at inOffset in the dataref. If inMax + - inOffset is larger than the size of the dataref, less than inMax values - will be copied. The number of values copied is returned. + If outValues is not NULL, then up to inMax values are copied from the + dataref into outValues, starting at inOffset in the dataref. If inMax + + inOffset is larger than the size of the dataref, less than inMax values + will be copied. The number of values copied is returned. - Note: the semantics of array datarefs are entirely implemented by the - plugin (or X-Plane) that provides the dataref, not the SDK itself; the - above description is how these datarefs are intended to work, but a rogue - plugin may have different behavior. + Note: the semantics of array datarefs are entirely implemented by the + plugin (or X-Plane) that provides the dataref, not the SDK itself; the + above description is how these datarefs are intended to work, but a rogue + plugin may have different behavior. } FUNCTION XPLMGetDatavi( inDataRef : XPLMDataRef; - outValues : Pinteger; { Can be nil } - inOffset : integer; - inMax : integer) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + outValues : PInteger; { Can be nil } + inOffset : Integer; + inMax : Integer) : Integer; + cdecl; external XPLM_DLL; { XPLMSetDatavi - Write part or all of an integer array dataref. The values passed by - inValues are written into the dataref starting at inOffset. Up to inCount - values are written; however if the values would write "off the end" of the - dataref array, then fewer values are written. + Write part or all of an integer array dataref. The values passed by + inValues are written into the dataref starting at inOffset. Up to inCount + values are written; however if the values would write "off the end" of the + dataref array, then fewer values are written. - Note: the semantics of array datarefs are entirely implemented by the - plugin (or X-Plane) that provides the dataref, not the SDK itself; the - above description is how these datarefs are intended to work, but a rogue - plugin may have different behavior. + Note: the semantics of array datarefs are entirely implemented by the + plugin (or X-Plane) that provides the dataref, not the SDK itself; the + above description is how these datarefs are intended to work, but a rogue + plugin may have different behavior. } PROCEDURE XPLMSetDatavi( inDataRef : XPLMDataRef; - inValues : Pinteger; - inoffset : integer; - inCount : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inValues : PInteger; + inoffset : Integer; + inCount : Integer); + cdecl; external XPLM_DLL; { XPLMGetDatavf - Read a part of a single precision floating point array dataref. If you pass - NULL for outVaules, the routine will return the size of the array, ignoring - inOffset and inMax. + Read a part of a single precision floating point array dataref. If you pass + NULL for outVaules, the routine will return the size of the array, ignoring + inOffset and inMax. - If outValues is not NULL, then up to inMax values are copied from the - dataref into outValues, starting at inOffset in the dataref. If inMax + - inOffset is larger than the size of the dataref, less than inMax values - will be copied. The number of values copied is returned. + If outValues is not NULL, then up to inMax values are copied from the + dataref into outValues, starting at inOffset in the dataref. If inMax + + inOffset is larger than the size of the dataref, less than inMax values + will be copied. The number of values copied is returned. - Note: the semantics of array datarefs are entirely implemented by the - plugin (or X-Plane) that provides the dataref, not the SDK itself; the - above description is how these datarefs are intended to work, but a rogue - plugin may have different behavior. + Note: the semantics of array datarefs are entirely implemented by the + plugin (or X-Plane) that provides the dataref, not the SDK itself; the + above description is how these datarefs are intended to work, but a rogue + plugin may have different behavior. } FUNCTION XPLMGetDatavf( inDataRef : XPLMDataRef; - outValues : Psingle; { Can be nil } - inOffset : integer; - inMax : integer) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + outValues : PSingle; { Can be nil } + inOffset : Integer; + inMax : Integer) : Integer; + cdecl; external XPLM_DLL; { XPLMSetDatavf - Write part or all of a single precision floating point array dataref. The - values passed by inValues are written into the dataref starting at - inOffset. Up to inCount values are written; however if the values would - write "off the end" of the dataref array, then fewer values are written. + Write part or all of a single precision floating point array dataref. The + values passed by inValues are written into the dataref starting at + inOffset. Up to inCount values are written; however if the values would + write "off the end" of the dataref array, then fewer values are written. - Note: the semantics of array datarefs are entirely implemented by the - plugin (or X-Plane) that provides the dataref, not the SDK itself; the - above description is how these datarefs are intended to work, but a rogue - plugin may have different behavior. + Note: the semantics of array datarefs are entirely implemented by the + plugin (or X-Plane) that provides the dataref, not the SDK itself; the + above description is how these datarefs are intended to work, but a rogue + plugin may have different behavior. } PROCEDURE XPLMSetDatavf( inDataRef : XPLMDataRef; - inValues : Psingle; - inoffset : integer; - inCount : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inValues : PSingle; + inoffset : Integer; + inCount : Integer); + cdecl; external XPLM_DLL; { XPLMGetDatab - Read a part of a byte array dataref. If you pass NULL for outVaules, the - routine will return the size of the array, ignoring inOffset and inMax. + Read a part of a byte array dataref. If you pass NULL for outVaules, the + routine will return the size of the array, ignoring inOffset and inMax. - If outValues is not NULL, then up to inMax values are copied from the - dataref into outValues, starting at inOffset in the dataref. If inMax + - inOffset is larger than the size of the dataref, less than inMax values - will be copied. The number of values copied is returned. + If outValues is not NULL, then up to inMax values are copied from the + dataref into outValues, starting at inOffset in the dataref. If inMax + + inOffset is larger than the size of the dataref, less than inMax values + will be copied. The number of values copied is returned. - Note: the semantics of array datarefs are entirely implemented by the - plugin (or X-Plane) that provides the dataref, not the SDK itself; the - above description is how these datarefs are intended to work, but a rogue - plugin may have different behavior. + Note: the semantics of array datarefs are entirely implemented by the + plugin (or X-Plane) that provides the dataref, not the SDK itself; the + above description is how these datarefs are intended to work, but a rogue + plugin may have different behavior. } FUNCTION XPLMGetDatab( inDataRef : XPLMDataRef; outValue : pointer; { Can be nil } - inOffset : integer; - inMaxBytes : integer) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inOffset : Integer; + inMaxBytes : Integer) : Integer; + cdecl; external XPLM_DLL; { XPLMSetDatab - Write part or all of a byte array dataref. The values passed by inValues - are written into the dataref starting at inOffset. Up to inCount values are - written; however if the values would write "off the end" of the dataref - array, then fewer values are written. + Write part or all of a byte array dataref. The values passed by inValues + are written into the dataref starting at inOffset. Up to inCount values are + written; however if the values would write "off the end" of the dataref + array, then fewer values are written. - Note: the semantics of array datarefs are entirely implemented by the - plugin (or X-Plane) that provides the dataref, not the SDK itself; the - above description is how these datarefs are intended to work, but a rogue - plugin may have different behavior. + Note: the semantics of array datarefs are entirely implemented by the + plugin (or X-Plane) that provides the dataref, not the SDK itself; the + above description is how these datarefs are intended to work, but a rogue + plugin may have different behavior. } PROCEDURE XPLMSetDatab( inDataRef : XPLMDataRef; inValue : pointer; - inOffset : integer; - inLength : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inOffset : Integer; + inLength : Integer); + cdecl; external XPLM_DLL; {___________________________________________________________________________ - * PUBLISHING YOUR PLUGINS DATA + * PUBLISHING YOUR PLUGIN'S DATA ___________________________________________________________________________} { - These functions allow you to create data references that other plug-ins can - access via the above data access APIs. Data references published by other - plugins operate the same as ones published by X-Plane in all manners except - that your data reference will not be available to other plugins if/when - your plugin is disabled. + These functions allow you to create data references that other plug-ins and + X-Plane can access via the above data access APIs. Data references + published by other plugins operate the same as ones published by X-Plane in + all manners except that your data reference will not be available to other + plugins if/when your plugin is disabled. - You share data by registering data provider callback functions. When a - plug-in requests your data, these callbacks are then called. You provide - one callback to return the value when a plugin 'reads' it and another to - change the value when a plugin 'writes' it. + You share data by registering data provider callback functions. When a + plug-in requests your data, these callbacks are then called. You provide + one callback to return the value when a plugin 'reads' it and another to + change the value when a plugin 'writes' it. - Important: you must pick a prefix for your datarefs other than "sim/" - - this prefix is reserved for X-Plane. The X-Plane SDK website contains a - registry where authors can select a unique first word for dataref names, to - prevent dataref collisions between plugins. + Important: you must pick a prefix for your datarefs other than "sim/" - + this prefix is reserved for X-Plane. The X-Plane SDK website contains a + registry where authors can select a unique first word for dataref names, to + prevent dataref collisions between plugins. } { XPLMGetDatai_f - Data provider function pointers. + Data provider function pointers. - These define the function pointers you provide to get or set data. Note - that you are passed a generic pointer for each one. This is the same - pointer you pass in your register routine; you can use it to find global - variables, etc. + These define the function pointers you provide to get or set data. Note + that you are passed a generic pointer for each one. This is the same + pointer you pass in your register routine; you can use it to locate plugin + variables, etc. - The semantics of your callbacks are the same as the dataref accessor above - - basically routines like XPLMGetDatai are just pass-throughs from a caller - to your plugin. Be particularly mindful in implementing array dataref - read-write accessors; you are responsible for avoiding overruns, supporting - offset read/writes, and handling a read with a NULL buffer. + The semantics of your callbacks are the same as the dataref accessor above + - basically routines like XPLMGetDatai are just pass-throughs from a caller + to your plugin. Be particularly mindful in implementing array dataref + read-write accessors; you are responsible for avoiding overruns, supporting + offset read/writes, and handling a read with a NULL buffer. } TYPE XPLMGetDatai_f = FUNCTION( - inRefcon : pointer) : integer; cdecl; + inRefcon : pointer) : Integer; cdecl; { - XPLMSetDatai_f - + XPLMSetDatai_f } XPLMSetDatai_f = PROCEDURE( inRefcon : pointer; - inValue : integer); cdecl; + inValue : Integer); cdecl; { - XPLMGetDataf_f - + XPLMGetDataf_f } XPLMGetDataf_f = FUNCTION( - inRefcon : pointer) : single; cdecl; + inRefcon : pointer) : Single; cdecl; { - XPLMSetDataf_f - + XPLMSetDataf_f } XPLMSetDataf_f = PROCEDURE( inRefcon : pointer; - inValue : single); cdecl; + inValue : Single); cdecl; { - XPLMGetDatad_f - + XPLMGetDatad_f } XPLMGetDatad_f = FUNCTION( - inRefcon : pointer) : real; cdecl; + inRefcon : pointer) : Real; cdecl; { - XPLMSetDatad_f - + XPLMSetDatad_f } XPLMSetDatad_f = PROCEDURE( inRefcon : pointer; - inValue : real); cdecl; + inValue : Real); cdecl; { - XPLMGetDatavi_f - + XPLMGetDatavi_f } XPLMGetDatavi_f = FUNCTION( inRefcon : pointer; - outValues : Pinteger; { Can be nil } - inOffset : integer; - inMax : integer) : integer; cdecl; + outValues : PInteger; { Can be nil } + inOffset : Integer; + inMax : Integer) : Integer; cdecl; { - XPLMSetDatavi_f - + XPLMSetDatavi_f } XPLMSetDatavi_f = PROCEDURE( inRefcon : pointer; - inValues : Pinteger; - inOffset : integer; - inCount : integer); cdecl; + inValues : PInteger; + inOffset : Integer; + inCount : Integer); cdecl; { - XPLMGetDatavf_f - + XPLMGetDatavf_f } XPLMGetDatavf_f = FUNCTION( inRefcon : pointer; - outValues : Psingle; { Can be nil } - inOffset : integer; - inMax : integer) : integer; cdecl; + outValues : PSingle; { Can be nil } + inOffset : Integer; + inMax : Integer) : Integer; cdecl; { - XPLMSetDatavf_f - + XPLMSetDatavf_f } XPLMSetDatavf_f = PROCEDURE( inRefcon : pointer; - inValues : Psingle; - inOffset : integer; - inCount : integer); cdecl; + inValues : PSingle; + inOffset : Integer; + inCount : Integer); cdecl; { - XPLMGetDatab_f - + XPLMGetDatab_f } XPLMGetDatab_f = FUNCTION( inRefcon : pointer; outValue : pointer; { Can be nil } - inOffset : integer; - inMaxLength : integer) : integer; cdecl; + inOffset : Integer; + inMaxLength : Integer) : Integer; cdecl; { - XPLMSetDatab_f - + XPLMSetDatab_f } XPLMSetDatab_f = PROCEDURE( inRefcon : pointer; inValue : pointer; - inOffset : integer; - inLength : integer); cdecl; + inOffset : Integer; + inLength : Integer); cdecl; { XPLMRegisterDataAccessor - This routine creates a new item of data that can be read and written. Pass - in the data's full name for searching, the type(s) of the data for - accessing, and whether the data can be written to. For each data type you - support, pass in a read accessor function and a write accessor function if - necessary. Pass NULL for data types you do not support or write accessors - if you are read-only. + This routine creates a new item of data that can be read and written. Pass + in the data's full name for searching, the type(s) of the data for + accessing, and whether the data can be written to. For each data type you + support, pass in a read accessor function and a write accessor function if + necessary. Pass NULL for data types you do not support or write accessors + if you are read-only. - You are returned a data ref for the new item of data created. You can use - this data ref to unregister your data later or read or write from it. + You are returned a data ref for the new item of data created. You can use + this data ref to unregister your data later or read or write from it. } FUNCTION XPLMRegisterDataAccessor( - inDataName : Pchar; + inDataName : XPLMString; inDataType : XPLMDataTypeID; - inIsWritable : integer; + inIsWritable : Integer; inReadInt : XPLMGetDatai_f; inWriteInt : XPLMSetDatai_f; inReadFloat : XPLMGetDataf_f; @@ -629,79 +578,66 @@ inWriteData : XPLMSetDatab_f; inReadRefcon : pointer; inWriteRefcon : pointer) : XPLMDataRef; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMUnregisterDataAccessor - Use this routine to unregister any data accessors you may have registered. - You unregister a data ref by the XPLMDataRef you get back from - registration. Once you unregister a data ref, your function pointer will - not be called anymore. - - For maximum compatibility, do not unregister your data accessors until - final shutdown (when your XPluginStop routine is called). This allows other - plugins to find your data reference once and use it for their entire time - of operation. + Use this routine to unregister any data accessors you may have registered. + You unregister a data ref by the XPLMDataRef you get back from + registration. Once you unregister a data ref, your function pointer will + not be called anymore. } PROCEDURE XPLMUnregisterDataAccessor( inDataRef : XPLMDataRef); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; {___________________________________________________________________________ * SHARING DATA BETWEEN MULTIPLE PLUGINS ___________________________________________________________________________} { - The data reference registration APIs from the previous section allow a - plugin to publish data in a one-owner manner; the plugin that publishes the - data reference owns the real memory that the data ref uses. This is - satisfactory for most cases, but there are also cases where plugnis need to - share actual data. + The data reference registration APIs from the previous section allow a + plugin to publish data in a one-owner manner; the plugin that publishes the + data reference owns the real memory that the data ref uses. This is + satisfactory for most cases, but there are also cases where plugnis need to + share actual data. - With a shared data reference, no one plugin owns the actual memory for the - data reference; the plugin SDK allocates that for you. When the first - plugin asks to 'share' the data, the memory is allocated. When the data is - changed, every plugin that is sharing the data is notified. + With a shared data reference, no one plugin owns the actual memory for the + data reference; the plugin SDK allocates that for you. When the first + plugin asks to 'share' the data, the memory is allocated. When the data is + changed, every plugin that is sharing the data is notified. - Shared data references differ from the 'owned' data references from the - previous section in a few ways: + Shared data references differ from the 'owned' data references from the + previous section in a few ways: - - With shared data references, any plugin can create the data reference; - with owned plugins one plugin must create the data reference and others - subscribe. (This can be a problem if you don't know which set of plugins - will be present). + * With shared data references, any plugin can create the data reference; + with owned plugins one plugin must create the data reference and others + subscribe. (This can be a problem if you don't know which set of plugins + will be present). - - With shared data references, every plugin that is sharing the data is - notified when the data is changed. With owned data references, only the one - owner is notified when the data is changed. + * With shared data references, every plugin that is sharing the data is + notified when the data is changed. With owned data references, only the + one owner is notified when the data is changed. - - With shared data references, you cannot access the physical memory of the - data reference; you must use the XPLMGet... and XPLMSet... APIs. With an - owned data reference, the one owning data reference can manipulate the data - reference's memory in any way it sees fit. + * With shared data references, you cannot access the physical memory of the + data reference; you must use the XPLMGet... and XPLMSet... APIs. With an + owned data reference, the one owning data reference can manipulate the + data reference's memory in any way it sees fit. - Shared data references solve two problems: if you need to have a data - reference used by several plugins but do not know which plugins will be - installed, or if all plugins sharing data need to be notified when that - data is changed, use shared data references. + Shared data references solve two problems: if you need to have a data + reference used by several plugins but do not know which plugins will be + installed, or if all plugins sharing data need to be notified when that + data is changed, use shared data references. } { XPLMDataChanged_f - An XPLMDataChanged_f is a callback that the XPLM calls whenever any other - plug-in modifies shared data. A refcon you provide is passed back to help - identify which data is being changed. In response, you may want to call one - of the XPLMGetDataxxx routines to find the new value of the data. + An XPLMDataChanged_f is a callback that the XPLM calls whenever any other + plug-in modifies shared data. A refcon you provide is passed back to help + identify which data is being changed. In response, you may want to call one + of the XPLMGetDataxxx routines to find the new value of the data. } TYPE XPLMDataChanged_f = PROCEDURE( @@ -710,51 +646,45 @@ { XPLMShareData - This routine connects a plug-in to shared data, creating the shared data if - necessary. inDataName is a standard path for the data ref, and inDataType - specifies the type. This function will create the data if it does not - exist. If the data already exists but the type does not match, an error is - returned, so it is important that plug-in authors collaborate to establish - public standards for shared data. + This routine connects a plug-in to shared data, creating the shared data if + necessary. inDataName is a standard path for the data ref, and inDataType + specifies the type. This function will create the data if it does not + exist. If the data already exists but the type does not match, an error is + returned, so it is important that plug-in authors collaborate to establish + public standards for shared data. - If a notificationFunc is passed in and is not NULL, that notification - function will be called whenever the data is modified. The notification - refcon will be passed to it. This allows your plug-in to know which shared - data was changed if multiple shared data are handled by one callback, or if - the plug-in does not use global variables. + If a notificationFunc is passed in and is not NULL, that notification + function will be called whenever the data is modified. The notification + refcon will be passed to it. This allows your plug-in to know which shared + data was changed if multiple shared data are handled by one callback, or if + the plug-in does not use global variables. - A one is returned for successfully creating or finding the shared data; a - zero if the data already exists but is of the wrong type. + A one is returned for successfully creating or finding the shared data; a + zero if the data already exists but is of the wrong type. } FUNCTION XPLMShareData( - inDataName : Pchar; + inDataName : XPLMString; inDataType : XPLMDataTypeID; inNotificationFunc : XPLMDataChanged_f; - inNotificationRefcon: pointer) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inNotificationRefcon: pointer) : Integer; + cdecl; external XPLM_DLL; { XPLMUnshareData - This routine removes your notification function for shared data. Call it - when done with the data to stop receiving change notifications. Arguments - must match XPLMShareData. The actual memory will not necessarily be freed, - since other plug-ins could be using it. + This routine removes your notification function for shared data. Call it + when done with the data to stop receiving change notifications. Arguments + must match XPLMShareData. The actual memory will not necessarily be freed, + since other plug-ins could be using it. } FUNCTION XPLMUnshareData( - inDataName : Pchar; + inDataName : XPLMString; inDataType : XPLMDataTypeID; inNotificationFunc : XPLMDataChanged_f; - inNotificationRefcon: pointer) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inNotificationRefcon: pointer) : Integer; + cdecl; external XPLM_DLL; + IMPLEMENTATION + END. diff --git a/src/SDK/Delphi/XPLM/XPLMDefs.pas b/src/SDK/Delphi/XPLM/XPLMDefs.pas index 48ec73bc..91bd774a 100755 --- a/src/SDK/Delphi/XPLM/XPLMDefs.pas +++ b/src/SDK/Delphi/XPLM/XPLMDefs.pas @@ -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,13 +35,13 @@ * 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.) } @@ -56,7 +50,7 @@ * GLOBAL DEFINITIONS ___________________________________________________________________________} { - These definitions are used in all parts of the SDK. + These definitions are used in all parts of the SDK. } @@ -64,61 +58,62 @@ { 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 3.01 (301). } - kXPLM_Version = (301); + { The current XPLM revision is 3.03 (303). } + kXPLM_Version = (303); { 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 ); @@ -128,15 +123,16 @@ * 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. } @@ -183,31 +179,29 @@ * 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. } @@ -254,7 +248,7 @@ 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; @@ -275,7 +269,7 @@ 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; @@ -408,8 +402,8 @@ 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; @@ -438,5 +432,7 @@ XPLM_VK_NUMPAD_EQ = $BD; + IMPLEMENTATION + END. diff --git a/src/SDK/Delphi/XPLM/XPLMDisplay.pas b/src/SDK/Delphi/XPLM/XPLMDisplay.pas index 9dd1ab49..a100fd0a 100755 --- a/src/SDK/Delphi/XPLM/XPLMDisplay.pas +++ b/src/SDK/Delphi/XPLM/XPLMDisplay.pas @@ -1,174 +1,199 @@ { - 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 XPLMDisplay; INTERFACE { - This API provides the basic hooks to draw in X-Plane and create user - interface. All X-Plane drawing is done in OpenGL. The X-Plane plug-in - manager takes care of properly setting up the OpenGL context and matrices. - You do not decide when in your code's execution to draw; X-Plane tells you - (via callbacks) when it is ready to have your plugin draw. - - X-Plane's drawing strategy is straightforward: every "frame" the screen is - rendered by drawing the 3-D scene (dome, ground, objects, airplanes, etc.) - and then drawing the cockpit on top of it. Alpha blending is used to - overlay the cockpit over the world (and the gauges over the panel, etc.). - X-Plane user interface elements (including windows like the map, the main - menu, etc.) are then drawn on top of the cockpit. - - There are two ways you can draw: directly and in a window. + This API provides the basic hooks to draw in X-Plane and create user + interface. All X-Plane drawing is done in OpenGL. The X-Plane plug-in + manager takes care of properly setting up the OpenGL context and matrices. + You do not decide when in your code's execution to draw; X-Plane tells you + (via callbacks) when it is ready to have your plugin draw. - Direct drawing (deprecated!---more on that below) involves drawing to the - screen before or after X-Plane finishes a phase of drawing. When you draw - directly, you can specify whether X-Plane is to complete this phase or not. - This allows you to do three things: draw before X-Plane does (under it), - draw after X-Plane does (over it), or draw instead of X-Plane. + X-Plane's drawing strategy is straightforward: every "frame" the screen is + rendered by drawing the 3-D scene (dome, ground, objects, airplanes, etc.) + and then drawing the cockpit on top of it. Alpha blending is used to + overlay the cockpit over the world (and the gauges over the panel, etc.). + X-Plane user interface elements (including windows like the map, the main + menu, etc.) are then drawn on top of the cockpit. - To draw directly, you register a callback and specify which phase you want - to intercept. The plug-in manager will call you over and over to draw that - phase. + There are two ways you can draw: directly and in a window. - Direct drawing allows you to override scenery, panels, or anything. Note - that you cannot assume that you are the only plug-in drawing at this - phase. + Direct drawing (deprecated!---more on that below) involves drawing to the + screen before or after X-Plane finishes a phase of drawing. When you draw + directly, you can specify whether X-Plane is to complete this phase or not. + This allows you to do three things: draw before X-Plane does (under it), + draw after X-Plane does (over it), or draw instead of X-Plane. - Direct drawing is deprecated; at some point in the X-Plane 11 run, it will - likely become unsupported entirely as X-Plane transitions from OpenGL to - modern graphics API backends (e.g., Vulkan, Metal, etc.). In the long term, - plugins should use the XPLMInstance API for drawing 3-D objects---this will - be much more efficient than general 3-D OpenGL drawing, and it will - actually be supported by the new graphics backends. We do not yet know what - the post-transition API for generic 3-D drawing will look like (if it - exists at all). + To draw directly, you register a callback and specify which phase you want + to intercept. The plug-in manager will call you over and over to draw that + phase. - In contrast to direct drawing, window drawing provides a higher level - functionality. With window drawing, you create a 2-D window that takes up a - portion of the screen. Window drawing is always two dimensional. Window - drawing is front-to-back controlled; you can specify that you want your - window to be brought on top, and other plug-ins may put their window on top - of you. Window drawing also allows you to sign up for key presses and - receive mouse clicks. + Direct drawing allows you to override scenery, panels, or anything. Note + that you cannot assume that you are the only plug-in drawing at this phase. - There are three ways to get keystrokes: + Direct drawing is deprecated; at some point in the X-Plane 11 run, it will + likely become unsupported entirely as X-Plane transitions from OpenGL to + modern graphics API backends (e.g., Vulkan, Metal, etc.). In the long term, + plugins should use the XPLMInstance API for drawing 3-D objects---this will + be much more efficient than general 3-D OpenGL drawing, and it will + actually be supported by the new graphics backends. We do not yet know what + the post-transition API for generic 3-D drawing will look like (if it + exists at all). - 1. If you create a window, the window can take keyboard focus. It will - then receive all keystrokes. If no window has focus, X-Plane receives - keystrokes. Use this to implement typing in dialog boxes, etc. Only one - window may have focus at a time; your window will be notified if it loses - focus. + In contrast to direct drawing, window drawing provides a higher level + functionality. With window drawing, you create a 2-D window that takes up a + portion of the screen. Window drawing is always two dimensional. Window + drawing is front-to-back controlled; you can specify that you want your + window to be brought on top, and other plug-ins may put their window on top + of you. Window drawing also allows you to sign up for key presses and + receive mouse clicks. - 2. If you need low level access to the keystroke stream, install a key - sniffer. Key sniffers can be installed above everything or right in front - of the sim. + There are three ways to get keystrokes: - 3. If you would like to associate key strokes with commands/functions in - your plug-in, you should simply register a command (via - XPLMCreateCommand()) and allow users to bind whatever key they choose to - that command. Another (now deprecated) method of doing so is to use a hot - key---a key-specific callback. Hotkeys are sent based on virtual key - strokes, so any key may be distinctly mapped with any modifiers. Hot keys - can be remapped by other plug-ins. As a plug-in, you don't have to worry - about what your hot key ends up mapped to; other plug-ins may provide a UI - for remapping keystrokes. So hotkeys allow a user to resolve conflicts and - customize keystrokes. + 1. If you create a window, the window can take keyboard focus. It will + then receive all keystrokes. If no window has focus, X-Plane receives + keystrokes. Use this to implement typing in dialog boxes, etc. Only + one window may have focus at a time; your window will be notified if it + loses focus. + 2. If you need low level access to the keystroke stream, install a key + sniffer. Key sniffers can be installed above everything or right in + front of the sim. + 3. If you would like to associate key strokes with commands/functions in + your plug-in, you should simply register a command (via + XPLMCreateCommand()) and allow users to bind whatever key they choose to + that command. Another (now deprecated) method of doing so is to use a + hot key---a key-specific callback. Hotkeys are sent based on virtual + key strokes, so any key may be distinctly mapped with any modifiers. + Hot keys can be remapped by other plug-ins. As a plug-in, you don't + have to worry about what your hot key ends up mapped to; other plug-ins + may provide a UI for remapping keystrokes. So hotkeys allow a user to + resolve conflicts and customize keystrokes. } -USES XPLMDefs; +USES + XPLMDefs; {$A4} -{$IFDEF MSWINDOWS} - {$DEFINE DELPHI} -{$ENDIF} {___________________________________________________________________________ * DRAWING CALLBACKS ___________________________________________________________________________} { - Basic drawing callbacks, for low level intercepting of X-Plane's render - loop. The purpose of drawing callbacks is to provide targeted additions or - replacements to X-Plane's graphics environment (for example, to add extra - custom objects, or replace drawing of the AI aircraft). Do not assume that - the drawing callbacks will be called in the order implied by the - enumerations. Also do not assume that each drawing phase ends before - another begins; they may be nested. + Basic drawing callbacks, for low level intercepting of X-Plane's render + loop. The purpose of drawing callbacks is to provide targeted additions or + replacements to X-Plane's graphics environment (for example, to add extra + custom objects, or replace drawing of the AI aircraft). Do not assume that + the drawing callbacks will be called in the order implied by the + enumerations. Also do not assume that each drawing phase ends before + another begins; they may be nested. - Note that all APIs in this section are deprecated, and will likely be - removed during the X-Plane 11 run as part of the transition to - Vulkan/Metal/etc. See the XPLMInstance API for future-proof drawing of 3-D - objects. + Note that all APIs in this section are deprecated, and will likely be + removed during the X-Plane 11 run as part of the transition to + Vulkan/Metal/etc. See the XPLMInstance API for future-proof drawing of 3-D + objects. } { XPLMDrawingPhase - This constant indicates which part of drawing we are in. Drawing is done - from the back to the front. We get a callback before or after each item. - Metaphases provide access to the beginning and end of the 3d (scene) and 2d - (cockpit) drawing in a manner that is independent of new phases added via - X-Plane implementation. - - WARNING: As X-Plane's scenery evolves, some drawing phases may cease to - exist and new ones may be invented. If you need a particularly specific - use of these codes, consult Austin and/or be prepared to revise your code - as X-Plane evolves. + This constant indicates which part of drawing we are in. Drawing is done + from the back to the front. We get a callback before or after each item. + Metaphases provide access to the beginning and end of the 3d (scene) and + 2d (cockpit) drawing in a manner that is independent of new phases added + via X-Plane implementation. + + **NOTE**: As of XPLM302 the legacy 3D drawing phases (xplm_Phase_FirstScene + to xplm_Phase_LastScene) are deprecated. When running under X-Plane 11.50 + with the modern Vulkan or Metal backend, X-Plane will no longer call + these drawing phases. There is a new drawing phase, xplm_Phase_Modern3D, + which is supported under OpenGL and Vulkan which is called out roughly + where the old before xplm_Phase_Airplanes phase was for blending. This + phase is *NOT* supported under Metal and comes with potentially + substantial performance overhead. Please do *NOT* opt into this phase if + you don't do any actual drawing that requires the depth buffer in some + way! + + **WARNING**: As X-Plane's scenery evolves, some drawing phases may cease to + exist and new ones may be invented. If you need a particularly specific + use of these codes, consult Austin and/or be prepared to revise your code + as X-Plane evolves. } TYPE XPLMDrawingPhase = ( - { This is the earliest point at which you can draw in 3-d. } +{$IFDEF XPLM_DEPRECATED} + { Deprecated as of XPLM302. This is the earliest point at which you can draw } + { in 3-d. } xplm_Phase_FirstScene = 0 +{$ENDIF XPLM_DEPRECATED} - { Drawing of land and water. } +{$IFDEF XPLM_DEPRECATED} + { Deprecated as of XPLM302. Drawing of land and water. } ,xplm_Phase_Terrain = 5 +{$ENDIF XPLM_DEPRECATED} - { Drawing runways and other airport detail. } +{$IFDEF XPLM_DEPRECATED} + { Deprecated as of XPLM302. Drawing runways and other airport detail. } ,xplm_Phase_Airports = 10 +{$ENDIF XPLM_DEPRECATED} - { Drawing roads, trails, trains, etc. } +{$IFDEF XPLM_DEPRECATED} + { Deprecated as of XPLM302. Drawing roads, trails, trains, etc. } ,xplm_Phase_Vectors = 15 +{$ENDIF XPLM_DEPRECATED} - { 3-d objects (houses, smokestacks, etc. } +{$IFDEF XPLM_DEPRECATED} + { Deprecated as of XPLM302. 3-d objects (houses, smokestacks, etc. } ,xplm_Phase_Objects = 20 +{$ENDIF XPLM_DEPRECATED} - { External views of airplanes, both yours and the AI aircraft. } +{$IFDEF XPLM_DEPRECATED} + { Deprecated as of XPLM302. External views of airplanes, both yours and the } + { AI aircraft. } ,xplm_Phase_Airplanes = 25 +{$ENDIF XPLM_DEPRECATED} - { This is the last point at which you can draw in 3-d. } +{$IFDEF XPLM_DEPRECATED} + { Deprecated as of XPLM302. This is the last point at which you can draw in } + { 3-d. } ,xplm_Phase_LastScene = 30 +{$ENDIF XPLM_DEPRECATED} + +{$IFDEF XPLM302} + { A chance to do modern 3D drawing. } + ,xplm_Phase_Modern3D = 31 +{$ENDIF XPLM302} - { This is the first phase where you can draw in 2-d. } + { This is the first phase where you can draw in 2-d. } ,xplm_Phase_FirstCockpit = 35 - { The non-moving parts of the aircraft panel. } + { The non-moving parts of the aircraft panel. } ,xplm_Phase_Panel = 40 - { The moving parts of the aircraft panel. } + { The moving parts of the aircraft panel. } ,xplm_Phase_Gauges = 45 - { Floating windows from plugins. } + { Floating windows from plugins. } ,xplm_Phase_Window = 50 - { The last change to draw in 2d. } + { The last chance to draw in 2d. } ,xplm_Phase_LastCockpit = 55 {$IFDEF XPLM200} - { Removed as of XPLM300; Use the full-blown XPLMMap API instead. } + { Removed as of XPLM300; Use the full-blown XPLMMap API instead. } ,xplm_Phase_LocalMap3D = 100 -{$ENDIF} +{$ENDIF XPLM200} {$IFDEF XPLM200} - { Removed as of XPLM300; Use the full-blown XPLMMap API instead. } + { Removed as of XPLM300; Use the full-blown XPLMMap API instead. } ,xplm_Phase_LocalMap2D = 101 -{$ENDIF} +{$ENDIF XPLM200} {$IFDEF XPLM200} - { Removed as of XPLM300; Use the full-blown XPLMMap API instead. } + { Removed as of XPLM300; Use the full-blown XPLMMap API instead. } ,xplm_Phase_LocalMapProfile = 102 -{$ENDIF} +{$ENDIF XPLM200} ); PXPLMDrawingPhase = ^XPLMDrawingPhase; @@ -176,107 +201,99 @@ { XPLMDrawCallback_f - This is the prototype for a low level drawing callback. You are passed in - the phase and whether it is before or after. If you are before the phase, - return 1 to let X-Plane draw or 0 to suppress X-Plane drawing. If you are - after the phase the return value is ignored. + This is the prototype for a low level drawing callback. You are passed in + the phase and whether it is before or after. If you are before the phase, + return 1 to let X-Plane draw or 0 to suppress X-Plane drawing. If you are + after the phase the return value is ignored. - Refcon is a unique value that you specify when registering the callback, - allowing you to slip a pointer to your own data to the callback. + Refcon is a unique value that you specify when registering the callback, + allowing you to slip a pointer to your own data to the callback. - Upon entry the OpenGL context will be correctly set up for you and OpenGL - will be in 'local' coordinates for 3d drawing and panel coordinates for 2d - drawing. The OpenGL state (texturing, etc.) will be unknown. + Upon entry the OpenGL context will be correctly set up for you and OpenGL + will be in 'local' coordinates for 3d drawing and panel coordinates for 2d + drawing. The OpenGL state (texturing, etc.) will be unknown. } XPLMDrawCallback_f = FUNCTION( inPhase : XPLMDrawingPhase; - inIsBefore : integer; - inRefcon : pointer) : integer; cdecl; + inIsBefore : Integer; + inRefcon : pointer) : Integer; cdecl; { XPLMRegisterDrawCallback - This routine registers a low level drawing callback. Pass in the phase you - want to be called for and whether you want to be called before or after. - This routine returns 1 if the registration was successful, or 0 if the - phase does not exist in this version of X-Plane. You may register a - callback multiple times for the same or different phases as long as the - refcon is unique each time. + This routine registers a low level drawing callback. Pass in the phase you + want to be called for and whether you want to be called before or after. + This routine returns 1 if the registration was successful, or 0 if the + phase does not exist in this version of X-Plane. You may register a + callback multiple times for the same or different phases as long as the + refcon is unique each time. - Note that this function will likely be removed during the X-Plane 11 run as - part of the transition to Vulkan/Metal/etc. See the XPLMInstance API for - future-proof drawing of 3-D objects. + Note that this function will likely be removed during the X-Plane 11 run as + part of the transition to Vulkan/Metal/etc. See the XPLMInstance API for + future-proof drawing of 3-D objects. } FUNCTION XPLMRegisterDrawCallback( inCallback : XPLMDrawCallback_f; inPhase : XPLMDrawingPhase; - inWantsBefore : integer; - inRefcon : pointer) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inWantsBefore : Integer; + inRefcon : pointer) : Integer; + cdecl; external XPLM_DLL; { XPLMUnregisterDrawCallback - This routine unregisters a draw callback. You must unregister a callback - for each time you register a callback if you have registered it multiple - times with different refcons. The routine returns 1 if it can find the - callback to unregister, 0 otherwise. + This routine unregisters a draw callback. You must unregister a callback + for each time you register a callback if you have registered it multiple + times with different refcons. The routine returns 1 if it can find the + callback to unregister, 0 otherwise. - Note that this function will likely be removed during the X-Plane 11 run as - part of the transition to Vulkan/Metal/etc. See the XPLMInstance API for - future-proof drawing of 3-D objects. + Note that this function will likely be removed during the X-Plane 11 run as + part of the transition to Vulkan/Metal/etc. See the XPLMInstance API for + future-proof drawing of 3-D objects. } FUNCTION XPLMUnregisterDrawCallback( inCallback : XPLMDrawCallback_f; inPhase : XPLMDrawingPhase; - inWantsBefore : integer; - inRefcon : pointer) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inWantsBefore : Integer; + inRefcon : pointer) : Integer; + cdecl; external XPLM_DLL; {___________________________________________________________________________ * WINDOW API ___________________________________________________________________________} { - The window API provides a high-level abstraction for drawing with UI - interaction. + The window API provides a high-level abstraction for drawing with UI + interaction. - Windows may operate in one of two modes: legacy (for plugins compiled - against old versions of the XPLM, as well as windows created via the - deprecated XPLMCreateWindow() function, rather than XPLMCreateWindowEx()), - or modern (for windows compiled against the XPLM300 or newer API, and - created via XPLMCreateWindowEx()). + Windows may operate in one of two modes: legacy (for plugins compiled + against old versions of the XPLM, as well as windows created via the + deprecated XPLMCreateWindow() function, rather than XPLMCreateWindowEx()), + or modern (for windows compiled against the XPLM300 or newer API, and + created via XPLMCreateWindowEx()). - Modern windows have access to new X-Plane 11 windowing features, like - support for new positioning modes (including being "popped out" into their - own first-class window in the operating system). They can also optionally - be decorated in the style of X-Plane 11 windows (like the map). + Modern windows have access to new X-Plane 11 windowing features, like + support for new positioning modes (including being "popped out" into their + own first-class window in the operating system). They can also optionally + be decorated in the style of X-Plane 11 windows (like the map). - Modern windows operate in "boxel" units. A boxel ("box of pixels") is a - unit of virtual pixels which, depending on X-Plane's scaling, may - correspond to an arbitrary NxN "box" of real pixels on screen. Because - X-Plane handles this scaling automatically, you can effectively treat the - units as though you were simply drawing in pixels, and know that when - X-Plane is running with 150% or 200% scaling, your drawing will be - automatically scaled (and likewise all mouse coordinates, screen bounds, - etc. will also be auto-scaled). + Modern windows operate in "boxel" units. A boxel ("box of pixels") is a + unit of virtual pixels which, depending on X-Plane's scaling, may + correspond to an arbitrary NxN "box" of real pixels on screen. Because + X-Plane handles this scaling automatically, you can effectively treat the + units as though you were simply drawing in pixels, and know that when + X-Plane is running with 150% or 200% scaling, your drawing will be + automatically scaled (and likewise all mouse coordinates, screen bounds, + etc. will also be auto-scaled). - In contrast, legacy windows draw in true screen pixels, and thus tend to - look quite small when X-Plane is operating in a scaled mode. + In contrast, legacy windows draw in true screen pixels, and thus tend to + look quite small when X-Plane is operating in a scaled mode. - Legacy windows have their origin in the lower left of the main X-Plane - window. In contrast, since modern windows are not constrained to the main - window, they have their origin in the lower left of the entire global - desktop space, and the lower left of the main X-Plane window is not - guaranteed to be (0, 0). In both cases, x increases as you move left, and y - increases as you move up. + Legacy windows have their origin in the lower left of the main X-Plane + window. In contrast, since modern windows are not constrained to the main + window, they have their origin in the lower left of the entire global + desktop space, and the lower left of the main X-Plane window is not + guaranteed to be (0, 0). In both cases, x increases as you move left, and y + increases as you move up. } @@ -284,10 +301,10 @@ { XPLMWindowID - This is an opaque identifier for a window. You use it to control your - window. When you create a window (via either XPLMCreateWindow() or - XPLMCreateWindowEx()), you will specify callbacks to handle drawing, mouse - interaction, etc. + This is an opaque identifier for a window. You use it to control your + window. When you create a window (via either XPLMCreateWindow() or + XPLMCreateWindowEx()), you will specify callbacks to handle drawing, mouse + interaction, etc. } XPLMWindowID = pointer; PXPLMWindowID = ^XPLMWindowID; @@ -295,15 +312,15 @@ { XPLMDrawWindow_f - A callback to handle 2-D drawing of your window. You are passed in your - window and its refcon. Draw the window. You can use other XPLM functions - from this header to find the current dimensions of your window, etc. When - this callback is called, the OpenGL context will be set properly for 2-D - window drawing. + A callback to handle 2-D drawing of your window. You are passed in your + window and its refcon. Draw the window. You can use other XPLM functions + from this header to find the current dimensions of your window, etc. When + this callback is called, the OpenGL context will be set properly for 2-D + window drawing. - NOTE: Because you are drawing your window over a background, you can make a - translucent window easily by simply not filling in your entire window's - bounds. + **Note**: Because you are drawing your window over a background, you can + make a translucent window easily by simply not filling in your entire + window's bounds. } XPLMDrawWindow_f = PROCEDURE( inWindowID : XPLMWindowID; @@ -312,33 +329,33 @@ { XPLMHandleKey_f - This function is called when a key is pressed or keyboard focus is taken - away from your window. If losingFocus is 1, you are losing the keyboard - focus, otherwise a key was pressed and inKey contains its character. You - are also passed your window and a refcon. + This function is called when a key is pressed or keyboard focus is taken + away from your window. If losingFocus is 1, you are losing the keyboard + focus, otherwise a key was pressed and inKey contains its character. You + are also passed your window and a refcon. - Warning: this API declares virtual keys as a signed character; however the - VKEY #define macros in XPLMDefs.h define the vkeys using unsigned values - (that is 0x80 instead of -0x80). So you may need to cast the incoming vkey - to an unsigned char to get correct comparisons in C. + Warning: this API declares virtual keys as a signed character; however the + VKEY #define macros in XPLMDefs.h define the vkeys using unsigned values + (that is 0x80 instead of -0x80). So you may need to cast the incoming vkey + to an unsigned char to get correct comparisons in C. } XPLMHandleKey_f = PROCEDURE( inWindowID : XPLMWindowID; - inKey : char; + inKey : XPLMChar; inFlags : XPLMKeyFlags; - inVirtualKey : char; + inVirtualKey : XPLMChar; inRefcon : pointer; - losingFocus : integer); cdecl; + losingFocus : Integer); cdecl; { XPLMMouseStatus - When the mouse is clicked, your mouse click routine is called repeatedly. - It is first called with the mouse down message. It is then called zero or - more times with the mouse-drag message, and finally it is called once with - the mouse up message. All of these messages will be directed to the same - window; you are guaranteed to not receive a drag or mouse-up event without - first receiving the corresponding mouse-down. + When the mouse is clicked, your mouse click routine is called repeatedly. + It is first called with the mouse down message. It is then called zero or + more times with the mouse-drag message, and finally it is called once with + the mouse up message. All of these messages will be directed to the same + window; you are guaranteed to not receive a drag or mouse-up event without + first receiving the corresponding mouse-down. } XPLMMouseStatus = ( xplm_MouseDown = 1 @@ -353,1113 +370,1000 @@ { XPLMHandleMouseClick_f - You receive this call for one of three events: + You receive this call for one of three events: - - when the user clicks the mouse button down - (optionally) when the user - drags the mouse after a down-click, but before the up-click - when the user - releases the down-clicked mouse button. + - when the user clicks the mouse button down + - (optionally) when the user drags the mouse after a down-click, but before + the up-click + - when the user releases the down-clicked mouse button. - You receive the x and y of the click, your window, and a refcon. Return 1 - to consume the click, or 0 to pass it through. + You receive the x and y of the click, your window, and a refcon. Return 1 + to consume the click, or 0 to pass it through. - WARNING: passing clicks through windows (as of this writing) causes mouse - tracking problems in X-Plane; do not use this feature! + WARNING: passing clicks through windows (as of this writing) causes mouse + tracking problems in X-Plane; do not use this feature! - The units for x and y values match the units used in your window. Thus, for - "modern" windows (those created via XPLMCreateWindowEx() and compiled - against the XPLM300 library), the units are boxels, while legacy windows - will get pixels. Legacy windows have their origin in the lower left of the - main X-Plane window, while modern windows have their origin in the lower - left of the global desktop space. In both cases, x increases as you move - left, and y increases as you move up. + The units for x and y values match the units used in your window. Thus, for + "modern" windows (those created via XPLMCreateWindowEx() and compiled + against the XPLM300 library), the units are boxels, while legacy windows + will get pixels. Legacy windows have their origin in the lower left of the + main X-Plane window, while modern windows have their origin in the lower + left of the global desktop space. In both cases, x increases as you move + right, and y increases as you move up. } XPLMHandleMouseClick_f = FUNCTION( inWindowID : XPLMWindowID; - x : integer; - y : integer; + x : Integer; + y : Integer; inMouse : XPLMMouseStatus; - inRefcon : pointer) : integer; cdecl; + inRefcon : pointer) : Integer; cdecl; {$IFDEF XPLM200} { XPLMCursorStatus - XPLMCursorStatus describes how you would like X-Plane to manage the cursor. - See XPLMHandleCursor_f for more info. + XPLMCursorStatus describes how you would like X-Plane to manage the cursor. + See XPLMHandleCursor_f for more info. } +TYPE XPLMCursorStatus = ( - { X-Plane manages the cursor normally, plugin does not affect the cusrsor. } + { X-Plane manages the cursor normally, plugin does not affect the cusrsor. } xplm_CursorDefault = 0 - { X-Plane hides the cursor. } + { X-Plane hides the cursor. } ,xplm_CursorHidden = 1 - { X-Plane shows the cursor as the default arrow. } + { X-Plane shows the cursor as the default arrow. } ,xplm_CursorArrow = 2 - { X-Plane shows the cursor but lets you select an OS cursor. } + { X-Plane shows the cursor but lets you select an OS cursor. } ,xplm_CursorCustom = 3 ); PXPLMCursorStatus = ^XPLMCursorStatus; -{$ENDIF} +{$ENDIF XPLM200} {$IFDEF XPLM200} { XPLMHandleCursor_f - The SDK calls your cursor status callback when the mouse is over your - plugin window. Return a cursor status code to indicate how you would like - X-Plane to manage the cursor. If you return xplm_CursorDefault, the SDK - will try lower-Z-order plugin windows, then let the sim manage the cursor. - - Note: you should never show or hide the cursor yourself---these APIs are - typically reference-counted and thus cannot safely and predictably be used - by the SDK. Instead return one of xplm_CursorHidden to hide the cursor or - xplm_CursorArrow/xplm_CursorCustom to show the cursor. - - If you want to implement a custom cursor by drawing a cursor in OpenGL, use - xplm_CursorHidden to hide the OS cursor and draw the cursor using a 2-d - drawing callback (after xplm_Phase_Window is probably a good choice, but - see deprecation warnings on the drawing APIs!). If you want to use a - custom OS-based cursor, use xplm_CursorCustom to ask X-Plane to show the - cursor but not affect its image. You can then use an OS specific call like - SetThemeCursor (Mac) or SetCursor/LoadCursor (Windows). - - The units for x and y values match the units used in your window. Thus, for - "modern" windows (those created via XPLMCreateWindowEx() and compiled - against the XPLM300 library), the units are boxels, while legacy windows - will get pixels. Legacy windows have their origin in the lower left of the - main X-Plane window, while modern windows have their origin in the lower - left of the global desktop space. In both cases, x increases as you move - left, and y increases as you move up. + The SDK calls your cursor status callback when the mouse is over your + plugin window. Return a cursor status code to indicate how you would like + X-Plane to manage the cursor. If you return xplm_CursorDefault, the SDK + will try lower-Z-order plugin windows, then let the sim manage the cursor. + + Note: you should never show or hide the cursor yourself---these APIs are + typically reference-counted and thus cannot safely and predictably be used + by the SDK. Instead return one of xplm_CursorHidden to hide the cursor or + xplm_CursorArrow/xplm_CursorCustom to show the cursor. + + If you want to implement a custom cursor by drawing a cursor in OpenGL, use + xplm_CursorHidden to hide the OS cursor and draw the cursor using a 2-d + drawing callback (after xplm_Phase_Window is probably a good choice, but + see deprecation warnings on the drawing APIs!). If you want to use a + custom OS-based cursor, use xplm_CursorCustom to ask X-Plane to show the + cursor but not affect its image. You can then use an OS specific call like + SetThemeCursor (Mac) or SetCursor/LoadCursor (Windows). + + The units for x and y values match the units used in your window. Thus, for + "modern" windows (those created via XPLMCreateWindowEx() and compiled + against the XPLM300 library), the units are boxels, while legacy windows + will get pixels. Legacy windows have their origin in the lower left of the + main X-Plane window, while modern windows have their origin in the lower + left of the global desktop space. In both cases, x increases as you move + right, and y increases as you move up. } XPLMHandleCursor_f = FUNCTION( inWindowID : XPLMWindowID; - x : integer; - y : integer; + x : Integer; + y : Integer; inRefcon : pointer) : XPLMCursorStatus; cdecl; -{$ENDIF} +{$ENDIF XPLM200} {$IFDEF XPLM200} { XPLMHandleMouseWheel_f - The SDK calls your mouse wheel callback when one of the mouse wheels is - scrolled within your window. Return 1 to consume the mouse wheel movement - or 0 to pass them on to a lower window. (If your window appears opaque to - the user, you should consume mouse wheel scrolling even if it does - nothing.) The number of "clicks" indicates how far the wheel was turned - since the last callback. The wheel is 0 for the vertical axis or 1 for the - horizontal axis (for OS/mouse combinations that support this). - - The units for x and y values match the units used in your window. Thus, for - "modern" windows (those created via XPLMCreateWindowEx() and compiled - against the XPLM300 library), the units are boxels, while legacy windows - will get pixels. Legacy windows have their origin in the lower left of the - main X-Plane window, while modern windows have their origin in the lower - left of the global desktop space. In both cases, x increases as you move - left, and y increases as you move up. + The SDK calls your mouse wheel callback when one of the mouse wheels is + scrolled within your window. Return 1 to consume the mouse wheel movement + or 0 to pass them on to a lower window. (If your window appears opaque to + the user, you should consume mouse wheel scrolling even if it does + nothing.) The number of "clicks" indicates how far the wheel was turned + since the last callback. The wheel is 0 for the vertical axis or 1 for the + horizontal axis (for OS/mouse combinations that support this). + + The units for x and y values match the units used in your window. Thus, for + "modern" windows (those created via XPLMCreateWindowEx() and compiled + against the XPLM300 library), the units are boxels, while legacy windows + will get pixels. Legacy windows have their origin in the lower left of the + main X-Plane window, while modern windows have their origin in the lower + left of the global desktop space. In both cases, x increases as you move + right, and y increases as you move up. } XPLMHandleMouseWheel_f = FUNCTION( inWindowID : XPLMWindowID; - x : integer; - y : integer; - wheel : integer; - clicks : integer; - inRefcon : pointer) : integer; cdecl; -{$ENDIF} + x : Integer; + y : Integer; + wheel : Integer; + clicks : Integer; + inRefcon : pointer) : Integer; cdecl; +{$ENDIF XPLM200} {$IFDEF XPLM300} { XPLMWindowLayer - XPLMWindowLayer describes where in the ordering of windows X-Plane should - place a particular window. Windows in higher layers cover windows in lower - layers. So, a given window might be at the top of its particular layer, but - it might still be obscured by a window in a higher layer. (This happens - frequently when floating windows, like X-Plane's map, are covered by a - modal alert.) - - Your window's layer can only be specified when you create the window (in - the XPLMCreateWindow_t you pass to XPLMCreateWindowEx()). For this reason, - layering only applies to windows created with new X-Plane 11 GUI features. - (Windows created using the older XPLMCreateWindow(), or windows compiled - against a pre-XPLM300 version of the SDK will simply be placed in the - flight overlay window layer.) + XPLMWindowLayer describes where in the ordering of windows X-Plane should + place a particular window. Windows in higher layers cover windows in lower + layers. So, a given window might be at the top of its particular layer, but + it might still be obscured by a window in a higher layer. (This happens + frequently when floating windows, like X-Plane's map, are covered by a + modal alert.) + + Your window's layer can only be specified when you create the window (in + the XPLMCreateWindow_t you pass to XPLMCreateWindowEx()). For this reason, + layering only applies to windows created with new X-Plane 11 GUI features. + (Windows created using the older XPLMCreateWindow(), or windows compiled + against a pre-XPLM300 version of the SDK will simply be placed in the + flight overlay window layer.) } +TYPE XPLMWindowLayer = ( - { The lowest layer, used for HUD-like displays while flying. } + { The lowest layer, used for HUD-like displays while flying. } xplm_WindowLayerFlightOverlay = 0 - { Windows that "float" over the sim, like the X-Plane 11 map does. If you are } - { not sure which layer to create your window in, choose floating. } + { Windows that "float" over the sim, like the X-Plane 11 map does. If you are} + { not sure which layer to create your window in, choose floating. } ,xplm_WindowLayerFloatingWindows = 1 - { An interruptive modal that covers the sim with a transparent black overlay } - { to draw the user's focus to the alert } + { An interruptive modal that covers the sim with a transparent black overlay } + { to draw the user's focus to the alert } ,xplm_WindowLayerModal = 2 - { "Growl"-style notifications that are visible in a corner of the screen, } - { even over modals } + { "Growl"-style notifications that are visible in a corner of the screen, } + { even over modals } ,xplm_WindowLayerGrowlNotifications = 3 ); PXPLMWindowLayer = ^XPLMWindowLayer; -{$ENDIF} +{$ENDIF XPLM300} {$IFDEF XPLM301} { XPLMWindowDecoration - XPLMWindowDecoration describes how "modern" windows will be displayed. This - impacts both how X-Plane draws your window as well as certain mouse - handlers. + XPLMWindowDecoration describes how "modern" windows will be displayed. This + impacts both how X-Plane draws your window as well as certain mouse + handlers. - Your window's decoration can only be specified when you create the window - (in the XPLMCreateWindow_t you pass to XPLMCreateWindowEx()). + Your window's decoration can only be specified when you create the window + (in the XPLMCreateWindow_t you pass to XPLMCreateWindowEx()). } +TYPE XPLMWindowDecoration = ( - { X-Plane will draw no decoration for your window, and apply no automatic } - { click handlers. The window will not stop click from passing through its } - { bounds. This is suitable for "windows" which request, say, the full screen } - { bounds, then only draw in a small portion of the available area. } + { X-Plane will draw no decoration for your window, and apply no automatic } + { click handlers. The window will not stop click from passing through its } + { bounds. This is suitable for "windows" which request, say, the full screen } + { bounds, then only draw in a small portion of the available area. } xplm_WindowDecorationNone = 0 - { The default decoration for "native" windows, like the map. Provides a solid } - { background, as well as click handlers for resizing and dragging the window. } + { The default decoration for "native" windows, like the map. Provides a solid} + { background, as well as click handlers for resizing and dragging the window.} ,xplm_WindowDecorationRoundRectangle = 1 - { X-Plane will draw no decoration for your window, nor will it provide resize } - { handlers for your window edges, but it will stop clicks from passing } - { through your windows bounds. } + { X-Plane will draw no decoration for your window, nor will it provide resize} + { handlers for your window edges, but it will stop clicks from passing } + { through your windows bounds. } ,xplm_WindowDecorationSelfDecorated = 2 - { Like self-decorated, but with resizing; X-Plane will draw no decoration for } - { your window, but it will stop clicks from passing through your windows } - { bounds, and provide automatic mouse handlers for resizing. } + { Like self-decorated, but with resizing; X-Plane will draw no decoration for} + { your window, but it will stop clicks from passing through your windows } + { bounds, and provide automatic mouse handlers for resizing. } ,xplm_WindowDecorationSelfDecoratedResizable = 3 ); PXPLMWindowDecoration = ^XPLMWindowDecoration; -{$ENDIF} +{$ENDIF XPLM301} {$IFDEF XPLM200} { XPLMCreateWindow_t - The XPMCreateWindow_t structure defines all of the parameters used to - create a modern window using XPLMCreateWindowEx(). The structure will be - expanded in future SDK APIs to include more features. Always set the - structSize member to the size of your struct in bytes! - - All windows created by this function in the XPLM300 version of the API are - created with the new X-Plane 11 GUI features. This means your plugin will - get to "know" about the existence of X-Plane windows other than the main - window. All drawing and mouse callbacks for your window will occur in - "boxels," giving your windows automatic support for high-DPI scaling in - X-Plane. In addition, your windows can opt-in to decoration with the - X-Plane 11 window styling, and you can use the - XPLMSetWindowPositioningMode() API to make your window "popped out" into a - first-class operating system window. - - Note that this requires dealing with your window's bounds in "global - desktop" positioning units, rather than the traditional panel coordinate - system. In global desktop coordinates, the main X-Plane window may not have - its origin at coordinate (0, 0), and your own window may have negative - coordinates. Assuming you don't implicitly assume (0, 0) as your origin, - the only API change you should need is to start using - XPLMGetMouseLocationGlobal() rather than XPLMGetMouseLocation(), and - XPLMGetScreenBoundsGlobal() instead of XPLMGetScreenSize(). - - If you ask to be decorated as a floating window, you'll get the blue window - control bar and blue backing that you see in X-Plane 11's normal "floating" - windows (like the map). + The XPMCreateWindow_t structure defines all of the parameters used to + create a modern window using XPLMCreateWindowEx(). The structure will be + expanded in future SDK APIs to include more features. Always set the + structSize member to the size of your struct in bytes! + + All windows created by this function in the XPLM300 version of the API are + created with the new X-Plane 11 GUI features. This means your plugin will + get to "know" about the existence of X-Plane windows other than the main + window. All drawing and mouse callbacks for your window will occur in + "boxels," giving your windows automatic support for high-DPI scaling in + X-Plane. In addition, your windows can opt-in to decoration with the + X-Plane 11 window styling, and you can use the + XPLMSetWindowPositioningMode() API to make your window "popped out" into a + first-class operating system window. + + Note that this requires dealing with your window's bounds in "global + desktop" positioning units, rather than the traditional panel coordinate + system. In global desktop coordinates, the main X-Plane window may not have + its origin at coordinate (0, 0), and your own window may have negative + coordinates. Assuming you don't implicitly assume (0, 0) as your origin, + the only API change you should need is to start using + XPLMGetMouseLocationGlobal() rather than XPLMGetMouseLocation(), and + XPLMGetScreenBoundsGlobal() instead of XPLMGetScreenSize(). + + If you ask to be decorated as a floating window, you'll get the blue window + control bar and blue backing that you see in X-Plane 11's normal "floating" + windows (like the map). } +TYPE XPLMCreateWindow_t = RECORD - { Used to inform XPLMCreateWindowEx() of the SDK version you compiled } - { against; should always be set to sizeof(XPLMCreateWindow_t) } - structSize : integer; - { Left bound, in global desktop boxels } - left : integer; - { Top bound, in global desktop boxels } - top : integer; - { Right bound, in global desktop boxels } - right : integer; - { Bottom bound, in global desktop boxels } - bottom : integer; - visible : integer; + { Used to inform XPLMCreateWindowEx() of the SDK version you compiled } + { against; should always be set to sizeof(XPLMCreateWindow_t) } + structSize : Integer; + { Left bound, in global desktop boxels } + left : Integer; + { Top bound, in global desktop boxels } + top : Integer; + { Right bound, in global desktop boxels } + right : Integer; + { Bottom bound, in global desktop boxels } + bottom : Integer; + visible : Integer; drawWindowFunc : XPLMDrawWindow_f; - { A callback to handle the user left-clicking within your window (or NULL to } - { ignore left clicks) } + { A callback to handle the user left-clicking within your window (or NULL to } + { ignore left clicks) } handleMouseClickFunc : XPLMHandleMouseClick_f; handleKeyFunc : XPLMHandleKey_f; handleCursorFunc : XPLMHandleCursor_f; handleMouseWheelFunc : XPLMHandleMouseWheel_f; - { A reference which will be passed into each of your window callbacks. Use } - { this to pass information to yourself as needed. } + { A reference which will be passed into each of your window callbacks. Use } + { this to pass information to yourself as needed. } refcon : pointer; {$IFDEF XPLM301} - { Specifies the type of X-Plane 11-style "wrapper" you want around your } - { window, if any } + { Specifies the type of X-Plane 11-style "wrapper" you want around your } + { window, if any } decorateAsFloatingWindow : XPLMWindowDecoration; -{$ENDIF} +{$ENDIF XPLM301} {$IFDEF XPLM300} layer : XPLMWindowLayer; -{$ENDIF} +{$ENDIF XPLM300} {$IFDEF XPLM300} - { A callback to handle the user right-clicking within your window (or NULL to } - { ignore right clicks) } + { A callback to handle the user right-clicking within your window (or NULL to} + { ignore right clicks) } handleRightClickFunc : XPLMHandleMouseClick_f; -{$ENDIF} +{$ENDIF XPLM300} END; PXPLMCreateWindow_t = ^XPLMCreateWindow_t; -{$ENDIF} +{$ENDIF XPLM200} {$IFDEF XPLM200} { XPLMCreateWindowEx - This routine creates a new "modern" window. You pass in an - XPLMCreateWindow_t structure with all of the fields set in. You must set - the structSize of the structure to the size of the actual structure you - used. Also, you must provide functions for every callback---you may not - leave them null! (If you do not support the cursor or mouse wheel, use - functions that return the default values.) + This routine creates a new "modern" window. You pass in an + XPLMCreateWindow_t structure with all of the fields set in. You must set + the structSize of the structure to the size of the actual structure you + used. Also, you must provide functions for every callback---you may not + leave them null! (If you do not support the cursor or mouse wheel, use + functions that return the default values.) } FUNCTION XPLMCreateWindowEx( inParams : PXPLMCreateWindow_t) : XPLMWindowID; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} + cdecl; external XPLM_DLL; +{$ENDIF XPLM200} { XPLMCreateWindow - Deprecated as of XPLM300. + Deprecated as of XPLM300. - This routine creates a new legacy window. Unlike modern windows (created - via XPLMCreateWindowEx()), legacy windows do not have access to X-Plane 11 - features like automatic scaling for high-DPI screens, native window styles, - or support for being "popped out" into first-class operating system - windows. + This routine creates a new legacy window. Unlike modern windows (created + via XPLMCreateWindowEx()), legacy windows do not have access to X-Plane 11 + features like automatic scaling for high-DPI screens, native window styles, + or support for being "popped out" into first-class operating system + windows. - Pass in the dimensions and offsets to the window's bottom left corner from - the bottom left of the screen. You can specify whether the window is - initially visible or not. Also, you pass in three callbacks to run the - window and a refcon. This function returns a window ID you can use to - refer to the new window. + Pass in the dimensions and offsets to the window's bottom left corner from + the bottom left of the screen. You can specify whether the window is + initially visible or not. Also, you pass in three callbacks to run the + window and a refcon. This function returns a window ID you can use to + refer to the new window. - NOTE: Legacy windows do not have "frames"; you are responsible for drawing - the background and frame of the window. Higher level libraries have - routines which make this easy. + NOTE: Legacy windows do not have "frames"; you are responsible for drawing + the background and frame of the window. Higher level libraries have + routines which make this easy. } FUNCTION XPLMCreateWindow( - inLeft : integer; - inTop : integer; - inRight : integer; - inBottom : integer; - inIsVisible : integer; + inLeft : Integer; + inTop : Integer; + inRight : Integer; + inBottom : Integer; + inIsVisible : Integer; inDrawCallback : XPLMDrawWindow_f; inKeyCallback : XPLMHandleKey_f; inMouseCallback : XPLMHandleMouseClick_f; inRefcon : pointer) : XPLMWindowID; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMDestroyWindow - This routine destroys a window. The window's callbacks are not called - after this call. Keyboard focus is removed from the window before - destroying it. + This routine destroys a window. The window's callbacks are not called + after this call. Keyboard focus is removed from the window before + destroying it. } PROCEDURE XPLMDestroyWindow( inWindowID : XPLMWindowID); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMGetScreenSize - This routine returns the size of the main X-Plane OpenGL window in pixels. - This number can be used to get a rough idea of the amount of detail the - user will be able to see when drawing in 3-d. + This routine returns the size of the main X-Plane OpenGL window in pixels. + This number can be used to get a rough idea of the amount of detail the + user will be able to see when drawing in 3-d. } PROCEDURE XPLMGetScreenSize( - outWidth : Pinteger; { Can be nil } - outHeight : Pinteger); { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + outWidth : PInteger; { Can be nil } + outHeight : PInteger); { Can be nil } + cdecl; external XPLM_DLL; {$IFDEF XPLM300} { XPLMGetScreenBoundsGlobal - This routine returns the bounds of the "global" X-Plane desktop, in boxels. - Unlike the non-global version XPLMGetScreenSize(), this is multi-monitor - aware. There are three primary consequences of multimonitor awareness. - - First, if the user is running X-Plane in full-screen on two or more - monitors (typically configured using one full-screen window per monitor), - the global desktop will be sized to include all X-Plane windows. - - Second, the origin of the screen coordinates is not guaranteed to be (0, - 0). Suppose the user has two displays side-by-side, both running at 1080p. - Suppose further that they've configured their OS to make the left display - their "primary" monitor, and that X-Plane is running in full-screen on - their right monitor only. In this case, the global desktop bounds would be - the rectangle from (1920, 0) to (3840, 1080). If the user later asked - X-Plane to draw on their primary monitor as well, the bounds would change - to (0, 0) to (3840, 1080). - - Finally, if the usable area of the virtual desktop is not a perfect - rectangle (for instance, because the monitors have different resolutions or - because one monitor is configured in the operating system to be above and - to the right of the other), the global desktop will include any wasted - space. Thus, if you have two 1080p monitors, and monitor 2 is configured to - have its bottom left touch monitor 1's upper right, your global desktop - area would be the rectangle from (0, 0) to (3840, 2160). - - Note that popped-out windows (windows drawn in their own operating system - windows, rather than "floating" within X-Plane) are not included in these - bounds. + This routine returns the bounds of the "global" X-Plane desktop, in boxels. + Unlike the non-global version XPLMGetScreenSize(), this is multi-monitor + aware. There are three primary consequences of multimonitor awareness. + + First, if the user is running X-Plane in full-screen on two or more + monitors (typically configured using one full-screen window per monitor), + the global desktop will be sized to include all X-Plane windows. + + Second, the origin of the screen coordinates is not guaranteed to be (0, + 0). Suppose the user has two displays side-by-side, both running at 1080p. + Suppose further that they've configured their OS to make the left display + their "primary" monitor, and that X-Plane is running in full-screen on + their right monitor only. In this case, the global desktop bounds would be + the rectangle from (1920, 0) to (3840, 1080). If the user later asked + X-Plane to draw on their primary monitor as well, the bounds would change + to (0, 0) to (3840, 1080). + + Finally, if the usable area of the virtual desktop is not a perfect + rectangle (for instance, because the monitors have different resolutions or + because one monitor is configured in the operating system to be above and + to the right of the other), the global desktop will include any wasted + space. Thus, if you have two 1080p monitors, and monitor 2 is configured to + have its bottom left touch monitor 1's upper right, your global desktop + area would be the rectangle from (0, 0) to (3840, 2160). + + Note that popped-out windows (windows drawn in their own operating system + windows, rather than "floating" within X-Plane) are not included in these + bounds. } PROCEDURE XPLMGetScreenBoundsGlobal( - outLeft : Pinteger; { Can be nil } - outTop : Pinteger; { Can be nil } - outRight : Pinteger; { Can be nil } - outBottom : Pinteger); { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} + outLeft : PInteger; { Can be nil } + outTop : PInteger; { Can be nil } + outRight : PInteger; { Can be nil } + outBottom : PInteger); { Can be nil } + cdecl; external XPLM_DLL; +{$ENDIF XPLM300} {$IFDEF XPLM300} { XPLMReceiveMonitorBoundsGlobal_f - This function is informed of the global bounds (in boxels) of a particular - monitor within the X-Plane global desktop space. Note that X-Plane must be - running in full screen on a monitor in order for that monitor to be passed - to you in this callback. + This function is informed of the global bounds (in boxels) of a particular + monitor within the X-Plane global desktop space. Note that X-Plane must be + running in full screen on a monitor in order for that monitor to be passed + to you in this callback. } TYPE XPLMReceiveMonitorBoundsGlobal_f = PROCEDURE( - inMonitorIndex : integer; - inLeftBx : integer; - inTopBx : integer; - inRightBx : integer; - inBottomBx : integer; + inMonitorIndex : Integer; + inLeftBx : Integer; + inTopBx : Integer; + inRightBx : Integer; + inBottomBx : Integer; inRefcon : pointer); cdecl; -{$ENDIF} +{$ENDIF XPLM300} {$IFDEF XPLM300} { XPLMGetAllMonitorBoundsGlobal - This routine immediately calls you back with the bounds (in boxels) of each - full-screen X-Plane window within the X-Plane global desktop space. Note - that if a monitor is *not* covered by an X-Plane window, you cannot get its - bounds this way. Likewise, monitors with only an X-Plane window (not in - full-screen mode) will not be included. - - If X-Plane is running in full-screen and your monitors are of the same size - and configured contiguously in the OS, then the combined global bounds of - all full-screen monitors will match the total global desktop bounds, as - returned by XPLMGetScreenBoundsGlobal(). (Of course, if X-Plane is running - in windowed mode, this will not be the case. Likewise, if you have - differently sized monitors, the global desktop space will include wasted - space.) - - Note that this function's monitor indices match those provided by - XPLMGetAllMonitorBoundsOS(), but the coordinates are different (since the - X-Plane global desktop may not match the operating system's global desktop, - and one X-Plane boxel may be larger than one pixel due to 150% or 200% - scaling). + This routine immediately calls you back with the bounds (in boxels) of each + full-screen X-Plane window within the X-Plane global desktop space. Note + that if a monitor is *not* covered by an X-Plane window, you cannot get its + bounds this way. Likewise, monitors with only an X-Plane window (not in + full-screen mode) will not be included. + + If X-Plane is running in full-screen and your monitors are of the same size + and configured contiguously in the OS, then the combined global bounds of + all full-screen monitors will match the total global desktop bounds, as + returned by XPLMGetScreenBoundsGlobal(). (Of course, if X-Plane is running + in windowed mode, this will not be the case. Likewise, if you have + differently sized monitors, the global desktop space will include wasted + space.) + + Note that this function's monitor indices match those provided by + XPLMGetAllMonitorBoundsOS(), but the coordinates are different (since the + X-Plane global desktop may not match the operating system's global desktop, + and one X-Plane boxel may be larger than one pixel due to 150% or 200% + scaling). } PROCEDURE XPLMGetAllMonitorBoundsGlobal( inMonitorBoundsCallback: XPLMReceiveMonitorBoundsGlobal_f; inRefcon : pointer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} + cdecl; external XPLM_DLL; +{$ENDIF XPLM300} {$IFDEF XPLM300} { XPLMReceiveMonitorBoundsOS_f - This function is informed of the global bounds (in pixels) of a particular - monitor within the operating system's global desktop space. Note that a - monitor index being passed to you here does not indicate that X-Plane is - running in full screen on this monitor, or even that any X-Plane windows - exist on this monitor. + This function is informed of the global bounds (in pixels) of a particular + monitor within the operating system's global desktop space. Note that a + monitor index being passed to you here does not indicate that X-Plane is + running in full screen on this monitor, or even that any X-Plane windows + exist on this monitor. } TYPE XPLMReceiveMonitorBoundsOS_f = PROCEDURE( - inMonitorIndex : integer; - inLeftPx : integer; - inTopPx : integer; - inRightPx : integer; - inBottomPx : integer; + inMonitorIndex : Integer; + inLeftPx : Integer; + inTopPx : Integer; + inRightPx : Integer; + inBottomPx : Integer; inRefcon : pointer); cdecl; -{$ENDIF} +{$ENDIF XPLM300} {$IFDEF XPLM300} { XPLMGetAllMonitorBoundsOS - This routine immediately calls you back with the bounds (in pixels) of each - monitor within the operating system's global desktop space. Note that - unlike XPLMGetAllMonitorBoundsGlobal(), this may include monitors that have - no X-Plane window on them. + This routine immediately calls you back with the bounds (in pixels) of each + monitor within the operating system's global desktop space. Note that + unlike XPLMGetAllMonitorBoundsGlobal(), this may include monitors that have + no X-Plane window on them. - Note that this function's monitor indices match those provided by - XPLMGetAllMonitorBoundsGlobal(), but the coordinates are different (since - the X-Plane global desktop may not match the operating system's global - desktop, and one X-Plane boxel may be larger than one pixel). + Note that this function's monitor indices match those provided by + XPLMGetAllMonitorBoundsGlobal(), but the coordinates are different (since + the X-Plane global desktop may not match the operating system's global + desktop, and one X-Plane boxel may be larger than one pixel). } PROCEDURE XPLMGetAllMonitorBoundsOS( inMonitorBoundsCallback: XPLMReceiveMonitorBoundsOS_f; inRefcon : pointer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} + cdecl; external XPLM_DLL; +{$ENDIF XPLM300} { XPLMGetMouseLocation - Deprecated in XPLM300. Modern windows should use - XPLMGetMouseLocationGlobal() instead. + Deprecated in XPLM300. Modern windows should use + XPLMGetMouseLocationGlobal() instead. - This routine returns the current mouse location in pixels relative to the - main X-Plane window. The bottom left corner of the main window is (0, 0). - Pass NULL to not receive info about either parameter. + This routine returns the current mouse location in pixels relative to the + main X-Plane window. The bottom left corner of the main window is (0, 0). + Pass NULL to not receive info about either parameter. - Because this function gives the mouse position relative to the main X-Plane - window (rather than in global bounds), this function should only be used by - legacy windows. Modern windows should instead get the mouse position in - global desktop coordinates using XPLMGetMouseLocationGlobal(). + Because this function gives the mouse position relative to the main X-Plane + window (rather than in global bounds), this function should only be used by + legacy windows. Modern windows should instead get the mouse position in + global desktop coordinates using XPLMGetMouseLocationGlobal(). - Note that unlike XPLMGetMouseLocationGlobal(), if the mouse goes outside - the user's main monitor (for instance, to a pop out window or a secondary - monitor), this function will not reflect it. + Note that unlike XPLMGetMouseLocationGlobal(), if the mouse goes outside + the user's main monitor (for instance, to a pop out window or a secondary + monitor), this function will not reflect it. } PROCEDURE XPLMGetMouseLocation( - outX : Pinteger; { Can be nil } - outY : Pinteger); { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + outX : PInteger; { Can be nil } + outY : PInteger); { Can be nil } + cdecl; external XPLM_DLL; {$IFDEF XPLM300} { XPLMGetMouseLocationGlobal - Returns the current mouse location in global desktop boxels. Unlike - XPLMGetMouseLocation(), the bottom left of the main X-Plane window is not - guaranteed to be (0, 0)---instead, the origin is the lower left of the - entire global desktop space. In addition, this routine gives the real mouse - location when the mouse goes to X-Plane windows other than the primary - display. Thus, it can be used with both pop-out windows and secondary - monitors. + Returns the current mouse location in global desktop boxels. Unlike + XPLMGetMouseLocation(), the bottom left of the main X-Plane window is not + guaranteed to be (0, 0)---instead, the origin is the lower left of the + entire global desktop space. In addition, this routine gives the real mouse + location when the mouse goes to X-Plane windows other than the primary + display. Thus, it can be used with both pop-out windows and secondary + monitors. - This is the mouse location function to use with modern windows (i.e., those - created by XPLMCreateWindowEx()). + This is the mouse location function to use with modern windows (i.e., those + created by XPLMCreateWindowEx()). - Pass NULL to not receive info about either parameter. + Pass NULL to not receive info about either parameter. } PROCEDURE XPLMGetMouseLocationGlobal( - outX : Pinteger; { Can be nil } - outY : Pinteger); { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} + outX : PInteger; { Can be nil } + outY : PInteger); { Can be nil } + cdecl; external XPLM_DLL; +{$ENDIF XPLM300} { XPLMGetWindowGeometry - This routine returns the position and size of a window. The units and - coordinate system vary depending on the type of window you have. + This routine returns the position and size of a window. The units and + coordinate system vary depending on the type of window you have. - If this is a legacy window (one compiled against a pre-XPLM300 version of - the SDK, or an XPLM300 window that was not created using - XPLMCreateWindowEx()), the units are pixels relative to the main X-Plane - display. + If this is a legacy window (one compiled against a pre-XPLM300 version of + the SDK, or an XPLM300 window that was not created using + XPLMCreateWindowEx()), the units are pixels relative to the main X-Plane + display. - If, on the other hand, this is a new X-Plane 11-style window (compiled - against the XPLM300 SDK and created using XPLMCreateWindowEx()), the units - are global desktop boxels. + If, on the other hand, this is a new X-Plane 11-style window (compiled + against the XPLM300 SDK and created using XPLMCreateWindowEx()), the units + are global desktop boxels. - Pass NULL to not receive any paramter. + Pass NULL to not receive any paramter. } PROCEDURE XPLMGetWindowGeometry( inWindowID : XPLMWindowID; - outLeft : Pinteger; { Can be nil } - outTop : Pinteger; { Can be nil } - outRight : Pinteger; { Can be nil } - outBottom : Pinteger); { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + outLeft : PInteger; { Can be nil } + outTop : PInteger; { Can be nil } + outRight : PInteger; { Can be nil } + outBottom : PInteger); { Can be nil } + cdecl; external XPLM_DLL; { XPLMSetWindowGeometry - This routine allows you to set the position and size of a window. + This routine allows you to set the position and size of a window. - The units and coordinate system match those of XPLMGetWindowGeometry(). - That is, modern windows use global desktop boxel coordinates, while legacy - windows use pixels relative to the main X-Plane display. + The units and coordinate system match those of XPLMGetWindowGeometry(). + That is, modern windows use global desktop boxel coordinates, while legacy + windows use pixels relative to the main X-Plane display. - Note that this only applies to "floating" windows (that is, windows that - are drawn within the X-Plane simulation windows, rather than being "popped - out" into their own first-class operating system windows). To set the - position of windows whose positioning mode is xplm_WindowPopOut, you'll - need to instead use XPLMSetWindowGeometryOS(). + Note that this only applies to "floating" windows (that is, windows that + are drawn within the X-Plane simulation windows, rather than being "popped + out" into their own first-class operating system windows). To set the + position of windows whose positioning mode is xplm_WindowPopOut, you'll + need to instead use XPLMSetWindowGeometryOS(). } PROCEDURE XPLMSetWindowGeometry( inWindowID : XPLMWindowID; - inLeft : integer; - inTop : integer; - inRight : integer; - inBottom : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inLeft : Integer; + inTop : Integer; + inRight : Integer; + inBottom : Integer); + cdecl; external XPLM_DLL; {$IFDEF XPLM300} { XPLMGetWindowGeometryOS - This routine returns the position and size of a "popped out" window (i.e., - a window whose positioning mode is xplm_WindowPopOut), in operating system - pixels. Pass NULL to not receive any parameter. + This routine returns the position and size of a "popped out" window (i.e., + a window whose positioning mode is xplm_WindowPopOut), in operating system + pixels. Pass NULL to not receive any parameter. } PROCEDURE XPLMGetWindowGeometryOS( inWindowID : XPLMWindowID; - outLeft : Pinteger; { Can be nil } - outTop : Pinteger; { Can be nil } - outRight : Pinteger; { Can be nil } - outBottom : Pinteger); { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} + outLeft : PInteger; { Can be nil } + outTop : PInteger; { Can be nil } + outRight : PInteger; { Can be nil } + outBottom : PInteger); { Can be nil } + cdecl; external XPLM_DLL; +{$ENDIF XPLM300} {$IFDEF XPLM300} { XPLMSetWindowGeometryOS - This routine allows you to set the position and size, in operating system - pixel coordinates, of a popped out window (that is, a window whose - positioning mode is xplm_WindowPopOut, which exists outside the X-Plane - simulation window, in its own first-class operating system window). + This routine allows you to set the position and size, in operating system + pixel coordinates, of a popped out window (that is, a window whose + positioning mode is xplm_WindowPopOut, which exists outside the X-Plane + simulation window, in its own first-class operating system window). - Note that you are responsible for ensuring both that your window is popped - out (using XPLMWindowIsPoppedOut()) and that a monitor really exists at the - OS coordinates you provide (using XPLMGetAllMonitorBoundsOS()). + Note that you are responsible for ensuring both that your window is popped + out (using XPLMWindowIsPoppedOut()) and that a monitor really exists at the + OS coordinates you provide (using XPLMGetAllMonitorBoundsOS()). } PROCEDURE XPLMSetWindowGeometryOS( inWindowID : XPLMWindowID; - inLeft : integer; - inTop : integer; - inRight : integer; - inBottom : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} + inLeft : Integer; + inTop : Integer; + inRight : Integer; + inBottom : Integer); + cdecl; external XPLM_DLL; +{$ENDIF XPLM300} {$IFDEF XPLM301} { XPLMGetWindowGeometryVR - Returns the width and height, in boxels, of a window in VR. Note that you - are responsible for ensuring your window is in VR (using - XPLMWindowIsInVR()). + Returns the width and height, in boxels, of a window in VR. Note that you + are responsible for ensuring your window is in VR (using + XPLMWindowIsInVR()). } PROCEDURE XPLMGetWindowGeometryVR( inWindowID : XPLMWindowID; - outWidthBoxels : Pinteger; { Can be nil } - outHeightBoxels : Pinteger); { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} + outWidthBoxels : PInteger; { Can be nil } + outHeightBoxels : PInteger); { Can be nil } + cdecl; external XPLM_DLL; +{$ENDIF XPLM301} {$IFDEF XPLM301} { XPLMSetWindowGeometryVR - This routine allows you to set the size, in boxels, of a window in VR (that - is, a window whose positioning mode is xplm_WindowVR). + This routine allows you to set the size, in boxels, of a window in VR (that + is, a window whose positioning mode is xplm_WindowVR). - Note that you are responsible for ensuring your window is in VR (using - XPLMWindowIsInVR()). + Note that you are responsible for ensuring your window is in VR (using + XPLMWindowIsInVR()). } PROCEDURE XPLMSetWindowGeometryVR( inWindowID : XPLMWindowID; - widthBoxels : integer; - heightBoxels : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} + widthBoxels : Integer; + heightBoxels : Integer); + cdecl; external XPLM_DLL; +{$ENDIF XPLM301} { XPLMGetWindowIsVisible - This routine returns whether a window is visible. + Returns true (1) if the specified window is visible. } FUNCTION XPLMGetWindowIsVisible( - inWindowID : XPLMWindowID) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inWindowID : XPLMWindowID) : Integer; + cdecl; external XPLM_DLL; { XPLMSetWindowIsVisible - This routine shows or hides a window. + This routine shows or hides a window. } PROCEDURE XPLMSetWindowIsVisible( inWindowID : XPLMWindowID; - inIsVisible : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inIsVisible : Integer); + cdecl; external XPLM_DLL; {$IFDEF XPLM300} { XPLMWindowIsPoppedOut - True if this window has been popped out (making it a first-class window in - the operating system), which in turn is true if and only if you have set - the window's positioning mode to xplm_WindowPopOut. + True if this window has been popped out (making it a first-class window in + the operating system), which in turn is true if and only if you have set + the window's positioning mode to xplm_WindowPopOut. - Only applies to modern windows. (Windows created using the deprecated - XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of - the SDK cannot be popped out.) + Only applies to modern windows. (Windows created using the deprecated + XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of + the SDK cannot be popped out.) } FUNCTION XPLMWindowIsPoppedOut( - inWindowID : XPLMWindowID) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} + inWindowID : XPLMWindowID) : Integer; + cdecl; external XPLM_DLL; +{$ENDIF XPLM300} {$IFDEF XPLM301} { XPLMWindowIsInVR - True if this window has been moved to the virtual reality (VR) headset, - which in turn is true if and only if you have set the window's positioning - mode to xplm_WindowVR. + True if this window has been moved to the virtual reality (VR) headset, + which in turn is true if and only if you have set the window's positioning + mode to xplm_WindowVR. - Only applies to modern windows. (Windows created using the deprecated - XPLMCreateWindow(), or windows compiled against a pre-XPLM301 version of - the SDK cannot be moved to VR.) + Only applies to modern windows. (Windows created using the deprecated + XPLMCreateWindow(), or windows compiled against a pre-XPLM301 version of + the SDK cannot be moved to VR.) } FUNCTION XPLMWindowIsInVR( - inWindowID : XPLMWindowID) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} + inWindowID : XPLMWindowID) : Integer; + cdecl; external XPLM_DLL; +{$ENDIF XPLM301} {$IFDEF XPLM300} { XPLMSetWindowGravity - A window's "gravity" controls how the window shifts as the whole X-Plane - window resizes. A gravity of 1 means the window maintains its positioning - relative to the right or top edges, 0 the left/bottom, and 0.5 keeps it - centered. + A window's "gravity" controls how the window shifts as the whole X-Plane + window resizes. A gravity of 1 means the window maintains its positioning + relative to the right or top edges, 0 the left/bottom, and 0.5 keeps it + centered. - Default gravity is (0, 1, 0, 1), meaning your window will maintain its - position relative to the top left and will not change size as its - containing window grows. + Default gravity is (0, 1, 0, 1), meaning your window will maintain its + position relative to the top left and will not change size as its + containing window grows. - If you wanted, say, a window that sticks to the top of the screen (with a - constant height), but which grows to take the full width of the window, you - would pass (0, 1, 1, 1). Because your left and right edges would maintain - their positioning relative to their respective edges of the screen, the - whole width of your window would change with the X-Plane window. + If you wanted, say, a window that sticks to the top of the screen (with a + constant height), but which grows to take the full width of the window, you + would pass (0, 1, 1, 1). Because your left and right edges would maintain + their positioning relative to their respective edges of the screen, the + whole width of your window would change with the X-Plane window. - Only applies to modern windows. (Windows created using the deprecated - XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of - the SDK will simply get the default gravity.) + Only applies to modern windows. (Windows created using the deprecated + XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of + the SDK will simply get the default gravity.) } PROCEDURE XPLMSetWindowGravity( inWindowID : XPLMWindowID; - inLeftGravity : single; - inTopGravity : single; - inRightGravity : single; - inBottomGravity : single); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} + inLeftGravity : Single; + inTopGravity : Single; + inRightGravity : Single; + inBottomGravity : Single); + cdecl; external XPLM_DLL; +{$ENDIF XPLM300} {$IFDEF XPLM300} { XPLMSetWindowResizingLimits - Sets the minimum and maximum size of the client rectangle of the given - window. (That is, it does not include any window styling that you might - have asked X-Plane to apply on your behalf.) All resizing operations are - constrained to these sizes. + Sets the minimum and maximum size of the client rectangle of the given + window. (That is, it does not include any window styling that you might + have asked X-Plane to apply on your behalf.) All resizing operations are + constrained to these sizes. - Only applies to modern windows. (Windows created using the deprecated - XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of - the SDK will have no minimum or maximum size.) + Only applies to modern windows. (Windows created using the deprecated + XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of + the SDK will have no minimum or maximum size.) } PROCEDURE XPLMSetWindowResizingLimits( inWindowID : XPLMWindowID; - inMinWidthBoxels : integer; - inMinHeightBoxels : integer; - inMaxWidthBoxels : integer; - inMaxHeightBoxels : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} + inMinWidthBoxels : Integer; + inMinHeightBoxels : Integer; + inMaxWidthBoxels : Integer; + inMaxHeightBoxels : Integer); + cdecl; external XPLM_DLL; +{$ENDIF XPLM300} {$IFDEF XPLM300} { XPLMWindowPositioningMode - XPLMWindowPositionMode describes how X-Plane will position your window on - the user's screen. X-Plane will maintain this positioning mode even as the - user resizes their window or adds/removes full-screen monitors. + XPLMWindowPositionMode describes how X-Plane will position your window on + the user's screen. X-Plane will maintain this positioning mode even as the + user resizes their window or adds/removes full-screen monitors. - Positioning mode can only be set for "modern" windows (that is, windows - created using XPLMCreateWindowEx() and compiled against the XPLM300 SDK). - Windows created using the deprecated XPLMCreateWindow(), or windows - compiled against a pre-XPLM300 version of the SDK will simply get the - "free" positioning mode. + Positioning mode can only be set for "modern" windows (that is, windows + created using XPLMCreateWindowEx() and compiled against the XPLM300 SDK). + Windows created using the deprecated XPLMCreateWindow(), or windows + compiled against a pre-XPLM300 version of the SDK will simply get the + "free" positioning mode. } TYPE XPLMWindowPositioningMode = ( - { The default positioning mode. Set the window geometry and its future } - { position will be determined by its window gravity, resizing limits, and } - { user interactions. } + { The default positioning mode. Set the window geometry and its future } + { position will be determined by its window gravity, resizing limits, and } + { user interactions. } xplm_WindowPositionFree = 0 - { Keep the window centered on the monitor you specify } + { Keep the window centered on the monitor you specify } ,xplm_WindowCenterOnMonitor = 1 - { Keep the window full screen on the monitor you specify } + { Keep the window full screen on the monitor you specify } ,xplm_WindowFullScreenOnMonitor = 2 - { Like gui_window_full_screen_on_monitor, but stretches over *all* monitors } - { and popout windows. This is an obscure one... unless you have a very good } - { reason to need it, you probably don't! } + { Like gui_window_full_screen_on_monitor, but stretches over *all* monitors } + { and popout windows. This is an obscure one... unless you have a very good } + { reason to need it, you probably don't! } ,xplm_WindowFullScreenOnAllMonitors = 3 - { A first-class window in the operating system, completely separate from the } - { X-Plane window(s) } + { A first-class window in the operating system, completely separate from the } + { X-Plane window(s) } ,xplm_WindowPopOut = 4 {$IFDEF XPLM301} - { A floating window visible on the VR headset } + { A floating window visible on the VR headset } ,xplm_WindowVR = 5 -{$ENDIF} +{$ENDIF XPLM301} ); PXPLMWindowPositioningMode = ^XPLMWindowPositioningMode; -{$ENDIF} +{$ENDIF XPLM300} {$IFDEF XPLM300} { XPLMSetWindowPositioningMode - Sets the policy for how X-Plane will position your window. + Sets the policy for how X-Plane will position your window. - Some positioning modes apply to a particular monitor. For those modes, you - can pass a negative monitor index to position the window on the main - X-Plane monitor (the screen with the X-Plane menu bar at the top). Or, if - you have a specific monitor you want to position your window on, you can - pass a real monitor index as received from, e.g., - XPLMGetAllMonitorBoundsOS(). + Some positioning modes apply to a particular monitor. For those modes, you + can pass a negative monitor index to position the window on the main + X-Plane monitor (the screen with the X-Plane menu bar at the top). Or, if + you have a specific monitor you want to position your window on, you can + pass a real monitor index as received from, e.g., + XPLMGetAllMonitorBoundsOS(). - Only applies to modern windows. (Windows created using the deprecated - XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of - the SDK will always use xplm_WindowPositionFree.) + Only applies to modern windows. (Windows created using the deprecated + XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of + the SDK will always use xplm_WindowPositionFree.) } PROCEDURE XPLMSetWindowPositioningMode( inWindowID : XPLMWindowID; inPositioningMode : XPLMWindowPositioningMode; - inMonitorIndex : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} + inMonitorIndex : Integer); + cdecl; external XPLM_DLL; +{$ENDIF XPLM300} {$IFDEF XPLM300} { XPLMSetWindowTitle - Sets the name for a window. This only applies to windows that opted-in to - styling as an X-Plane 11 floating window (i.e., with styling mode - xplm_WindowDecorationRoundRectangle) when they were created using - XPLMCreateWindowEx(). + Sets the name for a window. This only applies to windows that opted-in to + styling as an X-Plane 11 floating window (i.e., with styling mode + xplm_WindowDecorationRoundRectangle) when they were created using + XPLMCreateWindowEx(). } PROCEDURE XPLMSetWindowTitle( inWindowID : XPLMWindowID; - inWindowTitle : Pchar); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} + inWindowTitle : XPLMString); + cdecl; external XPLM_DLL; +{$ENDIF XPLM300} { XPLMGetWindowRefCon - This routine returns a window's reference constant, the unique value you - can use for your own purposes. + Returns a window's reference constant, the unique value you can use for + your own purposes. } FUNCTION XPLMGetWindowRefCon( inWindowID : XPLMWindowID) : pointer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMSetWindowRefCon - This routine sets a window's reference constant. Use this to pass data to - yourself in the callbacks. + Sets a window's reference constant. Use this to pass data to yourself in + the callbacks. } PROCEDURE XPLMSetWindowRefCon( inWindowID : XPLMWindowID; inRefcon : pointer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMTakeKeyboardFocus - This routine gives a specific window keyboard focus. Keystrokes will be - sent to that window. Pass a window ID of 0 to remove keyboard focus from - any plugin-created windows and instead pass keyboard strokes directly to - X-Plane. + This routine gives a specific window keyboard focus. Keystrokes will be + sent to that window. Pass a window ID of 0 to remove keyboard focus from + any plugin-created windows and instead pass keyboard strokes directly to + X-Plane. } PROCEDURE XPLMTakeKeyboardFocus( inWindow : XPLMWindowID); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMHasKeyboardFocus - Returns true (1) if the indicated window has keyboard focus. Pass a window - ID of 0 to see if no plugin window has focus, and all keystrokes will go - directly to X-Plane. + Returns true (1) if the indicated window has keyboard focus. Pass a window + ID of 0 to see if no plugin window has focus, and all keystrokes will go + directly to X-Plane. } FUNCTION XPLMHasKeyboardFocus( - inWindow : XPLMWindowID) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inWindow : XPLMWindowID) : Integer; + cdecl; external XPLM_DLL; { XPLMBringWindowToFront - This routine brings the window to the front of the Z-order for its layer. - Windows are brought to the front automatically when they are created. - Beyond that, you should make sure you are front before handling mouse - clicks. - - Note that this only brings your window to the front of its layer - (XPLMWindowLayer). Thus, if you have a window in the floating window layer - (xplm_WindowLayerFloatingWindows), but there is a modal window (in layer - xplm_WindowLayerModal) above you, you would still not be the true frontmost - window after calling this. (After all, the window layers are strictly - ordered, and no window in a lower layer can ever be above any window in a - higher one.) + This routine brings the window to the front of the Z-order for its layer. + Windows are brought to the front automatically when they are created. + Beyond that, you should make sure you are front before handling mouse + clicks. + + Note that this only brings your window to the front of its layer + (XPLMWindowLayer). Thus, if you have a window in the floating window layer + (xplm_WindowLayerFloatingWindows), but there is a modal window (in layer + xplm_WindowLayerModal) above you, you would still not be the true frontmost + window after calling this. (After all, the window layers are strictly + ordered, and no window in a lower layer can ever be above any window in a + higher one.) } PROCEDURE XPLMBringWindowToFront( inWindow : XPLMWindowID); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMIsWindowInFront - This routine returns true if the window you passed in is the frontmost - visible window in its layer (XPLMWindowLayer). + This routine returns true if the window you passed in is the frontmost + visible window in its layer (XPLMWindowLayer). - Thus, if you have a window at the front of the floating window layer - (xplm_WindowLayerFloatingWindows), this will return true even if there is a - modal window (in layer xplm_WindowLayerModal) above you. (Not to worry, - though: in such a case, X-Plane will not pass clicks or keyboard input down - to your layer until the window above stops "eating" the input.) + Thus, if you have a window at the front of the floating window layer + (xplm_WindowLayerFloatingWindows), this will return true even if there is a + modal window (in layer xplm_WindowLayerModal) above you. (Not to worry, + though: in such a case, X-Plane will not pass clicks or keyboard input down + to your layer until the window above stops "eating" the input.) + + Note that legacy windows are always placed in layer + xplm_WindowLayerFlightOverlay, while modern-style windows default to + xplm_WindowLayerFloatingWindows. This means it's perfectly consistent to + have two different plugin-created windows (one legacy, one modern) *both* + be in the front (of their different layers!) at the same time. } FUNCTION XPLMIsWindowInFront( - inWindow : XPLMWindowID) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inWindow : XPLMWindowID) : Integer; + cdecl; external XPLM_DLL; {___________________________________________________________________________ * KEY SNIFFERS ___________________________________________________________________________} { - Low-level keyboard handlers. Allows for intercepting keystrokes outside the - normal rules of the user interface. + Low-level keyboard handlers. Allows for intercepting keystrokes outside the + normal rules of the user interface. } { XPLMKeySniffer_f - This is the prototype for a low level key-sniffing function. Window-based - UI _should not use this_! The windowing system provides high-level - mediated keyboard access, via the callbacks you attach to your - XPLMCreateWindow_t. By comparison, the key sniffer provides low level - keyboard access. + This is the prototype for a low level key-sniffing function. Window-based + UI _should not use this_! The windowing system provides high-level + mediated keyboard access, via the callbacks you attach to your + XPLMCreateWindow_t. By comparison, the key sniffer provides low level + keyboard access. - Key sniffers are provided to allow libraries to provide non-windowed user - interaction. For example, the MUI library uses a key sniffer to do pop-up - text entry. + Key sniffers are provided to allow libraries to provide non-windowed user + interaction. For example, the MUI library uses a key sniffer to do pop-up + text entry. - Return 1 to pass the key on to the next sniffer, the window manager, - X-Plane, or whomever is down stream. Return 0 to consume the key. + Return 1 to pass the key on to the next sniffer, the window manager, + X-Plane, or whomever is down stream. Return 0 to consume the key. - Warning: this API declares virtual keys as a signed character; however the - VKEY #define macros in XPLMDefs.h define the vkeys using unsigned values - (that is 0x80 instead of -0x80). So you may need to cast the incoming vkey - to an unsigned char to get correct comparisons in C. + Warning: this API declares virtual keys as a signed character; however the + VKEY #define macros in XPLMDefs.h define the vkeys using unsigned values + (that is 0x80 instead of -0x80). So you may need to cast the incoming vkey + to an unsigned char to get correct comparisons in C. } TYPE XPLMKeySniffer_f = FUNCTION( - inChar : char; + inChar : XPLMChar; inFlags : XPLMKeyFlags; - inVirtualKey : char; - inRefcon : pointer) : integer; cdecl; + inVirtualKey : XPLMChar; + inRefcon : pointer) : Integer; cdecl; { XPLMRegisterKeySniffer - This routine registers a key sniffing callback. You specify whether you - want to sniff before the window system, or only sniff keys the window - system does not consume. You should ALMOST ALWAYS sniff non-control keys - after the window system. When the window system consumes a key, it is - because the user has "focused" a window. Consuming the key or taking - action based on the key will produce very weird results. Returns 1 if - successful. + This routine registers a key sniffing callback. You specify whether you + want to sniff before the window system, or only sniff keys the window + system does not consume. You should ALMOST ALWAYS sniff non-control keys + after the window system. When the window system consumes a key, it is + because the user has "focused" a window. Consuming the key or taking + action based on the key will produce very weird results. Returns + 1 if successful. } FUNCTION XPLMRegisterKeySniffer( inCallback : XPLMKeySniffer_f; - inBeforeWindows : integer; - inRefcon : pointer) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inBeforeWindows : Integer; + inRefcon : pointer) : Integer; + cdecl; external XPLM_DLL; { XPLMUnregisterKeySniffer - This routine unregisters a key sniffer. You must unregister a key sniffer - for every time you register one with the exact same signature. Returns 1 - if successful. + This routine unregisters a key sniffer. You must unregister a key sniffer + for every time you register one with the exact same signature. Returns 1 + if successful. } FUNCTION XPLMUnregisterKeySniffer( inCallback : XPLMKeySniffer_f; - inBeforeWindows : integer; - inRefcon : pointer) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inBeforeWindows : Integer; + inRefcon : pointer) : Integer; + cdecl; external XPLM_DLL; {___________________________________________________________________________ * HOT KEYS ___________________________________________________________________________} { - Keystrokes that can be managed by others. These are lower-level than window - keyboard handlers (i.e., callbacks you attach to your XPLMCreateWindow_t), - but higher level than key sniffers. + Keystrokes that can be managed by others. These are lower-level than window + keyboard handlers (i.e., callbacks you attach to your XPLMCreateWindow_t), + but higher level than key sniffers. } { XPLMHotKey_f - Your hot key callback simply takes a pointer of your choosing. + Your hot key callback simply takes a pointer of your choosing. } TYPE XPLMHotKey_f = PROCEDURE( @@ -1468,7 +1372,7 @@ { XPLMHotKeyID - An opaque IDs used to identify a hot key. + An opaque ID used to identify a hot key. } XPLMHotKeyID = pointer; PXPLMHotKeyID = ^XPLMHotKeyID; @@ -1476,96 +1380,73 @@ { XPLMRegisterHotKey - This routine registers a hot key. You specify your preferred key stroke - virtual key/flag combination, a description of what your callback does (so - other plug-ins can describe the plug-in to the user for remapping) and a - callback function and opaque pointer to pass in). A new hot key ID is - returned. During execution, the actual key associated with your hot key - may change, but you are insulated from this. + This routine registers a hot key. You specify your preferred key stroke + virtual key/flag combination, a description of what your callback does (so + other plug-ins can describe the plug-in to the user for remapping) and a + callback function and opaque pointer to pass in). A new hot key ID is + returned. During execution, the actual key associated with your hot key + may change, but you are insulated from this. } FUNCTION XPLMRegisterHotKey( - inVirtualKey : char; + inVirtualKey : XPLMChar; inFlags : XPLMKeyFlags; - inDescription : Pchar; + inDescription : XPLMString; inCallback : XPLMHotKey_f; inRefcon : pointer) : XPLMHotKeyID; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMUnregisterHotKey - This API unregisters a hot key. You can only unregister your own hot keys. + Unregisters a hot key. You can only unregister your own hot keys. } PROCEDURE XPLMUnregisterHotKey( inHotKey : XPLMHotKeyID); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMCountHotKeys - Returns the number of current hot keys. + Returns the number of current hot keys. } - FUNCTION XPLMCountHotKeys: integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + FUNCTION XPLMCountHotKeys: Integer; + cdecl; external XPLM_DLL; { XPLMGetNthHotKey - Returns a hot key by index, for iteration on all hot keys. + Returns a hot key by index, for iteration on all hot keys. } FUNCTION XPLMGetNthHotKey( - inIndex : integer) : XPLMHotKeyID; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inIndex : Integer) : XPLMHotKeyID; + cdecl; external XPLM_DLL; { XPLMGetHotKeyInfo - Returns information about the hot key. Return NULL for any parameter you - don't want info about. The description should be at least 512 chars long. + Returns information about the hot key. Return NULL for any parameter you + don't want info about. The description should be at least 512 chars long. } PROCEDURE XPLMGetHotKeyInfo( inHotKey : XPLMHotKeyID; - outVirtualKey : Pchar; { Can be nil } + outVirtualKey : XPLMString; { Can be nil } outFlags : PXPLMKeyFlags; { Can be nil } - outDescription : Pchar; { Can be nil } + outDescription : XPLMString; { Can be nil } outPlugin : PXPLMPluginID); { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMSetHotKeyCombination - XPLMSetHotKeyCombination remaps a hot keys keystrokes. You may remap - another plugin's keystrokes. + Remaps a hot key's keystrokes. You may remap another plugin's keystrokes. } PROCEDURE XPLMSetHotKeyCombination( inHotKey : XPLMHotKeyID; - inVirtualKey : char; + inVirtualKey : XPLMChar; inFlags : XPLMKeyFlags); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; + IMPLEMENTATION + END. diff --git a/src/SDK/Delphi/XPLM/XPLMGraphics.pas b/src/SDK/Delphi/XPLM/XPLMGraphics.pas index 7c712f28..20ff61a9 100755 --- a/src/SDK/Delphi/XPLM/XPLMGraphics.pas +++ b/src/SDK/Delphi/XPLM/XPLMGraphics.pas @@ -1,74 +1,76 @@ { - 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 XPLMGraphics; INTERFACE { - Graphics routines for X-Plane and OpenGL. + A few notes on coordinate systems: - A few notes on coordinate systems: + X-Plane uses three kinds of coordinates. Global coordinates are specified + as latitude, longitude and elevation. This coordinate system never changes + but is not very precise. - X-Plane uses three kinds of coordinates. Global coordinates are specified - as latitude, longitude and elevation. This coordinate system never changes - but is not very precise. + OpenGL (or 'local') coordinates are cartesian and shift with the plane. + They offer more precision and are used for 3-d OpenGL drawing. The X axis + is aligned east-west with positive X meaning east. The Y axis is aligned + straight up and down at the point 0,0,0 (but since the earth is round it is + not truly straight up and down at other points). The Z axis is aligned + north-south at 0, 0, 0 with positive Z pointing south (but since the earth + is round it isn't exactly north-south as you move east or west of 0, 0, 0). + One unit is one meter and the point 0,0,0 is on the surface of the earth at + sea level for some latitude and longitude picked by the sim such that the + user's aircraft is reasonably nearby. - OpenGL (or 'local') coordinates are cartesian and shift with the plane. - They offer more precision and are used for 3-d OpenGL drawing. The X axis - is aligned east-west with positive X meaning east. The Y axis is aligned - straight up and down at the point 0,0,0 (but since the earth is round it is - not truly straight up and down at other points). The Z axis is aligned - north-south at 0, 0, 0 with positive Z pointing south (but since the earth - is round it isn't exactly north-south as you move east or west of 0, 0, 0). - One unit is one meter and the point 0,0,0 is on the surface of the earth - at sea level for some latitude and longitude picked by the sim such that - the user's aircraft is reasonably nearby. + 2-d Panel coordinates are 2d, with the X axis horizontal and the Y axis + vertical. The point 0,0 is the bottom left and 1024,768 is the upper + right of the screen. This is true no matter what resolution the user's + monitor is in; when running in higher resolution, graphics will be + scaled. - Cockpit coordinates are 2d, with the X axis horizontal and the Y axis - vertical. The point 0,0 is the bottom left and 1024,768 is the upper right - of the screen. This is true no matter what resolution the user's monitor is - in; when running in higher resolution, graphics will be scaled. - - Use X-Plane's routines to convert between global and local coordinates. Do - not attempt to do this conversion yourself; the precise 'roundness' of - X-Plane's physics model may not match your own, and (to make things - weirder) the user can potentially customize the physics of the current - planet. + Use X-Plane's routines to convert between global and local coordinates. Do + not attempt to do this conversion yourself; the precise 'roundness' of + X-Plane's physics model may not match your own, and (to make things + weirder) the user can potentially customize the physics of the current + planet. } -USES XPLMDefs; +USES + XPLMDefs; {$A4} -{$IFDEF MSWINDOWS} - {$DEFINE DELPHI} -{$ENDIF} {___________________________________________________________________________ * X-PLANE GRAPHICS ___________________________________________________________________________} { - These routines allow you to use OpenGL with X-Plane. + These routines allow you to use OpenGL with X-Plane. } { XPLMTextureID - XPLM Texture IDs name well-known textures in the sim for you to use. This - allows you to recycle textures from X-Plane, saving VRAM. + XPLM Texture IDs name well-known textures in the sim for you to use. This + allows you to recycle textures from X-Plane, saving VRAM. + + *Warning*: do not use these enums. The only remaining use they have is to + access the legacy compatibility v10 UI texture; if you need this, get it + via the Widgets library. } TYPE XPLMTextureID = ( - { The bitmap that contains window outlines, button outlines, fonts, etc. } + { The bitmap that contains window outlines, button outlines, fonts, etc. } xplm_Tex_GeneralInterface = 0 - { The exterior paint for the user's aircraft (daytime). } +{$IFDEF XPLM_DEPRECATED} + { The exterior paint for the user's aircraft (daytime). } ,xplm_Tex_AircraftPaint = 1 +{$ENDIF XPLM_DEPRECATED} - { The exterior light map for the user's aircraft. } +{$IFDEF XPLM_DEPRECATED} + { The exterior light map for the user's aircraft. } ,xplm_Tex_AircraftLiteMap = 2 +{$ENDIF XPLM_DEPRECATED} ); PXPLMTextureID = ^XPLMTextureID; @@ -76,272 +78,270 @@ { XPLMSetGraphicsState - XPLMSetGraphicsState changes OpenGL's graphics state in a number of ways: - - inEnableFog - enables or disables fog, equivalent to: glEnable(GL_FOG); - - inNumberTexUnits - enables or disables a number of multitexturing units. If - the number is 0, 2d texturing is disabled entirely, as in - glDisable(GL_TEXTURE_2D); Otherwise, 2d texturing is enabled, and a - number of multitexturing units are enabled sequentially, starting with - unit 0, e.g. glActiveTextureARB(GL_TEXTURE0_ARB); glEnable - (GL_TEXTURE_2D); - - inEnableLighting - enables or disables OpenGL lighting, e.g. - glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); + XPLMSetGraphicsState changes OpenGL's fixed function pipeline state. You + are not responsible for restoring any state that is accessed via + XPLMSetGraphicsState, but you are responsible for not accessing this state + directly. - inEnableAlphaTesting - enables or disables the alpha test per pixel, e.g. - glEnable(GL_ALPHA_TEST); + - inEnableFog - enables or disables fog, equivalent to: glEnable(GL_FOG); + - inNumberTexUnits - enables or disables a number of multitexturing units. + If the number is 0, 2d texturing is disabled entirely, as in + glDisable(GL_TEXTURE_2D); Otherwise, 2d texturing is enabled, and a + number of multitexturing units are enabled sequentially, starting with + unit 0, e.g. glActiveTextureARB(GL_TEXTURE0_ARB); glEnable + (GL_TEXTURE_2D); + - inEnableLighting - enables or disables OpenGL lighting, e.g. + glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); + - inEnableAlphaTesting - enables or disables the alpha test per pixel, e.g. + glEnable(GL_ALPHA_TEST); + - inEnableAlphaBlending - enables or disables alpha blending per pixel, + e.g. glEnable(GL_BLEND); + - inEnableDepthTesting - enables per pixel depth testing, as in + glEnable(GL_DEPTH_TEST); + - inEnableDepthWriting - enables writing back of depth information to the + depth bufffer, as in glDepthMask(GL_TRUE); - inEnableAlphaBlending - enables or disables alpha blending per pixel, e.g. - glEnable(GL_BLEND); + The purpose of this function is to change OpenGL state while keeping + X-Plane aware of the state changes; this keeps X-Plane from getting + surprised by OGL state changes, and prevents X-Plane and plug-ins from + having to set all state before all draws; XPLMSetGraphicsState internally + skips calls to change state that is already properly enabled. - inEnableDepthTesting - enables per pixel depth testing, as in - glEnable(GL_DEPTH_TEST); + X-Plane does not have a 'default' OGL state for plug-ins with respect to + the above state vector; plug-ins should totally set OGL state using this + API before drawing. Use XPLMSetGraphicsState instead of any of the above + OpenGL calls. - inEnableDepthWriting - enables writing back of depth information to the - depth bufffer, as in glDepthMask(GL_TRUE); + WARNING: Any routine that performs drawing (e.g. XPLMDrawString or widget + code) may change X-Plane's state. Always set state before drawing after + unknown code has executed. - The purpose of this function is to change OpenGL state while keeping - X-Plane aware of the state changes; this keeps X-Plane from getting - surprised by OGL state changes, and prevents X-Plane and plug-ins from - having to set all state before all draws; XPLMSetGraphicsState internally - skips calls to change state that is already properly enabled. - - X-Plane does not have a 'default' OGL state to plug-ins; plug-ins should - totally set OGL state before drawing. Use XPLMSetGraphicsState instead of - any of the above OpenGL calls. - - WARNING: Any routine that performs drawing (e.g. XPLMDrawString or widget - code) may change X-Plane's state. Always set state before drawing after - unknown code has executed. + *Deprecation Warnings*: X-Plane's lighting and fog environemnt is + significantly more complex than the fixed function pipeline can express; + do not assume that lighting and fog state is a good approximation for 3-d + drawing. Prefer to use XPLMInstancing to draw objects. All calls to + XPLMSetGraphicsState should have no fog or lighting. } PROCEDURE XPLMSetGraphicsState( - inEnableFog : integer; - inNumberTexUnits : integer; - inEnableLighting : integer; - inEnableAlphaTesting: integer; - inEnableAlphaBlending: integer; - inEnableDepthTesting: integer; - inEnableDepthWriting: integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inEnableFog : Integer; + inNumberTexUnits : Integer; + inEnableLighting : Integer; + inEnableAlphaTesting: Integer; + inEnableAlphaBlending: Integer; + inEnableDepthTesting: Integer; + inEnableDepthWriting: Integer); + cdecl; external XPLM_DLL; { XPLMBindTexture2d - XPLMBindTexture2d changes what texture is bound to the 2d texturing target. - This routine caches the current 2d texture across all texturing units in - the sim and plug-ins, preventing extraneous binding. For example, consider - several plug-ins running in series; if they all use the 'general interface' - bitmap to do UI, calling this function will skip the rebinding of the - general interface texture on all but the first plug-in, which can provide - better frame rate son some graphics cards. + XPLMBindTexture2d changes what texture is bound to the 2d texturing + target. This routine caches the current 2d texture across all texturing + units in the sim and plug-ins, preventing extraneous binding. For + example, consider several plug-ins running in series; if they all use the + 'general interface' bitmap to do UI, calling this function will skip the + rebinding of the general interface texture on all but the first plug-in, + which can provide better frame rate son some graphics cards. - inTextureID is the ID of the texture object to bind; inTextureUnit is a - zero-based texture unit (e.g. 0 for the first one), up to a maximum of 4 - units. (This number may increase in future versions of X-Plane.) + inTextureID is the ID of the texture object to bind; inTextureUnit is a + zero-based texture unit (e.g. 0 for the first one), up to a maximum of 4 + units. (This number may increase in future versions of X-Plane.) - Use this routine instead of glBindTexture(GL_TEXTURE_2D, ....); + Use this routine instead of glBindTexture(GL_TEXTURE_2D, ....); } PROCEDURE XPLMBindTexture2d( - inTextureNum : integer; - inTextureUnit : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inTextureNum : Integer; + inTextureUnit : Integer); + cdecl; external XPLM_DLL; { XPLMGenerateTextureNumbers - This routine generates unused texture numbers that a plug-in can use to - safely bind textures. Use this routine instead of glGenTextures; - glGenTextures will allocate texture numbers in ranges that X-Plane reserves - for its own use but does not always use; for example, it might provide an - ID within the range of textures reserved for terrain...loading a new .env - file as the plane flies might then cause X-Plane to use this texture ID. - X-Plane will then overwrite the plug-ins texture. This routine returns - texture IDs that are out of X-Plane's usage range. + Use this routine instead of glGenTextures to generate new texture object + IDs. This routine historically ensured that plugins don't use texure IDs + that X-Plane is reserving for its own use. } PROCEDURE XPLMGenerateTextureNumbers( - outTextureIDs : Pinteger; - inCount : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + outTextureIDs : PInteger; + inCount : Integer); + cdecl; external XPLM_DLL; +{$IFDEF XPLM_DEPRECATED} { XPLMGetTexture - XPLMGetTexture returns the OpenGL texture enumeration of an X-Plane texture - based on a generic identifying code. For example, you can get the texture - for X-Plane's UI bitmaps. This allows you to build new gauges that take - advantage of X-Plane's textures, for smooth artwork integration and also - saving texture memory. Note that the texture might not be loaded yet, - depending on what the plane's panel contains. - - OPEN ISSUE: We really need a way to make sure X-Plane loads this texture if - it isn't around, or at least a way to find out whether it is loaded or not. + XPLMGetTexture returns the OpenGL texture ID of an X-Plane texture based on + a generic identifying code. For example, you can get the texture for + X-Plane's UI bitmaps. } FUNCTION XPLMGetTexture( - inTexture : XPLMTextureID) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inTexture : XPLMTextureID) : Integer; + cdecl; external XPLM_DLL; +{$ENDIF XPLM_DEPRECATED} { XPLMWorldToLocal - This routine translates coordinates from latitude, longitude, and altitude - to local scene coordinates. Latitude and longitude are in decimal degrees, - and altitude is in meters MSL (mean sea level). The XYZ coordinates are in - meters in the local OpenGL coordinate system. + This routine translates coordinates from latitude, longitude, and altitude + to local scene coordinates. Latitude and longitude are in decimal degrees, + and altitude is in meters MSL (mean sea level). The XYZ coordinates are in + meters in the local OpenGL coordinate system. } PROCEDURE XPLMWorldToLocal( - inLatitude : real; - inLongitude : real; - inAltitude : real; - outX : Preal; - outY : Preal; - outZ : Preal); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inLatitude : Real; + inLongitude : Real; + inAltitude : Real; + outX : PReal; + outY : PReal; + outZ : PReal); + cdecl; external XPLM_DLL; { XPLMLocalToWorld - This routine translates a local coordinate triplet back into latitude, - longitude, and altitude. Latitude and longitude are in decimal degrees, - and altitude is in meters MSL (mean sea level). The XYZ coordinates are in - meters in the local OpenGL coordinate system. + This routine translates a local coordinate triplet back into latitude, + longitude, and altitude. Latitude and longitude are in decimal degrees, + and altitude is in meters MSL (mean sea level). The XYZ coordinates are in + meters in the local OpenGL coordinate system. - NOTE: world coordinates are less precise than local coordinates; you should - try to avoid round tripping from local to world and back. + NOTE: world coordinates are less precise than local coordinates; you should + try to avoid round tripping from local to world and back. } PROCEDURE XPLMLocalToWorld( - inX : real; - inY : real; - inZ : real; - outLatitude : Preal; - outLongitude : Preal; - outAltitude : Preal); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inX : Real; + inY : Real; + inZ : Real; + outLatitude : PReal; + outLongitude : PReal; + outAltitude : PReal); + cdecl; external XPLM_DLL; { XPLMDrawTranslucentDarkBox - This routine draws a translucent dark box, partially obscuring parts of the - screen but making text easy to read. This is the same graphics primitive - used by X-Plane to show text files and ATC info. + This routine draws a translucent dark box, partially obscuring parts of the + screen but making text easy to read. This is the same graphics primitive + used by X-Plane to show text files and ATC info. } PROCEDURE XPLMDrawTranslucentDarkBox( - inLeft : integer; - inTop : integer; - inRight : integer; - inBottom : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inLeft : Integer; + inTop : Integer; + inRight : Integer; + inBottom : Integer); + cdecl; external XPLM_DLL; {___________________________________________________________________________ * X-PLANE TEXT ___________________________________________________________________________} -{ - -} { XPLMFontID - X-Plane features some fixed-character fonts. Each font may have its own - metrics. + X-Plane features some fixed-character fonts. Each font may have its own + metrics. - WARNING: Some of these fonts are no longer supported or may have changed - geometries. For maximum copmatibility, see the comments below. + WARNING: Some of these fonts are no longer supported or may have changed + geometries. For maximum copmatibility, see the comments below. - Note: X-Plane 7 supports proportional-spaced fonts. Since no measuring - routine is available yet, the SDK will normally draw using a fixed-width - font. You can use a dataref to enable proportional font drawing on XP7 if - you want to. + Note: X-Plane 7 supports proportional-spaced fonts. Since no measuring + routine is available yet, the SDK will normally draw using a fixed-width + font. You can use a dataref to enable proportional font drawing on XP7 if + you want to. } TYPE XPLMFontID = ( - { Mono-spaced font for user interface. Available in all versions of the SDK. } + { Mono-spaced font for user interface. Available in all versions of the SDK.} xplmFont_Basic = 0 - { Deprecated, do not use. } +{$IFDEF XPLM_DEPRECATED} + { Deprecated, do not use. } ,xplmFont_Menus = 1 +{$ENDIF XPLM_DEPRECATED} - { Deprecated, do not use. } +{$IFDEF XPLM_DEPRECATED} + { Deprecated, do not use. } ,xplmFont_Metal = 2 +{$ENDIF XPLM_DEPRECATED} - { Deprecated, do not use. } +{$IFDEF XPLM_DEPRECATED} + { Deprecated, do not use. } ,xplmFont_Led = 3 +{$ENDIF XPLM_DEPRECATED} - { Deprecated, do not use. } +{$IFDEF XPLM_DEPRECATED} + { Deprecated, do not use. } ,xplmFont_LedWide = 4 +{$ENDIF XPLM_DEPRECATED} - { Deprecated, do not use. } +{$IFDEF XPLM_DEPRECATED} + { Deprecated, do not use. } ,xplmFont_PanelHUD = 5 +{$ENDIF XPLM_DEPRECATED} - { Deprecated, do not use. } +{$IFDEF XPLM_DEPRECATED} + { Deprecated, do not use. } ,xplmFont_PanelEFIS = 6 +{$ENDIF XPLM_DEPRECATED} - { Deprecated, do not use. } +{$IFDEF XPLM_DEPRECATED} + { Deprecated, do not use. } ,xplmFont_PanelGPS = 7 +{$ENDIF XPLM_DEPRECATED} - { Deprecated, do not use. } +{$IFDEF XPLM_DEPRECATED} + { Deprecated, do not use. } ,xplmFont_RadiosGA = 8 +{$ENDIF XPLM_DEPRECATED} - { Deprecated, do not use. } +{$IFDEF XPLM_DEPRECATED} + { Deprecated, do not use. } ,xplmFont_RadiosBC = 9 +{$ENDIF XPLM_DEPRECATED} - { Deprecated, do not use. } +{$IFDEF XPLM_DEPRECATED} + { Deprecated, do not use. } ,xplmFont_RadiosHM = 10 +{$ENDIF XPLM_DEPRECATED} - { Deprecated, do not use. } +{$IFDEF XPLM_DEPRECATED} + { Deprecated, do not use. } ,xplmFont_RadiosGANarrow = 11 +{$ENDIF XPLM_DEPRECATED} - { Deprecated, do not use. } +{$IFDEF XPLM_DEPRECATED} + { Deprecated, do not use. } ,xplmFont_RadiosBCNarrow = 12 +{$ENDIF XPLM_DEPRECATED} - { Deprecated, do not use. } +{$IFDEF XPLM_DEPRECATED} + { Deprecated, do not use. } ,xplmFont_RadiosHMNarrow = 13 +{$ENDIF XPLM_DEPRECATED} - { Deprecated, do not use. } +{$IFDEF XPLM_DEPRECATED} + { Deprecated, do not use. } ,xplmFont_Timer = 14 +{$ENDIF XPLM_DEPRECATED} - { Deprecated, do not use. } +{$IFDEF XPLM_DEPRECATED} + { Deprecated, do not use. } ,xplmFont_FullRound = 15 +{$ENDIF XPLM_DEPRECATED} - { Deprecated, do not use. } +{$IFDEF XPLM_DEPRECATED} + { Deprecated, do not use. } ,xplmFont_SmallRound = 16 +{$ENDIF XPLM_DEPRECATED} - { Deprecated, do not use. } +{$IFDEF XPLM_DEPRECATED} + { Deprecated, do not use. } ,xplmFont_Menus_Localized = 17 +{$ENDIF XPLM_DEPRECATED} {$IFDEF XPLM200} - { Proportional UI font. } + { Proportional UI font. } ,xplmFont_Proportional = 18 -{$ENDIF} +{$ENDIF XPLM200} ); PXPLMFontID = ^XPLMFontID; @@ -349,90 +349,76 @@ { XPLMDrawString - This routine draws a NULL termianted string in a given font. Pass in the - lower left pixel that the character is to be drawn onto. Also pass the - character and font ID. This function returns the x offset plus the width of - all drawn characters. The color to draw in is specified as a pointer to an - array of three floating point colors, representing RGB intensities from 0.0 - to 1.0. + This routine draws a NULL termianted string in a given font. Pass in the + lower left pixel that the character is to be drawn onto. Also pass the + character and font ID. This function returns the x offset plus the width of + all drawn characters. The color to draw in is specified as a pointer to an + array of three floating point colors, representing RGB intensities from 0.0 + to 1.0. } PROCEDURE XPLMDrawString( - inColorRGB : Psingle; - inXOffset : integer; - inYOffset : integer; - inChar : Pchar; - inWordWrapWidth : Pinteger; { Can be nil } + inColorRGB : PSingle; + inXOffset : Integer; + inYOffset : Integer; + inChar : XPLMString; + inWordWrapWidth : PInteger; { Can be nil } inFontID : XPLMFontID); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMDrawNumber - This routine draws a number similar to the digit editing fields in - PlaneMaker and data output display in X-Plane. Pass in a color, a - position, a floating point value, and formatting info. Specify how many - integer and how many decimal digits to show and whether to show a sign, as - well as a character set. This routine returns the xOffset plus width of the - string drawn. + This routine draws a number similar to the digit editing fields in + PlaneMaker and data output display in X-Plane. Pass in a color, a + position, a floating point value, and formatting info. Specify how many + integer and how many decimal digits to show and whether to show a sign, as + well as a character set. This routine returns the xOffset plus width of the + string drawn. } PROCEDURE XPLMDrawNumber( - inColorRGB : Psingle; - inXOffset : integer; - inYOffset : integer; - inValue : real; - inDigits : integer; - inDecimals : integer; - inShowSign : integer; + inColorRGB : PSingle; + inXOffset : Integer; + inYOffset : Integer; + inValue : Real; + inDigits : Integer; + inDecimals : Integer; + inShowSign : Integer; inFontID : XPLMFontID); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMGetFontDimensions - This routine returns the width and height of a character in a given font. - It also tells you if the font only supports numeric digits. Pass NULL if - you don't need a given field. Note that for a proportional font the width - will be an arbitrary, hopefully average width. + This routine returns the width and height of a character in a given font. + It also tells you if the font only supports numeric digits. Pass NULL if + you don't need a given field. Note that for a proportional font the width + will be an arbitrary, hopefully average width. } PROCEDURE XPLMGetFontDimensions( inFontID : XPLMFontID; - outCharWidth : Pinteger; { Can be nil } - outCharHeight : Pinteger; { Can be nil } - outDigitsOnly : Pinteger); { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + outCharWidth : PInteger; { Can be nil } + outCharHeight : PInteger; { Can be nil } + outDigitsOnly : PInteger); { Can be nil } + cdecl; external XPLM_DLL; {$IFDEF XPLM200} { XPLMMeasureString - This routine returns the width in pixels of a string using a given font. - The string is passed as a pointer plus length (and does not need to be null - terminated); this is used to allow for measuring substrings. The return - value is floating point; it is possible that future font drawing may allow - for fractional pixels. + This routine returns the width in pixels of a string using a given font. + The string is passed as a pointer plus length (and does not need to be null + terminated); this is used to allow for measuring substrings. The return + value is floating point; it is possible that future font drawing may allow + for fractional pixels. } FUNCTION XPLMMeasureString( inFontID : XPLMFontID; - inChar : Pchar; - inNumChars : integer) : single; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} + inChar : XPLMString; + inNumChars : Integer) : Single; + cdecl; external XPLM_DLL; +{$ENDIF XPLM200} + IMPLEMENTATION + END. diff --git a/src/SDK/Delphi/XPLM/XPLMInstance.pas b/src/SDK/Delphi/XPLM/XPLMInstance.pas index 9daac4d7..a38d2bb8 100644 --- a/src/SDK/Delphi/XPLM/XPLMInstance.pas +++ b/src/SDK/Delphi/XPLM/XPLMInstance.pas @@ -1,52 +1,46 @@ { - 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 XPLMInstance; INTERFACE { - This API provides instanced drawing of X-Plane objects (.obj files). In - contrast to old drawing APIs, which required you to draw your own objects - per-frame, the instancing API allows you to simply register an OBJ for - drawing, then move or manipulate it later (as needed). + This API provides instanced drawing of X-Plane objects (.obj files). In + contrast to old drawing APIs, which required you to draw your own objects + per-frame, the instancing API allows you to simply register an OBJ for + drawing, then move or manipulate it later (as needed). - This provides one tremendous benefit: it keeps all dataref operations for - your object in one place. Because datarefs are main thread only, allowing - dataref access anywhere is a serious performance bottleneck for the - simulator---the whole simulator has to pause and wait for each dataref - access. This performance penalty will only grow worse as X-Plane moves - toward an ever more heavily multithreaded engine. + This provides one tremendous benefit: it keeps all dataref operations for + your object in one place. Because datarefs are main thread only, allowing + dataref access anywhere is a serious performance bottleneck for the + simulator---the whole simulator has to pause and wait for each dataref + access. This performance penalty will only grow worse as X-Plane moves + toward an ever more heavily multithreaded engine. - The instancing API allows X-Plane to isolate all dataref manipulations for - all plugin object drawing to one place, potentially providing huge - performance gains. + The instancing API allows X-Plane to isolate all dataref manipulations for + all plugin object drawing to one place, potentially providing huge + performance gains. - Here's how it works: + Here's how it works: - When an instance is created, it provides a list of all datarefs you want to - manipulate in for the OBJ in the future. This list of datarefs replaces the - ad-hoc collections of dataref objects previously used by art assets. Then, - per-frame, you can manipulate the instance by passing in a "block" of - packed floats representing the current values of the datarefs for your - instance. (Note that the ordering of this set of packed floats must exactly - match the ordering of the datarefs when you created your instance.) + When an instance is created, it provides a list of all datarefs you want to + manipulate in for the OBJ in the future. This list of datarefs replaces the + ad-hoc collections of dataref objects previously used by art assets. Then, + per-frame, you can manipulate the instance by passing in a "block" of + packed floats representing the current values of the datarefs for your + instance. (Note that the ordering of this set of packed floats must exactly + match the ordering of the datarefs when you created your instance.) } -USES XPLMDefs; -USES XPLMScenery; +USES + XPLMDefs, XPLMScenery; {$A4} -{$IFDEF MSWINDOWS} - {$DEFINE DELPHI} -{$ENDIF} {___________________________________________________________________________ * Instance Creation and Destruction ___________________________________________________________________________} { - Registers and unregisters instances. + Registers and unregisters instances. } @@ -54,7 +48,7 @@ { XPLMInstanceRef - An opaque handle to an instance. + An opaque handle to an instance. } XPLMInstanceRef = pointer; PXPLMInstanceRef = ^XPLMInstanceRef; @@ -62,52 +56,70 @@ { XPLMCreateInstance - Registers an instance of an X-Plane object. + XPLMCreateInstance creates a new instance, managed by your plug-in, and + returns a handle to the instance. A few important requirements: + + * The object passed in must be fully loaded and returned from the XPLM + before you can create your instance; you cannot pass a null obj ref, nor + can you change the ref later. + + * If you use any custom datarefs in your object, they must be registered + before the object is loaded. This is true even if their data will be + provided via the instance dataref list. + + * The instance dataref array must be a valid ptr to an array of at least + one item that is null terminated. That is, if you do not want any + datarefs, you must passa ptr to an array with a null item. You cannot + pass null for this. } FUNCTION XPLMCreateInstance( obj : XPLMObjectRef; - datarefs : PPchar) : XPLMInstanceRef; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + datarefs : PXPLMString) : XPLMInstanceRef; + cdecl; external XPLM_DLL; { XPLMDestroyInstance - Unregisters an instance. + XPLMDestroyInstance destroys and deallocates your instance; once called, + you are still responsible for releasing the OBJ ref. + + Tip: you can release your OBJ ref after you call XPLMCreateInstance as long + as you never use it again; the instance will maintain its own reference to + the OBJ and the object OBJ be deallocated when the instance is destroyed. } PROCEDURE XPLMDestroyInstance( instance : XPLMInstanceRef); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; {___________________________________________________________________________ * Instance Manipulation ___________________________________________________________________________} -{ - -} { XPLMInstanceSetPosition - Updates both the position of the instance and all datarefs you registered - for it. + Updates both the position of the instance and all datarefs you registered + for it. Call this from a flight loop callback or UI callback. + + __DO NOT__ call XPLMInstanceSetPosition from a drawing callback; the whole + point of instancing is that you do not need any drawing callbacks. Setting + instance data from a drawing callback may have undefined consequences, and + the drawing callback hurts FPS unnecessarily. + + The memory pointed to by the data pointer must be large enough to hold one + float for every data ref you have registered, and must contain valid + floating point data. + + BUG: before X-Plane 11.50, if you have no dataref registered, you must + still pass a valid pointer for data and not null. } PROCEDURE XPLMInstanceSetPosition( instance : XPLMInstanceRef; new_position : PXPLMDrawInfo_t; - data : Psingle); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + data : PSingle); + cdecl; external XPLM_DLL; + IMPLEMENTATION + END. diff --git a/src/SDK/Delphi/XPLM/XPLMMap.pas b/src/SDK/Delphi/XPLM/XPLMMap.pas index f07a2b23..61c82dcf 100644 --- a/src/SDK/Delphi/XPLM/XPLMMap.pas +++ b/src/SDK/Delphi/XPLM/XPLMMap.pas @@ -1,75 +1,72 @@ { - 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 XPLMMap; INTERFACE { - This API allows you to create new layers within X-Plane maps. Your layers - can draw arbitrary OpenGL, but they conveniently also have access to - X-Plane's built-in icon and label drawing functions. + This API allows you to create new layers within X-Plane maps. Your layers + can draw arbitrary OpenGL, but they conveniently also have access to + X-Plane's built-in icon and label drawing functions. - As of X-Plane 11, map drawing happens in three stages: + As of X-Plane 11, map drawing happens in three stages: - 1. backgrounds and "fill," 2. icons, and 3. labels. + 1. backgrounds and "fill," + 2. icons, and + 3. labels. - Thus, all background drawing gets layered beneath all icons, which likewise - get layered beneath all labels. Within each stage, the map obeys a - consistent layer ordering, such that "fill" layers (layers that cover a - large amount of map area, like the terrain and clouds) appear beneath - "markings" layers (like airport icons). This ensures that layers with fine - details don't get obscured by layers with larger details. + Thus, all background drawing gets layered beneath all icons, which likewise + get layered beneath all labels. Within each stage, the map obeys a + consistent layer ordering, such that "fill" layers (layers that cover a + large amount of map area, like the terrain and clouds) appear beneath + "markings" layers (like airport icons). This ensures that layers with fine + details don't get obscured by layers with larger details. - The XPLM map API reflects both aspects of this draw layering: you can - register a layer as providing either markings or fill, and X-Plane will - draw your fill layers beneath your markings layers (regardless of - registration order). Likewise, you are guaranteed that your layer's icons - (added from within an icon callback) will go above your layer's OpenGL - drawing, and your labels will go above your icons. + The XPLM map API reflects both aspects of this draw layering: you can + register a layer as providing either markings or fill, and X-Plane will + draw your fill layers beneath your markings layers (regardless of + registration order). Likewise, you are guaranteed that your layer's icons + (added from within an icon callback) will go above your layer's OpenGL + drawing, and your labels will go above your icons. - The XPLM guarantees that all plugin-created fill layers go on top of all - native X-Plane fill layers, and all plugin-created markings layers go on - top of all X-Plane markings layers (with the exception of the aircraft - icons). It also guarantees that the draw order of your own plugin's layers - will be consistent. But, for layers created by different plugins, the only - guarantee is that we will draw all of one plugin's layers of each type - (fill, then markings), then all of the others'; we don't guarantee which - plugin's fill and markings layers go on top of the other's. + The XPLM guarantees that all plugin-created fill layers go on top of all + native X-Plane fill layers, and all plugin-created markings layers go on + top of all X-Plane markings layers (with the exception of the aircraft + icons). It also guarantees that the draw order of your own plugin's layers + will be consistent. But, for layers created by different plugins, the only + guarantee is that we will draw all of one plugin's layers of each type + (fill, then markings), then all of the others'; we don't guarantee which + plugin's fill and markings layers go on top of the other's. - As of X-Plane 11, maps use true cartographic projections for their drawing, - and different maps may use different projections. For that reason, all - drawing calls include an opaque handle for the projection you should use to - do the drawing. Any time you would draw at a particular latitude/longitude, - you'll need to ask the projection to translate that position into "map - coordinates." (Note that the projection is guaranteed not to change between - calls to your prepare-cache hook, so if you cache your map coordinates - ahead of time, there's no need to re-project them when you actually draw.) + As of X-Plane 11, maps use true cartographic projections for their drawing, + and different maps may use different projections. For that reason, all + drawing calls include an opaque handle for the projection you should use to + do the drawing. Any time you would draw at a particular latitude/longitude, + you'll need to ask the projection to translate that position into "map + coordinates." (Note that the projection is guaranteed not to change between + calls to your prepare-cache hook, so if you cache your map coordinates + ahead of time, there's no need to re-project them when you actually draw.) - In addition to mapping normal latitude/longitude locations into map - coordinates, the projection APIs also let you know the current heading for - north. (Since X-Plane 11 maps can rotate to match the heading of the user's - aircraft, it's not safe to assume that north is at zero degrees rotation.) + In addition to mapping normal latitude/longitude locations into map + coordinates, the projection APIs also let you know the current heading for + north. (Since X-Plane 11 maps can rotate to match the heading of the user's + aircraft, it's not safe to assume that north is at zero degrees rotation.) } -USES XPLMDefs; +USES + XPLMDefs; {$A4} -{$IFDEF MSWINDOWS} - {$DEFINE DELPHI} -{$ENDIF} {$IFDEF XPLM300} {___________________________________________________________________________ * DRAWING CALLBACKS ___________________________________________________________________________} { - When you create a new map layer (using XPLMCreateMapLayer), you can provide - any or all of these callbacks. They allow you to insert your own OpenGL - drawing, text labels, and icons into the X-Plane map at the appropriate - places, allowing your layer to behave as similarly to X-Plane's built-in - layers as possible. + When you create a new map layer (using XPLMCreateMapLayer), you can provide + any or all of these callbacks. They allow you to insert your own OpenGL + drawing, text labels, and icons into the X-Plane map at the appropriate + places, allowing your layer to behave as similarly to X-Plane's built-in + layers as possible. } @@ -77,8 +74,8 @@ { XPLMMapLayerID - This is an opaque handle for a plugin-created map layer. Pass it to the map - drawing APIs from an appropriate callback to draw in the layer you created. + This is an opaque handle for a plugin-created map layer. Pass it to the map + drawing APIs from an appropriate callback to draw in the layer you created. } XPLMMapLayerID = pointer; PXPLMMapLayerID = ^XPLMMapLayerID; @@ -86,8 +83,8 @@ { XPLMMapProjectionID - This is an opaque handle for a map projection. Pass it to the projection - APIs to translate between map coordinates and latitude/longitudes. + This is an opaque handle for a map projection. Pass it to the projection + APIs to translate between map coordinates and latitude/longitudes. } XPLMMapProjectionID = pointer; PXPLMMapProjectionID = ^XPLMMapProjectionID; @@ -95,12 +92,12 @@ { XPLMMapStyle - Indicates the visual style being drawn by the map. In X-Plane, the user can - choose between a number of map types, and different map types may have use - a different visual representation for the same elements (for instance, the - visual style of the terrain layer changes drastically between the VFR and - IFR layers), or certain layers may be disabled entirely in some map types - (e.g., localizers are only visible in the IFR low-enroute style). + Indicates the visual style being drawn by the map. In X-Plane, the user can + choose between a number of map types, and different map types may have use + a different visual representation for the same elements (for instance, the + visual style of the terrain layer changes drastically between the VFR and + IFR layers), or certain layers may be disabled entirely in some map types + (e.g., localizers are only visible in the IFR low-enroute style). } XPLMMapStyle = ( xplm_MapStyle_VFR_Sectional = 0 @@ -115,22 +112,22 @@ { XPLMMapDrawingCallback_f - This is the OpenGL map drawing callback for plugin-created map layers. You - can perform arbitrary OpenGL drawing from this callback, with one - exception: changes to the Z-buffer are not permitted, and will result in - map drawing errors. + This is the OpenGL map drawing callback for plugin-created map layers. You + can perform arbitrary OpenGL drawing from this callback, with one + exception: changes to the Z-buffer are not permitted, and will result in + map drawing errors. - All drawing done from within this callback appears beneath all built-in - X-Plane icons and labels, but above the built-in "fill" layers (layers - providing major details, like terrain and water). Note, however, that the - relative ordering between the drawing callbacks of different plugins is not - guaranteed. + All drawing done from within this callback appears beneath all built-in + X-Plane icons and labels, but above the built-in "fill" layers (layers + providing major details, like terrain and water). Note, however, that the + relative ordering between the drawing callbacks of different plugins is not + guaranteed. } XPLMMapDrawingCallback_f = PROCEDURE( inLayer : XPLMMapLayerID; - inMapBoundsLeftTopRightBottom: Psingle; - zoomRatio : single; - mapUnitsPerUserInterfaceUnit: single; + inMapBoundsLeftTopRightBottom: PSingle; + zoomRatio : Single; + mapUnitsPerUserInterfaceUnit: Single; mapStyle : XPLMMapStyle; projection : XPLMMapProjectionID; inRefcon : pointer); cdecl; @@ -138,24 +135,24 @@ { XPLMMapIconDrawingCallback_f - This is the icon drawing callback that enables plugin-created map layers to - draw icons using X-Plane's built-in icon drawing functionality. You can - request an arbitrary number of PNG icons to be drawn via - XPLMDrawMapIconFromSheet() from within this callback, but you may not - perform any OpenGL drawing here. - - Icons enqueued by this function will appear above all OpenGL drawing - (performed by your optional XPLMMapDrawingCallback_f), and above all - built-in X-Plane map icons of the same layer type ("fill" or "markings," as - determined by the XPLMMapLayerType in your XPLMCreateMapLayer_t). Note, - however, that the relative ordering between the drawing callbacks of - different plugins is not guaranteed. + This is the icon drawing callback that enables plugin-created map layers to + draw icons using X-Plane's built-in icon drawing functionality. You can + request an arbitrary number of PNG icons to be drawn via + XPLMDrawMapIconFromSheet() from within this callback, but you may not + perform any OpenGL drawing here. + + Icons enqueued by this function will appear above all OpenGL drawing + (performed by your optional XPLMMapDrawingCallback_f), and above all + built-in X-Plane map icons of the same layer type ("fill" or "markings," as + determined by the XPLMMapLayerType in your XPLMCreateMapLayer_t). Note, + however, that the relative ordering between the drawing callbacks of + different plugins is not guaranteed. } XPLMMapIconDrawingCallback_f = PROCEDURE( inLayer : XPLMMapLayerID; - inMapBoundsLeftTopRightBottom: Psingle; - zoomRatio : single; - mapUnitsPerUserInterfaceUnit: single; + inMapBoundsLeftTopRightBottom: PSingle; + zoomRatio : Single; + mapUnitsPerUserInterfaceUnit: Single; mapStyle : XPLMMapStyle; projection : XPLMMapProjectionID; inRefcon : pointer); cdecl; @@ -163,177 +160,177 @@ { XPLMMapLabelDrawingCallback_f - This is the label drawing callback that enables plugin-created map layers - to draw text labels using X-Plane's built-in labeling functionality. You - can request an arbitrary number of text labels to be drawn via - XPLMDrawMapLabel() from within this callback, but you may not perform any - OpenGL drawing here. - - Labels enqueued by this function will appear above all OpenGL drawing - (performed by your optional XPLMMapDrawingCallback_f), and above all - built-in map icons and labels of the same layer type ("fill" or "markings," - as determined by the XPLMMapLayerType in your XPLMCreateMapLayer_t). Note, - however, that the relative ordering between the drawing callbacks of - different plugins is not guaranteed. + This is the label drawing callback that enables plugin-created map layers + to draw text labels using X-Plane's built-in labeling functionality. You + can request an arbitrary number of text labels to be drawn via + XPLMDrawMapLabel() from within this callback, but you may not perform any + OpenGL drawing here. + + Labels enqueued by this function will appear above all OpenGL drawing + (performed by your optional XPLMMapDrawingCallback_f), and above all + built-in map icons and labels of the same layer type ("fill" or "markings," + as determined by the XPLMMapLayerType in your XPLMCreateMapLayer_t). Note, + however, that the relative ordering between the drawing callbacks of + different plugins is not guaranteed. } XPLMMapLabelDrawingCallback_f = PROCEDURE( inLayer : XPLMMapLayerID; - inMapBoundsLeftTopRightBottom: Psingle; - zoomRatio : single; - mapUnitsPerUserInterfaceUnit: single; + inMapBoundsLeftTopRightBottom: PSingle; + zoomRatio : Single; + mapUnitsPerUserInterfaceUnit: Single; mapStyle : XPLMMapStyle; projection : XPLMMapProjectionID; inRefcon : pointer); cdecl; -{$ENDIF} +{$ENDIF XPLM300} {$IFDEF XPLM300} {___________________________________________________________________________ * LAYER MANAGEMENT CALLBACKS ___________________________________________________________________________} { - These are various "bookkeeping" callbacks that your map layer can receive - (if you provide the callback in your XPLMCreateMapLayer_t). They allow you - to manage the lifecycle of your layer, as well as cache any - computationally-intensive preparation you might need for drawing. + These are various "bookkeeping" callbacks that your map layer can receive + (if you provide the callback in your XPLMCreateMapLayer_t). They allow you + to manage the lifecycle of your layer, as well as cache any + computationally-intensive preparation you might need for drawing. } { XPLMMapPrepareCacheCallback_f - A callback used to allow you to cache whatever information your layer needs - to draw in the current map area. + A callback used to allow you to cache whatever information your layer needs + to draw in the current map area. - This is called each time the map's total bounds change. This is typically - triggered by new DSFs being loaded, such that X-Plane discards old, - now-distant DSFs and pulls in new ones. At that point, the available bounds - of the map also change to match the new DSF area. + This is called each time the map's total bounds change. This is typically + triggered by new DSFs being loaded, such that X-Plane discards old, + now-distant DSFs and pulls in new ones. At that point, the available bounds + of the map also change to match the new DSF area. - By caching just the information you need to draw in this area, your future - draw calls can be made faster, since you'll be able to simply "splat" your - precomputed information each frame. + By caching just the information you need to draw in this area, your future + draw calls can be made faster, since you'll be able to simply "splat" your + precomputed information each frame. - We guarantee that the map projection will not change between successive - prepare cache calls, nor will any draw call give you bounds outside these - total map bounds. So, if you cache the projected map coordinates of all the - items you might want to draw in the total map area, you can be guaranteed - that no draw call will be asked to do any new work. + We guarantee that the map projection will not change between successive + prepare cache calls, nor will any draw call give you bounds outside these + total map bounds. So, if you cache the projected map coordinates of all the + items you might want to draw in the total map area, you can be guaranteed + that no draw call will be asked to do any new work. } TYPE XPLMMapPrepareCacheCallback_f = PROCEDURE( inLayer : XPLMMapLayerID; - inTotalMapBoundsLeftTopRightBottom: Psingle; + inTotalMapBoundsLeftTopRightBottom: PSingle; projection : XPLMMapProjectionID; inRefcon : pointer); cdecl; { XPLMMapWillBeDeletedCallback_f - Called just before your map layer gets deleted. Because SDK-created map - layers have the same lifetime as the X-Plane map that contains them, if the - map gets unloaded from memory, your layer will too. + Called just before your map layer gets deleted. Because SDK-created map + layers have the same lifetime as the X-Plane map that contains them, if the + map gets unloaded from memory, your layer will too. } XPLMMapWillBeDeletedCallback_f = PROCEDURE( inLayer : XPLMMapLayerID; inRefcon : pointer); cdecl; -{$ENDIF} +{$ENDIF XPLM300} {$IFDEF XPLM300} {___________________________________________________________________________ * MAP LAYER CREATION AND DESTRUCTION ___________________________________________________________________________} { - Enables the creation of new map layers. Layers are created for a particular - instance of the X-Plane map. For instance, if you want your layer to appear - in both the normal map interface and the Instructor Operator Station (IOS), - you would need two separate calls to XPLMCreateMapLayer(), with two - different values for your XPLMCreateMapLayer_t::layer_name. + Enables the creation of new map layers. Layers are created for a particular + instance of the X-Plane map. For instance, if you want your layer to appear + in both the normal map interface and the Instructor Operator Station (IOS), + you would need two separate calls to XPLMCreateMapLayer(), with two + different values for your XPLMCreateMapLayer_t::layer_name. - Your layer's lifetime will be determined by the lifetime of the map it is - created in. If the map is destroyed (on the X-Plane side), your layer will - be too, and you'll receive a callback to your - XPLMMapWillBeDeletedCallback_f. + Your layer's lifetime will be determined by the lifetime of the map it is + created in. If the map is destroyed (on the X-Plane side), your layer will + be too, and you'll receive a callback to your + XPLMMapWillBeDeletedCallback_f. } { XPLMMapLayerType - Indicates the type of map layer you are creating. Fill layers will always - be drawn beneath markings layers. + Indicates the type of map layer you are creating. Fill layers will always + be drawn beneath markings layers. } TYPE XPLMMapLayerType = ( - { A layer that draws "fill" graphics, like weather patterns, terrain, etc. } - { Fill layers frequently cover a large portion of the visible map area. } + { A layer that draws "fill" graphics, like weather patterns, terrain, etc. } + { Fill layers frequently cover a large portion of the visible map area. } xplm_MapLayer_Fill = 0 - { A layer that provides markings for particular map features, like NAVAIDs, } - { airports, etc. Even dense markings layers cover a small portion of the } - { total map area. } + { A layer that provides markings for particular map features, like NAVAIDs, } + { airports, etc. Even dense markings layers cover a small portion of the } + { total map area. } ,xplm_MapLayer_Markings = 1 ); PXPLMMapLayerType = ^XPLMMapLayerType; CONST - { Globally unique identifier for X-Plane's Map window, used as the } - { mapToCreateLayerIn parameter in XPLMCreateMapLayer_t } + { Globally unique identifier for X-Plane's Map window, used as the } + { mapToCreateLayerIn parameter in XPLMCreateMapLayer_t } XPLM_MAP_USER_INTERFACE = "XPLM_MAP_USER_INTERFACE"; - { Globally unique identifier for X-Plane's Instructor Operator Station } - { window, used as the mapToCreateLayerIn parameter in XPLMCreateMapLayer_t } + { Globally unique identifier for X-Plane's Instructor Operator Station } + { window, used as the mapToCreateLayerIn parameter in XPLMCreateMapLayer_t } XPLM_MAP_IOS = "XPLM_MAP_IOS"; { XPLMCreateMapLayer_t - This structure defines all of the parameters used to create a map layer - using XPLMCreateMapLayer. The structure will be expanded in future SDK APIs - to include more features. Always set the structSize member to the size of - your struct in bytes! + This structure defines all of the parameters used to create a map layer + using XPLMCreateMapLayer. The structure will be expanded in future SDK APIs + to include more features. Always set the structSize member to the size of + your struct in bytes! - Each layer must be associated with exactly one map instance in X-Plane. - That map, and that map alone, will call your callbacks. Likewise, when that - map is deleted, your layer will be as well. + Each layer must be associated with exactly one map instance in X-Plane. + That map, and that map alone, will call your callbacks. Likewise, when that + map is deleted, your layer will be as well. } TYPE XPLMCreateMapLayer_t = RECORD - { Used to inform XPLMCreateMapLayer() of the SDK version you compiled } - { against; should always be set to sizeof(XPLMCreateMapLayer_t) } - structSize : integer; - { Globally unique string identifying the map you want this layer to appear } - { in. As of XPLM300, this is limited to one of XPLM_MAP_USER_INTERFACE or } - { XPLM_MAP_IOS } - mapToCreateLayerIn : Pchar; - { The type of layer you are creating, used to determine draw order (all } - { plugin-created markings layers are drawn above all plugin-created fill } - { layers) } + { Used to inform XPLMCreateMapLayer() of the SDK version you compiled } + { against; should always be set to sizeof(XPLMCreateMapLayer_t) } + structSize : Integer; + { Globally unique string identifying the map you want this layer to appear } + { in. As of XPLM300, this is limited to one of XPLM_MAP_USER_INTERFACE or } + { XPLM_MAP_IOS } + mapToCreateLayerIn : XPLMString; + { The type of layer you are creating, used to determine draw order (all } + { plugin-created markings layers are drawn above all plugin-created fill } + { layers) } layerType : XPLMMapLayerType; - { Optional callback to inform you this layer is being deleted (due to its } - { owning map being destroyed) } + { Optional callback to inform you this layer is being deleted (due to its } + { owning map being destroyed) } willBeDeletedCallback : XPLMMapWillBeDeletedCallback_f; - { Optional callback you want to use to prepare your draw cache when the map } - { bounds change (set to NULL if you don't want this callback) } + { Optional callback you want to use to prepare your draw cache when the map } + { bounds change (set to NULL if you don't want this callback) } prepCacheCallback : XPLMMapPrepareCacheCallback_f; - { Optional callback you want to use for arbitrary OpenGL drawing, which goes } - { beneath all icons in the map's layering system (set to NULL if you don't } - { want this callback) } + { Optional callback you want to use for arbitrary OpenGL drawing, which goes } + { beneath all icons in the map's layering system (set to NULL if you don't } + { want this callback) } drawCallback : XPLMMapDrawingCallback_f; - { Optional callback you want to use for drawing icons, which go above all } - { built-in X-Plane icons (except the aircraft) in the map's layering system } - { (set to NULL if you don't want this callback) } + { Optional callback you want to use for drawing icons, which go above all } + { built-in X-Plane icons (except the aircraft) in the map's layering system } + { (set to NULL if you don't want this callback) } iconCallback : XPLMMapIconDrawingCallback_f; - { Optional callback you want to use for drawing map labels, which go above } - { all built-in X-Plane icons and labels (except those of aircraft) in the } - { map's layering system (set to NULL if you don't want this callback) } + { Optional callback you want to use for drawing map labels, which go above } + { all built-in X-Plane icons and labels (except those of aircraft) in the } + { map's layering system (set to NULL if you don't want this callback) } labelCallback : XPLMMapLabelDrawingCallback_f; - { True if you want a checkbox to be created in the map UI to toggle this } - { layer on and off; false if the layer should simply always be enabled } - showUiToggle : integer; - { Short label to use for this layer in the user interface } - layerName : Pchar; - { A reference to arbitrary data that will be passed to your callbacks } + { True if you want a checkbox to be created in the map UI to toggle this } + { layer on and off; false if the layer should simply always be enabled } + showUiToggle : Integer; + { Short label to use for this layer in the user interface } + layerName : XPLMString; + { A reference to arbitrary data that will be passed to your callbacks } refcon : pointer; END; PXPLMCreateMapLayer_t = ^XPLMCreateMapLayer_t; @@ -341,125 +338,109 @@ { XPLMCreateMapLayer - This routine creates a new map layer. You pass in an XPLMCreateMapLayer_t - structure with all of the fields set in. You must set the structSize of - the structure to the size of the actual structure you used. + This routine creates a new map layer. You pass in an XPLMCreateMapLayer_t + structure with all of the fields set in. You must set the structSize of + the structure to the size of the actual structure you used. - Returns NULL if the layer creation failed. This happens most frequently - because the map you specified in your - XPLMCreateMapLayer_t::mapToCreateLayerIn field doesn't exist (that is, if - XPLMMapExists() returns 0 for the specified map). You can use - XPLMRegisterMapCreationHook() to get a notification each time a new map is - opened in X-Plane, at which time you can create layers in it. + Returns NULL if the layer creation failed. This happens most frequently + because the map you specified in your + XPLMCreateMapLayer_t::mapToCreateLayerIn field doesn't exist (that is, if + XPLMMapExists() returns 0 for the specified map). You can use + XPLMRegisterMapCreationHook() to get a notification each time a new map is + opened in X-Plane, at which time you can create layers in it. } FUNCTION XPLMCreateMapLayer( inParams : PXPLMCreateMapLayer_t) : XPLMMapLayerID; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMDestroyMapLayer - Destroys a map layer you created (calling your - XPLMMapWillBeDeletedCallback_f if applicable). Returns true if a deletion - took place. + Destroys a map layer you created (calling your + XPLMMapWillBeDeletedCallback_f if applicable). Returns true if a deletion + took place. } FUNCTION XPLMDestroyMapLayer( - inLayer : XPLMMapLayerID) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inLayer : XPLMMapLayerID) : Integer; + cdecl; external XPLM_DLL; { XPLMMapCreatedCallback_f - A callback to notify your plugin that a new map has been created in - X-Plane. This is the best time to add a custom map layer using - XPLMCreateMapLayer(). + A callback to notify your plugin that a new map has been created in + X-Plane. This is the best time to add a custom map layer using + XPLMCreateMapLayer(). - No OpenGL drawing is permitted within this callback. + No OpenGL drawing is permitted within this callback. } TYPE XPLMMapCreatedCallback_f = PROCEDURE( - mapIdentifier : Pchar; + mapIdentifier : XPLMString; refcon : pointer); cdecl; { XPLMRegisterMapCreationHook - Registers your callback to receive a notification each time a new map is - constructed in X-Plane. This callback is the best time to add your custom - map layer using XPLMCreateMapLayer(). + Registers your callback to receive a notification each time a new map is + constructed in X-Plane. This callback is the best time to add your custom + map layer using XPLMCreateMapLayer(). - Note that you will not be notified about any maps that already exist---you - can use XPLMMapExists() to check for maps that were created previously. + Note that you will not be notified about any maps that already exist---you + can use XPLMMapExists() to check for maps that were created previously. } PROCEDURE XPLMRegisterMapCreationHook( callback : XPLMMapCreatedCallback_f; refcon : pointer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMMapExists - Returns 1 if the map with the specified identifier already exists in - X-Plane. In that case, you can safely call XPLMCreateMapLayer() specifying - that your layer should be added to that map. + Returns 1 if the map with the specified identifier already exists in + X-Plane. In that case, you can safely call XPLMCreateMapLayer() specifying + that your layer should be added to that map. } FUNCTION XPLMMapExists( - mapIdentifier : Pchar) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{$ENDIF} + mapIdentifier : XPLMString) : Integer; + cdecl; external XPLM_DLL; + +{$ENDIF XPLM300} {$IFDEF XPLM300} {___________________________________________________________________________ * MAP DRAWING ___________________________________________________________________________} { - These APIs are only valid from within a map drawing callback (one of - XPLMIconDrawingCallback_t or XPLMMapLabelDrawingCallback_f). Your drawing - callbacks are registered when you create a new map layer as part of your - XPLMCreateMapLayer_t. The functions here hook into X-Plane's built-in map - drawing functionality for icons and labels, so that you get a consistent - style with the rest of the X-Plane map. + These APIs are only valid from within a map drawing callback (one of + XPLMIconDrawingCallback_t or XPLMMapLabelDrawingCallback_f). Your drawing + callbacks are registered when you create a new map layer as part of your + XPLMCreateMapLayer_t. The functions here hook into X-Plane's built-in map + drawing functionality for icons and labels, so that you get a consistent + style with the rest of the X-Plane map. - Note that the X-Plane 11 map introduces a strict ordering: layers of type - xplm_MapLayer_Fill get drawn beneath all xplm_MapLayer_Markings layers. - Likewise, all OpenGL drawing (performed in your layer's - XPLMMapDrawingCallback_f) will appear beneath any icons and labels you - draw. + Note that the X-Plane 11 map introduces a strict ordering: layers of type + xplm_MapLayer_Fill get drawn beneath all xplm_MapLayer_Markings layers. + Likewise, all OpenGL drawing (performed in your layer's + XPLMMapDrawingCallback_f) will appear beneath any icons and labels you + draw. } { XPLMMapOrientation - Indicates whether a map element should be match its rotation to the map - itself, or to the user interface. For instance, the map itself may be - rotated such that "up" matches the user's aircraft, but you may want to - draw a text label such that it is always rotated zero degrees relative to - the user's perspective. In that case, you would have it draw with UI - orientation. + Indicates whether a map element should be match its rotation to the map + itself, or to the user interface. For instance, the map itself may be + rotated such that "up" matches the user's aircraft, but you may want to + draw a text label such that it is always rotated zero degrees relative to + the user's perspective. In that case, you would have it draw with UI + orientation. } TYPE XPLMMapOrientation = ( - { Orient such that a 0 degree rotation matches the map's north } + { Orient such that a 0 degree rotation matches the map's north } xplm_MapOrientation_Map = 0 - { Orient such that a 0 degree rotation is "up" relative to the user interface } + { Orient such that a 0 degree rotation is "up" relative to the user interface} ,xplm_MapOrientation_UI = 1 ); @@ -468,185 +449,163 @@ { XPLMDrawMapIconFromSheet - Enables plugin-created map layers to draw PNG icons using X-Plane's - built-in icon drawing functionality. Only valid from within an - XPLMIconDrawingCallback_t (but you can request an arbitrary number of icons - to be drawn from within your callback). - - X-Plane will automatically manage the memory for your texture so that it - only has to be loaded from disk once as long as you continue drawing it - per-frame. (When you stop drawing it, the memory may purged in a "garbage - collection" pass, require a load from disk in the future.) - - Instead of having X-Plane draw a full PNG, this method allows you to use UV - coordinates to request a portion of the image to be drawn. This allows you - to use a single texture load (of an icon sheet, for example) to draw many - icons. Doing so is much more efficient than drawing a dozen different small - PNGs. - - The UV coordinates used here treat the texture you load as being comprised - of a number of identically sized "cells." You specify the width and height - in cells (ds and dt, respectively), as well as the coordinates within the - cell grid for the sub-image you'd like to draw. - - Note that you can use different ds and dt values in subsequent calls with - the same texture sheet. This enables you to use icons of different sizes in - the same sheet if you arrange them properly in the PNG. - - This function is only valid from within an XPLMIconDrawingCallback_t (but - you can request an arbitrary number of icons to be drawn from within your - callback). + Enables plugin-created map layers to draw PNG icons using X-Plane's + built-in icon drawing functionality. Only valid from within an + XPLMIconDrawingCallback_t (but you can request an arbitrary number of icons + to be drawn from within your callback). + + X-Plane will automatically manage the memory for your texture so that it + only has to be loaded from disk once as long as you continue drawing it + per-frame. (When you stop drawing it, the memory may purged in a "garbage + collection" pass, require a load from disk in the future.) + + Instead of having X-Plane draw a full PNG, this method allows you to use UV + coordinates to request a portion of the image to be drawn. This allows you + to use a single texture load (of an icon sheet, for example) to draw many + icons. Doing so is much more efficient than drawing a dozen different small + PNGs. + + The UV coordinates used here treat the texture you load as being comprised + of a number of identically sized "cells." You specify the width and height + in cells (ds and dt, respectively), as well as the coordinates within the + cell grid for the sub-image you'd like to draw. + + Note that you can use different ds and dt values in subsequent calls with + the same texture sheet. This enables you to use icons of different sizes in + the same sheet if you arrange them properly in the PNG. + + This function is only valid from within an XPLMIconDrawingCallback_t (but + you can request an arbitrary number of icons to be drawn from within your + callback). } PROCEDURE XPLMDrawMapIconFromSheet( layer : XPLMMapLayerID; - inPngPath : Pchar; - s : integer; - t : integer; - ds : integer; - dt : integer; - mapX : single; - mapY : single; + inPngPath : XPLMString; + s : Integer; + t : Integer; + ds : Integer; + dt : Integer; + mapX : Single; + mapY : Single; orientation : XPLMMapOrientation; - rotationDegrees : single; - mapWidth : single); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + rotationDegrees : Single; + mapWidth : Single); + cdecl; external XPLM_DLL; { XPLMDrawMapLabel - Enables plugin-created map layers to draw text labels using X-Plane's - built-in labeling functionality. Only valid from within an - XPLMMapLabelDrawingCallback_f (but you can request an arbitrary number of - text labels to be drawn from within your callback). + Enables plugin-created map layers to draw text labels using X-Plane's + built-in labeling functionality. Only valid from within an + XPLMMapLabelDrawingCallback_f (but you can request an arbitrary number of + text labels to be drawn from within your callback). } PROCEDURE XPLMDrawMapLabel( layer : XPLMMapLayerID; - inText : Pchar; - mapX : single; - mapY : single; + inText : XPLMString; + mapX : Single; + mapY : Single; orientation : XPLMMapOrientation; - rotationDegrees : single); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{$ENDIF} + rotationDegrees : Single); + cdecl; external XPLM_DLL; + +{$ENDIF XPLM300} {$IFDEF XPLM300} {___________________________________________________________________________ * MAP PROJECTIONS ___________________________________________________________________________} { - As of X-Plane 11, the map draws using true cartographic projections, and - different maps may use different projections. Thus, to draw at a particular - latitude and longitude, you must first transform your real-world - coordinates into map coordinates. + As of X-Plane 11, the map draws using true cartographic projections, and + different maps may use different projections. Thus, to draw at a particular + latitude and longitude, you must first transform your real-world + coordinates into map coordinates. - The map projection is also responsible for giving you the current scale of - the map. That is, the projection can tell you how many map units correspond - to 1 meter at a given point. + The map projection is also responsible for giving you the current scale of + the map. That is, the projection can tell you how many map units correspond + to 1 meter at a given point. - Finally, the map projection can give you the current rotation of the map. - Since X-Plane 11 maps can rotate to match the heading of the aircraft, the - map's rotation can potentially change every frame. + Finally, the map projection can give you the current rotation of the map. + Since X-Plane 11 maps can rotate to match the heading of the aircraft, the + map's rotation can potentially change every frame. } { XPLMMapProject - Projects a latitude/longitude into map coordinates. This is the inverse of - XPLMMapUnproject(). + Projects a latitude/longitude into map coordinates. This is the inverse of + XPLMMapUnproject(). - Only valid from within a map layer callback (one of - XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, - XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) + Only valid from within a map layer callback (one of + XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, + XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) } PROCEDURE XPLMMapProject( projection : XPLMMapProjectionID; - latitude : real; - longitude : real; - outX : Psingle; - outY : Psingle); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + latitude : Real; + longitude : Real; + outX : PSingle; + outY : PSingle); + cdecl; external XPLM_DLL; { XPLMMapUnproject - Transforms map coordinates back into a latitude and longitude. This is the - inverse of XPLMMapProject(). + Transforms map coordinates back into a latitude and longitude. This is the + inverse of XPLMMapProject(). - Only valid from within a map layer callback (one of - XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, - XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) + Only valid from within a map layer callback (one of + XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, + XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) } PROCEDURE XPLMMapUnproject( projection : XPLMMapProjectionID; - mapX : single; - mapY : single; - outLatitude : Preal; - outLongitude : Preal); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + mapX : Single; + mapY : Single; + outLatitude : PReal; + outLongitude : PReal); + cdecl; external XPLM_DLL; { XPLMMapScaleMeter - Returns the number of map units that correspond to a distance of one meter - at a given set of map coordinates. + Returns the number of map units that correspond to a distance of one meter + at a given set of map coordinates. - Only valid from within a map layer callback (one of - XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, - XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) + Only valid from within a map layer callback (one of + XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, + XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) } FUNCTION XPLMMapScaleMeter( projection : XPLMMapProjectionID; - mapX : single; - mapY : single) : single; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + mapX : Single; + mapY : Single) : Single; + cdecl; external XPLM_DLL; { XPLMMapGetNorthHeading - Returns the heading (in degrees clockwise from "up") that corresponds to - north at a given point on the map. In other words, if your runway has a - true heading of 360, you would use "north" as the Cartesian angle at which - to draw the runway on the map. (You would add the result of - XPLMMapGetNorthHeading() to your true heading to get the map angle.) + Returns the heading (in degrees clockwise from "up") that corresponds to + north at a given point on the map. In other words, if your runway has a + true heading of 360, you would use "north" as the Cartesian angle at which + to draw the runway on the map. (You would add the result of + XPLMMapGetNorthHeading() to your true heading to get the map angle.) - This is necessary becuase X-Plane's map can be rotated to match your - aircraft's orientation; north is not always "up." + This is necessary becuase X-Plane's map can be rotated to match your + aircraft's orientation; north is not always "up." - Only valid from within a map layer callback (one of - XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, - XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) + Only valid from within a map layer callback (one of + XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, + XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.) } FUNCTION XPLMMapGetNorthHeading( projection : XPLMMapProjectionID; - mapX : single; - mapY : single) : single; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{$ENDIF} + mapX : Single; + mapY : Single) : Single; + cdecl; external XPLM_DLL; + +{$ENDIF XPLM300} + IMPLEMENTATION + END. diff --git a/src/SDK/Delphi/XPLM/XPLMMenus.pas b/src/SDK/Delphi/XPLM/XPLMMenus.pas index 98db8101..754a4347 100755 --- a/src/SDK/Delphi/XPLM/XPLMMenus.pas +++ b/src/SDK/Delphi/XPLM/XPLMMenus.pas @@ -1,68 +1,62 @@ { - 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 XPLMMenus; INTERFACE { - Theory of Operation + Plug-ins can create menus in the menu bar of X-Plane. This is done by + creating a menu and then creating items. Menus are referred to by an + opaque ID. Items are referred to by (zero-based) index number. - Plug-ins can create menus in the menu bar of X-Plane. This is done by - creating a menu and then creating items. Menus are referred to by an - opaque ID. Items are referred to by (zero-based) index number. + Menus are "sandboxed" between plugins---no plugin can access the menus of + any other plugin. Furthermore, all menu indices are relative to your + plugin's menus only; if your plugin creates two sub-menus in the Plugins + menu at different times, it doesn't matter how many other plugins also + create sub-menus of Plugins in the intervening time: your sub-menus will be + given menu indices 0 and 1. (The SDK does some work in the back-end to + filter out menus that are irrelevant to your plugin in order to deliver + this consistency for each plugin.) - Menus are "sandboxed" between plugins---no plugin can access the menus of - any other plugin. Furthermore, all menu indices are relative to your - plugin's menus only; if your plugin creates two sub-menus in the Plugins - menu at different times, it doesn't matter how many other plugins also - create sub-menus of Plugins in the intervening time: your sub-menus will be - given menu indices 0 and 1. (The SDK does some work in the back-end to - filter out menus that are irrelevant to your plugin in order to deliver - this consistency for each plugin.) + When you create a menu item, you specify how we should handle clicks on + that menu item. You can either have the XPLM trigger a callback (the + XPLMMenuHandler_f associated with the menu that contains the item), or you + can simply have a command be triggered (with no associated call to your + menu handler). The advantage of the latter method is that X-Plane will + display any keyboard shortcuts associated with the command. (In contrast, + there are no keyboard shortcuts associated with menu handler callbacks with + specific parameters.) - When you create a menu item, you specify how we should handle clicks on - that menu item. You can either have the XPLM trigger a callback (the - XPLMMenuHandler_f associated with the menu that contains the item), or you - can simply have a command be triggered (with no associated call to your - menu handler). The advantage of the latter method is that X-Plane will - display any keyboard shortcuts associated with the command. (In contrast, - there are no keyboard shortcuts associated with menu handler callbacks with - specific parameters.) + Menu text in X-Plane is UTF8; X-Plane's character set covers latin, greek + and cyrillic characters, Katakana, as well as some Japanese symbols. Some + APIs have a inDeprecatedAndIgnored parameter that used to select a + character set; since X-Plane 9 all localization is done via UTF-8 only. } -USES XPLMDefs; -USES XPLMUtilities; +USES + XPLMDefs, XPLMUtilities; {$A4} -{$IFDEF MSWINDOWS} - {$DEFINE DELPHI} -{$ENDIF} {___________________________________________________________________________ * XPLM MENUS ___________________________________________________________________________} -{ - -} { XPLMMenuCheck - These enumerations define the various 'check' states for an X-Plane menu. - 'checking' in X-Plane actually appears as a light which may or may not be - lit. So there are three possible states. + These enumerations define the various 'check' states for an X-Plane menu. + 'checking' in X-Plane actually appears as a light which may or may not be + lit. So there are three possible states. } TYPE XPLMMenuCheck = ( - { there is no symbol to the left of the menu item. } + { there is no symbol to the left of the menu item. } xplm_Menu_NoCheck = 0 - { the menu has a mark next to it that is unmarked (not lit). } + { the menu has a mark next to it that is unmarked (not lit). } ,xplm_Menu_Unchecked = 1 - { the menu has a mark next to it that is checked (lit). } + { the menu has a mark next to it that is checked (lit). } ,xplm_Menu_Checked = 2 ); @@ -71,7 +65,7 @@ { XPLMMenuID - This is a unique ID for each menu you create. + This is a unique ID for each menu you create. } XPLMMenuID = pointer; PXPLMMenuID = ^XPLMMenuID; @@ -79,9 +73,9 @@ { XPLMMenuHandler_f - A menu handler function takes two reference pointers, one for the menu - (specified when the menu was created) and one for the item (specified when - the item was created). + A menu handler function takes two reference pointers, one for the menu + (specified when the menu was created) and one for the item (specified when + the item was created). } XPLMMenuHandler_f = PROCEDURE( inMenuRef : pointer; @@ -90,244 +84,194 @@ { XPLMFindPluginsMenu - This function returns the ID of the plug-ins menu, which is created for you - at startup. + This function returns the ID of the plug-ins menu, which is created for you + at startup. } FUNCTION XPLMFindPluginsMenu: XPLMMenuID; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; {$IFDEF XPLM300} { XPLMFindAircraftMenu - This function returns the ID of the menu for the currently-loaded aircraft, - used for showing aircraft-specific commands. + This function returns the ID of the menu for the currently-loaded aircraft, + used for showing aircraft-specific commands. - The aircraft menu is created by X-Plane at startup, but it remains hidden - until it is populated via XPLMAppendMenuItem() or - XPLMAppendMenuItemWithCommand(). + The aircraft menu is created by X-Plane at startup, but it remains hidden + until it is populated via XPLMAppendMenuItem() or + XPLMAppendMenuItemWithCommand(). - Only plugins loaded with the user's current aircraft are allowed to access - the aircraft menu. For all other plugins, this will return NULL, and any - attempts to add menu items to it will fail. + Only plugins loaded with the user's current aircraft are allowed to access + the aircraft menu. For all other plugins, this will return NULL, and any + attempts to add menu items to it will fail. } FUNCTION XPLMFindAircraftMenu: XPLMMenuID; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} + cdecl; external XPLM_DLL; +{$ENDIF XPLM300} { XPLMCreateMenu - This function creates a new menu and returns its ID. It returns NULL if - the menu cannot be created. Pass in a parent menu ID and an item index to - create a submenu, or NULL for the parent menu to put the menu in the menu - bar. The menu's name is only used if the menu is in the menubar. You also - pass a handler function and a menu reference value. Pass NULL for the - handler if you do not need callbacks from the menu (for example, if it only - contains submenus). + This function creates a new menu and returns its ID. It returns NULL if + the menu cannot be created. Pass in a parent menu ID and an item index to + create a submenu, or NULL for the parent menu to put the menu in the menu + bar. The menu's name is only used if the menu is in the menubar. You also + pass a handler function and a menu reference value. Pass NULL for the + handler if you do not need callbacks from the menu (for example, if it only + contains submenus). - Important: you must pass a valid, non-empty menu title even if the menu is - a submenu where the title is not visible. + Important: you must pass a valid, non-empty menu title even if the menu is + a submenu where the title is not visible. } FUNCTION XPLMCreateMenu( - inName : Pchar; + inName : XPLMString; inParentMenu : XPLMMenuID; - inParentItem : integer; + inParentItem : Integer; inHandler : XPLMMenuHandler_f; inMenuRef : pointer) : XPLMMenuID; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMDestroyMenu - This function destroys a menu that you have created. Use this to remove a - submenu if necessary. (Normally this function will not be necessary.) + This function destroys a menu that you have created. Use this to remove a + submenu if necessary. (Normally this function will not be necessary.) } PROCEDURE XPLMDestroyMenu( inMenuID : XPLMMenuID); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMClearAllMenuItems - This function removes all menu items from a menu, allowing you to rebuild - it. Use this function if you need to change the number of items on a menu. + This function removes all menu items from a menu, allowing you to rebuild + it. Use this function if you need to change the number of items on a menu. } PROCEDURE XPLMClearAllMenuItems( inMenuID : XPLMMenuID); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMAppendMenuItem - This routine appends a new menu item to the bottom of a menu and returns - its index. Pass in the menu to add the item to, the items name, and a void - * ref for this item. + This routine appends a new menu item to the bottom of a menu and returns + its index. Pass in the menu to add the item to, the items name, and a void + * ref for this item. - Returns a negative index if the append failed (due to an invalid parent - menu argument). + Returns a negative index if the append failed (due to an invalid parent + menu argument). - Note that all menu indices returned are relative to your plugin's menus - only; if your plugin creates two sub-menus in the Plugins menu at different - times, it doesn't matter how many other plugins also create sub-menus of - Plugins in the intervening time: your sub-menus will be given menu indices - 0 and 1. (The SDK does some work in the back-end to filter out menus that - are irrelevant to your plugin in order to deliver this consistency for each - plugin.) + Note that all menu indices returned are relative to your plugin's menus + only; if your plugin creates two sub-menus in the Plugins menu at different + times, it doesn't matter how many other plugins also create sub-menus of + Plugins in the intervening time: your sub-menus will be given menu indices + 0 and 1. (The SDK does some work in the back-end to filter out menus that + are irrelevant to your plugin in order to deliver this consistency for each + plugin.) } FUNCTION XPLMAppendMenuItem( inMenu : XPLMMenuID; - inItemName : Pchar; + inItemName : XPLMString; inItemRef : pointer; - inDeprecatedAndIgnored: integer) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inDeprecatedAndIgnored: Integer) : Integer; + cdecl; external XPLM_DLL; {$IFDEF XPLM300} { XPLMAppendMenuItemWithCommand - Like XPLMAppendMenuItem(), but instead of the new menu item triggering the - XPLMMenuHandler_f of the containiner menu, it will simply execute the - command you pass in. Using a command for your menu item allows the user to - bind a keyboard shortcut to the command and see that shortcut represented - in the menu. + Like XPLMAppendMenuItem(), but instead of the new menu item triggering the + XPLMMenuHandler_f of the containiner menu, it will simply execute the + command you pass in. Using a command for your menu item allows the user to + bind a keyboard shortcut to the command and see that shortcut represented + in the menu. - Returns a negative index if the append failed (due to an invalid parent - menu argument). + Returns a negative index if the append failed (due to an invalid parent + menu argument). - Like XPLMAppendMenuItem(), all menu indices are relative to your plugin's - menus only. + Like XPLMAppendMenuItem(), all menu indices are relative to your plugin's + menus only. } FUNCTION XPLMAppendMenuItemWithCommand( inMenu : XPLMMenuID; - inItemName : Pchar; - inCommandToExecute : XPLMCommandRef) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} + inItemName : XPLMString; + inCommandToExecute : XPLMCommandRef) : Integer; + cdecl; external XPLM_DLL; +{$ENDIF XPLM300} { XPLMAppendMenuSeparator - This routine adds a separator to the end of a menu. + This routine adds a separator to the end of a menu. - Returns a negative index if the append failed (due to an invalid parent - menu argument). + Returns a negative index if the append failed (due to an invalid parent + menu argument). } PROCEDURE XPLMAppendMenuSeparator( inMenu : XPLMMenuID); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMSetMenuItemName - This routine changes the name of an existing menu item. Pass in the menu - ID and the index of the menu item. + This routine changes the name of an existing menu item. Pass in the menu + ID and the index of the menu item. } PROCEDURE XPLMSetMenuItemName( inMenu : XPLMMenuID; - inIndex : integer; - inItemName : Pchar; - inForceEnglish : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inIndex : Integer; + inItemName : XPLMString; + inDeprecatedAndIgnored: Integer); + cdecl; external XPLM_DLL; { XPLMCheckMenuItem - Set whether a menu item is checked. Pass in the menu ID and item index. + Set whether a menu item is checked. Pass in the menu ID and item index. } PROCEDURE XPLMCheckMenuItem( inMenu : XPLMMenuID; - index : integer; + index : Integer; inCheck : XPLMMenuCheck); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMCheckMenuItemState - This routine returns whether a menu item is checked or not. A menu item's - check mark may be on or off, or a menu may not have an icon at all. + This routine returns whether a menu item is checked or not. A menu item's + check mark may be on or off, or a menu may not have an icon at all. } PROCEDURE XPLMCheckMenuItemState( inMenu : XPLMMenuID; - index : integer; + index : Integer; outCheck : PXPLMMenuCheck); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMEnableMenuItem - Sets whether this menu item is enabled. Items start out enabled. + Sets whether this menu item is enabled. Items start out enabled. } PROCEDURE XPLMEnableMenuItem( inMenu : XPLMMenuID; - index : integer; - enabled : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + index : Integer; + enabled : Integer); + cdecl; external XPLM_DLL; {$IFDEF XPLM210} { XPLMRemoveMenuItem - Removes one item from a menu. Note that all menu items below are moved up - one; your plugin must track the change in index numbers. + Removes one item from a menu. Note that all menu items below are moved up + one; your plugin must track the change in index numbers. } PROCEDURE XPLMRemoveMenuItem( inMenu : XPLMMenuID; - inIndex : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} + inIndex : Integer); + cdecl; external XPLM_DLL; +{$ENDIF XPLM210} + IMPLEMENTATION + END. diff --git a/src/SDK/Delphi/XPLM/XPLMNavigation.pas b/src/SDK/Delphi/XPLM/XPLMNavigation.pas index 10b046f9..044b99b5 100755 --- a/src/SDK/Delphi/XPLM/XPLMNavigation.pas +++ b/src/SDK/Delphi/XPLM/XPLMNavigation.pas @@ -1,49 +1,39 @@ { - 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 XPLMNavigation; INTERFACE { - XPLMNavigation - THEORY OF OPERATION - - The XPLM Navigation APIs give you some access to the navigation databases - inside X-Plane. X-Plane stores all navigation information in RAM, so by - using these APIs you can gain access to most information without having to - go to disk or parse the files yourself. + The XPLM Navigation APIs give you some access to the navigation databases + inside X-Plane. X-Plane stores all navigation information in RAM, so by + using these APIs you can gain access to most information without having to + go to disk or parse the files yourself. - You can also use this API to program the FMS. You must use the navigation - APIs to find the nav-aids you want to program into the FMS, since the FMS - is powered internally by X-Plane's navigation database. + You can also use this API to program the FMS. You must use the navigation + APIs to find the nav-aids you want to program into the FMS, since the FMS + is powered internally by X-Plane's navigation database. } -USES XPLMDefs; +USES + XPLMDefs; {$A4} -{$IFDEF MSWINDOWS} - {$DEFINE DELPHI} -{$ENDIF} {___________________________________________________________________________ * NAVIGATION DATABASE ACCESS ___________________________________________________________________________} -{ - -} { XPLMNavType - These enumerations define the different types of navaids. They are each - defined with a separate bit so that they may be bit-wise added together to - form sets of nav-aid types. + These enumerations define the different types of navaids. They are each + defined with a separate bit so that they may be bit-wise added together to + form sets of nav-aid types. - NOTE: xplm_Nav_LatLon is a specific lat-lon coordinate entered into the - FMS. It will not exist in the database, and cannot be programmed into the - FMS. Querying the FMS for navaids will return it. Use - XPLMSetFMSEntryLatLon to set a lat/lon waypoint. + NOTE: xplm_Nav_LatLon is a specific lat-lon coordinate entered into the + FMS. It will not exist in the database, and cannot be programmed into the + FMS. Querying the FMS for navaids will return it. Use + XPLMSetFMSEntryLatLon to set a lat/lon waypoint. } TYPE XPLMNavType = ( @@ -79,17 +69,17 @@ { XPLMNavRef - XPLMNavRef is an iterator into the navigation database. The navigation - database is essentially an array, but it is not necessarily densely - populated. The only assumption you can safely make is that like-typed - nav-aids are grouped together. + XPLMNavRef is an iterator into the navigation database. The navigation + database is essentially an array, but it is not necessarily densely + populated. The only assumption you can safely make is that like-typed + nav-aids are grouped together. - Use XPLMNavRef to refer to a nav-aid. + Use XPLMNavRef to refer to a nav-aid. - XPLM_NAV_NOT_FOUND is returned by functions that return an XPLMNavRef when - the iterator must be invalid. + XPLM_NAV_NOT_FOUND is returned by functions that return an XPLMNavRef when + the iterator must be invalid. } - XPLMNavRef = integer; + XPLMNavRef = Integer; PXPLMNavRef = ^XPLMNavRef; CONST @@ -98,332 +88,263 @@ { XPLMGetFirstNavAid - This returns the very first navaid in the database. Use this to traverse - the entire database. Returns XPLM_NAV_NOT_FOUND if the nav database is - empty. + This returns the very first navaid in the database. Use this to traverse + the entire database. Returns XPLM_NAV_NOT_FOUND if the nav database is + empty. } FUNCTION XPLMGetFirstNavAid: XPLMNavRef; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMGetNextNavAid - Given a nav aid ref, this routine returns the next navaid. It returns - XPLM_NAV_NOT_FOUND if the nav aid passed in was invalid or if the navaid - passed in was the last one in the database. Use this routine to iterate - across all like-typed navaids or the entire database. - - WARNING: due to a bug in the SDK, when fix loading is disabled in the - rendering settings screen, calling this routine with the last airport - returns a bogus nav aid. Using this nav aid can crash X-Plane. + Given a valid nav aid ref, this routine returns the next navaid. It + returns XPLM_NAV_NOT_FOUND if the nav aid passed in was invalid or if the + navaid passed in was the last one in the database. Use this routine to + iterate across all like-typed navaids or the entire database. } FUNCTION XPLMGetNextNavAid( inNavAidRef : XPLMNavRef) : XPLMNavRef; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMFindFirstNavAidOfType - This routine returns the ref of the first navaid of the given type in the - database or XPLM_NAV_NOT_FOUND if there are no navaids of that type in the - database. You must pass exactly one nav aid type to this routine. - - WARNING: due to a bug in the SDK, when fix loading is disabled in the - rendering settings screen, calling this routine with fixes returns a bogus - nav aid. Using this nav aid can crash X-Plane. + This routine returns the ref of the first navaid of the given type in the + database or XPLM_NAV_NOT_FOUND if there are no navaids of that type in the + database. You must pass exactly one nav aid type to this routine. } FUNCTION XPLMFindFirstNavAidOfType( inType : XPLMNavType) : XPLMNavRef; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMFindLastNavAidOfType - This routine returns the ref of the last navaid of the given type in the - database or XPLM_NAV_NOT_FOUND if there are no navaids of that type in the - database. You must pass exactly one nav aid type to this routine. - - WARNING: due to a bug in the SDK, when fix loading is disabled in the - rendering settings screen, calling this routine with fixes returns a bogus - nav aid. Using this nav aid can crash X-Plane. + This routine returns the ref of the last navaid of the given type in the + database or XPLM_NAV_NOT_FOUND if there are no navaids of that type in the + database. You must pass exactly one nav aid type to this routine. } FUNCTION XPLMFindLastNavAidOfType( inType : XPLMNavType) : XPLMNavRef; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMFindNavAid - This routine provides a number of searching capabilities for the nav - database. XPLMFindNavAid will search through every nav aid whose type is - within inType (multiple types may be added together) and return any - nav-aids found based on the following rules: - - If inLat and inLon are not NULL, the navaid nearest to that lat/lon will be - returned, otherwise the last navaid found will be returned. + This routine provides a number of searching capabilities for the nav + database. XPLMFindNavAid will search through every nav aid whose type is + within inType (multiple types may be added together) and return any + nav-aids found based on the following rules: - If inFrequency is not NULL, then any navaids considered must match this - frequency. Note that this will screen out radio beacons that do not have - frequency data published (like inner markers) but not fixes and airports. + * If inLat and inLon are not NULL, the navaid nearest to that lat/lon will + be returned, otherwise the last navaid found will be returned. - If inNameFragment is not NULL, only navaids that contain the fragment in - their name will be returned. + * If inFrequency is not NULL, then any navaids considered must match this + frequency. Note that this will screen out radio beacons that do not have + frequency data published (like inner markers) but not fixes and airports. - If inIDFragment is not NULL, only navaids that contain the fragment in - their IDs will be returned. + * If inNameFragment is not NULL, only navaids that contain the fragment in + their name will be returned. - This routine provides a simple way to do a number of useful searches: + * If inIDFragment is not NULL, only navaids that contain the fragment in + their IDs will be returned. - Find the nearest navaid on this frequency. Find the nearest airport. Find - the VOR whose ID is "KBOS". Find the nearest airport whose name contains - "Chicago". + This routine provides a simple way to do a number of useful searches: + * Find the nearest navaid on this frequency. + * Find the nearest airport. + * Find the VOR whose ID is "KBOS". + * Find the nearest airport whose name contains "Chicago". } FUNCTION XPLMFindNavAid( - inNameFragment : Pchar; { Can be nil } - inIDFragment : Pchar; { Can be nil } - inLat : Psingle; { Can be nil } - inLon : Psingle; { Can be nil } - inFrequency : Pinteger; { Can be nil } + inNameFragment : XPLMString; { Can be nil } + inIDFragment : XPLMString; { Can be nil } + inLat : PSingle; { Can be nil } + inLon : PSingle; { Can be nil } + inFrequency : PInteger; { Can be nil } inType : XPLMNavType) : XPLMNavRef; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMGetNavAidInfo - This routine returns information about a navaid. Any non-null field is - filled out with information if it is available. + This routine returns information about a navaid. Any non-null field is + filled out with information if it is available. - Frequencies are in the nav.dat convention as described in the X-Plane nav - database FAQ: NDB frequencies are exact, all others are multiplied by 100. + Frequencies are in the nav.dat convention as described in the X-Plane nav + database FAQ: NDB frequencies are exact, all others are multiplied by 100. - The buffer for IDs should be at least 6 chars and the buffer for names - should be at least 41 chars, but since these values are likely to go up, I - recommend passing at least 32 chars for IDs and 256 chars for names when - possible. + The buffer for IDs should be at least 6 chars and the buffer for names + should be at least 41 chars, but since these values are likely to go up, I + recommend passing at least 32 chars for IDs and 256 chars for names when + possible. - The outReg parameter tells if the navaid is within the local "region" of - loaded DSFs. (This information may not be particularly useful to plugins.) - The parameter is a single byte value 1 for true or 0 for false, not a C - string. + The outReg parameter tells if the navaid is within the local "region" of + loaded DSFs. (This information may not be particularly useful to plugins.) + The parameter is a single byte value 1 for true or 0 for false, not a C + string. } PROCEDURE XPLMGetNavAidInfo( inRef : XPLMNavRef; outType : PXPLMNavType; { Can be nil } - outLatitude : Psingle; { Can be nil } - outLongitude : Psingle; { Can be nil } - outHeight : Psingle; { Can be nil } - outFrequency : Pinteger; { Can be nil } - outHeading : Psingle; { Can be nil } - outID : Pchar; { Can be nil } - outName : Pchar; { Can be nil } - outReg : Pchar); { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + outLatitude : PSingle; { Can be nil } + outLongitude : PSingle; { Can be nil } + outHeight : PSingle; { Can be nil } + outFrequency : PInteger; { Can be nil } + outHeading : PSingle; { Can be nil } + outID : XPLMString; { Can be nil } + outName : XPLMString; { Can be nil } + outReg : XPLMString); { Can be nil } + cdecl; external XPLM_DLL; {___________________________________________________________________________ * FLIGHT MANAGEMENT COMPUTER ___________________________________________________________________________} { - Note: the FMS works based on an array of entries. Indices into the array - are zero-based. Each entry is a nav-aid plus an altitude. The FMS tracks - the currently displayed entry and the entry that it is flying to. + Note: the FMS works based on an array of entries. Indices into the array + are zero-based. Each entry is a nav-aid plus an altitude. The FMS tracks + the currently displayed entry and the entry that it is flying to. - The FMS must be programmed with contiguous entries, so clearing an entry at - the end shortens the effective flight plan. There is a max of 100 - waypoints in the flight plan. + The FMS must be programmed with contiguous entries, so clearing an entry at + the end shortens the effective flight plan. There is a max of 100 + waypoints in the flight plan. } { XPLMCountFMSEntries - This routine returns the number of entries in the FMS. + This routine returns the number of entries in the FMS. } - FUNCTION XPLMCountFMSEntries: integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + FUNCTION XPLMCountFMSEntries: Integer; + cdecl; external XPLM_DLL; { XPLMGetDisplayedFMSEntry - This routine returns the index of the entry the pilot is viewing. + This routine returns the index of the entry the pilot is viewing. } - FUNCTION XPLMGetDisplayedFMSEntry: integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + FUNCTION XPLMGetDisplayedFMSEntry: Integer; + cdecl; external XPLM_DLL; { XPLMGetDestinationFMSEntry - This routine returns the index of the entry the FMS is flying to. + This routine returns the index of the entry the FMS is flying to. } - FUNCTION XPLMGetDestinationFMSEntry: integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + FUNCTION XPLMGetDestinationFMSEntry: Integer; + cdecl; external XPLM_DLL; { XPLMSetDisplayedFMSEntry - This routine changes which entry the FMS is showing to the index specified. - } + This routine changes which entry the FMS is showing to the index specified. + } PROCEDURE XPLMSetDisplayedFMSEntry( - inIndex : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inIndex : Integer); + cdecl; external XPLM_DLL; { XPLMSetDestinationFMSEntry - This routine changes which entry the FMS is flying the aircraft toward. + This routine changes which entry the FMS is flying the aircraft toward. } PROCEDURE XPLMSetDestinationFMSEntry( - inIndex : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inIndex : Integer); + cdecl; external XPLM_DLL; { XPLMGetFMSEntryInfo - This routine returns information about a given FMS entry. A reference to a - navaid can be returned allowing you to find additional information (such as - a frequency, ILS heading, name, etc.). Some information is available - immediately. For a lat/lon entry, the lat/lon is returned by this routine - but the navaid cannot be looked up (and the reference will be - XPLM_NAV_NOT_FOUND. FMS name entry buffers should be at least 256 chars in - length. + This routine returns information about a given FMS entry. If the entry is + an airport or navaid, a reference to a nav entry can be returned allowing + you to find additional information (such as a frequency, ILS heading, name, + etc.). Note that this reference can be XPLM_NAV_NOT_FOUND until the + information has been looked up asynchronously, so after flightplan changes, + it might take up to a second for this field to become populated. The other + information is available immediately. For a lat/lon entry, the lat/lon is + returned by this routine but the navaid cannot be looked up (and the + reference will be XPLM_NAV_NOT_FOUND). FMS name entry buffers should be at + least 256 chars in length. + + WARNING: Due to a bug in X-Plane prior to 11.31, the navaid reference will + not be set to XPLM_NAV_NOT_FOUND while no data is available, and instead + just remain the value of the variable that you passed the pointer to. + Therefore, always initialize the variable to XPLM_NAV_NOT_FOUND before + passing the pointer to this function. } PROCEDURE XPLMGetFMSEntryInfo( - inIndex : integer; + inIndex : Integer; outType : PXPLMNavType; { Can be nil } - outID : Pchar; { Can be nil } + outID : XPLMString; { Can be nil } outRef : PXPLMNavRef; { Can be nil } - outAltitude : Pinteger; { Can be nil } - outLat : Psingle; { Can be nil } - outLon : Psingle); { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + outAltitude : PInteger; { Can be nil } + outLat : PSingle; { Can be nil } + outLon : PSingle); { Can be nil } + cdecl; external XPLM_DLL; { XPLMSetFMSEntryInfo - This routine changes an entry in the FMS to have the destination navaid - passed in and the altitude specified. Use this only for airports, fixes, - and radio-beacon navaids. Currently of radio beacons, the FMS can only - support VORs and NDBs. Use the routines below to clear or fly to a lat/lon. + This routine changes an entry in the FMS to have the destination navaid + passed in and the altitude specified. Use this only for airports, fixes, + and radio-beacon navaids. Currently of radio beacons, the FMS can only + support VORs and NDBs. Use the routines below to clear or fly to a lat/lon. } PROCEDURE XPLMSetFMSEntryInfo( - inIndex : integer; + inIndex : Integer; inRef : XPLMNavRef; - inAltitude : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inAltitude : Integer); + cdecl; external XPLM_DLL; { XPLMSetFMSEntryLatLon - This routine changes the entry in the FMS to a lat/lon entry with the given - coordinates. + This routine changes the entry in the FMS to a lat/lon entry with the given + coordinates. } PROCEDURE XPLMSetFMSEntryLatLon( - inIndex : integer; - inLat : single; - inLon : single; - inAltitude : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inIndex : Integer; + inLat : Single; + inLon : Single; + inAltitude : Integer); + cdecl; external XPLM_DLL; { XPLMClearFMSEntry - This routine clears the given entry, potentially shortening the flight - plan. + This routine clears the given entry, potentially shortening the flight + plan. } PROCEDURE XPLMClearFMSEntry( - inIndex : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inIndex : Integer); + cdecl; external XPLM_DLL; {___________________________________________________________________________ * GPS RECEIVER ___________________________________________________________________________} { - These APIs let you read data from the GPS unit. + These APIs let you read data from the GPS unit. } { XPLMGetGPSDestinationType - This routine returns the type of the currently selected GPS destination, - one of fix, airport, VOR or NDB. + This routine returns the type of the currently selected GPS destination, + one of fix, airport, VOR or NDB. } FUNCTION XPLMGetGPSDestinationType: XPLMNavType; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMGetGPSDestination - This routine returns the current GPS destination. + This routine returns the current GPS destination. } FUNCTION XPLMGetGPSDestination: XPLMNavRef; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; + IMPLEMENTATION + END. diff --git a/src/SDK/Delphi/XPLM/XPLMPlanes.pas b/src/SDK/Delphi/XPLM/XPLMPlanes.pas index bac0ef7d..3801f0ac 100755 --- a/src/SDK/Delphi/XPLM/XPLMPlanes.pas +++ b/src/SDK/Delphi/XPLM/XPLMPlanes.pas @@ -1,183 +1,158 @@ { - 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 XPLMPlanes; INTERFACE { - The XPLMPlanes APIs allow you to control the various aircraft in X-Plane, - both the user's and the sim's. + The XPLMPlanes APIs allow you to control the various aircraft in X-Plane, + both the user's and the sim's. + + *Note*: unlike almost all other APIs in the SDK, aircraft paths are _full_ + file system paths for historical reasons. You'll need to prefix all + relative paths with the X-Plane path as accessed via XPLMGetSystemPath. } -USES XPLMDefs; +USES + XPLMDefs; {$A4} -{$IFDEF MSWINDOWS} - {$DEFINE DELPHI} -{$ENDIF} {___________________________________________________________________________ * USER AIRCRAFT ACCESS ___________________________________________________________________________} -{ - -} { XPLMSetUsersAircraft - This routine changes the user's aircraft. Note that this will reinitialize - the user to be on the nearest airport's first runway. Pass in a full path - (hard drive and everything including the .acf extension) to the .acf file. + This routine changes the user's aircraft. Note that this will reinitialize + the user to be on the nearest airport's first runway. Pass in a full path + (hard drive and everything including the .acf extension) to the .acf file. } PROCEDURE XPLMSetUsersAircraft( - inAircraftPath : Pchar); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inAircraftPath : XPLMString); + cdecl; external XPLM_DLL; { XPLMPlaceUserAtAirport - This routine places the user at a given airport. Specify the airport by - its ICAO code (e.g. 'KBOS'). + This routine places the user at a given airport. Specify the airport by + its X-Plane airport ID (e.g. 'KBOS'). } PROCEDURE XPLMPlaceUserAtAirport( - inAirportCode : Pchar); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inAirportCode : XPLMString); + cdecl; external XPLM_DLL; {$IFDEF XPLM300} { XPLMPlaceUserAtLocation - Places the user at a specific location after performing any necessary - scenery loads. + Places the user at a specific location after performing any necessary + scenery loads. - As with in-air starts initiated from the X-Plane user interface, the - aircraft will always start with its engines running, regardless of the - user's preferences (i.e., regardless of what the dataref - sim/operation/prefs/startup_running says). + As with in-air starts initiated from the X-Plane user interface, the + aircraft will always start with its engines running, regardless of the + user's preferences (i.e., regardless of what the dataref + `sim/operation/prefs/startup_running` says). } PROCEDURE XPLMPlaceUserAtLocation( - latitudeDegrees : real; - longitudeDegrees : real; - elevationMetersMSL : single; - headingDegreesTrue : single; - speedMetersPerSecond: single); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} + latitudeDegrees : Real; + longitudeDegrees : Real; + elevationMetersMSL : Single; + headingDegreesTrue : Single; + speedMetersPerSecond: Single); + cdecl; external XPLM_DLL; +{$ENDIF XPLM300} {___________________________________________________________________________ * GLOBAL AIRCRAFT ACCESS ___________________________________________________________________________} -{ - -} CONST - { The user's aircraft is always index 0. } + { The user's aircraft is always index 0. } XPLM_USER_AIRCRAFT = 0; +{$IFDEF XPLM_DEPRECATED} { XPLMPlaneDrawState_t - This structure contains additional plane parameter info to be passed to - draw plane. Make sure to fill in the size of the structure field with - sizeof(XPLMDrawPlaneState_t) so that the XPLM can tell how many fields you - knew about when compiling your plugin (since more fields may be added - later). + This structure contains additional plane parameter info to be passed to + draw plane. Make sure to fill in the size of the structure field with + sizeof(XPLMDrawPlaneState_t) so that the XPLM can tell how many fields you + knew about when compiling your plugin (since more fields may be added + later). - Most of these fields are ratios from 0 to 1 for control input. X-Plane - calculates what the actual controls look like based on the .acf file for - that airplane. Note for the yoke inputs, this is what the pilot of the - plane has commanded (post artificial stability system if there were one) - and affects aelerons, rudder, etc. It is not necessarily related to the - actual position of the plane! + Most of these fields are ratios from 0 to 1 for control input. X-Plane + calculates what the actual controls look like based on the .acf file for + that airplane. Note for the yoke inputs, this is what the pilot of the + plane has commanded (post artificial stability system if there were one) + and affects aelerons, rudder, etc. It is not necessarily related to the + actual position of the plane! } TYPE XPLMPlaneDrawState_t = RECORD - { The size of the draw state struct. } - structSize : integer; - { A ratio from [0..1] describing how far the landing gear is extended. } - gearPosition : single; - { Ratio of flap deployment, 0 = up, 1 = full deploy. } - flapRatio : single; - { Ratio of spoiler deployment, 0 = none, 1 = full deploy. } - spoilerRatio : single; - { Ratio of speed brake deployment, 0 = none, 1 = full deploy. } - speedBrakeRatio : single; - { Ratio of slat deployment, 0 = none, 1 = full deploy. } - slatRatio : single; - { Wing sweep ratio, 0 = forward, 1 = swept. } - wingSweep : single; - { Thrust power, 0 = none, 1 = full fwd, -1 = full reverse. } - thrust : single; - { Total pitch input for this plane. } - yokePitch : single; - { Total Heading input for this plane. } - yokeHeading : single; - { Total Roll input for this plane. } - yokeRoll : single; + { The size of the draw state struct. } + structSize : Integer; + { A ratio from [0..1] describing how far the landing gear is extended. } + gearPosition : Single; + { Ratio of flap deployment, 0 = up, 1 = full deploy. } + flapRatio : Single; + { Ratio of spoiler deployment, 0 = none, 1 = full deploy. } + spoilerRatio : Single; + { Ratio of speed brake deployment, 0 = none, 1 = full deploy. } + speedBrakeRatio : Single; + { Ratio of slat deployment, 0 = none, 1 = full deploy. } + slatRatio : Single; + { Wing sweep ratio, 0 = forward, 1 = swept. } + wingSweep : Single; + { Thrust power, 0 = none, 1 = full fwd, -1 = full reverse. } + thrust : Single; + { Total pitch input for this plane. } + yokePitch : Single; + { Total Heading input for this plane. } + yokeHeading : Single; + { Total Roll input for this plane. } + yokeRoll : Single; END; PXPLMPlaneDrawState_t = ^XPLMPlaneDrawState_t; +{$ENDIF XPLM_DEPRECATED} { XPLMCountAircraft - This function returns the number of aircraft X-Plane is capable of having, - as well as the number of aircraft that are currently active. These numbers - count the user's aircraft. It can also return the plugin that is currently - controlling aircraft. In X-Plane 7, this routine reflects the number of - aircraft the user has enabled in the rendering options window. + This function returns the number of aircraft X-Plane is capable of having, + as well as the number of aircraft that are currently active. These numbers + count the user's aircraft. It can also return the plugin that is currently + controlling aircraft. In X-Plane 7, this routine reflects the number of + aircraft the user has enabled in the rendering options window. } PROCEDURE XPLMCountAircraft( - outTotalAircraft : Pinteger; - outActiveAircraft : Pinteger; + outTotalAircraft : PInteger; + outActiveAircraft : PInteger; outController : PXPLMPluginID); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMGetNthAircraftModel - This function returns the aircraft model for the Nth aircraft. Indices are - zero based, with zero being the user's aircraft. The file name should be - at least 256 chars in length; the path should be at least 512 chars in - length. + This function returns the aircraft model for the Nth aircraft. Indices are + zero based, with zero being the user's aircraft. The file name should be + at least 256 chars in length; the path should be at least 512 chars in + length. } PROCEDURE XPLMGetNthAircraftModel( - inIndex : integer; - outFileName : Pchar; - outPath : Pchar); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inIndex : Integer; + outFileName : XPLMString; + outPath : XPLMString); + cdecl; external XPLM_DLL; {___________________________________________________________________________ * EXCLUSIVE AIRCRAFT ACCESS ___________________________________________________________________________} { - The following routines require exclusive access to the airplane APIs. Only - one plugin may have this access at a time. + The following routines require exclusive access to the airplane APIs. Only + one plugin may have this access at a time. } { XPLMPlanesAvailable_f - Your airplanes available callback is called when another plugin gives up - access to the multiplayer planes. Use this to wait for access to - multiplayer. + Your airplanes available callback is called when another plugin gives up + access to the multiplayer planes. Use this to wait for access to + multiplayer. } TYPE XPLMPlanesAvailable_f = PROCEDURE( @@ -186,130 +161,118 @@ { XPLMAcquirePlanes - XPLMAcquirePlanes grants your plugin exclusive access to the aircraft. It - returns 1 if you gain access, 0 if you do not. inAircraft - pass in an - array of pointers to strings specifying the planes you want loaded. For - any plane index you do not want loaded, pass a 0-length string. Other - strings should be full paths with the .acf extension. NULL terminates this - array, or pass NULL if there are no planes you want loaded. If you pass in - a callback and do not receive access to the planes your callback will be - called when the airplanes are available. If you do receive airplane access, - your callback will not be called. + XPLMAcquirePlanes grants your plugin exclusive access to the aircraft. It + returns 1 if you gain access, 0 if you do not. + + inAircraft - pass in an array of pointers to strings specifying the planes + you want loaded. For any plane index you do not want loaded, pass a + 0-length string. Other strings should be full paths with the .acf + extension. NULL terminates this array, or pass NULL if there are no planes + you want loaded. + + If you pass in a callback and do not receive access to the planes your + callback will be called when the airplanes are available. If you do receive + airplane access, your callback will not be called. } FUNCTION XPLMAcquirePlanes( - inAircraft : PPchar; { Can be nil } + inAircraft : PXPLMString; { Can be nil } inCallback : XPLMPlanesAvailable_f; - inRefcon : pointer) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inRefcon : pointer) : Integer; + cdecl; external XPLM_DLL; { XPLMReleasePlanes - Call this function to release access to the planes. Note that if you are - disabled, access to planes is released for you and you must reacquire it. + Call this function to release access to the planes. Note that if you are + disabled, access to planes is released for you and you must reacquire it. } PROCEDURE XPLMReleasePlanes; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMSetActiveAircraftCount - This routine sets the number of active planes. If you pass in a number - higher than the total number of planes availables, only the total number of - planes available is actually used. + This routine sets the number of active planes. If you pass in a number + higher than the total number of planes availables, only the total number of + planes available is actually used. } PROCEDURE XPLMSetActiveAircraftCount( - inCount : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inCount : Integer); + cdecl; external XPLM_DLL; { XPLMSetAircraftModel - This routine loads an aircraft model. It may only be called if you have - exclusive access to the airplane APIs. Pass in the path of the model with - the .acf extension. The index is zero based, but you may not pass in 0 - (use XPLMSetUsersAircraft to load the user's aircracft). + This routine loads an aircraft model. It may only be called if you have + exclusive access to the airplane APIs. Pass in the path of the model with + the .acf extension. The index is zero based, but you may not pass in 0 + (use XPLMSetUsersAircraft to load the user's aircracft). } PROCEDURE XPLMSetAircraftModel( - inIndex : integer; - inAircraftPath : Pchar); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inIndex : Integer; + inAircraftPath : XPLMString); + cdecl; external XPLM_DLL; { XPLMDisableAIForPlane - This routine turns off X-Plane's AI for a given plane. The plane will - continue to draw and be a real plane in X-Plane, but will not move itself. + This routine turns off X-Plane's AI for a given plane. The plane will + continue to draw and be a real plane in X-Plane, but will not move itself. } PROCEDURE XPLMDisableAIForPlane( - inPlaneIndex : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inPlaneIndex : Integer); + cdecl; external XPLM_DLL; +{$IFDEF XPLM_DEPRECATED} { XPLMDrawAircraft - This routine draws an aircraft. It can only be called from a 3-d drawing - callback. Pass in the position of the plane in OpenGL local coordinates - and the orientation of the plane. A 1 for full drawing indicates that the - whole plane must be drawn; a 0 indicates you only need the nav lights - drawn. (This saves rendering time when planes are far away.) + WARNING: Aircraft drawing via this API is deprecated and will not work in + future versions of X-Plane. Use XPLMInstance for 3-d drawing of custom + aircraft models. + + This routine draws an aircraft. It can only be called from a 3-d drawing + callback. Pass in the position of the plane in OpenGL local coordinates + and the orientation of the plane. A 1 for full drawing indicates that the + whole plane must be drawn; a 0 indicates you only need the nav lights + drawn. (This saves rendering time when planes are far away.) } PROCEDURE XPLMDrawAircraft( - inPlaneIndex : integer; - inX : single; - inY : single; - inZ : single; - inPitch : single; - inRoll : single; - inYaw : single; - inFullDraw : integer; + inPlaneIndex : Integer; + inX : Single; + inY : Single; + inZ : Single; + inPitch : Single; + inRoll : Single; + inYaw : Single; + inFullDraw : Integer; inDrawStateInfo : PXPLMPlaneDrawState_t); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; +{$ENDIF XPLM_DEPRECATED} +{$IFDEF XPLM_DEPRECATED} { XPLMReinitUsersPlane - This function recomputes the derived flight model data from the aircraft - structure in memory. If you have used the data access layer to modify the - aircraft structure, use this routine to resynchronize X-Plane; since - X-Plane works at least partly from derived values, the sim will not behave - properly until this is called. + WARNING: DO NOT USE. Use XPLMPlaceUserAtAirport or + XPLMPlaceUserAtLocation. - WARNING: this routine does not necessarily place the airplane at the - airport; use XPLMSetUsersAircraft to be compatible. This routine is - provided to do special experimentation with flight models without resetting - flight. + This function recomputes the derived flight model data from the aircraft + structure in memory. If you have used the data access layer to modify the + aircraft structure, use this routine to resynchronize X-Plane; since + X-Plane works at least partly from derived values, the sim will not behave + properly until this is called. + + WARNING: this routine does not necessarily place the airplane at the + airport; use XPLMSetUsersAircraft to be compatible. This routine is + provided to do special experimentation with flight models without resetting + flight. } PROCEDURE XPLMReinitUsersPlane; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; +{$ENDIF XPLM_DEPRECATED} + IMPLEMENTATION + END. diff --git a/src/SDK/Delphi/XPLM/XPLMPlugin.pas b/src/SDK/Delphi/XPLM/XPLMPlugin.pas index d61ca83e..83fbb736 100755 --- a/src/SDK/Delphi/XPLM/XPLMPlugin.pas +++ b/src/SDK/Delphi/XPLM/XPLMPlugin.pas @@ -1,390 +1,413 @@ { - 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 XPLMPlugin; INTERFACE { - These APIs provide facilities to find and work with other plugins and - manage other plugins. + These APIs provide facilities to find and work with other plugins and + manage other plugins. } -USES XPLMDefs; +USES + XPLMDefs; {$A4} -{$IFDEF MSWINDOWS} - {$DEFINE DELPHI} -{$ENDIF} {___________________________________________________________________________ * FINDING PLUGINS ___________________________________________________________________________} { - These APIs allow you to find another plugin or yourself, or iterate across - all plugins. For example, if you wrote an FMS plugin that needed to talk - to an autopilot plugin, you could use these APIs to locate the autopilot - plugin. + These APIs allow you to find another plugin or yourself, or iterate across + all plugins. For example, if you wrote an FMS plugin that needed to talk + to an autopilot plugin, you could use these APIs to locate the autopilot + plugin. } { XPLMGetMyID - This routine returns the plugin ID of the calling plug-in. Call this to - get your own ID. + This routine returns the plugin ID of the calling plug-in. Call this to + get your own ID. } FUNCTION XPLMGetMyID: XPLMPluginID; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMCountPlugins - This routine returns the total number of plug-ins that are loaded, both - disabled and enabled. + This routine returns the total number of plug-ins that are loaded, both + disabled and enabled. } - FUNCTION XPLMCountPlugins: integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + FUNCTION XPLMCountPlugins: Integer; + cdecl; external XPLM_DLL; { XPLMGetNthPlugin - This routine returns the ID of a plug-in by index. Index is 0 based from 0 - to XPLMCountPlugins-1, inclusive. Plugins may be returned in any arbitrary - order. + This routine returns the ID of a plug-in by index. Index is 0 based from 0 + to XPLMCountPlugins-1, inclusive. Plugins may be returned in any arbitrary + order. } FUNCTION XPLMGetNthPlugin( - inIndex : integer) : XPLMPluginID; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inIndex : Integer) : XPLMPluginID; + cdecl; external XPLM_DLL; { XPLMFindPluginByPath - This routine returns the plug-in ID of the plug-in whose file exists at the - passed in absolute file system path. XPLM_NO_PLUGIN_ID is returned if the - path does not point to a currently loaded plug-in. + This routine returns the plug-in ID of the plug-in whose file exists at the + passed in absolute file system path. XPLM_NO_PLUGIN_ID is returned if the + path does not point to a currently loaded plug-in. } FUNCTION XPLMFindPluginByPath( - inPath : Pchar) : XPLMPluginID; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inPath : XPLMString) : XPLMPluginID; + cdecl; external XPLM_DLL; { XPLMFindPluginBySignature - This routine returns the plug-in ID of the plug-in whose signature matches - what is passed in or XPLM_NO_PLUGIN_ID if no running plug-in has this - signature. Signatures are the best way to identify another plug-in as they - are independent of the file system path of a plug-in or the human-readable - plug-in name, and should be unique for all plug-ins. Use this routine to - locate another plugin that your plugin interoperates with + This routine returns the plug-in ID of the plug-in whose signature matches + what is passed in or XPLM_NO_PLUGIN_ID if no running plug-in has this + signature. Signatures are the best way to identify another plug-in as they + are independent of the file system path of a plug-in or the human-readable + plug-in name, and should be unique for all plug-ins. Use this routine to + locate another plugin that your plugin interoperates with } FUNCTION XPLMFindPluginBySignature( - inSignature : Pchar) : XPLMPluginID; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inSignature : XPLMString) : XPLMPluginID; + cdecl; external XPLM_DLL; { XPLMGetPluginInfo - This routine returns information about a plug-in. Each parameter should be - a pointer to a buffer of at least 256 characters, or NULL to not receive - the information. + This routine returns information about a plug-in. Each parameter should be + a pointer to a buffer of at least + 256 characters, or NULL to not receive the information. - outName - the human-readable name of the plug-in. outFilePath - the - absolute file path to the file that contains this plug-in. outSignature - a - unique string that identifies this plug-in. outDescription - a - human-readable description of this plug-in. + outName - the human-readable name of the plug-in. outFilePath - the + absolute file path to the file that contains this plug-in. outSignature - a + unique string that identifies this plug-in. outDescription - a + human-readable description of this plug-in. } PROCEDURE XPLMGetPluginInfo( inPlugin : XPLMPluginID; - outName : Pchar; { Can be nil } - outFilePath : Pchar; { Can be nil } - outSignature : Pchar; { Can be nil } - outDescription : Pchar); { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + outName : XPLMString; { Can be nil } + outFilePath : XPLMString; { Can be nil } + outSignature : XPLMString; { Can be nil } + outDescription : XPLMString); { Can be nil } + cdecl; external XPLM_DLL; {___________________________________________________________________________ * ENABLING/DISABLING PLUG-INS ___________________________________________________________________________} { - These routines are used to work with plug-ins and manage them. Most - plugins will not need to use these APIs. + These routines are used to work with plug-ins and manage them. Most + plugins will not need to use these APIs. } { XPLMIsPluginEnabled - Returns whether the specified plug-in is enabled for running. + Returns whether the specified plug-in is enabled for running. } FUNCTION XPLMIsPluginEnabled( - inPluginID : XPLMPluginID) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inPluginID : XPLMPluginID) : Integer; + cdecl; external XPLM_DLL; { XPLMEnablePlugin - This routine enables a plug-in if it is not already enabled. It returns 1 - if the plugin was enabled or successfully enables itself, 0 if it does not. - Plugins may fail to enable (for example, if resources cannot be acquired) - by returning 0 from their XPluginEnable callback. + This routine enables a plug-in if it is not already enabled. It returns 1 + if the plugin was enabled or successfully enables itself, 0 if it does not. + Plugins may fail to enable (for example, if resources cannot be acquired) + by returning 0 from their XPluginEnable callback. } FUNCTION XPLMEnablePlugin( - inPluginID : XPLMPluginID) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inPluginID : XPLMPluginID) : Integer; + cdecl; external XPLM_DLL; { XPLMDisablePlugin - This routine disableds an enabled plug-in. + This routine disableds an enabled plug-in. } PROCEDURE XPLMDisablePlugin( inPluginID : XPLMPluginID); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMReloadPlugins - This routine reloads all plug-ins. Once this routine is called and you - return from the callback you were within (e.g. a menu select callback) you - will receive your XPluginDisable and XPluginStop callbacks and your DLL - will be unloaded, then the start process happens as if the sim was starting - up. + This routine reloads all plug-ins. Once this routine is called and you + return from the callback you were within (e.g. a menu select callback) you + will receive your XPluginDisable and XPluginStop callbacks and your DLL + will be unloaded, then the start process happens as if the sim was starting + up. } PROCEDURE XPLMReloadPlugins; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; {___________________________________________________________________________ * INTERPLUGIN MESSAGING ___________________________________________________________________________} { - Plugin messages are defined as 32-bit integers. Messages below 0x00FFFFFF - are reserved for X-Plane and the plugin SDK. + Plugin messages are defined as 32-bit integers. Messages below 0x00FFFFFF + are reserved for X-Plane and the plugin SDK. + + Messages come with a pointer parameter; the meaning of this pointer depends + on the message itself. In some messages, the pointer parameter contains an + actual typed pointer to data that can be inspected in the plugin; in these + cases the documentation will state that the parameter "points to" + information. + + in other cases, the value of the pointer is actually an integral number + stuffed into the pointer's storage. In these second cases, the pointer + parameter needs to be cast, not dereferenced. In these caess, the + documentation will state that the parameter "contains" a value, which will + always be an integral type. - Messages have two conceptual uses: notifications and commands. Commands - are sent from one plugin to another to induce behavior; notifications are - sent from one plugin to all others for informational purposes. It is - important that commands and notifications not have the same values because - this could cause a notification sent by one plugin to accidentally induce a - command in another. + Some messages don't use the pointer parameter - in this case your plugin + should ignore it. - By convention, plugin-defined notifications should have the high bit set - (e.g. be greater or equal to unsigned 0x8000000) while commands should have - this bit be cleared. + Messages have two conceptual uses: notifications and commands. Commands + are sent from one plugin to another to induce behavior; notifications are + sent from one plugin to all others for informational purposes. It is + important that commands and notifications not have the same values because + this could cause a notification sent by one plugin to accidentally induce a + command in another. - The following messages are sent to your plugin by X-Plane. + By convention, plugin-defined notifications should have the high bit set + (e.g. be greater or equal to unsigned 0x8000000) while commands should have + this bit be cleared. + + The following messages are sent to your plugin by X-Plane. } CONST - { This message is sent to your plugin whenever the user's plane crashes. } + { This message is sent to your plugin whenever the user's plane crashes. The } + { parameter is ignored. } XPLM_MSG_PLANE_CRASHED = 101; - { This message is sent to your plugin whenever a new plane is loaded. The } - { parameter is the number of the plane being loaded; 0 indicates the user's } - { plane. } + { This message is sent to your plugin whenever a new plane is loaded. The } + { parameter contains the index number of the plane being loaded; 0 indicates } + { the user's plane. } XPLM_MSG_PLANE_LOADED = 102; - { This messages is called whenever the user's plane is positioned at a new } - { airport. } + { This messages is sent whenever the user's plane is positioned at a new } + { airport. The parameter is ignored. } XPLM_MSG_AIRPORT_LOADED = 103; - { This message is sent whenever new scenery is loaded. Use datarefs to } - { determine the new scenery files that were loaded. } + { This message is sent whenever new scenery is loaded. Use datarefs to } + { determine the new scenery files that were loaded. The parameter is ignored.} XPLM_MSG_SCENERY_LOADED = 104; - { This message is sent whenever the user adjusts the number of X-Plane } - { aircraft models. You must use XPLMCountPlanes to find out how many planes } - { are now available. This message will only be sent in XP7 and higher } - { because in XP6 the number of aircraft is not user-adjustable. } + { This message is sent whenever the user adjusts the number of X-Plane } + { aircraft models. You must use XPLMCountPlanes to find out how many planes } + { are now available. This message will only be sent in XP7 and higher } + { because in XP6 the number of aircraft is not user-adjustable. The parameter} + { is ignored. } XPLM_MSG_AIRPLANE_COUNT_CHANGED = 105; {$IFDEF XPLM200} - { This message is sent to your plugin whenever a plane is unloaded. The } - { parameter is the number of the plane being unloaded; 0 indicates the user's } - { plane. The parameter is of type int, passed as the value of the pointer. } - { (That is: the parameter is an int, not a pointer to an int.) } +CONST + { This message is sent to your plugin whenever a plane is unloaded. The } + { parameter contains the index number of the plane being unloaded; 0 } + { indicates the user's plane. The parameter is of type int, passed as the } + { value of the pointer. (That is: the parameter is an int, not a pointer to } + { an int.) } XPLM_MSG_PLANE_UNLOADED = 106; -{$ENDIF} +{$ENDIF XPLM200} {$IFDEF XPLM210} - { This message is sent to your plugin right before X-Plane writes its } - { preferences file. You can use this for two purposes: to write your own } - { preferences, and to modify any datarefs to influence preferences output. } - { For example, if your plugin temporarily modifies saved preferences, you can } - { put them back to their default values here to avoid having the tweaks be } - { persisted if your plugin is not loaded on the next invocation of X-Plane. } +CONST + { This message is sent to your plugin right before X-Plane writes its } + { preferences file. You can use this for two purposes: to write your own } + { preferences, and to modify any datarefs to influence preferences output. } + { For example, if your plugin temporarily modifies saved preferences, you can} + { put them back to their default values here to avoid having the tweaks be } + { persisted if your plugin is not loaded on the next invocation of X-Plane. } + { The parameter is ignored. } XPLM_MSG_WILL_WRITE_PREFS = 107; -{$ENDIF} +{$ENDIF XPLM210} {$IFDEF XPLM210} - { This message is sent to your plugin right after a livery is loaded for an } - { airplane. You can use this to check the new livery (via datarefs) and } - { react accordingly. The parameter is of type int, passed as the value of a } - { pointer and represents the aicraft plane number - 0 is the user's plane. } + { This message is sent to your plugin right after a livery is loaded for an } + { airplane. You can use this to check the new livery (via datarefs) and } + { react accordingly. The parameter contains the index number of the aircraft} + { whose livery is changing. } XPLM_MSG_LIVERY_LOADED = 108; -{$ENDIF} +{$ENDIF XPLM210} {$IFDEF XPLM301} - { Sent to your plugin right before X-Plane enters virtual reality mode (at } - { which time any windows that are not positioned in VR mode will no longer be } - { visible to the user). } +CONST + { Sent to your plugin right before X-Plane enters virtual reality mode (at } + { which time any windows that are not positioned in VR mode will no longer be} + { visible to the user). The parameter is unused and should be ignored. } XPLM_MSG_ENTERED_VR = 109; -{$ENDIF} +{$ENDIF XPLM301} {$IFDEF XPLM301} - { Sent to your plugin right before X-Plane leaves virtual reality mode (at } - { which time you may want to clean up windows that are positioned in VR } - { mode). } + { Sent to your plugin right before X-Plane leaves virtual reality mode (at } + { which time you may want to clean up windows that are positioned in VR } + { mode). The parameter is unused and should be ignored. } XPLM_MSG_EXITING_VR = 110; -{$ENDIF} +{$ENDIF XPLM301} + +{$IFDEF XPLM303} +CONST + { Sent to your plugin if another plugin wants to take over AI planes. If you } + { are a synthetic traffic provider, that probably means a plugin for an } + { online network has connected and wants to supply aircraft flown by real } + { humans and you should cease to provide synthetic traffic. If however you } + { are providing online traffic from real humans, you probably don't want to } + { disconnect, in which case you just ignore this message. The sender is the } + { plugin ID of the plugin asking for control of the planes now. You can use } + { it to find out who is requesting and whether you should yield to them. } + { Synthetic traffic providers should always yield to online networks. The } + { parameter is unused and should be ignored. } + XPLM_MSG_RELEASE_PLANES = 111; +{$ENDIF XPLM303} { XPLMSendMessageToPlugin - This function sends a message to another plug-in or X-Plane. Pass - XPLM_NO_PLUGIN_ID to broadcast to all plug-ins. Only enabled plug-ins with - a message receive function receive the message. + This function sends a message to another plug-in or X-Plane. Pass + XPLM_NO_PLUGIN_ID to broadcast to all plug-ins. Only enabled plug-ins with + a message receive function receive the message. } PROCEDURE XPLMSendMessageToPlugin( inPlugin : XPLMPluginID; - inMessage : integer; + inMessage : Integer; inParam : pointer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; {$IFDEF XPLM200} {___________________________________________________________________________ * Plugin Features API ___________________________________________________________________________} { - The plugin features API allows your plugin to "sign up" for additional - capabilities and plugin system features that are normally disabled for - backward compatibility. This allows advanced plugins to "opt-in" to new - behavior. + The plugin features API allows your plugin to "sign up" for additional + capabilities and plugin system features that are normally disabled for + backward compatibility. This allows advanced plugins to "opt-in" to new + behavior. + + Each feature is defined by a permanent string name. The feature string + names will vary with the particular installation of X-Plane, so plugins + should not expect a feature to be guaranteed present. + + XPLM_WANTS_REFLECTIONS + ---------------------- + + Available in the SDK 2.0 and later for X-Plane 9, enabling this capability + causes your plugin to receive drawing hook callbacks when X-Plane builds + its off-screen reflection and shadow rendering passes. Plugins should + enable this and examine the dataref sim/graphics/view/plane_render_type to + determine whether the drawing callback is for a reflection, shadow + calculation, or the main screen. Rendering can be simlified or omitted for + reflections, and non-solid drawing should be skipped for shadow + calculations. - Each feature is defined by a permanent string name. The feature string - names will vary with the particular installation of X-Plane, so plugins - should not expect a feature to be guaranteed present. + **Note**: direct drawing via draw callbacks is not recommended; use the + XPLMInstance API to create object models instead. + + XPLM_USE_NATIVE_PATHS + --------------------- + + available in the SDK 2.1 and later for X-Plane 10, this modifies the plugin + system to use Unix-style paths on all operating systems. With this enabled: + + * OS X paths will match the native OS X Unix. + * Windows will use forward slashes but preserve C:\ or another drive letter + when using complete file paths. + * Linux uses its native file system path scheme. + + Without this enabled: + + * OS X will use CFM file paths separated by a colon. + * Windows will use back-slashes and conventional DOS paths. + * Linux uses its native file system path scheme. + + All plugins should enable this feature on OS X to access the native file + system. + + XPLM_USE_NATIVE_WIDGET_WINDOWS + ------------------------------ + + Available in the SDK 3.0.2 SDK, this capability tells the widgets library + to use new, modern X-Plane backed XPLMDisplay windows to anchor all widget + trees. Without it, widgets will always use legacy windows. + + Plugins should enable this to allow their widget hierarchies to respond to + the user's UI size settings and to map widget-based windwos to a VR HMD. + + Before enabling this, make sure any custom widget code in your plugin is + prepared to cope with the UI coordinate system not being th same as the + OpenGL window coordinate system. } { XPLMFeatureEnumerator_f - You pass an XPLMFeatureEnumerator_f to get a list of all features supported - by a given version running version of X-Plane. This routine is called once - for each feature. + You pass an XPLMFeatureEnumerator_f to get a list of all features supported + by a given version running version of X-Plane. This routine is called once + for each feature. } TYPE XPLMFeatureEnumerator_f = PROCEDURE( - inFeature : Pchar; + inFeature : XPLMString; inRef : pointer); cdecl; { XPLMHasFeature - This returns 1 if the given installation of X-Plane supports a feature, or - 0 if it does not. + This returns 1 if the given installation of X-Plane supports a feature, or + 0 if it does not. } FUNCTION XPLMHasFeature( - inFeature : Pchar) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inFeature : XPLMString) : Integer; + cdecl; external XPLM_DLL; { XPLMIsFeatureEnabled - This returns 1 if a feature is currently enabled for your plugin, or 0 if - it is not enabled. It is an error to call this routine with an unsupported - feature. + This returns 1 if a feature is currently enabled for your plugin, or 0 if + it is not enabled. It is an error to call this routine with an unsupported + feature. } FUNCTION XPLMIsFeatureEnabled( - inFeature : Pchar) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inFeature : XPLMString) : Integer; + cdecl; external XPLM_DLL; { XPLMEnableFeature - This routine enables or disables a feature for your plugin. This will - change the running behavior of X-Plane and your plugin in some way, - depending on the feature. + This routine enables or disables a feature for your plugin. This will + change the running behavior of X-Plane and your plugin in some way, + depending on the feature. } PROCEDURE XPLMEnableFeature( - inFeature : Pchar; - inEnable : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inFeature : XPLMString; + inEnable : Integer); + cdecl; external XPLM_DLL; { XPLMEnumerateFeatures - This routine calls your enumerator callback once for each feature that this - running version of X-Plane supports. Use this routine to determine all of - the features that X-Plane can support. + This routine calls your enumerator callback once for each feature that this + running version of X-Plane supports. Use this routine to determine all of + the features that X-Plane can support. } PROCEDURE XPLMEnumerateFeatures( inEnumerator : XPLMFeatureEnumerator_f; inRef : pointer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; + +{$ENDIF XPLM200} -{$ENDIF} IMPLEMENTATION + END. diff --git a/src/SDK/Delphi/XPLM/XPLMProcessing.pas b/src/SDK/Delphi/XPLM/XPLMProcessing.pas index b2925c36..e09b6e56 100755 --- a/src/SDK/Delphi/XPLM/XPLMProcessing.pas +++ b/src/SDK/Delphi/XPLM/XPLMProcessing.pas @@ -1,274 +1,254 @@ { - 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 XPLMProcessing; INTERFACE { - This API allows you to get regular callbacks during the flight loop, the - part of X-Plane where the plane's position calculates the physics of - flight, etc. Use these APIs to accomplish periodic tasks like logging data - and performing I/O. + This API allows you to get regular callbacks during the flight loop, the + part of X-Plane where the plane's position calculates the physics of + flight, etc. Use these APIs to accomplish periodic tasks like logging data + and performing I/O. + + You can receive a callback either just before or just after the per-frame + physics calculations happen - you can use post-FM callbacks to "patch" the + flight model after it has run. - WARNING: Do NOT use these callbacks to draw! You cannot draw during flight - loop callbacks. Use the drawing callbacks (see XPLMDisplay for more info) - for graphics. + If the user has set the number of flight model iterations per frame greater + than one your plugin will _not_ see this; these integrations run on the + sub-section of the flight model where iterations improve responsiveness + (e.g. physical integration, not simple systems tracking) and are thus + opaque to plugins. + + Flight loop scheduling, when scheduled by time, is scheduled by a "first + callback after the deadline" schedule, e.g. your callbacks will always be + slightly late to ensure that we don't run faster than your deadline. + + WARNING: Do NOT use these callbacks to draw! You cannot draw during flight + loop callbacks. Use the drawing callbacks (see XPLMDisplay for more info) + for graphics. (One exception: you can use a post-flight loop callback to + update your own off-screen FBOs.) } -USES XPLMDefs; +USES + XPLMDefs; {$A4} -{$IFDEF MSWINDOWS} - {$DEFINE DELPHI} -{$ENDIF} {___________________________________________________________________________ * FLIGHT LOOP CALLBACKS ___________________________________________________________________________} -{ - -} {$IFDEF XPLM210} { XPLMFlightLoopPhaseType - You can register a flight loop callback to run either before or after the - flight model is integrated by X-Plane. + You can register a flight loop callback to run either before or after the + flight model is integrated by X-Plane. } TYPE XPLMFlightLoopPhaseType = ( - { Your callback runs before X-Plane integrates the flight model. } + { Your callback runs before X-Plane integrates the flight model. } xplm_FlightLoop_Phase_BeforeFlightModel = 0 - { Your callback runs after X-Plane integrates the flight model. } + { Your callback runs after X-Plane integrates the flight model. } ,xplm_FlightLoop_Phase_AfterFlightModel = 1 ); PXPLMFlightLoopPhaseType = ^XPLMFlightLoopPhaseType; -{$ENDIF} +{$ENDIF XPLM210} {$IFDEF XPLM210} { XPLMFlightLoopID - This is an opaque identifier for a flight loop callback. You can use this - identifier to easily track and remove your callbacks, or to use the new - flight loop APIs. + This is an opaque identifier for a flight loop callback. You can use this + identifier to easily track and remove your callbacks, or to use the new + flight loop APIs. } XPLMFlightLoopID = pointer; PXPLMFlightLoopID = ^XPLMFlightLoopID; -{$ENDIF} +{$ENDIF XPLM210} { XPLMFlightLoop_f - This is your flight loop callback. Each time the flight loop is iterated - through, you receive this call at the end. You receive a time since you - were last called and a time since the last loop, as well as a loop counter. - The 'phase' parameter is deprecated and should be ignored. + This is your flight loop callback. Each time the flight loop is iterated + through, you receive this call at the end. + + Flight loop callbacks receive a number of input timing parameters. These + input timing parameters are not particularly useful; you may need to track + your own timing data (e.g. by reading datarefs). The input parameters are: + + - inElapsedSinceLastCall: the wall time since your last callback. + - inElapsedTimeSinceLastFlightLoop: the wall time since any flight loop was + dispatched. + - inCounter: a monotonically increasing counter, bumped once per flight + loop dispatch from the sim. + - inRefcon: your own ptr constant from when you regitered yor callback. - Your return value controls when you will next be called. Return 0 to stop - receiving callbacks. Pass a positive number to specify how many seconds - until the next callback. (You will be called at or after this time, not - before.) Pass a negative number to specify how many loops must go by until - you are called. For example, -1.0 means call me the very next loop. Try to - run your flight loop as infrequently as is practical, and suspend it (using - return value 0) when you do not need it; lots of flight loop callbacks that - do nothing lowers X-Plane's frame rate. + Your return value controls when you will next be called. - Your callback will NOT be unregistered if you return 0; it will merely be - inactive. + - Return 0 to stop receiving callbacks. + - Pass a positive number to specify how many seconds until the next + callback. (You will be called at or after this time, not before.) + - Pass a negative number to specify how many loops must go by until you + are called. For example, -1.0 means call me the very next loop. - The reference constant you passed to your loop is passed back to you. + Try to run your flight loop as infrequently as is practical, and suspend it + (using return value 0) when you do not need it; lots of flight loop + callbacks that do nothing lowers X-Plane's frame rate. + + Your callback will NOT be unregistered if you return 0; it will merely be + inactive. } +TYPE XPLMFlightLoop_f = FUNCTION( - inElapsedSinceLastCall: single; - inElapsedTimeSinceLastFlightLoop: single; - inCounter : integer; - inRefcon : pointer) : single; cdecl; + inElapsedSinceLastCall: Single; + inElapsedTimeSinceLastFlightLoop: Single; + inCounter : Integer; + inRefcon : pointer) : Single; cdecl; {$IFDEF XPLM210} { XPLMCreateFlightLoop_t - XPLMCreateFlightLoop_t contains the parameters to create a new flight loop - callback. The strsucture can be expanded in future SDKs - always set - structSize to the size of your structure in bytes. + XPLMCreateFlightLoop_t contains the parameters to create a new flight loop + callback. The strsucture can be expanded in future SDKs - always set + structSize to the size of your structure in bytes. } +TYPE XPLMCreateFlightLoop_t = RECORD - structSize : integer; + structSize : Integer; phase : XPLMFlightLoopPhaseType; callbackFunc : XPLMFlightLoop_f; refcon : pointer; END; PXPLMCreateFlightLoop_t = ^XPLMCreateFlightLoop_t; -{$ENDIF} +{$ENDIF XPLM210} { XPLMGetElapsedTime - This routine returns the elapsed time since the sim started up in decimal - seconds. + This routine returns the elapsed time since the sim started up in decimal + seconds. This is a wall timer; it keeps counting upward even if the sim is + pasued. + + __WARNING__: XPLMGetElapsedTime is not a very good timer! It lacks + precision in both its data type and its source. Do not attempt to use it + for timing critical applications like network multiplayer. } - FUNCTION XPLMGetElapsedTime: single; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + FUNCTION XPLMGetElapsedTime: Single; + cdecl; external XPLM_DLL; { XPLMGetCycleNumber - This routine returns a counter starting at zero for each sim cycle - computed/video frame rendered. + This routine returns a counter starting at zero for each sim cycle + computed/video frame rendered. } - FUNCTION XPLMGetCycleNumber: integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + FUNCTION XPLMGetCycleNumber: Integer; + cdecl; external XPLM_DLL; { XPLMRegisterFlightLoopCallback - This routine registers your flight loop callback. Pass in a pointer to a - flight loop function and a refcon. inInterval defines when you will be - called. Pass in a positive number to specify seconds from registration time - to the next callback. Pass in a negative number to indicate when you will - be called (e.g. pass -1 to be called at the next cylcle). Pass 0 to not be - called; your callback will be inactive. + This routine registers your flight loop callback. Pass in a pointer to a + flight loop function and a refcon. inInterval defines when you will be + called. Pass in a positive number to specify seconds from registration time + to the next callback. Pass in a negative number to indicate when you will + be called (e.g. pass -1 to be called at the next cylcle). Pass 0 to not be + called; your callback will be inactive. + + (This legacy function only installs pre-flight-loop callbacks; use + XPLMCreateFlightLoop for more control.) } PROCEDURE XPLMRegisterFlightLoopCallback( inFlightLoop : XPLMFlightLoop_f; - inInterval : single; + inInterval : Single; inRefcon : pointer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMUnregisterFlightLoopCallback - This routine unregisters your flight loop callback. Do NOT call it from - your flight loop callback. Once your flight loop callback is unregistered, - it will not be called again. + This routine unregisters your flight loop callback. Do NOT call it from + your flight loop callback. Once your flight loop callback is unregistered, + it will not be called again. + + Only use this on flight loops registered via + XPLMRegisterFlightLoopCallback. } PROCEDURE XPLMUnregisterFlightLoopCallback( inFlightLoop : XPLMFlightLoop_f; inRefcon : pointer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMSetFlightLoopCallbackInterval - This routine sets when a callback will be called. Do NOT call it from your - callback; use the return value of the callback to change your callback - interval from inside your callback. + This routine sets when a callback will be called. Do NOT call it from your + callback; use the return value of the callback to change your callback + interval from inside your callback. - inInterval is formatted the same way as in XPLMRegisterFlightLoopCallback; - positive for seconds, negative for cycles, and 0 for deactivating the - callback. If inRelativeToNow is 1, times are from the time of this call; - otherwise they are from the time the callback was last called (or the time - it was registered if it has never been called. + inInterval is formatted the same way as in XPLMRegisterFlightLoopCallback; + positive for seconds, negative for cycles, and 0 for deactivating the + callback. If inRelativeToNow is 1, times are from the time of this call; + otherwise they are from the time the callback was last called (or the time + it was registered if it has never been called. } PROCEDURE XPLMSetFlightLoopCallbackInterval( inFlightLoop : XPLMFlightLoop_f; - inInterval : single; - inRelativeToNow : integer; + inInterval : Single; + inRelativeToNow : Integer; inRefcon : pointer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; {$IFDEF XPLM210} { XPLMCreateFlightLoop - This routine creates a flight loop callback and returns its ID. The flight - loop callback is created using the input param struct, and is inited to be - unscheduled. + This routine creates a flight loop callback and returns its ID. The flight + loop callback is created using the input param struct, and is inited to be + unscheduled. } FUNCTION XPLMCreateFlightLoop( inParams : PXPLMCreateFlightLoop_t) : XPLMFlightLoopID; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} + cdecl; external XPLM_DLL; +{$ENDIF XPLM210} {$IFDEF XPLM210} { XPLMDestroyFlightLoop - This routine destroys a flight loop callback by ID. + This routine destroys a flight loop callback by ID. Only call it on flight + loops created with the newer XPLMCreateFlightLoop API. } PROCEDURE XPLMDestroyFlightLoop( inFlightLoopID : XPLMFlightLoopID); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} + cdecl; external XPLM_DLL; +{$ENDIF XPLM210} {$IFDEF XPLM210} { XPLMScheduleFlightLoop - This routine schedules a flight loop callback for future execution. If - inInterval is negative, it is run in a certain number of frames based on - the absolute value of the input. If the interval is positive, it is a - duration in seconds. - - If inRelativeToNow is true, ties are interpretted relative to the time this - routine is called; otherwise they are relative to the last call time or the - time the flight loop was registered (if never called). - - THREAD SAFETY: it is legal to call this routine from any thread under the - following conditions: + This routine schedules a flight loop callback for future execution. If + inInterval is negative, it is run in a certain number of frames based on + the absolute value of the input. If the interval is positive, it is a + duration in seconds. - 1. The call must be between the beginning of an XPLMEnable and the end of - an XPLMDisable sequence. (That is, you must not call this routine from - thread activity when your plugin was supposed to be disabled. Since plugins - are only enabled while loaded, this also implies you cannot run this - routine outside an XPLMStart/XPLMStop sequence.) - - 2. You may not call this routine re-entrantly for a single flight loop ID. - (That is, you can't enable from multiple threads at the same time.) - - 3. You must call this routine between the time after XPLMCreateFlightLoop - returns a value and the time you call XPLMDestroyFlightLoop. (That is, you - must ensure that your threaded activity is within the life of the object. - The SDK does not check this for you, nor does it synchronize destruction of - the object.) - - 4. The object must be unscheduled if this routine is to be called from a - thread other than the main thread. + If inRelativeToNow is true, ties are interpretted relative to the time this + routine is called; otherwise they are relative to the last call time or the + time the flight loop was registered (if never called). } PROCEDURE XPLMScheduleFlightLoop( inFlightLoopID : XPLMFlightLoopID; - inInterval : single; - inRelativeToNow : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} + inInterval : Single; + inRelativeToNow : Integer); + cdecl; external XPLM_DLL; +{$ENDIF XPLM210} + IMPLEMENTATION + END. diff --git a/src/SDK/Delphi/XPLM/XPLMScenery.pas b/src/SDK/Delphi/XPLM/XPLMScenery.pas index d68b33a5..a585830c 100644 --- a/src/SDK/Delphi/XPLM/XPLMScenery.pas +++ b/src/SDK/Delphi/XPLM/XPLMScenery.pas @@ -1,65 +1,63 @@ { - 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 XPLMScenery; INTERFACE { - This package contains APIs to interact with X-Plane's scenery system. + This package contains APIs to interact with X-Plane's scenery system. } -USES XPLMDefs; +USES + XPLMDefs; {$A4} -{$IFDEF MSWINDOWS} - {$DEFINE DELPHI} -{$ENDIF} {$IFDEF XPLM200} {___________________________________________________________________________ * Terrain Y-Testing ___________________________________________________________________________} { - The Y-testing API allows you to locate the physical scenery mesh. This - would be used to place dynamic graphics on top of the ground in a plausible - way or do physics interactions. + The Y-testing API allows you to locate the physical scenery mesh. This + would be used to place dynamic graphics on top of the ground in a plausible + way or do physics interactions. - The Y-test API works via probe objects, which are allocated by your plugin - and used to query terrain. Probe objects exist both to capture which - algorithm you have requested (see probe types) and also to cache query - information. + The Y-test API works via probe objects, which are allocated by your plugin + and used to query terrain. Probe objects exist both to capture which + algorithm you have requested (see probe types) and also to cache query + information. - Performance guidelines: It is generally faster to use the same probe for - nearby points and different probes for different points. Try not to - allocate more than "hundreds" of probes at most. Share probes if you need - more. Generally, probing operations are expensive, and should be avoided - via caching when possible. + Performance Guidelines + ---------------------- - Y testing returns a location on the terrain, a normal vectory, and a - velocity vector. The normal vector tells you the slope of the terrain at - that point. The velocity vector tells you if that terrain is moving (and is - in meters/second). For example, if your Y test hits the aircraft carrier - deck, this tells you the velocity of that point on the deck. + It is generally faster to use the same probe for nearby points and + different probes for different points. Try not to allocate more than + "hundreds" of probes at most. Share probes if you need more. Generally, + probing operations are expensive, and should be avoided via caching when + possible. - Note: the Y-testing API is limited to probing the loaded scenery area, - which is approximately 300x300 km in X-Plane 9. Probes outside this area - will return the height of a 0 MSL sphere. + Y testing returns a location on the terrain, a normal vectory, and a + velocity vector. The normal vector tells you the slope of the terrain at + that point. The velocity vector tells you if that terrain is moving (and is + in meters/second). For example, if your Y test hits the aircraft carrier + deck, this tells you the velocity of that point on the deck. + + Note: the Y-testing API is limited to probing the loaded scenery area, + which is approximately 300x300 km in X-Plane 9. Probes outside this area + will return the height of a 0 MSL sphere. } { XPLMProbeType - XPLMProbeType defines the type of terrain probe - each probe has a - different algorithm. (Only one type of probe is provided right now, but - future APIs will expose more flexible or poewrful or useful probes. + XPLMProbeType defines the type of terrain probe - each probe has a + different algorithm. (Only one type of probe is provided right now, but + future APIs will expose more flexible or poewrful or useful probes. } TYPE XPLMProbeType = ( - { The Y probe gives you the location of the tallest physical scenery along } - { the Y axis going through the queried point. } + { The Y probe gives you the location of the tallest physical scenery along } + { the Y axis going through the queried point. } xplm_ProbeY = 0 ); @@ -68,18 +66,18 @@ { XPLMProbeResult - Probe results - possible results from a probe query. + Probe results - possible results from a probe query. } XPLMProbeResult = ( - { The probe hit terrain and returned valid values. } + { The probe hit terrain and returned valid values. } xplm_ProbeHitTerrain = 0 - { An error in the API call. Either the probe struct size is bad, or the } - { probe is invalid or the type is mismatched for the specific query call. } + { An error in the API call. Either the probe struct size is bad, or the } + { probe is invalid or the type is mismatched for the specific query call. } ,xplm_ProbeError = 1 - { The probe call succeeded but there is no terrain under this point (perhaps } - { it is off the side of the planet?) } + { The probe call succeeded but there is no terrain under this point (perhaps } + { it is off the side of the planet?) } ,xplm_ProbeMissed = 2 ); @@ -88,8 +86,8 @@ { XPLMProbeRef - An XPLMProbeRef is an opaque handle to a probe, used for querying the - terrain. + An XPLMProbeRef is an opaque handle to a probe, used for querying the + terrain. } XPLMProbeRef = pointer; PXPLMProbeRef = ^XPLMProbeRef; @@ -97,155 +95,131 @@ { XPLMProbeInfo_t - XPLMProbeInfo_t contains the results of a probe call. Make sure to set - structSize to the size of the struct before using it. + XPLMProbeInfo_t contains the results of a probe call. Make sure to set + structSize to the size of the struct before using it. } XPLMProbeInfo_t = RECORD - { Size of structure in bytes - always set this before calling the XPLM. } - structSize : integer; - { Resulting X location of the terrain point we hit, in local OpenGL } - { coordinates. } - locationX : single; - { Resulting Y location of the terrain point we hit, in local OpenGL } - { coordinates. } - locationY : single; - { Resulting Z location of the terrain point we hit, in local OpenGL } - { coordinates. } - locationZ : single; - { X component of the normal vector to the terrain we found. } - normalX : single; - { Y component of the normal vector to the terrain we found. } - normalY : single; - { Z component of the normal vector to the terrain we found. } - normalZ : single; - { X component of the velocity vector of the terrain we found. } - velocityX : single; - { Y component of the velocity vector of the terrain we found. } - velocityY : single; - { Z component of the velocity vector of the terrain we found. } - velocityZ : single; - { Tells if the surface we hit is water (otherwise it is land). } - is_wet : integer; + { Size of structure in bytes - always set this before calling the XPLM. } + structSize : Integer; + { Resulting X location of the terrain point we hit, in local OpenGL } + { coordinates. } + locationX : Single; + { Resulting Y location of the terrain point we hit, in local OpenGL } + { coordinates. } + locationY : Single; + { Resulting Z location of the terrain point we hit, in local OpenGL } + { coordinates. } + locationZ : Single; + { X component of the normal vector to the terrain we found. } + normalX : Single; + { Y component of the normal vector to the terrain we found. } + normalY : Single; + { Z component of the normal vector to the terrain we found. } + normalZ : Single; + { X component of the velocity vector of the terrain we found. } + velocityX : Single; + { Y component of the velocity vector of the terrain we found. } + velocityY : Single; + { Z component of the velocity vector of the terrain we found. } + velocityZ : Single; + { Tells if the surface we hit is water (otherwise it is land). } + is_wet : Integer; END; PXPLMProbeInfo_t = ^XPLMProbeInfo_t; { XPLMCreateProbe - Creates a new probe object of a given type and returns. + Creates a new probe object of a given type and returns. } FUNCTION XPLMCreateProbe( inProbeType : XPLMProbeType) : XPLMProbeRef; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMDestroyProbe - Deallocates an existing probe object. + Deallocates an existing probe object. } PROCEDURE XPLMDestroyProbe( inProbe : XPLMProbeRef); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMProbeTerrainXYZ - Probes the terrain. Pass in the XYZ coordinate of the probe point, a probe - object, and an XPLMProbeInfo_t struct that has its structSize member set - properly. Other fields are filled in if we hit terrain, and a probe result - is returned. + Probes the terrain. Pass in the XYZ coordinate of the probe point, a probe + object, and an XPLMProbeInfo_t struct that has its structSize member set + properly. Other fields are filled in if we hit terrain, and a probe result + is returned. } FUNCTION XPLMProbeTerrainXYZ( inProbe : XPLMProbeRef; - inX : single; - inY : single; - inZ : single; + inX : Single; + inY : Single; + inZ : Single; outInfo : PXPLMProbeInfo_t) : XPLMProbeResult; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; -{$ENDIF} +{$ENDIF XPLM200} {$IFDEF XPLM300} {___________________________________________________________________________ * Magnetic Variation ___________________________________________________________________________} { - Use the magnetic variation (more properly, the "magnetic declination") API - to find the offset of magnetic north from true north at a given latitude - and longitude within the simulator. + Use the magnetic variation (more properly, the "magnetic declination") API + to find the offset of magnetic north from true north at a given latitude + and longitude within the simulator. - In the real world, the Earth's magnetic field is irregular, such that true - north (the direction along a meridian toward the north pole) does not - necessarily match what a magnetic compass shows as north. + In the real world, the Earth's magnetic field is irregular, such that true + north (the direction along a meridian toward the north pole) does not + necessarily match what a magnetic compass shows as north. - Using this API ensures that you present the same offsets to users as - X-Plane's built-in instruments. + Using this API ensures that you present the same offsets to users as + X-Plane's built-in instruments. } { XPLMGetMagneticVariation - Returns X-Plane's simulated magnetic variation (declination) at the - indication latitude and longitude. + Returns X-Plane's simulated magnetic variation (declination) at the + indication latitude and longitude. } FUNCTION XPLMGetMagneticVariation( - latitude : real; - longitude : real) : single; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + latitude : Real; + longitude : Real) : Single; + cdecl; external XPLM_DLL; { XPLMDegTrueToDegMagnetic - Converts a heading in degrees relative to true north into a value relative - to magnetic north at the user's current location. + Converts a heading in degrees relative to true north into a value relative + to magnetic north at the user's current location. } FUNCTION XPLMDegTrueToDegMagnetic( - headingDegreesTrue : single) : single; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + headingDegreesTrue : Single) : Single; + cdecl; external XPLM_DLL; { XPLMDegMagneticToDegTrue - Converts a heading in degrees relative to magnetic north at the user's - current location into a value relative to true north. + Converts a heading in degrees relative to magnetic north at the user's + current location into a value relative to true north. } FUNCTION XPLMDegMagneticToDegTrue( - headingDegreesMagnetic: single) : single; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + headingDegreesMagnetic: Single) : Single; + cdecl; external XPLM_DLL; -{$ENDIF} +{$ENDIF XPLM300} {___________________________________________________________________________ * Object Drawing ___________________________________________________________________________} { - The object drawing routines let you load and draw X-Plane OBJ files. - Objects are loaded by file path and managed via an opaque handle. X-Plane - naturally reference counts objects, so it is important that you balance - every successful call to XPLMLoadObject with a call to XPLMUnloadObject! + The object drawing routines let you load and draw X-Plane OBJ files. + Objects are loaded by file path and managed via an opaque handle. X-Plane + naturally reference counts objects, so it is important that you balance + every successful call to XPLMLoadObject with a call to XPLMUnloadObject! } @@ -254,223 +228,207 @@ { XPLMObjectRef - An XPLMObjectRef is a opaque handle to an .obj file that has been loaded - into memory. + An XPLMObjectRef is a opaque handle to an .obj file that has been loaded + into memory. } XPLMObjectRef = pointer; PXPLMObjectRef = ^XPLMObjectRef; -{$ENDIF} +{$ENDIF XPLM200} {$IFDEF XPLM200} { XPLMDrawInfo_t - The XPLMDrawInfo_t structure contains positioning info for one object that - is to be drawn. Be sure to set structSize to the size of the structure for - future expansion. + The XPLMDrawInfo_t structure contains positioning info for one object that + is to be drawn. Be sure to set structSize to the size of the structure for + future expansion. } XPLMDrawInfo_t = RECORD - { Set this to the size of this structure! } - structSize : integer; - { X location of the object in local coordinates. } - x : single; - { Y location of the object in local coordinates. } - y : single; - { Z location of the object in local coordinates. } - z : single; - { Pitch in degres to rotate the object, positive is up. } - pitch : single; - { Heading in local coordinates to rotate the object, clockwise. } - heading : single; - { Roll to rotate the object. } - roll : single; + { Set this to the size of this structure! } + structSize : Integer; + { X location of the object in local coordinates. } + x : Single; + { Y location of the object in local coordinates. } + y : Single; + { Z location of the object in local coordinates. } + z : Single; + { Pitch in degres to rotate the object, positive is up. } + pitch : Single; + { Heading in local coordinates to rotate the object, clockwise. } + heading : Single; + { Roll to rotate the object. } + roll : Single; END; PXPLMDrawInfo_t = ^XPLMDrawInfo_t; -{$ENDIF} +{$ENDIF XPLM200} {$IFDEF XPLM210} { XPLMObjectLoaded_f - You provide this callback when loading an object asynchronously; it will be - called once the object is loaded. Your refcon is passed back. The object - ref passed in is the newly loaded object (ready for use) or NULL if an - error occured. + You provide this callback when loading an object asynchronously; it will be + called once the object is loaded. Your refcon is passed back. The object + ref passed in is the newly loaded object (ready for use) or NULL if an + error occured. - If your plugin is disabled, this callback will be delivered as soon as the - plugin is re-enabled. If your plugin is unloaded before this callback is - ever called, the SDK will release the object handle for you. + If your plugin is disabled, this callback will be delivered as soon as the + plugin is re-enabled. If your plugin is unloaded before this callback is + ever called, the SDK will release the object handle for you. } +TYPE XPLMObjectLoaded_f = PROCEDURE( inObject : XPLMObjectRef; inRefcon : pointer); cdecl; -{$ENDIF} +{$ENDIF XPLM210} {$IFDEF XPLM200} { XPLMLoadObject - This routine loads an OBJ file and returns a handle to it. If X-Plane has - already loaded the object, the handle to the existing object is returned. - Do not assume you will get the same handle back twice, but do make sure to - call unload once for every load to avoid "leaking" objects. The object will - be purged from memory when no plugins and no scenery are using it. + This routine loads an OBJ file and returns a handle to it. If X-Plane has + already loaded the object, the handle to the existing object is returned. + Do not assume you will get the same handle back twice, but do make sure to + call unload once for every load to avoid "leaking" objects. The object will + be purged from memory when no plugins and no scenery are using it. - The path for the object must be relative to the X-System base folder. If - the path is in the root of the X-System folder you may need to prepend ./ - to it; loading objects in the root of the X-System folder is STRONGLY - discouraged - your plugin should not dump art resources in the root folder! + The path for the object must be relative to the X-System base folder. If + the path is in the root of the X-System folder you may need to prepend ./ + to it; loading objects in the root of the X-System folder is STRONGLY + discouraged - your plugin should not dump art resources in the root folder! + XPLMLoadObject will return NULL if the object cannot be loaded (either + because it is not found or the file is misformatted). This routine will + load any object that can be used in the X-Plane scenery system. - XPLMLoadObject will return NULL if the object cannot be loaded (either - because it is not found or the file is misformatted). This routine will - load any object that can be used in the X-Plane scenery system. - - It is important that the datarefs an object uses for animation already be - loaded before you load the object. For this reason it may be necessary to - defer object loading until the sim has fully started. + It is important that the datarefs an object uses for animation already be + loaded before you load the object. For this reason it may be necessary to + defer object loading until the sim has fully started. } FUNCTION XPLMLoadObject( - inPath : Pchar) : XPLMObjectRef; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} + inPath : XPLMString) : XPLMObjectRef; + cdecl; external XPLM_DLL; +{$ENDIF XPLM200} {$IFDEF XPLM210} { XPLMLoadObjectAsync - This routine loads an object asynchronously; control is returned to you - immediately while X-Plane loads the object. The sim will not stop flying - while the object loads. For large objects, it may be several seconds before - the load finishes. + This routine loads an object asynchronously; control is returned to you + immediately while X-Plane loads the object. The sim will not stop flying + while the object loads. For large objects, it may be several seconds before + the load finishes. - You provide a callback function that is called once the load has completed. - Note that if the object cannot be loaded, you will not find out until the - callback function is called with a NULL object handle. + You provide a callback function that is called once the load has completed. + Note that if the object cannot be loaded, you will not find out until the + callback function is called with a NULL object handle. - There is no way to cancel an asynchronous object load; you must wait for - the load to complete and then release the object if it is no longer - desired. + There is no way to cancel an asynchronous object load; you must wait for + the load to complete and then release the object if it is no longer + desired. } PROCEDURE XPLMLoadObjectAsync( - inPath : Pchar; + inPath : XPLMString; inCallback : XPLMObjectLoaded_f; inRefcon : pointer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} + cdecl; external XPLM_DLL; +{$ENDIF XPLM210} -{$IFDEF XPLM200} +{$IFDEF XPLM_DEPRECATED} { XPLMDrawObjects - XPLMDrawObjects draws an object from an OBJ file one or more times. You - pass in the object and an array of XPLMDrawInfo_t structs, one for each - place you would like the object to be drawn. + __Deprecation Warning__: use XPLMInstancing to draw 3-d objects by creating + instances, rather than these APIs from draw callbacks. - X-Plane will attempt to cull the objects based on LOD and visibility, and - will pick the appropriate LOD. + XPLMDrawObjects draws an object from an OBJ file one or more times. You + pass in the object and an array of XPLMDrawInfo_t structs, one for each + place you would like the object to be drawn. - Lighting is a boolean; pass 1 to show the night version of object with - night-only lights lit up. Pass 0 to show the daytime version of the object. + X-Plane will attempt to cull the objects based on LOD and visibility, and + will pick the appropriate LOD. + Lighting is a boolean; pass 1 to show the night version of object with + night-only lights lit up. Pass 0 to show the daytime version of the object. - earth_relative controls the coordinate system. If this is 1, the rotations - you specify are applied to the object after its coordinate system is - transformed from local to earth-relative coordinates -- that is, an object - with no rotations will point toward true north and the Y axis will be up - against gravity. If this is 0, the object is drawn with your rotations from - local coordanates -- that is, an object with no rotations is drawn pointing - down the -Z axis and the Y axis of the object matches the local coordinate - Y axis. + earth_relative controls the coordinate system. If this is 1, the rotations + you specify are applied to the object after its coordinate system is + transformed from local to earth-relative coordinates -- that is, an object + with no rotations will point toward true north and the Y axis will be up + against gravity. If this is 0, the object is drawn with your rotations from + local coordanates -- that is, an object with no rotations is drawn pointing + down the -Z axis and the Y axis of the object matches the local coordinate + Y axis. } PROCEDURE XPLMDrawObjects( inObject : XPLMObjectRef; - inCount : integer; + inCount : Integer; inLocations : PXPLMDrawInfo_t; - lighting : integer; - earth_relative : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} + lighting : Integer; + earth_relative : Integer); + cdecl; external XPLM_DLL; +{$ENDIF XPLM_DEPRECATED} {$IFDEF XPLM200} { XPLMUnloadObject - This routine marks an object as no longer being used by your plugin. - Objects are reference counted: once no plugins are using an object, it is - purged from memory. Make sure to call XPLMUnloadObject once for each - successful call to XPLMLoadObject. + This routine marks an object as no longer being used by your plugin. + Objects are reference counted: once no plugins are using an object, it is + purged from memory. Make sure to call XPLMUnloadObject once for each + successful call to XPLMLoadObject. } PROCEDURE XPLMUnloadObject( inObject : XPLMObjectRef); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} + cdecl; external XPLM_DLL; +{$ENDIF XPLM200} {$IFDEF XPLM200} {___________________________________________________________________________ * Library Access ___________________________________________________________________________} { - The library access routines allow you to locate scenery objects via the - X-Plane library system. Right now library access is only provided for - objects, allowing plugin-drawn objects to be extended using the library - system. + The library access routines allow you to locate scenery objects via the + X-Plane library system. Right now library access is only provided for + objects, allowing plugin-drawn objects to be extended using the library + system. } { XPLMLibraryEnumerator_f - An XPLMLibraryEnumerator_f is a callback you provide that is called once - for each library element that is located. The returned paths will be - relative to the X-System folder. + An XPLMLibraryEnumerator_f is a callback you provide that is called once + for each library element that is located. The returned paths will be + relative to the X-System folder. } TYPE XPLMLibraryEnumerator_f = PROCEDURE( - inFilePath : Pchar; + inFilePath : XPLMString; inRef : pointer); cdecl; { XPLMLookupObjects - This routine looks up a virtual path in the library system and returns all - matching elements. You provide a callback - one virtual path may match many - objects in the library. XPLMLookupObjects returns the number of objects - found. + This routine looks up a virtual path in the library system and returns all + matching elements. You provide a callback - one virtual path may match many + objects in the library. XPLMLookupObjects returns the number of objects + found. - The latitude and longitude parameters specify the location the object will - be used. The library system allows for scenery packages to only provide - objects to certain local locations. Only objects that are allowed at the - latitude/longitude you provide will be returned. + The latitude and longitude parameters specify the location the object will + be used. The library system allows for scenery packages to only provide + objects to certain local locations. Only objects that are allowed at the + latitude/longitude you provide will be returned. } FUNCTION XPLMLookupObjects( - inPath : Pchar; - inLatitude : single; - inLongitude : single; + inPath : XPLMString; + inLatitude : Single; + inLongitude : Single; enumerator : XPLMLibraryEnumerator_f; - ref : pointer) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + ref : pointer) : Integer; + cdecl; external XPLM_DLL; + +{$ENDIF XPLM200} -{$ENDIF} IMPLEMENTATION + END. diff --git a/src/SDK/Delphi/XPLM/XPLMUtilities.pas b/src/SDK/Delphi/XPLM/XPLMUtilities.pas index b8de3657..121e28b3 100755 --- a/src/SDK/Delphi/XPLM/XPLMUtilities.pas +++ b/src/SDK/Delphi/XPLM/XPLMUtilities.pas @@ -1,273 +1,252 @@ { - 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 XPLMUtilities; INTERFACE -{ - -} -USES XPLMDefs; +USES + XPLMDefs; {$A4} -{$IFDEF MSWINDOWS} - {$DEFINE DELPHI} -{$ENDIF} {___________________________________________________________________________ - * X-PLANE USER INTERACTION + * FILE UTILITIES ___________________________________________________________________________} { - The user interaction APIs let you simulate commands the user can do with a - joystick, keyboard etc. Note that it is generally safer for future - compatibility to use one of these commands than to manipulate the - underlying sim data. + The XPLMUtilities file APIs provide some basic file and path functions for + use with X-Plane. + + Directory Separators + -------------------- + + The XPLM has two modes it can work in: + + * X-Plane native paths: all paths are UTF8 strings, using the unix forward + slash (/) as the directory separating character. In native path mode, + you use the same path format for all three operating systems. + + * Legacy OS paths: the directroy separator is \ for Windows, : for OS X, + and / for Linux; OS paths are encoded in MacRoman for OS X using legacy + HFS conventions, use the application code page for multi-byte encoding + on Unix using DOS path conventions, and use UTF-8 for Linux. + + While legacy OS paths are the default, we strongly encourage you to opt in + to native paths using the XPLMEnableFeature API. + + * All OS X plugins should enable native paths all of the time; if you do + not do this, you will have to convert all paths back from HFS to Unix + (and deal with MacRoman) - code written using native paths and the C + file APIs "just works" on OS X. + + * For Linux plugins, there is no difference between the two encodings. + + * Windows plugins will need to convert the UTF8 file paths to UTF16 for + use with the "wide" APIs. While it might seem tempting to stick with + legacy OS paths (and just use the "ANSI" Windows APIs), X-Plane is fully + unicode-capable, and will often be installed in paths where the user's + directories have no ACP encoding. + + Full and Relative Paths + ----------------------- + + Some of these APIs use full paths, but others use paths relative to the + user's X-Plane installation. This is documented on a per-API basis. } +{$IFDEF XPLM200} { - XPLMCommandKeyID + XPLMDataFileType - These enums represent all the keystrokes available within X-Plane. They can - be sent to X-Plane directly. For example, you can reverse thrust using - these enumerations. + These enums define types of data files you can load or unload using the + SDK. } TYPE - XPLMCommandKeyID = ( - xplm_key_pause=0, - xplm_key_revthrust, - xplm_key_jettison, - xplm_key_brakesreg, - xplm_key_brakesmax, - xplm_key_gear, - xplm_key_timedn, - xplm_key_timeup, - xplm_key_fadec, - xplm_key_otto_dis, - xplm_key_otto_atr, - xplm_key_otto_asi, - xplm_key_otto_hdg, - xplm_key_otto_gps, - xplm_key_otto_lev, - xplm_key_otto_hnav, - xplm_key_otto_alt, - xplm_key_otto_vvi, - xplm_key_otto_vnav, - xplm_key_otto_nav1, - xplm_key_otto_nav2, - xplm_key_targ_dn, - xplm_key_targ_up, - xplm_key_hdgdn, - xplm_key_hdgup, - xplm_key_barodn, - xplm_key_baroup, - xplm_key_obs1dn, - xplm_key_obs1up, - xplm_key_obs2dn, - xplm_key_obs2up, - xplm_key_com1_1, - xplm_key_com1_2, - xplm_key_com1_3, - xplm_key_com1_4, - xplm_key_nav1_1, - xplm_key_nav1_2, - xplm_key_nav1_3, - xplm_key_nav1_4, - xplm_key_com2_1, - xplm_key_com2_2, - xplm_key_com2_3, - xplm_key_com2_4, - xplm_key_nav2_1, - xplm_key_nav2_2, - xplm_key_nav2_3, - xplm_key_nav2_4, - xplm_key_adf_1, - xplm_key_adf_2, - xplm_key_adf_3, - xplm_key_adf_4, - xplm_key_adf_5, - xplm_key_adf_6, - xplm_key_transpon_1, - xplm_key_transpon_2, - xplm_key_transpon_3, - xplm_key_transpon_4, - xplm_key_transpon_5, - xplm_key_transpon_6, - xplm_key_transpon_7, - xplm_key_transpon_8, - xplm_key_flapsup, - xplm_key_flapsdn, - xplm_key_cheatoff, - xplm_key_cheaton, - xplm_key_sbrkoff, - xplm_key_sbrkon, - xplm_key_ailtrimL, - xplm_key_ailtrimR, - xplm_key_rudtrimL, - xplm_key_rudtrimR, - xplm_key_elvtrimD, - xplm_key_elvtrimU, - xplm_key_forward, - xplm_key_down, - xplm_key_left, - xplm_key_right, - xplm_key_back, - xplm_key_tower, - xplm_key_runway, - xplm_key_chase, - xplm_key_free1, - xplm_key_free2, - xplm_key_spot, - xplm_key_fullscrn1, - xplm_key_fullscrn2, - xplm_key_tanspan, - xplm_key_smoke, - xplm_key_map, - xplm_key_zoomin, - xplm_key_zoomout, - xplm_key_cycledump, - xplm_key_replay, - xplm_key_tranID, - xplm_key_max + XPLMDataFileType = ( + { A situation (.sit) file, which starts off a flight in a given } + { configuration. } + xplm_DataFile_Situation = 1 + + { A situation movie (.smo) file, which replays a past flight. } + ,xplm_DataFile_ReplayMovie = 2 + ); - PXPLMCommandKeyID = ^XPLMCommandKeyID; + PXPLMDataFileType = ^XPLMDataFileType; +{$ENDIF XPLM200} { - XPLMCommandButtonID + XPLMGetSystemPath + + This function returns the full path to the X-System folder. Note that this + is a directory path, so it ends in a trailing : or /. - These are enumerations for all of the things you can do with a joystick - button in X-Plane. They currently match the buttons menu in the equipment - setup dialog, but these enums will be stable even if they change in - X-Plane. + The buffer you pass should be at least 512 characters long. The path is + returned using the current native or OS path conventions. } - XPLMCommandButtonID = ( - xplm_joy_nothing=0, - xplm_joy_start_all, - xplm_joy_start_0, - xplm_joy_start_1, - xplm_joy_start_2, - xplm_joy_start_3, - xplm_joy_start_4, - xplm_joy_start_5, - xplm_joy_start_6, - xplm_joy_start_7, - xplm_joy_throt_up, - xplm_joy_throt_dn, - xplm_joy_prop_up, - xplm_joy_prop_dn, - xplm_joy_mixt_up, - xplm_joy_mixt_dn, - xplm_joy_carb_tog, - xplm_joy_carb_on, - xplm_joy_carb_off, - xplm_joy_trev, - xplm_joy_trm_up, - xplm_joy_trm_dn, - xplm_joy_rot_trm_up, - xplm_joy_rot_trm_dn, - xplm_joy_rud_lft, - xplm_joy_rud_cntr, - xplm_joy_rud_rgt, - xplm_joy_ail_lft, - xplm_joy_ail_cntr, - xplm_joy_ail_rgt, - xplm_joy_B_rud_lft, - xplm_joy_B_rud_rgt, - xplm_joy_look_up, - xplm_joy_look_dn, - xplm_joy_look_lft, - xplm_joy_look_rgt, - xplm_joy_glance_l, - xplm_joy_glance_r, - xplm_joy_v_fnh, - xplm_joy_v_fwh, - xplm_joy_v_tra, - xplm_joy_v_twr, - xplm_joy_v_run, - xplm_joy_v_cha, - xplm_joy_v_fr1, - xplm_joy_v_fr2, - xplm_joy_v_spo, - xplm_joy_flapsup, - xplm_joy_flapsdn, - xplm_joy_vctswpfwd, - xplm_joy_vctswpaft, - xplm_joy_gear_tog, - xplm_joy_gear_up, - xplm_joy_gear_down, - xplm_joy_lft_brake, - xplm_joy_rgt_brake, - xplm_joy_brakesREG, - xplm_joy_brakesMAX, - xplm_joy_speedbrake, - xplm_joy_ott_dis, - xplm_joy_ott_atr, - xplm_joy_ott_asi, - xplm_joy_ott_hdg, - xplm_joy_ott_alt, - xplm_joy_ott_vvi, - xplm_joy_tim_start, - xplm_joy_tim_reset, - xplm_joy_ecam_up, - xplm_joy_ecam_dn, - xplm_joy_fadec, - xplm_joy_yaw_damp, - xplm_joy_art_stab, - xplm_joy_chute, - xplm_joy_JATO, - xplm_joy_arrest, - xplm_joy_jettison, - xplm_joy_fuel_dump, - xplm_joy_puffsmoke, - xplm_joy_prerotate, - xplm_joy_UL_prerot, - xplm_joy_UL_collec, - xplm_joy_TOGA, - xplm_joy_shutdown, - xplm_joy_con_atc, - xplm_joy_fail_now, - xplm_joy_pause, - xplm_joy_rock_up, - xplm_joy_rock_dn, - xplm_joy_rock_lft, - xplm_joy_rock_rgt, - xplm_joy_rock_for, - xplm_joy_rock_aft, - xplm_joy_idle_hilo, - xplm_joy_lanlights, - xplm_joy_max - ); - PXPLMCommandButtonID = ^XPLMCommandButtonID; + PROCEDURE XPLMGetSystemPath( + outSystemPath : XPLMString); + cdecl; external XPLM_DLL; + + { + XPLMGetPrefsPath + + This routine returns a full path to a file that is within X-Plane's + preferences directory. (You should remove the file name back to the last + directory separator to get the preferences directory using + XPLMExtractFileAndPath.) + + The buffer you pass should be at least 512 characters long. The path is + returned using the current native or OS path conventions. + } + PROCEDURE XPLMGetPrefsPath( + outPrefsPath : XPLMString); + cdecl; external XPLM_DLL; + + { + XPLMGetDirectorySeparator + + This routine returns a string with one char and a null terminator that is + the directory separator for the current platform. This allows you to write + code that concatinates directory paths without having to #ifdef for + platform. The character returned will reflect the current file path mode. + } + FUNCTION XPLMGetDirectorySeparator: XPLMString; + cdecl; external XPLM_DLL; + + { + XPLMExtractFileAndPath + + Given a full path to a file, this routine separates the path from the file. + If the path is a partial directory (e.g. ends in : or \) the trailing + directory separator is removed. This routine works in-place; a pointer to + the file part of the buffer is returned; the original buffer still starts + with the path and is null terminated with no trailing separator. + } + FUNCTION XPLMExtractFileAndPath( + inFullPath : XPLMString) : XPLMString; + cdecl; external XPLM_DLL; + + { + XPLMGetDirectoryContents + + This routine returns a list of files in a directory (specified by a full + path, no trailing : or \). The output is returned as a list of NULL + terminated strings. An index array (if specified) is filled with pointers + into the strings. The last file is indicated by a zero-length string (and + NULL in the indices). This routine will return 1 if you had capacity for + all files or 0 if you did not. You can also skip a given number of files. + + * inDirectoryPath - a null terminated C string containing the full path to + the directory with no trailing directory char. + + * inFirstReturn - the zero-based index of the first file in the directory + to return. (Usually zero to fetch all in one pass.) + + * outFileNames - a buffer to receive a series of sequential null + terminated C-string file names. A zero-length C string will be appended + to the very end. + + * inFileNameBufSize - the size of the file name buffer in bytes. + + * outIndices - a pointer to an array of character pointers that will + become an index into the directory. The last file will be followed by a + NULL value. Pass NULL if you do not want indexing information. + + * inIndexCount - the max size of the index in entries. + + * outTotalFiles - if not NULL, this is filled in with the number of files + in the directory. + + * outReturnedFiles - if not NULL, the number of files returned by this + iteration. + + Return value: 1 if all info could be returned, 0 if there was a buffer + overrun. + + WARNING: Before X-Plane 7 this routine did not properly iterate through + directories. If X-Plane + 6 compatibility is needed, use your own code to iterate directories. + } + FUNCTION XPLMGetDirectoryContents( + inDirectoryPath : XPLMString; + inFirstReturn : Integer; + outFileNames : XPLMString; + inFileNameBufSize : Integer; + outIndices : PXPLMString; { Can be nil } + inIndexCount : Integer; + outTotalFiles : PInteger; { Can be nil } + outReturnedFiles : PInteger) : Integer; { Can be nil } + cdecl; external XPLM_DLL; + +{$IFDEF XPLM200} + { + XPLMLoadDataFile + + Loads a data file of a given type. Paths must be relative to the X-System + folder. To clear the replay, pass a NULL file name (this is only valid with + replay movies, not sit files). + } + FUNCTION XPLMLoadDataFile( + inFileType : XPLMDataFileType; + inFilePath : XPLMString) : Integer; { Can be nil } + cdecl; external XPLM_DLL; +{$ENDIF XPLM200} + +{$IFDEF XPLM200} + { + XPLMSaveDataFile + + Saves the current situation or replay; paths are relative to the X-System + folder. + } + FUNCTION XPLMSaveDataFile( + inFileType : XPLMDataFileType; + inFilePath : XPLMString) : Integer; + cdecl; external XPLM_DLL; +{$ENDIF XPLM200} + +{___________________________________________________________________________ + * X-PLANE MISC + ___________________________________________________________________________} { XPLMHostApplicationID - The plug-in system is based on Austin's cross-platform OpenGL framework and - could theoretically be adapted to run in other apps like WorldMaker. The - plug-in system also runs against a test harness for internal development - and could be adapted to another flight sim (in theory at least). So an ID - is providing allowing plug-ins to indentify what app they are running - under. + While the plug-in SDK is only accessible to plugins running inside X-Plane, + the original authors considered extending the API to other applications + that shared basic infrastructure with X-Plane. These enumerations are + hold-overs from that original roadmap; all values other than X-Plane are + deprecated. Your plugin should never need this enumeration. } +TYPE XPLMHostApplicationID = ( xplm_Host_Unknown = 0 ,xplm_Host_XPlane = 1 +{$IFDEF XPLM_DEPRECATED} ,xplm_Host_PlaneMaker = 2 +{$ENDIF XPLM_DEPRECATED} +{$IFDEF XPLM_DEPRECATED} ,xplm_Host_WorldMaker = 3 +{$ENDIF XPLM_DEPRECATED} +{$IFDEF XPLM_DEPRECATED} ,xplm_Host_Briefer = 4 +{$ENDIF XPLM_DEPRECATED} +{$IFDEF XPLM_DEPRECATED} ,xplm_Host_PartMaker = 5 +{$ENDIF XPLM_DEPRECATED} +{$IFDEF XPLM_DEPRECATED} ,xplm_Host_YoungsMod = 6 +{$ENDIF XPLM_DEPRECATED} +{$IFDEF XPLM_DEPRECATED} ,xplm_Host_XAuto = 7 +{$ENDIF XPLM_DEPRECATED} ); PXPLMHostApplicationID = ^XPLMHostApplicationID; @@ -275,10 +254,10 @@ { XPLMLanguageCode - These enums define what language the sim is running in. These enumerations - do not imply that the sim can or does run in all of these languages; they - simply provide a known encoding in the event that a given sim version is - localized to a certain language. + These enums define what language the sim is running in. These enumerations + do not imply that the sim can or does run in all of these languages; they + simply provide a known encoding in the event that a given sim version is + localized to a certain language. } XPLMLanguageCode = ( xplm_Language_Unknown = 0 @@ -297,476 +276,258 @@ {$IFDEF XPLM200} ,xplm_Language_Russian = 7 -{$ENDIF} +{$ENDIF XPLM200} {$IFDEF XPLM200} ,xplm_Language_Greek = 8 -{$ENDIF} +{$ENDIF XPLM200} {$IFDEF XPLM200} ,xplm_Language_Japanese = 9 -{$ENDIF} +{$ENDIF XPLM200} -{$IFDEF XPLM200} +{$IFDEF XPLM300} ,xplm_Language_Chinese = 10 -{$ENDIF} +{$ENDIF XPLM300} ); PXPLMLanguageCode = ^XPLMLanguageCode; -{$IFDEF XPLM200} - { - XPLMDataFileType - - These enums define types of data files you can load or unload using the - SDK. - } - XPLMDataFileType = ( - { A situation (.sit) file, which starts off a flight in a given } - { configuration. } - xplm_DataFile_Situation = 1 - - { A situation movie (.smo) file, which replays a past flight. } - ,xplm_DataFile_ReplayMovie = 2 - - ); - PXPLMDataFileType = ^XPLMDataFileType; -{$ENDIF} - {$IFDEF XPLM200} { XPLMError_f - An XPLM error callback is a function that you provide to receive debugging - information from the plugin SDK. See XPLMSetErrorCallback for more - information. NOTE: for the sake of debugging, your error callback will be - called even if your plugin is not enabled, allowing you to receive debug - info in your XPluginStart and XPluginStop callbacks. To avoid causing logic - errors in the management code, do not call any other plugin routines from - your error callback - it is only meant for logging! + An XPLM error callback is a function that you provide to receive debugging + information from the plugin SDK. See XPLMSetErrorCallback for more + information. NOTE: for the sake of debugging, your error callback will be + called even if your plugin is not enabled, allowing you to receive debug + info in your XPluginStart and XPluginStop callbacks. To avoid causing logic + errors in the management code, do not call any other plugin routines from + your error callback - it is only meant for catching errors in the + debugging. } +TYPE XPLMError_f = PROCEDURE( - inMessage : Pchar); cdecl; -{$ENDIF} - - { - XPLMSimulateKeyPress - - This function simulates a key being pressed for X-Plane. The keystroke goes - directly to X-Plane; it is never sent to any plug-ins. However, since this - is a raw key stroke it may be mapped by the keys file or enter text into a - field. - - WARNING: This function will be deprecated; do not use it. Instead use - XPLMCommandKeyStroke. - } - PROCEDURE XPLMSimulateKeyPress( - inKeyType : integer; - inKey : integer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMSpeakString - - This function displays the string in a translucent overlay over the current - display and also speaks the string if text-to-speech is enabled. The string - is spoken asynchronously, this function returns immediately. - } - PROCEDURE XPLMSpeakString( - inString : Pchar); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMCommandKeyStroke - - This routine simulates a command-key stroke. However, the keys are done by - function, not by actual letter, so this function works even if the user has - remapped their keyboard. Examples of things you might do with this include - pausing the simulator. - } - PROCEDURE XPLMCommandKeyStroke( - inKey : XPLMCommandKeyID); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMCommandButtonPress - - This function simulates any of the actions that might be taken by pressing - a joystick button. However, this lets you call the command directly rather - than have to know which button is mapped where. Important: you must release - each button you press. The APIs are separate so that you can 'hold down' a - button for a fixed amount of time. - } - PROCEDURE XPLMCommandButtonPress( - inButton : XPLMCommandButtonID); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMCommandButtonRelease - - This function simulates any of the actions that might be taken by pressing - a joystick button. See XPLMCommandButtonPress - } - PROCEDURE XPLMCommandButtonRelease( - inButton : XPLMCommandButtonID); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMGetVirtualKeyDescription - - Given a virtual key code (as defined in XPLMDefs.h) this routine returns a - human-readable string describing the character. This routine is provided - for showing users what keyboard mappings they have set up. The string may - read 'unknown' or be a blank or NULL string if the virtual key is unknown. - } - FUNCTION XPLMGetVirtualKeyDescription( - inVirtualKey : char) : Pchar; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{___________________________________________________________________________ - * X-PLANE MISC - ___________________________________________________________________________} -{ - -} + inMessage : XPLMString); cdecl; +{$ENDIF XPLM200} +{$IFDEF XPLM_DEPRECATED} { - XPLMReloadScenery + XPLMInitialized - XPLMReloadScenery reloads the current set of scenery. You can use this - function in two typical ways: simply call it to reload the scenery, picking - up any new installed scenery, .env files, etc. from disk. Or, change the - lat/ref and lon/ref data refs and then call this function to shift the - scenery environment. - } - PROCEDURE XPLMReloadScenery; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMGetSystemPath + Deprecated: This function returns 1 if X-Plane has properly initialized the + plug-in system. If this routine returns 0, many XPLM functions will not + work. - This function returns the full path to the X-System folder. Note that this - is a directory path, so it ends in a trailing : or /. The buffer you pass - should be at least 512 characters long. + NOTE: because plugins are always called from within the XPLM, there is no + need to check for initialization; it will always return 1. This routine is + deprecated - you do not need to check it before continuing within your + plugin. } - PROCEDURE XPLMGetSystemPath( - outSystemPath : Pchar); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + FUNCTION XPLMInitialized: Integer; + cdecl; external XPLM_DLL; +{$ENDIF XPLM_DEPRECATED} { - XPLMGetPrefsPath + XPLMGetVersions - This routine returns a full path to a file that is within X-Plane's - preferences directory. (You should remove the file name back to the last - directory separator to get the preferences directory. The buffer you pass - should be at least 512 characters long. - } - PROCEDURE XPLMGetPrefsPath( - outPrefsPath : Pchar); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMGetDirectorySeparator + This routine returns the revision of both X-Plane and the XPLM DLL. All + versions are three-digit decimal numbers (e.g. 606 for version 6.06 of + X-Plane); the current revision of the XPLM is 200 (2.00). This routine also + returns the host ID of the app running us. - This routine returns a string with one char and a null terminator that is - the directory separator for the current platform. This allows you to write - code that concatinates directory paths without having to #ifdef for - platform. + The most common use of this routine is to special-case around X-Plane + version-specific behavior. } - FUNCTION XPLMGetDirectorySeparator: Pchar; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + PROCEDURE XPLMGetVersions( + outXPlaneVersion : PInteger; + outXPLMVersion : PInteger; + outHostID : PXPLMHostApplicationID); + cdecl; external XPLM_DLL; { - XPLMExtractFileAndPath + XPLMGetLanguage - Given a full path to a file, this routine separates the path from the file. - If the path is a partial directory (e.g. ends in : or \) the trailing - directory separator is removed. This routine works in-place; a pointer to - the file part of the buffer is returned; the original buffer still starts - with the path. + This routine returns the langauge the sim is running in. } - FUNCTION XPLMExtractFileAndPath( - inFullPath : Pchar) : Pchar; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + FUNCTION XPLMGetLanguage: XPLMLanguageCode; + cdecl; external XPLM_DLL; +{$IFDEF XPLM200} { - XPLMGetDirectoryContents - - This routine returns a list of files in a directory (specified by a full - path, no trailing : or \). The output is returned as a list of NULL - terminated strings. An index array (if specified) is filled with pointers - into the strings. This routine The last file is indicated by a zero-length - string (and NULL in the indices). This routine will return 1 if you had - capacity for all files or 0 if you did not. You can also skip a given - number of files. - - inDirectoryPath - a null terminated C string containing the full path to - the directory with no trailing directory char. - - inFirstReturn - the zero-based index of the first file in the directory to - return. (Usually zero to fetch all in one pass.) - - outFileNames - a buffer to receive a series of sequential null terminated - C-string file names. A zero-length C string will be appended to the very - end. + XPLMFindSymbol - inFileNameBufSize - the size of the file name buffer in bytes. + This routine will attempt to find the symbol passed in the inString + parameter. If the symbol is found a pointer the function is returned, + othewise the function will return NULL. - outIndices - a pointer to an array of character pointers that will become - an index into the directory. The last file will be followed by a NULL - value. Pass NULL if you do not want indexing information. + You can use XPLMFindSymbol to utilize newer SDK API features without + requiring newer versions of the SDK (and X-Plane) as your minimum X-Plane + version as follows: - inIndexCount - the max size of the index in entries. + * Define the XPLMnnn macro to the minimum required XPLM version you will + ship with (e.g. XPLM210 for X-Plane 10 compatibility). - outTotalFiles - if not NULL, this is filled in with the number of files in - the directory. + * Use XPLMGetVersions and XPLMFindSymbol to detect that the host sim is + new enough to use new functions and resolve function pointers. - outReturnedFiles - if not NULL, the number of files returned by this - iteration. + * Conditionally use the new functions if and only if XPLMFindSymbol only + returns a non- NULL pointer. - Return value - 1 if all info could be returned, 0 if there was a buffer - overrun. + Warning: you should always check the XPLM API version as well as the + results of XPLMFindSymbol to determine if funtionality is safe to use. - WARNING: Before X-Plane 7 this routine did not properly iterate through - directories. If X-Plane 6 compatibility is needed, use your own code to - iterate directories. + To use functionality via XPLMFindSymbol you will need to copy your own + definitions of the X-Plane API prototypes and cast the returned pointer to + the correct type. } - FUNCTION XPLMGetDirectoryContents( - inDirectoryPath : Pchar; - inFirstReturn : integer; - outFileNames : Pchar; - inFileNameBufSize : integer; - outIndices : PPchar; { Can be nil } - inIndexCount : integer; - outTotalFiles : Pinteger; { Can be nil } - outReturnedFiles : Pinteger) : integer; { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + FUNCTION XPLMFindSymbol( + inString : XPLMString) : pointer; + cdecl; external XPLM_DLL; +{$ENDIF XPLM200} +{$IFDEF XPLM200} { - XPLMInitialized - - This function returns 1 if X-Plane has properly initialized the plug-in - system. If this routine returns 0, many XPLM functions will not work. - - NOTE: Under normal circumstances a plug-in should never be running while - the plug-in manager is not initialized. + XPLMSetErrorCallback - WARNING: This function is generally not needed and may be deprecated in the - future. - } - FUNCTION XPLMInitialized: integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMGetVersions + XPLMSetErrorCallback installs an error-reporting callback for your plugin. + Normally the plugin system performs minimum diagnostics to maximize + performance. When you install an error callback, you will receive calls due + to certain plugin errors, such as passing bad parameters or incorrect data. - This routine returns the revision of both X-Plane and the XPLM DLL. All - versions are three-digit decimal numbers (e.g. 606 for version 6.06 of - X-Plane); the current revision of the XPLM is 200 (2.00). This routine also - returns the host ID of the app running us. + Important: the error callback determines *programming* errors, e.g. bad API + parameters. Every error that is returned by the error callback represents a + mistake in your plugin that you should fix. Error callbacks are not used to + report expected run-time problems (e.g. disk I/O errors). - The most common use of this routine is to special-case around X-Plane - version-specific behavior. - } - PROCEDURE XPLMGetVersions( - outXPlaneVersion : Pinteger; - outXPLMVersion : Pinteger; - outHostID : PXPLMHostApplicationID); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - - { - XPLMGetLanguage + The intention is for you to install the error callback during debug + sections and put a break-point inside your callback. This will cause you to + break into the debugger from within the SDK at the point in your plugin + where you made an illegal call. - This routine returns the langauge the sim is running in. + Installing an error callback may activate error checking code that would + not normally run, and this may adversely affect performance, so do not + leave error callbacks installed in shipping plugins. Since the only useful + response to an error is to change code, error callbacks are not useful "in + the field". } - FUNCTION XPLMGetLanguage: XPLMLanguageCode; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + PROCEDURE XPLMSetErrorCallback( + inCallback : XPLMError_f); + cdecl; external XPLM_DLL; +{$ENDIF XPLM200} { XPLMDebugString - This routine outputs a C-style string to the Log.txt file. The file is - immediately flushed so you will not lose data. (This does cause a - performance penalty.) - } - PROCEDURE XPLMDebugString( - inString : Pchar); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} - -{$IFDEF XPLM200} - { - XPLMSetErrorCallback - - XPLMSetErrorCallback installs an error-reporting callback for your plugin. - Normally the plugin system performs minimum diagnostics to maximize - performance. When you install an error callback, you will receive calls due - to certain plugin errors, such as passing bad parameters or incorrect data. + This routine outputs a C-style string to the Log.txt file. The file is + immediately flushed so you will not lose data. (This does cause a + performance penalty.) - - The intention is for you to install the error callback during debug - sections and put a break-point inside your callback. This will cause you to - break into the debugger from within the SDK at the point in your plugin - where you made an illegal call. - - Installing an error callback may activate error checking code that would - not normally run, and this may adversely affect performance, so do not - leave error callbacks installed in shipping plugins. + Please do *not* leave routine diagnostic logging enabled in your shipping + plugin. The X-Plane Log file is shared by X-Plane and every plugin in the + system, and plugins that (when functioning normally) print verbose log + output make it difficult for developers to find error conditions from other + parts of the system. } - PROCEDURE XPLMSetErrorCallback( - inCallback : XPLMError_f); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} + PROCEDURE XPLMDebugString( + inString : XPLMString); + cdecl; external XPLM_DLL; -{$IFDEF XPLM200} { - XPLMFindSymbol + XPLMSpeakString - This routine will attempt to find the symbol passed in the inString - parameter. If the symbol is found a pointer the function is returned, - othewise the function will return NULL. + This function displays the string in a translucent overlay over the current + display and also speaks the string if text-to-speech is enabled. The string + is spoken asynchronously, this function returns immediately. This function + may not speak or print depending on user preferences. } - FUNCTION XPLMFindSymbol( - inString : Pchar) : pointer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} + PROCEDURE XPLMSpeakString( + inString : XPLMString); + cdecl; external XPLM_DLL; -{$IFDEF XPLM200} { - XPLMLoadDataFile + XPLMGetVirtualKeyDescription - Loads a data file of a given type. Paths must be relative to the X-System - folder. To clear the replay, pass a NULL file name (this is only valid with - replay movies, not sit files). + Given a virtual key code (as defined in XPLMDefs.h) this routine returns a + human-readable string describing the character. This routine is provided + for showing users what keyboard mappings they have set up. The string may + read 'unknown' or be a blank or NULL string if the virtual key is unknown. } - FUNCTION XPLMLoadDataFile( - inFileType : XPLMDataFileType; - inFilePath : Pchar) : integer; { Can be nil } -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} + FUNCTION XPLMGetVirtualKeyDescription( + inVirtualKey : XPLMChar) : XPLMString; + cdecl; external XPLM_DLL; -{$IFDEF XPLM200} { - XPLMSaveDataFile + XPLMReloadScenery - Saves the current situation or replay; paths are relative to the X-System - folder. - } - FUNCTION XPLMSaveDataFile( - inFileType : XPLMDataFileType; - inFilePath : Pchar) : integer; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} -{$ENDIF} + XPLMReloadScenery reloads the current set of scenery. You can use this + function in two typical ways: simply call it to reload the scenery, picking + up any new installed scenery, .env files, etc. from disk. Or, change the + lat/ref and lon/ref data refs and then call this function to shift the + scenery environment. This routine is equivalent to picking "reload + scenery" from the developer menu. + } + PROCEDURE XPLMReloadScenery; + cdecl; external XPLM_DLL; {$IFDEF XPLM200} {___________________________________________________________________________ * X-PLANE COMMAND MANAGEMENT ___________________________________________________________________________} { - The command management APIs let plugins interact with the command-system in - X-Plane, the abstraction behind keyboard presses and joystick buttons. This - API lets you create new commands and modify the behavior (or get - notification) of existing ones. + The command management APIs let plugins interact with the command-system in + X-Plane, the abstraction behind keyboard presses and joystick buttons. This + API lets you create new commands and modify the behavior (or get + notification) of existing ones. + + X-Plane Command Phases + ---------------------- + + X-Plane commands are not instantaneous; they operate over a duration. + (Think of a joystick button press - you can press, hold down, and then + release the joystick button; X-Plane commands model this entire process.) + + An X-Plane command consists of three phases: a beginning, continuous + repetition, and an ending. The command may be repeated zero times in its + duration, followed by one command ending. Command begin and end messges are + balanced, but a command may be bound to more than one event source (e.g. a + keyboard key and a joystick button), in which case you may receive a second + begin during before any end). + + When you issue commands in the plugin system, you *must* balance every call + to XPLMCommandBegin with a call to XPLMCommandEnd with the same command + reference. + + Command Behavior Modification + ----------------------------- + + You can register a callback to handle a command either before or after + X-Plane does; if you receive the command before X-Plane you have the option + to either let X-Plane handle the command or hide the command from X-Plane. + This lets plugins both augment commands and replace them. - An X-Plane command consists of three phases: a beginning, continuous - repetition, and an ending. The command may be repeated zero times in the - event that the user presses a button only momentarily. + If you register for an existing command, be sure that you are *consistent* + in letting X-Plane handle or not handle the command; you are responsible + for passing a *balanced* number of begin and end messages to X-Plane. (E.g. + it is not legal to pass all the begin messages to X-Plane but hide all the + end messages). } { XPLMCommandPhase - The phases of a command. + The phases of a command. } TYPE XPLMCommandPhase = ( - { The command is being started. } + { The command is being started. } xplm_CommandBegin = 0 - { The command is continuing to execute. } + { The command is continuing to execute. } ,xplm_CommandContinue = 1 - { The command has ended. } + { The command has ended. } ,xplm_CommandEnd = 2 ); @@ -775,14 +536,14 @@ { XPLMCommandRef - A command ref is an opaque identifier for an X-Plane command. Command - references stay the same for the life of your plugin but not between - executions of X-Plane. Command refs are used to execute commands, create - commands, and create callbacks for particular commands. + A command ref is an opaque identifier for an X-Plane command. Command + references stay the same for the life of your plugin but not between + executions of X-Plane. Command refs are used to execute commands, create + commands, and create callbacks for particular commands. - Note that a command is not "owned" by a particular plugin. Since many - plugins may participate in a command's execution, the command does not go - away if the plugin that created it is unloaded. + Note that a command is not "owned" by a particular plugin. Since many + plugins may participate in a command's execution, the command does not go + away if the plugin that created it is unloaded. } XPLMCommandRef = pointer; PXPLMCommandRef = ^XPLMCommandRef; @@ -790,134 +551,401 @@ { XPLMCommandCallback_f - A command callback is a function in your plugin that is called when a - command is pressed. Your callback receives the command reference for the - particular command, the phase of the command that is executing, and a - reference pointer that you specify when registering the callback. + A command callback is a function in your plugin that is called when a + command is pressed. Your callback receives the command reference for the + particular command, the phase of the command that is executing, and a + reference pointer that you specify when registering the callback. - Your command handler should return 1 to let processing of the command - continue to other plugins and X-Plane, or 0 to halt processing, potentially - bypassing X-Plane code. + Your command handler should return 1 to let processing of the command + continue to other plugins and X-Plane, or 0 to halt processing, potentially + bypassing X-Plane code. } XPLMCommandCallback_f = FUNCTION( inCommand : XPLMCommandRef; inPhase : XPLMCommandPhase; - inRefcon : pointer) : integer; cdecl; + inRefcon : pointer) : Integer; cdecl; { XPLMFindCommand - XPLMFindCommand looks up a command by name, and returns its command - reference or NULL if the command does not exist. + XPLMFindCommand looks up a command by name, and returns its command + reference or NULL if the command does not exist. } FUNCTION XPLMFindCommand( - inName : Pchar) : XPLMCommandRef; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inName : XPLMString) : XPLMCommandRef; + cdecl; external XPLM_DLL; { XPLMCommandBegin - XPLMCommandBegin starts the execution of a command, specified by its - command reference. The command is "held down" until XPLMCommandEnd is - called. + XPLMCommandBegin starts the execution of a command, specified by its + command reference. The command is "held down" until XPLMCommandEnd is + called. You must balance each XPLMCommandBegin call with an XPLMCommandEnd + call. } PROCEDURE XPLMCommandBegin( inCommand : XPLMCommandRef); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMCommandEnd - XPLMCommandEnd ends the execution of a given command that was started with - XPLMCommandBegin. + XPLMCommandEnd ends the execution of a given command that was started with + XPLMCommandBegin. You must not issue XPLMCommandEnd for a command you did + not begin. } PROCEDURE XPLMCommandEnd( inCommand : XPLMCommandRef); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMCommandOnce - This executes a given command momentarily, that is, the command begins and - ends immediately. + This executes a given command momentarily, that is, the command begins and + ends immediately. This is the equivalent of calling XPLMCommandBegin() and + XPLMCommandEnd() back ot back. } PROCEDURE XPLMCommandOnce( inCommand : XPLMCommandRef); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMCreateCommand - XPLMCreateCommand creates a new command for a given string. If the command - already exists, the existing command reference is returned. The description - may appear in user interface contexts, such as the joystick configuration - screen. + XPLMCreateCommand creates a new command for a given string. If the command + already exists, the existing command reference is returned. The description + may appear in user interface contexts, such as the joystick configuration + screen. } FUNCTION XPLMCreateCommand( - inName : Pchar; - inDescription : Pchar) : XPLMCommandRef; -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + inName : XPLMString; + inDescription : XPLMString) : XPLMCommandRef; + cdecl; external XPLM_DLL; { XPLMRegisterCommandHandler - XPLMRegisterCommandHandler registers a callback to be called when a command - is executed. You provide a callback with a reference pointer. + XPLMRegisterCommandHandler registers a callback to be called when a command + is executed. You provide a callback with a reference pointer. - If inBefore is true, your command handler callback will be executed before - X-Plane executes the command, and returning 0 from your callback will - disable X-Plane's processing of the command. If inBefore is false, your - callback will run after X-Plane. (You can register a single callback both - before and after a command.) + If inBefore is true, your command handler callback will be executed before + X-Plane executes the command, and returning 0 from your callback will + disable X-Plane's processing of the command. If inBefore is false, your + callback will run after X-Plane. (You can register a single callback both + before and after a command.) } PROCEDURE XPLMRegisterCommandHandler( inComand : XPLMCommandRef; inHandler : XPLMCommandCallback_f; - inBefore : integer; + inBefore : Integer; inRefcon : pointer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; { XPLMUnregisterCommandHandler - XPLMUnregisterCommandHandler removes a command callback registered with - XPLMRegisterCommandHandler. + XPLMUnregisterCommandHandler removes a command callback registered with + XPLMRegisterCommandHandler. } PROCEDURE XPLMUnregisterCommandHandler( inComand : XPLMCommandRef; inHandler : XPLMCommandCallback_f; - inBefore : integer; + inBefore : Integer; inRefcon : pointer); -{$IFDEF DELPHI} - cdecl; external 'XPLM.DLL'; -{$ELSE} - cdecl; external ''; -{$ENDIF} + cdecl; external XPLM_DLL; + +{$ENDIF XPLM200} +{$IFDEF XPLM_DEPRECATED} +{___________________________________________________________________________ + * X-PLANE USER INTERACTION + ___________________________________________________________________________} +{ + WARNING: The legacy user interaction API is deprecated; while it was the + only way to run commands in X-Plane 6,7 and 8, it is obsolete, and was + replaced by the command system API in X-Plane 9. You should not use this + API; replace any of the calls below with XPLMCommand invocations based on + persistent command strings. The documentation that follows is for historic + reference only. + + The legacy user interaction APIs let you simulate commands the user can do + with a joystick, keyboard etc. Note that it is generally safer for future + compatibility to use one of these commands than to manipulate the + underlying sim data. +} + + + { + XPLMCommandKeyID + + These enums represent all the keystrokes available within X-Plane. They can + be sent to X-Plane directly. For example, you can reverse thrust using + these enumerations. + } +TYPE + XPLMCommandKeyID = ( + xplm_key_pause=0, + xplm_key_revthrust, + xplm_key_jettison, + xplm_key_brakesreg, + xplm_key_brakesmax, + xplm_key_gear, + xplm_key_timedn, + xplm_key_timeup, + xplm_key_fadec, + xplm_key_otto_dis, + xplm_key_otto_atr, + xplm_key_otto_asi, + xplm_key_otto_hdg, + xplm_key_otto_gps, + xplm_key_otto_lev, + xplm_key_otto_hnav, + xplm_key_otto_alt, + xplm_key_otto_vvi, + xplm_key_otto_vnav, + xplm_key_otto_nav1, + xplm_key_otto_nav2, + xplm_key_targ_dn, + xplm_key_targ_up, + xplm_key_hdgdn, + xplm_key_hdgup, + xplm_key_barodn, + xplm_key_baroup, + xplm_key_obs1dn, + xplm_key_obs1up, + xplm_key_obs2dn, + xplm_key_obs2up, + xplm_key_com1_1, + xplm_key_com1_2, + xplm_key_com1_3, + xplm_key_com1_4, + xplm_key_nav1_1, + xplm_key_nav1_2, + xplm_key_nav1_3, + xplm_key_nav1_4, + xplm_key_com2_1, + xplm_key_com2_2, + xplm_key_com2_3, + xplm_key_com2_4, + xplm_key_nav2_1, + xplm_key_nav2_2, + xplm_key_nav2_3, + xplm_key_nav2_4, + xplm_key_adf_1, + xplm_key_adf_2, + xplm_key_adf_3, + xplm_key_adf_4, + xplm_key_adf_5, + xplm_key_adf_6, + xplm_key_transpon_1, + xplm_key_transpon_2, + xplm_key_transpon_3, + xplm_key_transpon_4, + xplm_key_transpon_5, + xplm_key_transpon_6, + xplm_key_transpon_7, + xplm_key_transpon_8, + xplm_key_flapsup, + xplm_key_flapsdn, + xplm_key_cheatoff, + xplm_key_cheaton, + xplm_key_sbrkoff, + xplm_key_sbrkon, + xplm_key_ailtrimL, + xplm_key_ailtrimR, + xplm_key_rudtrimL, + xplm_key_rudtrimR, + xplm_key_elvtrimD, + xplm_key_elvtrimU, + xplm_key_forward, + xplm_key_down, + xplm_key_left, + xplm_key_right, + xplm_key_back, + xplm_key_tower, + xplm_key_runway, + xplm_key_chase, + xplm_key_free1, + xplm_key_free2, + xplm_key_spot, + xplm_key_fullscrn1, + xplm_key_fullscrn2, + xplm_key_tanspan, + xplm_key_smoke, + xplm_key_map, + xplm_key_zoomin, + xplm_key_zoomout, + xplm_key_cycledump, + xplm_key_replay, + xplm_key_tranID, + xplm_key_max + ); + PXPLMCommandKeyID = ^XPLMCommandKeyID; + + { + XPLMCommandButtonID + + These are enumerations for all of the things you can do with a joystick + button in X-Plane. They currently match the buttons menu in the equipment + setup dialog, but these enums will be stable even if they change in + X-Plane. + } + XPLMCommandButtonID = ( + xplm_joy_nothing=0, + xplm_joy_start_all, + xplm_joy_start_0, + xplm_joy_start_1, + xplm_joy_start_2, + xplm_joy_start_3, + xplm_joy_start_4, + xplm_joy_start_5, + xplm_joy_start_6, + xplm_joy_start_7, + xplm_joy_throt_up, + xplm_joy_throt_dn, + xplm_joy_prop_up, + xplm_joy_prop_dn, + xplm_joy_mixt_up, + xplm_joy_mixt_dn, + xplm_joy_carb_tog, + xplm_joy_carb_on, + xplm_joy_carb_off, + xplm_joy_trev, + xplm_joy_trm_up, + xplm_joy_trm_dn, + xplm_joy_rot_trm_up, + xplm_joy_rot_trm_dn, + xplm_joy_rud_lft, + xplm_joy_rud_cntr, + xplm_joy_rud_rgt, + xplm_joy_ail_lft, + xplm_joy_ail_cntr, + xplm_joy_ail_rgt, + xplm_joy_B_rud_lft, + xplm_joy_B_rud_rgt, + xplm_joy_look_up, + xplm_joy_look_dn, + xplm_joy_look_lft, + xplm_joy_look_rgt, + xplm_joy_glance_l, + xplm_joy_glance_r, + xplm_joy_v_fnh, + xplm_joy_v_fwh, + xplm_joy_v_tra, + xplm_joy_v_twr, + xplm_joy_v_run, + xplm_joy_v_cha, + xplm_joy_v_fr1, + xplm_joy_v_fr2, + xplm_joy_v_spo, + xplm_joy_flapsup, + xplm_joy_flapsdn, + xplm_joy_vctswpfwd, + xplm_joy_vctswpaft, + xplm_joy_gear_tog, + xplm_joy_gear_up, + xplm_joy_gear_down, + xplm_joy_lft_brake, + xplm_joy_rgt_brake, + xplm_joy_brakesREG, + xplm_joy_brakesMAX, + xplm_joy_speedbrake, + xplm_joy_ott_dis, + xplm_joy_ott_atr, + xplm_joy_ott_asi, + xplm_joy_ott_hdg, + xplm_joy_ott_alt, + xplm_joy_ott_vvi, + xplm_joy_tim_start, + xplm_joy_tim_reset, + xplm_joy_ecam_up, + xplm_joy_ecam_dn, + xplm_joy_fadec, + xplm_joy_yaw_damp, + xplm_joy_art_stab, + xplm_joy_chute, + xplm_joy_JATO, + xplm_joy_arrest, + xplm_joy_jettison, + xplm_joy_fuel_dump, + xplm_joy_puffsmoke, + xplm_joy_prerotate, + xplm_joy_UL_prerot, + xplm_joy_UL_collec, + xplm_joy_TOGA, + xplm_joy_shutdown, + xplm_joy_con_atc, + xplm_joy_fail_now, + xplm_joy_pause, + xplm_joy_rock_up, + xplm_joy_rock_dn, + xplm_joy_rock_lft, + xplm_joy_rock_rgt, + xplm_joy_rock_for, + xplm_joy_rock_aft, + xplm_joy_idle_hilo, + xplm_joy_lanlights, + xplm_joy_max + ); + PXPLMCommandButtonID = ^XPLMCommandButtonID; + + { + XPLMSimulateKeyPress + + This function simulates a key being pressed for X-Plane. The keystroke goes + directly to X-Plane; it is never sent to any plug-ins. However, since this + is a raw key stroke it may be mapped by the keys file or enter text into a + field. + + Deprecated: use XPLMCommandOnce + } + PROCEDURE XPLMSimulateKeyPress( + inKeyType : Integer; + inKey : Integer); + cdecl; external XPLM_DLL; + + { + XPLMCommandKeyStroke + + This routine simulates a command-key stroke. However, the keys are done by + function, not by actual letter, so this function works even if the user has + remapped their keyboard. Examples of things you might do with this include + pausing the simulator. + + Deprecated: use XPLMCommandOnce + } + PROCEDURE XPLMCommandKeyStroke( + inKey : XPLMCommandKeyID); + cdecl; external XPLM_DLL; + + { + XPLMCommandButtonPress + + This function simulates any of the actions that might be taken by pressing + a joystick button. However, this lets you call the command directly rather + than have to know which button is mapped where. Important: you must release + each button you press. The APIs are separate so that you can 'hold down' a + button for a fixed amount of time. + + Deprecated: use XPLMCommandBegin. + } + PROCEDURE XPLMCommandButtonPress( + inButton : XPLMCommandButtonID); + cdecl; external XPLM_DLL; + + { + XPLMCommandButtonRelease + + This function simulates any of the actions that might be taken by pressing + a joystick button. See XPLMCommandButtonPress. + + Deprecated: use XPLMCommandEnd. + } + PROCEDURE XPLMCommandButtonRelease( + inButton : XPLMCommandButtonID); + cdecl; external XPLM_DLL; + +{$ENDIF XPLM_DEPRECATED} -{$ENDIF} IMPLEMENTATION + END. diff --git a/src/SDK/Libraries/Mac/XPLM.framework/XPLM b/src/SDK/Libraries/Mac/XPLM.framework/XPLM index b7542d5469d0028aaa56a30c7af0bdac6143d6b9..334071184538ea16492dd9756e7132a1ac807b8d 100755 GIT binary patch literal 214288 zcmeFaeSB2K_4vPmEJP%1M8NofL`4A~6E&JOL|KxBySNc5f>_0%2tpNzWLJU+h9*&N zuUl!=mVUGqTie=4W33udFbI<1V-O!uR8UbTt`7(bD9ZlcXXfr^6N0v%-}n3a{r->_ zo4I%9%$YN1&YU@O=Hb5h^(Xs!dOR83JswXFeuwaD%<_2Z^^?bQIPWdpJf4b*i-MCb z;-&My%8ZUN?mIX=UVfm`|0*gX)2bux3qfaml>)Wzzg{&@9v|C*pI%e zr%tVyRy}oEWuzi<#g(1u+g@n!T|3BRm-i0%OmymRMa9&r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07 -0400 Subject: [PATCH 6/8] Finished support for SDK 303 --- src/CMakeLists.txt | 2 +- src/FlyWithLua.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6bb7ecb0..84724caf 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -47,7 +47,7 @@ endif () # Enable all X-Plane SDK APIs up to the newest version. -add_definitions(-DXPLM200=1 -DXPLM210=1 -DXPLM300=1 -DXPLM301=1) +add_definitions(-DXPLM200=1 -DXPLM210=1 -DXPLM300=1 -DXPLM301=1 -DXPLM303=1) # Define platform macros. add_definitions(-DAPL=$ -DIBM=$ -DLIN=$,$>>) diff --git a/src/FlyWithLua.cpp b/src/FlyWithLua.cpp index 22cdd198..db1ac6aa 100644 --- a/src/FlyWithLua.cpp +++ b/src/FlyWithLua.cpp @@ -2,7 +2,7 @@ // FlyWithLua Plugin for X-Plane 11 // ---------------------------------- -#define PLUGIN_VERSION "2.7.31 build " __DATE__ " " __TIME__ +#define PLUGIN_VERSION "2.7.32 build " __DATE__ " " __TIME__ #define PLUGIN_NAME "FlyWithLua NG" #define PLUGIN_DESCRIPTION "Next Generation Version " PLUGIN_VERSION @@ -133,6 +133,8 @@ * v2.7.30 [added] global varables PLANE_AUTHOR and PLANE_DESCRIP Thanks to Steven L. Goldberg. * [fixed] bug if you used the reload pluggins function Thanks to Steven L. Goldberg. * v2.7.31 [fixed] Fix hid_send_filled_feature_report, adjust length check Thanks to Daniel Peukert. + * v2.7.32 [fixed] Fix bug so we can now use SDK 303. + * * * * Markus (Teddii): From 93c0d6b6d6ac382ff13325c845dec2ee24898e40 Mon Sep 17 00:00:00 2001 From: sparker256 Date: Sat, 6 Nov 2021 19:54:08 -0400 Subject: [PATCH 7/8] Updated workflow --- .github/workflows/cmake.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 5fb029c1..15deb6c6 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -86,6 +86,6 @@ jobs: uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: FlyWithLua_all_platforms.zip + file: FlyWithLua_NG_Lin_Mac_Win.zip tag: ${{ github.ref }} - overwrite: true \ No newline at end of file + overwrite: true From 98664ee4451b9c0276194bb9ce29f9154c2e3555 Mon Sep 17 00:00:00 2001 From: sparker256 Date: Sat, 6 Nov 2021 20:00:50 -0400 Subject: [PATCH 8/8] Update Workflow again --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 15deb6c6..7b77e0bd 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -79,7 +79,7 @@ jobs: - name: Create plugin archive if: github.event_name == 'release' - run: zip -r FlyWithLua_all_platforms.zip FlyWithLua/ + run: zip -r FlyWithLua_NG_Lin_Mac_Win.zip FlyWithLua/ - name: Upload binaries to release if: github.event_name == 'release'