propane 2.7.2-java → 2.8.0.pre-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (124) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +10 -0
  3. data/CHANGELOG.md +1 -1
  4. data/README.md +10 -8
  5. data/Rakefile +1 -1
  6. data/lib/propane/app.rb +3 -3
  7. data/lib/propane/version.rb +1 -1
  8. data/lib/{processing-core.jar → propane-2.8.0.jar} +0 -0
  9. data/library/control_panel/control_panel.rb +3 -2
  10. data/pom.rb +89 -88
  11. data/pom.xml +75 -46
  12. data/propane.gemspec +1 -2
  13. data/src/main/java/japplemenubar/JAppleMenuBar.java +88 -0
  14. data/src/main/java/japplemenubar/libjAppleMenuBar.jnilib +0 -0
  15. data/src/{monkstone → main/java/monkstone}/ColorUtil.java +0 -0
  16. data/src/{monkstone → main/java/monkstone}/MathToolModule.java +0 -0
  17. data/src/{monkstone → main/java/monkstone}/PropaneLibrary.java +0 -0
  18. data/src/{monkstone → main/java/monkstone}/core/LibraryProxy.java +0 -0
  19. data/src/{monkstone → main/java/monkstone}/fastmath/Deglut.java +0 -0
  20. data/src/{monkstone → main/java/monkstone}/fastmath/package-info.java +0 -0
  21. data/src/{monkstone → main/java/monkstone}/filechooser/Chooser.java +0 -0
  22. data/src/{monkstone → main/java/monkstone}/noise/SimplexNoise.java +0 -0
  23. data/src/{monkstone → main/java/monkstone}/slider/CustomHorizontalSlider.java +0 -0
  24. data/src/{monkstone → main/java/monkstone}/slider/CustomVerticalSlider.java +0 -0
  25. data/src/{monkstone → main/java/monkstone}/slider/SimpleHorizontalSlider.java +0 -0
  26. data/src/{monkstone → main/java/monkstone}/slider/SimpleSlider.java +0 -0
  27. data/src/{monkstone → main/java/monkstone}/slider/SimpleVerticalSlider.java +0 -0
  28. data/src/{monkstone → main/java/monkstone}/slider/Slider.java +0 -0
  29. data/src/{monkstone → main/java/monkstone}/slider/SliderBar.java +0 -0
  30. data/src/{monkstone → main/java/monkstone}/slider/SliderGroup.java +0 -0
  31. data/src/{monkstone → main/java/monkstone}/slider/WheelHandler.java +0 -0
  32. data/src/{monkstone → main/java/monkstone}/vecmath/AppRender.java +0 -0
  33. data/src/{monkstone → main/java/monkstone}/vecmath/JRender.java +0 -0
  34. data/src/{monkstone → main/java/monkstone}/vecmath/ShapeRender.java +0 -0
  35. data/src/{monkstone → main/java/monkstone}/vecmath/package-info.java +0 -0
  36. data/src/{monkstone → main/java/monkstone}/vecmath/vec2/Vec2.java +0 -0
  37. data/src/{monkstone → main/java/monkstone}/vecmath/vec2/package-info.java +0 -0
  38. data/src/{monkstone → main/java/monkstone}/vecmath/vec3/Vec3.java +0 -0
  39. data/src/{monkstone → main/java/monkstone}/vecmath/vec3/package-info.java +0 -0
  40. data/src/{monkstone → main/java/monkstone}/videoevent/VideoInterface.java +0 -0
  41. data/src/{monkstone → main/java/monkstone}/videoevent/package-info.java +0 -0
  42. data/src/main/java/processing/awt/PGraphicsJava2D.java +3029 -0
  43. data/src/main/java/processing/awt/PShapeJava2D.java +377 -0
  44. data/src/main/java/processing/awt/PSurfaceAWT.java +1567 -0
  45. data/src/main/java/processing/core/PApplet.java +15709 -0
  46. data/src/main/java/processing/core/PConstants.java +527 -0
  47. data/src/main/java/processing/core/PFont.java +1098 -0
  48. data/src/main/java/processing/core/PGraphics.java +8467 -0
  49. data/src/main/java/processing/core/PImage.java +3438 -0
  50. data/src/main/java/processing/core/PMatrix.java +208 -0
  51. data/src/main/java/processing/core/PMatrix2D.java +534 -0
  52. data/src/main/java/processing/core/PMatrix3D.java +877 -0
  53. data/src/main/java/processing/core/PShape.java +3445 -0
  54. data/src/main/java/processing/core/PShapeOBJ.java +469 -0
  55. data/src/main/java/processing/core/PShapeSVG.java +1787 -0
  56. data/src/main/java/processing/core/PStyle.java +63 -0
  57. data/src/main/java/processing/core/PSurface.java +161 -0
  58. data/src/main/java/processing/core/PSurfaceNone.java +374 -0
  59. data/src/main/java/processing/core/PVector.java +1063 -0
  60. data/src/main/java/processing/data/FloatDict.java +829 -0
  61. data/src/main/java/processing/data/FloatList.java +912 -0
  62. data/src/main/java/processing/data/IntDict.java +796 -0
  63. data/src/main/java/processing/data/IntList.java +913 -0
  64. data/src/main/java/processing/data/JSONArray.java +1260 -0
  65. data/src/main/java/processing/data/JSONObject.java +2282 -0
  66. data/src/main/java/processing/data/JSONTokener.java +435 -0
  67. data/src/main/java/processing/data/Sort.java +46 -0
  68. data/src/main/java/processing/data/StringDict.java +601 -0
  69. data/src/main/java/processing/data/StringList.java +775 -0
  70. data/src/main/java/processing/data/Table.java +4923 -0
  71. data/src/main/java/processing/data/TableRow.java +198 -0
  72. data/src/main/java/processing/data/XML.java +1149 -0
  73. data/src/main/java/processing/event/Event.java +125 -0
  74. data/src/main/java/processing/event/KeyEvent.java +70 -0
  75. data/src/main/java/processing/event/MouseEvent.java +149 -0
  76. data/src/main/java/processing/event/TouchEvent.java +57 -0
  77. data/src/main/java/processing/opengl/FontTexture.java +379 -0
  78. data/src/main/java/processing/opengl/FrameBuffer.java +503 -0
  79. data/src/main/java/processing/opengl/LinePath.java +623 -0
  80. data/src/main/java/processing/opengl/LineStroker.java +685 -0
  81. data/src/main/java/processing/opengl/PGL.java +3366 -0
  82. data/src/main/java/processing/opengl/PGraphics2D.java +615 -0
  83. data/src/main/java/processing/opengl/PGraphics3D.java +281 -0
  84. data/src/main/java/processing/opengl/PGraphicsOpenGL.java +13634 -0
  85. data/src/main/java/processing/opengl/PJOGL.java +1966 -0
  86. data/src/main/java/processing/opengl/PShader.java +1478 -0
  87. data/src/main/java/processing/opengl/PShapeOpenGL.java +5234 -0
  88. data/src/main/java/processing/opengl/PSurfaceJOGL.java +1315 -0
  89. data/src/main/java/processing/opengl/Texture.java +1670 -0
  90. data/src/main/java/processing/opengl/VertexBuffer.java +88 -0
  91. data/src/main/java/processing/opengl/cursors/arrow.png +0 -0
  92. data/src/main/java/processing/opengl/cursors/cross.png +0 -0
  93. data/src/main/java/processing/opengl/cursors/hand.png +0 -0
  94. data/src/main/java/processing/opengl/cursors/license.txt +27 -0
  95. data/src/main/java/processing/opengl/cursors/move.png +0 -0
  96. data/src/main/java/processing/opengl/cursors/text.png +0 -0
  97. data/src/main/java/processing/opengl/cursors/wait.png +0 -0
  98. data/src/main/java/processing/opengl/shaders/ColorFrag.glsl +32 -0
  99. data/src/main/java/processing/opengl/shaders/ColorVert.glsl +34 -0
  100. data/src/main/java/processing/opengl/shaders/LightFrag.glsl +33 -0
  101. data/src/main/java/processing/opengl/shaders/LightVert-vc4.glsl +154 -0
  102. data/src/main/java/processing/opengl/shaders/LightVert.glsl +151 -0
  103. data/src/main/java/processing/opengl/shaders/LineFrag.glsl +32 -0
  104. data/src/main/java/processing/opengl/shaders/LineVert.glsl +100 -0
  105. data/src/main/java/processing/opengl/shaders/MaskFrag.glsl +40 -0
  106. data/src/main/java/processing/opengl/shaders/PointFrag.glsl +32 -0
  107. data/src/main/java/processing/opengl/shaders/PointVert.glsl +56 -0
  108. data/src/main/java/processing/opengl/shaders/TexFrag.glsl +37 -0
  109. data/src/main/java/processing/opengl/shaders/TexLightFrag.glsl +37 -0
  110. data/src/main/java/processing/opengl/shaders/TexLightVert-vc4.glsl +160 -0
  111. data/src/main/java/processing/opengl/shaders/TexLightVert.glsl +157 -0
  112. data/src/main/java/processing/opengl/shaders/TexVert.glsl +38 -0
  113. data/src/main/resources/icon/icon-1024.png +0 -0
  114. data/src/main/resources/icon/icon-128.png +0 -0
  115. data/src/main/resources/icon/icon-16.png +0 -0
  116. data/src/main/resources/icon/icon-256.png +0 -0
  117. data/src/main/resources/icon/icon-32.png +0 -0
  118. data/src/main/resources/icon/icon-48.png +0 -0
  119. data/src/main/resources/icon/icon-512.png +0 -0
  120. data/src/main/resources/icon/icon-64.png +0 -0
  121. data/src/main/resources/license.txt +508 -0
  122. data/vendors/Rakefile +5 -20
  123. metadata +115 -33
  124. data/lib/propane.jar +0 -0
@@ -0,0 +1,125 @@
1
+ /* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2
+
3
+ /*
4
+ Part of the Processing project - http://processing.org
5
+
6
+ Copyright (c) 2012 The Processing Foundation
7
+
8
+ This library is free software; you can redistribute it and/or
9
+ modify it under the terms of the GNU Lesser General Public
10
+ License as published by the Free Software Foundation, version 2.1.
11
+
12
+ This library is distributed in the hope that it will be useful,
13
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
+ Lesser General Public License for more details.
16
+
17
+ You should have received a copy of the GNU Lesser General
18
+ Public License along with this library; if not, write to the
19
+ Free Software Foundation, Inc., 59 Temple Place, Suite 330,
20
+ Boston, MA 02111-1307 USA
21
+ */
22
+
23
+ package processing.event;
24
+
25
+
26
+ public class Event {
27
+ protected Object nativeObject;
28
+
29
+ protected long millis;
30
+ protected int action;
31
+
32
+ // These correspond to the java.awt.Event modifiers (not to be confused with
33
+ // the newer getModifiersEx), though they're not guaranteed to in the future.
34
+ static public final int SHIFT = 1 << 0;
35
+ static public final int CTRL = 1 << 1;
36
+ static public final int META = 1 << 2;
37
+ static public final int ALT = 1 << 3;
38
+ protected int modifiers;
39
+
40
+ // Types of events. As with all constants in Processing, brevity's preferred.
41
+ static public final int KEY = 1;
42
+ static public final int MOUSE = 2;
43
+ static public final int TOUCH = 3;
44
+ protected int flavor;
45
+
46
+
47
+ public Event(Object nativeObject, long millis, int action, int modifiers) {
48
+ this.nativeObject = nativeObject;
49
+ this.millis = millis;
50
+ this.action = action;
51
+ this.modifiers = modifiers;
52
+ }
53
+
54
+
55
+ public int getFlavor() {
56
+ return flavor;
57
+ }
58
+
59
+
60
+ /**
61
+ * Get the platform-native event object. This might be the java.awt event
62
+ * on the desktop, though if you're using OpenGL on the desktop it'll be a
63
+ * NEWT event that JOGL uses. Android events are something else altogether.
64
+ * Bottom line, use this only if you know what you're doing, and don't make
65
+ * assumptions about the class type.
66
+ */
67
+ public Object getNative() {
68
+ return nativeObject;
69
+ }
70
+
71
+
72
+ // public void setNative(Object nativeObject) {
73
+ // this.nativeObject = nativeObject;
74
+ // }
75
+
76
+
77
+ public long getMillis() {
78
+ return millis;
79
+ }
80
+
81
+
82
+ // public void setMillis(long millis) {
83
+ // this.millis = millis;
84
+ // }
85
+
86
+
87
+ public int getAction() {
88
+ return action;
89
+ }
90
+
91
+
92
+ // public void setAction(int action) {
93
+ // this.action = action;
94
+ // }
95
+
96
+
97
+ public int getModifiers() {
98
+ return modifiers;
99
+ }
100
+
101
+
102
+ // public void setModifiers(int modifiers) {
103
+ // this.modifiers = modifiers;
104
+ // }
105
+
106
+
107
+ public boolean isShiftDown() {
108
+ return (modifiers & SHIFT) != 0;
109
+ }
110
+
111
+
112
+ public boolean isControlDown() {
113
+ return (modifiers & CTRL) != 0;
114
+ }
115
+
116
+
117
+ public boolean isMetaDown() {
118
+ return (modifiers & META) != 0;
119
+ }
120
+
121
+
122
+ public boolean isAltDown() {
123
+ return (modifiers & ALT) != 0;
124
+ }
125
+ }
@@ -0,0 +1,70 @@
1
+ /* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2
+
3
+ /*
4
+ Part of the Processing project - http://processing.org
5
+
6
+ Copyright (c) 2012 The Processing Foundation
7
+
8
+ This library is free software; you can redistribute it and/or
9
+ modify it under the terms of the GNU Lesser General Public
10
+ License as published by the Free Software Foundation, version 2.1.
11
+
12
+ This library is distributed in the hope that it will be useful,
13
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
+ Lesser General Public License for more details.
16
+
17
+ You should have received a copy of the GNU Lesser General
18
+ Public License along with this library; if not, write to the
19
+ Free Software Foundation, Inc., 59 Temple Place, Suite 330,
20
+ Boston, MA 02111-1307 USA
21
+ */
22
+
23
+ package processing.event;
24
+
25
+
26
+ public class KeyEvent extends Event {
27
+ static public final int PRESS = 1;
28
+ static public final int RELEASE = 2;
29
+ static public final int TYPE = 3;
30
+
31
+ char key;
32
+ int keyCode;
33
+
34
+ boolean isAutoRepeat;
35
+
36
+
37
+ public KeyEvent(Object nativeObject,
38
+ long millis, int action, int modifiers,
39
+ char key, int keyCode) {
40
+ super(nativeObject, millis, action, modifiers);
41
+ this.flavor = KEY;
42
+ this.key = key;
43
+ this.keyCode = keyCode;
44
+ }
45
+
46
+ public KeyEvent(Object nativeObject,
47
+ long millis, int action, int modifiers,
48
+ char key, int keyCode, boolean isAutoRepeat) {
49
+ super(nativeObject, millis, action, modifiers);
50
+ this.flavor = KEY;
51
+ this.key = key;
52
+ this.keyCode = keyCode;
53
+ this.isAutoRepeat = isAutoRepeat;
54
+ }
55
+
56
+
57
+ public char getKey() {
58
+ return key;
59
+ }
60
+
61
+
62
+ public int getKeyCode() {
63
+ return keyCode;
64
+ }
65
+
66
+
67
+ public boolean isAutoRepeat() {
68
+ return isAutoRepeat;
69
+ }
70
+ }
@@ -0,0 +1,149 @@
1
+ /* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2
+
3
+ /*
4
+ Part of the Processing project - http://processing.org
5
+
6
+ Copyright (c) 2012 The Processing Foundation
7
+
8
+ This library is free software; you can redistribute it and/or
9
+ modify it under the terms of the GNU Lesser General Public
10
+ License as published by the Free Software Foundation, version 2.1.
11
+
12
+ This library is distributed in the hope that it will be useful,
13
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
+ Lesser General Public License for more details.
16
+
17
+ You should have received a copy of the GNU Lesser General
18
+ Public License along with this library; if not, write to the
19
+ Free Software Foundation, Inc., 59 Temple Place, Suite 330,
20
+ Boston, MA 02111-1307 USA
21
+ */
22
+
23
+ package processing.event;
24
+
25
+ //import processing.core.PConstants;
26
+
27
+
28
+ public class MouseEvent extends Event {
29
+ static public final int PRESS = 1;
30
+ static public final int RELEASE = 2;
31
+ static public final int CLICK = 3;
32
+ static public final int DRAG = 4;
33
+ static public final int MOVE = 5;
34
+ static public final int ENTER = 6;
35
+ static public final int EXIT = 7;
36
+ static public final int WHEEL = 8;
37
+
38
+ protected int x, y;
39
+ protected int button;
40
+ // protected int clickCount;
41
+ // protected float amount;
42
+ protected int count;
43
+
44
+
45
+ // public MouseEvent(int x, int y) {
46
+ // this(null,
47
+ // System.currentTimeMillis(), PRESSED, 0,
48
+ // x, y, PConstants.LEFT, 1);
49
+ // }
50
+
51
+
52
+ public MouseEvent(Object nativeObject,
53
+ long millis, int action, int modifiers,
54
+ int x, int y, int button, int count) { //float amount) { //int clickCount) {
55
+ super(nativeObject, millis, action, modifiers);
56
+ this.flavor = MOUSE;
57
+ this.x = x;
58
+ this.y = y;
59
+ this.button = button;
60
+ //this.clickCount = clickCount;
61
+ //this.amount = amount;
62
+ this.count = count;
63
+ }
64
+
65
+
66
+ public int getX() {
67
+ return x;
68
+ }
69
+
70
+
71
+ public int getY() {
72
+ return y;
73
+ }
74
+
75
+
76
+ /** Which button was pressed, either LEFT, CENTER, or RIGHT. */
77
+ public int getButton() {
78
+ return button;
79
+ }
80
+
81
+
82
+ // public void setButton(int button) {
83
+ // this.button = button;
84
+ // }
85
+
86
+
87
+ /** Do not use, getCount() is the correct method. */
88
+ @Deprecated
89
+ public int getClickCount() {
90
+ //return (int) amount; //clickCount;
91
+ return count;
92
+ }
93
+
94
+
95
+ /** Do not use, getCount() is the correct method. */
96
+ @Deprecated
97
+ public float getAmount() {
98
+ //return amount;
99
+ return count;
100
+ }
101
+
102
+
103
+ /**
104
+ * Number of clicks for mouse button events, or the number of steps (positive
105
+ * or negative depending on direction) for a mouse wheel event.
106
+ * Wheel events follow Java (see <a href="http://docs.oracle.com/javase/6/docs/api/java/awt/event/MouseWheelEvent.html#getWheelRotation()">here</a>), so
107
+ * getAmount() will return "negative values if the mouse wheel was rotated
108
+ * up or away from the user" and positive values in the other direction.
109
+ * On Mac OS X, this will be reversed when "natural" scrolling is enabled
110
+ * in System Preferences &rarr Mouse.
111
+ */
112
+ public int getCount() {
113
+ return count;
114
+ }
115
+
116
+
117
+ // public void setClickCount(int clickCount) {
118
+ // this.clickCount = clickCount;
119
+ // }
120
+
121
+ private String actionString() {
122
+ switch (action) {
123
+ default:
124
+ return "UNKNOWN";
125
+ case CLICK:
126
+ return "CLICK";
127
+ case DRAG:
128
+ return "DRAG";
129
+ case ENTER:
130
+ return "ENTER";
131
+ case EXIT:
132
+ return "EXIT";
133
+ case MOVE:
134
+ return "MOVE";
135
+ case PRESS:
136
+ return "PRESS";
137
+ case RELEASE:
138
+ return "RELEASE";
139
+ case WHEEL:
140
+ return "WHEEL";
141
+ }
142
+ }
143
+
144
+ @Override
145
+ public String toString() {
146
+ return String.format("<MouseEvent %s@%d,%d count:%d button:%d>",
147
+ actionString(), x, y, count, button);
148
+ }
149
+ }
@@ -0,0 +1,57 @@
1
+ /* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2
+
3
+ /*
4
+ Part of the Processing project - http://processing.org
5
+
6
+ Copyright (c) 2012 The Processing Foundation
7
+
8
+ This library is free software; you can redistribute it and/or
9
+ modify it under the terms of the GNU Lesser General Public
10
+ License as published by the Free Software Foundation, version 2.1.
11
+
12
+ This library is distributed in the hope that it will be useful,
13
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
+ Lesser General Public License for more details.
16
+
17
+ You should have received a copy of the GNU Lesser General
18
+ Public License along with this library; if not, write to the
19
+ Free Software Foundation, Inc., 59 Temple Place, Suite 330,
20
+ Boston, MA 02111-1307 USA
21
+ */
22
+
23
+ package processing.event;
24
+
25
+
26
+ // PLACEHOLDER CLASS: DO NOT USE. IT HAS NOT EVEN DECIDED WHETHER
27
+ // THIS WILL BE CALLED TOUCHEVENT ONCE IT'S FINISHED.
28
+
29
+ /*
30
+ http://developer.android.com/guide/topics/ui/ui-events.html
31
+ http://developer.android.com/reference/android/view/MotionEvent.html
32
+ http://developer.apple.com/library/safari/#documentation/UserExperience/Reference/TouchEventClassReference/TouchEvent/TouchEvent.html
33
+ http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIGestureRecognizer_Class/Reference/Reference.html#//apple_ref/occ/cl/UIGestureRecognizer
34
+
35
+ Apple's high-level gesture names:
36
+ tap
37
+ pinch
38
+ rotate
39
+ swipe
40
+ pan
41
+ longpress
42
+
43
+ W3C touch events
44
+ http://www.w3.org/TR/touch-events/
45
+ http://www.w3.org/TR/2011/WD-touch-events-20110913/
46
+
47
+ Pointer and gesture events (Windows)
48
+ http://msdn.microsoft.com/en-US/library/ie/hh673557.aspx
49
+
50
+ */
51
+ public class TouchEvent extends Event {
52
+
53
+ public TouchEvent(Object nativeObject, long millis, int action, int modifiers) {
54
+ super(nativeObject, millis, action, modifiers);
55
+ this.flavor = TOUCH;
56
+ }
57
+ }