(C) 1998 AROS - The Amiga Research OS
Depending on the current state in the IDCMPFlags of the window and the specified flags these actions are possible:
IDCMP flags Action 0 0 Nothing happens 0 !=0 The flags are copied in the IDCMPFlags of the window and a MessagePort is created and stored in the UserPort of the window. !=0 0 The IDCMPFlags are cleared and the MessagePort in the UserPort is deleted. !=0 !=0 The flags are copied to the IDCMPFlags of the window.
This allows you to use a port that you already have allocated:
- OpenWindow() with IDCMPFlags equal to NULL (open no ports) - set the UserPort variable of your window to any valid port of your own choosing - call ModifyIDCMP with IDCMPFlags set to what you want - then, to clean up later, set UserPort equal to NULL before calling CloseWindow() (leave IDCMPFlags alone) BUT FIRST: you must make sure that no messages sent your window are queued at the port, since they will be returned to the memory free pool.
For an example of how to close a window with a shared IDCMP, see the description for CloseWindow().
Moved intuition-driver protos to intuition_intern.h