DESIGN (xvwidgets) functions


LIBRARY ROUTINE

xvw_add_action - add an action handler to an object

LIBRARY CALL

void xvw_add_action(
   xvobject   object,
   char       *action,
   void      (*routine)(xvobject, kaddr, XEvent *),
   kaddr      client_data,
   int        override)

INPUT

OUTPUT

none

RETURN VALUE

none

DESCRIPTION

Adds an action handler to a GUI or visual object. When the specified action occurs, the action handler will be called.

Since the X Toolkit cannot support action handling on gadgets, we support them by placing the action handler on the parent of the gadget and then directing the dispatch of the action handler directly.

The action handler must be associated with an object; only when the specified action(s) occur in the specified object will the action handler be called (ie, the same action in another object will be ignored).

An action handler must be declared in the following form: void action_handler( xvobject object, kaddr client_data, XEvent *event)

object - The object for which the action handler was invoked. It will not be NULL.

client_data - The pointer to the client data, used to pass parameters from the application to the action handler.

event - This is a pointer to the XEvent union which caused the action handler to be invoked. For details on the XEvent union, see Chapter 8 of the Xlib Programming Manual, by Adrian Nye; the definition of the XEvent union is on page 232.

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

none

RESTRICTIONS

none

MODIFICATION

none

FILES

$DESIGN/objects/library/xvwidgets/src/action.c

SEE ALSO

xvwidgets(3)

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.