reflexion 0.1.38 → 0.1.39

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/.doc/ext/reflex/capture_event.cpp +1 -1
  3. data/.doc/ext/reflex/event.cpp +7 -2
  4. data/.doc/ext/reflex/frame_event.cpp +25 -8
  5. data/.doc/ext/reflex/motion_event.cpp +4 -4
  6. data/.doc/ext/reflex/pointer.cpp +15 -6
  7. data/.doc/ext/reflex/pointer_event.cpp +0 -1
  8. data/.doc/ext/reflex/polygon_shape.cpp +1 -1
  9. data/.doc/ext/reflex/scroll_event.cpp +1 -1
  10. data/.doc/ext/reflex/style.cpp +2 -2
  11. data/.doc/ext/reflex/wheel_event.cpp +1 -1
  12. data/ChangeLog.md +14 -6
  13. data/VERSION +1 -1
  14. data/ext/reflex/capture_event.cpp +1 -1
  15. data/ext/reflex/defs.h +2 -2
  16. data/ext/reflex/event.cpp +7 -2
  17. data/ext/reflex/frame_event.cpp +26 -7
  18. data/ext/reflex/motion_event.cpp +4 -4
  19. data/ext/reflex/pointer.cpp +16 -6
  20. data/ext/reflex/pointer_event.cpp +0 -1
  21. data/ext/reflex/polygon_shape.cpp +1 -1
  22. data/ext/reflex/scroll_event.cpp +1 -1
  23. data/ext/reflex/selector.h +1 -1
  24. data/ext/reflex/style.cpp +2 -2
  25. data/ext/reflex/wheel_event.cpp +1 -1
  26. data/include/reflex/event.h +29 -13
  27. data/include/reflex/pointer.h +5 -3
  28. data/include/reflex/shape.h +1 -1
  29. data/lib/reflex/frame_event.rb +12 -2
  30. data/lib/reflex/pointer.rb +1 -1
  31. data/lib/reflex/pointer_event.rb +2 -2
  32. data/reflex.gemspec +4 -4
  33. data/src/body.h +1 -1
  34. data/src/event.cpp +83 -14
  35. data/src/event.h +11 -5
  36. data/src/fixture.h +1 -1
  37. data/src/ios/application.h +1 -1
  38. data/src/ios/event.mm +2 -1
  39. data/src/osx/application.h +1 -1
  40. data/src/osx/event.h +12 -6
  41. data/src/osx/event.mm +2 -1
  42. data/src/osx/native_window.mm +1 -1
  43. data/src/pointer.cpp +34 -18
  44. data/src/pointer.h +4 -2
  45. data/src/selector.h +1 -1
  46. data/src/shape.h +1 -1
  47. data/src/style.h +1 -1
  48. data/src/timer.h +1 -1
  49. data/src/view.cpp +149 -67
  50. data/src/view.h +1 -1
  51. data/src/win32/defs.h +1 -1
  52. data/src/window.cpp +25 -22
  53. data/src/window.h +15 -6
  54. data/src/world.h +1 -1
  55. data/test/test_event.rb +18 -15
  56. data/test/test_frame_event.rb +20 -16
  57. data/test/test_pointer.rb +20 -16
  58. data/test/test_pointer_event.rb +21 -21
  59. metadata +10 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5cd000da9cadc8587ea27cf2ef0d55c617aedd61e00e0fa84f0575215d81060f
4
- data.tar.gz: 66a9040b3b5d9233afe96b8869c981449403ddff9dd62a9a590d37f99ff14530
3
+ metadata.gz: 2a2bf359950c676836ffec40bf02fda296c2111f09cf585ad546b0ecc8edc296
4
+ data.tar.gz: 2366d63f0d4512bf3f71cf1a16e355f4b98123f7473bdfa5f8d95bdbf87536aa
5
5
  SHA512:
6
- metadata.gz: e2d19b6fd82f8f0d81bb6a774d6a829bf84a92e61cb5c5305c9815d76b39118a22f513f7b776f3fd039d65c41a1bf8b3dafc4a094db64adb7cbc42e7dd517503
7
- data.tar.gz: 51c91ee902178f44c5b1f100d511179e47bc023f46411255ac4e72da03db07b0db3346e9283ff0ba2e0651d0fc9348fb93d7cf6bc761e29f311d1d3cf29d3bc8
6
+ metadata.gz: 33e83a7603fa2749030b58d321d5ee9a808283095d43dc7c5772a6890d1758abe2993d7392f7f820c83eeb9b2fecea690ded0e4dc8689c8815b4397870429229
7
+ data.tar.gz: 7d604628381cf76bed34cae3126739d5658d007c6924ef3d6ce0e7459476a4513099b7f61932f6aa82110a1458ee73c508b59719d6049f37e97dcffb710caf9f
@@ -1,7 +1,7 @@
1
1
  #include "reflex/ruby/event.h"
2
2
 
3
3
 
4
- #include "rays/ruby/point.h"
4
+ #include <rays/ruby/point.h>
5
5
  #include "defs.h"
6
6
 
7
7
 
@@ -22,7 +22,12 @@ static
22
22
  VALUE block(VALUE self)
23
23
  {
24
24
  CHECK;
25
- THIS->block();
25
+ check_arg_count(__FILE__, __LINE__, "Event#block", argc, 0, 1);
26
+
27
+ if (argc >= 1)
28
+ THIS->block((bool) argv[0]);
29
+ else
30
+ THIS->block();
26
31
  }
27
32
 
28
33
  static
@@ -49,7 +54,7 @@ Init_reflex_event ()
49
54
 
50
55
  cEvent = rb_define_class_under(mReflex, "Event", rb_cObject);
51
56
  rb_define_alloc_func(cEvent, alloc);
52
- rb_define_method(cEvent, "block", RUBY_METHOD_FUNC(block), 0);
57
+ rb_define_method(cEvent, "block", RUBY_METHOD_FUNC(block), -1);
53
58
  cEvent.define_method("blocked?", is_blocked);
54
59
  rb_define_method(cEvent, "time", RUBY_METHOD_FUNC(get_time), 0);
55
60
  }
@@ -1,8 +1,8 @@
1
1
  #include "reflex/ruby/event.h"
2
2
 
3
3
 
4
- #include "rays/ruby/point.h"
5
- #include "rays/ruby/bounds.h"
4
+ #include <rays/ruby/point.h>
5
+ #include <rays/ruby/bounds.h>
6
6
  #include "defs.h"
7
7
 
8
8
 
@@ -20,14 +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, VALUE zoom, VALUE dzoom, VALUE angle, VALUE dangle)
23
+ VALUE initialize(VALUE self, VALUE
24
+ frame, VALUE dx, VALUE dy, VALUE dz, VALUE dwidth, VALUE dheight, VALUE ddepth, VALUE zoom, VALUE dzoom, VALUE angle, VALUE dangle)
24
25
  {
25
26
  CHECK;
26
27
 
27
28
  *THIS = Reflex::FrameEvent(
28
29
  to<Rays::Bounds>(frame),
29
- to<coord>(dx), to<coord>(dy),
30
- to<coord>(dwidth), to<coord>(dheight),
30
+ to<coord>(dx), to<coord>(dy), to<coord>(dz),
31
+ to<coord>(dwidth), to<coord>(dheight), to<coord>(ddepth),
31
32
  to<float>(zoom), to<float>(dzoom),
32
33
  to<float>(angle), to<float>(dangle));
33
34
 
@@ -63,6 +64,13 @@ VALUE dy(VALUE self)
63
64
  return value(THIS->dy());
64
65
  }
65
66
 
67
+ static
68
+ VALUE dz(VALUE self)
69
+ {
70
+ CHECK;
71
+ return value(THIS->dz());
72
+ }
73
+
66
74
  static
67
75
  VALUE dwidth(VALUE self)
68
76
  {
@@ -77,18 +85,25 @@ VALUE dheight(VALUE self)
77
85
  return value(THIS->dheight());
78
86
  }
79
87
 
88
+ static
89
+ VALUE ddepth(VALUE self)
90
+ {
91
+ CHECK;
92
+ return value(THIS->ddepth());
93
+ }
94
+
80
95
  static
81
96
  VALUE dposition(VALUE self)
82
97
  {
83
98
  CHECK;
84
- return value(Rays::Point(THIS->dx(), THIS->dy()));
99
+ return value(Rays::Point(THIS->dx(), THIS->dy(), THIS->dz()));
85
100
  }
86
101
 
87
102
  static
88
103
  VALUE dsize(VALUE self)
89
104
  {
90
105
  CHECK;
91
- return value(Rays::Point(THIS->dwidth(), THIS->dheight()));
106
+ return value(Rays::Point(THIS->dwidth(), THIS->dheight(), THIS->ddepth()));
92
107
  }
93
108
 
94
109
  static
@@ -157,13 +172,15 @@ Init_reflex_frame_event ()
157
172
 
158
173
  cFrameEvent = mReflex.define_class("FrameEvent", Reflex::event_class());
159
174
  rb_define_alloc_func(cFrameEvent, alloc);
160
- rb_define_private_method(cFrameEvent, "initialize", RUBY_METHOD_FUNC(initialize), 9);
175
+ rb_define_private_method(cFrameEvent, "initialize", RUBY_METHOD_FUNC(initialize), 11);
161
176
  rb_define_private_method(cFrameEvent, "initialize_copy", RUBY_METHOD_FUNC(initialize_copy), 1);
162
177
  rb_define_method(cFrameEvent, "frame", RUBY_METHOD_FUNC(frame), 0);
163
178
  rb_define_method(cFrameEvent, "dx", RUBY_METHOD_FUNC(dx), 0);
164
179
  rb_define_method(cFrameEvent, "dy", RUBY_METHOD_FUNC(dy), 0);
180
+ rb_define_method(cFrameEvent, "dz", RUBY_METHOD_FUNC(dz), 0);
165
181
  rb_define_method(cFrameEvent, "dwidth", RUBY_METHOD_FUNC(dwidth), 0);
166
182
  rb_define_method(cFrameEvent, "dheight", RUBY_METHOD_FUNC(dheight), 0);
183
+ rb_define_method(cFrameEvent, "ddepth", RUBY_METHOD_FUNC(ddepth), 0);
167
184
  rb_define_method(cFrameEvent, "dposition", RUBY_METHOD_FUNC(dposition), 0);
168
185
  rb_define_method(cFrameEvent, "dsize", RUBY_METHOD_FUNC(dsize), 0);
169
186
  rb_define_method(cFrameEvent, "zoom", RUBY_METHOD_FUNC(zoom), 0);
@@ -1,7 +1,7 @@
1
1
  #include "reflex/ruby/event.h"
2
2
 
3
3
 
4
- #include "rays/ruby/point.h"
4
+ #include <rays/ruby/point.h>
5
5
  #include "defs.h"
6
6
 
7
7
 
@@ -23,7 +23,7 @@ VALUE initialize(VALUE self, VALUE gravity)
23
23
  {
24
24
  CHECK;
25
25
 
26
- THIS->gravity = to<Rays::Point>(gravity);
26
+ *THIS = Reflex::MotionEvent(to<Rays::Point>(gravity));
27
27
 
28
28
  return rb_call_super(0, NULL);
29
29
  }
@@ -32,7 +32,7 @@ static
32
32
  VALUE initialize_copy(VALUE self, VALUE obj)
33
33
  {
34
34
  CHECK;
35
- *THIS = to<Reflex::MotionEvent&>(obj);
35
+ *THIS = to<Reflex::MotionEvent&>(obj).dup();
36
36
  return self;
37
37
  }
38
38
 
@@ -40,7 +40,7 @@ static
40
40
  VALUE gravity(VALUE self)
41
41
  {
42
42
  CHECK;
43
- return value(THIS->gravity);
43
+ return value(THIS->gravity());
44
44
  }
45
45
 
46
46
 
@@ -20,7 +20,7 @@ VALUE alloc(VALUE klass)
20
20
 
21
21
  static
22
22
  VALUE initialize(VALUE self, VALUE
23
- id, VALUE type, VALUE action, VALUE position, VALUE modifiers, VALUE click_count, VALUE drag, VALUE time)
23
+ id, VALUE type, VALUE action, VALUE position, VALUE modifiers, VALUE drag, VALUE click_count, VALUE view_index, VALUE time)
24
24
  {
25
25
  CHECK;
26
26
 
@@ -30,8 +30,9 @@ VALUE initialize(VALUE self, VALUE
30
30
  (Reflex::Pointer::Action) to<int>(action),
31
31
  to<Rays::Point>(position),
32
32
  to<uint>(modifiers),
33
- to<uint>(click_count),
34
33
  to<bool>(drag),
34
+ to<uint>(click_count),
35
+ to<uint>(view_index),
35
36
  to<double>(time));
36
37
  return self;
37
38
  }
@@ -79,6 +80,13 @@ VALUE get_modifiers(VALUE self)
79
80
  return value(THIS->modifiers());
80
81
  }
81
82
 
83
+ static
84
+ VALUE is_drag(VALUE self)
85
+ {
86
+ CHECK;
87
+ return value(THIS->is_drag());
88
+ }
89
+
82
90
  static
83
91
  VALUE get_click_count(VALUE self)
84
92
  {
@@ -87,10 +95,10 @@ VALUE get_click_count(VALUE self)
87
95
  }
88
96
 
89
97
  static
90
- VALUE is_drag(VALUE self)
98
+ VALUE get_view_index(VALUE self)
91
99
  {
92
100
  CHECK;
93
- return value(THIS->is_drag());
101
+ return value(THIS->view_index());
94
102
  }
95
103
 
96
104
  static
@@ -117,15 +125,16 @@ Init_reflex_pointer ()
117
125
 
118
126
  cPointer = rb_define_class_under(mReflex, "Pointer", rb_cObject);
119
127
  rb_define_alloc_func(cPointer, alloc);
120
- rb_define_private_method(cPointer, "initialize", RUBY_METHOD_FUNC(initialize), 8);
128
+ rb_define_private_method(cPointer, "initialize", RUBY_METHOD_FUNC(initialize), 9);
121
129
  rb_define_private_method(cPointer, "initialize_copy", RUBY_METHOD_FUNC(initialize_copy), 1);
122
130
  rb_define_method(cPointer, "id", RUBY_METHOD_FUNC(get_id), 0);
123
131
  rb_define_private_method(cPointer, "get_type", RUBY_METHOD_FUNC(get_type), 0);
124
132
  rb_define_private_method(cPointer, "get_action", RUBY_METHOD_FUNC(get_action), 0);
125
133
  rb_define_method(cPointer, "position", RUBY_METHOD_FUNC(get_position), 0);
126
134
  rb_define_method(cPointer, "modifiers", RUBY_METHOD_FUNC(get_modifiers), 0);
127
- rb_define_method(cPointer, "click_count", RUBY_METHOD_FUNC(get_click_count), 0);
128
135
  cPointer.define_method("drag?", is_drag);
136
+ rb_define_method(cPointer, "click_count", RUBY_METHOD_FUNC(get_click_count), 0);
137
+ rb_define_method(cPointer, "view_index", RUBY_METHOD_FUNC(get_view_index), 0);
129
138
  rb_define_method(cPointer, "time", RUBY_METHOD_FUNC(get_time), 0);
130
139
  rb_define_method(cPointer, "prev", RUBY_METHOD_FUNC(get_prev), 0);
131
140
  cPointer.define_const("TYPE_NONE", Reflex::Pointer::TYPE_NONE);
@@ -33,7 +33,6 @@ VALUE initialize(VALUE self)
33
33
  pointers.emplace_back(to<Reflex::Pointer&>(argv[i]));
34
34
 
35
35
  *THIS = Reflex::PointerEvent(&pointers[0], pointers.size());
36
-
37
36
  return rb_call_super(0, NULL);
38
37
  }
39
38
 
@@ -1,7 +1,7 @@
1
1
  #include "reflex/ruby/shape.h"
2
2
 
3
3
 
4
- #include "rays/ruby/polygon.h"
4
+ #include <rays/ruby/polygon.h>
5
5
  #include "defs.h"
6
6
 
7
7
 
@@ -1,7 +1,7 @@
1
1
  #include "reflex/ruby/event.h"
2
2
 
3
3
 
4
- #include "rays/ruby/point.h"
4
+ #include <rays/ruby/point.h>
5
5
  #include "defs.h"
6
6
 
7
7
 
@@ -1,8 +1,8 @@
1
1
  #include "reflex/ruby/style.h"
2
2
 
3
3
 
4
- #include "rays/ruby/color.h"
5
- #include "rays/ruby/image.h"
4
+ #include <rays/ruby/color.h>
5
+ #include <rays/ruby/image.h>
6
6
  #include "reflex/ruby/selector.h"
7
7
  #include "defs.h"
8
8
  #include "selector.h"
@@ -1,7 +1,7 @@
1
1
  #include "reflex/ruby/event.h"
2
2
 
3
3
 
4
- #include "rays/ruby/point.h"
4
+ #include <rays/ruby/point.h>
5
5
  #include "defs.h"
6
6
 
7
7
 
data/ChangeLog.md CHANGED
@@ -1,6 +1,14 @@
1
1
  # reflex ChangeLog
2
2
 
3
3
 
4
+ ## [v0.1.39] - 2023-05-18
5
+
6
+ - Event#block has a bool parameter, which defaults to true
7
+ - Add z and depth value to FrameEvent class
8
+ - Sort child views by z position
9
+ - Add Pointer#view_index
10
+
11
+
4
12
  ## [v0.1.38] - 2023-05-13
5
13
 
6
14
  - View: Reimplemented from_parent(), to_parent(), from_window(), to_window(), from_screen(), and to_screen() to account for rotation, zoom, and scrolling during coordinate transformation
@@ -40,17 +48,17 @@
40
48
 
41
49
  ## [v0.1.32] - 2023-03-01
42
50
 
43
- - fix bugs
51
+ - Fix bugs
44
52
 
45
53
 
46
54
  ## [v0.1.31] - 2023-02-27
47
55
 
48
- - add ChangeLog.md file
49
- - add test.yml, tag.yaml, and release.yml
50
- - requires ruby 2.7.0 or later
56
+ - Add ChangeLog.md file
57
+ - Add test.yml, tag.yaml, and release.yml
58
+ - Requires ruby 2.7.0 or later
51
59
 
52
60
 
53
61
  ## [v0.1.30] - 2023-02-09
54
62
 
55
- - fix conflicting reflex's Init_exception() and others Init_exception()
56
- - refactoring
63
+ - Fix conflicting reflex's Init_exception() and others Init_exception()
64
+ - Refactoring
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.38
1
+ 0.1.39
@@ -1,7 +1,7 @@
1
1
  #include "reflex/ruby/event.h"
2
2
 
3
3
 
4
- #include "rays/ruby/point.h"
4
+ #include <rays/ruby/point.h>
5
5
  #include "defs.h"
6
6
 
7
7
 
data/ext/reflex/defs.h CHANGED
@@ -5,8 +5,8 @@
5
5
 
6
6
 
7
7
  #include <rucy.h>
8
- #include <reflex/defs.h>
9
- #include <reflex/ruby/defs.h>
8
+ #include "reflex/defs.h"
9
+ #include "reflex/ruby/defs.h"
10
10
 
11
11
 
12
12
  using namespace Rucy;
data/ext/reflex/event.cpp CHANGED
@@ -20,10 +20,15 @@ RUCY_DEF_ALLOC(alloc, klass)
20
20
  RUCY_END
21
21
 
22
22
  static
23
- RUCY_DEF0(block)
23
+ RUCY_DEFN(block)
24
24
  {
25
25
  CHECK;
26
- THIS->block();
26
+ check_arg_count(__FILE__, __LINE__, "Event#block", argc, 0, 1);
27
+
28
+ if (argc >= 1)
29
+ THIS->block((bool) argv[0]);
30
+ else
31
+ THIS->block();
27
32
  }
28
33
  RUCY_END
29
34
 
@@ -1,8 +1,8 @@
1
1
  #include "reflex/ruby/event.h"
2
2
 
3
3
 
4
- #include "rays/ruby/point.h"
5
- #include "rays/ruby/bounds.h"
4
+ #include <rays/ruby/point.h>
5
+ #include <rays/ruby/bounds.h>
6
6
  #include "defs.h"
7
7
 
8
8
 
@@ -21,14 +21,15 @@ RUCY_DEF_ALLOC(alloc, klass)
21
21
  RUCY_END
22
22
 
23
23
  static
24
- RUCY_DEF9(initialize, frame, dx, dy, dwidth, dheight, zoom, dzoom, angle, dangle)
24
+ RUCY_DEF11(initialize,
25
+ frame, dx, dy, dz, dwidth, dheight, ddepth, zoom, dzoom, angle, dangle)
25
26
  {
26
27
  CHECK;
27
28
 
28
29
  *THIS = Reflex::FrameEvent(
29
30
  to<Rays::Bounds>(frame),
30
- to<coord>(dx), to<coord>(dy),
31
- to<coord>(dwidth), to<coord>(dheight),
31
+ to<coord>(dx), to<coord>(dy), to<coord>(dz),
32
+ to<coord>(dwidth), to<coord>(dheight), to<coord>(ddepth),
32
33
  to<float>(zoom), to<float>(dzoom),
33
34
  to<float>(angle), to<float>(dangle));
34
35
 
@@ -69,6 +70,14 @@ RUCY_DEF0(dy)
69
70
  }
70
71
  RUCY_END
71
72
 
73
+ static
74
+ RUCY_DEF0(dz)
75
+ {
76
+ CHECK;
77
+ return value(THIS->dz());
78
+ }
79
+ RUCY_END
80
+
72
81
  static
73
82
  RUCY_DEF0(dwidth)
74
83
  {
@@ -85,11 +94,19 @@ RUCY_DEF0(dheight)
85
94
  }
86
95
  RUCY_END
87
96
 
97
+ static
98
+ RUCY_DEF0(ddepth)
99
+ {
100
+ CHECK;
101
+ return value(THIS->ddepth());
102
+ }
103
+ RUCY_END
104
+
88
105
  static
89
106
  RUCY_DEF0(dposition)
90
107
  {
91
108
  CHECK;
92
- return value(Rays::Point(THIS->dx(), THIS->dy()));
109
+ return value(Rays::Point(THIS->dx(), THIS->dy(), THIS->dz()));
93
110
  }
94
111
  RUCY_END
95
112
 
@@ -97,7 +114,7 @@ static
97
114
  RUCY_DEF0(dsize)
98
115
  {
99
116
  CHECK;
100
- return value(Rays::Point(THIS->dwidth(), THIS->dheight()));
117
+ return value(Rays::Point(THIS->dwidth(), THIS->dheight(), THIS->ddepth()));
101
118
  }
102
119
  RUCY_END
103
120
 
@@ -180,8 +197,10 @@ Init_reflex_frame_event ()
180
197
  cFrameEvent.define_method("frame", frame);
181
198
  cFrameEvent.define_method("dx", dx);
182
199
  cFrameEvent.define_method("dy", dy);
200
+ cFrameEvent.define_method("dz", dz);
183
201
  cFrameEvent.define_method("dwidth", dwidth);
184
202
  cFrameEvent.define_method("dheight", dheight);
203
+ cFrameEvent.define_method("ddepth", ddepth);
185
204
  cFrameEvent.define_method("dposition", dposition);
186
205
  cFrameEvent.define_method("dsize", dsize);
187
206
  cFrameEvent.define_method( "zoom", zoom);
@@ -1,7 +1,7 @@
1
1
  #include "reflex/ruby/event.h"
2
2
 
3
3
 
4
- #include "rays/ruby/point.h"
4
+ #include <rays/ruby/point.h>
5
5
  #include "defs.h"
6
6
 
7
7
 
@@ -24,7 +24,7 @@ RUCY_DEF1(initialize, gravity)
24
24
  {
25
25
  CHECK;
26
26
 
27
- THIS->gravity = to<Rays::Point>(gravity);
27
+ *THIS = Reflex::MotionEvent(to<Rays::Point>(gravity));
28
28
 
29
29
  return rb_call_super(0, NULL);
30
30
  }
@@ -34,7 +34,7 @@ static
34
34
  RUCY_DEF1(initialize_copy, obj)
35
35
  {
36
36
  CHECK;
37
- *THIS = to<Reflex::MotionEvent&>(obj);
37
+ *THIS = to<Reflex::MotionEvent&>(obj).dup();
38
38
  return self;
39
39
  }
40
40
  RUCY_END
@@ -43,7 +43,7 @@ static
43
43
  RUCY_DEF0(gravity)
44
44
  {
45
45
  CHECK;
46
- return value(THIS->gravity);
46
+ return value(THIS->gravity());
47
47
  }
48
48
  RUCY_END
49
49
 
@@ -20,8 +20,8 @@ RUCY_DEF_ALLOC(alloc, klass)
20
20
  RUCY_END
21
21
 
22
22
  static
23
- RUCY_DEF8(initialize,
24
- id, type, action, position, modifiers, click_count, drag, time)
23
+ RUCY_DEF9(initialize,
24
+ id, type, action, position, modifiers, drag, click_count, view_index, time)
25
25
  {
26
26
  CHECK;
27
27
 
@@ -31,8 +31,9 @@ RUCY_DEF8(initialize,
31
31
  (Reflex::Pointer::Action) to<int>(action),
32
32
  to<Rays::Point>(position),
33
33
  to<uint>(modifiers),
34
- to<uint>(click_count),
35
34
  to<bool>(drag),
35
+ to<uint>(click_count),
36
+ to<uint>(view_index),
36
37
  to<double>(time));
37
38
  return self;
38
39
  }
@@ -87,6 +88,14 @@ RUCY_DEF0(get_modifiers)
87
88
  }
88
89
  RUCY_END
89
90
 
91
+ static
92
+ RUCY_DEF0(is_drag)
93
+ {
94
+ CHECK;
95
+ return value(THIS->is_drag());
96
+ }
97
+ RUCY_END
98
+
90
99
  static
91
100
  RUCY_DEF0(get_click_count)
92
101
  {
@@ -96,10 +105,10 @@ RUCY_DEF0(get_click_count)
96
105
  RUCY_END
97
106
 
98
107
  static
99
- RUCY_DEF0(is_drag)
108
+ RUCY_DEF0(get_view_index)
100
109
  {
101
110
  CHECK;
102
- return value(THIS->is_drag());
111
+ return value(THIS->view_index());
103
112
  }
104
113
  RUCY_END
105
114
 
@@ -136,8 +145,9 @@ Init_reflex_pointer ()
136
145
  cPointer.define_private_method("get_action", get_action);
137
146
  cPointer.define_method("position", get_position);
138
147
  cPointer.define_method("modifiers", get_modifiers);
139
- cPointer.define_method("click_count", get_click_count);
140
148
  cPointer.define_method("drag?", is_drag);
149
+ cPointer.define_method("click_count", get_click_count);
150
+ cPointer.define_method("view_index", get_view_index);
141
151
  cPointer.define_method("time", get_time);
142
152
  cPointer.define_method("prev", get_prev);
143
153
  cPointer.define_const("TYPE_NONE", Reflex::Pointer::TYPE_NONE);
@@ -34,7 +34,6 @@ RUCY_DEFN(initialize)
34
34
  pointers.emplace_back(to<Reflex::Pointer&>(argv[i]));
35
35
 
36
36
  *THIS = Reflex::PointerEvent(&pointers[0], pointers.size());
37
-
38
37
  return rb_call_super(0, NULL);
39
38
  }
40
39
  RUCY_END
@@ -1,7 +1,7 @@
1
1
  #include "reflex/ruby/shape.h"
2
2
 
3
3
 
4
- #include "rays/ruby/polygon.h"
4
+ #include <rays/ruby/polygon.h>
5
5
  #include "defs.h"
6
6
 
7
7
 
@@ -1,7 +1,7 @@
1
1
  #include "reflex/ruby/event.h"
2
2
 
3
3
 
4
- #include "rays/ruby/point.h"
4
+ #include <rays/ruby/point.h>
5
5
  #include "defs.h"
6
6
 
7
7
 
@@ -4,7 +4,7 @@
4
4
  #define __REFLEX_EXT_SELECTOR_H__
5
5
 
6
6
 
7
- #include <reflex/ruby/selector.h>
7
+ #include "reflex/ruby/selector.h"
8
8
 
9
9
 
10
10
  template <typename T>
data/ext/reflex/style.cpp CHANGED
@@ -1,8 +1,8 @@
1
1
  #include "reflex/ruby/style.h"
2
2
 
3
3
 
4
- #include "rays/ruby/color.h"
5
- #include "rays/ruby/image.h"
4
+ #include <rays/ruby/color.h>
5
+ #include <rays/ruby/image.h>
6
6
  #include "reflex/ruby/selector.h"
7
7
  #include "defs.h"
8
8
  #include "selector.h"
@@ -1,7 +1,7 @@
1
1
  #include "reflex/ruby/event.h"
2
2
 
3
3
 
4
- #include "rays/ruby/point.h"
4
+ #include <rays/ruby/point.h>
5
5
  #include "defs.h"
6
6
 
7
7