Rename HitTestResult to Hit

... and also move it to a new `text` module in `iced_core`
This commit is contained in:
Héctor Ramón Jiménez 2021-08-26 14:41:33 +07:00
parent aa63841e2c
commit 7614127d36
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
14 changed files with 48 additions and 48 deletions

View file

@ -1,7 +1,8 @@
//! Write a graphics backend.
use iced_native::image;
use iced_native::svg;
use iced_native::{Font, HitTestResult, Point, Size};
use iced_native::text;
use iced_native::{Font, Point, Size};
/// The graphics backend of a [`Renderer`].
///
@ -59,7 +60,7 @@ pub trait Text {
bounds: Size,
point: Point,
nearest_only: bool,
) -> HitTestResult;
) -> text::Hit;
}
/// A graphics backend that supports image rendering.

View file

@ -40,6 +40,6 @@ pub use transformation::Transformation;
pub use viewport::Viewport;
pub use iced_native::{
Background, Color, Font, HitTestResult, HorizontalAlignment, Point,
Rectangle, Size, Vector, VerticalAlignment,
Background, Color, Font, HorizontalAlignment, Point, Rectangle, Size,
Vector, VerticalAlignment,
};

View file

@ -4,8 +4,7 @@ use crate::{Primitive, Renderer};
use iced_native::mouse;
use iced_native::text;
use iced_native::{
Color, Font, HitTestResult, HorizontalAlignment, Point, Rectangle, Size,
VerticalAlignment,
Color, Font, HorizontalAlignment, Point, Rectangle, Size, VerticalAlignment,
};
/// A paragraph of text.
@ -44,7 +43,7 @@ where
bounds: Size,
point: Point,
nearest_only: bool,
) -> HitTestResult {
) -> text::Hit {
self.backend().hit_test(
content,
size,