layout: Place items using simple loops

The C version of looping over buttons and other items was weakly typed, causing runtime errors, and also C doesn't know how to iterate in abstract, so it was full of callbacks with user-defined data. Moving this to Rust, iteration is made of simple loops, and compile-time type-checked, at the cost of some more verbose code.
This commit is contained in:
Dorota Czaplejewicz
2019-08-18 13:20:32 +00:00
parent 531a87825c
commit 4a61ab269b
4 changed files with 116 additions and 109 deletions

View File

@ -71,5 +71,7 @@ void squeek_view_foreach(struct squeek_view*,
struct squeek_row *squeek_view_get_row(struct squeek_view *view,
struct squeek_button *button);
void squeek_row_place_buttons(struct squeek_row *row, LevelKeyboard *keyboard);
void
squeek_view_place_contents(struct squeek_view *view, LevelKeyboard *keyboard);
#endif