reflexion 0.1.2 → 0.1.3

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.
data/src/win32/window.cpp CHANGED
@@ -175,17 +175,17 @@ namespace Reflex
175
175
 
176
176
  case WM_MOVE:
177
177
  {
178
- coord l = 0, t = 0;
179
- win->get_bounds(&l, &t);
180
- win->moved(l, t);
178
+ coord x = 0, y = 0;
179
+ win->get_bounds(&x, &y);
180
+ win->moved(x, y);
181
181
  break;
182
182
  }
183
183
 
184
184
  case WM_SIZE:
185
185
  {
186
- coord l = 0, t = 0, r = 0, b = 0;
187
- win->get_bounds(&l, &t, &r, &b);
188
- win->resized(r - l, b - t);
186
+ coord w = 0, h = 0;
187
+ win->get_bounds(NULL, NULL, &w, &h);
188
+ win->resized(w, h);
189
189
  break;
190
190
  }
191
191
 
@@ -368,16 +368,6 @@ namespace Reflex
368
368
  return self->hidecount > 0;
369
369
  }
370
370
 
371
- void
372
- Window::update ()
373
- {
374
- }
375
-
376
- void
377
- Window::draw ()
378
- {
379
- }
380
-
381
371
  bool
382
372
  Window::redraw ()
383
373
  {
@@ -455,26 +445,10 @@ namespace Reflex
455
445
  flags | SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOOWNERZORDER);
456
446
  }
457
447
 
458
- void
459
- Window::moved (coord x, coord y)
460
- {
461
- }
462
-
463
- void
464
- Window::resized (coord width, coord height)
465
- {
466
- }
467
-
468
448
  Window::operator bool () const
469
449
  {
470
450
  return self && self->this_ && self->hwnd && IsWindow(self->hwnd);
471
451
  }
472
452
 
473
- bool
474
- Window::operator ! () const
475
- {
476
- return !operator bool();
477
- }
478
-
479
453
 
480
454
  }// Reflex
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: reflexion
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.2
5
+ version: 0.1.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - snori
@@ -10,10 +10,10 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-08-29 00:00:00 Z
13
+ date: 2011-09-19 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
- name: rucy
16
+ name: xot
17
17
  prerelease: false
18
18
  requirement: &id001 !ruby/object:Gem::Requirement
19
19
  none: false
@@ -24,7 +24,7 @@ dependencies:
24
24
  type: :runtime
25
25
  version_requirements: *id001
26
26
  - !ruby/object:Gem::Dependency
27
- name: rays
27
+ name: rucy
28
28
  prerelease: false
29
29
  requirement: &id002 !ruby/object:Gem::Requirement
30
30
  none: false
@@ -35,7 +35,7 @@ dependencies:
35
35
  type: :runtime
36
36
  version_requirements: *id002
37
37
  - !ruby/object:Gem::Dependency
38
- name: rake
38
+ name: rays
39
39
  prerelease: false
40
40
  requirement: &id003 !ruby/object:Gem::Requirement
41
41
  none: false
@@ -43,10 +43,10 @@ dependencies:
43
43
  - - ">="
44
44
  - !ruby/object:Gem::Version
45
45
  version: "0"
46
- type: :development
46
+ type: :runtime
47
47
  version_requirements: *id003
48
48
  - !ruby/object:Gem::Dependency
49
- name: gemcutter
49
+ name: rake
50
50
  prerelease: false
51
51
  requirement: &id004 !ruby/object:Gem::Requirement
52
52
  none: false
@@ -56,6 +56,17 @@ dependencies:
56
56
  version: "0"
57
57
  type: :development
58
58
  version_requirements: *id004
59
+ - !ruby/object:Gem::Dependency
60
+ name: gemcutter
61
+ prerelease: false
62
+ requirement: &id005 !ruby/object:Gem::Requirement
63
+ none: false
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: "0"
68
+ type: :development
69
+ version_requirements: *id005
59
70
  description: This library helps you to develop interactive graphical user interface.
60
71
  email: snori@xord.org
61
72
  executables: []
@@ -64,19 +75,20 @@ extensions:
64
75
  - Rakefile
65
76
  extra_rdoc_files:
66
77
  - README
78
+ - .doc/ext/reflex/application.cpp
79
+ - .doc/ext/reflex/key.cpp
80
+ - .doc/ext/reflex/native.cpp
81
+ - .doc/ext/reflex/points.cpp
82
+ - .doc/ext/reflex/reflex.cpp
83
+ - .doc/ext/reflex/window.cpp
67
84
  files:
68
- - ChangeLog
69
85
  - README
86
+ - ChangeLog
70
87
  - Rakefile
71
- - support.rb
72
88
  - reflex.gemspec
73
89
  - VERSION
74
- - task/ext.rake
75
- - task/gem.rake
76
- - task/git.rake
77
- - task/lib.rake
78
90
  - ext/reflex/extconf.rb
79
- - ext/reflex/reflex.h
91
+ - ext/reflex/defs.h
80
92
  - ext/reflex/application.cpp
81
93
  - ext/reflex/key.cpp
82
94
  - ext/reflex/native.cpp
@@ -85,6 +97,7 @@ files:
85
97
  - ext/reflex/window.cpp
86
98
  - include/reflex/application.h
87
99
  - include/reflex/defs.h
100
+ - include/reflex/exception.h
88
101
  - include/reflex/helpers.h
89
102
  - include/reflex/reflex.h
90
103
  - include/reflex/ruby/application.h
@@ -110,8 +123,12 @@ files:
110
123
  - src/cocoa/defs.h
111
124
  - src/cocoa/openglview.h
112
125
  - src/cocoa/windowdata.h
126
+ - src/win32/defs.h
113
127
  - src/win32/opengl.h
114
128
  - src/defs.cpp
129
+ - src/exception.cpp
130
+ - src/reflex.cpp
131
+ - src/win32/application.cpp
115
132
  - src/win32/defs.cpp
116
133
  - src/win32/opengl.cpp
117
134
  - src/win32/reflex.cpp
@@ -138,6 +155,12 @@ files:
138
155
  - test/test_point.rb
139
156
  - test/test_reflex.rb
140
157
  - test/test_window.rb
158
+ - .doc/ext/reflex/application.cpp
159
+ - .doc/ext/reflex/key.cpp
160
+ - .doc/ext/reflex/native.cpp
161
+ - .doc/ext/reflex/points.cpp
162
+ - .doc/ext/reflex/reflex.cpp
163
+ - .doc/ext/reflex/window.cpp
141
164
  homepage: http://github.com/xord/reflex
142
165
  licenses: []
143
166
 
data/support.rb DELETED
@@ -1,52 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- require 'erb'
3
- require 'pp'
4
-
5
-
6
- def glob (*patterns)
7
- paths = []
8
- patterns.each do |pattern|
9
- paths.concat Dir.glob(pattern)
10
- end
11
- paths
12
- end
13
-
14
- def erb (str)
15
- ERB.new(str, nil, "%").result binding
16
- end
17
-
18
- def compile (path, out)
19
- open(path) do |input|
20
- open(out, "w") do |output|
21
- output.write erb(input.read)
22
- end
23
- end
24
- #rescue
25
- end
26
-
27
- def convertions (paths, convs)
28
- raise "empty conversion." if convs.empty?
29
- paths = paths.map do |path|
30
- convpath = path
31
- convs.each do |from, to|
32
- convpath = convpath.sub(/#{from.gsub('.', '\.')}$/, to)
33
- end
34
- [path, convpath]
35
- end
36
- Hash[*paths.flatten]
37
- end
38
-
39
- alias sh_original sh
40
-
41
- def sh (*args)
42
- sh_original *args
43
- #rescue
44
- end
45
-
46
- def win32? ()
47
- RUBY_PLATFORM =~ /mswin|ming|cygwin/
48
- end
49
-
50
- def cocoa? ()
51
- RUBY_PLATFORM =~ /darwin/
52
- end
data/task/ext.rake DELETED
@@ -1,42 +0,0 @@
1
- # -*- mode: ruby; coding: utf-8 -*-
2
-
3
-
4
- require 'rucy/module'
5
- require 'rays/module'
6
-
7
-
8
- namespace :ext do
9
-
10
- dir = "#{EXTDIR}/#{NAME}"
11
- name = "#{NAME}/native"
12
- outname = "#{name}.#{EXTEXT}"
13
- out = File.join EXTDIR, outname
14
-
15
- extconf = File.join dir, "extconf.rb"
16
- makefile = File.join dir, "Makefile"
17
- depend = File.join dir, "depend"
18
-
19
- cpps = Dir.glob("#{dir}/**/*.cpp")
20
-
21
- task :build => makefile do
22
- sh %( cd #{dir} && #{MAKE} )
23
- end
24
-
25
- task :clean do
26
- sh %( cd #{dir} && #{MAKE} clean ) if File.exist? makefile
27
- sh %( rm -f #{makefile} #{depend} )
28
- end
29
-
30
- file makefile => [extconf, depend] do
31
- sh %( cd #{dir} && #{RUBY} #{File.basename extconf} )
32
- end
33
-
34
- file depend => ["lib:build"] + cpps do
35
- incdirs = INCDIRS + Rucy.include_dirs + Rays.include_dirs;
36
- incdirs = incdirs.map{|s| " -I#{s}"}.join
37
- srcs = cpps.map{|cpp| File.basename cpp}.join ' '
38
- dep = File.basename depend
39
- sh %( cd #{dir} && #{CC} -M #{CFLAGS} #{incdirs} #{srcs} > #{dep} )
40
- end
41
-
42
- end# :ext
data/task/gem.rake DELETED
@@ -1,33 +0,0 @@
1
- # -*- mode: ruby; coding: utf-8 -*-
2
-
3
-
4
- namespace :gem do
5
-
6
- name = "#{NAME}ion"
7
-
8
- gemspec = "#{NAME}.gemspec"
9
- gem = "#{name}-#{MODULE.version}.gem"
10
-
11
- task :build => gem
12
-
13
- task :install => gem do
14
- sh %( #{GEM} install #{gem} )
15
- end
16
-
17
- task :uninstall do
18
- sh %( #{GEM} uninstall #{name} )
19
- end
20
-
21
- task :clean do
22
- sh %( rm -f #{gem} )
23
- end
24
-
25
- task :upload => gem do
26
- sh %( #{GEM} push #{gem} )
27
- end
28
-
29
- file gem => "lib:build" do
30
- sh %( #{GEM} build #{gemspec} )
31
- end
32
-
33
- end# :gem
data/task/git.rake DELETED
@@ -1,22 +0,0 @@
1
- # -*- mode: ruby; coding: utf-8 -*-
2
-
3
-
4
- namespace :git do
5
-
6
- task :status do
7
- sh %( #{GIT} status )
8
- end
9
-
10
- task :diff do
11
- sh %( #{GIT} diff | cat )
12
- end
13
-
14
- task :push do
15
- sh %( #{GIT} push )
16
- end
17
-
18
- task :pull do
19
- sh %( #{GIT} pull )
20
- end
21
-
22
- end# :git
data/task/lib.rake DELETED
@@ -1,54 +0,0 @@
1
- # -*- mode: ruby; coding: utf-8 -*-
2
-
3
-
4
- require 'rake/loaders/makefile'
5
-
6
-
7
- namespace :lib do
8
-
9
- name = NAME
10
- outname = "lib#{name}.a"
11
- out = File.join LIBDIR, outname
12
-
13
- headers = glob("include/**/*.h")
14
- srcs = glob("src/**/*.cpp")
15
- srcs += glob("src/**/*.mm") if cocoa?
16
- srcs = srcs.reject {|s| s =~ %r(/win32/)} unless win32?
17
- srcs = srcs.reject {|s| s =~ %r(/cocoa/)} unless cocoa?
18
-
19
- depend = 'depend.mf'
20
- objs = convertions srcs, {".cpp" => ".o", ".mm" => ".o"}
21
- tmps = objs.values + [depend]
22
-
23
- cflags = CFLAGS.dup
24
- cflags << INCDIRS.map{|s| " -I#{s}"}.join
25
-
26
- task :build => out
27
-
28
- task :compile => objs.values
29
-
30
- task :clean do
31
- sh %( rm -rf #{tmps.join " "} #{out} )
32
- end
33
-
34
- file out => objs.values do
35
- sh %( #{AR} #{ARFLAGS} #{out} #{objs.values.join " "} )
36
- end
37
-
38
- file depend do
39
- sh %( #{CC} -M #{cflags} #{srcs.join ' '} > #{depend} )
40
- input = open(depend) {|f| f.read}
41
- open(depend, 'w') do |output|
42
- output << input.gsub(/\w+\.o/, SRCDIR + '/\0')
43
- end
44
- end
45
-
46
- import depend if File.exist? depend
47
-
48
- objs.each do |(src, obj)|
49
- file obj => [depend, src] do
50
- sh %( #{CC} -c #{cflags} -o #{obj} #{src} )
51
- end
52
- end
53
-
54
- end# :lib