new event 'on_cocos_resize' - deprecated event director 'on_resize'     from issue 154:
new event 'on_cocos_resize' - deprecated event director 'on_resize'
 
 
from issue 154:


There is an  ambiguity with on_resize:

1. we have the director.window on_resize event, generated by pyglet
2. we have another event on_resize generated by director, dispatched when director receives the director.window on_resize event 
3. if a layer registers for the director generated on_resize, say, director.push_handlers(self.on_resize), but also, wanting keys or mouse events sets the is_event_handling flag to True, then the on_resize handler will be called two times: one by the window event, and another by the director event.
If on_resize is not idempotent, something will go wrong.
Even is not, we are wasting cpu-gpu in redundant calculations.

The problem arises because
	pyglet calling order for event handles is 'last pushed is called first'
	director.xxx  is the first handler pushed for windows on_resize 
	all other nodes are pushed after  director.
	The is_event_handler in a Layer registers all methods in the layer with a name matching one of the windows events,
thus pushing the on_resize that we intended to subscribe to director only.

A solution would be to rename the on_resize event published by director to something different, like on_cocos_resize  

Additionally, it would be more useful that the event 'on_cocos_resize' carry director._usable_width , director._usable_height as parameters.

script showing the problem in a concrete example: z_resize.py
Look at the console output and comment for operation and explanation.

Resolution:
	Deprecate the director published 'on_resize'.

	The director.window published 'on_resize' is unaffected.

	Add the 'on_cocos_resize' event, params will carry the director._usable_width, director._usable_height, that is the size when restrictions like 'maintain aspect ratio' are taken into account.
	This event is published by director, so to subscribe you need to do something as 
		director.push_handlers(self.on_cocos_resize) 

google-code-export/los-cocos,google-code-export/los-cocos