        def __init__(self, stdout, stdin, buffer_height, old_out, old_in,
                     unicode_aware=False):
            """
            :param stdout: The win32console PyConsoleScreenBufferType object for stdout.
            :param stdin: The win32console PyConsoleScreenBufferType object for stdin.
            :param buffer_height: The buffer height for this window (for testing only).
            :param old_out: The original win32console PyConsoleScreenBufferType object for stdout
                that should be restored on exit.
            :param old_in: The original stdin state that should be restored on exit.
            :param unicode_aware: Whether this Screen can use unicode or not.
            """
            # Save off the screen details and set up the scrolling pad.
            info = stdout.GetConsoleScreenBufferInfo()['Window']
            width = info.Right - info.Left + 1
            height = info.Bottom - info.Top + 1

            # Detect UTF-8 if needed and then construct the Screen.
            if unicode_aware is None:
                # According to MSDN, 65001 is the Windows UTF-8 code page.
                unicode_aware = win32console.GetConsoleCP() == 65001
            super().__init__(
                height, width, buffer_height, unicode_aware)

            # Save off the console details.
            self._stdout = stdout
            self._stdin = stdin
            self._last_width = width
            self._last_height = height
            self._old_out = old_out
            self._old_in = old_in

            # Windows is limited to the ANSI colour set.
            self.colours = 8

            # Opt for compatibility with Linux by default
            self._map_all = False

            # Set of keys currently pressed.
            self._keys = set()
:param stdout: The win32console PyConsoleScreenBufferType object for stdout.
:param stdin: The win32console PyConsoleScreenBufferType object for stdin.
:param buffer_height: The buffer height for this window (for testing only).
:param old_out: The original win32console PyConsoleScreenBufferType object for stdout
that should be restored on exit.
:param old_in: The original stdin state that should be restored on exit.
:param unicode_aware: Whether this Screen can use unicode or not.
asciimatics/screen.py