Change the API macros of layout