[Previous] [Contents] [Index] [Next]

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

PgCreateDriverRegion()

Create a region that's owned by the graphics driver

Synopsis:

PhRid_t PgCreateDriverRegion(
           PdOffscreenContext_t *osc,
           PhPoint_t   *origin,
           PhRect_t    *rect,
           PhRid_t     parent );

Arguments:

osc
A pointer to the PdOffscreenContext_t structure for the offscreen context. This argument must not be NULL.
origin
NULL, or a pointer to a PhPoint_t structure that specifies the origin of the region, relative to its parent. The default is (0,0) if this argument is NULL.
rect
NULL, or a pointer to a PhRect_t structure that specifies the region rectangle, relative to its origin. If this argument is NULL, the function uses a rectangle whose members are set to 0.
parent
The ID of the parent region, or -1 if you don't want to specify it.

Library:

ph

Description:

PgCreateDriverRegion() creates a region that's owned by the graphics driver and is sensitive to draw events.

The region parent defaults to the driver's input group's parent region. PhRegionOpen() defines all of the other default settings for the region. All draw events collected by the driver region are targeted at the specified offscreen context.

The driver region persists until you explicitly close it (which we don't recommend) or until the corresponding offscreen context is destroyed.


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

A few notes:

Returns:

A nonnegative region id, or -1 if an error occurred.

Errors:

EFAULT
The function couldn't access the offscreen context.
EINVAL
The osc argument is NULL, or the call to PhRegionOpen() failed.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PdOffscreenContext_t, PdSetOffscreenTranslation(), PdSetTargetDevice(), PhPoint_t, PhRect_t, PhRegionOpen()


[Previous] [Contents] [Index] [Next]