I forgot to actually include the documentation to the commit.

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1659 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
groogy 2010-11-16 16:41:16 +00:00
parent 85a4e5155e
commit 01b0f37451
144 changed files with 12034 additions and 0 deletions

View file

@ -0,0 +1,164 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Module: SFML</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Module</strong></td>
<td class="class-name-in-header">SFML</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../files/window/main_cpp.html">
window/main.cpp
</a>
<br />
<a href="../files/window/ContextSettings_cpp.html">
window/ContextSettings.cpp
</a>
<br />
<a href="../files/window/Event_cpp.html">
window/Event.cpp
</a>
<br />
<a href="../files/window/VideoMode_cpp.html">
window/VideoMode.cpp
</a>
<br />
<a href="../files/window/Context_cpp.html">
window/Context.cpp
</a>
<br />
<a href="../files/window/Window_cpp.html">
window/Window.cpp
</a>
<br />
<a href="../files/window/Input_cpp.html">
window/Input.cpp
</a>
<br />
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
<a href="SFML.html">SFML</a> namespace which contains the classes of this
module.
</p>
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<div id="class-list">
<h3 class="section-bar">Classes and Modules</h3>
Module <a href="SFML/Joy.html" class="link">SFML::Joy</a><br />
Module <a href="SFML/Key.html" class="link">SFML::Key</a><br />
Module <a href="SFML/Mouse.html" class="link">SFML::Mouse</a><br />
Module <a href="SFML/Style.html" class="link">SFML::Style</a><br />
Class <a href="SFML/Context.html" class="link">SFML::Context</a><br />
Class <a href="SFML/ContextSettings.html" class="link">SFML::ContextSettings</a><br />
Class <a href="SFML/Event.html" class="link">SFML::Event</a><br />
Class <a href="SFML/Input.html" class="link">SFML::Input</a><br />
Class <a href="SFML/VideoMode.html" class="link">SFML::VideoMode</a><br />
Class <a href="SFML/Window.html" class="link">SFML::Window</a><br />
</div>
<div id="constants-list">
<h3 class="section-bar">Constants</h3>
<div class="name-list">
<table summary="Constants">
<tr class="top-aligned-row context-row">
<td class="context-item-name">WindowLoaded</td>
<td>=</td>
<td class="context-item-value">Qtrue</td>
</tr>
</table>
</div>
</div>
<!-- if method_list -->
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,236 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Class: SFML::Context</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">SFML::Context</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../files/window/main_cpp.html">
window/main.cpp
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
If you need to make OpenGL / graphics calls without having an active window
(like in a thread), you can use an instance of this class to get a valid
context.
</p>
<p>
Having a valid context is necessary for <b>every</b> OpenGL call, and for
most of the classes from the Graphics package.
</p>
<p>
Note that a context is only active in its current thread, if you create a
<a href="Context.html#M000033">new</a> thread it will have no valid context
by default.
</p>
<p>
To use a sf::<a href="Context.html">Context</a> instance, just construct it
and let it live as long as you need a valid context. No explicit activation
is needed, all it has to do is to exist. Its destructor will take care of
deactivating and freeing all the attached resources.
</p>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000036">active=</a>&nbsp;&nbsp;
<a href="#M000033">new</a>&nbsp;&nbsp;
<a href="#M000035">setActive</a>&nbsp;&nbsp;
<a href="#M000034">setReferenceActive</a>&nbsp;&nbsp;
<a href="#M000037">set_active</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Class methods</h3>
<div id="method-M000033" class="method-detail">
<a name="M000033"></a>
<div class="method-heading">
<a href="Context.src/M000033.html" target="Code" class="method-signature"
onclick="popupCode('Context.src/M000033.html');return false;">
<span class="method-name">Context.new() &rarr; context<br />
</span>
</a>
</div>
<div class="method-description">
<p>
The constructor creates and activates the context
</p>
</div>
</div>
<div id="method-M000034" class="method-detail">
<a name="M000034"></a>
<div class="method-heading">
<a href="Context.src/M000034.html" target="Code" class="method-signature"
onclick="popupCode('Context.src/M000034.html');return false;">
<span class="method-name">Context.SetReferenceActive() &rarr; true or false<br />
</span>
</a>
</div>
<div class="method-description">
<p>
This function is meant to be called internally; it is used to deactivate
the current context by activating another one (so that we still have an
active context on the current thread).
</p>
</div>
</div>
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000036" class="method-detail">
<a name="M000036"></a>
<div class="method-heading">
<span class="method-name">active=</span><span class="method-args">(p1)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="Context.html#M000035">setActive</a>
</p>
</div>
</div>
<div id="method-M000035" class="method-detail">
<a name="M000035"></a>
<div class="method-heading">
<a href="Context.src/M000035.html" target="Code" class="method-signature"
onclick="popupCode('Context.src/M000035.html');return false;">
<span class="method-name">context.SetActive(bool) &rarr; nil<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Activate or deactivate explicitely the context.
</p>
</div>
</div>
<div id="method-M000037" class="method-detail">
<a name="M000037"></a>
<div class="method-heading">
<span class="method-name">set_active</span><span class="method-args">(p1)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="Context.html#M000035">setActive</a>
</p>
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>new (SFML::Context)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* Context.new() -&gt; context
*
* The constructor creates and activates the context
*/
static VALUE Context_New( VALUE aKlass )
{
sf::Context *object = new sf::Context();
VALUE rbData = Data_Wrap_Struct( aKlass, 0, Context_Free, object );
rb_obj_call_init( rbData, 0, 0 );
return rbData;
}</pre>
</body>
</html>

View file

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>setReferenceActive (SFML::Context)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* Context.SetReferenceActive() -&gt; true or false
*
* This function is meant to be called internally; it is used to deactivate the
* current context by activating another one (so that we still have an active
* context on the current thread).
*/
static VALUE Context_SetReferenceActive( VALUE aKlass )
{
if( sf::Context::SetReferenceActive() == true )
{
return Qtrue;
}
else
{
return Qfalse;
}
}</pre>
</body>
</html>

View file

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>setActive (SFML::Context)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* context.SetActive(bool) -&gt; nil
*
* Activate or deactivate explicitely the context.
*/
static VALUE Context_SetActive( VALUE self, VALUE anArgument )
{
sf::Context *object = NULL;
Data_Get_Struct( self, sf::Context, object );
switch( anArgument )
{
case Qtrue:
object-&gt;SetActive( true );
break;
case Qfalse:
object-&gt;SetActive( false );
break;
default:
rb_raise( rb_eTypeError, &quot;expected true or false&quot; );
}
return Qnil;
}</pre>
</body>
</html>

View file

@ -0,0 +1,670 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Class: SFML::ContextSettings</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">SFML::ContextSettings</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../files/window/main_cpp.html">
window/main.cpp
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
<a href="ContextSettings.html">ContextSettings</a> allows to define several
advanced settings of the OpenGL context attached to a window.
</p>
<p>
All these settings have no impact on the regular <a
href="../SFML.html">SFML</a> rendering (graphics module) &#8212; except the
anti-aliasing level, so you may need to use this structure only if
you&#8216;re using <a href="../SFML.html">SFML</a> as a windowing system
for custom OpenGL rendering.
</p>
<p>
The DepthBits and StencilBits members define the number of bits per pixel
requested for the (respectively) <a
href="ContextSettings.html#M000124">depth</a> and <a
href="ContextSettings.html#M000128">stencil</a> buffers.
</p>
<p>
AntialiasingLevel represents the requested number of multisampling levels
for anti-aliasing.
</p>
<p>
MajorVersion and MinorVersion define the version of the OpenGL context that
you want. Only versions greater or equal to 3.0 are relevant; versions
lesser than 3.0 are all handled the same way (i.e. you can use any version
&lt; 3.0 if you don&#8216;t want an OpenGL 3 context).
</p>
<p>
Please note that these values are only a hint. No failure will be reported
if one or more of these values are not supported by the system; instead, <a
href="../SFML.html">SFML</a> will try to find the closest valid match. You
can then retrieve the settings that the window actually used to create its
context, with Window::GetSettings().
</p>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000132">antialiasing</a>&nbsp;&nbsp;
<a href="#M000133">antialiasing=</a>&nbsp;&nbsp;
<a href="#M000118">antialiasingLevel</a>&nbsp;&nbsp;
<a href="#M000119">antialiasingLevel=</a>&nbsp;&nbsp;
<a href="#M000134">antialiasing_level</a>&nbsp;&nbsp;
<a href="#M000135">antialiasing_level=</a>&nbsp;&nbsp;
<a href="#M000124">depth</a>&nbsp;&nbsp;
<a href="#M000125">depth=</a>&nbsp;&nbsp;
<a href="#M000114">depthBits</a>&nbsp;&nbsp;
<a href="#M000115">depthBits=</a>&nbsp;&nbsp;
<a href="#M000126">depth_bits</a>&nbsp;&nbsp;
<a href="#M000127">depth_bits=</a>&nbsp;&nbsp;
<a href="#M000136">major</a>&nbsp;&nbsp;
<a href="#M000137">major=</a>&nbsp;&nbsp;
<a href="#M000120">majorVersion</a>&nbsp;&nbsp;
<a href="#M000121">majorVersion=</a>&nbsp;&nbsp;
<a href="#M000138">major_version</a>&nbsp;&nbsp;
<a href="#M000139">major_version=</a>&nbsp;&nbsp;
<a href="#M000140">minor</a>&nbsp;&nbsp;
<a href="#M000141">minor=</a>&nbsp;&nbsp;
<a href="#M000122">minorVersion</a>&nbsp;&nbsp;
<a href="#M000123">minorVersion=</a>&nbsp;&nbsp;
<a href="#M000142">minor_version</a>&nbsp;&nbsp;
<a href="#M000143">minor_version=</a>&nbsp;&nbsp;
<a href="#M000113">new</a>&nbsp;&nbsp;
<a href="#M000128">stencil</a>&nbsp;&nbsp;
<a href="#M000129">stencil=</a>&nbsp;&nbsp;
<a href="#M000116">stencilBits</a>&nbsp;&nbsp;
<a href="#M000117">stencilBits=</a>&nbsp;&nbsp;
<a href="#M000130">stencil_bits</a>&nbsp;&nbsp;
<a href="#M000131">stencil_bits=</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Class methods</h3>
<div id="method-M000113" class="method-detail">
<a name="M000113"></a>
<div class="method-heading">
<a href="ContextSettings.src/M000113.html" target="Code" class="method-signature"
onclick="popupCode('ContextSettings.src/M000113.html');return false;">
<span class="method-name">ContextSettings.new( depth = 24, stencil = 8, antialiasing = 0, major = 2, minor = 0) &rarr; settings<br />
</span>
</a>
</div>
<div class="method-description">
<p>
The constructor creates the settings
</p>
</div>
</div>
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000132" class="method-detail">
<a name="M000132"></a>
<div class="method-heading">
<span class="method-name">antialiasing</span><span class="method-args">()</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000118">antialiasingLevel</a>
</p>
</div>
</div>
<div id="method-M000133" class="method-detail">
<a name="M000133"></a>
<div class="method-heading">
<span class="method-name">antialiasing=</span><span class="method-args">(p1)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000118">antialiasingLevel</a>=
</p>
</div>
</div>
<div id="method-M000118" class="method-detail">
<a name="M000118"></a>
<div class="method-heading">
<a href="ContextSettings.src/M000118.html" target="Code" class="method-signature"
onclick="popupCode('ContextSettings.src/M000118.html');return false;">
<span class="method-name">settings.antialiasingLevel &rarr; antialiasing<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Level of <a href="ContextSettings.html#M000132">antialiasing</a>
</p>
</div>
</div>
<div id="method-M000119" class="method-detail">
<a name="M000119"></a>
<div class="method-heading">
<a href="ContextSettings.src/M000119.html" target="Code" class="method-signature"
onclick="popupCode('ContextSettings.src/M000119.html');return false;">
<span class="method-name">settings.antialiasingLevel=(new_antialiasing) &rarr; new_antialiasing<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Level of <a href="ContextSettings.html#M000132">antialiasing</a>
</p>
</div>
</div>
<div id="method-M000134" class="method-detail">
<a name="M000134"></a>
<div class="method-heading">
<span class="method-name">antialiasing_level</span><span class="method-args">()</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000118">antialiasingLevel</a>
</p>
</div>
</div>
<div id="method-M000135" class="method-detail">
<a name="M000135"></a>
<div class="method-heading">
<span class="method-name">antialiasing_level=</span><span class="method-args">(p1)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000118">antialiasingLevel</a>=
</p>
</div>
</div>
<div id="method-M000124" class="method-detail">
<a name="M000124"></a>
<div class="method-heading">
<span class="method-name">depth</span><span class="method-args">()</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000114">depthBits</a>
</p>
</div>
</div>
<div id="method-M000125" class="method-detail">
<a name="M000125"></a>
<div class="method-heading">
<span class="method-name">depth=</span><span class="method-args">(p1)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000114">depthBits</a>=
</p>
</div>
</div>
<div id="method-M000114" class="method-detail">
<a name="M000114"></a>
<div class="method-heading">
<a href="ContextSettings.src/M000114.html" target="Code" class="method-signature"
onclick="popupCode('ContextSettings.src/M000114.html');return false;">
<span class="method-name">settings.depthBits &rarr; depth<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Bits of the <a href="ContextSettings.html#M000124">depth</a> buffer
</p>
</div>
</div>
<div id="method-M000115" class="method-detail">
<a name="M000115"></a>
<div class="method-heading">
<a href="ContextSettings.src/M000115.html" target="Code" class="method-signature"
onclick="popupCode('ContextSettings.src/M000115.html');return false;">
<span class="method-name">settings.depthBits=(new_depth) &rarr; new_depth<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Bits of the <a href="ContextSettings.html#M000124">depth</a> buffer
</p>
</div>
</div>
<div id="method-M000126" class="method-detail">
<a name="M000126"></a>
<div class="method-heading">
<span class="method-name">depth_bits</span><span class="method-args">()</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000114">depthBits</a>
</p>
</div>
</div>
<div id="method-M000127" class="method-detail">
<a name="M000127"></a>
<div class="method-heading">
<span class="method-name">depth_bits=</span><span class="method-args">(p1)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000114">depthBits</a>=
</p>
</div>
</div>
<div id="method-M000136" class="method-detail">
<a name="M000136"></a>
<div class="method-heading">
<span class="method-name">major</span><span class="method-args">()</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000120">majorVersion</a>
</p>
</div>
</div>
<div id="method-M000137" class="method-detail">
<a name="M000137"></a>
<div class="method-heading">
<span class="method-name">major=</span><span class="method-args">(p1)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000120">majorVersion</a>=
</p>
</div>
</div>
<div id="method-M000120" class="method-detail">
<a name="M000120"></a>
<div class="method-heading">
<a href="ContextSettings.src/M000120.html" target="Code" class="method-signature"
onclick="popupCode('ContextSettings.src/M000120.html');return false;">
<span class="method-name">settings.majorVersion &rarr; major<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Major number of the context version to create
</p>
</div>
</div>
<div id="method-M000121" class="method-detail">
<a name="M000121"></a>
<div class="method-heading">
<a href="ContextSettings.src/M000121.html" target="Code" class="method-signature"
onclick="popupCode('ContextSettings.src/M000121.html');return false;">
<span class="method-name">settings.majorVersion=(new_major) &rarr; new_major<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Major number of the context version to create
</p>
</div>
</div>
<div id="method-M000138" class="method-detail">
<a name="M000138"></a>
<div class="method-heading">
<span class="method-name">major_version</span><span class="method-args">()</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000120">majorVersion</a>
</p>
</div>
</div>
<div id="method-M000139" class="method-detail">
<a name="M000139"></a>
<div class="method-heading">
<span class="method-name">major_version=</span><span class="method-args">(p1)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000120">majorVersion</a>=
</p>
</div>
</div>
<div id="method-M000140" class="method-detail">
<a name="M000140"></a>
<div class="method-heading">
<span class="method-name">minor</span><span class="method-args">()</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000122">minorVersion</a>
</p>
</div>
</div>
<div id="method-M000141" class="method-detail">
<a name="M000141"></a>
<div class="method-heading">
<span class="method-name">minor=</span><span class="method-args">(p1)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000122">minorVersion</a>=
</p>
</div>
</div>
<div id="method-M000122" class="method-detail">
<a name="M000122"></a>
<div class="method-heading">
<a href="ContextSettings.src/M000122.html" target="Code" class="method-signature"
onclick="popupCode('ContextSettings.src/M000122.html');return false;">
<span class="method-name">settings.minorVersion &rarr; minor<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Minor number of the context version to create
</p>
</div>
</div>
<div id="method-M000123" class="method-detail">
<a name="M000123"></a>
<div class="method-heading">
<a href="ContextSettings.src/M000123.html" target="Code" class="method-signature"
onclick="popupCode('ContextSettings.src/M000123.html');return false;">
<span class="method-name">settings.minorVersion=(new_minor) &rarr; new_minor<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Minor number of the context version to create
</p>
</div>
</div>
<div id="method-M000142" class="method-detail">
<a name="M000142"></a>
<div class="method-heading">
<span class="method-name">minor_version</span><span class="method-args">()</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000122">minorVersion</a>
</p>
</div>
</div>
<div id="method-M000143" class="method-detail">
<a name="M000143"></a>
<div class="method-heading">
<span class="method-name">minor_version=</span><span class="method-args">(p1)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000122">minorVersion</a>=
</p>
</div>
</div>
<div id="method-M000128" class="method-detail">
<a name="M000128"></a>
<div class="method-heading">
<span class="method-name">stencil</span><span class="method-args">()</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000116">stencilBits</a>
</p>
</div>
</div>
<div id="method-M000129" class="method-detail">
<a name="M000129"></a>
<div class="method-heading">
<span class="method-name">stencil=</span><span class="method-args">(p1)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000116">stencilBits</a>=
</p>
</div>
</div>
<div id="method-M000116" class="method-detail">
<a name="M000116"></a>
<div class="method-heading">
<a href="ContextSettings.src/M000116.html" target="Code" class="method-signature"
onclick="popupCode('ContextSettings.src/M000116.html');return false;">
<span class="method-name">settings.stencilBits &rarr; stencil<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Bits of the <a href="ContextSettings.html#M000128">stencil</a> buffer
</p>
</div>
</div>
<div id="method-M000117" class="method-detail">
<a name="M000117"></a>
<div class="method-heading">
<a href="ContextSettings.src/M000117.html" target="Code" class="method-signature"
onclick="popupCode('ContextSettings.src/M000117.html');return false;">
<span class="method-name">settings.stencilBits=(new_stencil) &rarr; new_stencil<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Bits of the <a href="ContextSettings.html#M000128">stencil</a> buffer
</p>
</div>
</div>
<div id="method-M000130" class="method-detail">
<a name="M000130"></a>
<div class="method-heading">
<span class="method-name">stencil_bits</span><span class="method-args">()</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000116">stencilBits</a>
</p>
</div>
</div>
<div id="method-M000131" class="method-detail">
<a name="M000131"></a>
<div class="method-heading">
<span class="method-name">stencil_bits=</span><span class="method-args">(p1)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000116">stencilBits</a>=
</p>
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>new (SFML::ContextSettings)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* ContextSettings.new( depth = 24, stencil = 8, antialiasing = 0, major = 2, minor = 0) -&gt; settings
*
* The constructor creates the settings
*/
static VALUE ContextSettings_New( VALUE aKlass, VALUE someArgs )
{
long arrayLength = RARRAY_LEN( someArgs );
sf::ContextSettings *object = NULL;
if( arrayLength == 0 )
{
object = new sf::ContextSettings();
}
else if( arrayLength == 1 )
{
VALUE arg1 = rb_ary_entry( someArgs, 0 );
object = new sf::ContextSettings( NUM2UINT( arg1 ) );
}
else if( arrayLength == 2 )
{
VALUE arg1 = rb_ary_entry( someArgs, 0 );
VALUE arg2 = rb_ary_entry( someArgs, 1 );
object = new sf::ContextSettings( NUM2UINT( arg1 ), NUM2UINT( arg2 ) );
}
else if( arrayLength == 3 )
{
VALUE arg1 = rb_ary_entry( someArgs, 0 );
VALUE arg2 = rb_ary_entry( someArgs, 1 );
VALUE arg3 = rb_ary_entry( someArgs, 2 );
object = new sf::ContextSettings( NUM2UINT( arg1 ), NUM2UINT( arg2 ), NUM2UINT( arg3 ) );
}
else if( arrayLength == 4 )
{
VALUE arg1 = rb_ary_entry( someArgs, 0 );
VALUE arg2 = rb_ary_entry( someArgs, 1 );
VALUE arg3 = rb_ary_entry( someArgs, 2 );
VALUE arg4 = rb_ary_entry( someArgs, 3 );
object = new sf::ContextSettings( NUM2UINT( arg1 ), NUM2UINT( arg2 ), NUM2UINT( arg3 ), NUM2UINT( arg4 ) );
}
else if( arrayLength == 5 )
{
VALUE arg1 = rb_ary_entry( someArgs, 0 );
VALUE arg2 = rb_ary_entry( someArgs, 1 );
VALUE arg3 = rb_ary_entry( someArgs, 2 );
VALUE arg4 = rb_ary_entry( someArgs, 3 );
VALUE arg5 = rb_ary_entry( someArgs, 4 );
object = new sf::ContextSettings( NUM2UINT( arg1 ), NUM2UINT( arg2 ), NUM2UINT( arg3 ), NUM2UINT( arg4 ), NUM2UINT( arg5 ) );
}
else
{
rb_raise( rb_eArgError, &quot;Expected 0..5 arguments but was given %ld&quot;, arrayLength );
return Qnil;
}
VALUE rbData = Data_Wrap_Struct( aKlass, 0, ContextSettings_Free, object );
rb_obj_call_init( rbData, 0, 0 );
return rbData;
}</pre>
</body>
</html>

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>depthBits (SFML::ContextSettings)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* settings.depthBits -&gt; depth
*
* Bits of the depth buffer
*/
static VALUE ContextSettings_GetDepth( VALUE self )
{
sf::ContextSettings *object = NULL;
Data_Get_Struct( self, sf::ContextSettings, object );
return INT2FIX( object-&gt;DepthBits );
}</pre>
</body>
</html>

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>depthBits= (SFML::ContextSettings)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* settings.depthBits=(new_depth) -&gt; new_depth
*
* Bits of the depth buffer
*/
static VALUE ContextSettings_SetDepth( VALUE self, VALUE aValue )
{
sf::ContextSettings *object = NULL;
Data_Get_Struct( self, sf::ContextSettings, object );
return INT2FIX( object-&gt;DepthBits = NUM2UINT( aValue ) );
}</pre>
</body>
</html>

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>stencilBits (SFML::ContextSettings)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* settings.stencilBits -&gt; stencil
*
* Bits of the stencil buffer
*/
static VALUE ContextSettings_GetStencil( VALUE self )
{
sf::ContextSettings *object = NULL;
Data_Get_Struct( self, sf::ContextSettings, object );
return INT2FIX( object-&gt;StencilBits );
}</pre>
</body>
</html>

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>stencilBits= (SFML::ContextSettings)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* settings.stencilBits=(new_stencil) -&gt; new_stencil
*
* Bits of the stencil buffer
*/
static VALUE ContextSettings_SetStencil( VALUE self, VALUE aValue )
{
sf::ContextSettings *object = NULL;
Data_Get_Struct( self, sf::ContextSettings, object );
return INT2FIX( object-&gt;StencilBits = NUM2UINT( aValue ) );
}</pre>
</body>
</html>

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>antialiasingLevel (SFML::ContextSettings)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* settings.antialiasingLevel -&gt; antialiasing
*
* Level of antialiasing
*/
static VALUE ContextSettings_GetAntialiasing( VALUE self )
{
sf::ContextSettings *object = NULL;
Data_Get_Struct( self, sf::ContextSettings, object );
return INT2FIX( object-&gt;AntialiasingLevel );
}</pre>
</body>
</html>

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>antialiasingLevel= (SFML::ContextSettings)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* settings.antialiasingLevel=(new_antialiasing) -&gt; new_antialiasing
*
* Level of antialiasing
*/
static VALUE ContextSettings_SetAntialiasing( VALUE self, VALUE aValue )
{
sf::ContextSettings *object = NULL;
Data_Get_Struct( self, sf::ContextSettings, object );
return INT2FIX( object-&gt;AntialiasingLevel = NUM2UINT( aValue ) );
}</pre>
</body>
</html>

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>majorVersion (SFML::ContextSettings)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* settings.majorVersion -&gt; major
*
* Major number of the context version to create
*/
static VALUE ContextSettings_GetMajorVersion( VALUE self )
{
sf::ContextSettings *object = NULL;
Data_Get_Struct( self, sf::ContextSettings, object );
return INT2FIX( object-&gt;MajorVersion );
}</pre>
</body>
</html>

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>majorVersion= (SFML::ContextSettings)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* settings.majorVersion=(new_major) -&gt; new_major
*
* Major number of the context version to create
*/
static VALUE ContextSettings_SetMajorVersion( VALUE self, VALUE aValue )
{
sf::ContextSettings *object = NULL;
Data_Get_Struct( self, sf::ContextSettings, object );
return INT2FIX( object-&gt;MajorVersion = NUM2UINT( aValue ) );
}</pre>
</body>
</html>

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>minorVersion (SFML::ContextSettings)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* settings.minorVersion -&gt; minor
*
* Minor number of the context version to create
*/
static VALUE ContextSettings_GetMinorVersion( VALUE self )
{
sf::ContextSettings *object = NULL;
Data_Get_Struct( self, sf::ContextSettings, object );
return INT2FIX( object-&gt;MinorVersion );
}</pre>
</body>
</html>

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>minorVersion= (SFML::ContextSettings)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* settings.minorVersion=(new_minor) -&gt; new_minor
*
* Minor number of the context version to create
*/
static VALUE ContextSettings_SetMinorVersion( VALUE self, VALUE aValue )
{
sf::ContextSettings *object = NULL;
Data_Get_Struct( self, sf::ContextSettings, object );
return INT2FIX( object-&gt;MinorVersion = NUM2UINT( aValue ) );
}</pre>
</body>
</html>

View file

@ -0,0 +1,371 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Class: SFML::Event</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">SFML::Event</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../files/window/main_cpp.html">
window/main.cpp
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
<a href="Event.html">SFML::Event</a> holds all the informations about a
system event that just happened.
</p>
<p>
Events are retrieved using the SFML::Window#GetEvent function.
</p>
<p>
A <a href="Event.html">SFML::Event</a> instance contains the type of the
event (mouse moved, key pressed, window closed, &#8230;) as well as the
details about this particular event. Please note that the event parameters
are defined in a union, which means that only the member matching the type
of the event will be properly filled; all other members will have undefined
values and must not be read if the type of the event doesn&#8216;t match.
For example, if you received a KeyPressed event, then you must read the
event.Key
</p>
<pre>
member, all other members such as event.MouseMove or event.Text will have undefined values.
</pre>
<p>
The ruby version differs from C++ in that the parameters are still stored
in a union but that the values can be directly accessed from the event
object. If you try to access any data which would be considered undefined
then SFML::SomeKindOfException will be thrown.
</p>
<p>
Usage example:
</p>
<pre>
while event = window.getEvent()
# Request for closing the window
if event.type == SFML::Event::Closed
window.close
# The escape key was pressed
if ( event.type == sf::Event::KeyPressed ) &amp;&amp; ( event.code == SFML::Key::Escape )
window.close
# The window was resized
if event.type == SFML::Event::Resized
DoSomethingWithTheNewSize(event.size);
# etc ...
end
</pre>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000091">new</a>&nbsp;&nbsp;
<a href="#M000092">new</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<div id="class-list">
<h3 class="section-bar">Classes and Modules</h3>
Class <a href="Event/JoyButton.html" class="link">SFML::Event::JoyButton</a><br />
Class <a href="Event/JoyMove.html" class="link">SFML::Event::JoyMove</a><br />
Class <a href="Event/Key.html" class="link">SFML::Event::Key</a><br />
Class <a href="Event/MouseButton.html" class="link">SFML::Event::MouseButton</a><br />
Class <a href="Event/MouseMove.html" class="link">SFML::Event::MouseMove</a><br />
Class <a href="Event/MouseWheel.html" class="link">SFML::Event::MouseWheel</a><br />
Class <a href="Event/Size.html" class="link">SFML::Event::Size</a><br />
Class <a href="Event/Text.html" class="link">SFML::Event::Text</a><br />
</div>
<div id="constants-list">
<h3 class="section-bar">Constants</h3>
<div class="name-list">
<table summary="Constants">
<tr class="top-aligned-row context-row">
<td class="context-item-name">Closed</td>
<td>=</td>
<td class="context-item-value">INT2NUM( sf::Event::Closed )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Resized</td>
<td>=</td>
<td class="context-item-value">INT2NUM( sf::Event::Resized )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">LostFocus</td>
<td>=</td>
<td class="context-item-value">INT2NUM( sf::Event::LostFocus )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">GainedFocus</td>
<td>=</td>
<td class="context-item-value">INT2NUM( sf::Event::GainedFocus )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">TextEntered</td>
<td>=</td>
<td class="context-item-value">INT2NUM( sf::Event::TextEntered )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">KeyPressed</td>
<td>=</td>
<td class="context-item-value">INT2NUM( sf::Event::KeyPressed )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">KeyReleased</td>
<td>=</td>
<td class="context-item-value">INT2NUM( sf::Event::KeyReleased )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">MouseWheelMoved</td>
<td>=</td>
<td class="context-item-value">INT2NUM( sf::Event::MouseWheelMoved )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">MouseButtonPressed</td>
<td>=</td>
<td class="context-item-value">INT2NUM( sf::Event::MouseButtonPressed )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">MouseButtonReleased</td>
<td>=</td>
<td class="context-item-value">INT2NUM( sf::Event::MouseButtonReleased )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">MouseMoved</td>
<td>=</td>
<td class="context-item-value">INT2NUM( sf::Event::MouseMoved )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">MouseEntered</td>
<td>=</td>
<td class="context-item-value">INT2NUM( sf::Event::MouseEntered )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">MouseLeft</td>
<td>=</td>
<td class="context-item-value">INT2NUM( sf::Event::MouseLeft )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">JoyButtonPressed</td>
<td>=</td>
<td class="context-item-value">INT2NUM( sf::Event::JoyButtonPressed )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">JoyButtonReleased</td>
<td>=</td>
<td class="context-item-value">INT2NUM( sf::Event::JoyButtonReleased )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">JoyMoved</td>
<td>=</td>
<td class="context-item-value">INT2NUM( sf::Event::JoyMoved )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Count</td>
<td>=</td>
<td class="context-item-value">INT2NUM( sf::Event::Count )</td>
</tr>
</table>
</div>
</div>
<div id="attribute-list">
<h3 class="section-bar">Attributes</h3>
<div class="name-list">
<table>
<tr class="top-aligned-row context-row">
<td class="context-item-name">joyButton</td>
<td class="context-item-value">&nbsp;[R]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">joyMove</td>
<td class="context-item-value">&nbsp;[R]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">key</td>
<td class="context-item-value">&nbsp;[R]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">mouseButton</td>
<td class="context-item-value">&nbsp;[R]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">mouseMove</td>
<td class="context-item-value">&nbsp;[R]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">mouseWheel</td>
<td class="context-item-value">&nbsp;[R]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">size</td>
<td class="context-item-value">&nbsp;[R]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">text</td>
<td class="context-item-value">&nbsp;[R]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">type</td>
<td class="context-item-value">&nbsp;[R]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
</table>
</div>
</div>
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Class methods</h3>
<div id="method-M000091" class="method-detail">
<a name="M000091"></a>
<div class="method-heading">
<a href="Event.src/M000091.html" target="Code" class="method-signature"
onclick="popupCode('Event.src/M000091.html');return false;">
<span class="method-name">Event.new(type) &rarr; event<br />
</span>
</a>
</div>
<div class="method-description">
<p>
You should never call this function directly. You should only aquire
event&#8216;s trough <a
href="Window.html#M000042">SFML::Window#getEvent</a> or <a
href="Window.html#M000062">SFML::Window#waitEvent</a>, if you need to pass
data to a method that takes an event instance then make a proxy instance to
simulate an event. NOTE: Using this method works but it will act constant
as you can&#8216;t access any values.
</p>
</div>
</div>
<div id="method-M000092" class="method-detail">
<a name="M000092"></a>
<div class="method-heading">
<a href="Event.src/M000092.html" target="Code" class="method-signature"
onclick="popupCode('Event.src/M000092.html');return false;">
<span class="method-name">new</span><span class="method-args">(p1)</span>
</a>
</div>
<div class="method-description">
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>new (SFML::Event)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* Event.new(type) -&gt; event
*
* You should never call this function directly. You should only aquire event's trough
* SFML::Window#getEvent or SFML::Window#waitEvent, if you need to pass data to a method
* that takes an event instance then make a proxy instance to simulate an event.
* NOTE: Using this method works but it will act constant as you can't access any values.
*/
static VALUE Event_New( int argc, VALUE * args, VALUE aKlass )
{
sf::Event *object = new sf::Event();
VALUE rbData = Data_Wrap_Struct( aKlass, 0, Event_Free, object );
rb_obj_call_init( rbData, argc, args );
return rbData;
}</pre>
</body>
</html>

View file

@ -0,0 +1,82 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>new (SFML::Event)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* */
static VALUE Event_Initialize( VALUE self, VALUE aType )
{
sf::Event * object = NULL;
Data_Get_Struct( self, sf::Event, object );
int typeNum = FIX2INT( aType );
if(typeNum &gt;= 0 &amp;&amp; typeNum &lt; sf::Event::Count)
{
rb_iv_set( self, &quot;@type&quot;, aType );
object-&gt;Type = static_cast&lt; sf::Event::EventType &gt;( typeNum );
}
else
{
rb_raise( rb_eTypeError, &quot;expected Fixnum in range of 0...SFML::Event::Count&quot; );
}
bool noSpecialType = false;
VALUE eventType;
const char * name = NULL;
switch( object-&gt;Type )
{
case sf::Event::JoyButtonPressed:
case sf::Event::JoyButtonReleased:
eventType = Data_Wrap_Struct( globalJoyButtonEventClass, 0, 0, &amp;object-&gt;JoyButton );
name = &quot;@joyButton&quot;;
break;
case sf::Event::JoyMoved:
eventType = Data_Wrap_Struct( globalJoyMoveEventClass, 0, 0, &amp;object-&gt;JoyMove );
name = &quot;@joyMove&quot;;
break;
case sf::Event::KeyPressed:
case sf::Event::KeyReleased:
eventType = Data_Wrap_Struct( globalKeyEventClass, 0, 0, &amp;object-&gt;Key );
name = &quot;@key&quot;;
break;
case sf::Event::MouseButtonPressed:
case sf::Event::MouseButtonReleased:
eventType = Data_Wrap_Struct( globalMouseButtonEventClass, 0, 0, &amp;object-&gt;MouseButton );
name = &quot;@mouseButton&quot;;
break;
case sf::Event::MouseMoved:
eventType = Data_Wrap_Struct( globalMouseMoveEventClass, 0, 0, &amp;object-&gt;MouseMove );
name = &quot;@mouseMove&quot;;
break;
case sf::Event::MouseWheelMoved:
eventType = Data_Wrap_Struct( globalMouseWheelEventClass, 0, 0, &amp;object-&gt;MouseWheel );
name = &quot;@mouseWheel&quot;;
break;
case sf::Event::Resized:
eventType = Data_Wrap_Struct( globalSizeEventClass, 0, 0, &amp;object-&gt;Size );
name = &quot;@resized&quot;;
break;
case sf::Event::TextEntered:
eventType = Data_Wrap_Struct( globalTextEventClass, 0, 0, &amp;object-&gt;Text );
name = &quot;@text&quot;;
break;
default:
noSpecialType = true;
};
if( noSpecialType == false )
{
rb_obj_call_init( eventType, 0, 0 );
rb_iv_set( eventType, &quot;@internal__parent_ref&quot;, self );
rb_iv_set( self, name, eventType );
}
}</pre>
</body>
</html>

View file

@ -0,0 +1,209 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Class: SFML::Event::JoyButton</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">SFML::Event::JoyButton</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../../files/window/Event_cpp.html">
window/Event.cpp
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
<a href="../Event.html">SFML::Event</a> holds all the informations about a
system event that just happened.
</p>
<p>
Events are retrieved using the SFML::Window#GetEvent function.
</p>
<p>
A <a href="../Event.html">SFML::Event</a> instance contains the type of the
event (mouse moved, key pressed, window closed, &#8230;) as well as the
details about this particular event. Please note that the event parameters
are defined in a union, which means that only the member matching the type
of the event will be properly filled; all other members will have undefined
values and must not be read if the type of the event doesn&#8216;t match.
For example, if you received a KeyPressed event, then you must read the
event.Key
</p>
<pre>
member, all other members such as event.MouseMove or event.Text will have undefined values.
</pre>
<p>
The ruby version differs from C++ in that the parameters are still stored
in a union but that the values can be directly accessed from the event
object. If you try to access any data which would be considered undefined
then SFML::SomeKindOfException will be thrown.
</p>
<p>
Usage example:
</p>
<pre>
while event = window.getEvent()
# Request for closing the window
if event.type == SFML::Event::Closed
window.close
# The escape key was pressed
if ( event.type == sf::Event::KeyPressed ) &amp;&amp; ( event.code == SFML::Key::Escape )
window.close
# The window was resized
if event.type == SFML::Event::Resized
DoSomethingWithTheNewSize(event.size);
# etc ...
end
</pre>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000105">button</a>&nbsp;&nbsp;
<a href="#M000104">joystickId</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000105" class="method-detail">
<a name="M000105"></a>
<div class="method-heading">
<a href="JoyButton.src/M000105.html" target="Code" class="method-signature"
onclick="popupCode('JoyButton.src/M000105.html');return false;">
<span class="method-name">button</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
Index of the <a href="JoyButton.html#M000105">button</a> that has been
pressed.
</p>
</div>
</div>
<div id="method-M000104" class="method-detail">
<a name="M000104"></a>
<div class="method-heading">
<a href="JoyButton.src/M000104.html" target="Code" class="method-signature"
onclick="popupCode('JoyButton.src/M000104.html');return false;">
<span class="method-name">joystickId</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
Index of the joystick (0 or 1).
</p>
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>joystickId (SFML::Event::JoyButton)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* Index of the joystick (0 or 1). */
static VALUE JoyButtonEvent_GetJoystickId( VALUE self )
</pre>
</body>
</html>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>button (SFML::Event::JoyButton)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* Index of the button that has been pressed. */
static VALUE JoyButtonEvent_GetButton( VALUE self )
</pre>
</body>
</html>

View file

@ -0,0 +1,227 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Class: SFML::Event::JoyMove</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">SFML::Event::JoyMove</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../../files/window/Event_cpp.html">
window/Event.cpp
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
<a href="../Event.html">SFML::Event</a> holds all the informations about a
system event that just happened.
</p>
<p>
Events are retrieved using the SFML::Window#GetEvent function.
</p>
<p>
A <a href="../Event.html">SFML::Event</a> instance contains the type of the
event (mouse moved, key pressed, window closed, &#8230;) as well as the
details about this particular event. Please note that the event parameters
are defined in a union, which means that only the member matching the type
of the event will be properly filled; all other members will have undefined
values and must not be read if the type of the event doesn&#8216;t match.
For example, if you received a KeyPressed event, then you must read the
event.Key
</p>
<pre>
member, all other members such as event.MouseMove or event.Text will have undefined values.
</pre>
<p>
The ruby version differs from C++ in that the parameters are still stored
in a union but that the values can be directly accessed from the event
object. If you try to access any data which would be considered undefined
then SFML::SomeKindOfException will be thrown.
</p>
<p>
Usage example:
</p>
<pre>
while event = window.getEvent()
# Request for closing the window
if event.type == SFML::Event::Closed
window.close
# The escape key was pressed
if ( event.type == sf::Event::KeyPressed ) &amp;&amp; ( event.code == SFML::Key::Escape )
window.close
# The window was resized
if event.type == SFML::Event::Resized
DoSomethingWithTheNewSize(event.size);
# etc ...
end
</pre>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000111">axis</a>&nbsp;&nbsp;
<a href="#M000110">joystickId</a>&nbsp;&nbsp;
<a href="#M000112">position</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000111" class="method-detail">
<a name="M000111"></a>
<div class="method-heading">
<a href="JoyMove.src/M000111.html" target="Code" class="method-signature"
onclick="popupCode('JoyMove.src/M000111.html');return false;">
<span class="method-name">axis</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
Axis on which the joystick moved.
</p>
</div>
</div>
<div id="method-M000110" class="method-detail">
<a name="M000110"></a>
<div class="method-heading">
<a href="JoyMove.src/M000110.html" target="Code" class="method-signature"
onclick="popupCode('JoyMove.src/M000110.html');return false;">
<span class="method-name">joystickId</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
Index of the joystick (0 or 1).
</p>
</div>
</div>
<div id="method-M000112" class="method-detail">
<a name="M000112"></a>
<div class="method-heading">
<a href="JoyMove.src/M000112.html" target="Code" class="method-signature"
onclick="popupCode('JoyMove.src/M000112.html');return false;">
<span class="method-name">position</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
New <a href="JoyMove.html#M000112">position</a> on the <a
href="JoyMove.html#M000111">axis</a> (in range [-100, 100]).
</p>
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>joystickId (SFML::Event::JoyMove)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* Index of the joystick (0 or 1). */
static VALUE JoyMoveEvent_GetJoystickId( VALUE self )
</pre>
</body>
</html>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>axis (SFML::Event::JoyMove)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* Axis on which the joystick moved. */
static VALUE JoyMoveEvent_GetAxis( VALUE self )
</pre>
</body>
</html>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>position (SFML::Event::JoyMove)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* New position on the axis (in range [-100, 100]). */
static VALUE JoyMoveEvent_GetPosition( VALUE self )
</pre>
</body>
</html>

View file

@ -0,0 +1,244 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Class: SFML::Event::Key</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">SFML::Event::Key</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../../files/window/Event_cpp.html">
window/Event.cpp
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
<a href="../Event.html">SFML::Event</a> holds all the informations about a
system event that just happened.
</p>
<p>
Events are retrieved using the SFML::Window#GetEvent function.
</p>
<p>
A <a href="../Event.html">SFML::Event</a> instance contains the type of the
event (mouse moved, key pressed, window closed, &#8230;) as well as the
details about this particular event. Please note that the event parameters
are defined in a union, which means that only the member matching the type
of the event will be properly filled; all other members will have undefined
values and must not be read if the type of the event doesn&#8216;t match.
For example, if you received a KeyPressed event, then you must read the
event.Key
</p>
<pre>
member, all other members such as event.MouseMove or event.Text will have undefined values.
</pre>
<p>
The ruby version differs from C++ in that the parameters are still stored
in a union but that the values can be directly accessed from the event
object. If you try to access any data which would be considered undefined
then SFML::SomeKindOfException will be thrown.
</p>
<p>
Usage example:
</p>
<pre>
while event = window.getEvent()
# Request for closing the window
if event.type == SFML::Event::Closed
window.close
# The escape key was pressed
if ( event.type == sf::Event::KeyPressed ) &amp;&amp; ( event.code == SFML::Key::Escape )
window.close
# The window was resized
if event.type == SFML::Event::Resized
DoSomethingWithTheNewSize(event.size);
# etc ...
end
</pre>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000107">alt</a>&nbsp;&nbsp;
<a href="#M000106">code</a>&nbsp;&nbsp;
<a href="#M000108">control</a>&nbsp;&nbsp;
<a href="#M000109">shift</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000107" class="method-detail">
<a name="M000107"></a>
<div class="method-heading">
<a href="Key.src/M000107.html" target="Code" class="method-signature"
onclick="popupCode('Key.src/M000107.html');return false;">
<span class="method-name">alt</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
Is the Alt key pressed?
</p>
</div>
</div>
<div id="method-M000106" class="method-detail">
<a name="M000106"></a>
<div class="method-heading">
<a href="Key.src/M000106.html" target="Code" class="method-signature"
onclick="popupCode('Key.src/M000106.html');return false;">
<span class="method-name">code</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
Code of the key that has been pressed.
</p>
</div>
</div>
<div id="method-M000108" class="method-detail">
<a name="M000108"></a>
<div class="method-heading">
<a href="Key.src/M000108.html" target="Code" class="method-signature"
onclick="popupCode('Key.src/M000108.html');return false;">
<span class="method-name">control</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
Is the Control key pressed?
</p>
</div>
</div>
<div id="method-M000109" class="method-detail">
<a name="M000109"></a>
<div class="method-heading">
<a href="Key.src/M000109.html" target="Code" class="method-signature"
onclick="popupCode('Key.src/M000109.html');return false;">
<span class="method-name">shift</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
Is the Shift key pressed?
</p>
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>code (SFML::Event::Key)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* Code of the key that has been pressed. */
static VALUE KeyEvent_GetCode( VALUE self )
</pre>
</body>
</html>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>alt (SFML::Event::Key)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* Is the Alt key pressed? */
static VALUE KeyEvent_GetAlt( VALUE self )
</pre>
</body>
</html>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>control (SFML::Event::Key)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* Is the Control key pressed? */
static VALUE KeyEvent_GetControl( VALUE self )
</pre>
</body>
</html>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>shift (SFML::Event::Key)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* Is the Shift key pressed? */
static VALUE KeyEvent_GetShift( VALUE self )
</pre>
</body>
</html>

View file

@ -0,0 +1,227 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Class: SFML::Event::MouseButton</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">SFML::Event::MouseButton</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../../files/window/Event_cpp.html">
window/Event.cpp
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
<a href="../Event.html">SFML::Event</a> holds all the informations about a
system event that just happened.
</p>
<p>
Events are retrieved using the SFML::Window#GetEvent function.
</p>
<p>
A <a href="../Event.html">SFML::Event</a> instance contains the type of the
event (mouse moved, key pressed, window closed, &#8230;) as well as the
details about this particular event. Please note that the event parameters
are defined in a union, which means that only the member matching the type
of the event will be properly filled; all other members will have undefined
values and must not be read if the type of the event doesn&#8216;t match.
For example, if you received a KeyPressed event, then you must read the
event.Key
</p>
<pre>
member, all other members such as event.MouseMove or event.Text will have undefined values.
</pre>
<p>
The ruby version differs from C++ in that the parameters are still stored
in a union but that the values can be directly accessed from the event
object. If you try to access any data which would be considered undefined
then SFML::SomeKindOfException will be thrown.
</p>
<p>
Usage example:
</p>
<pre>
while event = window.getEvent()
# Request for closing the window
if event.type == SFML::Event::Closed
window.close
# The escape key was pressed
if ( event.type == sf::Event::KeyPressed ) &amp;&amp; ( event.code == SFML::Key::Escape )
window.close
# The window was resized
if event.type == SFML::Event::Resized
DoSomethingWithTheNewSize(event.size);
# etc ...
end
</pre>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000095">button</a>&nbsp;&nbsp;
<a href="#M000096">x</a>&nbsp;&nbsp;
<a href="#M000097">y</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000095" class="method-detail">
<a name="M000095"></a>
<div class="method-heading">
<a href="MouseButton.src/M000095.html" target="Code" class="method-signature"
onclick="popupCode('MouseButton.src/M000095.html');return false;">
<span class="method-name">button</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
Code of the <a href="MouseButton.html#M000095">button</a> that has been
pressed.
</p>
</div>
</div>
<div id="method-M000096" class="method-detail">
<a name="M000096"></a>
<div class="method-heading">
<a href="MouseButton.src/M000096.html" target="Code" class="method-signature"
onclick="popupCode('MouseButton.src/M000096.html');return false;">
<span class="method-name">x</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
X position of the mouse pointer, relative to the left of the owner window
</p>
</div>
</div>
<div id="method-M000097" class="method-detail">
<a name="M000097"></a>
<div class="method-heading">
<a href="MouseButton.src/M000097.html" target="Code" class="method-signature"
onclick="popupCode('MouseButton.src/M000097.html');return false;">
<span class="method-name">y</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
Y position of the mouse pointer, relative to the top of the owner window
</p>
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>button (SFML::Event::MouseButton)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* Code of the button that has been pressed. */
static VALUE MouseButtonEvent_GetButton( VALUE self )
</pre>
</body>
</html>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>x (SFML::Event::MouseButton)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* X position of the mouse pointer, relative to the left of the owner window */
static VALUE MouseButtonEvent_GetX( VALUE self )
</pre>
</body>
</html>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>y (SFML::Event::MouseButton)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* Y position of the mouse pointer, relative to the top of the owner window */
static VALUE MouseButtonEvent_GetY( VALUE self )
</pre>
</body>
</html>

View file

@ -0,0 +1,208 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Class: SFML::Event::MouseMove</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">SFML::Event::MouseMove</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../../files/window/Event_cpp.html">
window/Event.cpp
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
<a href="../Event.html">SFML::Event</a> holds all the informations about a
system event that just happened.
</p>
<p>
Events are retrieved using the SFML::Window#GetEvent function.
</p>
<p>
A <a href="../Event.html">SFML::Event</a> instance contains the type of the
event (mouse moved, key pressed, window closed, &#8230;) as well as the
details about this particular event. Please note that the event parameters
are defined in a union, which means that only the member matching the type
of the event will be properly filled; all other members will have undefined
values and must not be read if the type of the event doesn&#8216;t match.
For example, if you received a KeyPressed event, then you must read the
event.Key
</p>
<pre>
member, all other members such as event.MouseMove or event.Text will have undefined values.
</pre>
<p>
The ruby version differs from C++ in that the parameters are still stored
in a union but that the values can be directly accessed from the event
object. If you try to access any data which would be considered undefined
then SFML::SomeKindOfException will be thrown.
</p>
<p>
Usage example:
</p>
<pre>
while event = window.getEvent()
# Request for closing the window
if event.type == SFML::Event::Closed
window.close
# The escape key was pressed
if ( event.type == sf::Event::KeyPressed ) &amp;&amp; ( event.code == SFML::Key::Escape )
window.close
# The window was resized
if event.type == SFML::Event::Resized
DoSomethingWithTheNewSize(event.size);
# etc ...
end
</pre>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000093">x</a>&nbsp;&nbsp;
<a href="#M000094">y</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000093" class="method-detail">
<a name="M000093"></a>
<div class="method-heading">
<a href="MouseMove.src/M000093.html" target="Code" class="method-signature"
onclick="popupCode('MouseMove.src/M000093.html');return false;">
<span class="method-name">x</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
X position of the mouse pointer, relative to the left of the owner window
</p>
</div>
</div>
<div id="method-M000094" class="method-detail">
<a name="M000094"></a>
<div class="method-heading">
<a href="MouseMove.src/M000094.html" target="Code" class="method-signature"
onclick="popupCode('MouseMove.src/M000094.html');return false;">
<span class="method-name">y</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
Y position of the mouse pointer, relative to the top of the owner window
</p>
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>x (SFML::Event::MouseMove)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* X position of the mouse pointer, relative to the left of the owner window */
static VALUE MouseMoveEvent_GetX( VALUE self )
</pre>
</body>
</html>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>y (SFML::Event::MouseMove)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* Y position of the mouse pointer, relative to the top of the owner window */
static VALUE MouseMoveEvent_GetY( VALUE self )
</pre>
</body>
</html>

View file

@ -0,0 +1,226 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Class: SFML::Event::MouseWheel</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">SFML::Event::MouseWheel</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../../files/window/Event_cpp.html">
window/Event.cpp
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
<a href="../Event.html">SFML::Event</a> holds all the informations about a
system event that just happened.
</p>
<p>
Events are retrieved using the SFML::Window#GetEvent function.
</p>
<p>
A <a href="../Event.html">SFML::Event</a> instance contains the type of the
event (mouse moved, key pressed, window closed, &#8230;) as well as the
details about this particular event. Please note that the event parameters
are defined in a union, which means that only the member matching the type
of the event will be properly filled; all other members will have undefined
values and must not be read if the type of the event doesn&#8216;t match.
For example, if you received a KeyPressed event, then you must read the
event.Key
</p>
<pre>
member, all other members such as event.MouseMove or event.Text will have undefined values.
</pre>
<p>
The ruby version differs from C++ in that the parameters are still stored
in a union but that the values can be directly accessed from the event
object. If you try to access any data which would be considered undefined
then SFML::SomeKindOfException will be thrown.
</p>
<p>
Usage example:
</p>
<pre>
while event = window.getEvent()
# Request for closing the window
if event.type == SFML::Event::Closed
window.close
# The escape key was pressed
if ( event.type == sf::Event::KeyPressed ) &amp;&amp; ( event.code == SFML::Key::Escape )
window.close
# The window was resized
if event.type == SFML::Event::Resized
DoSomethingWithTheNewSize(event.size);
# etc ...
end
</pre>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000098">delta</a>&nbsp;&nbsp;
<a href="#M000099">x</a>&nbsp;&nbsp;
<a href="#M000100">y</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000098" class="method-detail">
<a name="M000098"></a>
<div class="method-heading">
<a href="MouseWheel.src/M000098.html" target="Code" class="method-signature"
onclick="popupCode('MouseWheel.src/M000098.html');return false;">
<span class="method-name">delta</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
Number of ticks the wheel has moved (positive is up, negative is down).
</p>
</div>
</div>
<div id="method-M000099" class="method-detail">
<a name="M000099"></a>
<div class="method-heading">
<a href="MouseWheel.src/M000099.html" target="Code" class="method-signature"
onclick="popupCode('MouseWheel.src/M000099.html');return false;">
<span class="method-name">x</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
X position of the mouse pointer, relative to the left of the owner window
</p>
</div>
</div>
<div id="method-M000100" class="method-detail">
<a name="M000100"></a>
<div class="method-heading">
<a href="MouseWheel.src/M000100.html" target="Code" class="method-signature"
onclick="popupCode('MouseWheel.src/M000100.html');return false;">
<span class="method-name">y</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
Y position of the mouse pointer, relative to the top of the owner window
</p>
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>delta (SFML::Event::MouseWheel)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* Number of ticks the wheel has moved (positive is up, negative is down). */
static VALUE MouseWheelEvent_GetDelta( VALUE self )
</pre>
</body>
</html>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>x (SFML::Event::MouseWheel)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* X position of the mouse pointer, relative to the left of the owner window */
static VALUE MouseWheelEvent_GetX( VALUE self )
</pre>
</body>
</html>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>y (SFML::Event::MouseWheel)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* Y position of the mouse pointer, relative to the top of the owner window */
static VALUE MouseWheelEvent_GetY( VALUE self )
</pre>
</body>
</html>

View file

@ -0,0 +1,208 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Class: SFML::Event::Size</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">SFML::Event::Size</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../../files/window/Event_cpp.html">
window/Event.cpp
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
<a href="../Event.html">SFML::Event</a> holds all the informations about a
system event that just happened.
</p>
<p>
Events are retrieved using the SFML::Window#GetEvent function.
</p>
<p>
A <a href="../Event.html">SFML::Event</a> instance contains the type of the
event (mouse moved, key pressed, window closed, &#8230;) as well as the
details about this particular event. Please note that the event parameters
are defined in a union, which means that only the member matching the type
of the event will be properly filled; all other members will have undefined
values and must not be read if the type of the event doesn&#8216;t match.
For example, if you received a KeyPressed event, then you must read the
event.Key
</p>
<pre>
member, all other members such as event.MouseMove or event.Text will have undefined values.
</pre>
<p>
The ruby version differs from C++ in that the parameters are still stored
in a union but that the values can be directly accessed from the event
object. If you try to access any data which would be considered undefined
then SFML::SomeKindOfException will be thrown.
</p>
<p>
Usage example:
</p>
<pre>
while event = window.getEvent()
# Request for closing the window
if event.type == SFML::Event::Closed
window.close
# The escape key was pressed
if ( event.type == sf::Event::KeyPressed ) &amp;&amp; ( event.code == SFML::Key::Escape )
window.close
# The window was resized
if event.type == SFML::Event::Resized
DoSomethingWithTheNewSize(event.size);
# etc ...
end
</pre>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000102">height</a>&nbsp;&nbsp;
<a href="#M000101">width</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000102" class="method-detail">
<a name="M000102"></a>
<div class="method-heading">
<a href="Size.src/M000102.html" target="Code" class="method-signature"
onclick="popupCode('Size.src/M000102.html');return false;">
<span class="method-name">height</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
New <a href="Size.html#M000101">width</a>, in pixels.
</p>
</div>
</div>
<div id="method-M000101" class="method-detail">
<a name="M000101"></a>
<div class="method-heading">
<a href="Size.src/M000101.html" target="Code" class="method-signature"
onclick="popupCode('Size.src/M000101.html');return false;">
<span class="method-name">width</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
New <a href="Size.html#M000101">width</a>, in pixels.
</p>
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>width (SFML::Event::Size)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* New width, in pixels. */
static VALUE SizeEvent_GetWidth( VALUE self )
</pre>
</body>
</html>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>height (SFML::Event::Size)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* New width, in pixels. */
static VALUE SizeEvent_GetWidth( VALUE self )
</pre>
</body>
</html>

View file

@ -0,0 +1,190 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Class: SFML::Event::Text</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">SFML::Event::Text</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../../files/window/Event_cpp.html">
window/Event.cpp
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
<a href="../Event.html">SFML::Event</a> holds all the informations about a
system event that just happened.
</p>
<p>
Events are retrieved using the SFML::Window#GetEvent function.
</p>
<p>
A <a href="../Event.html">SFML::Event</a> instance contains the type of the
event (mouse moved, key pressed, window closed, &#8230;) as well as the
details about this particular event. Please note that the event parameters
are defined in a union, which means that only the member matching the type
of the event will be properly filled; all other members will have undefined
values and must not be read if the type of the event doesn&#8216;t match.
For example, if you received a KeyPressed event, then you must read the
event.Key
</p>
<pre>
member, all other members such as event.MouseMove or event.Text will have undefined values.
</pre>
<p>
The ruby version differs from C++ in that the parameters are still stored
in a union but that the values can be directly accessed from the event
object. If you try to access any data which would be considered undefined
then SFML::SomeKindOfException will be thrown.
</p>
<p>
Usage example:
</p>
<pre>
while event = window.getEvent()
# Request for closing the window
if event.type == SFML::Event::Closed
window.close
# The escape key was pressed
if ( event.type == sf::Event::KeyPressed ) &amp;&amp; ( event.code == SFML::Key::Escape )
window.close
# The window was resized
if event.type == SFML::Event::Resized
DoSomethingWithTheNewSize(event.size);
# etc ...
end
</pre>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000103">unicode</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000103" class="method-detail">
<a name="M000103"></a>
<div class="method-heading">
<a href="Text.src/M000103.html" target="Code" class="method-signature"
onclick="popupCode('Text.src/M000103.html');return false;">
<span class="method-name">unicode</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
UTF-32 <a href="Text.html#M000103">unicode</a> value of the character.
</p>
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>unicode (SFML::Event::Text)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* UTF-32 unicode value of the character. */
static VALUE TextEvent_GetUnicode( VALUE self )
</pre>
</body>
</html>

View file

@ -0,0 +1,484 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Class: SFML::Input</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">SFML::Input</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../files/window/main_cpp.html">
window/main.cpp
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
The <a href="Input.html">SFML::Input</a> class provides a way to access the
state of keys, mouse buttons, mouse position, joystick buttons and jostick
axis.
</p>
<p>
<a href="Input.html">SFML::Input</a> provides the same informations as the
event system, but these informations can be accessed at any time, which is
more convenient in many situations.
</p>
<p>
For example, to move an entity you can decide to catch the
SFML::Event::KeyPressed event on arrow keys. But if you do so, you will
only receive one event when the key gets pressed (or repeated events if you
activated this feature), thus the entity will not move smoothly. The best
solution here is to use <a
href="Input.html#M000002">SFML::Input#isKeyDown</a> so that you can update
your entity&#8216;s position at every iteration of your game loop, not only
when you catch a KeyPressed event.
</p>
<p>
Note that instances of <a href="Input.html">SFML::Input</a> cannot be
created directly, they must be retrieved from a window (<a
href="Window.html">SFML::Window</a>) with the <a
href="Window.html#M000067">SFML::Window#input</a> method.
</p>
<p>
Usage example:
</p>
<pre>
# Retrieve the input object attached to our window
input = window.input
# Move an entity according to the current keys state
offset = 5.0 * window.frameTime # 5 pixels/sec
entity.move( -offset, 0 ) if input.keyDown?( SFML::Key::Left )
entity.move( offset, 0 ) if input.keyDown?( SFML::Key::Right )
entity.move( 0, -offset ) if input.keyDown?( SFML::Key::Up )
entity.move( 0, offset ) if input.keyDown?( SFML::Key::Down )
</pre>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000007">getJoystickAxis</a>&nbsp;&nbsp;
<a href="#M000005">getMouseX</a>&nbsp;&nbsp;
<a href="#M000006">getMouseY</a>&nbsp;&nbsp;
<a href="#M000004">isJoystickButtonDown</a>&nbsp;&nbsp;
<a href="#M000002">isKeyDown</a>&nbsp;&nbsp;
<a href="#M000003">isMouseButtonDown</a>&nbsp;&nbsp;
<a href="#M000018">joystickAxis</a>&nbsp;&nbsp;
<a href="#M000013">joystickButtonDown?</a>&nbsp;&nbsp;
<a href="#M000019">joystick_axis</a>&nbsp;&nbsp;
<a href="#M000012">joystick_button_down?</a>&nbsp;&nbsp;
<a href="#M000009">keyDown?</a>&nbsp;&nbsp;
<a href="#M000008">key_down?</a>&nbsp;&nbsp;
<a href="#M000011">mouseButtonDown?</a>&nbsp;&nbsp;
<a href="#M000014">mouseX</a>&nbsp;&nbsp;
<a href="#M000016">mouseY</a>&nbsp;&nbsp;
<a href="#M000010">mouse_button_down?</a>&nbsp;&nbsp;
<a href="#M000015">mouse_x</a>&nbsp;&nbsp;
<a href="#M000017">mouse_y</a>&nbsp;&nbsp;
<a href="#M000001">new</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Class methods</h3>
<div id="method-M000001" class="method-detail">
<a name="M000001"></a>
<div class="method-heading">
<a href="Input.src/M000001.html" target="Code" class="method-signature"
onclick="popupCode('Input.src/M000001.html');return false;">
<span class="method-name">Input.new() &rarr; input<br />
</span>
</a>
</div>
<div class="method-description">
<p>
This will create a <a href="Input.html#M000001">new</a> input object.
though it will not receive any updates of events. You should aquire an
input object from the <a href="Window.html#M000067">SFML::Window#input</a>
method.
</p>
</div>
</div>
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000007" class="method-detail">
<a name="M000007"></a>
<div class="method-heading">
<a href="Input.src/M000007.html" target="Code" class="method-signature"
onclick="popupCode('Input.src/M000007.html');return false;">
<span class="method-name">input.getJoystickAxis( joystick, axis ) &rarr; true or false<br />
</span>
</a>
</div>
<div class="method-description">
<p>
The returned position is in the range [-100, 100], except the POV which is
an angle and is thus defined in [0, 360].
</p>
</div>
</div>
<div id="method-M000005" class="method-detail">
<a name="M000005"></a>
<div class="method-heading">
<a href="Input.src/M000005.html" target="Code" class="method-signature"
onclick="popupCode('Input.src/M000005.html');return false;">
<span class="method-name">input.getMouseX() &rarr; fixnum<br />
</span>
</a>
</div>
<div class="method-description">
<p>
The returned position is relative to the left border of the owner window.
</p>
</div>
</div>
<div id="method-M000006" class="method-detail">
<a name="M000006"></a>
<div class="method-heading">
<a href="Input.src/M000006.html" target="Code" class="method-signature"
onclick="popupCode('Input.src/M000006.html');return false;">
<span class="method-name">input.getMouseY() &rarr; fixnum<br />
</span>
</a>
</div>
<div class="method-description">
<p>
The returned position is relative to the top border of the owner window.
</p>
</div>
</div>
<div id="method-M000004" class="method-detail">
<a name="M000004"></a>
<div class="method-heading">
<a href="Input.src/M000004.html" target="Code" class="method-signature"
onclick="popupCode('Input.src/M000004.html');return false;">
<span class="method-name">input.isJoystickButtonDown( joystick, button ) &rarr; true or false<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Get the current state of a joystick button (pressed or released).
</p>
</div>
</div>
<div id="method-M000002" class="method-detail">
<a name="M000002"></a>
<div class="method-heading">
<a href="Input.src/M000002.html" target="Code" class="method-signature"
onclick="popupCode('Input.src/M000002.html');return false;">
<span class="method-name">input.isKeyDown( keycode ) &rarr; true or false<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Get the current state of a key (pressed or released).
</p>
</div>
</div>
<div id="method-M000003" class="method-detail">
<a name="M000003"></a>
<div class="method-heading">
<a href="Input.src/M000003.html" target="Code" class="method-signature"
onclick="popupCode('Input.src/M000003.html');return false;">
<span class="method-name">input.isMouseButtonDown( keycode ) &rarr; true or false<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Get the current state of a mouse button (pressed or released).
</p>
</div>
</div>
<div id="method-M000018" class="method-detail">
<a name="M000018"></a>
<div class="method-heading">
<span class="method-name">joystickAxis</span><span class="method-args">(p1, p2)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="Input.html#M000007">getJoystickAxis</a>
</p>
</div>
</div>
<div id="method-M000013" class="method-detail">
<a name="M000013"></a>
<div class="method-heading">
<span class="method-name">joystickButtonDown?</span><span class="method-args">(p1, p2)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="Input.html#M000004">isJoystickButtonDown</a>
</p>
</div>
</div>
<div id="method-M000019" class="method-detail">
<a name="M000019"></a>
<div class="method-heading">
<span class="method-name">joystick_axis</span><span class="method-args">(p1, p2)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="Input.html#M000007">getJoystickAxis</a>
</p>
</div>
</div>
<div id="method-M000012" class="method-detail">
<a name="M000012"></a>
<div class="method-heading">
<span class="method-name">joystick_button_down?</span><span class="method-args">(p1, p2)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="Input.html#M000004">isJoystickButtonDown</a>
</p>
</div>
</div>
<div id="method-M000009" class="method-detail">
<a name="M000009"></a>
<div class="method-heading">
<span class="method-name">keyDown?</span><span class="method-args">(p1)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="Input.html#M000002">isKeyDown</a>
</p>
</div>
</div>
<div id="method-M000008" class="method-detail">
<a name="M000008"></a>
<div class="method-heading">
<span class="method-name">key_down?</span><span class="method-args">(p1)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="Input.html#M000002">isKeyDown</a>
</p>
</div>
</div>
<div id="method-M000011" class="method-detail">
<a name="M000011"></a>
<div class="method-heading">
<span class="method-name">mouseButtonDown?</span><span class="method-args">(p1)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="Input.html#M000003">isMouseButtonDown</a>
</p>
</div>
</div>
<div id="method-M000014" class="method-detail">
<a name="M000014"></a>
<div class="method-heading">
<span class="method-name">mouseX</span><span class="method-args">()</span>
</div>
<div class="method-description">
<p>
Alias for <a href="Input.html#M000005">getMouseX</a>
</p>
</div>
</div>
<div id="method-M000016" class="method-detail">
<a name="M000016"></a>
<div class="method-heading">
<span class="method-name">mouseY</span><span class="method-args">()</span>
</div>
<div class="method-description">
<p>
Alias for <a href="Input.html#M000006">getMouseY</a>
</p>
</div>
</div>
<div id="method-M000010" class="method-detail">
<a name="M000010"></a>
<div class="method-heading">
<span class="method-name">mouse_button_down?</span><span class="method-args">(p1)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="Input.html#M000003">isMouseButtonDown</a>
</p>
</div>
</div>
<div id="method-M000015" class="method-detail">
<a name="M000015"></a>
<div class="method-heading">
<span class="method-name">mouse_x</span><span class="method-args">()</span>
</div>
<div class="method-description">
<p>
Alias for <a href="Input.html#M000005">getMouseX</a>
</p>
</div>
</div>
<div id="method-M000017" class="method-detail">
<a name="M000017"></a>
<div class="method-heading">
<span class="method-name">mouse_y</span><span class="method-args">()</span>
</div>
<div class="method-description">
<p>
Alias for <a href="Input.html#M000006">getMouseY</a>
</p>
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>new (SFML::Input)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* Input.new() -&gt; input
*
* This will create a new input object. though it will not receive any updates of events.
* You should aquire an input object from the SFML::Window#input method.
*/
static VALUE Input_New( int argc, VALUE * args, VALUE aKlass )
{
sf::Input *object = new sf::Input();
VALUE rbData = Data_Wrap_Struct( aKlass, 0, Input_Free, object );
rb_obj_call_init( rbData, argc, args );
return rbData;
}</pre>
</body>
</html>

View file

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>isKeyDown (SFML::Input)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* input.isKeyDown( keycode ) -&gt; true or false
*
* Get the current state of a key (pressed or released).
*/
static VALUE Input_IsKeyDown( VALUE self, VALUE aKeyCode )
{
sf::Input *object = NULL;
Data_Get_Struct( self, sf::Input, object );
sf::Key::Code rawCode = static_cast&lt; sf::Key::Code &gt; ( NUM2INT( aKeyCode ) );
if( object-&gt;IsKeyDown( rawCode ) == true )
{
return Qtrue;
}
else
{
return Qfalse;
}
}</pre>
</body>
</html>

View file

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>isMouseButtonDown (SFML::Input)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* input.isMouseButtonDown( keycode ) -&gt; true or false
*
* Get the current state of a mouse button (pressed or released).
*/
static VALUE Input_IsMouseButtonDown( VALUE self, VALUE aMouseButton )
{
sf::Input *object = NULL;
Data_Get_Struct( self, sf::Input, object );
sf::Mouse::Button rawButton = static_cast&lt; sf::Mouse::Button &gt; ( NUM2INT( aMouseButton ) );
if( object-&gt;IsMouseButtonDown( rawButton ) == true )
{
return Qtrue;
}
else
{
return Qfalse;
}
}</pre>
</body>
</html>

View file

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>isJoystickButtonDown (SFML::Input)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* input.isJoystickButtonDown( joystick, button ) -&gt; true or false
*
* Get the current state of a joystick button (pressed or released).
*/
static VALUE Input_IsJoystickButtonDown( VALUE self, VALUE aJoystick, VALUE aButton )
{
sf::Input *object = NULL;
Data_Get_Struct( self, sf::Input, object );
unsigned int rawJoystick = NUM2UINT( aJoystick );
unsigned int rawButton = NUM2UINT( aButton );
if( object-&gt;IsJoystickButtonDown( aJoystick, rawButton ) == true )
{
return Qtrue;
}
else
{
return Qfalse;
}
}</pre>
</body>
</html>

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>getMouseX (SFML::Input)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* input.getMouseX() -&gt; fixnum
*
* The returned position is relative to the left border of the owner window.
*/
static VALUE Input_GetMouseX( VALUE self, VALUE aMouseButton )
{
sf::Input *object = NULL;
Data_Get_Struct( self, sf::Input, object );
return INT2FIX( object-&gt;GetMouseX() );
}</pre>
</body>
</html>

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>getMouseY (SFML::Input)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* input.getMouseY() -&gt; fixnum
*
* The returned position is relative to the top border of the owner window.
*/
static VALUE Input_GetMouseY( VALUE self, VALUE aMouseButton )
{
sf::Input *object = NULL;
Data_Get_Struct( self, sf::Input, object );
return INT2FIX( object-&gt;GetMouseY() );
}</pre>
</body>
</html>

View file

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>getJoystickAxis (SFML::Input)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* input.getJoystickAxis( joystick, axis ) -&gt; true or false
*
* The returned position is in the range [-100, 100], except the POV which is an angle and is thus defined in [0, 360].
*/
static VALUE Input_GetJoystickAxis( VALUE self, VALUE aJoystick, VALUE anAxis )
{
sf::Input *object = NULL;
Data_Get_Struct( self, sf::Input, object );
unsigned int rawJoystick = NUM2UINT( aJoystick );
sf::Joy::Axis rawAxis = static_cast&lt; sf::Joy::Axis &gt;( NUM2INT( anAxis ) );
return rb_float_new( object-&gt;GetJoystickAxis( rawJoystick, rawAxis ) );
}</pre>
</body>
</html>

View file

@ -0,0 +1,159 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Module: SFML::Joy</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Module</strong></td>
<td class="class-name-in-header">SFML::Joy</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../files/window/main_cpp.html">
window/main.cpp
</a>
<br />
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
Definition of joystick axis for joystick events.
</p>
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<div id="constants-list">
<h3 class="section-bar">Constants</h3>
<div class="name-list">
<table summary="Constants">
<tr class="top-aligned-row context-row">
<td class="context-item-name">AxisX</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Joy::AxisX )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">AxisY</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Joy::AxisY )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">AxisZ</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Joy::AxisZ )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">AxisR</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Joy::AxisR )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">AxisU</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Joy::AxisU )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">AxisV</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Joy::AxisV )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">AxisPOV</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Joy::AxisPOV )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">AxisCount</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Joy::AxisCount )</td>
</tr>
</table>
</div>
</div>
<!-- if method_list -->
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,298 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Module: SFML::Key</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Module</strong></td>
<td class="class-name-in-header">SFML::Key</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../files/window/main_cpp.html">
window/main.cpp
</a>
<br />
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
Definition of key codes for keyboard events.
</p>
<p>
All <a href="Key.html">SFML::Key</a> constants exists, I just haven&#8216;t
written them all so Rdoc can interpret them yet.
</p>
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<div id="constants-list">
<h3 class="section-bar">Constants</h3>
<div class="name-list">
<table summary="Constants">
<tr class="top-aligned-row context-row">
<td class="context-item-name">A</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::A )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">B</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::B )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">C</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::C )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">D</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::D )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">E</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::E )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">F</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::F )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">G</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::G )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">H</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::H )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">I</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::I )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">J</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::J )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">K</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::K )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">L</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::L )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">M</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::M )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">N</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::N )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">O</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::O )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">P</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::P )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Q</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::Q )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">R</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::R )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">S</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::S )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">T</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::T )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">U</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::U )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">V</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::V )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">X</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::X )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Y</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::Y )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Z</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::Z )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Num0</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::Num0 )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Num1</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::Num1 )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Num2</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::Num2 )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Num3</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::Num3 )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Num4</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::Num4 )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Num5</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::Num5 )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Num6</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::Num6 )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Num7</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::Num7 )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Num8</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::Num8 )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Num9</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::Num9 )</td>
</tr>
</table>
</div>
</div>
<!-- if method_list -->
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,149 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Module: SFML::Mouse</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Module</strong></td>
<td class="class-name-in-header">SFML::Mouse</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../files/window/main_cpp.html">
window/main.cpp
</a>
<br />
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
Definition of button codes for mouse events.
</p>
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<div id="constants-list">
<h3 class="section-bar">Constants</h3>
<div class="name-list">
<table summary="Constants">
<tr class="top-aligned-row context-row">
<td class="context-item-name">Left</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Mouse::Left )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Right</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Mouse::Right )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Middle</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Mouse::Middle )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">XButton1</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Mouse::XButton1 )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">XButton2</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Mouse::XButton2 )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">ButtonCount</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Mouse::ButtonCount )</td>
</tr>
</table>
</div>
</div>
<!-- if method_list -->
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,149 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Module: SFML::Style</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Module</strong></td>
<td class="class-name-in-header">SFML::Style</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../files/window/main_cpp.html">
window/main.cpp
</a>
<br />
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
Enumeration of the window styles.
</p>
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<div id="constants-list">
<h3 class="section-bar">Constants</h3>
<div class="name-list">
<table summary="Constants">
<tr class="top-aligned-row context-row">
<td class="context-item-name">None</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Style::None )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Titlebar</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Style::Titlebar )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Resize</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Style::Resize )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Close</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Style::Close )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Fullscreen</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Style::Fullscreen )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Default</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Style::Default )</td>
</tr>
</table>
</div>
</div>
<!-- if method_list -->
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,414 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Class: SFML::VideoMode</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">SFML::VideoMode</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../files/window/main_cpp.html">
window/main.cpp
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
A video mode is defined by a <a href="VideoMode.html#M000023">width</a> and
a <a href="VideoMode.html#M000025">height</a> (in pixels) and a depth (in
bits per pixel).
</p>
<p>
Video modes are used to setup windows (<a
href="Window.html">SFML::Window</a>) at creation time.
</p>
<p>
The main usage of video modes is for fullscreen mode: indeed you must use
one of the valid video modes allowed by the OS (which are defined by what
the monitor and the graphics card support), otherwise your window creation
will just fail.
</p>
<p>
<a href="VideoMode.html">SFML::VideoMode</a> provides a static function for
retrieving the list of all the video modes supported by the system: <a
href="VideoMode.html#M000022">getFullscreenModes</a>().
</p>
<p>
A custom video mode can also be checked directly for fullscreen
compatibility with its isValid() function.
</p>
<p>
Additionnally, <a href="VideoMode.html">SFML::VideoMode</a> provides a
static function to get the mode currently used by the desktop: <a
href="VideoMode.html#M000021">getDesktopMode</a>(). This allows to build
windows with the same size or pixel depth as the current resolution.
</p>
<p>
Usage example:
</p>
<pre>
# Display the list of all the video modes available for fullscreen
modes = SFML::VideoMode.getFullscreenModes()
i = 0
modes.each do | mode |
puts &quot;Mode #&quot; + i + &quot;: &quot; + mode.width + &quot;x&quot; + mode.height + &quot; - &quot; + mode.bitsPerPixel + &quot; bpp&quot;
end
# Create a window with the same pixel depth as the desktop
desktop = SFML::VideoMode.getDesktopMode()
window.create( SFML::VideoMode.new( 1024, 768, desktop.BitsPerPixel ), &quot;SFML window&quot; )
</pre>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000027">bitsPerPixel</a>&nbsp;&nbsp;
<a href="#M000028">bitsPerPixel=</a>&nbsp;&nbsp;
<a href="#M000029">bits_per_pixel</a>&nbsp;&nbsp;
<a href="#M000030">bits_per_pixel=</a>&nbsp;&nbsp;
<a href="#M000031">bpp</a>&nbsp;&nbsp;
<a href="#M000032">bpp=</a>&nbsp;&nbsp;
<a href="#M000021">getDesktopMode</a>&nbsp;&nbsp;
<a href="#M000022">getFullscreenModes</a>&nbsp;&nbsp;
<a href="#M000025">height</a>&nbsp;&nbsp;
<a href="#M000026">height=</a>&nbsp;&nbsp;
<a href="#M000020">new</a>&nbsp;&nbsp;
<a href="#M000023">width</a>&nbsp;&nbsp;
<a href="#M000024">width=</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Class methods</h3>
<div id="method-M000021" class="method-detail">
<a name="M000021"></a>
<div class="method-heading">
<a href="VideoMode.src/M000021.html" target="Code" class="method-signature"
onclick="popupCode('VideoMode.src/M000021.html');return false;">
<span class="method-name">VideoMode.getDesktopMode &rarr; desktop_mode<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Get the current desktop video mode.
</p>
</div>
</div>
<div id="method-M000022" class="method-detail">
<a name="M000022"></a>
<div class="method-heading">
<a href="VideoMode.src/M000022.html" target="Code" class="method-signature"
onclick="popupCode('VideoMode.src/M000022.html');return false;">
<span class="method-name">VideoMode.getFullscreenModes &rarr; [supported_modes]<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Retrieve all the video modes supported in fullscreen mode.
</p>
<p>
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 <a
href="VideoMode.html#M000023">width</a>, <a
href="VideoMode.html#M000025">height</a> and bits-per-pixel).
</p>
</div>
</div>
<div id="method-M000020" class="method-detail">
<a name="M000020"></a>
<div class="method-heading">
<a href="VideoMode.src/M000020.html" target="Code" class="method-signature"
onclick="popupCode('VideoMode.src/M000020.html');return false;">
<span class="method-name">VideoMode.new() &rarr; mode<br />
VideoMode.new( width, height, bpp = 32 ) &rarr; mode<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Create a <a href="VideoMode.html#M000020">new</a> mode.
</p>
</div>
</div>
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000027" class="method-detail">
<a name="M000027"></a>
<div class="method-heading">
<a href="VideoMode.src/M000027.html" target="Code" class="method-signature"
onclick="popupCode('VideoMode.src/M000027.html');return false;">
<span class="method-name">mode.bitsPerPixel &rarr; bpp<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Video mode pixel depth, in bits per pixels.
</p>
</div>
</div>
<div id="method-M000028" class="method-detail">
<a name="M000028"></a>
<div class="method-heading">
<a href="VideoMode.src/M000028.html" target="Code" class="method-signature"
onclick="popupCode('VideoMode.src/M000028.html');return false;">
<span class="method-name">mode.bitsPerPixel=(new_bpp) &rarr; new_bpp<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Video mode pixel depth, in bits per pixels.
</p>
</div>
</div>
<div id="method-M000029" class="method-detail">
<a name="M000029"></a>
<div class="method-heading">
<span class="method-name">bits_per_pixel</span><span class="method-args">()</span>
</div>
<div class="method-description">
<p>
Alias for <a href="VideoMode.html#M000027">bitsPerPixel</a>
</p>
</div>
</div>
<div id="method-M000030" class="method-detail">
<a name="M000030"></a>
<div class="method-heading">
<span class="method-name">bits_per_pixel=</span><span class="method-args">(p1)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="VideoMode.html#M000027">bitsPerPixel</a>=
</p>
</div>
</div>
<div id="method-M000031" class="method-detail">
<a name="M000031"></a>
<div class="method-heading">
<span class="method-name">bpp</span><span class="method-args">()</span>
</div>
<div class="method-description">
<p>
Alias for <a href="VideoMode.html#M000027">bitsPerPixel</a>
</p>
</div>
</div>
<div id="method-M000032" class="method-detail">
<a name="M000032"></a>
<div class="method-heading">
<span class="method-name">bpp=</span><span class="method-args">(p1)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="VideoMode.html#M000027">bitsPerPixel</a>=
</p>
</div>
</div>
<div id="method-M000025" class="method-detail">
<a name="M000025"></a>
<div class="method-heading">
<a href="VideoMode.src/M000025.html" target="Code" class="method-signature"
onclick="popupCode('VideoMode.src/M000025.html');return false;">
<span class="method-name">mode.width &rarr; width<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Video mode <a href="VideoMode.html#M000023">width</a>, in pixels.
</p>
</div>
</div>
<div id="method-M000026" class="method-detail">
<a name="M000026"></a>
<div class="method-heading">
<a href="VideoMode.src/M000026.html" target="Code" class="method-signature"
onclick="popupCode('VideoMode.src/M000026.html');return false;">
<span class="method-name">mode.width=(new_width) &rarr; new_width<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Video mode <a href="VideoMode.html#M000023">width</a>, in pixels.
</p>
</div>
</div>
<div id="method-M000023" class="method-detail">
<a name="M000023"></a>
<div class="method-heading">
<a href="VideoMode.src/M000023.html" target="Code" class="method-signature"
onclick="popupCode('VideoMode.src/M000023.html');return false;">
<span class="method-name">mode.width &rarr; width<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Video mode <a href="VideoMode.html#M000023">width</a>, in pixels.
</p>
</div>
</div>
<div id="method-M000024" class="method-detail">
<a name="M000024"></a>
<div class="method-heading">
<a href="VideoMode.src/M000024.html" target="Code" class="method-signature"
onclick="popupCode('VideoMode.src/M000024.html');return false;">
<span class="method-name">mode.width=(new_width) &rarr; new_width<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Video mode <a href="VideoMode.html#M000023">width</a>, in pixels.
</p>
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>new (SFML::VideoMode)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* VideoMode.new() -&gt; mode
* VideoMode.new( width, height, bpp = 32 ) -&gt; mode
*
* Create a new mode.
*/
static VALUE VideoMode_New( int argc, VALUE *args, VALUE aKlass )
{
sf::VideoMode *object = NULL;
switch( argc )
{
case 0:
object = new sf::VideoMode();
break;
case 2:
object = new sf::VideoMode( FIX2UINT( args[0] ), FIX2UINT( args[1] ) );
break;
case 3:
object = new sf::VideoMode( FIX2UINT( args[0] ), FIX2UINT( args[1] ),FIX2UINT( args[2] ) );
break;
default:
rb_raise( rb_eArgError, &quot;Expected 0, 2 or 3 arguments but was given %d&quot;, argc );
break;
}
VALUE rbData = Data_Wrap_Struct( aKlass, 0, VideoMode_Free, object );
rb_obj_call_init( rbData, 0, 0 );
return rbData;
}</pre>
</body>
</html>

View file

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>getDesktopMode (SFML::VideoMode)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* VideoMode.getDesktopMode -&gt; desktop_mode
*
* Get the current desktop video mode.
*/
static VALUE VideoMode_GetDesktopMode( VALUE aKlass )
{
sf::VideoMode *object = new sf::VideoMode( sf::VideoMode::GetDesktopMode() );
VALUE rbData = Data_Wrap_Struct( aKlass, 0, VideoMode_Free, object );
rb_obj_call_init( rbData, 0, 0 );
return rbData;
}</pre>
</body>
</html>

View file

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>getFullscreenModes (SFML::VideoMode)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* VideoMode.getFullscreenModes -&gt; [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&lt; sf::VideoMode &gt;&amp; modes = sf::VideoMode::GetFullscreenModes();
VALUE array = rb_ary_new();
for( std::vector&lt; sf::VideoMode &gt;::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;
}</pre>
</body>
</html>

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>width (SFML::VideoMode)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* mode.width -&gt; width
*
* Video mode width, in pixels.
*/
static VALUE VideoMode_GetWidth( VALUE self )
{
sf::VideoMode *object = NULL;
Data_Get_Struct( self, sf::VideoMode, object );
return INT2FIX( object-&gt;Width );
}</pre>
</body>
</html>

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>width= (SFML::VideoMode)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* mode.width=(new_width) -&gt; new_width
*
* Video mode width, in pixels.
*/
static VALUE VideoMode_SetWidth( VALUE self, VALUE aValue )
{
sf::VideoMode *object = NULL;
Data_Get_Struct( self, sf::VideoMode, object );
return INT2FIX( object-&gt;Width = NUM2UINT( aValue ) );
}</pre>
</body>
</html>

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>height (SFML::VideoMode)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* mode.width -&gt; width
*
* Video mode width, in pixels.
*/
static VALUE VideoMode_GetWidth( VALUE self )
{
sf::VideoMode *object = NULL;
Data_Get_Struct( self, sf::VideoMode, object );
return INT2FIX( object-&gt;Width );
}</pre>
</body>
</html>

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>height= (SFML::VideoMode)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* mode.width=(new_width) -&gt; new_width
*
* Video mode width, in pixels.
*/
static VALUE VideoMode_SetWidth( VALUE self, VALUE aValue )
{
sf::VideoMode *object = NULL;
Data_Get_Struct( self, sf::VideoMode, object );
return INT2FIX( object-&gt;Width = NUM2UINT( aValue ) );
}</pre>
</body>
</html>

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>bitsPerPixel (SFML::VideoMode)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* mode.bitsPerPixel -&gt; bpp
*
* Video mode pixel depth, in bits per pixels.
*/
static VALUE VideoMode_GetBitsPerPixel( VALUE self )
{
sf::VideoMode *object = NULL;
Data_Get_Struct( self, sf::VideoMode, object );
return INT2FIX( object-&gt;BitsPerPixel );
}</pre>
</body>
</html>

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>bitsPerPixel= (SFML::VideoMode)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* mode.bitsPerPixel=(new_bpp) -&gt; new_bpp
*
* Video mode pixel depth, in bits per pixels.
*/
static VALUE VideoMode_SetBitsPerPixel( VALUE self, VALUE aValue )
{
sf::VideoMode *object = NULL;
Data_Get_Struct( self, sf::VideoMode, object );
return INT2FIX( object-&gt;BitsPerPixel = NUM2UINT( aValue ) );
}</pre>
</body>
</html>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>close (SFML::Window)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* window.close()
*
* Close the window and destroy all the attached resources.
*
* After calling this function, the SFML::Window instance remains valid and you can call SFML::Window#create to recreate
* the window. All other functions such as getEvent or display will still work (i.e. you don't have to test
* isOpened every time), and will have no effect on closed windows.
*/
static VALUE Window_Close( VALUE self )
{
sf::Window *object = NULL;
Data_Get_Struct( self, sf::Window, object );
object-&gt;Close();
return Qnil;
}</pre>
</body>
</html>

View file

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>create (SFML::Window)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* window.create( mode, title, style = SFML::Style::Default, settings = SFML::ContextSettings.new )
*
* Create (or recreate) the window.
*
* If the window was already created, it closes it first. If style contains Style::Fullscreen,
* then mode must be a valid video mode.
*/
static VALUE Window_Create( int argc, VALUE *args, VALUE self )
{
sf::Window *object = NULL;
sf::VideoMode *mode = NULL;
sf::ContextSettings *settings = NULL;
VALUE arg0 = Qnil;
Data_Get_Struct( self, sf::Window, object );
switch( argc )
{
case 2:
arg0 = VideoMode_ForceType( args[0] );
VALIDATE_CLASS( arg0, globalVideoModeClass, &quot;first&quot; );
VALIDATE_CLASS( args[1], rb_cString, &quot;second&quot; );
Data_Get_Struct( arg0, sf::VideoMode, mode );
object-&gt;Create( *mode ,rb_string_value_cstr( &amp;args[1] ) );
break;
case 3:
arg0 = VideoMode_ForceType( args[0] );
VALIDATE_CLASS( arg0, globalVideoModeClass, &quot;first&quot; );
VALIDATE_CLASS( args[1], rb_cString, &quot;second&quot; );
VALIDATE_CLASS( args[2], rb_cFixnum, &quot;third&quot; );
Data_Get_Struct( arg0, sf::VideoMode, mode );
object-&gt;Create( *mode, rb_string_value_cstr( &amp;args[1] ), FIX2UINT( args[2] ) );
break;
case 4:
arg0 = VideoMode_ForceType( args[0] );
VALIDATE_CLASS( arg0, globalVideoModeClass, &quot;first&quot; );
VALIDATE_CLASS( args[1], rb_cString, &quot;second&quot; );
VALIDATE_CLASS( args[2], rb_cFixnum, &quot;third&quot; );
VALIDATE_CLASS( args[3], globalContextSettingsClass, &quot;fourth&quot; );
Data_Get_Struct( arg0, sf::VideoMode, mode );
Data_Get_Struct( args[3], sf::ContextSettings, settings );
object-&gt;Create( *mode, rb_string_value_cstr( &amp;args[1] ), FIX2UINT( args[2] ), *settings );
break;
default:
rb_raise( rb_eArgError, &quot;Expected 2..4 arguments but was given %d&quot;, argc );
break;
}
return Qnil;
}</pre>
</body>
</html>

View file

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>display (SFML::Window)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* window.display()
*
* Display on screen what has been rendered to the window so far.
*
* This function is typically called after all OpenGL rendering has been done for the current frame, in order to show
* it on screen.
*/
static VALUE Window_Display( VALUE self )
{
sf::Window *object = NULL;
Data_Get_Struct( self, sf::Window, object );
object-&gt;Display();
return Qnil;
}</pre>
</body>
</html>

View file

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>enableKeyRepeat (SFML::Window)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* window.enableKeyRepeat( enable )
*
* Enable or disable automatic key-repeat.
*
* If key repeat is enabled, you will receive repeated KeyPress events while keeping a key pressed. If it is disabled,
* you will only get a single event when the key is pressed.
*
* Key repeat is enabled by default.
*/
static VALUE Window_EnableKeyRepeat( VALUE self, VALUE anEnableFlag )
{
sf::Window *object = NULL;
Data_Get_Struct( self, sf::Window, object );
if( anEnableFlag == Qfalse )
{
object-&gt;EnableKeyRepeat( false );
}
else if( anEnableFlag == Qtrue )
{
object-&gt;EnableKeyRepeat( true );
}
else
{
rb_raise( rb_eTypeError, &quot;Expected true or false&quot; );
}
return Qnil;
}</pre>
</body>
</html>

View file

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>getEvent (SFML::Window)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* window.getEvent() -&gt; event or nil
*
* Pop the event on top of events stack, if any, and return it.
*
* This function is not blocking: if there's no pending event then it will return nil. Note that more than the returned
* event may be present in the events stack, thus you should always call this function in a loop to make sure that you
* process every pending event.
*/
static VALUE Window_GetEvent( VALUE self )
{
sf::Event event;
sf::Window *window = NULL;
Data_Get_Struct( self, sf::Window, window );
if( window-&gt;GetEvent( event ) == true )
{
VALUE rbObject = rb_funcall( globalEventClass, rb_intern( &quot;new&quot; ), 1, INT2FIX( event.Type ) );
sf::Event *rubyRawEvent = NULL;
Data_Get_Struct( rbObject, sf::Event, rubyRawEvent );
*rubyRawEvent = event;
return rbObject;
}
else
{
return Qnil;
}
}</pre>
</body>
</html>

View file

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>getHeight (SFML::Window)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* window.getHeight() -&gt; fixnum
*
* Get the height of the rendering region of the window.
*
* The height doesn't include the titlebar and borders of the window.
*/
static VALUE Window_GetHeight( VALUE self )
{
sf::Window *object = NULL;
Data_Get_Struct( self, sf::Window, object );
return INT2FIX( object-&gt;GetHeight() );
}</pre>
</body>
</html>

View file

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>getInput (SFML::Window)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* window.getInput() -&gt; input
*
* This input gives access to the real-time state of keyboard, mouse and joysticks for this window
*/
static VALUE Window_GetInput( VALUE self )
{
sf::Window *object = NULL;
Data_Get_Struct( self, sf::Window, object );
VALUE rbData = Data_Wrap_Struct( globalInputClass, 0, 0, const_cast&lt; sf::Input * &gt;( &amp;object-&gt;GetInput() ) );
rb_obj_call_init( rbData, 0, 0 );
return rbData;
}</pre>
</body>
</html>

View file

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>getSettings (SFML::Window)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* window.getSettings() -&gt; settings
*
* Get the settings of the OpenGL context of the window.
*
* Note that these settings may be different from what was passed to the constructor or the Create() function, if one
* or more settings were not supported. In this case, SFML chose the closest match.
*/
static VALUE Window_GetSettings( VALUE self )
{
sf::Window *object = NULL;
Data_Get_Struct( self, sf::Window, object );
VALUE rbData = Data_Wrap_Struct( globalContextSettingsClass, 0, 0, const_cast&lt;sf::ContextSettings *&gt;( &amp;object-&gt;GetSettings() ) );
rb_obj_call_init( rbData, 0, 0 );
return rbData;
}</pre>
</body>
</html>

View file

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>getWidth (SFML::Window)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* window.getWidth() -&gt; fixnum
*
* Get the width of the rendering region of the window.
*
* The width doesn't include the titlebar and borders of the window.
*/
static VALUE Window_GetWidth( VALUE self )
{
sf::Window *object = NULL;
Data_Get_Struct( self, sf::Window, object );
return INT2FIX( object-&gt;GetWidth() );
}</pre>
</body>
</html>

View file

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>isOpened (SFML::Window)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* window.isOpened() -&gt; true or false
*
* This function returns whether or not the window exists. Note that a hidden window (Show(false)) will return true.
*/
static VALUE Window_IsOpened( VALUE self )
{
sf::Window *object = NULL;
Data_Get_Struct( self, sf::Window, object );
if( object-&gt;IsOpened() == true )
{
return Qtrue;
}
else
{
return Qfalse;
}
}</pre>
</body>
</html>

View file

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>setActive (SFML::Window)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* window.setActive( activate ) -&gt; true or false
*
* Activate or deactivate the window as the current target for OpenGL rendering.
*
* A window is active only on the current thread, if you want to make it active on another thread you have to
* deactivate it on the previous thread first if it was active. Only one window can be active on a thread at a time,
* thus the window previously active (if any) automatically gets deactivated.
*/
static VALUE Window_SetActive( VALUE self, VALUE anActiveFlag )
{
sf::Window *object = NULL;
Data_Get_Struct( self, sf::Window, object );
if( anActiveFlag == Qfalse )
{
object-&gt;SetActive( false );
}
else if( anActiveFlag == Qtrue )
{
object-&gt;SetActive( true );
}
else
{
rb_raise( rb_eTypeError, &quot;Expected true or false&quot; );
}
return Qnil;
}</pre>
</body>
</html>

View file

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>setCursorPosition (SFML::Window)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* window.setCursorPosition( new_x, new_y )
*
* Change the position of the mouse cursor.
*/
static VALUE Window_SetCursorPosition( VALUE self, VALUE aX, VALUE aY )
{
sf::Window *object = NULL;
Data_Get_Struct( self, sf::Window, object );
object-&gt;SetCursorPosition( FIX2UINT( aX ), FIX2UINT( aY ) );
return Qnil;
}</pre>
</body>
</html>

View file

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>cursorPosition= (SFML::Window)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* window.cursorPosition=( vector2 )
*
* Change the position of the mouse cursor.
*/
static VALUE Window_SetCursorPosition2( VALUE self, VALUE anArgument )
{
VALUE argument = Vector2_ForceType( anArgument );
sf::Window *object = NULL;
Data_Get_Struct( self, sf::Window, object );
VALUE argumentX = rb_funcall( argument, rb_intern( &quot;x&quot; ), 0 );
VALUE argumentY = rb_funcall( argument, rb_intern( &quot;y&quot; ), 0 );
object-&gt;SetCursorPosition( FIX2UINT( argumentX ), FIX2UINT( argumentY ) );
return Qnil;
}</pre>
</body>
</html>

View file

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>setFramerateLimit (SFML::Window)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* window.setFramerateLimit( new_limit )
*
* Limit the framerate to a maximum fixed frequency.
*
* If a limit is set, the window will use a small delay after each call to Display() to ensure that the current frame
* lasted long enough to match the framerate limit.
*/
static VALUE Window_SetFramerateLimit( VALUE self, VALUE aLimit )
{
sf::Window *object = NULL;
Data_Get_Struct( self, sf::Window, object );
object-&gt;SetFramerateLimit( FIX2UINT( aLimit ) );
return Qnil;
}</pre>
</body>
</html>

View file

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>setIcon (SFML::Window)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* window.setIcon( width, height, pixels )
*
* Change the window's icon.
*
* pixels must be an array of width x height pixels in 32-bits RGBA format. In the ruby binding the array will be
* flattened so you can have array's up to 3 dimensions(or more) to represent each pixel component. The size of the
* array will be assumed to be width * height * 4.
*
* The OS default icon is used by default.
*
* Usage example:
* pixels = [
* [[255, 0, 0, 255], [0, 0, 255, 255]],
* [[0, 255, 0, 255], [0, 0, 0, 255]]
* ]
*
* window.setIcon( 2, 2, pixels )
*/
static VALUE Window_SetIcon( VALUE self, VALUE aWidth, VALUE aHeight, VALUE somePixels )
{
const unsigned int rawWidth = FIX2UINT( aWidth );
const unsigned int rawHeight = FIX2UINT( aHeight );
VALIDATE_CLASS( somePixels, rb_cArray, &quot;third&quot; );
const unsigned long dataSize = rawWidth * rawHeight * 4;
sf::Uint8 * const tempData = new sf::Uint8[dataSize];
VALUE pixels = rb_funcall( somePixels, rb_intern(&quot;flatten&quot;), 0 );
for(unsigned long index = 0; index &lt; dataSize; index++)
{
sf::Uint8 val = NUM2CHR( rb_ary_entry( pixels, index ) );
tempData[index] = val;
}
sf::Window *object = NULL;
Data_Get_Struct( self, sf::Window, object );
object-&gt;SetIcon( rawWidth, rawHeight, tempData );
delete[] tempData;
return Qnil;
}</pre>
</body>
</html>

View file

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>setJoystickThreshold (SFML::Window)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* window.setJoystickThreshold( new_threshold )
*
* Change the joystick threshold.
*
* The joystick threshold is the value below which no JoyMoved event will be generated.
*
* The threshold value is 0.1 by default. The threshold has to be in the range 0..100
*/
static VALUE Window_SetJoystickThreshold( VALUE self, VALUE aThreshold )
{
sf::Window *object = NULL;
Data_Get_Struct( self, sf::Window, object );
object-&gt;SetJoystickThreshold( rb_float_new( aThreshold ) );
return Qnil;
}</pre>
</body>
</html>

View file

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>setPosition (SFML::Window)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* window.setPosition( new_x, new_y )
*
* Change the position of the window on screen.
*
* This function only works for top-level windows (i.e. it will be ignored for windows created from the handle of a
* child window/control).
*/
static VALUE Window_SetPosition( VALUE self, VALUE aX, VALUE aY )
{
sf::Window *object = NULL;
Data_Get_Struct( self, sf::Window, object );
object-&gt;SetPosition( FIX2INT( aX ), FIX2INT( aY ) );
return Qnil;
}</pre>
</body>
</html>

View file

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>position= (SFML::Window)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* window.position=( vector2 )
*
* Change the position of the window on screen.
*
* This function only works for top-level windows (i.e. it will be ignored for windows created from the handle of a
* child window/control).
*/
static VALUE Window_SetPosition2( VALUE self, VALUE anArgument )
{
VALUE argument = Vector2_ForceType( anArgument );
sf::Window *object = NULL;
Data_Get_Struct( self, sf::Window, object );
VALUE argumentX = rb_funcall( argument, rb_intern( &quot;x&quot; ), 0 );
VALUE argumentY = rb_funcall( argument, rb_intern( &quot;y&quot; ), 0 );
object-&gt;SetPosition( FIX2UINT( argumentX ), FIX2INT( argumentY ) );
return Qnil;
}</pre>
</body>
</html>

View file

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>setSize (SFML::Window)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* window.setSize( new_width, new_height )
*
* Change the size of the rendering region of the window.
*/
static VALUE Window_SetSize( VALUE self, VALUE aWidth, VALUE aHeight )
{
sf::Window *object = NULL;
Data_Get_Struct( self, sf::Window, object );
object-&gt;SetSize( FIX2UINT( aWidth ), FIX2UINT( aHeight ) );
return Qnil;
}</pre>
</body>
</html>

View file

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>size= (SFML::Window)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* window.size=( vector2 )
*
* Change the size of the rendering region of the window.
*/
static VALUE Window_SetSize2( VALUE self, VALUE anArgument )
{
VALUE argument = Vector2_ForceType( anArgument );
sf::Window *object = NULL;
Data_Get_Struct( self, sf::Window, object );
VALUE argumentX = rb_funcall( argument, rb_intern( &quot;x&quot; ), 0 );
VALUE argumentY = rb_funcall( argument, rb_intern( &quot;y&quot; ), 0 );
object-&gt;SetSize( FIX2UINT( argumentX ), FIX2UINT( argumentY ) );
return Qnil;
}</pre>
</body>
</html>

View file

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>setTitle (SFML::Window)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* window.setTitle( new_title )
*
* Change the title of the window.
*/
static VALUE Window_SetTitle( VALUE self, VALUE aTitle )
{
sf::Window *object = NULL;
Data_Get_Struct( self, sf::Window, object );
object-&gt;SetTitle( rb_string_value_cstr( &amp;aTitle ) );
return Qnil;
}</pre>
</body>
</html>

View file

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>show (SFML::Window)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* window.show( show )
*
* Show or hide the window.
*
* The window is shown by default.
*/
static VALUE Window_Show( VALUE self, VALUE aShowFlag )
{
sf::Window *object = NULL;
Data_Get_Struct( self, sf::Window, object );
if( aShowFlag == Qfalse )
{
object-&gt;Show( false );
}
else if( aShowFlag == Qtrue )
{
object-&gt;Show( true );
}
else
{
rb_raise( rb_eTypeError, &quot;Expected true or false&quot; );
}
return Qnil;
}</pre>
</body>
</html>

View file

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>showMouseCursor (SFML::Window)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* window.showMouseCursor( show )
*
* Show or hide the mouse cursor.
*
* The mouse cursor is shown by default.
*/
static VALUE Window_ShowMouseCursor( VALUE self, VALUE aShowFlag )
{
sf::Window *object = NULL;
Data_Get_Struct( self, sf::Window, object );
if( aShowFlag == Qfalse )
{
object-&gt;ShowMouseCursor( false );
}
else if( aShowFlag == Qtrue )
{
object-&gt;ShowMouseCursor( true );
}
else
{
rb_raise( rb_eTypeError, &quot;Expected true or false&quot; );
}
return Qnil;
}</pre>
</body>
</html>

View file

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>useVerticalSync (SFML::Window)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* window.useVerticalSync( enabled )
*
* Enable or disable vertical synchronization.
*
* Activating vertical synchronization will limit the number of frames displayed to the refresh rate of the monitor.
* This can avoid some visual artifacts, and limit the framerate to a good value (but not constant across different
* computers).
*
* Vertical synchronization is disabled by default.
*/
static VALUE Window_UseVerticalSync( VALUE self, VALUE aEnableFlag )
{
sf::Window *object = NULL;
Data_Get_Struct( self, sf::Window, object );
if( aEnableFlag == Qfalse )
{
object-&gt;UseVerticalSync( false );
}
else if( aEnableFlag == Qtrue )
{
object-&gt;UseVerticalSync( true );
}
else
{
rb_raise( rb_eTypeError, &quot;Expected true or false&quot; );
}
return Qnil;
}</pre>
</body>
</html>

View file

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>waitEvent (SFML::Window)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* window.waitEvent() -&gt; event or nil
*
* Wait for an event and return it.
*
* This function is blocking: if there's no pending event then it will wait until an event is received. After this
* function returns (and no error occured), the event object is always valid and filled properly. This function is
* typically used when you have a thread that is dedicated to events handling: you want to make this thread sleep as
* long as no new event is received.
*/
static VALUE Window_WaitEvent( VALUE self )
{
sf::Event event;
sf::Window *window = NULL;
Data_Get_Struct( self, sf::Window, window );
if( window-&gt;WaitEvent( event ) == true )
{
VALUE rbObject = rb_funcall( globalEventClass, rb_intern( &quot;new&quot; ), 1, INT2FIX( event.Type ) );
sf::Event *rubyRawEvent = NULL;
Data_Get_Struct( rbObject, sf::Event, rubyRawEvent );
*rubyRawEvent = event;
return rbObject;
}
else
{
return Qnil;
}
}</pre>
</body>
</html>

View file

@ -0,0 +1 @@
Tue, 16 Nov 2010 17:23:56 +0100

View file

@ -0,0 +1,137 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>File: extconf.rb</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="fileHeader">
<h1>extconf.rb</h1>
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Path:</strong></td>
<td>extconf.rb
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Last Update:</strong></td>
<td>Tue Nov 16 09:57:47 +0100 2010</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
rbSFML - Copyright (c) 2010 Henrik Valter Vogelius Hansson -
groogy@groogy.se This software is provided &#8216;as-is&#8217;, without any
express or implied warranty. In no event will the authors be held liable
for any damages arising from the use of this software.
</p>
<p>
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
</p>
<ol>
<li>The origin of this software must not be misrepresented; you must not claim
that you wrote the original software. If you use this software in a
product, an acknowledgment in the product documentation would be
appreciated but is not required.
</li>
<li>Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
</li>
<li>This notice may not be removed or altered from any source distribution.
</li>
</ol>
</div>
<div id="requires-list">
<h3 class="section-bar">Required files</h3>
<div class="name-list">
mkmf&nbsp;&nbsp;
</div>
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>File: ContextSettings.cpp</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="fileHeader">
<h1>ContextSettings.cpp</h1>
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Path:</strong></td>
<td>window/ContextSettings.cpp
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Last Update:</strong></td>
<td>Tue Nov 16 15:51:52 +0100 2010</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>File: Context.cpp</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="fileHeader">
<h1>Context.cpp</h1>
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Path:</strong></td>
<td>window/Context.cpp
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Last Update:</strong></td>
<td>Tue Nov 16 15:52:05 +0100 2010</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

Some files were not shown because too many files have changed in this diff Show more