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

unsigned int caca_get_window_width ( void   ) 

Get the window width.

If libcaca runs in a window, get the usable window width. This value can be used for aspect ratio calculation. If libcaca does not run in a window or if there is no way to know the font size, assume a 6x10 font is being used. Note that the units are not necessarily pixels.

Returns:
The window width.

Definition at line 1020 of file graphics.c.

{
#if defined(USE_X11)
    if(_caca_driver == CACA_DRIVER_X11)
    {
        return _caca_width * x11_font_width;
    }
    else
#endif
#if defined(USE_WIN32)
    if(_caca_driver == CACA_DRIVER_WIN32)
    {
        /* FIXME */
    }
    else
#endif
    {
        /* Dummy */
    }

    /* Fallback to a 6x10 font */
    return _caca_width * 6;
}


Generated by  Doxygen 1.6.0   Back to index