Skip to main content

g2d

Struct g2d 

Source
pub struct g2d {
Show 20 fields pub g2d_open: Result<unsafe extern "C" fn(handle: *mut *mut c_void) -> c_int, Error>, pub g2d_close: Result<unsafe extern "C" fn(handle: *mut c_void) -> c_int, Error>, pub g2d_make_current: Result<unsafe extern "C" fn(handle: *mut c_void, type_: g2d_hardware_type) -> c_int, Error>, pub g2d_clear: Result<unsafe extern "C" fn(handle: *mut c_void, area: *mut g2d_surface) -> c_int, Error>, pub g2d_blit: Result<unsafe extern "C" fn(handle: *mut c_void, src: *mut g2d_surface, dst: *mut g2d_surface) -> c_int, Error>, pub g2d_copy: Result<unsafe extern "C" fn(handle: *mut c_void, d: *mut g2d_buf, s: *mut g2d_buf, size: c_int) -> c_int, Error>, pub g2d_multi_blit: Result<unsafe extern "C" fn(handle: *mut c_void, sp: *mut *mut g2d_surface_pair, layers: c_int) -> c_int, Error>, pub g2d_query_hardware: Result<unsafe extern "C" fn(handle: *mut c_void, type_: g2d_hardware_type, available: *mut c_int) -> c_int, Error>, pub g2d_query_feature: Result<unsafe extern "C" fn(handle: *mut c_void, feature: g2d_feature, available: *mut c_int) -> c_int, Error>, pub g2d_query_cap: Result<unsafe extern "C" fn(handle: *mut c_void, cap: g2d_cap_mode, enable: *mut c_int) -> c_int, Error>, pub g2d_enable: Result<unsafe extern "C" fn(handle: *mut c_void, cap: g2d_cap_mode) -> c_int, Error>, pub g2d_disable: Result<unsafe extern "C" fn(handle: *mut c_void, cap: g2d_cap_mode) -> c_int, Error>, pub g2d_cache_op: Result<unsafe extern "C" fn(buf: *mut g2d_buf, op: g2d_cache_mode) -> c_int, Error>, pub g2d_alloc: Result<unsafe extern "C" fn(size: c_int, cacheable: c_int) -> *mut g2d_buf, Error>, pub g2d_buf_from_fd: Result<unsafe extern "C" fn(fd: c_int) -> *mut g2d_buf, Error>, pub g2d_buf_export_fd: Result<unsafe extern "C" fn(arg1: *mut g2d_buf) -> c_int, Error>, pub g2d_buf_from_virt_addr: Result<unsafe extern "C" fn(vaddr: *mut c_void, size: c_int) -> *mut g2d_buf, Error>, pub g2d_free: Result<unsafe extern "C" fn(buf: *mut g2d_buf) -> c_int, Error>, pub g2d_flush: Result<unsafe extern "C" fn(handle: *mut c_void) -> c_int, Error>, pub g2d_finish: Result<unsafe extern "C" fn(handle: *mut c_void) -> c_int, Error>, /* private fields */
}

Fields§

§g2d_open: Result<unsafe extern "C" fn(handle: *mut *mut c_void) -> c_int, Error>§g2d_close: Result<unsafe extern "C" fn(handle: *mut c_void) -> c_int, Error>§g2d_make_current: Result<unsafe extern "C" fn(handle: *mut c_void, type_: g2d_hardware_type) -> c_int, Error>§g2d_clear: Result<unsafe extern "C" fn(handle: *mut c_void, area: *mut g2d_surface) -> c_int, Error>§g2d_blit: Result<unsafe extern "C" fn(handle: *mut c_void, src: *mut g2d_surface, dst: *mut g2d_surface) -> c_int, Error>§g2d_copy: Result<unsafe extern "C" fn(handle: *mut c_void, d: *mut g2d_buf, s: *mut g2d_buf, size: c_int) -> c_int, Error>§g2d_multi_blit: Result<unsafe extern "C" fn(handle: *mut c_void, sp: *mut *mut g2d_surface_pair, layers: c_int) -> c_int, Error>§g2d_query_hardware: Result<unsafe extern "C" fn(handle: *mut c_void, type_: g2d_hardware_type, available: *mut c_int) -> c_int, Error>§g2d_query_feature: Result<unsafe extern "C" fn(handle: *mut c_void, feature: g2d_feature, available: *mut c_int) -> c_int, Error>§g2d_query_cap: Result<unsafe extern "C" fn(handle: *mut c_void, cap: g2d_cap_mode, enable: *mut c_int) -> c_int, Error>§g2d_enable: Result<unsafe extern "C" fn(handle: *mut c_void, cap: g2d_cap_mode) -> c_int, Error>§g2d_disable: Result<unsafe extern "C" fn(handle: *mut c_void, cap: g2d_cap_mode) -> c_int, Error>§g2d_cache_op: Result<unsafe extern "C" fn(buf: *mut g2d_buf, op: g2d_cache_mode) -> c_int, Error>§g2d_alloc: Result<unsafe extern "C" fn(size: c_int, cacheable: c_int) -> *mut g2d_buf, Error>§g2d_buf_from_fd: Result<unsafe extern "C" fn(fd: c_int) -> *mut g2d_buf, Error>§g2d_buf_export_fd: Result<unsafe extern "C" fn(arg1: *mut g2d_buf) -> c_int, Error>§g2d_buf_from_virt_addr: Result<unsafe extern "C" fn(vaddr: *mut c_void, size: c_int) -> *mut g2d_buf, Error>§g2d_free: Result<unsafe extern "C" fn(buf: *mut g2d_buf) -> c_int, Error>§g2d_flush: Result<unsafe extern "C" fn(handle: *mut c_void) -> c_int, Error>§g2d_finish: Result<unsafe extern "C" fn(handle: *mut c_void) -> c_int, Error>

Implementations§

Source§

impl g2d

Source

pub unsafe fn new<P>(path: P) -> Result<Self, Error>
where P: AsRef<OsStr>,

Source

pub unsafe fn from_library<L>(library: L) -> Result<Self, Error>
where L: Into<Library>,

Source

pub unsafe fn g2d_open(&self, handle: *mut *mut c_void) -> c_int

Source

pub unsafe fn g2d_close(&self, handle: *mut c_void) -> c_int

Source

pub unsafe fn g2d_make_current( &self, handle: *mut c_void, type_: g2d_hardware_type, ) -> c_int

Source

pub unsafe fn g2d_clear( &self, handle: *mut c_void, area: *mut g2d_surface, ) -> c_int

Source

pub unsafe fn g2d_blit( &self, handle: *mut c_void, src: *mut g2d_surface, dst: *mut g2d_surface, ) -> c_int

Source

pub unsafe fn g2d_copy( &self, handle: *mut c_void, d: *mut g2d_buf, s: *mut g2d_buf, size: c_int, ) -> c_int

Source

pub unsafe fn g2d_multi_blit( &self, handle: *mut c_void, sp: *mut *mut g2d_surface_pair, layers: c_int, ) -> c_int

Source

pub unsafe fn g2d_query_hardware( &self, handle: *mut c_void, type_: g2d_hardware_type, available: *mut c_int, ) -> c_int

Source

pub unsafe fn g2d_query_feature( &self, handle: *mut c_void, feature: g2d_feature, available: *mut c_int, ) -> c_int

Source

pub unsafe fn g2d_query_cap( &self, handle: *mut c_void, cap: g2d_cap_mode, enable: *mut c_int, ) -> c_int

Source

pub unsafe fn g2d_enable(&self, handle: *mut c_void, cap: g2d_cap_mode) -> c_int

Source

pub unsafe fn g2d_disable( &self, handle: *mut c_void, cap: g2d_cap_mode, ) -> c_int

Source

pub unsafe fn g2d_cache_op( &self, buf: *mut g2d_buf, op: g2d_cache_mode, ) -> c_int

Source

pub unsafe fn g2d_alloc(&self, size: c_int, cacheable: c_int) -> *mut g2d_buf

Source

pub unsafe fn g2d_buf_from_fd(&self, fd: c_int) -> *mut g2d_buf

Source

pub unsafe fn g2d_buf_export_fd(&self, arg1: *mut g2d_buf) -> c_int

Source

pub unsafe fn g2d_buf_from_virt_addr( &self, vaddr: *mut c_void, size: c_int, ) -> *mut g2d_buf

Source

pub unsafe fn g2d_free(&self, buf: *mut g2d_buf) -> c_int

Source

pub unsafe fn g2d_flush(&self, handle: *mut c_void) -> c_int

Source

pub unsafe fn g2d_finish(&self, handle: *mut c_void) -> c_int

Trait Implementations§

Source§

impl Debug for g2d

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for g2d

§

impl !RefUnwindSafe for g2d

§

impl Send for g2d

§

impl Sync for g2d

§

impl Unpin for g2d

§

impl !UnwindSafe for g2d

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.