1pub const _VCRT_COMPILER_PREPROCESSOR: u32 = 1;
4pub const _SAL_VERSION: u32 = 20;
5pub const __SAL_H_VERSION: u32 = 180000000;
6pub const _USE_DECLSPECS_FOR_SAL: u32 = 0;
7pub const _USE_ATTRIBUTES_FOR_SAL: u32 = 0;
8pub const _CRT_PACKING: u32 = 8;
9pub const _HAS_EXCEPTIONS: u32 = 1;
10pub const _STL_LANG: u32 = 0;
11pub const _HAS_CXX17: u32 = 0;
12pub const _HAS_CXX20: u32 = 0;
13pub const _HAS_CXX23: u32 = 0;
14pub const _HAS_NODISCARD: u32 = 0;
15pub const WCHAR_MIN: u32 = 0;
16pub const WCHAR_MAX: u32 = 65535;
17pub const WINT_MIN: u32 = 0;
18pub const WINT_MAX: u32 = 65535;
19pub const XPLM_NO_PLUGIN_ID: i32 = -1;
20pub const XPLM_PLUGIN_XPLANE: u32 = 0;
21pub const kXPLM_Version: u32 = 411;
22pub const XPLM_KEY_RETURN: u32 = 13;
23pub const XPLM_KEY_ESCAPE: u32 = 27;
24pub const XPLM_KEY_TAB: u32 = 9;
25pub const XPLM_KEY_DELETE: u32 = 8;
26pub const XPLM_KEY_LEFT: u32 = 28;
27pub const XPLM_KEY_RIGHT: u32 = 29;
28pub const XPLM_KEY_UP: u32 = 30;
29pub const XPLM_KEY_DOWN: u32 = 31;
30pub const XPLM_KEY_0: u32 = 48;
31pub const XPLM_KEY_1: u32 = 49;
32pub const XPLM_KEY_2: u32 = 50;
33pub const XPLM_KEY_3: u32 = 51;
34pub const XPLM_KEY_4: u32 = 52;
35pub const XPLM_KEY_5: u32 = 53;
36pub const XPLM_KEY_6: u32 = 54;
37pub const XPLM_KEY_7: u32 = 55;
38pub const XPLM_KEY_8: u32 = 56;
39pub const XPLM_KEY_9: u32 = 57;
40pub const XPLM_KEY_DECIMAL: u32 = 46;
41pub const XPLM_VK_BACK: u32 = 8;
42pub const XPLM_VK_TAB: u32 = 9;
43pub const XPLM_VK_CLEAR: u32 = 12;
44pub const XPLM_VK_RETURN: u32 = 13;
45pub const XPLM_VK_ESCAPE: u32 = 27;
46pub const XPLM_VK_SPACE: u32 = 32;
47pub const XPLM_VK_PRIOR: u32 = 33;
48pub const XPLM_VK_NEXT: u32 = 34;
49pub const XPLM_VK_END: u32 = 35;
50pub const XPLM_VK_HOME: u32 = 36;
51pub const XPLM_VK_LEFT: u32 = 37;
52pub const XPLM_VK_UP: u32 = 38;
53pub const XPLM_VK_RIGHT: u32 = 39;
54pub const XPLM_VK_DOWN: u32 = 40;
55pub const XPLM_VK_SELECT: u32 = 41;
56pub const XPLM_VK_PRINT: u32 = 42;
57pub const XPLM_VK_EXECUTE: u32 = 43;
58pub const XPLM_VK_SNAPSHOT: u32 = 44;
59pub const XPLM_VK_INSERT: u32 = 45;
60pub const XPLM_VK_DELETE: u32 = 46;
61pub const XPLM_VK_HELP: u32 = 47;
62pub const XPLM_VK_0: u32 = 48;
63pub const XPLM_VK_1: u32 = 49;
64pub const XPLM_VK_2: u32 = 50;
65pub const XPLM_VK_3: u32 = 51;
66pub const XPLM_VK_4: u32 = 52;
67pub const XPLM_VK_5: u32 = 53;
68pub const XPLM_VK_6: u32 = 54;
69pub const XPLM_VK_7: u32 = 55;
70pub const XPLM_VK_8: u32 = 56;
71pub const XPLM_VK_9: u32 = 57;
72pub const XPLM_VK_A: u32 = 65;
73pub const XPLM_VK_B: u32 = 66;
74pub const XPLM_VK_C: u32 = 67;
75pub const XPLM_VK_D: u32 = 68;
76pub const XPLM_VK_E: u32 = 69;
77pub const XPLM_VK_F: u32 = 70;
78pub const XPLM_VK_G: u32 = 71;
79pub const XPLM_VK_H: u32 = 72;
80pub const XPLM_VK_I: u32 = 73;
81pub const XPLM_VK_J: u32 = 74;
82pub const XPLM_VK_K: u32 = 75;
83pub const XPLM_VK_L: u32 = 76;
84pub const XPLM_VK_M: u32 = 77;
85pub const XPLM_VK_N: u32 = 78;
86pub const XPLM_VK_O: u32 = 79;
87pub const XPLM_VK_P: u32 = 80;
88pub const XPLM_VK_Q: u32 = 81;
89pub const XPLM_VK_R: u32 = 82;
90pub const XPLM_VK_S: u32 = 83;
91pub const XPLM_VK_T: u32 = 84;
92pub const XPLM_VK_U: u32 = 85;
93pub const XPLM_VK_V: u32 = 86;
94pub const XPLM_VK_W: u32 = 87;
95pub const XPLM_VK_X: u32 = 88;
96pub const XPLM_VK_Y: u32 = 89;
97pub const XPLM_VK_Z: u32 = 90;
98pub const XPLM_VK_NUMPAD0: u32 = 96;
99pub const XPLM_VK_NUMPAD1: u32 = 97;
100pub const XPLM_VK_NUMPAD2: u32 = 98;
101pub const XPLM_VK_NUMPAD3: u32 = 99;
102pub const XPLM_VK_NUMPAD4: u32 = 100;
103pub const XPLM_VK_NUMPAD5: u32 = 101;
104pub const XPLM_VK_NUMPAD6: u32 = 102;
105pub const XPLM_VK_NUMPAD7: u32 = 103;
106pub const XPLM_VK_NUMPAD8: u32 = 104;
107pub const XPLM_VK_NUMPAD9: u32 = 105;
108pub const XPLM_VK_MULTIPLY: u32 = 106;
109pub const XPLM_VK_ADD: u32 = 107;
110pub const XPLM_VK_SEPARATOR: u32 = 108;
111pub const XPLM_VK_SUBTRACT: u32 = 109;
112pub const XPLM_VK_DECIMAL: u32 = 110;
113pub const XPLM_VK_DIVIDE: u32 = 111;
114pub const XPLM_VK_F1: u32 = 112;
115pub const XPLM_VK_F2: u32 = 113;
116pub const XPLM_VK_F3: u32 = 114;
117pub const XPLM_VK_F4: u32 = 115;
118pub const XPLM_VK_F5: u32 = 116;
119pub const XPLM_VK_F6: u32 = 117;
120pub const XPLM_VK_F7: u32 = 118;
121pub const XPLM_VK_F8: u32 = 119;
122pub const XPLM_VK_F9: u32 = 120;
123pub const XPLM_VK_F10: u32 = 121;
124pub const XPLM_VK_F11: u32 = 122;
125pub const XPLM_VK_F12: u32 = 123;
126pub const XPLM_VK_F13: u32 = 124;
127pub const XPLM_VK_F14: u32 = 125;
128pub const XPLM_VK_F15: u32 = 126;
129pub const XPLM_VK_F16: u32 = 127;
130pub const XPLM_VK_F17: u32 = 128;
131pub const XPLM_VK_F18: u32 = 129;
132pub const XPLM_VK_F19: u32 = 130;
133pub const XPLM_VK_F20: u32 = 131;
134pub const XPLM_VK_F21: u32 = 132;
135pub const XPLM_VK_F22: u32 = 133;
136pub const XPLM_VK_F23: u32 = 134;
137pub const XPLM_VK_F24: u32 = 135;
138pub const XPLM_VK_EQUAL: u32 = 176;
139pub const XPLM_VK_MINUS: u32 = 177;
140pub const XPLM_VK_RBRACE: u32 = 178;
141pub const XPLM_VK_LBRACE: u32 = 179;
142pub const XPLM_VK_QUOTE: u32 = 180;
143pub const XPLM_VK_SEMICOLON: u32 = 181;
144pub const XPLM_VK_BACKSLASH: u32 = 182;
145pub const XPLM_VK_COMMA: u32 = 183;
146pub const XPLM_VK_SLASH: u32 = 184;
147pub const XPLM_VK_PERIOD: u32 = 185;
148pub const XPLM_VK_BACKQUOTE: u32 = 186;
149pub const XPLM_VK_ENTER: u32 = 187;
150pub const XPLM_VK_NUMPAD_ENT: u32 = 188;
151pub const XPLM_VK_NUMPAD_EQ: u32 = 189;
152pub const XPLM_MAP_USER_INTERFACE: &[u8; 24] = b"XPLM_MAP_USER_INTERFACE\0";
153pub const XPLM_MAP_IOS: &[u8; 13] = b"XPLM_MAP_IOS\0";
154pub const XPLM_NAV_NOT_FOUND: i32 = -1;
155pub const XPLM_USER_AIRCRAFT: u32 = 0;
156pub const XPLM_MSG_PLANE_CRASHED: u32 = 101;
157pub const XPLM_MSG_PLANE_LOADED: u32 = 102;
158pub const XPLM_MSG_AIRPORT_LOADED: u32 = 103;
159pub const XPLM_MSG_SCENERY_LOADED: u32 = 104;
160pub const XPLM_MSG_AIRPLANE_COUNT_CHANGED: u32 = 105;
161pub const XPLM_MSG_PLANE_UNLOADED: u32 = 106;
162pub const XPLM_MSG_WILL_WRITE_PREFS: u32 = 107;
163pub const XPLM_MSG_LIVERY_LOADED: u32 = 108;
164pub const XPLM_MSG_ENTERED_VR: u32 = 109;
165pub const XPLM_MSG_EXITING_VR: u32 = 110;
166pub const XPLM_MSG_RELEASE_PLANES: u32 = 111;
167pub const XPLM_MSG_FMOD_BANK_LOADED: u32 = 112;
168pub const XPLM_MSG_FMOD_BANK_UNLOADING: u32 = 113;
169pub const XPLM_MSG_DATAREFS_ADDED: u32 = 114;
170pub const xpWidgetClass_None: u32 = 0;
171pub const xpWidgetClass_MainWindow: u32 = 1;
172pub const xpWidgetClass_SubWindow: u32 = 2;
173pub const xpWidgetClass_Button: u32 = 3;
174pub const xpWidgetClass_TextField: u32 = 4;
175pub const xpWidgetClass_ScrollBar: u32 = 5;
176pub const xpWidgetClass_Caption: u32 = 6;
177pub const xpWidgetClass_GeneralGraphics: u32 = 7;
178pub const xpWidgetClass_Progress: u32 = 8;
179pub const NO_PARENT: i32 = -1;
180pub const PARAM_PARENT: i32 = -2;
181pub type va_list = *mut ::std::os::raw::c_char;
182unsafe extern "C" {
183 pub fn __va_start(arg1: *mut *mut ::std::os::raw::c_char, ...);
184}
185pub type __vcrt_bool = bool;
186pub type wchar_t = ::std::os::raw::c_ushort;
187unsafe extern "C" {
188 pub fn __security_init_cookie();
189}
190unsafe extern "C" {
191 pub fn __security_check_cookie(_StackCookie: usize);
192}
193unsafe extern "C" {
194 pub fn __report_gsfailure(_StackCookie: usize) -> !;
195}
196unsafe extern "C" {
197 pub static mut __security_cookie: usize;
198}
199pub type int_least8_t = ::std::os::raw::c_schar;
200pub type int_least16_t = ::std::os::raw::c_short;
201pub type int_least32_t = ::std::os::raw::c_int;
202pub type int_least64_t = ::std::os::raw::c_longlong;
203pub type uint_least8_t = ::std::os::raw::c_uchar;
204pub type uint_least16_t = ::std::os::raw::c_ushort;
205pub type uint_least32_t = ::std::os::raw::c_uint;
206pub type uint_least64_t = ::std::os::raw::c_ulonglong;
207pub type int_fast8_t = ::std::os::raw::c_schar;
208pub type int_fast16_t = ::std::os::raw::c_int;
209pub type int_fast32_t = ::std::os::raw::c_int;
210pub type int_fast64_t = ::std::os::raw::c_longlong;
211pub type uint_fast8_t = ::std::os::raw::c_uchar;
212pub type uint_fast16_t = ::std::os::raw::c_uint;
213pub type uint_fast32_t = ::std::os::raw::c_uint;
214pub type uint_fast64_t = ::std::os::raw::c_ulonglong;
215pub type intmax_t = ::std::os::raw::c_longlong;
216pub type uintmax_t = ::std::os::raw::c_ulonglong;
217#[doc = " XPLMPluginID\n\n Each plug-in is identified by a unique integer ID. This ID can be used to\n disable or enable a plug-in, or discover what plug-in is 'running' at the\n time. A plug-in ID is unique within the currently running instance of\n X-Plane unless plug-ins are reloaded. Plug-ins may receive a different\n unique ID each time they are loaded. This includes the unloading and\n reloading of plugins that are part of the user's aircraft.\n\n For persistent identification of plug-ins, use XPLMFindPluginBySignature in\n XPLMUtiltiies.h .\n\n -1 indicates no plug-in.\n"]
218pub type XPLMPluginID = ::std::os::raw::c_int;
219#[doc = " The shift key is down"]
220pub const xplm_ShiftFlag: _bindgen_ty_1 = 1;
221#[doc = " The option or alt key is down"]
222pub const xplm_OptionAltFlag: _bindgen_ty_1 = 2;
223#[doc = " The control key is down"]
224pub const xplm_ControlFlag: _bindgen_ty_1 = 4;
225#[doc = " The key is being pressed down"]
226pub const xplm_DownFlag: _bindgen_ty_1 = 8;
227#[doc = " The key is being released"]
228pub const xplm_UpFlag: _bindgen_ty_1 = 16;
229#[doc = " XPLMKeyFlags\n\n These bitfields define modifier keys in a platform independent way. When a\n key is pressed, a series of messages are sent to your plugin. The down\n flag is set in the first of these messages, and the up flag in the last.\n While the key is held down, messages are sent with neither flag set to\n indicate that the key is being held down as a repeated character.\n\n The control flag is mapped to the control flag on Macintosh and PC.\n Generally X-Plane uses the control key and not the command key on\n Macintosh, providing a consistent interface across platforms that does not\n necessarily match the Macintosh user interface guidelines. There is not\n yet a way for plugins to access the Macintosh control keys without using\n #ifdefed code.\n"]
230pub type _bindgen_ty_1 = ::std::os::raw::c_int;
231pub type XPLMKeyFlags = ::std::os::raw::c_int;
232#[doc = " XPLMFixedString150_t\n\n A container for a fixed-size string buffer of 150 characters.\n"]
233#[repr(C)]
234#[derive(Debug, Copy, Clone)]
235pub struct XPLMFixedString150_t {
236 #[doc = " The size of the struct."]
237 pub buffer: [::std::os::raw::c_char; 150usize],
238}
239#[allow(clippy::unnecessary_operation, clippy::identity_op)]
240const _: () = {
241 ["Size of XPLMFixedString150_t"][::std::mem::size_of::<XPLMFixedString150_t>() - 150usize];
242 ["Alignment of XPLMFixedString150_t"][::std::mem::align_of::<XPLMFixedString150_t>() - 1usize];
243 ["Offset of field: XPLMFixedString150_t::buffer"]
244 [::std::mem::offset_of!(XPLMFixedString150_t, buffer) - 0usize];
245};
246#[doc = " X-Plane manages the cursor normally, plugin does not affect the cusrsor."]
247pub const xplm_CursorDefault: _bindgen_ty_2 = 0;
248#[doc = " X-Plane hides the cursor."]
249pub const xplm_CursorHidden: _bindgen_ty_2 = 1;
250#[doc = " X-Plane shows the cursor as the default arrow."]
251pub const xplm_CursorArrow: _bindgen_ty_2 = 2;
252#[doc = " X-Plane shows the cursor but lets you select an OS cursor."]
253pub const xplm_CursorCustom: _bindgen_ty_2 = 3;
254#[doc = " XPLMCursorStatus\n\n XPLMCursorStatus describes how you would like X-Plane to manage the cursor.\n See XPLMHandleCursor_f for more info.\n"]
255pub type _bindgen_ty_2 = ::std::os::raw::c_int;
256pub type XPLMCursorStatus = ::std::os::raw::c_int;
257pub const xplm_MouseDown: _bindgen_ty_3 = 1;
258pub const xplm_MouseDrag: _bindgen_ty_3 = 2;
259pub const xplm_MouseUp: _bindgen_ty_3 = 3;
260#[doc = " XPLMMouseStatus\n\n When the mouse is clicked, your mouse click routine is called\n repeatedly. It is first called with the mouse down message. It is\n then called zero or more times with the mouse-drag message, and finally\n it is called once with the mouse up message. All of these messages\n will be directed to the same window; you are guaranteed to not receive\n a drag or mouse-up event without first receiving the corresponding\n mouse-down.\n"]
261pub type _bindgen_ty_3 = ::std::os::raw::c_int;
262pub type XPLMMouseStatus = ::std::os::raw::c_int;
263#[doc = " Control the camera until the user picks a new view."]
264pub const xplm_ControlCameraUntilViewChanges: _bindgen_ty_4 = 1;
265#[doc = " Control the camera until your plugin is disabled or another plugin forcibly*\n takes control."]
266pub const xplm_ControlCameraForever: _bindgen_ty_4 = 2;
267#[doc = " XPLMCameraControlDuration\n\n This enumeration states how long you want to retain control of the camera.\n You can retain it indefinitely or until the user selects a new view.\n"]
268pub type _bindgen_ty_4 = ::std::os::raw::c_int;
269pub type XPLMCameraControlDuration = ::std::os::raw::c_int;
270#[doc = " XPLMCameraPosition_t\n\n This structure contains a full specification of the camera. X, Y, and Z are\n the camera's position in OpenGL coordinates; pitch, roll, and yaw are\n rotations from a camera facing flat north in degrees. Positive pitch means\n nose up, positive roll means roll right, and positive yaw means yaw right,\n all in degrees. Zoom is a zoom factor, with 1.0 meaning normal zoom and 2.0\n magnifying by 2x (objects appear larger).\n"]
271#[repr(C)]
272#[derive(Debug, Copy, Clone)]
273pub struct XPLMCameraPosition_t {
274 pub x: f32,
275 pub y: f32,
276 pub z: f32,
277 pub pitch: f32,
278 pub heading: f32,
279 pub roll: f32,
280 pub zoom: f32,
281}
282#[allow(clippy::unnecessary_operation, clippy::identity_op)]
283const _: () = {
284 ["Size of XPLMCameraPosition_t"][::std::mem::size_of::<XPLMCameraPosition_t>() - 28usize];
285 ["Alignment of XPLMCameraPosition_t"][::std::mem::align_of::<XPLMCameraPosition_t>() - 4usize];
286 ["Offset of field: XPLMCameraPosition_t::x"]
287 [::std::mem::offset_of!(XPLMCameraPosition_t, x) - 0usize];
288 ["Offset of field: XPLMCameraPosition_t::y"]
289 [::std::mem::offset_of!(XPLMCameraPosition_t, y) - 4usize];
290 ["Offset of field: XPLMCameraPosition_t::z"]
291 [::std::mem::offset_of!(XPLMCameraPosition_t, z) - 8usize];
292 ["Offset of field: XPLMCameraPosition_t::pitch"]
293 [::std::mem::offset_of!(XPLMCameraPosition_t, pitch) - 12usize];
294 ["Offset of field: XPLMCameraPosition_t::heading"]
295 [::std::mem::offset_of!(XPLMCameraPosition_t, heading) - 16usize];
296 ["Offset of field: XPLMCameraPosition_t::roll"]
297 [::std::mem::offset_of!(XPLMCameraPosition_t, roll) - 20usize];
298 ["Offset of field: XPLMCameraPosition_t::zoom"]
299 [::std::mem::offset_of!(XPLMCameraPosition_t, zoom) - 24usize];
300};
301#[doc = " XPLMCameraControl_f\n\n You use an XPLMCameraControl function to provide continuous control over\n the camera. You are passed a structure in which to put the new camera\n position; modify it and return 1 to reposition the camera. Return 0 to\n surrender control of the camera; camera control will be handled by X-Plane\n on this draw loop. The contents of the structure as you are called are\n undefined.\n\n If X-Plane is taking camera control away from you, this function will be\n called with inIsLosingControl set to 1 and ioCameraPosition NULL.\n"]
302pub type XPLMCameraControl_f = ::std::option::Option<
303 unsafe extern "C" fn(
304 outCameraPosition: *mut XPLMCameraPosition_t,
305 inIsLosingControl: ::std::os::raw::c_int,
306 inRefcon: *mut ::std::os::raw::c_void,
307 ) -> ::std::os::raw::c_int,
308>;
309unsafe extern "C" {
310 #[doc = " XPLMControlCamera\n\n This function repositions the camera on the next drawing cycle. You must\n pass a non-null control function. Specify in inHowLong how long you'd like\n control (indefinitely or until a new view mode is set by the user).\n"]
311 pub fn XPLMControlCamera(
312 inHowLong: XPLMCameraControlDuration,
313 inControlFunc: XPLMCameraControl_f,
314 inRefcon: *mut ::std::os::raw::c_void,
315 );
316}
317unsafe extern "C" {
318 #[doc = " XPLMDontControlCamera\n\n This function stops you from controlling the camera. If you have a camera\n control function, it will not be called with an inIsLosingControl flag.\n X-Plane will control the camera on the next cycle.\n\n For maximum compatibility you should not use this routine unless you are in\n posession of the camera.\n"]
319 pub fn XPLMDontControlCamera();
320}
321unsafe extern "C" {
322 #[doc = " XPLMIsCameraBeingControlled\n\n This routine returns 1 if the camera is being controlled, zero if it is\n not. If it is and you pass in a pointer to a camera control duration, the\n current control duration will be returned.\n"]
323 pub fn XPLMIsCameraBeingControlled(
324 outCameraControlDuration: *mut XPLMCameraControlDuration,
325 ) -> ::std::os::raw::c_int;
326}
327unsafe extern "C" {
328 #[doc = " XPLMReadCameraPosition\n\n This function reads the current camera position.\n"]
329 pub fn XPLMReadCameraPosition(outCameraPosition: *mut XPLMCameraPosition_t);
330}
331#[doc = " XPLMDataRef\n\n A dataref is an opaque handle to data provided by the simulator or another\n plugin. It uniquely identifies one variable (or array of variables) over\n the lifetime of your plugin. You never hard code these values; you always\n get them from XPLMFindDataRef.\n"]
332pub type XPLMDataRef = *mut ::std::os::raw::c_void;
333#[doc = " Data of a type the current XPLM doesn't do."]
334pub const xplmType_Unknown: _bindgen_ty_5 = 0;
335#[doc = " A single 4-byte integer, native endian."]
336pub const xplmType_Int: _bindgen_ty_5 = 1;
337#[doc = " A single 4-byte float, native endian."]
338pub const xplmType_Float: _bindgen_ty_5 = 2;
339#[doc = " A single 8-byte double, native endian."]
340pub const xplmType_Double: _bindgen_ty_5 = 4;
341#[doc = " An array of 4-byte floats, native endian."]
342pub const xplmType_FloatArray: _bindgen_ty_5 = 8;
343#[doc = " An array of 4-byte integers, native endian."]
344pub const xplmType_IntArray: _bindgen_ty_5 = 16;
345#[doc = " A variable block of data."]
346pub const xplmType_Data: _bindgen_ty_5 = 32;
347#[doc = " XPLMDataTypeID\n\n This is an enumeration that defines the type of the data behind a data\n reference. This allows you to sanity check that the data type matches what\n you expect. But for the most part, you will know the type of data you are\n expecting from the online documentation.\n\n Data types each take a bit field; it is legal to have a single dataref be\n more than one type of data. Whe this happens, you can pick any matching\n get/set API.\n"]
348pub type _bindgen_ty_5 = ::std::os::raw::c_int;
349pub type XPLMDataTypeID = ::std::os::raw::c_int;
350unsafe extern "C" {
351 #[doc = " XPLMCountDataRefs\n\n Returns the total number of datarefs that have been registered in X-Plane.\n"]
352 pub fn XPLMCountDataRefs() -> ::std::os::raw::c_int;
353}
354unsafe extern "C" {
355 #[doc = " XPLMGetDataRefsByIndex\n\n Given an offset and count, this function will return an array of\n XPLMDataRefs in that range. The offset/count idiom is useful for things\n like pagination.\n"]
356 pub fn XPLMGetDataRefsByIndex(
357 offset: ::std::os::raw::c_int,
358 count: ::std::os::raw::c_int,
359 outDataRefs: *mut XPLMDataRef,
360 );
361}
362#[doc = " XPLMDataRefInfo_t\n\n The XPLMDataRefInfo_t structure contains all of the information about a\n single data ref. The structure can be expanded in future SDK APIs to\n include more features. Always set the structSize member to the size of\n your struct in bytes!\n"]
363#[repr(C)]
364#[derive(Debug, Copy, Clone)]
365pub struct XPLMDataRefInfo_t {
366 #[doc = " Used to inform XPLMGetDatarefInfo() of the SDK version you compiled *\n against; should always be set to sizeof(XPLMDataRefInfo_t)"]
367 pub structSize: ::std::os::raw::c_int,
368 #[doc = " The full name/path of the data ref"]
369 pub name: *const ::std::os::raw::c_char,
370 pub type_: XPLMDataTypeID,
371 #[doc = " TRUE if the data ref permits writing to it. FALSE if it's read-only."]
372 pub writable: ::std::os::raw::c_int,
373 #[doc = " The handle to the plugin that registered this dataref."]
374 pub owner: XPLMPluginID,
375}
376#[allow(clippy::unnecessary_operation, clippy::identity_op)]
377const _: () = {
378 ["Size of XPLMDataRefInfo_t"][::std::mem::size_of::<XPLMDataRefInfo_t>() - 32usize];
379 ["Alignment of XPLMDataRefInfo_t"][::std::mem::align_of::<XPLMDataRefInfo_t>() - 8usize];
380 ["Offset of field: XPLMDataRefInfo_t::structSize"]
381 [::std::mem::offset_of!(XPLMDataRefInfo_t, structSize) - 0usize];
382 ["Offset of field: XPLMDataRefInfo_t::name"]
383 [::std::mem::offset_of!(XPLMDataRefInfo_t, name) - 8usize];
384 ["Offset of field: XPLMDataRefInfo_t::type_"]
385 [::std::mem::offset_of!(XPLMDataRefInfo_t, type_) - 16usize];
386 ["Offset of field: XPLMDataRefInfo_t::writable"]
387 [::std::mem::offset_of!(XPLMDataRefInfo_t, writable) - 20usize];
388 ["Offset of field: XPLMDataRefInfo_t::owner"]
389 [::std::mem::offset_of!(XPLMDataRefInfo_t, owner) - 24usize];
390};
391unsafe extern "C" {
392 #[doc = " XPLMGetDataRefInfo\n\n Give a data ref, this routine returns a populated struct containing the\n available information about the dataref.\n"]
393 pub fn XPLMGetDataRefInfo(inDataRef: XPLMDataRef, outInfo: *mut XPLMDataRefInfo_t);
394}
395unsafe extern "C" {
396 #[doc = " XPLMFindDataRef\n\n Given a C-style string that names the dataref, this routine looks up the\n actual opaque XPLMDataRef that you use to read and write the data. The\n string names for datarefs are published on the X-Plane SDK web site.\n\n This function returns NULL if the dataref cannot be found.\n\n NOTE: this function is relatively expensive; save the XPLMDataRef this\n function returns for future use. Do not look up your dataref by string\n every time you need to read or write it.\n"]
397 pub fn XPLMFindDataRef(inDataRefName: *const ::std::os::raw::c_char) -> XPLMDataRef;
398}
399unsafe extern "C" {
400 #[doc = " XPLMCanWriteDataRef\n\n Given a dataref, this routine returns true if you can successfully set the\n data, false otherwise. Some datarefs are read-only.\n\n NOTE: even if a dataref is marked writable, it may not act writable. This\n can happen for datarefs that X-Plane writes to on every frame of\n simulation. In some cases, the dataref is writable but you have to set a\n separate \"override\" dataref to 1 to stop X-Plane from writing it.\n"]
401 pub fn XPLMCanWriteDataRef(inDataRef: XPLMDataRef) -> ::std::os::raw::c_int;
402}
403unsafe extern "C" {
404 #[doc = " XPLMIsDataRefGood\n\n This function returns true if the passed in handle is a valid dataref that\n is not orphaned.\n\n Note: there is normally no need to call this function; datarefs returned by\n XPLMFindDataRef remain valid (but possibly orphaned) unless there is a\n complete plugin reload (in which case your plugin is reloaded anyway).\n Orphaned datarefs can be safely read and return 0. Therefore you never need\n to call XPLMIsDataRefGood to 'check' the safety of a dataref.\n (XPLMIsDataRefGood performs some slow checking of the handle validity, so\n it has a perormance cost.)\n"]
405 pub fn XPLMIsDataRefGood(inDataRef: XPLMDataRef) -> ::std::os::raw::c_int;
406}
407unsafe extern "C" {
408 #[doc = " XPLMGetDataRefTypes\n\n This routine returns the types of the dataref for accessor use. If a\n dataref is available in multiple data types, the bit-wise OR of these types\n will be returned.\n"]
409 pub fn XPLMGetDataRefTypes(inDataRef: XPLMDataRef) -> XPLMDataTypeID;
410}
411unsafe extern "C" {
412 #[doc = " XPLMGetDatai\n\n Read an integer dataref and return its value. The return value is the\n dataref value or 0 if the dataref is NULL or the plugin is disabled.\n"]
413 pub fn XPLMGetDatai(inDataRef: XPLMDataRef) -> ::std::os::raw::c_int;
414}
415unsafe extern "C" {
416 #[doc = " XPLMSetDatai\n\n Write a new value to an integer dataref. This routine is a no-op if the\n plugin publishing the dataref is disabled, the dataref is NULL, or the\n dataref is not writable.\n"]
417 pub fn XPLMSetDatai(inDataRef: XPLMDataRef, inValue: ::std::os::raw::c_int);
418}
419unsafe extern "C" {
420 #[doc = " XPLMGetDataf\n\n Read a single precision floating point dataref and return its value. The\n return value is the dataref value or 0.0 if the dataref is NULL or the\n plugin is disabled.\n"]
421 pub fn XPLMGetDataf(inDataRef: XPLMDataRef) -> f32;
422}
423unsafe extern "C" {
424 #[doc = " XPLMSetDataf\n\n Write a new value to a single precision floating point dataref. This\n routine is a no-op if the plugin publishing the dataref is disabled, the\n dataref is NULL, or the dataref is not writable.\n"]
425 pub fn XPLMSetDataf(inDataRef: XPLMDataRef, inValue: f32);
426}
427unsafe extern "C" {
428 #[doc = " XPLMGetDatad\n\n Read a double precision floating point dataref and return its value. The\n return value is the dataref value or 0.0 if the dataref is NULL or the\n plugin is disabled.\n"]
429 pub fn XPLMGetDatad(inDataRef: XPLMDataRef) -> f64;
430}
431unsafe extern "C" {
432 #[doc = " XPLMSetDatad\n\n Write a new value to a double precision floating point dataref. This\n routine is a no-op if the plugin publishing the dataref is disabled, the\n dataref is NULL, or the dataref is not writable.\n"]
433 pub fn XPLMSetDatad(inDataRef: XPLMDataRef, inValue: f64);
434}
435unsafe extern "C" {
436 #[doc = " XPLMGetDatavi\n\n Read a part of an integer array dataref. If you pass NULL for outValues,\n the routine will return the size of the array, ignoring inOffset and inMax.\n\n If outValues is not NULL, then up to inMax values are copied from the\n dataref into outValues, starting at inOffset in the dataref. If inMax +\n inOffset is larger than the size of the dataref, less than inMax values\n will be copied. The number of values copied is returned.\n\n Note: the semantics of array datarefs are entirely implemented by the\n plugin (or X-Plane) that provides the dataref, not the SDK itself; the\n above description is how these datarefs are intended to work, but a rogue\n plugin may have different behavior.\n"]
437 pub fn XPLMGetDatavi(
438 inDataRef: XPLMDataRef,
439 outValues: *mut ::std::os::raw::c_int,
440 inOffset: ::std::os::raw::c_int,
441 inMax: ::std::os::raw::c_int,
442 ) -> ::std::os::raw::c_int;
443}
444unsafe extern "C" {
445 #[doc = " XPLMSetDatavi\n\n Write part or all of an integer array dataref. The values passed by\n inValues are written into the dataref starting at inOffset. Up to inCount\n values are written; however if the values would write past the end of the\n dataref array, then fewer values are written.\n\n Note: the semantics of array datarefs are entirely implemented by the\n plugin (or X-Plane) that provides the dataref, not the SDK itself; the\n above description is how these datarefs are intended to work, but a rogue\n plugin may have different behavior.\n"]
446 pub fn XPLMSetDatavi(
447 inDataRef: XPLMDataRef,
448 inValues: *mut ::std::os::raw::c_int,
449 inoffset: ::std::os::raw::c_int,
450 inCount: ::std::os::raw::c_int,
451 );
452}
453unsafe extern "C" {
454 #[doc = " XPLMGetDatavf\n\n Read a part of a single precision floating point array dataref. If you pass\n NULL for outValues, the routine will return the size of the array, ignoring\n inOffset and inMax.\n\n If outValues is not NULL, then up to inMax values are copied from the\n dataref into outValues, starting at inOffset in the dataref. If inMax +\n inOffset is larger than the size of the dataref, less than inMax values\n will be copied. The number of values copied is returned.\n\n Note: the semantics of array datarefs are entirely implemented by the\n plugin (or X-Plane) that provides the dataref, not the SDK itself; the\n above description is how these datarefs are intended to work, but a rogue\n plugin may have different behavior.\n"]
455 pub fn XPLMGetDatavf(
456 inDataRef: XPLMDataRef,
457 outValues: *mut f32,
458 inOffset: ::std::os::raw::c_int,
459 inMax: ::std::os::raw::c_int,
460 ) -> ::std::os::raw::c_int;
461}
462unsafe extern "C" {
463 #[doc = " XPLMSetDatavf\n\n Write part or all of a single precision floating point array dataref. The\n values passed by inValues are written into the dataref starting at\n inOffset. Up to inCount values are written; however if the values would\n write past the end of the dataref array, then fewer values are written.\n\n Note: the semantics of array datarefs are entirely implemented by the\n plugin (or X-Plane) that provides the dataref, not the SDK itself; the\n above description is how these datarefs are intended to work, but a rogue\n plugin may have different behavior.\n"]
464 pub fn XPLMSetDatavf(
465 inDataRef: XPLMDataRef,
466 inValues: *mut f32,
467 inoffset: ::std::os::raw::c_int,
468 inCount: ::std::os::raw::c_int,
469 );
470}
471unsafe extern "C" {
472 #[doc = " XPLMGetDatab\n\n Read a part of a byte array dataref. If you pass NULL for outValues, the\n routine will return the size of the array, ignoring inOffset and inMax.\n\n If outValues is not NULL, then up to inMax values are copied from the\n dataref into outValues, starting at inOffset in the dataref. If inMax +\n inOffset is larger than the size of the dataref, less than inMax values\n will be copied. The number of values copied is returned.\n\n Note: the semantics of array datarefs are entirely implemented by the\n plugin (or X-Plane) that provides the dataref, not the SDK itself; the\n above description is how these datarefs are intended to work, but a rogue\n plugin may have different behavior.\n"]
473 pub fn XPLMGetDatab(
474 inDataRef: XPLMDataRef,
475 outValue: *mut ::std::os::raw::c_void,
476 inOffset: ::std::os::raw::c_int,
477 inMaxBytes: ::std::os::raw::c_int,
478 ) -> ::std::os::raw::c_int;
479}
480unsafe extern "C" {
481 #[doc = " XPLMSetDatab\n\n Write part or all of a byte array dataref. The values passed by inValues\n are written into the dataref starting at inOffset. Up to inCount values are\n written; however if the values would write \"off the end\" of the dataref\n array, then fewer values are written.\n\n Note: the semantics of array datarefs are entirely implemented by the\n plugin (or X-Plane) that provides the dataref, not the SDK itself; the\n above description is how these datarefs are intended to work, but a rogue\n plugin may have different behavior.\n"]
482 pub fn XPLMSetDatab(
483 inDataRef: XPLMDataRef,
484 inValue: *mut ::std::os::raw::c_void,
485 inOffset: ::std::os::raw::c_int,
486 inLength: ::std::os::raw::c_int,
487 );
488}
489#[doc = " XPLMGetDatai_f\n\n Data provider function pointers.\n\n These define the function pointers you provide to get or set data. Note\n that you are passed a generic pointer for each one. This is the same\n pointer you pass in your register routine; you can use it to locate plugin\n variables, etc.\n\n The semantics of your callbacks are the same as the dataref accessors above\n - basically routines like XPLMGetDatai are just pass-throughs from a caller\n to your plugin. Be particularly mindful in implementing array dataref\n read-write accessors; you are responsible for avoiding overruns, supporting\n offset read/writes, and handling a read with a NULL buffer.\n"]
490pub type XPLMGetDatai_f = ::std::option::Option<
491 unsafe extern "C" fn(inRefcon: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int,
492>;
493#[doc = " XPLMSetDatai_f\n"]
494pub type XPLMSetDatai_f = ::std::option::Option<
495 unsafe extern "C" fn(inRefcon: *mut ::std::os::raw::c_void, inValue: ::std::os::raw::c_int),
496>;
497#[doc = " XPLMGetDataf_f\n"]
498pub type XPLMGetDataf_f =
499 ::std::option::Option<unsafe extern "C" fn(inRefcon: *mut ::std::os::raw::c_void) -> f32>;
500#[doc = " XPLMSetDataf_f\n"]
501pub type XPLMSetDataf_f = ::std::option::Option<
502 unsafe extern "C" fn(inRefcon: *mut ::std::os::raw::c_void, inValue: f32),
503>;
504#[doc = " XPLMGetDatad_f\n"]
505pub type XPLMGetDatad_f =
506 ::std::option::Option<unsafe extern "C" fn(inRefcon: *mut ::std::os::raw::c_void) -> f64>;
507#[doc = " XPLMSetDatad_f\n"]
508pub type XPLMSetDatad_f = ::std::option::Option<
509 unsafe extern "C" fn(inRefcon: *mut ::std::os::raw::c_void, inValue: f64),
510>;
511#[doc = " XPLMGetDatavi_f\n"]
512pub type XPLMGetDatavi_f = ::std::option::Option<
513 unsafe extern "C" fn(
514 inRefcon: *mut ::std::os::raw::c_void,
515 outValues: *mut ::std::os::raw::c_int,
516 inOffset: ::std::os::raw::c_int,
517 inMax: ::std::os::raw::c_int,
518 ) -> ::std::os::raw::c_int,
519>;
520#[doc = " XPLMSetDatavi_f\n"]
521pub type XPLMSetDatavi_f = ::std::option::Option<
522 unsafe extern "C" fn(
523 inRefcon: *mut ::std::os::raw::c_void,
524 inValues: *mut ::std::os::raw::c_int,
525 inOffset: ::std::os::raw::c_int,
526 inCount: ::std::os::raw::c_int,
527 ),
528>;
529#[doc = " XPLMGetDatavf_f\n"]
530pub type XPLMGetDatavf_f = ::std::option::Option<
531 unsafe extern "C" fn(
532 inRefcon: *mut ::std::os::raw::c_void,
533 outValues: *mut f32,
534 inOffset: ::std::os::raw::c_int,
535 inMax: ::std::os::raw::c_int,
536 ) -> ::std::os::raw::c_int,
537>;
538#[doc = " XPLMSetDatavf_f\n"]
539pub type XPLMSetDatavf_f = ::std::option::Option<
540 unsafe extern "C" fn(
541 inRefcon: *mut ::std::os::raw::c_void,
542 inValues: *mut f32,
543 inOffset: ::std::os::raw::c_int,
544 inCount: ::std::os::raw::c_int,
545 ),
546>;
547#[doc = " XPLMGetDatab_f\n"]
548pub type XPLMGetDatab_f = ::std::option::Option<
549 unsafe extern "C" fn(
550 inRefcon: *mut ::std::os::raw::c_void,
551 outValue: *mut ::std::os::raw::c_void,
552 inOffset: ::std::os::raw::c_int,
553 inMaxLength: ::std::os::raw::c_int,
554 ) -> ::std::os::raw::c_int,
555>;
556#[doc = " XPLMSetDatab_f\n"]
557pub type XPLMSetDatab_f = ::std::option::Option<
558 unsafe extern "C" fn(
559 inRefcon: *mut ::std::os::raw::c_void,
560 inValue: *mut ::std::os::raw::c_void,
561 inOffset: ::std::os::raw::c_int,
562 inLength: ::std::os::raw::c_int,
563 ),
564>;
565unsafe extern "C" {
566 #[doc = " XPLMRegisterDataAccessor\n\n This routine creates a new item of data that can be read and written. Pass\n in the data's full name for searching, the type(s) of the data for\n accessing, and whether the data can be written to. For each data type you\n support, pass in a read accessor function and a write accessor function if\n necessary. Pass NULL for data types you do not support or write accessors\n if you are read-only.\n\n You are returned a dataref for the new item of data created. You can use\n this dataref to unregister your data later or read or write from it.\n"]
567 pub fn XPLMRegisterDataAccessor(
568 inDataName: *const ::std::os::raw::c_char,
569 inDataType: XPLMDataTypeID,
570 inIsWritable: ::std::os::raw::c_int,
571 inReadInt: XPLMGetDatai_f,
572 inWriteInt: XPLMSetDatai_f,
573 inReadFloat: XPLMGetDataf_f,
574 inWriteFloat: XPLMSetDataf_f,
575 inReadDouble: XPLMGetDatad_f,
576 inWriteDouble: XPLMSetDatad_f,
577 inReadIntArray: XPLMGetDatavi_f,
578 inWriteIntArray: XPLMSetDatavi_f,
579 inReadFloatArray: XPLMGetDatavf_f,
580 inWriteFloatArray: XPLMSetDatavf_f,
581 inReadData: XPLMGetDatab_f,
582 inWriteData: XPLMSetDatab_f,
583 inReadRefcon: *mut ::std::os::raw::c_void,
584 inWriteRefcon: *mut ::std::os::raw::c_void,
585 ) -> XPLMDataRef;
586}
587unsafe extern "C" {
588 #[doc = " XPLMUnregisterDataAccessor\n\n Use this routine to unregister any data accessors you may have registered.\n You unregister a dataref by the XPLMDataRef you get back from registration.\n Once you unregister a dataref, your function pointer will not be called\n anymore.\n"]
589 pub fn XPLMUnregisterDataAccessor(inDataRef: XPLMDataRef);
590}
591#[doc = " XPLMDataChanged_f\n\n An XPLMDataChanged_f is a callback that the XPLM calls whenever any other\n plug-in modifies shared data. A refcon you provide is passed back to help\n identify which data is being changed. In response, you may want to call one\n of the XPLMGetDataxxx routines to find the new value of the data.\n"]
592pub type XPLMDataChanged_f =
593 ::std::option::Option<unsafe extern "C" fn(inRefcon: *mut ::std::os::raw::c_void)>;
594unsafe extern "C" {
595 #[doc = " XPLMShareData\n\n This routine connects a plug-in to shared data, creating the shared data if\n necessary. inDataName is a standard path for the dataref, and inDataType\n specifies the type. This function will create the data if it does not\n exist. If the data already exists but the type does not match, an error is\n returned, so it is important that plug-in authors collaborate to establish\n public standards for shared data.\n\n If a notificationFunc is passed in and is not NULL, that notification\n function will be called whenever the data is modified. The notification\n refcon will be passed to it. This allows your plug-in to know which shared\n data was changed if multiple shared data are handled by one callback, or if\n the plug-in does not use global variables.\n\n A one is returned for successfully creating or finding the shared data; a\n zero if the data already exists but is of the wrong type.\n"]
596 pub fn XPLMShareData(
597 inDataName: *const ::std::os::raw::c_char,
598 inDataType: XPLMDataTypeID,
599 inNotificationFunc: XPLMDataChanged_f,
600 inNotificationRefcon: *mut ::std::os::raw::c_void,
601 ) -> ::std::os::raw::c_int;
602}
603unsafe extern "C" {
604 #[doc = " XPLMUnshareData\n\n This routine removes your notification function for shared data. Call it\n when done with the data to stop receiving change notifications. Arguments\n must match XPLMShareData. The actual memory will not necessarily be freed,\n since other plug-ins could be using it.\n"]
605 pub fn XPLMUnshareData(
606 inDataName: *const ::std::os::raw::c_char,
607 inDataType: XPLMDataTypeID,
608 inNotificationFunc: XPLMDataChanged_f,
609 inNotificationRefcon: *mut ::std::os::raw::c_void,
610 ) -> ::std::os::raw::c_int;
611}
612#[doc = " This is the first phase where you can draw in 2-d."]
613pub const xplm_Phase_FirstCockpit: _bindgen_ty_6 = 35;
614#[doc = " The non-moving parts of the aircraft panel."]
615pub const xplm_Phase_Panel: _bindgen_ty_6 = 40;
616#[doc = " The moving parts of the aircraft panel."]
617pub const xplm_Phase_Gauges: _bindgen_ty_6 = 45;
618#[doc = " Floating windows from plugins."]
619pub const xplm_Phase_Window: _bindgen_ty_6 = 50;
620#[doc = " The last chance to draw in 2d."]
621pub const xplm_Phase_LastCockpit: _bindgen_ty_6 = 55;
622#[doc = " Removed as of XPLM300; Use the full-blown XPLMMap API instead."]
623pub const xplm_Phase_LocalMap3D: _bindgen_ty_6 = 100;
624#[doc = " Removed as of XPLM300; Use the full-blown XPLMMap API instead."]
625pub const xplm_Phase_LocalMap2D: _bindgen_ty_6 = 101;
626#[doc = " Removed as of XPLM300; Use the full-blown XPLMMap API instead."]
627pub const xplm_Phase_LocalMapProfile: _bindgen_ty_6 = 102;
628#[doc = " XPLMDrawingPhase\n\n This constant indicates which part of drawing we are in. Drawing is done\n from the back to the front. We get a callback before or after each item.\n Metaphases provide access to the beginning and end of the 3d (scene) and\n 2d (cockpit) drawing in a manner that is independent of new phases added\n via X-Plane implementation.\n\n **NOTE**: As of XPLM302 the legacy 3D drawing phases (xplm_Phase_FirstScene\n to xplm_Phase_LastScene) are deprecated. When running under X-Plane 11.50\n with the modern Vulkan or Metal backend, X-Plane will no longer call\n these drawing phases. There is a new drawing phase, xplm_Phase_Modern3D,\n which is supported under OpenGL and Vulkan which is called out roughly\n where the old before xplm_Phase_Airplanes phase was for blending. This\n phase is *NOT* supported under Metal and comes with potentially\n substantial performance overhead. Please do *NOT* opt into this phase if\n you don't do any actual drawing that requires the depth buffer in some\n way!\n\n **WARNING**: As X-Plane's scenery evolves, some drawing phases may cease to\n exist and new ones may be invented. If you need a particularly specific\n use of these codes, consult Austin and/or be prepared to revise your code\n as X-Plane evolves.\n"]
629pub type _bindgen_ty_6 = ::std::os::raw::c_int;
630pub type XPLMDrawingPhase = ::std::os::raw::c_int;
631#[doc = " XPLMDrawCallback_f\n\n This is the prototype for a low level drawing callback. You are passed in\n the phase and whether it is before or after. If you are before the phase,\n return 1 to let X-Plane draw or 0 to suppress X-Plane drawing. If you are\n after the phase the return value is ignored.\n\n Refcon is a unique value that you specify when registering the callback,\n allowing you to slip a pointer to your own data to the callback.\n\n Upon entry the OpenGL context will be correctly set up for you and OpenGL\n will be in 'local' coordinates for 3d drawing and panel coordinates for 2d\n drawing. The OpenGL state (texturing, etc.) will be unknown.\n"]
632pub type XPLMDrawCallback_f = ::std::option::Option<
633 unsafe extern "C" fn(
634 inPhase: XPLMDrawingPhase,
635 inIsBefore: ::std::os::raw::c_int,
636 inRefcon: *mut ::std::os::raw::c_void,
637 ) -> ::std::os::raw::c_int,
638>;
639unsafe extern "C" {
640 #[doc = " XPLMRegisterDrawCallback\n\n This routine registers a low level drawing callback. Pass in the phase you\n want to be called for and whether you want to be called before or after.\n This routine returns 1 if the registration was successful, or 0 if the\n phase does not exist in this version of X-Plane. You may register a\n callback multiple times for the same or different phases as long as the\n refcon is unique each time.\n\n Note that this function will likely be removed during the X-Plane 11 run as\n part of the transition to Vulkan/Metal/etc. See the XPLMInstance API for\n future-proof drawing of 3-D objects.\n"]
641 pub fn XPLMRegisterDrawCallback(
642 inCallback: XPLMDrawCallback_f,
643 inPhase: XPLMDrawingPhase,
644 inWantsBefore: ::std::os::raw::c_int,
645 inRefcon: *mut ::std::os::raw::c_void,
646 ) -> ::std::os::raw::c_int;
647}
648unsafe extern "C" {
649 #[doc = " XPLMUnregisterDrawCallback\n\n This routine unregisters a draw callback. You must unregister a callback\n for each time you register a callback if you have registered it multiple\n times with different refcons. The routine returns 1 if it can find the\n callback to unregister, 0 otherwise.\n\n Note that this function will likely be removed during the X-Plane 11 run as\n part of the transition to Vulkan/Metal/etc. See the XPLMInstance API for\n future-proof drawing of 3-D objects.\n"]
650 pub fn XPLMUnregisterDrawCallback(
651 inCallback: XPLMDrawCallback_f,
652 inPhase: XPLMDrawingPhase,
653 inWantsBefore: ::std::os::raw::c_int,
654 inRefcon: *mut ::std::os::raw::c_void,
655 ) -> ::std::os::raw::c_int;
656}
657#[doc = " GNS430, pilot side."]
658pub const xplm_device_GNS430_1: _bindgen_ty_7 = 0;
659#[doc = " GNS430, copilot side."]
660pub const xplm_device_GNS430_2: _bindgen_ty_7 = 1;
661#[doc = " GNS530, pilot side."]
662pub const xplm_device_GNS530_1: _bindgen_ty_7 = 2;
663#[doc = " GNS530, copilot side."]
664pub const xplm_device_GNS530_2: _bindgen_ty_7 = 3;
665#[doc = " generic airliner CDU, pilot side."]
666pub const xplm_device_CDU739_1: _bindgen_ty_7 = 4;
667#[doc = " generic airliner CDU, copilot side."]
668pub const xplm_device_CDU739_2: _bindgen_ty_7 = 5;
669#[doc = " G1000 Primary Flight Display, pilot side."]
670pub const xplm_device_G1000_PFD_1: _bindgen_ty_7 = 6;
671#[doc = " G1000 Multifunction Display."]
672pub const xplm_device_G1000_MFD: _bindgen_ty_7 = 7;
673#[doc = " G1000 Primary Flight Display, copilot side."]
674pub const xplm_device_G1000_PFD_2: _bindgen_ty_7 = 8;
675#[doc = " Primus CDU, pilot side."]
676pub const xplm_device_CDU815_1: _bindgen_ty_7 = 9;
677#[doc = " Primus CDU, copilot side."]
678pub const xplm_device_CDU815_2: _bindgen_ty_7 = 10;
679#[doc = " Primus Primary Flight Display, pilot side."]
680pub const xplm_device_Primus_PFD_1: _bindgen_ty_7 = 11;
681#[doc = " Primus Primary Flight Display, copilot side."]
682pub const xplm_device_Primus_PFD_2: _bindgen_ty_7 = 12;
683#[doc = " Primus Multifunction Display, pilot side."]
684pub const xplm_device_Primus_MFD_1: _bindgen_ty_7 = 13;
685#[doc = " Primus Multifunction Display, copilot side."]
686pub const xplm_device_Primus_MFD_2: _bindgen_ty_7 = 14;
687#[doc = " Primus Multifunction Display, central."]
688pub const xplm_device_Primus_MFD_3: _bindgen_ty_7 = 15;
689#[doc = " Primus Radio Management Unit, pilot side."]
690pub const xplm_device_Primus_RMU_1: _bindgen_ty_7 = 16;
691#[doc = " Primus Radio Management Unit, copilot side."]
692pub const xplm_device_Primus_RMU_2: _bindgen_ty_7 = 17;
693#[doc = " Airbus MCDU, pilot side."]
694pub const xplm_device_MCDU_1: _bindgen_ty_7 = 18;
695#[doc = " Airbus MCDU, copilot side."]
696pub const xplm_device_MCDU_2: _bindgen_ty_7 = 19;
697#[doc = " XPLMDeviceID\n\n This constant indicates the device we want to override or enhance. We can\n get a callback before or after each item.\n"]
698pub type _bindgen_ty_7 = ::std::os::raw::c_int;
699pub type XPLMDeviceID = ::std::os::raw::c_int;
700#[doc = " XPLMAvionicsCallback_f\n\n This is the prototype for drawing callbacks for customized built-in device.\n You are passed in the device you are enhancing/replacing, and (if this is\n used for a built-in device that you are customizing) whether it is before\n or after X-Plane drawing. If you are before X-Plane, return 1 to let\n X-Plane draw or 0 to suppress X-Plane drawing. If you are called after\n X-Plane, the return value is ignored.\n\n Refcon is a unique value that you specify when registering the callback,\n allowing you to slip a pointer to your own data to the callback.\n\n Upon entry the OpenGL context will be correctly set up for you and OpenGL\n will be in panel coordinates for 2d drawing. The OpenGL state (texturing,\n etc.) will be unknown.\n"]
701pub type XPLMAvionicsCallback_f = ::std::option::Option<
702 unsafe extern "C" fn(
703 inDeviceID: XPLMDeviceID,
704 inIsBefore: ::std::os::raw::c_int,
705 inRefcon: *mut ::std::os::raw::c_void,
706 ) -> ::std::os::raw::c_int,
707>;
708#[doc = " XPLMAvionicsMouse_f\n\n Mouse click callback for clicks into your screen or (2D-popup) bezel,\n useful if the device you are making simulates a touch-screen the user can\n click in the 3d cockpit, or if your pop-up's bezel has buttons that the\n user can click. Return 1 to consume the event, or 0 to let X-Plane process\n it (for stock avionics devices).\n"]
709pub type XPLMAvionicsMouse_f = ::std::option::Option<
710 unsafe extern "C" fn(
711 x: ::std::os::raw::c_int,
712 y: ::std::os::raw::c_int,
713 inMouse: XPLMMouseStatus,
714 inRefcon: *mut ::std::os::raw::c_void,
715 ) -> ::std::os::raw::c_int,
716>;
717#[doc = " XPLMAvionicsMouseWheel_f\n\n Mouse wheel callback for scroll actions into your screen or (2D-popup)\n bezel, useful if your bezel has knobs that can be turned using the mouse\n wheel, or if you want to simulate pinch-to-zoom on a touchscreen. Return 1\n to consume the event, or 0 to let X-Plane process it (for stock avionics\n devices). The number of \"clicks\" indicates how far the wheel was turned\n since the last callback. The wheel is 0 for the vertical axis or 1 for the\n horizontal axis (for OS/mouse combinations that support this).\n"]
718pub type XPLMAvionicsMouseWheel_f = ::std::option::Option<
719 unsafe extern "C" fn(
720 x: ::std::os::raw::c_int,
721 y: ::std::os::raw::c_int,
722 wheel: ::std::os::raw::c_int,
723 clicks: ::std::os::raw::c_int,
724 inRefcon: *mut ::std::os::raw::c_void,
725 ) -> ::std::os::raw::c_int,
726>;
727#[doc = " XPLMAvionicsCursor_f\n\n Cursor callback that decides which cursor to show when the mouse is over\n your screen or (2D-popup) bezel. Return xplm_CursorDefault to let X-Plane\n use which cursor to show, or other values to force the cursor to a\n particular one (see XPLMCursorStatus).\n"]
728pub type XPLMAvionicsCursor_f = ::std::option::Option<
729 unsafe extern "C" fn(
730 x: ::std::os::raw::c_int,
731 y: ::std::os::raw::c_int,
732 inRefcon: *mut ::std::os::raw::c_void,
733 ) -> XPLMCursorStatus,
734>;
735#[doc = " XPLMAvionicsKeyboard_f\n\n Key callback called when your device is popped up and you've requested to\n capture the keyboard. Return 1 to consume the event, or 0 to let X-Plane\n process it (for stock avionics devices).\n"]
736pub type XPLMAvionicsKeyboard_f = ::std::option::Option<
737 unsafe extern "C" fn(
738 inKey: ::std::os::raw::c_char,
739 inFlags: XPLMKeyFlags,
740 inVirtualKey: ::std::os::raw::c_char,
741 inRefCon: *mut ::std::os::raw::c_void,
742 losingFocus: ::std::os::raw::c_int,
743 ) -> ::std::os::raw::c_int,
744>;
745#[doc = " XPLMAvionicsID\n\n This is an opaque identifier for an avionics display that you enhance or\n replace. When you register your callbacks (via\n XPLMRegisterAvionicsCallbacksEx()) or create a new device (via\n XPLMCreateAvionicsDevice()), you will specify drawing and mouse callbacks,\n and get back such a handle.\n"]
746pub type XPLMAvionicsID = *mut ::std::os::raw::c_void;
747#[doc = " XPLMCustomizeAvionics_t\n\n The XPLMCustomizeAvionics_t structure defines all of the parameters used to\n replace or enhance built-in simulator avionics devices using\n XPLMRegisterAvionicsCallbacksEx(). The structure will be expanded in future\n SDK APIs to include more features. Always set the structSize member to the\n size of your struct in bytes!\n"]
748#[repr(C)]
749#[derive(Debug, Copy, Clone)]
750pub struct XPLMCustomizeAvionics_t {
751 #[doc = " Used to inform XPLMRegisterAvionicsCallbacksEx() of the SDK version you *\n compiled against; should always be set to sizeof(XPLMCustomizeAvionics_t)"]
752 pub structSize: ::std::os::raw::c_int,
753 #[doc = " The built-in avionics device to which you want your drawing applied."]
754 pub deviceId: XPLMDeviceID,
755 #[doc = " The draw callback to be called before X-Plane draws."]
756 pub drawCallbackBefore: XPLMAvionicsCallback_f,
757 #[doc = " The draw callback to be called after X-Plane has drawn."]
758 pub drawCallbackAfter: XPLMAvionicsCallback_f,
759 #[doc = " The mouse click callback that is called when the user clicks onto the *\n device's bezel."]
760 pub bezelClickCallback: XPLMAvionicsMouse_f,
761 #[doc = " The mouse click callback that is called when the user clicks onto the *\n device's bezel."]
762 pub bezelRightClickCallback: XPLMAvionicsMouse_f,
763 #[doc = " The callback that is called when the users uses the scroll wheel over the *\n device's bezel."]
764 pub bezelScrollCallback: XPLMAvionicsMouseWheel_f,
765 #[doc = " The callback that lets you determine what cursor should be shown when the *\n mouse is over the device's bezel."]
766 pub bezelCursorCallback: XPLMAvionicsCursor_f,
767 #[doc = " The mouse click callback that is called when the user clicks onto the *\n device's screen."]
768 pub screenTouchCallback: XPLMAvionicsMouse_f,
769 #[doc = " The right mouse click callback that is called when the user clicks onto the*\n device's screen."]
770 pub screenRightTouchCallback: XPLMAvionicsMouse_f,
771 #[doc = " The callback that is called when the users uses the scroll wheel over the *\n device's screen."]
772 pub screenScrollCallback: XPLMAvionicsMouseWheel_f,
773 #[doc = " The callback that lets you determine what cursor should be shown when the *\n mouse is over the device's screen."]
774 pub screenCursorCallback: XPLMAvionicsCursor_f,
775 #[doc = " The key callback that is called when the user types in the device's popup."]
776 pub keyboardCallback: XPLMAvionicsKeyboard_f,
777 #[doc = " A reference which will be passed into each of your draw callbacks. Use this*\n to pass information to yourself as needed."]
778 pub refcon: *mut ::std::os::raw::c_void,
779}
780#[allow(clippy::unnecessary_operation, clippy::identity_op)]
781const _: () = {
782 ["Size of XPLMCustomizeAvionics_t"]
783 [::std::mem::size_of::<XPLMCustomizeAvionics_t>() - 104usize];
784 ["Alignment of XPLMCustomizeAvionics_t"]
785 [::std::mem::align_of::<XPLMCustomizeAvionics_t>() - 8usize];
786 ["Offset of field: XPLMCustomizeAvionics_t::structSize"]
787 [::std::mem::offset_of!(XPLMCustomizeAvionics_t, structSize) - 0usize];
788 ["Offset of field: XPLMCustomizeAvionics_t::deviceId"]
789 [::std::mem::offset_of!(XPLMCustomizeAvionics_t, deviceId) - 4usize];
790 ["Offset of field: XPLMCustomizeAvionics_t::drawCallbackBefore"]
791 [::std::mem::offset_of!(XPLMCustomizeAvionics_t, drawCallbackBefore) - 8usize];
792 ["Offset of field: XPLMCustomizeAvionics_t::drawCallbackAfter"]
793 [::std::mem::offset_of!(XPLMCustomizeAvionics_t, drawCallbackAfter) - 16usize];
794 ["Offset of field: XPLMCustomizeAvionics_t::bezelClickCallback"]
795 [::std::mem::offset_of!(XPLMCustomizeAvionics_t, bezelClickCallback) - 24usize];
796 ["Offset of field: XPLMCustomizeAvionics_t::bezelRightClickCallback"]
797 [::std::mem::offset_of!(XPLMCustomizeAvionics_t, bezelRightClickCallback) - 32usize];
798 ["Offset of field: XPLMCustomizeAvionics_t::bezelScrollCallback"]
799 [::std::mem::offset_of!(XPLMCustomizeAvionics_t, bezelScrollCallback) - 40usize];
800 ["Offset of field: XPLMCustomizeAvionics_t::bezelCursorCallback"]
801 [::std::mem::offset_of!(XPLMCustomizeAvionics_t, bezelCursorCallback) - 48usize];
802 ["Offset of field: XPLMCustomizeAvionics_t::screenTouchCallback"]
803 [::std::mem::offset_of!(XPLMCustomizeAvionics_t, screenTouchCallback) - 56usize];
804 ["Offset of field: XPLMCustomizeAvionics_t::screenRightTouchCallback"]
805 [::std::mem::offset_of!(XPLMCustomizeAvionics_t, screenRightTouchCallback) - 64usize];
806 ["Offset of field: XPLMCustomizeAvionics_t::screenScrollCallback"]
807 [::std::mem::offset_of!(XPLMCustomizeAvionics_t, screenScrollCallback) - 72usize];
808 ["Offset of field: XPLMCustomizeAvionics_t::screenCursorCallback"]
809 [::std::mem::offset_of!(XPLMCustomizeAvionics_t, screenCursorCallback) - 80usize];
810 ["Offset of field: XPLMCustomizeAvionics_t::keyboardCallback"]
811 [::std::mem::offset_of!(XPLMCustomizeAvionics_t, keyboardCallback) - 88usize];
812 ["Offset of field: XPLMCustomizeAvionics_t::refcon"]
813 [::std::mem::offset_of!(XPLMCustomizeAvionics_t, refcon) - 96usize];
814};
815unsafe extern "C" {
816 #[doc = " XPLMRegisterAvionicsCallbacksEx\n\n This routine registers your callbacks for a built-in device. This returns a\n handle. If the returned handle is NULL, there was a problem interpreting\n your input, most likely the struct size was wrong for your SDK version. If\n the returned handle is not NULL, your callbacks will be called according to\n schedule as long as your plugin is not deactivated, or unloaded, or you\n call XPLMUnregisterAvionicsCallbacks().\n\n Note that you cannot register new callbacks for a device that is not a\n built-in one (for example a device that you have created, or a device\n another plugin has created).\n"]
817 pub fn XPLMRegisterAvionicsCallbacksEx(
818 inParams: *mut XPLMCustomizeAvionics_t,
819 ) -> XPLMAvionicsID;
820}
821unsafe extern "C" {
822 #[doc = " XPLMGetAvionicsHandle\n\n This routine registers no callbacks for a built-in cockpit device, but\n returns a handle which allows you to interact with it using the Avionics\n Device API. Use this if you do not wish to intercept drawing, clicks and\n touchscreen calls to a device, but want to interact with its popup\n programmatically. This is equivalent to calling\n XPLMRegisterAvionicsCallbackEx() with NULL for all callbacks.\n"]
823 pub fn XPLMGetAvionicsHandle(inDeviceID: XPLMDeviceID) -> XPLMAvionicsID;
824}
825unsafe extern "C" {
826 #[doc = " XPLMUnregisterAvionicsCallbacks\n\n This routine unregisters your callbacks for a built-in device. You should\n only call this for handles you acquired from\n XPLMRegisterAvionicsCallbacksEx(). They will no longer be called.\n"]
827 pub fn XPLMUnregisterAvionicsCallbacks(inAvionicsId: XPLMAvionicsID);
828}
829#[doc = " XPLMAvionicsScreenCallback_f\n\n This is the prototype for drawing callbacks for custom devices' screens.\n Refcon is a unique value that you specify when creating the device,\n allowing you to slip a pointer to your own data to the callback.\n\n Upon entry the OpenGL context will be correctly set up for you and OpenGL\n will be in panel coordinates for 2d drawing. The OpenGL state (texturing,\n etc.) will be unknown. X-Plane does not clear your screen for you between\n calls - this means you can re-use portions to save drawing, but otherwise\n you must call glClear() to erase the screen's contents.\n"]
830pub type XPLMAvionicsScreenCallback_f =
831 ::std::option::Option<unsafe extern "C" fn(inRefcon: *mut ::std::os::raw::c_void)>;
832#[doc = " XPLMAvionicsBezelCallback_f\n\n This is the prototype for drawing callbacks for custom devices' bezel. You\n are passed in the red, green, and blue values you can optinally use for\n tinting your bezel accoring to ambiant light.\n\n Refcon is a unique value that you specify when creating the device,\n allowing you to slip a pointer to your own data to the callback.\n\n Upon entry the OpenGL context will be correctly set up for you and OpenGL\n will be in panel coordinates for 2d drawing. The OpenGL state (texturing,\n etc.) will be unknown.\n"]
833pub type XPLMAvionicsBezelCallback_f = ::std::option::Option<
834 unsafe extern "C" fn(
835 inAmbiantR: f32,
836 inAmbiantG: f32,
837 inAmbiantB: f32,
838 inRefcon: *mut ::std::os::raw::c_void,
839 ),
840>;
841#[doc = " XPLMAvionicsBrightness_f\n\n This is the prototype for screen brightness callbacks for custom devices.\n If you provide a callback, you can return the ratio of the screen's maximum\n brightness that the simulator should use when displaying the screen in the\n 3D cockpit.\n\n inRheoValue is the current ratio value (between 0 and 1) of the instrument\n brightness rheostat to which the device is bound.\n\n inAmbientBrightness is the value (between 0 and 1) that the callback should\n return for the screen to be at a usable brightness based on ambient light\n (if your device has a photo cell and automatically adjusts its brightness,\n you can return this and your screen will be at the optimal brightness to be\n readable, but not blind the pilot).\n\n inBusVoltsRatio is the ratio of the nominal voltage currently present on\n the bus to which the device is bound, or -1 if the device is not bound to\n the current aircraft.\n\n Refcon is a unique value that you specify when creating the device,\n allowing you to slip a pointer to your own data to the callback.\n"]
842pub type XPLMAvionicsBrightness_f = ::std::option::Option<
843 unsafe extern "C" fn(
844 inRheoValue: f32,
845 inAmbiantBrightness: f32,
846 inBusVoltsRatio: f32,
847 inRefcon: *mut ::std::os::raw::c_void,
848 ) -> f32,
849>;
850#[doc = " XPLMCreateAvionics_t\n\n The XPLMCreateAvionics_t structure defines all of the parameters used to\n generate your own glass cockpit device by using XPLMCreateAvionicsEx(). The\n structure will be expanded in future SDK APIs to include more features.\n Always set the structSize member to the size of your struct in bytes!\n"]
851#[repr(C)]
852#[derive(Debug, Copy, Clone)]
853pub struct XPLMCreateAvionics_t {
854 #[doc = " Used to inform XPLMCreateAvionicsEx() of the SDK version you compiled *\n against; should always be set to sizeof(XPLMCreateAvionics_t)"]
855 pub structSize: ::std::os::raw::c_int,
856 #[doc = " Width of the device's screen in pixels."]
857 pub screenWidth: ::std::os::raw::c_int,
858 #[doc = " Height of the device's screen in pixels."]
859 pub screenHeight: ::std::os::raw::c_int,
860 #[doc = " Width of the bezel around your device's screen for 2D pop-ups."]
861 pub bezelWidth: ::std::os::raw::c_int,
862 #[doc = " Height of the bezel around your device's screen for 2D pop-ups."]
863 pub bezelHeight: ::std::os::raw::c_int,
864 #[doc = " The screen's lateral offset into the bezel for 2D pop-ups."]
865 pub screenOffsetX: ::std::os::raw::c_int,
866 #[doc = " The screen's vertical offset into the bezel for 2D pop-ups."]
867 pub screenOffsetY: ::std::os::raw::c_int,
868 #[doc = " If set to true (1), X-Plane won't call your plugin to re-render the *\n device's screen every frame. Instead, you should tell X-Plane you want to *\n refresh your screen with XPLMAvionicsNeedsDrawing(), and X-Plane will call *\n you before rendering the next simulator frame."]
869 pub drawOnDemand: ::std::os::raw::c_int,
870 #[doc = " The draw callback you will use to draw the 2D-popup bezel. This is called *\n only when the popup window is visible, and X-Plane is about to draw the *\n bezel in it."]
871 pub bezelDrawCallback: XPLMAvionicsBezelCallback_f,
872 #[doc = " The draw callback you will be using to draw into the device's screen *\n framebuffer."]
873 pub drawCallback: XPLMAvionicsScreenCallback_f,
874 #[doc = " The mouse click callback that is called when the user clicks onto your *\n bezel."]
875 pub bezelClickCallback: XPLMAvionicsMouse_f,
876 #[doc = " The mouse click callback that is called when the user clicks onto your *\n bezel."]
877 pub bezelRightClickCallback: XPLMAvionicsMouse_f,
878 #[doc = " The callback that is called when the users uses the scroll wheel over your *\n avionics' bezel."]
879 pub bezelScrollCallback: XPLMAvionicsMouseWheel_f,
880 #[doc = " The callback that lets you determine what cursor should be shown when the *\n mouse is over your device's bezel."]
881 pub bezelCursorCallback: XPLMAvionicsCursor_f,
882 #[doc = " The mouse click callback that is called when the user clicks onto your *\n screen."]
883 pub screenTouchCallback: XPLMAvionicsMouse_f,
884 #[doc = " The right mouse click callback that is called when the user clicks onto *\n your screen."]
885 pub screenRightTouchCallback: XPLMAvionicsMouse_f,
886 #[doc = " The callback that is called when the users uses the scroll wheel over your *\n avionics' screen."]
887 pub screenScrollCallback: XPLMAvionicsMouseWheel_f,
888 #[doc = " The callback that lets you determine what cursor should be shown when the *\n mouse is over your device's screen."]
889 pub screenCursorCallback: XPLMAvionicsCursor_f,
890 #[doc = " The key callback that is called when the user types in your popup."]
891 pub keyboardCallback: XPLMAvionicsKeyboard_f,
892 #[doc = " The callback that is called to determine the absolute brightness of the *\n device's screen. Set to NULL to use X-Plane's default behaviour."]
893 pub brightnessCallback: XPLMAvionicsBrightness_f,
894 #[doc = " A null-terminated string of maximum 64 characters to uniquely identify your*\n cockpit device. This must be unique (you cannot re-use an ID that X-Plane *\n or another plugin provides), and it must not contain spaces. This is the *\n string the OBJ file must reference when marking polygons with *\n ATTR_cockpit_device. The string is copied when you call *\n XPLMCreateAvionicsEx, so you don't need to hold this string in memory after*\n the call."]
895 pub deviceID: *mut ::std::os::raw::c_char,
896 #[doc = " A null-terminated string to give a user-readable name to your device, which*\n can be presented in UI dialogs."]
897 pub deviceName: *mut ::std::os::raw::c_char,
898 #[doc = " A reference which will be passed into your draw and mouse callbacks. Use *\n this to pass information to yourself as needed."]
899 pub refcon: *mut ::std::os::raw::c_void,
900}
901#[allow(clippy::unnecessary_operation, clippy::identity_op)]
902const _: () = {
903 ["Size of XPLMCreateAvionics_t"][::std::mem::size_of::<XPLMCreateAvionics_t>() - 152usize];
904 ["Alignment of XPLMCreateAvionics_t"][::std::mem::align_of::<XPLMCreateAvionics_t>() - 8usize];
905 ["Offset of field: XPLMCreateAvionics_t::structSize"]
906 [::std::mem::offset_of!(XPLMCreateAvionics_t, structSize) - 0usize];
907 ["Offset of field: XPLMCreateAvionics_t::screenWidth"]
908 [::std::mem::offset_of!(XPLMCreateAvionics_t, screenWidth) - 4usize];
909 ["Offset of field: XPLMCreateAvionics_t::screenHeight"]
910 [::std::mem::offset_of!(XPLMCreateAvionics_t, screenHeight) - 8usize];
911 ["Offset of field: XPLMCreateAvionics_t::bezelWidth"]
912 [::std::mem::offset_of!(XPLMCreateAvionics_t, bezelWidth) - 12usize];
913 ["Offset of field: XPLMCreateAvionics_t::bezelHeight"]
914 [::std::mem::offset_of!(XPLMCreateAvionics_t, bezelHeight) - 16usize];
915 ["Offset of field: XPLMCreateAvionics_t::screenOffsetX"]
916 [::std::mem::offset_of!(XPLMCreateAvionics_t, screenOffsetX) - 20usize];
917 ["Offset of field: XPLMCreateAvionics_t::screenOffsetY"]
918 [::std::mem::offset_of!(XPLMCreateAvionics_t, screenOffsetY) - 24usize];
919 ["Offset of field: XPLMCreateAvionics_t::drawOnDemand"]
920 [::std::mem::offset_of!(XPLMCreateAvionics_t, drawOnDemand) - 28usize];
921 ["Offset of field: XPLMCreateAvionics_t::bezelDrawCallback"]
922 [::std::mem::offset_of!(XPLMCreateAvionics_t, bezelDrawCallback) - 32usize];
923 ["Offset of field: XPLMCreateAvionics_t::drawCallback"]
924 [::std::mem::offset_of!(XPLMCreateAvionics_t, drawCallback) - 40usize];
925 ["Offset of field: XPLMCreateAvionics_t::bezelClickCallback"]
926 [::std::mem::offset_of!(XPLMCreateAvionics_t, bezelClickCallback) - 48usize];
927 ["Offset of field: XPLMCreateAvionics_t::bezelRightClickCallback"]
928 [::std::mem::offset_of!(XPLMCreateAvionics_t, bezelRightClickCallback) - 56usize];
929 ["Offset of field: XPLMCreateAvionics_t::bezelScrollCallback"]
930 [::std::mem::offset_of!(XPLMCreateAvionics_t, bezelScrollCallback) - 64usize];
931 ["Offset of field: XPLMCreateAvionics_t::bezelCursorCallback"]
932 [::std::mem::offset_of!(XPLMCreateAvionics_t, bezelCursorCallback) - 72usize];
933 ["Offset of field: XPLMCreateAvionics_t::screenTouchCallback"]
934 [::std::mem::offset_of!(XPLMCreateAvionics_t, screenTouchCallback) - 80usize];
935 ["Offset of field: XPLMCreateAvionics_t::screenRightTouchCallback"]
936 [::std::mem::offset_of!(XPLMCreateAvionics_t, screenRightTouchCallback) - 88usize];
937 ["Offset of field: XPLMCreateAvionics_t::screenScrollCallback"]
938 [::std::mem::offset_of!(XPLMCreateAvionics_t, screenScrollCallback) - 96usize];
939 ["Offset of field: XPLMCreateAvionics_t::screenCursorCallback"]
940 [::std::mem::offset_of!(XPLMCreateAvionics_t, screenCursorCallback) - 104usize];
941 ["Offset of field: XPLMCreateAvionics_t::keyboardCallback"]
942 [::std::mem::offset_of!(XPLMCreateAvionics_t, keyboardCallback) - 112usize];
943 ["Offset of field: XPLMCreateAvionics_t::brightnessCallback"]
944 [::std::mem::offset_of!(XPLMCreateAvionics_t, brightnessCallback) - 120usize];
945 ["Offset of field: XPLMCreateAvionics_t::deviceID"]
946 [::std::mem::offset_of!(XPLMCreateAvionics_t, deviceID) - 128usize];
947 ["Offset of field: XPLMCreateAvionics_t::deviceName"]
948 [::std::mem::offset_of!(XPLMCreateAvionics_t, deviceName) - 136usize];
949 ["Offset of field: XPLMCreateAvionics_t::refcon"]
950 [::std::mem::offset_of!(XPLMCreateAvionics_t, refcon) - 144usize];
951};
952unsafe extern "C" {
953 #[doc = " XPLMCreateAvionicsEx\n\n Creates a new cockpit device to be used in the 3D cockpit. You can call\n this at any time: if an aircraft referencing your device is loaded before\n your plugin, the simulator will make sure to retroactively map your display\n into it.\n\n When you are done with the device, and at least before your\n plugin is unloaded, you should destroy the device using\n XPLMDestroyAvionics().\n"]
954 pub fn XPLMCreateAvionicsEx(inParams: *mut XPLMCreateAvionics_t) -> XPLMAvionicsID;
955}
956unsafe extern "C" {
957 #[doc = " XPLMDestroyAvionics\n\n Destroys the cockpit device and deallocates its screen's memory. You should\n only ever call this for devices that you created using\n XPLMCreateAvionicsEx(), not X-Plane' built-ine devices you have customised.\n"]
958 pub fn XPLMDestroyAvionics(inHandle: XPLMAvionicsID);
959}
960unsafe extern "C" {
961 #[doc = " XPLMIsAvionicsBound\n\n Returns true (1) if the cockpit device with the given handle is used by the\n current aircraft.\n"]
962 pub fn XPLMIsAvionicsBound(inHandle: XPLMAvionicsID) -> ::std::os::raw::c_int;
963}
964unsafe extern "C" {
965 #[doc = " XPLMSetAvionicsBrightnessRheo\n\n Sets the brightness setting's value, between 0 and 1, for the screen of the\n cockpit device with the given handle.\n\n If the device is bound to the current aircraft, this is a shortcut to\n setting the brightness rheostat value using the\n `sim/cockpit2/switches/instrument_brightness_ratio[]` dataref; this sets\n the slot in the `instrument_brightness_ratio` array to which the device is\n bound.\n\n If the device is not currently bound, the device keeps track of its own\n screen brightness rheostat, allowing you to control the brightness even\n though it isn't connected to the `instrument_brightness_ratio` dataref.\n"]
966 pub fn XPLMSetAvionicsBrightnessRheo(inHandle: XPLMAvionicsID, brightness: f32);
967}
968unsafe extern "C" {
969 #[doc = " XPLMGetAvionicsBrightnessRheo\n\n Returns the brightness setting value, between 0 and 1, for the screen of\n the cockpit device with the given handle.\n\n If the device is bound to the current aircraft, this is a shortcut\n to getting the brightness rheostat value from the\n `sim/cockpit2/switches/instrument_brightness_ratio[]` dataref; this\n gets the slot in the `instrument_brightness_ratio` array to which\n the device is bound.\n\n If the device is not currently bound, this returns the device's own\n brightness rheostat value.\n"]
970 pub fn XPLMGetAvionicsBrightnessRheo(inHandle: XPLMAvionicsID) -> f32;
971}
972unsafe extern "C" {
973 #[doc = " XPLMGetAvionicsBusVoltsRatio\n\n Returns the ratio of the nominal voltage (1.0 means full nominal voltage)\n of the electrical bus to which the given avionics device is bound, or -1 if\n the device is not bound to the current aircraft.\n"]
974 pub fn XPLMGetAvionicsBusVoltsRatio(inHandle: XPLMAvionicsID) -> f32;
975}
976unsafe extern "C" {
977 #[doc = " XPLMIsCursorOverAvionics\n\n Returns true (1) if the mouse is currently over the screen of cockpit\n device with the given handle. If they are not NULL, the optional x and y\n arguments are filled with the co-ordinates of the mouse cursor in device\n co-ordinates.\n"]
978 pub fn XPLMIsCursorOverAvionics(
979 inHandle: XPLMAvionicsID,
980 outX: *mut ::std::os::raw::c_int,
981 outY: *mut ::std::os::raw::c_int,
982 ) -> ::std::os::raw::c_int;
983}
984unsafe extern "C" {
985 #[doc = " XPLMAvionicsNeedsDrawing\n\n Tells X-Plane that your device's screen needs to be re-drawn. If your\n device is marked for on-demand drawing, X-Plane will call your screen\n drawing callback before drawing the next simulator frame. If your device is\n already drawn every frame, this has no effect.\n"]
986 pub fn XPLMAvionicsNeedsDrawing(inHandle: XPLMAvionicsID);
987}
988unsafe extern "C" {
989 #[doc = " XPLMSetAvionicsPopupVisible\n\n Shows or hides the popup window for a cockpit device.\n"]
990 pub fn XPLMSetAvionicsPopupVisible(inHandle: XPLMAvionicsID, inVisible: ::std::os::raw::c_int);
991}
992unsafe extern "C" {
993 #[doc = " XPLMIsAvionicsPopupVisible\n\n Returns true (1) if the popup window for a cockpit device is visible.\n"]
994 pub fn XPLMIsAvionicsPopupVisible(inHandle: XPLMAvionicsID) -> ::std::os::raw::c_int;
995}
996unsafe extern "C" {
997 #[doc = " XPLMPopOutAvionics\n\n Pops out the window for a cockpit device.\n"]
998 pub fn XPLMPopOutAvionics(inHandle: XPLMAvionicsID);
999}
1000unsafe extern "C" {
1001 #[doc = " XPLMIsAvionicsPoppedOut\n\n Returns true (1) if the popup window for a cockpit device is popped out.\n"]
1002 pub fn XPLMIsAvionicsPoppedOut(inHandle: XPLMAvionicsID) -> ::std::os::raw::c_int;
1003}
1004unsafe extern "C" {
1005 #[doc = " XPLMTakeAvionicsKeyboardFocus\n\n This routine gives keyboard focus to the popup window of a custom cockpit\n device, if it is visible.\n"]
1006 pub fn XPLMTakeAvionicsKeyboardFocus(inHandle: XPLMAvionicsID);
1007}
1008unsafe extern "C" {
1009 #[doc = " XPLMHasAvionicsKeyboardFocus\n\n Returns true (1) if the popup window for a cockpit device has keyboard\n focus.\n"]
1010 pub fn XPLMHasAvionicsKeyboardFocus(inHandle: XPLMAvionicsID) -> ::std::os::raw::c_int;
1011}
1012unsafe extern "C" {
1013 #[doc = " XPLMGetAvionicsGeometry\n\n Returns the bounds of a cockpit device's popup window in the X-Plane\n coordinate system.\n"]
1014 pub fn XPLMGetAvionicsGeometry(
1015 inHandle: XPLMAvionicsID,
1016 outLeft: *mut ::std::os::raw::c_int,
1017 outTop: *mut ::std::os::raw::c_int,
1018 outRight: *mut ::std::os::raw::c_int,
1019 outBottom: *mut ::std::os::raw::c_int,
1020 );
1021}
1022unsafe extern "C" {
1023 #[doc = " XPLMSetAvionicsGeometry\n\n Sets the size and position of a cockpit device's popup window in the\n X-Plane coordinate system.\n"]
1024 pub fn XPLMSetAvionicsGeometry(
1025 inHandle: XPLMAvionicsID,
1026 inLeft: ::std::os::raw::c_int,
1027 inTop: ::std::os::raw::c_int,
1028 inRight: ::std::os::raw::c_int,
1029 inBottom: ::std::os::raw::c_int,
1030 );
1031}
1032unsafe extern "C" {
1033 #[doc = " XPLMGetAvionicsGeometryOS\n\n Returns the bounds of a cockpit device's popped-out window.\n"]
1034 pub fn XPLMGetAvionicsGeometryOS(
1035 inHandle: XPLMAvionicsID,
1036 outLeft: *mut ::std::os::raw::c_int,
1037 outTop: *mut ::std::os::raw::c_int,
1038 outRight: *mut ::std::os::raw::c_int,
1039 outBottom: *mut ::std::os::raw::c_int,
1040 );
1041}
1042unsafe extern "C" {
1043 #[doc = " XPLMSetAvionicsGeometryOS\n\n Sets the size and position of a cockpit device's popped-out window.\n"]
1044 pub fn XPLMSetAvionicsGeometryOS(
1045 inHandle: XPLMAvionicsID,
1046 inLeft: ::std::os::raw::c_int,
1047 inTop: ::std::os::raw::c_int,
1048 inRight: ::std::os::raw::c_int,
1049 inBottom: ::std::os::raw::c_int,
1050 );
1051}
1052#[doc = " XPLMWindowID\n\n This is an opaque identifier for a window. You use it to control your\n window. When you create a window (via either XPLMCreateWindow() or\n XPLMCreateWindowEx()), you will specify callbacks to handle drawing, mouse\n interaction, etc.\n"]
1053pub type XPLMWindowID = *mut ::std::os::raw::c_void;
1054#[doc = " XPLMDrawWindow_f\n\n A callback to handle 2-D drawing of your window. You are passed in your\n window and its refcon. Draw the window. You can use other XPLM functions\n from this header to find the current dimensions of your window, etc. When\n this callback is called, the OpenGL context will be set properly for 2-D\n window drawing.\n\n **Note**: Because you are drawing your window over a background, you can\n make a translucent window easily by simply not filling in your entire\n window's bounds.\n"]
1055pub type XPLMDrawWindow_f = ::std::option::Option<
1056 unsafe extern "C" fn(inWindowID: XPLMWindowID, inRefcon: *mut ::std::os::raw::c_void),
1057>;
1058#[doc = " XPLMHandleKey_f\n\n This function is called when a key is pressed or keyboard focus is taken\n away from your window. If losingFocus is 1, you are losing the keyboard\n focus, otherwise a key was pressed and inKey contains its character.\n\n The window ID passed in will be your window for key presses, or the other\n window taking focus when losing focus. Note that in the modern plugin\n system, often focus is taken by the window manager itself; for this resaon,\n the window ID may be zero when losing focus, and you should not write code\n that depends onit.\n\n The refcon passed in will be the one from registration, for both key\n presses and losing focus.\n\n Warning: this API declares virtual keys as a signed character; however the\n VKEY #define macros in XPLMDefs.h define the vkeys using unsigned values\n (that is 0x80 instead of -0x80). So you may need to cast the incoming vkey\n to an unsigned char to get correct comparisons in C.\n"]
1059pub type XPLMHandleKey_f = ::std::option::Option<
1060 unsafe extern "C" fn(
1061 inWindowID: XPLMWindowID,
1062 inKey: ::std::os::raw::c_char,
1063 inFlags: XPLMKeyFlags,
1064 inVirtualKey: ::std::os::raw::c_char,
1065 inRefcon: *mut ::std::os::raw::c_void,
1066 losingFocus: ::std::os::raw::c_int,
1067 ),
1068>;
1069#[doc = " XPLMHandleMouseClick_f\n\n You receive this call for one of three events:\n\n - when the user clicks the mouse button down\n - (optionally) when the user drags the mouse after a down-click, but before\n the up-click\n - when the user releases the down-clicked mouse button.\n\n You receive the x and y of the click, your window, and a refcon. Return 1\n to consume the click, or 0 to pass it through.\n\n WARNING: passing clicks through windows (as of this writing) causes mouse\n tracking problems in X-Plane; do not use this feature!\n\n The units for x and y values match the units used in your window. Thus, for\n \"modern\" windows (those created via XPLMCreateWindowEx() and compiled\n against the XPLM300 library), the units are boxels, while legacy windows\n will get pixels. Legacy windows have their origin in the lower left of the\n main X-Plane window, while modern windows have their origin in the lower\n left of the global desktop space. In both cases, x increases as you move\n right, and y increases as you move up.\n"]
1070pub type XPLMHandleMouseClick_f = ::std::option::Option<
1071 unsafe extern "C" fn(
1072 inWindowID: XPLMWindowID,
1073 x: ::std::os::raw::c_int,
1074 y: ::std::os::raw::c_int,
1075 inMouse: XPLMMouseStatus,
1076 inRefcon: *mut ::std::os::raw::c_void,
1077 ) -> ::std::os::raw::c_int,
1078>;
1079#[doc = " XPLMHandleCursor_f\n\n The SDK calls your cursor status callback when the mouse is over your\n plugin window. Return a cursor status code to indicate how you would like\n X-Plane to manage the cursor. If you return xplm_CursorDefault, the SDK\n will try lower-Z-order plugin windows, then let the sim manage the cursor.\n\n Note: you should never show or hide the cursor yourself---these APIs are\n typically reference-counted and thus cannot safely and predictably be used\n by the SDK. Instead return one of xplm_CursorHidden to hide the cursor or\n xplm_CursorArrow/xplm_CursorCustom to show the cursor.\n\n If you want to implement a custom cursor by drawing a cursor in OpenGL, use\n xplm_CursorHidden to hide the OS cursor and draw the cursor using a 2-d\n drawing callback (after xplm_Phase_Window is probably a good choice, but\n see deprecation warnings on the drawing APIs!). If you want to use a\n custom OS-based cursor, use xplm_CursorCustom to ask X-Plane to show the\n cursor but not affect its image. You can then use an OS specific call like\n SetThemeCursor (Mac) or SetCursor/LoadCursor (Windows).\n\n The units for x and y values match the units used in your window. Thus, for\n \"modern\" windows (those created via XPLMCreateWindowEx() and compiled\n against the XPLM300 library), the units are boxels, while legacy windows\n will get pixels. Legacy windows have their origin in the lower left of the\n main X-Plane window, while modern windows have their origin in the lower\n left of the global desktop space. In both cases, x increases as you move\n right, and y increases as you move up.\n"]
1080pub type XPLMHandleCursor_f = ::std::option::Option<
1081 unsafe extern "C" fn(
1082 inWindowID: XPLMWindowID,
1083 x: ::std::os::raw::c_int,
1084 y: ::std::os::raw::c_int,
1085 inRefcon: *mut ::std::os::raw::c_void,
1086 ) -> XPLMCursorStatus,
1087>;
1088#[doc = " XPLMHandleMouseWheel_f\n\n The SDK calls your mouse wheel callback when one of the mouse wheels is\n scrolled within your window. Return 1 to consume the mouse wheel movement\n or 0 to pass them on to a lower window. (If your window appears opaque to\n the user, you should consume mouse wheel scrolling even if it does\n nothing.) The number of \"clicks\" indicates how far the wheel was turned\n since the last callback. The wheel is 0 for the vertical axis or 1 for the\n horizontal axis (for OS/mouse combinations that support this).\n\n The units for x and y values match the units used in your window. Thus, for\n \"modern\" windows (those created via XPLMCreateWindowEx() and compiled\n against the XPLM300 library), the units are boxels, while legacy windows\n will get pixels. Legacy windows have their origin in the lower left of the\n main X-Plane window, while modern windows have their origin in the lower\n left of the global desktop space. In both cases, x increases as you move\n right, and y increases as you move up.\n"]
1089pub type XPLMHandleMouseWheel_f = ::std::option::Option<
1090 unsafe extern "C" fn(
1091 inWindowID: XPLMWindowID,
1092 x: ::std::os::raw::c_int,
1093 y: ::std::os::raw::c_int,
1094 wheel: ::std::os::raw::c_int,
1095 clicks: ::std::os::raw::c_int,
1096 inRefcon: *mut ::std::os::raw::c_void,
1097 ) -> ::std::os::raw::c_int,
1098>;
1099#[doc = " The lowest layer, used for HUD-like displays while flying."]
1100pub const xplm_WindowLayerFlightOverlay: _bindgen_ty_8 = 0;
1101#[doc = " Windows that \"float\" over the sim, like the X-Plane 11 map does. If you are*\n not sure which layer to create your window in, choose floating."]
1102pub const xplm_WindowLayerFloatingWindows: _bindgen_ty_8 = 1;
1103#[doc = " An interruptive modal that covers the sim with a transparent black overlay *\n to draw the user's focus to the alert"]
1104pub const xplm_WindowLayerModal: _bindgen_ty_8 = 2;
1105#[doc = " \"Growl\"-style notifications that are visible in a corner of the screen, *\n even over modals"]
1106pub const xplm_WindowLayerGrowlNotifications: _bindgen_ty_8 = 3;
1107#[doc = " XPLMWindowLayer\n\n XPLMWindowLayer describes where in the ordering of windows X-Plane should\n place a particular window. Windows in higher layers cover windows in lower\n layers. So, a given window might be at the top of its particular layer, but\n it might still be obscured by a window in a higher layer. (This happens\n frequently when floating windows, like X-Plane's map, are covered by a\n modal alert.)\n\n Your window's layer can only be specified when you create the window (in\n the XPLMCreateWindow_t you pass to XPLMCreateWindowEx()). For this reason,\n layering only applies to windows created with new X-Plane 11 GUI features.\n (Windows created using the older XPLMCreateWindow(), or windows compiled\n against a pre-XPLM300 version of the SDK will simply be placed in the\n flight overlay window layer.)\n"]
1108pub type _bindgen_ty_8 = ::std::os::raw::c_int;
1109pub type XPLMWindowLayer = ::std::os::raw::c_int;
1110#[doc = " X-Plane will draw no decoration for your window, and apply no automatic *\n click handlers. The window will not stop click from passing through its *\n bounds. This is suitable for \"windows\" which request, say, the full screen *\n bounds, then only draw in a small portion of the available area."]
1111pub const xplm_WindowDecorationNone: _bindgen_ty_9 = 0;
1112#[doc = " The default decoration for \"native\" windows, like the map. Provides a solid*\n background, as well as click handlers for resizing and dragging the window."]
1113pub const xplm_WindowDecorationRoundRectangle: _bindgen_ty_9 = 1;
1114#[doc = " X-Plane will draw no decoration for your window, nor will it provide resize*\n handlers for your window edges, but it will stop clicks from passing *\n through your windows bounds."]
1115pub const xplm_WindowDecorationSelfDecorated: _bindgen_ty_9 = 2;
1116#[doc = " Like self-decorated, but with resizing; X-Plane will draw no decoration for*\n your window, but it will stop clicks from passing through your windows *\n bounds, and provide automatic mouse handlers for resizing."]
1117pub const xplm_WindowDecorationSelfDecoratedResizable: _bindgen_ty_9 = 3;
1118#[doc = " XPLMWindowDecoration\n\n XPLMWindowDecoration describes how \"modern\" windows will be displayed. This\n impacts both how X-Plane draws your window as well as certain mouse\n handlers.\n\n Your window's decoration can only be specified when you create the window\n (in the XPLMCreateWindow_t you pass to XPLMCreateWindowEx()).\n"]
1119pub type _bindgen_ty_9 = ::std::os::raw::c_int;
1120pub type XPLMWindowDecoration = ::std::os::raw::c_int;
1121#[doc = " XPLMCreateWindow_t\n\n The XPMCreateWindow_t structure defines all of the parameters used to\n create a modern window using XPLMCreateWindowEx(). The structure will be\n expanded in future SDK APIs to include more features. Always set the\n structSize member to the size of your struct in bytes!\n\n All windows created by this function in the XPLM300 version of the API are\n created with the new X-Plane 11 GUI features. This means your plugin will\n get to \"know\" about the existence of X-Plane windows other than the main\n window. All drawing and mouse callbacks for your window will occur in\n \"boxels,\" giving your windows automatic support for high-DPI scaling in\n X-Plane. In addition, your windows can opt-in to decoration with the\n X-Plane 11 window styling, and you can use the\n XPLMSetWindowPositioningMode() API to make your window \"popped out\" into a\n first-class operating system window.\n\n Note that this requires dealing with your window's bounds in \"global\n desktop\" positioning units, rather than the traditional panel coordinate\n system. In global desktop coordinates, the main X-Plane window may not have\n its origin at coordinate (0, 0), and your own window may have negative\n coordinates. Assuming you don't implicitly assume (0, 0) as your origin,\n the only API change you should need is to start using\n XPLMGetMouseLocationGlobal() rather than XPLMGetMouseLocation(), and\n XPLMGetScreenBoundsGlobal() instead of XPLMGetScreenSize().\n\n If you ask to be decorated as a floating window, you'll get the blue window\n control bar and blue backing that you see in X-Plane 11's normal \"floating\"\n windows (like the map).\n"]
1122#[repr(C)]
1123#[derive(Debug, Copy, Clone)]
1124pub struct XPLMCreateWindow_t {
1125 #[doc = " Used to inform XPLMCreateWindowEx() of the SDK version you compiled *\n against; should always be set to sizeof(XPLMCreateWindow_t)"]
1126 pub structSize: ::std::os::raw::c_int,
1127 #[doc = " Left bound, in global desktop boxels"]
1128 pub left: ::std::os::raw::c_int,
1129 #[doc = " Top bound, in global desktop boxels"]
1130 pub top: ::std::os::raw::c_int,
1131 #[doc = " Right bound, in global desktop boxels"]
1132 pub right: ::std::os::raw::c_int,
1133 #[doc = " Bottom bound, in global desktop boxels"]
1134 pub bottom: ::std::os::raw::c_int,
1135 pub visible: ::std::os::raw::c_int,
1136 pub drawWindowFunc: XPLMDrawWindow_f,
1137 #[doc = " A callback to handle the user left-clicking within your window (or NULL to *\n ignore left clicks)"]
1138 pub handleMouseClickFunc: XPLMHandleMouseClick_f,
1139 pub handleKeyFunc: XPLMHandleKey_f,
1140 pub handleCursorFunc: XPLMHandleCursor_f,
1141 pub handleMouseWheelFunc: XPLMHandleMouseWheel_f,
1142 #[doc = " A reference which will be passed into each of your window callbacks. Use *\n this to pass information to yourself as needed."]
1143 pub refcon: *mut ::std::os::raw::c_void,
1144 #[doc = " Specifies the type of X-Plane 11-style \"wrapper\" you want around your *\n window, if any"]
1145 pub decorateAsFloatingWindow: XPLMWindowDecoration,
1146 pub layer: XPLMWindowLayer,
1147 #[doc = " A callback to handle the user right-clicking within your window (or NULL to*\n ignore right clicks)"]
1148 pub handleRightClickFunc: XPLMHandleMouseClick_f,
1149}
1150#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1151const _: () = {
1152 ["Size of XPLMCreateWindow_t"][::std::mem::size_of::<XPLMCreateWindow_t>() - 88usize];
1153 ["Alignment of XPLMCreateWindow_t"][::std::mem::align_of::<XPLMCreateWindow_t>() - 8usize];
1154 ["Offset of field: XPLMCreateWindow_t::structSize"]
1155 [::std::mem::offset_of!(XPLMCreateWindow_t, structSize) - 0usize];
1156 ["Offset of field: XPLMCreateWindow_t::left"]
1157 [::std::mem::offset_of!(XPLMCreateWindow_t, left) - 4usize];
1158 ["Offset of field: XPLMCreateWindow_t::top"]
1159 [::std::mem::offset_of!(XPLMCreateWindow_t, top) - 8usize];
1160 ["Offset of field: XPLMCreateWindow_t::right"]
1161 [::std::mem::offset_of!(XPLMCreateWindow_t, right) - 12usize];
1162 ["Offset of field: XPLMCreateWindow_t::bottom"]
1163 [::std::mem::offset_of!(XPLMCreateWindow_t, bottom) - 16usize];
1164 ["Offset of field: XPLMCreateWindow_t::visible"]
1165 [::std::mem::offset_of!(XPLMCreateWindow_t, visible) - 20usize];
1166 ["Offset of field: XPLMCreateWindow_t::drawWindowFunc"]
1167 [::std::mem::offset_of!(XPLMCreateWindow_t, drawWindowFunc) - 24usize];
1168 ["Offset of field: XPLMCreateWindow_t::handleMouseClickFunc"]
1169 [::std::mem::offset_of!(XPLMCreateWindow_t, handleMouseClickFunc) - 32usize];
1170 ["Offset of field: XPLMCreateWindow_t::handleKeyFunc"]
1171 [::std::mem::offset_of!(XPLMCreateWindow_t, handleKeyFunc) - 40usize];
1172 ["Offset of field: XPLMCreateWindow_t::handleCursorFunc"]
1173 [::std::mem::offset_of!(XPLMCreateWindow_t, handleCursorFunc) - 48usize];
1174 ["Offset of field: XPLMCreateWindow_t::handleMouseWheelFunc"]
1175 [::std::mem::offset_of!(XPLMCreateWindow_t, handleMouseWheelFunc) - 56usize];
1176 ["Offset of field: XPLMCreateWindow_t::refcon"]
1177 [::std::mem::offset_of!(XPLMCreateWindow_t, refcon) - 64usize];
1178 ["Offset of field: XPLMCreateWindow_t::decorateAsFloatingWindow"]
1179 [::std::mem::offset_of!(XPLMCreateWindow_t, decorateAsFloatingWindow) - 72usize];
1180 ["Offset of field: XPLMCreateWindow_t::layer"]
1181 [::std::mem::offset_of!(XPLMCreateWindow_t, layer) - 76usize];
1182 ["Offset of field: XPLMCreateWindow_t::handleRightClickFunc"]
1183 [::std::mem::offset_of!(XPLMCreateWindow_t, handleRightClickFunc) - 80usize];
1184};
1185unsafe extern "C" {
1186 #[doc = " XPLMCreateWindowEx\n\n This routine creates a new \"modern\" window. You pass in an\n XPLMCreateWindow_t structure with all of the fields set in. You must set\n the structSize of the structure to the size of the actual structure you\n used. Also, you must provide functions for every callback---you may not\n leave them null! (If you do not support the cursor or mouse wheel, use\n functions that return the default values.)\n"]
1187 pub fn XPLMCreateWindowEx(inParams: *mut XPLMCreateWindow_t) -> XPLMWindowID;
1188}
1189unsafe extern "C" {
1190 #[doc = " XPLMCreateWindow\n\n Deprecated as of XPLM300.\n\n This routine creates a new legacy window. Unlike modern windows (created\n via XPLMCreateWindowEx()), legacy windows do not have access to X-Plane 11\n features like automatic scaling for high-DPI screens, native window styles,\n or support for being \"popped out\" into first-class operating system\n windows.\n\n Pass in the dimensions and offsets to the window's bottom left corner from\n the bottom left of the screen. You can specify whether the window is\n initially visible or not. Also, you pass in three callbacks to run the\n window and a refcon. This function returns a window ID you can use to\n refer to the new window.\n\n NOTE: Legacy windows do not have \"frames\"; you are responsible for drawing\n the background and frame of the window. Higher level libraries have\n routines which make this easy.\n"]
1191 pub fn XPLMCreateWindow(
1192 inLeft: ::std::os::raw::c_int,
1193 inTop: ::std::os::raw::c_int,
1194 inRight: ::std::os::raw::c_int,
1195 inBottom: ::std::os::raw::c_int,
1196 inIsVisible: ::std::os::raw::c_int,
1197 inDrawCallback: XPLMDrawWindow_f,
1198 inKeyCallback: XPLMHandleKey_f,
1199 inMouseCallback: XPLMHandleMouseClick_f,
1200 inRefcon: *mut ::std::os::raw::c_void,
1201 ) -> XPLMWindowID;
1202}
1203unsafe extern "C" {
1204 #[doc = " XPLMDestroyWindow\n\n This routine destroys a window. The window's callbacks are not called\n after this call. Keyboard focus is removed from the window before\n destroying it.\n"]
1205 pub fn XPLMDestroyWindow(inWindowID: XPLMWindowID);
1206}
1207unsafe extern "C" {
1208 #[doc = " XPLMGetScreenSize\n\n This routine returns the size of the main X-Plane OpenGL window in pixels.\n This number can be used to get a rough idea of the amount of detail the\n user will be able to see when drawing in 3-d.\n"]
1209 pub fn XPLMGetScreenSize(
1210 outWidth: *mut ::std::os::raw::c_int,
1211 outHeight: *mut ::std::os::raw::c_int,
1212 );
1213}
1214unsafe extern "C" {
1215 #[doc = " XPLMGetScreenBoundsGlobal\n\n This routine returns the bounds of the \"global\" X-Plane desktop, in boxels.\n Unlike the non-global version XPLMGetScreenSize(), this is multi-monitor\n aware. There are three primary consequences of multimonitor awareness.\n\n First, if the user is running X-Plane in full-screen on two or more\n monitors (typically configured using one full-screen window per monitor),\n the global desktop will be sized to include all X-Plane windows.\n\n Second, the origin of the screen coordinates is not guaranteed to be (0,\n 0). Suppose the user has two displays side-by-side, both running at 1080p.\n Suppose further that they've configured their OS to make the left display\n their \"primary\" monitor, and that X-Plane is running in full-screen on\n their right monitor only. In this case, the global desktop bounds would be\n the rectangle from (1920, 0) to (3840, 1080). If the user later asked\n X-Plane to draw on their primary monitor as well, the bounds would change\n to (0, 0) to (3840, 1080).\n\n Finally, if the usable area of the virtual desktop is not a perfect\n rectangle (for instance, because the monitors have different resolutions or\n because one monitor is configured in the operating system to be above and\n to the right of the other), the global desktop will include any wasted\n space. Thus, if you have two 1080p monitors, and monitor 2 is configured to\n have its bottom left touch monitor 1's upper right, your global desktop\n area would be the rectangle from (0, 0) to (3840, 2160).\n\n Note that popped-out windows (windows drawn in their own operating system\n windows, rather than \"floating\" within X-Plane) are not included in these\n bounds.\n"]
1216 pub fn XPLMGetScreenBoundsGlobal(
1217 outLeft: *mut ::std::os::raw::c_int,
1218 outTop: *mut ::std::os::raw::c_int,
1219 outRight: *mut ::std::os::raw::c_int,
1220 outBottom: *mut ::std::os::raw::c_int,
1221 );
1222}
1223#[doc = " XPLMReceiveMonitorBoundsGlobal_f\n\n This function is informed of the global bounds (in boxels) of a particular\n monitor within the X-Plane global desktop space. Note that X-Plane must be\n running in full screen on a monitor in order for that monitor to be passed\n to you in this callback.\n"]
1224pub type XPLMReceiveMonitorBoundsGlobal_f = ::std::option::Option<
1225 unsafe extern "C" fn(
1226 inMonitorIndex: ::std::os::raw::c_int,
1227 inLeftBx: ::std::os::raw::c_int,
1228 inTopBx: ::std::os::raw::c_int,
1229 inRightBx: ::std::os::raw::c_int,
1230 inBottomBx: ::std::os::raw::c_int,
1231 inRefcon: *mut ::std::os::raw::c_void,
1232 ),
1233>;
1234unsafe extern "C" {
1235 #[doc = " XPLMGetAllMonitorBoundsGlobal\n\n This routine immediately calls you back with the bounds (in boxels) of each\n full-screen X-Plane window within the X-Plane global desktop space. Note\n that if a monitor is *not* covered by an X-Plane window, you cannot get its\n bounds this way. Likewise, monitors with only an X-Plane window (not in\n full-screen mode) will not be included.\n\n If X-Plane is running in full-screen and your monitors are of the same size\n and configured contiguously in the OS, then the combined global bounds of\n all full-screen monitors will match the total global desktop bounds, as\n returned by XPLMGetScreenBoundsGlobal(). (Of course, if X-Plane is running\n in windowed mode, this will not be the case. Likewise, if you have\n differently sized monitors, the global desktop space will include wasted\n space.)\n\n Note that this function's monitor indices match those provided by\n XPLMGetAllMonitorBoundsOS(), but the coordinates are different (since the\n X-Plane global desktop may not match the operating system's global desktop,\n and one X-Plane boxel may be larger than one pixel due to 150% or 200%\n scaling).\n"]
1236 pub fn XPLMGetAllMonitorBoundsGlobal(
1237 inMonitorBoundsCallback: XPLMReceiveMonitorBoundsGlobal_f,
1238 inRefcon: *mut ::std::os::raw::c_void,
1239 );
1240}
1241#[doc = " XPLMReceiveMonitorBoundsOS_f\n\n This function is informed of the global bounds (in pixels) of a particular\n monitor within the operating system's global desktop space. Note that a\n monitor index being passed to you here does not indicate that X-Plane is\n running in full screen on this monitor, or even that any X-Plane windows\n exist on this monitor.\n"]
1242pub type XPLMReceiveMonitorBoundsOS_f = ::std::option::Option<
1243 unsafe extern "C" fn(
1244 inMonitorIndex: ::std::os::raw::c_int,
1245 inLeftPx: ::std::os::raw::c_int,
1246 inTopPx: ::std::os::raw::c_int,
1247 inRightPx: ::std::os::raw::c_int,
1248 inBottomPx: ::std::os::raw::c_int,
1249 inRefcon: *mut ::std::os::raw::c_void,
1250 ),
1251>;
1252unsafe extern "C" {
1253 #[doc = " XPLMGetAllMonitorBoundsOS\n\n This routine immediately calls you back with the bounds (in pixels) of each\n monitor within the operating system's global desktop space. Note that\n unlike XPLMGetAllMonitorBoundsGlobal(), this may include monitors that have\n no X-Plane window on them.\n\n Note that this function's monitor indices match those provided by\n XPLMGetAllMonitorBoundsGlobal(), but the coordinates are different (since\n the X-Plane global desktop may not match the operating system's global\n desktop, and one X-Plane boxel may be larger than one pixel).\n"]
1254 pub fn XPLMGetAllMonitorBoundsOS(
1255 inMonitorBoundsCallback: XPLMReceiveMonitorBoundsOS_f,
1256 inRefcon: *mut ::std::os::raw::c_void,
1257 );
1258}
1259unsafe extern "C" {
1260 #[doc = " XPLMGetMouseLocation\n\n Deprecated in XPLM300. Modern windows should use\n XPLMGetMouseLocationGlobal() instead.\n\n This routine returns the current mouse location in pixels relative to the\n main X-Plane window. The bottom left corner of the main window is (0, 0).\n Pass NULL to not receive info about either parameter.\n\n Because this function gives the mouse position relative to the main X-Plane\n window (rather than in global bounds), this function should only be used by\n legacy windows. Modern windows should instead get the mouse position in\n global desktop coordinates using XPLMGetMouseLocationGlobal().\n\n Note that unlike XPLMGetMouseLocationGlobal(), if the mouse goes outside\n the user's main monitor (for instance, to a pop out window or a secondary\n monitor), this function will not reflect it.\n"]
1261 pub fn XPLMGetMouseLocation(outX: *mut ::std::os::raw::c_int, outY: *mut ::std::os::raw::c_int);
1262}
1263unsafe extern "C" {
1264 #[doc = " XPLMGetMouseLocationGlobal\n\n Returns the current mouse location in global desktop boxels. Unlike\n XPLMGetMouseLocation(), the bottom left of the main X-Plane window is not\n guaranteed to be (0, 0)---instead, the origin is the lower left of the\n entire global desktop space. In addition, this routine gives the real mouse\n location when the mouse goes to X-Plane windows other than the primary\n display. Thus, it can be used with both pop-out windows and secondary\n monitors.\n\n This is the mouse location function to use with modern windows (i.e., those\n created by XPLMCreateWindowEx()).\n\n Pass NULL to not receive info about either parameter.\n"]
1265 pub fn XPLMGetMouseLocationGlobal(
1266 outX: *mut ::std::os::raw::c_int,
1267 outY: *mut ::std::os::raw::c_int,
1268 );
1269}
1270unsafe extern "C" {
1271 #[doc = " XPLMGetWindowGeometry\n\n This routine returns the position and size of a window. The units and\n coordinate system vary depending on the type of window you have.\n\n If this is a legacy window (one compiled against a pre-XPLM300 version of\n the SDK, or an XPLM300 window that was not created using\n XPLMCreateWindowEx()), the units are pixels relative to the main X-Plane\n display.\n\n If, on the other hand, this is a new X-Plane 11-style window (compiled\n against the XPLM300 SDK and created using XPLMCreateWindowEx()), the units\n are global desktop boxels.\n\n Pass NULL to not receive any paramter.\n"]
1272 pub fn XPLMGetWindowGeometry(
1273 inWindowID: XPLMWindowID,
1274 outLeft: *mut ::std::os::raw::c_int,
1275 outTop: *mut ::std::os::raw::c_int,
1276 outRight: *mut ::std::os::raw::c_int,
1277 outBottom: *mut ::std::os::raw::c_int,
1278 );
1279}
1280unsafe extern "C" {
1281 #[doc = " XPLMSetWindowGeometry\n\n This routine allows you to set the position and size of a window.\n\n The units and coordinate system match those of XPLMGetWindowGeometry().\n That is, modern windows use global desktop boxel coordinates, while legacy\n windows use pixels relative to the main X-Plane display.\n\n Note that this only applies to \"floating\" windows (that is, windows that\n are drawn within the X-Plane simulation windows, rather than being \"popped\n out\" into their own first-class operating system windows). To set the\n position of windows whose positioning mode is xplm_WindowPopOut, you'll\n need to instead use XPLMSetWindowGeometryOS().\n"]
1282 pub fn XPLMSetWindowGeometry(
1283 inWindowID: XPLMWindowID,
1284 inLeft: ::std::os::raw::c_int,
1285 inTop: ::std::os::raw::c_int,
1286 inRight: ::std::os::raw::c_int,
1287 inBottom: ::std::os::raw::c_int,
1288 );
1289}
1290unsafe extern "C" {
1291 #[doc = " XPLMGetWindowGeometryOS\n\n This routine returns the position and size of a \"popped out\" window (i.e.,\n a window whose positioning mode is xplm_WindowPopOut), in operating system\n pixels. Pass NULL to not receive any parameter.\n"]
1292 pub fn XPLMGetWindowGeometryOS(
1293 inWindowID: XPLMWindowID,
1294 outLeft: *mut ::std::os::raw::c_int,
1295 outTop: *mut ::std::os::raw::c_int,
1296 outRight: *mut ::std::os::raw::c_int,
1297 outBottom: *mut ::std::os::raw::c_int,
1298 );
1299}
1300unsafe extern "C" {
1301 #[doc = " XPLMSetWindowGeometryOS\n\n This routine allows you to set the position and size, in operating system\n pixel coordinates, of a popped out window (that is, a window whose\n positioning mode is xplm_WindowPopOut, which exists outside the X-Plane\n simulation window, in its own first-class operating system window).\n\n Note that you are responsible for ensuring both that your window is popped\n out (using XPLMWindowIsPoppedOut()) and that a monitor really exists at the\n OS coordinates you provide (using XPLMGetAllMonitorBoundsOS()).\n"]
1302 pub fn XPLMSetWindowGeometryOS(
1303 inWindowID: XPLMWindowID,
1304 inLeft: ::std::os::raw::c_int,
1305 inTop: ::std::os::raw::c_int,
1306 inRight: ::std::os::raw::c_int,
1307 inBottom: ::std::os::raw::c_int,
1308 );
1309}
1310unsafe extern "C" {
1311 #[doc = " XPLMGetWindowGeometryVR\n\n Returns the width and height, in boxels, of a window in VR. Note that you\n are responsible for ensuring your window is in VR (using\n XPLMWindowIsInVR()).\n"]
1312 pub fn XPLMGetWindowGeometryVR(
1313 inWindowID: XPLMWindowID,
1314 outWidthBoxels: *mut ::std::os::raw::c_int,
1315 outHeightBoxels: *mut ::std::os::raw::c_int,
1316 );
1317}
1318unsafe extern "C" {
1319 #[doc = " XPLMSetWindowGeometryVR\n\n This routine allows you to set the size, in boxels, of a window in VR (that\n is, a window whose positioning mode is xplm_WindowVR).\n\n Note that you are responsible for ensuring your window is in VR (using\n XPLMWindowIsInVR()).\n"]
1320 pub fn XPLMSetWindowGeometryVR(
1321 inWindowID: XPLMWindowID,
1322 widthBoxels: ::std::os::raw::c_int,
1323 heightBoxels: ::std::os::raw::c_int,
1324 );
1325}
1326unsafe extern "C" {
1327 #[doc = " XPLMGetWindowIsVisible\n\n Returns true (1) if the specified window is visible.\n"]
1328 pub fn XPLMGetWindowIsVisible(inWindowID: XPLMWindowID) -> ::std::os::raw::c_int;
1329}
1330unsafe extern "C" {
1331 #[doc = " XPLMSetWindowIsVisible\n\n This routine shows or hides a window.\n"]
1332 pub fn XPLMSetWindowIsVisible(inWindowID: XPLMWindowID, inIsVisible: ::std::os::raw::c_int);
1333}
1334unsafe extern "C" {
1335 #[doc = " XPLMWindowIsPoppedOut\n\n True if this window has been popped out (making it a first-class window in\n the operating system), which in turn is true if and only if you have set\n the window's positioning mode to xplm_WindowPopOut.\n\n Only applies to modern windows. (Windows created using the deprecated\n XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of\n the SDK cannot be popped out.)\n"]
1336 pub fn XPLMWindowIsPoppedOut(inWindowID: XPLMWindowID) -> ::std::os::raw::c_int;
1337}
1338unsafe extern "C" {
1339 #[doc = " XPLMWindowIsInVR\n\n True if this window has been moved to the virtual reality (VR) headset,\n which in turn is true if and only if you have set the window's positioning\n mode to xplm_WindowVR.\n\n Only applies to modern windows. (Windows created using the deprecated\n XPLMCreateWindow(), or windows compiled against a pre-XPLM301 version of\n the SDK cannot be moved to VR.)\n"]
1340 pub fn XPLMWindowIsInVR(inWindowID: XPLMWindowID) -> ::std::os::raw::c_int;
1341}
1342unsafe extern "C" {
1343 #[doc = " XPLMSetWindowGravity\n\n A window's \"gravity\" controls how the window shifts as the whole X-Plane\n window resizes. A gravity of 1 means the window maintains its positioning\n relative to the right or top edges, 0 the left/bottom, and 0.5 keeps it\n centered.\n\n Default gravity is (0, 1, 0, 1), meaning your window will maintain its\n position relative to the top left and will not change size as its\n containing window grows.\n\n If you wanted, say, a window that sticks to the top of the screen (with a\n constant height), but which grows to take the full width of the window, you\n would pass (0, 1, 1, 1). Because your left and right edges would maintain\n their positioning relative to their respective edges of the screen, the\n whole width of your window would change with the X-Plane window.\n\n Only applies to modern windows. (Windows created using the deprecated\n XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of\n the SDK will simply get the default gravity.)\n"]
1344 pub fn XPLMSetWindowGravity(
1345 inWindowID: XPLMWindowID,
1346 inLeftGravity: f32,
1347 inTopGravity: f32,
1348 inRightGravity: f32,
1349 inBottomGravity: f32,
1350 );
1351}
1352unsafe extern "C" {
1353 #[doc = " XPLMSetWindowResizingLimits\n\n Sets the minimum and maximum size of the client rectangle of the given\n window. (That is, it does not include any window styling that you might\n have asked X-Plane to apply on your behalf.) All resizing operations are\n constrained to these sizes.\n\n Only applies to modern windows. (Windows created using the deprecated\n XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of\n the SDK will have no minimum or maximum size.)\n"]
1354 pub fn XPLMSetWindowResizingLimits(
1355 inWindowID: XPLMWindowID,
1356 inMinWidthBoxels: ::std::os::raw::c_int,
1357 inMinHeightBoxels: ::std::os::raw::c_int,
1358 inMaxWidthBoxels: ::std::os::raw::c_int,
1359 inMaxHeightBoxels: ::std::os::raw::c_int,
1360 );
1361}
1362#[doc = " The default positioning mode. Set the window geometry and its future *\n position will be determined by its window gravity, resizing limits, and *\n user interactions."]
1363pub const xplm_WindowPositionFree: _bindgen_ty_10 = 0;
1364#[doc = " Keep the window centered on the monitor you specify"]
1365pub const xplm_WindowCenterOnMonitor: _bindgen_ty_10 = 1;
1366#[doc = " Keep the window full screen on the monitor you specify"]
1367pub const xplm_WindowFullScreenOnMonitor: _bindgen_ty_10 = 2;
1368#[doc = " Like gui_window_full_screen_on_monitor, but stretches over *all* monitors *\n and popout windows. This is an obscure one... unless you have a very good *\n reason to need it, you probably don't!"]
1369pub const xplm_WindowFullScreenOnAllMonitors: _bindgen_ty_10 = 3;
1370#[doc = " A first-class window in the operating system, completely separate from the *\n X-Plane window(s)"]
1371pub const xplm_WindowPopOut: _bindgen_ty_10 = 4;
1372#[doc = " A floating window visible on the VR headset"]
1373pub const xplm_WindowVR: _bindgen_ty_10 = 5;
1374#[doc = " XPLMWindowPositioningMode\n\n XPLMWindowPositionMode describes how X-Plane will position your window on\n the user's screen. X-Plane will maintain this positioning mode even as the\n user resizes their window or adds/removes full-screen monitors.\n\n Positioning mode can only be set for \"modern\" windows (that is, windows\n created using XPLMCreateWindowEx() and compiled against the XPLM300 SDK).\n Windows created using the deprecated XPLMCreateWindow(), or windows\n compiled against a pre-XPLM300 version of the SDK will simply get the\n \"free\" positioning mode.\n"]
1375pub type _bindgen_ty_10 = ::std::os::raw::c_int;
1376pub type XPLMWindowPositioningMode = ::std::os::raw::c_int;
1377unsafe extern "C" {
1378 #[doc = " XPLMSetWindowPositioningMode\n\n Sets the policy for how X-Plane will position your window.\n\n Some positioning modes apply to a particular monitor. For those modes, you\n can pass a negative monitor index to position the window on the main\n X-Plane monitor (the screen with the X-Plane menu bar at the top). Or, if\n you have a specific monitor you want to position your window on, you can\n pass a real monitor index as received from, e.g.,\n XPLMGetAllMonitorBoundsOS().\n\n Only applies to modern windows. (Windows created using the deprecated\n XPLMCreateWindow(), or windows compiled against a pre-XPLM300 version of\n the SDK will always use xplm_WindowPositionFree.)\n"]
1379 pub fn XPLMSetWindowPositioningMode(
1380 inWindowID: XPLMWindowID,
1381 inPositioningMode: XPLMWindowPositioningMode,
1382 inMonitorIndex: ::std::os::raw::c_int,
1383 );
1384}
1385unsafe extern "C" {
1386 #[doc = " XPLMSetWindowTitle\n\n Sets the name for a window. This only applies to windows that opted-in to\n styling as an X-Plane 11 floating window (i.e., with styling mode\n xplm_WindowDecorationRoundRectangle) when they were created using\n XPLMCreateWindowEx().\n"]
1387 pub fn XPLMSetWindowTitle(
1388 inWindowID: XPLMWindowID,
1389 inWindowTitle: *const ::std::os::raw::c_char,
1390 );
1391}
1392unsafe extern "C" {
1393 #[doc = " XPLMGetWindowRefCon\n\n Returns a window's reference constant, the unique value you can use for\n your own purposes.\n"]
1394 pub fn XPLMGetWindowRefCon(inWindowID: XPLMWindowID) -> *mut ::std::os::raw::c_void;
1395}
1396unsafe extern "C" {
1397 #[doc = " XPLMSetWindowRefCon\n\n Sets a window's reference constant. Use this to pass data to yourself in\n the callbacks.\n"]
1398 pub fn XPLMSetWindowRefCon(inWindowID: XPLMWindowID, inRefcon: *mut ::std::os::raw::c_void);
1399}
1400unsafe extern "C" {
1401 #[doc = " XPLMTakeKeyboardFocus\n\n This routine gives a specific window keyboard focus. Keystrokes will be\n sent to that window. Pass a window ID of 0 to remove keyboard focus from\n any plugin-created windows and instead pass keyboard strokes directly to\n X-Plane.\n"]
1402 pub fn XPLMTakeKeyboardFocus(inWindow: XPLMWindowID);
1403}
1404unsafe extern "C" {
1405 #[doc = " XPLMHasKeyboardFocus\n\n Returns true (1) if the indicated window has keyboard focus. Pass a window\n ID of 0 to see if no plugin window has focus, and all keystrokes will go\n directly to X-Plane.\n"]
1406 pub fn XPLMHasKeyboardFocus(inWindow: XPLMWindowID) -> ::std::os::raw::c_int;
1407}
1408unsafe extern "C" {
1409 #[doc = " XPLMBringWindowToFront\n\n This routine brings the window to the front of the Z-order for its layer.\n Windows are brought to the front automatically when they are created.\n Beyond that, you should make sure you are front before handling mouse\n clicks.\n\n Note that this only brings your window to the front of its layer\n (XPLMWindowLayer). Thus, if you have a window in the floating window layer\n (xplm_WindowLayerFloatingWindows), but there is a modal window (in layer\n xplm_WindowLayerModal) above you, you would still not be the true frontmost\n window after calling this. (After all, the window layers are strictly\n ordered, and no window in a lower layer can ever be above any window in a\n higher one.)\n"]
1410 pub fn XPLMBringWindowToFront(inWindow: XPLMWindowID);
1411}
1412unsafe extern "C" {
1413 #[doc = " XPLMIsWindowInFront\n\n This routine returns true if the window you passed in is the frontmost\n visible window in its layer (XPLMWindowLayer).\n\n Thus, if you have a window at the front of the floating window layer\n (xplm_WindowLayerFloatingWindows), this will return true even if there is a\n modal window (in layer xplm_WindowLayerModal) above you. (Not to worry,\n though: in such a case, X-Plane will not pass clicks or keyboard input down\n to your layer until the window above stops \"eating\" the input.)\n\n Note that legacy windows are always placed in layer\n xplm_WindowLayerFlightOverlay, while modern-style windows default to\n xplm_WindowLayerFloatingWindows. This means it's perfectly consistent to\n have two different plugin-created windows (one legacy, one modern) *both*\n be in the front (of their different layers!) at the same time.\n"]
1414 pub fn XPLMIsWindowInFront(inWindow: XPLMWindowID) -> ::std::os::raw::c_int;
1415}
1416#[doc = " XPLMKeySniffer_f\n\n This is the prototype for a low level key-sniffing function. Window-based\n UI _should not use this_! The windowing system provides high-level\n mediated keyboard access, via the callbacks you attach to your\n XPLMCreateWindow_t. By comparison, the key sniffer provides low level\n keyboard access.\n\n Key sniffers are provided to allow libraries to provide non-windowed user\n interaction. For example, the MUI library uses a key sniffer to do pop-up\n text entry.\n\n Return 1 to pass the key on to the next sniffer, the window manager,\n X-Plane, or whomever is down stream. Return 0 to consume the key.\n\n Warning: this API declares virtual keys as a signed character; however the\n VKEY #define macros in XPLMDefs.h define the vkeys using unsigned values\n (that is 0x80 instead of -0x80). So you may need to cast the incoming vkey\n to an unsigned char to get correct comparisons in C.\n"]
1417pub type XPLMKeySniffer_f = ::std::option::Option<
1418 unsafe extern "C" fn(
1419 inChar: ::std::os::raw::c_char,
1420 inFlags: XPLMKeyFlags,
1421 inVirtualKey: ::std::os::raw::c_char,
1422 inRefcon: *mut ::std::os::raw::c_void,
1423 ) -> ::std::os::raw::c_int,
1424>;
1425unsafe extern "C" {
1426 #[doc = " XPLMRegisterKeySniffer\n\n This routine registers a key sniffing callback. You specify whether you\n want to sniff before the window system, or only sniff keys the window\n system does not consume. You should ALMOST ALWAYS sniff non-control keys\n after the window system. When the window system consumes a key, it is\n because the user has \"focused\" a window. Consuming the key or taking\n action based on the key will produce very weird results. Returns\n 1 if successful.\n"]
1427 pub fn XPLMRegisterKeySniffer(
1428 inCallback: XPLMKeySniffer_f,
1429 inBeforeWindows: ::std::os::raw::c_int,
1430 inRefcon: *mut ::std::os::raw::c_void,
1431 ) -> ::std::os::raw::c_int;
1432}
1433unsafe extern "C" {
1434 #[doc = " XPLMUnregisterKeySniffer\n\n This routine unregisters a key sniffer. You must unregister a key sniffer\n for every time you register one with the exact same signature. Returns 1\n if successful.\n"]
1435 pub fn XPLMUnregisterKeySniffer(
1436 inCallback: XPLMKeySniffer_f,
1437 inBeforeWindows: ::std::os::raw::c_int,
1438 inRefcon: *mut ::std::os::raw::c_void,
1439 ) -> ::std::os::raw::c_int;
1440}
1441#[doc = " XPLMHotKey_f\n\n Your hot key callback simply takes a pointer of your choosing.\n"]
1442pub type XPLMHotKey_f =
1443 ::std::option::Option<unsafe extern "C" fn(inRefcon: *mut ::std::os::raw::c_void)>;
1444#[doc = " XPLMHotKeyID\n\n An opaque ID used to identify a hot key.\n"]
1445pub type XPLMHotKeyID = *mut ::std::os::raw::c_void;
1446unsafe extern "C" {
1447 #[doc = " XPLMRegisterHotKey\n\n This routine registers a hot key. You specify your preferred key stroke\n virtual key/flag combination, a description of what your callback does (so\n other plug-ins can describe the plug-in to the user for remapping) and a\n callback function and opaque pointer to pass in). A new hot key ID is\n returned. During execution, the actual key associated with your hot key\n may change, but you are insulated from this.\n"]
1448 pub fn XPLMRegisterHotKey(
1449 inVirtualKey: ::std::os::raw::c_char,
1450 inFlags: XPLMKeyFlags,
1451 inDescription: *const ::std::os::raw::c_char,
1452 inCallback: XPLMHotKey_f,
1453 inRefcon: *mut ::std::os::raw::c_void,
1454 ) -> XPLMHotKeyID;
1455}
1456unsafe extern "C" {
1457 #[doc = " XPLMUnregisterHotKey\n\n Unregisters a hot key. You can only unregister your own hot keys.\n"]
1458 pub fn XPLMUnregisterHotKey(inHotKey: XPLMHotKeyID);
1459}
1460unsafe extern "C" {
1461 #[doc = " XPLMCountHotKeys\n\n Returns the number of current hot keys.\n"]
1462 pub fn XPLMCountHotKeys() -> ::std::os::raw::c_int;
1463}
1464unsafe extern "C" {
1465 #[doc = " XPLMGetNthHotKey\n\n Returns a hot key by index, for iteration on all hot keys.\n"]
1466 pub fn XPLMGetNthHotKey(inIndex: ::std::os::raw::c_int) -> XPLMHotKeyID;
1467}
1468unsafe extern "C" {
1469 #[doc = " XPLMGetHotKeyInfo\n\n Returns information about the hot key. Return NULL for any parameter you\n don't want info about. The description should be at least 512 chars long.\n"]
1470 pub fn XPLMGetHotKeyInfo(
1471 inHotKey: XPLMHotKeyID,
1472 outVirtualKey: *mut ::std::os::raw::c_char,
1473 outFlags: *mut XPLMKeyFlags,
1474 outDescription: *mut ::std::os::raw::c_char,
1475 outPlugin: *mut XPLMPluginID,
1476 );
1477}
1478unsafe extern "C" {
1479 #[doc = " XPLMSetHotKeyCombination\n\n Remaps a hot key's keystrokes. You may remap another plugin's keystrokes.\n"]
1480 pub fn XPLMSetHotKeyCombination(
1481 inHotKey: XPLMHotKeyID,
1482 inVirtualKey: ::std::os::raw::c_char,
1483 inFlags: XPLMKeyFlags,
1484 );
1485}
1486#[doc = " The bitmap that contains window outlines, button outlines, fonts, etc."]
1487pub const xplm_Tex_GeneralInterface: _bindgen_ty_11 = 0;
1488#[doc = " XPLMTextureID\n\n XPLM Texture IDs name well-known textures in the sim for you to use. This\n allows you to recycle textures from X-Plane, saving VRAM.\n\n *Warning*: do not use these enums. The only remaining use they have is to\n access the legacy compatibility v10 UI texture; if you need this, get it\n via the Widgets library.\n"]
1489pub type _bindgen_ty_11 = ::std::os::raw::c_int;
1490pub type XPLMTextureID = ::std::os::raw::c_int;
1491unsafe extern "C" {
1492 #[doc = " XPLMSetGraphicsState\n\n XPLMSetGraphicsState changes OpenGL's fixed function pipeline state. You\n are not responsible for restoring any state that is accessed via\n XPLMSetGraphicsState, but you are responsible for not accessing this state\n directly.\n\n - inEnableFog - enables or disables fog, equivalent to: glEnable(GL_FOG);\n - inNumberTexUnits - enables or disables a number of multitexturing units.\n If the number is 0, 2d texturing is disabled entirely, as in\n glDisable(GL_TEXTURE_2D); Otherwise, 2d texturing is enabled, and a\n number of multitexturing units are enabled sequentially, starting with\n unit 0, e.g. glActiveTextureARB(GL_TEXTURE0_ARB); glEnable\n (GL_TEXTURE_2D);\n - inEnableLighting - enables or disables OpenGL lighting, e.g.\n glEnable(GL_LIGHTING); glEnable(GL_LIGHT0);\n - inEnableAlphaTesting - enables or disables the alpha test per pixel, e.g.\n glEnable(GL_ALPHA_TEST);\n - inEnableAlphaBlending - enables or disables alpha blending per pixel,\n e.g. glEnable(GL_BLEND);\n - inEnableDepthTesting - enables per pixel depth testing, as in\n glEnable(GL_DEPTH_TEST);\n - inEnableDepthWriting - enables writing back of depth information to the\n depth buffer, as in glDepthMask(GL_TRUE);\n\n The purpose of this function is to change OpenGL state while keeping\n X-Plane aware of the state changes; this keeps X-Plane from getting\n surprised by OGL state changes, and prevents X-Plane and plug-ins from\n having to set all state before all draws; XPLMSetGraphicsState internally\n skips calls to change state that is already properly enabled.\n\n X-Plane does not have a 'default' OGL state for plug-ins with respect to\n the above state vector; plug-ins should totally set OGL state using this\n API before drawing. Use XPLMSetGraphicsState instead of any of the above\n OpenGL calls.\n\n WARNING: Any routine that performs drawing (e.g. XPLMDrawString or widget\n code) may change X-Plane's state. Always set state before drawing after\n unknown code has executed.\n\n *Deprecation Warnings*: X-Plane's lighting and fog environment is\n significantly more complex than the fixed function pipeline can express;\n do not assume that lighting and fog state is a good approximation for 3-d\n drawing. Prefer to use XPLMInstancing to draw objects. All calls to\n XPLMSetGraphicsState should have no fog or lighting.\n"]
1493 pub fn XPLMSetGraphicsState(
1494 inEnableFog: ::std::os::raw::c_int,
1495 inNumberTexUnits: ::std::os::raw::c_int,
1496 inEnableLighting: ::std::os::raw::c_int,
1497 inEnableAlphaTesting: ::std::os::raw::c_int,
1498 inEnableAlphaBlending: ::std::os::raw::c_int,
1499 inEnableDepthTesting: ::std::os::raw::c_int,
1500 inEnableDepthWriting: ::std::os::raw::c_int,
1501 );
1502}
1503unsafe extern "C" {
1504 #[doc = " XPLMBindTexture2d\n\n XPLMBindTexture2d changes what texture is bound to the 2d texturing\n target. This routine caches the current 2d texture across all texturing\n units in the sim and plug-ins, preventing extraneous binding. For\n example, consider several plug-ins running in series; if they all use the\n 'general interface' bitmap to do UI, calling this function will skip the\n rebinding of the general interface texture on all but the first plug-in,\n which can provide better frame rates on some graphics cards.\n\n inTextureID is the ID of the texture object to bind; inTextureUnit is a\n zero-based texture unit (e.g. 0 for the first one), up to a maximum of 4\n units. (This number may increase in future versions of X-Plane.)\n\n Use this routine instead of glBindTexture(GL_TEXTURE_2D, ....);\n"]
1505 pub fn XPLMBindTexture2d(
1506 inTextureNum: ::std::os::raw::c_int,
1507 inTextureUnit: ::std::os::raw::c_int,
1508 );
1509}
1510unsafe extern "C" {
1511 #[doc = " XPLMGenerateTextureNumbers\n\n Use this routine instead of glGenTextures to generate new texture object\n IDs. This routine historically ensured that plugins don't use texure IDs\n that X-Plane is reserving for its own use.\n"]
1512 pub fn XPLMGenerateTextureNumbers(
1513 outTextureIDs: *mut ::std::os::raw::c_int,
1514 inCount: ::std::os::raw::c_int,
1515 );
1516}
1517unsafe extern "C" {
1518 #[doc = " XPLMWorldToLocal\n\n This routine translates coordinates from latitude, longitude, and altitude\n to local scene coordinates. Latitude and longitude are in decimal degrees,\n and altitude is in meters MSL (mean sea level). The XYZ coordinates are in\n meters in the local OpenGL coordinate system.\n"]
1519 pub fn XPLMWorldToLocal(
1520 inLatitude: f64,
1521 inLongitude: f64,
1522 inAltitude: f64,
1523 outX: *mut f64,
1524 outY: *mut f64,
1525 outZ: *mut f64,
1526 );
1527}
1528unsafe extern "C" {
1529 #[doc = " XPLMLocalToWorld\n\n This routine translates a local coordinate triplet back into latitude,\n longitude, and altitude. Latitude and longitude are in decimal degrees,\n and altitude is in meters MSL (mean sea level). The XYZ coordinates are in\n meters in the local OpenGL coordinate system.\n\n NOTE: world coordinates are less precise than local coordinates; you should\n try to avoid round tripping from local to world and back.\n"]
1530 pub fn XPLMLocalToWorld(
1531 inX: f64,
1532 inY: f64,
1533 inZ: f64,
1534 outLatitude: *mut f64,
1535 outLongitude: *mut f64,
1536 outAltitude: *mut f64,
1537 );
1538}
1539unsafe extern "C" {
1540 #[doc = " XPLMDrawTranslucentDarkBox\n\n This routine draws a translucent dark box, partially obscuring parts of the\n screen but making text easy to read. This is the same graphics primitive\n used by X-Plane to show text files.\n"]
1541 pub fn XPLMDrawTranslucentDarkBox(
1542 inLeft: ::std::os::raw::c_int,
1543 inTop: ::std::os::raw::c_int,
1544 inRight: ::std::os::raw::c_int,
1545 inBottom: ::std::os::raw::c_int,
1546 );
1547}
1548#[doc = " Mono-spaced font for user interface. Available in all versions of the SDK."]
1549pub const xplmFont_Basic: _bindgen_ty_12 = 0;
1550#[doc = " Proportional UI font."]
1551pub const xplmFont_Proportional: _bindgen_ty_12 = 18;
1552#[doc = " XPLMFontID\n\n X-Plane features some fixed-character fonts. Each font may have its own\n metrics.\n\n WARNING: Some of these fonts are no longer supported or may have changed\n geometries. For maximum copmatibility, see the comments below.\n\n Note: X-Plane 7 supports proportional-spaced fonts. Since no measuring\n routine is available yet, the SDK will normally draw using a fixed-width\n font. You can use a dataref to enable proportional font drawing on XP7 if\n you want to.\n"]
1553pub type _bindgen_ty_12 = ::std::os::raw::c_int;
1554pub type XPLMFontID = ::std::os::raw::c_int;
1555unsafe extern "C" {
1556 #[doc = " XPLMDrawString\n\n This routine draws a NULL terminated string in a given font. Pass in the\n lower left pixel that the character is to be drawn onto. Also pass the\n character and font ID. This function returns the x offset plus the width of\n all drawn characters. The color to draw in is specified as a pointer to an\n array of three floating point colors, representing RGB intensities from 0.0\n to 1.0.\n"]
1557 pub fn XPLMDrawString(
1558 inColorRGB: *mut f32,
1559 inXOffset: ::std::os::raw::c_int,
1560 inYOffset: ::std::os::raw::c_int,
1561 inChar: *const ::std::os::raw::c_char,
1562 inWordWrapWidth: *mut ::std::os::raw::c_int,
1563 inFontID: XPLMFontID,
1564 );
1565}
1566unsafe extern "C" {
1567 #[doc = " XPLMDrawNumber\n\n This routine draws a number similar to the digit editing fields in\n PlaneMaker and data output display in X-Plane. Pass in a color, a\n position, a floating point value, and formatting info. Specify how many\n integer and how many decimal digits to show and whether to show a sign, as\n well as a character set. This routine returns the xOffset plus width of the\n string drawn.\n"]
1568 pub fn XPLMDrawNumber(
1569 inColorRGB: *mut f32,
1570 inXOffset: ::std::os::raw::c_int,
1571 inYOffset: ::std::os::raw::c_int,
1572 inValue: f64,
1573 inDigits: ::std::os::raw::c_int,
1574 inDecimals: ::std::os::raw::c_int,
1575 inShowSign: ::std::os::raw::c_int,
1576 inFontID: XPLMFontID,
1577 );
1578}
1579unsafe extern "C" {
1580 #[doc = " XPLMGetFontDimensions\n\n This routine returns the width and height of a character in a given font.\n It also tells you if the font only supports numeric digits. Pass NULL if\n you don't need a given field. Note that for a proportional font the width\n will be an arbitrary, hopefully average width.\n"]
1581 pub fn XPLMGetFontDimensions(
1582 inFontID: XPLMFontID,
1583 outCharWidth: *mut ::std::os::raw::c_int,
1584 outCharHeight: *mut ::std::os::raw::c_int,
1585 outDigitsOnly: *mut ::std::os::raw::c_int,
1586 );
1587}
1588unsafe extern "C" {
1589 #[doc = " XPLMMeasureString\n\n This routine returns the width in pixels of a string using a given font.\n The string is passed as a pointer plus length (and does not need to be null\n terminated); this is used to allow for measuring substrings. The return\n value is floating point; it is possible that future font drawing may allow\n for fractional pixels.\n"]
1590 pub fn XPLMMeasureString(
1591 inFontID: XPLMFontID,
1592 inChar: *const ::std::os::raw::c_char,
1593 inNumChars: ::std::os::raw::c_int,
1594 ) -> f32;
1595}
1596#[doc = " The Y probe gives you the location of the tallest physical scenery along *\n the Y axis going through the queried point."]
1597pub const xplm_ProbeY: _bindgen_ty_13 = 0;
1598#[doc = " XPLMProbeType\n\n XPLMProbeType defines the type of terrain probe - each probe has a\n different algorithm. (Only one type of probe is provided right now, but\n future APIs will expose more flexible or powerful or useful probes.\n"]
1599pub type _bindgen_ty_13 = ::std::os::raw::c_int;
1600pub type XPLMProbeType = ::std::os::raw::c_int;
1601#[doc = " The probe hit terrain and returned valid values."]
1602pub const xplm_ProbeHitTerrain: _bindgen_ty_14 = 0;
1603#[doc = " An error in the API call. Either the probe struct size is bad, the probe *\n is invalid, or the type is mismatched for the specific query call."]
1604pub const xplm_ProbeError: _bindgen_ty_14 = 1;
1605#[doc = " The probe call succeeded but there is no terrain under this point (perhaps *\n it is off the side of the planet?)"]
1606pub const xplm_ProbeMissed: _bindgen_ty_14 = 2;
1607#[doc = " XPLMProbeResult\n\n Probe results - possible results from a probe query.\n"]
1608pub type _bindgen_ty_14 = ::std::os::raw::c_int;
1609pub type XPLMProbeResult = ::std::os::raw::c_int;
1610#[doc = " XPLMProbeRef\n\n An XPLMProbeRef is an opaque handle to a probe, used for querying the\n terrain.\n"]
1611pub type XPLMProbeRef = *mut ::std::os::raw::c_void;
1612#[doc = " XPLMProbeInfo_t\n\n XPLMProbeInfo_t contains the results of a probe call. Make sure to set\n structSize to the size of the struct before using it.\n"]
1613#[repr(C)]
1614#[derive(Debug, Copy, Clone)]
1615pub struct XPLMProbeInfo_t {
1616 #[doc = " Size of structure in bytes - always set this before calling the XPLM."]
1617 pub structSize: ::std::os::raw::c_int,
1618 #[doc = " Resulting X location of the terrain point we hit, in local OpenGL *\n coordinates."]
1619 pub locationX: f32,
1620 #[doc = " Resulting Y location of the terrain point we hit, in local OpenGL *\n coordinates."]
1621 pub locationY: f32,
1622 #[doc = " Resulting Z location of the terrain point we hit, in local OpenGL *\n coordinates."]
1623 pub locationZ: f32,
1624 #[doc = " X component of the normal vector to the terrain we found."]
1625 pub normalX: f32,
1626 #[doc = " Y component of the normal vector to the terrain we found."]
1627 pub normalY: f32,
1628 #[doc = " Z component of the normal vector to the terrain we found."]
1629 pub normalZ: f32,
1630 #[doc = " X component of the velocity vector of the terrain we found."]
1631 pub velocityX: f32,
1632 #[doc = " Y component of the velocity vector of the terrain we found."]
1633 pub velocityY: f32,
1634 #[doc = " Z component of the velocity vector of the terrain we found."]
1635 pub velocityZ: f32,
1636 #[doc = " Tells if the surface we hit is water (otherwise it is land)."]
1637 pub is_wet: ::std::os::raw::c_int,
1638}
1639#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1640const _: () = {
1641 ["Size of XPLMProbeInfo_t"][::std::mem::size_of::<XPLMProbeInfo_t>() - 44usize];
1642 ["Alignment of XPLMProbeInfo_t"][::std::mem::align_of::<XPLMProbeInfo_t>() - 4usize];
1643 ["Offset of field: XPLMProbeInfo_t::structSize"]
1644 [::std::mem::offset_of!(XPLMProbeInfo_t, structSize) - 0usize];
1645 ["Offset of field: XPLMProbeInfo_t::locationX"]
1646 [::std::mem::offset_of!(XPLMProbeInfo_t, locationX) - 4usize];
1647 ["Offset of field: XPLMProbeInfo_t::locationY"]
1648 [::std::mem::offset_of!(XPLMProbeInfo_t, locationY) - 8usize];
1649 ["Offset of field: XPLMProbeInfo_t::locationZ"]
1650 [::std::mem::offset_of!(XPLMProbeInfo_t, locationZ) - 12usize];
1651 ["Offset of field: XPLMProbeInfo_t::normalX"]
1652 [::std::mem::offset_of!(XPLMProbeInfo_t, normalX) - 16usize];
1653 ["Offset of field: XPLMProbeInfo_t::normalY"]
1654 [::std::mem::offset_of!(XPLMProbeInfo_t, normalY) - 20usize];
1655 ["Offset of field: XPLMProbeInfo_t::normalZ"]
1656 [::std::mem::offset_of!(XPLMProbeInfo_t, normalZ) - 24usize];
1657 ["Offset of field: XPLMProbeInfo_t::velocityX"]
1658 [::std::mem::offset_of!(XPLMProbeInfo_t, velocityX) - 28usize];
1659 ["Offset of field: XPLMProbeInfo_t::velocityY"]
1660 [::std::mem::offset_of!(XPLMProbeInfo_t, velocityY) - 32usize];
1661 ["Offset of field: XPLMProbeInfo_t::velocityZ"]
1662 [::std::mem::offset_of!(XPLMProbeInfo_t, velocityZ) - 36usize];
1663 ["Offset of field: XPLMProbeInfo_t::is_wet"]
1664 [::std::mem::offset_of!(XPLMProbeInfo_t, is_wet) - 40usize];
1665};
1666unsafe extern "C" {
1667 #[doc = " XPLMCreateProbe\n\n Creates a new probe object of a given type and returns.\n"]
1668 pub fn XPLMCreateProbe(inProbeType: XPLMProbeType) -> XPLMProbeRef;
1669}
1670unsafe extern "C" {
1671 #[doc = " XPLMDestroyProbe\n\n Deallocates an existing probe object.\n"]
1672 pub fn XPLMDestroyProbe(inProbe: XPLMProbeRef);
1673}
1674unsafe extern "C" {
1675 #[doc = " XPLMProbeTerrainXYZ\n\n Probes the terrain. Pass in the XYZ coordinate of the probe point, a probe\n object, and an XPLMProbeInfo_t struct that has its structSize member set\n properly. Other fields are filled in if we hit terrain, and a probe result\n is returned.\n"]
1676 pub fn XPLMProbeTerrainXYZ(
1677 inProbe: XPLMProbeRef,
1678 inX: f32,
1679 inY: f32,
1680 inZ: f32,
1681 outInfo: *mut XPLMProbeInfo_t,
1682 ) -> XPLMProbeResult;
1683}
1684unsafe extern "C" {
1685 #[doc = " XPLMGetMagneticVariation\n\n Returns X-Plane's simulated magnetic variation (declination) at the\n indication latitude and longitude.\n"]
1686 pub fn XPLMGetMagneticVariation(latitude: f64, longitude: f64) -> f32;
1687}
1688unsafe extern "C" {
1689 #[doc = " XPLMDegTrueToDegMagnetic\n\n Converts a heading in degrees relative to true north into a value relative\n to magnetic north at the user's current location.\n"]
1690 pub fn XPLMDegTrueToDegMagnetic(headingDegreesTrue: f32) -> f32;
1691}
1692unsafe extern "C" {
1693 #[doc = " XPLMDegMagneticToDegTrue\n\n Converts a heading in degrees relative to magnetic north at the user's\n current location into a value relative to true north.\n"]
1694 pub fn XPLMDegMagneticToDegTrue(headingDegreesMagnetic: f32) -> f32;
1695}
1696#[doc = " XPLMObjectRef\n\n An XPLMObjectRef is a opaque handle to an .obj file that has been loaded\n into memory.\n"]
1697pub type XPLMObjectRef = *mut ::std::os::raw::c_void;
1698#[doc = " XPLMDrawInfo_t\n\n The XPLMDrawInfo_t structure contains positioning info for one object that\n is to be drawn. Be sure to set structSize to the size of the structure for\n future expansion.\n"]
1699#[repr(C)]
1700#[derive(Debug, Copy, Clone)]
1701pub struct XPLMDrawInfo_t {
1702 #[doc = " Set this to the size of this structure!"]
1703 pub structSize: ::std::os::raw::c_int,
1704 #[doc = " X location of the object in local coordinates."]
1705 pub x: f32,
1706 #[doc = " Y location of the object in local coordinates."]
1707 pub y: f32,
1708 #[doc = " Z location of the object in local coordinates."]
1709 pub z: f32,
1710 #[doc = " Pitch in degres to rotate the object, positive is up."]
1711 pub pitch: f32,
1712 #[doc = " Heading in local coordinates to rotate the object, clockwise."]
1713 pub heading: f32,
1714 #[doc = " Roll to rotate the object."]
1715 pub roll: f32,
1716}
1717#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1718const _: () = {
1719 ["Size of XPLMDrawInfo_t"][::std::mem::size_of::<XPLMDrawInfo_t>() - 28usize];
1720 ["Alignment of XPLMDrawInfo_t"][::std::mem::align_of::<XPLMDrawInfo_t>() - 4usize];
1721 ["Offset of field: XPLMDrawInfo_t::structSize"]
1722 [::std::mem::offset_of!(XPLMDrawInfo_t, structSize) - 0usize];
1723 ["Offset of field: XPLMDrawInfo_t::x"][::std::mem::offset_of!(XPLMDrawInfo_t, x) - 4usize];
1724 ["Offset of field: XPLMDrawInfo_t::y"][::std::mem::offset_of!(XPLMDrawInfo_t, y) - 8usize];
1725 ["Offset of field: XPLMDrawInfo_t::z"][::std::mem::offset_of!(XPLMDrawInfo_t, z) - 12usize];
1726 ["Offset of field: XPLMDrawInfo_t::pitch"]
1727 [::std::mem::offset_of!(XPLMDrawInfo_t, pitch) - 16usize];
1728 ["Offset of field: XPLMDrawInfo_t::heading"]
1729 [::std::mem::offset_of!(XPLMDrawInfo_t, heading) - 20usize];
1730 ["Offset of field: XPLMDrawInfo_t::roll"]
1731 [::std::mem::offset_of!(XPLMDrawInfo_t, roll) - 24usize];
1732};
1733#[doc = " XPLMObjectLoaded_f\n\n You provide this callback when loading an object asynchronously; it will be\n called once the object is loaded. Your refcon is passed back. The object\n ref passed in is the newly loaded object (ready for use) or NULL if an\n error occured.\n\n If your plugin is disabled, this callback will be delivered as soon as the\n plugin is re-enabled. If your plugin is unloaded before this callback is\n ever called, the SDK will release the object handle for you.\n"]
1734pub type XPLMObjectLoaded_f = ::std::option::Option<
1735 unsafe extern "C" fn(inObject: XPLMObjectRef, inRefcon: *mut ::std::os::raw::c_void),
1736>;
1737unsafe extern "C" {
1738 #[doc = " XPLMLoadObject\n\n This routine loads an OBJ file and returns a handle to it. If X-Plane has\n already loaded the object, the handle to the existing object is returned.\n Do not assume you will get the same handle back twice, but do make sure to\n call unload once for every load to avoid \"leaking\" objects. The object will\n be purged from memory when no plugins and no scenery are using it.\n\n The path for the object must be relative to the X-System base folder. If\n the path is in the root of the X-System folder you may need to prepend ./\n to it; loading objects in the root of the X-System folder is STRONGLY\n discouraged - your plugin should not dump art resources in the root folder!\n\n XPLMLoadObject will return NULL if the object cannot be loaded (either\n because it is not found or the file is misformatted). This routine will\n load any object that can be used in the X-Plane scenery system.\n\n It is important that the datarefs an object uses for animation already be\n registered before you load the object. For this reason it may be necessary\n to defer object loading until the sim has fully started.\n"]
1739 pub fn XPLMLoadObject(inPath: *const ::std::os::raw::c_char) -> XPLMObjectRef;
1740}
1741unsafe extern "C" {
1742 #[doc = " XPLMLoadObjectAsync\n\n This routine loads an object asynchronously; control is returned to you\n immediately while X-Plane loads the object. The sim will not stop flying\n while the object loads. For large objects, it may be several seconds before\n the load finishes.\n\n You provide a callback function that is called once the load has completed.\n Note that if the object cannot be loaded, you will not find out until the\n callback function is called with a NULL object handle.\n\n There is no way to cancel an asynchronous object load; you must wait for\n the load to complete and then release the object if it is no longer\n desired.\n"]
1743 pub fn XPLMLoadObjectAsync(
1744 inPath: *const ::std::os::raw::c_char,
1745 inCallback: XPLMObjectLoaded_f,
1746 inRefcon: *mut ::std::os::raw::c_void,
1747 );
1748}
1749unsafe extern "C" {
1750 #[doc = " XPLMUnloadObject\n\n This routine marks an object as no longer being used by your plugin.\n Objects are reference counted: once no plugins are using an object, it is\n purged from memory. Make sure to call XPLMUnloadObject once for each\n successful call to XPLMLoadObject.\n"]
1751 pub fn XPLMUnloadObject(inObject: XPLMObjectRef);
1752}
1753#[doc = " XPLMLibraryEnumerator_f\n\n An XPLMLibraryEnumerator_f is a callback you provide that is called once\n for each library element that is located. The returned paths will be\n relative to the X-System folder.\n"]
1754pub type XPLMLibraryEnumerator_f = ::std::option::Option<
1755 unsafe extern "C" fn(
1756 inFilePath: *const ::std::os::raw::c_char,
1757 inRef: *mut ::std::os::raw::c_void,
1758 ),
1759>;
1760unsafe extern "C" {
1761 #[doc = " XPLMLookupObjects\n\n This routine looks up a virtual path in the library system and returns all\n matching elements. You provide a callback - one virtual path may match many\n objects in the library. XPLMLookupObjects returns the number of objects\n found.\n\n The latitude and longitude parameters specify the location the object will\n be used. The library system allows for scenery packages to only provide\n objects to certain local locations. Only objects that are allowed at the\n latitude/longitude you provide will be returned.\n"]
1762 pub fn XPLMLookupObjects(
1763 inPath: *const ::std::os::raw::c_char,
1764 inLatitude: f32,
1765 inLongitude: f32,
1766 enumerator: XPLMLibraryEnumerator_f,
1767 ref_: *mut ::std::os::raw::c_void,
1768 ) -> ::std::os::raw::c_int;
1769}
1770#[doc = " XPLMInstanceRef\n\n An opaque handle to an instance.\n"]
1771pub type XPLMInstanceRef = *mut ::std::os::raw::c_void;
1772unsafe extern "C" {
1773 #[doc = " XPLMCreateInstance\n\n XPLMCreateInstance creates a new instance, managed by your plug-in, and\n returns a handle to the instance. A few important requirements:\n\n * The object passed in must be fully loaded and returned from the XPLM\n before you can create your instance; you cannot pass a null obj ref, nor\n can you change the ref later.\n\n * If you use any custom datarefs in your object, they must be registered\n before the object is loaded. This is true even if their data will be\n provided via the instance dataref list.\n\n * The instance dataref array must be a valid pointer to a null-terminated\n array. That is, if you do not want any datarefs, you must pass a pointer\n to a one-element array containing a null item. You cannot pass null for\n the array itself.\n"]
1774 pub fn XPLMCreateInstance(
1775 obj: XPLMObjectRef,
1776 datarefs: *mut *const ::std::os::raw::c_char,
1777 ) -> XPLMInstanceRef;
1778}
1779unsafe extern "C" {
1780 #[doc = " XPLMDestroyInstance\n\n XPLMDestroyInstance destroys and deallocates your instance; once called,\n you are still responsible for releasing the OBJ ref.\n\n Tip: you can release your OBJ ref after you call XPLMCreateInstance as long\n as you never use it again; the instance will maintain its own reference to\n the OBJ and the object OBJ be deallocated when the instance is destroyed.\n"]
1781 pub fn XPLMDestroyInstance(instance: XPLMInstanceRef);
1782}
1783unsafe extern "C" {
1784 #[doc = " XPLMInstanceSetPosition\n\n Updates both the position of the instance and all datarefs you registered\n for it. Call this from a flight loop callback or UI callback.\n\n __DO_NOT__ call XPLMInstanceSetPosition from a drawing callback; the whole\n point of instancing is that you do not need any drawing callbacks. Setting\n instance data from a drawing callback may have undefined consequences, and\n the drawing callback hurts FPS unnecessarily.\n\n The memory pointed to by the data pointer must be large enough to hold one\n float for every dataref you have registered, and must contain valid\n floating point data.\n\n BUG: before X-Plane 11.50, if you have no dataref registered, you must\n still pass a valid pointer for data and not null.\n"]
1785 pub fn XPLMInstanceSetPosition(
1786 instance: XPLMInstanceRef,
1787 new_position: *const XPLMDrawInfo_t,
1788 data: *const f32,
1789 );
1790}
1791#[doc = " XPLMMapLayerID\n\n This is an opaque handle for a plugin-created map layer. Pass it to the map\n drawing APIs from an appropriate callback to draw in the layer you created.\n"]
1792pub type XPLMMapLayerID = *mut ::std::os::raw::c_void;
1793#[doc = " XPLMMapProjectionID\n\n This is an opaque handle for a map projection. Pass it to the projection\n APIs to translate between map coordinates and latitude/longitudes.\n"]
1794pub type XPLMMapProjectionID = *mut ::std::os::raw::c_void;
1795pub const xplm_MapStyle_VFR_Sectional: _bindgen_ty_15 = 0;
1796pub const xplm_MapStyle_IFR_LowEnroute: _bindgen_ty_15 = 1;
1797pub const xplm_MapStyle_IFR_HighEnroute: _bindgen_ty_15 = 2;
1798#[doc = " XPLMMapStyle\n\n Indicates the visual style being drawn by the map. In X-Plane, the user can\n choose between a number of map types, and different map types may have use\n a different visual representation for the same elements (for instance, the\n visual style of the terrain layer changes drastically between the VFR and\n IFR layers), or certain layers may be disabled entirely in some map types\n (e.g., localizers are only visible in the IFR low-enroute style).\n"]
1799pub type _bindgen_ty_15 = ::std::os::raw::c_int;
1800pub type XPLMMapStyle = ::std::os::raw::c_int;
1801#[doc = " XPLMMapDrawingCallback_f\n\n This is the OpenGL map drawing callback for plugin-created map layers. You\n can perform arbitrary OpenGL drawing from this callback, with one\n exception: changes to the Z-buffer are not permitted, and will result in\n map drawing errors.\n\n All drawing done from within this callback appears beneath all built-in\n X-Plane icons and labels, but above the built-in \"fill\" layers (layers\n providing major details, like terrain and water). Note, however, that the\n relative ordering between the drawing callbacks of different plugins is not\n guaranteed.\n"]
1802pub type XPLMMapDrawingCallback_f = ::std::option::Option<
1803 unsafe extern "C" fn(
1804 inLayer: XPLMMapLayerID,
1805 inMapBoundsLeftTopRightBottom: *const f32,
1806 zoomRatio: f32,
1807 mapUnitsPerUserInterfaceUnit: f32,
1808 mapStyle: XPLMMapStyle,
1809 projection: XPLMMapProjectionID,
1810 inRefcon: *mut ::std::os::raw::c_void,
1811 ),
1812>;
1813#[doc = " XPLMMapIconDrawingCallback_f\n\n This is the icon drawing callback that enables plugin-created map layers to\n draw icons using X-Plane's built-in icon drawing functionality. You can\n request an arbitrary number of PNG icons to be drawn via\n XPLMDrawMapIconFromSheet() from within this callback, but you may not\n perform any OpenGL drawing here.\n\n Icons enqueued by this function will appear above all OpenGL drawing\n (performed by your optional XPLMMapDrawingCallback_f), and above all\n built-in X-Plane map icons of the same layer type (\"fill\" or \"markings,\" as\n determined by the XPLMMapLayerType in your XPLMCreateMapLayer_t). Note,\n however, that the relative ordering between the drawing callbacks of\n different plugins is not guaranteed.\n"]
1814pub type XPLMMapIconDrawingCallback_f = ::std::option::Option<
1815 unsafe extern "C" fn(
1816 inLayer: XPLMMapLayerID,
1817 inMapBoundsLeftTopRightBottom: *const f32,
1818 zoomRatio: f32,
1819 mapUnitsPerUserInterfaceUnit: f32,
1820 mapStyle: XPLMMapStyle,
1821 projection: XPLMMapProjectionID,
1822 inRefcon: *mut ::std::os::raw::c_void,
1823 ),
1824>;
1825#[doc = " XPLMMapLabelDrawingCallback_f\n\n This is the label drawing callback that enables plugin-created map layers\n to draw text labels using X-Plane's built-in labeling functionality. You\n can request an arbitrary number of text labels to be drawn via\n XPLMDrawMapLabel() from within this callback, but you may not perform any\n OpenGL drawing here.\n\n Labels enqueued by this function will appear above all OpenGL drawing\n (performed by your optional XPLMMapDrawingCallback_f), and above all\n built-in map icons and labels of the same layer type (\"fill\" or \"markings,\"\n as determined by the XPLMMapLayerType in your XPLMCreateMapLayer_t). Note,\n however, that the relative ordering between the drawing callbacks of\n different plugins is not guaranteed.\n"]
1826pub type XPLMMapLabelDrawingCallback_f = ::std::option::Option<
1827 unsafe extern "C" fn(
1828 inLayer: XPLMMapLayerID,
1829 inMapBoundsLeftTopRightBottom: *const f32,
1830 zoomRatio: f32,
1831 mapUnitsPerUserInterfaceUnit: f32,
1832 mapStyle: XPLMMapStyle,
1833 projection: XPLMMapProjectionID,
1834 inRefcon: *mut ::std::os::raw::c_void,
1835 ),
1836>;
1837#[doc = " XPLMMapPrepareCacheCallback_f\n\n A callback used to allow you to cache whatever information your layer needs\n to draw in the current map area.\n\n This is called each time the map's total bounds change. This is typically\n triggered by new DSFs being loaded, such that X-Plane discards old,\n now-distant DSFs and pulls in new ones. At that point, the available bounds\n of the map also change to match the new DSF area.\n\n By caching just the information you need to draw in this area, your future\n draw calls can be made faster, since you'll be able to simply \"splat\" your\n precomputed information each frame.\n\n We guarantee that the map projection will not change between successive\n prepare cache calls, nor will any draw call give you bounds outside these\n total map bounds. So, if you cache the projected map coordinates of all the\n items you might want to draw in the total map area, you can be guaranteed\n that no draw call will be asked to do any new work.\n"]
1838pub type XPLMMapPrepareCacheCallback_f = ::std::option::Option<
1839 unsafe extern "C" fn(
1840 inLayer: XPLMMapLayerID,
1841 inTotalMapBoundsLeftTopRightBottom: *const f32,
1842 projection: XPLMMapProjectionID,
1843 inRefcon: *mut ::std::os::raw::c_void,
1844 ),
1845>;
1846#[doc = " XPLMMapWillBeDeletedCallback_f\n\n Called just before your map layer gets deleted. Because SDK-created map\n layers have the same lifetime as the X-Plane map that contains them, if the\n map gets unloaded from memory, your layer will too.\n"]
1847pub type XPLMMapWillBeDeletedCallback_f = ::std::option::Option<
1848 unsafe extern "C" fn(inLayer: XPLMMapLayerID, inRefcon: *mut ::std::os::raw::c_void),
1849>;
1850#[doc = " A layer that draws \"fill\" graphics, like weather patterns, terrain, etc. *\n Fill layers frequently cover a large portion of the visible map area."]
1851pub const xplm_MapLayer_Fill: _bindgen_ty_16 = 0;
1852#[doc = " A layer that provides markings for particular map features, like NAVAIDs, *\n airports, etc. Even dense markings layers cover a small portion of the *\n total map area."]
1853pub const xplm_MapLayer_Markings: _bindgen_ty_16 = 1;
1854#[doc = " XPLMMapLayerType\n\n Indicates the type of map layer you are creating. Fill layers will always\n be drawn beneath markings layers.\n"]
1855pub type _bindgen_ty_16 = ::std::os::raw::c_int;
1856pub type XPLMMapLayerType = ::std::os::raw::c_int;
1857#[doc = " XPLMCreateMapLayer_t\n\n This structure defines all of the parameters used to create a map layer\n using XPLMCreateMapLayer. The structure will be expanded in future SDK APIs\n to include more features. Always set the structSize member to the size of\n your struct in bytes!\n\n Each layer must be associated with exactly one map instance in X-Plane.\n That map, and that map alone, will call your callbacks. Likewise, when that\n map is deleted, your layer will be as well.\n"]
1858#[repr(C)]
1859#[derive(Debug, Copy, Clone)]
1860pub struct XPLMCreateMapLayer_t {
1861 #[doc = " Used to inform XPLMCreateMapLayer() of the SDK version you compiled *\n against; should always be set to sizeof(XPLMCreateMapLayer_t)"]
1862 pub structSize: ::std::os::raw::c_int,
1863 #[doc = " Globally unique string identifying the map you want this layer to appear *\n in. As of XPLM300, this is limited to one of XPLM_MAP_USER_INTERFACE or *\n XPLM_MAP_IOS"]
1864 pub mapToCreateLayerIn: *const ::std::os::raw::c_char,
1865 #[doc = " The type of layer you are creating, used to determine draw order (all *\n plugin-created markings layers are drawn above all plugin-created fill *\n layers)"]
1866 pub layerType: XPLMMapLayerType,
1867 #[doc = " Optional callback to inform you this layer is being deleted (due to its *\n owning map being destroyed)"]
1868 pub willBeDeletedCallback: XPLMMapWillBeDeletedCallback_f,
1869 #[doc = " Optional callback you want to use to prepare your draw cache when the map *\n bounds change (set to NULL if you don't want this callback)"]
1870 pub prepCacheCallback: XPLMMapPrepareCacheCallback_f,
1871 #[doc = " Optional callback you want to use for arbitrary OpenGL drawing, which goes *\n beneath all icons in the map's layering system (set to NULL if you don't *\n want this callback)"]
1872 pub drawCallback: XPLMMapDrawingCallback_f,
1873 #[doc = " Optional callback you want to use for drawing icons, which go above all *\n built-in X-Plane icons (except the aircraft) in the map's layering system *\n (set to NULL if you don't want this callback)"]
1874 pub iconCallback: XPLMMapIconDrawingCallback_f,
1875 #[doc = " Optional callback you want to use for drawing map labels, which go above *\n all built-in X-Plane icons and labels (except those of aircraft) in the *\n map's layering system (set to NULL if you don't want this callback)"]
1876 pub labelCallback: XPLMMapLabelDrawingCallback_f,
1877 #[doc = " True if you want a checkbox to be created in the map UI to toggle this *\n layer on and off; false if the layer should simply always be enabled"]
1878 pub showUiToggle: ::std::os::raw::c_int,
1879 #[doc = " Short label to use for this layer in the user interface"]
1880 pub layerName: *const ::std::os::raw::c_char,
1881 #[doc = " A reference to arbitrary data that will be passed to your callbacks"]
1882 pub refcon: *mut ::std::os::raw::c_void,
1883}
1884#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1885const _: () = {
1886 ["Size of XPLMCreateMapLayer_t"][::std::mem::size_of::<XPLMCreateMapLayer_t>() - 88usize];
1887 ["Alignment of XPLMCreateMapLayer_t"][::std::mem::align_of::<XPLMCreateMapLayer_t>() - 8usize];
1888 ["Offset of field: XPLMCreateMapLayer_t::structSize"]
1889 [::std::mem::offset_of!(XPLMCreateMapLayer_t, structSize) - 0usize];
1890 ["Offset of field: XPLMCreateMapLayer_t::mapToCreateLayerIn"]
1891 [::std::mem::offset_of!(XPLMCreateMapLayer_t, mapToCreateLayerIn) - 8usize];
1892 ["Offset of field: XPLMCreateMapLayer_t::layerType"]
1893 [::std::mem::offset_of!(XPLMCreateMapLayer_t, layerType) - 16usize];
1894 ["Offset of field: XPLMCreateMapLayer_t::willBeDeletedCallback"]
1895 [::std::mem::offset_of!(XPLMCreateMapLayer_t, willBeDeletedCallback) - 24usize];
1896 ["Offset of field: XPLMCreateMapLayer_t::prepCacheCallback"]
1897 [::std::mem::offset_of!(XPLMCreateMapLayer_t, prepCacheCallback) - 32usize];
1898 ["Offset of field: XPLMCreateMapLayer_t::drawCallback"]
1899 [::std::mem::offset_of!(XPLMCreateMapLayer_t, drawCallback) - 40usize];
1900 ["Offset of field: XPLMCreateMapLayer_t::iconCallback"]
1901 [::std::mem::offset_of!(XPLMCreateMapLayer_t, iconCallback) - 48usize];
1902 ["Offset of field: XPLMCreateMapLayer_t::labelCallback"]
1903 [::std::mem::offset_of!(XPLMCreateMapLayer_t, labelCallback) - 56usize];
1904 ["Offset of field: XPLMCreateMapLayer_t::showUiToggle"]
1905 [::std::mem::offset_of!(XPLMCreateMapLayer_t, showUiToggle) - 64usize];
1906 ["Offset of field: XPLMCreateMapLayer_t::layerName"]
1907 [::std::mem::offset_of!(XPLMCreateMapLayer_t, layerName) - 72usize];
1908 ["Offset of field: XPLMCreateMapLayer_t::refcon"]
1909 [::std::mem::offset_of!(XPLMCreateMapLayer_t, refcon) - 80usize];
1910};
1911unsafe extern "C" {
1912 #[doc = " XPLMCreateMapLayer\n\n This routine creates a new map layer. You pass in an XPLMCreateMapLayer_t\n structure with all of the fields defined. You must set the structSize of\n the structure to the size of the actual structure you used.\n\n Returns NULL if the layer creation failed. This happens most frequently\n because the map you specified in your\n XPLMCreateMapLayer_t::mapToCreateLayerIn field doesn't exist (that is, if\n XPLMMapExists() returns 0 for the specified map). You can use\n XPLMRegisterMapCreationHook() to get a notification each time a new map is\n opened in X-Plane, at which time you can create layers in it.\n"]
1913 pub fn XPLMCreateMapLayer(inParams: *mut XPLMCreateMapLayer_t) -> XPLMMapLayerID;
1914}
1915unsafe extern "C" {
1916 #[doc = " XPLMDestroyMapLayer\n\n Destroys a map layer you created (calling your\n XPLMMapWillBeDeletedCallback_f if applicable). Returns true if a deletion\n took place.\n"]
1917 pub fn XPLMDestroyMapLayer(inLayer: XPLMMapLayerID) -> ::std::os::raw::c_int;
1918}
1919#[doc = " XPLMMapCreatedCallback_f\n\n A callback to notify your plugin that a new map has been created in\n X-Plane. This is the best time to add a custom map layer using\n XPLMCreateMapLayer().\n\n No OpenGL drawing is permitted within this callback.\n"]
1920pub type XPLMMapCreatedCallback_f = ::std::option::Option<
1921 unsafe extern "C" fn(
1922 mapIdentifier: *const ::std::os::raw::c_char,
1923 refcon: *mut ::std::os::raw::c_void,
1924 ),
1925>;
1926unsafe extern "C" {
1927 #[doc = " XPLMRegisterMapCreationHook\n\n Registers your callback to receive a notification each time a new map is\n constructed in X-Plane. This callback is the best time to add your custom\n map layer using XPLMCreateMapLayer().\n\n Note that you will not be notified about any maps that already exist---you\n can use XPLMMapExists() to check for maps that were created previously.\n"]
1928 pub fn XPLMRegisterMapCreationHook(
1929 callback: XPLMMapCreatedCallback_f,
1930 refcon: *mut ::std::os::raw::c_void,
1931 );
1932}
1933unsafe extern "C" {
1934 #[doc = " XPLMMapExists\n\n Returns 1 if the map with the specified identifier already exists in\n X-Plane. In that case, you can safely call XPLMCreateMapLayer() specifying\n that your layer should be added to that map.\n"]
1935 pub fn XPLMMapExists(mapIdentifier: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
1936}
1937#[doc = " Orient such that a 0 degree rotation matches the map's north"]
1938pub const xplm_MapOrientation_Map: _bindgen_ty_17 = 0;
1939#[doc = " Orient such that a 0 degree rotation is \"up\" relative to the user interface"]
1940pub const xplm_MapOrientation_UI: _bindgen_ty_17 = 1;
1941#[doc = " XPLMMapOrientation\n\n Indicates whether a map element should be match its rotation to the map\n itself, or to the user interface. For instance, the map itself may be\n rotated such that \"up\" matches the user's aircraft, but you may want to\n draw a text label such that it is always rotated zero degrees relative to\n the user's perspective. In that case, you would have it draw with UI\n orientation.\n"]
1942pub type _bindgen_ty_17 = ::std::os::raw::c_int;
1943pub type XPLMMapOrientation = ::std::os::raw::c_int;
1944unsafe extern "C" {
1945 #[doc = " XPLMDrawMapIconFromSheet\n\n Enables plugin-created map layers to draw PNG icons using X-Plane's\n built-in icon drawing functionality. Only valid from within an\n XPLMIconDrawingCallback_t (but you can request an arbitrary number of icons\n to be drawn from within your callback).\n\n X-Plane will automatically manage the memory for your texture so that it\n only has to be loaded from disk once as long as you continue drawing it\n per-frame. (When you stop drawing it, the memory may purged in a \"garbage\n collection\" pass, require a load from disk in the future.)\n\n Instead of having X-Plane draw a full PNG, this method allows you to use UV\n coordinates to request a portion of the image to be drawn. This allows you\n to use a single texture load (of an icon sheet, for example) to draw many\n icons. Doing so is much more efficient than drawing a dozen different small\n PNGs.\n\n The UV coordinates used here treat the texture you load as being comprised\n of a number of identically sized \"cells\". You specify the width and height\n in cells (ds and dt, respectively), as well as the coordinates within the\n cell grid for the sub-image you'd like to draw.\n\n Note that you can use different ds and dt values in subsequent calls with\n the same texture sheet. This enables you to use icons of different sizes in\n the same sheet if you arrange them properly in the PNG.\n\n This function is only valid from within an XPLMIconDrawingCallback_t (but\n you can request an arbitrary number of icons to be drawn from within your\n callback).\n"]
1946 pub fn XPLMDrawMapIconFromSheet(
1947 layer: XPLMMapLayerID,
1948 inPngPath: *const ::std::os::raw::c_char,
1949 s: ::std::os::raw::c_int,
1950 t: ::std::os::raw::c_int,
1951 ds: ::std::os::raw::c_int,
1952 dt: ::std::os::raw::c_int,
1953 mapX: f32,
1954 mapY: f32,
1955 orientation: XPLMMapOrientation,
1956 rotationDegrees: f32,
1957 mapWidth: f32,
1958 );
1959}
1960unsafe extern "C" {
1961 #[doc = " XPLMDrawMapLabel\n\n Enables plugin-created map layers to draw text labels using X-Plane's\n built-in labeling functionality. Only valid from within an\n XPLMMapLabelDrawingCallback_f (but you can request an arbitrary number of\n text labels to be drawn from within your callback).\n"]
1962 pub fn XPLMDrawMapLabel(
1963 layer: XPLMMapLayerID,
1964 inText: *const ::std::os::raw::c_char,
1965 mapX: f32,
1966 mapY: f32,
1967 orientation: XPLMMapOrientation,
1968 rotationDegrees: f32,
1969 );
1970}
1971unsafe extern "C" {
1972 #[doc = " XPLMMapProject\n\n Projects a latitude/longitude into map coordinates. This is the inverse of\n XPLMMapUnproject().\n\n Only valid from within a map layer callback (one of\n XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f,\n XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.)\n"]
1973 pub fn XPLMMapProject(
1974 projection: XPLMMapProjectionID,
1975 latitude: f64,
1976 longitude: f64,
1977 outX: *mut f32,
1978 outY: *mut f32,
1979 );
1980}
1981unsafe extern "C" {
1982 #[doc = " XPLMMapUnproject\n\n Transforms map coordinates back into a latitude and longitude. This is the\n inverse of XPLMMapProject().\n\n Only valid from within a map layer callback (one of\n XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f,\n XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.)\n"]
1983 pub fn XPLMMapUnproject(
1984 projection: XPLMMapProjectionID,
1985 mapX: f32,
1986 mapY: f32,
1987 outLatitude: *mut f64,
1988 outLongitude: *mut f64,
1989 );
1990}
1991unsafe extern "C" {
1992 #[doc = " XPLMMapScaleMeter\n\n Returns the number of map units that correspond to a distance of one meter\n at a given set of map coordinates.\n\n Only valid from within a map layer callback (one of\n XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f,\n XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.)\n"]
1993 pub fn XPLMMapScaleMeter(projection: XPLMMapProjectionID, mapX: f32, mapY: f32) -> f32;
1994}
1995unsafe extern "C" {
1996 #[doc = " XPLMMapGetNorthHeading\n\n Returns the heading (in degrees clockwise) from the positive Y axis in the\n cartesian mapping coordinate system to true north at the point passed in.\n You can use it as a clockwise rotational offset to align icons and other\n 2-d drawing with true north on the map, compensating for rotations in the\n map due to projection.\n\n Only valid from within a map layer callback (one of\n XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f,\n XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.)\n"]
1997 pub fn XPLMMapGetNorthHeading(projection: XPLMMapProjectionID, mapX: f32, mapY: f32) -> f32;
1998}
1999#[doc = " A situation (.sit) file, which starts off a flight in a given *\n configuration."]
2000pub const xplm_DataFile_Situation: _bindgen_ty_18 = 1;
2001#[doc = " A situation movie (.smo) file, which replays a past flight."]
2002pub const xplm_DataFile_ReplayMovie: _bindgen_ty_18 = 2;
2003#[doc = " XPLMDataFileType\n\n These enums define types of data files you can load or unload using the\n SDK.\n"]
2004pub type _bindgen_ty_18 = ::std::os::raw::c_int;
2005pub type XPLMDataFileType = ::std::os::raw::c_int;
2006unsafe extern "C" {
2007 #[doc = " XPLMGetSystemPath\n\n This function returns the full path to the X-System folder. Note that this\n is a directory path, so it ends in a trailing : or / .\n\n The buffer you pass should be at least 512 characters long. The path is\n returned using the current native or OS path conventions.\n"]
2008 pub fn XPLMGetSystemPath(outSystemPath: *mut ::std::os::raw::c_char);
2009}
2010unsafe extern "C" {
2011 #[doc = " XPLMGetPrefsPath\n\n This routine returns a full path to a file that is within X-Plane's\n preferences directory. (You should remove the file name back to the last\n directory separator to get the preferences directory using\n XPLMExtractFileAndPath).\n\n The buffer you pass should be at least 512 characters long. The path is\n returned using the current native or OS path conventions.\n"]
2012 pub fn XPLMGetPrefsPath(outPrefsPath: *mut ::std::os::raw::c_char);
2013}
2014unsafe extern "C" {
2015 #[doc = " XPLMGetDirectorySeparator\n\n This routine returns a string with one char and a null terminator that is\n the directory separator for the current platform. This allows you to write\n code that concatenates directory paths without having to #ifdef for\n platform. The character returned will reflect the current file path mode.\n"]
2016 pub fn XPLMGetDirectorySeparator() -> *const ::std::os::raw::c_char;
2017}
2018unsafe extern "C" {
2019 #[doc = " XPLMExtractFileAndPath\n\n Given a full path to a file, this routine separates the path from the file.\n If the path is a partial directory (e.g. ends in : or / ) the trailing\n directory separator is removed. This routine works in-place; a pointer to\n the file part of the buffer is returned; the original buffer still starts\n with the path and is null terminated with no trailing separator.\n"]
2020 pub fn XPLMExtractFileAndPath(
2021 inFullPath: *mut ::std::os::raw::c_char,
2022 ) -> *mut ::std::os::raw::c_char;
2023}
2024unsafe extern "C" {
2025 #[doc = " XPLMGetDirectoryContents\n\n This routine returns a list of files in a directory (specified by a full\n path, no trailing : or / ). The output is returned as a list of NULL\n terminated strings. An index array (if specified) is filled with pointers\n into the strings. The last file is indicated by a zero-length string (and\n NULL in the indices). This routine will return 1 if you had capacity for\n all files or 0 if you did not. You can also skip a given number of files.\n\n * inDirectoryPath - a null terminated C string containing the full path to\n the directory with no trailing directory char.\n\n * inFirstReturn - the zero-based index of the first file in the directory\n to return. (Usually zero to fetch all in one pass.)\n\n * outFileNames - a buffer to receive a series of sequential null\n terminated C-string file names. A zero-length C string will be appended\n to the very end.\n\n * inFileNameBufSize - the size of the file name buffer in bytes.\n\n * outIndices - a pointer to an array of character pointers that will\n become an index into the directory. The last file will be followed by a\n NULL value. Pass NULL if you do not want indexing information.\n\n * inIndexCount - the max size of the index in entries.\n\n * outTotalFiles - if not NULL, this is filled in with the number of files\n in the directory.\n\n * outReturnedFiles - if not NULL, the number of files returned by this\n iteration.\n\n Return value: 1 if all info could be returned, 0 if there was a buffer\n overrun.\n\n WARNING: Before X-Plane 7 this routine did not properly iterate through\n directories. If X-Plane\n 6 compatibility is needed, use your own code to iterate directories.\n"]
2026 pub fn XPLMGetDirectoryContents(
2027 inDirectoryPath: *const ::std::os::raw::c_char,
2028 inFirstReturn: ::std::os::raw::c_int,
2029 outFileNames: *mut ::std::os::raw::c_char,
2030 inFileNameBufSize: ::std::os::raw::c_int,
2031 outIndices: *mut *mut ::std::os::raw::c_char,
2032 inIndexCount: ::std::os::raw::c_int,
2033 outTotalFiles: *mut ::std::os::raw::c_int,
2034 outReturnedFiles: *mut ::std::os::raw::c_int,
2035 ) -> ::std::os::raw::c_int;
2036}
2037unsafe extern "C" {
2038 #[doc = " XPLMLoadDataFile\n\n Loads a data file of a given type. Paths must be relative to the X-System\n folder. To clear the replay, pass a NULL file name (this is only valid with\n replay movies, not sit files).\n"]
2039 pub fn XPLMLoadDataFile(
2040 inFileType: XPLMDataFileType,
2041 inFilePath: *const ::std::os::raw::c_char,
2042 ) -> ::std::os::raw::c_int;
2043}
2044unsafe extern "C" {
2045 #[doc = " XPLMSaveDataFile\n\n Saves the current situation or replay; paths are relative to the X-System\n folder.\n"]
2046 pub fn XPLMSaveDataFile(
2047 inFileType: XPLMDataFileType,
2048 inFilePath: *const ::std::os::raw::c_char,
2049 ) -> ::std::os::raw::c_int;
2050}
2051pub const xplm_Host_Unknown: _bindgen_ty_19 = 0;
2052pub const xplm_Host_XPlane: _bindgen_ty_19 = 1;
2053#[doc = " XPLMHostApplicationID\n\n While the plug-in SDK is only accessible to plugins running inside X-Plane,\n the original authors considered extending the API to other applications\n that shared basic infrastructure with X-Plane. These enumerations are\n hold-overs from that original roadmap; all values other than X-Plane are\n deprecated. Your plugin should never need this enumeration.\n"]
2054pub type _bindgen_ty_19 = ::std::os::raw::c_int;
2055pub type XPLMHostApplicationID = ::std::os::raw::c_int;
2056pub const xplm_Language_Unknown: _bindgen_ty_20 = 0;
2057pub const xplm_Language_English: _bindgen_ty_20 = 1;
2058pub const xplm_Language_French: _bindgen_ty_20 = 2;
2059pub const xplm_Language_German: _bindgen_ty_20 = 3;
2060pub const xplm_Language_Italian: _bindgen_ty_20 = 4;
2061pub const xplm_Language_Spanish: _bindgen_ty_20 = 5;
2062pub const xplm_Language_Korean: _bindgen_ty_20 = 6;
2063pub const xplm_Language_Russian: _bindgen_ty_20 = 7;
2064pub const xplm_Language_Greek: _bindgen_ty_20 = 8;
2065pub const xplm_Language_Japanese: _bindgen_ty_20 = 9;
2066pub const xplm_Language_Chinese: _bindgen_ty_20 = 10;
2067pub const xplm_Language_Ukrainian: _bindgen_ty_20 = 11;
2068#[doc = " XPLMLanguageCode\n\n These enums define what language the sim is running in. These enumerations\n do not imply that the sim can or does run in all of these languages; they\n simply provide a known encoding in the event that a given sim version is\n localized to a certain language.\n"]
2069pub type _bindgen_ty_20 = ::std::os::raw::c_int;
2070pub type XPLMLanguageCode = ::std::os::raw::c_int;
2071#[doc = " XPLMError_f\n\n An XPLM error callback is a function that you provide to receive debugging\n information from the plugin SDK. See XPLMSetErrorCallback for more\n information. NOTE: for the sake of debugging, your error callback will be\n called even if your plugin is not enabled, allowing you to receive debug\n info in your XPluginStart and XPluginStop callbacks. To avoid causing logic\n errors in the management code, do not call any other plugin routines from\n your error callback - it is only meant for catching errors in the\n debugging.\n"]
2072pub type XPLMError_f =
2073 ::std::option::Option<unsafe extern "C" fn(inMessage: *const ::std::os::raw::c_char)>;
2074unsafe extern "C" {
2075 #[doc = " XPLMGetVersions\n\n This routine returns the revision of both X-Plane and the XPLM DLL. All\n versions are at least three-digit decimal numbers (e.g. 606 for version\n 6.06 of X-Plane); the current revision of the XPLM is 400 (4.00). This\n routine also returns the host ID of the app running us.\n\n The most common use of this routine is to special-case around X-Plane\n version-specific behavior.\n"]
2076 pub fn XPLMGetVersions(
2077 outXPlaneVersion: *mut ::std::os::raw::c_int,
2078 outXPLMVersion: *mut ::std::os::raw::c_int,
2079 outHostID: *mut XPLMHostApplicationID,
2080 );
2081}
2082unsafe extern "C" {
2083 #[doc = " XPLMGetLanguage\n\n This routine returns the langauge the sim is running in.\n"]
2084 pub fn XPLMGetLanguage() -> XPLMLanguageCode;
2085}
2086unsafe extern "C" {
2087 #[doc = " XPLMFindSymbol\n\n This routine will attempt to find the symbol passed in the inString\n parameter. If the symbol is found a pointer the function is returned,\n othewise the function will return NULL.\n\n You can use XPLMFindSymbol to utilize newer SDK API features without\n requiring newer versions of the SDK (and X-Plane) as your minimum X-Plane\n version as follows:\n\n * Define the XPLMnnn macro to the minimum required XPLM version you will\n ship with (e.g. XPLM210 for X-Plane 10 compatibility).\n\n * Use XPLMGetVersions and XPLMFindSymbol to detect that the host sim is\n new enough to use new functions and resolve function pointers.\n\n * Conditionally use the new functions if and only if XPLMFindSymbol only\n returns a non- NULL pointer.\n\n Warning: you should always check the XPLM API version as well as the\n results of XPLMFindSymbol to determine if funtionality is safe to use.\n\n To use functionality via XPLMFindSymbol you will need to copy your own\n definitions of the X-Plane API prototypes and cast the returned pointer to\n the correct type.\n"]
2088 pub fn XPLMFindSymbol(inString: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_void;
2089}
2090unsafe extern "C" {
2091 #[doc = " XPLMSetErrorCallback\n\n XPLMSetErrorCallback installs an error-reporting callback for your plugin.\n Normally the plugin system performs minimum diagnostics to maximize\n performance. When you install an error callback, you will receive calls due\n to certain plugin errors, such as passing bad parameters or incorrect data.\n\n Important: the error callback determines *programming* errors, e.g. bad API\n parameters. Every error that is returned by the error callback represents a\n mistake in your plugin that you should fix. Error callbacks are not used to\n report expected run-time problems (e.g. disk I/O errors).\n\n The intention is for you to install the error callback during debug\n sections and put a break-point inside your callback. This will cause you to\n break into the debugger from within the SDK at the point in your plugin\n where you made an illegal call.\n\n Installing an error callback may activate error checking code that would\n not normally run, and this may adversely affect performance, so do not\n leave error callbacks installed in shipping plugins. Since the only useful\n response to an error is to change code, error callbacks are not useful \"in\n the field\".\n"]
2092 pub fn XPLMSetErrorCallback(inCallback: XPLMError_f);
2093}
2094unsafe extern "C" {
2095 #[doc = " XPLMDebugString\n\n This routine outputs a C-style string to the Log.txt file. The file is\n immediately flushed so you will not lose data. (This does cause a\n performance penalty.)\n\n Please do *not* leave routine diagnostic logging enabled in your shipping\n plugin. The X-Plane Log file is shared by X-Plane and every plugin in the\n system, and plugins that (when functioning normally) print verbose log\n output make it difficult for developers to find error conditions from other\n parts of the system.\n"]
2096 pub fn XPLMDebugString(inString: *const ::std::os::raw::c_char);
2097}
2098unsafe extern "C" {
2099 #[doc = " XPLMSpeakString\n\n This function displays the string in a translucent overlay over the current\n display and also speaks the string if text-to-speech is enabled. The string\n is spoken asynchronously, this function returns immediately. This function\n may not speak or print depending on user preferences.\n"]
2100 pub fn XPLMSpeakString(inString: *const ::std::os::raw::c_char);
2101}
2102unsafe extern "C" {
2103 #[doc = " XPLMGetVirtualKeyDescription\n\n Given a virtual key code (as defined in XPLMDefs.h) this routine returns a\n human-readable string describing the character. This routine is provided\n for showing users what keyboard mappings they have set up. The string may\n read 'unknown' or be a blank or NULL string if the virtual key is unknown.\n"]
2104 pub fn XPLMGetVirtualKeyDescription(
2105 inVirtualKey: ::std::os::raw::c_char,
2106 ) -> *const ::std::os::raw::c_char;
2107}
2108unsafe extern "C" {
2109 #[doc = " XPLMReloadScenery\n\n XPLMReloadScenery reloads the current set of scenery. You can use this\n function in two typical ways: simply call it to reload the scenery, picking\n up any new installed scenery, .env files, etc. from disk. Or, change the\n lat/ref and lon/ref datarefs and then call this function to shift the\n scenery environment. This routine is equivalent to picking \"reload\n scenery\" from the developer menu.\n"]
2110 pub fn XPLMReloadScenery();
2111}
2112#[doc = " The command is being started."]
2113pub const xplm_CommandBegin: _bindgen_ty_21 = 0;
2114#[doc = " The command is continuing to execute."]
2115pub const xplm_CommandContinue: _bindgen_ty_21 = 1;
2116#[doc = " The command has ended."]
2117pub const xplm_CommandEnd: _bindgen_ty_21 = 2;
2118#[doc = " XPLMCommandPhase\n\n The phases of a command.\n"]
2119pub type _bindgen_ty_21 = ::std::os::raw::c_int;
2120pub type XPLMCommandPhase = ::std::os::raw::c_int;
2121#[doc = " XPLMCommandRef\n\n A command ref is an opaque identifier for an X-Plane command. Command\n references stay the same for the life of your plugin but not between\n executions of X-Plane. Command refs are used to execute commands, create\n commands, and create callbacks for particular commands.\n\n Note that a command is not \"owned\" by a particular plugin. Since many\n plugins may participate in a command's execution, the command does not go\n away if the plugin that created it is unloaded.\n"]
2122pub type XPLMCommandRef = *mut ::std::os::raw::c_void;
2123#[doc = " XPLMCommandCallback_f\n\n A command callback is a function in your plugin that is called when a\n command is pressed. Your callback receives the command reference for the\n particular command, the phase of the command that is executing, and a\n reference pointer that you specify when registering the callback.\n\n Your command handler should return 1 to let processing of the command\n continue to other plugins and X-Plane, or 0 to halt processing, potentially\n bypassing X-Plane code.\n"]
2124pub type XPLMCommandCallback_f = ::std::option::Option<
2125 unsafe extern "C" fn(
2126 inCommand: XPLMCommandRef,
2127 inPhase: XPLMCommandPhase,
2128 inRefcon: *mut ::std::os::raw::c_void,
2129 ) -> ::std::os::raw::c_int,
2130>;
2131unsafe extern "C" {
2132 #[doc = " XPLMFindCommand\n\n XPLMFindCommand looks up a command by name, and returns its command\n reference or NULL if the command does not exist.\n"]
2133 pub fn XPLMFindCommand(inName: *const ::std::os::raw::c_char) -> XPLMCommandRef;
2134}
2135unsafe extern "C" {
2136 #[doc = " XPLMCommandBegin\n\n XPLMCommandBegin starts the execution of a command, specified by its\n command reference. The command is \"held down\" until XPLMCommandEnd is\n called. You must balance each XPLMCommandBegin call with an XPLMCommandEnd\n call.\n"]
2137 pub fn XPLMCommandBegin(inCommand: XPLMCommandRef);
2138}
2139unsafe extern "C" {
2140 #[doc = " XPLMCommandEnd\n\n XPLMCommandEnd ends the execution of a given command that was started with\n XPLMCommandBegin. You must not issue XPLMCommandEnd for a command you did\n not begin.\n"]
2141 pub fn XPLMCommandEnd(inCommand: XPLMCommandRef);
2142}
2143unsafe extern "C" {
2144 #[doc = " XPLMCommandOnce\n\n This executes a given command momentarily, that is, the command begins and\n ends immediately. This is the equivalent of calling XPLMCommandBegin() and\n XPLMCommandEnd() back to back.\n"]
2145 pub fn XPLMCommandOnce(inCommand: XPLMCommandRef);
2146}
2147unsafe extern "C" {
2148 #[doc = " XPLMCreateCommand\n\n XPLMCreateCommand creates a new command for a given string. If the command\n already exists, the existing command reference is returned. The description\n may appear in user interface contexts, such as the joystick configuration\n screen.\n"]
2149 pub fn XPLMCreateCommand(
2150 inName: *const ::std::os::raw::c_char,
2151 inDescription: *const ::std::os::raw::c_char,
2152 ) -> XPLMCommandRef;
2153}
2154unsafe extern "C" {
2155 #[doc = " XPLMRegisterCommandHandler\n\n XPLMRegisterCommandHandler registers a callback to be called when a command\n is executed. You provide a callback with a reference pointer.\n\n If inBefore is true, your command handler callback will be executed before\n X-Plane executes the command, and returning 0 from your callback will\n disable X-Plane's processing of the command. If inBefore is false, your\n callback will run after X-Plane. (You can register a single callback both\n before and after a command.)\n"]
2156 pub fn XPLMRegisterCommandHandler(
2157 inComand: XPLMCommandRef,
2158 inHandler: XPLMCommandCallback_f,
2159 inBefore: ::std::os::raw::c_int,
2160 inRefcon: *mut ::std::os::raw::c_void,
2161 );
2162}
2163unsafe extern "C" {
2164 #[doc = " XPLMUnregisterCommandHandler\n\n XPLMUnregisterCommandHandler removes a command callback registered with\n XPLMRegisterCommandHandler.\n"]
2165 pub fn XPLMUnregisterCommandHandler(
2166 inComand: XPLMCommandRef,
2167 inHandler: XPLMCommandCallback_f,
2168 inBefore: ::std::os::raw::c_int,
2169 inRefcon: *mut ::std::os::raw::c_void,
2170 );
2171}
2172#[doc = " There is no symbol to the left of the menu item."]
2173pub const xplm_Menu_NoCheck: _bindgen_ty_22 = 0;
2174#[doc = " The menu has a mark next to it that is unmarked (not lit)."]
2175pub const xplm_Menu_Unchecked: _bindgen_ty_22 = 1;
2176#[doc = " The menu has a mark next to it that is checked (lit)."]
2177pub const xplm_Menu_Checked: _bindgen_ty_22 = 2;
2178#[doc = " XPLMMenuCheck\n\n These enumerations define the various 'check' states for an X-Plane menu.\n 'Checking' in X-Plane actually appears as a light which may or may not be\n lit. So there are three possible states.\n"]
2179pub type _bindgen_ty_22 = ::std::os::raw::c_int;
2180pub type XPLMMenuCheck = ::std::os::raw::c_int;
2181#[doc = " XPLMMenuID\n\n This is a unique ID for each menu you create.\n"]
2182pub type XPLMMenuID = *mut ::std::os::raw::c_void;
2183#[doc = " XPLMMenuHandler_f\n\n A menu handler function takes two reference pointers, one for the menu\n (specified when the menu was created) and one for the item (specified when\n the item was created).\n"]
2184pub type XPLMMenuHandler_f = ::std::option::Option<
2185 unsafe extern "C" fn(
2186 inMenuRef: *mut ::std::os::raw::c_void,
2187 inItemRef: *mut ::std::os::raw::c_void,
2188 ),
2189>;
2190unsafe extern "C" {
2191 #[doc = " XPLMFindPluginsMenu\n\n This function returns the ID of the plug-ins menu, which is created for you\n at startup.\n"]
2192 pub fn XPLMFindPluginsMenu() -> XPLMMenuID;
2193}
2194unsafe extern "C" {
2195 #[doc = " XPLMFindAircraftMenu\n\n This function returns the ID of the menu for the currently-loaded aircraft,\n used for showing aircraft-specific commands.\n\n The aircraft menu is created by X-Plane at startup, but it remains hidden\n until it is populated via XPLMAppendMenuItem() or\n XPLMAppendMenuItemWithCommand().\n\n Only plugins loaded with the user's current aircraft are allowed to access\n the aircraft menu. For all other plugins, this will return NULL, and any\n attempts to add menu items to it will fail.\n"]
2196 pub fn XPLMFindAircraftMenu() -> XPLMMenuID;
2197}
2198unsafe extern "C" {
2199 #[doc = " XPLMCreateMenu\n\n This function creates a new menu and returns its ID. It returns NULL if\n the menu cannot be created. Pass in a parent menu ID and an item index to\n create a submenu, or NULL for the parent menu to put the menu in the menu\n bar. The menu's name is only used if the menu is in the menubar. You also\n pass a handler function and a menu reference value. Pass NULL for the\n handler if you do not need callbacks from the menu (for example, if it only\n contains submenus).\n\n Important: you must pass a valid, non-empty menu title even if the menu is\n a submenu where the title is not visible.\n"]
2200 pub fn XPLMCreateMenu(
2201 inName: *const ::std::os::raw::c_char,
2202 inParentMenu: XPLMMenuID,
2203 inParentItem: ::std::os::raw::c_int,
2204 inHandler: XPLMMenuHandler_f,
2205 inMenuRef: *mut ::std::os::raw::c_void,
2206 ) -> XPLMMenuID;
2207}
2208unsafe extern "C" {
2209 #[doc = " XPLMDestroyMenu\n\n This function destroys a menu that you have created. Use this to remove a\n submenu if necessary. (Normally this function will not be necessary.)\n"]
2210 pub fn XPLMDestroyMenu(inMenuID: XPLMMenuID);
2211}
2212unsafe extern "C" {
2213 #[doc = " XPLMClearAllMenuItems\n\n This function removes all menu items from a menu, allowing you to rebuild\n it. Use this function if you need to change the number of items on a menu.\n"]
2214 pub fn XPLMClearAllMenuItems(inMenuID: XPLMMenuID);
2215}
2216unsafe extern "C" {
2217 #[doc = " XPLMAppendMenuItem\n\n This routine appends a new menu item to the bottom of a menu and returns\n its index. Pass in the menu to add the item to, the items name, and a void\n * ref for this item.\n\n Returns a negative index if the append failed (due to an invalid parent\n menu argument).\n\n Note that all menu indices returned are relative to your plugin's menus\n only; if your plugin creates two sub-menus in the Plugins menu at different\n times, it doesn't matter how many other plugins also create sub-menus of\n Plugins in the intervening time: your sub-menus will be given menu indices\n 0 and 1. (The SDK does some work in the back-end to filter out menus that\n are irrelevant to your plugin in order to deliver this consistency for each\n plugin.)\n"]
2218 pub fn XPLMAppendMenuItem(
2219 inMenu: XPLMMenuID,
2220 inItemName: *const ::std::os::raw::c_char,
2221 inItemRef: *mut ::std::os::raw::c_void,
2222 inDeprecatedAndIgnored: ::std::os::raw::c_int,
2223 ) -> ::std::os::raw::c_int;
2224}
2225unsafe extern "C" {
2226 #[doc = " XPLMAppendMenuItemWithCommand\n\n Like XPLMAppendMenuItem(), but instead of the new menu item triggering the\n XPLMMenuHandler_f of the containiner menu, it will simply execute the\n command you pass in. Using a command for your menu item allows the user to\n bind a keyboard shortcut to the command and see that shortcut represented\n in the menu.\n\n Returns a negative index if the append failed (due to an invalid parent\n menu argument).\n\n Like XPLMAppendMenuItem(), all menu indices are relative to your plugin's\n menus only.\n"]
2227 pub fn XPLMAppendMenuItemWithCommand(
2228 inMenu: XPLMMenuID,
2229 inItemName: *const ::std::os::raw::c_char,
2230 inCommandToExecute: XPLMCommandRef,
2231 ) -> ::std::os::raw::c_int;
2232}
2233unsafe extern "C" {
2234 #[doc = " XPLMAppendMenuSeparator\n\n This routine adds a separator to the end of a menu.\n\n Returns a negative index if the append failed (due to an invalid parent\n menu argument).\n"]
2235 pub fn XPLMAppendMenuSeparator(inMenu: XPLMMenuID);
2236}
2237unsafe extern "C" {
2238 #[doc = " XPLMSetMenuItemName\n\n This routine changes the name of an existing menu item. Pass in the menu\n ID and the index of the menu item.\n"]
2239 pub fn XPLMSetMenuItemName(
2240 inMenu: XPLMMenuID,
2241 inIndex: ::std::os::raw::c_int,
2242 inItemName: *const ::std::os::raw::c_char,
2243 inDeprecatedAndIgnored: ::std::os::raw::c_int,
2244 );
2245}
2246unsafe extern "C" {
2247 #[doc = " XPLMCheckMenuItem\n\n Set whether a menu item is checked. Pass in the menu ID and item index.\n"]
2248 pub fn XPLMCheckMenuItem(
2249 inMenu: XPLMMenuID,
2250 index: ::std::os::raw::c_int,
2251 inCheck: XPLMMenuCheck,
2252 );
2253}
2254unsafe extern "C" {
2255 #[doc = " XPLMCheckMenuItemState\n\n This routine returns whether a menu item is checked or not. A menu item's\n check mark may be on or off, or a menu may not have an icon at all.\n"]
2256 pub fn XPLMCheckMenuItemState(
2257 inMenu: XPLMMenuID,
2258 index: ::std::os::raw::c_int,
2259 outCheck: *mut XPLMMenuCheck,
2260 );
2261}
2262unsafe extern "C" {
2263 #[doc = " XPLMEnableMenuItem\n\n Sets whether this menu item is enabled. Items start out enabled.\n"]
2264 pub fn XPLMEnableMenuItem(
2265 inMenu: XPLMMenuID,
2266 index: ::std::os::raw::c_int,
2267 enabled: ::std::os::raw::c_int,
2268 );
2269}
2270unsafe extern "C" {
2271 #[doc = " XPLMRemoveMenuItem\n\n Removes one item from a menu. Note that all menu items below are moved up\n one; your plugin must track the change in index numbers.\n"]
2272 pub fn XPLMRemoveMenuItem(inMenu: XPLMMenuID, inIndex: ::std::os::raw::c_int);
2273}
2274pub const xplm_Nav_Unknown: _bindgen_ty_23 = 0;
2275pub const xplm_Nav_Airport: _bindgen_ty_23 = 1;
2276pub const xplm_Nav_NDB: _bindgen_ty_23 = 2;
2277pub const xplm_Nav_VOR: _bindgen_ty_23 = 4;
2278pub const xplm_Nav_ILS: _bindgen_ty_23 = 8;
2279pub const xplm_Nav_Localizer: _bindgen_ty_23 = 16;
2280pub const xplm_Nav_GlideSlope: _bindgen_ty_23 = 32;
2281pub const xplm_Nav_OuterMarker: _bindgen_ty_23 = 64;
2282pub const xplm_Nav_MiddleMarker: _bindgen_ty_23 = 128;
2283pub const xplm_Nav_InnerMarker: _bindgen_ty_23 = 256;
2284pub const xplm_Nav_Fix: _bindgen_ty_23 = 512;
2285pub const xplm_Nav_DME: _bindgen_ty_23 = 1024;
2286pub const xplm_Nav_LatLon: _bindgen_ty_23 = 2048;
2287pub const xplm_Nav_TACAN: _bindgen_ty_23 = 4096;
2288#[doc = " XPLMNavType\n\n These enumerations define the different types of navaids. They are each\n defined with a separate bit so that they may be bit-wise added together to\n form sets of nav-aid types.\n\n NOTE: xplm_Nav_LatLon is a specific lat-lon coordinate entered into the\n FMS. It will not exist in the database, and cannot be programmed into the\n FMS. Querying the FMS for navaids will return it. Use\n XPLMSetFMSEntryLatLon to set a lat/lon waypoint.\n"]
2289pub type _bindgen_ty_23 = ::std::os::raw::c_int;
2290pub type XPLMNavType = ::std::os::raw::c_int;
2291#[doc = " XPLMNavRef\n\n XPLMNavRef is an iterator into the navigation database. The navigation\n database is essentially an array, but it is not necessarily densely\n populated. The only assumption you can safely make is that like-typed\n nav-aids are grouped together.\n\n Use XPLMNavRef to refer to a nav-aid.\n\n XPLM_NAV_NOT_FOUND is returned by functions that return an XPLMNavRef when\n the iterator must be invalid.\n"]
2292pub type XPLMNavRef = ::std::os::raw::c_int;
2293unsafe extern "C" {
2294 #[doc = " XPLMGetFirstNavAid\n\n This returns the very first navaid in the database. Use this to traverse\n the entire database. Returns XPLM_NAV_NOT_FOUND if the nav database is\n empty.\n"]
2295 pub fn XPLMGetFirstNavAid() -> XPLMNavRef;
2296}
2297unsafe extern "C" {
2298 #[doc = " XPLMGetNextNavAid\n\n Given a valid navaid ref, this routine returns the next navaid. It returns\n XPLM_NAV_NOT_FOUND if the navaid passed in was invalid or if the navaid\n passed in was the last one in the database. Use this routine to iterate\n across all like-typed navaids or the entire database.\n"]
2299 pub fn XPLMGetNextNavAid(inNavAidRef: XPLMNavRef) -> XPLMNavRef;
2300}
2301unsafe extern "C" {
2302 #[doc = " XPLMFindFirstNavAidOfType\n\n This routine returns the ref of the first navaid of the given type in the\n database or XPLM_NAV_NOT_FOUND if there are no navaids of that type in the\n database. You must pass exactly one navaid type to this routine.\n"]
2303 pub fn XPLMFindFirstNavAidOfType(inType: XPLMNavType) -> XPLMNavRef;
2304}
2305unsafe extern "C" {
2306 #[doc = " XPLMFindLastNavAidOfType\n\n This routine returns the ref of the last navaid of the given type in the\n database or XPLM_NAV_NOT_FOUND if there are no navaids of that type in the\n database. You must pass exactly one navaid type to this routine.\n"]
2307 pub fn XPLMFindLastNavAidOfType(inType: XPLMNavType) -> XPLMNavRef;
2308}
2309unsafe extern "C" {
2310 #[doc = " XPLMFindNavAid\n\n This routine provides a number of searching capabilities for the nav\n database. XPLMFindNavAid will search through every navaid whose type is\n within inType (multiple types may be added together) and return any navaids\n found based on the following rules:\n\n * If inLat and inLon are not NULL, the navaid nearest to that lat/lon will\n be returned, otherwise the last navaid found will be returned.\n\n * If inFrequency is not NULL, then any navaids considered must match this\n frequency. Note that this will screen out radio beacons that do not have\n frequency data published (like inner markers) but not fixes and airports.\n\n * If inNameFragment is not NULL, only navaids that contain the fragment in\n their name will be returned.\n\n * If inIDFragment is not NULL, only navaids that contain the fragment in\n their IDs will be returned.\n\n This routine provides a simple way to do a number of useful searches:\n * Find the nearest navaid on this frequency.\n * Find the nearest airport.\n * Find the VOR whose ID is \"BOS\".\n * Find the nearest airport whose name contains \"Chicago\".\n"]
2311 pub fn XPLMFindNavAid(
2312 inNameFragment: *const ::std::os::raw::c_char,
2313 inIDFragment: *const ::std::os::raw::c_char,
2314 inLat: *mut f32,
2315 inLon: *mut f32,
2316 inFrequency: *mut ::std::os::raw::c_int,
2317 inType: XPLMNavType,
2318 ) -> XPLMNavRef;
2319}
2320unsafe extern "C" {
2321 #[doc = " XPLMGetNavAidInfo\n\n This routine returns information about a navaid. Any non-null field is\n filled out with information if it is available.\n\n Frequencies are in the nav.dat convention as described in the X-Plane nav\n database FAQ: NDB frequencies are exact, all others are multiplied by 100.\n\n The buffer for IDs should be at least 6 chars and the buffer for names\n should be at least 41 chars, but since these values are likely to go up, I\n recommend passing at least 32 chars for IDs and 256 chars for names when\n possible.\n\n The outReg parameter tells if the navaid is within the local \"region\" of\n loaded DSFs. (This information may not be particularly useful to plugins.)\n The parameter is a single byte value 1 for true or 0 for false, not a C\n string.\n"]
2322 pub fn XPLMGetNavAidInfo(
2323 inRef: XPLMNavRef,
2324 outType: *mut XPLMNavType,
2325 outLatitude: *mut f32,
2326 outLongitude: *mut f32,
2327 outHeight: *mut f32,
2328 outFrequency: *mut ::std::os::raw::c_int,
2329 outHeading: *mut f32,
2330 outID: *mut ::std::os::raw::c_char,
2331 outName: *mut ::std::os::raw::c_char,
2332 outReg: *mut ::std::os::raw::c_char,
2333 );
2334}
2335unsafe extern "C" {
2336 #[doc = " XPLMCountFMSEntries\n\n This routine returns the number of entries in the FMS.\n"]
2337 pub fn XPLMCountFMSEntries() -> ::std::os::raw::c_int;
2338}
2339unsafe extern "C" {
2340 #[doc = " XPLMGetDisplayedFMSEntry\n\n This routine returns the index of the entry the pilot is viewing.\n"]
2341 pub fn XPLMGetDisplayedFMSEntry() -> ::std::os::raw::c_int;
2342}
2343unsafe extern "C" {
2344 #[doc = " XPLMGetDestinationFMSEntry\n\n This routine returns the index of the entry the FMS is flying to.\n"]
2345 pub fn XPLMGetDestinationFMSEntry() -> ::std::os::raw::c_int;
2346}
2347unsafe extern "C" {
2348 #[doc = " XPLMSetDisplayedFMSEntry\n\n This routine changes which entry the FMS is showing to the index specified.\n"]
2349 pub fn XPLMSetDisplayedFMSEntry(inIndex: ::std::os::raw::c_int);
2350}
2351unsafe extern "C" {
2352 #[doc = " XPLMSetDestinationFMSEntry\n\n This routine changes which entry the FMS is flying the aircraft toward. The\n track is from the n-1'th point to the n'th point.\n"]
2353 pub fn XPLMSetDestinationFMSEntry(inIndex: ::std::os::raw::c_int);
2354}
2355unsafe extern "C" {
2356 #[doc = " XPLMGetFMSEntryInfo\n\n This routine returns information about a given FMS entry. If the entry is\n an airport or navaid, a reference to a nav entry can be returned allowing\n you to find additional information (such as a frequency, ILS heading, name,\n etc.). Note that this reference can be XPLM_NAV_NOT_FOUND until the\n information has been looked up asynchronously, so after flightplan changes,\n it might take up to a second for this field to become populated. The other\n information is available immediately. For a lat/lon entry, the lat/lon is\n returned by this routine but the navaid cannot be looked up (and the\n reference will be XPLM_NAV_NOT_FOUND). FMS name entry buffers should be at\n least 256 chars in length.\n\n WARNING: Due to a bug in X-Plane prior to 11.31, the navaid reference will\n not be set to XPLM_NAV_NOT_FOUND while no data is available, and instead\n just remain the value of the variable that you passed the pointer to.\n Therefore, always initialize the variable to XPLM_NAV_NOT_FOUND before\n passing the pointer to this function.\n"]
2357 pub fn XPLMGetFMSEntryInfo(
2358 inIndex: ::std::os::raw::c_int,
2359 outType: *mut XPLMNavType,
2360 outID: *mut ::std::os::raw::c_char,
2361 outRef: *mut XPLMNavRef,
2362 outAltitude: *mut ::std::os::raw::c_int,
2363 outLat: *mut f32,
2364 outLon: *mut f32,
2365 );
2366}
2367unsafe extern "C" {
2368 #[doc = " XPLMSetFMSEntryInfo\n\n This routine changes an entry in the FMS to have the destination navaid\n passed in and the altitude specified. Use this only for airports, fixes,\n and radio-beacon navaids. Currently of radio beacons, the FMS can only\n support VORs and NDBs. Use the routines below to clear or fly to a lat/lon.\n"]
2369 pub fn XPLMSetFMSEntryInfo(
2370 inIndex: ::std::os::raw::c_int,
2371 inRef: XPLMNavRef,
2372 inAltitude: ::std::os::raw::c_int,
2373 );
2374}
2375unsafe extern "C" {
2376 #[doc = " XPLMSetFMSEntryLatLon\n\n This routine changes the entry in the FMS to a lat/lon entry with the given\n coordinates.\n"]
2377 pub fn XPLMSetFMSEntryLatLon(
2378 inIndex: ::std::os::raw::c_int,
2379 inLat: f32,
2380 inLon: f32,
2381 inAltitude: ::std::os::raw::c_int,
2382 );
2383}
2384unsafe extern "C" {
2385 #[doc = " XPLMClearFMSEntry\n\n This routine clears the given entry, potentially shortening the flight\n plan.\n"]
2386 pub fn XPLMClearFMSEntry(inIndex: ::std::os::raw::c_int);
2387}
2388pub const xplm_Fpl_Pilot_Primary: _bindgen_ty_24 = 0;
2389pub const xplm_Fpl_CoPilot_Primary: _bindgen_ty_24 = 1;
2390pub const xplm_Fpl_Pilot_Approach: _bindgen_ty_24 = 2;
2391pub const xplm_Fpl_CoPilot_Approach: _bindgen_ty_24 = 3;
2392pub const xplm_Fpl_Pilot_Temporary: _bindgen_ty_24 = 4;
2393pub const xplm_Fpl_CoPilot_Temporary: _bindgen_ty_24 = 5;
2394#[doc = " XPLMNavFlightPlan\n\n These enumerations defines the flightplan you are accesing using the\n FMSFlightPlan functions. An airplane can have up to two navigation\n devices (GPS or FMS) and each device can have two flightplans. A GPS\n has an enroute and an approach flightplan. An FMS has an active and a\n temporary flightplan. If you are trying to access a flightplan that\n doesn't exist in your aircraft, e.g. asking a GPS for a temp\n flightplan, FMSFlighPlan functions have no effect and will return no\n information.\n"]
2395pub type _bindgen_ty_24 = ::std::os::raw::c_int;
2396pub type XPLMNavFlightPlan = ::std::os::raw::c_int;
2397unsafe extern "C" {
2398 #[doc = " XPLMCountFMSFlightPlanEntries\n\n This routine returns the number of entries in the FMS.\n"]
2399 pub fn XPLMCountFMSFlightPlanEntries(inFlightPlan: XPLMNavFlightPlan) -> ::std::os::raw::c_int;
2400}
2401unsafe extern "C" {
2402 #[doc = " XPLMGetDisplayedFMSFlightPlanEntry\n\n This routine returns the index of the entry the pilot is viewing.\n"]
2403 pub fn XPLMGetDisplayedFMSFlightPlanEntry(
2404 inFlightPlan: XPLMNavFlightPlan,
2405 ) -> ::std::os::raw::c_int;
2406}
2407unsafe extern "C" {
2408 #[doc = " XPLMGetDestinationFMSFlightPlanEntry\n\n This routine returns the index of the entry the FMS is flying to.\n"]
2409 pub fn XPLMGetDestinationFMSFlightPlanEntry(
2410 inFlightPlan: XPLMNavFlightPlan,
2411 ) -> ::std::os::raw::c_int;
2412}
2413unsafe extern "C" {
2414 #[doc = " XPLMSetDisplayedFMSFlightPlanEntry\n\n This routine changes which entry the FMS is showing to the index specified.\n"]
2415 pub fn XPLMSetDisplayedFMSFlightPlanEntry(
2416 inFlightPlan: XPLMNavFlightPlan,
2417 inIndex: ::std::os::raw::c_int,
2418 );
2419}
2420unsafe extern "C" {
2421 #[doc = " XPLMSetDestinationFMSFlightPlanEntry\n\n This routine changes which entry the FMS is flying the aircraft toward. The\n track is from the n-1'th point to the n'th point.\n"]
2422 pub fn XPLMSetDestinationFMSFlightPlanEntry(
2423 inFlightPlan: XPLMNavFlightPlan,
2424 inIndex: ::std::os::raw::c_int,
2425 );
2426}
2427unsafe extern "C" {
2428 #[doc = " XPLMSetDirectToFMSFlightPlanEntry\n\n This routine changes which entry the FMS is flying the aircraft toward. The\n track is from the current position of the aircraft directly to the n'th\n point, ignoring the point before it.\n"]
2429 pub fn XPLMSetDirectToFMSFlightPlanEntry(
2430 inFlightPlan: XPLMNavFlightPlan,
2431 inIndex: ::std::os::raw::c_int,
2432 );
2433}
2434unsafe extern "C" {
2435 #[doc = " XPLMGetFMSFlightPlanEntryInfo\n\n This routine returns information about a given FMS entry. If the entry is\n an airport or navaid, a reference to a nav entry can be returned allowing\n you to find additional information (such as a frequency, ILS heading, name,\n etc.). Note that this reference can be XPLM_NAV_NOT_FOUND until the\n information has been looked up asynchronously, so after flightplan changes,\n it might take up to a second for this field to become populated. The other\n information is available immediately. For a lat/lon entry, the lat/lon is\n returned by this routine but the navaid cannot be looked up (and the\n reference will be XPLM_NAV_NOT_FOUND). FMS name entry buffers should be at\n least 256 chars in length.\n\n WARNING: Due to a bug in X-Plane prior to 11.31, the navaid reference will\n not be set to XPLM_NAV_NOT_FOUND while no data is available, and instead\n just remain the value of the variable that you passed the pointer to.\n Therefore, always initialize the variable to XPLM_NAV_NOT_FOUND before\n passing the pointer to this function.\n"]
2436 pub fn XPLMGetFMSFlightPlanEntryInfo(
2437 inFlightPlan: XPLMNavFlightPlan,
2438 inIndex: ::std::os::raw::c_int,
2439 outType: *mut XPLMNavType,
2440 outID: *mut ::std::os::raw::c_char,
2441 outRef: *mut XPLMNavRef,
2442 outAltitude: *mut ::std::os::raw::c_int,
2443 outLat: *mut f32,
2444 outLon: *mut f32,
2445 );
2446}
2447unsafe extern "C" {
2448 #[doc = " XPLMSetFMSFlightPlanEntryInfo\n\n This routine changes an entry in the FMS to have the destination navaid\n passed in and the altitude specified. Use this only for airports, fixes,\n and radio-beacon navaids. Currently of radio beacons, the FMS can only\n support VORs, NDBs and TACANs. Use the routines below to clear or fly to a\n lat/lon.\n"]
2449 pub fn XPLMSetFMSFlightPlanEntryInfo(
2450 inFlightPlan: XPLMNavFlightPlan,
2451 inIndex: ::std::os::raw::c_int,
2452 inRef: XPLMNavRef,
2453 inAltitude: ::std::os::raw::c_int,
2454 );
2455}
2456unsafe extern "C" {
2457 #[doc = " XPLMSetFMSFlightPlanEntryLatLon\n\n This routine changes the entry in the FMS to a lat/lon entry with the given\n coordinates.\n"]
2458 pub fn XPLMSetFMSFlightPlanEntryLatLon(
2459 inFlightPlan: XPLMNavFlightPlan,
2460 inIndex: ::std::os::raw::c_int,
2461 inLat: f32,
2462 inLon: f32,
2463 inAltitude: ::std::os::raw::c_int,
2464 );
2465}
2466unsafe extern "C" {
2467 #[doc = " XPLMSetFMSFlightPlanEntryLatLonWithId\n\n This routine changes the entry in the FMS to a lat/lon entry with the given\n coordinates. You can specify the display ID of the waypoint.\n"]
2468 pub fn XPLMSetFMSFlightPlanEntryLatLonWithId(
2469 inFlightPlan: XPLMNavFlightPlan,
2470 inIndex: ::std::os::raw::c_int,
2471 inLat: f32,
2472 inLon: f32,
2473 inAltitude: ::std::os::raw::c_int,
2474 inId: *const ::std::os::raw::c_char,
2475 inIdLength: ::std::os::raw::c_uint,
2476 );
2477}
2478unsafe extern "C" {
2479 #[doc = " XPLMClearFMSFlightPlanEntry\n\n This routine clears the given entry, potentially shortening the flight\n plan.\n"]
2480 pub fn XPLMClearFMSFlightPlanEntry(
2481 inFlightPlan: XPLMNavFlightPlan,
2482 inIndex: ::std::os::raw::c_int,
2483 );
2484}
2485unsafe extern "C" {
2486 #[doc = " XPLMLoadFMSFlightPlan\n\n Loads an X-Plane 11 and later formatted flightplan from the buffer into the\n FMS or GPS, including instrument procedures. Use device index 0 for the\n pilot-side and device index 1 for the co-pilot side unit.\n"]
2487 pub fn XPLMLoadFMSFlightPlan(
2488 inDevice: ::std::os::raw::c_int,
2489 inBuffer: *const ::std::os::raw::c_char,
2490 inBufferLen: ::std::os::raw::c_uint,
2491 );
2492}
2493unsafe extern "C" {
2494 #[doc = " XPLMSaveFMSFlightPlan\n\n Saves an X-Plane 11 formatted flightplan from the FMS or GPS into a char\n buffer that you provide. Use device index 0 for the pilot-side and device\n index 1 for the co-pilot side unit. Provide the length of the buffer you\n allocated. X-Plane will write a null-terminated string if the full flight\n plan fits into the buffer. If your buffer is too small, X-Plane will write\n inBufferLen characters, and the resulting buffer is not null-terminated.\n The return value is the number of characters (including null terminator)\n that X-Plane needed to write the flightplan. If this number is larger than\n the buffer you provided, the flightplan in the buffer will be incomplete\n and the buffer not null-terminated.\n"]
2495 pub fn XPLMSaveFMSFlightPlan(
2496 inDevice: ::std::os::raw::c_int,
2497 inBuffer: *mut ::std::os::raw::c_char,
2498 inBufferLen: ::std::os::raw::c_uint,
2499 ) -> ::std::os::raw::c_uint;
2500}
2501unsafe extern "C" {
2502 #[doc = " XPLMGetGPSDestinationType\n\n This routine returns the type of the currently selected GPS destination,\n one of fix, airport, VOR or NDB.\n"]
2503 pub fn XPLMGetGPSDestinationType() -> XPLMNavType;
2504}
2505unsafe extern "C" {
2506 #[doc = " XPLMGetGPSDestination\n\n This routine returns the current GPS destination.\n"]
2507 pub fn XPLMGetGPSDestination() -> XPLMNavRef;
2508}
2509unsafe extern "C" {
2510 #[doc = " XPLMSetUsersAircraft\n\n This routine changes the user's aircraft. Note that this will reinitialize\n the user to be on the nearest airport's first runway. Pass in a full path\n (hard drive and everything including the .acf extension) to the .acf file.\n"]
2511 pub fn XPLMSetUsersAircraft(inAircraftPath: *const ::std::os::raw::c_char);
2512}
2513unsafe extern "C" {
2514 #[doc = " XPLMPlaceUserAtAirport\n\n This routine places the user at a given airport. Specify the airport by\n its X-Plane airport ID (e.g. 'KBOS').\n"]
2515 pub fn XPLMPlaceUserAtAirport(inAirportCode: *const ::std::os::raw::c_char);
2516}
2517unsafe extern "C" {
2518 #[doc = " XPLMPlaceUserAtLocation\n\n Places the user at a specific location after performing any necessary\n scenery loads.\n\n As with in-air starts initiated from the X-Plane user interface, the\n aircraft will always start with its engines running, regardless of the\n user's preferences (i.e., regardless of what the dataref\n `sim/operation/prefs/startup_running` says).\n"]
2519 pub fn XPLMPlaceUserAtLocation(
2520 latitudeDegrees: f64,
2521 longitudeDegrees: f64,
2522 elevationMetersMSL: f32,
2523 headingDegreesTrue: f32,
2524 speedMetersPerSecond: f32,
2525 );
2526}
2527unsafe extern "C" {
2528 #[doc = " XPLMCountAircraft\n\n This function returns the number of aircraft X-Plane is capable of having,\n as well as the number of aircraft that are currently active. These numbers\n count the user's aircraft. It can also return the plugin that is currently\n controlling aircraft. In X-Plane 7, this routine reflects the number of\n aircraft the user has enabled in the rendering options window.\n"]
2529 pub fn XPLMCountAircraft(
2530 outTotalAircraft: *mut ::std::os::raw::c_int,
2531 outActiveAircraft: *mut ::std::os::raw::c_int,
2532 outController: *mut XPLMPluginID,
2533 );
2534}
2535unsafe extern "C" {
2536 #[doc = " XPLMGetNthAircraftModel\n\n This function returns the aircraft model for the Nth aircraft. Indices are\n zero based, with zero being the user's aircraft. The file name should be\n at least 256 chars in length; the path should be at least 512 chars in\n length.\n"]
2537 pub fn XPLMGetNthAircraftModel(
2538 inIndex: ::std::os::raw::c_int,
2539 outFileName: *mut ::std::os::raw::c_char,
2540 outPath: *mut ::std::os::raw::c_char,
2541 );
2542}
2543#[doc = " XPLMPlanesAvailable_f\n\n Your airplanes available callback is called when another plugin gives up\n access to the multiplayer planes. Use this to wait for access to\n multiplayer.\n"]
2544pub type XPLMPlanesAvailable_f =
2545 ::std::option::Option<unsafe extern "C" fn(inRefcon: *mut ::std::os::raw::c_void)>;
2546unsafe extern "C" {
2547 #[doc = " XPLMAcquirePlanes\n\n XPLMAcquirePlanes grants your plugin exclusive access to the aircraft. It\n returns 1 if you gain access, 0 if you do not.\n\n inAircraft - pass in an array of pointers to strings specifying the planes\n you want loaded. For any plane index you do not want loaded, pass a\n 0-length string. Other strings should be full paths with the .acf\n extension. NULL terminates this array, or pass NULL if there are no planes\n you want loaded.\n\n If you pass in a callback and do not receive access to the planes your\n callback will be called when the airplanes are available. If you do receive\n airplane access, your callback will not be called.\n"]
2548 pub fn XPLMAcquirePlanes(
2549 inAircraft: *mut *mut ::std::os::raw::c_char,
2550 inCallback: XPLMPlanesAvailable_f,
2551 inRefcon: *mut ::std::os::raw::c_void,
2552 ) -> ::std::os::raw::c_int;
2553}
2554unsafe extern "C" {
2555 #[doc = " XPLMReleasePlanes\n\n Call this function to release access to the planes. Note that if you are\n disabled, access to planes is released for you and you must reacquire it.\n"]
2556 pub fn XPLMReleasePlanes();
2557}
2558unsafe extern "C" {
2559 #[doc = " XPLMSetActiveAircraftCount\n\n This routine sets the number of active planes. If you pass in a number\n higher than the total number of planes availables, only the total number of\n planes available is actually used.\n"]
2560 pub fn XPLMSetActiveAircraftCount(inCount: ::std::os::raw::c_int);
2561}
2562unsafe extern "C" {
2563 #[doc = " XPLMSetAircraftModel\n\n This routine loads an aircraft model. It may only be called if you have\n exclusive access to the airplane APIs. Pass in the path of the model with\n the .acf extension. The index is zero based, but you may not pass in 0\n (use XPLMSetUsersAircraft to load the user's aircracft).\n"]
2564 pub fn XPLMSetAircraftModel(
2565 inIndex: ::std::os::raw::c_int,
2566 inAircraftPath: *const ::std::os::raw::c_char,
2567 );
2568}
2569unsafe extern "C" {
2570 #[doc = " XPLMDisableAIForPlane\n\n This routine turns off X-Plane's AI for a given plane. The plane will\n continue to draw and be a real plane in X-Plane, but will not move itself.\n"]
2571 pub fn XPLMDisableAIForPlane(inPlaneIndex: ::std::os::raw::c_int);
2572}
2573unsafe extern "C" {
2574 #[doc = " XPLMGetMyID\n\n This routine returns the plugin ID of the calling plug-in. Call this to\n get your own ID.\n"]
2575 pub fn XPLMGetMyID() -> XPLMPluginID;
2576}
2577unsafe extern "C" {
2578 #[doc = " XPLMCountPlugins\n\n This routine returns the total number of plug-ins that are loaded, both\n disabled and enabled.\n"]
2579 pub fn XPLMCountPlugins() -> ::std::os::raw::c_int;
2580}
2581unsafe extern "C" {
2582 #[doc = " XPLMGetNthPlugin\n\n This routine returns the ID of a plug-in by index. Index is 0 based from 0\n to XPLMCountPlugins-1, inclusive. Plugins may be returned in any arbitrary\n order.\n"]
2583 pub fn XPLMGetNthPlugin(inIndex: ::std::os::raw::c_int) -> XPLMPluginID;
2584}
2585unsafe extern "C" {
2586 #[doc = " XPLMFindPluginByPath\n\n This routine returns the plug-in ID of the plug-in whose file exists at the\n passed in absolute file system path. XPLM_NO_PLUGIN_ID is returned if the\n path does not point to a currently loaded plug-in.\n"]
2587 pub fn XPLMFindPluginByPath(inPath: *const ::std::os::raw::c_char) -> XPLMPluginID;
2588}
2589unsafe extern "C" {
2590 #[doc = " XPLMFindPluginBySignature\n\n This routine returns the plug-in ID of the plug-in whose signature matches\n what is passed in or XPLM_NO_PLUGIN_ID if no running plug-in has this\n signature. Signatures are the best way to identify another plug-in as they\n are independent of the file system path of a plug-in or the human-readable\n plug-in name, and should be unique for all plug-ins. Use this routine to\n locate another plugin that your plugin interoperates with\n"]
2591 pub fn XPLMFindPluginBySignature(inSignature: *const ::std::os::raw::c_char) -> XPLMPluginID;
2592}
2593unsafe extern "C" {
2594 #[doc = " XPLMGetPluginInfo\n\n This routine returns information about a plug-in. Each parameter should be\n a pointer to a buffer of at least\n 256 characters, or NULL to not receive the information.\n\n outName - the human-readable name of the plug-in. outFilePath - the\n absolute file path to the file that contains this plug-in. outSignature - a\n unique string that identifies this plug-in. outDescription - a\n human-readable description of this plug-in.\n"]
2595 pub fn XPLMGetPluginInfo(
2596 inPlugin: XPLMPluginID,
2597 outName: *mut ::std::os::raw::c_char,
2598 outFilePath: *mut ::std::os::raw::c_char,
2599 outSignature: *mut ::std::os::raw::c_char,
2600 outDescription: *mut ::std::os::raw::c_char,
2601 );
2602}
2603unsafe extern "C" {
2604 #[doc = " XPLMIsPluginEnabled\n\n Returns whether the specified plug-in is enabled for running.\n"]
2605 pub fn XPLMIsPluginEnabled(inPluginID: XPLMPluginID) -> ::std::os::raw::c_int;
2606}
2607unsafe extern "C" {
2608 #[doc = " XPLMEnablePlugin\n\n This routine enables a plug-in if it is not already enabled. It returns 1\n if the plugin was enabled or successfully enables itself, 0 if it does not.\n Plugins may fail to enable (for example, if resources cannot be acquired)\n by returning 0 from their XPluginEnable callback.\n"]
2609 pub fn XPLMEnablePlugin(inPluginID: XPLMPluginID) -> ::std::os::raw::c_int;
2610}
2611unsafe extern "C" {
2612 #[doc = " XPLMDisablePlugin\n\n This routine disableds an enabled plug-in.\n"]
2613 pub fn XPLMDisablePlugin(inPluginID: XPLMPluginID);
2614}
2615unsafe extern "C" {
2616 #[doc = " XPLMReloadPlugins\n\n This routine reloads all plug-ins. Once this routine is called and you\n return from the callback you were within (e.g. a menu select callback) you\n will receive your XPluginDisable and XPluginStop callbacks and your DLL\n will be unloaded, then the start process happens as if the sim was starting\n up.\n"]
2617 pub fn XPLMReloadPlugins();
2618}
2619unsafe extern "C" {
2620 #[doc = " XPLMSendMessageToPlugin\n\n This function sends a message to another plug-in or X-Plane. Pass\n XPLM_NO_PLUGIN_ID to broadcast to all plug-ins. Only enabled plug-ins with\n a message receive function receive the message.\n"]
2621 pub fn XPLMSendMessageToPlugin(
2622 inPlugin: XPLMPluginID,
2623 inMessage: ::std::os::raw::c_int,
2624 inParam: *mut ::std::os::raw::c_void,
2625 );
2626}
2627#[doc = " XPLMFeatureEnumerator_f\n\n You pass an XPLMFeatureEnumerator_f to get a list of all features supported\n by a given version running version of X-Plane. This routine is called once\n for each feature.\n"]
2628pub type XPLMFeatureEnumerator_f = ::std::option::Option<
2629 unsafe extern "C" fn(
2630 inFeature: *const ::std::os::raw::c_char,
2631 inRef: *mut ::std::os::raw::c_void,
2632 ),
2633>;
2634unsafe extern "C" {
2635 #[doc = " XPLMHasFeature\n\n This returns 1 if the given installation of X-Plane supports a feature, or\n 0 if it does not.\n"]
2636 pub fn XPLMHasFeature(inFeature: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
2637}
2638unsafe extern "C" {
2639 #[doc = " XPLMIsFeatureEnabled\n\n This returns 1 if a feature is currently enabled for your plugin, or 0 if\n it is not enabled. It is an error to call this routine with an unsupported\n feature.\n"]
2640 pub fn XPLMIsFeatureEnabled(inFeature: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
2641}
2642unsafe extern "C" {
2643 #[doc = " XPLMEnableFeature\n\n This routine enables or disables a feature for your plugin. This will\n change the running behavior of X-Plane and your plugin in some way,\n depending on the feature.\n"]
2644 pub fn XPLMEnableFeature(
2645 inFeature: *const ::std::os::raw::c_char,
2646 inEnable: ::std::os::raw::c_int,
2647 );
2648}
2649unsafe extern "C" {
2650 #[doc = " XPLMEnumerateFeatures\n\n This routine calls your enumerator callback once for each feature that this\n running version of X-Plane supports. Use this routine to determine all of\n the features that X-Plane can support.\n"]
2651 pub fn XPLMEnumerateFeatures(
2652 inEnumerator: XPLMFeatureEnumerator_f,
2653 inRef: *mut ::std::os::raw::c_void,
2654 );
2655}
2656#[doc = " Your callback runs before X-Plane integrates the flight model."]
2657pub const xplm_FlightLoop_Phase_BeforeFlightModel: _bindgen_ty_25 = 0;
2658#[doc = " Your callback runs after X-Plane integrates the flight model."]
2659pub const xplm_FlightLoop_Phase_AfterFlightModel: _bindgen_ty_25 = 1;
2660#[doc = " XPLMFlightLoopPhaseType\n\n You can register a flight loop callback to run either before or after the\n flight model is integrated by X-Plane.\n"]
2661pub type _bindgen_ty_25 = ::std::os::raw::c_int;
2662pub type XPLMFlightLoopPhaseType = ::std::os::raw::c_int;
2663#[doc = " XPLMFlightLoopID\n\n This is an opaque identifier for a flight loop callback. You can use this\n identifier to easily track and remove your callbacks, or to use the new\n flight loop APIs.\n"]
2664pub type XPLMFlightLoopID = *mut ::std::os::raw::c_void;
2665#[doc = " XPLMFlightLoop_f\n\n This is your flight loop callback. Each time the flight loop is iterated\n through, you receive this call at the end.\n\n Flight loop callbacks receive a number of input timing parameters. These\n input timing parameters are not particularly useful; you may need to track\n your own timing data (e.g. by reading datarefs). The input parameters are:\n\n - inElapsedSinceLastCall: the wall time since your last callback.\n - inElapsedTimeSinceLastFlightLoop: the wall time since any flight loop was\n dispatched.\n - inCounter: a monotonically increasing counter, bumped once per flight\n loop dispatch from the sim.\n - inRefcon: your own pointer constant provided when you registered yor\n callback.\n\n Your return value controls when you will next be called.\n\n - Return 0 to stop receiving callbacks.\n - Return a positive number to specify how many seconds until the next\n callback. (You will be called at or after this time, not before.)\n - Return a negative number to specify how many loops must go by until you\n are called. For example, -1.0 means call me the very next loop.\n\n Try to run your flight loop as infrequently as is practical, and suspend it\n (using return value 0) when you do not need it; lots of flight loop\n callbacks that do nothing lowers X-Plane's frame rate.\n\n Your callback will NOT be unregistered if you return 0; it will merely be\n inactive.\n"]
2666pub type XPLMFlightLoop_f = ::std::option::Option<
2667 unsafe extern "C" fn(
2668 inElapsedSinceLastCall: f32,
2669 inElapsedTimeSinceLastFlightLoop: f32,
2670 inCounter: ::std::os::raw::c_int,
2671 inRefcon: *mut ::std::os::raw::c_void,
2672 ) -> f32,
2673>;
2674#[doc = " XPLMCreateFlightLoop_t\n\n XPLMCreateFlightLoop_t contains the parameters to create a new flight loop\n callback. The structure may be expanded in future SDKs - always set\n structSize to the size of your structure in bytes.\n"]
2675#[repr(C)]
2676#[derive(Debug, Copy, Clone)]
2677pub struct XPLMCreateFlightLoop_t {
2678 pub structSize: ::std::os::raw::c_int,
2679 pub phase: XPLMFlightLoopPhaseType,
2680 pub callbackFunc: XPLMFlightLoop_f,
2681 pub refcon: *mut ::std::os::raw::c_void,
2682}
2683#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2684const _: () = {
2685 ["Size of XPLMCreateFlightLoop_t"][::std::mem::size_of::<XPLMCreateFlightLoop_t>() - 24usize];
2686 ["Alignment of XPLMCreateFlightLoop_t"]
2687 [::std::mem::align_of::<XPLMCreateFlightLoop_t>() - 8usize];
2688 ["Offset of field: XPLMCreateFlightLoop_t::structSize"]
2689 [::std::mem::offset_of!(XPLMCreateFlightLoop_t, structSize) - 0usize];
2690 ["Offset of field: XPLMCreateFlightLoop_t::phase"]
2691 [::std::mem::offset_of!(XPLMCreateFlightLoop_t, phase) - 4usize];
2692 ["Offset of field: XPLMCreateFlightLoop_t::callbackFunc"]
2693 [::std::mem::offset_of!(XPLMCreateFlightLoop_t, callbackFunc) - 8usize];
2694 ["Offset of field: XPLMCreateFlightLoop_t::refcon"]
2695 [::std::mem::offset_of!(XPLMCreateFlightLoop_t, refcon) - 16usize];
2696};
2697unsafe extern "C" {
2698 #[doc = " XPLMGetElapsedTime\n\n This routine returns the elapsed time since the sim started up in decimal\n seconds. This is a wall timer; it keeps counting upward even if the sim is\n pasued.\n\n __WARNING__: XPLMGetElapsedTime is not a very good timer! It lacks\n precision in both its data type and its source. Do not attempt to use it\n for timing critical applications like network multiplayer.\n"]
2699 pub fn XPLMGetElapsedTime() -> f32;
2700}
2701unsafe extern "C" {
2702 #[doc = " XPLMGetCycleNumber\n\n This routine returns a counter starting at zero for each sim cycle\n computed/video frame rendered.\n"]
2703 pub fn XPLMGetCycleNumber() -> ::std::os::raw::c_int;
2704}
2705unsafe extern "C" {
2706 #[doc = " XPLMRegisterFlightLoopCallback\n\n This routine registers your flight loop callback. Pass in a pointer to a\n flight loop function and a refcon (an optional reference value determined\n by you). inInterval defines when you will be called. Pass in a positive\n number to specify seconds from registration time to the next callback. Pass\n in a negative number to indicate when you will be called (e.g. pass -1 to\n be called at the next cylcle). Pass 0 to not be called; your callback will\n be inactive.\n\n (This legacy function only installs pre-flight-loop callbacks; use\n XPLMCreateFlightLoop for more control.)\n"]
2707 pub fn XPLMRegisterFlightLoopCallback(
2708 inFlightLoop: XPLMFlightLoop_f,
2709 inInterval: f32,
2710 inRefcon: *mut ::std::os::raw::c_void,
2711 );
2712}
2713unsafe extern "C" {
2714 #[doc = " XPLMUnregisterFlightLoopCallback\n\n This routine unregisters your flight loop callback. Do NOT call it from\n your flight loop callback. Once your flight loop callback is unregistered,\n it will not be called again.\n\n Only use this on flight loops registered via\n XPLMRegisterFlightLoopCallback.\n"]
2715 pub fn XPLMUnregisterFlightLoopCallback(
2716 inFlightLoop: XPLMFlightLoop_f,
2717 inRefcon: *mut ::std::os::raw::c_void,
2718 );
2719}
2720unsafe extern "C" {
2721 #[doc = " XPLMSetFlightLoopCallbackInterval\n\n This routine sets when a callback will be called. Do NOT call it from your\n callback; use the return value of the callback to change your callback\n interval from inside your callback.\n\n inInterval is formatted the same way as in XPLMRegisterFlightLoopCallback;\n positive for seconds, negative for cycles, and 0 for deactivating the\n callback. If inRelativeToNow is 1, times are from the time of this call;\n otherwise they are from the time the callback was last called (or the time\n it was registered if it has never been called.\n"]
2722 pub fn XPLMSetFlightLoopCallbackInterval(
2723 inFlightLoop: XPLMFlightLoop_f,
2724 inInterval: f32,
2725 inRelativeToNow: ::std::os::raw::c_int,
2726 inRefcon: *mut ::std::os::raw::c_void,
2727 );
2728}
2729unsafe extern "C" {
2730 #[doc = " XPLMCreateFlightLoop\n\n This routine creates a flight loop callback and returns its ID. The flight\n loop callback is created using the input param struct, and is inited to be\n unscheduled.\n"]
2731 pub fn XPLMCreateFlightLoop(inParams: *mut XPLMCreateFlightLoop_t) -> XPLMFlightLoopID;
2732}
2733unsafe extern "C" {
2734 #[doc = " XPLMDestroyFlightLoop\n\n This routine destroys a flight loop callback by ID. Only call it on flight\n loops created with the newer XPLMCreateFlightLoop API.\n"]
2735 pub fn XPLMDestroyFlightLoop(inFlightLoopID: XPLMFlightLoopID);
2736}
2737unsafe extern "C" {
2738 #[doc = " XPLMScheduleFlightLoop\n\n This routine schedules a flight loop callback for future execution. If\n inInterval is negative, it is run in a certain number of frames based on\n the absolute value of the input. If the interval is positive, it is a\n duration in seconds.\n\n If inRelativeToNow is true, times are interpreted relative to the time this\n routine is called; otherwise they are relative to the last call time or the\n time the flight loop was registered (if never called).\n"]
2739 pub fn XPLMScheduleFlightLoop(
2740 inFlightLoopID: XPLMFlightLoopID,
2741 inInterval: f32,
2742 inRelativeToNow: ::std::os::raw::c_int,
2743 );
2744}
2745#[doc = " Incoming speech on COM1"]
2746pub const xplm_AudioRadioCom1: _bindgen_ty_26 = 0;
2747#[doc = " Incoming speech on COM2"]
2748pub const xplm_AudioRadioCom2: _bindgen_ty_26 = 1;
2749#[doc = " Pilot's own speech"]
2750pub const xplm_AudioRadioPilot: _bindgen_ty_26 = 2;
2751#[doc = " Copilot's own speech"]
2752pub const xplm_AudioRadioCopilot: _bindgen_ty_26 = 3;
2753#[doc = " Copilot's own speech"]
2754pub const xplm_AudioExteriorAircraft: _bindgen_ty_26 = 4;
2755#[doc = " Copilot's own speech"]
2756pub const xplm_AudioExteriorEnvironment: _bindgen_ty_26 = 5;
2757#[doc = " Copilot's own speech"]
2758pub const xplm_AudioExteriorUnprocessed: _bindgen_ty_26 = 6;
2759#[doc = " Copilot's own speech"]
2760pub const xplm_AudioInterior: _bindgen_ty_26 = 7;
2761#[doc = " Copilot's own speech"]
2762pub const xplm_AudioUI: _bindgen_ty_26 = 8;
2763#[doc = " Dedicated ground vehicle cable"]
2764pub const xplm_AudioGround: _bindgen_ty_26 = 9;
2765#[doc = " Master bus. Not normally to be used directly."]
2766pub const xplm_Master: _bindgen_ty_26 = 10;
2767#[doc = " XPLMAudioBus\n\n This enumeration states the type of audio you wish to play - that is, the\n part of the simulated environment that the audio belongs in. If you use\n FMOD directly, note that COM1, COM2, Pilot and GND exist in a different\n FMOD bank so you may see these channels being unloaded/reloaded\n independently of the others. They may also be using a different\n FMOD::System if the user has selected a dedicated headset output device.\n"]
2768pub type _bindgen_ty_26 = ::std::os::raw::c_int;
2769pub type XPLMAudioBus = ::std::os::raw::c_int;
2770#[doc = " Master bank. Handles all aircraft and environmental audio."]
2771pub const xplm_MasterBank: _bindgen_ty_27 = 0;
2772#[doc = " Radio bank. Handles COM1/COM2/GND/Pilot/Copilot."]
2773pub const xplm_RadioBank: _bindgen_ty_27 = 1;
2774#[doc = " XPLMBankID\n\n These values are returned as the parameter of the\n \"XPLM_MSG_FMOD_BANK_LOADED\" and \"XPLM_MSG_FMOD_BANK_UNLOADING\" messages.\n"]
2775pub type _bindgen_ty_27 = ::std::os::raw::c_int;
2776pub type XPLMBankID = ::std::os::raw::c_int;
2777pub const FMOD_RESULT_FMOD_OK: FMOD_RESULT = 0;
2778#[doc = " These definitions are enough to play a basic sound without linking to the full FMOD distribution. You can still position it in 3D\n and change other basic parameters. In all cases where an FMOD_RESULT is returned, the full range of FMOD_RESULT codes are used - the\n status will in almost all situations be coming straight from FMOD - so the single definition here is purely to create a matching\n datatype and allow simple \"is OK\" and \"is not OK\" tests."]
2779pub type FMOD_RESULT = ::std::os::raw::c_int;
2780pub const FMOD_SOUND_FORMAT_FMOD_SOUND_FORMAT_PCM16: FMOD_SOUND_FORMAT = 2;
2781pub type FMOD_SOUND_FORMAT = ::std::os::raw::c_int;
2782#[repr(C)]
2783#[derive(Debug, Copy, Clone)]
2784pub struct FMOD_VECTOR {
2785 pub x: f32,
2786 pub y: f32,
2787 pub z: f32,
2788}
2789#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2790const _: () = {
2791 ["Size of FMOD_VECTOR"][::std::mem::size_of::<FMOD_VECTOR>() - 12usize];
2792 ["Alignment of FMOD_VECTOR"][::std::mem::align_of::<FMOD_VECTOR>() - 4usize];
2793 ["Offset of field: FMOD_VECTOR::x"][::std::mem::offset_of!(FMOD_VECTOR, x) - 0usize];
2794 ["Offset of field: FMOD_VECTOR::y"][::std::mem::offset_of!(FMOD_VECTOR, y) - 4usize];
2795 ["Offset of field: FMOD_VECTOR::z"][::std::mem::offset_of!(FMOD_VECTOR, z) - 8usize];
2796};
2797pub type FMOD_CHANNEL = ::std::os::raw::c_void;
2798#[doc = " XPLMPCMComplete_f\n\n If you use XPLMPlayPCMOnBus() you may use this optional callback to find\n out when the FMOD::Channel is complete, if you need to deallocate memory\n for example.\n"]
2799pub type XPLMPCMComplete_f = ::std::option::Option<
2800 unsafe extern "C" fn(inRefcon: *mut ::std::os::raw::c_void, status: FMOD_RESULT),
2801>;
2802unsafe extern "C" {
2803 #[doc = " XPLMPlayPCMOnBus\n\n Play an in-memory audio buffer on a given audio bus. The resulting FMOD\n channel is returned. PAY ATTENTION TO THE CALLBACK - when the sample\n completes or is stopped by X-Plane, the channel will go away. It's up to\n you to listen for the callback and invalidate any copy of the channel\n pointer you have lying around. The callback is optional because if you have\n no intention of interacting with the sound after it's launched, then you\n don't need to keep the channel pointer at all. The sound is not started\n instantly. Instead, it will be started the next time X-Plane refreshes the\n sound system, typically at the start of the next frame. This allows you to\n set the initial position for the sound, if required. The callback will be\n called on the main thread, and will be called only once per sound. If the\n call fails and you provide a callback function, you will get a callback\n with an FMOD status code.\n"]
2804 pub fn XPLMPlayPCMOnBus(
2805 audioBuffer: *mut ::std::os::raw::c_void,
2806 bufferSize: u32,
2807 soundFormat: FMOD_SOUND_FORMAT,
2808 freqHz: ::std::os::raw::c_int,
2809 numChannels: ::std::os::raw::c_int,
2810 loop_: ::std::os::raw::c_int,
2811 audioType: XPLMAudioBus,
2812 inCallback: XPLMPCMComplete_f,
2813 inRefcon: *mut ::std::os::raw::c_void,
2814 ) -> *mut FMOD_CHANNEL;
2815}
2816unsafe extern "C" {
2817 #[doc = " XPLMStopAudio\n\n Stop playing an active FMOD channel. If you defined a completion callback,\n this will be called. After this, the FMOD::Channel* will no longer be valid\n and must not be used in any future calls.\n"]
2818 pub fn XPLMStopAudio(fmod_channel: *mut FMOD_CHANNEL) -> FMOD_RESULT;
2819}
2820unsafe extern "C" {
2821 #[doc = " XPLMSetAudioPosition\n\n Move the given audio channel (i.e. a single sound) to a specific location\n in local co-ordinates. This will set the sound to 3D if it is not already.\n"]
2822 pub fn XPLMSetAudioPosition(
2823 fmod_channel: *mut FMOD_CHANNEL,
2824 position: *mut FMOD_VECTOR,
2825 velocity: *mut FMOD_VECTOR,
2826 ) -> FMOD_RESULT;
2827}
2828unsafe extern "C" {
2829 #[doc = " XPLMSetAudioFadeDistance\n\n Set the minimum and maximum fade distances for a given sound. This is\n highly unlikely to be 0 - please see\n https://documentation.help/FMOD-Studio-API/FMOD_Sound_Set3DMinMaxDistance.html\n for full details. This will set the sound to 3D if it is not already. You\n can set a 3D sound back to 2D by passing negative values for both min amd\n max.\n"]
2830 pub fn XPLMSetAudioFadeDistance(
2831 fmod_channel: *mut FMOD_CHANNEL,
2832 min_fade_distance: f32,
2833 max_fade_distance: f32,
2834 ) -> FMOD_RESULT;
2835}
2836unsafe extern "C" {
2837 #[doc = " XPLMSetAudioVolume\n\n Set the current volume of an active FMOD channel. This should be used to\n handle changes in the audio source volume, not for fading with distance.\n Values from 0 to 1 are normal, above 1 can be used to artificially amplify\n a sound.\n"]
2838 pub fn XPLMSetAudioVolume(fmod_channel: *mut FMOD_CHANNEL, source_volume: f32) -> FMOD_RESULT;
2839}
2840unsafe extern "C" {
2841 #[doc = " XPLMSetAudioPitch\n\n Change the current pitch of an active FMOD channel.\n"]
2842 pub fn XPLMSetAudioPitch(fmod_channel: *mut FMOD_CHANNEL, audio_pitch_hz: f32) -> FMOD_RESULT;
2843}
2844unsafe extern "C" {
2845 #[doc = " XPLMSetAudioCone\n\n Set a directional cone for an active FMOD channel. The orientation vector\n is in local coordinates. This will set the sound to 3D if it is not\n already.\n"]
2846 pub fn XPLMSetAudioCone(
2847 fmod_channel: *mut FMOD_CHANNEL,
2848 inside_angle: f32,
2849 outside_angle: f32,
2850 outside_volume: f32,
2851 orientation: *mut FMOD_VECTOR,
2852 ) -> FMOD_RESULT;
2853}
2854#[doc = " XPLMWeatherInfoWinds_t\n"]
2855#[repr(C)]
2856#[derive(Debug, Copy, Clone)]
2857pub struct XPLMWeatherInfoWinds_t {
2858 #[doc = " Altitude MSL, meters"]
2859 pub alt_msl: f32,
2860 #[doc = " Wind speed, meters/sec"]
2861 pub speed: f32,
2862 #[doc = " Direction (true)"]
2863 pub direction: f32,
2864 #[doc = " Gust speed, meters/sec"]
2865 pub gust_speed: f32,
2866 #[doc = " Shear arc, degrees i.e. 50% of this arc in either direction from base"]
2867 pub shear: f32,
2868 #[doc = " Clear-air turbulence ratio"]
2869 pub turbulence: f32,
2870}
2871#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2872const _: () = {
2873 ["Size of XPLMWeatherInfoWinds_t"][::std::mem::size_of::<XPLMWeatherInfoWinds_t>() - 24usize];
2874 ["Alignment of XPLMWeatherInfoWinds_t"]
2875 [::std::mem::align_of::<XPLMWeatherInfoWinds_t>() - 4usize];
2876 ["Offset of field: XPLMWeatherInfoWinds_t::alt_msl"]
2877 [::std::mem::offset_of!(XPLMWeatherInfoWinds_t, alt_msl) - 0usize];
2878 ["Offset of field: XPLMWeatherInfoWinds_t::speed"]
2879 [::std::mem::offset_of!(XPLMWeatherInfoWinds_t, speed) - 4usize];
2880 ["Offset of field: XPLMWeatherInfoWinds_t::direction"]
2881 [::std::mem::offset_of!(XPLMWeatherInfoWinds_t, direction) - 8usize];
2882 ["Offset of field: XPLMWeatherInfoWinds_t::gust_speed"]
2883 [::std::mem::offset_of!(XPLMWeatherInfoWinds_t, gust_speed) - 12usize];
2884 ["Offset of field: XPLMWeatherInfoWinds_t::shear"]
2885 [::std::mem::offset_of!(XPLMWeatherInfoWinds_t, shear) - 16usize];
2886 ["Offset of field: XPLMWeatherInfoWinds_t::turbulence"]
2887 [::std::mem::offset_of!(XPLMWeatherInfoWinds_t, turbulence) - 20usize];
2888};
2889#[doc = " XPLMWeatherInfoClouds_t\n"]
2890#[repr(C)]
2891#[derive(Debug, Copy, Clone)]
2892pub struct XPLMWeatherInfoClouds_t {
2893 #[doc = " Cloud type, float enum"]
2894 pub cloud_type: f32,
2895 #[doc = " Coverage ratio"]
2896 pub coverage: f32,
2897 #[doc = " Altitude MSL, meters"]
2898 pub alt_top: f32,
2899 #[doc = " Altitude MSL, meters"]
2900 pub alt_base: f32,
2901}
2902#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2903const _: () = {
2904 ["Size of XPLMWeatherInfoClouds_t"][::std::mem::size_of::<XPLMWeatherInfoClouds_t>() - 16usize];
2905 ["Alignment of XPLMWeatherInfoClouds_t"]
2906 [::std::mem::align_of::<XPLMWeatherInfoClouds_t>() - 4usize];
2907 ["Offset of field: XPLMWeatherInfoClouds_t::cloud_type"]
2908 [::std::mem::offset_of!(XPLMWeatherInfoClouds_t, cloud_type) - 0usize];
2909 ["Offset of field: XPLMWeatherInfoClouds_t::coverage"]
2910 [::std::mem::offset_of!(XPLMWeatherInfoClouds_t, coverage) - 4usize];
2911 ["Offset of field: XPLMWeatherInfoClouds_t::alt_top"]
2912 [::std::mem::offset_of!(XPLMWeatherInfoClouds_t, alt_top) - 8usize];
2913 ["Offset of field: XPLMWeatherInfoClouds_t::alt_base"]
2914 [::std::mem::offset_of!(XPLMWeatherInfoClouds_t, alt_base) - 12usize];
2915};
2916#[doc = " XPLMWeatherInfo_t\n\n Basic weather conditions at a specific point.\n"]
2917#[repr(C)]
2918#[derive(Debug, Copy, Clone)]
2919pub struct XPLMWeatherInfo_t {
2920 #[doc = " The size of the struct."]
2921 pub structSize: ::std::os::raw::c_int,
2922 #[doc = " Temperature at the given altitude in Celsius"]
2923 pub temperature_alt: f32,
2924 #[doc = " Dewpoint at the given altitude in Celsius"]
2925 pub dewpoint_alt: f32,
2926 #[doc = " Pressure at the given altitude in Pascals"]
2927 pub pressure_alt: f32,
2928 #[doc = " Precipitation rate at the given altitude"]
2929 pub precip_rate_alt: f32,
2930 #[doc = " Wind direction at the given altitude"]
2931 pub wind_dir_alt: f32,
2932 #[doc = " Wind speed at the given altitude, meters/sec"]
2933 pub wind_spd_alt: f32,
2934 #[doc = " Turbulence ratio at the given altitude"]
2935 pub turbulence_alt: f32,
2936 #[doc = " Height of water waves in meters"]
2937 pub wave_height: f32,
2938 #[doc = " Length of water waves in meters"]
2939 pub wave_length: f32,
2940 #[doc = " Direction from which water waves are coming"]
2941 pub wave_dir: ::std::os::raw::c_int,
2942 #[doc = " Speed of wave advance in meters/sec"]
2943 pub wave_speed: f32,
2944 #[doc = " Base visibility at 0 altitude, meters"]
2945 pub visibility: f32,
2946 #[doc = " Base precipitation ratio at 0 altitude"]
2947 pub precip_rate: f32,
2948 #[doc = " Climb rate due to thermals, meters/sec"]
2949 pub thermal_climb: f32,
2950 #[doc = " Pressure at 0 altitude in Pascals"]
2951 pub pressure_sl: f32,
2952 #[doc = " Defined wind layers. Not all layers are always defined."]
2953 pub wind_layers: [XPLMWeatherInfoWinds_t; 13usize],
2954 #[doc = " Defined cloud layers. Not all layers are always defined."]
2955 pub cloud_layers: [XPLMWeatherInfoClouds_t; 3usize],
2956}
2957#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2958const _: () = {
2959 ["Size of XPLMWeatherInfo_t"][::std::mem::size_of::<XPLMWeatherInfo_t>() - 424usize];
2960 ["Alignment of XPLMWeatherInfo_t"][::std::mem::align_of::<XPLMWeatherInfo_t>() - 4usize];
2961 ["Offset of field: XPLMWeatherInfo_t::structSize"]
2962 [::std::mem::offset_of!(XPLMWeatherInfo_t, structSize) - 0usize];
2963 ["Offset of field: XPLMWeatherInfo_t::temperature_alt"]
2964 [::std::mem::offset_of!(XPLMWeatherInfo_t, temperature_alt) - 4usize];
2965 ["Offset of field: XPLMWeatherInfo_t::dewpoint_alt"]
2966 [::std::mem::offset_of!(XPLMWeatherInfo_t, dewpoint_alt) - 8usize];
2967 ["Offset of field: XPLMWeatherInfo_t::pressure_alt"]
2968 [::std::mem::offset_of!(XPLMWeatherInfo_t, pressure_alt) - 12usize];
2969 ["Offset of field: XPLMWeatherInfo_t::precip_rate_alt"]
2970 [::std::mem::offset_of!(XPLMWeatherInfo_t, precip_rate_alt) - 16usize];
2971 ["Offset of field: XPLMWeatherInfo_t::wind_dir_alt"]
2972 [::std::mem::offset_of!(XPLMWeatherInfo_t, wind_dir_alt) - 20usize];
2973 ["Offset of field: XPLMWeatherInfo_t::wind_spd_alt"]
2974 [::std::mem::offset_of!(XPLMWeatherInfo_t, wind_spd_alt) - 24usize];
2975 ["Offset of field: XPLMWeatherInfo_t::turbulence_alt"]
2976 [::std::mem::offset_of!(XPLMWeatherInfo_t, turbulence_alt) - 28usize];
2977 ["Offset of field: XPLMWeatherInfo_t::wave_height"]
2978 [::std::mem::offset_of!(XPLMWeatherInfo_t, wave_height) - 32usize];
2979 ["Offset of field: XPLMWeatherInfo_t::wave_length"]
2980 [::std::mem::offset_of!(XPLMWeatherInfo_t, wave_length) - 36usize];
2981 ["Offset of field: XPLMWeatherInfo_t::wave_dir"]
2982 [::std::mem::offset_of!(XPLMWeatherInfo_t, wave_dir) - 40usize];
2983 ["Offset of field: XPLMWeatherInfo_t::wave_speed"]
2984 [::std::mem::offset_of!(XPLMWeatherInfo_t, wave_speed) - 44usize];
2985 ["Offset of field: XPLMWeatherInfo_t::visibility"]
2986 [::std::mem::offset_of!(XPLMWeatherInfo_t, visibility) - 48usize];
2987 ["Offset of field: XPLMWeatherInfo_t::precip_rate"]
2988 [::std::mem::offset_of!(XPLMWeatherInfo_t, precip_rate) - 52usize];
2989 ["Offset of field: XPLMWeatherInfo_t::thermal_climb"]
2990 [::std::mem::offset_of!(XPLMWeatherInfo_t, thermal_climb) - 56usize];
2991 ["Offset of field: XPLMWeatherInfo_t::pressure_sl"]
2992 [::std::mem::offset_of!(XPLMWeatherInfo_t, pressure_sl) - 60usize];
2993 ["Offset of field: XPLMWeatherInfo_t::wind_layers"]
2994 [::std::mem::offset_of!(XPLMWeatherInfo_t, wind_layers) - 64usize];
2995 ["Offset of field: XPLMWeatherInfo_t::cloud_layers"]
2996 [::std::mem::offset_of!(XPLMWeatherInfo_t, cloud_layers) - 376usize];
2997};
2998unsafe extern "C" {
2999 #[doc = " XPLMGetMETARForAirport\n\n Get the last-downloaded METAR report for an airport by ICAO code. Note that\n the actual weather at that airport may have evolved significantly since the\n last downloaded METAR. outMETAR must point to a char buffer of at least 150\n characters. This call is not intended to be used per-frame. This call does\n not return the current weather at the airport, and returns an empty string\n if the system is not in real-weather mode.\n"]
3000 pub fn XPLMGetMETARForAirport(
3001 airport_id: *const ::std::os::raw::c_char,
3002 outMETAR: *mut XPLMFixedString150_t,
3003 );
3004}
3005unsafe extern "C" {
3006 #[doc = " XPLMGetWeatherAtLocation\n\n Get the current weather conditions at a given location. Note that this does\n not work world-wide, only within the surrounding region. Return 1 if\n detailed weather (i.e. an airport-specific METAR) was found, 0 if not. In\n both cases, the structure will contain the best data available. This call\n is not intended to be used per-frame.\n"]
3007 pub fn XPLMGetWeatherAtLocation(
3008 latitude: f64,
3009 longitude: f64,
3010 altitude_m: f64,
3011 out_info: *mut XPLMWeatherInfo_t,
3012 ) -> ::std::os::raw::c_int;
3013}
3014#[doc = " XPWidgetID\n\n A Widget ID is an opaque unique non-zero handle identifying your widget.\n Use 0 to specify \"no widget\". This type is defined as wide enough to hold a\n pointer. You receive a widget ID when you create a new widget and then use\n that widget ID to further refer to the widget.\n"]
3015pub type XPWidgetID = *mut ::std::os::raw::c_void;
3016#[doc = " A window's refcon is an opaque value used by client code to find other data*\n based on it."]
3017pub const xpProperty_Refcon: _bindgen_ty_28 = 0;
3018#[doc = " These properties are used by the utilities to implement dragging."]
3019pub const xpProperty_Dragging: _bindgen_ty_28 = 1;
3020#[doc = " These properties are used by the utilities to implement dragging."]
3021pub const xpProperty_DragXOff: _bindgen_ty_28 = 2;
3022#[doc = " These properties are used by the utilities to implement dragging."]
3023pub const xpProperty_DragYOff: _bindgen_ty_28 = 3;
3024#[doc = " Is the widget highlighted? (For widgets that support this kind of thing.)"]
3025pub const xpProperty_Hilited: _bindgen_ty_28 = 4;
3026#[doc = " Is there a C++ object attached to this widget?"]
3027pub const xpProperty_Object: _bindgen_ty_28 = 5;
3028#[doc = " If this property is 1, the widget package will use OpenGL to restrict *\n drawing to the Widget's exposed rectangle."]
3029pub const xpProperty_Clip: _bindgen_ty_28 = 6;
3030#[doc = " Is this widget enabled (for those that have a disabled state too)?"]
3031pub const xpProperty_Enabled: _bindgen_ty_28 = 7;
3032#[doc = " NOTE: Property IDs 1 - 999 are reserved for the widgets library. *\n *\n NOTE: Property IDs 1000 - 9999 are allocated to the standard widget classes*\n provided with the library. *\n *\n Properties 1000 - 1099 are for widget class 0, 1100 - 1199 for widget class*\n 1, etc."]
3033pub const xpProperty_UserStart: _bindgen_ty_28 = 10000;
3034#[doc = " XPWidgetPropertyID\n\n Properties are values attached to instances of your widgets. A property is\n identified by a 32-bit ID and its value is the width of a pointer.\n\n Each widget instance may have a property or not have it. When you set a\n property on a widget for the first time, the property is added to the\n widget; it then stays there for the life of the widget.\n\n Some property IDs are predefined by the widget package; you can make up\n your own property IDs as well.\n"]
3035pub type _bindgen_ty_28 = ::std::os::raw::c_int;
3036pub type XPWidgetPropertyID = ::std::os::raw::c_int;
3037#[doc = " XPMouseState_t\n\n When the mouse is clicked or dragged, a pointer to this structure is passed\n to your widget function.\n"]
3038#[repr(C)]
3039#[derive(Debug, Copy, Clone)]
3040pub struct XPMouseState_t {
3041 pub x: ::std::os::raw::c_int,
3042 pub y: ::std::os::raw::c_int,
3043 #[doc = " Mouse button number, left = 0 (right button not yet supported."]
3044 pub button: ::std::os::raw::c_int,
3045 #[doc = " Scroll wheel delta (button in this case would be the wheel axis number)."]
3046 pub delta: ::std::os::raw::c_int,
3047}
3048#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3049const _: () = {
3050 ["Size of XPMouseState_t"][::std::mem::size_of::<XPMouseState_t>() - 16usize];
3051 ["Alignment of XPMouseState_t"][::std::mem::align_of::<XPMouseState_t>() - 4usize];
3052 ["Offset of field: XPMouseState_t::x"][::std::mem::offset_of!(XPMouseState_t, x) - 0usize];
3053 ["Offset of field: XPMouseState_t::y"][::std::mem::offset_of!(XPMouseState_t, y) - 4usize];
3054 ["Offset of field: XPMouseState_t::button"]
3055 [::std::mem::offset_of!(XPMouseState_t, button) - 8usize];
3056 ["Offset of field: XPMouseState_t::delta"]
3057 [::std::mem::offset_of!(XPMouseState_t, delta) - 12usize];
3058};
3059#[doc = " XPKeyState_t\n\n When a key is pressed, a pointer to this struct is passed to your widget\n function.\n"]
3060#[repr(C)]
3061#[derive(Debug, Copy, Clone)]
3062pub struct XPKeyState_t {
3063 #[doc = " The ASCII key that was pressed. WARNING: this may be 0 for some non-ASCII *\n key sequences."]
3064 pub key: ::std::os::raw::c_char,
3065 #[doc = " The flags. Make sure to check this if you only want key-downs!"]
3066 pub flags: XPLMKeyFlags,
3067 #[doc = " The virtual key code for the key"]
3068 pub vkey: ::std::os::raw::c_char,
3069}
3070#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3071const _: () = {
3072 ["Size of XPKeyState_t"][::std::mem::size_of::<XPKeyState_t>() - 12usize];
3073 ["Alignment of XPKeyState_t"][::std::mem::align_of::<XPKeyState_t>() - 4usize];
3074 ["Offset of field: XPKeyState_t::key"][::std::mem::offset_of!(XPKeyState_t, key) - 0usize];
3075 ["Offset of field: XPKeyState_t::flags"][::std::mem::offset_of!(XPKeyState_t, flags) - 4usize];
3076 ["Offset of field: XPKeyState_t::vkey"][::std::mem::offset_of!(XPKeyState_t, vkey) - 8usize];
3077};
3078#[doc = " XPWidgetGeometryChange_t\n\n This structure contains the deltas for your widget's geometry when it\n changes.\n"]
3079#[repr(C)]
3080#[derive(Debug, Copy, Clone)]
3081pub struct XPWidgetGeometryChange_t {
3082 pub dx: ::std::os::raw::c_int,
3083 #[doc = " +Y = the widget moved up"]
3084 pub dy: ::std::os::raw::c_int,
3085 pub dwidth: ::std::os::raw::c_int,
3086 pub dheight: ::std::os::raw::c_int,
3087}
3088#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3089const _: () = {
3090 ["Size of XPWidgetGeometryChange_t"]
3091 [::std::mem::size_of::<XPWidgetGeometryChange_t>() - 16usize];
3092 ["Alignment of XPWidgetGeometryChange_t"]
3093 [::std::mem::align_of::<XPWidgetGeometryChange_t>() - 4usize];
3094 ["Offset of field: XPWidgetGeometryChange_t::dx"]
3095 [::std::mem::offset_of!(XPWidgetGeometryChange_t, dx) - 0usize];
3096 ["Offset of field: XPWidgetGeometryChange_t::dy"]
3097 [::std::mem::offset_of!(XPWidgetGeometryChange_t, dy) - 4usize];
3098 ["Offset of field: XPWidgetGeometryChange_t::dwidth"]
3099 [::std::mem::offset_of!(XPWidgetGeometryChange_t, dwidth) - 8usize];
3100 ["Offset of field: XPWidgetGeometryChange_t::dheight"]
3101 [::std::mem::offset_of!(XPWidgetGeometryChange_t, dheight) - 12usize];
3102};
3103#[doc = " The message will only be sent to the target widget."]
3104pub const xpMode_Direct: _bindgen_ty_29 = 0;
3105#[doc = " The message is sent to the target widget, then up the chain of parents *\n until the message is handled or a parentless widget is reached."]
3106pub const xpMode_UpChain: _bindgen_ty_29 = 1;
3107#[doc = " The message is sent to the target widget and then all of its children *\n recursively depth-first."]
3108pub const xpMode_Recursive: _bindgen_ty_29 = 2;
3109#[doc = " The message is sent just to the target, but goes to every callback, even if*\n it is handled."]
3110pub const xpMode_DirectAllCallbacks: _bindgen_ty_29 = 3;
3111#[doc = " The message is only sent to the very first handler even if it is not *\n accepted. (This is really only useful for some internal widget library *\n functions.)"]
3112pub const xpMode_Once: _bindgen_ty_29 = 4;
3113#[doc = " XPDispatchMode\n\n The dispatching modes describe how the widgets library sends out messages.\n Currently there are three modes:\n"]
3114pub type _bindgen_ty_29 = ::std::os::raw::c_int;
3115pub type XPDispatchMode = ::std::os::raw::c_int;
3116#[doc = " XPWidgetClass\n\n Widget classes define predefined widget types. A widget class basically\n specifies from a library the widget function to be used for the widget.\n Most widgets can be made right from classes.\n"]
3117pub type XPWidgetClass = ::std::os::raw::c_int;
3118#[doc = " No message, should not be sent."]
3119pub const xpMsg_None: _bindgen_ty_30 = 0;
3120#[doc = " The create message is sent once per widget that is created with your widget*\n function and once for any widget that has your widget function attached. *\n *\n Dispatching: Direct *\n *\n Param 1: 1 if you are being added as a subclass, 0 if the widget is first *\n being created."]
3121pub const xpMsg_Create: _bindgen_ty_30 = 1;
3122#[doc = " The destroy message is sent once for each message that is destroyed that *\n has your widget function. *\n *\n Dispatching: Direct for all *\n *\n Param 1: 1 if being deleted by a recursive delete to the parent, 0 for *\n explicit deletion."]
3123pub const xpMsg_Destroy: _bindgen_ty_30 = 2;
3124#[doc = " The paint message is sent to your widget to draw itself. The paint message *\n is the bare-bones message; in response you must draw yourself, draw your *\n children, set up clipping and culling, check for visibility, etc. If you *\n don't want to do all of this, ignore the paint message and a draw message *\n (see below) will be sent to you. *\n *\n Dispatching: Direct"]
3125pub const xpMsg_Paint: _bindgen_ty_30 = 3;
3126#[doc = " The draw message is sent to your widget when it is time to draw yourself. *\n OpenGL will be set up to draw in 2-d global screen coordinates, but you *\n should use the XPLM to set up OpenGL state. *\n *\n Dispatching: Direct"]
3127pub const xpMsg_Draw: _bindgen_ty_30 = 4;
3128#[doc = " The key press message is sent once per key that is pressed. The first *\n parameter is the type of key code (integer or char) and the second is the *\n code itself. By handling this event, you consume the key stroke. *\n *\n Handling this message 'consumes' the keystroke; not handling it passes it *\n to your parent widget. *\n *\n Dispatching: Up Chain *\n *\n Param 1: A pointer to an XPKeyState_t structure with the keystroke."]
3129pub const xpMsg_KeyPress: _bindgen_ty_30 = 5;
3130#[doc = " Keyboard focus is being given to you. By handling this message you accept *\n keyboard focus. The first parameter will be one if a child of yours gave up*\n focus to you, 0 if someone set focus on you explicitly. *\n *\n Handling this message accepts focus; not handling refuses focus. *\n *\n Dispatching: direct *\n *\n Param 1: 1 if you are gaining focus because your child is giving it up, 0 *\n if someone is explicitly giving you focus."]
3131pub const xpMsg_KeyTakeFocus: _bindgen_ty_30 = 6;
3132#[doc = " Keyboard focus is being taken away from you. The first parameter will be 1 *\n if you are losing focus because another widget is taking it, or 0 if *\n someone called the API to make you lose focus explicitly. *\n *\n Dispatching: Direct *\n *\n Param 1: 1 if focus is being taken by another widget, 0 if code requested *\n to remove focus."]
3133pub const xpMsg_KeyLoseFocus: _bindgen_ty_30 = 7;
3134#[doc = " You receive one mousedown event per click with a mouse-state structure *\n pointed to by parameter 1. By accepting this you eat the click, otherwise *\n your parent gets it. You will not receive drag and mouse up messages if you*\n do not accept the down message. *\n *\n Handling this message consumes the mouse click, not handling it passes it *\n to the next widget. You can act 'transparent' as a window by never handling*\n moues clicks to certain areas. *\n *\n Dispatching: Up chain NOTE: Technically this is direct dispatched, but the *\n widgets library will ship it to each widget until one consumes the click, *\n making it effectively \"up chain\". *\n *\n Param 1: A pointer to an XPMouseState_t containing the mouse status."]
3135pub const xpMsg_MouseDown: _bindgen_ty_30 = 8;
3136#[doc = " You receive a series of mouse drag messages (typically one per frame in the*\n sim) as the mouse is moved once you have accepted a mouse down message. *\n Parameter one points to a mouse-state structure describing the mouse *\n location. You will continue to receive these until the mouse button is *\n released. You may receive multiple mouse state messages with the same mouse*\n position. You will receive mouse drag events even if the mouse is dragged *\n out of your current or original bounds at the time of the mouse down. *\n *\n Dispatching: Direct *\n *\n Param 1: A pointer to an XPMouseState_t containing the mouse status."]
3137pub const xpMsg_MouseDrag: _bindgen_ty_30 = 9;
3138#[doc = " The mouseup event is sent once when the mouse button is released after a *\n drag or click. You only receive this message if you accept the mouseDown *\n message. Parameter one points to a mouse state structure. *\n *\n Dispatching: Direct *\n *\n Param 1: A pointer to an XPMouseState_t containing the mouse status."]
3139pub const xpMsg_MouseUp: _bindgen_ty_30 = 10;
3140#[doc = " Your geometry or a child's geometry is being changed. *\n *\n Dispatching: Up chain *\n *\n Param 1: The widget ID of the original reshaped target. *\n *\n Param 2: A pointer to a XPWidgetGeometryChange_t struct describing the *\n change."]
3141pub const xpMsg_Reshape: _bindgen_ty_30 = 11;
3142#[doc = " Your exposed area has changed. *\n *\n Dispatching: Direct"]
3143pub const xpMsg_ExposedChanged: _bindgen_ty_30 = 12;
3144#[doc = " A child has been added to you. The child's ID is passed in parameter one. *\n *\n Dispatching: Direct *\n *\n Param 1: The Widget ID of the child being added."]
3145pub const xpMsg_AcceptChild: _bindgen_ty_30 = 13;
3146#[doc = " A child has been removed from you. The child's ID is passed in parameter *\n one. *\n *\n Dispatching: Direct *\n *\n Param 1: The Widget ID of the child being removed."]
3147pub const xpMsg_LoseChild: _bindgen_ty_30 = 14;
3148#[doc = " You now have a new parent, or have no parent. The parent's ID is passed in,*\n or 0 for no parent. *\n *\n Dispatching: Direct *\n *\n Param 1: The Widget ID of your parent"]
3149pub const xpMsg_AcceptParent: _bindgen_ty_30 = 15;
3150#[doc = " You or a child has been shown. Note that this does not include you being *\n shown because your parent was shown, you were put in a new parent, your *\n root was shown, etc. *\n *\n Dispatching: Up chain *\n *\n Param 1: The widget ID of the shown widget."]
3151pub const xpMsg_Shown: _bindgen_ty_30 = 16;
3152#[doc = " You have been hidden. See limitations above. *\n *\n Dispatching: Up chain *\n *\n Param 1: The widget ID of the hidden widget."]
3153pub const xpMsg_Hidden: _bindgen_ty_30 = 17;
3154#[doc = " Your descriptor has changed. *\n *\n Dispatching: Direct"]
3155pub const xpMsg_DescriptorChanged: _bindgen_ty_30 = 18;
3156#[doc = " A property has changed. Param 1 contains the property ID. *\n *\n Dispatching: Direct *\n *\n Param 1: The Property ID being changed. *\n *\n Param 2: The new property value"]
3157pub const xpMsg_PropertyChanged: _bindgen_ty_30 = 19;
3158#[doc = " The mouse wheel has moved. *\n *\n Return 1 to consume the mouse wheel move, or 0 to pass the message to a *\n parent. Dispatching: Up chain *\n *\n Param 1: A pointer to an XPMouseState_t containing the mouse status."]
3159pub const xpMsg_MouseWheel: _bindgen_ty_30 = 20;
3160#[doc = " The cursor is over your widget. If you consume this message, change the *\n XPLMCursorStatus value to indicate the desired result, with the same rules *\n as in XPLMDisplay.h. *\n *\n Return 1 to consume this message, 0 to pass it on. *\n *\n Dispatching: Up chain Param 1: A pointer to an XPMouseState_t struct *\n containing the mouse status. *\n *\n Param 2: A pointer to a XPLMCursorStatus - set this to the cursor result *\n you desire."]
3161pub const xpMsg_CursorAdjust: _bindgen_ty_30 = 21;
3162#[doc = " NOTE: Message IDs 1000 - 9999 are allocated to the standard widget classes *\n provided with the library with 1000 - 1099 for widget class 0, 1100 - 1199 *\n for widget class 1, etc. Message IDs 10,000 and beyond are for plugin use."]
3163pub const xpMsg_UserStart: _bindgen_ty_30 = 10000;
3164#[doc = " XPWidgetMessage\n\n Widgets receive 32-bit messages indicating what action is to be taken or\n notifications of events. The list of messages may be expanded.\n"]
3165pub type _bindgen_ty_30 = ::std::os::raw::c_int;
3166pub type XPWidgetMessage = ::std::os::raw::c_int;
3167#[doc = " XPWidgetFunc_t\n\n This function defines your custom widget's behavior. It will be called by\n the widgets library to send messages to your widget. The message and widget\n ID are passed in, as well as two pointer-width signed parameters whose\n meaning varies with the message. Return 1 to indicate that you have\n processed the message, 0 to indicate that you have not. For any message\n that is not understood, return 0.\n"]
3168pub type XPWidgetFunc_t = ::std::option::Option<
3169 unsafe extern "C" fn(
3170 inMessage: XPWidgetMessage,
3171 inWidget: XPWidgetID,
3172 inParam1: isize,
3173 inParam2: isize,
3174 ) -> ::std::os::raw::c_int,
3175>;
3176#[doc = " The standard main window; pin stripes on XP7, metal frame on XP 6."]
3177pub const xpMainWindowStyle_MainWindow: _bindgen_ty_31 = 0;
3178#[doc = " A translucent dark gray window."]
3179pub const xpMainWindowStyle_Translucent: _bindgen_ty_31 = 1;
3180#[doc = " Main Window Type Values\n\n These type values are used to control the appearance of a main window.\n"]
3181pub type _bindgen_ty_31 = ::std::os::raw::c_int;
3182#[doc = " This property specifies the type of window. Set to one of the main window *\n types above."]
3183pub const xpProperty_MainWindowType: _bindgen_ty_32 = 1100;
3184#[doc = " This property specifies whether the main window has close boxes in its *\n corners."]
3185pub const xpProperty_MainWindowHasCloseBoxes: _bindgen_ty_32 = 1200;
3186#[doc = " Main Window Properties\n"]
3187pub type _bindgen_ty_32 = ::std::os::raw::c_int;
3188#[doc = " This message is sent when the close buttons for your window are pressed."]
3189pub const xpMessage_CloseButtonPushed: _bindgen_ty_33 = 1200;
3190#[doc = " MainWindow Messages\n"]
3191pub type _bindgen_ty_33 = ::std::os::raw::c_int;
3192#[doc = " A panel that sits inside a main window."]
3193pub const xpSubWindowStyle_SubWindow: _bindgen_ty_34 = 0;
3194#[doc = " A screen that sits inside a panel for showing text information."]
3195pub const xpSubWindowStyle_Screen: _bindgen_ty_34 = 2;
3196#[doc = " A list view for scrolling lists."]
3197pub const xpSubWindowStyle_ListView: _bindgen_ty_34 = 3;
3198#[doc = " SubWindow Type Values\n\n These values control the appearance of the subwindow.\n"]
3199pub type _bindgen_ty_34 = ::std::os::raw::c_int;
3200#[doc = " This property specifies the type of window. Set to one of the subwindow *\n types above."]
3201pub const xpProperty_SubWindowType: _bindgen_ty_35 = 1200;
3202#[doc = " SubWindow Properties\n"]
3203pub type _bindgen_ty_35 = ::std::os::raw::c_int;
3204#[doc = " This is a standard push button, like an 'OK' or 'Cancel' button in a dialog*\n box."]
3205pub const xpPushButton: _bindgen_ty_36 = 0;
3206#[doc = " A check box or radio button. Use this and the button behaviors below to *\n get the desired behavior."]
3207pub const xpRadioButton: _bindgen_ty_36 = 1;
3208#[doc = " A window close box."]
3209pub const xpWindowCloseBox: _bindgen_ty_36 = 3;
3210#[doc = " A small down arrow."]
3211pub const xpLittleDownArrow: _bindgen_ty_36 = 5;
3212#[doc = " A small up arrow."]
3213pub const xpLittleUpArrow: _bindgen_ty_36 = 6;
3214#[doc = " Button Types\n\n These define the visual appearance of buttons but not how they respond to\n the mouse.\n"]
3215pub type _bindgen_ty_36 = ::std::os::raw::c_int;
3216#[doc = " Standard push button behavior. The button highlights while the mouse is *\n clicked over it and unhighlights when the mouse is moved outside of it or *\n released. If the mouse is released over the button, the *\n xpMsg_PushButtonPressed message is sent."]
3217pub const xpButtonBehaviorPushButton: _bindgen_ty_37 = 0;
3218#[doc = " Check box behavior. The button immediately toggles its value when the mouse*\n is clicked and sends out a xpMsg_ButtonStateChanged message."]
3219pub const xpButtonBehaviorCheckBox: _bindgen_ty_37 = 1;
3220#[doc = " Radio button behavior. The button immediately sets its state to one and *\n sends out a xpMsg_ButtonStateChanged message if it was not already set to *\n one. You must turn off other radio buttons in a group in your code."]
3221pub const xpButtonBehaviorRadioButton: _bindgen_ty_37 = 2;
3222#[doc = " Button Behavior Values\n\n These define how the button responds to mouse clicks.\n"]
3223pub type _bindgen_ty_37 = ::std::os::raw::c_int;
3224#[doc = " This property sets the visual type of button. Use one of the button types *\n above."]
3225pub const xpProperty_ButtonType: _bindgen_ty_38 = 1300;
3226#[doc = " This property sets the button's behavior. Use one of the button behaviors *\n above."]
3227pub const xpProperty_ButtonBehavior: _bindgen_ty_38 = 1301;
3228#[doc = " This property tells whether a check box or radio button is \"checked\" or *\n not. Not used for push buttons."]
3229pub const xpProperty_ButtonState: _bindgen_ty_38 = 1302;
3230#[doc = " Button Properties\n"]
3231pub type _bindgen_ty_38 = ::std::os::raw::c_int;
3232#[doc = " This message is sent when the user completes a click and release in a *\n button with push button behavior. Parameter one of the message is the *\n widget ID of the button. This message is dispatched up the widget *\n hierarchy."]
3233pub const xpMsg_PushButtonPressed: _bindgen_ty_39 = 1300;
3234#[doc = " This message is sent when a button is clicked that has radio button or *\n check box behavior and its value changes. (Note that if the value changes *\n by setting a property you do not receive this message!) Parameter one is *\n the widget ID of the button, parameter 2 is the new state value, either *\n zero or one. This message is dispatched up the widget hierarchy."]
3235pub const xpMsg_ButtonStateChanged: _bindgen_ty_39 = 1301;
3236#[doc = " Button Messages\n\n These messages are sent by the button to itself and then up the widget\n chain when the button is clicked. (You may intercept them by providing a\n widget handler for the button itself or by providing a handler in a parent\n widget.)\n"]
3237pub type _bindgen_ty_39 = ::std::os::raw::c_int;
3238#[doc = " A field for text entry."]
3239pub const xpTextEntryField: _bindgen_ty_40 = 0;
3240#[doc = " A transparent text field. The user can type and the text is drawn, but no *\n background is drawn. You can draw your own background by adding a widget *\n handler and prehandling the draw message."]
3241pub const xpTextTransparent: _bindgen_ty_40 = 3;
3242#[doc = " A translucent edit field, dark gray."]
3243pub const xpTextTranslucent: _bindgen_ty_40 = 4;
3244#[doc = " Text Field Type Values\n\n These control the look of the text field.\n"]
3245pub type _bindgen_ty_40 = ::std::os::raw::c_int;
3246#[doc = " This is the character position the selection starts at, zero based. If it *\n is the same as the end insertion point, the insertion point is not a *\n selection."]
3247pub const xpProperty_EditFieldSelStart: _bindgen_ty_41 = 1400;
3248#[doc = " This is the character position of the end of the selection."]
3249pub const xpProperty_EditFieldSelEnd: _bindgen_ty_41 = 1401;
3250#[doc = " This is the character position a drag was started at if the user is *\n dragging to select text, or -1 if a drag is not in progress."]
3251pub const xpProperty_EditFieldSelDragStart: _bindgen_ty_41 = 1402;
3252#[doc = " This is the type of text field to display, from the above list."]
3253pub const xpProperty_TextFieldType: _bindgen_ty_41 = 1403;
3254#[doc = " Set this property to 1 to password protect the field. Characters will be *\n drawn as *s even though the descriptor will contain plain-text."]
3255pub const xpProperty_PasswordMode: _bindgen_ty_41 = 1404;
3256#[doc = " The max number of characters you can enter, if limited. Zero means *\n unlimited."]
3257pub const xpProperty_MaxCharacters: _bindgen_ty_41 = 1405;
3258#[doc = " The first visible character on the left. This effectively scrolls the text*\n field."]
3259pub const xpProperty_ScrollPosition: _bindgen_ty_41 = 1406;
3260#[doc = " The font to draw the field's text with. (An XPLMFontID.)"]
3261pub const xpProperty_Font: _bindgen_ty_41 = 1407;
3262#[doc = " This is the active side of the insert selection. (Internal)"]
3263pub const xpProperty_ActiveEditSide: _bindgen_ty_41 = 1408;
3264#[doc = " Text Field Properties\n"]
3265pub type _bindgen_ty_41 = ::std::os::raw::c_int;
3266#[doc = " The text field sends this message to itself when its text changes. It sends*\n the message up the call chain; param1 is the text field's widget ID."]
3267pub const xpMsg_TextFieldChanged: _bindgen_ty_42 = 1400;
3268#[doc = " Text Field Messages\n"]
3269pub type _bindgen_ty_42 = ::std::os::raw::c_int;
3270#[doc = " A standard X-Plane scroll bar (with arrows on the ends)."]
3271pub const xpScrollBarTypeScrollBar: _bindgen_ty_43 = 0;
3272#[doc = " A slider, no arrows."]
3273pub const xpScrollBarTypeSlider: _bindgen_ty_43 = 1;
3274#[doc = " Scroll Bar Type Values\n\n This defines how the scroll bar looks.\n"]
3275pub type _bindgen_ty_43 = ::std::os::raw::c_int;
3276#[doc = " The current position of the thumb (in between the min and max, inclusive)"]
3277pub const xpProperty_ScrollBarSliderPosition: _bindgen_ty_44 = 1500;
3278#[doc = " The value the scroll bar has when the thumb is in the lowest position."]
3279pub const xpProperty_ScrollBarMin: _bindgen_ty_44 = 1501;
3280#[doc = " The value the scroll bar has when the thumb is in the highest position."]
3281pub const xpProperty_ScrollBarMax: _bindgen_ty_44 = 1502;
3282#[doc = " How many units to move the scroll bar when clicking next to the thumb. The *\n scroll bar always moves one unit when the arrows are clicked."]
3283pub const xpProperty_ScrollBarPageAmount: _bindgen_ty_44 = 1503;
3284#[doc = " The type of scrollbar from the enums above."]
3285pub const xpProperty_ScrollBarType: _bindgen_ty_44 = 1504;
3286#[doc = " Used internally."]
3287pub const xpProperty_ScrollBarSlop: _bindgen_ty_44 = 1505;
3288#[doc = " Scroll Bar Properties\n"]
3289pub type _bindgen_ty_44 = ::std::os::raw::c_int;
3290#[doc = " The scroll bar sends this message when the slider position changes. It *\n sends the message up the call chain; param1 is the scroll bar widget ID."]
3291pub const xpMsg_ScrollBarSliderPositionChanged: _bindgen_ty_45 = 1500;
3292#[doc = " Scroll Bar Messages\n"]
3293pub type _bindgen_ty_45 = ::std::os::raw::c_int;
3294#[doc = " This property specifies whether the caption is lit; use lit captions *\n against screens."]
3295pub const xpProperty_CaptionLit: _bindgen_ty_46 = 1600;
3296#[doc = " Caption Properties\n"]
3297pub type _bindgen_ty_46 = ::std::os::raw::c_int;
3298pub const xpShip: _bindgen_ty_47 = 4;
3299pub const xpILSGlideScope: _bindgen_ty_47 = 5;
3300pub const xpMarkerLeft: _bindgen_ty_47 = 6;
3301pub const xp_Airport: _bindgen_ty_47 = 7;
3302pub const xpNDB: _bindgen_ty_47 = 8;
3303pub const xpVOR: _bindgen_ty_47 = 9;
3304pub const xpRadioTower: _bindgen_ty_47 = 10;
3305pub const xpAircraftCarrier: _bindgen_ty_47 = 11;
3306pub const xpFire: _bindgen_ty_47 = 12;
3307pub const xpMarkerRight: _bindgen_ty_47 = 13;
3308pub const xpCustomObject: _bindgen_ty_47 = 14;
3309pub const xpCoolingTower: _bindgen_ty_47 = 15;
3310pub const xpSmokeStack: _bindgen_ty_47 = 16;
3311pub const xpBuilding: _bindgen_ty_47 = 17;
3312pub const xpPowerLine: _bindgen_ty_47 = 18;
3313pub const xpVORWithCompassRose: _bindgen_ty_47 = 19;
3314pub const xpOilPlatform: _bindgen_ty_47 = 21;
3315pub const xpOilPlatformSmall: _bindgen_ty_47 = 22;
3316pub const xpWayPoint: _bindgen_ty_47 = 23;
3317#[doc = " General Graphics Types Values\n\n These define the icon for the general graphics.\n"]
3318pub type _bindgen_ty_47 = ::std::os::raw::c_int;
3319#[doc = " This property controls the type of icon that is drawn."]
3320pub const xpProperty_GeneralGraphicsType: _bindgen_ty_48 = 1700;
3321#[doc = " General Graphics Properties\n"]
3322pub type _bindgen_ty_48 = ::std::os::raw::c_int;
3323#[doc = " This is the current value of the progress indicator."]
3324pub const xpProperty_ProgressPosition: _bindgen_ty_49 = 1800;
3325#[doc = " This is the minimum value, equivalent to 0% filled."]
3326pub const xpProperty_ProgressMin: _bindgen_ty_49 = 1801;
3327#[doc = " This is the maximum value, equivalent to 100% filled."]
3328pub const xpProperty_ProgressMax: _bindgen_ty_49 = 1802;
3329#[doc = " Progress Indicator Properties\n"]
3330pub type _bindgen_ty_49 = ::std::os::raw::c_int;
3331#[doc = " An LCD screen that shows help."]
3332pub const xpWindow_Help: _bindgen_ty_50 = 0;
3333#[doc = " A dialog box window."]
3334pub const xpWindow_MainWindow: _bindgen_ty_50 = 1;
3335#[doc = " A panel or frame within a dialog box window."]
3336pub const xpWindow_SubWindow: _bindgen_ty_50 = 2;
3337#[doc = " An LCD screen within a panel to hold text displays."]
3338pub const xpWindow_Screen: _bindgen_ty_50 = 4;
3339#[doc = " A list view within a panel for scrolling file names, etc."]
3340pub const xpWindow_ListView: _bindgen_ty_50 = 5;
3341#[doc = " XPWindowStyle\n\n There are a few built-in window styles in X-Plane that you can use.\n\n Note that X-Plane 6 does not offer real shadow-compositing; you must make\n sure to put a window on top of another window of the right style to make\n the shadows work, etc. This applies to elements with insets and shadows.\n The rules are:\n\n Sub windows must go on top of main windows, and screens and list views on\n top of subwindows. Only help and main windows can be over the main screen.\n\n With X-Plane 7 any window or element may be placed over any other element.\n\n Some windows are scaled by stretching, some by repeating. The drawing\n routines know which scaling method to use. The list view cannot be rescaled\n in X-Plane 6 because it has both a repeating pattern and a gradient in one\n element. All other elements can be rescaled.\n"]
3342pub type _bindgen_ty_50 = ::std::os::raw::c_int;
3343pub type XPWindowStyle = ::std::os::raw::c_int;
3344unsafe extern "C" {
3345 #[doc = " XPDrawWindow\n\n This routine draws a window of the given dimensions at the given offset on\n the virtual screen in a given style. The window is automatically scaled as\n appropriate using a bitmap scaling technique (scaling or repeating) as\n appropriate to the style.\n"]
3346 pub fn XPDrawWindow(
3347 inX1: ::std::os::raw::c_int,
3348 inY1: ::std::os::raw::c_int,
3349 inX2: ::std::os::raw::c_int,
3350 inY2: ::std::os::raw::c_int,
3351 inStyle: XPWindowStyle,
3352 );
3353}
3354unsafe extern "C" {
3355 #[doc = " XPGetWindowDefaultDimensions\n\n This routine returns the default dimensions for a window. Output is either\n a minimum or fixed value depending on whether the window is scalable.\n"]
3356 pub fn XPGetWindowDefaultDimensions(
3357 inStyle: XPWindowStyle,
3358 outWidth: *mut ::std::os::raw::c_int,
3359 outHeight: *mut ::std::os::raw::c_int,
3360 );
3361}
3362#[doc = " x metal"]
3363pub const xpElement_TextField: _bindgen_ty_51 = 6;
3364#[doc = " none metal"]
3365pub const xpElement_CheckBox: _bindgen_ty_51 = 9;
3366#[doc = " none metal"]
3367pub const xpElement_CheckBoxLit: _bindgen_ty_51 = 10;
3368#[doc = " none window header"]
3369pub const xpElement_WindowCloseBox: _bindgen_ty_51 = 14;
3370#[doc = " none window header"]
3371pub const xpElement_WindowCloseBoxPressed: _bindgen_ty_51 = 15;
3372#[doc = " x metal"]
3373pub const xpElement_PushButton: _bindgen_ty_51 = 16;
3374#[doc = " x metal"]
3375pub const xpElement_PushButtonLit: _bindgen_ty_51 = 17;
3376#[doc = " none any"]
3377pub const xpElement_OilPlatform: _bindgen_ty_51 = 24;
3378#[doc = " none any"]
3379pub const xpElement_OilPlatformSmall: _bindgen_ty_51 = 25;
3380#[doc = " none any"]
3381pub const xpElement_Ship: _bindgen_ty_51 = 26;
3382#[doc = " none any"]
3383pub const xpElement_ILSGlideScope: _bindgen_ty_51 = 27;
3384#[doc = " none any"]
3385pub const xpElement_MarkerLeft: _bindgen_ty_51 = 28;
3386#[doc = " none any"]
3387pub const xpElement_Airport: _bindgen_ty_51 = 29;
3388#[doc = " none any"]
3389pub const xpElement_Waypoint: _bindgen_ty_51 = 30;
3390#[doc = " none any"]
3391pub const xpElement_NDB: _bindgen_ty_51 = 31;
3392#[doc = " none any"]
3393pub const xpElement_VOR: _bindgen_ty_51 = 32;
3394#[doc = " none any"]
3395pub const xpElement_RadioTower: _bindgen_ty_51 = 33;
3396#[doc = " none any"]
3397pub const xpElement_AircraftCarrier: _bindgen_ty_51 = 34;
3398#[doc = " none any"]
3399pub const xpElement_Fire: _bindgen_ty_51 = 35;
3400#[doc = " none any"]
3401pub const xpElement_MarkerRight: _bindgen_ty_51 = 36;
3402#[doc = " none any"]
3403pub const xpElement_CustomObject: _bindgen_ty_51 = 37;
3404#[doc = " none any"]
3405pub const xpElement_CoolingTower: _bindgen_ty_51 = 38;
3406#[doc = " none any"]
3407pub const xpElement_SmokeStack: _bindgen_ty_51 = 39;
3408#[doc = " none any"]
3409pub const xpElement_Building: _bindgen_ty_51 = 40;
3410#[doc = " none any"]
3411pub const xpElement_PowerLine: _bindgen_ty_51 = 41;
3412#[doc = " none metal"]
3413pub const xpElement_CopyButtons: _bindgen_ty_51 = 45;
3414#[doc = " none metal"]
3415pub const xpElement_CopyButtonsWithEditingGrid: _bindgen_ty_51 = 46;
3416#[doc = " x, y metal"]
3417pub const xpElement_EditingGrid: _bindgen_ty_51 = 47;
3418#[doc = " THIS CAN PROBABLY BE REMOVED"]
3419pub const xpElement_ScrollBar: _bindgen_ty_51 = 48;
3420#[doc = " none any"]
3421pub const xpElement_VORWithCompassRose: _bindgen_ty_51 = 49;
3422#[doc = " none metal"]
3423pub const xpElement_Zoomer: _bindgen_ty_51 = 51;
3424#[doc = " x, y metal"]
3425pub const xpElement_TextFieldMiddle: _bindgen_ty_51 = 52;
3426#[doc = " none metal"]
3427pub const xpElement_LittleDownArrow: _bindgen_ty_51 = 53;
3428#[doc = " none metal"]
3429pub const xpElement_LittleUpArrow: _bindgen_ty_51 = 54;
3430#[doc = " none metal"]
3431pub const xpElement_WindowDragBar: _bindgen_ty_51 = 61;
3432#[doc = " none metal"]
3433pub const xpElement_WindowDragBarSmooth: _bindgen_ty_51 = 62;
3434#[doc = " XPElementStyle\n\n Elements are individually drawable UI things like push buttons, etc. The\n style defines what kind of element you are drawing. Elements can be\n stretched in one or two dimensions (depending on the element). Some\n elements can be lit.\n\n In X-Plane 6 some elements must be drawn over metal. Some are scalable and\n some are not. Any element can be drawn anywhere in X-Plane 7.\n\n Scalable Axis Required Background\n"]
3435pub type _bindgen_ty_51 = ::std::os::raw::c_int;
3436pub type XPElementStyle = ::std::os::raw::c_int;
3437unsafe extern "C" {
3438 #[doc = " XPDrawElement\n\n XPDrawElement draws a given element at an offset on the virtual screen in\n set dimensions. Even if the element is not scalable, it will be scaled if\n the width and height do not match the preferred dimensions; it'll just look\n ugly. Pass inLit to see the lit version of the element; if the element\n cannot be lit this is ignored.\n"]
3439 pub fn XPDrawElement(
3440 inX1: ::std::os::raw::c_int,
3441 inY1: ::std::os::raw::c_int,
3442 inX2: ::std::os::raw::c_int,
3443 inY2: ::std::os::raw::c_int,
3444 inStyle: XPElementStyle,
3445 inLit: ::std::os::raw::c_int,
3446 );
3447}
3448unsafe extern "C" {
3449 #[doc = " XPGetElementDefaultDimensions\n\n This routine returns the recommended or minimum dimensions of a given UI\n element. outCanBeLit tells whether the element has both a lit and unlit\n state. Pass NULL to not receive any of these parameters.\n"]
3450 pub fn XPGetElementDefaultDimensions(
3451 inStyle: XPElementStyle,
3452 outWidth: *mut ::std::os::raw::c_int,
3453 outHeight: *mut ::std::os::raw::c_int,
3454 outCanBeLit: *mut ::std::os::raw::c_int,
3455 );
3456}
3457#[doc = " not over metal can be lit can be rotated"]
3458pub const xpTrack_ScrollBar: _bindgen_ty_52 = 0;
3459#[doc = " over metal can be lit can be rotated"]
3460pub const xpTrack_Slider: _bindgen_ty_52 = 1;
3461#[doc = " over metal cannot be lit cannot be rotated"]
3462pub const xpTrack_Progress: _bindgen_ty_52 = 2;
3463#[doc = " XPTrackStyle\n\n A track is a UI element that displays a value vertically or horizontally.\n X-Plane has three kinds of tracks: scroll bars, sliders, and progress bars.\n Tracks can be displayed either horizontally or vertically; tracks will\n choose their own layout based on the larger dimension of their dimensions\n (e.g. they know if they are tall or wide). Sliders may be lit or unlit\n (showing the user manipulating them).\n\n - ScrollBar: this is a standard scroll bar with arrows and a thumb to drag.\n - Slider: this is a simple track with a ball in the middle that can be\n slid.\n - Progress: this is a progress indicator showing how a long task is going.\n"]
3464pub type _bindgen_ty_52 = ::std::os::raw::c_int;
3465pub type XPTrackStyle = ::std::os::raw::c_int;
3466unsafe extern "C" {
3467 #[doc = " XPDrawTrack\n\n This routine draws a track. You pass in the track dimensions and size; the\n track picks the optimal orientation for these dimensions. Pass in the\n track's minimum current and maximum values; the indicator will be\n positioned appropriately. You can also specify whether the track is lit or\n not.\n"]
3468 pub fn XPDrawTrack(
3469 inX1: ::std::os::raw::c_int,
3470 inY1: ::std::os::raw::c_int,
3471 inX2: ::std::os::raw::c_int,
3472 inY2: ::std::os::raw::c_int,
3473 inMin: ::std::os::raw::c_int,
3474 inMax: ::std::os::raw::c_int,
3475 inValue: ::std::os::raw::c_int,
3476 inTrackStyle: XPTrackStyle,
3477 inLit: ::std::os::raw::c_int,
3478 );
3479}
3480unsafe extern "C" {
3481 #[doc = " XPGetTrackDefaultDimensions\n\n This routine returns a track's default smaller dimension; all tracks are\n scalable in the larger dimension. It also returns whether a track can be\n lit.\n"]
3482 pub fn XPGetTrackDefaultDimensions(
3483 inStyle: XPTrackStyle,
3484 outWidth: *mut ::std::os::raw::c_int,
3485 outCanBeLit: *mut ::std::os::raw::c_int,
3486 );
3487}
3488unsafe extern "C" {
3489 #[doc = " XPGetTrackMetrics\n\n This routine returns the metrics of a track. If you want to write UI code\n to manipulate a track, this routine helps you know where the mouse\n locations are. For most other elements, the rectangle the element is drawn\n in is enough information. However, the scrollbar drawing routine does some\n automatic placement; this routine lets you know where things ended up. You\n pass almost everything you would pass to the draw routine. You get out the\n orientation, and other useful stuff.\n\n Besides orientation, you get five dimensions for the five parts of a\n scrollbar, which are the down button, down area (area before the thumb),\n the thumb, and the up area and button. For horizontal scrollers, the left\n button decreases; for vertical scrollers, the top button decreases.\n"]
3490 pub fn XPGetTrackMetrics(
3491 inX1: ::std::os::raw::c_int,
3492 inY1: ::std::os::raw::c_int,
3493 inX2: ::std::os::raw::c_int,
3494 inY2: ::std::os::raw::c_int,
3495 inMin: ::std::os::raw::c_int,
3496 inMax: ::std::os::raw::c_int,
3497 inValue: ::std::os::raw::c_int,
3498 inTrackStyle: XPTrackStyle,
3499 outIsVertical: *mut ::std::os::raw::c_int,
3500 outDownBtnSize: *mut ::std::os::raw::c_int,
3501 outDownPageSize: *mut ::std::os::raw::c_int,
3502 outThumbSize: *mut ::std::os::raw::c_int,
3503 outUpPageSize: *mut ::std::os::raw::c_int,
3504 outUpBtnSize: *mut ::std::os::raw::c_int,
3505 );
3506}
3507unsafe extern "C" {
3508 #[doc = " XPCreateWidget\n\n This function creates a new widget and returns the new widget's ID to you.\n If the widget creation fails for some reason, it returns NULL. Widget\n creation will fail either if you pass a bad class ID or if there is not\n adequate memory.\n\n Input Parameters:\n\n - Top, left, bottom, and right in global screen coordinates defining the\n widget's location on the screen.\n - inVisible is 1 if the widget should be drawn, 0 to start the widget as\n hidden.\n - inDescriptor is a null terminated string that will become the widget's\n descriptor.\n - inIsRoot is 1 if this is going to be a root widget, 0 if it will not be.\n - inContainer is the ID of this widget's container. It must be 0 for a root\n widget. For a non-root widget, pass the widget ID of the widget to place\n this widget within. If this widget is not going to start inside another\n widget, pass 0; this new widget will be created but will not be drawn\n until it is placed inside another widget.\n - inClass is the class of the widget to draw. Use one of the predefined\n class-IDs to create a standard widget.\n\n A note on widget embedding: a widget is only called (and will be drawn,\n etc.) if it is placed within a widget that will be called. Root widgets are\n always called. So it is possible to have whole chains of widgets that are\n simply not called. You can preconstruct widget trees and then place them\n into root widgets later to activate them if you wish.\n"]
3509 pub fn XPCreateWidget(
3510 inLeft: ::std::os::raw::c_int,
3511 inTop: ::std::os::raw::c_int,
3512 inRight: ::std::os::raw::c_int,
3513 inBottom: ::std::os::raw::c_int,
3514 inVisible: ::std::os::raw::c_int,
3515 inDescriptor: *const ::std::os::raw::c_char,
3516 inIsRoot: ::std::os::raw::c_int,
3517 inContainer: XPWidgetID,
3518 inClass: XPWidgetClass,
3519 ) -> XPWidgetID;
3520}
3521unsafe extern "C" {
3522 #[doc = " XPCreateCustomWidget\n\n This function is the same as XPCreateWidget except that instead of passing\n a class ID, you pass your widget callback function pointer defining the\n widget. Use this function to define a custom widget. All parameters are the\n same as XPCreateWidget, except that the widget class has been replaced with\n the widget function.\n"]
3523 pub fn XPCreateCustomWidget(
3524 inLeft: ::std::os::raw::c_int,
3525 inTop: ::std::os::raw::c_int,
3526 inRight: ::std::os::raw::c_int,
3527 inBottom: ::std::os::raw::c_int,
3528 inVisible: ::std::os::raw::c_int,
3529 inDescriptor: *const ::std::os::raw::c_char,
3530 inIsRoot: ::std::os::raw::c_int,
3531 inContainer: XPWidgetID,
3532 inCallback: XPWidgetFunc_t,
3533 ) -> XPWidgetID;
3534}
3535unsafe extern "C" {
3536 #[doc = " XPDestroyWidget\n\n This class destroys a widget. Pass in the ID of the widget to kill. If you\n pass 1 for inDestroyChilren, the widget's children will be destroyed first,\n then this widget will be destroyed. (Furthermore, the widget's children\n will be destroyed with the inDestroyChildren flag set to 1, so the\n destruction will recurse down the widget tree.) If you pass 0 for this\n flag, direct child widgets will simply end up with their parent set to 0.\n"]
3537 pub fn XPDestroyWidget(inWidget: XPWidgetID, inDestroyChildren: ::std::os::raw::c_int);
3538}
3539unsafe extern "C" {
3540 #[doc = " XPSendMessageToWidget\n\n This sends any message to a widget. You should probably not go around\n simulating the predefined messages that the widgets library defines for\n you. You may however define custom messages for your widgets and send them\n with this method.\n\n This method supports several dispatching patterns; see XPDispatchMode for\n more info. The function returns 1 if the message was handled, 0 if it was\n not.\n\n For each widget that receives the message (see the dispatching modes), each\n widget function from the most recently installed to the oldest one receives\n the message in order until it is handled.\n"]
3541 pub fn XPSendMessageToWidget(
3542 inWidget: XPWidgetID,
3543 inMessage: XPWidgetMessage,
3544 inMode: XPDispatchMode,
3545 inParam1: isize,
3546 inParam2: isize,
3547 ) -> ::std::os::raw::c_int;
3548}
3549unsafe extern "C" {
3550 #[doc = " XPPlaceWidgetWithin\n\n This function changes which container a widget resides in. You may NOT use\n this function on a root widget! inSubWidget is the widget that will be\n moved. Pass a widget ID in inContainer to make inSubWidget be a child of\n inContainer. It will become the last/closest widget in the container. Pass\n 0 to remove the widget from any container. Any call to this other than\n passing the widget ID of the old parent of the affected widget will cause\n the widget to be removed from its old parent. Placing a widget within its\n own parent simply makes it the last widget.\n\n NOTE: this routine does not reposition the sub widget in global\n coordinates. If the container has layout management code, it will\n reposition the subwidget for you, otherwise you must do it with\n SetWidgetGeometry.\n"]
3551 pub fn XPPlaceWidgetWithin(inSubWidget: XPWidgetID, inContainer: XPWidgetID);
3552}
3553unsafe extern "C" {
3554 #[doc = " XPCountChildWidgets\n\n This routine returns the number of widgets another widget contains.\n"]
3555 pub fn XPCountChildWidgets(inWidget: XPWidgetID) -> ::std::os::raw::c_int;
3556}
3557unsafe extern "C" {
3558 #[doc = " XPGetNthChildWidget\n\n This routine returns the widget ID of a child widget by index. Indexes are\n 0 based, from 0 to the number of widgets in the parentone minus one,\n inclusive. If the index is invalid, 0 is returned.\n"]
3559 pub fn XPGetNthChildWidget(inWidget: XPWidgetID, inIndex: ::std::os::raw::c_int) -> XPWidgetID;
3560}
3561unsafe extern "C" {
3562 #[doc = " XPGetParentWidget\n\n Returns the parent of a widget, or 0 if the widget has no parent. Root\n widgets never have parents and therefore always return 0.\n"]
3563 pub fn XPGetParentWidget(inWidget: XPWidgetID) -> XPWidgetID;
3564}
3565unsafe extern "C" {
3566 #[doc = " XPShowWidget\n\n This routine makes a widget visible if it is not already. Note that if a\n widget is not in a rooted widget hierarchy or one of its parents is not\n visible, it will still not be visible to the user.\n"]
3567 pub fn XPShowWidget(inWidget: XPWidgetID);
3568}
3569unsafe extern "C" {
3570 #[doc = " XPHideWidget\n\n Makes a widget invisible. See XPShowWidget for considerations of when a\n widget might not be visible despite its own visibility state.\n"]
3571 pub fn XPHideWidget(inWidget: XPWidgetID);
3572}
3573unsafe extern "C" {
3574 #[doc = " XPIsWidgetVisible\n\n This returns 1 if a widget is visible, 0 if it is not. Note that this\n routine takes into consideration whether a parent is invisible. Use this\n routine to tell if the user can see the widget.\n"]
3575 pub fn XPIsWidgetVisible(inWidget: XPWidgetID) -> ::std::os::raw::c_int;
3576}
3577unsafe extern "C" {
3578 #[doc = " XPFindRootWidget\n\n Returns the Widget ID of the root widget that contains the passed in widget\n or NULL if the passed in widget is not in a rooted hierarchy.\n"]
3579 pub fn XPFindRootWidget(inWidget: XPWidgetID) -> XPWidgetID;
3580}
3581unsafe extern "C" {
3582 #[doc = " XPBringRootWidgetToFront\n\n This routine makes the specified widget be in the frontmost widget\n hierarchy. If this widget is a root widget, its widget hierarchy comes to\n front, otherwise the widget's root is brought to the front. If this widget\n is not in an active widget hiearchy (e.g. there is no root widget at the\n top of the tree), this routine does nothing.\n"]
3583 pub fn XPBringRootWidgetToFront(inWidget: XPWidgetID);
3584}
3585unsafe extern "C" {
3586 #[doc = " XPIsWidgetInFront\n\n This routine returns true if this widget's hierarchy is the frontmost\n hierarchy. It returns false if the widget's hierarchy is not in front, or\n if the widget is not in a rooted hierarchy.\n"]
3587 pub fn XPIsWidgetInFront(inWidget: XPWidgetID) -> ::std::os::raw::c_int;
3588}
3589unsafe extern "C" {
3590 #[doc = " XPGetWidgetGeometry\n\n This routine returns the bounding box of a widget in global coordinates.\n Pass NULL for any parameter you are not interested in.\n"]
3591 pub fn XPGetWidgetGeometry(
3592 inWidget: XPWidgetID,
3593 outLeft: *mut ::std::os::raw::c_int,
3594 outTop: *mut ::std::os::raw::c_int,
3595 outRight: *mut ::std::os::raw::c_int,
3596 outBottom: *mut ::std::os::raw::c_int,
3597 );
3598}
3599unsafe extern "C" {
3600 #[doc = " XPSetWidgetGeometry\n\n This function changes the bounding box of a widget.\n"]
3601 pub fn XPSetWidgetGeometry(
3602 inWidget: XPWidgetID,
3603 inLeft: ::std::os::raw::c_int,
3604 inTop: ::std::os::raw::c_int,
3605 inRight: ::std::os::raw::c_int,
3606 inBottom: ::std::os::raw::c_int,
3607 );
3608}
3609unsafe extern "C" {
3610 #[doc = " XPGetWidgetForLocation\n\n Given a widget and a location, this routine returns the widget ID of the\n child of that widget that owns that location. If inRecursive is true then\n this will return a child of a child of a widget as it tries to find the\n deepest widget at that location. If inVisibleOnly is true, then only\n visible widgets are considered, otherwise all widgets are considered. The\n widget ID passed for inContainer will be returned if the location is in\n that widget but not in a child widget. 0 is returned if the location is not\n in the container.\n\n NOTE: if a widget's geometry extends outside its parents geometry, it will\n not be returned by this call for mouse locations outside the parent\n geometry. The parent geometry limits the child's eligibility for mouse\n location.\n"]
3611 pub fn XPGetWidgetForLocation(
3612 inContainer: XPWidgetID,
3613 inXOffset: ::std::os::raw::c_int,
3614 inYOffset: ::std::os::raw::c_int,
3615 inRecursive: ::std::os::raw::c_int,
3616 inVisibleOnly: ::std::os::raw::c_int,
3617 ) -> XPWidgetID;
3618}
3619unsafe extern "C" {
3620 #[doc = " XPGetWidgetExposedGeometry\n\n This routine returns the bounds of the area of a widget that is completely\n within its parent widgets. Since a widget's bounding box can be outside its\n parent, part of its area will not be eligible for mouse clicks and should\n not draw. Use XPGetWidgetGeometry to find out what area defines your\n widget's shape, but use this routine to find out what area to actually draw\n into. Note that the widget library does not use OpenGL clipping to keep\n frame rates up, although you could use it internally.\n"]
3621 pub fn XPGetWidgetExposedGeometry(
3622 inWidgetID: XPWidgetID,
3623 outLeft: *mut ::std::os::raw::c_int,
3624 outTop: *mut ::std::os::raw::c_int,
3625 outRight: *mut ::std::os::raw::c_int,
3626 outBottom: *mut ::std::os::raw::c_int,
3627 );
3628}
3629unsafe extern "C" {
3630 #[doc = " XPSetWidgetDescriptor\n\n Every widget has a descriptor, which is a text string. What the text string\n is used for varies from widget to widget; for example, a push button's text\n is its descriptor, a caption shows its descriptor, and a text field's\n descriptor is the text being edited. In other words, the usage for the text\n varies from widget to widget, but this API provides a universal and\n convenient way to get at it. While not all UI widgets need their\n descriptor, many do.\n"]
3631 pub fn XPSetWidgetDescriptor(inWidget: XPWidgetID, inDescriptor: *const ::std::os::raw::c_char);
3632}
3633unsafe extern "C" {
3634 #[doc = " XPGetWidgetDescriptor\n\n This routine returns the widget's descriptor. Pass in the length of the\n buffer you are going to receive the descriptor in. The descriptor will be\n null terminated for you. This routine returns the length of the actual\n descriptor; if you pass NULL for outDescriptor, you can get the\n descriptor's length without getting its text. If the length of the\n descriptor exceeds your buffer length, the buffer will not be null\n terminated (this routine has 'strncpy' semantics).\n"]
3635 pub fn XPGetWidgetDescriptor(
3636 inWidget: XPWidgetID,
3637 outDescriptor: *mut ::std::os::raw::c_char,
3638 inMaxDescLength: ::std::os::raw::c_int,
3639 ) -> ::std::os::raw::c_int;
3640}
3641unsafe extern "C" {
3642 #[doc = " XPGetWidgetUnderlyingWindow\n\n Returns the window (from the XPLMDisplay API) that backs your widget\n window. If you have opted in to modern windows, via a call to\n XPLMEnableFeature(\"XPLM_USE_NATIVE_WIDGET_WINDOWS\", 1), you can use the\n returned window ID for display APIs like XPLMSetWindowPositioningMode(),\n allowing you to pop the widget window out into a real OS window, or move it\n into VR.\n"]
3643 pub fn XPGetWidgetUnderlyingWindow(inWidget: XPWidgetID) -> XPLMWindowID;
3644}
3645unsafe extern "C" {
3646 #[doc = " XPSetWidgetProperty\n\n This function sets a widget's property. Properties are arbitrary values\n associated by a widget by ID.\n"]
3647 pub fn XPSetWidgetProperty(
3648 inWidget: XPWidgetID,
3649 inProperty: XPWidgetPropertyID,
3650 inValue: isize,
3651 );
3652}
3653unsafe extern "C" {
3654 #[doc = " XPGetWidgetProperty\n\n This routine returns the value of a widget's property, or 0 if the property\n is not defined. If you need to know whether the property is defined, pass a\n pointer to an int for inExists; the existence of that property will be\n returned in the int. Pass NULL for inExists if you do not need this\n information.\n"]
3655 pub fn XPGetWidgetProperty(
3656 inWidget: XPWidgetID,
3657 inProperty: XPWidgetPropertyID,
3658 inExists: *mut ::std::os::raw::c_int,
3659 ) -> isize;
3660}
3661unsafe extern "C" {
3662 #[doc = " XPSetKeyboardFocus\n\n Controls which widget will receive keystrokes. Pass the widget ID of the\n widget to get the keys. Note that if the widget does not care about\n keystrokes, they will go to the parent widget, and if no widget cares about\n them, they go to X-Plane.\n\n If you set the keyboard focus to widget ID 0, X-Plane gets keyboard focus.\n\n This routine returns the widget ID that ended up with keyboard focus, or 0\n for X-Plane.\n\n Keyboard focus is not changed if the new widget will not accept it. For\n setting to X-Plane, keyboard focus is always accepted.\n"]
3663 pub fn XPSetKeyboardFocus(inWidget: XPWidgetID) -> XPWidgetID;
3664}
3665unsafe extern "C" {
3666 #[doc = " XPLoseKeyboardFocus\n\n This causes the specified widget to lose focus; focus is passed to its\n parent, or the next parent that will accept it. This routine does nothing\n if this widget does not have focus.\n"]
3667 pub fn XPLoseKeyboardFocus(inWidget: XPWidgetID);
3668}
3669unsafe extern "C" {
3670 #[doc = " XPGetWidgetWithFocus\n\n This routine returns the widget that has keyboard focus, or 0 if X-Plane\n has keyboard focus or some other plugin window that does not have widgets\n has focus.\n"]
3671 pub fn XPGetWidgetWithFocus() -> XPWidgetID;
3672}
3673unsafe extern "C" {
3674 #[doc = " XPAddWidgetCallback\n\n This function adds a new widget callback to a widget. This widget callback\n supercedes any existing ones and will receive messages first; if it does\n not handle messages they will go on to be handled by pre-existing widgets.\n\n The widget function will remain on the widget for the life of the widget.\n The creation message will be sent to the new callback immediately with the\n widget ID, and the destruction message will be sent before the other widget\n function receives a destruction message.\n\n This provides a way to 'subclass' an existing widget. By providing a second\n hook that only handles certain widget messages, you can customize or extend\n widget behavior.\n"]
3675 pub fn XPAddWidgetCallback(inWidget: XPWidgetID, inNewCallback: XPWidgetFunc_t);
3676}
3677unsafe extern "C" {
3678 #[doc = " XPGetWidgetClassFunc\n\n Given a widget class, this function returns the callbacks that power that\n widget class.\n"]
3679 pub fn XPGetWidgetClassFunc(inWidgetClass: XPWidgetClass) -> XPWidgetFunc_t;
3680}
3681#[doc = " XPWidgetCreate_t\n\n This structure contains all of the parameters needed to create a widget. It\n is used with XPUCreateWidgets to create widgets in bulk from an array. All\n parameters correspond to those of XPCreateWidget except for the container\n index.\n\n If the container index is equal to the index of a widget in the array, the\n widget in the array passed to XPUCreateWidgets is used as the parent of\n this widget. Note that if you pass an index greater than your own position\n in the array, the parent you are requesting will not exist yet.\n\n If the container index is NO_PARENT, the parent widget is specified as\n NULL. If the container index is PARAM_PARENT, the widget passed into\n XPUCreateWidgets is used.\n"]
3682#[repr(C)]
3683#[derive(Debug, Copy, Clone)]
3684pub struct XPWidgetCreate_t {
3685 pub left: ::std::os::raw::c_int,
3686 pub top: ::std::os::raw::c_int,
3687 pub right: ::std::os::raw::c_int,
3688 pub bottom: ::std::os::raw::c_int,
3689 pub visible: ::std::os::raw::c_int,
3690 pub descriptor: *const ::std::os::raw::c_char,
3691 #[doc = " Whether this widget is a root widget"]
3692 pub isRoot: ::std::os::raw::c_int,
3693 #[doc = " The index of the widget to be contained within, or a constant"]
3694 pub containerIndex: ::std::os::raw::c_int,
3695 pub widgetClass: XPWidgetClass,
3696}
3697#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3698const _: () = {
3699 ["Size of XPWidgetCreate_t"][::std::mem::size_of::<XPWidgetCreate_t>() - 48usize];
3700 ["Alignment of XPWidgetCreate_t"][::std::mem::align_of::<XPWidgetCreate_t>() - 8usize];
3701 ["Offset of field: XPWidgetCreate_t::left"]
3702 [::std::mem::offset_of!(XPWidgetCreate_t, left) - 0usize];
3703 ["Offset of field: XPWidgetCreate_t::top"]
3704 [::std::mem::offset_of!(XPWidgetCreate_t, top) - 4usize];
3705 ["Offset of field: XPWidgetCreate_t::right"]
3706 [::std::mem::offset_of!(XPWidgetCreate_t, right) - 8usize];
3707 ["Offset of field: XPWidgetCreate_t::bottom"]
3708 [::std::mem::offset_of!(XPWidgetCreate_t, bottom) - 12usize];
3709 ["Offset of field: XPWidgetCreate_t::visible"]
3710 [::std::mem::offset_of!(XPWidgetCreate_t, visible) - 16usize];
3711 ["Offset of field: XPWidgetCreate_t::descriptor"]
3712 [::std::mem::offset_of!(XPWidgetCreate_t, descriptor) - 24usize];
3713 ["Offset of field: XPWidgetCreate_t::isRoot"]
3714 [::std::mem::offset_of!(XPWidgetCreate_t, isRoot) - 32usize];
3715 ["Offset of field: XPWidgetCreate_t::containerIndex"]
3716 [::std::mem::offset_of!(XPWidgetCreate_t, containerIndex) - 36usize];
3717 ["Offset of field: XPWidgetCreate_t::widgetClass"]
3718 [::std::mem::offset_of!(XPWidgetCreate_t, widgetClass) - 40usize];
3719};
3720unsafe extern "C" {
3721 #[doc = " XPUCreateWidgets\n\n This function creates a series of widgets from a table (see\n XPCreateWidget_t above). Pass in an array of widget creation structures and\n an array of widget IDs that will receive each widget.\n\n Widget parents are specified by index into the created widget table,\n allowing you to create nested widget structures. You can create multiple\n widget trees in one table. Generally you should create widget trees from\n the top down.\n\n You can also pass in a widget ID that will be used when the widget's parent\n is listed as PARAM_PARENT; this allows you to embed widgets created with\n XPUCreateWidgets in a widget created previously.\n"]
3722 pub fn XPUCreateWidgets(
3723 inWidgetDefs: *const XPWidgetCreate_t,
3724 inCount: ::std::os::raw::c_int,
3725 inParamParent: XPWidgetID,
3726 ioWidgets: *mut XPWidgetID,
3727 );
3728}
3729unsafe extern "C" {
3730 #[doc = " XPUMoveWidgetBy\n\n Simply moves a widget by an amount, +x = right, +y = up, without resizing\n the widget.\n"]
3731 pub fn XPUMoveWidgetBy(
3732 inWidget: XPWidgetID,
3733 inDeltaX: ::std::os::raw::c_int,
3734 inDeltaY: ::std::os::raw::c_int,
3735 );
3736}
3737unsafe extern "C" {
3738 #[doc = " XPUFixedLayout\n\n This function causes the widget to maintain its children in fixed position\n relative to itself as it is resized. Use this on the top level 'window'\n widget for your window.\n"]
3739 pub fn XPUFixedLayout(
3740 inMessage: XPWidgetMessage,
3741 inWidget: XPWidgetID,
3742 inParam1: isize,
3743 inParam2: isize,
3744 ) -> ::std::os::raw::c_int;
3745}
3746unsafe extern "C" {
3747 #[doc = " XPUSelectIfNeeded\n\n This causes the widget to bring its window to the foreground if it is not\n already. inEatClick specifies whether clicks in the background should be\n consumed by bringing the window to the foreground.\n"]
3748 pub fn XPUSelectIfNeeded(
3749 inMessage: XPWidgetMessage,
3750 inWidget: XPWidgetID,
3751 inParam1: isize,
3752 inParam2: isize,
3753 inEatClick: ::std::os::raw::c_int,
3754 ) -> ::std::os::raw::c_int;
3755}
3756unsafe extern "C" {
3757 #[doc = " XPUDefocusKeyboard\n\n This causes the widget to send keyboard focus back to X-Plane. This stops\n editing of any text fields, etc.\n"]
3758 pub fn XPUDefocusKeyboard(
3759 inMessage: XPWidgetMessage,
3760 inWidget: XPWidgetID,
3761 inParam1: isize,
3762 inParam2: isize,
3763 inEatClick: ::std::os::raw::c_int,
3764 ) -> ::std::os::raw::c_int;
3765}
3766unsafe extern "C" {
3767 #[doc = " XPUDragWidget\n\n XPUDragWidget drags the widget in response to mouse clicks. Pass in not\n only the event, but the global coordinates of the drag region, which might\n be a sub-region of your widget (for example, a title bar).\n"]
3768 pub fn XPUDragWidget(
3769 inMessage: XPWidgetMessage,
3770 inWidget: XPWidgetID,
3771 inParam1: isize,
3772 inParam2: isize,
3773 inLeft: ::std::os::raw::c_int,
3774 inTop: ::std::os::raw::c_int,
3775 inRight: ::std::os::raw::c_int,
3776 inBottom: ::std::os::raw::c_int,
3777 ) -> ::std::os::raw::c_int;
3778}