Operating systems, development tools, and professional services
for connected embedded systems
for connected embedded systems
![]() |
![]() |
![]() |
![]() |
PgLockLayer()
Lock a layer for exclusive use by an application
Synopsis:
int PgLockLayer( int layer );
Arguments:
- layer
- The layer index, which must be 0 or greater.
Library:
ph
Description:
PgLockLayer() acquires exclusive use of a layer by an application. To unlock a layer, call PgUnlockLayer().
Other applications may not use PgSetLayerSurface() or PgSetLayerArg() on a locked surface.
Your application should unlock its layers before it exits. You can lock a layer multiple times, but need to unlock it only once.
Returns:
- 0
- Success.
- -1
- An error occurred (errno is set).
Errors:
- EBUSY
- The specified layer is locked by another application.
- EINVAL
- Any other error.
- ENXIO
- The layer doesn't exist.
- EOPNOTSUPP
- The operation isn't supported.
Classification:
Photon
| Safety: | |
|---|---|
| Interrupt handler | No |
| Signal handler | No |
| Thread | No |
See also:
PdSetTargetDevice(), PgSetLayerArg(), PgSetLayerSurface(), PgUnlockLayer()
"Layers" in the Raw Drawing and Animation chapter of the Photon Programmer's Guide
![]() |
![]() |
![]() |
![]() |

![[Previous]](../prev.gif)
![[Contents]](../contents.gif)
![[Index]](../keyword_index.gif)
![[Next]](../next.gif)
