reflexion 0.1.28 → 0.1.29
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/exception.cpp +45 -0
- data/.doc/ext/reflex/native.cpp +2 -0
- data/VERSION +1 -1
- data/ext/reflex/defs.h +1 -0
- data/ext/reflex/exception.cpp +45 -0
- data/ext/reflex/native.cpp +2 -0
- data/include/reflex/ruby/application.h +0 -1
- data/include/reflex/ruby/defs.h +33 -0
- data/include/reflex/ruby/event.h +0 -1
- data/include/reflex/ruby/exception.h +28 -0
- data/include/reflex/ruby/filter.h +0 -1
- data/include/reflex/ruby/pointer.h +0 -1
- data/include/reflex/ruby/reflex.h +1 -0
- data/include/reflex/ruby/selector.h +0 -1
- data/include/reflex/ruby/shape.h +0 -1
- data/include/reflex/ruby/style.h +0 -1
- data/include/reflex/ruby/timer.h +0 -1
- data/include/reflex/ruby/view.h +0 -1
- data/include/reflex/ruby/window.h +0 -1
- data/include/reflex/ruby.h +2 -0
- data/lib/reflex/button.rb +1 -1
- data/reflex.gemspec +4 -4
- data/samples/bats.rb +1 -1
- data/samples/model.rb +1 -1
- data/src/osx/native_window.mm +3 -0
- data/src/osx/opengl_view.mm +5 -6
- data/test/test_reflex.rb +2 -2
- metadata +15 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d798021f6a8adb1c8396c941d089c0b15e48149cf33015b2f1c3b3b10f66182
|
4
|
+
data.tar.gz: 0a3ba29819e4427f6293cdec727528930359705f70a1309c3acaf039498d7075
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 195ac752005635274c9c371bd9775b2ec2244f8878fd3a1cd7e83b4b4c2b430511804136ddbb538ba39e388faac781eb373d17760ea04b0caa31fc5c83eaf0bd
|
7
|
+
data.tar.gz: b19bebd335578dbc3df9772acb239cc8c4774a0a85072846914d8e2e586df69c99ef0bc13b8d198887c62305e838b2c9241ab62f55f48f7dd8101d55d4dbc642
|
@@ -0,0 +1,45 @@
|
|
1
|
+
#include "reflex/ruby/exception.h"
|
2
|
+
|
3
|
+
|
4
|
+
#include "defs.h"
|
5
|
+
|
6
|
+
|
7
|
+
static Class cReflexError;
|
8
|
+
static Class cLayoutError;
|
9
|
+
static Class cPhysicsError;
|
10
|
+
|
11
|
+
void
|
12
|
+
Init_exception ()
|
13
|
+
{
|
14
|
+
Module mReflex = rb_define_module("Reflex");
|
15
|
+
|
16
|
+
cReflexError = rb_define_class_under(mReflex, "ReflexError", rb_eRuntimeError);
|
17
|
+
cLayoutError = rb_define_class_under(mReflex, "LayoutError", cReflexError);
|
18
|
+
cPhysicsError = rb_define_class_under(mReflex, "PhysicsError", cReflexError);
|
19
|
+
}
|
20
|
+
|
21
|
+
|
22
|
+
namespace Reflex
|
23
|
+
{
|
24
|
+
|
25
|
+
|
26
|
+
Class
|
27
|
+
reflex_error_class ()
|
28
|
+
{
|
29
|
+
return cReflexError;
|
30
|
+
}
|
31
|
+
|
32
|
+
Class
|
33
|
+
layout_error_class ()
|
34
|
+
{
|
35
|
+
return cLayoutError;
|
36
|
+
}
|
37
|
+
|
38
|
+
Class
|
39
|
+
physics_error_class ()
|
40
|
+
{
|
41
|
+
return cPhysicsError;
|
42
|
+
}
|
43
|
+
|
44
|
+
|
45
|
+
}// Reflex
|
data/.doc/ext/reflex/native.cpp
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.29
|
data/ext/reflex/defs.h
CHANGED
@@ -0,0 +1,45 @@
|
|
1
|
+
#include "reflex/ruby/exception.h"
|
2
|
+
|
3
|
+
|
4
|
+
#include "defs.h"
|
5
|
+
|
6
|
+
|
7
|
+
static Class cReflexError;
|
8
|
+
static Class cLayoutError;
|
9
|
+
static Class cPhysicsError;
|
10
|
+
|
11
|
+
void
|
12
|
+
Init_exception ()
|
13
|
+
{
|
14
|
+
Module mReflex = define_module("Reflex");
|
15
|
+
|
16
|
+
cReflexError = mReflex.define_class("ReflexError", rb_eRuntimeError);
|
17
|
+
cLayoutError = mReflex.define_class("LayoutError", cReflexError);
|
18
|
+
cPhysicsError = mReflex.define_class("PhysicsError", cReflexError);
|
19
|
+
}
|
20
|
+
|
21
|
+
|
22
|
+
namespace Reflex
|
23
|
+
{
|
24
|
+
|
25
|
+
|
26
|
+
Class
|
27
|
+
reflex_error_class ()
|
28
|
+
{
|
29
|
+
return cReflexError;
|
30
|
+
}
|
31
|
+
|
32
|
+
Class
|
33
|
+
layout_error_class ()
|
34
|
+
{
|
35
|
+
return cLayoutError;
|
36
|
+
}
|
37
|
+
|
38
|
+
Class
|
39
|
+
physics_error_class ()
|
40
|
+
{
|
41
|
+
return cPhysicsError;
|
42
|
+
}
|
43
|
+
|
44
|
+
|
45
|
+
}// Reflex
|
data/ext/reflex/native.cpp
CHANGED
@@ -0,0 +1,33 @@
|
|
1
|
+
// -*- c++ -*-
|
2
|
+
#pragma once
|
3
|
+
#ifndef __REFLEX_RUBY_DEFS_H__
|
4
|
+
#define __REFLEX_RUBY_DEFS_H__
|
5
|
+
|
6
|
+
|
7
|
+
#include <rucy/extension.h>
|
8
|
+
#include <rays/ruby/defs.h>
|
9
|
+
#include <reflex/ruby/exception.h>
|
10
|
+
|
11
|
+
|
12
|
+
#define REFLEX_CATCH \
|
13
|
+
} \
|
14
|
+
catch (const Reflex::PhysicsError& e) \
|
15
|
+
{ \
|
16
|
+
RUCY_RAISE(Reflex::physics_error_class(), e.what()); \
|
17
|
+
} \
|
18
|
+
catch (const Reflex::LayoutError& e) \
|
19
|
+
{ \
|
20
|
+
RUCY_RAISE(Reflex::layout_error_class(), e.what()); \
|
21
|
+
} \
|
22
|
+
catch (const Reflex::ReflexError& e) \
|
23
|
+
{ \
|
24
|
+
RUCY_RAISE(Reflex::reflex_error_class(), e.what());
|
25
|
+
|
26
|
+
#undef RUCY_END
|
27
|
+
#define RUCY_END \
|
28
|
+
REFLEX_CATCH \
|
29
|
+
RAYS_CATCH \
|
30
|
+
RUCY_DEF_END
|
31
|
+
|
32
|
+
|
33
|
+
#endif//EOH
|
data/include/reflex/ruby/event.h
CHANGED
@@ -0,0 +1,28 @@
|
|
1
|
+
// -*- c++ -*-
|
2
|
+
#pragma once
|
3
|
+
#ifndef __REFLEX_RUBY_EXCEPTION_H__
|
4
|
+
#define __REFLEX_RUBY_EXCEPTION_H__
|
5
|
+
|
6
|
+
|
7
|
+
#include <rucy/class.h>
|
8
|
+
#include <reflex/exception.h>
|
9
|
+
|
10
|
+
|
11
|
+
namespace Reflex
|
12
|
+
{
|
13
|
+
|
14
|
+
|
15
|
+
Rucy::Class reflex_error_class ();
|
16
|
+
// class Reflex::ReflexError
|
17
|
+
|
18
|
+
Rucy::Class layout_error_class ();
|
19
|
+
// class Reflex::LayoutError
|
20
|
+
|
21
|
+
Rucy::Class physics_error_class ();
|
22
|
+
// class Reflex::PhysicsError
|
23
|
+
|
24
|
+
|
25
|
+
}// Reflex
|
26
|
+
|
27
|
+
|
28
|
+
#endif//EOH
|
data/include/reflex/ruby/shape.h
CHANGED
data/include/reflex/ruby/style.h
CHANGED
data/include/reflex/ruby/timer.h
CHANGED
data/include/reflex/ruby/view.h
CHANGED
data/include/reflex/ruby.h
CHANGED
data/lib/reflex/button.rb
CHANGED
data/reflex.gemspec
CHANGED
@@ -28,10 +28,10 @@ Gem::Specification.new do |s|
|
|
28
28
|
s.platform = Gem::Platform::RUBY
|
29
29
|
s.required_ruby_version = '>= 2.6.0'
|
30
30
|
|
31
|
-
s.add_runtime_dependency 'xot', '~> 0.1.
|
32
|
-
s.add_runtime_dependency 'rucy', '~> 0.1.
|
33
|
-
s.add_runtime_dependency 'beeps', '~> 0.1.
|
34
|
-
s.add_runtime_dependency 'rays', '~> 0.1.
|
31
|
+
s.add_runtime_dependency 'xot', '~> 0.1.29'
|
32
|
+
s.add_runtime_dependency 'rucy', '~> 0.1.29'
|
33
|
+
s.add_runtime_dependency 'beeps', '~> 0.1.29'
|
34
|
+
s.add_runtime_dependency 'rays', '~> 0.1.29'
|
35
35
|
|
36
36
|
s.files = `git ls-files`.split $/
|
37
37
|
s.executables = s.files.grep(%r{^bin/}) {|f| File.basename f}
|
data/samples/bats.rb
CHANGED
data/samples/model.rb
CHANGED
data/src/osx/native_window.mm
CHANGED
data/src/osx/opengl_view.mm
CHANGED
@@ -25,16 +25,15 @@ make_pixelformat (int antialias_nsample = 0)
|
|
25
25
|
|
26
26
|
static const NSOpenGLPixelFormatAttribute DEFAULT[] =
|
27
27
|
{
|
28
|
-
|
29
|
-
|
28
|
+
//NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core,
|
29
|
+
NSOpenGLPFAAccelerated, NSOpenGLPFANoRecovery,
|
30
30
|
NSOpenGLPFADoubleBuffer,
|
31
|
-
|
32
|
-
|
33
|
-
NSOpenGLPFADepthSize, 24,
|
34
|
-
//NSOpenGLPFANoRecovery,
|
31
|
+
NSOpenGLPFAColorSize, 32,
|
32
|
+
NSOpenGLPFADepthSize, 32,
|
35
33
|
};
|
36
34
|
static const NSOpenGLPixelFormatAttribute ANTIALIAS[] =
|
37
35
|
{
|
36
|
+
NSOpenGLPFAMultisample,
|
38
37
|
NSOpenGLPFASampleBuffers, 1,
|
39
38
|
NSOpenGLPFASamples, (NSOpenGLPixelFormatAttribute) antialias_nsample,
|
40
39
|
};
|
data/test/test_reflex.rb
CHANGED
@@ -10,9 +10,9 @@ require_relative 'helper'
|
|
10
10
|
class TestReflex < Test::Unit::TestCase
|
11
11
|
|
12
12
|
def test_init()
|
13
|
-
assert_raise(
|
13
|
+
assert_raise(Reflex::ReflexError) {Reflex.fin!}
|
14
14
|
assert Reflex.init!
|
15
|
-
assert_raise(
|
15
|
+
assert_raise(Reflex::ReflexError) {Reflex.init!}
|
16
16
|
assert Reflex.fin!
|
17
17
|
end
|
18
18
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reflexion
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.29
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- xordog
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xot
|
@@ -16,56 +16,56 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.1.
|
19
|
+
version: 0.1.29
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.1.
|
26
|
+
version: 0.1.29
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rucy
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.1.
|
33
|
+
version: 0.1.29
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.1.
|
40
|
+
version: 0.1.29
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: beeps
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.1.
|
47
|
+
version: 0.1.29
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.1.
|
54
|
+
version: 0.1.29
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rays
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.1.
|
61
|
+
version: 0.1.29
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.1.
|
68
|
+
version: 0.1.29
|
69
69
|
description: This library helps you to develop interactive graphical user interface.
|
70
70
|
email: xordog@gmail.com
|
71
71
|
executables: []
|
@@ -78,6 +78,7 @@ extra_rdoc_files:
|
|
78
78
|
- ".doc/ext/reflex/draw_event.cpp"
|
79
79
|
- ".doc/ext/reflex/ellipse_shape.cpp"
|
80
80
|
- ".doc/ext/reflex/event.cpp"
|
81
|
+
- ".doc/ext/reflex/exception.cpp"
|
81
82
|
- ".doc/ext/reflex/filter.cpp"
|
82
83
|
- ".doc/ext/reflex/focus_event.cpp"
|
83
84
|
- ".doc/ext/reflex/frame_event.cpp"
|
@@ -109,6 +110,7 @@ files:
|
|
109
110
|
- ".doc/ext/reflex/draw_event.cpp"
|
110
111
|
- ".doc/ext/reflex/ellipse_shape.cpp"
|
111
112
|
- ".doc/ext/reflex/event.cpp"
|
113
|
+
- ".doc/ext/reflex/exception.cpp"
|
112
114
|
- ".doc/ext/reflex/filter.cpp"
|
113
115
|
- ".doc/ext/reflex/focus_event.cpp"
|
114
116
|
- ".doc/ext/reflex/frame_event.cpp"
|
@@ -144,6 +146,7 @@ files:
|
|
144
146
|
- ext/reflex/draw_event.cpp
|
145
147
|
- ext/reflex/ellipse_shape.cpp
|
146
148
|
- ext/reflex/event.cpp
|
149
|
+
- ext/reflex/exception.cpp
|
147
150
|
- ext/reflex/extconf.rb
|
148
151
|
- ext/reflex/filter.cpp
|
149
152
|
- ext/reflex/focus_event.cpp
|
@@ -182,7 +185,9 @@ files:
|
|
182
185
|
- include/reflex/reflex.h
|
183
186
|
- include/reflex/ruby.h
|
184
187
|
- include/reflex/ruby/application.h
|
188
|
+
- include/reflex/ruby/defs.h
|
185
189
|
- include/reflex/ruby/event.h
|
190
|
+
- include/reflex/ruby/exception.h
|
186
191
|
- include/reflex/ruby/filter.h
|
187
192
|
- include/reflex/ruby/image_view.h
|
188
193
|
- include/reflex/ruby/pointer.h
|