Acord/viewport/include/acord.h

57 lines
1.5 KiB
C

#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include "../../core/include/acord.h"
#ifndef ACORD_VIEWPORT_H
#define ACORD_VIEWPORT_H
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#define EVAL_RESULT_KIND 24
#define EVAL_ERROR_KIND 25
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);
void viewport_set_text(struct ViewportHandle *handle, const char *text);
void viewport_set_lang(struct ViewportHandle *handle, const char *ext);
char *viewport_get_text(struct ViewportHandle *handle);
void viewport_free_string(char *s);
#endif /* ACORD_VIEWPORT_H */