#[repr(C)]pub struct gfx_console_backend_interface {
pub kbd_event: Option<unsafe extern "C" fn(obj: *mut conf_object_t, code: sim_key_t, down: bool)>,
pub mouse_event: Option<unsafe extern "C" fn(obj: *mut conf_object_t, x: c_int, y: c_int, z: c_int, buttons: gfx_console_mouse_button_t)>,
pub request_refresh: Option<unsafe extern "C" fn(obj: *mut conf_object_t)>,
pub set_visible: Option<unsafe extern "C" fn(obj: *mut conf_object_t, visible: bool)>,
pub text_data: Option<unsafe extern "C" fn(obj: *mut conf_object_t) -> gfx_console_screen_text_t>,
pub got_grab_keys: Option<unsafe extern "C" fn(obj: *mut conf_object_t)>,
}
Fields§
§kbd_event: Option<unsafe extern "C" fn(obj: *mut conf_object_t, code: sim_key_t, down: bool)>
Indicate to the backend that a key has been pressed or released.
mouse_event: Option<unsafe extern "C" fn(obj: *mut conf_object_t, x: c_int, y: c_int, z: c_int, buttons: gfx_console_mouse_button_t)>
Indicate to the backend that the mouse state has changed. (x, y) are in screen coordinates (pixels). z is the mouse wheel: 1 if the wheel has rolled upwards, -1 for downwards, 0 for no change. ‘buttons’ is the current button state.
request_refresh: Option<unsafe extern "C" fn(obj: *mut conf_object_t)>
Request that the backend should refresh the whole console screen. Shortly after this call, the frontend can expect a call to gfx_console_frontend.set_contents, updating the whole screen.
set_visible: Option<unsafe extern "C" fn(obj: *mut conf_object_t, visible: bool)>
Indicate to the backend whether the frontend is visible, e.g. if the console window is hidden by other windows or minimised. If the frontend is invisible, the backend may choose not to call gfx_console_frontend.set_contents.
text_data: Option<unsafe extern "C" fn(obj: *mut conf_object_t) -> gfx_console_screen_text_t>
Obtain VGA text data from console backend. If the console is not in VGA text mode, the result is undefined.
got_grab_keys: Option<unsafe extern "C" fn(obj: *mut conf_object_t)>
Inform the backed that the grab mode keys were pressed.
Trait Implementations§
source§impl Clone for gfx_console_backend_interface
impl Clone for gfx_console_backend_interface
source§fn clone(&self) -> gfx_console_backend_interface
fn clone(&self) -> gfx_console_backend_interface
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Default for gfx_console_backend_interface
impl Default for gfx_console_backend_interface
source§fn default() -> gfx_console_backend_interface
fn default() -> gfx_console_backend_interface
source§impl Hash for gfx_console_backend_interface
impl Hash for gfx_console_backend_interface
source§impl Ord for gfx_console_backend_interface
impl Ord for gfx_console_backend_interface
source§fn cmp(&self, other: &gfx_console_backend_interface) -> Ordering
fn cmp(&self, other: &gfx_console_backend_interface) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for gfx_console_backend_interface
impl PartialEq for gfx_console_backend_interface
source§fn eq(&self, other: &gfx_console_backend_interface) -> bool
fn eq(&self, other: &gfx_console_backend_interface) -> bool
self
and other
values to be equal, and is used by ==
.source§impl PartialOrd for gfx_console_backend_interface
impl PartialOrd for gfx_console_backend_interface
impl Copy for gfx_console_backend_interface
impl Eq for gfx_console_backend_interface
impl StructuralPartialEq for gfx_console_backend_interface
Auto Trait Implementations§
impl Freeze for gfx_console_backend_interface
impl RefUnwindSafe for gfx_console_backend_interface
impl Send for gfx_console_backend_interface
impl Sync for gfx_console_backend_interface
impl Unpin for gfx_console_backend_interface
impl UnwindSafe for gfx_console_backend_interface
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)