Sha256: 5d3288f1a8bd4d1442c51fc5c0a81d8b18401b50e57025b2453a419299131468

Contents?: true

Size: 1020 Bytes

Versions: 8

Compression:

Stored size: 1020 Bytes

Contents

/* Public Domain Curses */

#include "pdcwin.h"

/* get the cursor size/shape */

int PDC_get_cursor_mode(void)
{
    CONSOLE_CURSOR_INFO ci;
    
    PDC_LOG(("PDC_get_cursor_mode() - called\n"));

    GetConsoleCursorInfo(pdc_con_out, &ci);

    return ci.dwSize;
}

/* return number of screen rows */

int PDC_get_rows(void)
{
    CONSOLE_SCREEN_BUFFER_INFO scr;

    PDC_LOG(("PDC_get_rows() - called\n"));

    GetConsoleScreenBufferInfo(pdc_con_out, &scr);

    return scr.srWindow.Bottom - scr.srWindow.Top + 1;
}

/* return number of buffer rows */

int PDC_get_buffer_rows(void)
{
    CONSOLE_SCREEN_BUFFER_INFO scr;

    PDC_LOG(("PDC_get_buffer_rows() - called\n"));

    GetConsoleScreenBufferInfo(pdc_con_out, &scr);

    return scr.dwSize.Y;
}

/* return width of screen/viewport */

int PDC_get_columns(void)
{
    CONSOLE_SCREEN_BUFFER_INFO scr;

    PDC_LOG(("PDC_get_columns() - called\n"));

    GetConsoleScreenBufferInfo(pdc_con_out, &scr);

    return scr.srWindow.Right - scr.srWindow.Left + 1;
}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
curses-1.4.7 vendor/PDCurses/wincon/pdcgetsc.c
curses-1.4.5 vendor/PDCurses/wincon/pdcgetsc.c
curses-1.4.4 vendor/PDCurses/wincon/pdcgetsc.c
curses-1.4.4.beta.1 vendor/PDCurses/wincon/pdcgetsc.c
curses-1.4.3 vendor/PDCurses/wincon/pdcgetsc.c
curses-1.4.2 vendor/PDCurses/wincon/pdcgetsc.c
curses-1.4.1 vendor/PDCurses/wincon/pdcgetsc.c
curses-1.4.0 vendor/PDCurses/wincon/pdcgetsc.c