#[repr(C)]
pub struct playdate_graphics {
Show 59 fields pub video: *const playdate_video, pub clear: Option<unsafe extern "C" fn(color: LCDColor)>, pub setBackgroundColor: Option<unsafe extern "C" fn(color: LCDSolidColor)>, pub setStencil: Option<unsafe extern "C" fn(stencil: *mut LCDBitmap)>, pub setDrawMode: Option<unsafe extern "C" fn(mode: LCDBitmapDrawMode)>, pub setDrawOffset: Option<unsafe extern "C" fn(dx: c_int, dy: c_int)>, pub setClipRect: Option<unsafe extern "C" fn(x: c_int, y: c_int, width: c_int, height: c_int)>, pub clearClipRect: Option<unsafe extern "C" fn()>, pub setLineCapStyle: Option<unsafe extern "C" fn(endCapStyle: LCDLineCapStyle)>, pub setFont: Option<unsafe extern "C" fn(font: *mut LCDFont)>, pub setTextTracking: Option<unsafe extern "C" fn(tracking: c_int)>, pub pushContext: Option<unsafe extern "C" fn(target: *mut LCDBitmap)>, pub popContext: Option<unsafe extern "C" fn()>, pub drawBitmap: Option<unsafe extern "C" fn(bitmap: *mut LCDBitmap, x: c_int, y: c_int, flip: LCDBitmapFlip)>, pub tileBitmap: Option<unsafe extern "C" fn(bitmap: *mut LCDBitmap, x: c_int, y: c_int, width: c_int, height: c_int, flip: LCDBitmapFlip)>, pub drawLine: Option<unsafe extern "C" fn(x1: c_int, y1: c_int, x2: c_int, y2: c_int, width: c_int, color: LCDColor)>, pub fillTriangle: Option<unsafe extern "C" fn(x1: c_int, y1: c_int, x2: c_int, y2: c_int, x3: c_int, y3: c_int, color: LCDColor)>, pub drawRect: Option<unsafe extern "C" fn(x: c_int, y: c_int, width: c_int, height: c_int, color: LCDColor)>, pub fillRect: Option<unsafe extern "C" fn(x: c_int, y: c_int, width: c_int, height: c_int, color: LCDColor)>, pub drawEllipse: Option<unsafe extern "C" fn(x: c_int, y: c_int, width: c_int, height: c_int, lineWidth: c_int, startAngle: f32, endAngle: f32, color: LCDColor)>, pub fillEllipse: Option<unsafe extern "C" fn(x: c_int, y: c_int, width: c_int, height: c_int, startAngle: f32, endAngle: f32, color: LCDColor)>, pub drawScaledBitmap: Option<unsafe extern "C" fn(bitmap: *mut LCDBitmap, x: c_int, y: c_int, xscale: f32, yscale: f32)>, pub drawText: Option<unsafe extern "C" fn(text: *const c_void, len: usize, encoding: PDStringEncoding, x: c_int, y: c_int) -> c_int>, pub newBitmap: Option<unsafe extern "C" fn(width: c_int, height: c_int, bgcolor: LCDColor) -> *mut LCDBitmap>, pub freeBitmap: Option<unsafe extern "C" fn(arg1: *mut LCDBitmap)>, pub loadBitmap: Option<unsafe extern "C" fn(path: *const c_char, outerr: *mut *const c_char) -> *mut LCDBitmap>, pub copyBitmap: Option<unsafe extern "C" fn(bitmap: *mut LCDBitmap) -> *mut LCDBitmap>, pub loadIntoBitmap: Option<unsafe extern "C" fn(path: *const c_char, bitmap: *mut LCDBitmap, outerr: *mut *const c_char)>, pub getBitmapData: Option<unsafe extern "C" fn(bitmap: *mut LCDBitmap, width: *mut c_int, height: *mut c_int, rowbytes: *mut c_int, mask: *mut *mut u8, data: *mut *mut u8)>, pub clearBitmap: Option<unsafe extern "C" fn(bitmap: *mut LCDBitmap, bgcolor: LCDColor)>, pub rotatedBitmap: Option<unsafe extern "C" fn(bitmap: *mut LCDBitmap, rotation: f32, xscale: f32, yscale: f32, allocedSize: *mut c_int) -> *mut LCDBitmap>, pub newBitmapTable: Option<unsafe extern "C" fn(count: c_int, width: c_int, height: c_int) -> *mut LCDBitmapTable>, pub freeBitmapTable: Option<unsafe extern "C" fn(table: *mut LCDBitmapTable)>, pub loadBitmapTable: Option<unsafe extern "C" fn(path: *const c_char, outerr: *mut *const c_char) -> *mut LCDBitmapTable>, pub loadIntoBitmapTable: Option<unsafe extern "C" fn(path: *const c_char, table: *mut LCDBitmapTable, outerr: *mut *const c_char)>, pub getTableBitmap: Option<unsafe extern "C" fn(table: *mut LCDBitmapTable, idx: c_int) -> *mut LCDBitmap>, pub loadFont: Option<unsafe extern "C" fn(path: *const c_char, outErr: *mut *const c_char) -> *mut LCDFont>, pub getFontPage: Option<unsafe extern "C" fn(font: *mut LCDFont, c: u32) -> *mut LCDFontPage>, pub getPageGlyph: Option<unsafe extern "C" fn(page: *mut LCDFontPage, c: u32, bitmap: *mut *mut LCDBitmap, advance: *mut c_int) -> *mut LCDFontGlyph>, pub getGlyphKerning: Option<unsafe extern "C" fn(glyph: *mut LCDFontGlyph, glyphcode: u32, nextcode: u32) -> c_int>, pub getTextWidth: Option<unsafe extern "C" fn(font: *mut LCDFont, text: *const c_void, len: usize, encoding: PDStringEncoding, tracking: c_int) -> c_int>, pub getFrame: Option<unsafe extern "C" fn() -> *mut u8>, pub getDisplayFrame: Option<unsafe extern "C" fn() -> *mut u8>, pub getDebugBitmap: Option<unsafe extern "C" fn() -> *mut LCDBitmap>, pub copyFrameBufferBitmap: Option<unsafe extern "C" fn() -> *mut LCDBitmap>, pub markUpdatedRows: Option<unsafe extern "C" fn(start: c_int, end: c_int)>, pub display: Option<unsafe extern "C" fn()>, pub setColorToPattern: Option<unsafe extern "C" fn(color: *mut LCDColor, bitmap: *mut LCDBitmap, x: c_int, y: c_int)>, pub checkMaskCollision: Option<unsafe extern "C" fn(bitmap1: *mut LCDBitmap, x1: c_int, y1: c_int, flip1: LCDBitmapFlip, bitmap2: *mut LCDBitmap, x2: c_int, y2: c_int, flip2: LCDBitmapFlip, rect: LCDRect) -> c_int>, pub setScreenClipRect: Option<unsafe extern "C" fn(x: c_int, y: c_int, width: c_int, height: c_int)>, pub fillPolygon: Option<unsafe extern "C" fn(nPoints: c_int, coords: *mut c_int, color: LCDColor, fillrule: LCDPolygonFillRule)>, pub getFontHeight: Option<unsafe extern "C" fn(font: *mut LCDFont) -> u8>, pub getDisplayBufferBitmap: Option<unsafe extern "C" fn() -> *mut LCDBitmap>, pub drawRotatedBitmap: Option<unsafe extern "C" fn(bitmap: *mut LCDBitmap, x: c_int, y: c_int, rotation: f32, centerx: f32, centery: f32, xscale: f32, yscale: f32)>, pub setTextLeading: Option<unsafe extern "C" fn(lineHeightAdustment: c_int)>, pub setBitmapMask: Option<unsafe extern "C" fn(bitmap: *mut LCDBitmap, mask: *mut LCDBitmap) -> c_int>, pub getBitmapMask: Option<unsafe extern "C" fn(bitmap: *mut LCDBitmap) -> *mut LCDBitmap>, pub setStencilImage: Option<unsafe extern "C" fn(stencil: *mut LCDBitmap, tile: c_int)>, pub makeFontFromData: Option<unsafe extern "C" fn(data: *mut LCDFontData, wide: c_int) -> *mut LCDFont>,
}

Fields§

§video: *const playdate_video§clear: Option<unsafe extern "C" fn(color: LCDColor)>§setBackgroundColor: Option<unsafe extern "C" fn(color: LCDSolidColor)>§setStencil: Option<unsafe extern "C" fn(stencil: *mut LCDBitmap)>§setDrawMode: Option<unsafe extern "C" fn(mode: LCDBitmapDrawMode)>§setDrawOffset: Option<unsafe extern "C" fn(dx: c_int, dy: c_int)>§setClipRect: Option<unsafe extern "C" fn(x: c_int, y: c_int, width: c_int, height: c_int)>§clearClipRect: Option<unsafe extern "C" fn()>§setLineCapStyle: Option<unsafe extern "C" fn(endCapStyle: LCDLineCapStyle)>§setFont: Option<unsafe extern "C" fn(font: *mut LCDFont)>§setTextTracking: Option<unsafe extern "C" fn(tracking: c_int)>§pushContext: Option<unsafe extern "C" fn(target: *mut LCDBitmap)>§popContext: Option<unsafe extern "C" fn()>§drawBitmap: Option<unsafe extern "C" fn(bitmap: *mut LCDBitmap, x: c_int, y: c_int, flip: LCDBitmapFlip)>§tileBitmap: Option<unsafe extern "C" fn(bitmap: *mut LCDBitmap, x: c_int, y: c_int, width: c_int, height: c_int, flip: LCDBitmapFlip)>§drawLine: Option<unsafe extern "C" fn(x1: c_int, y1: c_int, x2: c_int, y2: c_int, width: c_int, color: LCDColor)>§fillTriangle: Option<unsafe extern "C" fn(x1: c_int, y1: c_int, x2: c_int, y2: c_int, x3: c_int, y3: c_int, color: LCDColor)>§drawRect: Option<unsafe extern "C" fn(x: c_int, y: c_int, width: c_int, height: c_int, color: LCDColor)>§fillRect: Option<unsafe extern "C" fn(x: c_int, y: c_int, width: c_int, height: c_int, color: LCDColor)>§drawEllipse: Option<unsafe extern "C" fn(x: c_int, y: c_int, width: c_int, height: c_int, lineWidth: c_int, startAngle: f32, endAngle: f32, color: LCDColor)>§fillEllipse: Option<unsafe extern "C" fn(x: c_int, y: c_int, width: c_int, height: c_int, startAngle: f32, endAngle: f32, color: LCDColor)>§drawScaledBitmap: Option<unsafe extern "C" fn(bitmap: *mut LCDBitmap, x: c_int, y: c_int, xscale: f32, yscale: f32)>§drawText: Option<unsafe extern "C" fn(text: *const c_void, len: usize, encoding: PDStringEncoding, x: c_int, y: c_int) -> c_int>§newBitmap: Option<unsafe extern "C" fn(width: c_int, height: c_int, bgcolor: LCDColor) -> *mut LCDBitmap>§freeBitmap: Option<unsafe extern "C" fn(arg1: *mut LCDBitmap)>§loadBitmap: Option<unsafe extern "C" fn(path: *const c_char, outerr: *mut *const c_char) -> *mut LCDBitmap>§copyBitmap: Option<unsafe extern "C" fn(bitmap: *mut LCDBitmap) -> *mut LCDBitmap>§loadIntoBitmap: Option<unsafe extern "C" fn(path: *const c_char, bitmap: *mut LCDBitmap, outerr: *mut *const c_char)>§getBitmapData: Option<unsafe extern "C" fn(bitmap: *mut LCDBitmap, width: *mut c_int, height: *mut c_int, rowbytes: *mut c_int, mask: *mut *mut u8, data: *mut *mut u8)>§clearBitmap: Option<unsafe extern "C" fn(bitmap: *mut LCDBitmap, bgcolor: LCDColor)>§rotatedBitmap: Option<unsafe extern "C" fn(bitmap: *mut LCDBitmap, rotation: f32, xscale: f32, yscale: f32, allocedSize: *mut c_int) -> *mut LCDBitmap>§newBitmapTable: Option<unsafe extern "C" fn(count: c_int, width: c_int, height: c_int) -> *mut LCDBitmapTable>§freeBitmapTable: Option<unsafe extern "C" fn(table: *mut LCDBitmapTable)>§loadBitmapTable: Option<unsafe extern "C" fn(path: *const c_char, outerr: *mut *const c_char) -> *mut LCDBitmapTable>§loadIntoBitmapTable: Option<unsafe extern "C" fn(path: *const c_char, table: *mut LCDBitmapTable, outerr: *mut *const c_char)>§getTableBitmap: Option<unsafe extern "C" fn(table: *mut LCDBitmapTable, idx: c_int) -> *mut LCDBitmap>§loadFont: Option<unsafe extern "C" fn(path: *const c_char, outErr: *mut *const c_char) -> *mut LCDFont>§getFontPage: Option<unsafe extern "C" fn(font: *mut LCDFont, c: u32) -> *mut LCDFontPage>§getPageGlyph: Option<unsafe extern "C" fn(page: *mut LCDFontPage, c: u32, bitmap: *mut *mut LCDBitmap, advance: *mut c_int) -> *mut LCDFontGlyph>§getGlyphKerning: Option<unsafe extern "C" fn(glyph: *mut LCDFontGlyph, glyphcode: u32, nextcode: u32) -> c_int>§getTextWidth: Option<unsafe extern "C" fn(font: *mut LCDFont, text: *const c_void, len: usize, encoding: PDStringEncoding, tracking: c_int) -> c_int>§getFrame: Option<unsafe extern "C" fn() -> *mut u8>§getDisplayFrame: Option<unsafe extern "C" fn() -> *mut u8>§getDebugBitmap: Option<unsafe extern "C" fn() -> *mut LCDBitmap>§copyFrameBufferBitmap: Option<unsafe extern "C" fn() -> *mut LCDBitmap>§markUpdatedRows: Option<unsafe extern "C" fn(start: c_int, end: c_int)>§display: Option<unsafe extern "C" fn()>§setColorToPattern: Option<unsafe extern "C" fn(color: *mut LCDColor, bitmap: *mut LCDBitmap, x: c_int, y: c_int)>§checkMaskCollision: Option<unsafe extern "C" fn(bitmap1: *mut LCDBitmap, x1: c_int, y1: c_int, flip1: LCDBitmapFlip, bitmap2: *mut LCDBitmap, x2: c_int, y2: c_int, flip2: LCDBitmapFlip, rect: LCDRect) -> c_int>§setScreenClipRect: Option<unsafe extern "C" fn(x: c_int, y: c_int, width: c_int, height: c_int)>§fillPolygon: Option<unsafe extern "C" fn(nPoints: c_int, coords: *mut c_int, color: LCDColor, fillrule: LCDPolygonFillRule)>§getFontHeight: Option<unsafe extern "C" fn(font: *mut LCDFont) -> u8>§getDisplayBufferBitmap: Option<unsafe extern "C" fn() -> *mut LCDBitmap>§drawRotatedBitmap: Option<unsafe extern "C" fn(bitmap: *mut LCDBitmap, x: c_int, y: c_int, rotation: f32, centerx: f32, centery: f32, xscale: f32, yscale: f32)>§setTextLeading: Option<unsafe extern "C" fn(lineHeightAdustment: c_int)>§setBitmapMask: Option<unsafe extern "C" fn(bitmap: *mut LCDBitmap, mask: *mut LCDBitmap) -> c_int>§getBitmapMask: Option<unsafe extern "C" fn(bitmap: *mut LCDBitmap) -> *mut LCDBitmap>§setStencilImage: Option<unsafe extern "C" fn(stencil: *mut LCDBitmap, tile: c_int)>§makeFontFromData: Option<unsafe extern "C" fn(data: *mut LCDFontData, wide: c_int) -> *mut LCDFont>

Trait Implementations§

source§

impl Clone for playdate_graphics

source§

fn clone(&self) -> playdate_graphics

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for playdate_graphics

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for playdate_graphics

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl PartialEq<playdate_graphics> for playdate_graphics

source§

fn eq(&self, other: &playdate_graphics) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for playdate_graphics

source§

impl Eq for playdate_graphics

source§

impl StructuralEq for playdate_graphics

source§

impl StructuralPartialEq for playdate_graphics

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.