Skip to content

Commit

Permalink
Renaming location to position
Browse files Browse the repository at this point in the history
  • Loading branch information
ecton committed Aug 31, 2023
1 parent d739dc2 commit b94350b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ where
WindowHandle(self.window.handle())
}

/// Returns the current location of the window.
/// Returns the current position of the window.
#[must_use]
pub fn location(&self) -> Point<Px> {
self.window.location().into()
pub fn position(&self) -> Point<Px> {
self.window.position().into()
}

/// Sets the current location of the window.
pub fn set_location(&self, location: Point<Px>) {
self.window.set_location(location.into());
/// Sets the current position of the window.
pub fn set_position(&self, position: Point<Px>) {
self.window.set_position(position.into());
}

/// Returns the inner size of the window.
Expand Down Expand Up @@ -130,10 +130,10 @@ where
self.last_frame_rendered_in
}

/// Returns the location of the mouse cursor within this window, if the
/// Returns the position of the mouse cursor within this window, if the
/// cursor is currently above the window.
pub fn cursor_position(&self) -> Option<Point<Px>> {
self.window.cursor_location().map(Point::from)
self.window.cursor_position().map(Point::from)
}

/// Returns true if the given button is currently pressed.
Expand Down

0 comments on commit b94350b

Please sign in to comment.