#include #include #include #include #include "../../core/include/swiftly.h" #ifndef SWIFTLY_VIEWPORT_H #define SWIFTLY_VIEWPORT_H #include #include #include #include typedef struct ViewportHandle ViewportHandle; struct ViewportHandle *viewport_create(void *nsview, float width, float height, float scale); void viewport_destroy(struct ViewportHandle *handle); void viewport_render(struct ViewportHandle *handle); void viewport_resize(struct ViewportHandle *handle, float width, float height, float scale); void viewport_mouse_event(struct ViewportHandle *handle, float x, float y, uint8_t button, bool pressed); void viewport_key_event(struct ViewportHandle *handle, uint32_t key, uint32_t modifiers, bool pressed, const char *text); void viewport_scroll_event(struct ViewportHandle *handle, float x, float y, float delta_x, float delta_y); #endif /* SWIFTLY_VIEWPORT_H */