Skip to content

Commit

Permalink
cursor: Clean up new "fallback"/"callback" docs
Browse files Browse the repository at this point in the history
  • Loading branch information
MarijnS95 committed May 7, 2024
1 parent 954178a commit e85ab40
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions wayland-cursor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,9 @@ impl CursorTheme {
///
/// This method returns [`None`] if this cursor is not provided either by the theme, or by one of its parents.
///
/// If a fallback is set, it will use the data from fallback
/// If a [fallback is set], it will use the data returned by the fallback.
///
/// [fallback is set]: Self::set_callback()
pub fn get_cursor(&mut self, name: &str) -> Option<&Cursor> {
match self.cursors.iter().position(|cursor| cursor.name == name) {
Some(i) => Some(&self.cursors[i]),
Expand All @@ -213,8 +215,8 @@ impl CursorTheme {

/// Set a callback to load the cursor data, in case the system theme is missing a cursor that you need.
///
/// Your callback will be invoked with he name and size of the requested cursor and should return a byte
/// array with the contents of an `xcursor` file, or `None` if you don't provide a fallback for this cursor.
/// Your callback will be invoked with the name and size of the requested cursor and should return a byte
/// array with the contents of an `xcursor` file, or [`None`] if you don't provide a fallback for this cursor.
///
/// For example, this defines a generic fallback cursor image and uses it for all missing cursors:
/// ```ignore
Expand Down

0 comments on commit e85ab40

Please sign in to comment.