win32console 1.0.8-i386-mswin32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. data/Console-i386-mswin32.def +2 -0
  2. data/Console.cpp +1203 -0
  3. data/Console.rdoc +690 -0
  4. data/Console_ANSI.rdoc +302 -0
  5. data/HISTORY.txt +7 -0
  6. data/INSTALL.txt +18 -0
  7. data/README.txt +26 -0
  8. data/Rakefile +38 -0
  9. data/doc/classes/Win32.html +115 -0
  10. data/doc/classes/Win32/Console.html +650 -0
  11. data/doc/classes/Win32/Console.src/M000001.html +31 -0
  12. data/doc/classes/Win32/Console.src/M000002.html +23 -0
  13. data/doc/classes/Win32/Console.src/M000003.html +23 -0
  14. data/doc/classes/Win32/Console.src/M000004.html +27 -0
  15. data/doc/classes/Win32/Console.src/M000005.html +23 -0
  16. data/doc/classes/Win32/Console.src/M000006.html +28 -0
  17. data/doc/classes/Win32/Console.src/M000007.html +23 -0
  18. data/doc/classes/Win32/Console.src/M000008.html +24 -0
  19. data/doc/classes/Win32/Console.src/M000009.html +44 -0
  20. data/doc/classes/Win32/Console.src/M000010.html +23 -0
  21. data/doc/classes/Win32/Console.src/M000011.html +33 -0
  22. data/doc/classes/Win32/Console.src/M000012.html +26 -0
  23. data/doc/classes/Win32/Console.src/M000013.html +27 -0
  24. data/doc/classes/Win32/Console.src/M000014.html +28 -0
  25. data/doc/classes/Win32/Console.src/M000015.html +23 -0
  26. data/doc/classes/Win32/Console.src/M000016.html +23 -0
  27. data/doc/classes/Win32/Console.src/M000017.html +23 -0
  28. data/doc/classes/Win32/Console.src/M000018.html +29 -0
  29. data/doc/classes/Win32/Console.src/M000019.html +23 -0
  30. data/doc/classes/Win32/Console.src/M000020.html +23 -0
  31. data/doc/classes/Win32/Console.src/M000021.html +28 -0
  32. data/doc/classes/Win32/Console.src/M000022.html +23 -0
  33. data/doc/classes/Win32/Console.src/M000023.html +28 -0
  34. data/doc/classes/Win32/Console.src/M000024.html +35 -0
  35. data/doc/classes/Win32/Console.src/M000025.html +28 -0
  36. data/doc/classes/Win32/Console.src/M000026.html +28 -0
  37. data/doc/classes/Win32/Console.src/M000027.html +28 -0
  38. data/doc/classes/Win32/Console.src/M000028.html +31 -0
  39. data/doc/classes/Win32/Console.src/M000029.html +23 -0
  40. data/doc/classes/Win32/Console.src/M000030.html +23 -0
  41. data/doc/classes/Win32/Console.src/M000031.html +23 -0
  42. data/doc/classes/Win32/Console.src/M000032.html +27 -0
  43. data/doc/classes/Win32/Console.src/M000033.html +27 -0
  44. data/doc/classes/Win32/Console.src/M000034.html +25 -0
  45. data/doc/classes/Win32/Console/ANSI.html +103 -0
  46. data/doc/classes/Win32/Console/ANSI/IO.html +220 -0
  47. data/doc/classes/Win32/Console/ANSI/IO.src/M000035.html +32 -0
  48. data/doc/classes/Win32/Console/ANSI/IO.src/M000036.html +205 -0
  49. data/doc/classes/Win32/Console/ANSI/IO.src/M000037.html +40 -0
  50. data/doc/classes/Win32/Console/ANSI/IO.src/M000038.html +25 -0
  51. data/doc/classes/Win32/Console/API.html +758 -0
  52. data/doc/classes/Win32/Console/API.src/M000039.html +27 -0
  53. data/doc/classes/Win32/Console/API.src/M000040.html +27 -0
  54. data/doc/classes/Win32/Console/API.src/M000041.html +27 -0
  55. data/doc/classes/Win32/Console/API.src/M000042.html +32 -0
  56. data/doc/classes/Win32/Console/API.src/M000043.html +32 -0
  57. data/doc/classes/Win32/Console/API.src/M000044.html +28 -0
  58. data/doc/classes/Win32/Console/API.src/M000045.html +26 -0
  59. data/doc/classes/Win32/Console/API.src/M000046.html +26 -0
  60. data/doc/classes/Win32/Console/API.src/M000047.html +27 -0
  61. data/doc/classes/Win32/Console/API.src/M000048.html +30 -0
  62. data/doc/classes/Win32/Console/API.src/M000049.html +29 -0
  63. data/doc/classes/Win32/Console/API.src/M000050.html +27 -0
  64. data/doc/classes/Win32/Console/API.src/M000051.html +28 -0
  65. data/doc/classes/Win32/Console/API.src/M000052.html +30 -0
  66. data/doc/classes/Win32/Console/API.src/M000053.html +27 -0
  67. data/doc/classes/Win32/Console/API.src/M000054.html +29 -0
  68. data/doc/classes/Win32/Console/API.src/M000055.html +29 -0
  69. data/doc/classes/Win32/Console/API.src/M000056.html +28 -0
  70. data/doc/classes/Win32/Console/API.src/M000057.html +27 -0
  71. data/doc/classes/Win32/Console/API.src/M000058.html +47 -0
  72. data/doc/classes/Win32/Console/API.src/M000059.html +32 -0
  73. data/doc/classes/Win32/Console/API.src/M000060.html +47 -0
  74. data/doc/classes/Win32/Console/API.src/M000061.html +34 -0
  75. data/doc/classes/Win32/Console/API.src/M000062.html +32 -0
  76. data/doc/classes/Win32/Console/API.src/M000063.html +32 -0
  77. data/doc/classes/Win32/Console/API.src/M000064.html +35 -0
  78. data/doc/classes/Win32/Console/API.src/M000065.html +26 -0
  79. data/doc/classes/Win32/Console/API.src/M000066.html +27 -0
  80. data/doc/classes/Win32/Console/API.src/M000067.html +29 -0
  81. data/doc/classes/Win32/Console/API.src/M000068.html +27 -0
  82. data/doc/classes/Win32/Console/API.src/M000069.html +27 -0
  83. data/doc/classes/Win32/Console/API.src/M000070.html +28 -0
  84. data/doc/classes/Win32/Console/API.src/M000071.html +27 -0
  85. data/doc/classes/Win32/Console/API.src/M000072.html +26 -0
  86. data/doc/classes/Win32/Console/API.src/M000073.html +27 -0
  87. data/doc/classes/Win32/Console/API.src/M000074.html +31 -0
  88. data/doc/classes/Win32/Console/API.src/M000075.html +27 -0
  89. data/doc/classes/Win32/Console/API.src/M000076.html +32 -0
  90. data/doc/classes/Win32/Console/API.src/M000077.html +27 -0
  91. data/doc/classes/Win32/Console/API.src/M000078.html +32 -0
  92. data/doc/classes/Win32/Console/API.src/M000079.html +32 -0
  93. data/doc/classes/Win32/Console/API.src/M000080.html +32 -0
  94. data/doc/classes/Win32/Console/Constants.html +360 -0
  95. data/doc/created.rid +1 -0
  96. data/doc/files/Console_ANSI_rdoc.html +407 -0
  97. data/doc/files/Console_cpp.html +104 -0
  98. data/doc/files/Console_rdoc.html +964 -0
  99. data/doc/files/lib/Win32/Console/ANSI_rb.html +123 -0
  100. data/doc/files/lib/Win32/Console_rb.html +297 -0
  101. data/doc/fr_class_index.html +32 -0
  102. data/doc/fr_file_index.html +31 -0
  103. data/doc/fr_method_index.html +106 -0
  104. data/doc/index.html +24 -0
  105. data/doc/rdoc-style.css +172 -0
  106. data/lib/Console.so +0 -0
  107. data/lib/README_GEM.txt +64 -0
  108. data/lib/Term/ansicolor.rb +76 -0
  109. data/lib/Win32/Console.rb +970 -0
  110. data/lib/Win32/Console/ANSI.rb +305 -0
  111. data/lib/win32console.rb +3 -0
  112. data/test/test_cursor.rb +9 -0
  113. data/test/test_mouse.rb +6 -0
  114. data/test/test_readinput.rb +62 -0
  115. data/test/test_readoutput.rb +52 -0
  116. data/test/test_sendevent.rb +17 -0
  117. data/test/test_title.rb +14 -0
  118. data/test/test_write.rb +36 -0
  119. metadata +180 -0
@@ -0,0 +1,31 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "DTD/xhtml1-transitional.dtd">
5
+
6
+ <!--
7
+
8
+ new (Win32::Console)
9
+
10
+ -->
11
+ <html>
12
+ <head>
13
+ <title>new (Win32::Console)</title>
14
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
15
+ <link rel="stylesheet" href="http://www.FaerieMUD.org/stylesheets/rdoc.css" type="text/css" />
16
+ </head>
17
+ <body>
18
+ <pre><span class="ruby-comment cmt"># File lib\Win32/Console.rb, line 616</span>
19
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>( <span class="ruby-identifier">t</span> = <span class="ruby-keyword kw">nil</span> )
20
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">t</span> <span class="ruby-keyword kw">and</span> ( <span class="ruby-identifier">t</span> <span class="ruby-operator">==</span> <span class="ruby-constant">STD_INPUT_HANDLE</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">t</span> <span class="ruby-operator">==</span> <span class="ruby-constant">STD_OUTPUT_HANDLE</span> <span class="ruby-keyword kw">or</span>
21
+ <span class="ruby-identifier">t</span> <span class="ruby-operator">==</span> <span class="ruby-constant">STD_ERROR_HANDLE</span> )
22
+ <span class="ruby-ivar">@handle</span> = <span class="ruby-constant">API</span>.<span class="ruby-constant">GetStdHandle</span>( <span class="ruby-identifier">t</span> )
23
+ <span class="ruby-keyword kw">else</span>
24
+ <span class="ruby-identifier">param1</span> = <span class="ruby-constant">GENERIC_READ</span> <span class="ruby-operator">|</span> <span class="ruby-constant">GENERIC_WRITE</span>
25
+ <span class="ruby-identifier">param2</span> = <span class="ruby-constant">FILE_SHARE_READ</span> <span class="ruby-operator">|</span> <span class="ruby-constant">FILE_SHARE_WRITE</span>
26
+ <span class="ruby-ivar">@handle</span> = <span class="ruby-constant">API</span>.<span class="ruby-constant">CreateConsoleScreenBuffer</span>( <span class="ruby-identifier">param1</span>, <span class="ruby-identifier">param2</span>,
27
+ <span class="ruby-constant">CONSOLE_TEXTMODE_BUFFER</span> )
28
+ <span class="ruby-keyword kw">end</span>
29
+ <span class="ruby-keyword kw">end</span></pre>
30
+ </body>
31
+ </html>
@@ -0,0 +1,23 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "DTD/xhtml1-transitional.dtd">
5
+
6
+ <!--
7
+
8
+ Display (Win32::Console)
9
+
10
+ -->
11
+ <html>
12
+ <head>
13
+ <title>Display (Win32::Console)</title>
14
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
15
+ <link rel="stylesheet" href="http://www.FaerieMUD.org/stylesheets/rdoc.css" type="text/css" />
16
+ </head>
17
+ <body>
18
+ <pre><span class="ruby-comment cmt"># File lib\Win32/Console.rb, line 629</span>
19
+ <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Display</span>
20
+ <span class="ruby-keyword kw">return</span> <span class="ruby-constant">API</span>.<span class="ruby-constant">SetConsoleActiveScreenBuffer</span>(<span class="ruby-ivar">@handle</span>)
21
+ <span class="ruby-keyword kw">end</span></pre>
22
+ </body>
23
+ </html>
@@ -0,0 +1,23 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "DTD/xhtml1-transitional.dtd">
5
+
6
+ <!--
7
+
8
+ Select (Win32::Console)
9
+
10
+ -->
11
+ <html>
12
+ <head>
13
+ <title>Select (Win32::Console)</title>
14
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
15
+ <link rel="stylesheet" href="http://www.FaerieMUD.org/stylesheets/rdoc.css" type="text/css" />
16
+ </head>
17
+ <body>
18
+ <pre><span class="ruby-comment cmt"># File lib\Win32/Console.rb, line 633</span>
19
+ <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Select</span>(<span class="ruby-identifier">type</span>)
20
+ <span class="ruby-keyword kw">return</span> <span class="ruby-constant">API</span>.<span class="ruby-constant">SetStdHandle</span>(<span class="ruby-identifier">type</span>,<span class="ruby-ivar">@handle</span>)
21
+ <span class="ruby-keyword kw">end</span></pre>
22
+ </body>
23
+ </html>
@@ -0,0 +1,27 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "DTD/xhtml1-transitional.dtd">
5
+
6
+ <!--
7
+
8
+ Title (Win32::Console)
9
+
10
+ -->
11
+ <html>
12
+ <head>
13
+ <title>Title (Win32::Console)</title>
14
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
15
+ <link rel="stylesheet" href="http://www.FaerieMUD.org/stylesheets/rdoc.css" type="text/css" />
16
+ </head>
17
+ <body>
18
+ <pre><span class="ruby-comment cmt"># File lib\Win32/Console.rb, line 637</span>
19
+ <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Title</span>(<span class="ruby-identifier">title</span> = <span class="ruby-keyword kw">nil</span>)
20
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">title</span>
21
+ <span class="ruby-keyword kw">return</span> <span class="ruby-constant">API</span>.<span class="ruby-constant">SetConsoleTitle</span>(<span class="ruby-identifier">title</span>)
22
+ <span class="ruby-keyword kw">else</span>
23
+ <span class="ruby-keyword kw">return</span> <span class="ruby-constant">API</span>.<span class="ruby-constant">GetConsoleTitle</span>()
24
+ <span class="ruby-keyword kw">end</span>
25
+ <span class="ruby-keyword kw">end</span></pre>
26
+ </body>
27
+ </html>
@@ -0,0 +1,23 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "DTD/xhtml1-transitional.dtd">
5
+
6
+ <!--
7
+
8
+ WriteChar (Win32::Console)
9
+
10
+ -->
11
+ <html>
12
+ <head>
13
+ <title>WriteChar (Win32::Console)</title>
14
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
15
+ <link rel="stylesheet" href="http://www.FaerieMUD.org/stylesheets/rdoc.css" type="text/css" />
16
+ </head>
17
+ <body>
18
+ <pre><span class="ruby-comment cmt"># File lib\Win32/Console.rb, line 645</span>
19
+ <span class="ruby-keyword kw">def</span> <span class="ruby-constant">WriteChar</span>(<span class="ruby-identifier">s</span>, <span class="ruby-identifier">col</span>, <span class="ruby-identifier">row</span>)
20
+ <span class="ruby-constant">API</span>.<span class="ruby-constant">WriteConsoleOutputCharacter</span>( <span class="ruby-ivar">@handle</span>, <span class="ruby-identifier">s</span>, <span class="ruby-identifier">col</span>, <span class="ruby-identifier">row</span> )
21
+ <span class="ruby-keyword kw">end</span></pre>
22
+ </body>
23
+ </html>
@@ -0,0 +1,28 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "DTD/xhtml1-transitional.dtd">
5
+
6
+ <!--
7
+
8
+ ReadChar (Win32::Console)
9
+
10
+ -->
11
+ <html>
12
+ <head>
13
+ <title>ReadChar (Win32::Console)</title>
14
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
15
+ <link rel="stylesheet" href="http://www.FaerieMUD.org/stylesheets/rdoc.css" type="text/css" />
16
+ </head>
17
+ <body>
18
+ <pre><span class="ruby-comment cmt"># File lib\Win32/Console.rb, line 649</span>
19
+ <span class="ruby-keyword kw">def</span> <span class="ruby-constant">ReadChar</span>(<span class="ruby-identifier">size</span>, <span class="ruby-identifier">col</span>, <span class="ruby-identifier">row</span>)
20
+ <span class="ruby-identifier">buffer</span> = <span class="ruby-value str">' '</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">size</span>
21
+ <span class="ruby-keyword kw">if</span> <span class="ruby-constant">API</span>.<span class="ruby-constant">ReadConsoleOutputCharacter</span>( <span class="ruby-ivar">@handle</span>, <span class="ruby-identifier">buffer</span>, <span class="ruby-identifier">size</span>, <span class="ruby-identifier">col</span>, <span class="ruby-identifier">row</span> )
22
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">buffer</span>
23
+ <span class="ruby-keyword kw">else</span>
24
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
25
+ <span class="ruby-keyword kw">end</span>
26
+ <span class="ruby-keyword kw">end</span></pre>
27
+ </body>
28
+ </html>
@@ -0,0 +1,23 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "DTD/xhtml1-transitional.dtd">
5
+
6
+ <!--
7
+
8
+ WriteAttr (Win32::Console)
9
+
10
+ -->
11
+ <html>
12
+ <head>
13
+ <title>WriteAttr (Win32::Console)</title>
14
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
15
+ <link rel="stylesheet" href="http://www.FaerieMUD.org/stylesheets/rdoc.css" type="text/css" />
16
+ </head>
17
+ <body>
18
+ <pre><span class="ruby-comment cmt"># File lib\Win32/Console.rb, line 658</span>
19
+ <span class="ruby-keyword kw">def</span> <span class="ruby-constant">WriteAttr</span>(<span class="ruby-identifier">attr</span>, <span class="ruby-identifier">col</span>, <span class="ruby-identifier">row</span>)
20
+ <span class="ruby-constant">API</span>.<span class="ruby-constant">WriteConsoleOutputAttribute</span>( <span class="ruby-ivar">@handle</span>, <span class="ruby-identifier">attr</span>, <span class="ruby-identifier">col</span>, <span class="ruby-identifier">row</span> )
21
+ <span class="ruby-keyword kw">end</span></pre>
22
+ </body>
23
+ </html>
@@ -0,0 +1,24 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "DTD/xhtml1-transitional.dtd">
5
+
6
+ <!--
7
+
8
+ ReadAttr (Win32::Console)
9
+
10
+ -->
11
+ <html>
12
+ <head>
13
+ <title>ReadAttr (Win32::Console)</title>
14
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
15
+ <link rel="stylesheet" href="http://www.FaerieMUD.org/stylesheets/rdoc.css" type="text/css" />
16
+ </head>
17
+ <body>
18
+ <pre><span class="ruby-comment cmt"># File lib\Win32/Console.rb, line 662</span>
19
+ <span class="ruby-keyword kw">def</span> <span class="ruby-constant">ReadAttr</span>(<span class="ruby-identifier">size</span>, <span class="ruby-identifier">col</span>, <span class="ruby-identifier">row</span>)
20
+ <span class="ruby-identifier">x</span> = <span class="ruby-constant">API</span>.<span class="ruby-constant">ReadConsoleOutputAttribute</span>( <span class="ruby-ivar">@handle</span>, <span class="ruby-identifier">size</span>, <span class="ruby-identifier">col</span>, <span class="ruby-identifier">row</span> )
21
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">unpack</span>(<span class="ruby-value str">'c'</span><span class="ruby-operator">*</span><span class="ruby-identifier">size</span>)
22
+ <span class="ruby-keyword kw">end</span></pre>
23
+ </body>
24
+ </html>
@@ -0,0 +1,44 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "DTD/xhtml1-transitional.dtd">
5
+
6
+ <!--
7
+
8
+ Cursor (Win32::Console)
9
+
10
+ -->
11
+ <html>
12
+ <head>
13
+ <title>Cursor (Win32::Console)</title>
14
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
15
+ <link rel="stylesheet" href="http://www.FaerieMUD.org/stylesheets/rdoc.css" type="text/css" />
16
+ </head>
17
+ <body>
18
+ <pre><span class="ruby-comment cmt"># File lib\Win32/Console.rb, line 668</span>
19
+ <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Cursor</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">t</span>)
20
+ <span class="ruby-identifier">col</span>, <span class="ruby-identifier">row</span>, <span class="ruby-identifier">size</span>, <span class="ruby-identifier">visi</span> = <span class="ruby-identifier">t</span>
21
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">col</span>
22
+ <span class="ruby-identifier">row</span> = <span class="ruby-value">-1</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">row</span>
23
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">col</span> <span class="ruby-operator">&lt;</span> <span class="ruby-value">0</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">row</span> <span class="ruby-operator">&lt;</span> <span class="ruby-value">0</span>
24
+ <span class="ruby-identifier">curr_col</span>, <span class="ruby-identifier">curr_row</span> = <span class="ruby-constant">API</span>.<span class="ruby-constant">GetConsoleScreenBufferInfo</span>(<span class="ruby-ivar">@handle</span>)
25
+ <span class="ruby-identifier">col</span> = <span class="ruby-identifier">curr_col</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">col</span> <span class="ruby-operator">&lt;</span> <span class="ruby-value">0</span>
26
+ <span class="ruby-identifier">row</span> = <span class="ruby-identifier">curr_row</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">row</span> <span class="ruby-operator">&lt;</span> <span class="ruby-value">0</span>
27
+ <span class="ruby-keyword kw">end</span>
28
+ <span class="ruby-constant">API</span>.<span class="ruby-constant">SetConsoleCursorPosition</span>( <span class="ruby-ivar">@handle</span>, <span class="ruby-identifier">col</span>, <span class="ruby-identifier">row</span> )
29
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">size</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">visi</span>
30
+ <span class="ruby-identifier">curr_size</span>, <span class="ruby-identifier">curr_visi</span> = <span class="ruby-constant">API</span>.<span class="ruby-constant">GetConsoleCursorInfo</span>( <span class="ruby-ivar">@handle</span> )
31
+ <span class="ruby-identifier">size</span> = <span class="ruby-identifier">curr_size</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">size</span> <span class="ruby-operator">&lt;</span> <span class="ruby-value">0</span>
32
+ <span class="ruby-identifier">visi</span> = <span class="ruby-identifier">curr_visi</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">visi</span> <span class="ruby-operator">&lt;</span> <span class="ruby-value">0</span>
33
+ <span class="ruby-identifier">size</span> = <span class="ruby-value">1</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">size</span> <span class="ruby-operator">&lt;</span> <span class="ruby-value">1</span>
34
+ <span class="ruby-identifier">size</span> = <span class="ruby-value">99</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">99</span>
35
+ <span class="ruby-constant">API</span>.<span class="ruby-constant">SetConsoleCursorInfo</span>( <span class="ruby-ivar">@handle</span>, <span class="ruby-identifier">size</span>, <span class="ruby-identifier">visi</span> )
36
+ <span class="ruby-keyword kw">end</span>
37
+ <span class="ruby-keyword kw">else</span>
38
+ <span class="ruby-identifier">d</span>, <span class="ruby-identifier">d</span>, <span class="ruby-identifier">curr_col</span>, <span class="ruby-identifier">curr_row</span> = <span class="ruby-constant">API</span>.<span class="ruby-constant">GetConsoleScreenBufferInfo</span>(<span class="ruby-ivar">@handle</span>)
39
+ <span class="ruby-identifier">curr_size</span>, <span class="ruby-identifier">curr_visi</span> = <span class="ruby-constant">API</span>.<span class="ruby-constant">GetConsoleCursorInfo</span>( <span class="ruby-ivar">@handle</span> )
40
+ <span class="ruby-keyword kw">return</span> [ <span class="ruby-identifier">curr_col</span>, <span class="ruby-identifier">curr_row</span>, <span class="ruby-identifier">curr_size</span>, <span class="ruby-identifier">curr_visi</span> ]
41
+ <span class="ruby-keyword kw">end</span>
42
+ <span class="ruby-keyword kw">end</span></pre>
43
+ </body>
44
+ </html>
@@ -0,0 +1,23 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "DTD/xhtml1-transitional.dtd">
5
+
6
+ <!--
7
+
8
+ Write (Win32::Console)
9
+
10
+ -->
11
+ <html>
12
+ <head>
13
+ <title>Write (Win32::Console)</title>
14
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
15
+ <link rel="stylesheet" href="http://www.FaerieMUD.org/stylesheets/rdoc.css" type="text/css" />
16
+ </head>
17
+ <body>
18
+ <pre><span class="ruby-comment cmt"># File lib\Win32/Console.rb, line 693</span>
19
+ <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Write</span>(<span class="ruby-identifier">s</span>)
20
+ <span class="ruby-constant">API</span>.<span class="ruby-constant">WriteConsole</span>( <span class="ruby-ivar">@handle</span>, <span class="ruby-identifier">s</span> )
21
+ <span class="ruby-keyword kw">end</span></pre>
22
+ </body>
23
+ </html>
@@ -0,0 +1,33 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "DTD/xhtml1-transitional.dtd">
5
+
6
+ <!--
7
+
8
+ ReadRect (Win32::Console)
9
+
10
+ -->
11
+ <html>
12
+ <head>
13
+ <title>ReadRect (Win32::Console)</title>
14
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
15
+ <link rel="stylesheet" href="http://www.FaerieMUD.org/stylesheets/rdoc.css" type="text/css" />
16
+ </head>
17
+ <body>
18
+ <pre><span class="ruby-comment cmt"># File lib\Win32/Console.rb, line 697</span>
19
+ <span class="ruby-keyword kw">def</span> <span class="ruby-constant">ReadRect</span>( <span class="ruby-identifier">left</span>, <span class="ruby-identifier">top</span>, <span class="ruby-identifier">right</span>, <span class="ruby-identifier">bottom</span> )
20
+ <span class="ruby-identifier">col</span> = <span class="ruby-identifier">right</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">left</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>
21
+ <span class="ruby-identifier">row</span> = <span class="ruby-identifier">bottom</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">top</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>
22
+ <span class="ruby-identifier">size</span> = <span class="ruby-identifier">col</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">row</span>
23
+ <span class="ruby-identifier">buffer</span> = <span class="ruby-value str">' '</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">size</span> <span class="ruby-operator">*</span> <span class="ruby-value">4</span>
24
+ <span class="ruby-keyword kw">if</span> <span class="ruby-constant">API</span>.<span class="ruby-constant">ReadConsoleOutput</span>( <span class="ruby-ivar">@handle</span>, <span class="ruby-identifier">buffer</span>, <span class="ruby-identifier">col</span>, <span class="ruby-identifier">row</span>, <span class="ruby-value">0</span>, <span class="ruby-value">0</span>,
25
+ <span class="ruby-identifier">left</span>, <span class="ruby-identifier">top</span>, <span class="ruby-identifier">right</span>, <span class="ruby-identifier">bottom</span> )
26
+ <span class="ruby-comment cmt">#return buffer.unpack('US'*size) # for unicode</span>
27
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">unpack</span>(<span class="ruby-value str">'axS'</span><span class="ruby-operator">*</span><span class="ruby-identifier">size</span>) <span class="ruby-comment cmt"># for ascii</span>
28
+ <span class="ruby-keyword kw">else</span>
29
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
30
+ <span class="ruby-keyword kw">end</span>
31
+ <span class="ruby-keyword kw">end</span></pre>
32
+ </body>
33
+ </html>
@@ -0,0 +1,26 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "DTD/xhtml1-transitional.dtd">
5
+
6
+ <!--
7
+
8
+ WriteRect (Win32::Console)
9
+
10
+ -->
11
+ <html>
12
+ <head>
13
+ <title>WriteRect (Win32::Console)</title>
14
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
15
+ <link rel="stylesheet" href="http://www.FaerieMUD.org/stylesheets/rdoc.css" type="text/css" />
16
+ </head>
17
+ <body>
18
+ <pre><span class="ruby-comment cmt"># File lib\Win32/Console.rb, line 711</span>
19
+ <span class="ruby-keyword kw">def</span> <span class="ruby-constant">WriteRect</span>( <span class="ruby-identifier">buffer</span>, <span class="ruby-identifier">left</span>, <span class="ruby-identifier">top</span>, <span class="ruby-identifier">right</span>, <span class="ruby-identifier">bottom</span> )
20
+ <span class="ruby-identifier">col</span> = <span class="ruby-identifier">right</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">left</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>
21
+ <span class="ruby-identifier">row</span> = <span class="ruby-identifier">bottom</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">top</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>
22
+ <span class="ruby-constant">API</span>.<span class="ruby-constant">WriteConsoleOutput</span>( <span class="ruby-ivar">@handle</span>, <span class="ruby-identifier">buffer</span>, <span class="ruby-identifier">col</span>, <span class="ruby-identifier">row</span>, <span class="ruby-value">0</span>, <span class="ruby-value">0</span>,
23
+ <span class="ruby-identifier">left</span>, <span class="ruby-identifier">top</span>, <span class="ruby-identifier">right</span>, <span class="ruby-identifier">bottom</span> )
24
+ <span class="ruby-keyword kw">end</span></pre>
25
+ </body>
26
+ </html>
@@ -0,0 +1,27 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "DTD/xhtml1-transitional.dtd">
5
+
6
+ <!--
7
+
8
+ Scroll (Win32::Console)
9
+
10
+ -->
11
+ <html>
12
+ <head>
13
+ <title>Scroll (Win32::Console)</title>
14
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
15
+ <link rel="stylesheet" href="http://www.FaerieMUD.org/stylesheets/rdoc.css" type="text/css" />
16
+ </head>
17
+ <body>
18
+ <pre><span class="ruby-comment cmt"># File lib\Win32/Console.rb, line 720</span>
19
+ <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Scroll</span>( <span class="ruby-identifier">left1</span>, <span class="ruby-identifier">top1</span>, <span class="ruby-identifier">right1</span>, <span class="ruby-identifier">bottom1</span>,
20
+ <span class="ruby-identifier">col</span>, <span class="ruby-identifier">row</span>, <span class="ruby-identifier">char</span>, <span class="ruby-identifier">attr</span>,
21
+ <span class="ruby-identifier">left2</span>, <span class="ruby-identifier">top2</span>, <span class="ruby-identifier">right2</span>, <span class="ruby-identifier">bottom2</span> )
22
+ <span class="ruby-constant">API</span>.<span class="ruby-constant">ScrollConsoleScreenBuffer</span>(<span class="ruby-ivar">@handle</span>, <span class="ruby-identifier">left1</span>, <span class="ruby-identifier">top1</span>, <span class="ruby-identifier">right1</span>, <span class="ruby-identifier">bottom1</span>,
23
+ <span class="ruby-identifier">col</span>, <span class="ruby-identifier">row</span>, <span class="ruby-identifier">char</span>, <span class="ruby-identifier">attr</span>,
24
+ <span class="ruby-identifier">left2</span>, <span class="ruby-identifier">top2</span>, <span class="ruby-identifier">right2</span>, <span class="ruby-identifier">bottom2</span>)
25
+ <span class="ruby-keyword kw">end</span></pre>
26
+ </body>
27
+ </html>
@@ -0,0 +1,28 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "DTD/xhtml1-transitional.dtd">
5
+
6
+ <!--
7
+
8
+ MaxWindow (Win32::Console)
9
+
10
+ -->
11
+ <html>
12
+ <head>
13
+ <title>MaxWindow (Win32::Console)</title>
14
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
15
+ <link rel="stylesheet" href="http://www.FaerieMUD.org/stylesheets/rdoc.css" type="text/css" />
16
+ </head>
17
+ <body>
18
+ <pre><span class="ruby-comment cmt"># File lib\Win32/Console.rb, line 729</span>
19
+ <span class="ruby-keyword kw">def</span> <span class="ruby-constant">MaxWindow</span>(<span class="ruby-identifier">flag</span> = <span class="ruby-keyword kw">nil</span>)
20
+ <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">flag</span>
21
+ <span class="ruby-identifier">info</span> = <span class="ruby-constant">API</span>.<span class="ruby-constant">GetConsoleScreenBufferInfo</span>(<span class="ruby-ivar">@handle</span>)
22
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">info</span>[<span class="ruby-value">9</span>], <span class="ruby-identifier">info</span>[<span class="ruby-value">10</span>]
23
+ <span class="ruby-keyword kw">else</span>
24
+ <span class="ruby-keyword kw">return</span> <span class="ruby-constant">API</span>.<span class="ruby-constant">GetLargestConsoleWindowSize</span>(<span class="ruby-ivar">@handle</span>)
25
+ <span class="ruby-keyword kw">end</span>
26
+ <span class="ruby-keyword kw">end</span></pre>
27
+ </body>
28
+ </html>
@@ -0,0 +1,23 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "DTD/xhtml1-transitional.dtd">
5
+
6
+ <!--
7
+
8
+ Info (Win32::Console)
9
+
10
+ -->
11
+ <html>
12
+ <head>
13
+ <title>Info (Win32::Console)</title>
14
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
15
+ <link rel="stylesheet" href="http://www.FaerieMUD.org/stylesheets/rdoc.css" type="text/css" />
16
+ </head>
17
+ <body>
18
+ <pre><span class="ruby-comment cmt"># File lib\Win32/Console.rb, line 739</span>
19
+ <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Info</span>()
20
+ <span class="ruby-keyword kw">return</span> <span class="ruby-constant">API</span>.<span class="ruby-constant">GetConsoleScreenBufferInfo</span>( <span class="ruby-ivar">@handle</span> )
21
+ <span class="ruby-keyword kw">end</span></pre>
22
+ </body>
23
+ </html>
@@ -0,0 +1,23 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "DTD/xhtml1-transitional.dtd">
5
+
6
+ <!--
7
+
8
+ GetEvents (Win32::Console)
9
+
10
+ -->
11
+ <html>
12
+ <head>
13
+ <title>GetEvents (Win32::Console)</title>
14
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
15
+ <link rel="stylesheet" href="http://www.FaerieMUD.org/stylesheets/rdoc.css" type="text/css" />
16
+ </head>
17
+ <body>
18
+ <pre><span class="ruby-comment cmt"># File lib\Win32/Console.rb, line 744</span>
19
+ <span class="ruby-keyword kw">def</span> <span class="ruby-constant">GetEvents</span>()
20
+ <span class="ruby-keyword kw">return</span> <span class="ruby-constant">API</span>.<span class="ruby-constant">GetNumberOfConsoleInputEvents</span>(<span class="ruby-ivar">@handle</span>)
21
+ <span class="ruby-keyword kw">end</span></pre>
22
+ </body>
23
+ </html>