picrate 0.0.2-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +47 -0
- data/.mvn/extensions.xml +9 -0
- data/.mvn/wrapper/maven-wrapper.properties +1 -0
- data/.travis.yml +10 -0
- data/CHANGELOG.md +4 -0
- data/LICENSE.md +165 -0
- data/README.md +51 -0
- data/Rakefile +59 -0
- data/bin/picrate +8 -0
- data/docs/.gitignore +6 -0
- data/docs/_config.yml +30 -0
- data/docs/_includes/footer.html +38 -0
- data/docs/_includes/head.html +16 -0
- data/docs/_includes/header.html +27 -0
- data/docs/_includes/icon-github.html +1 -0
- data/docs/_includes/icon-github.svg +1 -0
- data/docs/_includes/icon-twitter.html +1 -0
- data/docs/_includes/icon-twitter.svg +1 -0
- data/docs/_includes/navigation.html +24 -0
- data/docs/_layouts/default.html +20 -0
- data/docs/_layouts/page.html +14 -0
- data/docs/_layouts/post.html +15 -0
- data/docs/_posts/2018-05-06-getting_started.md +8 -0
- data/docs/_posts/2018-05-06-install_jruby.md +35 -0
- data/docs/_sass/_base.scss +206 -0
- data/docs/_sass/_layout.scss +242 -0
- data/docs/_sass/_syntax-highlighting.scss +71 -0
- data/docs/about.md +10 -0
- data/docs/css/main.scss +38 -0
- data/docs/favicon.ico +0 -0
- data/docs/feed.xml +30 -0
- data/docs/index.html +38 -0
- data/lib/picrate.rb +10 -0
- data/lib/picrate/app.rb +187 -0
- data/lib/picrate/creators/sketch_class.rb +57 -0
- data/lib/picrate/creators/sketch_factory.rb +12 -0
- data/lib/picrate/creators/sketch_writer.rb +21 -0
- data/lib/picrate/helper_methods.rb +214 -0
- data/lib/picrate/helpers/numeric.rb +9 -0
- data/lib/picrate/library.rb +69 -0
- data/lib/picrate/library_loader.rb +53 -0
- data/lib/picrate/native_folder.rb +35 -0
- data/lib/picrate/native_loader.rb +27 -0
- data/lib/picrate/runner.rb +81 -0
- data/lib/picrate/version.rb +4 -0
- data/library/boids/boids.rb +209 -0
- data/library/chooser/chooser.rb +19 -0
- data/library/control_panel/control_panel.rb +182 -0
- data/library/library_proxy/README.md +99 -0
- data/library/library_proxy/library_proxy.rb +14 -0
- data/library/slider/slider.rb +42 -0
- data/library/vector_utils/vector_utils.rb +69 -0
- data/library/video_event/video_event.rb +3 -0
- data/license.txt +508 -0
- data/picrate.gemspec +35 -0
- data/pom.rb +122 -0
- data/pom.xml +214 -0
- data/src/main/java/japplemenubar/JAppleMenuBar.java +88 -0
- data/src/main/java/japplemenubar/libjAppleMenuBar.jnilib +0 -0
- data/src/main/java/monkstone/ColorUtil.java +115 -0
- data/src/main/java/monkstone/MathToolModule.java +236 -0
- data/src/main/java/monkstone/PicrateLibrary.java +47 -0
- data/src/main/java/monkstone/core/LibraryProxy.java +127 -0
- data/src/main/java/monkstone/fastmath/Deglut.java +122 -0
- data/src/main/java/monkstone/fastmath/package-info.java +6 -0
- data/src/main/java/monkstone/filechooser/Chooser.java +48 -0
- data/src/main/java/monkstone/noise/SimplexNoise.java +465 -0
- data/src/main/java/monkstone/slider/CustomHorizontalSlider.java +168 -0
- data/src/main/java/monkstone/slider/CustomVerticalSlider.java +182 -0
- data/src/main/java/monkstone/slider/SimpleHorizontalSlider.java +149 -0
- data/src/main/java/monkstone/slider/SimpleSlider.java +196 -0
- data/src/main/java/monkstone/slider/SimpleVerticalSlider.java +163 -0
- data/src/main/java/monkstone/slider/Slider.java +67 -0
- data/src/main/java/monkstone/slider/SliderBar.java +277 -0
- data/src/main/java/monkstone/slider/SliderGroup.java +78 -0
- data/src/main/java/monkstone/slider/WheelHandler.java +35 -0
- data/src/main/java/monkstone/vecmath/AppRender.java +87 -0
- data/src/main/java/monkstone/vecmath/JRender.java +56 -0
- data/src/main/java/monkstone/vecmath/ShapeRender.java +87 -0
- data/src/main/java/monkstone/vecmath/package-info.java +20 -0
- data/src/main/java/monkstone/vecmath/vec2/Vec2.java +757 -0
- data/src/main/java/monkstone/vecmath/vec2/package-info.java +6 -0
- data/src/main/java/monkstone/vecmath/vec3/Vec3.java +727 -0
- data/src/main/java/monkstone/vecmath/vec3/package-info.java +6 -0
- data/src/main/java/monkstone/videoevent/VideoInterface.java +42 -0
- data/src/main/java/monkstone/videoevent/package-info.java +20 -0
- data/src/main/java/processing/awt/PGraphicsJava2D.java +3098 -0
- data/src/main/java/processing/awt/PShapeJava2D.java +401 -0
- data/src/main/java/processing/awt/PSurfaceAWT.java +1660 -0
- data/src/main/java/processing/core/PApplet.java +17647 -0
- data/src/main/java/processing/core/PConstants.java +1033 -0
- data/src/main/java/processing/core/PFont.java +1250 -0
- data/src/main/java/processing/core/PGraphics.java +9614 -0
- data/src/main/java/processing/core/PImage.java +3608 -0
- data/src/main/java/processing/core/PMatrix.java +347 -0
- data/src/main/java/processing/core/PMatrix2D.java +694 -0
- data/src/main/java/processing/core/PMatrix3D.java +1153 -0
- data/src/main/java/processing/core/PShape.java +4332 -0
- data/src/main/java/processing/core/PShapeOBJ.java +544 -0
- data/src/main/java/processing/core/PShapeSVG.java +1987 -0
- data/src/main/java/processing/core/PStyle.java +208 -0
- data/src/main/java/processing/core/PSurface.java +242 -0
- data/src/main/java/processing/core/PSurfaceNone.java +479 -0
- data/src/main/java/processing/core/PVector.java +1140 -0
- data/src/main/java/processing/data/FloatDict.java +829 -0
- data/src/main/java/processing/data/FloatList.java +912 -0
- data/src/main/java/processing/data/IntDict.java +796 -0
- data/src/main/java/processing/data/IntList.java +913 -0
- data/src/main/java/processing/data/JSONArray.java +1260 -0
- data/src/main/java/processing/data/JSONObject.java +2282 -0
- data/src/main/java/processing/data/JSONTokener.java +435 -0
- data/src/main/java/processing/data/Sort.java +46 -0
- data/src/main/java/processing/data/StringDict.java +601 -0
- data/src/main/java/processing/data/StringList.java +775 -0
- data/src/main/java/processing/data/Table.java +4923 -0
- data/src/main/java/processing/data/TableRow.java +198 -0
- data/src/main/java/processing/data/XML.java +1149 -0
- data/src/main/java/processing/event/Event.java +108 -0
- data/src/main/java/processing/event/KeyEvent.java +70 -0
- data/src/main/java/processing/event/MouseEvent.java +149 -0
- data/src/main/java/processing/event/TouchEvent.java +57 -0
- data/src/main/java/processing/javafx/PGraphicsFX2D.java +354 -0
- data/src/main/java/processing/opengl/FontTexture.java +379 -0
- data/src/main/java/processing/opengl/FrameBuffer.java +503 -0
- data/src/main/java/processing/opengl/LinePath.java +623 -0
- data/src/main/java/processing/opengl/LineStroker.java +685 -0
- data/src/main/java/processing/opengl/PGL.java +3366 -0
- data/src/main/java/processing/opengl/PGraphics2D.java +615 -0
- data/src/main/java/processing/opengl/PGraphics3D.java +281 -0
- data/src/main/java/processing/opengl/PGraphicsOpenGL.java +13634 -0
- data/src/main/java/processing/opengl/PJOGL.java +1966 -0
- data/src/main/java/processing/opengl/PShader.java +1478 -0
- data/src/main/java/processing/opengl/PShapeOpenGL.java +5234 -0
- data/src/main/java/processing/opengl/PSurfaceJOGL.java +1315 -0
- data/src/main/java/processing/opengl/Texture.java +1670 -0
- data/src/main/java/processing/opengl/VertexBuffer.java +88 -0
- data/src/main/java/processing/opengl/cursors/arrow.png +0 -0
- data/src/main/java/processing/opengl/cursors/cross.png +0 -0
- data/src/main/java/processing/opengl/cursors/hand.png +0 -0
- data/src/main/java/processing/opengl/cursors/license.txt +27 -0
- data/src/main/java/processing/opengl/cursors/move.png +0 -0
- data/src/main/java/processing/opengl/cursors/text.png +0 -0
- data/src/main/java/processing/opengl/cursors/wait.png +0 -0
- data/src/main/java/processing/opengl/shaders/ColorFrag.glsl +32 -0
- data/src/main/java/processing/opengl/shaders/ColorVert.glsl +34 -0
- data/src/main/java/processing/opengl/shaders/LightFrag.glsl +33 -0
- data/src/main/java/processing/opengl/shaders/LightVert-vc4.glsl +154 -0
- data/src/main/java/processing/opengl/shaders/LightVert.glsl +151 -0
- data/src/main/java/processing/opengl/shaders/LineFrag.glsl +32 -0
- data/src/main/java/processing/opengl/shaders/LineVert.glsl +100 -0
- data/src/main/java/processing/opengl/shaders/MaskFrag.glsl +40 -0
- data/src/main/java/processing/opengl/shaders/PointFrag.glsl +32 -0
- data/src/main/java/processing/opengl/shaders/PointVert.glsl +56 -0
- data/src/main/java/processing/opengl/shaders/TexFrag.glsl +37 -0
- data/src/main/java/processing/opengl/shaders/TexLightFrag.glsl +37 -0
- data/src/main/java/processing/opengl/shaders/TexLightVert-vc4.glsl +160 -0
- data/src/main/java/processing/opengl/shaders/TexLightVert.glsl +157 -0
- data/src/main/java/processing/opengl/shaders/TexVert.glsl +38 -0
- data/src/main/resources/icon/icon-1024.png +0 -0
- data/src/main/resources/icon/icon-128.png +0 -0
- data/src/main/resources/icon/icon-16.png +0 -0
- data/src/main/resources/icon/icon-256.png +0 -0
- data/src/main/resources/icon/icon-32.png +0 -0
- data/src/main/resources/icon/icon-48.png +0 -0
- data/src/main/resources/icon/icon-512.png +0 -0
- data/src/main/resources/icon/icon-64.png +0 -0
- data/src/main/resources/license.txt +508 -0
- data/test/create_test.rb +68 -0
- data/test/deglut_spec_test.rb +24 -0
- data/test/helper_methods_test.rb +58 -0
- data/test/math_tool_test.rb +75 -0
- data/test/respond_to_test.rb +215 -0
- data/test/sketches/key_event.rb +37 -0
- data/test/sketches/library/my_library/my_library.rb +32 -0
- data/test/test_helper.rb +3 -0
- data/test/vecmath_spec_test.rb +522 -0
- data/vendors/Rakefile +127 -0
- metadata +289 -0
data/picrate.gemspec
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'picrate/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |gem|
|
7
|
+
gem.name = 'picrate'
|
8
|
+
gem.version = PiCrate::VERSION
|
9
|
+
gem.authors = ['monkstone']
|
10
|
+
gem.email = ['mamba2928@yahoo.co.uk']
|
11
|
+
gem.licenses = %w(GPL-3.0 LGPL-2.0)
|
12
|
+
gem.description = <<-EOS
|
13
|
+
A batteries included version of processing in ruby, for raspberrypi and linux.
|
14
|
+
EOS
|
15
|
+
gem.summary = %q{ruby wrapper for processing-3.3.7 on raspberrypi and linux64}
|
16
|
+
gem.homepage = 'https://ruby-processing.github.io/PiCrate/'
|
17
|
+
gem.files = `git ls-files`.split($/)
|
18
|
+
gem.files << 'lib/picrate-0.0.2.jar'
|
19
|
+
gem.files << 'lib/gluegen-rt-2.3.2.jar'
|
20
|
+
gem.files << 'lib/jogl-all-2.3.2.jar'
|
21
|
+
gem.files << 'lib/gluegen-rt-2.3.2-natives-linux-amd64.jar'
|
22
|
+
gem.files << 'lib/gluegen-rt-2.3.2-natives-linux-armv6hf.jar'
|
23
|
+
# gem.files << 'lib/gluegen-rt-2.3.2-natives-linux-aarch64.jar'
|
24
|
+
gem.files << 'lib/jogl-all-2.3.2-natives-linux-amd64.jar'
|
25
|
+
gem.files << 'lib/jogl-all-2.3.2-natives-linux-armv6hf.jar'
|
26
|
+
# gem.files << 'lib/jogl-all-2.3.2-natives-linux-aarch64.jar'
|
27
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
28
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
29
|
+
gem.add_development_dependency 'rake', '~> 12.3'
|
30
|
+
gem.add_development_dependency 'minitest', '~> 5.10'
|
31
|
+
gem.add_runtime_dependency 'arcball', '~> 1.0', '>= 1.0.0'
|
32
|
+
gem.require_paths = ['lib']
|
33
|
+
gem.platform = 'java'
|
34
|
+
gem.requirements << 'java runtime >= 1.8.0_151+'
|
35
|
+
end
|
data/pom.rb
ADDED
@@ -0,0 +1,122 @@
|
|
1
|
+
project 'picrate', 'http://maven.apache.org' do
|
2
|
+
|
3
|
+
model_version '4.0.0'
|
4
|
+
id 'ruby-processing:picrate:0.0.2'
|
5
|
+
packaging 'jar'
|
6
|
+
|
7
|
+
description 'An integrated processing-core (somewhat hacked), with additional java code for a jruby version of processing.'
|
8
|
+
|
9
|
+
organization 'ruby-processing', 'https://ruby-processing.github.io'
|
10
|
+
|
11
|
+
{
|
12
|
+
'monkstone' => 'Martin Prout', 'benfry' => 'Ben Fry',
|
13
|
+
'REAS' => 'Casey Reas', 'codeanticode' => 'Andres Colubri'
|
14
|
+
}.each do |key, value|
|
15
|
+
developer key do
|
16
|
+
name value
|
17
|
+
roles 'developer'
|
18
|
+
end
|
19
|
+
end
|
20
|
+
license 'GPL 3', 'http://www.gnu.org/licenses/gpl-3.0-standalone.html'
|
21
|
+
license 'LGPL 2', 'https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html'
|
22
|
+
|
23
|
+
issue_management 'https://github.com/ruby-processing/PiCrate/issues', 'Github'
|
24
|
+
|
25
|
+
properties( 'jogl.version' => '2.3.2',
|
26
|
+
'jruby.api' => 'http://jruby.org/apidocs/',
|
27
|
+
'source.directory' => 'src',
|
28
|
+
'maven.compiler.target' => '1.8',
|
29
|
+
'processing.api' => 'http://processing.github.io/processing-javadocs/core/',
|
30
|
+
'picrate.basedir' => '${project.basedir}',
|
31
|
+
'project.build.sourceEncoding' => 'utf-8',
|
32
|
+
'polyglot.dump.pom' => 'pom.xml',
|
33
|
+
'maven.compiler.source' => '1.8' )
|
34
|
+
pom 'org.jruby:jruby:9.1.16.0'
|
35
|
+
jar 'org.processing:video:3.0.2'
|
36
|
+
jar 'org.jogamp.jogl:jogl-all:${jogl.version}'
|
37
|
+
jar 'org.jogamp.gluegen:gluegen-rt-main:${jogl.version}'
|
38
|
+
|
39
|
+
overrides do
|
40
|
+
plugin :resources, '2.6'
|
41
|
+
plugin :dependency, '2.10' do
|
42
|
+
execute_goals( id: 'default-cli',
|
43
|
+
artifactItems: [ { groupId: 'org.jogamp.jogl',
|
44
|
+
artifactId: 'jogl-all',
|
45
|
+
version: '${jogl.version}',
|
46
|
+
type: 'jar',
|
47
|
+
outputDirectory: '${picrate.basedir}/lib'
|
48
|
+
},
|
49
|
+
{ groupId: 'org.jogamp.gluegen',
|
50
|
+
artifactId: 'gluegen-rt',
|
51
|
+
version: '${jogl.version}',
|
52
|
+
type: 'jar',
|
53
|
+
outputDirectory: '${picrate.basedir}/lib'
|
54
|
+
},
|
55
|
+
{ groupId: 'org.jogamp.jogl',
|
56
|
+
artifactId: 'jogl-all',
|
57
|
+
version: '${jogl.version}',
|
58
|
+
classifier: 'natives-linux-amd64',
|
59
|
+
type: 'jar',
|
60
|
+
outputDirectory: '${picrate.basedir}/lib'
|
61
|
+
},
|
62
|
+
{ groupId: 'org.jogamp.gluegen',
|
63
|
+
artifactId: 'gluegen-rt',
|
64
|
+
version: '${jogl.version}',
|
65
|
+
type: 'jar',
|
66
|
+
classifier: 'natives-linux-amd64',
|
67
|
+
outputDirectory: '${picrate.basedir}/lib'
|
68
|
+
},
|
69
|
+
# { groupId: 'org.jogamp.jogl',
|
70
|
+
# artifactId: 'jogl-all',
|
71
|
+
# version: '${jogl.version}',
|
72
|
+
# classifier: 'natives-linux-aarch64',
|
73
|
+
# type: 'jar',
|
74
|
+
# outputDirectory: '${picrate.basedir}/lib'
|
75
|
+
# },
|
76
|
+
# { groupId: 'org.jogamp.gluegen',
|
77
|
+
# artifactId: 'gluegen-rt',
|
78
|
+
# version: '${jogl.version}',
|
79
|
+
# type: 'jar',
|
80
|
+
# classifier: 'natives-linux-aarch64',
|
81
|
+
# outputDirectory: '${picrate.basedir}/lib'
|
82
|
+
# }
|
83
|
+
{ groupId: 'org.jogamp.jogl',
|
84
|
+
artifactId: 'jogl-all',
|
85
|
+
version: '${jogl.version}',
|
86
|
+
classifier: 'natives-linux-armv6hf',
|
87
|
+
type: 'jar',
|
88
|
+
outputDirectory: '${picrate.basedir}/lib'
|
89
|
+
},
|
90
|
+
{ groupId: 'org.jogamp.gluegen',
|
91
|
+
artifactId: 'gluegen-rt',
|
92
|
+
version: '${jogl.version}',
|
93
|
+
type: 'jar',
|
94
|
+
classifier: 'natives-linux-armv6hf',
|
95
|
+
outputDirectory: '${picrate.basedir}/lib'
|
96
|
+
}
|
97
|
+
]
|
98
|
+
)
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
plugin( :resources, '2.7',
|
103
|
+
'encoding' => 'UTF-8' )
|
104
|
+
plugin( :compiler, '3.7.0',
|
105
|
+
'source' => '1.8',
|
106
|
+
'target' => '1.8' )
|
107
|
+
plugin( :pmd, '3.3',
|
108
|
+
'sourceEncoding' => 'utf-8',
|
109
|
+
'minimumTokens' => '100',
|
110
|
+
'targetJdk' => '${compileSource}' )
|
111
|
+
build do
|
112
|
+
resource do
|
113
|
+
directory '${source.directory}/main/java'
|
114
|
+
includes ['**/**/*.glsl', '**/*.jnilib']
|
115
|
+
excludes '**/**/*.java'
|
116
|
+
end
|
117
|
+
resource do
|
118
|
+
directory '${source.directory}/main/resources'
|
119
|
+
includes ['**/*.png', '*.txt']
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
data/pom.xml
ADDED
@@ -0,0 +1,214 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!--
|
3
|
+
|
4
|
+
|
5
|
+
DO NOT MODIFIY - GENERATED CODE
|
6
|
+
|
7
|
+
|
8
|
+
-->
|
9
|
+
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
10
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
11
|
+
<modelVersion>4.0.0</modelVersion>
|
12
|
+
<groupId>ruby-processing</groupId>
|
13
|
+
<artifactId>picrate</artifactId>
|
14
|
+
<version>0.0.2</version>
|
15
|
+
<name>picrate</name>
|
16
|
+
<description>An integrated processing-core (somewhat hacked), with additional java code for a jruby version of processing.</description>
|
17
|
+
<url>http://maven.apache.org</url>
|
18
|
+
<organization>
|
19
|
+
<name>ruby-processing</name>
|
20
|
+
<url>https://ruby-processing.github.io</url>
|
21
|
+
</organization>
|
22
|
+
<licenses>
|
23
|
+
<license>
|
24
|
+
<name>GPL 3</name>
|
25
|
+
<url>http://www.gnu.org/licenses/gpl-3.0-standalone.html</url>
|
26
|
+
</license>
|
27
|
+
<license>
|
28
|
+
<name>LGPL 2</name>
|
29
|
+
<url>https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html</url>
|
30
|
+
</license>
|
31
|
+
</licenses>
|
32
|
+
<developers>
|
33
|
+
<developer>
|
34
|
+
<id>monkstone</id>
|
35
|
+
<name>Martin Prout</name>
|
36
|
+
<roles>
|
37
|
+
<role>developer</role>
|
38
|
+
</roles>
|
39
|
+
</developer>
|
40
|
+
<developer>
|
41
|
+
<id>benfry</id>
|
42
|
+
<name>Ben Fry</name>
|
43
|
+
<roles>
|
44
|
+
<role>developer</role>
|
45
|
+
</roles>
|
46
|
+
</developer>
|
47
|
+
<developer>
|
48
|
+
<id>REAS</id>
|
49
|
+
<name>Casey Reas</name>
|
50
|
+
<roles>
|
51
|
+
<role>developer</role>
|
52
|
+
</roles>
|
53
|
+
</developer>
|
54
|
+
<developer>
|
55
|
+
<id>codeanticode</id>
|
56
|
+
<name>Andres Colubri</name>
|
57
|
+
<roles>
|
58
|
+
<role>developer</role>
|
59
|
+
</roles>
|
60
|
+
</developer>
|
61
|
+
</developers>
|
62
|
+
<issueManagement>
|
63
|
+
<system>Github</system>
|
64
|
+
<url>https://github.com/ruby-processing/PiCrate/issues</url>
|
65
|
+
</issueManagement>
|
66
|
+
<properties>
|
67
|
+
<maven.compiler.target>1.8</maven.compiler.target>
|
68
|
+
<processing.api>http://processing.github.io/processing-javadocs/core/</processing.api>
|
69
|
+
<source.directory>src</source.directory>
|
70
|
+
<picrate.basedir>${project.basedir}</picrate.basedir>
|
71
|
+
<maven.compiler.source>1.8</maven.compiler.source>
|
72
|
+
<polyglot.dump.pom>pom.xml</polyglot.dump.pom>
|
73
|
+
<project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
|
74
|
+
<jogl.version>2.3.2</jogl.version>
|
75
|
+
<jruby.api>http://jruby.org/apidocs/</jruby.api>
|
76
|
+
</properties>
|
77
|
+
<dependencies>
|
78
|
+
<dependency>
|
79
|
+
<groupId>org.jruby</groupId>
|
80
|
+
<artifactId>jruby</artifactId>
|
81
|
+
<version>9.1.16.0</version>
|
82
|
+
<type>pom</type>
|
83
|
+
</dependency>
|
84
|
+
<dependency>
|
85
|
+
<groupId>org.processing</groupId>
|
86
|
+
<artifactId>video</artifactId>
|
87
|
+
<version>3.0.2</version>
|
88
|
+
</dependency>
|
89
|
+
<dependency>
|
90
|
+
<groupId>org.jogamp.jogl</groupId>
|
91
|
+
<artifactId>jogl-all</artifactId>
|
92
|
+
<version>${jogl.version}</version>
|
93
|
+
</dependency>
|
94
|
+
<dependency>
|
95
|
+
<groupId>org.jogamp.gluegen</groupId>
|
96
|
+
<artifactId>gluegen-rt-main</artifactId>
|
97
|
+
<version>${jogl.version}</version>
|
98
|
+
</dependency>
|
99
|
+
</dependencies>
|
100
|
+
<build>
|
101
|
+
<resources>
|
102
|
+
<resource>
|
103
|
+
<directory>${source.directory}/main/java</directory>
|
104
|
+
<includes>
|
105
|
+
<include>**/**/*.glsl</include>
|
106
|
+
<include>**/*.jnilib</include>
|
107
|
+
</includes>
|
108
|
+
<excludes>
|
109
|
+
<exclude>**/**/*.java</exclude>
|
110
|
+
</excludes>
|
111
|
+
</resource>
|
112
|
+
<resource>
|
113
|
+
<directory>${source.directory}/main/resources</directory>
|
114
|
+
<includes>
|
115
|
+
<include>**/*.png</include>
|
116
|
+
<include>*.txt</include>
|
117
|
+
</includes>
|
118
|
+
</resource>
|
119
|
+
</resources>
|
120
|
+
<pluginManagement>
|
121
|
+
<plugins>
|
122
|
+
<plugin>
|
123
|
+
<artifactId>maven-resources-plugin</artifactId>
|
124
|
+
<version>2.6</version>
|
125
|
+
</plugin>
|
126
|
+
<plugin>
|
127
|
+
<artifactId>maven-dependency-plugin</artifactId>
|
128
|
+
<version>2.10</version>
|
129
|
+
<executions>
|
130
|
+
<execution>
|
131
|
+
<id>default-cli</id>
|
132
|
+
<configuration>
|
133
|
+
<artifactItems>
|
134
|
+
<artifactItem>
|
135
|
+
<groupId>org.jogamp.jogl</groupId>
|
136
|
+
<artifactId>jogl-all</artifactId>
|
137
|
+
<version>${jogl.version}</version>
|
138
|
+
<type>jar</type>
|
139
|
+
<outputDirectory>${picrate.basedir}/lib</outputDirectory>
|
140
|
+
</artifactItem>
|
141
|
+
<artifactItem>
|
142
|
+
<groupId>org.jogamp.gluegen</groupId>
|
143
|
+
<artifactId>gluegen-rt</artifactId>
|
144
|
+
<version>${jogl.version}</version>
|
145
|
+
<type>jar</type>
|
146
|
+
<outputDirectory>${picrate.basedir}/lib</outputDirectory>
|
147
|
+
</artifactItem>
|
148
|
+
<artifactItem>
|
149
|
+
<groupId>org.jogamp.jogl</groupId>
|
150
|
+
<artifactId>jogl-all</artifactId>
|
151
|
+
<version>${jogl.version}</version>
|
152
|
+
<classifier>natives-linux-amd64</classifier>
|
153
|
+
<type>jar</type>
|
154
|
+
<outputDirectory>${picrate.basedir}/lib</outputDirectory>
|
155
|
+
</artifactItem>
|
156
|
+
<artifactItem>
|
157
|
+
<groupId>org.jogamp.gluegen</groupId>
|
158
|
+
<artifactId>gluegen-rt</artifactId>
|
159
|
+
<version>${jogl.version}</version>
|
160
|
+
<type>jar</type>
|
161
|
+
<classifier>natives-linux-amd64</classifier>
|
162
|
+
<outputDirectory>${picrate.basedir}/lib</outputDirectory>
|
163
|
+
</artifactItem>
|
164
|
+
<artifactItem>
|
165
|
+
<groupId>org.jogamp.jogl</groupId>
|
166
|
+
<artifactId>jogl-all</artifactId>
|
167
|
+
<version>${jogl.version}</version>
|
168
|
+
<classifier>natives-linux-armv6hf</classifier>
|
169
|
+
<type>jar</type>
|
170
|
+
<outputDirectory>${picrate.basedir}/lib</outputDirectory>
|
171
|
+
</artifactItem>
|
172
|
+
<artifactItem>
|
173
|
+
<groupId>org.jogamp.gluegen</groupId>
|
174
|
+
<artifactId>gluegen-rt</artifactId>
|
175
|
+
<version>${jogl.version}</version>
|
176
|
+
<type>jar</type>
|
177
|
+
<classifier>natives-linux-armv6hf</classifier>
|
178
|
+
<outputDirectory>${picrate.basedir}/lib</outputDirectory>
|
179
|
+
</artifactItem>
|
180
|
+
</artifactItems>
|
181
|
+
</configuration>
|
182
|
+
</execution>
|
183
|
+
</executions>
|
184
|
+
</plugin>
|
185
|
+
</plugins>
|
186
|
+
</pluginManagement>
|
187
|
+
<plugins>
|
188
|
+
<plugin>
|
189
|
+
<artifactId>maven-resources-plugin</artifactId>
|
190
|
+
<version>2.7</version>
|
191
|
+
<configuration>
|
192
|
+
<encoding>UTF-8</encoding>
|
193
|
+
</configuration>
|
194
|
+
</plugin>
|
195
|
+
<plugin>
|
196
|
+
<artifactId>maven-compiler-plugin</artifactId>
|
197
|
+
<version>3.7.0</version>
|
198
|
+
<configuration>
|
199
|
+
<source>1.8</source>
|
200
|
+
<target>1.8</target>
|
201
|
+
</configuration>
|
202
|
+
</plugin>
|
203
|
+
<plugin>
|
204
|
+
<artifactId>maven-pmd-plugin</artifactId>
|
205
|
+
<version>3.3</version>
|
206
|
+
<configuration>
|
207
|
+
<sourceEncoding>utf-8</sourceEncoding>
|
208
|
+
<minimumTokens>100</minimumTokens>
|
209
|
+
<targetJdk>${compileSource}</targetJdk>
|
210
|
+
</configuration>
|
211
|
+
</plugin>
|
212
|
+
</plugins>
|
213
|
+
</build>
|
214
|
+
</project>
|
@@ -0,0 +1,88 @@
|
|
1
|
+
/*
|
2
|
+
Part of the Processing project - http://processing.org
|
3
|
+
|
4
|
+
Copyright (c) 2011-12 hansi raber, released under LGPL under agreement
|
5
|
+
|
6
|
+
This library is free software; you can redistribute it and/or
|
7
|
+
modify it under the terms of the GNU Lesser General Public
|
8
|
+
License as published by the Free Software Foundation, version 2.1.
|
9
|
+
|
10
|
+
This library is distributed in the hope that it will be useful,
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
Lesser General Public License for more details.
|
14
|
+
|
15
|
+
You should have received a copy of the GNU Lesser General
|
16
|
+
Public License along with this library; if not, write to the
|
17
|
+
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
18
|
+
Boston, MA 02111-1307 USA
|
19
|
+
*/
|
20
|
+
package japplemenubar;
|
21
|
+
|
22
|
+
import java.io.*;
|
23
|
+
|
24
|
+
import processing.core.PApplet;
|
25
|
+
|
26
|
+
|
27
|
+
/**
|
28
|
+
* Starting point for the application. General initialization should be done
|
29
|
+
* inside the ApplicationController's init() method. If certain kinds of
|
30
|
+
* non-Swing initialization takes too long, it should happen in a new Thread
|
31
|
+
* and off the Swing event dispatch thread (EDT).
|
32
|
+
*
|
33
|
+
* @author hansi
|
34
|
+
*/
|
35
|
+
public class JAppleMenuBar {
|
36
|
+
static JAppleMenuBar instance;
|
37
|
+
static final String FILENAME = "libjAppleMenuBar.jnilib";
|
38
|
+
|
39
|
+
static {
|
40
|
+
try {
|
41
|
+
File temp = File.createTempFile("processing", "menubar");
|
42
|
+
temp.delete(); // remove the file itself
|
43
|
+
temp.mkdirs(); // create a directory out of it
|
44
|
+
temp.deleteOnExit();
|
45
|
+
|
46
|
+
File jnilibFile = new File(temp, FILENAME);
|
47
|
+
InputStream input = JAppleMenuBar.class.getResourceAsStream(FILENAME);
|
48
|
+
if (input != null) {
|
49
|
+
if (PApplet.saveStream(jnilibFile, input)) {
|
50
|
+
System.load(jnilibFile.getAbsolutePath());
|
51
|
+
instance = new JAppleMenuBar();
|
52
|
+
|
53
|
+
} else {
|
54
|
+
sadness("Problem saving " + FILENAME + " for full screen use.");
|
55
|
+
}
|
56
|
+
} else {
|
57
|
+
sadness("Could not load " + FILENAME + " from core.jar");
|
58
|
+
}
|
59
|
+
} catch (IOException e) {
|
60
|
+
sadness("Unknown error, here's the stack trace.");
|
61
|
+
e.printStackTrace();
|
62
|
+
}
|
63
|
+
}
|
64
|
+
|
65
|
+
|
66
|
+
static void sadness(String msg) {
|
67
|
+
System.err.println("Full screen mode disabled. " + msg);
|
68
|
+
}
|
69
|
+
|
70
|
+
|
71
|
+
// static public void show() {
|
72
|
+
// instance.setVisible(true);
|
73
|
+
// }
|
74
|
+
|
75
|
+
|
76
|
+
static public void hide() {
|
77
|
+
instance.setVisible(false, false);
|
78
|
+
}
|
79
|
+
|
80
|
+
|
81
|
+
public native void setVisible(boolean visibility, boolean kioskMode);
|
82
|
+
|
83
|
+
|
84
|
+
// public void setVisible(boolean visibility) {
|
85
|
+
// // Keep original API in-tact. Default kiosk-mode to off.
|
86
|
+
// setVisible(visibility, false);
|
87
|
+
// }
|
88
|
+
}
|