Functions | |
TANVASTOUCH_API int | tanvastouch_create_view (tanvastouch_ctx *ctx, tanvastouch_resource_id *p_view_id) |
TANVASTOUCH_API int | tanvastouch_destroy_view (tanvastouch_ctx *ctx, tanvastouch_resource_id view_id) |
TANVASTOUCH_API int | tanvastouch_set_view_enabled (tanvastouch_ctx *ctx, tanvastouch_resource_id view_id, bool enabled) |
TANVASTOUCH_API int | tanvastouch_is_view_enabled (tanvastouch_ctx *ctx, tanvastouch_resource_id view_id, bool *p_enabled) |
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_size (tanvastouch_ctx *ctx, tanvastouch_resource_id view_id, int width, int height) |
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_create_view | ( | tanvastouch_ctx * | ctx, |
tanvastouch_resource_id * | p_view_id | ||
) |
Create a view.
A view starts in an enabled state. The view is initially positioned at (0, 0), and has a size of (INT_MAX, INT_MAX).
ctx | The context to use. |
p_view_id | Storage for the new view's ID. |
TANVASTOUCH_API int tanvastouch_destroy_view | ( | tanvastouch_ctx * | ctx, |
tanvastouch_resource_id | view_id | ||
) |
Destroy a view.
Destroying views does not destroy any sprites contained in that view.
ctx | The context to use. |
view_id | The view to destroy. |
TANVASTOUCH_API int tanvastouch_get_view_position | ( | tanvastouch_ctx * | ctx, |
tanvastouch_resource_id | view_id, | ||
float * | p_x, | ||
float * | p_y | ||
) |
Get a view's position.
ctx | The context to use. |
view_id | The view to query. |
p_x | Storage for the X position. |
p_y | Storage for the Y position. |
TANVASTOUCH_API int tanvastouch_get_view_size | ( | tanvastouch_ctx * | ctx, |
tanvastouch_resource_id | view_id, | ||
int * | p_width, | ||
int * | p_height | ||
) |
Get a view's size.
ctx | The context to use. |
view_id | The view to query. |
p_width | Width storage. |
p_height | Height storage. |
TANVASTOUCH_API int tanvastouch_is_view_enabled | ( | tanvastouch_ctx * | ctx, |
tanvastouch_resource_id | view_id, | ||
bool * | p_enabled | ||
) |
Get whether a view will participate in haptic rendering.
ctx | The context to use. |
view_id | The view to query. |
p_enabled | Storage for the status. |
TANVASTOUCH_API int tanvastouch_set_view_enabled | ( | tanvastouch_ctx * | ctx, |
tanvastouch_resource_id | view_id, | ||
bool | enabled | ||
) |
Set whether the given view will participate in haptic rendering.
ctx | The context to use. |
view_id | The view to modify. |
enabled | True to enable, false to disable. |
TANVASTOUCH_API int tanvastouch_set_view_position_on_desktop | ( | tanvastouch_ctx * | ctx, |
tanvastouch_resource_id | view_id, | ||
float | x, | ||
float | y | ||
) |
Set a view's position.
ctx | The context to use. |
view_id | The view to modify. |
x | X position. |
y | Y position. |
TANVASTOUCH_API int tanvastouch_set_view_size | ( | tanvastouch_ctx * | ctx, |
tanvastouch_resource_id | view_id, | ||
int | width, | ||
int | height | ||
) |
Set a view's size.
ctx | The context to use. |
view_id | The view to modify. |
width | Desired width. |
height | Desired height. |