[]Struct gdk::Cursor

pub struct Cursor(_, _);

A Cursor represents a cursor. Its contents are private.

Implementations

impl Cursor[src]

pub fn new(cursor_type: CursorType) -> Cursor[src]

Creates a new cursor from the set of builtin cursors for the default display. See Cursor::new_for_display.

To make the cursor invisible, use CursorType::BlankCursor.

Deprecated since 3.16

Use Cursor::new_for_display instead.

cursor_type

cursor to create

Returns

a new Cursor

pub fn new_for_display(display: &Display, cursor_type: CursorType) -> Cursor[src]

Creates a new cursor from the set of builtin cursors.

display

the Display for which the cursor will be created

cursor_type

cursor to create

Returns

a new Cursor

pub fn from_name(display: &Display, name: &str) -> Option<Cursor>[src]

pub fn from_pixbuf(display: &Display, pixbuf: &Pixbuf, x: i32, y: i32) -> Cursor[src]

pub fn from_surface(
    display: &Display,
    surface: &Surface,
    x: f64,
    y: f64
) -> Cursor
[src]

pub fn get_cursor_type(&self) -> CursorType[src]

Returns the cursor type for this cursor.

Returns

a CursorType

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

Returns the display on which the Cursor is defined.

Returns

the Display associated to self

pub fn get_image(&self) -> Option<Pixbuf>[src]

Returns a gdk_pixbuf::Pixbuf with the image used to display the cursor.

Note that depending on the capabilities of the windowing system and on the cursor, GDK may not be able to obtain the image data. In this case, None is returned.

Returns

a gdk_pixbuf::Pixbuf representing self, or None

pub fn get_surface(&self) -> (Option<Surface>, f64, f64)[src]

Returns a cairo image surface with the image used to display the cursor.

Note that depending on the capabilities of the windowing system and on the cursor, GDK may not be able to obtain the image data. In this case, None is returned.

x_hot

Location to store the hotspot x position, or None

y_hot

Location to store the hotspot y position, or None

Returns

a cairo::Surface representing self, or None

Trait Implementations

impl Clone for Cursor

impl Debug for Cursor

impl Display for Cursor[src]

impl Eq for Cursor

impl Hash for Cursor

impl Ord for Cursor

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

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

impl StaticType for Cursor

Auto Trait Implementations

impl RefUnwindSafe for Cursor

impl !Send for Cursor

impl !Sync for Cursor

impl Unpin for Cursor

impl UnwindSafe for Cursor

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.