reflexion 0.1.32 → 0.1.33
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 +4 -4
- data/.doc/ext/reflex/shape.cpp +5 -31
- data/.doc/ext/reflex/view.cpp +8 -34
- data/.github/workflows/release-gem.yml +4 -1
- data/ChangeLog.md +7 -0
- data/Rakefile +5 -5
- data/VERSION +1 -1
- data/ext/reflex/extconf.rb +0 -1
- data/ext/reflex/shape.cpp +6 -35
- data/ext/reflex/view.cpp +15 -44
- data/include/reflex/ruby/application.h +3 -3
- data/include/reflex/ruby/event.h +27 -27
- data/include/reflex/ruby/filter.h +3 -3
- data/include/reflex/ruby/image_view.h +3 -3
- data/include/reflex/ruby/pointer.h +3 -3
- data/include/reflex/ruby/selector.h +3 -3
- data/include/reflex/ruby/shape.h +20 -11
- data/include/reflex/ruby/style.h +5 -5
- data/include/reflex/ruby/timer.h +3 -3
- data/include/reflex/ruby/view.h +12 -3
- data/include/reflex/ruby/window.h +3 -3
- data/include/reflex/shape.h +5 -11
- data/include/reflex/view.h +5 -11
- data/lib/reflex/fixture.rb +1 -2
- data/lib/reflex/shape.rb +2 -2
- data/lib/reflex/view.rb +1 -28
- data/reflex.gemspec +4 -4
- data/samples/reflexion/breakout.rb +1 -1
- data/src/body.cpp +2 -2
- data/src/fixture.cpp +8 -62
- data/src/fixture.h +0 -8
- data/src/shape.cpp +45 -60
- data/src/view.cpp +6 -34
- data/src/world.cpp +41 -10
- data/src/world.h +9 -7
- data/test/helper.rb +2 -1
- data/test/{test_reflex.rb → test_reflex_init.rb} +3 -3
- data/test/test_shape.rb +0 -22
- data/test/test_view.rb +0 -12
- metadata +13 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6719c2a7257d31b194a2a60d66df3e650a9dd459f8e30ce6ffb2e918b9a910a4
|
4
|
+
data.tar.gz: 2bdbaf02fe6edfb2c2bdca7bf66b8973f8fb972ddc4e22415afdf8980168f0ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65a6906a681fadbc037b8e7b354eed8308aed9d63a4c7d34eb02bd5f0a670b6b34bf197e3d5e1efabf9e9540e691a01e7079a9a040b3bbfbcea7ec4bfa706945
|
7
|
+
data.tar.gz: 1bb8b01012aab97efeb8d3196f6d9362fbc31be5f1bc2db9f790ed31de8813ebca0f1d8923e527eabe7f5ada0e404b688382d96909fb649880f532db4049bfd7
|
data/.doc/ext/reflex/shape.cpp
CHANGED
@@ -106,40 +106,17 @@ VALUE is_sensor(VALUE self)
|
|
106
106
|
}
|
107
107
|
|
108
108
|
static
|
109
|
-
VALUE
|
110
|
-
{
|
111
|
-
CHECK;
|
112
|
-
THIS->set_category_bits(to<uint>(bits));
|
113
|
-
return bits;
|
114
|
-
}
|
115
|
-
|
116
|
-
static
|
117
|
-
VALUE get_category_bits(VALUE self)
|
118
|
-
{
|
119
|
-
CHECK;
|
120
|
-
return value(THIS->category_bits());
|
121
|
-
}
|
122
|
-
|
123
|
-
static
|
124
|
-
VALUE set_collision_mask(VALUE self, VALUE mask)
|
125
|
-
{
|
126
|
-
CHECK;
|
127
|
-
THIS->set_collision_mask(to<uint>(mask));
|
128
|
-
return mask;
|
129
|
-
}
|
130
|
-
|
131
|
-
static
|
132
|
-
VALUE get_collision_mask(VALUE self)
|
109
|
+
VALUE on_draw(VALUE self, VALUE event)
|
133
110
|
{
|
134
111
|
CHECK;
|
135
|
-
|
112
|
+
CALL(on_draw(to<Reflex::DrawEvent*>(event)));
|
136
113
|
}
|
137
114
|
|
138
115
|
static
|
139
|
-
VALUE
|
116
|
+
VALUE will_contact(VALUE self, VALUE shape)
|
140
117
|
{
|
141
118
|
CHECK;
|
142
|
-
CALL(
|
119
|
+
return value(CALL(will_contact(to<Reflex::Shape*>(shape))));
|
143
120
|
}
|
144
121
|
|
145
122
|
static
|
@@ -184,11 +161,8 @@ Init_reflex_shape ()
|
|
184
161
|
rb_define_method(cShape, "restitution", RUBY_METHOD_FUNC(get_restitution), 0);
|
185
162
|
rb_define_method(cShape, "sensor=", RUBY_METHOD_FUNC(set_sensor), 1);
|
186
163
|
rb_define_method(cShape, "sensor", RUBY_METHOD_FUNC(is_sensor), 0);
|
187
|
-
rb_define_method(cShape, "category_bits=", RUBY_METHOD_FUNC(set_category_bits), 1);
|
188
|
-
rb_define_method(cShape, "category_bits", RUBY_METHOD_FUNC(get_category_bits), 0);
|
189
|
-
rb_define_method(cShape, "collision_mask=", RUBY_METHOD_FUNC(set_collision_mask), 1);
|
190
|
-
rb_define_method(cShape, "collision_mask", RUBY_METHOD_FUNC(get_collision_mask), 0);
|
191
164
|
rb_define_method(cShape, "on_draw", RUBY_METHOD_FUNC(on_draw), 1);
|
165
|
+
cShape.define_method( "will_contact?", will_contact);
|
192
166
|
cShape.define_private_method("call_contact!", on_contact);
|
193
167
|
cShape.define_private_method("call_contact_begin!", on_contact_begin);
|
194
168
|
cShape.define_private_method("call_contact_end!", on_contact_end);
|
data/.doc/ext/reflex/view.cpp
CHANGED
@@ -696,36 +696,6 @@ VALUE is_sensor(VALUE self)
|
|
696
696
|
return value(THIS->is_sensor());
|
697
697
|
}
|
698
698
|
|
699
|
-
static
|
700
|
-
VALUE set_category_bits(VALUE self, VALUE bits)
|
701
|
-
{
|
702
|
-
CHECK;
|
703
|
-
THIS->set_category_bits(to<uint>(bits));
|
704
|
-
return bits;
|
705
|
-
}
|
706
|
-
|
707
|
-
static
|
708
|
-
VALUE get_category_bits(VALUE self)
|
709
|
-
{
|
710
|
-
CHECK;
|
711
|
-
return value(THIS->category_bits());
|
712
|
-
}
|
713
|
-
|
714
|
-
static
|
715
|
-
VALUE set_collision_mask(VALUE self, VALUE mask)
|
716
|
-
{
|
717
|
-
CHECK;
|
718
|
-
THIS->set_collision_mask(to<uint>(mask));
|
719
|
-
return mask;
|
720
|
-
}
|
721
|
-
|
722
|
-
static
|
723
|
-
VALUE get_collision_mask(VALUE self)
|
724
|
-
{
|
725
|
-
CHECK;
|
726
|
-
return value(THIS->collision_mask());
|
727
|
-
}
|
728
|
-
|
729
699
|
static
|
730
700
|
VALUE set_linear_velocity(VALUE self)
|
731
701
|
{
|
@@ -999,6 +969,13 @@ VALUE on_timer(VALUE self, VALUE event)
|
|
999
969
|
CALL(on_timer(to<Reflex::TimerEvent*>(event)));
|
1000
970
|
}
|
1001
971
|
|
972
|
+
static
|
973
|
+
VALUE will_contact(VALUE self, VALUE view)
|
974
|
+
{
|
975
|
+
CHECK;
|
976
|
+
return value(CALL(will_contact(to<Reflex::View*>(view))));
|
977
|
+
}
|
978
|
+
|
1002
979
|
static
|
1003
980
|
VALUE on_contact(VALUE self, VALUE event)
|
1004
981
|
{
|
@@ -1110,10 +1087,6 @@ Init_reflex_view ()
|
|
1110
1087
|
rb_define_method(cView, "restitution", RUBY_METHOD_FUNC(get_restitution), 0);
|
1111
1088
|
rb_define_method(cView, "sensor=", RUBY_METHOD_FUNC(set_sensor), 1);
|
1112
1089
|
cView.define_method("sensor?", is_sensor);
|
1113
|
-
rb_define_private_method(cView, "set_category_bits", RUBY_METHOD_FUNC(set_category_bits), 1);
|
1114
|
-
rb_define_private_method(cView, "get_category_bits", RUBY_METHOD_FUNC(get_category_bits), 0);
|
1115
|
-
rb_define_private_method(cView, "set_collision_mask", RUBY_METHOD_FUNC(set_collision_mask), 1);
|
1116
|
-
rb_define_private_method(cView, "get_collision_mask", RUBY_METHOD_FUNC(get_collision_mask), 0);
|
1117
1090
|
rb_define_method(cView, "linear_velocity=", RUBY_METHOD_FUNC(set_linear_velocity), -1);
|
1118
1091
|
rb_define_method(cView, "linear_velocity", RUBY_METHOD_FUNC(get_linear_velocity), 0);
|
1119
1092
|
rb_define_method(cView, "angular_velocity=", RUBY_METHOD_FUNC(set_angular_velocity), 1);
|
@@ -1153,6 +1126,7 @@ Init_reflex_view ()
|
|
1153
1126
|
rb_define_method(cView, "on_wheel", RUBY_METHOD_FUNC(on_wheel), 1);
|
1154
1127
|
rb_define_method(cView, "on_capture", RUBY_METHOD_FUNC(on_capture), 1);
|
1155
1128
|
rb_define_method(cView, "on_timer", RUBY_METHOD_FUNC(on_timer), 1);
|
1129
|
+
cView.define_method( "will_contact?", will_contact);
|
1156
1130
|
cView.define_private_method("call_contact!", on_contact);
|
1157
1131
|
cView.define_private_method("call_contact_begin!", on_contact_begin);
|
1158
1132
|
cView.define_private_method("call_contact_end!", on_contact_end);
|
@@ -20,8 +20,11 @@ jobs:
|
|
20
20
|
- name: setup dependencies
|
21
21
|
run: "ruby -I.github/workflows -rutils -e 'setup_dependencies'"
|
22
22
|
|
23
|
+
- name: install gems
|
24
|
+
run: gem install yard
|
25
|
+
|
23
26
|
- name: test
|
24
|
-
run: rake test
|
27
|
+
run: rake quiet test
|
25
28
|
|
26
29
|
- name: create gem
|
27
30
|
id: gem
|
data/ChangeLog.md
CHANGED
data/Rakefile
CHANGED
@@ -15,12 +15,12 @@ require 'reflex/extension'
|
|
15
15
|
|
16
16
|
EXTENSIONS = [Xot, Rucy, Rays, Reflex]
|
17
17
|
GEMNAME = 'reflexion'
|
18
|
-
TESTS_ALONE = ['test/
|
18
|
+
TESTS_ALONE = ['test/test_reflex_init.rb']
|
19
19
|
|
20
|
-
use_external_library 'https://github.com/erincatto/
|
21
|
-
tag: 'v2.
|
22
|
-
|
23
|
-
|
20
|
+
use_external_library 'https://github.com/erincatto/box2d',
|
21
|
+
tag: 'v2.4.1',
|
22
|
+
incdirs: %w[include src],
|
23
|
+
srcdirs: 'src'
|
24
24
|
|
25
25
|
default_tasks :ext
|
26
26
|
build_native_library
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.33
|
data/ext/reflex/extconf.rb
CHANGED
@@ -16,7 +16,6 @@ require 'reflex/extension'
|
|
16
16
|
Xot::ExtConf.new Xot, Rucy, Rays, Reflex do
|
17
17
|
setup do
|
18
18
|
headers << 'ruby.h'
|
19
|
-
local_libs << 'rucy'
|
20
19
|
libs.unshift 'gdi21', 'opengl32' if win32?
|
21
20
|
frameworks << 'Cocoa' if osx?
|
22
21
|
$LDFLAGS << ' -Wl,--out-implib=native.dll.a' if cygwin?
|
data/ext/reflex/shape.cpp
CHANGED
@@ -118,44 +118,18 @@ RUCY_DEF0(is_sensor)
|
|
118
118
|
RUCY_END
|
119
119
|
|
120
120
|
static
|
121
|
-
RUCY_DEF1(
|
122
|
-
{
|
123
|
-
CHECK;
|
124
|
-
THIS->set_category_bits(to<uint>(bits));
|
125
|
-
return bits;
|
126
|
-
}
|
127
|
-
RUCY_END
|
128
|
-
|
129
|
-
static
|
130
|
-
RUCY_DEF0(get_category_bits)
|
131
|
-
{
|
132
|
-
CHECK;
|
133
|
-
return value(THIS->category_bits());
|
134
|
-
}
|
135
|
-
RUCY_END
|
136
|
-
|
137
|
-
static
|
138
|
-
RUCY_DEF1(set_collision_mask, mask)
|
139
|
-
{
|
140
|
-
CHECK;
|
141
|
-
THIS->set_collision_mask(to<uint>(mask));
|
142
|
-
return mask;
|
143
|
-
}
|
144
|
-
RUCY_END
|
145
|
-
|
146
|
-
static
|
147
|
-
RUCY_DEF0(get_collision_mask)
|
121
|
+
RUCY_DEF1(on_draw, event)
|
148
122
|
{
|
149
123
|
CHECK;
|
150
|
-
|
124
|
+
CALL(on_draw(to<Reflex::DrawEvent*>(event)));
|
151
125
|
}
|
152
126
|
RUCY_END
|
153
127
|
|
154
128
|
static
|
155
|
-
RUCY_DEF1(
|
129
|
+
RUCY_DEF1(will_contact, shape)
|
156
130
|
{
|
157
131
|
CHECK;
|
158
|
-
CALL(
|
132
|
+
return value(CALL(will_contact(to<Reflex::Shape*>(shape))));
|
159
133
|
}
|
160
134
|
RUCY_END
|
161
135
|
|
@@ -204,11 +178,8 @@ Init_reflex_shape ()
|
|
204
178
|
cShape.define_method("restitution", get_restitution);
|
205
179
|
cShape.define_method("sensor=", set_sensor);
|
206
180
|
cShape.define_method("sensor", is_sensor);
|
207
|
-
cShape.define_method("
|
208
|
-
cShape.define_method("
|
209
|
-
cShape.define_method("collision_mask=", set_collision_mask);
|
210
|
-
cShape.define_method("collision_mask", get_collision_mask);
|
211
|
-
cShape.define_method("on_draw", on_draw);
|
181
|
+
cShape.define_method("on_draw", on_draw);
|
182
|
+
cShape.define_method( "will_contact?", will_contact);
|
212
183
|
cShape.define_private_method("call_contact!", on_contact);
|
213
184
|
cShape.define_private_method("call_contact_begin!", on_contact_begin);
|
214
185
|
cShape.define_private_method("call_contact_end!", on_contact_end);
|
data/ext/reflex/view.cpp
CHANGED
@@ -770,40 +770,6 @@ RUCY_DEF0(is_sensor)
|
|
770
770
|
}
|
771
771
|
RUCY_END
|
772
772
|
|
773
|
-
static
|
774
|
-
RUCY_DEF1(set_category_bits, bits)
|
775
|
-
{
|
776
|
-
CHECK;
|
777
|
-
THIS->set_category_bits(to<uint>(bits));
|
778
|
-
return bits;
|
779
|
-
}
|
780
|
-
RUCY_END
|
781
|
-
|
782
|
-
static
|
783
|
-
RUCY_DEF0(get_category_bits)
|
784
|
-
{
|
785
|
-
CHECK;
|
786
|
-
return value(THIS->category_bits());
|
787
|
-
}
|
788
|
-
RUCY_END
|
789
|
-
|
790
|
-
static
|
791
|
-
RUCY_DEF1(set_collision_mask, mask)
|
792
|
-
{
|
793
|
-
CHECK;
|
794
|
-
THIS->set_collision_mask(to<uint>(mask));
|
795
|
-
return mask;
|
796
|
-
}
|
797
|
-
RUCY_END
|
798
|
-
|
799
|
-
static
|
800
|
-
RUCY_DEF0(get_collision_mask)
|
801
|
-
{
|
802
|
-
CHECK;
|
803
|
-
return value(THIS->collision_mask());
|
804
|
-
}
|
805
|
-
RUCY_END
|
806
|
-
|
807
773
|
static
|
808
774
|
RUCY_DEFN(set_linear_velocity)
|
809
775
|
{
|
@@ -1114,6 +1080,14 @@ RUCY_DEF1(on_timer, event)
|
|
1114
1080
|
}
|
1115
1081
|
RUCY_END
|
1116
1082
|
|
1083
|
+
static
|
1084
|
+
RUCY_DEF1(will_contact, view)
|
1085
|
+
{
|
1086
|
+
CHECK;
|
1087
|
+
return value(CALL(will_contact(to<Reflex::View*>(view))));
|
1088
|
+
}
|
1089
|
+
RUCY_END
|
1090
|
+
|
1117
1091
|
static
|
1118
1092
|
RUCY_DEF1(on_contact, event)
|
1119
1093
|
{
|
@@ -1228,10 +1202,6 @@ Init_reflex_view ()
|
|
1228
1202
|
cView.define_method("restitution", get_restitution);
|
1229
1203
|
cView.define_method("sensor=", set_sensor);
|
1230
1204
|
cView.define_method("sensor?", is_sensor);
|
1231
|
-
cView.define_private_method("set_category_bits", set_category_bits);
|
1232
|
-
cView.define_private_method("get_category_bits", get_category_bits);
|
1233
|
-
cView.define_private_method("set_collision_mask", set_collision_mask);
|
1234
|
-
cView.define_private_method("get_collision_mask", get_collision_mask);
|
1235
1205
|
cView.define_method("linear_velocity=", set_linear_velocity);
|
1236
1206
|
cView.define_method("linear_velocity", get_linear_velocity);
|
1237
1207
|
cView.define_method("angular_velocity=", set_angular_velocity);
|
@@ -1251,26 +1221,27 @@ Init_reflex_view ()
|
|
1251
1221
|
|
1252
1222
|
cView.define_method("on_attach", on_attach);
|
1253
1223
|
cView.define_method("on_detach", on_detach);
|
1254
|
-
cView.define_method("on_show",
|
1255
|
-
cView.define_method("on_hide",
|
1224
|
+
cView.define_method("on_show", on_show);
|
1225
|
+
cView.define_method("on_hide", on_hide);
|
1256
1226
|
cView.define_method("on_update", on_update);
|
1257
1227
|
cView.define_method("on_draw", on_draw);
|
1258
1228
|
cView.define_method("on_move", on_move);
|
1259
1229
|
cView.define_method("on_resize", on_resize);
|
1260
1230
|
cView.define_method("on_rotate", on_rotate);
|
1261
1231
|
cView.define_method("on_scroll", on_scroll);
|
1262
|
-
cView.define_method("on_focus",
|
1232
|
+
cView.define_method("on_focus", on_focus);
|
1263
1233
|
cView.define_method("on_key", on_key);
|
1264
1234
|
cView.define_method("on_key_down", on_key_down);
|
1265
1235
|
cView.define_method("on_key_up", on_key_up);
|
1266
|
-
cView.define_method("on_pointer",
|
1236
|
+
cView.define_method("on_pointer", on_pointer);
|
1267
1237
|
cView.define_method("on_pointer_down", on_pointer_down);
|
1268
1238
|
cView.define_method("on_pointer_up", on_pointer_up);
|
1269
1239
|
cView.define_method("on_pointer_move", on_pointer_move);
|
1270
1240
|
cView.define_method("on_pointer_cancel", on_pointer_cancel);
|
1271
|
-
cView.define_method("on_wheel",
|
1241
|
+
cView.define_method("on_wheel", on_wheel);
|
1272
1242
|
cView.define_method("on_capture", on_capture);
|
1273
|
-
cView.define_method("on_timer",
|
1243
|
+
cView.define_method("on_timer", on_timer);
|
1244
|
+
cView.define_method( "will_contact?", will_contact);
|
1274
1245
|
cView.define_private_method("call_contact!", on_contact);
|
1275
1246
|
cView.define_private_method("call_contact_begin!", on_contact_begin);
|
1276
1247
|
cView.define_private_method("call_contact_end!", on_contact_end);
|
@@ -10,6 +10,9 @@
|
|
10
10
|
#include <reflex/ruby/event.h>
|
11
11
|
|
12
12
|
|
13
|
+
RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(Reflex::Application)
|
14
|
+
|
15
|
+
|
13
16
|
namespace Reflex
|
14
17
|
{
|
15
18
|
|
@@ -95,9 +98,6 @@ namespace Reflex
|
|
95
98
|
}// Reflex
|
96
99
|
|
97
100
|
|
98
|
-
RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(Reflex::Application)
|
99
|
-
|
100
|
-
|
101
101
|
namespace Rucy
|
102
102
|
{
|
103
103
|
|
data/include/reflex/ruby/event.h
CHANGED
@@ -9,6 +9,33 @@
|
|
9
9
|
#include <reflex/event.h>
|
10
10
|
|
11
11
|
|
12
|
+
RUCY_DECLARE_VALUE_FROM_TO(Reflex::Event)
|
13
|
+
|
14
|
+
RUCY_DECLARE_VALUE_FROM_TO(Reflex::UpdateEvent)
|
15
|
+
|
16
|
+
RUCY_DECLARE_VALUE_FROM_TO(Reflex::DrawEvent)
|
17
|
+
|
18
|
+
RUCY_DECLARE_VALUE_FROM_TO(Reflex::FrameEvent)
|
19
|
+
|
20
|
+
RUCY_DECLARE_VALUE_FROM_TO(Reflex::ScrollEvent)
|
21
|
+
|
22
|
+
RUCY_DECLARE_VALUE_FROM_TO(Reflex::FocusEvent)
|
23
|
+
|
24
|
+
RUCY_DECLARE_VALUE_FROM_TO(Reflex::KeyEvent)
|
25
|
+
|
26
|
+
RUCY_DECLARE_VALUE_FROM_TO(Reflex::PointerEvent)
|
27
|
+
|
28
|
+
RUCY_DECLARE_VALUE_FROM_TO(Reflex::WheelEvent)
|
29
|
+
|
30
|
+
RUCY_DECLARE_VALUE_FROM_TO(Reflex::CaptureEvent)
|
31
|
+
|
32
|
+
RUCY_DECLARE_VALUE_FROM_TO(Reflex::TimerEvent)
|
33
|
+
|
34
|
+
RUCY_DECLARE_VALUE_FROM_TO(Reflex::ContactEvent)
|
35
|
+
|
36
|
+
RUCY_DECLARE_VALUE_FROM_TO(Reflex::MotionEvent)
|
37
|
+
|
38
|
+
|
12
39
|
namespace Reflex
|
13
40
|
{
|
14
41
|
|
@@ -56,33 +83,6 @@ namespace Reflex
|
|
56
83
|
}// Reflex
|
57
84
|
|
58
85
|
|
59
|
-
RUCY_DECLARE_VALUE_FROM_TO(Reflex::Event)
|
60
|
-
|
61
|
-
RUCY_DECLARE_VALUE_FROM_TO(Reflex::UpdateEvent)
|
62
|
-
|
63
|
-
RUCY_DECLARE_VALUE_FROM_TO(Reflex::DrawEvent)
|
64
|
-
|
65
|
-
RUCY_DECLARE_VALUE_FROM_TO(Reflex::FrameEvent)
|
66
|
-
|
67
|
-
RUCY_DECLARE_VALUE_FROM_TO(Reflex::ScrollEvent)
|
68
|
-
|
69
|
-
RUCY_DECLARE_VALUE_FROM_TO(Reflex::FocusEvent)
|
70
|
-
|
71
|
-
RUCY_DECLARE_VALUE_FROM_TO(Reflex::KeyEvent)
|
72
|
-
|
73
|
-
RUCY_DECLARE_VALUE_FROM_TO(Reflex::PointerEvent)
|
74
|
-
|
75
|
-
RUCY_DECLARE_VALUE_FROM_TO(Reflex::WheelEvent)
|
76
|
-
|
77
|
-
RUCY_DECLARE_VALUE_FROM_TO(Reflex::CaptureEvent)
|
78
|
-
|
79
|
-
RUCY_DECLARE_VALUE_FROM_TO(Reflex::TimerEvent)
|
80
|
-
|
81
|
-
RUCY_DECLARE_VALUE_FROM_TO(Reflex::ContactEvent)
|
82
|
-
|
83
|
-
RUCY_DECLARE_VALUE_FROM_TO(Reflex::MotionEvent)
|
84
|
-
|
85
|
-
|
86
86
|
namespace Rucy
|
87
87
|
{
|
88
88
|
|
@@ -11,6 +11,9 @@
|
|
11
11
|
#include <reflex/filter.h>
|
12
12
|
|
13
13
|
|
14
|
+
RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(Reflex::Filter)
|
15
|
+
|
16
|
+
|
14
17
|
namespace Reflex
|
15
18
|
{
|
16
19
|
|
@@ -42,9 +45,6 @@ namespace Reflex
|
|
42
45
|
}// Reflex
|
43
46
|
|
44
47
|
|
45
|
-
RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(Reflex::Filter)
|
46
|
-
|
47
|
-
|
48
48
|
namespace Rucy
|
49
49
|
{
|
50
50
|
|
@@ -8,6 +8,9 @@
|
|
8
8
|
#include <reflex/ruby/view.h>
|
9
9
|
|
10
10
|
|
11
|
+
RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(Reflex::ImageView)
|
12
|
+
|
13
|
+
|
11
14
|
namespace Reflex
|
12
15
|
{
|
13
16
|
|
@@ -19,9 +22,6 @@ namespace Reflex
|
|
19
22
|
}// Reflex
|
20
23
|
|
21
24
|
|
22
|
-
RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(Reflex::ImageView)
|
23
|
-
|
24
|
-
|
25
25
|
namespace Rucy
|
26
26
|
{
|
27
27
|
|
@@ -9,6 +9,9 @@
|
|
9
9
|
#include <reflex/pointer.h>
|
10
10
|
|
11
11
|
|
12
|
+
RUCY_DECLARE_VALUE_FROM_TO(Reflex::Pointer)
|
13
|
+
|
14
|
+
|
12
15
|
namespace Reflex
|
13
16
|
{
|
14
17
|
|
@@ -20,9 +23,6 @@ namespace Reflex
|
|
20
23
|
}// Reflex
|
21
24
|
|
22
25
|
|
23
|
-
RUCY_DECLARE_VALUE_FROM_TO(Reflex::Pointer)
|
24
|
-
|
25
|
-
|
26
26
|
namespace Rucy
|
27
27
|
{
|
28
28
|
|
@@ -9,6 +9,9 @@
|
|
9
9
|
#include <reflex/selector.h>
|
10
10
|
|
11
11
|
|
12
|
+
RUCY_DECLARE_VALUE_OR_ARRAY_FROM_TO(Reflex::Selector)
|
13
|
+
|
14
|
+
|
12
15
|
namespace Reflex
|
13
16
|
{
|
14
17
|
|
@@ -20,9 +23,6 @@ namespace Reflex
|
|
20
23
|
}// Reflex
|
21
24
|
|
22
25
|
|
23
|
-
RUCY_DECLARE_VALUE_OR_ARRAY_FROM_TO(Reflex::Selector)
|
24
|
-
|
25
|
-
|
26
26
|
namespace Rucy
|
27
27
|
{
|
28
28
|
|
data/include/reflex/ruby/shape.h
CHANGED
@@ -10,6 +10,17 @@
|
|
10
10
|
#include <reflex/ruby/event.h>
|
11
11
|
|
12
12
|
|
13
|
+
RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(Reflex::Shape)
|
14
|
+
|
15
|
+
RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(Reflex::PolygonShape)
|
16
|
+
|
17
|
+
RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(Reflex::LineShape)
|
18
|
+
|
19
|
+
RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(Reflex::RectShape)
|
20
|
+
|
21
|
+
RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(Reflex::EllipseShape)
|
22
|
+
|
23
|
+
|
13
24
|
namespace Reflex
|
14
25
|
{
|
15
26
|
|
@@ -47,6 +58,15 @@ namespace Reflex
|
|
47
58
|
Super::on_draw(e);
|
48
59
|
}
|
49
60
|
|
61
|
+
virtual bool will_contact (Shape* s)
|
62
|
+
{
|
63
|
+
RUCY_SYM_Q(will_contact);
|
64
|
+
if (this->is_overridable())
|
65
|
+
return this->value.call(will_contact, Rucy::value(s));
|
66
|
+
else
|
67
|
+
return Super::will_contact(s);
|
68
|
+
}
|
69
|
+
|
50
70
|
virtual void on_contact (ContactEvent* e)
|
51
71
|
{
|
52
72
|
RUCY_SYM_B(on_contact);
|
@@ -80,17 +100,6 @@ namespace Reflex
|
|
80
100
|
}// Reflex
|
81
101
|
|
82
102
|
|
83
|
-
RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(Reflex::Shape)
|
84
|
-
|
85
|
-
RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(Reflex::PolygonShape)
|
86
|
-
|
87
|
-
RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(Reflex::LineShape)
|
88
|
-
|
89
|
-
RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(Reflex::RectShape)
|
90
|
-
|
91
|
-
RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(Reflex::EllipseShape)
|
92
|
-
|
93
|
-
|
94
103
|
namespace Rucy
|
95
104
|
{
|
96
105
|
|
data/include/reflex/ruby/style.h
CHANGED
@@ -9,6 +9,11 @@
|
|
9
9
|
#include <reflex/style.h>
|
10
10
|
|
11
11
|
|
12
|
+
RUCY_DECLARE_VALUE_OR_ARRAY_FROM_TO(Reflex::StyleLength)
|
13
|
+
|
14
|
+
RUCY_DECLARE_VALUE_FROM_TO(Reflex::Style)
|
15
|
+
|
16
|
+
|
12
17
|
namespace Reflex
|
13
18
|
{
|
14
19
|
|
@@ -23,11 +28,6 @@ namespace Reflex
|
|
23
28
|
}// Reflex
|
24
29
|
|
25
30
|
|
26
|
-
RUCY_DECLARE_VALUE_OR_ARRAY_FROM_TO(Reflex::StyleLength)
|
27
|
-
|
28
|
-
RUCY_DECLARE_VALUE_FROM_TO(Reflex::Style)
|
29
|
-
|
30
|
-
|
31
31
|
namespace Rucy
|
32
32
|
{
|
33
33
|
|
data/include/reflex/ruby/timer.h
CHANGED
@@ -9,6 +9,9 @@
|
|
9
9
|
#include <reflex/timer.h>
|
10
10
|
|
11
11
|
|
12
|
+
RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(Reflex::Timer)
|
13
|
+
|
14
|
+
|
12
15
|
namespace Reflex
|
13
16
|
{
|
14
17
|
|
@@ -42,9 +45,6 @@ namespace Reflex
|
|
42
45
|
}// Reflex
|
43
46
|
|
44
47
|
|
45
|
-
RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(Reflex::Timer)
|
46
|
-
|
47
|
-
|
48
48
|
namespace Rucy
|
49
49
|
{
|
50
50
|
|
data/include/reflex/ruby/view.h
CHANGED
@@ -10,6 +10,9 @@
|
|
10
10
|
#include <reflex/ruby/event.h>
|
11
11
|
|
12
12
|
|
13
|
+
RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(Reflex::View)
|
14
|
+
|
15
|
+
|
13
16
|
namespace Reflex
|
14
17
|
{
|
15
18
|
|
@@ -236,6 +239,15 @@ namespace Reflex
|
|
236
239
|
Super::on_timer(e);
|
237
240
|
}
|
238
241
|
|
242
|
+
virtual bool will_contact (View* v)
|
243
|
+
{
|
244
|
+
RUCY_SYM_Q(will_contact);
|
245
|
+
if (this->is_overridable())
|
246
|
+
return this->value.call(will_contact, Rucy::value(v));
|
247
|
+
else
|
248
|
+
return Super::will_contact(v);
|
249
|
+
}
|
250
|
+
|
239
251
|
virtual void on_contact (ContactEvent* e)
|
240
252
|
{
|
241
253
|
RUCY_SYM_B(on_contact);
|
@@ -269,9 +281,6 @@ namespace Reflex
|
|
269
281
|
}// Reflex
|
270
282
|
|
271
283
|
|
272
|
-
RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(Reflex::View)
|
273
|
-
|
274
|
-
|
275
284
|
namespace Rucy
|
276
285
|
{
|
277
286
|
|
@@ -10,6 +10,9 @@
|
|
10
10
|
#include <reflex/ruby/event.h>
|
11
11
|
|
12
12
|
|
13
|
+
RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(Reflex::Window)
|
14
|
+
|
15
|
+
|
13
16
|
namespace Reflex
|
14
17
|
{
|
15
18
|
|
@@ -176,9 +179,6 @@ namespace Reflex
|
|
176
179
|
}// Reflex
|
177
180
|
|
178
181
|
|
179
|
-
RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(Reflex::Window)
|
180
|
-
|
181
|
-
|
182
182
|
namespace Rucy
|
183
183
|
{
|
184
184
|
|