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):
      """
      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 unicode_literals
  from ctypes import windll, byref, ArgumentError, c_char, c_long, c_ulong, c_uint, pointer
  from ctypes.wintypes import DWORD, HANDLE
  from prompt_toolkit.renderer import Output
  from prompt_toolkit.styles import ANSI_COLOR_NAMES
  from prompt_toolkit.win32_types import CONSOLE_SCREEN_BUFFER_INFO, STD_OUTPUT_HANDLE, STD_INPUT_HANDLE, COORD, SMALL_RECT
  import os
  import six
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