mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
object list API elements
This commit is contained in:
parent
5d4d009e64
commit
15f41a5f5b
2 changed files with 14 additions and 0 deletions
|
|
@ -94,6 +94,8 @@ pub enum GfxOpcode {
|
|||
/// V2 API for claiming ownership of screen for modal operation
|
||||
AcquireModal,
|
||||
ReleaseModal,
|
||||
/// V2 API for fast drawing of multiple objects
|
||||
UnclippedObjectList,
|
||||
|
||||
/// Gutter for invalid calls
|
||||
InvalidCall,
|
||||
|
|
|
|||
|
|
@ -705,6 +705,18 @@ impl Gfx {
|
|||
pub fn release_modal(&self) -> Result<xous::Result, xous::Error> {
|
||||
send_message(self.conn, Message::new_scalar(GfxOpcode::ReleaseModal.to_usize().unwrap(), 0, 0, 0, 0))
|
||||
}
|
||||
|
||||
/// V2-only API
|
||||
pub fn draw_object_list(&self, list: ObjectList) -> Result<(), xous::Error> {
|
||||
let buf = match Buffer::into_buf(list) {
|
||||
Ok(b) => b,
|
||||
Err(e) => {
|
||||
log::error!("err: {:?}", e);
|
||||
panic!("error")
|
||||
}
|
||||
};
|
||||
buf.lend(self.conn, GfxOpcode::UnclippedObjectList.to_u32().unwrap()).map(|_| ())
|
||||
}
|
||||
}
|
||||
|
||||
use core::sync::atomic::{AtomicU32, Ordering};
|
||||
|
|
|
|||
Loading…
Reference in a new issue