reflexion 0.1.20 → 0.1.24

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.
Files changed (130) 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 +18 -16
  4. data/.doc/ext/reflex/draw_event.cpp +10 -8
  5. data/.doc/ext/reflex/event.cpp +10 -10
  6. data/.doc/ext/reflex/focus_event.cpp +18 -17
  7. data/.doc/ext/reflex/frame_event.cpp +17 -17
  8. data/.doc/ext/reflex/key_event.cpp +227 -28
  9. data/.doc/ext/reflex/native.cpp +2 -0
  10. data/.doc/ext/reflex/pointer.cpp +158 -0
  11. data/.doc/ext/reflex/pointer_event.cpp +32 -91
  12. data/.doc/ext/reflex/scroll_event.cpp +14 -17
  13. data/.doc/ext/reflex/selector.cpp +8 -0
  14. data/.doc/ext/reflex/timer.cpp +9 -1
  15. data/.doc/ext/reflex/timer_event.cpp +4 -13
  16. data/.doc/ext/reflex/update_event.cpp +6 -5
  17. data/.doc/ext/reflex/view.cpp +57 -0
  18. data/.doc/ext/reflex/wheel_event.cpp +39 -22
  19. data/.doc/ext/reflex/window.cpp +41 -0
  20. data/VERSION +1 -1
  21. data/ext/reflex/capture_event.cpp +6 -5
  22. data/ext/reflex/contact_event.cpp +18 -16
  23. data/ext/reflex/draw_event.cpp +9 -7
  24. data/ext/reflex/event.cpp +11 -11
  25. data/ext/reflex/focus_event.cpp +18 -17
  26. data/ext/reflex/frame_event.cpp +16 -16
  27. data/ext/reflex/key_event.cpp +228 -28
  28. data/ext/reflex/native.cpp +2 -0
  29. data/ext/reflex/pointer.cpp +170 -0
  30. data/ext/reflex/pointer_event.cpp +31 -96
  31. data/ext/reflex/scroll_event.cpp +15 -18
  32. data/ext/reflex/selector.cpp +9 -0
  33. data/ext/reflex/timer.cpp +15 -6
  34. data/ext/reflex/timer_event.cpp +9 -19
  35. data/ext/reflex/update_event.cpp +6 -5
  36. data/ext/reflex/view.cpp +67 -3
  37. data/ext/reflex/wheel_event.cpp +40 -21
  38. data/ext/reflex/window.cpp +49 -3
  39. data/include/reflex/defs.h +140 -106
  40. data/include/reflex/event.h +232 -124
  41. data/include/reflex/pointer.h +107 -0
  42. data/include/reflex/ruby/pointer.h +41 -0
  43. data/include/reflex/ruby/view.h +9 -0
  44. data/include/reflex/ruby/window.h +9 -0
  45. data/include/reflex/selector.h +1 -1
  46. data/include/reflex/shape.h +2 -2
  47. data/include/reflex/view.h +6 -4
  48. data/include/reflex/window.h +14 -8
  49. data/lib/reflex/application.rb +3 -3
  50. data/lib/reflex/autoinit.rb +1 -1
  51. data/lib/reflex/button.rb +7 -7
  52. data/lib/reflex/capture_event.rb +7 -7
  53. data/lib/reflex/contact_event.rb +10 -10
  54. data/lib/reflex/draw_event.rb +2 -2
  55. data/lib/reflex/ellipse_shape.rb +2 -2
  56. data/lib/reflex/focus_event.rb +11 -11
  57. data/lib/reflex/frame_event.rb +5 -5
  58. data/lib/reflex/helper.rb +20 -20
  59. data/lib/reflex/image_view.rb +2 -2
  60. data/lib/reflex/key_event.rb +12 -12
  61. data/lib/reflex/model.rb +22 -22
  62. data/lib/reflex/model_owner.rb +7 -7
  63. data/lib/reflex/model_view.rb +1 -1
  64. data/lib/reflex/module.rb +5 -5
  65. data/lib/reflex/pointer.rb +107 -0
  66. data/lib/reflex/pointer_event.rb +16 -54
  67. data/lib/reflex/polygon_shape.rb +2 -2
  68. data/lib/reflex/reflex.rb +3 -3
  69. data/lib/reflex/scroll_event.rb +1 -1
  70. data/lib/reflex/selector.rb +4 -4
  71. data/lib/reflex/shape.rb +13 -13
  72. data/lib/reflex/style.rb +11 -11
  73. data/lib/reflex/style_length.rb +1 -1
  74. data/lib/reflex/text_view.rb +2 -2
  75. data/lib/reflex/timer.rb +2 -2
  76. data/lib/reflex/timer_event.rb +3 -2
  77. data/lib/reflex/update_event.rb +1 -1
  78. data/lib/reflex/view.rb +32 -32
  79. data/lib/reflex/wheel_event.rb +2 -10
  80. data/lib/reflex/window.rb +8 -7
  81. data/lib/reflex.rb +1 -0
  82. data/lib/reflexion.rb +17 -17
  83. data/reflex.gemspec +5 -5
  84. data/samples/reflexion/noise.rb +1 -1
  85. data/samples/tree.rb +1 -1
  86. data/src/event.cpp +792 -86
  87. data/src/event.h +47 -0
  88. data/src/image_view.cpp +2 -2
  89. data/src/ios/event.h +15 -3
  90. data/src/ios/event.mm +126 -11
  91. data/src/ios/view_controller.mm +51 -23
  92. data/src/ios/window.mm +18 -0
  93. data/src/osx/event.h +15 -4
  94. data/src/osx/event.mm +214 -24
  95. data/src/osx/native_window.mm +85 -18
  96. data/src/osx/window.mm +22 -0
  97. data/src/pointer.cpp +203 -0
  98. data/src/pointer.h +26 -0
  99. data/src/selector.cpp +1 -1
  100. data/src/shape.cpp +11 -13
  101. data/src/shape.h +1 -1
  102. data/src/view.cpp +205 -118
  103. data/src/view.h +5 -10
  104. data/src/window.cpp +346 -104
  105. data/src/window.h +28 -3
  106. data/src/world.cpp +6 -4
  107. data/test/helper.rb +3 -3
  108. data/test/test_application.rb +1 -1
  109. data/test/test_capture_event.rb +22 -6
  110. data/test/test_contact_event.rb +40 -0
  111. data/test/test_draw_event.rb +35 -0
  112. data/test/test_event.rb +33 -5
  113. data/test/test_focus_event.rb +34 -0
  114. data/test/test_frame_event.rb +38 -0
  115. data/test/test_has_frame.rb +11 -11
  116. data/test/test_key_event.rb +33 -0
  117. data/test/test_pointer.rb +149 -0
  118. data/test/test_pointer_event.rb +70 -104
  119. data/test/test_reflex.rb +1 -1
  120. data/test/test_scroll_event.rb +39 -0
  121. data/test/test_selector.rb +15 -8
  122. data/test/test_shape.rb +8 -8
  123. data/test/test_style.rb +13 -13
  124. data/test/test_style_length.rb +5 -5
  125. data/test/test_timer_event.rb +38 -0
  126. data/test/test_update_event.rb +29 -0
  127. data/test/test_view.rb +57 -30
  128. data/test/test_wheel_event.rb +40 -0
  129. data/test/test_window.rb +45 -26
  130. metadata +64 -35
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 218d0608702c70706afb48a61849b27fd36fc8a2efc6518da6ed54f66d7e0662
4
- data.tar.gz: ff0332f957a15deea1923575c042c970c9cc86b6da8279131faa91fafe6389af
3
+ metadata.gz: b21f636473fd5ec680195625f775ee0e324c0a8b75da8b54495fa65fc4831240
4
+ data.tar.gz: f5fdb73a7042b0c8fbacecd3da1b12cd568540fb4bbff732bdec166870c9f3b5
5
5
  SHA512:
6
- metadata.gz: bbacfbdaf3ba3554bfa31a193f0b438b020f2327695f17ee5653953e29693138faa8d89840020b7c735e6474c776cd5c7df9924b59346048f58eafdae19212c8
7
- data.tar.gz: 5e38e12dd168b2ae77f5b427541ed68ed2b50599fba5264987d5819a96e1949b1f45fd4da8e07ce3a275f0c8eb07ca260978e36f693d65e2eb8c48525ef79b91
6
+ metadata.gz: c84fe590235e2d6accdac0c1201f9eb3cc456ebc68f7826a50cd562f942e021d875e24e396431af19d62066badc0f365b256541cbccff8f99bfa30b8d5e382ff
7
+ data.tar.gz: aa65600b586920743817256a1ab0c34c5a1428c5c7785759521e2ab602ffed17c95ec6e816a488d48e0181d5516743c382cc56e85fe95a26dd7fa209cd04cde7
@@ -23,8 +23,9 @@ VALUE initialize(VALUE self, VALUE begin, VALUE end)
23
23
  {
24
24
  CHECK;
25
25
 
26
- THIS->begin = to<uint>(begin);
27
- THIS->end = to<uint>(end);
26
+ *THIS = Reflex::CaptureEvent(
27
+ to<uint>(begin),
28
+ to<uint>(end));
28
29
 
29
30
  return rb_call_super(0, NULL);
30
31
  }
@@ -33,7 +34,7 @@ static
33
34
  VALUE initialize_copy(VALUE self, VALUE obj)
34
35
  {
35
36
  CHECK;
36
- *THIS = to<Reflex::CaptureEvent&>(obj);
37
+ *THIS = to<Reflex::CaptureEvent&>(obj).dup();
37
38
  return self;
38
39
  }
39
40
 
@@ -41,14 +42,14 @@ static
41
42
  VALUE begin(VALUE self)
42
43
  {
43
44
  CHECK;
44
- return value(THIS->begin);
45
+ return value(THIS->begin());
45
46
  }
46
47
 
47
48
  static
48
49
  VALUE end(VALUE self)
49
50
  {
50
51
  CHECK;
51
- return value(THIS->end);
52
+ return value(THIS->end());
52
53
  }
53
54
 
54
55
 
@@ -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
 
@@ -20,12 +21,13 @@ VALUE alloc(VALUE klass)
20
21
  }
21
22
 
22
23
  static
23
- VALUE initialize(VALUE self, VALUE type, VALUE shape)
24
+ VALUE initialize(VALUE self, VALUE action, VALUE shape)
24
25
  {
25
26
  CHECK;
26
27
 
27
- THIS->type = (Reflex::ContactEvent::Type) to<int>(type);
28
- THIS->shape = to<Reflex::Shape*>(shape);
28
+ *THIS = Reflex::ContactEvent(
29
+ (Reflex::ContactEvent::Action) to<uint>(action),
30
+ to<Reflex::Shape*>(shape));
29
31
 
30
32
  return rb_call_super(0, NULL);
31
33
  }
@@ -34,29 +36,29 @@ static
34
36
  VALUE initialize_copy(VALUE self, VALUE obj)
35
37
  {
36
38
  CHECK;
37
- *THIS = to<Reflex::ContactEvent&>(obj);
39
+ *THIS = to<Reflex::ContactEvent&>(obj).dup();
38
40
  return self;
39
41
  }
40
42
 
41
43
  static
42
- VALUE type(VALUE self)
44
+ VALUE get_action(VALUE self)
43
45
  {
44
46
  CHECK;
45
- return value(THIS->type);
47
+ return value(THIS->action());
46
48
  }
47
49
 
48
50
  static
49
- VALUE shape(VALUE self)
51
+ VALUE get_shape(VALUE self)
50
52
  {
51
53
  CHECK;
52
- return value(THIS->shape);
54
+ return value(THIS->shape());
53
55
  }
54
56
 
55
57
  static
56
- VALUE view(VALUE self)
58
+ VALUE get_view(VALUE self)
57
59
  {
58
60
  CHECK;
59
- return value(THIS->view);
61
+ return value(THIS->view());
60
62
  }
61
63
 
62
64
 
@@ -71,12 +73,12 @@ Init_contact_event ()
71
73
  rb_define_alloc_func(cContactEvent, alloc);
72
74
  rb_define_private_method(cContactEvent, "initialize", RUBY_METHOD_FUNC(initialize), 2);
73
75
  rb_define_private_method(cContactEvent, "initialize_copy", RUBY_METHOD_FUNC(initialize_copy), 1);
74
- rb_define_method(cContactEvent, "type", RUBY_METHOD_FUNC(type), 0);
75
- rb_define_method(cContactEvent, "shape", RUBY_METHOD_FUNC(shape), 0);
76
- rb_define_method(cContactEvent, "view", RUBY_METHOD_FUNC(view), 0);
77
- cContactEvent.define_const("TYPE_NONE", Reflex::ContactEvent::NONE);
78
- cContactEvent.define_const("TYPE_BEGIN", Reflex::ContactEvent::BEGIN);
79
- cContactEvent.define_const("TYPE_END", Reflex::ContactEvent::END);
76
+ rb_define_method(cContactEvent, "action", RUBY_METHOD_FUNC(get_action), 0);
77
+ rb_define_method(cContactEvent, "shape", RUBY_METHOD_FUNC(get_shape), 0);
78
+ rb_define_method(cContactEvent, "view", RUBY_METHOD_FUNC(get_view), 0);
79
+ cContactEvent.define_const("ACTION_NONE", Reflex::ContactEvent::ACTION_NONE);
80
+ cContactEvent.define_const("BEGIN", Reflex::ContactEvent::BEGIN);
81
+ cContactEvent.define_const("END", Reflex::ContactEvent::END);
80
82
  }
81
83
 
82
84
 
@@ -20,11 +20,13 @@ VALUE alloc(VALUE klass)
20
20
  }
21
21
 
22
22
  static
23
- VALUE initialize(VALUE self, VALUE dt)
23
+ VALUE initialize(VALUE self, VALUE dt, VALUE fps)
24
24
  {
25
25
  CHECK;
26
26
 
27
- THIS->dt = to<float>(dt);
27
+ *THIS = Reflex::DrawEvent(
28
+ to<float>(dt),
29
+ to<float>(fps));
28
30
 
29
31
  return rb_call_super(0, NULL);
30
32
  }
@@ -33,7 +35,7 @@ static
33
35
  VALUE initialize_copy(VALUE self, VALUE obj)
34
36
  {
35
37
  CHECK;
36
- *THIS = to<Reflex::DrawEvent&>(obj);
38
+ *THIS = to<Reflex::DrawEvent&>(obj).dup();
37
39
  return self;
38
40
  }
39
41
 
@@ -41,28 +43,28 @@ static
41
43
  VALUE painter(VALUE self)
42
44
  {
43
45
  CHECK;
44
- return value(THIS->painter);
46
+ return value(THIS->painter());
45
47
  }
46
48
 
47
49
  static
48
50
  VALUE bounds(VALUE self)
49
51
  {
50
52
  CHECK;
51
- return value(THIS->bounds);
53
+ return value(THIS->bounds());
52
54
  }
53
55
 
54
56
  static
55
57
  VALUE dt(VALUE self)
56
58
  {
57
59
  CHECK;
58
- return value(THIS->dt);
60
+ return value(THIS->dt());
59
61
  }
60
62
 
61
63
  static
62
64
  VALUE fps(VALUE self)
63
65
  {
64
66
  CHECK;
65
- return value(THIS->fps);
67
+ return value(THIS->fps());
66
68
  }
67
69
 
68
70
 
@@ -75,7 +77,7 @@ Init_draw_event ()
75
77
 
76
78
  cDrawEvent = mReflex.define_class("DrawEvent", Reflex::event_class());
77
79
  rb_define_alloc_func(cDrawEvent, alloc);
78
- rb_define_private_method(cDrawEvent, "initialize", RUBY_METHOD_FUNC(initialize), 1);
80
+ rb_define_private_method(cDrawEvent, "initialize", RUBY_METHOD_FUNC(initialize), 2);
79
81
  rb_define_private_method(cDrawEvent, "initialize_copy", RUBY_METHOD_FUNC(initialize_copy), 1);
80
82
  rb_define_method(cDrawEvent, "painter", RUBY_METHOD_FUNC(painter), 0);
81
83
  rb_define_method(cDrawEvent, "bounds", RUBY_METHOD_FUNC(bounds), 0);
@@ -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,29 +15,28 @@ RUCY_DEFINE_VALUE_FROM_TO(Reflex::Event)
14
15
  static
15
16
  VALUE alloc(VALUE klass)
16
17
  {
17
- return new_type<Reflex::Event>(klass);
18
+ Reflex::reflex_error(__FILE__, __LINE__, "can not instantiate Event class.");
18
19
  }
19
20
 
20
21
  static
21
- VALUE initialize_copy(VALUE self, VALUE obj)
22
+ VALUE block(VALUE self)
22
23
  {
23
24
  CHECK;
24
- *THIS = to<Reflex::Event&>(obj);
25
- return self;
25
+ THIS->block();
26
26
  }
27
27
 
28
28
  static
29
- VALUE block(VALUE self)
29
+ VALUE is_blocked(VALUE self)
30
30
  {
31
31
  CHECK;
32
- THIS->block();
32
+ return value(THIS->is_blocked());
33
33
  }
34
34
 
35
35
  static
36
- VALUE is_blocked(VALUE self)
36
+ VALUE get_time(VALUE self)
37
37
  {
38
38
  CHECK;
39
- return value(THIS->is_blocked());
39
+ return value(THIS->time());
40
40
  }
41
41
 
42
42
 
@@ -49,9 +49,9 @@ Init_event ()
49
49
 
50
50
  cEvent = rb_define_class_under(mReflex, "Event", rb_cObject);
51
51
  rb_define_alloc_func(cEvent, alloc);
52
- rb_define_private_method(cEvent, "initialize_copy", RUBY_METHOD_FUNC(initialize_copy), 1);
53
52
  rb_define_method(cEvent, "block", RUBY_METHOD_FUNC(block), 0);
54
- cEvent.define_method("block?", is_blocked);
53
+ cEvent.define_method("blocked?", is_blocked);
54
+ rb_define_method(cEvent, "time", RUBY_METHOD_FUNC(get_time), 0);
55
55
  }
56
56
 
57
57
 
@@ -19,13 +19,14 @@ VALUE alloc(VALUE klass)
19
19
  }
20
20
 
21
21
  static
22
- VALUE initialize(VALUE self, VALUE type, VALUE current, VALUE last)
22
+ VALUE initialize(VALUE self, VALUE action, VALUE current, VALUE last)
23
23
  {
24
24
  CHECK;
25
25
 
26
- THIS->type = (Reflex::FocusEvent::Type) to<uint>(type);
27
- THIS->current = to<Reflex::View*>(current);
28
- THIS->last = to<Reflex::View*>(last);
26
+ *THIS = Reflex::FocusEvent(
27
+ (Reflex::FocusEvent::Action) to<uint>(action),
28
+ to<Reflex::View*>(current),
29
+ to<Reflex::View*>(last));
29
30
 
30
31
  return rb_call_super(0, NULL);
31
32
  }
@@ -34,29 +35,29 @@ static
34
35
  VALUE initialize_copy(VALUE self, VALUE obj)
35
36
  {
36
37
  CHECK;
37
- *THIS = to<Reflex::FocusEvent&>(obj);
38
+ *THIS = to<Reflex::FocusEvent&>(obj).dup();
38
39
  return self;
39
40
  }
40
41
 
41
42
  static
42
- VALUE type(VALUE self)
43
+ VALUE get_action(VALUE self)
43
44
  {
44
45
  CHECK;
45
- return value(THIS->type);
46
+ return value(THIS->action());
46
47
  }
47
48
 
48
49
  static
49
- VALUE current(VALUE self)
50
+ VALUE get_current(VALUE self)
50
51
  {
51
52
  CHECK;
52
- return THIS->current ? value(THIS->current) : nil();
53
+ return THIS->current() ? value(THIS->current()) : nil();
53
54
  }
54
55
 
55
56
  static
56
- VALUE last(VALUE self)
57
+ VALUE get_last(VALUE self)
57
58
  {
58
59
  CHECK;
59
- return THIS->last ? value(THIS->last) : nil();
60
+ return THIS->last() ? value(THIS->last()) : nil();
60
61
  }
61
62
 
62
63
 
@@ -71,12 +72,12 @@ Init_focus_event ()
71
72
  rb_define_alloc_func(cFocusEvent, alloc);
72
73
  rb_define_private_method(cFocusEvent, "initialize", RUBY_METHOD_FUNC(initialize), 3);
73
74
  rb_define_private_method(cFocusEvent, "initialize_copy", RUBY_METHOD_FUNC(initialize_copy), 1);
74
- rb_define_method(cFocusEvent, "type", RUBY_METHOD_FUNC(type), 0);
75
- rb_define_method(cFocusEvent, "current", RUBY_METHOD_FUNC(current), 0);
76
- rb_define_method(cFocusEvent, "last", RUBY_METHOD_FUNC(last), 0);
77
- cFocusEvent.define_const("TYPE_NONE", Reflex::FocusEvent::NONE);
78
- cFocusEvent.define_const("TYPE_FOCUS", Reflex::FocusEvent::FOCUS);
79
- cFocusEvent.define_const("TYPE_BLUR", Reflex::FocusEvent::BLUR);
75
+ rb_define_method(cFocusEvent, "action", RUBY_METHOD_FUNC(get_action), 0);
76
+ rb_define_method(cFocusEvent, "current", RUBY_METHOD_FUNC(get_current), 0);
77
+ rb_define_method(cFocusEvent, "last", RUBY_METHOD_FUNC(get_last), 0);
78
+ cFocusEvent.define_const("ACTION_NONE", Reflex::FocusEvent::ACTION_NONE);
79
+ cFocusEvent.define_const("FOCUS", Reflex::FocusEvent::FOCUS);
80
+ cFocusEvent.define_const("BLUR", Reflex::FocusEvent::BLUR);
80
81
  }
81
82
 
82
83
 
@@ -20,15 +20,15 @@ VALUE alloc(VALUE klass)
20
20
  }
21
21
 
22
22
  static
23
- VALUE initialize(VALUE self, VALUE frame, VALUE dx, VALUE dy, VALUE dwidth, VALUE dheight)
23
+ VALUE initialize(VALUE self, VALUE frame, VALUE dx, VALUE dy, VALUE dwidth, VALUE dheight, VALUE angle, VALUE dangle)
24
24
  {
25
25
  CHECK;
26
26
 
27
- THIS->frame = to<Rays::Bounds>(frame);
28
- THIS->dx = to<coord>(dx);
29
- THIS->dy = to<coord>(dy);
30
- THIS->dwidth = to<coord>(dwidth);
31
- THIS->dheight = to<coord>(dheight);
27
+ *THIS = Reflex::FrameEvent(
28
+ to<Rays::Bounds>(frame),
29
+ to<coord>(dx), to<coord>(dy),
30
+ to<coord>(dwidth), to<coord>(dheight),
31
+ to<float>(angle), to<float>(dangle));
32
32
 
33
33
  return rb_call_super(0, NULL);
34
34
  }
@@ -37,7 +37,7 @@ static
37
37
  VALUE initialize_copy(VALUE self, VALUE obj)
38
38
  {
39
39
  CHECK;
40
- *THIS = to<Reflex::FrameEvent&>(obj);
40
+ *THIS = to<Reflex::FrameEvent&>(obj).dup();
41
41
  return self;
42
42
  }
43
43
 
@@ -45,63 +45,63 @@ static
45
45
  VALUE frame(VALUE self)
46
46
  {
47
47
  CHECK;
48
- return value(THIS->frame);
48
+ return value(THIS->frame());
49
49
  }
50
50
 
51
51
  static
52
52
  VALUE dx(VALUE self)
53
53
  {
54
54
  CHECK;
55
- return value(THIS->dx);
55
+ return value(THIS->dx());
56
56
  }
57
57
 
58
58
  static
59
59
  VALUE dy(VALUE self)
60
60
  {
61
61
  CHECK;
62
- return value(THIS->dy);
62
+ return value(THIS->dy());
63
63
  }
64
64
 
65
65
  static
66
66
  VALUE dwidth(VALUE self)
67
67
  {
68
68
  CHECK;
69
- return value(THIS->dwidth);
69
+ return value(THIS->dwidth());
70
70
  }
71
71
 
72
72
  static
73
73
  VALUE dheight(VALUE self)
74
74
  {
75
75
  CHECK;
76
- return value(THIS->dheight);
76
+ return value(THIS->dheight());
77
77
  }
78
78
 
79
79
  static
80
80
  VALUE dposition(VALUE self)
81
81
  {
82
82
  CHECK;
83
- return value(Rays::Point(THIS->dx, THIS->dy));
83
+ return value(Rays::Point(THIS->dx(), THIS->dy()));
84
84
  }
85
85
 
86
86
  static
87
87
  VALUE dsize(VALUE self)
88
88
  {
89
89
  CHECK;
90
- return value(Rays::Point(THIS->dw, THIS->dh));
90
+ return value(Rays::Point(THIS->dwidth(), THIS->dheight()));
91
91
  }
92
92
 
93
93
  static
94
94
  VALUE angle(VALUE self)
95
95
  {
96
96
  CHECK;
97
- return value(THIS->angle);
97
+ return value(THIS->angle());
98
98
  }
99
99
 
100
100
  static
101
101
  VALUE dangle(VALUE self)
102
102
  {
103
103
  CHECK;
104
- return value(THIS->dangle);
104
+ return value(THIS->dangle());
105
105
  }
106
106
 
107
107
  static
@@ -135,7 +135,7 @@ Init_frame_event ()
135
135
 
136
136
  cFrameEvent = mReflex.define_class("FrameEvent", Reflex::event_class());
137
137
  rb_define_alloc_func(cFrameEvent, alloc);
138
- rb_define_private_method(cFrameEvent, "initialize", RUBY_METHOD_FUNC(initialize), 5);
138
+ rb_define_private_method(cFrameEvent, "initialize", RUBY_METHOD_FUNC(initialize), 7);
139
139
  rb_define_private_method(cFrameEvent, "initialize_copy", RUBY_METHOD_FUNC(initialize_copy), 1);
140
140
  rb_define_method(cFrameEvent, "frame", RUBY_METHOD_FUNC(frame), 0);
141
141
  rb_define_method(cFrameEvent, "dx", RUBY_METHOD_FUNC(dx), 0);