This commit is contained in:
1 parent
ccb809bdc3
commit
7caadb3f7f
59 files changed
+7495
-16
No files matched your search
@@ -0,0 +1,14 @@
|
||||
// Generated by `wit-bindgen` 0.63.0. DO NOT EDIT!
|
||||
|
||||
///|
|
||||
fn wasmImportResourceDropContext(resource : Int) = "wasi-gfx:surface/surface-frame-buffer@0.2.0" "[resource-drop]context"
|
||||
|
||||
///|
|
||||
fn wasmImportConstructorContext(p0 : Int) -> Int = "wasi-gfx:surface/surface-frame-buffer@0.2.0" "[constructor]context"
|
||||
|
||||
///|
|
||||
fn wasmImportMethodContextGetCurrentBuffer(p0 : Int) -> Int = "wasi-gfx:surface/surface-frame-buffer@0.2.0" "[method]context.get-current-buffer"
|
||||
|
||||
///|
|
||||
fn wasmImportMethodContextPresent(p0 : Int) = "wasi-gfx:surface/surface-frame-buffer@0.2.0" "[method]context.present"
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
import {
|
||||
"moonplasma/desktop/interface/wasi-gfx/frame-buffer/frame-buffer" @frame-buffer,
|
||||
"moonplasma/desktop/interface/wasi-gfx/surface/surface" @surface,
|
||||
}
|
||||
|
||||
warnings = "-44"
|
||||
@@ -0,0 +1,22 @@
|
||||
// Generated using `moon info`, DON'T EDIT IT
|
||||
package "moonplasma/desktop/interface/wasi-gfx/surface/surface-frame-buffer"
|
||||
|
||||
import {
|
||||
"moonplasma/desktop/interface/wasi-gfx/frame-buffer/frame-buffer",
|
||||
"moonplasma/desktop/interface/wasi-gfx/surface/surface",
|
||||
}
|
||||
|
||||
// Values
|
||||
|
||||
// Errors
|
||||
|
||||
// Types and methods
|
||||
pub(all) struct Context(Int32)
|
||||
pub fn Context::context(@surface.Surface) -> Self
|
||||
pub fn Context::drop(Self) -> Unit
|
||||
pub fn Context::get_current_buffer(Self) -> @frame-buffer.Buffer
|
||||
pub fn Context::present(Self) -> Unit
|
||||
|
||||
// Type aliases
|
||||
|
||||
// Traits
|
||||
@@ -0,0 +1,37 @@
|
||||
// Generated by `wit-bindgen` 0.63.0. DO NOT EDIT!
|
||||
///|
|
||||
pub(all) struct Context(Int) derive()
|
||||
|
||||
///|
|
||||
/// Drops a resource handle.
|
||||
pub fn Context::drop(self : Context) -> Unit {
|
||||
let Context(resource) = self
|
||||
wasmImportResourceDropContext(resource)
|
||||
}
|
||||
///|
|
||||
pub fn Context::context(surface : @surface.Surface) -> Context {
|
||||
|
||||
let @surface.Surface(handle) = surface
|
||||
let result : Int = wasmImportConstructorContext(handle);
|
||||
let ret = Context::Context(result)
|
||||
return ret
|
||||
|
||||
}
|
||||
///|
|
||||
pub fn Context::get_current_buffer(self : Context) -> @frame-buffer.Buffer {
|
||||
|
||||
let Context(handle) = self
|
||||
let result : Int = wasmImportMethodContextGetCurrentBuffer(handle);
|
||||
let ret = @frame-buffer.Buffer::Buffer(result)
|
||||
return ret
|
||||
|
||||
}
|
||||
///|
|
||||
/// TODO: consider if needed
|
||||
pub fn Context::present(self : Context) -> Unit {
|
||||
|
||||
let Context(handle) = self
|
||||
wasmImportMethodContextPresent(handle);
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user