]> git.lizzy.rs Git - nothing.git/blob - src/ui/edit_field.h
Remove TODO(#344)
[nothing.git] / src / ui / edit_field.h
1 #ifndef EDIT_FIELD_H_
2 #define EDIT_FIELD_H_
3
4 #include <SDL2/SDL.h>
5
6 #include "color.h"
7 #include "math/point.h"
8
9
10 typedef struct Edit_field Edit_field;
11 typedef struct Sprite_font Sprite_font;
12
13 Edit_field *create_edit_field(const Sprite_font *font,
14                               Vec font_size,
15                               Color font_color);
16 void destroy_edit_field(Edit_field *edit_field);
17
18 int edit_field_render(const Edit_field *edit_field,
19                       SDL_Renderer *renderer,
20                       Point position);
21
22 int edit_field_handle_event(Edit_field *edit_field,
23                             const SDL_Event *event);
24
25 const char *edit_field_as_text(const Edit_field *edit_field);
26
27 void edit_field_replace(Edit_field *edit_field, const char *text);
28 void edit_field_clean(Edit_field *edit_field);
29
30 #endif  // EDIT_FIELD_H_