Skip to main content

CursorBuilder

Struct CursorBuilder 

Source
pub struct CursorBuilder { /* private fields */ }
Expand description

A builder-pattern type to construct Cursor objects.

Implementations§

Source§

impl CursorBuilder

Source

pub fn fallback(self, fallback: &Cursor) -> Self

Cursor to fall back to if this cursor cannot be displayed.

Source

pub fn hotspot_x(self, hotspot_x: i32) -> Self

X position of the cursor hotspot in the cursor image.

Source

pub fn hotspot_y(self, hotspot_y: i32) -> Self

Y position of the cursor hotspot in the cursor image.

Source

pub fn name(self, name: impl Into<GString>) -> Self

Name of this this cursor.

The name will be None if the cursor was created from a texture.

Source

pub fn texture(self, texture: &impl IsA<Texture>) -> Self

The texture displayed by this cursor.

The texture will be None if the cursor was created from a name.

Source

pub fn build(self) -> Cursor

Build the Cursor.

Auto Trait Implementations§

§

impl !Send for CursorBuilder

§

impl !Sync for CursorBuilder

§

impl Forget for CursorBuilder

§

impl Freeze for CursorBuilder
where &'static str: Freeze, *mut c_void: Freeze, *const (&'static str, Value) is !null: Freeze, PhantomData<Cursor>: Freeze,

§

impl Move for CursorBuilder

§

impl RefUnwindSafe for CursorBuilder
where (&'static str, Value): RefUnwindSafe,

§

impl Unpin for CursorBuilder
where &'static str: Unpin, *mut c_void: Unpin, *const (&'static str, Value) is !null: Unpin, *const GObject is !null: Unpin,

§

impl UnsafeUnpin for CursorBuilder

§

impl UnwindSafe for CursorBuilder
where &'static str: UnwindSafe, *mut c_void: UnwindSafe, NonNull<(&'static str, Value)>: UnwindSafe, NonNull<GObject>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.