Home Window dialogs WINDOW DIALOG - UNICONIFY (AES 165, 4) WINDOW DIALOG - REDRAW (AES 167)

2.3.15 WINDOW DIALOG - EVENT (AES 166)

This function must be called in an event-loop. The event-bits that refer to the window dialog are cleared in the bit vector <mwhich>. Following wdlg_evnt() the EVNT-structure of the application can be used to evaluate the events intended for it. If wdlg_evnt() returns a 0, the window dialog has to be closed (call (wdlg_close()).

Declaration:
WORD wdlg_evnt( DIALOG *dialog, EVNT *events );

Call:
cont = wdlg_evnt( dialog, &events );

Variable         Argument            Meaning
Inputs:

contrl[0]        166                 wdlg_evnt
contrl[1]        0                   Entries in intin
contrl[3]        2                   Entries in addrin

addrin[0]        dialog              Pointer to the dialog structure
addrin[1]        events              Pointer to the EVNT-structure

Outputs:

contrl[2]        1                   Entries in intout
contrl[4]        0                   Entries in addrout

intout[0]        cont                0: Close dialog
                                     1: All OK

Description of the EVNT-structure:

typedef struct
{
   WORD  mwhich;               /* Type of events */
   WORD  mx;                   /* X-coordinate of the mouse cursor */
   WORD  my;                   /* Y-coordinate of the mouse cursor */
   WORD  mbutton;              /* Pressed mouse button */
   WORD  kstate;               /* Status of the 'special' keys (kbshift) */
   WORD  key;                  /* Scancode of the pressed key */
   WORD  mclicks;              /* Number of mouse clicks */
   WORD  reserved[9];          /* Reserved */
   WORD  msg[16];              /* Message-buffer */
} EVNT;

Note: The Iconify-event is not supported by wdlg_evnt(). Those wanting to register the Iconifier icon as a window object during wdlg_open() therefore have to evaluate this even and handle it themselves. The same applies if one want to register the Sizer icon as an object.


Home Window dialogs WINDOW DIALOG - UNICONIFY (AES 165, 4) WINDOW DIALOG - REDRAW (AES 167)