button: Add const qualifiers where needed
This commit is contained in:
@ -52,7 +52,7 @@ void squeek_button_set_bounds(struct squeek_button* button, EekBounds bounds);
|
||||
|
||||
struct squeek_symbol *squeek_button_get_symbol (
|
||||
const struct squeek_button *button);
|
||||
struct squeek_key *squeek_button_get_key(struct squeek_button*);
|
||||
struct squeek_key *squeek_button_get_key(const struct squeek_button*);
|
||||
uint32_t *squeek_button_has_key(const struct squeek_button* button,
|
||||
const struct squeek_key *key);
|
||||
void squeek_button_print(const struct squeek_button* button);
|
||||
|
||||
@ -263,9 +263,9 @@ pub mod c {
|
||||
#[no_mangle]
|
||||
pub extern "C"
|
||||
fn squeek_button_get_key(
|
||||
button: *mut ::layout::Button
|
||||
button: *const ::layout::Button
|
||||
) -> ::keyboard::c::CKeyState {
|
||||
let button = unsafe { &mut *button };
|
||||
let button = unsafe { &*button };
|
||||
::keyboard::c::CKeyState::wrap(button.state.clone())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user