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
application.h File Reference
`#include <LayOutAPI/common.h>`
`#include <LayOutAPI/model/defs.h>`

Go to the source code of this file.

## Functions
LO_RESULT | LOApplicationGetApplication (LOApplicationRef *app)
| Gets the application instance. More...
LO_RESULT | LOApplicationGetActiveDocument (LOApplicationRef app, LODocumentRef *document)
| Gets a reference to the active document. More...
LO_RESULT | LOApplicationGetVersion (LOApplicationRef app, SUStringRef *version)
| Gets the major/minor version number as a string. More...
LO_RESULT | LOApplicationGetVersionNumber (LOApplicationRef app, unsigned int *version)
| Gets the major/minor version number as an unsigned integer. More...
LO_RESULT | LOApplicationGetOnline (LOApplicationRef app, bool *is_online)
| Gets whether the application is connected to the internet. More...
LO_RESULT | LOApplicationOpenDocument (LOApplicationRef app, const char *file_path, LODocumentRef *document)
| Opens the LayOut document located at the given file path. More...
LO_RESULT | LOApplicationQuit (LOApplicationRef app)
| Quits the application. More...

## Function Documentation

LO_RESULT LOApplicationGetActiveDocument | ( | LOApplicationRef | app,
|  | LODocumentRef * | document
| ) |  |

Gets a reference to the active document.

Since
  LayOut 2018, API 3.0

Parameters

  [in] | app | The application instance.
  [out] | document | The active document.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `app` is not a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if `document` is NULL

LO_RESULT LOApplicationGetApplication | ( | LOApplicationRef * | app | ) |

Gets the application instance.

Since
  LayOut 2018, API 3.0

Parameters

  [out] | app | The application instance.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_NO_DATA if we are not running inside an instance of the LayOut application

LO_RESULT LOApplicationGetOnline | ( | LOApplicationRef | app,
|  | bool * | is_online
| ) |  |

Gets whether the application is connected to the internet.

Since
  LayOut 2018, API 3.0

Parameters

  [in] | app | The application instance.
  [out] | is_online | True if the application is connected to the internet.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `app` is not a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if `is_online` is NULL

LO_RESULT LOApplicationGetVersion | ( | LOApplicationRef | app,
|  | SUStringRef * | version
| ) |  |

Gets the major/minor version number as a string.

Since
  LayOut 2018, API 3.0

Parameters

  [in] | app | The application instance.
  [out] | version | The current version of the application.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `app` is not a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if `version` is NULL

LO_RESULT LOApplicationGetVersionNumber | ( | LOApplicationRef | app,
|  | unsigned int * | version
| ) |  |

Gets the major/minor version number as an unsigned integer.

Since
  LayOut 2018, API 3.0

Parameters

  [in] | app | The application instance.
  [out] | version | The current version of the application.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `app` is not a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if `version` is NULL

LO_RESULT LOApplicationOpenDocument | ( | LOApplicationRef | app,
|  | const char * | file_path,
|  | LODocumentRef * | document
| ) |  |

Opens the LayOut document located at the given file path.

Since
  LayOut 2018, API 3.0

Parameters

  [in] | app | The application instance.
  [in] | file_path | The full file path to the .layout document to open.
  [out] | document | A reference to the opened document if successful.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `app` is not a valid object
  - SU_ERROR_NULL_POINTER_INPUT if `file_path` is NULL
  - SU_ERROR_NULL_POINTER_OUTPUT if `document` is NULL
  - SU_ERROR_SERIALIZATION if the document fails to open

LO_RESULT LOApplicationQuit | ( | LOApplicationRef | app | ) |

Quits the application.

Since
  LayOut 2018, API 3.0

Parameters

  [in] | app | The application instance.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `app` is not a valid object