#[repr(C)]pub struct XPLMCreateAvionics_t {Show 23 fields
pub structSize: c_int,
pub screenWidth: c_int,
pub screenHeight: c_int,
pub bezelWidth: c_int,
pub bezelHeight: c_int,
pub screenOffsetX: c_int,
pub screenOffsetY: c_int,
pub drawOnDemand: c_int,
pub bezelDrawCallback: XPLMAvionicsBezelCallback_f,
pub drawCallback: XPLMAvionicsScreenCallback_f,
pub bezelClickCallback: XPLMAvionicsMouse_f,
pub bezelRightClickCallback: XPLMAvionicsMouse_f,
pub bezelScrollCallback: XPLMAvionicsMouseWheel_f,
pub bezelCursorCallback: XPLMAvionicsCursor_f,
pub screenTouchCallback: XPLMAvionicsMouse_f,
pub screenRightTouchCallback: XPLMAvionicsMouse_f,
pub screenScrollCallback: XPLMAvionicsMouseWheel_f,
pub screenCursorCallback: XPLMAvionicsCursor_f,
pub keyboardCallback: XPLMAvionicsKeyboard_f,
pub brightnessCallback: XPLMAvionicsBrightness_f,
pub deviceID: *mut c_char,
pub deviceName: *mut c_char,
pub refcon: *mut c_void,
}Expand description
XPLMCreateAvionics_t
The XPLMCreateAvionics_t structure defines all of the parameters used to generate your own glass cockpit device by using XPLMCreateAvionicsEx(). The structure will be expanded in future SDK APIs to include more features. Always set the structSize member to the size of your struct in bytes!
Fields§
§structSize: c_intUsed to inform XPLMCreateAvionicsEx() of the SDK version you compiled * against; should always be set to sizeof(XPLMCreateAvionics_t)
screenWidth: c_intWidth of the device’s screen in pixels.
screenHeight: c_intHeight of the device’s screen in pixels.
bezelWidth: c_intWidth of the bezel around your device’s screen for 2D pop-ups.
bezelHeight: c_intHeight of the bezel around your device’s screen for 2D pop-ups.
screenOffsetX: c_intThe screen’s lateral offset into the bezel for 2D pop-ups.
screenOffsetY: c_intThe screen’s vertical offset into the bezel for 2D pop-ups.
drawOnDemand: c_intIf set to true (1), X-Plane won’t call your plugin to re-render the * device’s screen every frame. Instead, you should tell X-Plane you want to * refresh your screen with XPLMAvionicsNeedsDrawing(), and X-Plane will call * you before rendering the next simulator frame.
bezelDrawCallback: XPLMAvionicsBezelCallback_fThe draw callback you will use to draw the 2D-popup bezel. This is called * only when the popup window is visible, and X-Plane is about to draw the * bezel in it.
drawCallback: XPLMAvionicsScreenCallback_fThe draw callback you will be using to draw into the device’s screen * framebuffer.
bezelClickCallback: XPLMAvionicsMouse_fThe mouse click callback that is called when the user clicks onto your * bezel.
bezelRightClickCallback: XPLMAvionicsMouse_fThe mouse click callback that is called when the user clicks onto your * bezel.
bezelScrollCallback: XPLMAvionicsMouseWheel_fThe callback that is called when the users uses the scroll wheel over your * avionics’ bezel.
bezelCursorCallback: XPLMAvionicsCursor_fThe callback that lets you determine what cursor should be shown when the * mouse is over your device’s bezel.
screenTouchCallback: XPLMAvionicsMouse_fThe mouse click callback that is called when the user clicks onto your * screen.
screenRightTouchCallback: XPLMAvionicsMouse_fThe right mouse click callback that is called when the user clicks onto * your screen.
screenScrollCallback: XPLMAvionicsMouseWheel_fThe callback that is called when the users uses the scroll wheel over your * avionics’ screen.
screenCursorCallback: XPLMAvionicsCursor_fThe callback that lets you determine what cursor should be shown when the * mouse is over your device’s screen.
keyboardCallback: XPLMAvionicsKeyboard_fThe key callback that is called when the user types in your popup.
brightnessCallback: XPLMAvionicsBrightness_fThe callback that is called to determine the absolute brightness of the * device’s screen. Set to NULL to use X-Plane’s default behaviour.
deviceID: *mut c_charA null-terminated string of maximum 64 characters to uniquely identify your* cockpit device. This must be unique (you cannot re-use an ID that X-Plane * or another plugin provides), and it must not contain spaces. This is the * string the OBJ file must reference when marking polygons with * ATTR_cockpit_device. The string is copied when you call * XPLMCreateAvionicsEx, so you don’t need to hold this string in memory after* the call.
deviceName: *mut c_charA null-terminated string to give a user-readable name to your device, which* can be presented in UI dialogs.
refcon: *mut c_voidA reference which will be passed into your draw and mouse callbacks. Use * this to pass information to yourself as needed.
Trait Implementations§
Source§impl Clone for XPLMCreateAvionics_t
impl Clone for XPLMCreateAvionics_t
Source§fn clone(&self) -> XPLMCreateAvionics_t
fn clone(&self) -> XPLMCreateAvionics_t
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more