1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
/* automatically generated by rust-bindgen */

pub type Enum_Unnamed1 = ::libc::c_uint;
pub const xplm_key_pause: ::libc::c_uint = 0;
pub const xplm_key_revthrust: ::libc::c_uint = 1;
pub const xplm_key_jettison: ::libc::c_uint = 2;
pub const xplm_key_brakesreg: ::libc::c_uint = 3;
pub const xplm_key_brakesmax: ::libc::c_uint = 4;
pub const xplm_key_gear: ::libc::c_uint = 5;
pub const xplm_key_timedn: ::libc::c_uint = 6;
pub const xplm_key_timeup: ::libc::c_uint = 7;
pub const xplm_key_fadec: ::libc::c_uint = 8;
pub const xplm_key_otto_dis: ::libc::c_uint = 9;
pub const xplm_key_otto_atr: ::libc::c_uint = 10;
pub const xplm_key_otto_asi: ::libc::c_uint = 11;
pub const xplm_key_otto_hdg: ::libc::c_uint = 12;
pub const xplm_key_otto_gps: ::libc::c_uint = 13;
pub const xplm_key_otto_lev: ::libc::c_uint = 14;
pub const xplm_key_otto_hnav: ::libc::c_uint = 15;
pub const xplm_key_otto_alt: ::libc::c_uint = 16;
pub const xplm_key_otto_vvi: ::libc::c_uint = 17;
pub const xplm_key_otto_vnav: ::libc::c_uint = 18;
pub const xplm_key_otto_nav1: ::libc::c_uint = 19;
pub const xplm_key_otto_nav2: ::libc::c_uint = 20;
pub const xplm_key_targ_dn: ::libc::c_uint = 21;
pub const xplm_key_targ_up: ::libc::c_uint = 22;
pub const xplm_key_hdgdn: ::libc::c_uint = 23;
pub const xplm_key_hdgup: ::libc::c_uint = 24;
pub const xplm_key_barodn: ::libc::c_uint = 25;
pub const xplm_key_baroup: ::libc::c_uint = 26;
pub const xplm_key_obs1dn: ::libc::c_uint = 27;
pub const xplm_key_obs1up: ::libc::c_uint = 28;
pub const xplm_key_obs2dn: ::libc::c_uint = 29;
pub const xplm_key_obs2up: ::libc::c_uint = 30;
pub const xplm_key_com1_1: ::libc::c_uint = 31;
pub const xplm_key_com1_2: ::libc::c_uint = 32;
pub const xplm_key_com1_3: ::libc::c_uint = 33;
pub const xplm_key_com1_4: ::libc::c_uint = 34;
pub const xplm_key_nav1_1: ::libc::c_uint = 35;
pub const xplm_key_nav1_2: ::libc::c_uint = 36;
pub const xplm_key_nav1_3: ::libc::c_uint = 37;
pub const xplm_key_nav1_4: ::libc::c_uint = 38;
pub const xplm_key_com2_1: ::libc::c_uint = 39;
pub const xplm_key_com2_2: ::libc::c_uint = 40;
pub const xplm_key_com2_3: ::libc::c_uint = 41;
pub const xplm_key_com2_4: ::libc::c_uint = 42;
pub const xplm_key_nav2_1: ::libc::c_uint = 43;
pub const xplm_key_nav2_2: ::libc::c_uint = 44;
pub const xplm_key_nav2_3: ::libc::c_uint = 45;
pub const xplm_key_nav2_4: ::libc::c_uint = 46;
pub const xplm_key_adf_1: ::libc::c_uint = 47;
pub const xplm_key_adf_2: ::libc::c_uint = 48;
pub const xplm_key_adf_3: ::libc::c_uint = 49;
pub const xplm_key_adf_4: ::libc::c_uint = 50;
pub const xplm_key_adf_5: ::libc::c_uint = 51;
pub const xplm_key_adf_6: ::libc::c_uint = 52;
pub const xplm_key_transpon_1: ::libc::c_uint = 53;
pub const xplm_key_transpon_2: ::libc::c_uint = 54;
pub const xplm_key_transpon_3: ::libc::c_uint = 55;
pub const xplm_key_transpon_4: ::libc::c_uint = 56;
pub const xplm_key_transpon_5: ::libc::c_uint = 57;
pub const xplm_key_transpon_6: ::libc::c_uint = 58;
pub const xplm_key_transpon_7: ::libc::c_uint = 59;
pub const xplm_key_transpon_8: ::libc::c_uint = 60;
pub const xplm_key_flapsup: ::libc::c_uint = 61;
pub const xplm_key_flapsdn: ::libc::c_uint = 62;
pub const xplm_key_cheatoff: ::libc::c_uint = 63;
pub const xplm_key_cheaton: ::libc::c_uint = 64;
pub const xplm_key_sbrkoff: ::libc::c_uint = 65;
pub const xplm_key_sbrkon: ::libc::c_uint = 66;
pub const xplm_key_ailtrimL: ::libc::c_uint = 67;
pub const xplm_key_ailtrimR: ::libc::c_uint = 68;
pub const xplm_key_rudtrimL: ::libc::c_uint = 69;
pub const xplm_key_rudtrimR: ::libc::c_uint = 70;
pub const xplm_key_elvtrimD: ::libc::c_uint = 71;
pub const xplm_key_elvtrimU: ::libc::c_uint = 72;
pub const xplm_key_forward: ::libc::c_uint = 73;
pub const xplm_key_down: ::libc::c_uint = 74;
pub const xplm_key_left: ::libc::c_uint = 75;
pub const xplm_key_right: ::libc::c_uint = 76;
pub const xplm_key_back: ::libc::c_uint = 77;
pub const xplm_key_tower: ::libc::c_uint = 78;
pub const xplm_key_runway: ::libc::c_uint = 79;
pub const xplm_key_chase: ::libc::c_uint = 80;
pub const xplm_key_free1: ::libc::c_uint = 81;
pub const xplm_key_free2: ::libc::c_uint = 82;
pub const xplm_key_spot: ::libc::c_uint = 83;
pub const xplm_key_fullscrn1: ::libc::c_uint = 84;
pub const xplm_key_fullscrn2: ::libc::c_uint = 85;
pub const xplm_key_tanspan: ::libc::c_uint = 86;
pub const xplm_key_smoke: ::libc::c_uint = 87;
pub const xplm_key_map: ::libc::c_uint = 88;
pub const xplm_key_zoomin: ::libc::c_uint = 89;
pub const xplm_key_zoomout: ::libc::c_uint = 90;
pub const xplm_key_cycledump: ::libc::c_uint = 91;
pub const xplm_key_replay: ::libc::c_uint = 92;
pub const xplm_key_tranID: ::libc::c_uint = 93;
pub const xplm_key_max: ::libc::c_uint = 94;
pub type XPLMCommandKeyID = ::libc::c_int;
pub type Enum_Unnamed2 = ::libc::c_uint;
pub const xplm_joy_nothing: ::libc::c_uint = 0;
pub const xplm_joy_start_all: ::libc::c_uint = 1;
pub const xplm_joy_start_0: ::libc::c_uint = 2;
pub const xplm_joy_start_1: ::libc::c_uint = 3;
pub const xplm_joy_start_2: ::libc::c_uint = 4;
pub const xplm_joy_start_3: ::libc::c_uint = 5;
pub const xplm_joy_start_4: ::libc::c_uint = 6;
pub const xplm_joy_start_5: ::libc::c_uint = 7;
pub const xplm_joy_start_6: ::libc::c_uint = 8;
pub const xplm_joy_start_7: ::libc::c_uint = 9;
pub const xplm_joy_throt_up: ::libc::c_uint = 10;
pub const xplm_joy_throt_dn: ::libc::c_uint = 11;
pub const xplm_joy_prop_up: ::libc::c_uint = 12;
pub const xplm_joy_prop_dn: ::libc::c_uint = 13;
pub const xplm_joy_mixt_up: ::libc::c_uint = 14;
pub const xplm_joy_mixt_dn: ::libc::c_uint = 15;
pub const xplm_joy_carb_tog: ::libc::c_uint = 16;
pub const xplm_joy_carb_on: ::libc::c_uint = 17;
pub const xplm_joy_carb_off: ::libc::c_uint = 18;
pub const xplm_joy_trev: ::libc::c_uint = 19;
pub const xplm_joy_trm_up: ::libc::c_uint = 20;
pub const xplm_joy_trm_dn: ::libc::c_uint = 21;
pub const xplm_joy_rot_trm_up: ::libc::c_uint = 22;
pub const xplm_joy_rot_trm_dn: ::libc::c_uint = 23;
pub const xplm_joy_rud_lft: ::libc::c_uint = 24;
pub const xplm_joy_rud_cntr: ::libc::c_uint = 25;
pub const xplm_joy_rud_rgt: ::libc::c_uint = 26;
pub const xplm_joy_ail_lft: ::libc::c_uint = 27;
pub const xplm_joy_ail_cntr: ::libc::c_uint = 28;
pub const xplm_joy_ail_rgt: ::libc::c_uint = 29;
pub const xplm_joy_B_rud_lft: ::libc::c_uint = 30;
pub const xplm_joy_B_rud_rgt: ::libc::c_uint = 31;
pub const xplm_joy_look_up: ::libc::c_uint = 32;
pub const xplm_joy_look_dn: ::libc::c_uint = 33;
pub const xplm_joy_look_lft: ::libc::c_uint = 34;
pub const xplm_joy_look_rgt: ::libc::c_uint = 35;
pub const xplm_joy_glance_l: ::libc::c_uint = 36;
pub const xplm_joy_glance_r: ::libc::c_uint = 37;
pub const xplm_joy_v_fnh: ::libc::c_uint = 38;
pub const xplm_joy_v_fwh: ::libc::c_uint = 39;
pub const xplm_joy_v_tra: ::libc::c_uint = 40;
pub const xplm_joy_v_twr: ::libc::c_uint = 41;
pub const xplm_joy_v_run: ::libc::c_uint = 42;
pub const xplm_joy_v_cha: ::libc::c_uint = 43;
pub const xplm_joy_v_fr1: ::libc::c_uint = 44;
pub const xplm_joy_v_fr2: ::libc::c_uint = 45;
pub const xplm_joy_v_spo: ::libc::c_uint = 46;
pub const xplm_joy_flapsup: ::libc::c_uint = 47;
pub const xplm_joy_flapsdn: ::libc::c_uint = 48;
pub const xplm_joy_vctswpfwd: ::libc::c_uint = 49;
pub const xplm_joy_vctswpaft: ::libc::c_uint = 50;
pub const xplm_joy_gear_tog: ::libc::c_uint = 51;
pub const xplm_joy_gear_up: ::libc::c_uint = 52;
pub const xplm_joy_gear_down: ::libc::c_uint = 53;
pub const xplm_joy_lft_brake: ::libc::c_uint = 54;
pub const xplm_joy_rgt_brake: ::libc::c_uint = 55;
pub const xplm_joy_brakesREG: ::libc::c_uint = 56;
pub const xplm_joy_brakesMAX: ::libc::c_uint = 57;
pub const xplm_joy_speedbrake: ::libc::c_uint = 58;
pub const xplm_joy_ott_dis: ::libc::c_uint = 59;
pub const xplm_joy_ott_atr: ::libc::c_uint = 60;
pub const xplm_joy_ott_asi: ::libc::c_uint = 61;
pub const xplm_joy_ott_hdg: ::libc::c_uint = 62;
pub const xplm_joy_ott_alt: ::libc::c_uint = 63;
pub const xplm_joy_ott_vvi: ::libc::c_uint = 64;
pub const xplm_joy_tim_start: ::libc::c_uint = 65;
pub const xplm_joy_tim_reset: ::libc::c_uint = 66;
pub const xplm_joy_ecam_up: ::libc::c_uint = 67;
pub const xplm_joy_ecam_dn: ::libc::c_uint = 68;
pub const xplm_joy_fadec: ::libc::c_uint = 69;
pub const xplm_joy_yaw_damp: ::libc::c_uint = 70;
pub const xplm_joy_art_stab: ::libc::c_uint = 71;
pub const xplm_joy_chute: ::libc::c_uint = 72;
pub const xplm_joy_JATO: ::libc::c_uint = 73;
pub const xplm_joy_arrest: ::libc::c_uint = 74;
pub const xplm_joy_jettison: ::libc::c_uint = 75;
pub const xplm_joy_fuel_dump: ::libc::c_uint = 76;
pub const xplm_joy_puffsmoke: ::libc::c_uint = 77;
pub const xplm_joy_prerotate: ::libc::c_uint = 78;
pub const xplm_joy_UL_prerot: ::libc::c_uint = 79;
pub const xplm_joy_UL_collec: ::libc::c_uint = 80;
pub const xplm_joy_TOGA: ::libc::c_uint = 81;
pub const xplm_joy_shutdown: ::libc::c_uint = 82;
pub const xplm_joy_con_atc: ::libc::c_uint = 83;
pub const xplm_joy_fail_now: ::libc::c_uint = 84;
pub const xplm_joy_pause: ::libc::c_uint = 85;
pub const xplm_joy_rock_up: ::libc::c_uint = 86;
pub const xplm_joy_rock_dn: ::libc::c_uint = 87;
pub const xplm_joy_rock_lft: ::libc::c_uint = 88;
pub const xplm_joy_rock_rgt: ::libc::c_uint = 89;
pub const xplm_joy_rock_for: ::libc::c_uint = 90;
pub const xplm_joy_rock_aft: ::libc::c_uint = 91;
pub const xplm_joy_idle_hilo: ::libc::c_uint = 92;
pub const xplm_joy_lanlights: ::libc::c_uint = 93;
pub const xplm_joy_max: ::libc::c_uint = 94;
pub type XPLMCommandButtonID = ::libc::c_int;
pub type Enum_Unnamed3 = ::libc::c_uint;
pub const xplm_Host_Unknown: ::libc::c_uint = 0;
pub const xplm_Host_XPlane: ::libc::c_uint = 1;
pub const xplm_Host_PlaneMaker: ::libc::c_uint = 2;
pub const xplm_Host_WorldMaker: ::libc::c_uint = 3;
pub const xplm_Host_Briefer: ::libc::c_uint = 4;
pub const xplm_Host_PartMaker: ::libc::c_uint = 5;
pub const xplm_Host_YoungsMod: ::libc::c_uint = 6;
pub const xplm_Host_XAuto: ::libc::c_uint = 7;
pub type XPLMHostApplicationID = ::libc::c_int;
pub type Enum_Unnamed4 = ::libc::c_uint;
pub const xplm_Language_Unknown: ::libc::c_uint = 0;
pub const xplm_Language_English: ::libc::c_uint = 1;
pub const xplm_Language_French: ::libc::c_uint = 2;
pub const xplm_Language_German: ::libc::c_uint = 3;
pub const xplm_Language_Italian: ::libc::c_uint = 4;
pub const xplm_Language_Spanish: ::libc::c_uint = 5;
pub const xplm_Language_Korean: ::libc::c_uint = 6;
pub const xplm_Language_Russian: ::libc::c_uint = 7;
pub const xplm_Language_Greek: ::libc::c_uint = 8;
pub const xplm_Language_Japanese: ::libc::c_uint = 9;
pub const xplm_Language_Chinese: ::libc::c_uint = 10;
pub type XPLMLanguageCode = ::libc::c_int;
pub type Enum_Unnamed5 = ::libc::c_uint;
pub const xplm_DataFile_Situation: ::libc::c_uint = 1;
pub const xplm_DataFile_ReplayMovie: ::libc::c_uint = 2;
pub type XPLMDataFileType = ::libc::c_int;
pub type XPLMError_f =
    ::std::option::Option<unsafe extern "C" fn(inMessage:
                                                   *const ::libc::c_char)
                              -> ()>;
pub type Enum_Unnamed6 = ::libc::c_uint;
pub const xplm_CommandBegin: ::libc::c_uint = 0;
pub const xplm_CommandContinue: ::libc::c_uint = 1;
pub const xplm_CommandEnd: ::libc::c_uint = 2;
pub type XPLMCommandPhase = ::libc::c_int;
pub type XPLMCommandRef = *mut ::libc::c_void;
pub type XPLMCommandCallback_f =
    ::std::option::Option<unsafe extern "C" fn(inCommand: XPLMCommandRef,
                                               inPhase: XPLMCommandPhase,
                                               inRefcon: *mut ::libc::c_void)
                              -> ::libc::c_int>;
extern "C" {
    pub fn XPLMSimulateKeyPress(inKeyType: ::libc::c_int,
                                inKey: ::libc::c_int) -> ();
    pub fn XPLMSpeakString(inString: *const ::libc::c_char) -> ();
    pub fn XPLMCommandKeyStroke(inKey: XPLMCommandKeyID) -> ();
    pub fn XPLMCommandButtonPress(inButton: XPLMCommandButtonID) -> ();
    pub fn XPLMCommandButtonRelease(inButton: XPLMCommandButtonID) -> ();
    pub fn XPLMGetVirtualKeyDescription(inVirtualKey: ::libc::c_char)
     -> *const ::libc::c_char;
    pub fn XPLMReloadScenery() -> ();
    pub fn XPLMGetSystemPath(outSystemPath: *mut ::libc::c_char) -> ();
    pub fn XPLMGetPrefsPath(outPrefsPath: *mut ::libc::c_char) -> ();
    pub fn XPLMGetDirectorySeparator() -> *const ::libc::c_char;
    pub fn XPLMExtractFileAndPath(inFullPath: *mut ::libc::c_char)
     -> *mut ::libc::c_char;
    pub fn XPLMGetDirectoryContents(inDirectoryPath: *const ::libc::c_char,
                                    inFirstReturn: ::libc::c_int,
                                    outFileNames: *mut ::libc::c_char,
                                    inFileNameBufSize: ::libc::c_int,
                                    outIndices: *mut *mut ::libc::c_char,
                                    inIndexCount: ::libc::c_int,
                                    outTotalFiles: *mut ::libc::c_int,
                                    outReturnedFiles: *mut ::libc::c_int)
     -> ::libc::c_int;
    pub fn XPLMInitialized() -> ::libc::c_int;
    pub fn XPLMGetVersions(outXPlaneVersion: *mut ::libc::c_int,
                           outXPLMVersion: *mut ::libc::c_int,
                           outHostID: *mut XPLMHostApplicationID) -> ();
    pub fn XPLMGetLanguage() -> XPLMLanguageCode;
    pub fn XPLMDebugString(inString: *const ::libc::c_char) -> ();
    pub fn XPLMSetErrorCallback(inCallback: XPLMError_f) -> ();
    pub fn XPLMFindSymbol(inString: *const ::libc::c_char)
     -> *mut ::libc::c_void;
    pub fn XPLMLoadDataFile(inFileType: XPLMDataFileType,
                            inFilePath: *const ::libc::c_char)
     -> ::libc::c_int;
    pub fn XPLMSaveDataFile(inFileType: XPLMDataFileType,
                            inFilePath: *const ::libc::c_char)
     -> ::libc::c_int;
    pub fn XPLMFindCommand(inName: *const ::libc::c_char) -> XPLMCommandRef;
    pub fn XPLMCommandBegin(inCommand: XPLMCommandRef) -> ();
    pub fn XPLMCommandEnd(inCommand: XPLMCommandRef) -> ();
    pub fn XPLMCommandOnce(inCommand: XPLMCommandRef) -> ();
    pub fn XPLMCreateCommand(inName: *const ::libc::c_char,
                             inDescription: *const ::libc::c_char)
     -> XPLMCommandRef;
    pub fn XPLMRegisterCommandHandler(inComand: XPLMCommandRef,
                                      inHandler: XPLMCommandCallback_f,
                                      inBefore: ::libc::c_int,
                                      inRefcon: *mut ::libc::c_void) -> ();
    pub fn XPLMUnregisterCommandHandler(inComand: XPLMCommandRef,
                                        inHandler: XPLMCommandCallback_f,
                                        inBefore: ::libc::c_int,
                                        inRefcon: *mut ::libc::c_void) -> ();
}