[]Struct gdk::DrawingContext

pub struct DrawingContext(_, _);

DrawingContext is an object that represents the current drawing state of a Window.

It's possible to use a DrawingContext to draw on a Window via rendering API like Cairo or OpenGL.

A DrawingContext can only be created by calling WindowExt::begin_draw_frame and will be valid until a call to WindowExt::end_draw_frame.

DrawingContext is available since GDK 3.22

Feature: v3_22

Implementations

impl DrawingContext[src]

pub fn get_cairo_context(&self) -> Option<Context>[src]

Retrieves a Cairo context to be used to draw on the Window that created the DrawingContext.

The returned context is guaranteed to be valid as long as the DrawingContext is valid, that is between a call to WindowExt::begin_draw_frame and WindowExt::end_draw_frame.

Feature: v3_22

Returns

a Cairo context to be used to draw the contents of the Window. The context is owned by the DrawingContext and should not be destroyed

pub fn get_clip(&self) -> Option<Region>[src]

Retrieves a copy of the clip region used when creating the self.

Feature: v3_22

Returns

a Cairo region

pub fn get_window(&self) -> Option<Window>[src]

Retrieves the window that created the drawing self.

Feature: v3_22

Returns

a Window

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

Checks whether the given DrawingContext is valid.

Feature: v3_22

Returns

true if the context is valid

Trait Implementations

impl Clone for DrawingContext

impl Debug for DrawingContext

impl Display for DrawingContext[src]

impl Eq for DrawingContext

impl Hash for DrawingContext

impl Ord for DrawingContext

impl<T: ObjectType> PartialEq<T> for DrawingContext

impl<T: ObjectType> PartialOrd<T> for DrawingContext

impl StaticType for DrawingContext

Auto Trait Implementations

impl RefUnwindSafe for DrawingContext

impl !Send for DrawingContext

impl !Sync for DrawingContext

impl Unpin for DrawingContext

impl UnwindSafe for DrawingContext

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<Super, Sub> CanDowncast<Sub> for Super where
    Sub: IsA<Super>,
    Super: IsA<Super>, 

impl<T> Cast for T where
    T: ObjectType, 

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

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

impl<T> ObjectExt for T where
    T: ObjectType, 

impl<'a, T> ToGlibContainerFromSlice<'a, *const GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<List>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *const GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<PtrArray>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<Array>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<List>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<PtrArray>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToSendValue for T where
    T: ToValue + SetValue + Send + ?Sized

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToValue for T where
    T: SetValue + ?Sized

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.