add get_winsize function for export.