Logo Search packages:      
Sourcecode: libcaca version File versions  Download package

int caca_set_window_title ( char const *  title  ) 

Set the window title.

If libcaca runs in a window, try to change its title. This works with the X11 and Win32 drivers.

Parameters:
title The desired window title.
Returns:
0 upon success, a non-zero value if an error occurs.

Definition at line 987 of file graphics.c.

{
#if defined(USE_X11)
    if(_caca_driver == CACA_DRIVER_X11)
    {
        XStoreName(x11_dpy, x11_window, title);
    }
    else
#endif
#if defined(USE_WIN32)
    if(_caca_driver == CACA_DRIVER_WIN32)
    {
        SetConsoleTitle(title);
    }
    else
#endif
    {
        /* Not supported */
        return -1;
    }

    return 0;
}


Generated by  Doxygen 1.6.0   Back to index