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.
- checksums.yaml +4 -4
- data/.doc/ext/reflex/capture_event.cpp +6 -5
- data/.doc/ext/reflex/contact_event.cpp +18 -16
- data/.doc/ext/reflex/draw_event.cpp +10 -8
- data/.doc/ext/reflex/event.cpp +10 -10
- data/.doc/ext/reflex/focus_event.cpp +18 -17
- data/.doc/ext/reflex/frame_event.cpp +17 -17
- data/.doc/ext/reflex/key_event.cpp +227 -28
- data/.doc/ext/reflex/native.cpp +2 -0
- data/.doc/ext/reflex/pointer.cpp +158 -0
- data/.doc/ext/reflex/pointer_event.cpp +32 -91
- data/.doc/ext/reflex/scroll_event.cpp +14 -17
- data/.doc/ext/reflex/selector.cpp +8 -0
- data/.doc/ext/reflex/timer.cpp +9 -1
- data/.doc/ext/reflex/timer_event.cpp +4 -13
- data/.doc/ext/reflex/update_event.cpp +6 -5
- data/.doc/ext/reflex/view.cpp +57 -0
- data/.doc/ext/reflex/wheel_event.cpp +39 -22
- data/.doc/ext/reflex/window.cpp +41 -0
- data/VERSION +1 -1
- data/ext/reflex/capture_event.cpp +6 -5
- data/ext/reflex/contact_event.cpp +18 -16
- data/ext/reflex/draw_event.cpp +9 -7
- data/ext/reflex/event.cpp +11 -11
- data/ext/reflex/focus_event.cpp +18 -17
- data/ext/reflex/frame_event.cpp +16 -16
- data/ext/reflex/key_event.cpp +228 -28
- data/ext/reflex/native.cpp +2 -0
- data/ext/reflex/pointer.cpp +170 -0
- data/ext/reflex/pointer_event.cpp +31 -96
- data/ext/reflex/scroll_event.cpp +15 -18
- data/ext/reflex/selector.cpp +9 -0
- data/ext/reflex/timer.cpp +15 -6
- data/ext/reflex/timer_event.cpp +9 -19
- data/ext/reflex/update_event.cpp +6 -5
- data/ext/reflex/view.cpp +67 -3
- data/ext/reflex/wheel_event.cpp +40 -21
- data/ext/reflex/window.cpp +49 -3
- data/include/reflex/defs.h +140 -106
- data/include/reflex/event.h +232 -124
- data/include/reflex/pointer.h +107 -0
- data/include/reflex/ruby/pointer.h +41 -0
- data/include/reflex/ruby/view.h +9 -0
- data/include/reflex/ruby/window.h +9 -0
- data/include/reflex/selector.h +1 -1
- data/include/reflex/shape.h +2 -2
- data/include/reflex/view.h +6 -4
- data/include/reflex/window.h +14 -8
- data/lib/reflex/application.rb +3 -3
- data/lib/reflex/autoinit.rb +1 -1
- data/lib/reflex/button.rb +7 -7
- data/lib/reflex/capture_event.rb +7 -7
- data/lib/reflex/contact_event.rb +10 -10
- data/lib/reflex/draw_event.rb +2 -2
- data/lib/reflex/ellipse_shape.rb +2 -2
- data/lib/reflex/focus_event.rb +11 -11
- data/lib/reflex/frame_event.rb +5 -5
- data/lib/reflex/helper.rb +20 -20
- data/lib/reflex/image_view.rb +2 -2
- data/lib/reflex/key_event.rb +12 -12
- data/lib/reflex/model.rb +22 -22
- data/lib/reflex/model_owner.rb +7 -7
- data/lib/reflex/model_view.rb +1 -1
- data/lib/reflex/module.rb +5 -5
- data/lib/reflex/pointer.rb +107 -0
- data/lib/reflex/pointer_event.rb +16 -54
- data/lib/reflex/polygon_shape.rb +2 -2
- data/lib/reflex/reflex.rb +3 -3
- data/lib/reflex/scroll_event.rb +1 -1
- data/lib/reflex/selector.rb +4 -4
- data/lib/reflex/shape.rb +13 -13
- data/lib/reflex/style.rb +11 -11
- data/lib/reflex/style_length.rb +1 -1
- data/lib/reflex/text_view.rb +2 -2
- data/lib/reflex/timer.rb +2 -2
- data/lib/reflex/timer_event.rb +3 -2
- data/lib/reflex/update_event.rb +1 -1
- data/lib/reflex/view.rb +32 -32
- data/lib/reflex/wheel_event.rb +2 -10
- data/lib/reflex/window.rb +8 -7
- data/lib/reflex.rb +1 -0
- data/lib/reflexion.rb +17 -17
- data/reflex.gemspec +5 -5
- data/samples/reflexion/noise.rb +1 -1
- data/samples/tree.rb +1 -1
- data/src/event.cpp +792 -86
- data/src/event.h +47 -0
- data/src/image_view.cpp +2 -2
- data/src/ios/event.h +15 -3
- data/src/ios/event.mm +126 -11
- data/src/ios/view_controller.mm +51 -23
- data/src/ios/window.mm +18 -0
- data/src/osx/event.h +15 -4
- data/src/osx/event.mm +214 -24
- data/src/osx/native_window.mm +85 -18
- data/src/osx/window.mm +22 -0
- data/src/pointer.cpp +203 -0
- data/src/pointer.h +26 -0
- data/src/selector.cpp +1 -1
- data/src/shape.cpp +11 -13
- data/src/shape.h +1 -1
- data/src/view.cpp +205 -118
- data/src/view.h +5 -10
- data/src/window.cpp +346 -104
- data/src/window.h +28 -3
- data/src/world.cpp +6 -4
- data/test/helper.rb +3 -3
- data/test/test_application.rb +1 -1
- data/test/test_capture_event.rb +22 -6
- data/test/test_contact_event.rb +40 -0
- data/test/test_draw_event.rb +35 -0
- data/test/test_event.rb +33 -5
- data/test/test_focus_event.rb +34 -0
- data/test/test_frame_event.rb +38 -0
- data/test/test_has_frame.rb +11 -11
- data/test/test_key_event.rb +33 -0
- data/test/test_pointer.rb +149 -0
- data/test/test_pointer_event.rb +70 -104
- data/test/test_reflex.rb +1 -1
- data/test/test_scroll_event.rb +39 -0
- data/test/test_selector.rb +15 -8
- data/test/test_shape.rb +8 -8
- data/test/test_style.rb +13 -13
- data/test/test_style_length.rb +5 -5
- data/test/test_timer_event.rb +38 -0
- data/test/test_update_event.rb +29 -0
- data/test/test_view.rb +57 -30
- data/test/test_wheel_event.rb +40 -0
- data/test/test_window.rb +45 -26
- metadata +64 -35
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b21f636473fd5ec680195625f775ee0e324c0a8b75da8b54495fa65fc4831240
|
4
|
+
data.tar.gz: f5fdb73a7042b0c8fbacecd3da1b12cd568540fb4bbff732bdec166870c9f3b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
27
|
-
|
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
|
24
|
+
VALUE initialize(VALUE self, VALUE action, VALUE shape)
|
24
25
|
{
|
25
26
|
CHECK;
|
26
27
|
|
27
|
-
THIS
|
28
|
-
|
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
|
44
|
+
VALUE get_action(VALUE self)
|
43
45
|
{
|
44
46
|
CHECK;
|
45
|
-
return value(THIS->
|
47
|
+
return value(THIS->action());
|
46
48
|
}
|
47
49
|
|
48
50
|
static
|
49
|
-
VALUE
|
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
|
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, "
|
75
|
-
rb_define_method(cContactEvent, "shape", RUBY_METHOD_FUNC(
|
76
|
-
rb_define_method(cContactEvent, "view", RUBY_METHOD_FUNC(
|
77
|
-
cContactEvent.define_const("
|
78
|
-
cContactEvent.define_const("
|
79
|
-
cContactEvent.define_const("
|
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
|
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),
|
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);
|
data/.doc/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,29 +15,28 @@ RUCY_DEFINE_VALUE_FROM_TO(Reflex::Event)
|
|
14
15
|
static
|
15
16
|
VALUE alloc(VALUE klass)
|
16
17
|
{
|
17
|
-
|
18
|
+
Reflex::reflex_error(__FILE__, __LINE__, "can not instantiate Event class.");
|
18
19
|
}
|
19
20
|
|
20
21
|
static
|
21
|
-
VALUE
|
22
|
+
VALUE block(VALUE self)
|
22
23
|
{
|
23
24
|
CHECK;
|
24
|
-
|
25
|
-
return self;
|
25
|
+
THIS->block();
|
26
26
|
}
|
27
27
|
|
28
28
|
static
|
29
|
-
VALUE
|
29
|
+
VALUE is_blocked(VALUE self)
|
30
30
|
{
|
31
31
|
CHECK;
|
32
|
-
THIS->
|
32
|
+
return value(THIS->is_blocked());
|
33
33
|
}
|
34
34
|
|
35
35
|
static
|
36
|
-
VALUE
|
36
|
+
VALUE get_time(VALUE self)
|
37
37
|
{
|
38
38
|
CHECK;
|
39
|
-
return value(THIS->
|
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("
|
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
|
22
|
+
VALUE initialize(VALUE self, VALUE action, VALUE current, VALUE last)
|
23
23
|
{
|
24
24
|
CHECK;
|
25
25
|
|
26
|
-
THIS
|
27
|
-
|
28
|
-
|
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
|
43
|
+
VALUE get_action(VALUE self)
|
43
44
|
{
|
44
45
|
CHECK;
|
45
|
-
return value(THIS->
|
46
|
+
return value(THIS->action());
|
46
47
|
}
|
47
48
|
|
48
49
|
static
|
49
|
-
VALUE
|
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
|
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, "
|
75
|
-
rb_define_method(cFocusEvent, "current", RUBY_METHOD_FUNC(
|
76
|
-
rb_define_method(cFocusEvent, "last", RUBY_METHOD_FUNC(
|
77
|
-
cFocusEvent.define_const("
|
78
|
-
cFocusEvent.define_const("
|
79
|
-
cFocusEvent.define_const("
|
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
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
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->
|
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),
|
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);
|