XPLMCreateWindow

Function XPLMCreateWindow 

Source
pub unsafe extern "C" fn XPLMCreateWindow(
    inLeft: c_int,
    inTop: c_int,
    inRight: c_int,
    inBottom: c_int,
    inIsVisible: c_int,
    inDrawCallback: XPLMDrawWindow_f,
    inKeyCallback: XPLMHandleKey_f,
    inMouseCallback: XPLMHandleMouseClick_f,
    inRefcon: *mut c_void,
) -> XPLMWindowID
Expand description

XPLMCreateWindow

Deprecated as of XPLM300.

This routine creates a new legacy window. Unlike modern windows (created via XPLMCreateWindowEx()), legacy windows do not have access to X-Plane 11 features like automatic scaling for high-DPI screens, native window styles, or support for being “popped out” into first-class operating system windows.

Pass in the dimensions and offsets to the window’s bottom left corner from the bottom left of the screen. You can specify whether the window is initially visible or not. Also, you pass in three callbacks to run the window and a refcon. This function returns a window ID you can use to refer to the new window.

NOTE: Legacy windows do not have “frames”; you are responsible for drawing the background and frame of the window. Higher level libraries have routines which make this easy.