reflexion 0.5.3 → 0.7.0
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/application.cpp +56 -7
- data/.doc/ext/reflex/capture_event.cpp +1 -1
- data/.doc/ext/reflex/chase_constraint.cpp +84 -0
- data/.doc/ext/reflex/clipboard.cpp +65 -0
- data/.doc/ext/reflex/color_event.cpp +76 -0
- data/.doc/ext/reflex/color_picker.cpp +113 -0
- data/.doc/ext/reflex/constraint.cpp +135 -0
- data/.doc/ext/reflex/contact_event.cpp +1 -1
- data/.doc/ext/reflex/control_change_event.cpp +1 -1
- data/.doc/ext/reflex/device.cpp +1 -1
- data/.doc/ext/reflex/device_event.cpp +1 -1
- data/.doc/ext/reflex/draw_event.cpp +1 -1
- data/.doc/ext/reflex/ellipse_shape.cpp +1 -1
- data/.doc/ext/reflex/event.cpp +1 -1
- data/.doc/ext/reflex/file_dialog.cpp +181 -0
- data/.doc/ext/reflex/file_event.cpp +103 -0
- data/.doc/ext/reflex/filter.cpp +1 -1
- data/.doc/ext/reflex/focus_event.cpp +1 -1
- data/.doc/ext/reflex/frame_event.cpp +1 -1
- data/.doc/ext/reflex/gamepad.cpp +48 -0
- data/.doc/ext/reflex/image_view.cpp +1 -1
- data/.doc/ext/reflex/key_event.cpp +1 -274
- data/.doc/ext/reflex/line_shape.cpp +1 -1
- data/.doc/ext/reflex/link_constraint.cpp +178 -0
- data/.doc/ext/reflex/menu.cpp +303 -0
- data/.doc/ext/reflex/midi.cpp +9 -2
- data/.doc/ext/reflex/midi_event.cpp +1 -1
- data/.doc/ext/reflex/motion_event.cpp +1 -1
- data/.doc/ext/reflex/native.cpp +40 -10
- data/.doc/ext/reflex/note_event.cpp +1 -1
- data/.doc/ext/reflex/pin.cpp +156 -0
- data/.doc/ext/reflex/pointer.cpp +3 -1
- data/.doc/ext/reflex/pointer_event.cpp +3 -3
- data/.doc/ext/reflex/polygon_shape.cpp +1 -1
- data/.doc/ext/reflex/rect_shape.cpp +1 -1
- data/.doc/ext/reflex/reflex.cpp +606 -237
- data/.doc/ext/reflex/screen.cpp +27 -1
- data/.doc/ext/reflex/scroll_event.cpp +1 -1
- data/.doc/ext/reflex/selector.cpp +5 -5
- data/.doc/ext/reflex/shape.cpp +1 -1
- data/.doc/ext/reflex/snap_constraint.cpp +125 -0
- data/.doc/ext/reflex/style.cpp +1 -1
- data/.doc/ext/reflex/style_length.cpp +4 -3
- data/.doc/ext/reflex/text_event.cpp +104 -0
- data/.doc/ext/reflex/timer.cpp +1 -1
- data/.doc/ext/reflex/timer_event.cpp +1 -1
- data/.doc/ext/reflex/update_event.cpp +1 -1
- data/.doc/ext/reflex/view.cpp +206 -79
- data/.doc/ext/reflex/wheel_constraint.cpp +142 -0
- data/.doc/ext/reflex/wheel_event.cpp +1 -1
- data/.doc/ext/reflex/window.cpp +282 -31
- data/.github/workflows/release-gem.yml +2 -40
- data/.github/workflows/tag.yml +5 -28
- data/.github/workflows/test.yml +1 -28
- data/ChangeLog.md +79 -0
- data/Gemfile.lock +13 -8
- data/README.md +1 -0
- data/Rakefile +13 -2
- data/Reflex.podspec +2 -2
- data/VERSION +1 -1
- data/ext/reflex/application.cpp +62 -7
- data/ext/reflex/capture_event.cpp +1 -1
- data/ext/reflex/chase_constraint.cpp +89 -0
- data/ext/reflex/clipboard.cpp +69 -0
- data/ext/reflex/color_event.cpp +80 -0
- data/ext/reflex/color_picker.cpp +121 -0
- data/ext/reflex/constraint.cpp +146 -0
- data/ext/reflex/contact_event.cpp +1 -1
- data/ext/reflex/control_change_event.cpp +1 -1
- data/ext/reflex/device.cpp +1 -1
- data/ext/reflex/device_event.cpp +1 -1
- data/ext/reflex/draw_event.cpp +1 -1
- data/ext/reflex/ellipse_shape.cpp +1 -1
- data/ext/reflex/event.cpp +1 -1
- data/ext/reflex/extconf.rb +4 -2
- data/ext/reflex/file_dialog.cpp +194 -0
- data/ext/reflex/file_event.cpp +108 -0
- data/ext/reflex/filter.cpp +1 -1
- data/ext/reflex/focus_event.cpp +1 -1
- data/ext/reflex/frame_event.cpp +1 -1
- data/ext/reflex/gamepad.cpp +50 -0
- data/ext/reflex/image_view.cpp +1 -1
- data/ext/reflex/key_event.cpp +1 -275
- data/ext/reflex/line_shape.cpp +1 -1
- data/ext/reflex/link_constraint.cpp +194 -0
- data/ext/reflex/menu.cpp +331 -0
- data/ext/reflex/midi.cpp +11 -3
- data/ext/reflex/midi_event.cpp +1 -1
- data/ext/reflex/motion_event.cpp +1 -1
- data/ext/reflex/native.cpp +40 -10
- data/ext/reflex/note_event.cpp +1 -1
- data/ext/reflex/pin.cpp +165 -0
- data/ext/reflex/pointer.cpp +3 -1
- data/ext/reflex/pointer_event.cpp +3 -3
- data/ext/reflex/polygon_shape.cpp +1 -1
- data/ext/reflex/rect_shape.cpp +1 -1
- data/ext/reflex/reflex.cpp +608 -237
- data/ext/reflex/screen.cpp +31 -2
- data/ext/reflex/scroll_event.cpp +1 -1
- data/ext/reflex/selector.cpp +5 -5
- data/ext/reflex/selector.h +10 -10
- data/ext/reflex/shape.cpp +1 -1
- data/ext/reflex/snap_constraint.cpp +135 -0
- data/ext/reflex/style.cpp +1 -1
- data/ext/reflex/style_length.cpp +4 -3
- data/ext/reflex/text_event.cpp +111 -0
- data/ext/reflex/timer.cpp +1 -1
- data/ext/reflex/timer_event.cpp +1 -1
- data/ext/reflex/update_event.cpp +1 -1
- data/ext/reflex/view.cpp +236 -96
- data/ext/reflex/wheel_constraint.cpp +154 -0
- data/ext/reflex/wheel_event.cpp +1 -1
- data/ext/reflex/window.cpp +318 -40
- data/include/reflex/application.h +19 -0
- data/include/reflex/clipboard.h +53 -0
- data/include/reflex/color_picker.h +65 -0
- data/include/reflex/constraint.h +275 -0
- data/include/reflex/defs.h +204 -195
- data/include/reflex/event.h +180 -88
- data/include/reflex/file_dialog.h +73 -0
- data/include/reflex/gamepad.h +3 -0
- data/include/reflex/menu.h +120 -0
- data/include/reflex/midi.h +3 -0
- data/include/reflex/pin.h +68 -0
- data/include/reflex/pointer.h +4 -0
- data/include/reflex/reflex.h +2 -0
- data/include/reflex/ruby/application.h +6 -1
- data/include/reflex/ruby/clipboard.h +23 -0
- data/include/reflex/ruby/color_picker.h +89 -0
- data/include/reflex/ruby/constraint.h +94 -0
- data/include/reflex/ruby/event.h +62 -29
- data/include/reflex/ruby/file_dialog.h +89 -0
- data/include/reflex/ruby/gamepad.h +46 -0
- data/include/reflex/ruby/menu.h +103 -0
- data/include/reflex/ruby/pin.h +40 -0
- data/include/reflex/ruby/reflex.h +3 -0
- data/include/reflex/ruby/view.h +123 -39
- data/include/reflex/ruby/window.h +96 -19
- data/include/reflex/ruby.h +3 -0
- data/include/reflex/screen.h +11 -2
- data/include/reflex/view.h +66 -27
- data/include/reflex/window.h +57 -12
- data/include/reflex.h +8 -0
- data/lib/reflex/application.rb +5 -5
- data/lib/reflex/autoinit.rb +3 -1
- data/lib/reflex/button.rb +3 -3
- data/lib/reflex/chase_constraint.rb +15 -0
- data/lib/reflex/clipboard.rb +19 -0
- data/lib/reflex/color_event.rb +16 -0
- data/lib/reflex/color_picker.rb +45 -0
- data/lib/reflex/constraint.rb +29 -0
- data/lib/reflex/control_change_event.rb +17 -0
- data/lib/reflex/extension.rb +1 -1
- data/lib/reflex/file_dialog.rb +70 -0
- data/lib/reflex/file_event.rb +37 -0
- data/lib/reflex/helper.rb +79 -0
- data/lib/reflex/key_event.rb +14 -14
- data/lib/reflex/link_constraint.rb +31 -0
- data/lib/reflex/menu.rb +92 -0
- data/lib/reflex/model.rb +19 -19
- data/lib/reflex/note_event.rb +1 -1
- data/lib/reflex/pin.rb +39 -0
- data/lib/reflex/pointer.rb +30 -1
- data/lib/reflex/pointer_event.rb +13 -2
- data/lib/reflex/reflex.rb +5 -0
- data/lib/reflex/shape.rb +14 -14
- data/lib/reflex/snap_constraint.rb +28 -0
- data/lib/reflex/style.rb +16 -16
- data/lib/reflex/text_event.rb +40 -0
- data/lib/reflex/timer.rb +3 -3
- data/lib/reflex/view.rb +85 -18
- data/lib/reflex/wheel_constraint.rb +28 -0
- data/lib/reflex/wheel_event.rb +19 -1
- data/lib/reflex/window.rb +25 -13
- data/lib/reflex.rb +23 -8
- data/pod.rake +1 -1
- data/reflex.gemspec +4 -4
- data/samples/constraint.rb +152 -0
- data/samples/ime.rb +100 -0
- data/samples/ios/hello/hello.xcodeproj/project.pbxproj +236 -224
- data/samples/menu.rb +32 -0
- data/samples/model.rb +3 -3
- data/samples/test/alert.rb +93 -0
- data/samples/test/always_on.rb +76 -0
- data/samples/test/app_background.rb +51 -0
- data/samples/test/boundary.rb +75 -0
- data/samples/test/callback_exception.rb +101 -0
- data/samples/test/cancel.rb +53 -0
- data/samples/test/color_picker.rb +63 -0
- data/samples/test/file_dialog.rb +102 -0
- data/samples/window_style.rb +156 -0
- data/src/application.cpp +180 -20
- data/src/application.h +95 -5
- data/src/clipboard.cpp +81 -0
- data/src/color_picker.cpp +113 -0
- data/src/color_picker.h +36 -0
- data/src/constraint.cpp +1662 -0
- data/src/constraint.h +64 -0
- data/src/event.cpp +416 -252
- data/src/event.h +13 -2
- data/src/file_dialog.cpp +163 -0
- data/src/file_dialog.h +52 -0
- data/src/gamepad.cpp +42 -5
- data/src/gamepad.h +4 -0
- data/src/ios/app_delegate.mm +5 -3
- data/src/ios/application.mm +29 -0
- data/src/ios/clipboard.mm +44 -0
- data/src/ios/color_picker.mm +19 -0
- data/src/ios/event.h +6 -2
- data/src/ios/event.mm +31 -12
- data/src/ios/file_dialog.mm +21 -0
- data/src/ios/gamepad.mm +4 -4
- data/src/ios/menu.mm +41 -0
- data/src/ios/reflex.mm +8 -0
- data/src/ios/screen.mm +26 -0
- data/src/ios/view_controller.mm +47 -42
- data/src/ios/window.mm +44 -9
- data/src/menu.cpp +387 -0
- data/src/menu.h +81 -0
- data/src/midi.cpp +61 -31
- data/src/osx/app_delegate.h +4 -0
- data/src/osx/app_delegate.mm +168 -139
- data/src/osx/application.mm +103 -5
- data/src/osx/clipboard.mm +45 -0
- data/src/osx/color_picker.mm +112 -0
- data/src/osx/event.h +10 -0
- data/src/osx/event.mm +114 -30
- data/src/osx/file_dialog.mm +168 -0
- data/src/osx/gamepad.mm +2 -2
- data/src/osx/gamepad_hid.mm +1 -1
- data/src/osx/menu.h +25 -0
- data/src/osx/menu.mm +516 -0
- data/src/osx/native_window.h +16 -2
- data/src/osx/native_window.mm +141 -57
- data/src/osx/opengl_view.h +2 -1
- data/src/osx/opengl_view.mm +229 -37
- data/src/osx/reflex.mm +38 -0
- data/src/osx/screen.mm +36 -0
- data/src/osx/window.mm +117 -24
- data/src/pin.cpp +137 -0
- data/src/pointer.cpp +36 -16
- data/src/pointer.h +10 -0
- data/src/rays.h +46 -0
- data/src/sdl/application.cpp +73 -8
- data/src/sdl/clipboard.cpp +39 -0
- data/src/sdl/color_picker.cpp +18 -0
- data/src/sdl/event.cpp +44 -6
- data/src/sdl/event.h +18 -3
- data/src/sdl/file_dialog.cpp +20 -0
- data/src/sdl/gamepad.cpp +3 -7
- data/src/sdl/menu.cpp +40 -0
- data/src/sdl/reflex.cpp +20 -0
- data/src/sdl/screen.cpp +36 -0
- data/src/sdl/window.cpp +168 -37
- data/src/shape.cpp +15 -10
- data/src/view.cpp +583 -233
- data/src/view.h +22 -4
- data/src/vk.h +416 -0
- data/src/win32/application.cpp +167 -12
- data/src/win32/application.h +20 -0
- data/src/win32/clipboard.cpp +210 -0
- data/src/win32/color_picker.cpp +82 -0
- data/src/win32/event.cpp +123 -11
- data/src/win32/event.h +22 -3
- data/src/win32/file_dialog.cpp +226 -0
- data/src/win32/gamepad.cpp +9 -2
- data/src/win32/menu.cpp +490 -0
- data/src/win32/menu.h +35 -0
- data/src/win32/opengl.cpp +2 -9
- data/src/win32/reflex.cpp +44 -3
- data/src/win32/screen.cpp +164 -3
- data/src/win32/screen.h +8 -0
- data/src/win32/tray.cpp +191 -0
- data/src/win32/tray.h +22 -0
- data/src/win32/vk.cpp +11 -0
- data/src/win32/window.cpp +858 -135
- data/src/win32/window.h +9 -0
- data/src/window.cpp +929 -183
- data/src/window.h +77 -33
- data/src/world.cpp +86 -15
- data/src/world.h +9 -2
- data/test/helper.rb +24 -0
- data/test/test_application.rb +101 -1
- data/test/test_chase_constraint.rb +122 -0
- data/test/test_clipboard.rb +54 -0
- data/test/test_color_event.rb +36 -0
- data/test/test_color_picker.rb +62 -0
- data/test/test_constraint.rb +184 -0
- data/test/test_event.rb +1 -1
- data/test/test_file_dialog.rb +48 -0
- data/test/test_file_event.rb +43 -0
- data/test/test_has_text_preedit.rb +54 -0
- data/test/test_key_event.rb +23 -2
- data/test/test_link_constraint.rb +237 -0
- data/test/test_menu.rb +237 -0
- data/test/test_pin.rb +65 -0
- data/test/test_pointer.rb +50 -26
- data/test/test_pointer_event.rb +25 -10
- data/test/test_reflex.rb +36 -0
- data/test/test_screen.rb +24 -2
- data/test/test_snap_constraint.rb +140 -0
- data/test/test_text_event.rb +54 -0
- data/test/test_view.rb +152 -25
- data/test/test_wheel_constraint.rb +125 -0
- data/test/test_wheel_event.rb +24 -10
- data/test/test_window.rb +205 -43
- metadata +154 -10
- data/.github/workflows/utils.rb +0 -127
data/.doc/ext/reflex/view.cpp
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
#include "reflex/ruby/timer.h"
|
|
11
11
|
#include "reflex/ruby/style.h"
|
|
12
12
|
#include "reflex/ruby/shape.h"
|
|
13
|
+
#include "reflex/ruby/constraint.h"
|
|
13
14
|
#include "reflex/ruby/filter.h"
|
|
14
15
|
#include "reflex/ruby/window.h"
|
|
15
16
|
#include "defs.h"
|
|
@@ -21,7 +22,7 @@ RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(REFLEX_EXPORT, Reflex::View)
|
|
|
21
22
|
#define THIS to< Reflex::View*>(self)
|
|
22
23
|
#define C_THIS to<const Reflex::View*>(self)
|
|
23
24
|
|
|
24
|
-
#define CHECK
|
|
25
|
+
#define CHECK RUCY_CHECK_OBJ(Reflex::View, self)
|
|
25
26
|
|
|
26
27
|
#define CALL(fun) RUCY_CALL_SUPER(THIS, fun)
|
|
27
28
|
|
|
@@ -49,7 +50,7 @@ VALUE hide(VALUE self)
|
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
static
|
|
52
|
-
VALUE
|
|
53
|
+
VALUE is_hidden(VALUE self)
|
|
53
54
|
{
|
|
54
55
|
CHECK;
|
|
55
56
|
return value(THIS->hidden());
|
|
@@ -94,7 +95,7 @@ static
|
|
|
94
95
|
VALUE start_timer(VALUE self)
|
|
95
96
|
{
|
|
96
97
|
CHECK;
|
|
97
|
-
check_arg_count(__FILE__, __LINE__, "View#start_timer", argc, 1, 2);
|
|
98
|
+
check_arg_count(__FILE__, __LINE__, "View#start_timer!", argc, 1, 2);
|
|
98
99
|
|
|
99
100
|
Reflex::Timer* timer = THIS->start_timer(
|
|
100
101
|
to<float>(argv[0]),
|
|
@@ -111,6 +112,28 @@ VALUE update_layout(VALUE self)
|
|
|
111
112
|
return self;
|
|
112
113
|
}
|
|
113
114
|
|
|
115
|
+
static
|
|
116
|
+
VALUE fit_to_content(VALUE self)
|
|
117
|
+
{
|
|
118
|
+
CHECK;
|
|
119
|
+
THIS->fit_to_content();
|
|
120
|
+
return self;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
static
|
|
124
|
+
VALUE content_bounds(VALUE self)
|
|
125
|
+
{
|
|
126
|
+
CHECK;
|
|
127
|
+
return value(CALL(content_bounds()));
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
static
|
|
131
|
+
VALUE get_text_input_bounds(VALUE self)
|
|
132
|
+
{
|
|
133
|
+
CHECK;
|
|
134
|
+
return value(CALL(text_input_bounds()));
|
|
135
|
+
}
|
|
136
|
+
|
|
114
137
|
static
|
|
115
138
|
VALUE from_parent(VALUE self, VALUE point)
|
|
116
139
|
{
|
|
@@ -154,10 +177,10 @@ VALUE to_screen(VALUE self, VALUE point)
|
|
|
154
177
|
}
|
|
155
178
|
|
|
156
179
|
static
|
|
157
|
-
VALUE add_child(VALUE self, VALUE child)
|
|
180
|
+
VALUE add_child(VALUE self, VALUE child, VALUE index)
|
|
158
181
|
{
|
|
159
182
|
CHECK;
|
|
160
|
-
THIS->add_child(to<Reflex::View*>(child));
|
|
183
|
+
THIS->add_child(to<Reflex::View*>(child), index.is_nil() ? -1 : to<int>(index));
|
|
161
184
|
return child;
|
|
162
185
|
}
|
|
163
186
|
|
|
@@ -196,9 +219,11 @@ VALUE each_child(VALUE self)
|
|
|
196
219
|
{
|
|
197
220
|
CHECK;
|
|
198
221
|
|
|
222
|
+
Reflex::View::ChildList children(THIS->child_begin(), THIS->child_end());
|
|
223
|
+
|
|
199
224
|
Value ret;
|
|
200
|
-
for (auto
|
|
201
|
-
ret =
|
|
225
|
+
for (auto& child : children)
|
|
226
|
+
ret = yield(value(child.get()));
|
|
202
227
|
return ret;
|
|
203
228
|
}
|
|
204
229
|
|
|
@@ -251,10 +276,11 @@ VALUE each_style(VALUE self)
|
|
|
251
276
|
{
|
|
252
277
|
CHECK;
|
|
253
278
|
|
|
279
|
+
Reflex::View::StyleList styles(THIS->style_begin(), THIS->style_end());
|
|
280
|
+
|
|
254
281
|
Value ret;
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
ret = rb_yield(value(*it));
|
|
282
|
+
for (auto& style : styles)
|
|
283
|
+
ret = yield(value(style));
|
|
258
284
|
return ret;
|
|
259
285
|
}
|
|
260
286
|
|
|
@@ -290,10 +316,10 @@ VALUE get_shape(VALUE self)
|
|
|
290
316
|
}
|
|
291
317
|
|
|
292
318
|
static
|
|
293
|
-
VALUE add_shape(VALUE self, VALUE shape)
|
|
319
|
+
VALUE add_shape(VALUE self, VALUE shape, VALUE index)
|
|
294
320
|
{
|
|
295
321
|
CHECK;
|
|
296
|
-
THIS->add_shape(to_shape(shape));
|
|
322
|
+
THIS->add_shape(to_shape(shape), index.is_nil() ? -1 : to<int>(index));
|
|
297
323
|
return shape;
|
|
298
324
|
}
|
|
299
325
|
|
|
@@ -330,56 +356,76 @@ VALUE each_shape(VALUE self)
|
|
|
330
356
|
{
|
|
331
357
|
CHECK;
|
|
332
358
|
|
|
359
|
+
Reflex::View::ShapeList shapes(THIS->shape_begin(), THIS->shape_end());
|
|
360
|
+
|
|
333
361
|
Value ret;
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
ret = rb_yield(value(it->get()));
|
|
362
|
+
for (auto& shape : shapes)
|
|
363
|
+
ret = yield(value(shape.get()));
|
|
337
364
|
return ret;
|
|
338
365
|
}
|
|
339
366
|
|
|
340
367
|
static
|
|
341
|
-
VALUE
|
|
368
|
+
VALUE clear_constraints(VALUE self)
|
|
342
369
|
{
|
|
343
370
|
CHECK;
|
|
344
|
-
THIS->
|
|
345
|
-
return
|
|
371
|
+
THIS->clear_constraints();
|
|
372
|
+
return self;
|
|
346
373
|
}
|
|
347
374
|
|
|
348
375
|
static
|
|
349
|
-
VALUE
|
|
376
|
+
VALUE find_constraints(VALUE self)
|
|
350
377
|
{
|
|
351
378
|
CHECK;
|
|
352
|
-
|
|
379
|
+
check_arg_count(__FILE__, __LINE__, "View#find_constraints", argc, 1);
|
|
380
|
+
|
|
381
|
+
auto constraints =
|
|
382
|
+
THIS->find_constraints(to<Reflex::Selector>(argv[0])) |
|
|
383
|
+
std::views::transform([](auto& ref) {return value(ref.get());});
|
|
384
|
+
return array(constraints.begin(), constraints.end());
|
|
353
385
|
}
|
|
354
386
|
|
|
355
387
|
static
|
|
356
|
-
VALUE
|
|
388
|
+
VALUE each_constraint(VALUE self)
|
|
357
389
|
{
|
|
358
390
|
CHECK;
|
|
359
|
-
|
|
360
|
-
|
|
391
|
+
|
|
392
|
+
Reflex::View::ConstraintList constraints(
|
|
393
|
+
THIS->constraint_begin(), THIS->constraint_end());
|
|
394
|
+
|
|
395
|
+
Value ret;
|
|
396
|
+
for (auto& constraint : constraints)
|
|
397
|
+
ret = yield(value(constraint.get()));
|
|
398
|
+
return ret;
|
|
361
399
|
}
|
|
362
400
|
|
|
363
401
|
static
|
|
364
|
-
VALUE
|
|
402
|
+
VALUE set_filter(VALUE self, VALUE filter)
|
|
365
403
|
{
|
|
366
404
|
CHECK;
|
|
367
|
-
|
|
405
|
+
THIS->set_filter(filter ? to<Reflex::Filter*>(filter) : NULL);
|
|
406
|
+
return filter;
|
|
368
407
|
}
|
|
369
408
|
|
|
370
409
|
static
|
|
371
|
-
VALUE
|
|
410
|
+
VALUE get_filter(VALUE self)
|
|
372
411
|
{
|
|
373
412
|
CHECK;
|
|
374
|
-
return value(
|
|
413
|
+
return value(THIS->filter());
|
|
375
414
|
}
|
|
376
415
|
|
|
377
416
|
static
|
|
378
|
-
VALUE
|
|
417
|
+
VALUE set_frame(VALUE self)
|
|
379
418
|
{
|
|
380
419
|
CHECK;
|
|
381
|
-
THIS->
|
|
382
|
-
return
|
|
420
|
+
THIS->set_frame(to<Rays::Bounds>(argc, argv));
|
|
421
|
+
return value(THIS->frame());
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
static
|
|
425
|
+
VALUE get_frame(VALUE self)
|
|
426
|
+
{
|
|
427
|
+
CHECK;
|
|
428
|
+
return value(THIS->frame());
|
|
383
429
|
}
|
|
384
430
|
|
|
385
431
|
static
|
|
@@ -551,23 +597,23 @@ VALUE get_clip(VALUE self)
|
|
|
551
597
|
}
|
|
552
598
|
|
|
553
599
|
static
|
|
554
|
-
VALUE
|
|
600
|
+
VALUE set_draw_cache(VALUE self, VALUE state)
|
|
555
601
|
{
|
|
556
602
|
CHECK;
|
|
557
603
|
|
|
558
|
-
if (
|
|
559
|
-
THIS-> add_flag(Reflex::View::
|
|
604
|
+
if (state)
|
|
605
|
+
THIS-> add_flag(Reflex::View::FLAG_DRAW_CACHE);
|
|
560
606
|
else
|
|
561
|
-
THIS->remove_flag(Reflex::View::
|
|
607
|
+
THIS->remove_flag(Reflex::View::FLAG_DRAW_CACHE);
|
|
562
608
|
|
|
563
|
-
return
|
|
609
|
+
return state;
|
|
564
610
|
}
|
|
565
611
|
|
|
566
612
|
static
|
|
567
|
-
VALUE
|
|
613
|
+
VALUE has_draw_cache(VALUE self)
|
|
568
614
|
{
|
|
569
615
|
CHECK;
|
|
570
|
-
return value(THIS->has_flag(Reflex::View::
|
|
616
|
+
return value(THIS->has_flag(Reflex::View::FLAG_DRAW_CACHE));
|
|
571
617
|
}
|
|
572
618
|
|
|
573
619
|
static
|
|
@@ -630,6 +676,26 @@ VALUE get_fix_angle(VALUE self)
|
|
|
630
676
|
return value(THIS->has_flag(Reflex::View::FLAG_FIX_ANGLE));
|
|
631
677
|
}
|
|
632
678
|
|
|
679
|
+
static
|
|
680
|
+
VALUE set_text_input(VALUE self, VALUE state)
|
|
681
|
+
{
|
|
682
|
+
CHECK;
|
|
683
|
+
|
|
684
|
+
if (state)
|
|
685
|
+
THIS-> add_flag(Reflex::View::FLAG_TEXT_INPUT);
|
|
686
|
+
else
|
|
687
|
+
THIS->remove_flag(Reflex::View::FLAG_TEXT_INPUT);
|
|
688
|
+
|
|
689
|
+
return state;
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
static
|
|
693
|
+
VALUE get_text_input(VALUE self)
|
|
694
|
+
{
|
|
695
|
+
CHECK;
|
|
696
|
+
return value(THIS->has_flag(Reflex::View::FLAG_TEXT_INPUT));
|
|
697
|
+
}
|
|
698
|
+
|
|
633
699
|
static
|
|
634
700
|
VALUE parent(VALUE self)
|
|
635
701
|
{
|
|
@@ -822,10 +888,8 @@ static
|
|
|
822
888
|
VALUE update_world(VALUE self)
|
|
823
889
|
{
|
|
824
890
|
CHECK;
|
|
825
|
-
check_arg_count(__FILE__, __LINE__, "View#update_world", argc, 0, 1);
|
|
826
891
|
|
|
827
|
-
|
|
828
|
-
THIS->update_world(duration);
|
|
892
|
+
THIS->update_world();
|
|
829
893
|
return self;
|
|
830
894
|
}
|
|
831
895
|
|
|
@@ -906,6 +970,20 @@ VALUE on_detach(VALUE self, VALUE event)
|
|
|
906
970
|
CALL(on_detach(to<Reflex::Event*>(event)));
|
|
907
971
|
}
|
|
908
972
|
|
|
973
|
+
static
|
|
974
|
+
VALUE on_activate(VALUE self, VALUE event)
|
|
975
|
+
{
|
|
976
|
+
CHECK;
|
|
977
|
+
CALL(on_activate(to<Reflex::Event*>(event)));
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
static
|
|
981
|
+
VALUE on_deactivate(VALUE self, VALUE event)
|
|
982
|
+
{
|
|
983
|
+
CHECK;
|
|
984
|
+
CALL(on_deactivate(to<Reflex::Event*>(event)));
|
|
985
|
+
}
|
|
986
|
+
|
|
909
987
|
static
|
|
910
988
|
VALUE on_show(VALUE self, VALUE event)
|
|
911
989
|
{
|
|
@@ -998,80 +1076,80 @@ VALUE on_key_up(VALUE self, VALUE event)
|
|
|
998
1076
|
}
|
|
999
1077
|
|
|
1000
1078
|
static
|
|
1001
|
-
VALUE
|
|
1079
|
+
VALUE on_text(VALUE self, VALUE event)
|
|
1002
1080
|
{
|
|
1003
1081
|
CHECK;
|
|
1004
|
-
CALL(
|
|
1082
|
+
CALL(on_text(to<Reflex::TextEvent*>(event)));
|
|
1005
1083
|
}
|
|
1006
1084
|
|
|
1007
1085
|
static
|
|
1008
|
-
VALUE
|
|
1086
|
+
VALUE on_text_preedit(VALUE self, VALUE event)
|
|
1009
1087
|
{
|
|
1010
1088
|
CHECK;
|
|
1011
|
-
CALL(
|
|
1089
|
+
CALL(on_text_preedit(to<Reflex::TextEvent*>(event)));
|
|
1012
1090
|
}
|
|
1013
1091
|
|
|
1014
1092
|
static
|
|
1015
|
-
VALUE
|
|
1093
|
+
VALUE on_text_commit(VALUE self, VALUE event)
|
|
1016
1094
|
{
|
|
1017
1095
|
CHECK;
|
|
1018
|
-
CALL(
|
|
1096
|
+
CALL(on_text_commit(to<Reflex::TextEvent*>(event)));
|
|
1019
1097
|
}
|
|
1020
1098
|
|
|
1021
1099
|
static
|
|
1022
|
-
VALUE
|
|
1100
|
+
VALUE on_pointer(VALUE self, VALUE event)
|
|
1023
1101
|
{
|
|
1024
1102
|
CHECK;
|
|
1025
|
-
CALL(
|
|
1103
|
+
CALL(on_pointer(to<Reflex::PointerEvent*>(event)));
|
|
1026
1104
|
}
|
|
1027
1105
|
|
|
1028
1106
|
static
|
|
1029
|
-
VALUE
|
|
1107
|
+
VALUE on_pointer_down(VALUE self, VALUE event)
|
|
1030
1108
|
{
|
|
1031
1109
|
CHECK;
|
|
1032
|
-
CALL(
|
|
1110
|
+
CALL(on_pointer_down(to<Reflex::PointerEvent*>(event)));
|
|
1033
1111
|
}
|
|
1034
1112
|
|
|
1035
1113
|
static
|
|
1036
|
-
VALUE
|
|
1114
|
+
VALUE on_pointer_up(VALUE self, VALUE event)
|
|
1037
1115
|
{
|
|
1038
1116
|
CHECK;
|
|
1039
|
-
CALL(
|
|
1117
|
+
CALL(on_pointer_up(to<Reflex::PointerEvent*>(event)));
|
|
1040
1118
|
}
|
|
1041
1119
|
|
|
1042
1120
|
static
|
|
1043
|
-
VALUE
|
|
1121
|
+
VALUE on_pointer_move(VALUE self, VALUE event)
|
|
1044
1122
|
{
|
|
1045
1123
|
CHECK;
|
|
1046
|
-
CALL(
|
|
1124
|
+
CALL(on_pointer_move(to<Reflex::PointerEvent*>(event)));
|
|
1047
1125
|
}
|
|
1048
1126
|
|
|
1049
1127
|
static
|
|
1050
|
-
VALUE
|
|
1128
|
+
VALUE on_pointer_cancel(VALUE self, VALUE event)
|
|
1051
1129
|
{
|
|
1052
1130
|
CHECK;
|
|
1053
|
-
CALL(
|
|
1131
|
+
CALL(on_pointer_cancel(to<Reflex::PointerEvent*>(event)));
|
|
1054
1132
|
}
|
|
1055
1133
|
|
|
1056
1134
|
static
|
|
1057
|
-
VALUE
|
|
1135
|
+
VALUE on_pointer_enter(VALUE self, VALUE event)
|
|
1058
1136
|
{
|
|
1059
1137
|
CHECK;
|
|
1060
|
-
CALL(
|
|
1138
|
+
CALL(on_pointer_enter(to<Reflex::PointerEvent*>(event)));
|
|
1061
1139
|
}
|
|
1062
1140
|
|
|
1063
1141
|
static
|
|
1064
|
-
VALUE
|
|
1142
|
+
VALUE on_pointer_leave(VALUE self, VALUE event)
|
|
1065
1143
|
{
|
|
1066
1144
|
CHECK;
|
|
1067
|
-
CALL(
|
|
1145
|
+
CALL(on_pointer_leave(to<Reflex::PointerEvent*>(event)));
|
|
1068
1146
|
}
|
|
1069
1147
|
|
|
1070
1148
|
static
|
|
1071
|
-
VALUE
|
|
1149
|
+
VALUE on_wheel(VALUE self, VALUE event)
|
|
1072
1150
|
{
|
|
1073
1151
|
CHECK;
|
|
1074
|
-
CALL(
|
|
1152
|
+
CALL(on_wheel(to<Reflex::WheelEvent*>(event)));
|
|
1075
1153
|
}
|
|
1076
1154
|
|
|
1077
1155
|
static
|
|
@@ -1116,6 +1194,41 @@ VALUE on_contact_end(VALUE self, VALUE event)
|
|
|
1116
1194
|
CALL(on_contact_end(to<Reflex::ContactEvent*>(event)));
|
|
1117
1195
|
}
|
|
1118
1196
|
|
|
1197
|
+
static
|
|
1198
|
+
VALUE on_midi(VALUE self, VALUE event)
|
|
1199
|
+
{
|
|
1200
|
+
CHECK;
|
|
1201
|
+
CALL(on_midi(to<Reflex::MIDIEvent*>(event)));
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
static
|
|
1205
|
+
VALUE on_note(VALUE self, VALUE event)
|
|
1206
|
+
{
|
|
1207
|
+
CHECK;
|
|
1208
|
+
CALL(on_note(to<Reflex::NoteEvent*>(event)));
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
static
|
|
1212
|
+
VALUE on_note_on(VALUE self, VALUE event)
|
|
1213
|
+
{
|
|
1214
|
+
CHECK;
|
|
1215
|
+
CALL(on_note_on(to<Reflex::NoteEvent*>(event)));
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1218
|
+
static
|
|
1219
|
+
VALUE on_note_off(VALUE self, VALUE event)
|
|
1220
|
+
{
|
|
1221
|
+
CHECK;
|
|
1222
|
+
CALL(on_note_off(to<Reflex::NoteEvent*>(event)));
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
static
|
|
1226
|
+
VALUE on_control_change(VALUE self, VALUE event)
|
|
1227
|
+
{
|
|
1228
|
+
CHECK;
|
|
1229
|
+
CALL(on_control_change(to<Reflex::ControlChangeEvent*>(event)));
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1119
1232
|
|
|
1120
1233
|
static Class cView;
|
|
1121
1234
|
|
|
@@ -1128,13 +1241,16 @@ Init_reflex_view ()
|
|
|
1128
1241
|
rb_define_alloc_func(cView, alloc);
|
|
1129
1242
|
rb_define_method(cView, "show", RUBY_METHOD_FUNC(show), 0);
|
|
1130
1243
|
rb_define_method(cView, "hide", RUBY_METHOD_FUNC(hide), 0);
|
|
1131
|
-
cView.define_method("hidden?",
|
|
1244
|
+
cView.define_method("hidden?", is_hidden);
|
|
1132
1245
|
rb_define_method(cView, "redraw", RUBY_METHOD_FUNC(redraw), 0);
|
|
1133
1246
|
rb_define_method(cView, "focus", RUBY_METHOD_FUNC(focus), -1);
|
|
1134
1247
|
rb_define_method(cView, "blur", RUBY_METHOD_FUNC(blur), 0);
|
|
1135
1248
|
cView.define_method("focus?", has_focus);
|
|
1136
|
-
|
|
1249
|
+
cView.define_private_method("start_timer!", start_timer);
|
|
1137
1250
|
rb_define_method(cView, "update_layout", RUBY_METHOD_FUNC(update_layout), 0);
|
|
1251
|
+
rb_define_method(cView, "fit_to_content", RUBY_METHOD_FUNC(fit_to_content), 0);
|
|
1252
|
+
rb_define_method(cView, "content_bounds", RUBY_METHOD_FUNC(content_bounds), 0);
|
|
1253
|
+
rb_define_method(cView, "text_input_bounds", RUBY_METHOD_FUNC(get_text_input_bounds), 0);
|
|
1138
1254
|
|
|
1139
1255
|
rb_define_method(cView, "from_parent", RUBY_METHOD_FUNC(from_parent), 1);
|
|
1140
1256
|
rb_define_method(cView, "to_parent", RUBY_METHOD_FUNC(to_parent), 1);
|
|
@@ -1143,33 +1259,35 @@ Init_reflex_view ()
|
|
|
1143
1259
|
rb_define_method(cView, "from_screen", RUBY_METHOD_FUNC(from_screen), 1);
|
|
1144
1260
|
rb_define_method(cView, "to_screen", RUBY_METHOD_FUNC(to_screen), 1);
|
|
1145
1261
|
|
|
1146
|
-
|
|
1262
|
+
cView.define_method( "add_child!", add_child);
|
|
1147
1263
|
rb_define_method(cView, "remove_child", RUBY_METHOD_FUNC(remove_child), 1);
|
|
1148
1264
|
rb_define_method(cView, "clear_children", RUBY_METHOD_FUNC(clear_children), 0);
|
|
1149
1265
|
rb_define_method(cView, "find_children", RUBY_METHOD_FUNC(find_children), -1);
|
|
1150
|
-
|
|
1266
|
+
cView.define_private_method("each_child!", each_child);
|
|
1151
1267
|
|
|
1152
1268
|
rb_define_method(cView, "add_style", RUBY_METHOD_FUNC(add_style), 1);
|
|
1153
1269
|
rb_define_method(cView, "remove_style", RUBY_METHOD_FUNC(remove_style), 1);
|
|
1154
1270
|
rb_define_method(cView, "get_style", RUBY_METHOD_FUNC(get_style), 1);
|
|
1155
1271
|
rb_define_method(cView, "find_styles", RUBY_METHOD_FUNC(find_styles), -1);
|
|
1156
|
-
|
|
1272
|
+
cView.define_private_method("each_style!", each_style);
|
|
1157
1273
|
|
|
1158
1274
|
rb_define_method(cView, "shape=", RUBY_METHOD_FUNC(set_shape), 1);
|
|
1159
1275
|
rb_define_method(cView, "shape", RUBY_METHOD_FUNC(get_shape), 0);
|
|
1160
|
-
|
|
1276
|
+
cView.define_method( "add_shape!", add_shape);
|
|
1161
1277
|
rb_define_method(cView, "remove_shape", RUBY_METHOD_FUNC(remove_shape), 1);
|
|
1162
1278
|
rb_define_method(cView, "clear_shapes", RUBY_METHOD_FUNC(clear_shapes), 0);
|
|
1163
1279
|
rb_define_method(cView, "find_shapes", RUBY_METHOD_FUNC(find_shapes), -1);
|
|
1164
|
-
|
|
1280
|
+
cView.define_private_method("each_shape!", each_shape);
|
|
1281
|
+
|
|
1282
|
+
rb_define_method(cView, "clear_constraints", RUBY_METHOD_FUNC(clear_constraints), 0);
|
|
1283
|
+
rb_define_method(cView, "find_constraints", RUBY_METHOD_FUNC(find_constraints), -1);
|
|
1284
|
+
cView.define_private_method("each_constraint!", each_constraint);
|
|
1165
1285
|
|
|
1166
1286
|
rb_define_method(cView, "filter=", RUBY_METHOD_FUNC(set_filter), 1);
|
|
1167
1287
|
rb_define_method(cView, "filter", RUBY_METHOD_FUNC(get_filter), 0);
|
|
1168
1288
|
|
|
1169
1289
|
rb_define_method(cView, "frame=", RUBY_METHOD_FUNC(set_frame), -1);
|
|
1170
1290
|
rb_define_method(cView, "frame", RUBY_METHOD_FUNC(get_frame), 0);
|
|
1171
|
-
rb_define_method(cView, "content_bounds", RUBY_METHOD_FUNC(content_bounds), 0);
|
|
1172
|
-
rb_define_method(cView, "fit_to_content", RUBY_METHOD_FUNC(fit_to_content), 0);
|
|
1173
1291
|
rb_define_method(cView, "angle=", RUBY_METHOD_FUNC(set_angle), 1);
|
|
1174
1292
|
rb_define_method(cView, "angle", RUBY_METHOD_FUNC(get_angle), 0);
|
|
1175
1293
|
rb_define_method(cView, "pivot=", RUBY_METHOD_FUNC(set_pivot), -1);
|
|
@@ -1183,14 +1301,16 @@ Init_reflex_view ()
|
|
|
1183
1301
|
rb_define_method(cView, "capture", RUBY_METHOD_FUNC(get_capture), 0);
|
|
1184
1302
|
rb_define_method(cView, "clip=", RUBY_METHOD_FUNC(set_clip), 1);
|
|
1185
1303
|
cView.define_method("clip?", get_clip);
|
|
1186
|
-
rb_define_method(cView, "
|
|
1187
|
-
cView.define_method("
|
|
1304
|
+
rb_define_method(cView, "draw_cache=", RUBY_METHOD_FUNC(set_draw_cache), 1);
|
|
1305
|
+
cView.define_method("draw_cache?", has_draw_cache);
|
|
1188
1306
|
rb_define_method(cView, "resize_to_fit=", RUBY_METHOD_FUNC(set_resize_to_fit), 1);
|
|
1189
1307
|
cView.define_method("resize_to_fit?", get_resize_to_fit);
|
|
1190
1308
|
rb_define_method(cView, "scroll_to_fit=", RUBY_METHOD_FUNC(set_scroll_to_fit), 1);
|
|
1191
1309
|
cView.define_method("scroll_to_fit?", get_scroll_to_fit);
|
|
1192
1310
|
rb_define_method(cView, "fix_angle=", RUBY_METHOD_FUNC(set_fix_angle), 1);
|
|
1193
1311
|
cView.define_method("fix_angle?", get_fix_angle);
|
|
1312
|
+
cView.define_private_method("set_text_input_flag!", set_text_input);
|
|
1313
|
+
cView.define_private_method( "text_input_flag!", get_text_input);
|
|
1194
1314
|
rb_define_method(cView, "parent", RUBY_METHOD_FUNC(parent), 0);
|
|
1195
1315
|
rb_define_method(cView, "window", RUBY_METHOD_FUNC(window), 0);
|
|
1196
1316
|
|
|
@@ -1218,7 +1338,7 @@ Init_reflex_view ()
|
|
|
1218
1338
|
rb_define_method(cView, "gravity_scale", RUBY_METHOD_FUNC(get_gravity_scale), 0);
|
|
1219
1339
|
|
|
1220
1340
|
rb_define_method(cView, "create_world", RUBY_METHOD_FUNC(create_world), 1);
|
|
1221
|
-
rb_define_method(cView, "update_world", RUBY_METHOD_FUNC(update_world),
|
|
1341
|
+
rb_define_method(cView, "update_world", RUBY_METHOD_FUNC(update_world), 0);
|
|
1222
1342
|
rb_define_method(cView, "meter2pixel", RUBY_METHOD_FUNC(meter2pixel), -1);
|
|
1223
1343
|
rb_define_method(cView, "gravity=", RUBY_METHOD_FUNC(set_gravity), -1);
|
|
1224
1344
|
rb_define_method(cView, "gravity", RUBY_METHOD_FUNC(get_gravity), 0);
|
|
@@ -1230,6 +1350,8 @@ Init_reflex_view ()
|
|
|
1230
1350
|
|
|
1231
1351
|
rb_define_method(cView, "on_attach", RUBY_METHOD_FUNC(on_attach), 1);
|
|
1232
1352
|
rb_define_method(cView, "on_detach", RUBY_METHOD_FUNC(on_detach), 1);
|
|
1353
|
+
rb_define_method(cView, "on_activate", RUBY_METHOD_FUNC(on_activate), 1);
|
|
1354
|
+
rb_define_method(cView, "on_deactivate", RUBY_METHOD_FUNC(on_deactivate), 1);
|
|
1233
1355
|
rb_define_method(cView, "on_show", RUBY_METHOD_FUNC(on_show), 1);
|
|
1234
1356
|
rb_define_method(cView, "on_hide", RUBY_METHOD_FUNC(on_hide), 1);
|
|
1235
1357
|
rb_define_method(cView, "on_update", RUBY_METHOD_FUNC(on_update), 1);
|
|
@@ -1243,23 +1365,28 @@ Init_reflex_view ()
|
|
|
1243
1365
|
rb_define_method(cView, "on_key", RUBY_METHOD_FUNC(on_key), 1);
|
|
1244
1366
|
rb_define_method(cView, "on_key_down", RUBY_METHOD_FUNC(on_key_down), 1);
|
|
1245
1367
|
rb_define_method(cView, "on_key_up", RUBY_METHOD_FUNC(on_key_up), 1);
|
|
1368
|
+
rb_define_method(cView, "on_text", RUBY_METHOD_FUNC(on_text), 1);
|
|
1369
|
+
rb_define_method(cView, "on_text_preedit", RUBY_METHOD_FUNC(on_text_preedit), 1);
|
|
1370
|
+
rb_define_method(cView, "on_text_commit", RUBY_METHOD_FUNC(on_text_commit), 1);
|
|
1246
1371
|
rb_define_method(cView, "on_pointer", RUBY_METHOD_FUNC(on_pointer), 1);
|
|
1247
1372
|
rb_define_method(cView, "on_pointer_down", RUBY_METHOD_FUNC(on_pointer_down), 1);
|
|
1248
1373
|
rb_define_method(cView, "on_pointer_up", RUBY_METHOD_FUNC(on_pointer_up), 1);
|
|
1249
1374
|
rb_define_method(cView, "on_pointer_move", RUBY_METHOD_FUNC(on_pointer_move), 1);
|
|
1250
1375
|
rb_define_method(cView, "on_pointer_cancel", RUBY_METHOD_FUNC(on_pointer_cancel), 1);
|
|
1376
|
+
rb_define_method(cView, "on_pointer_enter", RUBY_METHOD_FUNC(on_pointer_enter), 1);
|
|
1377
|
+
rb_define_method(cView, "on_pointer_leave", RUBY_METHOD_FUNC(on_pointer_leave), 1);
|
|
1251
1378
|
rb_define_method(cView, "on_wheel", RUBY_METHOD_FUNC(on_wheel), 1);
|
|
1252
|
-
rb_define_method(cView, "on_midi", RUBY_METHOD_FUNC(on_midi), 1);
|
|
1253
|
-
rb_define_method(cView, "on_note", RUBY_METHOD_FUNC(on_note), 1);
|
|
1254
|
-
rb_define_method(cView, "on_note_on", RUBY_METHOD_FUNC(on_note_on), 1);
|
|
1255
|
-
rb_define_method(cView, "on_note_off", RUBY_METHOD_FUNC(on_note_off), 1);
|
|
1256
|
-
rb_define_method(cView, "on_control_change", RUBY_METHOD_FUNC(on_control_change), 1);
|
|
1257
1379
|
rb_define_method(cView, "on_capture", RUBY_METHOD_FUNC(on_capture), 1);
|
|
1258
1380
|
rb_define_method(cView, "on_timer", RUBY_METHOD_FUNC(on_timer), 1);
|
|
1259
1381
|
cView.define_method( "will_contact?", will_contact);
|
|
1260
1382
|
cView.define_private_method("call_contact!", on_contact);
|
|
1261
1383
|
cView.define_private_method("call_contact_begin!", on_contact_begin);
|
|
1262
1384
|
cView.define_private_method("call_contact_end!", on_contact_end);
|
|
1385
|
+
rb_define_method(cView, "on_midi", RUBY_METHOD_FUNC(on_midi), 1);
|
|
1386
|
+
rb_define_method(cView, "on_note", RUBY_METHOD_FUNC(on_note), 1);
|
|
1387
|
+
rb_define_method(cView, "on_note_on", RUBY_METHOD_FUNC(on_note_on), 1);
|
|
1388
|
+
rb_define_method(cView, "on_note_off", RUBY_METHOD_FUNC(on_note_off), 1);
|
|
1389
|
+
rb_define_method(cView, "on_control_change", RUBY_METHOD_FUNC(on_control_change), 1);
|
|
1263
1390
|
|
|
1264
1391
|
cView.define_const("CAPTURE_NONE", Reflex::View::CAPTURE_NONE);
|
|
1265
1392
|
cView.define_const("CAPTURE_KEY", Reflex::View::CAPTURE_KEY);
|