rubydx 0.0.1alpha → 0.0.1alpha.1
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.
- checksums.yaml +8 -8
- data/Gemfile +4 -0
- data/Gemfile.lock +27 -0
- data/README.md +5 -0
- data/Rakefile +1 -0
- data/cpp/Makefile +2 -0
- data/docs/MessageBox.md +24 -0
- data/lib/rubydx/d3d/device.rb +6 -0
- data/lib/rubydx/version.rb +3 -0
- data/lib/rubydx/window.rb +6 -0
- data/lib/rubydx/windows_api/create_window.rb +8 -0
- data/lib/rubydx/windows_api/message_box.rb +19 -0
- data/lib/rubydx/windows_api/register_class_ex.rb +8 -0
- data/lib/rubydx/windows_api/structure/wndclassex.rb +8 -0
- data/lib/rubydx/windows_api.rb +18 -0
- data/lib/rubydx.rb +5 -0
- data/rubydx.gemspec +20 -0
- data/spec/rubydx/windows_api/message_box_spec.rb +14 -0
- metadata +64 -4
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NzViMzhhZGM1YTYyMmZiOWJmZTNlOTg4MmYxZjZiMjY5NDUzZDA5OA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZDk0ZjY0YWNiOTg2YmRmYjI1MTBhYzFjMmYwZWVmMDViNGM0ZjNiYw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZDEzMjg5N2FhOWJkODg2MzU2NDBiMGNiZTE3ZTQzN2MzZjE0ODUyYThlZGU0
|
10
|
+
MWY2ZTI2YmU5ZmZkZmE3OTY1OGE2ZjdjZThmOTYxYTNlNzU5MzcyZDZjODRk
|
11
|
+
NmYzZTM3MzJhMjdhNjQxZjc4ODkxODdlM2IzOTY5Mzg4NDgyYzU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MjQ1NTJmY2ZlMTg1ODI1ZjdkZmRmYTQwODU2YzU2MjU1ZTZkYWY4MjhjYTA2
|
14
|
+
ZGM0NDFhNGJiYzVlZDhiZDk1Y2FhOTc0MjdiYjkzZDY0MmJiYjEwNjE2ZmRi
|
15
|
+
YzNlYTQxZWVkYjY0YzQwNTUzYjBjMmM3OTNhOGZjZjlmOTljZGU=
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
rubydx (0.0.1alpha.1)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
diff-lcs (1.2.5)
|
10
|
+
rake (10.0.4)
|
11
|
+
rspec (2.14.1)
|
12
|
+
rspec-core (~> 2.14.0)
|
13
|
+
rspec-expectations (~> 2.14.0)
|
14
|
+
rspec-mocks (~> 2.14.0)
|
15
|
+
rspec-core (2.14.8)
|
16
|
+
rspec-expectations (2.14.5)
|
17
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
18
|
+
rspec-mocks (2.14.6)
|
19
|
+
|
20
|
+
PLATFORMS
|
21
|
+
x86-mingw32
|
22
|
+
|
23
|
+
DEPENDENCIES
|
24
|
+
bundler (~> 1.3)
|
25
|
+
rake
|
26
|
+
rspec
|
27
|
+
rubydx!
|
data/README.md
ADDED
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/cpp/Makefile
ADDED
data/docs/MessageBox.md
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
MessageBox
|
2
|
+
====
|
3
|
+
|
4
|
+
Call for
|
5
|
+
|
6
|
+
```ruby
|
7
|
+
def message_box(text, caption = nil, window = nil, style = 0)
|
8
|
+
```
|
9
|
+
|
10
|
+
Exapmple Uses:
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
Rubydx::WindowsApi.message_box "Hi"
|
14
|
+
```
|
15
|
+
|
16
|
+
more Example
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
Rubydx::WindowsApi.message_box("This is Test Message!!", "Nice caption?", nil, 0x40)
|
20
|
+
```
|
21
|
+
|
22
|
+
More API Details.
|
23
|
+
|
24
|
+
* http://msdn.microsoft.com/en-us/library/windows/desktop/ms645505(v=vs.85).aspx
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Rubydx
|
2
|
+
class WindowsApi
|
3
|
+
module MessageBox
|
4
|
+
|
5
|
+
def message_box(text, caption = nil, window = nil, style = 0)
|
6
|
+
hwnd = ( window ? window.handle : 0 )
|
7
|
+
|
8
|
+
func = Win32API.new(LIB, FUNCNAME, PARAMS, RET)
|
9
|
+
func.call(hwnd, text, caption, style)
|
10
|
+
end
|
11
|
+
|
12
|
+
private
|
13
|
+
LIB = "user32"
|
14
|
+
FUNCNAME = "MessageBox"
|
15
|
+
PARAMS = %w(p p p i)
|
16
|
+
RET = "i"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'Win32API'
|
2
|
+
|
3
|
+
module Rubydx
|
4
|
+
class WindowsApi
|
5
|
+
end
|
6
|
+
end
|
7
|
+
|
8
|
+
require 'rubydx/windows_api/create_window'
|
9
|
+
require 'rubydx/windows_api/message_box'
|
10
|
+
require 'rubydx/windows_api/register_class_ex'
|
11
|
+
|
12
|
+
module Rubydx
|
13
|
+
class WindowsApi
|
14
|
+
extend CreateWindow
|
15
|
+
extend MessageBox
|
16
|
+
extend RegisterClassEx
|
17
|
+
end
|
18
|
+
end
|
data/lib/rubydx.rb
ADDED
data/rubydx.gemspec
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
$:.push File.expand_path("../lib", __FILE__)
|
2
|
+
require "rubydx/version"
|
3
|
+
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.name = "rubydx"
|
6
|
+
s.version = Rubydx::VERSION
|
7
|
+
s.description = %q{Ruby for Game(Win32/DirectX) Developing.!}
|
8
|
+
s.summary = %q{Ruby for Game(Win32/DirectX) Developing.!}
|
9
|
+
s.homepage = "https://github.com/myun2/ruby-game-win"
|
10
|
+
s.authors = ['myun2']
|
11
|
+
|
12
|
+
s.files = `git ls-files`.split($/)
|
13
|
+
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
14
|
+
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
15
|
+
s.require_paths = ["lib"]
|
16
|
+
|
17
|
+
s.add_development_dependency "bundler", "~> 1.3"
|
18
|
+
s.add_development_dependency "rake"
|
19
|
+
s.add_development_dependency "rspec"
|
20
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubydx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.1alpha
|
4
|
+
version: 0.0.1alpha.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- myun2
|
@@ -9,13 +9,72 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
date: 2014-04-26 00:00:00.000000000 Z
|
12
|
-
dependencies:
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.3'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ! '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
13
55
|
description: Ruby for Game(Win32/DirectX) Developing.!
|
14
56
|
email:
|
15
57
|
executables: []
|
16
58
|
extensions: []
|
17
59
|
extra_rdoc_files: []
|
18
|
-
files:
|
60
|
+
files:
|
61
|
+
- Gemfile
|
62
|
+
- Gemfile.lock
|
63
|
+
- README.md
|
64
|
+
- Rakefile
|
65
|
+
- cpp/Makefile
|
66
|
+
- docs/MessageBox.md
|
67
|
+
- lib/rubydx.rb
|
68
|
+
- lib/rubydx/d3d/device.rb
|
69
|
+
- lib/rubydx/version.rb
|
70
|
+
- lib/rubydx/window.rb
|
71
|
+
- lib/rubydx/windows_api.rb
|
72
|
+
- lib/rubydx/windows_api/create_window.rb
|
73
|
+
- lib/rubydx/windows_api/message_box.rb
|
74
|
+
- lib/rubydx/windows_api/register_class_ex.rb
|
75
|
+
- lib/rubydx/windows_api/structure/wndclassex.rb
|
76
|
+
- rubydx.gemspec
|
77
|
+
- spec/rubydx/windows_api/message_box_spec.rb
|
19
78
|
homepage: https://github.com/myun2/ruby-game-win
|
20
79
|
licenses: []
|
21
80
|
metadata: {}
|
@@ -39,4 +98,5 @@ rubygems_version: 2.0.3
|
|
39
98
|
signing_key:
|
40
99
|
specification_version: 4
|
41
100
|
summary: Ruby for Game(Win32/DirectX) Developing.!
|
42
|
-
test_files:
|
101
|
+
test_files:
|
102
|
+
- spec/rubydx/windows_api/message_box_spec.rb
|