Check for button position more in Rust

The check against fitting inside the Layout was removed: as an optimization it is unneeded, as the actual search must be optimized to be quick. In addition, the view bounds don't correspond to anything physical as long as negative offsets are allowed.
This commit is contained in:
Dorota Czaplejewicz
2019-08-29 12:19:42 +00:00
committed by David Boddie
parent 2d7dddd505
commit 75992ff13f
4 changed files with 103 additions and 78 deletions

View File

@ -25,7 +25,6 @@ uint32_t squeek_row_contains(struct squeek_row*, struct squeek_button *button);
struct button_place squeek_view_find_key(struct squeek_view*, struct squeek_key *state);
struct squeek_button *squeek_row_find_button_by_position(struct squeek_row *row, EekPoint point, EekPoint origin);
typedef void (*ButtonCallback) (struct squeek_button *button, gpointer user_data);
void squeek_row_foreach(struct squeek_row*,
@ -74,4 +73,6 @@ struct squeek_row *squeek_view_get_row(struct squeek_view *view,
void
squeek_view_place_contents(struct squeek_view *view, LevelKeyboard *keyboard);
struct squeek_button *squeek_view_find_button_by_position(struct squeek_view *view, EekPoint point);
#endif