[NUI] Add an API for create,window event.