main soggy/cotton / src / cottonwindow.h
 1#ifndef COTTONWINDOW_H
 2#define COTTONWINDOW_H
 3
 4#include <SDL2/SDL.h>
 5#include <stdint.h>
 6
 7typedef struct
 8{
 9    SDL_Window *window;
10    SDL_Renderer *renderer;
11    SDL_Texture *texture;
12
13} CottonWindow;
14
15int cottonwindow_init
16(CottonWindow *cw, const char *title, int window_w, int window_h, int texture_w, int texture_h);
17void cottonwindow_update
18(CottonWindow *cw, const void *buffer, int pitch);
19int cottonwindow_process_input
20(CottonWindow *cw, uint8_t *keys);
21void cottonwindow_destroy
22(CottonWindow *cw);
23
24#endif