EZ_AddMessageHandler(3)         EZWGL Functions        EZ_AddMessageHandler(3)

       EZ_AddMessageHandler, EZ_DeleteMessageHandler - add/delete a message

       #include <EZ.h>

       typedef struct {
         Atom       messageType;    /* message type   */
         int        messageLength;  /* message length */
         char       *message;       /* the message    */
         int        messageId;      /* message Id     */
         int        replyId;        /* if request, the message id to reply */
         int        isReply;        /* flag whether the message is a reply */
         Window     sender;         /* sender's communication window id  */
         Atom       senderClass;    /* sender's class name */
         Atom       senderInstance; /* sender's instance name */
         int        senderIsSelf;   /* is message originated from the myself? */
       } EZ_Message;

       typedef void (*EZ_MessageHandler)(EZ_Message *msgIn, void *client_data);

       void EZ_AddMessageHandler(Atom type, int messageId, void *client_data,
                                 EZ_MessageHandler handler, int timeout)

       void EZ_DeleteMessageHandler(Atom type, int messageId, void *client_data,
                                 EZ_MessageHandler handler)

       handler  Specifies a message handler.

       client_data  Specifies an application data to be passed to the handler.

       messageId Specifies a serial number. Serial number is local to each
       application so the sender has to keep track of it.

       timeout Specifies the life span of this handler, in seconds. The
       handler will be deleted after the specified number of seconds elapses.
       If zero or negative, the handler will have an infinite life span.

       EZ_AddMessageHandler registers a message handler with EZWGL. The
       message handler will be invoked when a messages with the specified type
       and serial number arrives.

       EZ_DeleteMessageHandler deletes the registered message handler that
       matches the specification.

       EZ_SetDefaultMessageHandler(3), EZ_BroadcastMessage(3),

EZWGL                                                  EZ_AddMessageHandler(3)