LayOut C API

- Main Page
- Related Pages
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
layerinstance.h File Reference
`#include <LayOutAPI/common.h>`
`#include <LayOutAPI/model/defs.h>`

Go to the source code of this file.

## Functions
LO_RESULT | LOLayerInstanceGetNumberOfEntities (LOLayerInstanceRef layer_instance, size_t *number_of_entities)
| Gets the number of entities associated with a layer instance. More...
LO_RESULT | LOLayerInstanceGetEntityAtIndex (LOLayerInstanceRef layer_instance, size_t index, LOEntityRef *entity)
| Gets the entity at the given index of a layer instance's draw order. More...
LO_RESULT | LOLayerInstanceGetIndexOfEntity (LOLayerInstanceRef layer_instance, LOEntityRef entity, size_t *index)
| Gets the index of the given entity on the layer instance. More...
LO_RESULT | LOLayerInstanceGetEntities (LOLayerInstanceRef layer_instance, LOEntityListRef entity_list)
| Populates a LOEntityListRef with all the entities associated with a layer instance, ordered by their draw order. More...
LO_RESULT | LOLayerInstanceReorderEntity (LOLayerInstanceRef layer_instance, LOEntityRef entity, size_t index)
| Moves the entity to the specified index within a layer instance's draw order. The entity must already belong to the layer instance that is passed in. More...
LO_RESULT | LOLayerInstanceGetLayerDefinition (LOLayerInstanceRef layer_instance, LOLayerRef *layer_definition)
| Gets the layer definition that a layer instance is associated with. More...

## Function Documentation

LO_RESULT LOLayerInstanceGetEntities | ( | LOLayerInstanceRef | layer_instance,
|  | LOEntityListRef | entity_list
| ) |  |

Populates a LOEntityListRef with all the entities associated with a layer instance, ordered by their draw order.

Parameters

  [in] | layer_instance | The layer instance object.
  [out] | entity_list | The entity list to populate.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if layer_instance does not refer to a valid object
  - SU_ERROR_INVALID_INPUT if entity_list does not refer to a valid object

LO_RESULT LOLayerInstanceGetEntityAtIndex | ( | LOLayerInstanceRef | layer_instance,
|  | size_t | index,
|  | LOEntityRef * | entity
| ) |  |

Gets the entity at the given index of a layer instance's draw order.

Parameters

  [in] | layer_instance | The layer instance object.
  [in] | index | The index of the entity to get.
  [out] | entity | The entity object.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if layer_instance does not refer to a valid object
  - SU_ERROR_OUT_OF_RANGE if index out of range
  - SU_ERROR_NULL_POINTER_OUTPUT if entity is NULL
  - SU_ERROR_OVERWRITE_VALID if *entity already refers to a valid object

LO_RESULT LOLayerInstanceGetIndexOfEntity | ( | LOLayerInstanceRef | layer_instance,
|  | LOEntityRef | entity,
|  | size_t * | index
| ) |  |

Gets the index of the given entity on the layer instance.

Since
  LayOut 2018, API 3.0

Parameters

  [in] | layer_instance | The layer instance object.
  [in] | entity | The entity object.
  [out] | index | The index of the entity.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if layer_instance does not refer to a valid object
  - SU_ERROR_INVALID_ARGUMENT if entity is not on layer_instance
  - SU_ERROR_NULL_POINTER_OUTPUT if index is NULL

LO_RESULT LOLayerInstanceGetLayerDefinition | ( | LOLayerInstanceRef | layer_instance,
|  | LOLayerRef * | layer_definition
| ) |  |

Gets the layer definition that a layer instance is associated with.

Parameters

  [in] | layer_instance | The layer instance object.
  [out] | layer_definition | The layer definition object.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if layer_instance does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if layer_definition is NULL
  - SU_ERROR_OVERWRITE_VALID if *layer_definition already refers to a valid object

LO_RESULT LOLayerInstanceGetNumberOfEntities | ( | LOLayerInstanceRef | layer_instance,
|  | size_t * | number_of_entities
| ) |  |

Gets the number of entities associated with a layer instance.

Parameters

  [in] | layer_instance | The layer instance object.
  [out] | number_of_entities | The number of entities associated with the layer instance.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if layer_instance does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if number_of_entities is NULL

LO_RESULT LOLayerInstanceReorderEntity | ( | LOLayerInstanceRef | layer_instance,
|  | LOEntityRef | entity,
|  | size_t | index
| ) |  |

Moves the entity to the specified index within a layer instance's draw order. The entity must already belong to the layer instance that is passed in.

Parameters

  [in] | layer_instance | The layer instance object.
  [in] | entity | The entity object.
  [in] | index | The index to move the entity to.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if layer_instance does not refer to a valid object
  - SU_ERROR_INVALID_INPUT if entity does not refer to a valid object
  - SU_ERROR_INVALID_INPUT if entity does not belong to the given layer instance
  - SU_ERROR_OUT_OF_RANGE if index is out of range