Functions

MSetCursor

Determine a mouse's visibility

Syntax

Signature
xBool MSetCursor( int visible );

Arguments

visible Zero hides the pointer, a nonzero value shows it, and NIL queries the setting.

Return value

The previous visibility setting as T or F.

Description

Read or change visibility of the mouse pointer. `NIL` reads the current setting. Save the value returned by a change and pass it back after hiding or showing the pointer temporarily. The visible effect depends on the active driver. Use `SetCursor()` for the separate text cursor.

Example

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

#include <stdio.h>

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

   xBool previous = MSetCursor( T );
   DispOut( "Move the mouse over this window.", NULL );
   Inkey( 0, NIL );
   MSetCursor( previous );

   return 0;
}