/* call-seq:
 *   VideoMode.getFullscreenModes       -> [supported_modes]
 *
 * Retrieve all the video modes supported in fullscreen mode.
 *
 * When creating a fullscreen window, the video mode is restricted to be compatible with what the graphics driver and 
 * monitor support. This function returns the complete list of all video modes that can be used in fullscreen mode. 
 * The returned array is sorted from best to worst, so that the first element will always give the best mode
 * (higher width, height and bits-per-pixel).
 */
static VALUE VideoMode_GetFullscreenModes( VALUE aKlass )
{
        const std::vector< sf::VideoMode >& modes = sf::VideoMode::GetFullscreenModes();
        VALUE array = rb_ary_new();
        for( std::vector< sf::VideoMode >::const_iterator it = modes.begin(), end = modes.end(); it != end; it++ )
        {
                sf::VideoMode *object = new sf::VideoMode( *it );
                VALUE rbData = Data_Wrap_Struct( aKlass, 0, VideoMode_Free, object );
                rb_obj_call_init( rbData, 0, 0 );
                rb_ary_push( array, rbData );
        }
        return array;
}