Trait playdate_graphics::api::Api
source · pub trait Api: Api + Api + Api {
Show 27 methods
// Required method
fn video<VApi>(&self) -> VApi
where VApi: From<*const playdate_video> + Api;
// Provided methods
fn clear(&self) -> unsafe extern "C" fn(color: LCDColor) { ... }
fn set_background_color(&self) -> unsafe extern "C" fn(color: LCDSolidColor) { ... }
fn set_stencil(&self) -> unsafe extern "C" fn(stencil: *mut LCDBitmap) { ... }
fn set_draw_mode(&self) -> unsafe extern "C" fn(mode: LCDBitmapDrawMode) { ... }
fn set_draw_offset(&self) -> unsafe extern "C" fn(dx: c_int, dy: c_int) { ... }
fn set_clip_rect(
&self
) -> unsafe extern "C" fn(x: c_int, y: c_int, width: c_int, height: c_int) { ... }
fn clear_clip_rect(&self) -> unsafe extern "C" fn() { ... }
fn set_line_cap_style(
&self
) -> unsafe extern "C" fn(endCapStyle: LCDLineCapStyle) { ... }
fn push_context(&self) -> unsafe extern "C" fn(target: *mut LCDBitmap) { ... }
fn pop_context(&self) -> unsafe extern "C" fn() { ... }
fn draw_line(
&self
) -> unsafe extern "C" fn(x1: c_int, y1: c_int, x2: c_int, y2: c_int, width: c_int, color: LCDColor) { ... }
fn fill_triangle(
&self
) -> unsafe extern "C" fn(x1: c_int, y1: c_int, x2: c_int, y2: c_int, x3: c_int, y3: c_int, color: LCDColor) { ... }
fn draw_rect(
&self
) -> unsafe extern "C" fn(x: c_int, y: c_int, width: c_int, height: c_int, color: LCDColor) { ... }
fn fill_rect(
&self
) -> unsafe extern "C" fn(x: c_int, y: c_int, width: c_int, height: c_int, color: LCDColor) { ... }
fn draw_ellipse(
&self
) -> unsafe extern "C" fn(x: c_int, y: c_int, width: c_int, height: c_int, lineWidth: c_int, startAngle: c_float, endAngle: c_float, color: LCDColor) { ... }
fn fill_ellipse(
&self
) -> unsafe extern "C" fn(x: c_int, y: c_int, width: c_int, height: c_int, startAngle: c_float, endAngle: c_float, color: LCDColor) { ... }
fn get_frame(&self) -> unsafe extern "C" fn() -> *mut u8 { ... }
fn get_display_frame(&self) -> unsafe extern "C" fn() -> *mut u8 { ... }
fn get_debug_bitmap(
&self
) -> Option<unsafe extern "C" fn() -> *mut LCDBitmap> { ... }
fn copy_frame_buffer_bitmap(
&self
) -> unsafe extern "C" fn() -> *mut LCDBitmap { ... }
fn mark_updated_rows(
&self
) -> unsafe extern "C" fn(start: c_int, end: c_int) { ... }
fn display(&self) -> unsafe extern "C" fn() { ... }
fn set_screen_clip_rect(
&self
) -> unsafe extern "C" fn(x: c_int, y: c_int, width: c_int, height: c_int) { ... }
fn fill_polygon(
&self
) -> unsafe extern "C" fn(nPoints: c_int, coords: *mut c_int, color: LCDColor, fillrule: LCDPolygonFillRule) { ... }
fn get_display_buffer_bitmap(
&self
) -> unsafe extern "C" fn() -> *mut LCDBitmap { ... }
fn set_stencil_image(
&self
) -> unsafe extern "C" fn(stencil: *mut LCDBitmap, tile: c_int) { ... }
}Required Methods§
sourcefn video<VApi>(&self) -> VApiwhere
VApi: From<*const playdate_video> + Api,
fn video<VApi>(&self) -> VApiwhere VApi: From<*const playdate_video> + Api,
Equivalent to sys::ffi::playdate_graphics::video
Provided Methods§
sourcefn clear(&self) -> unsafe extern "C" fn(color: LCDColor)
fn clear(&self) -> unsafe extern "C" fn(color: LCDColor)
Equivalent to sys::ffi::playdate_graphics::clear
sourcefn set_background_color(&self) -> unsafe extern "C" fn(color: LCDSolidColor)
fn set_background_color(&self) -> unsafe extern "C" fn(color: LCDSolidColor)
Equivalent to sys::ffi::playdate_graphics::setBackgroundColor
sourcefn set_stencil(&self) -> unsafe extern "C" fn(stencil: *mut LCDBitmap)
fn set_stencil(&self) -> unsafe extern "C" fn(stencil: *mut LCDBitmap)
Equivalent to sys::ffi::playdate_graphics::setStencil
sourcefn set_draw_mode(&self) -> unsafe extern "C" fn(mode: LCDBitmapDrawMode)
fn set_draw_mode(&self) -> unsafe extern "C" fn(mode: LCDBitmapDrawMode)
Equivalent to sys::ffi::playdate_graphics::setDrawMode
sourcefn set_draw_offset(&self) -> unsafe extern "C" fn(dx: c_int, dy: c_int)
fn set_draw_offset(&self) -> unsafe extern "C" fn(dx: c_int, dy: c_int)
Equivalent to sys::ffi::playdate_graphics::setDrawOffset
sourcefn set_clip_rect(
&self
) -> unsafe extern "C" fn(x: c_int, y: c_int, width: c_int, height: c_int)
fn set_clip_rect( &self ) -> unsafe extern "C" fn(x: c_int, y: c_int, width: c_int, height: c_int)
Equivalent to sys::ffi::playdate_graphics::setClipRect
sourcefn clear_clip_rect(&self) -> unsafe extern "C" fn()
fn clear_clip_rect(&self) -> unsafe extern "C" fn()
Equivalent to sys::ffi::playdate_graphics::clearClipRect
sourcefn set_line_cap_style(
&self
) -> unsafe extern "C" fn(endCapStyle: LCDLineCapStyle)
fn set_line_cap_style( &self ) -> unsafe extern "C" fn(endCapStyle: LCDLineCapStyle)
Equivalent to sys::ffi::playdate_graphics::setLineCapStyle
sourcefn push_context(&self) -> unsafe extern "C" fn(target: *mut LCDBitmap)
fn push_context(&self) -> unsafe extern "C" fn(target: *mut LCDBitmap)
Equivalent to sys::ffi::playdate_graphics::pushContext
sourcefn pop_context(&self) -> unsafe extern "C" fn()
fn pop_context(&self) -> unsafe extern "C" fn()
Equivalent to sys::ffi::playdate_graphics::popContext
sourcefn draw_line(
&self
) -> unsafe extern "C" fn(x1: c_int, y1: c_int, x2: c_int, y2: c_int, width: c_int, color: LCDColor)
fn draw_line( &self ) -> unsafe extern "C" fn(x1: c_int, y1: c_int, x2: c_int, y2: c_int, width: c_int, color: LCDColor)
Equivalent to sys::ffi::playdate_graphics::drawLine
sourcefn fill_triangle(
&self
) -> unsafe extern "C" fn(x1: c_int, y1: c_int, x2: c_int, y2: c_int, x3: c_int, y3: c_int, color: LCDColor)
fn fill_triangle( &self ) -> unsafe extern "C" fn(x1: c_int, y1: c_int, x2: c_int, y2: c_int, x3: c_int, y3: c_int, color: LCDColor)
Equivalent to sys::ffi::playdate_graphics::fillTriangle
sourcefn draw_rect(
&self
) -> unsafe extern "C" fn(x: c_int, y: c_int, width: c_int, height: c_int, color: LCDColor)
fn draw_rect( &self ) -> unsafe extern "C" fn(x: c_int, y: c_int, width: c_int, height: c_int, color: LCDColor)
Equivalent to sys::ffi::playdate_graphics::drawRect
sourcefn fill_rect(
&self
) -> unsafe extern "C" fn(x: c_int, y: c_int, width: c_int, height: c_int, color: LCDColor)
fn fill_rect( &self ) -> unsafe extern "C" fn(x: c_int, y: c_int, width: c_int, height: c_int, color: LCDColor)
Equivalent to sys::ffi::playdate_graphics::fillRect
sourcefn draw_ellipse(
&self
) -> unsafe extern "C" fn(x: c_int, y: c_int, width: c_int, height: c_int, lineWidth: c_int, startAngle: c_float, endAngle: c_float, color: LCDColor)
fn draw_ellipse( &self ) -> unsafe extern "C" fn(x: c_int, y: c_int, width: c_int, height: c_int, lineWidth: c_int, startAngle: c_float, endAngle: c_float, color: LCDColor)
Equivalent to sys::ffi::playdate_graphics::drawEllipse
sourcefn fill_ellipse(
&self
) -> unsafe extern "C" fn(x: c_int, y: c_int, width: c_int, height: c_int, startAngle: c_float, endAngle: c_float, color: LCDColor)
fn fill_ellipse( &self ) -> unsafe extern "C" fn(x: c_int, y: c_int, width: c_int, height: c_int, startAngle: c_float, endAngle: c_float, color: LCDColor)
Equivalent to sys::ffi::playdate_graphics::fillEllipse
sourcefn get_frame(&self) -> unsafe extern "C" fn() -> *mut u8
fn get_frame(&self) -> unsafe extern "C" fn() -> *mut u8
Equivalent to sys::ffi::playdate_graphics::getFrame
sourcefn get_display_frame(&self) -> unsafe extern "C" fn() -> *mut u8
fn get_display_frame(&self) -> unsafe extern "C" fn() -> *mut u8
Equivalent to sys::ffi::playdate_graphics::getDisplayFrame
sourcefn get_debug_bitmap(&self) -> Option<unsafe extern "C" fn() -> *mut LCDBitmap>
fn get_debug_bitmap(&self) -> Option<unsafe extern "C" fn() -> *mut LCDBitmap>
Equivalent to sys::ffi::playdate_graphics::getDebugBitmap
sourcefn copy_frame_buffer_bitmap(&self) -> unsafe extern "C" fn() -> *mut LCDBitmap
fn copy_frame_buffer_bitmap(&self) -> unsafe extern "C" fn() -> *mut LCDBitmap
Equivalent to sys::ffi::playdate_graphics::copyFrameBufferBitmap
sourcefn mark_updated_rows(&self) -> unsafe extern "C" fn(start: c_int, end: c_int)
fn mark_updated_rows(&self) -> unsafe extern "C" fn(start: c_int, end: c_int)
Equivalent to sys::ffi::playdate_graphics::markUpdatedRows
sourcefn display(&self) -> unsafe extern "C" fn()
fn display(&self) -> unsafe extern "C" fn()
Equivalent to sys::ffi::playdate_graphics::display
sourcefn set_screen_clip_rect(
&self
) -> unsafe extern "C" fn(x: c_int, y: c_int, width: c_int, height: c_int)
fn set_screen_clip_rect( &self ) -> unsafe extern "C" fn(x: c_int, y: c_int, width: c_int, height: c_int)
Equivalent to sys::ffi::playdate_graphics::setScreenClipRect
sourcefn fill_polygon(
&self
) -> unsafe extern "C" fn(nPoints: c_int, coords: *mut c_int, color: LCDColor, fillrule: LCDPolygonFillRule)
fn fill_polygon( &self ) -> unsafe extern "C" fn(nPoints: c_int, coords: *mut c_int, color: LCDColor, fillrule: LCDPolygonFillRule)
Equivalent to sys::ffi::playdate_graphics::fillPolygon
sourcefn get_display_buffer_bitmap(&self) -> unsafe extern "C" fn() -> *mut LCDBitmap
fn get_display_buffer_bitmap(&self) -> unsafe extern "C" fn() -> *mut LCDBitmap
Equivalent to sys::ffi::playdate_graphics::getDisplayBufferBitmap
sourcefn set_stencil_image(
&self
) -> unsafe extern "C" fn(stencil: *mut LCDBitmap, tile: c_int)
fn set_stencil_image( &self ) -> unsafe extern "C" fn(stencil: *mut LCDBitmap, tile: c_int)
Equivalent to sys::ffi::playdate_graphics::setStencilImage