- Overview
- Files
- Related Pages
- Modules

Typedefs | Functions
Data types

## Typedefs
typedef struct tanvastouch_ctx | tanvastouch_ctx
typedef uint64_t | tanvastouch_resource_id

## Functions
const TANVASTOUCH_API char * | tanvastouch_strerror (int err)
TANVASTOUCH_API bool | tanvastouch_is_valid (tanvastouch_resource_id id)

## Detailed Description

## Typedef Documentation

## ◆ tanvastouch_ctx

typedef struct tanvastouch_ctx tanvastouch_ctx

The API context.

A context is constructed with tanvastouch_open() and destructed with tanvastouch_close(). Each thread needs its own context.

## ◆ tanvastouch_resource_id

typedef uint64_t tanvastouch_resource_id

A resource ID.

This should be treated as an opaque handle.

See also
  TANVASTOUCH_INVALID_RESOURCE_ID

## Function Documentation

## ◆ tanvastouch_is_valid()

TANVASTOUCH_API bool tanvastouch_is_valid | ( | tanvastouch_resource_id | id | ) |

Check whether the given resource ID is not TANVASTOUCH_INVALID_RESOURCE_ID.

Warning
  This function does not communicate with the engine; therefore, it cannot determine whether a resource ID really corresponds to a resource. This may be changed in future versions of the API.

Parameters

  id | The ID to check.

Returns
  True if the ID is not TANVASTOUCH_INVALID_RESOURCE_ID, false otherwise.

## ◆ tanvastouch_strerror()

const TANVASTOUCH_API char* tanvastouch_strerror | ( | int | err | ) |

Return a string corresponding to a TANVASTOUCH_ERROR_* error code.

The returned string is owned by the TanvasTouch API library; do not free it.

This function never returns NULL.

Parameters

  err | The code to look up.

Returns
  An error string for the given code.