General Terminal

GtSetIcon

Set the window icon from a file

Syntax

Signature
void GtSetIcon( const char *file );

Arguments

file is the path to an icon image supported by the active driver.

Return value

No return value.

Description

The example accepts an icon file as its first program argument and keeps the terminal open to display the result.

Example

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

#include <stdio.h>

int main( int argc, char **argv )
{
   if( argc != 2 )
   {
      fprintf( stderr, "Usage: %s icon-file\n", argv[ 0 ] );
      return 1;
   }

   GtSetIcon( argv[ 1 ] );
   QOut( "Press a key to close the terminal." );
   Inkey( 0, NIL );

   return 0;
}

See also