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

unsigned int caca_get_window_height ( void   ) 

Get the window height.

If libcaca runs in a window, get the usable window height. 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 height.

Definition at line 1053 of file graphics.c.

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

    /* Fallback to a 6x10 font */
    return _caca_height * 10;
}


Generated by  Doxygen 1.6.0   Back to index