Functions

MRow

Determine a mouse cursor's screen row position

Syntax

Signature
int MRow( void );

Arguments

No arguments.

Return value

The mouse row in text-cell coordinates, counted from zero.

Description

Read the mouse pointer's current zero-based row in the terminal grid. Pair it with `MCol()` to locate the mouse over a displayed control. Use `MPresent()` to check for mouse support.

Example

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

#include <stdio.h>

int main( void )
{
   if( !MPresent() )
   {
      puts( "Mouse unavailable." );
      return 0;
   }

   printf( "Mouse row: %d\n", MRow() );

   return 0;
}