
Similarly, the calls below set the type of the notice, error_notice, to make it a screen-
locking notice.
xv_set(error_notice, XV_SHOW, TRUE,
NOTICE_LOCK_SCREEN, TRUE,
NULL);
All screen-locking notices block the thread of execution. Additional attributes apply when
NOTICE_LOCK_SCREEN is TRUE. Table 12-2 lists the attributes that apply when
NOTICE_LOCK_SCREEN is TRUE.
Table 12-2. Screen-Locking Notice Attributes (for NOTICE_LOCK_SCREEN
=
TRUE)
Attribute Procedures
NOTICE_FOCUS_XY create, set
NOTICE_TRIGGER create, set
NOTICE_TRIGGER_EVENT create, set
The position from which the notice shadow emanates is described by the attribute
NOTICE_FOCUS_XY. This value defaults to the current mouse position when the application
maps the notice. Example 12-4 shows code for a screen-locking notice.
Example 12-4. Creating a screen-locking notice
int return_val;
/* Create notice
* Pop up notice with shadow from (100, 200) relative to "parent"
* - this blocks
*/
notice = xv_create(parent, NOTICE,
NOTICE_LOCK_SCREEN, TRUE,
NOTICE_BUTTON, "Save Changes", 100,
NOTICE_BUTTON, "Cancel", 101,
NOTICE_BUTTON, "Quit", 102,
NOTICE_MESSAGE_STRINGS,
"Press Save Changes to save changes to file and quit",
"Press Cancel to continue",
"Press Quit to quit",
NULL,
NOTICE_FOCUS_XY, 100, 200,
NOTICE_STATUS, ¬ice_stat,
XV_SHOW, TRUE,
NULL);
/*
* Notice pops down when a button is pressed.
* notice_stat contains the value of the button that was clicke