Struct cogl::Context[][src]

pub struct Context(_, _);

Implementations

impl Context[src]

pub fn new(display: Option<&Display>) -> Result<Context, Error>[src]

Creates a new Context which acts as an application sandbox for any state objects that are allocated.

display

A Display pointer

Returns

A newly allocated Context

pub fn get_display(&self) -> Option<Display>[src]

Retrieves the Display that is internally associated with the given self. This will return the same Display that was passed to Context::new or if None was passed to Context::new then this function returns a pointer to the display that was automatically setup internally.

Returns

The Display associated with the given self.

pub fn get_renderer(&self) -> Option<Renderer>[src]

Retrieves the Renderer that is internally associated with the given self. This will return the same Renderer that was passed to Display::new or if None was passed to Display::new or Context::new then this function returns a pointer to the renderer that was automatically connected internally.

Returns

The Renderer associated with the given self.

Trait Implementations

impl Clone for Context[src]

impl Debug for Context[src]

impl Display for Context[src]

impl Eq for Context[src]

impl Hash for Context[src]

impl IsA<Object> for Context[src]

impl Ord for Context[src]

impl<T: ObjectType> PartialEq<T> for Context[src]

impl<T: ObjectType> PartialOrd<T> for Context[src]

impl StaticType for Context[src]

Auto Trait Implementations

impl RefUnwindSafe for Context

impl !Send for Context

impl !Sync for Context

impl Unpin for Context

impl UnwindSafe for Context

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>, 
[src]

impl<T> Cast for T where
    T: ObjectType
[src]

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
[src]

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: SetValue + Send + ToValue + ?Sized
[src]

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

impl<T> ToValue for T where
    T: SetValue + ?Sized
[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.