mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 04:36:45 +01:00
slowly figuring it out
This commit is contained in:
parent
b1d8fc62a9
commit
ef619c595a
2 changed files with 17 additions and 10 deletions
|
|
@ -5,7 +5,13 @@ pub mod bound;
|
|||
|
||||
pub struct Host(*mut self::bound::SuilHost);
|
||||
|
||||
pub struct Instance(*mut self::bound::SuilInstance);
|
||||
impl Drop for Host {
|
||||
fn drop (&mut self) -> () {
|
||||
unsafe {
|
||||
bound::suil_host_free(self.0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Host {
|
||||
pub fn new () -> Self {
|
||||
|
|
@ -87,13 +93,7 @@ unsafe extern "C" fn index (
|
|||
//0
|
||||
//}
|
||||
|
||||
impl Drop for Host {
|
||||
fn drop (&mut self) -> () {
|
||||
unsafe {
|
||||
bound::suil_host_free(self.0)
|
||||
}
|
||||
}
|
||||
}
|
||||
pub struct Instance(*mut self::bound::SuilInstance);
|
||||
|
||||
impl Drop for Instance {
|
||||
fn drop (&mut self) -> () {
|
||||
|
|
@ -106,3 +106,9 @@ impl Drop for Instance {
|
|||
unsafe impl Send for Instance {}
|
||||
|
||||
unsafe impl Sync for Instance {}
|
||||
|
||||
impl Instance {
|
||||
fn get_widget (&self) -> *mut c_void {
|
||||
unsafe { bound::suil_instance_get_widget(self.0) }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue