pub struct XPAPI {
pub avionics: AvionicsApi,
pub camera: CameraApi,
pub command: CommandApi,
pub data: DataApi,
pub features: FeatureApi,
pub menu: MenuApi,
pub nav: NavApi,
pub paths: PathApi,
pub player: PlayerApi,
pub plugins: PluginApi,
pub scenery: SceneryApi,
pub weather: WeatherApi,
/* private fields */
}
Expand description
Fields§
§avionics: AvionicsApi
§camera: CameraApi
§command: CommandApi
§data: DataApi
§features: FeatureApi
§paths: PathApi
§player: PlayerApi
§plugins: PluginApi
§scenery: SceneryApi
§weather: WeatherApi
Implementations§
source§impl XPAPI
impl XPAPI
sourcepub fn new_flight_loop<T: 'static>(
&mut self,
phase: FlightLoopPhase,
callback: impl FlightLoopCallback<T>,
base_state: T
) -> FlightLoop<T>
pub fn new_flight_loop<T: 'static>( &mut self, phase: FlightLoopPhase, callback: impl FlightLoopCallback<T>, base_state: T ) -> FlightLoop<T>
Creates a new flight loop. The provided callback will not be called until the loop is scheduled.
sourcepub fn find_symbol<S: Into<String>>(&mut self, name: S) -> *mut c_void
pub fn find_symbol<S: Into<String>>(&mut self, name: S) -> *mut c_void
Attempts to locate a symbol. If it exists, returns a pointer to it. Otherwise, a null pointer is returned.
sourcepub fn get_versions(&mut self) -> ((i32, i32), i32)
pub fn get_versions(&mut self) -> ((i32, i32), i32)
Get the versions of X-Plane and XPLM, respectively.
There are no guarantees about the form of the version numbers, except that subsequent versions will have greater numbers.
The first entry of the tuple is a tuple containing:
- The major version of X-Plane (the two most significant digits of the X-Plane version)
- All remaining digits of the X-Plane version The second entry of the tuple is the XPLM version.
sourcepub fn get_vkey_desc(&mut self, key: Key) -> &str
pub fn get_vkey_desc(&mut self, key: Key) -> &str
Get the description of a virtual key.
§Panics
Panics if X-Plane gives invalid UTF-8. If this happens, panicking here is the least of your problems.
Auto Trait Implementations§
impl RefUnwindSafe for XPAPI
impl !Send for XPAPI
impl !Sync for XPAPI
impl Unpin for XPAPI
impl UnwindSafe for XPAPI
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more