EZ_AddEventHandler(3)

NAME
EZ_AddEventHandler,EZ_RemoveEventHandler, EZ_RemoveAllEventHandlers - register/remove event handlers associated to a widget

SYNOPSIS
#include <EZ.h>

void EZ_AddEventHandler( EZ_Widget*widget,
        EZ_EventHandler handler, void *clientdata, int location)
void EZ_AddEventHandler00( EZ_Widget*widget,
        EZ_EventHandler handler, void *clientdata, int location)
void EZ_AddEventHandlerAll( EZ_Widget*widget,
        EZ_EventHandler handler, void *clientdata, int location)
void EZ_RemoveEventHandler( EZ_Widget*widget,
                         EZ_EventHandler handler, void *clientdata)
void EZ_RemoveEventHandler00( EZ_Widget*widget,
                         EZ_EventHandler handler, void *clientdata)
void EZ_RemoveAllEventHandlers( EZ_Widget *widget)
void EZ_RemoveAllEventHandlers00( EZ_Widget *widget)

ARGUMENTS
widget Specifies an EZ widget.

handler Specifies an event handler.

clientdata Specifies a clientdata to be passed to the event handler.

location Specifies when the event handler is to be called relative to other previously registered handlers

DESCRIPTION

An event handler is a procedure of the following prototype:

void(*handler)(void *object, void *data, int etype, XEvent *event)

EZ_AddEventHandler registers an event handler to a widget. If location is 0, the event handler will be put in front of all previously registered event handlers. If location is 1, the event handler will be inserted at the end of all previousely registered event handlers.

For composite widget, EZ_AddEventHandler inserts the event handler to the most relevent internal widget. To add an event handler to the toplevel frame of a composite widget, use EZ_AddEventHandler00.

EZ_AddEventHandlerAll registers an event handler to widget and all its descendants.

EZ_RemoveEventHandler deletes an event handler. The specified event handler will be deleted only if both the procedure and the client data match.

For composite widget, EZ_RemoveEventHandler removes the specified event handler from the most relevent internal widget. To remove an event handler from a composite widget, use EZ_RemoveEventHandler00.

EZ_RemoveAllEventHandlers deletes all event handlers registered to a widget.

For composite widget, EZ_RemoveAllEventHandlers removes all event handlers from the most relevent internal widget. To remove all event handlers registered to the toplevel frame of a composite widget, use EZ_RemoveAllEventHandlers00.

SEE ALSO
EZ_AddWidgetCallBack(3)