Skip to content

Commit

Permalink
Merge pull request #57 from AppyPeeps/jelder/ragne-range-typo
Browse files Browse the repository at this point in the history
Fix typo in method names (ragne -> range)
  • Loading branch information
leexgone authored Apr 27, 2024
2 parents 90f6dda + cc93a9e commit 064b39b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/uiautomation/src/actions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ pub trait TableItem {
/// Define a Text action for uielement.
pub trait Text {
/// Retrieves the degenerate (empty) text range nearest to the specified screen coordinates.
fn get_ragne_from_point(&self, pt: Point) -> Result<UITextRange>;
fn get_range_from_point(&self, pt: Point) -> Result<UITextRange>;

/// Retrieves a text range enclosing a child element such as an image, hyperlink, Microsoft Excel spreadsheet, or other embedded object.
fn get_range_from_child(&self, child: &UIElement) -> Result<UITextRange>;
Expand Down
2 changes: 1 addition & 1 deletion crates/uiautomation/src/patterns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1687,7 +1687,7 @@ pub struct UITextPattern {
}

impl UITextPattern {
pub fn get_ragne_from_point(&self, pt: Point) -> Result<UITextRange> {
pub fn get_range_from_point(&self, pt: Point) -> Result<UITextRange> {
let range = unsafe {
self.pattern.RangeFromPoint(pt.into())?
};
Expand Down
4 changes: 2 additions & 2 deletions crates/uiautomation_derive/src/action_derives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -511,9 +511,9 @@ pub(crate) fn impl_text(ast: &syn::DeriveInput) -> TokenStream {
let name = &ast.ident;
let gen = quote! {
impl Text for #name {
fn get_ragne_from_point(&self, pt: super::types::Point) -> Result<UITextRange> {
fn get_range_from_point(&self, pt: super::types::Point) -> Result<UITextRange> {
let pattern: UITextPattern = self.as_ref().get_pattern()?;
pattern.get_ragne_from_point(pt)
pattern.get_range_from_point(pt)
}

fn get_range_from_child(&self, child: &UIElement) -> Result<UITextRange> {
Expand Down

0 comments on commit 064b39b

Please sign in to comment.