Go to the documentation of this file.
14 #ifndef TANVAS_TANVASTOUCH_H
15 #define TANVAS_TANVASTOUCH_H
125 #if defined(TANVASTOUCH_STATIC)
126 #define TANVASTOUCH_API
128 #if defined(TANVASTOUCH_EXPORTS_DLL)
130 #define TANVASTOUCH_API __declspec(dllexport)
131 #elif defined(__GNUC__)
132 #define TANVASTOUCH_API __attribute__((visibility("default")))
134 #error "Don't know the convention for exporting symbols from a DLL/shared object"
138 #define TANVASTOUCH_API __declspec(dllimport)
139 #elif defined(__GNUC__)
140 #define TANVASTOUCH_API
142 #error "Don't know the convention for importing symbols from a DLL/shared object"
397 int width,
int height);
411 int* p_width,
int* p_height);
611 float pivot_x,
float pivot_y);
640 float* p_pivot_x,
float* p_pivot_y);
869 int index,
int mode);
882 int index,
int* p_mode);
934 const unsigned char* p_data,
int width,
965 const unsigned char* p_data,
966 uint32_t length, uint32_t offset);
enum tanvastouch_wrap_mode_e tanvastouch_wrap_mode
Definition: tanvastouch.h:855
TANVASTOUCH_API int tanvastouch_get_material_wrapping_mode(tanvastouch_ctx *ctx, tanvastouch_resource_id material_id, int index, int *p_mode)
TANVASTOUCH_API int tanvastouch_set_texture_data(tanvastouch_ctx *ctx, tanvastouch_resource_id texture_id, const unsigned char *p_data, int width, int height)
TANVASTOUCH_API int tanvastouch_set_sprite_enabled(tanvastouch_ctx *ctx, tanvastouch_resource_id sprite_id, bool enabled)
TANVASTOUCH_API int tanvastouch_get_sprite_material(tanvastouch_ctx *ctx, tanvastouch_resource_id sprite_id, tanvastouch_resource_id *p_material_id)
TANVASTOUCH_API int tanvastouch_remove_sprite_material(tanvastouch_ctx *ctx, tanvastouch_resource_id sprite_id)
TANVASTOUCH_API int tanvastouch_close(tanvastouch_ctx *ctx)
TANVASTOUCH_API int tanvastouch_get_sprite_position(tanvastouch_ctx *ctx, tanvastouch_resource_id sprite_id, float *p_x, float *p_y)
TANVASTOUCH_API int tanvastouch_is_view_enabled(tanvastouch_ctx *ctx, tanvastouch_resource_id view_id, bool *p_enabled)
TANVASTOUCH_API int tanvastouch_destroy_texture(tanvastouch_ctx *ctx, tanvastouch_resource_id texture_id)
TANVASTOUCH_API int tanvastouch_get_sprite_theta(tanvastouch_ctx *ctx, tanvastouch_resource_id sprite_id, float *p_theta)
struct tanvastouch_ctx tanvastouch_ctx
Definition: tanvastouch.h:157
uint64_t tanvastouch_resource_id
Definition: tanvastouch.h:166
TANVASTOUCH_API int tanvastouch_create_material(tanvastouch_ctx *ctx, tanvastouch_resource_id *p_material_id)
TANVASTOUCH_API int tanvastouch_set_sprite_position(tanvastouch_ctx *ctx, tanvastouch_resource_id sprite_id, float x, float y)
TANVASTOUCH_API int tanvastouch_remove_sprite(tanvastouch_ctx *ctx, tanvastouch_resource_id view_id, tanvastouch_resource_id sprite_id)
TANVASTOUCH_API int tanvastouch_get_view_size(tanvastouch_ctx *ctx, tanvastouch_resource_id view_id, int *p_width, int *p_height)
TANVASTOUCH_API int tanvastouch_set_material_uv(tanvastouch_ctx *ctx, tanvastouch_resource_id material_id, int index, float *p_uv)
void(* tanvastouch_log_cb)(void *data, const char *str)
Definition: tanvastouch.h:268
TANVASTOUCH_API int tanvastouch_get_sprite_count(tanvastouch_ctx *ctx, tanvastouch_resource_id view_id, int *p_count)
TANVASTOUCH_API int tanvastouch_add_material_texture(tanvastouch_ctx *ctx, tanvastouch_resource_id material_id, int index, tanvastouch_resource_id texture_id)
TANVASTOUCH_API int tanvastouch_create_texture(tanvastouch_ctx *ctx, tanvastouch_resource_id *p_texture_id)
TANVASTOUCH_API int tanvastouch_open(const char *engine_name, tanvastouch_ctx **p_ctx)
TANVASTOUCH_API int tanvastouch_set_sprite_material(tanvastouch_ctx *ctx, tanvastouch_resource_id sprite_id, tanvastouch_resource_id material_id)
TANVASTOUCH_API int tanvastouch_get_texture_data_size(tanvastouch_ctx *ctx, tanvastouch_resource_id texture_id, uint32_t *p_size)
TANVASTOUCH_API int tanvastouch_create_sprite(tanvastouch_ctx *ctx, tanvastouch_resource_id *p_sprite_id)
Definition: tanvastouch.h:852
TANVASTOUCH_API int tanvastouch_get_material_texture(tanvastouch_ctx *ctx, tanvastouch_resource_id material_id, int index, tanvastouch_resource_id *p_texture_id)
TANVASTOUCH_API int tanvastouch_set_material_wrapping_mode(tanvastouch_ctx *ctx, tanvastouch_resource_id material_id, int index, int mode)
TANVASTOUCH_API int tanvastouch_destroy_view(tanvastouch_ctx *ctx, tanvastouch_resource_id view_id)
TANVASTOUCH_API int tanvastouch_contains_sprite(tanvastouch_ctx *ctx, tanvastouch_resource_id view_id, tanvastouch_resource_id sprite_id, bool *p_contains)
TANVASTOUCH_API int tanvastouch_get_sprite_pivot(tanvastouch_ctx *ctx, tanvastouch_resource_id sprite_id, float *p_pivot_x, float *p_pivot_y)
TANVASTOUCH_API int tanvastouch_add_sprite(tanvastouch_ctx *ctx, tanvastouch_resource_id view_id, tanvastouch_resource_id sprite_id)
Status codes used in the TanvasTouch Engine API.
TANVASTOUCH_API int tanvastouch_get_sprite_depth(tanvastouch_ctx *ctx, tanvastouch_resource_id sprite_id, float *p_depth)
TANVASTOUCH_API int tanvastouch_get_texture_size(tanvastouch_ctx *ctx, tanvastouch_resource_id texture_id, int *p_width, int *p_height)
TANVASTOUCH_API int tanvastouch_destroy_sprite(tanvastouch_ctx *ctx, tanvastouch_resource_id sprite_id)
TANVASTOUCH_API int tanvastouch_create_view(tanvastouch_ctx *ctx, tanvastouch_resource_id *p_view_id)
TANVASTOUCH_API int tanvastouch_set_sprite_rotation(tanvastouch_ctx *ctx, tanvastouch_resource_id sprite_id, float theta, float pivot_x, float pivot_y)
const TANVASTOUCH_API char * tanvastouch_strerror(int err)
TANVASTOUCH_API int tanvastouch_set_view_size(tanvastouch_ctx *ctx, tanvastouch_resource_id view_id, int width, int height)
TANVASTOUCH_API int tanvastouch_get_sprite_size(tanvastouch_ctx *ctx, tanvastouch_resource_id sprite_id, int *p_width, int *p_height)
TANVASTOUCH_API int tanvastouch_set_view_position_on_desktop(tanvastouch_ctx *ctx, tanvastouch_resource_id view_id, float x, float y)
TANVASTOUCH_API int tanvastouch_get_view_position(tanvastouch_ctx *ctx, tanvastouch_resource_id view_id, float *p_x, float *p_y)
TANVASTOUCH_API int tanvastouch_set_view_enabled(tanvastouch_ctx *ctx, tanvastouch_resource_id view_id, bool enabled)
TANVASTOUCH_API int tanvastouch_remove_material_texture(tanvastouch_ctx *ctx, tanvastouch_resource_id material_id, int index)
TANVASTOUCH_API tanvastouch_log_cb tanvastouch_set_log_cb(tanvastouch_ctx *ctx, tanvastouch_log_cb cb, void *data)
TANVASTOUCH_API int tanvastouch_set_sprite_depth(tanvastouch_ctx *ctx, tanvastouch_resource_id sprite_id, float depth)
Definition: tanvastouch.h:847
TANVASTOUCH_API int tanvastouch_set_sprite_size(tanvastouch_ctx *ctx, tanvastouch_resource_id sprite_id, int width, int height)
TANVASTOUCH_API int tanvastouch_destroy_material(tanvastouch_ctx *ctx, tanvastouch_resource_id material_id)
TANVASTOUCH_API bool tanvastouch_is_valid(tanvastouch_resource_id id)
TANVASTOUCH_API int tanvastouch_get_material_uv(tanvastouch_ctx *ctx, tanvastouch_resource_id material_id, int index, float *p_uv)
tanvastouch_wrap_mode_e
Definition: tanvastouch.h:843
TANVASTOUCH_API int tanvastouch_set_texture_data_partial(tanvastouch_ctx *ctx, tanvastouch_resource_id texture_id, const unsigned char *p_data, uint32_t length, uint32_t offset)
TANVASTOUCH_API int tanvastouch_is_sprite_enabled(tanvastouch_ctx *ctx, tanvastouch_resource_id sprite_id, bool *p_enabled)