Middleware, development tools, realtime operating system
software and services for superior embedded design


Home
QNX Community Resources
QNX Documentation Library
PhQueryRids

PhQueryRids

QNX Software Systems
Developer Resources
Blogs
Board support packages
Foundry27 projects
Forums
Hardware support listing
Online video tutorials
Product documentation
Technical Articles

PhQueryRids()

Get a list of regions

Synopsis:

int PhQueryRids( unsigned flags,
                 PhRid_t rid,
                 unsigned input_group,
                 unsigned type,
                 unsigned sense,
                 PhRid_t emitter,
                 const PhRect_t *rect,
                 PhRid_t rids[],
                 int num );

Library:

ph

Description:

This function builds a list of up to num regions in the rids array. The other parameters specify which regions are to be included in the list:

flags
The possible flag bits are:
  • Ph_RIDQUERY_IG_POINTER -- use input_group's pointer position as rect.
  • Ph_RIDQUERY_TOWARD -- act as if the event were emitted towards the user (away from the root region).
rid
Consider regions that intersect with the region with this ID. Set rid to 0 to consider all regions.
input_group
Consider regions that belong to this input group (0 means any).

To determine the current input group, call PhInputGroup(), passing to it the current event, if any.

type
Consider regions of these types:
  • Ph_WINDOW_REGION
  • Ph_WND_MGR_REGION
  • Ph_GRAFX_REGION
  • Ph_PTR_REGION
  • Ph_KBD_REGION
  • Ph_PRINT_REGION
  • Ph_INPUTGROUP_REGION
  • Ph_AUXPTR_REGION
  • Ph_FORCE_FRONT
  • Ph_FORCE_BOUNDARY

Set type to 0 (i.e. all bits off) to consider all types of regions.

sense
Consider regions that are sensitive or opaque to these event types. The possible bits are:
  • Ph_EV_BOUNDARY
  • Ph_EV_BUT_PRESS
  • Ph_EV_BUT_RELEASE
  • Ph_EV_BUT_REPEAT
  • Ph_EV_DNDROP
  • Ph_EV_DRAG
  • Ph_EV_DRAW
  • Ph_EV_EXPOSE
  • Ph_EV_INFO
  • Ph_EV_KEY
  • Ph_EV_PTR_MOTION_BUTTON
  • Ph_EV_PTR_MOTION_NOBUTTON
  • Ph_EV_RAW
  • Ph_EV_SERVICE
  • Ph_EV_SYSTEM
  • Ph_EV_TIMER
  • Ph_EV_WM

Set sense to 0 (i.e. all bits off) to consider regions regardless of their sensitivity.

emitter
The region to begin the query from.
rect
A pointer to a PhRect_t structure that specifies the area (relative to emitter's origin) that other regions must intersect to be considered in the query. This can be NULL.

Returns:

The number of regions found, or -1 if an error occurred.


Note: If this function returns -1, check errno. If it's ENOMSG, there are no pending Photon events; this isn't really an error.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PhEvent_t, PhRect_t