Class WinConsoleOutput

    • Constructor Detail

      • WinConsoleOutput

        public WinConsoleOutput​(com.sun.jna.platform.win32.WinNT.HANDLE outputHandle)
      • WinConsoleOutput

        public WinConsoleOutput​(com.sun.jna.platform.win32.WinNT.HANDLE outputHandle,
                                boolean closeHandle)
    • Method Detail

      • getHandle

        public com.sun.jna.platform.win32.WinNT.HANDLE getHandle()
      • setScreenBufferMode

        public void setScreenBufferMode​(ScreenBufferMode mode)
      • setCodePage

        public void setCodePage​(CodePage codePage)
      • getCursorInfo

        public CursorInfo getCursorInfo()
      • setCursorInfo

        public void setCursorInfo​(CursorInfo cursorInfo)
      • setCharAttributes

        public void setCharAttributes​(CharAttributes attributes)
      • write

        public int write​(String text)
      • cursor

        public void cursor​(int x,
                           int y)
      • activate

        public void activate()
      • getLargestSize

        public LargestSize getLargestSize()
        Retrieves the size of the largest possible console window, based on the current font and the size of the display.

        The function does not take into consideration the size of the console screen buffer, which means that the window size returned may be larger than the size of the console screen buffer. The GetConsoleScreenBufferInfo function can be used to determine the maximum size of the console window, given the current screen buffer size, the current font, and the display size.

        Получает размер максимально возможного окна консоли на основе текущего шрифта и размера экрана.

        Функция не учитывает размер экранного буфера консоли, а это означает, что возвращаемый размер окна может быть больше, чем размер экранного буфера консоли. Функцию GetConsoleScreenBufferInfo можно использовать для определения максимального размера окна консоли с учетом текущего размера экранного буфера, текущего шрифта и размера экрана.

        Returns:
        size
      • bufferSize

        public void bufferSize​(int width,
                               int height)
      • windowRect

        public void windowRect​(int left,
                               int top,
                               int right,
                               int bottom)