pub struct TexturePixmapX11(/* private fields */);
Implementations§
Source§impl TexturePixmapX11
impl TexturePixmapX11
Sourcepub fn new(
context: &Context,
pixmap: u32,
automatic_updates: bool,
) -> Result<TexturePixmapX11, Error>
pub fn new( context: &Context, pixmap: u32, automatic_updates: bool, ) -> Result<TexturePixmapX11, Error>
Creates a texture that contains the contents of pixmap
. If
automatic_updates
is true
then Cogl will attempt to listen for
damage events on the pixmap and automatically update the texture
when it changes.
§context
A Context
§pixmap
A X11 pixmap ID
§automatic_updates
Whether to automatically copy the contents of the pixmap to the texture.
§Returns
a new TexturePixmapX11
instance
Sourcepub fn new_left(
context: &Context,
pixmap: u32,
automatic_updates: bool,
) -> Result<TexturePixmapX11, Error>
pub fn new_left( context: &Context, pixmap: u32, automatic_updates: bool, ) -> Result<TexturePixmapX11, Error>
Creates one of a pair of textures to contain the contents of pixmap
,
which has stereo content. (Different images for the right and left eyes.)
The left image is drawn using this texture; the right image is drawn
using a texture created by calling
TexturePixmapX11::new_right
and passing in this texture as an
argument.
In general, you should not use this function unless you have
queried the GLX_STEREO_TREE_EXT
attribute of the corresponding
window using glXQueryDrawable() and determined that the window is
stereo. Note that this attribute can change over time and
notification is also provided through events defined in the
EXT_stereo_tree GLX extension. As long as the system has support for
stereo content, drawing using the left and right pixmaps will not
produce an error even if the window doesn’t have stereo
content any more, but drawing with the right pixmap will produce
undefined output, so you need to listen for these events and
re-render to avoid race conditions. (Recreating a non-stereo
pixmap is not necessary, but may save resources.)
§context
A Context
§pixmap
A X11 pixmap ID
§automatic_updates
Whether to automatically copy the contents of the pixmap to the texture.
§Returns
a new TexturePixmapX11
instance
Sourcepub fn is_using_tfp_extension(&self) -> bool
pub fn is_using_tfp_extension(&self) -> bool
Checks whether the given self
is using the
GLX_EXT_texture_from_pixmap or similar extension to copy the
contents of the pixmap to the texture. This extension is usually
implemented as zero-copy operation so it implies the updates are
working efficiently.
§Returns
true
if the texture is using an efficient extension
and false
otherwise
Sourcepub fn new_right(&self) -> Option<TexturePixmapX11>
pub fn new_right(&self) -> Option<TexturePixmapX11>
Creates a texture object that corresponds to the right-eye image
of a pixmap with stereo content. self
must have been
created using TexturePixmapX11::new_left
.
§Returns
a new TexturePixmapX11
instance
Sourcepub fn set_damage_object(
&self,
damage: u32,
report_level: TexturePixmapX11ReportLevel,
)
pub fn set_damage_object( &self, damage: u32, report_level: TexturePixmapX11ReportLevel, )
Sets the damage object that will be used to track automatic updates
to the self
. Damage tracking can be disabled by passing 0 for
damage
. Otherwise this damage will replace the one used if true
was passed for automatic_updates to TexturePixmapX11::new
.
Note that Cogl will subtract from the damage region as it processes damage events.
§damage
A X11 Damage object or 0
§report_level
The report level which describes how to interpret the damage events. This should match the level that the damage object was created with.
pub fn error_quark() -> u32
Trait Implementations§
Source§impl Clone for TexturePixmapX11
impl Clone for TexturePixmapX11
Source§fn clone(&self) -> TexturePixmapX11
fn clone(&self) -> TexturePixmapX11
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for TexturePixmapX11
impl Debug for TexturePixmapX11
Source§impl Display for TexturePixmapX11
impl Display for TexturePixmapX11
Source§impl Hash for TexturePixmapX11
impl Hash for TexturePixmapX11
Source§impl Ord for TexturePixmapX11
impl Ord for TexturePixmapX11
Source§fn cmp(&self, other: &TexturePixmapX11) -> Ordering
fn cmp(&self, other: &TexturePixmapX11) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl<T: ObjectType> PartialEq<T> for TexturePixmapX11
impl<T: ObjectType> PartialEq<T> for TexturePixmapX11
Source§impl<T: ObjectType> PartialOrd<T> for TexturePixmapX11
impl<T: ObjectType> PartialOrd<T> for TexturePixmapX11
Source§impl StaticType for TexturePixmapX11
impl StaticType for TexturePixmapX11
Source§fn static_type() -> Type
fn static_type() -> Type
Self
.impl Eq for TexturePixmapX11
impl IsA<Object> for TexturePixmapX11
Auto Trait Implementations§
impl Freeze for TexturePixmapX11
impl RefUnwindSafe for TexturePixmapX11
impl !Send for TexturePixmapX11
impl !Sync for TexturePixmapX11
impl Unpin for TexturePixmapX11
impl UnwindSafe for TexturePixmapX11
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Cast for Twhere
T: ObjectType,
impl<T> Cast for Twhere
T: ObjectType,
Source§fn upcast<T>(self) -> Twhere
T: ObjectType,
Self: IsA<T>,
fn upcast<T>(self) -> Twhere
T: ObjectType,
Self: IsA<T>,
T
. Read moreSource§fn upcast_ref<T>(&self) -> &Twhere
T: ObjectType,
Self: IsA<T>,
fn upcast_ref<T>(&self) -> &Twhere
T: ObjectType,
Self: IsA<T>,
T
. Read moreSource§fn downcast<T>(self) -> Result<T, Self>where
T: ObjectType,
Self: CanDowncast<T>,
fn downcast<T>(self) -> Result<T, Self>where
T: ObjectType,
Self: CanDowncast<T>,
T
. Read moreSource§fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Self: CanDowncast<T>,
fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Self: CanDowncast<T>,
T
. Read moreSource§fn dynamic_cast<T>(self) -> Result<T, Self>where
T: ObjectType,
fn dynamic_cast<T>(self) -> Result<T, Self>where
T: ObjectType,
T
. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while downcast
and upcast
will do many checks at compile-time already. Read moreSource§fn dynamic_cast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
fn dynamic_cast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
T
. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while downcast
and upcast
will do many checks at compile-time already. Read moreSource§unsafe fn unsafe_cast<T>(self) -> Twhere
T: ObjectType,
unsafe fn unsafe_cast<T>(self) -> Twhere
T: ObjectType,
T
unconditionally. Read moreSource§unsafe fn unsafe_cast_ref<T>(&self) -> &Twhere
T: ObjectType,
unsafe fn unsafe_cast_ref<T>(&self) -> &Twhere
T: ObjectType,
&T
unconditionally. Read moreSource§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> ObjectExt for Twhere
T: ObjectType,
impl<T> ObjectExt for Twhere
T: ObjectType,
Source§fn is<U>(&self) -> boolwhere
U: StaticType,
fn is<U>(&self) -> boolwhere
U: StaticType,
true
if the object is an instance of (can be cast to) T
.