]> git.lizzy.rs Git - nothing.git/blob - src/game/edit_field.h
(#328) Make scope more typesafe
[nothing.git] / src / game / 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 typedef struct Edit_field Edit_field;
10 typedef struct Sprite_font Sprite_font;
11
12 Edit_field *create_edit_field(const Sprite_font *font,
13                                 Vec font_size,
14                                 Color font_color);
15 void destroy_edit_field(Edit_field *edit_field);
16
17 int edit_field_render(const Edit_field *edit_field,
18                       SDL_Renderer *renderer,
19                       Point position);
20
21 int edit_field_handle_event(Edit_field *edit_field,
22                             const SDL_Event *event);
23
24 const char *edit_field_as_text(const Edit_field *edit_field);
25
26 #endif  // EDIT_FIELD_H_