diff options
| author | Federico Angelilli <code@fedang.net> | 2023-11-17 15:42:49 +0100 |
|---|---|---|
| committer | Federico Angelilli <code@fedang.net> | 2023-11-17 15:42:49 +0100 |
| commit | ab92cac18652f72be12f68b5a96095ba8eb5afdf (patch) | |
| tree | e52a5f295c7cda59e67a341fa87d25983bd56745 /src/state.c | |
| parent | f8363e89257e8b0a4ff71accbd7b6be22935274f (diff) | |
Reorganize project structure
Diffstat (limited to 'src/state.c')
| -rw-r--r-- | src/state.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/state.c b/src/state.c new file mode 100644 index 0000000..bb31fa6 --- /dev/null +++ b/src/state.c @@ -0,0 +1,21 @@ +#include <glib.h> + +#include "state.h" + +State *state_create(Window *win, Drawable *draw) +{ + State *state = g_malloc(sizeof(State)); + g_assert_nonnull(state); + + state->win = win; + state->draw = draw; + + return state; +} + +void state_destroy(State *state) +{ + g_free(state); +} + +// vim: ts=4 sw=4 et |
