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",".",")"]
code: def get_size(self):
      from prompt_toolkit.layout.screen import Size
  
      info = self.get_win32_screen_buffer_info()
  
      # We take the width of the *visible* region as the size. Not the width
      # of the complete screen buffer. (Unless use_complete_width has been
      # set.)
      if self.use_complete_width:
          width = info.dwSize.X
      else:
          width = info.srWindow.Right - info.srWindow.Left
  
      height = info.srWindow.Bottom - info.srWindow.Top + 1
  
      # We avoid the right margin, windows will wrap otherwise.
      maxwidth = info.dwSize.X - 1
      width = min(maxwidth, width)
  
      # Create `Size` object.
      return Size(rows=height, columns=width)
  
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 6 for calling the Win32Output obj's underlying member method code with example usage: obj.get_size() and returns: Size