General Terminal

GtGetViewportWidth

Get the current viewport width in text columns

Syntax

Signature
int GtGetViewportWidth( void );

Arguments

No arguments.

Return value

The number of text columns in the current viewport.

Description

Use GtGetViewportHeight() for the row count. The two values describe the text grid.

Example

gtgetviewportwidth.c
#include "xdev-wtui.h"

#include <stdio.h>

int main( void )
{
   printf( "Viewport dimensions, column count (columns): %d\n", GtGetViewportWidth() );

   return 0;
}

See also