Functions

MSetPos

Set a new position for the mouse cursor

Syntax

Signature
void MSetPos( int row, int col );

Arguments

row, col Destination in zero-based text-cell coordinates.

Return value

No return value.

Description

Ask the active driver to move the mouse pointer to a zero-based screen cell. Use `MRow()` and `MCol()` to read the resulting position, or `MSetCursor()` to change pointer visibility.

Example

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

#include <stdio.h>

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

   MSetPos( 5, 10 );
   printf( "Mouse position: %d, %d\n", MRow(), MCol() );

   return 0;
}