diff --git a/include/tim.h b/include/tim.h index 89e72df..0bc3c71 100644 --- a/include/tim.h +++ b/include/tim.h @@ -245,7 +245,7 @@ bool tim_radiobutton(cstr txt, i32* state, i32 v, i32 x, i32 y, i32 w, u64 color /// @param e persistent edit state, use TimEditState_init() to create new state /// @param color frame, background, text /// @return key id or 0 -i32 tim_edit(TimEditState* e, i32 x, i32 y, i32 w, u64 color); +TimKey tim_edit(TimEditState* e, i32 x, i32 y, i32 w, u64 color); void TimEditState_init(TimEditState* e, i32 capacity, cstr initial_content); diff --git a/src/edit.c b/src/edit.c index 1077f6c..7b0a8a1 100755 --- a/src/edit.c +++ b/src/edit.c @@ -36,7 +36,7 @@ void TimEditState_delete(TimEditState* e) { } /// @return key id or 0 -static i32 edit_event(TimEditState* e, TimRect r) { +static TimKey edit_event(TimEditState* e, TimRect r) { if (tim_is_mouse_click_over(r)) { // take focus tim->focus = e; @@ -85,7 +85,7 @@ static i32 edit_event(TimEditState* e, TimRect r) { return tim->event.key; } -i32 tim_edit(TimEditState* e, i32 x, i32 y, i32 w, u64 color) { +TimKey tim_edit(TimEditState* e, i32 x, i32 y, i32 w, u64 color) { TimRect r = tim_scope_rect_to_absolute(x, y, w, 3); if (tim->event.type == TimEvent_Draw) {