Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

PdCreateOffscreenLock()

Create a lock for an offscreen context

Synopsis:

int PdCreateOffscreenLock(
       PdOffscreenContext_t *osc,
       PdOSCCreateLockParams_t *params );

Arguments:

osc
A pointer to the PdOffscreenContext_t structure for the offscreen context.
params
A pointer to a PdOSCCreateLockParams_t structure that defines the parameters for the lock; see below.

Library:

ph

Description:

This function creates an offscreen lock in an offscreen context.


Note: This function doesn't lock the offscreen context; to do that, call PdLockOffscreen().

The PdOSCCreateLockParams_t structure includes the following members:

uint32_t flags
Flags, including:
int sig
The signal to drop on the current hard locking process if the context needs to be destroyed.

This signal is used only if you set Pg_OSC_LOCK_SIG in the flags member.


Note: You can't lock the primary display unless the application is in direct mode.

Returns:

EOK
The lock was successfully created.
Pg_OSC_LOCK_ALREADY_CREATED
The lock has already been created for this offscreen context.
Pg_OSC_CREATE_LOCK_FAILED
The lock couldn't be created. The most likely reason is that io-graphics is running remotely.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PdDestroyOffscreenLock(), PdGetOffscreenContextPtr(), PdIsOffscreenLocked(), PdLockOffscreen(), PdUnlockOffscreen()

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