Struct qt_gui::QSurface

source ·
#[repr(C)]
pub struct QSurface { /* private fields */ }
Expand description

The QSurface class is an abstraction of renderable surfaces in Qt.

C++ class: QSurface.

C++ documentation:

The QSurface class is an abstraction of renderable surfaces in Qt.

The size of the surface is accessible with the size() function. The rendering specific attributes of the surface are accessible through the format() function.

Implementations§

source§

impl QSurface

source

pub unsafe fn copy_from( &self, other: impl CastInto<Ref<QSurface>> ) -> Ref<QSurface>

The QSurface class is an abstraction of renderable surfaces in Qt.

Calls C++ function: QSurface& QSurface::operator=(const QSurface& other).

C++ documentation:

The QSurface class is an abstraction of renderable surfaces in Qt.

The size of the surface is accessible with the size() function. The rendering specific attributes of the surface are accessible through the format() function.

source

pub unsafe fn format(&self) -> CppBox<QSurfaceFormat>

Returns the format of the surface.

Calls C++ function: pure virtual QSurfaceFormat QSurface::format() const.

C++ documentation:

Returns the format of the surface.

source

pub unsafe fn size(&self) -> CppBox<QSize>

Returns the size of the surface in pixels.

Calls C++ function: pure virtual QSize QSurface::size() const.

C++ documentation:

Returns the size of the surface in pixels.

source

pub unsafe fn static_meta_object() -> Ref<QMetaObject>

Available on cpp_lib_version="5.12.2" or cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Returns a reference to the staticMetaObject field.

source

pub unsafe fn supports_opengl(&self) -> bool

Returns true if the surface is OpenGL compatible and can be used in conjunction with QOpenGLContext; otherwise returns false.

Calls C++ function: bool QSurface::supportsOpenGL() const.

C++ documentation:

Returns true if the surface is OpenGL compatible and can be used in conjunction with QOpenGLContext; otherwise returns false.

This function was introduced in Qt 5.3.

source

pub unsafe fn surface_class(&self) -> SurfaceClass

Returns the surface class of this surface.

Calls C++ function: QSurface::SurfaceClass QSurface::surfaceClass() const.

C++ documentation:

Returns the surface class of this surface.

source

pub unsafe fn surface_type(&self) -> SurfaceType

Returns the type of the surface.

Calls C++ function: pure virtual QSurface::SurfaceType QSurface::surfaceType() const.

C++ documentation:

Returns the type of the surface.

Trait Implementations§

source§

impl CppDeletable for QSurface

source§

unsafe fn delete(&self)

Destroys the surface.

Calls C++ function: virtual [destructor] void QSurface::~QSurface().

C++ documentation:

Destroys the surface.

source§

impl DynamicCast<QOffscreenSurface> for QSurface

source§

unsafe fn dynamic_cast(ptr: Ptr<QSurface>) -> Ptr<QOffscreenSurface>

Calls C++ function: QOffscreenSurface* dynamic_cast<QOffscreenSurface*>(QSurface* ptr).

source§

impl DynamicCast<QOpenGLWindow> for QSurface

source§

unsafe fn dynamic_cast(ptr: Ptr<QSurface>) -> Ptr<QOpenGLWindow>

Calls C++ function: QOpenGLWindow* dynamic_cast<QOpenGLWindow*>(QSurface* ptr).

source§

impl DynamicCast<QPaintDeviceWindow> for QSurface

source§

unsafe fn dynamic_cast(ptr: Ptr<QSurface>) -> Ptr<QPaintDeviceWindow>

Calls C++ function: QPaintDeviceWindow* dynamic_cast<QPaintDeviceWindow*>(QSurface* ptr).

source§

impl DynamicCast<QRasterWindow> for QSurface

source§

unsafe fn dynamic_cast(ptr: Ptr<QSurface>) -> Ptr<QRasterWindow>

Calls C++ function: QRasterWindow* dynamic_cast<QRasterWindow*>(QSurface* ptr).

source§

impl DynamicCast<QWindow> for QSurface

source§

unsafe fn dynamic_cast(ptr: Ptr<QSurface>) -> Ptr<QWindow>

Calls C++ function: QWindow* dynamic_cast<QWindow*>(QSurface* ptr).

source§

impl Size for QSurface

source§

unsafe fn size(&self) -> usize

Returns the size of the surface in pixels.

Calls C++ function: pure virtual QSize QSurface::size() const.

C++ documentation:

Returns the size of the surface in pixels.

source§

impl StaticDowncast<QOffscreenSurface> for QSurface

source§

unsafe fn static_downcast(ptr: Ptr<QSurface>) -> Ptr<QOffscreenSurface>

Calls C++ function: QOffscreenSurface* static_cast<QOffscreenSurface*>(QSurface* ptr).

source§

impl StaticDowncast<QOpenGLWindow> for QSurface

source§

unsafe fn static_downcast(ptr: Ptr<QSurface>) -> Ptr<QOpenGLWindow>

Calls C++ function: QOpenGLWindow* static_cast<QOpenGLWindow*>(QSurface* ptr).

source§

impl StaticDowncast<QPaintDeviceWindow> for QSurface

source§

unsafe fn static_downcast(ptr: Ptr<QSurface>) -> Ptr<QPaintDeviceWindow>

Calls C++ function: QPaintDeviceWindow* static_cast<QPaintDeviceWindow*>(QSurface* ptr).

source§

impl StaticDowncast<QRasterWindow> for QSurface

source§

unsafe fn static_downcast(ptr: Ptr<QSurface>) -> Ptr<QRasterWindow>

Calls C++ function: QRasterWindow* static_cast<QRasterWindow*>(QSurface* ptr).

source§

impl StaticDowncast<QWindow> for QSurface

source§

unsafe fn static_downcast(ptr: Ptr<QSurface>) -> Ptr<QWindow>

Calls C++ function: QWindow* static_cast<QWindow*>(QSurface* ptr).

source§

impl StaticUpcast<QSurface> for QOffscreenSurface

source§

unsafe fn static_upcast(ptr: Ptr<QOffscreenSurface>) -> Ptr<QSurface>

Calls C++ function: QSurface* static_cast<QSurface*>(QOffscreenSurface* ptr).

source§

impl StaticUpcast<QSurface> for QOpenGLWindow

source§

unsafe fn static_upcast(ptr: Ptr<QOpenGLWindow>) -> Ptr<QSurface>

Calls C++ function: QSurface* static_cast<QSurface*>(QOpenGLWindow* ptr).

source§

impl StaticUpcast<QSurface> for QPaintDeviceWindow

source§

unsafe fn static_upcast(ptr: Ptr<QPaintDeviceWindow>) -> Ptr<QSurface>

Calls C++ function: QSurface* static_cast<QSurface*>(QPaintDeviceWindow* ptr).

source§

impl StaticUpcast<QSurface> for QRasterWindow

source§

unsafe fn static_upcast(ptr: Ptr<QRasterWindow>) -> Ptr<QSurface>

Calls C++ function: QSurface* static_cast<QSurface*>(QRasterWindow* ptr).

source§

impl StaticUpcast<QSurface> for QWindow

source§

unsafe fn static_upcast(ptr: Ptr<QWindow>) -> Ptr<QSurface>

Calls C++ function: QSurface* static_cast<QSurface*>(QWindow* ptr).

Auto Trait Implementations§

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, U> CastInto<U> for T
where U: CastFrom<T>,

source§

unsafe fn cast_into(self) -> U

Performs the conversion. 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> StaticUpcast<T> for T

source§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where 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 T
where 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.