notify_set_destroy_func()
Registers destroy_func() with the Notifier. destroy_func() is called when a
destroy event is posted to client or when the process receives a SIGTERM signal.
Notify_func
notify_set_destroy_func(client, destroy_func)
Notify_client client;
Notify_func destroy_func;
The format for the destroy function is:
Notify_value
destroy_func(client, status)
Notify_client client;
Destroy_status status;
notify_set_event_func()
Registers the event handler event_func() with the Notifier.
Notify_error
notify_set_event_func(client, event_func, type)
Notify_client client;
Notify_func event_func;
Notify_event_type type;
type is either NOTIFY_SAFE or NOTIFY_IMMEDIATE.
The format for the event function is:
Notify_value
event_func(client, event, arg, type)
Notify_client client;
Notify_event event;
Notify_arg arg;
Notify_event_type type;
notify_set_exception_func()
Registers the exception handler exception_func() with the Notifier. The only
known devices that generate exceptions at this time are stream-based socket connec-
tions when an out-of-band byte is available.
Notify_func
notify_set_exception_func(client, exception_func, fd)
Notify_client client;
Notify_func exception_func;
int fd;
The format for the exception function is:
Notify_value
exception_func(client, fd)
Notify_client client;
int fd;
Procedures and Macros
Procedures and Macros 195
notify_set_input_func()
Registers input_func() with the Notifier. input_func() will be called when-
ever there is input pending on fd.
Notify_func
notify_set_input_func(client, input_func, fd)
Notify_client client;
Notify_func input_func;
int fd;
The format for the input function is:
Notify_value
exception_func(client, fd)
Notify_client client;
int fd;
notify_set_itimer_func()
Registers the timeout event handler itimer_func() with the Notifier.
Notify_func
notify_set_itimer_func(client, itimer_func,
which, value, ovalue)
Notify_client client;
Notify_func itimer_func;
int which;
struct itimerval *value, *ovalue;
The semantics of which, value, and ovalue parallel the arguments to
setitimer(2).
which is either
ITIMER_REAL
or ITIMER_VIRTUAL.
The format for the itimer function is:
Notify_value
itimer_func(client, which)
Notify_client client;
int which;
notify_set_output_func()
Registers output_func() with the Notifier. output_func() will be called
whenever output has been completed on fd.
Notify_func
notify_set_output_func(client, output_func, fd)
Notify_client client;
Notify_func output_func;
int fd;
The format for the output function is:
Notify_value
exception_func(client, fd)
Notify_client client;
int fd;
196 XView Reference Manual
notify_set_signal_func()
Registers the signal event handler signal_func() with the Notifier.
signal_func() will be called whenever signal is caught by the Notifier. when
can be either NOTIFY_SYNC or NOTIFY_ASYNC.
Calling notify_set_signal_func() with a NULL in the place of the
signal_func() turns off checking for that signal for that client.
Notify_func
notify_set_signal_func(client, signal_func, signal, when)
Notify_client client;
Notify_func signal_func;
int signal;
Notify_signal_mode when;
The format for the signal_func function is:
Notify_value
signal_func(client, sig, mode)
Notify_client client;
int sig;
int mode;
notify_set_wait3_func( )
Registers the function wait3_func() with the Notifier. The registered function is
called after client’s process identified by pid dies. To do the minimum processing,
register the predefined function notify_default_wait3().
Notify_func
notify_set_wait3_func(client, wait3_func, pid)
Notify_client client;
Notify_func wait3_func;
int pid;
The format for the wait3 function on BSD-based systems is:
Notify_value
wait3_func(client, pid, status, rusage)
Notify_client client;
int pid;
union wait *status;
struct rusage *rusage;
The format for the wait3 function on SYSV-based systems is:
Notify_value
wait3_func(client, pid, status, rusage)
Notify_client client;
int pid;
int *status;
struct rusage *rusage;
notify_start()
Begins dispatching of events by the Notifier.
Notify_error
notify_start()
Procedures and Macros
Procedures and Macros 197
notify_stop()
Terminates dispatching of events by the Notifier.
Notify_error
notify_stop()
notify_veto_destroy()
Called from within a destroy event handler when status is DESTROY_CHECKING and
the application does not want to be destroyed.
Notify_error
notify_veto_destroy(client)
Notify_client client;
OPENWIN_EACH_VIEW( )
Macro providing built-in support for iteration across all the views contained in a given
openwin. Allows you to perform operations on multiple views for which there are no
openwin attributes.
OPENWIN_END_EACH
Closes the loop started by the macro OPENWIN_EACH_VIEW(). These macros are
meant to be used together, as in the following example:
OPENWIN_EACH_VIEW(openwin, view)
Openwin openwin;
Openwin_item item;
xv_set(openwin, attributes, 0);
OPENWIN_END_EACH;
panel_advance_caret()
Advances the input focus to the next item that can accept input focus. If on the last in-
put focus, rotate back to the first. Returns the new caret item or NULL if there are no
input focus items.
Panel_item
panel_advance_caret(panel)
Panel panel;
panel_backup_caret()
Backs the caret up to the previous input focus item. If already on the first input focus
item, rotate back to the last. Returns the new caret item or NULL if there are no input
focus items.
Panel_item
panel_backup_caret(panel)
Panel panel;
PANEL_CHECK_BOX
Macro for “PANEL_TOGGLE, PANEL_FEEDBACK, PANEL_MARK.” Creates non-
exclusive choice item(s) with check_boxes instead of boxes.
xv_create(panel, PANEL_CHECK_BOX, NULL);
198 XView Reference Manual
PANEL_CHECK_BOX expands to:
PANEL_TOGGLE,
PANEL_FEEDBACK, PANEL_MARK
To use an ATTR_LIST argument, the ATTR_LIST must be the first attribute in an attri-
bute-value list. See PANEL_CHOICE_STACK for an example.
PANEL_CHOICE_STACK
Macro for “PANEL_CHOICE, PANEL_DISPLAY_LEVEL, PANEL_CURRENT.” Creates an
OPENLOOK abbreviated choice menu button.
xv_create(panel, PANEL_CHOICE_STACK, NULL);
PANEL_CHOICE_STACK expands to:
PANEL_CHOICE,
PANEL_DISPLAY_LEVEL, PANEL_CURRENT
To use an ATTR_LIST argument, the ATTR_LIST must be the first attribute in an attri-
bute-value list. You need to include an explicit PANEL_CHOICE, rather than the
PANEL_CHOICE_STACK attribute. For example,
xv_create(owner, PANEL_CHOICE,
ATTR_LIST, at,
PANEL_DISPLAY_LEVEL,PANEL_CURRENT,
.....,
NULL);
PANEL_EACH_ITEM( )
Macro to iterate over each item in a panel. The corresponding macro
PANEL_END_EACH closes the loop opened by PANEL_EACH_ITEM().
PANEL_EACH_ITEM(panel, item)
Panel panel;
Panel_item item;
PANEL_END_EACH
Closes the loop started by PANEL_EACH_ITEM(). Same usage as
OPENWIN_EACH_VIEW().
panel_paint()
Paints an item or an entire panel. paint_behavior can be either PANEL_CLEAR,
which causes the area occupied by the panel or item to be cleared prior to painting, or
PANEL_NO_CLEAR.
int
panel_paint(panel_object, paint_behavior)
Xv_object panel_object;
Panel_setting paint_behavior;
Note that panel_object may be a PANEL or a PANEL_ITEM. If panel_object
does not exist, or panel_paint() is called with an invalid paint_behavior
value, the function returns XV_ERROR; otherwise, it returns XV_OK.
Procedures and Macros
Procedures and Macros 199
Get Volume 7B: XView Reference Manual now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.