Port over the windowing functions. Not currently used yet.