CVSROOT:        /cvs/directfb
Module name:    DirectFB
Changes by:     dok     20010918 23:54:18

Modified files:
        include        : directfb.h 
        src            : directfb.c 
        src/core       : windows.c 
        src/display    : idirectfbsurface.c idirectfbsurface_layer.c 
                         idirectfbsurface_window.c 
        src/windows    : idirectfbwindow.c 

Log message:
Added result 'DFB_DESTROYED' which is currently returned by 'IDirectFBWindow'
and 'IDirectFBSurface' if the window or surface has been destroyed.

Added window event type 'DWET_DESTROYED' and changed meaning of 'DWET_CLOSE'.
-          DWET_CLOSE          = 0x00000004,  /* window got closed by window
-                                                manager or the application
-                                                itself */
+          DWET_CLOSE          = 0x00000004,  /* closing this window has been
+                                                requested only */
+          DWET_DESTROYED      = 0x00000008,  /* window got destroyed by global
+                                                deinitialization function or the
+                                                application itself */

Added 'IDirectFBWindow::Close()' that puts a 'DWET_CLOSE' event into the
window's event queue. The event dispatcher thread can then decide to close it.

Added 'IDirectFBWindow::Destroy()' which actually destroys the window after
sending a 'DWET_DESTROYED' event, so the event dispatcher thread can notice and
release any interfaces belonging to it.

After a window has been destroyed by 'IDirectFBWindow::Destroy()' most functions
of 'IDirectFBWindow' will return 'DFB_DESTROYED'.

There is no need to destroy windows explicitly with this new function if no
threads are doing 'WaitForEvent()'. If an 'IDirectFBWindow' has no more
references after 'Release()' the window gets destroyed implicitly if it hasn't
been destroyed before.

If you hold down 'CapsLock' over a window (as if you want to move it) and press
the key 'C' a 'DWET_CLOSE' will be sent to the window.



-- 
Info:  To unsubscribe send a mail to [EMAIL PROTECTED] with 
"unsubscribe directfb-dev" as subject.

Reply via email to