[][src]Struct qt_gui::QSurface

#[repr(C)]pub struct QSurface { /* fields omitted */ }

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.

Methods

impl QSurface[src]

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

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.

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

Returns the format of the surface.

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

C++ documentation:

Returns the format of the surface.

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

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.

pub unsafe fn static_meta_object() -> Ref<QMetaObject>[src]

This is supported 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.

pub unsafe fn supports_opengl(&self) -> bool[src]

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.

pub unsafe fn surface_class(&self) -> SurfaceClass[src]

Returns the surface class of this surface.

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

C++ documentation:

Returns the surface class of this surface.

pub unsafe fn surface_type(&self) -> SurfaceType[src]

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

impl CppDeletable for QSurface[src]

unsafe fn delete(&self)[src]

Destroys the surface.

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

C++ documentation:

Destroys the surface.

impl DynamicCast<QOffscreenSurface> for QSurface[src]

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

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

impl DynamicCast<QOpenGLWindow> for QSurface[src]

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

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

impl DynamicCast<QPaintDeviceWindow> for QSurface[src]

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

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

impl DynamicCast<QRasterWindow> for QSurface[src]

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

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

impl DynamicCast<QWindow> for QSurface[src]

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

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

impl Size for QSurface[src]

unsafe fn size(&self) -> usize[src]

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.

impl StaticDowncast<QOffscreenSurface> for QSurface[src]

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

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

impl StaticDowncast<QOpenGLWindow> for QSurface[src]

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

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

impl StaticDowncast<QPaintDeviceWindow> for QSurface[src]

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

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

impl StaticDowncast<QRasterWindow> for QSurface[src]

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

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

impl StaticDowncast<QWindow> for QSurface[src]

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

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

impl StaticUpcast<QSurface> for QWindow[src]

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

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

impl StaticUpcast<QSurface> for QOffscreenSurface[src]

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

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

impl StaticUpcast<QSurface> for QPaintDeviceWindow[src]

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

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

impl StaticUpcast<QSurface> for QOpenGLWindow[src]

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

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

impl StaticUpcast<QSurface> for QRasterWindow[src]

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

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

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.