Added window handling api