reflexion 0.1.23 → 0.1.26

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/.doc/ext/reflex/capture_event.cpp +6 -5
  3. data/.doc/ext/reflex/contact_event.cpp +14 -12
  4. data/.doc/ext/reflex/draw_event.cpp +10 -8
  5. data/.doc/ext/reflex/event.cpp +2 -10
  6. data/.doc/ext/reflex/focus_event.cpp +14 -13
  7. data/.doc/ext/reflex/frame_event.cpp +17 -17
  8. data/.doc/ext/reflex/key_event.cpp +20 -19
  9. data/.doc/ext/reflex/pointer_event.cpp +1 -1
  10. data/.doc/ext/reflex/scroll_event.cpp +14 -17
  11. data/.doc/ext/reflex/timer.cpp +9 -1
  12. data/.doc/ext/reflex/timer_event.cpp +4 -13
  13. data/.doc/ext/reflex/update_event.cpp +6 -5
  14. data/.doc/ext/reflex/wheel_event.cpp +39 -22
  15. data/VERSION +1 -1
  16. data/ext/reflex/capture_event.cpp +6 -5
  17. data/ext/reflex/contact_event.cpp +16 -14
  18. data/ext/reflex/draw_event.cpp +9 -7
  19. data/ext/reflex/event.cpp +2 -11
  20. data/ext/reflex/focus_event.cpp +14 -13
  21. data/ext/reflex/frame_event.cpp +16 -16
  22. data/ext/reflex/key_event.cpp +20 -19
  23. data/ext/reflex/pointer_event.cpp +1 -1
  24. data/ext/reflex/scroll_event.cpp +15 -18
  25. data/ext/reflex/timer.cpp +15 -6
  26. data/ext/reflex/timer_event.cpp +9 -19
  27. data/ext/reflex/update_event.cpp +6 -5
  28. data/ext/reflex/wheel_event.cpp +40 -21
  29. data/include/reflex/event.h +224 -115
  30. data/include/reflex/shape.h +2 -2
  31. data/include/reflex/window.h +1 -1
  32. data/lib/reflex/contact_event.rb +7 -7
  33. data/lib/reflex/focus_event.rb +8 -8
  34. data/lib/reflex/key_event.rb +8 -8
  35. data/lib/reflex/pointer.rb +3 -3
  36. data/lib/reflex/pointer_event.rb +2 -2
  37. data/lib/reflex/timer_event.rb +2 -1
  38. data/lib/reflex/wheel_event.rb +1 -9
  39. data/lib/reflex/window.rb +1 -1
  40. data/reflex.gemspec +4 -4
  41. data/src/event.cpp +630 -76
  42. data/src/event.h +15 -0
  43. data/src/image_view.cpp +2 -2
  44. data/src/ios/app_delegate.h +0 -6
  45. data/src/ios/app_delegate.mm +1 -0
  46. data/src/ios/application.mm +6 -0
  47. data/src/ios/view_controller.mm +15 -9
  48. data/src/ios/window.mm +2 -4
  49. data/src/osx/event.h +1 -1
  50. data/src/osx/event.mm +9 -9
  51. data/src/osx/native_window.mm +23 -5
  52. data/src/shape.cpp +11 -13
  53. data/src/shape.h +1 -1
  54. data/src/view.cpp +137 -89
  55. data/src/view.h +5 -6
  56. data/src/window.cpp +28 -26
  57. data/src/world.cpp +6 -4
  58. data/test/test_capture_event.rb +16 -0
  59. data/test/test_contact_event.rb +40 -0
  60. data/test/test_draw_event.rb +35 -0
  61. data/test/test_event.rb +20 -6
  62. data/test/test_focus_event.rb +34 -0
  63. data/test/test_frame_event.rb +38 -0
  64. data/test/test_key_event.rb +33 -0
  65. data/test/test_pointer.rb +14 -14
  66. data/test/test_pointer_event.rb +1 -1
  67. data/test/test_scroll_event.rb +39 -0
  68. data/test/test_timer_event.rb +38 -0
  69. data/test/test_update_event.rb +29 -0
  70. data/test/test_wheel_event.rb +40 -0
  71. metadata +29 -11
@@ -24,7 +24,7 @@ VALUE initialize(VALUE self, VALUE timer)
24
24
  {
25
25
  CHECK;
26
26
 
27
- THIS->timer = to<Reflex::Timer*>(timer);
27
+ *THIS = Reflex::TimerEvent(to<Reflex::Timer*>(timer));
28
28
 
29
29
  return rb_call_super(0, NULL);
30
30
  }
@@ -33,7 +33,7 @@ static
33
33
  VALUE initialize_copy(VALUE self, VALUE obj)
34
34
  {
35
35
  CHECK;
36
- *THIS = to<Reflex::TimerEvent&>(obj);
36
+ *THIS = to<Reflex::TimerEvent&>(obj).dup();
37
37
  return self;
38
38
  }
39
39
 
@@ -41,7 +41,7 @@ static
41
41
  VALUE timer(VALUE self)
42
42
  {
43
43
  CHECK;
44
- return value(THIS->timer);
44
+ return value(THIS->timer());
45
45
  }
46
46
 
47
47
  static
@@ -65,14 +65,6 @@ VALUE interval(VALUE self)
65
65
  return value(THIS->interval());
66
66
  }
67
67
 
68
- static
69
- VALUE set_count(VALUE self, VALUE count)
70
- {
71
- CHECK;
72
- THIS->set_count(to<int>(count));
73
- return count;
74
- }
75
-
76
68
  static
77
69
  VALUE count(VALUE self)
78
70
  {
@@ -103,9 +95,8 @@ Init_timer_event ()
103
95
  rb_define_method(cTimerEvent, "owner", RUBY_METHOD_FUNC(owner), 0);
104
96
  rb_define_method(cTimerEvent, "id", RUBY_METHOD_FUNC(id), 0);
105
97
  rb_define_method(cTimerEvent, "interval", RUBY_METHOD_FUNC(interval), 0);
106
- rb_define_method(cTimerEvent, "count=", RUBY_METHOD_FUNC(set_count), 1);
107
98
  rb_define_method(cTimerEvent, "count", RUBY_METHOD_FUNC(count), 0);
108
- cTimerEvent.define_method("finish?", is_finished);
99
+ cTimerEvent.define_method("finished?", is_finished);
109
100
  }
110
101
 
111
102
 
@@ -22,8 +22,9 @@ VALUE initialize(VALUE self, VALUE now, VALUE dt)
22
22
  {
23
23
  CHECK;
24
24
 
25
- THIS->now = to<double>(now);
26
- THIS->dt = to<float>(dt);
25
+ *THIS = Reflex::UpdateEvent(
26
+ to<double>(now),
27
+ to<float>(dt));
27
28
 
28
29
  return rb_call_super(0, NULL);
29
30
  }
@@ -32,7 +33,7 @@ static
32
33
  VALUE initialize_copy(VALUE self, VALUE obj)
33
34
  {
34
35
  CHECK;
35
- *THIS = to<Reflex::UpdateEvent&>(obj);
36
+ *THIS = to<Reflex::UpdateEvent&>(obj).dup();
36
37
  return self;
37
38
  }
38
39
 
@@ -40,14 +41,14 @@ static
40
41
  VALUE now(VALUE self)
41
42
  {
42
43
  CHECK;
43
- return value(THIS->now);
44
+ return value(THIS->now());
44
45
  }
45
46
 
46
47
  static
47
48
  VALUE dt(VALUE self)
48
49
  {
49
50
  CHECK;
50
- return value(THIS->dt);
51
+ return value(THIS->dt());
51
52
  }
52
53
 
53
54
 
@@ -19,13 +19,14 @@ VALUE alloc(VALUE klass)
19
19
  }
20
20
 
21
21
  static
22
- VALUE initialize(VALUE self, VALUE dx, VALUE dy, VALUE dz)
22
+ VALUE initialize(VALUE self, VALUE x, VALUE y, VALUE z, VALUE dx, VALUE dy, VALUE dz, VALUE modifiers)
23
23
  {
24
24
  CHECK;
25
25
 
26
- THIS->dx = to<coord>(dx);
27
- THIS->dy = to<coord>(dy);
28
- THIS->dz = to<coord>(dz);
26
+ *THIS = Reflex::WheelEvent(
27
+ to<coord>( x), to<coord>( y), to<coord>( z),
28
+ to<coord>(dx), to<coord>(dy), to<coord>(dz),
29
+ to<uint>(modifiers));
29
30
 
30
31
  return rb_call_super(0, NULL);
31
32
  }
@@ -34,57 +35,71 @@ static
34
35
  VALUE initialize_copy(VALUE self, VALUE obj)
35
36
  {
36
37
  CHECK;
37
- *THIS = to<Reflex::WheelEvent&>(obj);
38
+ *THIS = to<Reflex::WheelEvent&>(obj).dup();
38
39
  return self;
39
40
  }
40
41
 
41
42
  static
42
- VALUE dx(VALUE self)
43
+ VALUE x(VALUE self)
43
44
  {
44
45
  CHECK;
45
- return value(THIS->dx);
46
+ return value(THIS->position().x);
46
47
  }
47
48
 
48
49
  static
49
- VALUE dy(VALUE self)
50
+ VALUE y(VALUE self)
50
51
  {
51
52
  CHECK;
52
- return value(THIS->dy);
53
+ return value(THIS->position().y);
53
54
  }
54
55
 
55
56
  static
56
- VALUE dz(VALUE self)
57
+ VALUE z(VALUE self)
57
58
  {
58
59
  CHECK;
59
- return value(THIS->dz);
60
+ return value(THIS->position().z);
60
61
  }
61
62
 
62
63
  static
63
- VALUE x(VALUE self)
64
+ VALUE dx(VALUE self)
64
65
  {
65
66
  CHECK;
66
- return value(THIS->x);
67
+ return value(THIS->dposition().x);
67
68
  }
68
69
 
69
70
  static
70
- VALUE y(VALUE self)
71
+ VALUE dy(VALUE self)
71
72
  {
72
73
  CHECK;
73
- return value(THIS->y);
74
+ return value(THIS->dposition().y);
74
75
  }
75
76
 
76
77
  static
77
- VALUE z(VALUE self)
78
+ VALUE dz(VALUE self)
79
+ {
80
+ CHECK;
81
+ return value(THIS->dposition().z);
82
+ }
83
+
84
+ static
85
+ VALUE position(VALUE self)
86
+ {
87
+ CHECK;
88
+ return value(THIS->position());
89
+ }
90
+
91
+ static
92
+ VALUE dposition(VALUE self)
78
93
  {
79
94
  CHECK;
80
- return value(THIS->z);
95
+ return value(THIS->dposition());
81
96
  }
82
97
 
83
98
  static
84
99
  VALUE modifiers(VALUE self)
85
100
  {
86
101
  CHECK;
87
- return value(THIS->modifiers);
102
+ return value(THIS->modifiers());
88
103
  }
89
104
 
90
105
 
@@ -97,14 +112,16 @@ Init_wheel_event ()
97
112
 
98
113
  cWheelEvent = mReflex.define_class("WheelEvent", Reflex::event_class());
99
114
  rb_define_alloc_func(cWheelEvent, alloc);
100
- rb_define_private_method(cWheelEvent, "initialize", RUBY_METHOD_FUNC(initialize), 3);
115
+ rb_define_private_method(cWheelEvent, "initialize", RUBY_METHOD_FUNC(initialize), 7);
101
116
  rb_define_private_method(cWheelEvent, "initialize_copy", RUBY_METHOD_FUNC(initialize_copy), 1);
102
- rb_define_method(cWheelEvent, "dx", RUBY_METHOD_FUNC(dx), 0);
103
- rb_define_method(cWheelEvent, "dy", RUBY_METHOD_FUNC(dy), 0);
104
- rb_define_method(cWheelEvent, "dz", RUBY_METHOD_FUNC(dz), 0);
105
117
  rb_define_method(cWheelEvent, "x", RUBY_METHOD_FUNC(x), 0);
106
118
  rb_define_method(cWheelEvent, "y", RUBY_METHOD_FUNC(y), 0);
107
119
  rb_define_method(cWheelEvent, "z", RUBY_METHOD_FUNC(z), 0);
120
+ rb_define_method(cWheelEvent, "dx", RUBY_METHOD_FUNC(dx), 0);
121
+ rb_define_method(cWheelEvent, "dy", RUBY_METHOD_FUNC(dy), 0);
122
+ rb_define_method(cWheelEvent, "dz", RUBY_METHOD_FUNC(dz), 0);
123
+ rb_define_method(cWheelEvent, "position", RUBY_METHOD_FUNC(position), 0);
124
+ rb_define_method(cWheelEvent, "dposition", RUBY_METHOD_FUNC(dposition), 0);
108
125
  rb_define_method(cWheelEvent, "modifiers", RUBY_METHOD_FUNC(modifiers), 0);
109
126
  }
110
127
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.23
1
+ 0.1.26
@@ -24,8 +24,9 @@ RUCY_DEF2(initialize, begin, end)
24
24
  {
25
25
  CHECK;
26
26
 
27
- THIS->begin = to<uint>(begin);
28
- THIS->end = to<uint>(end);
27
+ *THIS = Reflex::CaptureEvent(
28
+ to<uint>(begin),
29
+ to<uint>(end));
29
30
 
30
31
  return rb_call_super(0, NULL);
31
32
  }
@@ -35,7 +36,7 @@ static
35
36
  RUCY_DEF1(initialize_copy, obj)
36
37
  {
37
38
  CHECK;
38
- *THIS = to<Reflex::CaptureEvent&>(obj);
39
+ *THIS = to<Reflex::CaptureEvent&>(obj).dup();
39
40
  return self;
40
41
  }
41
42
  RUCY_END
@@ -44,7 +45,7 @@ static
44
45
  RUCY_DEF0(begin)
45
46
  {
46
47
  CHECK;
47
- return value(THIS->begin);
48
+ return value(THIS->begin());
48
49
  }
49
50
  RUCY_END
50
51
 
@@ -52,7 +53,7 @@ static
52
53
  RUCY_DEF0(end)
53
54
  {
54
55
  CHECK;
55
- return value(THIS->end);
56
+ return value(THIS->end());
56
57
  }
57
58
  RUCY_END
58
59
 
@@ -3,6 +3,7 @@
3
3
 
4
4
  #include "reflex/ruby/shape.h"
5
5
  #include "reflex/ruby/view.h"
6
+ #include "reflex/ruby/shape.h"
6
7
  #include "defs.h"
7
8
 
8
9
 
@@ -21,12 +22,13 @@ RUCY_DEF_ALLOC(alloc, klass)
21
22
  RUCY_END
22
23
 
23
24
  static
24
- RUCY_DEF2(initialize, type, shape)
25
+ RUCY_DEF2(initialize, action, shape)
25
26
  {
26
27
  CHECK;
27
28
 
28
- THIS->type = (Reflex::ContactEvent::Type) to<int>(type);
29
- THIS->shape = to<Reflex::Shape*>(shape);
29
+ *THIS = Reflex::ContactEvent(
30
+ (Reflex::ContactEvent::Action) to<uint>(action),
31
+ to<Reflex::Shape*>(shape));
30
32
 
31
33
  return rb_call_super(0, NULL);
32
34
  }
@@ -36,16 +38,16 @@ static
36
38
  RUCY_DEF1(initialize_copy, obj)
37
39
  {
38
40
  CHECK;
39
- *THIS = to<Reflex::ContactEvent&>(obj);
41
+ *THIS = to<Reflex::ContactEvent&>(obj).dup();
40
42
  return self;
41
43
  }
42
44
  RUCY_END
43
45
 
44
46
  static
45
- RUCY_DEF0(get_type)
47
+ RUCY_DEF0(get_action)
46
48
  {
47
49
  CHECK;
48
- return value(THIS->type);
50
+ return value(THIS->action());
49
51
  }
50
52
  RUCY_END
51
53
 
@@ -53,7 +55,7 @@ static
53
55
  RUCY_DEF0(get_shape)
54
56
  {
55
57
  CHECK;
56
- return value(THIS->shape);
58
+ return value(THIS->shape());
57
59
  }
58
60
  RUCY_END
59
61
 
@@ -61,7 +63,7 @@ static
61
63
  RUCY_DEF0(get_view)
62
64
  {
63
65
  CHECK;
64
- return value(THIS->view);
66
+ return value(THIS->view());
65
67
  }
66
68
  RUCY_END
67
69
 
@@ -77,12 +79,12 @@ Init_contact_event ()
77
79
  cContactEvent.define_alloc_func(alloc);
78
80
  cContactEvent.define_private_method("initialize", initialize);
79
81
  cContactEvent.define_private_method("initialize_copy", initialize_copy);
80
- cContactEvent.define_method("type", get_type);
81
- cContactEvent.define_method("shape", get_shape);
82
- cContactEvent.define_method("view", get_view);
83
- cContactEvent.define_const("TYPE_NONE", Reflex::ContactEvent::NONE);
84
- cContactEvent.define_const("TYPE_BEGIN", Reflex::ContactEvent::BEGIN);
85
- cContactEvent.define_const("TYPE_END", Reflex::ContactEvent::END);
82
+ cContactEvent.define_method("action", get_action);
83
+ cContactEvent.define_method("shape", get_shape);
84
+ cContactEvent.define_method("view", get_view);
85
+ cContactEvent.define_const("ACTION_NONE", Reflex::ContactEvent::ACTION_NONE);
86
+ cContactEvent.define_const("BEGIN", Reflex::ContactEvent::BEGIN);
87
+ cContactEvent.define_const("END", Reflex::ContactEvent::END);
86
88
  }
87
89
 
88
90
 
@@ -21,11 +21,13 @@ RUCY_DEF_ALLOC(alloc, klass)
21
21
  RUCY_END
22
22
 
23
23
  static
24
- RUCY_DEF1(initialize, dt)
24
+ RUCY_DEF2(initialize, dt, fps)
25
25
  {
26
26
  CHECK;
27
27
 
28
- THIS->dt = to<float>(dt);
28
+ *THIS = Reflex::DrawEvent(
29
+ to<float>(dt),
30
+ to<float>(fps));
29
31
 
30
32
  return rb_call_super(0, NULL);
31
33
  }
@@ -35,7 +37,7 @@ static
35
37
  RUCY_DEF1(initialize_copy, obj)
36
38
  {
37
39
  CHECK;
38
- *THIS = to<Reflex::DrawEvent&>(obj);
40
+ *THIS = to<Reflex::DrawEvent&>(obj).dup();
39
41
  return self;
40
42
  }
41
43
  RUCY_END
@@ -44,7 +46,7 @@ static
44
46
  RUCY_DEF0(painter)
45
47
  {
46
48
  CHECK;
47
- return value(THIS->painter);
49
+ return value(THIS->painter());
48
50
  }
49
51
  RUCY_END
50
52
 
@@ -52,7 +54,7 @@ static
52
54
  RUCY_DEF0(bounds)
53
55
  {
54
56
  CHECK;
55
- return value(THIS->bounds);
57
+ return value(THIS->bounds());
56
58
  }
57
59
  RUCY_END
58
60
 
@@ -60,7 +62,7 @@ static
60
62
  RUCY_DEF0(dt)
61
63
  {
62
64
  CHECK;
63
- return value(THIS->dt);
65
+ return value(THIS->dt());
64
66
  }
65
67
  RUCY_END
66
68
 
@@ -68,7 +70,7 @@ static
68
70
  RUCY_DEF0(fps)
69
71
  {
70
72
  CHECK;
71
- return value(THIS->fps);
73
+ return value(THIS->fps());
72
74
  }
73
75
  RUCY_END
74
76
 
data/ext/reflex/event.cpp CHANGED
@@ -1,6 +1,7 @@
1
1
  #include "reflex/ruby/event.h"
2
2
 
3
3
 
4
+ #include "reflex/exception.h"
4
5
  #include "defs.h"
5
6
 
6
7
 
@@ -14,16 +15,7 @@ RUCY_DEFINE_VALUE_FROM_TO(Reflex::Event)
14
15
  static
15
16
  RUCY_DEF_ALLOC(alloc, klass)
16
17
  {
17
- return new_type<Reflex::Event>(klass);
18
- }
19
- RUCY_END
20
-
21
- static
22
- RUCY_DEF1(initialize_copy, obj)
23
- {
24
- CHECK;
25
- *THIS = to<Reflex::Event&>(obj);
26
- return self;
18
+ Reflex::reflex_error(__FILE__, __LINE__, "can not instantiate Event class.");
27
19
  }
28
20
  RUCY_END
29
21
 
@@ -61,7 +53,6 @@ Init_event ()
61
53
 
62
54
  cEvent = mReflex.define_class("Event");
63
55
  cEvent.define_alloc_func(alloc);
64
- cEvent.define_private_method("initialize_copy", initialize_copy);
65
56
  cEvent.define_method("block", block);
66
57
  cEvent.define_method("blocked?", is_blocked);
67
58
  cEvent.define_method("time", get_time);
@@ -20,13 +20,14 @@ RUCY_DEF_ALLOC(alloc, klass)
20
20
  RUCY_END
21
21
 
22
22
  static
23
- RUCY_DEF3(initialize, type, current, last)
23
+ RUCY_DEF3(initialize, action, current, last)
24
24
  {
25
25
  CHECK;
26
26
 
27
- THIS->type = (Reflex::FocusEvent::Type) to<uint>(type);
28
- THIS->current = to<Reflex::View*>(current);
29
- THIS->last = to<Reflex::View*>(last);
27
+ *THIS = Reflex::FocusEvent(
28
+ (Reflex::FocusEvent::Action) to<uint>(action),
29
+ to<Reflex::View*>(current),
30
+ to<Reflex::View*>(last));
30
31
 
31
32
  return rb_call_super(0, NULL);
32
33
  }
@@ -36,16 +37,16 @@ static
36
37
  RUCY_DEF1(initialize_copy, obj)
37
38
  {
38
39
  CHECK;
39
- *THIS = to<Reflex::FocusEvent&>(obj);
40
+ *THIS = to<Reflex::FocusEvent&>(obj).dup();
40
41
  return self;
41
42
  }
42
43
  RUCY_END
43
44
 
44
45
  static
45
- RUCY_DEF0(get_type)
46
+ RUCY_DEF0(get_action)
46
47
  {
47
48
  CHECK;
48
- return value(THIS->type);
49
+ return value(THIS->action());
49
50
  }
50
51
  RUCY_END
51
52
 
@@ -53,7 +54,7 @@ static
53
54
  RUCY_DEF0(get_current)
54
55
  {
55
56
  CHECK;
56
- return THIS->current ? value(THIS->current) : nil();
57
+ return THIS->current() ? value(THIS->current()) : nil();
57
58
  }
58
59
  RUCY_END
59
60
 
@@ -61,7 +62,7 @@ static
61
62
  RUCY_DEF0(get_last)
62
63
  {
63
64
  CHECK;
64
- return THIS->last ? value(THIS->last) : nil();
65
+ return THIS->last() ? value(THIS->last()) : nil();
65
66
  }
66
67
  RUCY_END
67
68
 
@@ -77,12 +78,12 @@ Init_focus_event ()
77
78
  cFocusEvent.define_alloc_func(alloc);
78
79
  cFocusEvent.define_private_method("initialize", initialize);
79
80
  cFocusEvent.define_private_method("initialize_copy", initialize_copy);
80
- cFocusEvent.define_method("type", get_type);
81
+ cFocusEvent.define_method("action", get_action);
81
82
  cFocusEvent.define_method("current", get_current);
82
83
  cFocusEvent.define_method("last", get_last);
83
- cFocusEvent.define_const("TYPE_NONE", Reflex::FocusEvent::NONE);
84
- cFocusEvent.define_const("TYPE_FOCUS", Reflex::FocusEvent::FOCUS);
85
- cFocusEvent.define_const("TYPE_BLUR", Reflex::FocusEvent::BLUR);
84
+ cFocusEvent.define_const("ACTION_NONE", Reflex::FocusEvent::ACTION_NONE);
85
+ cFocusEvent.define_const("FOCUS", Reflex::FocusEvent::FOCUS);
86
+ cFocusEvent.define_const("BLUR", Reflex::FocusEvent::BLUR);
86
87
  }
87
88
 
88
89
 
@@ -21,15 +21,15 @@ RUCY_DEF_ALLOC(alloc, klass)
21
21
  RUCY_END
22
22
 
23
23
  static
24
- RUCY_DEF5(initialize, frame, dx, dy, dwidth, dheight)
24
+ RUCY_DEF7(initialize, frame, dx, dy, dwidth, dheight, angle, dangle)
25
25
  {
26
26
  CHECK;
27
27
 
28
- THIS->frame = to<Rays::Bounds>(frame);
29
- THIS->dx = to<coord>(dx);
30
- THIS->dy = to<coord>(dy);
31
- THIS->dwidth = to<coord>(dwidth);
32
- THIS->dheight = to<coord>(dheight);
28
+ *THIS = Reflex::FrameEvent(
29
+ to<Rays::Bounds>(frame),
30
+ to<coord>(dx), to<coord>(dy),
31
+ to<coord>(dwidth), to<coord>(dheight),
32
+ to<float>(angle), to<float>(dangle));
33
33
 
34
34
  return rb_call_super(0, NULL);
35
35
  }
@@ -39,7 +39,7 @@ static
39
39
  RUCY_DEF1(initialize_copy, obj)
40
40
  {
41
41
  CHECK;
42
- *THIS = to<Reflex::FrameEvent&>(obj);
42
+ *THIS = to<Reflex::FrameEvent&>(obj).dup();
43
43
  return self;
44
44
  }
45
45
  RUCY_END
@@ -48,7 +48,7 @@ static
48
48
  RUCY_DEF0(frame)
49
49
  {
50
50
  CHECK;
51
- return value(THIS->frame);
51
+ return value(THIS->frame());
52
52
  }
53
53
  RUCY_END
54
54
 
@@ -56,7 +56,7 @@ static
56
56
  RUCY_DEF0(dx)
57
57
  {
58
58
  CHECK;
59
- return value(THIS->dx);
59
+ return value(THIS->dx());
60
60
  }
61
61
  RUCY_END
62
62
 
@@ -64,7 +64,7 @@ static
64
64
  RUCY_DEF0(dy)
65
65
  {
66
66
  CHECK;
67
- return value(THIS->dy);
67
+ return value(THIS->dy());
68
68
  }
69
69
  RUCY_END
70
70
 
@@ -72,7 +72,7 @@ static
72
72
  RUCY_DEF0(dwidth)
73
73
  {
74
74
  CHECK;
75
- return value(THIS->dwidth);
75
+ return value(THIS->dwidth());
76
76
  }
77
77
  RUCY_END
78
78
 
@@ -80,7 +80,7 @@ static
80
80
  RUCY_DEF0(dheight)
81
81
  {
82
82
  CHECK;
83
- return value(THIS->dheight);
83
+ return value(THIS->dheight());
84
84
  }
85
85
  RUCY_END
86
86
 
@@ -88,7 +88,7 @@ static
88
88
  RUCY_DEF0(dposition)
89
89
  {
90
90
  CHECK;
91
- return value(Rays::Point(THIS->dx, THIS->dy));
91
+ return value(Rays::Point(THIS->dx(), THIS->dy()));
92
92
  }
93
93
  RUCY_END
94
94
 
@@ -96,7 +96,7 @@ static
96
96
  RUCY_DEF0(dsize)
97
97
  {
98
98
  CHECK;
99
- return value(Rays::Point(THIS->dw, THIS->dh));
99
+ return value(Rays::Point(THIS->dwidth(), THIS->dheight()));
100
100
  }
101
101
  RUCY_END
102
102
 
@@ -104,7 +104,7 @@ static
104
104
  RUCY_DEF0(angle)
105
105
  {
106
106
  CHECK;
107
- return value(THIS->angle);
107
+ return value(THIS->angle());
108
108
  }
109
109
  RUCY_END
110
110
 
@@ -112,7 +112,7 @@ static
112
112
  RUCY_DEF0(dangle)
113
113
  {
114
114
  CHECK;
115
- return value(THIS->dangle);
115
+ return value(THIS->dangle());
116
116
  }
117
117
  RUCY_END
118
118