Struct libremarkable::appctx::ApplicationContext
[−]
[src]
pub struct ApplicationContext<'a> { /* fields omitted */ }
Methods
impl<'a> ApplicationContext<'a>
[src]
pub fn get_framebuffer_ref(&mut self) -> &'static mut Framebuffer<'static>
[src]
pub fn upgrade_ref(&mut self) -> &'static mut ApplicationContext<'static>
[src]
Perhaps this is bad practice but we know that the ApplicationContext, just like the Framebuffer will have a static lifetime. We are doing this so that we can have the event handlers call into the ApplicationContext.
pub fn get_lua_ref(&mut self) -> &'a mut Lua<'static>
[src]
pub fn get_dimensions(self) -> (u32, u32)
[src]
pub fn new(
on_button: fn(_: &mut ApplicationContext, _: GPIOEvent),
on_wacom: fn(_: &mut ApplicationContext, _: WacomEvent),
on_touch: fn(_: &mut ApplicationContext, _: MultitouchEvent)
) -> ApplicationContext<'static>
[src]
on_button: fn(_: &mut ApplicationContext, _: GPIOEvent),
on_wacom: fn(_: &mut ApplicationContext, _: WacomEvent),
on_touch: fn(_: &mut ApplicationContext, _: MultitouchEvent)
) -> ApplicationContext<'static>
pub fn execute_lua(&mut self, code: &str)
[src]
pub fn display_text(
&mut self,
y: usize,
x: usize,
scale: usize,
text: String,
refresh: UIConstraintRefresh
) -> mxcfb_rect
[src]
&mut self,
y: usize,
x: usize,
scale: usize,
text: String,
refresh: UIConstraintRefresh
) -> mxcfb_rect
pub fn display_image(
&mut self,
img: &DynamicImage,
y: usize,
x: usize,
refresh: UIConstraintRefresh
) -> mxcfb_rect
[src]
&mut self,
img: &DynamicImage,
y: usize,
x: usize,
refresh: UIConstraintRefresh
) -> mxcfb_rect
pub fn add_element(
&mut self,
name: &str,
element: Arc<RwLock<UIElementWrapper>>
) -> bool
[src]
&mut self,
name: &str,
element: Arc<RwLock<UIElementWrapper>>
) -> bool
pub fn remove_element(&mut self, name: &str) -> bool
[src]
pub fn draw_element(&mut self, name: &str) -> bool
[src]
pub fn draw_elements(&mut self)
[src]
pub fn clear(&mut self, deep: bool)
[src]
pub fn stop(&mut self)
[src]
pub fn dispatch_events(
&mut self,
ringbuffer_size: usize,
event_read_chunksize: usize
)
[src]
&mut self,
ringbuffer_size: usize,
event_read_chunksize: usize
)
pub fn find_active_region(
&self,
y: u16,
x: u16
) -> Option<(&ActiveRegionHandler, ItemId)>
[src]
&self,
y: u16,
x: u16
) -> Option<(&ActiveRegionHandler, ItemId)>
pub fn remove_active_region_at_point(&mut self, y: u16, x: u16) -> bool
[src]
pub fn create_active_region(
&mut self,
y: u16,
x: u16,
height: u16,
width: u16,
handler: ActiveRegionFunction,
element: Arc<RwLock<UIElementWrapper>>
)
[src]
&mut self,
y: u16,
x: u16,
height: u16,
width: u16,
handler: ActiveRegionFunction,
element: Arc<RwLock<UIElementWrapper>>
)