Removed some stuff that wasn't needed any more in the window module

Also made the required changed for Rdoc to the system module and generated rdoc documentation for both modules.
It's safe to say now that rbSFML is available to be used for at least opening up a window and opengl context and render something in opengl.

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1658 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
groogy 2010-11-16 16:26:00 +00:00
parent 13e9b006e7
commit 85a4e5155e
7 changed files with 83 additions and 72 deletions

View file

@ -24,7 +24,6 @@
#include "main.hpp"
#include <SFML/System/Clock.hpp>
/* Utility class for manipulating time. */
VALUE globalClockClass;
/* Free a heap allocated object
@ -76,14 +75,22 @@ static VALUE Clock_New( VALUE aKlass )
void Init_Clock( void )
{
globalClockClass = rb_define_class_under( GetNamespace(), "Clock", rb_cObject );
/* SFML namespace which contains the classes of this module. */
VALUE sfml = rb_define_module( "SFML" );
/* Utility class for manipulating time.
*
* sf::Clock is a lightweight class for measuring time.
*
* Its resolution depends on the underlying OS, but you can generally expect a 1 ms resolution.
*/
globalClockClass = rb_define_class_under( sfml, "Clock", rb_cObject );
// Class methods
rb_define_singleton_method( globalClockClass, "new", FUNCPTR( Clock_New ), 0 );
rb_define_singleton_method( globalClockClass, "new", Clock_New, 0 );
// Instance methods
rb_define_method( globalClockClass, "getElapsedTime", FUNCPTR( Clock_GetElapsedTime ), 0 );
rb_define_method( globalClockClass, "reset", FUNCPTR( Clock_Reset ), 0 );
rb_define_method( globalClockClass, "getElapsedTime", Clock_GetElapsedTime, 0 );
rb_define_method( globalClockClass, "reset", Clock_Reset, 0 );
// Aliases
rb_define_alias( globalClockClass, "elapsedTime", "getElapsedTime" );