SketchUp C API

- Main Page
- Related Pages
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Macros | Typedefs | Enumerations
common.h File Reference

Generic interfaces for the API types. More...

`#include <wtypes.h>`
`#include <stddef.h>`
`#include <stdbool.h>`

## Macros
#define | SU_RESULT
| Macro shortcut for enum SUResult.
#define | SU_INVALID
| Use this macro to initialize new reference variables. e.g. SUStringRef str = SU_INVALID;.
#define | SUIsValid(VARIABLE)
| Use this macro to test for valid SU variables. e.g. if (SUIsValid(result)) return true;.
#define | SUIsInvalid(VARIABLE)
| Use this macro to test for invalid SU variables. e.g. if (SUIsInvalid(result)) return false;.
#define | SUSetInvalid(VARIABLE)
| Use this macro to set a reference invalid.
#define | SUAreEqual(VARIABLE1, VARIABLE2)
| Use this macro to check if two references are equal.
#define | SU_DEPRECATED_FUNCTION(version_num)
| This macro is used to indicate if functions are intended to be deprecated. If you would like to hide the deprecation warnings simply define SU_SUPPRESS_DEPRECATION_WARNINGS.

## Typedefs
typedef wchar_t | unichar
| A platform-independent UTF16 type.

## Enumerations
enum | SUResult { SU_ERROR_NONE, SU_ERROR_NULL_POINTER_INPUT, SU_ERROR_INVALID_INPUT, SU_ERROR_NULL_POINTER_OUTPUT, SU_ERROR_INVALID_OUTPUT, SU_ERROR_OVERWRITE_VALID, SU_ERROR_GENERIC, SU_ERROR_SERIALIZATION, SU_ERROR_OUT_OF_RANGE, SU_ERROR_NO_DATA, SU_ERROR_INSUFFICIENT_SIZE, SU_ERROR_UNKNOWN_EXCEPTION, SU_ERROR_MODEL_INVALID, SU_ERROR_MODEL_VERSION, SU_ERROR_LAYER_LOCKED, SU_ERROR_DUPLICATE, SU_ERROR_PARTIAL_SUCCESS, SU_ERROR_UNSUPPORTED, SU_ERROR_INVALID_ARGUMENT, SU_ERROR_ENTITY_LOCKED, SU_ERROR_INVALID_OPERATION }
| Defines return values used by most API functions. More...

## Detailed Description

Generic interfaces for the API types.

## Enumeration Type Documentation

enum SUResult

Defines return values used by most API functions.

Enumerator
SU_ERROR_NONE | Indicates success.
SU_ERROR_NULL_POINTER_INPUT | A pointer for a required input was NULL.
SU_ERROR_INVALID_INPUT | An API object input to the function was not created properly.
SU_ERROR_NULL_POINTER_OUTPUT | A pointer for a required output was NULL.
SU_ERROR_INVALID_OUTPUT | An API object to be written with output from the function was not created properly.
SU_ERROR_OVERWRITE_VALID | Indicates that an input object reference already references an object where it was expected to be SU_INVALID.
SU_ERROR_GENERIC | Indicates an unspecified error.
SU_ERROR_SERIALIZATION | Indicate an error occurred during loading or saving of a file.
SU_ERROR_OUT_OF_RANGE | An input contained a value that was outside the range of allowed values.
SU_ERROR_NO_DATA | The requested operation has no data to return to the user. This usually occurs when a request is made for data that is only available conditionally.
SU_ERROR_INSUFFICIENT_SIZE | Indicates that the size of an output parameter is insufficient.
SU_ERROR_UNKNOWN_EXCEPTION | An unknown exception occurred.
SU_ERROR_MODEL_INVALID | The model requested is invalid and cannot be loaded.
SU_ERROR_MODEL_VERSION | The model cannot be loaded or saved due to an invalid version
SU_ERROR_LAYER_LOCKED | The layer that is being modified is locked.
SU_ERROR_DUPLICATE | The user requested an operation that would result in duplicate data.
SU_ERROR_PARTIAL_SUCCESS | The requested operation was not fully completed but it returned an intermediate successful result.
SU_ERROR_UNSUPPORTED | The requested operation is not supported.
SU_ERROR_INVALID_ARGUMENT | An argument contains invalid information.
SU_ERROR_ENTITY_LOCKED | The entity being modified is locked.
SU_ERROR_INVALID_OPERATION | The requested operation is invalid.