gosu 0.7.17 → 0.7.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. data/Gosu/Version.hpp +2 -2
  2. data/GosuImpl/{AudioSDL.cpp → Audio/AudioSDL.cpp} +0 -0
  3. data/GosuImpl/RubyGosu_wrap.cxx +2 -2
  4. data/Rakefile +4 -4
  5. data/lib/gosu.rb +16 -0
  6. data/linux/Makefile.in +5 -5
  7. data/linux/configure +5 -4
  8. data/linux/configure.ac +3 -3
  9. data/linux/extconf.rb +7 -0
  10. metadata +4 -29
  11. data/reference/rdoc/classes/Gosu.html +0 -1554
  12. data/reference/rdoc/classes/Gosu/Color.html +0 -660
  13. data/reference/rdoc/classes/Gosu/Font.html +0 -545
  14. data/reference/rdoc/classes/Gosu/GLTexInfo.html +0 -412
  15. data/reference/rdoc/classes/Gosu/Image.html +0 -706
  16. data/reference/rdoc/classes/Gosu/Sample.html +0 -476
  17. data/reference/rdoc/classes/Gosu/SampleInstance.html +0 -523
  18. data/reference/rdoc/classes/Gosu/Song.html +0 -568
  19. data/reference/rdoc/classes/Gosu/TextInput.html +0 -444
  20. data/reference/rdoc/classes/Gosu/Window.html +0 -911
  21. data/reference/rdoc/classes/Numeric.html +0 -423
  22. data/reference/rdoc/created.rid +0 -1
  23. data/reference/rdoc/files/COPYING_txt.html +0 -391
  24. data/reference/rdoc/files/README_txt.html +0 -387
  25. data/reference/rdoc/files/reference/Deployment on OS X_rdoc.html +0 -381
  26. data/reference/rdoc/files/reference/Deployment on Windows_rdoc.html +0 -385
  27. data/reference/rdoc/files/reference/Drawing with Colors_rdoc.html +0 -363
  28. data/reference/rdoc/files/reference/Order of Corners_rdoc.html +0 -358
  29. data/reference/rdoc/files/reference/Tileability_rdoc.html +0 -374
  30. data/reference/rdoc/files/reference/Z Ordering_rdoc.html +0 -361
  31. data/reference/rdoc/files/reference/gosu_rb.html +0 -348
  32. data/reference/rdoc/fr_class_index.html +0 -12
  33. data/reference/rdoc/fr_file_index.html +0 -10
  34. data/reference/rdoc/fr_method_index.html +0 -64
  35. data/reference/rdoc/index.html +0 -1
  36. data/reference/rdoc/rdoc-style.css +0 -322
@@ -3,7 +3,7 @@
3
3
 
4
4
  #define GOSU_MAJOR_VERSION 0
5
5
  #define GOSU_MINOR_VERSION 7
6
- #define GOSU_POINT_VERSION 17
7
- #define GOSU_VERSION "0.7.17"
6
+ #define GOSU_POINT_VERSION 18
7
+ #define GOSU_VERSION "0.7.18"
8
8
 
9
9
  #endif
@@ -9235,8 +9235,8 @@ SWIGEXPORT void Init_gosu(void) {
9235
9235
  SWIG_RubyInitializeTrackings();
9236
9236
  rb_define_const(mGosu, "MAJOR_VERSION", SWIG_From_int(static_cast< int >(0)));
9237
9237
  rb_define_const(mGosu, "MINOR_VERSION", SWIG_From_int(static_cast< int >(7)));
9238
- rb_define_const(mGosu, "POINT_VERSION", SWIG_From_int(static_cast< int >(17)));
9239
- rb_define_const(mGosu, "VERSION", SWIG_FromCharPtr("0.7.17"));
9238
+ rb_define_const(mGosu, "POINT_VERSION", SWIG_From_int(static_cast< int >(18)));
9239
+ rb_define_const(mGosu, "VERSION", SWIG_FromCharPtr("0.7.18"));
9240
9240
  rb_define_module_function(mGosu, "milliseconds", VALUEFUNC(_wrap_milliseconds), -1);
9241
9241
  rb_define_module_function(mGosu, "random", VALUEFUNC(_wrap_random), -1);
9242
9242
  rb_define_module_function(mGosu, "gosu_to_radian_scale", VALUEFUNC(_wrap_gosu_to_radian_scale), -1);
data/Rakefile CHANGED
@@ -17,6 +17,7 @@ COMMON_CPP_FILES = COMMON_FILES + FileList[
17
17
  ]
18
18
 
19
19
  COMMON_RUBY_FILES = COMMON_FILES + FileList[
20
+ 'lib/gosu.rb',
20
21
  'lib/gosu/patches.rb',
21
22
  'examples/*.rb',
22
23
  'examples/media/*',
@@ -195,8 +196,7 @@ namespace :mac do
195
196
  MAC_SPEC = Gem::Specification.new do |s|
196
197
  apply_gemspec_defaults s
197
198
  s.platform = 'universal-darwin'
198
- s.files = COMMON_RUBY_FILES +
199
- FileList['lib/gosu.rb', 'lib/gosu.*.bundle']
199
+ s.files = COMMON_RUBY_FILES + FileList['lib/gosu.*.bundle']
200
200
  # TODO: 'lib/hotgosu.rb', 'lib/hotgosu/**/*',
201
201
  end
202
202
  Rake::GemPackageTask.new(MAC_SPEC) { |t| t.package_dir = 'public/mac_gem' }
@@ -225,7 +225,7 @@ namespace :win do
225
225
 
226
226
  desc "Build the archive #{WINDOWS_RUBY_ARCHIVE_FILENAME}"
227
227
  task :ruby_archive => [:version] do
228
- files = COMMON_RUBY_FILES + ['lib/gosu.rb', 'lib/gosu.for_1_8.so', 'lib/gosu.for_1_9.so', 'lib/fmod.dll']
228
+ files = COMMON_RUBY_FILES + ['lib/gosu.for_1_8.so', 'lib/gosu.for_1_9.so', 'lib/fmod.dll']
229
229
  sh "zip #{WINDOWS_RUBY_ARCHIVE_FILENAME} #{files.map { |filename| "'#{filename}'" }.join(' ')}"
230
230
  end
231
231
 
@@ -243,7 +243,7 @@ namespace :win do
243
243
  WINDOWS_SPEC = Gem::Specification.new do |s|
244
244
  apply_gemspec_defaults s
245
245
  s.platform = 'x86-mswin32-60'
246
- s.files = COMMON_RUBY_FILES + ['lib/gosu.rb', 'lib/gosu.for_1_8.so', 'lib/gosu.for_1_9.so', 'lib/fmod.dll']
246
+ s.files = COMMON_RUBY_FILES + ['lib/gosu.for_1_8.so', 'lib/gosu.for_1_9.so', 'lib/fmod.dll']
247
247
  end
248
248
  Rake::GemPackageTask.new(WINDOWS_SPEC) { |t| t.package_dir = 'public/windows_gem' }
249
249
 
@@ -0,0 +1,16 @@
1
+ require 'rbconfig'
2
+
3
+ begin
4
+ if defined? NSObject then
5
+ require "#{File.dirname(__FILE__)}/gosu.for_macruby.bundle"
6
+ require "#{File.dirname(__FILE__)}/hotgosu.rb"
7
+ elsif defined? RUBY_VERSION and RUBY_VERSION[0..2] == '1.9' then
8
+ require "#{File.dirname(__FILE__)}/gosu.for_1_9.#{Config::CONFIG['DLEXT']}"
9
+ else
10
+ require "#{File.dirname(__FILE__)}/gosu.for_1_8.#{Config::CONFIG['DLEXT']}"
11
+ end
12
+ rescue LoadError => e
13
+ require "#{File.dirname(__FILE__)}/gosu.custom.#{Config::CONFIG['DLEXT']}"
14
+ end
15
+
16
+ require "#{File.dirname(__FILE__)}/gosu/patches.rb"
@@ -15,8 +15,7 @@ BASE_OBJS = Math.o Utility.o IO.o FileUnix.o TimingUnix.o WindowX.o \
15
15
  NET_OBJS = Sockets/CommSocket.o Sockets/ListenerSocket.o \
16
16
  Sockets/Socket.o Sockets/MessageSocket.o
17
17
 
18
- SDLMIXER_OBJ = AudioSDL.o
19
- FMOD_OBJ = AudioFmod.o
18
+ SDLMIXER_OBJ = Audio/AudioSDL.o
20
19
  RUBYOBJS = RubyGosu_wrap.o
21
20
 
22
21
  OBJS = @GOSU_A_OBJS@
@@ -41,6 +40,7 @@ directories:
41
40
  if [ \! -d OpenGL ]; then mkdir OpenGL; fi
42
41
  if [ \! -d Graphics ]; then mkdir Graphics; fi
43
42
  if [ \! -d Sockets ]; then mkdir Sockets; fi
43
+ if [ \! -d Audio ]; then mkdir Audio; fi
44
44
 
45
45
  ../lib/libgosu.a: $(OBJS)
46
46
  ar -r ../lib/libgosu.a @GOSU_A_OBJS@
@@ -68,7 +68,7 @@ cpp_uninstall:
68
68
 
69
69
  clean:
70
70
  rm -f $(OBJS) $(XPLS) $(RUBYOBJS) ../lib/libgosu* ../lib/gosu?* ../bin/gosu-config
71
- rmdir RubyGosu OpenGL Graphics Sockets
71
+ rmdir RubyGosu Audio OpenGL Graphics Sockets
72
72
 
73
73
  $(OBJS): %.o: $(GOSU_DIR)/GosuImpl/%.cpp
74
74
  $(CXX) $(GOSU_DIR)/GosuImpl/$*.cpp -o $@ $(CXXFLAGS) -c
@@ -92,8 +92,8 @@ $(XPLS): %: %.cpp ../lib/libgosu.a
92
92
  chmod u+x ../bin/gosu-config
93
93
 
94
94
  # RubyGosu_wrap.cpp taken out because we use the prebuilt version from SVN
95
- ../lib/gosu.so: $(RUBYOBJS) ../lib/libgosu.a
96
- g++ -shared -o ../lib/gosu.so -Wall $(RUBYOBJS) $(RUBY_LIBS) @GOSU_A_OBJS@
95
+ ../lib/gosu.custom.so: $(RUBYOBJS) ../lib/libgosu.a
96
+ g++ -shared -o ../lib/gosu.custom.so -Wall $(RUBYOBJS) $(RUBY_LIBS) @GOSU_A_OBJS@
97
97
 
98
98
  $(RUBYOBJS): %.o: $(GOSU_DIR)/GosuImpl/%.cxx
99
99
  $(CXX) -fPIC $(GOSU_DIR)/GosuImpl/$*.cxx -o $@ $(CXXFLAGS) -c
@@ -4412,7 +4412,7 @@ if test -e "$RUBY_INC_DIR/ruby.h"; then
4412
4412
 
4413
4413
 
4414
4414
 
4415
- TO_BE_MADE=${TO_BE_MADE}" ../lib/gosu.so"
4415
+ TO_BE_MADE=${TO_BE_MADE}" ../lib/gosu.custom.so"
4416
4416
  fi
4417
4417
 
4418
4418
  # libdl
@@ -4723,8 +4723,8 @@ fi
4723
4723
 
4724
4724
 
4725
4725
  if test $GOSU_MAKEFILE_FOR_GEM; then
4726
- # If called by extconf.rb, let "make install" only build gosu.so.
4727
- INSTALL_ACTION="../lib/gosu.so"
4726
+ # If called by extconf.rb, let "make install" only build gosu.custom.so.
4727
+ INSTALL_ACTION="../lib/gosu.custom.so"
4728
4728
  UNINSTALL_ACTION=""
4729
4729
  else
4730
4730
  # Otherwise, install/uninstall the C++ version of Gosu.
@@ -5397,7 +5397,8 @@ $debug ||
5397
5397
  if test -n "$CONFIG_FILES"; then
5398
5398
 
5399
5399
 
5400
- ac_cr='
5400
+ ac_cr='
5401
+ '
5401
5402
  ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
5402
5403
  if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
5403
5404
  ac_cs_awk_cr='\\r'
@@ -80,7 +80,7 @@ if test -e "$RUBY_INC_DIR/ruby.h"; then
80
80
  AC_SUBST(RUBY_INC_DIR)
81
81
  AC_SUBST(RUBY_ARCH_DIR)
82
82
  AC_SUBST(RUBY_LIBS)
83
- TO_BE_MADE=${TO_BE_MADE}" ../lib/gosu.so"
83
+ TO_BE_MADE=${TO_BE_MADE}" ../lib/gosu.custom.so"
84
84
  fi
85
85
 
86
86
  # libdl
@@ -95,8 +95,8 @@ AC_CHECK_LIB(rt, sched_setscheduler, LIBS="$LIBS -lrt", AC_CHECK_LIB(c, sched_se
95
95
  AC_SUBST(HAVE_LIBRT)
96
96
 
97
97
  if test $GOSU_MAKEFILE_FOR_GEM; then
98
- # If called by extconf.rb, let "make install" only build gosu.so.
99
- INSTALL_ACTION="../lib/gosu.so"
98
+ # If called by extconf.rb, let "make install" only build gosu.custom.so.
99
+ INSTALL_ACTION="../lib/gosu.custom.so"
100
100
  UNINSTALL_ACTION=""
101
101
  else
102
102
  # Otherwise, install/uninstall the C++ version of Gosu.
@@ -2,6 +2,13 @@
2
2
  # Bogus extconf.rb to bridge rubygems to autoconf.
3
3
  # rubygems will call "make install" on the resulting makefile.
4
4
 
5
+ if defined? RUBY_PLATFORM and RUBY_PLATFORM[0..4] == 'win32' then
6
+ puts 'This gem is not meant to be installed on Windows.'
7
+ puts 'On Windows, please use:'
8
+ puts 'gem install gosu --platform=mswin32'
9
+ exit 1
10
+ end
11
+
5
12
  puts 'The Gosu gem requires some libraries to be installed system-wide.'
6
13
  puts 'See the following site for a list:'
7
14
  puts 'http://code.google.com/p/gosu/wiki/GettingStartedOnLinux'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gosu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.17
4
+ version: 0.7.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Raschke
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2010-01-05 00:00:00 +08:00
13
+ date: 2010-01-12 00:00:00 +08:00
14
14
  default_executable:
15
15
  dependencies: []
16
16
 
@@ -269,6 +269,7 @@ files:
269
269
  - reference/cpp/tab_l.gif
270
270
  - reference/cpp/tab_r.gif
271
271
  - reference/cpp/tabs.css
272
+ - lib/gosu.rb
272
273
  - lib/gosu/patches.rb
273
274
  - examples/ChipmunkIntegration.rb
274
275
  - examples/CptnRuby.rb
@@ -277,32 +278,6 @@ files:
277
278
  - examples/RMagickIntegration.rb
278
279
  - examples/TextInput.rb
279
280
  - examples/Tutorial.rb
280
- - reference/rdoc/classes/Gosu/Color.html
281
- - reference/rdoc/classes/Gosu/Font.html
282
- - reference/rdoc/classes/Gosu/GLTexInfo.html
283
- - reference/rdoc/classes/Gosu/Image.html
284
- - reference/rdoc/classes/Gosu/Sample.html
285
- - reference/rdoc/classes/Gosu/SampleInstance.html
286
- - reference/rdoc/classes/Gosu/Song.html
287
- - reference/rdoc/classes/Gosu/TextInput.html
288
- - reference/rdoc/classes/Gosu/Window.html
289
- - reference/rdoc/classes/Gosu.html
290
- - reference/rdoc/classes/Numeric.html
291
- - reference/rdoc/created.rid
292
- - reference/rdoc/files/COPYING_txt.html
293
- - reference/rdoc/files/README_txt.html
294
- - reference/rdoc/files/reference/Deployment on OS X_rdoc.html
295
- - reference/rdoc/files/reference/Deployment on Windows_rdoc.html
296
- - reference/rdoc/files/reference/Drawing with Colors_rdoc.html
297
- - reference/rdoc/files/reference/gosu_rb.html
298
- - reference/rdoc/files/reference/Order of Corners_rdoc.html
299
- - reference/rdoc/files/reference/Tileability_rdoc.html
300
- - reference/rdoc/files/reference/Z Ordering_rdoc.html
301
- - reference/rdoc/fr_class_index.html
302
- - reference/rdoc/fr_file_index.html
303
- - reference/rdoc/fr_method_index.html
304
- - reference/rdoc/index.html
305
- - reference/rdoc/rdoc-style.css
306
281
  - Rakefile
307
282
  - Gosu/Async.hpp
308
283
  - Gosu/Audio.hpp
@@ -337,10 +312,10 @@ files:
337
312
  - GosuImpl/Audio/ALChannelManagement.hpp
338
313
  - GosuImpl/Audio/AudioFile.hpp
339
314
  - GosuImpl/Audio/AudioOpenAL.mm
315
+ - GosuImpl/Audio/AudioSDL.cpp
340
316
  - GosuImpl/Audio/AudioToolboxFile.hpp
341
317
  - GosuImpl/Audio/OggFile.hpp
342
318
  - GosuImpl/AudioFmod.cpp
343
- - GosuImpl/AudioSDL.cpp
344
319
  - GosuImpl/DirectoriesMac.mm
345
320
  - GosuImpl/DirectoriesTouch.mm
346
321
  - GosuImpl/DirectoriesUnix.cpp
@@ -1,1554 +0,0 @@
1
- <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><meta content="text/html; charset=utf-8" http-equiv="Content-Type"/><title>Module: Gosu</title><link type="text/css" media="screen" href=".././rdoc-style.css" rel="stylesheet"/><script type="text/javascript">
2
- // Allison template
3
- // Copyright 2007, 2008 Cloudburst, LLC. Licensed under the AFL 3. See the included LICENSE file.
4
-
5
- var href_base = '.././rdoc-style.css'.replace(/(.*\/).*/, '$1'); // inline js is good for something
6
-
7
- function $(id) {
8
- if (document.getElementById)
9
- elem = document.getElementById(id);
10
- else if ( document.all )
11
- elem = eval("document.all." + id);
12
- else
13
- return false;
14
- return elem;
15
- }
16
-
17
- function toggle(id) {
18
- elem = $(id);
19
- elemStyle = elem.style;
20
- if (elemStyle.display == "block") {
21
- elemStyle.display = "none"
22
- } else {
23
- elemStyle.display = "block"
24
- }
25
- return true;
26
- }
27
-
28
- function toggleText(id) {
29
- elem = $(id)
30
- if (m = elem.innerHTML.match(/(Hide)(.*)/)) {
31
- elem.innerHTML = "Show" + m[2];
32
- } else if (m = elem.innerHTML.match(/(Show)(.*)/)) {
33
- elem.innerHTML = "Hide" + m[2];
34
- }
35
- return true;
36
- }
37
-
38
- function span(s, klass) {
39
- return '<span class="' + klass + '">' + s + '</span>';
40
- }
41
-
42
- function highlightSymbols() {
43
- pres = document.getElementsByTagName('pre');
44
- for(var i = 0; i < pres.length; i++) {
45
- pre = pres[i];
46
- spans = pre.getElementsByTagName('span');
47
- for(var k = 0; k < spans.length; k++) {
48
- span = spans[k];
49
- if (span.className.match(/ruby-identifier/)) {
50
- if (span.innerHTML.match(/^:/)) {
51
- span.className += " ruby-symbol";
52
- }
53
- }
54
- }
55
- }
56
- }
57
-
58
- function hasClass(obj) {
59
- var result = false;
60
- if (obj.getAttributeNode("class") != null) {
61
- result = obj.getAttributeNode("class").value;
62
- }
63
- return result;
64
- }
65
-
66
- function stripe() {
67
- var even = true;
68
- var color = "#e4ebed";
69
- var tables = document.getElementsByTagName('table');
70
- if (tables.length == 0) { return; }
71
- for (var h = 0; h < tables.length; h++) {
72
- var trs = tables[h].getElementsByTagName("tr");
73
- for (var i = 0; i < trs.length; i++) {
74
- var tds = trs[i].getElementsByTagName("td");
75
- for (var j = 0; j < tds.length; j++) {
76
- if (hasClass(tds[j]) != "first") {
77
- var mytd = tds[j];
78
- if (even) {
79
- mytd.style.backgroundColor = color;
80
- }
81
- }
82
- }
83
- even = ! even;
84
- }
85
- }
86
- }
87
-
88
- function ajaxGet(url) {
89
- url = (href_base + url).replace('/./', '/')
90
- var req = false;
91
-
92
- if (window.ActiveXObject) {
93
- try {
94
- // stupid hack because IE7 disables local Ajax with the native xmlhttprequest object
95
- // for security purposes. Yet ActiveX still works. Thanks, Microsoft. I hate you. Die.
96
- req = new ActiveXObject("MSXML2.XMLHTTP.3.0");
97
- } catch (e) {
98
- try {
99
- /* IE 6 and maybe 5, don't know, don't care */
100
- req = new ActiveXObject("Msxml2.XMLHTTP");
101
- } catch (e) {
102
- try {
103
- req = new ActiveXObject("Microsoft.XMLHTTP");
104
- } catch (e) {
105
- req = false;
106
- }
107
- }
108
- }
109
- }
110
-
111
- /* real browsers */
112
- if (!req && window.XMLHttpRequest) {
113
- try {
114
- req = new XMLHttpRequest();
115
- } catch (e) {
116
- req = false;
117
- }
118
- }
119
-
120
- if (req) {
121
- req.open('GET', url, false);
122
- req.send(null);
123
- return req.responseText;
124
- } else {
125
- return "Ajax error";
126
- }
127
- }
128
-
129
-
130
- function addEvent(elm, evType, fn, useCapture) {
131
- if (elm.addEventListener) {
132
- elm.addEventListener(evType, fn, useCapture);
133
- return true;
134
- } else if (elm.attachEvent) {
135
- var r = elm.attachEvent('on' + evType, fn);
136
- return r;
137
- } else {
138
- elm['on' + evType] = fn;
139
- }
140
- }
141
-
142
- function insertIndices() {
143
- pages = ["class", "file", "method"]
144
- for (x in pages) {
145
- $(pages[x]).innerHTML += ajaxGet('fr_' + pages[x] + '_index.html').replace(/(href=")/g, '$1' + href_base);
146
- }
147
- /* mouseoverify method links */
148
- links = $('method').getElementsByTagName('a');
149
- for (var x = 0; x < links.length; x++) {
150
- if (m = links[x].innerHTML.match(/(.*)\s\((.*)\)/)) {
151
- links[x].innerHTML = m[1] + '<br>';
152
- links[x].title = m[2];
153
- }
154
- }
155
- /* this is stupid */
156
- $('class').style.display = "block";
157
- $('file').style.display = "block";
158
-
159
- /* has to be here because IE7 does not guarantee the onLoad callback order */
160
- abbreviateIndicesInner(["class", "file"], 25, "a");
161
- /* same, linkTitle() depends on the class link list */
162
- linkTitle();
163
- }
164
-
165
- function abbreviateIndices() {
166
- var ids = ["defined_in", "child_of", "includes", "requires", "method", "methods"];
167
- abbreviateIndicesInner(ids, 25, 'a');
168
- abbreviateIndicesInner(ids, 25, 'span');
169
- }
170
-
171
- function abbreviateIndicesInner(indices, amount, tag) {
172
- for (var x = 0; x < indices.length; x++) {
173
- var the_index = $(indices[x]);
174
- if (the_index) {
175
- links = the_index.getElementsByTagName(tag);
176
- for (var y = 0; y < links.length; y++) {
177
- var link = links[y];
178
- if (link.getElementsByTagName('span').length == 0 && link.getElementsByTagName('a').length == 0) {
179
- // avoid nesting
180
- link.innerHTML = link.innerHTML.replace(/<br>|\n/gi, '');
181
- link.title = link.innerHTML;
182
- link.innerHTML = abbreviate(link.innerHTML, amount) + '<br>';
183
- }
184
- }
185
- }
186
- }
187
- }
188
-
189
- function linkTitle() {
190
-
191
- /* grab the correct title element from the index */
192
- var index_page = ajaxGet('index.html');
193
- title_text = index_page.match(/<title>(.*)<\/title>/m)[1];
194
- document.title = title_text + " - " + document.title;
195
- var p = $('header').getElementsByTagName('p')[0]
196
- if (p.innerHTML.match(/^\s*$/)) {
197
- p.innerHTML = title_text;
198
- } else {
199
- p.innerHTML = title_text + ": " + p.innerHTML;
200
- }
201
-
202
- /* set the link properly */
203
- title_link = index_page.match(/<a\s+href="(.*?)"/)[1];
204
- var element = $('title');
205
- var item_type = "";
206
- var item_name = "";
207
- if (m = element.innerHTML.match(/(Class:|Module:|File:)\s*(.*)/)) {
208
- item_type = m[1];
209
- item_name = m[2];
210
- } else {
211
- item_name = element.innerHTML;
212
- }
213
- element.innerHTML = '<a href="' + href_base + title_link + '">' + item_type + " " + abbreviate(item_name, 45) + '</a>';
214
- element.getElementsByTagName('a')[0].title = item_name
215
-
216
- /* breadcrumb navigation */
217
- items = item_name.split("::");
218
- items_new = item_name.split("::");
219
- file_links = $('class').getElementsByTagName('a');
220
- for (var x = 0; x < items.length - 1; x++ ){
221
- var item = items[x];
222
- link = ("/classes/" + items.slice(0,x).join("/") + "/" + item + ".html").replace('//', '/');
223
- regex = new RegExp(RegExp.escape(link) + '$');
224
- for (var y = 0; y < file_links.length; y++) {
225
- if (file_links[y].href.match(regex)) {
226
- items_new[x] = '<a href="' + href_base + link + '">' + item + '</a>';
227
- break;
228
- }
229
- }
230
- }
231
- $('item_name').innerHTML = item_type + ' ' + items_new.join(" :: ");
232
- }
233
-
234
- function abbreviate(s, size) {
235
- // Try to get rid of path and extension in any case. These are not
236
- // even interesting if there is enough space.
237
-
238
- s = s.replace(/\..*$/, '');
239
- s = s.replace(/.*\//g, '');
240
-
241
- // Now this is a blatant hack.
242
-
243
- if (s == 'gosu')
244
- return ''; // Noone will ever see the link, harhar!
245
-
246
- while (s.length > size) {
247
- var old_s = s;
248
- s = s.replace(/\s|\n/mg, '');
249
- s = s.replace(/([A-Z])[a-z]+/m, '$1');
250
- if (!s || old_s == s) {
251
- return "..." + s.substring(s.length - size, s.length);
252
- }
253
- }
254
- return s;
255
- }
256
-
257
- function disableSubmit(event) {
258
- var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
259
- if (keyCode == 13) {
260
- return false;
261
- } else {
262
- return true;
263
- }
264
- }
265
-
266
- function filterList(id, s, event) {
267
-
268
- /* some weak escaping */
269
- s = s.replace(/[^\w\d\.\_\-\/\:\=\[\]\?\!]/g, '');
270
- s = RegExp.escape(s);
271
-
272
- var show_all = false;
273
- if (s.match(/^\s*$/)) {
274
- show_all = true;
275
- }
276
-
277
- links = $(id).getElementsByTagName('a')
278
- regex = new RegExp(s, 'i');
279
-
280
- for (var x = 0; x < links.length; x++) {
281
- var link = links[x];
282
- if (show_all) {
283
- link.style.display = 'inline';
284
- } else {
285
- if (link.innerHTML.match(regex)) {
286
- link.style.display = 'inline';
287
- } else {
288
- link.style.display = 'none';
289
- }
290
- }
291
- }
292
- return true;
293
- }
294
-
295
- RegExp.escape = function(text) {
296
- if (!arguments.callee.sRE) {
297
- var specials = ['/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\'];
298
- arguments.callee.sRE = new RegExp(
299
- '(\\' + specials.join('|\\') + ')', 'g'
300
- );
301
- }
302
- return text.replace(arguments.callee.sRE, '\\$1');
303
- }
304
-
305
- function hacks() {
306
- // show the spacer if necessary,
307
- divs = document.getElementsByTagName('div');
308
- for(var x = 0; x < divs.length; x++) {
309
- if (divs[x].className && divs[x].className.match(/top/)) {
310
- document.getElementById('spacer').style.display = 'block';
311
- }
312
- }
313
- // remove extra colons from tables
314
- tds = document.getElementsByTagName('td');
315
- for(var x = 0; x < tds.length; x++) {
316
- str = tds[x].innerHTML
317
- if (str.charAt(str.length - 1) == ":") {
318
- tds[x].innerHTML = str.slice(0, str.length - 1)
319
- }
320
- }
321
- }
322
-
323
- addEvent(window, 'load', insertIndices, false);
324
- addEvent(window, 'load', abbreviateIndices, false);
325
- addEvent(window, 'load', stripe, false);
326
- addEvent(window, 'load', highlightSymbols, false);
327
- addEvent(window, 'load', hacks, false);
328
- </script></head><body><div id="container"><div class="curve" id="preheader_curve_0"></div><div class="curve" id="preheader_curve_1"></div><div class="curve" id="preheader_curve_2"></div><div class="curve" id="preheader_curve_3"></div><div class="curve" id="preheader_curve_4"></div><div class="curve" id="preheader_curve_5"></div><div id="header"><span><h1 id="title">
329
- Module: Gosu
330
- </h1></span></div><div class="clear"></div><div id="left">
331
-
332
- <div class="navigation darker top" id="defined_in"><h3>Defined in</h3>
333
-
334
- <a href="../files/reference/gosu_rb.html">reference/gosu.rb</a>
335
-
336
- </div>
337
-
338
-
339
-
340
- <div class="navigation top" id="methods"><h3>Methods</h3>
341
-
342
-
343
- <a href='#M000006'>
344
- angle<br/>
345
- </a>
346
-
347
-
348
-
349
-
350
- <a href='#M000007'>
351
- angle_diff<br/>
352
- </a>
353
-
354
-
355
-
356
-
357
- <a href='#M000010'>
358
- default_font_name<br/>
359
- </a>
360
-
361
-
362
-
363
-
364
- <a href='#M000008'>
365
- distance<br/>
366
- </a>
367
-
368
-
369
-
370
-
371
- <a href='#M000009'>
372
- milliseconds<br/>
373
- </a>
374
-
375
-
376
-
377
-
378
- <a href='#M000004'>
379
- offset_x<br/>
380
- </a>
381
-
382
-
383
-
384
-
385
- <a href='#M000005'>
386
- offset_y<br/>
387
- </a>
388
-
389
-
390
-
391
-
392
- <a href='#M000003'>
393
- random<br/>
394
- </a>
395
-
396
-
397
-
398
-
399
- <a href='#M000012'>
400
- screen_height<br/>
401
- </a>
402
-
403
-
404
-
405
-
406
- <a href='#M000011'>
407
- screen_width<br/>
408
- </a>
409
-
410
-
411
- </div>
412
- <div id="spacer"></div><div class="navigation darker index" id="class_wrapper"><div class="list_header"><h3>All classes</h3></div><div class="list_header_link"><a href="#" onclick="toggle('class'); toggleText('class_link'); return false;" id="class_link">Hide...</a></div><div class="clear"></div><div id="class"><form><label for="filter_class">Filter:&nbsp;&nbsp;</label><input type="text" onKeyPress="return disableSubmit(event);" id="filter_class" onKeyUp="return filterList('class', this.value, event);"></input></form></div></div><div class="navigation darker index" id="file_wrapper"><div class="list_header"><h3>All files</h3></div><div class="list_header_link"><a href="#" onclick="toggle('file'); toggleText('file_link'); return false;" id="file_link">Hide...</a></div><div class="clear"></div><div id="file"><form><label for="filter_file">Filter:&nbsp;&nbsp;</label><input type="text" onKeyPress="return disableSubmit(event);" id="filter_file" onKeyUp="return filterList('file', this.value, event);"></input></form></div></div><div class="navigation darker index" id="method_wrapper"><div class="list_header"><h3>All methods</h3></div><div class="list_header_link"><a href="#" onclick="toggle('method'); toggleText('method_link'); return false;" id="method_link">Show...</a></div><div class="clear"></div><div id="method"><form><label for="filter_method">Filter:&nbsp;&nbsp;</label><input type="text" onKeyPress="return disableSubmit(event);" id="filter_method" onKeyUp="return filterList('method', this.value, event);"></input></form></div></div></div><div id="content">
413
-
414
-
415
-
416
-
417
- <p></p>
418
-
419
- <h1>Child modules and classes</h1><p>Class <a href="Gosu/Color.html" class="link">Gosu::Color</a><br />
420
- Class <a href="Gosu/Font.html" class="link">Gosu::Font</a><br />
421
- Class <a href="Gosu/GLTexInfo.html" class="link">Gosu::GLTexInfo</a><br />
422
- Class <a href="Gosu/Image.html" class="link">Gosu::Image</a><br />
423
- Class <a href="Gosu/Sample.html" class="link">Gosu::Sample</a><br />
424
- Class <a href="Gosu/SampleInstance.html" class="link">Gosu::SampleInstance</a><br />
425
- Class <a href="Gosu/Song.html" class="link">Gosu::Song</a><br />
426
- Class <a href="Gosu/TextInput.html" class="link">Gosu::TextInput</a><br />
427
- Class <a href="Gosu/Window.html" class="link">Gosu::Window</a><br />
428
- </p>
429
-
430
- <h1>Constants</h1><p><table><tr><th>Name</th><th>Value</th></tr>
431
- <tr>
432
- <td class="highlight">VERSION</td>
433
-
434
- <td class="normal">:a_string</td>
435
-
436
-
437
-
438
- </tr>
439
- <tr>
440
- <td class="highlight">MAJOR_VERSION</td>
441
-
442
- <td class="normal">:a_fixnum</td>
443
-
444
-
445
-
446
- </tr>
447
- <tr>
448
- <td class="highlight">MINOR_VERSION</td>
449
-
450
- <td class="normal">:a_fixnum</td>
451
-
452
-
453
-
454
- </tr>
455
- <tr>
456
- <td class="highlight">POINT_VERSION</td>
457
-
458
- <td class="normal">:a_fixnum</td>
459
-
460
-
461
-
462
- </tr>
463
- <tr>
464
- <td class="highlight">Kb0</td>
465
-
466
- <td class="normal">:implementation_defined</td>
467
-
468
-
469
-
470
- </tr>
471
- <tr>
472
- <td class="highlight">Kb1</td>
473
-
474
- <td class="normal">:implementation_defined</td>
475
-
476
-
477
-
478
- </tr>
479
- <tr>
480
- <td class="highlight">Kb2</td>
481
-
482
- <td class="normal">:implementation_defined</td>
483
-
484
-
485
-
486
- </tr>
487
- <tr>
488
- <td class="highlight">Kb3</td>
489
-
490
- <td class="normal">:implementation_defined</td>
491
-
492
-
493
-
494
- </tr>
495
- <tr>
496
- <td class="highlight">Kb4</td>
497
-
498
- <td class="normal">:implementation_defined</td>
499
-
500
-
501
-
502
- </tr>
503
- <tr>
504
- <td class="highlight">Kb5</td>
505
-
506
- <td class="normal">:implementation_defined</td>
507
-
508
-
509
-
510
- </tr>
511
- <tr>
512
- <td class="highlight">Kb6</td>
513
-
514
- <td class="normal">:implementation_defined</td>
515
-
516
-
517
-
518
- </tr>
519
- <tr>
520
- <td class="highlight">Kb7</td>
521
-
522
- <td class="normal">:implementation_defined</td>
523
-
524
-
525
-
526
- </tr>
527
- <tr>
528
- <td class="highlight">Kb8</td>
529
-
530
- <td class="normal">:implementation_defined</td>
531
-
532
-
533
-
534
- </tr>
535
- <tr>
536
- <td class="highlight">Kb9</td>
537
-
538
- <td class="normal">:implementation_defined</td>
539
-
540
-
541
-
542
- </tr>
543
- <tr>
544
- <td class="highlight">KbA</td>
545
-
546
- <td class="normal">:implementation_defined</td>
547
-
548
-
549
-
550
- </tr>
551
- <tr>
552
- <td class="highlight">KbB</td>
553
-
554
- <td class="normal">:implementation_defined</td>
555
-
556
-
557
-
558
- </tr>
559
- <tr>
560
- <td class="highlight">KbC</td>
561
-
562
- <td class="normal">:implementation_defined</td>
563
-
564
-
565
-
566
- </tr>
567
- <tr>
568
- <td class="highlight">KbD</td>
569
-
570
- <td class="normal">:implementation_defined</td>
571
-
572
-
573
-
574
- </tr>
575
- <tr>
576
- <td class="highlight">KbE</td>
577
-
578
- <td class="normal">:implementation_defined</td>
579
-
580
-
581
-
582
- </tr>
583
- <tr>
584
- <td class="highlight">KbF</td>
585
-
586
- <td class="normal">:implementation_defined</td>
587
-
588
-
589
-
590
- </tr>
591
- <tr>
592
- <td class="highlight">KbG</td>
593
-
594
- <td class="normal">:implementation_defined</td>
595
-
596
-
597
-
598
- </tr>
599
- <tr>
600
- <td class="highlight">KbH</td>
601
-
602
- <td class="normal">:implementation_defined</td>
603
-
604
-
605
-
606
- </tr>
607
- <tr>
608
- <td class="highlight">KbI</td>
609
-
610
- <td class="normal">:implementation_defined</td>
611
-
612
-
613
-
614
- </tr>
615
- <tr>
616
- <td class="highlight">KbJ</td>
617
-
618
- <td class="normal">:implementation_defined</td>
619
-
620
-
621
-
622
- </tr>
623
- <tr>
624
- <td class="highlight">KbK</td>
625
-
626
- <td class="normal">:implementation_defined</td>
627
-
628
-
629
-
630
- </tr>
631
- <tr>
632
- <td class="highlight">KbL</td>
633
-
634
- <td class="normal">:implementation_defined</td>
635
-
636
-
637
-
638
- </tr>
639
- <tr>
640
- <td class="highlight">KbM</td>
641
-
642
- <td class="normal">:implementation_defined</td>
643
-
644
-
645
-
646
- </tr>
647
- <tr>
648
- <td class="highlight">KbN</td>
649
-
650
- <td class="normal">:implementation_defined</td>
651
-
652
-
653
-
654
- </tr>
655
- <tr>
656
- <td class="highlight">KbO</td>
657
-
658
- <td class="normal">:implementation_defined</td>
659
-
660
-
661
-
662
- </tr>
663
- <tr>
664
- <td class="highlight">KbP</td>
665
-
666
- <td class="normal">:implementation_defined</td>
667
-
668
-
669
-
670
- </tr>
671
- <tr>
672
- <td class="highlight">KbQ</td>
673
-
674
- <td class="normal">:implementation_defined</td>
675
-
676
-
677
-
678
- </tr>
679
- <tr>
680
- <td class="highlight">KbR</td>
681
-
682
- <td class="normal">:implementation_defined</td>
683
-
684
-
685
-
686
- </tr>
687
- <tr>
688
- <td class="highlight">KbS</td>
689
-
690
- <td class="normal">:implementation_defined</td>
691
-
692
-
693
-
694
- </tr>
695
- <tr>
696
- <td class="highlight">KbT</td>
697
-
698
- <td class="normal">:implementation_defined</td>
699
-
700
-
701
-
702
- </tr>
703
- <tr>
704
- <td class="highlight">KbU</td>
705
-
706
- <td class="normal">:implementation_defined</td>
707
-
708
-
709
-
710
- </tr>
711
- <tr>
712
- <td class="highlight">KbV</td>
713
-
714
- <td class="normal">:implementation_defined</td>
715
-
716
-
717
-
718
- </tr>
719
- <tr>
720
- <td class="highlight">KbW</td>
721
-
722
- <td class="normal">:implementation_defined</td>
723
-
724
-
725
-
726
- </tr>
727
- <tr>
728
- <td class="highlight">KbX</td>
729
-
730
- <td class="normal">:implementation_defined</td>
731
-
732
-
733
-
734
- </tr>
735
- <tr>
736
- <td class="highlight">KbY</td>
737
-
738
- <td class="normal">:implementation_defined</td>
739
-
740
-
741
-
742
- </tr>
743
- <tr>
744
- <td class="highlight">KbZ</td>
745
-
746
- <td class="normal">:implementation_defined</td>
747
-
748
-
749
-
750
- </tr>
751
- <tr>
752
- <td class="highlight">KbBackspace</td>
753
-
754
- <td class="normal">:implementation_defined</td>
755
-
756
-
757
-
758
- </tr>
759
- <tr>
760
- <td class="highlight">KbDelete</td>
761
-
762
- <td class="normal">:implementation_defined</td>
763
-
764
-
765
-
766
- </tr>
767
- <tr>
768
- <td class="highlight">KbDown</td>
769
-
770
- <td class="normal">:implementation_defined</td>
771
-
772
-
773
-
774
- </tr>
775
- <tr>
776
- <td class="highlight">KbEnd</td>
777
-
778
- <td class="normal">:implementation_defined</td>
779
-
780
-
781
-
782
- </tr>
783
- <tr>
784
- <td class="highlight">KbEnter</td>
785
-
786
- <td class="normal">:implementation_defined</td>
787
-
788
-
789
-
790
- </tr>
791
- <tr>
792
- <td class="highlight">KbEscape</td>
793
-
794
- <td class="normal">:implementation_defined</td>
795
-
796
-
797
-
798
- </tr>
799
- <tr>
800
- <td class="highlight">KbF1</td>
801
-
802
- <td class="normal">:implementation_defined</td>
803
-
804
-
805
-
806
- </tr>
807
- <tr>
808
- <td class="highlight">KbF10</td>
809
-
810
- <td class="normal">:implementation_defined</td>
811
-
812
-
813
-
814
- </tr>
815
- <tr>
816
- <td class="highlight">KbF11</td>
817
-
818
- <td class="normal">:implementation_defined</td>
819
-
820
-
821
-
822
- </tr>
823
- <tr>
824
- <td class="highlight">KbF12</td>
825
-
826
- <td class="normal">:implementation_defined</td>
827
-
828
-
829
-
830
- </tr>
831
- <tr>
832
- <td class="highlight">KbF2</td>
833
-
834
- <td class="normal">:implementation_defined</td>
835
-
836
-
837
-
838
- </tr>
839
- <tr>
840
- <td class="highlight">KbF3</td>
841
-
842
- <td class="normal">:implementation_defined</td>
843
-
844
-
845
-
846
- </tr>
847
- <tr>
848
- <td class="highlight">KbF4</td>
849
-
850
- <td class="normal">:implementation_defined</td>
851
-
852
-
853
-
854
- </tr>
855
- <tr>
856
- <td class="highlight">KbF5</td>
857
-
858
- <td class="normal">:implementation_defined</td>
859
-
860
-
861
-
862
- </tr>
863
- <tr>
864
- <td class="highlight">KbF6</td>
865
-
866
- <td class="normal">:implementation_defined</td>
867
-
868
-
869
-
870
- </tr>
871
- <tr>
872
- <td class="highlight">KbF7</td>
873
-
874
- <td class="normal">:implementation_defined</td>
875
-
876
-
877
-
878
- </tr>
879
- <tr>
880
- <td class="highlight">KbF8</td>
881
-
882
- <td class="normal">:implementation_defined</td>
883
-
884
-
885
-
886
- </tr>
887
- <tr>
888
- <td class="highlight">KbF9</td>
889
-
890
- <td class="normal">:implementation_defined</td>
891
-
892
-
893
-
894
- </tr>
895
- <tr>
896
- <td class="highlight">KbHome</td>
897
-
898
- <td class="normal">:implementation_defined</td>
899
-
900
-
901
-
902
- </tr>
903
- <tr>
904
- <td class="highlight">KbInsert</td>
905
-
906
- <td class="normal">:implementation_defined</td>
907
-
908
-
909
-
910
- </tr>
911
- <tr>
912
- <td class="highlight">KbLeft</td>
913
-
914
- <td class="normal">:implementation_defined</td>
915
-
916
-
917
-
918
- </tr>
919
- <tr>
920
- <td class="highlight">KbLeftAlt</td>
921
-
922
- <td class="normal">:implementation_defined</td>
923
-
924
-
925
-
926
- </tr>
927
- <tr>
928
- <td class="highlight">KbLeftControl</td>
929
-
930
- <td class="normal">:implementation_defined</td>
931
-
932
-
933
-
934
- </tr>
935
- <tr>
936
- <td class="highlight">KbLeftShift</td>
937
-
938
- <td class="normal">:implementation_defined</td>
939
-
940
-
941
-
942
- </tr>
943
- <tr>
944
- <td class="highlight">KbNumpad0</td>
945
-
946
- <td class="normal">:implementation_defined</td>
947
-
948
-
949
-
950
- </tr>
951
- <tr>
952
- <td class="highlight">KbNumpad1</td>
953
-
954
- <td class="normal">:implementation_defined</td>
955
-
956
-
957
-
958
- </tr>
959
- <tr>
960
- <td class="highlight">KbNumpad2</td>
961
-
962
- <td class="normal">:implementation_defined</td>
963
-
964
-
965
-
966
- </tr>
967
- <tr>
968
- <td class="highlight">KbNumpad3</td>
969
-
970
- <td class="normal">:implementation_defined</td>
971
-
972
-
973
-
974
- </tr>
975
- <tr>
976
- <td class="highlight">KbNumpad4</td>
977
-
978
- <td class="normal">:implementation_defined</td>
979
-
980
-
981
-
982
- </tr>
983
- <tr>
984
- <td class="highlight">KbNumpad5</td>
985
-
986
- <td class="normal">:implementation_defined</td>
987
-
988
-
989
-
990
- </tr>
991
- <tr>
992
- <td class="highlight">KbNumpad6</td>
993
-
994
- <td class="normal">:implementation_defined</td>
995
-
996
-
997
-
998
- </tr>
999
- <tr>
1000
- <td class="highlight">KbNumpad7</td>
1001
-
1002
- <td class="normal">:implementation_defined</td>
1003
-
1004
-
1005
-
1006
- </tr>
1007
- <tr>
1008
- <td class="highlight">KbNumpad8</td>
1009
-
1010
- <td class="normal">:implementation_defined</td>
1011
-
1012
-
1013
-
1014
- </tr>
1015
- <tr>
1016
- <td class="highlight">KbNumpad9</td>
1017
-
1018
- <td class="normal">:implementation_defined</td>
1019
-
1020
-
1021
-
1022
- </tr>
1023
- <tr>
1024
- <td class="highlight">KbNumpadAdd</td>
1025
-
1026
- <td class="normal">:implementation_defined</td>
1027
-
1028
-
1029
-
1030
- </tr>
1031
- <tr>
1032
- <td class="highlight">KbNumpadDivide</td>
1033
-
1034
- <td class="normal">:implementation_defined</td>
1035
-
1036
-
1037
-
1038
- </tr>
1039
- <tr>
1040
- <td class="highlight">KbNumpadMultiply</td>
1041
-
1042
- <td class="normal">:implementation_defined</td>
1043
-
1044
-
1045
-
1046
- </tr>
1047
- <tr>
1048
- <td class="highlight">KbNumpadSubtract</td>
1049
-
1050
- <td class="normal">:implementation_defined</td>
1051
-
1052
-
1053
-
1054
- </tr>
1055
- <tr>
1056
- <td class="highlight">KbPageDown</td>
1057
-
1058
- <td class="normal">:implementation_defined</td>
1059
-
1060
-
1061
-
1062
- </tr>
1063
- <tr>
1064
- <td class="highlight">KbPageUp</td>
1065
-
1066
- <td class="normal">:implementation_defined</td>
1067
-
1068
-
1069
-
1070
- </tr>
1071
- <tr>
1072
- <td class="highlight">KbPause</td>
1073
-
1074
- <td class="normal">:implementation_defined</td>
1075
-
1076
-
1077
-
1078
- </tr>
1079
- <tr>
1080
- <td class="highlight">KbReturn</td>
1081
-
1082
- <td class="normal">:implementation_defined</td>
1083
-
1084
-
1085
-
1086
- </tr>
1087
- <tr>
1088
- <td class="highlight">KbRight</td>
1089
-
1090
- <td class="normal">:implementation_defined</td>
1091
-
1092
-
1093
-
1094
- </tr>
1095
- <tr>
1096
- <td class="highlight">KbRightAlt</td>
1097
-
1098
- <td class="normal">:implementation_defined</td>
1099
-
1100
-
1101
-
1102
- </tr>
1103
- <tr>
1104
- <td class="highlight">KbRightControl</td>
1105
-
1106
- <td class="normal">:implementation_defined</td>
1107
-
1108
-
1109
-
1110
- </tr>
1111
- <tr>
1112
- <td class="highlight">KbRightShift</td>
1113
-
1114
- <td class="normal">:implementation_defined</td>
1115
-
1116
-
1117
-
1118
- </tr>
1119
- <tr>
1120
- <td class="highlight">KbSpace</td>
1121
-
1122
- <td class="normal">:implementation_defined</td>
1123
-
1124
-
1125
-
1126
- </tr>
1127
- <tr>
1128
- <td class="highlight">KbTab</td>
1129
-
1130
- <td class="normal">:implementation_defined</td>
1131
-
1132
-
1133
-
1134
- </tr>
1135
- <tr>
1136
- <td class="highlight">KbUp</td>
1137
-
1138
- <td class="normal">:implementation_defined</td>
1139
-
1140
-
1141
-
1142
- </tr>
1143
- <tr>
1144
- <td class="highlight">MsLeft</td>
1145
-
1146
- <td class="normal">:implementation_defined</td>
1147
-
1148
-
1149
-
1150
- </tr>
1151
- <tr>
1152
- <td class="highlight">MsMiddle</td>
1153
-
1154
- <td class="normal">:implementation_defined</td>
1155
-
1156
-
1157
-
1158
- </tr>
1159
- <tr>
1160
- <td class="highlight">MsRight</td>
1161
-
1162
- <td class="normal">:implementation_defined</td>
1163
-
1164
-
1165
-
1166
- </tr>
1167
- <tr>
1168
- <td class="highlight">MsWheelDown</td>
1169
-
1170
- <td class="normal">:implementation_defined</td>
1171
-
1172
-
1173
-
1174
- </tr>
1175
- <tr>
1176
- <td class="highlight">MsWheelUp</td>
1177
-
1178
- <td class="normal">:implementation_defined</td>
1179
-
1180
-
1181
-
1182
- </tr>
1183
- <tr>
1184
- <td class="highlight">GpButton0</td>
1185
-
1186
- <td class="normal">:implementation_defined</td>
1187
-
1188
-
1189
-
1190
- </tr>
1191
- <tr>
1192
- <td class="highlight">GpButton1</td>
1193
-
1194
- <td class="normal">:implementation_defined</td>
1195
-
1196
-
1197
-
1198
- </tr>
1199
- <tr>
1200
- <td class="highlight">GpButton10</td>
1201
-
1202
- <td class="normal">:implementation_defined</td>
1203
-
1204
-
1205
-
1206
- </tr>
1207
- <tr>
1208
- <td class="highlight">GpButton11</td>
1209
-
1210
- <td class="normal">:implementation_defined</td>
1211
-
1212
-
1213
-
1214
- </tr>
1215
- <tr>
1216
- <td class="highlight">GpButton12</td>
1217
-
1218
- <td class="normal">:implementation_defined</td>
1219
-
1220
-
1221
-
1222
- </tr>
1223
- <tr>
1224
- <td class="highlight">GpButton13</td>
1225
-
1226
- <td class="normal">:implementation_defined</td>
1227
-
1228
-
1229
-
1230
- </tr>
1231
- <tr>
1232
- <td class="highlight">GpButton14</td>
1233
-
1234
- <td class="normal">:implementation_defined</td>
1235
-
1236
-
1237
-
1238
- </tr>
1239
- <tr>
1240
- <td class="highlight">GpButton15</td>
1241
-
1242
- <td class="normal">:implementation_defined</td>
1243
-
1244
-
1245
-
1246
- </tr>
1247
- <tr>
1248
- <td class="highlight">GpButton2</td>
1249
-
1250
- <td class="normal">:implementation_defined</td>
1251
-
1252
-
1253
-
1254
- </tr>
1255
- <tr>
1256
- <td class="highlight">GpButton3</td>
1257
-
1258
- <td class="normal">:implementation_defined</td>
1259
-
1260
-
1261
-
1262
- </tr>
1263
- <tr>
1264
- <td class="highlight">GpButton4</td>
1265
-
1266
- <td class="normal">:implementation_defined</td>
1267
-
1268
-
1269
-
1270
- </tr>
1271
- <tr>
1272
- <td class="highlight">GpButton5</td>
1273
-
1274
- <td class="normal">:implementation_defined</td>
1275
-
1276
-
1277
-
1278
- </tr>
1279
- <tr>
1280
- <td class="highlight">GpButton6</td>
1281
-
1282
- <td class="normal">:implementation_defined</td>
1283
-
1284
-
1285
-
1286
- </tr>
1287
- <tr>
1288
- <td class="highlight">GpButton7</td>
1289
-
1290
- <td class="normal">:implementation_defined</td>
1291
-
1292
-
1293
-
1294
- </tr>
1295
- <tr>
1296
- <td class="highlight">GpButton8</td>
1297
-
1298
- <td class="normal">:implementation_defined</td>
1299
-
1300
-
1301
-
1302
- </tr>
1303
- <tr>
1304
- <td class="highlight">GpButton9</td>
1305
-
1306
- <td class="normal">:implementation_defined</td>
1307
-
1308
-
1309
-
1310
- </tr>
1311
- <tr>
1312
- <td class="highlight">GpDown</td>
1313
-
1314
- <td class="normal">:implementation_defined</td>
1315
-
1316
-
1317
-
1318
- </tr>
1319
- <tr>
1320
- <td class="highlight">GpLeft</td>
1321
-
1322
- <td class="normal">:implementation_defined</td>
1323
-
1324
-
1325
-
1326
- </tr>
1327
- <tr>
1328
- <td class="highlight">GpRight</td>
1329
-
1330
- <td class="normal">:implementation_defined</td>
1331
-
1332
-
1333
-
1334
- </tr>
1335
- <tr>
1336
- <td class="highlight">GpUp</td>
1337
-
1338
- <td class="normal">:implementation_defined</td>
1339
-
1340
-
1341
-
1342
- </tr>
1343
- </table></p>
1344
-
1345
-
1346
-
1347
-
1348
- <h1>Public Instance Methods</h1>
1349
-
1350
-
1351
- <a class="small" name="M000006"><br/></a>
1352
- <div class="method_block"><h3>
1353
- <a href='#M000006'>
1354
-
1355
-
1356
- angle
1357
-
1358
- (x1, y1, x2, y2)
1359
-
1360
- </a>
1361
- </h3>
1362
- <p>
1363
- Returns the <a href="Gosu.html#M000006">angle</a> from point 1 to point 2
1364
- in degrees, where 0.0 means upwards. Returns 0 if both points are equal.
1365
- </p>
1366
-
1367
- <p class="source_link" id="M000006-show-link"><a href="#" onclick="toggle('M000006-source'); toggleText('M000006-link'); return false;" id="M000006-link">Show source...</a></p><div class="source" id="M000006-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 457</span>
1368
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">angle</span>(<span class="ruby-identifier">x1</span>, <span class="ruby-identifier">y1</span>, <span class="ruby-identifier">x2</span>, <span class="ruby-identifier">y2</span>); <span class="ruby-keyword kw">end</span></pre></div>
1369
- </div>
1370
-
1371
- <a class="small" name="M000007"><br/></a>
1372
- <div class="method_block"><h3>
1373
- <a href='#M000007'>
1374
-
1375
-
1376
- angle_diff
1377
-
1378
- (angle1, angle2)
1379
-
1380
- </a>
1381
- </h3>
1382
- <p>
1383
- Returns the smallest <a href="Gosu.html#M000006">angle</a> that can be
1384
- added to angle1 to get to angle2 (can be negative if counter-clockwise
1385
- movement is shorter).
1386
- </p>
1387
-
1388
- <p class="source_link" id="M000007-show-link"><a href="#" onclick="toggle('M000007-source'); toggleText('M000007-link'); return false;" id="M000007-link">Show source...</a></p><div class="source" id="M000007-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 460</span>
1389
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">angle_diff</span>(<span class="ruby-identifier">angle1</span>, <span class="ruby-identifier">angle2</span>); <span class="ruby-keyword kw">end</span></pre></div>
1390
- </div>
1391
-
1392
- <a class="small" name="M000010"><br/></a>
1393
- <div class="method_block"><h3>
1394
- <a href='#M000010'>
1395
-
1396
-
1397
- default_font_name
1398
-
1399
- ()
1400
-
1401
- </a>
1402
- </h3>
1403
- <p>
1404
- Returns the name of a neutral font that is available on the current
1405
- platform.
1406
- </p>
1407
-
1408
- <p class="source_link" id="M000010-show-link"><a href="#" onclick="toggle('M000010-source'); toggleText('M000010-link'); return false;" id="M000010-link">Show source...</a></p><div class="source" id="M000010-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 470</span>
1409
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">default_font_name</span>(); <span class="ruby-keyword kw">end</span></pre></div>
1410
- </div>
1411
-
1412
- <a class="small" name="M000008"><br/></a>
1413
- <div class="method_block"><h3>
1414
- <a href='#M000008'>
1415
-
1416
-
1417
- distance
1418
-
1419
- (x1, y1, x2, y2)
1420
-
1421
- </a>
1422
- </h3>
1423
- <p>
1424
- Returns the <a href="Gosu.html#M000008">distance</a> between two points.
1425
- </p>
1426
-
1427
- <p class="source_link" id="M000008-show-link"><a href="#" onclick="toggle('M000008-source'); toggleText('M000008-link'); return false;" id="M000008-link">Show source...</a></p><div class="source" id="M000008-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 463</span>
1428
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">distance</span>(<span class="ruby-identifier">x1</span>, <span class="ruby-identifier">y1</span>, <span class="ruby-identifier">x2</span>, <span class="ruby-identifier">y2</span>); <span class="ruby-keyword kw">end</span></pre></div>
1429
- </div>
1430
-
1431
- <a class="small" name="M000009"><br/></a>
1432
- <div class="method_block"><h3>
1433
- <a href='#M000009'>
1434
-
1435
-
1436
- milliseconds
1437
-
1438
- ()
1439
-
1440
- </a>
1441
- </h3>
1442
- <p>
1443
- Incrementing, possibly wrapping millisecond timer.
1444
- </p>
1445
-
1446
- <p class="source_link" id="M000009-show-link"><a href="#" onclick="toggle('M000009-source'); toggleText('M000009-link'); return false;" id="M000009-link">Show source...</a></p><div class="source" id="M000009-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 466</span>
1447
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">milliseconds</span>(); <span class="ruby-keyword kw">end</span></pre></div>
1448
- </div>
1449
-
1450
- <a class="small" name="M000004"><br/></a>
1451
- <div class="method_block"><h3>
1452
- <a href='#M000004'>
1453
-
1454
-
1455
- offset_x
1456
-
1457
- (angle, dist)
1458
-
1459
- </a>
1460
- </h3>
1461
- <p>
1462
- Returns the horizontal <a href="Gosu.html#M000008">distance</a> between the
1463
- origin and the point to which you would get if you moved radius pixels in
1464
- the direction specified by <a href="Gosu.html#M000006">angle</a>.
1465
- </p>
1466
-
1467
- <p class="source_link" id="M000004-show-link"><a href="#" onclick="toggle('M000004-source'); toggleText('M000004-link'); return false;" id="M000004-link">Show source...</a></p><div class="source" id="M000004-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 451</span>
1468
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">offset_x</span>(<span class="ruby-identifier">angle</span>, <span class="ruby-identifier">dist</span>); <span class="ruby-keyword kw">end</span></pre></div>
1469
- </div>
1470
-
1471
- <a class="small" name="M000005"><br/></a>
1472
- <div class="method_block"><h3>
1473
- <a href='#M000005'>
1474
-
1475
-
1476
- offset_y
1477
-
1478
- (angle, dist)
1479
-
1480
- </a>
1481
- </h3>
1482
- <p>
1483
- Returns the vertical <a href="Gosu.html#M000008">distance</a> between the
1484
- origin and the point to which you would get if you moved radius pixels in
1485
- the direction specified by <a href="Gosu.html#M000006">angle</a>.
1486
- </p>
1487
-
1488
- <p class="source_link" id="M000005-show-link"><a href="#" onclick="toggle('M000005-source'); toggleText('M000005-link'); return false;" id="M000005-link">Show source...</a></p><div class="source" id="M000005-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 454</span>
1489
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">offset_y</span>(<span class="ruby-identifier">angle</span>, <span class="ruby-identifier">dist</span>); <span class="ruby-keyword kw">end</span></pre></div>
1490
- </div>
1491
-
1492
- <a class="small" name="M000003"><br/></a>
1493
- <div class="method_block"><h3>
1494
- <a href='#M000003'>
1495
-
1496
-
1497
- random
1498
-
1499
- (min, max)
1500
-
1501
- </a>
1502
- </h3>
1503
- <p>
1504
- Returns a <a href="Gosu.html#M000003">random</a> double between min
1505
- (inclusive) and max (exclusive).
1506
- </p>
1507
-
1508
- <p class="source_link" id="M000003-show-link"><a href="#" onclick="toggle('M000003-source'); toggleText('M000003-link'); return false;" id="M000003-link">Show source...</a></p><div class="source" id="M000003-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 448</span>
1509
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">random</span>(<span class="ruby-identifier">min</span>, <span class="ruby-identifier">max</span>); <span class="ruby-keyword kw">end</span></pre></div>
1510
- </div>
1511
-
1512
- <a class="small" name="M000012"><br/></a>
1513
- <div class="method_block"><h3>
1514
- <a href='#M000012'>
1515
-
1516
-
1517
- screen_height
1518
-
1519
- ()
1520
-
1521
- </a>
1522
- </h3>
1523
- <p>
1524
- Returns the height, in pixels, of the user&#8216;s primary screen.
1525
- </p>
1526
-
1527
- <p class="source_link" id="M000012-show-link"><a href="#" onclick="toggle('M000012-source'); toggleText('M000012-link'); return false;" id="M000012-link">Show source...</a></p><div class="source" id="M000012-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 476</span>
1528
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">screen_height</span>(); <span class="ruby-keyword kw">end</span></pre></div>
1529
- </div>
1530
-
1531
- <a class="small" name="M000011"><br/></a>
1532
- <div class="method_block"><h3>
1533
- <a href='#M000011'>
1534
-
1535
-
1536
- screen_width
1537
-
1538
- ()
1539
-
1540
- </a>
1541
- </h3>
1542
- <p>
1543
- Returns the width, in pixels, of the user&#8216;s primary screen.
1544
- </p>
1545
-
1546
- <p class="source_link" id="M000011-show-link"><a href="#" onclick="toggle('M000011-source'); toggleText('M000011-link'); return false;" id="M000011-link">Show source...</a></p><div class="source" id="M000011-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 473</span>
1547
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">screen_width</span>(); <span class="ruby-keyword kw">end</span></pre></div>
1548
- </div>
1549
-
1550
-
1551
-
1552
-
1553
-
1554
- </div><div class="clear" id="footer">Allison 2 &copy; 2007 <a href="http://cloudbur.st">Cloudburst, LLC</a><br/>slightly adapted for the Gosu project by Julian Raschke</div></div></body></html>