add window function support

This patch added window function support to `slick`, pls help review and give your suggestions.