PgUnlockLayer()

Unlock a layer

Synopsis:

int PgUnlockLayer( int layer );

Arguments:

layer
The layer index, which must be 0 or greater.

Library:

ph

Description:

PgUnlockLayer() releases a layer from exclusive use by an application. To lock a layer, call PgLockLayer().

Other applications may not use PgSetLayerSurface() or PgSetLayerArg() on a locked surface.


Note: You must target this function at a device by calling PdSetTargetDevice().

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
No such layer, or 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(), PgLockLayer(), PgSetLayerArg(), PgSetLayerSurface()

Layers in the Raw Drawing and Animation chapter of the Photon Programmer's Guide