class_docstr: I/O abstraction for rendering to Windows consoles.
  (cmd.exe and similar.)
class_docstr_tok: ["I\/O","abstraction","for","rendering","to","Windows","consoles",".","(","cmd.exe","and","similar",".",")"]
docstr: Return Screen buffer info.
docstr_tok: ["Return","Screen","buffer","info","."]
code: def get_win32_screen_buffer_info(self) -> CONSOLE_SCREEN_BUFFER_INFO:
      """
      Return Screen buffer info.
      """
      # NOTE: We don't call the `GetConsoleScreenBufferInfo` API through
      #     `self._winapi`. Doing so causes Python to crash on certain 64bit
      #     Python versions. (Reproduced with 64bit Python 2.7.6, on Windows
      #     10). It is not clear why. Possibly, it has to do with passing
      #     these objects as an argument, or through *args.
  
      # The Python documentation contains the following - possibly related - warning:
      #     ctypes does not support passing unions or structures with
      #     bit-fields to functions by value. While this may work on 32-bit
      #     x86, it's not guaranteed by the library to work in the general
      #     case. Unions and structures with bit-fields should always be
      #     passed to functions by pointer.
  
      # Also see:
      #    - https://github.com/ipython/ipython/issues/10070
      #    - https://github.com/jonathanslenders/python-prompt-toolkit/issues/406
      #    - https://github.com/jonathanslenders/python-prompt-toolkit/issues/86
  
      self.flush()
      sbinfo = CONSOLE_SCREEN_BUFFER_INFO()
      success = windll.kernel32.GetConsoleScreenBufferInfo(
          self.hconsole, byref(sbinfo)
      )
  
      # success = self._winapi(windll.kernel32.GetConsoleScreenBufferInfo,
      #                        self.hconsole, byref(sbinfo))
  
      if success:
          return sbinfo
      else:
          raise NoConsoleScreenBufferError
  
imports: from __future__ import annotations
  import sys
  import os
  from ctypes import ArgumentError, byref, c_char, c_long, c_uint, c_ulong, pointer
  from ctypes.wintypes import DWORD, HANDLE
  from typing import Callable, TextIO, TypeVar
  from prompt_toolkit.cursor_shapes import CursorShape
  from prompt_toolkit.data_structures import Size
  from prompt_toolkit.styles import ANSI_COLOR_NAMES, Attrs
  from prompt_toolkit.utils import get_cwidth
  from prompt_toolkit.win32_types import CONSOLE_SCREEN_BUFFER_INFO, COORD, SMALL_RECT, STD_INPUT_HANDLE, STD_OUTPUT_HANDLE
  from ..utils import SPHINX_AUTODOC_RUNNING
  from .base import Output
  from .color_depth import ColorDepth
label_desc: Use image node_id 8 for calling the Win32Output obj's underlying member method code with example usage: obj.get_win32_screen_buffer_info() and returns: sbinfo