Skip to content

Support for getting terminal width & height #50

Description

@richard-uk1

Getting the terminal width and height is something you cannot do presently with the Terminal trait. It prevents implementation of something like termbox on top of Terminal trait.

The linux implementation looks something like (from termbox)

    struct winsize sz;
    memset(&sz, 0, sizeof(sz));

    ioctl(inout, TIOCGWINSZ, &sz);

    termw = sz.ws_col;
    termh = sz.ws_row;

whilst in windows the relevant function is kernel32::GetConsoleScreenBufferInfo

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions