home *** CD-ROM | disk | FTP | other *** search
- User notes for Event.c
- ======================
-
- Note that Event does not know when you delete a window. Thus, before you
- delete a window, call Event_ReleaseWindow() to release all event claims for
- that window handle.
-
- Otherwise, the best you can hope for is a slight drag effect on the speed of
- event dispatching as it searches through lists of unneeded handler
- registrations, and the worst you can expect is to find a whole load of
- handlers attached to a window you create later that happens to end up with
- the same window handle as one of it's predecessors.
- This will also return (small) amounts of memory back to the free "malloc"
- pool.
-
- It is suggested that you use Window_CreateAndShow() and Window_Delete(), as
- these calls handle the following for you:
- Creation and opening of the window
- Allocation of memory for indirected icons, etc.
-
- Closing and deleting the window,
- Deallocating any memory claimed for the window,
- Removal of any handlers you have added for that window.
- ...and force you to do the "right thing" by only creating windows when you
- first need them, and deleting them as soon as they are closed.
-
- ---
-
- Note that some functions in RISC OS Lib, such as those to find out the last
- event received, do not immediately appear to have a DeskLib equivalent.
- The reason for this is in fact that I see no reason to waste memory and
- processor time on a useless function - event stores this value in a global
- variable, (event_lastevent) and you are free to use this variable as you see
- fit. (Just don't be antisocial towards it!)
-
- ---
-