Operating systems, development tools, and professional services
for connected embedded systems
for connected embedded systems
![]() |
![]() |
![]() |
![]() |
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.
The PdOSCCreateLockParams_t structure includes the following members:
- uint32_t flags
- Flags, including:
- Pg_OSC_LOCK_SIG -- register a signal to be dropped if a request is made to remove the offscreen context while it's locked.
- 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.
![]() |
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
![]() |
![]() |
![]() |
![]() |

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