New: Added CPWindowDelegate protocol

Added CPWindowDelegate protocol
Also, now, delegate methods are called as we are used to do it in Cappuccino