├── .gitattributes ├── .github ├── issue_template.md └── workflows │ └── lock.yml ├── .gitignore ├── .idea ├── .gitignore ├── inspectionProfiles │ └── Project_Default.xml ├── misc.xml ├── modules.xml └── vcs.xml ├── .travis.yml ├── CONTRIBUTING.md ├── LICENSE.md ├── README.md ├── app ├── .classpath ├── .gitignore ├── .project ├── .settings │ ├── org.eclipse.jdt.core.prefs │ ├── org.eclipse.jdt.ui.prefs │ └── org.eclipse.ltk.core.refactoring.prefs ├── build.xml ├── lib │ └── .gitignore ├── processing4-app.iml └── src │ └── processing │ └── app │ ├── Base.java │ ├── Console.java │ ├── Formatter.java │ ├── Language.java │ ├── Library.java │ ├── Messages.java │ ├── Mode.java │ ├── Platform.java │ ├── Preferences.java │ ├── Problem.java │ ├── RunnerListener.java │ ├── RunnerListenerEdtAdapter.java │ ├── Settings.java │ ├── SingleInstance.java │ ├── Sketch.java │ ├── SketchCode.java │ ├── SketchException.java │ ├── SketchName.java │ ├── SketchReference.java │ ├── UpdateCheck.java │ ├── Util.java │ ├── WebServer.java │ ├── contrib │ ├── AvailableContribution.java │ ├── ContribProgress.java │ ├── Contribution.java │ ├── ContributionListing.java │ ├── ContributionManager.java │ ├── ContributionTab.java │ ├── ContributionType.java │ ├── ExamplesContribution.java │ ├── IgnorableException.java │ ├── ListPanel.java │ ├── LocalContribution.java │ ├── ManagerFrame.java │ ├── ManagerTabs.java │ ├── ModeContribution.java │ ├── StatusDetail.java │ ├── StatusPanel.java │ ├── ToolContribution.java │ ├── UpdateContributionTab.java │ ├── UpdateListPanel.java │ └── UpdateStatusPanel.java │ ├── exec │ ├── LineProcessor.java │ ├── ProcessHelper.java │ ├── ProcessRegistry.java │ ├── ProcessResult.java │ ├── StreamPump.java │ ├── StreamRedirectThread.java │ └── SystemOutSiphon.java │ ├── laf │ ├── FlatLaf.properties │ ├── PdeButtonUI.java │ ├── PdeComboBoxUI.java │ ├── PdeLabel.java │ ├── PdeLookAndFeel.java │ ├── PdeMenuItemUI.java │ ├── PdeProgressBarUI.java │ ├── PdeScrollBarUI.java │ ├── PdeTextFieldUI.java │ └── SwingUtilities2.java │ ├── platform │ ├── DefaultPlatform.java │ ├── LinuxPlatform.java │ ├── MacPlatform.java │ ├── WindowsPlatform.java │ └── WindowsRegistry.java │ ├── syntax │ ├── Brackets.java │ ├── DefaultInputHandler.java │ ├── HtmlSelection.java │ ├── InputHandler.java │ ├── JEditTextArea.java │ ├── KeywordMap.java │ ├── PdeInputHandler.java │ ├── PdeTextArea.java │ ├── PdeTextAreaDefaults.java │ ├── PdeTextAreaPainter.java │ ├── PdeTokenMarker.java │ ├── README.md │ ├── SyntaxDocument.java │ ├── SyntaxStyle.java │ ├── TextAreaDefaults.java │ ├── TextAreaPainter.java │ ├── Token.java │ ├── TokenMarker.java │ ├── TokenMarkerState.java │ └── im │ │ ├── CompositionTextManager.java │ │ ├── CompositionTextPainter.java │ │ └── InputMethodSupport.java │ ├── tools │ ├── Archiver.java │ ├── ColorSelector.java │ ├── CreateFont.java │ ├── InstallCommander.java │ ├── ThemeSelector.java │ └── Tool.java │ └── ui │ ├── About.java │ ├── ChangeDetector.java │ ├── ColorChooser.java │ ├── Editor.java │ ├── EditorButton.java │ ├── EditorConsole.java │ ├── EditorException.java │ ├── EditorFooter.java │ ├── EditorHeader.java │ ├── EditorState.java │ ├── EditorStatus.java │ ├── EditorToolbar.java │ ├── ErrorTable.java │ ├── ExamplesFrame.java │ ├── ExportPrompt.java │ ├── FindReplace.java │ ├── MarkerColumn.java │ ├── ModeSelector.java │ ├── PreferencesFrame.java │ ├── Recent.java │ ├── SketchbookFrame.java │ ├── Splash.java │ ├── Theme.java │ ├── Toolkit.java │ ├── WebFrame.java │ ├── Welcome.java │ └── ZoomTreeCellRenderer.java ├── build ├── .gitignore ├── README.md ├── build.xml ├── examples.py ├── formatter.xml ├── howto.txt ├── library │ ├── ant-contrib-0.6.jar │ └── ant-contrib-LICENSE.txt ├── linux │ ├── .gitignore │ ├── appdata.xml │ ├── control │ ├── copyright │ ├── desktop.template │ ├── install.sh │ ├── processing │ ├── processing-pde.xml │ ├── processing.desktop │ ├── processing.sharedmimeinfo │ └── uninstall.sh ├── macos │ ├── .gitignore │ ├── appbundler-aarch64.jar │ ├── appbundler-x86_64.jar │ ├── appbundler │ │ ├── .classpath │ │ ├── .gitignore │ │ ├── .project │ │ ├── .settings │ │ │ └── org.eclipse.jdt.core.prefs │ │ ├── README.md │ │ ├── TODO │ │ ├── build.xml │ │ ├── doc │ │ │ └── appbundler.html │ │ ├── native │ │ │ └── main.m │ │ ├── processing4-appbundler.iml │ │ ├── res │ │ │ ├── be.lproj │ │ │ │ └── Localizable.strings │ │ │ ├── cs.lproj │ │ │ │ └── Localizable.strings │ │ │ ├── de.lproj │ │ │ │ └── Localizable.strings │ │ │ ├── en.lproj │ │ │ │ └── Localizable.strings │ │ │ ├── fr.lproj │ │ │ │ └── Localizable.strings │ │ │ ├── ia.lproj │ │ │ │ └── Localizable.strings │ │ │ ├── it.lproj │ │ │ │ └── Localizable.strings │ │ │ ├── ja.lproj │ │ │ │ └── Localizable.strings │ │ │ ├── nl.lproj │ │ │ │ └── Localizable.strings │ │ │ ├── no.lproj │ │ │ │ └── Localizable.strings │ │ │ └── pt_BR.lproj │ │ │ │ └── Localizable.strings │ │ └── src │ │ │ └── com │ │ │ └── oracle │ │ │ └── appbundler │ │ │ ├── AppBundlerTask.java │ │ │ ├── Architecture.java │ │ │ ├── Argument.java │ │ │ ├── BundleDocument.java │ │ │ ├── Environment.java │ │ │ ├── GenericApp.icns │ │ │ ├── IconContainer.java │ │ │ ├── JLink.java │ │ │ ├── JMod.java │ │ │ ├── Option.java │ │ │ ├── PlistEntry.java │ │ │ ├── Runtime.java │ │ │ └── TypeDeclaration.java │ ├── ffs.entitlements │ ├── language_gen.py │ ├── pde.icns │ ├── pdex.icns │ ├── pdez.icns │ └── processing.icns ├── shared │ ├── lib │ │ ├── about-1x.png │ │ ├── about-2x.png │ │ ├── defaults.txt │ │ ├── fonts │ │ │ ├── ProcessingSans-Bold.ttf │ │ │ ├── ProcessingSans-LICENSE.md │ │ │ ├── ProcessingSans-Regular.ttf │ │ │ ├── SourceCodePro-Bold.ttf │ │ │ ├── SourceCodePro-LICENSE.txt │ │ │ └── SourceCodePro-Regular.ttf │ │ ├── footer │ │ │ ├── console.svg │ │ │ └── error.svg │ │ ├── icons │ │ │ ├── README.md │ │ │ ├── app-1024.png │ │ │ ├── app-128.png │ │ │ ├── app-16.png │ │ │ ├── app-256.png │ │ │ ├── app-32.png │ │ │ ├── app-48.png │ │ │ ├── app-512.png │ │ │ ├── app-64.png │ │ │ ├── foundation-16.png │ │ │ ├── foundation-32.png │ │ │ ├── foundation-64.png │ │ │ ├── pde-1024.png │ │ │ ├── pde-128.png │ │ │ ├── pde-16.png │ │ │ ├── pde-256.png │ │ │ ├── pde-32.png │ │ │ ├── pde-48.png │ │ │ ├── pde-512.png │ │ │ └── pde-64.png │ │ ├── languages │ │ │ ├── PDE.properties │ │ │ ├── PDE_ar.properties │ │ │ ├── PDE_ca.properties │ │ │ ├── PDE_de.properties │ │ │ ├── PDE_el.properties │ │ │ ├── PDE_en.properties │ │ │ ├── PDE_es.properties │ │ │ ├── PDE_fr.properties │ │ │ ├── PDE_it.properties │ │ │ ├── PDE_ja.properties │ │ │ ├── PDE_ko.properties │ │ │ ├── PDE_nl.properties │ │ │ ├── PDE_pt.properties │ │ │ ├── PDE_ru.properties │ │ │ ├── PDE_tr.properties │ │ │ ├── PDE_uk.properties │ │ │ ├── PDE_zh-CN.properties │ │ │ └── PDE_zh-TW.properties │ │ ├── manager │ │ │ ├── chevron.svg │ │ │ ├── close.svg │ │ │ ├── foundation.svg │ │ │ ├── list-downloading.svg │ │ │ ├── list-incompatible.svg │ │ │ ├── list-up-to-date.svg │ │ │ ├── list-update-available.svg │ │ │ ├── panel-install.svg │ │ │ ├── panel-remove.svg │ │ │ ├── panel-update.svg │ │ │ ├── search-reset.svg │ │ │ └── search.svg │ │ ├── naming.json │ │ ├── status │ │ │ ├── console-collapse.svg │ │ │ ├── console-expand.svg │ │ │ ├── copy-to-clipboard.svg │ │ │ └── search.svg │ │ ├── theme │ │ │ ├── Alloys │ │ │ │ ├── agpalilik.txt │ │ │ │ ├── armanty.txt │ │ │ │ ├── bacubirito.txt │ │ │ │ ├── bondoc.txt │ │ │ │ ├── brahin.txt │ │ │ │ ├── esquel.txt │ │ │ │ ├── gancedo.txt │ │ │ │ ├── hoba.txt │ │ │ │ ├── imilac.txt │ │ │ │ ├── jepara.txt │ │ │ │ ├── mbozi.txt │ │ │ │ ├── morito.txt │ │ │ │ ├── omolon.txt │ │ │ │ ├── order.txt │ │ │ │ ├── seymchan.txt │ │ │ │ ├── tagish.txt │ │ │ │ └── youxi.txt │ │ │ ├── Minerals │ │ │ │ ├── antimony.txt │ │ │ │ ├── bauxite.txt │ │ │ │ ├── beryl.txt │ │ │ │ ├── calcite.txt │ │ │ │ ├── feldspar.txt │ │ │ │ ├── fluorite.txt │ │ │ │ ├── gabbro.txt │ │ │ │ ├── galena.txt │ │ │ │ ├── garnet.txt │ │ │ │ ├── jasper.txt │ │ │ │ ├── kyanite.txt │ │ │ │ ├── malachite.txt │ │ │ │ ├── olivine.txt │ │ │ │ ├── order.txt │ │ │ │ ├── orpiment.txt │ │ │ │ ├── pyrite.txt │ │ │ │ └── serandite.txt │ │ │ ├── mini.svg │ │ │ └── theme.txt │ │ ├── toolbar │ │ │ ├── continue.svg │ │ │ ├── debug.svg │ │ │ ├── run.svg │ │ │ ├── step.svg │ │ │ └── stop.svg │ │ └── welcome │ │ │ ├── examples │ │ │ ├── arctan.png │ │ │ ├── flocking.png │ │ │ ├── mouse.png │ │ │ └── rotating.png │ │ │ ├── index.html │ │ │ └── style.css │ ├── revisions.md │ └── tools │ │ └── MovieMaker │ │ ├── .classpath │ │ ├── .gitignore │ │ ├── .project │ │ ├── build.xml │ │ ├── license.html │ │ ├── processing4-tools-moviemaker.iml │ │ ├── src │ │ ├── ch │ │ │ └── randelshofer │ │ │ │ └── gui │ │ │ │ └── datatransfer │ │ │ │ ├── AbstractTransferable.java │ │ │ │ ├── CompositeTransferable.java │ │ │ │ ├── FileTextFieldTransferHandler.java │ │ │ │ ├── PlainTextTransferable.java │ │ │ │ └── StringTransferable.java │ │ └── processing │ │ │ └── app │ │ │ └── tools │ │ │ ├── Chooser.java │ │ │ ├── FFmpegEngine.java │ │ │ └── MovieMaker.java │ │ ├── tool.properties │ │ └── tool │ │ └── .gitignore └── windows │ ├── .gitignore │ ├── config-cmd.xml │ ├── config.xml │ ├── fenster │ ├── Fenster.java │ ├── Makefile │ ├── README.md │ ├── fenster.cpp │ ├── fenster.exe │ ├── processing_core_platform_Fenster.cpp │ └── processing_core_platform_Fenster.h │ ├── pde.ico │ ├── pdex.ico │ ├── pdez.ico │ ├── processing.bat │ └── processing.ico ├── core ├── .classpath ├── .gitignore ├── .idea │ ├── .gitignore │ ├── ant.xml │ ├── misc.xml │ ├── modules.xml │ └── vcs.xml ├── .project ├── .settings │ ├── org.eclipse.jdt.core.prefs │ └── org.eclipse.jdt.ui.prefs ├── README.md ├── api.txt ├── build.xml ├── different │ ├── Makefile │ ├── README.md │ ├── different.m │ ├── libDifferent_aarch64 │ └── libDifferent_x86_64 ├── done.txt ├── library-test │ ├── byte-buddy-1.11.19.jar │ ├── hamcrest-core-1.3.jar │ ├── junit-4.13.2.jar │ ├── license.txt │ ├── mockito-core-4.0.0.jar │ └── objenesis-3.2.jar ├── library │ └── .gitignore ├── license.txt ├── methods │ ├── .classpath │ ├── .gitignore │ ├── .project │ ├── build.xml │ ├── processing4-core-preproc.iml │ └── src │ │ └── PAppletMethods.java ├── processing4-core.iml ├── resource-test │ ├── test.png │ └── test.txt ├── src │ ├── font │ │ ├── ProcessingSansPro-LICENSE.txt │ │ └── ProcessingSansPro-Regular.ttf │ ├── icon │ │ ├── icon-1024.png │ │ ├── icon-128.png │ │ ├── icon-16.png │ │ ├── icon-256.png │ │ ├── icon-32.png │ │ ├── icon-48.png │ │ ├── icon-512.png │ │ └── icon-64.png │ └── processing │ │ ├── awt │ │ ├── PGraphicsJava2D.java │ │ ├── PImageAWT.java │ │ ├── PShapeJava2D.java │ │ ├── PSurfaceAWT.java │ │ └── ShimAWT.java │ │ ├── core │ │ ├── PApplet.java │ │ ├── PConstants.java │ │ ├── PFont.java │ │ ├── PGraphics.java │ │ ├── PImage.java │ │ ├── PMatrix.java │ │ ├── PMatrix2D.java │ │ ├── PMatrix3D.java │ │ ├── PShape.java │ │ ├── PShapeOBJ.java │ │ ├── PShapeSVG.java │ │ ├── PSketch.java │ │ ├── PStyle.java │ │ ├── PSurface.java │ │ ├── PSurfaceNone.java │ │ ├── PVector.java │ │ ├── ThinkDifferent.java │ │ └── libDifferent.jnilib │ │ ├── data │ │ ├── DoubleDict.java │ │ ├── DoubleList.java │ │ ├── FloatDict.java │ │ ├── FloatList.java │ │ ├── IntDict.java │ │ ├── IntList.java │ │ ├── JSONArray.java │ │ ├── JSONObject.java │ │ ├── JSONTokener.java │ │ ├── LongDict.java │ │ ├── LongList.java │ │ ├── Sort.java │ │ ├── StringDict.java │ │ ├── StringList.java │ │ ├── Table.java │ │ ├── TableRow.java │ │ └── XML.java │ │ ├── event │ │ ├── Event.java │ │ ├── KeyEvent.java │ │ ├── MouseEvent.java │ │ └── TouchEvent.java │ │ └── opengl │ │ ├── FontTexture.java │ │ ├── FrameBuffer.java │ │ ├── LinePath.java │ │ ├── LineStroker.java │ │ ├── PGL.java │ │ ├── PGraphics2D.java │ │ ├── PGraphics3D.java │ │ ├── PGraphicsOpenGL.java │ │ ├── PJOGL.java │ │ ├── PShader.java │ │ ├── PShapeOpenGL.java │ │ ├── PSurfaceJOGL.java │ │ ├── Texture.java │ │ ├── VertexBuffer.java │ │ ├── cursors │ │ ├── arrow.png │ │ ├── cross.png │ │ ├── hand.png │ │ ├── license.txt │ │ ├── move.png │ │ ├── text.png │ │ └── wait.png │ │ └── shaders │ │ ├── ColorFrag.glsl │ │ ├── ColorVert.glsl │ │ ├── LightFrag.glsl │ │ ├── LightVert-brcm.glsl │ │ ├── LightVert-vc4.glsl │ │ ├── LightVert.glsl │ │ ├── LineFrag.glsl │ │ ├── LineVert.glsl │ │ ├── MaskFrag.glsl │ │ ├── PointFrag.glsl │ │ ├── PointVert.glsl │ │ ├── TexFrag.glsl │ │ ├── TexLightFrag.glsl │ │ ├── TexLightVert-brcm.glsl │ │ ├── TexLightVert-vc4.glsl │ │ ├── TexLightVert.glsl │ │ └── TexVert.glsl ├── test │ └── processing │ │ ├── core │ │ ├── Base64StringImageLoadTest.java │ │ └── PShapeSVGTest.java │ │ └── data │ │ └── TableTest.java └── todo.txt ├── done.txt ├── java ├── .classpath ├── .externalToolBuilders │ └── AutoBuild.launch ├── .gitignore ├── .project ├── .settings │ └── org.eclipse.jdt.core.prefs ├── application │ ├── Info.plist.tmpl │ ├── application.icns │ ├── application.ico │ ├── launch4j │ │ ├── LICENSE.txt │ │ ├── bin │ │ │ ├── LICENSE.txt │ │ │ ├── ld-linux │ │ │ ├── ld-linux-armv6hf │ │ │ ├── ld-macos │ │ │ ├── ld-windows.exe │ │ │ ├── windres-linux │ │ │ ├── windres-linux-armv6hf │ │ │ ├── windres-macos │ │ │ └── windres-windows.exe │ │ ├── head │ │ │ ├── LICENSE.txt │ │ │ ├── consolehead.o │ │ │ ├── guihead.o │ │ │ └── head.o │ │ ├── launch4j.jar │ │ ├── lib │ │ │ ├── LICENSE.txt │ │ │ └── xstream.jar │ │ └── w32api │ │ │ ├── LICENSE.txt │ │ │ ├── crt2.o │ │ │ ├── libadvapi32.a │ │ │ ├── libgcc.a │ │ │ ├── libkernel32.a │ │ │ ├── libmingw32.a │ │ │ ├── libmingwex.a │ │ │ ├── libmoldname.a │ │ │ ├── libmsvcrt.a │ │ │ ├── libshell32.a │ │ │ └── libuser32.a │ ├── stub-macos-aarch64 │ └── stub-macos-x86_64 ├── build.xml ├── keywords.txt ├── libraries │ ├── dxf │ │ ├── .classpath │ │ ├── .gitignore │ │ ├── .project │ │ ├── .settings │ │ │ └── org.eclipse.jdt.core.prefs │ │ ├── build.xml │ │ ├── dxfviewer.jar │ │ ├── examples │ │ │ └── SimpleExport │ │ │ │ └── SimpleExport.pde │ │ ├── library.properties │ │ ├── library │ │ │ ├── .cvsignore │ │ │ └── .gitignore │ │ ├── processing4-dxf.iml │ │ └── src │ │ │ └── processing │ │ │ └── dxf │ │ │ └── RawDXF.java │ ├── io │ │ ├── build.xml │ │ ├── examples │ │ │ ├── AnalogDigital_I2C_ADS1X15 │ │ │ │ ├── ADS1X15.pde │ │ │ │ ├── AnalogDigital_I2C_ADS1X15.pde │ │ │ │ └── setup.png │ │ │ ├── AnalogDigital_SPI_MCP3001 │ │ │ │ ├── AnalogDigital_SPI_MCP3001.pde │ │ │ │ ├── MCP3001.pde │ │ │ │ └── setup.png │ │ │ ├── AnalogDigital_SPI_MCP3008 │ │ │ │ ├── AnalogDigital_SPI_MCP3008.pde │ │ │ │ ├── MCP3008.pde │ │ │ │ └── setup.png │ │ │ ├── Compass_I2C_HMC6352 │ │ │ │ ├── Compass_I2C_HMC6352.pde │ │ │ │ ├── HMC6352.pde │ │ │ │ └── setup.png │ │ │ ├── DigitalAnalog_I2C_MCP4725 │ │ │ │ ├── DigitalAnalog_I2C_MCP4725.pde │ │ │ │ └── MCP4725.pde │ │ │ ├── Display_I2C_SSD1306 │ │ │ │ ├── Display_I2C_SSD1306.pde │ │ │ │ └── SSD1306.pde │ │ │ ├── Environment_I2C_BME280 │ │ │ │ ├── BME280.pde │ │ │ │ ├── Environment_I2C_BME280.pde │ │ │ │ └── setup.png │ │ │ ├── Interrupt │ │ │ │ ├── Interrupt.pde │ │ │ │ └── setup.png │ │ │ ├── LedCounter │ │ │ │ └── LedCounter.pde │ │ │ ├── Light_I2C_TSL2561 │ │ │ │ ├── Light_I2C_TSL2561.pde │ │ │ │ ├── TSL2561.pde │ │ │ │ └── setup.png │ │ │ ├── Servo_I2C_PCA9685 │ │ │ │ ├── PCA9685.pde │ │ │ │ ├── Servo_I2C_PCA9685.pde │ │ │ │ └── setup.png │ │ │ ├── SimpleI2C │ │ │ │ └── SimpleI2C.pde │ │ │ ├── SimpleInput │ │ │ │ ├── SimpleInput.pde │ │ │ │ └── setup.png │ │ │ ├── SimpleOutput │ │ │ │ ├── SimpleOutput.pde │ │ │ │ └── setup.png │ │ │ ├── SimpleResistorSensor │ │ │ │ ├── SimpleResistorSensor.pde │ │ │ │ └── setup.png │ │ │ ├── SimpleSPI │ │ │ │ ├── SimpleSPI.pde │ │ │ │ └── setup.png │ │ │ ├── SoftwareServoSweep │ │ │ │ ├── SoftwareServoSweep.pde │ │ │ │ ├── setup.png │ │ │ │ └── setup_better.png │ │ │ └── Touch_I2C_MPR121 │ │ │ │ ├── MPR121.pde │ │ │ │ ├── Touch_I2C_MPR121.pde │ │ │ │ └── setup.png │ │ ├── library.properties │ │ ├── library │ │ │ ├── .gitignore │ │ │ ├── export.txt │ │ │ ├── linux-arm64 │ │ │ │ └── libprocessing-io.so │ │ │ ├── linux-armv6hf │ │ │ │ └── libprocessing-io.so │ │ │ ├── linux32 │ │ │ │ └── libprocessing-io.so │ │ │ └── linux64 │ │ │ │ └── libprocessing-io.so │ │ └── src │ │ │ ├── native │ │ │ ├── Makefile │ │ │ ├── iface.h │ │ │ └── impl.c │ │ │ └── processing │ │ │ └── io │ │ │ ├── GPIO.java │ │ │ ├── I2C.java │ │ │ ├── LED.java │ │ │ ├── NativeInterface.java │ │ │ ├── PWM.java │ │ │ ├── SPI.java │ │ │ └── SoftwareServo.java │ ├── net │ │ ├── .classpath │ │ ├── .gitignore │ │ ├── .project │ │ ├── .settings │ │ │ ├── org.eclipse.jdt.core.prefs │ │ │ └── org.eclipse.jdt.ui.prefs │ │ ├── build.xml │ │ ├── examples │ │ │ ├── ChatServer │ │ │ │ ├── ChatServer.pde │ │ │ │ └── data │ │ │ │ │ └── ScalaSans-Caps-32.vlw │ │ │ ├── HTTPClient │ │ │ │ └── HTTPClient.pde │ │ │ ├── SharedCanvasClient │ │ │ │ └── SharedCanvasClient.pde │ │ │ └── SharedCanvasServer │ │ │ │ └── SharedCanvasServer.pde │ │ ├── library.properties │ │ ├── library │ │ │ ├── .cvsignore │ │ │ └── .gitignore │ │ ├── processing4-net.iml │ │ └── src │ │ │ └── processing │ │ │ └── net │ │ │ ├── Client.java │ │ │ └── Server.java │ ├── pdf │ │ ├── .classpath │ │ ├── .gitignore │ │ ├── .project │ │ ├── .settings │ │ │ ├── org.eclipse.jdt.core.prefs │ │ │ └── org.eclipse.jdt.ui.prefs │ │ ├── README.md │ │ ├── build.xml │ │ ├── examples │ │ │ ├── Complex3D │ │ │ │ └── Complex3D.pde │ │ │ ├── LargePage │ │ │ │ └── LargePage.pde │ │ │ ├── ManyPDFs │ │ │ │ └── ManyPDFs.pde │ │ │ ├── ManyPages │ │ │ │ └── ManyPages.pde │ │ │ ├── MousePress │ │ │ │ └── MousePress.pde │ │ │ ├── MultipleFrames │ │ │ │ └── MultipleFrames.pde │ │ │ ├── OneFrame │ │ │ │ └── OneFrame.pde │ │ │ └── RandomBook │ │ │ │ └── RandomBook.pde │ │ ├── itext-src.zip │ │ ├── library.properties │ │ ├── library │ │ │ ├── .cvsignore │ │ │ ├── .gitignore │ │ │ └── itext.jar │ │ ├── processing4-pdf.iml │ │ └── src │ │ │ └── processing │ │ │ └── pdf │ │ │ └── PGraphicsPDF.java │ ├── serial │ │ ├── .classpath │ │ ├── .gitignore │ │ ├── .project │ │ ├── .settings │ │ │ └── org.eclipse.jdt.core.prefs │ │ ├── build.xml │ │ ├── examples │ │ │ ├── SerialCallResponse │ │ │ │ └── SerialCallResponse.pde │ │ │ ├── SerialDuplex │ │ │ │ ├── SerialDuplex.pde │ │ │ │ └── data │ │ │ │ │ └── CourierNewPSMT-24.vlw │ │ │ ├── SerialMultiple │ │ │ │ └── SerialMultiple.pde │ │ │ ├── SimpleRead │ │ │ │ └── SimpleRead.pde │ │ │ └── SimpleWrite │ │ │ │ └── SimpleWrite.pde │ │ ├── library.properties │ │ ├── library │ │ │ ├── .gitignore │ │ │ ├── jssc.jar │ │ │ └── jssc.txt │ │ ├── processing4-serial.iml │ │ ├── src │ │ │ └── processing │ │ │ │ └── serial │ │ │ │ └── Serial.java │ │ └── test │ │ │ ├── serial_latency │ │ │ ├── arduino │ │ │ │ └── serial_latency.ino │ │ │ └── serial_latency.pde │ │ │ └── serial_throughput │ │ │ ├── arduino │ │ │ └── serial_thoughput.ino │ │ │ └── serial_throughput.pde │ └── svg │ │ ├── .classpath │ │ ├── .gitignore │ │ ├── .project │ │ ├── .settings │ │ └── org.eclipse.jdt.core.prefs │ │ ├── README.md │ │ ├── build.xml │ │ ├── library.properties │ │ ├── library │ │ ├── .gitignore │ │ └── LICENSE │ │ ├── processing4-svg.iml │ │ └── src │ │ ├── WriteSVG.java │ │ └── processing │ │ └── svg │ │ └── PGraphicsSVG.java ├── mode │ ├── .gitignore │ ├── .options │ ├── about.html │ ├── antlr-4.7.2-complete.jar │ ├── antlr-src.zip │ ├── antlr.jar │ ├── classpath-explorer-1.0.jar │ ├── com.ibm.icu.jar │ ├── jdtCompilerAdapter.jar │ ├── jsoup-1.7.1.jar │ ├── org.eclipse.core.contenttype.jar │ ├── org.eclipse.core.jobs.jar │ ├── org.eclipse.core.resources.jar │ ├── org.eclipse.core.runtime.jar │ ├── org.eclipse.equinox.common.jar │ ├── org.eclipse.equinox.preferences.jar │ ├── org.eclipse.jdt.compiler.apt.jar │ ├── org.eclipse.jdt.core.jar │ ├── org.eclipse.osgi.jar │ ├── org.eclipse.text.jar │ ├── org.netbeans.swing.outline.jar │ ├── plugin.properties │ ├── plugin.xml │ └── readme.txt ├── processing4-java.iml ├── src │ └── processing │ │ └── mode │ │ └── java │ │ ├── ASTUtils.java │ │ ├── ASTViewer.java │ │ ├── AutoFormat.java │ │ ├── Commander.java │ │ ├── CompileErrorMessageSimplifier.java │ │ ├── Compiler.java │ │ ├── CompletionCandidate.java │ │ ├── CompletionGenerator.java │ │ ├── CompletionPanel.java │ │ ├── ErrorChecker.java │ │ ├── ImportStatement.java │ │ ├── InspectMode.java │ │ ├── JavaBuild.java │ │ ├── JavaEditor.java │ │ ├── JavaInputHandler.java │ │ ├── JavaMode.java │ │ ├── JavaProblem.java │ │ ├── JavaTextArea.java │ │ ├── JavaTextAreaPainter.java │ │ ├── JavaToolbar.java │ │ ├── PreprocService.java │ │ ├── PreprocSketch.java │ │ ├── ProblemFactory.java │ │ ├── Rename.java │ │ ├── RuntimePathBuilder.java │ │ ├── ShowUsage.java │ │ ├── SketchInterval.java │ │ ├── SourceUtil.java │ │ ├── SyntaxProblem.java │ │ ├── TabLine.java │ │ ├── TextTransform.java │ │ ├── debug │ │ ├── ArrayFieldNode.java │ │ ├── ClassLoadListener.java │ │ ├── Debugger.java │ │ ├── FieldNode.java │ │ ├── LineBreakpoint.java │ │ ├── LineHighlight.java │ │ ├── LineID.java │ │ ├── LocalVariableNode.java │ │ ├── VariableInspector.java │ │ └── VariableNode.java │ │ ├── lsp │ │ ├── PdeAdapter.java │ │ ├── PdeLanguageServer.java │ │ ├── PdeSymbolFinder.java │ │ ├── PdeTextDocumentService.java │ │ └── PdeWorkspaceService.java │ │ ├── preproc │ │ ├── .cvsignore │ │ ├── JavaLexer.g4 │ │ ├── JavaParser.g4 │ │ ├── PdeIssueEmitter.java │ │ ├── PdeParseTreeListener.java │ │ ├── PdePreprocessIssue.java │ │ ├── PdePreprocessor.java │ │ ├── PreprocessIssueMessageSimplifier.java │ │ ├── PreprocessorResult.java │ │ ├── Processing.g4 │ │ ├── RewriteResult.java │ │ └── RewriteResultBuilder.java │ │ ├── runner │ │ ├── MessageConsumer.java │ │ ├── MessageSiphon.java │ │ ├── MessageStream.java │ │ └── Runner.java │ │ └── tweak │ │ ├── ColorControlBox.java │ │ ├── ColorMode.java │ │ ├── ColorScheme.java │ │ ├── ColorSelector.java │ │ ├── HProgressBar.java │ │ ├── Handle.java │ │ ├── Settings.java │ │ ├── SketchParser.java │ │ └── TweakClient.java ├── test │ ├── lib │ │ ├── hamcrest-core-1.3.jar │ │ └── junit-4.13.2.jar │ ├── processing │ │ └── mode │ │ │ └── java │ │ │ ├── AutoFormatTests.java │ │ │ ├── CachedRuntimePathFactoryTest.java │ │ │ ├── CodeFolderRuntimePathFactoryTest.java │ │ │ ├── CoreLibraryRuntimePathFactoryTest.java │ │ │ ├── ImportStatementTest.java │ │ │ ├── JavaFxRuntimePathFactoryTest.java │ │ │ ├── JavaRuntimePathFactoryTest.java │ │ │ ├── LibrarySearchRuntimePathFactoryTest.java │ │ │ ├── LibrarySketchRuntimePathFactoryTest.java │ │ │ ├── ModeSearchRuntimePathFactoryTest.java │ │ │ ├── ModeSketchRuntimePathFactoryTest.java │ │ │ ├── ParserTests.java │ │ │ ├── ProblemFactoryTest.java │ │ │ ├── ProcessingTestUtil.java │ │ │ ├── RuntimePathBuilderTest.java │ │ │ ├── RuntimePathFactoryTestUtil.java │ │ │ ├── SourceUtilTest.java │ │ │ ├── UTCompiler.java │ │ │ ├── debug │ │ │ └── VariableNodeTests.java │ │ │ └── preproc │ │ │ ├── AssignmentMessageSimplifierStrategyTest.java │ │ │ ├── BadIdentifierMessageSimplifierStrategyTest.java │ │ │ ├── BadParamMessageSimplifierStrategyTest.java │ │ │ ├── ExtraneousInputMessageSimplifierStrategyTest.java │ │ │ ├── KnownMissingMessageSimplifierStrategyTest.java │ │ │ ├── MessageSimplifierUtilTest.java │ │ │ ├── MismatchedInputMessageSimplifierStrategyTest.java │ │ │ ├── MissingChevMessageSimplifierStrategyTest.java │ │ │ ├── MissingClassNameMessageSimplifierStrategyTest.java │ │ │ ├── MissingCurlyMessageSimplifierStrategyTest.java │ │ │ ├── MissingDoubleQuoteMessageSimplifierStrategyTest.java │ │ │ ├── MissingGenericTypeMessageSimplifierStrategyTest.java │ │ │ ├── MissingIdentifierMessageSimplifierStrategyTest.java │ │ │ ├── MissingMethodNameMessageSimplifierStrategyTest.java │ │ │ ├── MissingParenMessageSimplifierStrategyTest.java │ │ │ ├── MissingSingleQuoteMessageSimplifierStrategyTest.java │ │ │ ├── MissingVariableNameMessageSimplifierStrategyTest.java │ │ │ ├── PdePreprocessIssueException.java │ │ │ ├── PrintWriterWithEditGenTest.java │ │ │ └── util │ │ │ ├── IssueLocationFactoryTest.java │ │ │ └── PreprocessIssueMessageSimplifierTest.java │ └── resources │ │ ├── annotations.expected │ │ ├── annotations.pde │ │ ├── bug1064.expected │ │ ├── bug1064.pde │ │ ├── bug109.expected │ │ ├── bug109.pde │ │ ├── bug1145.pde │ │ ├── bug136.expected │ │ ├── bug136.pde │ │ ├── bug1362.expected │ │ ├── bug1362.pde │ │ ├── bug1390.expected │ │ ├── bug1390.pde │ │ ├── bug1442.expected │ │ ├── bug1442.pde │ │ ├── bug1511.expected │ │ ├── bug1511.pde │ │ ├── bug1512.expected │ │ ├── bug1512.pde │ │ ├── bug1514a.expected │ │ ├── bug1514a.pde │ │ ├── bug1514b.expected │ │ ├── bug1514b.pde │ │ ├── bug1515.expected │ │ ├── bug1515.pde │ │ ├── bug1516.expected │ │ ├── bug1516.pde │ │ ├── bug1517.expected │ │ ├── bug1517.pde │ │ ├── bug1518a.expected │ │ ├── bug1518a.pde │ │ ├── bug1518b.expected │ │ ├── bug1518b.pde │ │ ├── bug1525.expected │ │ ├── bug1525.pde │ │ ├── bug1532.pde │ │ ├── bug1534.expected │ │ ├── bug1534.pde │ │ ├── bug16.pde │ │ ├── bug1936.expected │ │ ├── bug1936.pde │ │ ├── bug196.pde │ │ ├── bug281.expected │ │ ├── bug281.pde │ │ ├── bug315g.expected │ │ ├── bug315g.pde │ │ ├── bug4.expected │ │ ├── bug4.pde │ │ ├── bug400g.expected │ │ ├── bug400g.pde │ │ ├── bug405.expected │ │ ├── bug405.pde │ │ ├── bug420.expected │ │ ├── bug420.pde │ │ ├── bug427g.expected │ │ ├── bug427g.pde │ │ ├── bug481.expected │ │ ├── bug481.pde │ │ ├── bug507.pde │ │ ├── bug598.expected │ │ ├── bug598.pde │ │ ├── bug5a.expected │ │ ├── bug5a.pde │ │ ├── bug5b.expected │ │ ├── bug5b.pde │ │ ├── bug6.pde │ │ ├── bug631.expected │ │ ├── bug631.pde │ │ ├── bug763.pde │ │ ├── bug820.pde │ │ ├── charspecial.expected │ │ ├── charspecial.pde │ │ ├── classinstatic.expected │ │ ├── classinstatic.pde │ │ ├── color.expected │ │ ├── color.pde │ │ ├── colorimport.expected │ │ ├── colorimport.pde │ │ ├── colorreturn.expected │ │ ├── colorreturn.pde │ │ ├── custommain.expected │ │ ├── custommain.pde │ │ ├── customrootclass.expected │ │ ├── customrootclass.pde │ │ ├── expressionsize.expected │ │ ├── expressionsize.pde │ │ ├── expressionsizemethod.expected │ │ ├── expressionsizemethod.pde │ │ ├── expressionsizevar.expected │ │ ├── expressionsizevar.pde │ │ ├── fullscreen.expected │ │ ├── fullscreen.pde │ │ ├── fullscreen_arg.expected │ │ ├── fullscreen_arg.pde │ │ ├── fullscreen_export.expected │ │ ├── fullscreen_export.pde │ │ ├── fullscreen_noarg.expected │ │ ├── fullscreen_noarg.pde │ │ ├── generics.expected │ │ ├── generics.pde │ │ ├── lambdaexample.expected │ │ ├── lambdaexample.pde │ │ ├── mixing.pde │ │ ├── multilinestr.expected │ │ ├── multilinestr.pde │ │ ├── multilinestrclass.expected │ │ ├── multilinestrclass.pde │ │ ├── multimultilinestr.expected │ │ ├── multimultilinestr.pde │ │ ├── nosmooth.expected │ │ ├── nosmooth.pde │ │ ├── packageTest.expected │ │ ├── packageTest.pde │ │ ├── parampixeldensity.expected │ │ ├── parampixeldensity.pde │ │ ├── pdfwrite.expected │ │ ├── pdfwrite.pde │ │ ├── pgraphics.expected │ │ ├── pgraphics.pde │ │ ├── preferences.txt │ │ ├── sizeclass.expected │ │ ├── sizeclass.pde │ │ ├── sizethis.expected │ │ ├── sizethis.pde │ │ ├── smoothnoparam.expected │ │ ├── smoothnoparam.pde │ │ ├── smoothnoparamthis.expected │ │ ├── smoothnoparamthis.pde │ │ ├── smoothparam.expected │ │ ├── smoothparam.pde │ │ ├── smoothparamstatic.expected │ │ ├── smoothparamstatic.pde │ │ ├── specialmethodsprivate.expected │ │ ├── specialmethodsprivate.pde │ │ ├── speicalmethods.expected │ │ ├── speicalmethods.pde │ │ ├── staticannotations.expected │ │ ├── staticannotations.pde │ │ ├── staticclass.expected │ │ ├── staticclass.pde │ │ ├── staticpixeldensity.expected │ │ ├── staticpixeldensity.pde │ │ ├── typeinference.expected │ │ ├── typeinference.pde │ │ ├── whitespace.expected │ │ ├── whitespace.pde │ │ └── whitespace_test.pde └── theme │ ├── completion │ ├── class.svg │ ├── field.svg │ ├── local.svg │ └── method.svg │ └── variables │ ├── array.svg │ ├── boolean.svg │ ├── byte.svg │ ├── char.svg │ ├── double.svg │ ├── float.svg │ ├── integer.svg │ ├── long.svg │ ├── object.svg │ ├── short.svg │ └── string.svg └── todo.txt /.gitattributes: -------------------------------------------------------------------------------- 1 | # Set the default behavior, in case people don't have core.autocrlf set. 2 | * text=auto 3 | 4 | # Files which should always be normalized and converted 5 | # to native line endings on checkout. 6 | *.java text 7 | *.pde text 8 | 9 | # Files that will always have CRLF line endings on checkout. 10 | *.bat eol=crlf 11 | *.url eol=crlf 12 | -------------------------------------------------------------------------------- /.github/workflows/lock.yml: -------------------------------------------------------------------------------- 1 | name: 'Lock Threads' 2 | 3 | on: 4 | schedule: 5 | - cron: '* 6 * * *' 6 | 7 | permissions: 8 | contents: read 9 | 10 | jobs: 11 | lock: 12 | permissions: 13 | issues: write 14 | pull-requests: write 15 | runs-on: ubuntu-latest 16 | steps: 17 | - uses: dessant/lock-threads@v4 18 | with: 19 | github-token: ${{ github.token }} 20 | issue-lock-inactive-days: '30' 21 | issue-lock-comment: > 22 | This issue has been automatically locked. To avoid confusion 23 | with reports that have already been resolved, closed issues 24 | are automatically locked 30 days after the last comment. 25 | Please open a new issue for related bugs. 26 | pr-lock-comment: > 27 | This pull request has been automatically locked. 28 | Pull requests that have been closed are automatically 29 | locked 30 days after the last comment. 30 | -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | git: 2 | depth: 1 3 | 4 | language: java 5 | 6 | jdk: 7 | - openjdk11 8 | 9 | before_install: 10 | - sudo apt-get -qq update 11 | - sudo apt-get install ant-optional 12 | - sudo apt-get install wget 13 | - wget --no-check-certificate https://downloads.apache.org/ant/binaries/apache-ant-1.10.8-bin.zip 14 | - tar -xzvf apache-ant-1.10.8-bin.tar.gz 15 | - export PATH=`pwd`/apache-ant-1.10.8/bin:$PATH 16 | 17 | services: 18 | - xvfb 19 | 20 | before_script: 21 | - export DISPLAY=:99.0 22 | - cd build 23 | 24 | script: 25 | - ant clean 26 | - ant build 27 | - ant test 28 | -------------------------------------------------------------------------------- /app/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | bin 2 | pde.jar 3 | -------------------------------------------------------------------------------- /app/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | processing4-app 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /app/.settings/org.eclipse.jdt.ui.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | formatter_profile=_processing 3 | formatter_settings_version=18 4 | -------------------------------------------------------------------------------- /app/.settings/org.eclipse.ltk.core.refactoring.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false 3 | -------------------------------------------------------------------------------- /app/lib/.gitignore: -------------------------------------------------------------------------------- 1 | ant.jar 2 | ant-launcher.jar 3 | 4 | flatlaf.jar 5 | 6 | jna.jar 7 | jna-platform.jar 8 | -------------------------------------------------------------------------------- /app/src/processing/app/SketchReference.java: -------------------------------------------------------------------------------- 1 | package processing.app; 2 | 3 | import java.io.File; 4 | 5 | 6 | public class SketchReference { 7 | String name; 8 | File pde; 9 | 10 | 11 | public SketchReference(String name, File pde) { 12 | this.name = name; 13 | this.pde = pde; 14 | } 15 | 16 | 17 | public String getPath() { 18 | return pde.getAbsolutePath(); 19 | } 20 | 21 | 22 | public String toString() { 23 | return name; 24 | } 25 | } -------------------------------------------------------------------------------- /app/src/processing/app/contrib/IgnorableException.java: -------------------------------------------------------------------------------- 1 | package processing.app.contrib; 2 | 3 | 4 | public class IgnorableException extends Exception { 5 | public IgnorableException(String msg) { 6 | super(msg); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /app/src/processing/app/exec/LineProcessor.java: -------------------------------------------------------------------------------- 1 | package processing.app.exec; 2 | 3 | public interface LineProcessor { 4 | void processLine(final String line); 5 | } 6 | -------------------------------------------------------------------------------- /app/src/processing/app/laf/FlatLaf.properties: -------------------------------------------------------------------------------- 1 | # The default is 8, which creates tiny nubby scroll bars 2 | ScrollBar.width = 16 3 | 4 | 5 | # Better matched for macOS dark mode (but using everywhere) 6 | # https://github.com/JFormDesigner/FlatLaf/issues/497 7 | 8 | [dark]@background = #1e1e1e 9 | [dark]@foreground = #e0e0e0 10 | [dark]@accentColor = #107aff 11 | [dark]@accentFocusColor = #176896 12 | 13 | [dark]Component.arrowType = chevron 14 | 15 | [dark]CheckBox.icon.style = filled 16 | [dark]CheckBox.icon[filled].selectedBorderColor = @accentColor 17 | [dark]CheckBox.icon[filled].selectedBackground = @accentColor 18 | [dark]CheckBox.icon[filled].checkmarkColor = @foreground 19 | 20 | [dark]RadioButton.icon.style = filled 21 | [dark]RadioButton.icon[filled].centerDiameter = 6 22 | -------------------------------------------------------------------------------- /app/src/processing/app/laf/PdeLookAndFeel.java: -------------------------------------------------------------------------------- 1 | package processing.app.laf; 2 | 3 | import javax.swing.plaf.basic.BasicLookAndFeel; 4 | 5 | 6 | /** 7 | * Custom Look and Feel class. Not currently in use: 8 | * for now, only individual component UIs are being overridden. 9 | * https://github.com/AdoptOpenJDK/openjdk-jdk8u/blob/master/jdk/src/share/classes/javax/swing/plaf/basic/BasicLookAndFeel.java 10 | */ 11 | public class PdeLookAndFeel extends BasicLookAndFeel { 12 | 13 | public String getDescription( ) { 14 | return "The Processing Look and Feel"; 15 | } 16 | 17 | 18 | public String getID( ) { 19 | return "Processing"; 20 | } 21 | 22 | 23 | public String getName( ) { 24 | return "Processing"; 25 | } 26 | 27 | 28 | public boolean isNativeLookAndFeel( ) { 29 | return false; 30 | } 31 | 32 | 33 | public boolean isSupportedLookAndFeel( ) { 34 | return true; 35 | } 36 | } -------------------------------------------------------------------------------- /build/.gitignore: -------------------------------------------------------------------------------- 1 | # after running the 'ant doc' target 2 | javadoc 3 | -------------------------------------------------------------------------------- /build/howto.txt: -------------------------------------------------------------------------------- 1 | As part of a grand plan for Casey and I to rid ourselves of as much of 2 | the duct tape and chewing gum that's holding together processing.org, 3 | this document has been moved to Github: 4 | 5 | https://github.com/processing/processing/wiki/Build-Instructions 6 | -------------------------------------------------------------------------------- /build/library/ant-contrib-0.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/library/ant-contrib-0.6.jar -------------------------------------------------------------------------------- /build/linux/.gitignore: -------------------------------------------------------------------------------- 1 | jdk-17*.tgz 2 | /processing-*-*.deb 3 | /processing-*-*.tgz 4 | work 5 | -------------------------------------------------------------------------------- /build/linux/control: -------------------------------------------------------------------------------- 1 | Package: processing 2 | Version: @version@ 3 | Section: devel 4 | Priority: optional 5 | Installed-Size: @size@ 6 | Architecture: @arch@ 7 | Maintainer: Kyle Feuz 8 | Description: Processing programming language and IDE 9 | Processing is a programming language, development environment, and online community. Since 2001, Processing has promoted software literacy within the visual arts and visual literacy within technology. Initially created to serve as a software sketchbook and to teach computer programming fundamentals within a visual context, Processing evolved into a development tool for professionals. Today, there are tens of thousands of students, artists, designers, researchers, and hobbyists who use Processing for learning, prototyping, and production. 10 | -------------------------------------------------------------------------------- /build/linux/desktop.template: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Name=Processing 4 | GenericName=Processing 5 | Comment=Open-source software prototyping platform 6 | Exec= %u 7 | Icon= 8 | Terminal=false 9 | Categories=Development;IDE;Programming; 10 | MimeType=text/x-processing;x-scheme-handler/pde; 11 | Keywords=sketching;software;animation;programming;coding; 12 | StartupWMClass=processing-app-ui-Splash 13 | -------------------------------------------------------------------------------- /build/linux/processing.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=@version@ 3 | Name=Processing 4 | Comment=Software sketchbook 5 | Exec=processing %F 6 | Icon=/opt/processing/lib/icons/app-256.png 7 | Terminal=false 8 | Type=Application 9 | Categories=Development;AudioVideo;Video;Graphics;Developer; 10 | StartupWMClass=Processing 11 | -------------------------------------------------------------------------------- /build/linux/processing.sharedmimeinfo: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Processing source code 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /build/linux/uninstall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | SCRIPT_PATH=$( cd $(dirname $0) ; pwd ) 4 | cd "$SCRIPT_PATH" 5 | 6 | ./install.sh -u 7 | -------------------------------------------------------------------------------- /build/macos/.gitignore: -------------------------------------------------------------------------------- 1 | appbundler.jar 2 | jdk-17* 3 | work 4 | -------------------------------------------------------------------------------- /build/macos/appbundler-aarch64.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/macos/appbundler-aarch64.jar -------------------------------------------------------------------------------- /build/macos/appbundler-x86_64.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/macos/appbundler-x86_64.jar -------------------------------------------------------------------------------- /build/macos/appbundler/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /build/macos/appbundler/.gitignore: -------------------------------------------------------------------------------- 1 | bin 2 | 3 | -------------------------------------------------------------------------------- /build/macos/appbundler/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | processing4-appbundler 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /build/macos/appbundler/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate 4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 6 | org.eclipse.jdt.core.compiler.compliance=11 7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 11 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 12 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 13 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 14 | org.eclipse.jdt.core.compiler.release=disabled 15 | org.eclipse.jdt.core.compiler.source=11 16 | -------------------------------------------------------------------------------- /build/macos/appbundler/TODO: -------------------------------------------------------------------------------- 1 | - Architectures should be automatically inferred from the embedded JVM 2 | - It makes more sense to take as input a JRE instead of taking a JDK and strip 3 | it until it becomes a JRE... 4 | -------------------------------------------------------------------------------- /build/macos/appbundler/processing4-appbundler.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /build/macos/appbundler/res/be.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | "JRELoadError" = "Немагчыма загрузіць Java."; 2 | "JRExLoadError" = "Немагчыма загрузіць асяродзьдзе выкананьня Java %d."; 3 | "JRExLoadFullError" = "Для гэтай праграмы патрабуецца Java %d або пазьнейшай вэрсіі на кампутары. Спампуйце і ўсталюйце апошнюю вэрсію Java з вэб-сайта www.java.com і паўтарэце спробу."; 4 | "JDKxLoadFullError" = "Для гэтай праграмы патрабуецца Java %d JDK або пазьнейшай вэрсіі на кампутары. Спампуйце і ўсталюйце апошнюю вэрсію Java JDK з вэб-сайта Oracle.com і паўтарэце спробу."; 5 | "MainClassNameRequired" = "Патрабуецца назва галоўнага кляса."; 6 | "JavaDirectoryNotFound" = "Не атрымліваецца пералічыць зьмесьціва каталёга Java."; 7 | "BundlePathContainsColon" = "Немагчыма запусьціць з каталёга, у назьве якога ёсьць сымбаль \"/\"."; 8 | -------------------------------------------------------------------------------- /build/macos/appbundler/res/cs.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | "JRELoadError" = "Není možné nahrát Java Runtime Environment."; 2 | "JRExLoadError" = "Není možné nahrát Java %d Runtime Environment."; 3 | "JRExLoadFullError" = "Tato aplikace vyžaduje, aby na Vašem počítači byla instalována Java %d nebo novější. Prosím stáhněte a instalujte nejnovější verzi Javy z adresy www.java.com a zkuste to znovu."; 4 | "JDKxLoadFullError" = "Tato aplikace vyžaduje, aby na Vašem počítači byla instalována Java %d JDK nebo novější. Prosím stáhněte a instalujte nejnovější verzi Javy JDK z adresy Oracle.com a zkuste to znovu."; 5 | 6 | "MainClassNameRequired" = "Je požadován název hlavní třídy."; 7 | "JavaDirectoryNotFound" = "Není možno vyčíst obsah adresáře Java."; 8 | "BundlePathContainsColon" = "Není možno spustit z adresáře, který má znaky \"/\" ve svém názvu."; 9 | -------------------------------------------------------------------------------- /build/macos/appbundler/res/de.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | "JRELoadError" = "Kann die Java Laufzeitumgebung nicht laden."; 2 | "JRExLoadError" = "Kann die Java %d Laufzeitumgebung nicht laden."; 3 | "JRExLoadFullError" = "Diese Anwendung benötigt die Java %d Laufzeitumgebung oder höher auf Ihrem Computer installiert sein. Bitte installieren Sie die neueste Version von Java von www.java.com und erneut versuchen."; 4 | "JDKxLoadFullError" = "Diese Anwendung benötigt die Java %d Laufzeitumgebung oder höher auf Ihrem Computer installiert sein. Bitte installieren Sie die neueste JDK von Oracle.com und erneut versuchen."; 5 | "MainClassNameRequired" = "Hauptklassenname ist erforderlich."; 6 | "JavaDirectoryNotFound" = "Kann den Inhalt des Java-Ordners nicht lesen."; 7 | "BundlePathContainsColon" = "Kann nicht vom einem Ordner aus starten, der \"/\" in seinem Namen enthält."; 8 | -------------------------------------------------------------------------------- /build/macos/appbundler/res/en.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | "JRELoadError" = "Unable to load Java Runtime Environment."; 2 | "JRExLoadError" = "Unable to load a Java %d Runtime Environment."; 3 | "JRExLoadFullError" = "This application requires that Java %d or later be installed on your computer. Please download and install the latest version of Java from www.java.com and try again."; 4 | "JDKxLoadFullError" = "This application requires that a Java %d JDK or later be installed on your computer. Please download and install the latest Java JDK from Oracle.com and try again."; 5 | "MainClassNameRequired" = "Main class name is required."; 6 | "JavaDirectoryNotFound" = "Unable to enumerate Java directory contents."; 7 | "BundlePathContainsColon" = "Cannot launch from folder that contains a \"/\" in its name."; 8 | -------------------------------------------------------------------------------- /build/macos/appbundler/res/fr.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | "JRELoadError" = "Impossible de charger l'environnement d'exécution Java."; 2 | "JRExLoadError" = "Impossible de charger l'environnement d'exécution Java %d."; 3 | "JRExLoadFullError" = "Cette application nécessite la présence de Java %d ou supérieur sur votre ordinateur. Veuillez télécharger et installer la dernière version de Java depuis www.java.com et essayez à nouveau."; 4 | "JDKxLoadFullError" = "Cette application nécessite la présence d'un JDK Java %d ou supérieur sur votre ordinateur. Veuillez télécharger et installer le dernier JDK Java depuis www.java.com et essayez à nouveau."; 5 | "MainClassNameRequired" = "Le nom de la classe principale est obligatoire."; 6 | "JavaDirectoryNotFound" = "Impossible d'énumérer le contenu du répertoire Java."; 7 | "BundlePathContainsColon" = "Impossible de lancer à partir d'un dossier dont le nom comporte un « / »."; 8 | -------------------------------------------------------------------------------- /build/macos/appbundler/res/ia.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | "JRELoadError" = "Incapace a cargar Java Runtime Environment."; 2 | "JRExLoadError" = "Incapace a cargar Java %d Runtime Environment."; 3 | "JRExLoadFullError" = "Iste application require que Java %d o plus recente sia installate sur tu computator. Per favor discarga e installa le version ultime de Java ex le sito www.java.com e prova de novo."; 4 | "JDKxLoadFullError" = "Iste application require que un JDK Java %d o plus recente sia installate sur tu computator. Per favor discarga e installa le JDK ultime de Java ex le sito oracle.com e prova de novo."; 5 | "MainClassNameRequired" = "Le 'Main class name' es requirite."; 6 | "JavaDirectoryNotFound" = "Incapace a enumerar le contentos del plica de Java."; 7 | "BundlePathContainsColon" = "Impossibile lancear ex un plica que contine un \"/\" in su nomine."; 8 | -------------------------------------------------------------------------------- /build/macos/appbundler/res/it.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | "JRELoadError" = "Impossibile caricare Java Runtime Environment."; 2 | "JRExLoadError" = "Impossibile caricare un Java %d Runtime Environment."; 3 | "JRExLoadFullError" = "Questa applicazione necessita che Java %d o successivo sia installato nel computer. Scaricare e installare l'ultima versione di Java da www.java.com e riprovare."; 4 | "JDKxLoadFullError" = "Questa applicazione necessita che Java %d JDK oo successivo sia installato sul computer. Scaricare e installare l'ultima versione di Java JDK da Oracle.com e riprovare."; 5 | "MainClassNameRequired" = "È richiesto il nome della classe principale."; 6 | "JavaDirectoryNotFound" = "Impossibile enumerare il contenuto della directory Java."; 7 | "BundlePathContainsColon" = "Impossibile avviare dalla cartella che contiene nel proprio nome un \"/\"."; 8 | -------------------------------------------------------------------------------- /build/macos/appbundler/res/ja.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | "JRELoadError" = "Java 実行環境を起動できません。"; 2 | "JRExLoadError" = "Java %d 実行環境を起動できません。"; 3 | "JRExLoadFullError" = "このプログラムを実行するには、Java %d 以降がインストールされている必要があります。www.java.com から最新の Java をダウンロードしてインストールした後に、再度お試しください。"; 4 | "JDKxLoadFullError" = "このプログラムを実行するには、Java %d 以降の JDK がインストールされている必要があります。Oracle.com から最新の Java JDK をダウンロードしてインストールした後に、再度お試しください。"; 5 | "MainClassNameRequired" = "メインクラス名の指定は必須です。"; 6 | "JavaDirectoryNotFound" = "Java ディレクトリのコンテンツを列挙できません。"; 7 | "BundlePathContainsColon" = "名前に \"/\" 記号を含むフォルダーからは起動できません。"; 8 | -------------------------------------------------------------------------------- /build/macos/appbundler/res/nl.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | "JRELoadError" = "Niet mogelijk Java Runtime Environment te laden."; 2 | "JRExLoadError" = "Niet mogelijk Java %d Runtime Environment te laden."; 3 | "JRExLoadFullError" = "Deze toepassing vereist dat Java %d of later moet zijn geïnstalleerd op uw computer. Download en installeer de laatste versie van Java vanaf www.java.com en probeer opnieuw."; 4 | "JDKxLoadFullError" = "Deze toepassing vereist dat Java %d JDK of later moet zijn geïnstalleerd op uw computer. Download en installeer de laatste Java JDK vanaf Oracle.com en probeer opnieuw."; 5 | "MainClassNameRequired" = "Naam voor hoofdklasse is vereist."; 6 | "JavaDirectoryNotFound" = "Niet mogelijk inhoud van map Java te nummeren."; 7 | "BundlePathContainsColon" = "Kan niet starten vanuit een map die een \"/\" in zijn naam heeft."; 8 | -------------------------------------------------------------------------------- /build/macos/appbundler/res/no.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | "JRELoadError" = "Kunne ikke laste inn Java Runtime Environment."; 2 | "JRExLoadError" = "Kunne ikke laste et Java %d Runtime Environment."; 3 | "JRExLoadFullError" = "Dette programmet krever at Java %d eller nyere er installert på datamaskinen. Last ned og installer den nyeste versjonen av Java fra www.java.com og prøv på nytt."; 4 | "JDKxLoadFullError" = "Dette programmet krever at en Java %d JDK eller nyere er installert på datamaskinen. Last ned og installer den nyeste Java JDK fra Oracle.com og prøv på nytt."; 5 | "MainClassNameRequired" = "Hovednavn for klasse kreves."; 6 | "JavaDirectoryNotFound" = "Kunne ikke liste opp innholdet i Java-mappen."; 7 | "BundlePathContainsColon" = "Kan ikke kjøre fra en mappe som har en \"/\" i navnet."; 8 | -------------------------------------------------------------------------------- /build/macos/appbundler/res/pt_BR.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | "JRELoadError" = "Impossível carregar o Java Runtime Environment."; 2 | "JRExLoadError" = "Impossível carregar um Java %d Runtime Environment."; 3 | "JRExLoadFullError" = "Este programa requer o Java %d ou mais recente instalado no seu computador. Baixe e instale a última versão do Java em www.java.com e tente outra vez."; 4 | "JDKxLoadFullError" = "Este programa requer o Java %d JDK ou mais recente instalado no seu computador. Baixe e instale a última versão do Java JDK em Oracle.com e tente outra vez."; 5 | "MainClassNameRequired" = "Nome de classe principal é necessário."; 6 | "JavaDirectoryNotFound" = "Impossível enumerar o conteúdo da pasta do Java."; 7 | "BundlePathContainsColon" = "Impossível iniciar a partir de uma pasta que contém o caractere \"/\" em seu nome."; 8 | -------------------------------------------------------------------------------- /build/macos/appbundler/src/com/oracle/appbundler/GenericApp.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/macos/appbundler/src/com/oracle/appbundler/GenericApp.icns -------------------------------------------------------------------------------- /build/macos/ffs.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.cs.allow-jit 6 | 7 | com.apple.security.cs.allow-unsigned-executable-memory 8 | 9 | com.apple.security.cs.disable-executable-page-protection 10 | 11 | com.apple.security.cs.disable-library-validation 12 | 13 | com.apple.security.cs.allow-dyld-environment-variables 14 | 15 | com.apple.security.device.camera 16 | 17 | com.apple.security.device.microphone 18 | 19 | com.apple.security.device.audio-input 20 | 21 | 22 | -------------------------------------------------------------------------------- /build/macos/language_gen.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os, re 4 | 5 | HERE = os.path.dirname(os.path.realpath(__file__)) 6 | 7 | 8 | def supported_languages(): 9 | outgoing = set() 10 | translations_path = os.path.join(HERE, '../shared/lib/languages') 11 | with os.scandir(translations_path) as it: 12 | for entry in it: 13 | if entry.name.startswith('PDE_') and entry.name.endswith('.properties'): 14 | outgoing.add(entry.name[4:-11]) 15 | return outgoing 16 | 17 | 18 | def lproj_directory(lang): 19 | path = "work/Processing.app/Contents/Resources/{}.lproj".format(lang) 20 | return os.path.join(HERE, path) 21 | 22 | 23 | if __name__ == "__main__": 24 | for lang in supported_languages(): 25 | path = lproj_directory(lang) 26 | if not os.path.exists(path): 27 | os.makedirs(path) 28 | -------------------------------------------------------------------------------- /build/macos/pde.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/macos/pde.icns -------------------------------------------------------------------------------- /build/macos/pdex.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/macos/pdex.icns -------------------------------------------------------------------------------- /build/macos/pdez.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/macos/pdez.icns -------------------------------------------------------------------------------- /build/macos/processing.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/macos/processing.icns -------------------------------------------------------------------------------- /build/shared/lib/about-1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/shared/lib/about-1x.png -------------------------------------------------------------------------------- /build/shared/lib/about-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/shared/lib/about-2x.png -------------------------------------------------------------------------------- /build/shared/lib/fonts/ProcessingSans-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/shared/lib/fonts/ProcessingSans-Bold.ttf -------------------------------------------------------------------------------- /build/shared/lib/fonts/ProcessingSans-LICENSE.md: -------------------------------------------------------------------------------- 1 | This is [Source Sans](https://github.com/adobe-fonts/source-sans) from Adobe, but renamed to 2 | prevent conflicts on Windows with other versions of Source Sans. See [issue 4747](https://github.com/processing/processing/issues/4747) in the old Processing repository for details. 3 | 4 | The license for this font can be found [here](https://github.com/adobe-fonts/source-sans/blob/release/LICENSE.md). 5 | 6 | We're using [version 3.046 from 14 July 2021](https://github.com/adobe-fonts/source-sans/releases/tag/3.046R). 7 | 8 | After downloading the TTF, it was opened with [FontForge](https://fontforge.org/). The font and family names were changed using Element → Font Info, followed by File → Generate to create the new `.ttf` files. 9 | -------------------------------------------------------------------------------- /build/shared/lib/fonts/ProcessingSans-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/shared/lib/fonts/ProcessingSans-Regular.ttf -------------------------------------------------------------------------------- /build/shared/lib/fonts/SourceCodePro-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/shared/lib/fonts/SourceCodePro-Bold.ttf -------------------------------------------------------------------------------- /build/shared/lib/fonts/SourceCodePro-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/shared/lib/fonts/SourceCodePro-Regular.ttf -------------------------------------------------------------------------------- /build/shared/lib/footer/console.svg: -------------------------------------------------------------------------------- 1 | console -------------------------------------------------------------------------------- /build/shared/lib/footer/error.svg: -------------------------------------------------------------------------------- 1 | error -------------------------------------------------------------------------------- /build/shared/lib/icons/app-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/shared/lib/icons/app-1024.png -------------------------------------------------------------------------------- /build/shared/lib/icons/app-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/shared/lib/icons/app-128.png -------------------------------------------------------------------------------- /build/shared/lib/icons/app-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/shared/lib/icons/app-16.png -------------------------------------------------------------------------------- /build/shared/lib/icons/app-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/shared/lib/icons/app-256.png -------------------------------------------------------------------------------- /build/shared/lib/icons/app-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/shared/lib/icons/app-32.png -------------------------------------------------------------------------------- /build/shared/lib/icons/app-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/shared/lib/icons/app-48.png -------------------------------------------------------------------------------- /build/shared/lib/icons/app-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/shared/lib/icons/app-512.png -------------------------------------------------------------------------------- /build/shared/lib/icons/app-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/shared/lib/icons/app-64.png -------------------------------------------------------------------------------- /build/shared/lib/icons/foundation-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/shared/lib/icons/foundation-16.png -------------------------------------------------------------------------------- /build/shared/lib/icons/foundation-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/shared/lib/icons/foundation-32.png -------------------------------------------------------------------------------- /build/shared/lib/icons/foundation-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/shared/lib/icons/foundation-64.png -------------------------------------------------------------------------------- /build/shared/lib/icons/pde-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/shared/lib/icons/pde-1024.png -------------------------------------------------------------------------------- /build/shared/lib/icons/pde-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/shared/lib/icons/pde-128.png -------------------------------------------------------------------------------- /build/shared/lib/icons/pde-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/shared/lib/icons/pde-16.png -------------------------------------------------------------------------------- /build/shared/lib/icons/pde-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/shared/lib/icons/pde-256.png -------------------------------------------------------------------------------- /build/shared/lib/icons/pde-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/shared/lib/icons/pde-32.png -------------------------------------------------------------------------------- /build/shared/lib/icons/pde-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/shared/lib/icons/pde-48.png -------------------------------------------------------------------------------- /build/shared/lib/icons/pde-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/shared/lib/icons/pde-512.png -------------------------------------------------------------------------------- /build/shared/lib/icons/pde-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/shared/lib/icons/pde-64.png -------------------------------------------------------------------------------- /build/shared/lib/languages/PDE_en.properties: -------------------------------------------------------------------------------- 1 | # -> PDE.properties -------------------------------------------------------------------------------- /build/shared/lib/manager/chevron.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /build/shared/lib/manager/close.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /build/shared/lib/manager/list-incompatible.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /build/shared/lib/manager/list-up-to-date.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /build/shared/lib/manager/list-update-available.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /build/shared/lib/manager/panel-install.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /build/shared/lib/manager/panel-remove.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /build/shared/lib/manager/panel-update.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /build/shared/lib/manager/search-reset.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /build/shared/lib/manager/search.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /build/shared/lib/status/console-collapse.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /build/shared/lib/status/console-expand.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /build/shared/lib/status/copy-to-clipboard.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /build/shared/lib/status/search.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /build/shared/lib/theme/Alloys/order.txt: -------------------------------------------------------------------------------- 1 | jepara 2 | gancedo 3 | imilac 4 | bacubirito 5 | agpalilik 6 | mbozi 7 | seymchan 8 | bondoc 9 | esquel 10 | omolon 11 | armanty 12 | brahin 13 | morito 14 | hoba 15 | tagish 16 | youxi 17 | -------------------------------------------------------------------------------- /build/shared/lib/theme/Minerals/order.txt: -------------------------------------------------------------------------------- 1 | kyanite 2 | calcite 3 | olivine 4 | beryl 5 | galena 6 | jasper 7 | malachite 8 | pyrite 9 | gabbro 10 | fluorite 11 | orpiment 12 | feldspar 13 | antimony 14 | serandite 15 | bauxite 16 | garnet 17 | -------------------------------------------------------------------------------- /build/shared/lib/toolbar/continue.svg: -------------------------------------------------------------------------------- 1 | continue -------------------------------------------------------------------------------- /build/shared/lib/toolbar/debug.svg: -------------------------------------------------------------------------------- 1 | debug -------------------------------------------------------------------------------- /build/shared/lib/toolbar/run.svg: -------------------------------------------------------------------------------- 1 | run -------------------------------------------------------------------------------- /build/shared/lib/toolbar/step.svg: -------------------------------------------------------------------------------- 1 | step -------------------------------------------------------------------------------- /build/shared/lib/toolbar/stop.svg: -------------------------------------------------------------------------------- 1 | stop -------------------------------------------------------------------------------- /build/shared/lib/welcome/examples/arctan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/shared/lib/welcome/examples/arctan.png -------------------------------------------------------------------------------- /build/shared/lib/welcome/examples/flocking.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/shared/lib/welcome/examples/flocking.png -------------------------------------------------------------------------------- /build/shared/lib/welcome/examples/mouse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/shared/lib/welcome/examples/mouse.png -------------------------------------------------------------------------------- /build/shared/lib/welcome/examples/rotating.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/shared/lib/welcome/examples/rotating.png -------------------------------------------------------------------------------- /build/shared/lib/welcome/style.css: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0; 3 | padding: 0; 4 | } 5 | 6 | body { 7 | padding-left: 20px; 8 | padding-right: 20px; 9 | font-family: "Processing Sans", sans-serif; 10 | } 11 | 12 | h1 { 13 | margin-bottom: 0; 14 | /* can't get the Semibold to work properly */ 15 | font-family: "Processing Sans", sans-serif; 16 | font-size: 18px; 17 | font-weight: normal; 18 | } 19 | 20 | p, td { 21 | margin-bottom: 0; 22 | font-size: 11px; 23 | line-height: 12px; 24 | } 25 | 26 | table { 27 | /*margin-top: 10px;*/ 28 | margin-bottom: 0; 29 | } 30 | 31 | div.inset, p.inset, table.inset { 32 | padding: 10px; 33 | /* background-color: rgb(224, 253, 251); */ 34 | /* background-color: rgb(240, 240, 240); */ 35 | background-color: white; 36 | } 37 | 38 | a { 39 | color: #2c7bb5; 40 | text-decoration: none; 41 | } 42 | 43 | ul { 44 | margin-left: 20px; 45 | margin-right: 0px; 46 | padding: 0; 47 | } 48 | 49 | #startButton { 50 | margin-left: 50px; 51 | } -------------------------------------------------------------------------------- /build/shared/tools/MovieMaker/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /build/shared/tools/MovieMaker/.gitignore: -------------------------------------------------------------------------------- 1 | bin 2 | ffmpeg-*.gz 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /build/shared/tools/MovieMaker/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | processing4-tools-moviemaker 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /build/shared/tools/MovieMaker/processing4-tools-moviemaker.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /build/shared/tools/MovieMaker/tool.properties: -------------------------------------------------------------------------------- 1 | name = Movie Maker II 2 | authors = The Processing Foundation 3 | url = https://github.com/processing/processing4/tree/main/build/shared/tools/MovieMaker 4 | category = Other 5 | sentence = Movie Maker for Processing 4 6 | paragraph = A new version of the Movie Maker for Processing 4 that uses [ffmpeg](https://ffmpeg.org/) to create MP4 and GIF videos. 7 | version = 1279 8 | prettyVersion = 2 9 | minRevision = 1279 10 | maxRevision = 0 11 | -------------------------------------------------------------------------------- /build/shared/tools/MovieMaker/tool/.gitignore: -------------------------------------------------------------------------------- 1 | MovieMaker.jar 2 | ffmpeg 3 | ffmpeg.exe 4 | -------------------------------------------------------------------------------- /build/windows/.gitignore: -------------------------------------------------------------------------------- 1 | jdk-17*.zip 2 | /processing-*.zip 3 | work 4 | -------------------------------------------------------------------------------- /build/windows/fenster/Fenster.java: -------------------------------------------------------------------------------- 1 | package processing.core.platform; 2 | 3 | public class Fenster { 4 | static void load() { 5 | System.out.println("about to load"); 6 | System.loadLibrary("fenster"); 7 | System.out.println("loaded"); 8 | } 9 | 10 | static void info() { 11 | System.out.println("about to init"); 12 | Fenster f = new Fenster(); 13 | // f.sayHello(); 14 | System.out.println("about to call"); 15 | int ppi = f.getLogPixels(); 16 | System.out.println("getLogPixels = " + ppi); 17 | System.out.println("aka " + (ppi / 96f)); 18 | System.out.println("done"); 19 | } 20 | 21 | public static void main(String[] args) { 22 | new Thread(() -> { 23 | // java.awt.EventQueue.invokeLater(() -> { 24 | load(); 25 | info(); 26 | // }); 27 | }).start(); 28 | } 29 | 30 | private native void sayHello(); 31 | 32 | private native int getLogPixels(); 33 | } 34 | -------------------------------------------------------------------------------- /build/windows/fenster/Makefile: -------------------------------------------------------------------------------- 1 | JAVA_HOME=/c/Program\ Files/Eclipse\ Adoptium/jdk-17.0.1.12-hotspot 2 | 3 | #CPP=g++ 4 | # using mingw64 under Cygwin because msys2 requires msys-2.0.dll 5 | CPP=x86_64-w64-mingw32-g++ 6 | 7 | # Create the .exe version, now the default because of JNI crashing. 8 | # -s also strips the binary so the output is 8 instead of 64 Kb. 9 | app: 10 | $(CPP) fenster.cpp -o fenster -lgdi32 -s 11 | 12 | 13 | # Create the JNI library and test code. 14 | jni: 15 | ${JAVA_HOME}/bin/javac -h . -d . Fenster.java 16 | $(CPP) -c \ 17 | -I${JAVA_HOME}/include \ 18 | -I${JAVA_HOME}/include/win32 \ 19 | processing_core_platform_Fenster.cpp \ 20 | -o processing_core_platform_Fenster.o 21 | $(CPP) -shared -o fenster.dll \ 22 | processing_core_platform_Fenster.o \ 23 | -lgdi32 \ 24 | -Wl,--add-stdcall-alias 25 | 26 | 27 | # Run the JNI version using its main() method. 28 | run: 29 | ${JAVA_HOME}/bin/java -cp . processing.core.platform.Fenster 30 | -------------------------------------------------------------------------------- /build/windows/fenster/fenster.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/windows/fenster/fenster.exe -------------------------------------------------------------------------------- /build/windows/fenster/processing_core_platform_Fenster.h: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT THIS FILE - it is machine generated */ 2 | #include 3 | /* Header for class processing_core_platform_Fenster */ 4 | 5 | #ifndef _Included_processing_core_platform_Fenster 6 | #define _Included_processing_core_platform_Fenster 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | /* 11 | * Class: processing_core_platform_Fenster 12 | * Method: sayHello 13 | * Signature: ()V 14 | */ 15 | JNIEXPORT void JNICALL Java_processing_core_platform_Fenster_sayHello 16 | (JNIEnv *, jobject); 17 | 18 | /* 19 | * Class: processing_core_platform_Fenster 20 | * Method: getLogPixels 21 | * Signature: ()I 22 | */ 23 | JNIEXPORT jint JNICALL Java_processing_core_platform_Fenster_getLogPixels 24 | (JNIEnv *, jobject); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | #endif 30 | -------------------------------------------------------------------------------- /build/windows/pde.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/windows/pde.ico -------------------------------------------------------------------------------- /build/windows/pdex.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/windows/pdex.ico -------------------------------------------------------------------------------- /build/windows/pdez.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/windows/pdez.ico -------------------------------------------------------------------------------- /build/windows/processing.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | .\java\bin\java -cp lib\pde.jar;core\library\core.jar;lib\jna.jar;lib\jna-platform.jar;lib\antlr-4.7.2-complete.jar;lib\ant.jar;lib\ant-launcher.jar processing.app.Base 4 | -------------------------------------------------------------------------------- /build/windows/processing.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/build/windows/processing.ico -------------------------------------------------------------------------------- /core/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /core/.gitignore: -------------------------------------------------------------------------------- 1 | bin 2 | bin-test 3 | 4 | /library/gluegen-rt*.jar 5 | /library/jogl-all*.jar 6 | 7 | core-sources.jar 8 | -------------------------------------------------------------------------------- /core/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | -------------------------------------------------------------------------------- /core/.idea/ant.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /core/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /core/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /core/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /core/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | processing4-core 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /core/different/Makefile: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make 2 | 3 | CC=gcc 4 | JAVA_HOME="`/usr/libexec/java_home -v 17`" 5 | JNI=-I${JAVA_HOME}/include -I${JAVA_HOME}/include/darwin/ 6 | 7 | default: universal_lib 8 | 9 | x64_lib: different.m 10 | $(CC) ${JNI} different.m -o libDifferent_x86_64 -target x86_64-apple-macos10.12 -framework Cocoa -shared 11 | 12 | arm_lib: different.m 13 | $(CC) ${JNI} different.m -o libDifferent_aarch64 -target arm64-apple-macos11 -framework Cocoa -shared 14 | 15 | # 'strip' throws errors, but compresses down to 2 Kb, so no big deal 16 | universal_lib: x64_lib arm_lib 17 | lipo -create -output ../src/processing/core/libDifferent.jnilib libDifferent_x86_64 libDifferent_aarch64 18 | -------------------------------------------------------------------------------- /core/different/README.md: -------------------------------------------------------------------------------- 1 | # Think Different 2 | 3 | Native code to go with the `ThinkDifferent` class that handles macOS-specific API calls. 4 | 5 | Currently handles hiding the menu bar, and the basic structure of the native libraries evolved from the [jAppleMenuBar project](https://github.com/kritzikratzi/jAppleMenuBar) by Hansi Raber and was rewritten for Processing 4 by Ben Fry. 6 | 7 | As of 4.2, also includes a method from Python Mode to bring windows to the front. 8 | 9 | Helpful reference used for the rewrite: 10 | 11 | * JNI Example (Mac OS) 12 | * 13 | * Building a Universal macOS Binary 14 | * 15 | -------------------------------------------------------------------------------- /core/different/different.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import 4 | 5 | 6 | JNIEXPORT void JNICALL Java_processing_core_ThinkDifferent_hideMenuBar 7 | (JNIEnv *env, jclass clazz, jboolean visible, jboolean kioskMode) 8 | { 9 | NSApplicationPresentationOptions options = 10 | NSApplicationPresentationHideDock | NSApplicationPresentationHideMenuBar; 11 | [NSApp setPresentationOptions:options]; 12 | } 13 | 14 | 15 | JNIEXPORT void JNICALL Java_processing_core_ThinkDifferent_showMenuBar 16 | (JNIEnv *env, jclass clazz, jboolean visible, jboolean kioskMode) 17 | { 18 | [NSApp setPresentationOptions:0]; 19 | } 20 | 21 | 22 | JNIEXPORT void JNICALL Java_processing_core_ThinkDifferent_activateIgnoringOtherApps 23 | (JNIEnv *env, jclass klass) 24 | { 25 | [NSApp activateIgnoringOtherApps:true]; 26 | } 27 | -------------------------------------------------------------------------------- /core/different/libDifferent_aarch64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/core/different/libDifferent_aarch64 -------------------------------------------------------------------------------- /core/different/libDifferent_x86_64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/core/different/libDifferent_x86_64 -------------------------------------------------------------------------------- /core/library-test/byte-buddy-1.11.19.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/core/library-test/byte-buddy-1.11.19.jar -------------------------------------------------------------------------------- /core/library-test/hamcrest-core-1.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/core/library-test/hamcrest-core-1.3.jar -------------------------------------------------------------------------------- /core/library-test/junit-4.13.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/core/library-test/junit-4.13.2.jar -------------------------------------------------------------------------------- /core/library-test/license.txt: -------------------------------------------------------------------------------- 1 | JUnit under EPL license: https://junit.org/junit4/license.html. 2 | Mockito under MIT license: https://github.com/mockito/mockito/blob/master/LICENSE. 3 | -------------------------------------------------------------------------------- /core/library-test/mockito-core-4.0.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/core/library-test/mockito-core-4.0.0.jar -------------------------------------------------------------------------------- /core/library-test/objenesis-3.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/core/library-test/objenesis-3.2.jar -------------------------------------------------------------------------------- /core/library/.gitignore: -------------------------------------------------------------------------------- 1 | core.jar 2 | 3 | jogl-all-src.jar 4 | 5 | /macos-aarch64 6 | /linux-arm 7 | /linux-aarch64 8 | /macos-x86_64 9 | /linux-amd64 10 | /windows-amd64 11 | -------------------------------------------------------------------------------- /core/methods/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /core/methods/.gitignore: -------------------------------------------------------------------------------- 1 | demo 2 | methods.jar 3 | -------------------------------------------------------------------------------- /core/methods/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | processing4-core-preproc 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /core/processing4-core.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /core/resource-test/test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/core/resource-test/test.png -------------------------------------------------------------------------------- /core/resource-test/test.txt: -------------------------------------------------------------------------------- 1 | test1 2 | test2 3 | -------------------------------------------------------------------------------- /core/src/font/ProcessingSansPro-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/core/src/font/ProcessingSansPro-Regular.ttf -------------------------------------------------------------------------------- /core/src/icon/icon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/core/src/icon/icon-1024.png -------------------------------------------------------------------------------- /core/src/icon/icon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/core/src/icon/icon-128.png -------------------------------------------------------------------------------- /core/src/icon/icon-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/core/src/icon/icon-16.png -------------------------------------------------------------------------------- /core/src/icon/icon-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/core/src/icon/icon-256.png -------------------------------------------------------------------------------- /core/src/icon/icon-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/core/src/icon/icon-32.png -------------------------------------------------------------------------------- /core/src/icon/icon-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/core/src/icon/icon-48.png -------------------------------------------------------------------------------- /core/src/icon/icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/core/src/icon/icon-512.png -------------------------------------------------------------------------------- /core/src/icon/icon-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/core/src/icon/icon-64.png -------------------------------------------------------------------------------- /core/src/processing/core/PSketch.java: -------------------------------------------------------------------------------- 1 | package processing.core; 2 | 3 | 4 | public class PSketch implements PConstants { 5 | // this is a dummy class 6 | } -------------------------------------------------------------------------------- /core/src/processing/core/libDifferent.jnilib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/core/src/processing/core/libDifferent.jnilib -------------------------------------------------------------------------------- /core/src/processing/opengl/cursors/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/core/src/processing/opengl/cursors/arrow.png -------------------------------------------------------------------------------- /core/src/processing/opengl/cursors/cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/core/src/processing/opengl/cursors/cross.png -------------------------------------------------------------------------------- /core/src/processing/opengl/cursors/hand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/core/src/processing/opengl/cursors/hand.png -------------------------------------------------------------------------------- /core/src/processing/opengl/cursors/move.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/core/src/processing/opengl/cursors/move.png -------------------------------------------------------------------------------- /core/src/processing/opengl/cursors/text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/core/src/processing/opengl/cursors/text.png -------------------------------------------------------------------------------- /core/src/processing/opengl/cursors/wait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/core/src/processing/opengl/cursors/wait.png -------------------------------------------------------------------------------- /core/test/processing/core/PShapeSVGTest.java: -------------------------------------------------------------------------------- 1 | package processing.core; 2 | 3 | import org.junit.Assert; 4 | import org.junit.Test; 5 | import processing.data.XML; 6 | import processing.core.PImage; 7 | 8 | import java.awt.*; 9 | 10 | 11 | public class PShapeSVGTest { 12 | 13 | private static final String TEST_CONTENT = ""; 14 | 15 | @Test 16 | public void testDecimals() { 17 | try { 18 | XML xml = XML.parse(TEST_CONTENT); 19 | PShapeSVG shape = new PShapeSVG(xml); 20 | PShape[] children = shape.getChildren(); 21 | Assert.assertEquals(1, children.length); 22 | PShape[] grandchildren = children[0].getChildren(); 23 | Assert.assertEquals(1, grandchildren.length); 24 | Assert.assertEquals(0, grandchildren[0].getChildCount()); 25 | Assert.assertEquals(2, grandchildren[0].getVertexCount()); 26 | } 27 | catch (Exception e) { 28 | Assert.fail("Encountered exception " + e); 29 | } 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /core/test/processing/data/TableTest.java: -------------------------------------------------------------------------------- 1 | package processing.data; 2 | 3 | import org.junit.Assert; 4 | import org.junit.Before; 5 | import org.junit.Test; 6 | 7 | import static org.junit.Assert.*; 8 | 9 | public class TableTest { 10 | 11 | class Person { 12 | public String name; 13 | public int age; 14 | 15 | public Person() { 16 | name = ""; 17 | age = -1; 18 | } 19 | } 20 | 21 | 22 | Person[] people; 23 | 24 | @Test 25 | public void parseInto() { 26 | Table table = new Table(); 27 | table.addColumn("name"); 28 | table.addColumn("age"); 29 | 30 | TableRow row = table.addRow(); 31 | row.setString("name", "Person1"); 32 | row.setInt("age", 30); 33 | 34 | table.parseInto(this, "people"); 35 | 36 | Assert.assertEquals(people[0].name, "Person1"); 37 | Assert.assertEquals(people[0].age, 30); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /java/.externalToolBuilders/AutoBuild.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /java/.gitignore: -------------------------------------------------------------------------------- 1 | reference.zip 2 | bin 3 | bin-test 4 | generated 5 | -------------------------------------------------------------------------------- /java/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | processing4-java 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.ui.externaltools.ExternalToolBuilder 15 | full,incremental, 16 | 17 | 18 | LaunchConfigHandle 19 | <project>/.externalToolBuilders/AutoBuild.launch 20 | 21 | 22 | 23 | 24 | 25 | org.eclipse.jdt.core.javanature 26 | 27 | 28 | -------------------------------------------------------------------------------- /java/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate 4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 6 | org.eclipse.jdt.core.compiler.compliance=11 7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 11 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 12 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 13 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 14 | org.eclipse.jdt.core.compiler.release=disabled 15 | org.eclipse.jdt.core.compiler.source=11 16 | -------------------------------------------------------------------------------- /java/application/application.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/application/application.icns -------------------------------------------------------------------------------- /java/application/application.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/application/application.ico -------------------------------------------------------------------------------- /java/application/launch4j/bin/ld-linux: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/application/launch4j/bin/ld-linux -------------------------------------------------------------------------------- /java/application/launch4j/bin/ld-linux-armv6hf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/application/launch4j/bin/ld-linux-armv6hf -------------------------------------------------------------------------------- /java/application/launch4j/bin/ld-macos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/application/launch4j/bin/ld-macos -------------------------------------------------------------------------------- /java/application/launch4j/bin/ld-windows.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/application/launch4j/bin/ld-windows.exe -------------------------------------------------------------------------------- /java/application/launch4j/bin/windres-linux: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/application/launch4j/bin/windres-linux -------------------------------------------------------------------------------- /java/application/launch4j/bin/windres-linux-armv6hf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/application/launch4j/bin/windres-linux-armv6hf -------------------------------------------------------------------------------- /java/application/launch4j/bin/windres-macos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/application/launch4j/bin/windres-macos -------------------------------------------------------------------------------- /java/application/launch4j/bin/windres-windows.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/application/launch4j/bin/windres-windows.exe -------------------------------------------------------------------------------- /java/application/launch4j/head/consolehead.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/application/launch4j/head/consolehead.o -------------------------------------------------------------------------------- /java/application/launch4j/head/guihead.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/application/launch4j/head/guihead.o -------------------------------------------------------------------------------- /java/application/launch4j/head/head.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/application/launch4j/head/head.o -------------------------------------------------------------------------------- /java/application/launch4j/launch4j.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/application/launch4j/launch4j.jar -------------------------------------------------------------------------------- /java/application/launch4j/lib/xstream.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/application/launch4j/lib/xstream.jar -------------------------------------------------------------------------------- /java/application/launch4j/w32api/crt2.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/application/launch4j/w32api/crt2.o -------------------------------------------------------------------------------- /java/application/launch4j/w32api/libadvapi32.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/application/launch4j/w32api/libadvapi32.a -------------------------------------------------------------------------------- /java/application/launch4j/w32api/libgcc.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/application/launch4j/w32api/libgcc.a -------------------------------------------------------------------------------- /java/application/launch4j/w32api/libkernel32.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/application/launch4j/w32api/libkernel32.a -------------------------------------------------------------------------------- /java/application/launch4j/w32api/libmingw32.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/application/launch4j/w32api/libmingw32.a -------------------------------------------------------------------------------- /java/application/launch4j/w32api/libmingwex.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/application/launch4j/w32api/libmingwex.a -------------------------------------------------------------------------------- /java/application/launch4j/w32api/libmoldname.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/application/launch4j/w32api/libmoldname.a -------------------------------------------------------------------------------- /java/application/launch4j/w32api/libmsvcrt.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/application/launch4j/w32api/libmsvcrt.a -------------------------------------------------------------------------------- /java/application/launch4j/w32api/libshell32.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/application/launch4j/w32api/libshell32.a -------------------------------------------------------------------------------- /java/application/launch4j/w32api/libuser32.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/application/launch4j/w32api/libuser32.a -------------------------------------------------------------------------------- /java/application/stub-macos-aarch64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/application/stub-macos-aarch64 -------------------------------------------------------------------------------- /java/application/stub-macos-x86_64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/application/stub-macos-x86_64 -------------------------------------------------------------------------------- /java/libraries/dxf/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /java/libraries/dxf/.gitignore: -------------------------------------------------------------------------------- 1 | bin 2 | -------------------------------------------------------------------------------- /java/libraries/dxf/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | processing4-dxf 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /java/libraries/dxf/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate 4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 6 | org.eclipse.jdt.core.compiler.compliance=11 7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 11 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 12 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 13 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 14 | org.eclipse.jdt.core.compiler.release=disabled 15 | org.eclipse.jdt.core.compiler.source=11 16 | -------------------------------------------------------------------------------- /java/libraries/dxf/dxfviewer.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/libraries/dxf/dxfviewer.jar -------------------------------------------------------------------------------- /java/libraries/dxf/library.properties: -------------------------------------------------------------------------------- 1 | name = DXF Export 2 | version = 1 3 | -------------------------------------------------------------------------------- /java/libraries/dxf/library/.cvsignore: -------------------------------------------------------------------------------- 1 | dxf.jar 2 | 3 | -------------------------------------------------------------------------------- /java/libraries/dxf/library/.gitignore: -------------------------------------------------------------------------------- 1 | dxf.jar 2 | -------------------------------------------------------------------------------- /java/libraries/dxf/processing4-dxf.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /java/libraries/io/examples/AnalogDigital_I2C_ADS1X15/setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/libraries/io/examples/AnalogDigital_I2C_ADS1X15/setup.png -------------------------------------------------------------------------------- /java/libraries/io/examples/AnalogDigital_SPI_MCP3001/AnalogDigital_SPI_MCP3001.pde: -------------------------------------------------------------------------------- 1 | import processing.io.*; 2 | MCP3001 adc; 3 | 4 | // see setup.png in the sketch folder for wiring details 5 | 6 | void setup() { 7 | //printArray(SPI.list()); 8 | adc = new MCP3001(SPI.list()[0]); 9 | } 10 | 11 | void draw() { 12 | // this will return a number between 0 and 1 13 | float measured = adc.analogRead(); 14 | 15 | // multiply with the supply voltage to get an absolute value 16 | float volts = 3.3 * measured; 17 | println("Analog Input is " + volts + "V"); 18 | 19 | background(measured * 255); 20 | } 21 | -------------------------------------------------------------------------------- /java/libraries/io/examples/AnalogDigital_SPI_MCP3001/MCP3001.pde: -------------------------------------------------------------------------------- 1 | import processing.io.SPI; 2 | 3 | // MCP3001 is a Analog-to-Digital converter using SPI 4 | // datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/21293C.pdf 5 | 6 | class MCP3001 extends SPI { 7 | 8 | MCP3001(String dev) { 9 | super(dev); 10 | settings(500000, SPI.MSBFIRST, SPI.MODE0); 11 | } 12 | 13 | // returns a number between 0.0 and 1.0 14 | float analogRead() { 15 | // dummy write, actual values don't matter 16 | byte[] out = { 0, 0 }; 17 | byte[] in = transfer(out); 18 | // some input bit shifting according to the datasheet p. 16 19 | int val = ((in[0] & 0x1f) << 5) | ((in[1] & 0xf8) >> 3); 20 | // val is between 0 and 1023 21 | return val/1023.0; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /java/libraries/io/examples/AnalogDigital_SPI_MCP3001/setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/libraries/io/examples/AnalogDigital_SPI_MCP3001/setup.png -------------------------------------------------------------------------------- /java/libraries/io/examples/AnalogDigital_SPI_MCP3008/AnalogDigital_SPI_MCP3008.pde: -------------------------------------------------------------------------------- 1 | import processing.io.*; 2 | MCP3008 adc; 3 | 4 | // see setup.png in the sketch folder for wiring details 5 | 6 | void setup() { 7 | //printArray(SPI.list()); 8 | adc = new MCP3008(SPI.list()[0]); 9 | } 10 | 11 | void draw() { 12 | // this will return a number between 0 and 1 13 | float measured = adc.analogRead(0); 14 | 15 | // multiply with the supply voltage to get an absolute value 16 | float volts = 3.3 * measured; 17 | println("Analog Input 0 is " + volts + "V"); 18 | 19 | background(255); 20 | fill(measured * 255); 21 | ellipse(width/2, height/2, width * 0.75, width * 0.75); 22 | } 23 | -------------------------------------------------------------------------------- /java/libraries/io/examples/AnalogDigital_SPI_MCP3008/MCP3008.pde: -------------------------------------------------------------------------------- 1 | import processing.io.SPI; 2 | 3 | // MCP3008 is a Analog-to-Digital converter using SPI 4 | // other than the MCP3001, this has 8 input channels 5 | // datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/21295d.pdf 6 | 7 | class MCP3008 extends SPI { 8 | 9 | MCP3008(String dev) { 10 | super(dev); 11 | settings(500000, SPI.MSBFIRST, SPI.MODE0); 12 | } 13 | 14 | // returns a number between 0.0 and 1.0 15 | float analogRead(int channel) { 16 | if (channel < 0 || 7 < channel) { 17 | System.err.println("The channel needs to be from 0 to 7"); 18 | throw new IllegalArgumentException("Unexpected channel"); 19 | } 20 | byte[] out = { 0, 0, 0 }; 21 | // encode the channel number in the first byte 22 | out[0] = (byte)(0x18 | channel); 23 | byte[] in = transfer(out); 24 | int val = ((in[1] & 0x03) << 8) | (in[2] & 0xff); 25 | // val is between 0 and 1023 26 | return val/1023.0; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /java/libraries/io/examples/AnalogDigital_SPI_MCP3008/setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/libraries/io/examples/AnalogDigital_SPI_MCP3008/setup.png -------------------------------------------------------------------------------- /java/libraries/io/examples/Compass_I2C_HMC6352/Compass_I2C_HMC6352.pde: -------------------------------------------------------------------------------- 1 | import processing.io.*; 2 | HMC6352 compass; 3 | 4 | // see setup.png in the sketch folder for wiring details 5 | 6 | void setup() { 7 | // the module's I2C address can be changed by modifying values in its EEPROM 8 | // 0x21 is however the default address 9 | 10 | //printArray(I2C.list()); 11 | compass = new HMC6352("i2c-1", 0x21); 12 | } 13 | 14 | void draw() { 15 | background(255); 16 | float deg = compass.heading(); 17 | println(deg + " degrees"); 18 | line(width/2, height/2, width/2+sin(radians(deg))*width/2, height/2-cos(radians(deg))*height/2); 19 | } 20 | -------------------------------------------------------------------------------- /java/libraries/io/examples/Compass_I2C_HMC6352/setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/libraries/io/examples/Compass_I2C_HMC6352/setup.png -------------------------------------------------------------------------------- /java/libraries/io/examples/DigitalAnalog_I2C_MCP4725/DigitalAnalog_I2C_MCP4725.pde: -------------------------------------------------------------------------------- 1 | import processing.io.*; 2 | MCP4725 dac; 3 | 4 | void setup() { 5 | //printArray(I2C.list()); 6 | dac = new MCP4725(I2C.list()[0], 0x60); 7 | } 8 | 9 | void draw() { 10 | background(map(mouseX, 0, width, 0, 255)); 11 | dac.setAnalog(map(mouseX, 0, width, 0.0, 1.0)); 12 | } 13 | -------------------------------------------------------------------------------- /java/libraries/io/examples/DigitalAnalog_I2C_MCP4725/MCP4725.pde: -------------------------------------------------------------------------------- 1 | import processing.io.I2C; 2 | 3 | // MCP4725 is a Digital-to-Analog converter using I2C 4 | // datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/22039d.pdf 5 | 6 | class MCP4725 extends I2C { 7 | int address; 8 | 9 | // there can be more than one device connected to the bus 10 | // as long as they have different addresses 11 | MCP4725(String dev, int address) { 12 | super(dev); 13 | this.address = address; 14 | } 15 | 16 | // outputs voltages from 0V to the supply voltage 17 | // (works with 3.3V and 5V) 18 | void setAnalog(float fac) { 19 | fac = constrain(fac, 0.0, 1.0); 20 | // convert to 12 bit value 21 | int val = int(4095 * fac); 22 | beginTransmission(address); 23 | write(val >> 8); 24 | write(val & 255); 25 | endTransmission(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /java/libraries/io/examples/Display_I2C_SSD1306/Display_I2C_SSD1306.pde: -------------------------------------------------------------------------------- 1 | import processing.io.*; 2 | 3 | // 0.96" 128x64 OLED display ("SKU 346540") 4 | SSD1306 oled; 5 | 6 | void setup() { 7 | size(128, 64); 8 | 9 | // the display can be set to one of these two addresses: 0x3c (default) or 0x3d 10 | // (they might be listed as 0x7a and 0x7b on the circuit board) 11 | 12 | // you might need to use a different interface on other SBCs 13 | oled = new SSD1306("i2c-1", 0x3c); 14 | } 15 | 16 | void draw() { 17 | background(0); 18 | stroke(255); 19 | line(0, 0, 127, 63); 20 | line(0, 63, 127, 0); 21 | oled.sendImage(get()); 22 | } 23 | -------------------------------------------------------------------------------- /java/libraries/io/examples/Environment_I2C_BME280/Environment_I2C_BME280.pde: -------------------------------------------------------------------------------- 1 | import processing.io.*; 2 | BME280 bme280; 3 | 4 | // see setup.png in the sketch folder for wiring details 5 | 6 | void setup() { 7 | size(720, 320); 8 | textSize(72); 9 | 10 | //printArray(I2C.list()); 11 | bme280 = new BME280("i2c-1", 0x77); 12 | } 13 | 14 | void draw() { 15 | background(0); 16 | stroke(255); 17 | 18 | bme280.update(); 19 | float temp = bme280.temperature(); 20 | float hum = bme280.humidity(); 21 | float press = bme280.pressure(); 22 | text(String.format("Temp: %.02f\272C", temp), 10, 75); 23 | text(String.format("Hum: %.02f %%", hum), 10, 150); 24 | text(String.format("Press: %.02f hPa", press / 100f), 10, 225); 25 | 26 | // pressure can be used to calculate the altitude like so 27 | float alt = bme280.altitude(press, temp); 28 | text(String.format("Alt: %.02f m", alt), 10, 300); 29 | } 30 | -------------------------------------------------------------------------------- /java/libraries/io/examples/Environment_I2C_BME280/setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/libraries/io/examples/Environment_I2C_BME280/setup.png -------------------------------------------------------------------------------- /java/libraries/io/examples/Interrupt/Interrupt.pde: -------------------------------------------------------------------------------- 1 | import processing.io.*; 2 | color bgcolor = 0; 3 | 4 | // GPIO numbers refer to different phyiscal pins on various boards 5 | // On the Raspberry Pi GPIO 4 is physical pin 7 on the header 6 | // see setup.png in the sketch folder for wiring details 7 | 8 | void setup() { 9 | GPIO.pinMode(4, GPIO.INPUT); 10 | GPIO.attachInterrupt(4, this, "pinEvent", GPIO.RISING); 11 | } 12 | 13 | void draw() { 14 | background(bgcolor); 15 | } 16 | 17 | // this function will be called whenever GPIO 4 is brought from LOW to HIGH 18 | void pinEvent(int pin) { 19 | println("Received interrupt"); 20 | if (bgcolor == 0) { 21 | bgcolor = color(255); 22 | } else { 23 | bgcolor = color(0); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /java/libraries/io/examples/Interrupt/setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/libraries/io/examples/Interrupt/setup.png -------------------------------------------------------------------------------- /java/libraries/io/examples/LedCounter/LedCounter.pde: -------------------------------------------------------------------------------- 1 | import processing.io.*; 2 | LED leds[]; 3 | 4 | // the Raspberry Pi has two build-in LEDs we can control 5 | // led0 (green) and led1 (red) 6 | 7 | void setup() { 8 | String available[] = LED.list(); 9 | print("Available: "); 10 | println(available); 11 | 12 | // create an object for each LED and store it in an array 13 | leds = new LED[available.length]; 14 | for (int i=0; i < available.length; i++) { 15 | leds[i] = new LED(available[i]); 16 | } 17 | 18 | frameRate(1); 19 | } 20 | 21 | void draw() { 22 | // make the LEDs count in binary 23 | for (int i=0; i < leds.length; i++) { 24 | if ((frameCount & (1 << i)) != 0) { 25 | leds[i].brightness(1.0); 26 | } else { 27 | leds[i].brightness(0.0); 28 | } 29 | } 30 | println(frameCount); 31 | } 32 | 33 | void keyPressed() { 34 | // cleanup 35 | for (int i=0; i < leds.length; i++) { 36 | leds[i].close(); 37 | } 38 | exit(); 39 | } 40 | -------------------------------------------------------------------------------- /java/libraries/io/examples/Light_I2C_TSL2561/Light_I2C_TSL2561.pde: -------------------------------------------------------------------------------- 1 | import processing.io.*; 2 | TSL2561 sensor; 3 | 4 | // see setup.png in the sketch folder for wiring details 5 | 6 | // this variable will contain the measured brightness 7 | // Lux (lx) is the unit of illuminance 8 | float lux; 9 | 10 | void setup() { 11 | size(700, 100); 12 | textSize(72); 13 | //printArray(I2C.list()); 14 | sensor = new TSL2561("i2c-1", 0x39); 15 | } 16 | 17 | void draw() { 18 | background(0); 19 | stroke(255); 20 | lux = sensor.lux(); 21 | text(String.format("Light: %.02f Lux", lux), 10, 75); 22 | } 23 | 24 | void dispose() { 25 | // turn the sensor off 26 | sensor.stop(); 27 | } 28 | -------------------------------------------------------------------------------- /java/libraries/io/examples/Light_I2C_TSL2561/setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/libraries/io/examples/Light_I2C_TSL2561/setup.png -------------------------------------------------------------------------------- /java/libraries/io/examples/Servo_I2C_PCA9685/setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/libraries/io/examples/Servo_I2C_PCA9685/setup.png -------------------------------------------------------------------------------- /java/libraries/io/examples/SimpleI2C/SimpleI2C.pde: -------------------------------------------------------------------------------- 1 | import processing.io.*; 2 | I2C i2c; 3 | 4 | // MCP4725 is a Digital-to-Analog converter using I2C 5 | // datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/22039d.pdf 6 | 7 | // also see DigitalAnalog_I2C_MCP4725 for how to write the 8 | // same sketch in an object-oriented way 9 | 10 | void setup() { 11 | //printArray(I2C.list()); 12 | i2c = new I2C(I2C.list()[0]); 13 | } 14 | 15 | void draw() { 16 | background(map(mouseX, 0, width, 0, 255)); 17 | setAnalog(map(mouseX, 0, width, 0.0, 1.0)); 18 | } 19 | 20 | // outputs voltages from 0V to the supply voltage 21 | // (works with 3.3V and 5V) 22 | void setAnalog(float fac) { 23 | fac = constrain(fac, 0.0, 1.0); 24 | // convert to 12 bit value 25 | int val = int(4095 * fac); 26 | i2c.beginTransmission(0x60); 27 | i2c.write(val >> 8); 28 | i2c.write(val & 255); 29 | i2c.endTransmission(); 30 | } 31 | -------------------------------------------------------------------------------- /java/libraries/io/examples/SimpleInput/SimpleInput.pde: -------------------------------------------------------------------------------- 1 | import processing.io.*; 2 | 3 | // GPIO numbers refer to different phyiscal pins on various boards 4 | // On the Raspberry Pi GPIO 4 is physical pin 7 on the header 5 | // see setup.png in the sketch folder for wiring details 6 | 7 | void setup() { 8 | // INPUT_PULLUP enables the built-in pull-up resistor for this pin 9 | // left alone, the pin will read as HIGH 10 | // connected to ground (via e.g. a button or switch) it will read LOW 11 | GPIO.pinMode(4, GPIO.INPUT_PULLUP); 12 | } 13 | 14 | void draw() { 15 | if (GPIO.digitalRead(4) == GPIO.LOW) { 16 | // button is pressed 17 | fill(255); 18 | } else { 19 | // button is not pressed 20 | fill(204); 21 | } 22 | stroke(255); 23 | ellipse(width/2, height/2, width*0.75, height*0.75); 24 | } 25 | -------------------------------------------------------------------------------- /java/libraries/io/examples/SimpleInput/setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/libraries/io/examples/SimpleInput/setup.png -------------------------------------------------------------------------------- /java/libraries/io/examples/SimpleOutput/SimpleOutput.pde: -------------------------------------------------------------------------------- 1 | import processing.io.*; 2 | boolean ledOn = false; 3 | 4 | // GPIO numbers refer to different phyiscal pins on various boards 5 | // On the Raspberry Pi GPIO 4 is physical pin 7 on the header 6 | // see setup.png in the sketch folder for wiring details 7 | 8 | void setup() { 9 | GPIO.pinMode(4, GPIO.OUTPUT); 10 | frameRate(0.5); 11 | } 12 | 13 | void draw() { 14 | // make the LED blink 15 | ledOn = !ledOn; 16 | if (ledOn) { 17 | GPIO.digitalWrite(4, GPIO.LOW); 18 | fill(204); 19 | } else { 20 | GPIO.digitalWrite(4, GPIO.HIGH); 21 | fill(255); 22 | } 23 | stroke(255); 24 | ellipse(width/2, height/2, width*0.75, height*0.75); 25 | } 26 | -------------------------------------------------------------------------------- /java/libraries/io/examples/SimpleOutput/setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/libraries/io/examples/SimpleOutput/setup.png -------------------------------------------------------------------------------- /java/libraries/io/examples/SimpleResistorSensor/setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/libraries/io/examples/SimpleResistorSensor/setup.png -------------------------------------------------------------------------------- /java/libraries/io/examples/SimpleSPI/SimpleSPI.pde: -------------------------------------------------------------------------------- 1 | import processing.io.*; 2 | SPI spi; 3 | 4 | // MCP3001 is a Analog-to-Digital converter using SPI 5 | // datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/21293C.pdf 6 | // see setup.png in the sketch folder for wiring details 7 | 8 | // also see AnalogDigital_SPI_MCP3001 for how to write the 9 | // same sketch in an object-oriented way 10 | 11 | void setup() { 12 | //printArray(SPI.list()); 13 | spi = new SPI(SPI.list()[0]); 14 | spi.settings(500000, SPI.MSBFIRST, SPI.MODE0); 15 | } 16 | 17 | void draw() { 18 | // dummy write, actual values don't matter 19 | byte[] out = { 0, 0 }; 20 | byte[] in = spi.transfer(out); 21 | // some input bit shifting according to the datasheet p. 16 22 | int val = ((in[0] & 0x1f) << 5) | ((in[1] & 0xf8) >> 3); 23 | // val is between 0 and 1023 24 | background(map(val, 0, 1023, 0, 255)); 25 | } 26 | -------------------------------------------------------------------------------- /java/libraries/io/examples/SimpleSPI/setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/libraries/io/examples/SimpleSPI/setup.png -------------------------------------------------------------------------------- /java/libraries/io/examples/SoftwareServoSweep/SoftwareServoSweep.pde: -------------------------------------------------------------------------------- 1 | import processing.io.*; 2 | 3 | // see setup.png in the sketch folder for wiring details 4 | // for more reliable operation it is recommended to power 5 | // the servo from an external power source, see setup_better.png 6 | 7 | SoftwareServo servo1; 8 | SoftwareServo servo2; 9 | 10 | void setup() { 11 | size(400, 300); 12 | servo1 = new SoftwareServo(this); 13 | servo1.attach(17); 14 | servo2 = new SoftwareServo(this); 15 | servo2.attach(4); 16 | } 17 | 18 | void draw() { 19 | background(0); 20 | stroke(255); 21 | strokeWeight(3); 22 | 23 | // we don't go right to the edge to prevent 24 | // making the servo unhappy 25 | float angle = 90 + sin(frameCount / 100.0)*85; 26 | servo1.write(angle); 27 | float y = map(angle, 0, 180, 0, height); 28 | line(0, y, width/2, y); 29 | 30 | angle = 90 + cos(frameCount / 100.0)*85; 31 | servo2.write(90 + cos(frameCount / 100.0)*85); 32 | y = map(angle, 0, 180, 0, height); 33 | line(width/2, y, width, y); 34 | } 35 | -------------------------------------------------------------------------------- /java/libraries/io/examples/SoftwareServoSweep/setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/libraries/io/examples/SoftwareServoSweep/setup.png -------------------------------------------------------------------------------- /java/libraries/io/examples/SoftwareServoSweep/setup_better.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/libraries/io/examples/SoftwareServoSweep/setup_better.png -------------------------------------------------------------------------------- /java/libraries/io/examples/Touch_I2C_MPR121/Touch_I2C_MPR121.pde: -------------------------------------------------------------------------------- 1 | import processing.io.*; 2 | MPR121 touch; 3 | 4 | // see setup.png in the sketch folder for wiring details 5 | 6 | void setup() { 7 | size(600, 200); 8 | //printArray(I2C.list()); 9 | touch = new MPR121("i2c-1", 0x5a); 10 | } 11 | 12 | void draw() { 13 | background(204); 14 | noStroke(); 15 | 16 | touch.update(); 17 | 18 | for (int i=0; i < 12; i++) { 19 | if (touch.touched(i)) { 20 | fill(255, 0, 0); 21 | } else { 22 | fill(255, 255, 255); 23 | } 24 | ellipse((width/12) * (i+0.5), height/2, 20, 20); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /java/libraries/io/examples/Touch_I2C_MPR121/setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/libraries/io/examples/Touch_I2C_MPR121/setup.png -------------------------------------------------------------------------------- /java/libraries/io/library.properties: -------------------------------------------------------------------------------- 1 | name = Hardware I/O 2 | authors = The Processing Foundation 3 | url = http://processing.org/reference/libraries/io/index.html 4 | categories = Hardware 5 | sentence = Access peripherals on the Raspberry Pi and other Linux-based computers. 6 | paragraph = For other platforms, this is solely provided in order to build and export sketches that require processing.io. 7 | version = 1 8 | prettyVersion = 1 9 | minRevision = 247 10 | -------------------------------------------------------------------------------- /java/libraries/io/library/.gitignore: -------------------------------------------------------------------------------- 1 | io.jar 2 | -------------------------------------------------------------------------------- /java/libraries/io/library/export.txt: -------------------------------------------------------------------------------- 1 | name = Hardware I/O for Raspberry Pi and other Linux-based computers 2 | -------------------------------------------------------------------------------- /java/libraries/io/library/linux-arm64/libprocessing-io.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/libraries/io/library/linux-arm64/libprocessing-io.so -------------------------------------------------------------------------------- /java/libraries/io/library/linux-armv6hf/libprocessing-io.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/libraries/io/library/linux-armv6hf/libprocessing-io.so -------------------------------------------------------------------------------- /java/libraries/io/library/linux32/libprocessing-io.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/libraries/io/library/linux32/libprocessing-io.so -------------------------------------------------------------------------------- /java/libraries/io/library/linux64/libprocessing-io.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/libraries/io/library/linux64/libprocessing-io.so -------------------------------------------------------------------------------- /java/libraries/io/src/native/Makefile: -------------------------------------------------------------------------------- 1 | TARGET := libprocessing-io.so 2 | OBJS := impl.o 3 | CC := gcc 4 | 5 | # prefix with -m32 to compile for linux32 6 | CFLAGS := -std=gnu99 -fPIC -g -ffast-math 7 | CFLAGS += -I$(shell dirname $(shell realpath $(shell which javac)))/../include 8 | CFLAGS += -I$(shell dirname $(shell realpath $(shell which javac)))/../include/linux 9 | LDFLAGS := -shared 10 | 11 | $(TARGET): $(OBJS) 12 | $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ 13 | 14 | iface.h: 15 | javah -classpath .. -o iface.h processing.io.NativeInterface 16 | 17 | clean: 18 | rm -f $(TARGET) $(OBJS) 19 | 20 | .PHONY: iface.h clean 21 | -------------------------------------------------------------------------------- /java/libraries/net/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /java/libraries/net/.gitignore: -------------------------------------------------------------------------------- 1 | bin 2 | -------------------------------------------------------------------------------- /java/libraries/net/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | processing4-net 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /java/libraries/net/.settings/org.eclipse.jdt.ui.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | formatter_profile=_processing 3 | formatter_settings_version=12 4 | -------------------------------------------------------------------------------- /java/libraries/net/examples/ChatServer/data/ScalaSans-Caps-32.vlw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/libraries/net/examples/ChatServer/data/ScalaSans-Caps-32.vlw -------------------------------------------------------------------------------- /java/libraries/net/library.properties: -------------------------------------------------------------------------------- 1 | name = Network 2 | version = 1 3 | -------------------------------------------------------------------------------- /java/libraries/net/library/.cvsignore: -------------------------------------------------------------------------------- 1 | net.jar 2 | -------------------------------------------------------------------------------- /java/libraries/net/library/.gitignore: -------------------------------------------------------------------------------- 1 | net.jar 2 | -------------------------------------------------------------------------------- /java/libraries/net/processing4-net.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /java/libraries/pdf/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /java/libraries/pdf/.gitignore: -------------------------------------------------------------------------------- 1 | bin 2 | -------------------------------------------------------------------------------- /java/libraries/pdf/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | processing4-pdf 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /java/libraries/pdf/.settings/org.eclipse.jdt.ui.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | formatter_profile=_processing 3 | formatter_settings_version=18 4 | org.eclipse.jdt.ui.text.custom_code_templates= 5 | -------------------------------------------------------------------------------- /java/libraries/pdf/README.md: -------------------------------------------------------------------------------- 1 | This library uses iText 2.1.7, which is the last LGPL/MPL version of the iText project. 2 | 3 | We've used iText for several years. The license for iText has changed for subsequent versions and is no longer compatible with Processing, so we're stuck at 2.x. 4 | 5 | At the iText site, there's also some [vague wording](http://lowagie.com/itext2) about legal liability for commercial projects using the 2.x series. It's not clear where this leaves us. 6 | 7 | Bruno Lowagie did an enormous amount of (free) work with the iText project, and we certainly don't fault him for the new commercial license. 8 | 9 | We're using iText in a very limited way--drawing to it like it's a Java Graphics2D object. There might be other options for us in this space, but it's not much of a priority. 10 | 11 | Ben Fry, 12 October 2013 12 | -------------------------------------------------------------------------------- /java/libraries/pdf/examples/LargePage/LargePage.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * Large Page. 3 | * 4 | * Saves one frame as a PDF with a size larger 5 | * than the screen. When PDF is used as the renderer 6 | * (the third parameter of size) the display window 7 | * does not open. The file is saved to the sketch folder. 8 | * You can open it by "Sketch->Show Sketch Folder." 9 | */ 10 | 11 | 12 | import processing.pdf.*; 13 | 14 | void setup() 15 | { 16 | size(2000, 2000, PDF, "Line.pdf"); 17 | } 18 | 19 | void draw() 20 | { 21 | background(255); 22 | stroke(0, 20); 23 | strokeWeight(20.0); 24 | line(200, 0, width/2, height); 25 | 26 | exit(); // Quit the program 27 | } 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /java/libraries/pdf/examples/ManyPDFs/ManyPDFs.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * Many PDFs. 3 | * 4 | * Saves one PDF file each each frame while the mouse is pressed. 5 | * When the mouse is released, the PDF creation stops. 6 | */ 7 | 8 | 9 | import processing.pdf.*; 10 | 11 | boolean savePDF = false; 12 | 13 | void setup() { 14 | size(600, 600); 15 | frameRate(24); 16 | } 17 | 18 | void draw() { 19 | if(savePDF == true) { 20 | beginRecord(PDF, "lines" + frameCount + ".pdf"); 21 | } 22 | background(255); 23 | stroke(0, 20); 24 | strokeWeight(20.0); 25 | line(mouseX, 0, width-mouseY, height); 26 | if(savePDF == true) { 27 | endRecord(); 28 | } 29 | } 30 | 31 | void mousePressed() { 32 | savePDF = true; 33 | } 34 | 35 | void mouseReleased() { 36 | savePDF = false; 37 | } 38 | 39 | -------------------------------------------------------------------------------- /java/libraries/pdf/examples/ManyPages/ManyPages.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * Many Pages. 3 | * 4 | * Saves a new page into a PDF file each loop through draw(). 5 | * Pressing the mouse finishes writing the file and exits the program. 6 | */ 7 | 8 | 9 | import processing.pdf.*; 10 | 11 | PGraphicsPDF pdf; 12 | 13 | void setup() { 14 | size(600, 600); 15 | frameRate(4); 16 | pdf = (PGraphicsPDF)beginRecord(PDF, "Lines.pdf"); 17 | } 18 | 19 | void draw() { 20 | background(255); 21 | stroke(0, 20); 22 | strokeWeight(20.0); 23 | line(mouseX, 0, width-mouseY, height); 24 | pdf.nextPage(); 25 | } 26 | 27 | void mousePressed() { 28 | endRecord(); 29 | exit(); 30 | } 31 | -------------------------------------------------------------------------------- /java/libraries/pdf/examples/MousePress/MousePress.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * Mouse Press. 3 | * 4 | * Saves one PDF of the contents of the display window 5 | * each time the mouse is pressed. 6 | */ 7 | 8 | 9 | import processing.pdf.*; 10 | 11 | boolean saveOneFrame = false; 12 | 13 | void setup() { 14 | size(600, 600); 15 | frameRate(24); 16 | } 17 | 18 | void draw() { 19 | if(saveOneFrame == true) { 20 | beginRecord(PDF, "Line.pdf"); 21 | } 22 | 23 | background(255); 24 | stroke(0, 20); 25 | strokeWeight(20.0); 26 | line(mouseX, 0, width-mouseY, height); 27 | 28 | if(saveOneFrame == true) { 29 | endRecord(); 30 | saveOneFrame = false; 31 | } 32 | } 33 | 34 | void mousePressed() { 35 | saveOneFrame = true; 36 | } 37 | 38 | -------------------------------------------------------------------------------- /java/libraries/pdf/examples/MultipleFrames/MultipleFrames.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * Multiple Frames. 3 | * 4 | * Saves one PDF document of many frames drawn to the screen. 5 | * Starts the file when the mouse is pressed and end the file 6 | * when the mouse is released. 7 | */ 8 | 9 | 10 | import processing.pdf.*; 11 | 12 | void setup() { 13 | size(600, 600); 14 | frameRate(24); 15 | background(255); 16 | } 17 | 18 | void draw() { 19 | stroke(0, 20); 20 | strokeWeight(20.0); 21 | line(mouseX, 0, width-mouseY, height); 22 | } 23 | 24 | void mousePressed() { 25 | beginRecord(PDF, "Lines.pdf"); 26 | background(255); 27 | } 28 | 29 | void mouseReleased() { 30 | endRecord(); 31 | background(255); 32 | } 33 | 34 | -------------------------------------------------------------------------------- /java/libraries/pdf/examples/OneFrame/OneFrame.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * One Frame. 3 | * 4 | * Saves one PDF with the contents of the display window. 5 | * Because this example uses beginRecord, the image is shown 6 | * on the display window and is saved to the file. 7 | */ 8 | 9 | 10 | import processing.pdf.*; 11 | 12 | size(600, 600); 13 | 14 | beginRecord(PDF, "line.pdf"); 15 | 16 | background(255); 17 | stroke(0, 20); 18 | strokeWeight(20.0); 19 | line(200, 0, 400, height); 20 | 21 | endRecord(); 22 | 23 | 24 | -------------------------------------------------------------------------------- /java/libraries/pdf/itext-src.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/libraries/pdf/itext-src.zip -------------------------------------------------------------------------------- /java/libraries/pdf/library.properties: -------------------------------------------------------------------------------- 1 | name = PDF Export 2 | version = 1 3 | -------------------------------------------------------------------------------- /java/libraries/pdf/library/.cvsignore: -------------------------------------------------------------------------------- 1 | pdf.jar 2 | 3 | -------------------------------------------------------------------------------- /java/libraries/pdf/library/.gitignore: -------------------------------------------------------------------------------- 1 | pdf.jar 2 | -------------------------------------------------------------------------------- /java/libraries/pdf/library/itext.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/libraries/pdf/library/itext.jar -------------------------------------------------------------------------------- /java/libraries/pdf/processing4-pdf.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /java/libraries/serial/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /java/libraries/serial/.gitignore: -------------------------------------------------------------------------------- 1 | bin 2 | -------------------------------------------------------------------------------- /java/libraries/serial/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | processing4-serial 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /java/libraries/serial/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate 4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 6 | org.eclipse.jdt.core.compiler.compliance=11 7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 11 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 12 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 13 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 14 | org.eclipse.jdt.core.compiler.release=disabled 15 | org.eclipse.jdt.core.compiler.source=11 16 | -------------------------------------------------------------------------------- /java/libraries/serial/examples/SerialDuplex/data/CourierNewPSMT-24.vlw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/libraries/serial/examples/SerialDuplex/data/CourierNewPSMT-24.vlw -------------------------------------------------------------------------------- /java/libraries/serial/library.properties: -------------------------------------------------------------------------------- 1 | name = Serial 2 | version = 1 3 | 4 | -------------------------------------------------------------------------------- /java/libraries/serial/library/.gitignore: -------------------------------------------------------------------------------- 1 | serial.jar 2 | -------------------------------------------------------------------------------- /java/libraries/serial/library/jssc.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/libraries/serial/library/jssc.jar -------------------------------------------------------------------------------- /java/libraries/serial/library/jssc.txt: -------------------------------------------------------------------------------- 1 | This is using a modified version of Java Simple Serial Connector by Alexey Sokolov. See https://github.com/gohai/java-simple-serial-connector and https://github.com/sampottinger/jssc for details on the modifications to support Processing. 2 | 3 | To compile the C++ portion of the library on OS X: 4 | g++ -shared [or: -dynamiclib?] -arch i386 -arch x86_64 -I/System/Library/Frameworks/IOKit.framework/Versions/A/Headers -I$JAVA_HOME/include -I$JAVA_HOME/include/darwin -framework IOKit -framework CoreFoundation -o libjSSC-2.6.jnilib jssc.cpp 5 | 6 | Update 2022-10-18: Upstream java-native/jssc now packages all of the libs in a fat jar. 7 | -------------------------------------------------------------------------------- /java/libraries/serial/test/serial_latency/arduino/serial_latency.ino: -------------------------------------------------------------------------------- 1 | void setup() { 2 | Serial.begin(115200); 3 | } 4 | 5 | void loop() { 6 | while (true) { 7 | int in = Serial.read(); 8 | if (in != -1) { 9 | Serial.write(in); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /java/libraries/serial/test/serial_throughput/arduino/serial_thoughput.ino: -------------------------------------------------------------------------------- 1 | void setup() { 2 | Serial.begin(115200); 3 | } 4 | 5 | void loop() { 6 | while (true) { 7 | Serial.write('.'); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /java/libraries/serial/test/serial_throughput/serial_throughput.pde: -------------------------------------------------------------------------------- 1 | import processing.serial.*; 2 | Serial serial; 3 | int start; 4 | byte[] in = new byte[32768]; 5 | long num_ok = 0; 6 | long num_fail = 0; 7 | long num_recv = 0; 8 | 9 | void setup() { 10 | println(serial.list()); 11 | // change this accordingly 12 | serial = new Serial(this, serial.list()[0], 115200); 13 | start = millis(); 14 | } 15 | 16 | void draw() { 17 | background(255); 18 | if (0 < serial.available()) { 19 | int recv = serial.readBytes(in); 20 | for (int i=0; i < recv; i++) { 21 | if (in[i] == '.') { 22 | num_ok++; 23 | } else { 24 | num_fail++; 25 | println("Received "+num_fail+" unexpected bytes"); 26 | } 27 | num_recv++; 28 | } 29 | } 30 | fill(0); 31 | text(num_recv/((millis()-start)/1000.0), 0, height/2); 32 | } 33 | -------------------------------------------------------------------------------- /java/libraries/svg/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /java/libraries/svg/.gitignore: -------------------------------------------------------------------------------- 1 | library/batik.jar 2 | -------------------------------------------------------------------------------- /java/libraries/svg/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | processing4-svg 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /java/libraries/svg/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate 4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 6 | org.eclipse.jdt.core.compiler.compliance=11 7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 11 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 12 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 13 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 14 | org.eclipse.jdt.core.compiler.release=disabled 15 | org.eclipse.jdt.core.compiler.source=11 16 | -------------------------------------------------------------------------------- /java/libraries/svg/README.md: -------------------------------------------------------------------------------- 1 | A very simple SVG exporter based on the PDF Export library that ships with Processing. Uses Batik's [SVG Generator](http://xmlgraphics.apache.org/batik/using/svg-generator.html). 2 | -------------------------------------------------------------------------------- /java/libraries/svg/library.properties: -------------------------------------------------------------------------------- 1 | name = SVG Export 2 | version = 1 3 | -------------------------------------------------------------------------------- /java/libraries/svg/library/.gitignore: -------------------------------------------------------------------------------- 1 | svg.jar 2 | -------------------------------------------------------------------------------- /java/libraries/svg/processing4-svg.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /java/libraries/svg/src/WriteSVG.java: -------------------------------------------------------------------------------- 1 | import processing.core.PApplet; 2 | 3 | 4 | // TODO This is code for testing; remove before final release 5 | 6 | public class WriteSVG extends PApplet { 7 | 8 | // public String sketchRenderer() { 9 | // return "processing.svg.PGraphicsSVG"; 10 | // } 11 | 12 | 13 | // public String sketchOutputPath() { 14 | // return "/Users/fry/Desktop/frame-####.svg"; 15 | // } 16 | 17 | 18 | public void settings() { 19 | size(600, 400, SVG, desktopPath("frame-####.svg")); 20 | // frameRate(1); 21 | } 22 | 23 | public void draw() { 24 | background(random(255)); 25 | stroke(random(255)); 26 | strokeWeight(20); 27 | line(random(width), random(height), random(width), random(height)); 28 | if (frameCount == 5) exit(); 29 | // exit(); 30 | } 31 | 32 | static public void main(String[] args) { 33 | PApplet.main(new String[] { "WriteSVG" }); 34 | } 35 | } -------------------------------------------------------------------------------- /java/mode/.gitignore: -------------------------------------------------------------------------------- 1 | JavaMode.jar 2 | org.eclipse.lsp4j.jar 3 | org.eclipse.lsp4j.jsonrpc.jar 4 | gson.jar 5 | 6 | -------------------------------------------------------------------------------- /java/mode/antlr-4.7.2-complete.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/mode/antlr-4.7.2-complete.jar -------------------------------------------------------------------------------- /java/mode/antlr-src.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/mode/antlr-src.zip -------------------------------------------------------------------------------- /java/mode/antlr.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/mode/antlr.jar -------------------------------------------------------------------------------- /java/mode/classpath-explorer-1.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/mode/classpath-explorer-1.0.jar -------------------------------------------------------------------------------- /java/mode/com.ibm.icu.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/mode/com.ibm.icu.jar -------------------------------------------------------------------------------- /java/mode/jdtCompilerAdapter.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/mode/jdtCompilerAdapter.jar -------------------------------------------------------------------------------- /java/mode/jsoup-1.7.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/mode/jsoup-1.7.1.jar -------------------------------------------------------------------------------- /java/mode/org.eclipse.core.contenttype.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/mode/org.eclipse.core.contenttype.jar -------------------------------------------------------------------------------- /java/mode/org.eclipse.core.jobs.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/mode/org.eclipse.core.jobs.jar -------------------------------------------------------------------------------- /java/mode/org.eclipse.core.resources.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/mode/org.eclipse.core.resources.jar -------------------------------------------------------------------------------- /java/mode/org.eclipse.core.runtime.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/mode/org.eclipse.core.runtime.jar -------------------------------------------------------------------------------- /java/mode/org.eclipse.equinox.common.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/mode/org.eclipse.equinox.common.jar -------------------------------------------------------------------------------- /java/mode/org.eclipse.equinox.preferences.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/mode/org.eclipse.equinox.preferences.jar -------------------------------------------------------------------------------- /java/mode/org.eclipse.jdt.compiler.apt.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/mode/org.eclipse.jdt.compiler.apt.jar -------------------------------------------------------------------------------- /java/mode/org.eclipse.jdt.core.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/mode/org.eclipse.jdt.core.jar -------------------------------------------------------------------------------- /java/mode/org.eclipse.osgi.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/mode/org.eclipse.osgi.jar -------------------------------------------------------------------------------- /java/mode/org.eclipse.text.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/mode/org.eclipse.text.jar -------------------------------------------------------------------------------- /java/mode/org.netbeans.swing.outline.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/mode/org.netbeans.swing.outline.jar -------------------------------------------------------------------------------- /java/src/processing/mode/java/SketchInterval.java: -------------------------------------------------------------------------------- 1 | package processing.mode.java; 2 | 3 | public class SketchInterval { 4 | 5 | public static final SketchInterval BEFORE_START = new SketchInterval(-1, -1, -1, -1, -1); 6 | 7 | SketchInterval(int tabIndex, 8 | int startTabOffset, int stopTabOffset, 9 | int startPdeOffset, int stopPdeOffset) { 10 | this.tabIndex = tabIndex; 11 | this.startTabOffset = startTabOffset; 12 | this.stopTabOffset = stopTabOffset; 13 | this.startPdeOffset = startPdeOffset; 14 | this.stopPdeOffset = stopPdeOffset; 15 | } 16 | 17 | public final int tabIndex; 18 | public final int startTabOffset; 19 | public final int stopTabOffset; 20 | 21 | public final int startPdeOffset; 22 | public final int stopPdeOffset; 23 | } -------------------------------------------------------------------------------- /java/src/processing/mode/java/preproc/.cvsignore: -------------------------------------------------------------------------------- 1 | *Lexer.java 2 | *Recognizer.java 3 | *TokenTypes.java 4 | *TokenTypes.txt 5 | *TreeParser.java 6 | *TreeParserTokenTypes.java 7 | *TreeParserTokenTypes.txt 8 | expanded*.g 9 | 10 | -------------------------------------------------------------------------------- /java/test/lib/hamcrest-core-1.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/test/lib/hamcrest-core-1.3.jar -------------------------------------------------------------------------------- /java/test/lib/junit-4.13.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benfry/processing4/6a2cf8cda35552c62a1a794bb1e20f43fe8ffcda/java/test/lib/junit-4.13.2.jar -------------------------------------------------------------------------------- /java/test/processing/mode/java/SourceUtilTest.java: -------------------------------------------------------------------------------- 1 | package processing.mode.java; 2 | 3 | import org.junit.Assert; 4 | import org.junit.Test; 5 | 6 | 7 | public class SourceUtilTest { 8 | 9 | @Test 10 | public void getCountPresent() { 11 | String input = "test1,test2\n,test3"; 12 | int count = SourceUtil.getCount(input, ","); 13 | Assert.assertEquals(2, count); 14 | } 15 | 16 | @Test 17 | public void getCountNotPresent() { 18 | String input = "test1 test2 test3"; 19 | int count = SourceUtil.getCount(input, ","); 20 | Assert.assertEquals(0, count); 21 | } 22 | 23 | } -------------------------------------------------------------------------------- /java/test/processing/mode/java/preproc/MessageSimplifierUtilTest.java: -------------------------------------------------------------------------------- 1 | package processing.mode.java.preproc; 2 | 3 | import org.junit.Assert; 4 | import org.junit.Test; 5 | import processing.mode.java.preproc.PreprocessIssueMessageSimplifier; 6 | 7 | public class MessageSimplifierUtilTest { 8 | 9 | @Test 10 | public void getOffendingAreaMatch() { 11 | String input = "no viable alternative at input 'ellipse(\n\nellipse();'"; 12 | String output = PreprocessIssueMessageSimplifier.getOffendingArea(input); 13 | Assert.assertEquals("ellipse();", output); 14 | } 15 | 16 | @Test 17 | public void getOffendingAreaNoMatch() { 18 | String input = "ambig at input 'ellipse(\n\nellipse();'"; 19 | String output = PreprocessIssueMessageSimplifier.getOffendingArea(input); 20 | Assert.assertEquals("ambig at input 'ellipse(\n\nellipse();'", output); 21 | } 22 | 23 | } -------------------------------------------------------------------------------- /java/test/resources/annotations.pde: -------------------------------------------------------------------------------- 1 | import java.io.Serializable; 2 | 3 | void setup() { 4 | size(200,200); 5 | } 6 | 7 | @Deprecated 8 | public void banana() { 9 | println("hey"); 10 | } 11 | 12 | @SuppressWarnings({"serial", "rawtypes"}) 13 | class Banana implements Serializable { 14 | 15 | } 16 | 17 | @SuppressWarnings("serial") 18 | class Apple implements Serializable { 19 | 20 | } 21 | 22 | @javax.annotation.processing.Generated(value = {"com.mrfeinberg.ImmortalAroma" 23 | }, 24 | comments="Shazam!", 25 | date="2001-07-04T12:08:56.235-0700") 26 | class Pear {} -------------------------------------------------------------------------------- /java/test/resources/bug1064.expected: -------------------------------------------------------------------------------- 1 | import processing.core.*; 2 | import processing.data.*; 3 | import processing.event.*; 4 | import processing.opengl.*; 5 | 6 | import java.util.HashMap; 7 | import java.util.ArrayList; 8 | import java.io.File; 9 | import java.io.BufferedReader; 10 | import java.io.PrintWriter; 11 | import java.io.InputStream; 12 | import java.io.OutputStream; 13 | import java.io.IOException; 14 | 15 | public class bug1064 extends PApplet { 16 | 17 | public void setup() { 18 | // import "; 19 | noLoop(); 20 | } 21 | 22 | static public void main(String[] passedArgs) { 23 | String[] appletArgs = new String[] { "bug1064" }; 24 | if (passedArgs != null) { 25 | PApplet.main(concat(appletArgs, passedArgs)); 26 | } else { 27 | PApplet.main(appletArgs); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /java/test/resources/bug1064.pde: -------------------------------------------------------------------------------- 1 | // import "; -------------------------------------------------------------------------------- /java/test/resources/bug109.expected: -------------------------------------------------------------------------------- 1 | class Bug { 2 | Bug() { 3 | w = random(size)/3)+10; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /java/test/resources/bug109.pde: -------------------------------------------------------------------------------- 1 | class Bug{ 2 | Bug(){ 3 | w = random(size)/3)+10; 4 | }} -------------------------------------------------------------------------------- /java/test/resources/bug1145.pde: -------------------------------------------------------------------------------- 1 | import processing; 2 | -------------------------------------------------------------------------------- /java/test/resources/bug136.pde: -------------------------------------------------------------------------------- 1 | import java.util.Collections; 2 | java.util.List alist = Collections.synchronizedList(new ArrayList()); 3 | 4 | void setup() { 5 | size(400, 200); 6 | alist.add("hello"); 7 | } 8 | 9 | void draw() { 10 | rect(width/4, height/4, width/2, height/2); 11 | synchronized(alist) { 12 | alist.get(0); 13 | } 14 | } -------------------------------------------------------------------------------- /java/test/resources/bug1362.expected: -------------------------------------------------------------------------------- 1 | import processing.core.*; 2 | import processing.data.*; 3 | import processing.event.*; 4 | import processing.opengl.*; 5 | 6 | import java.util.HashMap; 7 | import java.util.ArrayList; 8 | import java.io.File; 9 | import java.io.BufferedReader; 10 | import java.io.PrintWriter; 11 | import java.io.InputStream; 12 | import java.io.OutputStream; 13 | import java.io.IOException; 14 | 15 | public class bug1362 extends PApplet { 16 | 17 | public void setup() { 18 | if (true) {} else { new String(); } 19 | noLoop(); 20 | } 21 | 22 | static public void main(String[] passedArgs) { 23 | String[] appletArgs = new String[] { "bug1362" }; 24 | if (passedArgs != null) { 25 | PApplet.main(concat(appletArgs, passedArgs)); 26 | } else { 27 | PApplet.main(appletArgs); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /java/test/resources/bug1362.pde: -------------------------------------------------------------------------------- 1 | if (true) {} else { new String(); } -------------------------------------------------------------------------------- /java/test/resources/bug1390.pde: -------------------------------------------------------------------------------- 1 | import java.lang.*; 2 | 3 | enum Operation { 4 | @Deprecated ADD_10(10) { protected int apply(int x) { return x + y; } }, 5 | MULT_5(5) { protected int apply(int x) { return x * y; } }, 6 | @SuppressWarnings("serial") DIV_10(10) { protected int apply(int x) { return x / y; } }, 7 | SUB_8(8) { protected int apply(int x) { return x - y; } }; 8 | 9 | final int y; 10 | 11 | Operation(int y) { 12 | this.y = y; 13 | } 14 | 15 | protected abstract int apply(int x); 16 | } 17 | 18 | Operation operation = Operation.ADD_10; 19 | 20 | void setup() { 21 | int x = 10; 22 | println("Original:", x); 23 | for (Operation op : Operation.values()) { 24 | x = op.apply(x); 25 | println(op.toString(), x); 26 | } 27 | x = operation.apply(x); 28 | println(operation.toString(), x); 29 | } 30 | -------------------------------------------------------------------------------- /java/test/resources/bug1442.expected: -------------------------------------------------------------------------------- 1 | import processing.core.*; 2 | import processing.data.*; 3 | import processing.event.*; 4 | import processing.opengl.*; 5 | 6 | import java.util.HashMap; 7 | import java.util.ArrayList; 8 | import java.io.File; 9 | import java.io.BufferedReader; 10 | import java.io.PrintWriter; 11 | import java.io.InputStream; 12 | import java.io.OutputStream; 13 | import java.io.IOException; 14 | 15 | public class bug1442 extends PApplet { 16 | 17 | public float a() { 18 | return 1.0f; 19 | } 20 | 21 | static public void main(String[] passedArgs) { 22 | String[] appletArgs = new String[] { "bug1442" }; 23 | if (passedArgs != null) { 24 | PApplet.main(concat(appletArgs, passedArgs)); 25 | } else { 26 | PApplet.main(appletArgs); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /java/test/resources/bug1442.pde: -------------------------------------------------------------------------------- 1 | float a() { 2 | return 1.0; 3 | } -------------------------------------------------------------------------------- /java/test/resources/bug1511.expected: -------------------------------------------------------------------------------- 1 | import processing.core.*; 2 | import processing.data.*; 3 | import processing.event.*; 4 | import processing.opengl.*; 5 | 6 | import java.io.StringWriter; 7 | 8 | import java.util.HashMap; 9 | import java.util.ArrayList; 10 | import java.io.File; 11 | import java.io.BufferedReader; 12 | import java.io.PrintWriter; 13 | import java.io.InputStream; 14 | import java.io.OutputStream; 15 | import java.io.IOException; 16 | 17 | public class bug1511 extends PApplet { 18 | 19 | public void setup() { 20 | // \u00df 21 | 22 | /** 23 | * a 24 | */ 25 | 26 | 27 | noLoop(); 28 | } 29 | 30 | static public void main(String[] passedArgs) { 31 | String[] appletArgs = new String[] { "bug1511" }; 32 | if (passedArgs != null) { 33 | PApplet.main(concat(appletArgs, passedArgs)); 34 | } else { 35 | PApplet.main(appletArgs); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /java/test/resources/bug1511.pde: -------------------------------------------------------------------------------- 1 | // ß 2 | 3 | /** 4 | * a 5 | */ 6 | 7 | import java.io.StringWriter; -------------------------------------------------------------------------------- /java/test/resources/bug1512.expected: -------------------------------------------------------------------------------- 1 | import processing.core.*; 2 | import processing.data.*; 3 | import processing.event.*; 4 | import processing.opengl.*; 5 | 6 | import java.util.HashMap; 7 | import java.util.ArrayList; 8 | import java.io.File; 9 | import java.io.BufferedReader; 10 | import java.io.PrintWriter; 11 | import java.io.InputStream; 12 | import java.io.OutputStream; 13 | import java.io.IOException; 14 | 15 | public class bug1512 extends PApplet { 16 | 17 | public void setup() { 18 | println("oi/*"); 19 | noLoop(); 20 | } 21 | 22 | static public void main(String[] passedArgs) { 23 | String[] appletArgs = new String[] { "bug1512" }; 24 | if (passedArgs != null) { 25 | PApplet.main(concat(appletArgs, passedArgs)); 26 | } else { 27 | PApplet.main(appletArgs); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /java/test/resources/bug1512.pde: -------------------------------------------------------------------------------- 1 | println("oi/*"); -------------------------------------------------------------------------------- /java/test/resources/bug1514a.pde: -------------------------------------------------------------------------------- 1 | //----- èééèèéééàééèé''ééé 2 | //---------------------------------------------------------------- 3 | //--- IMPORTS 4 | //---------------------------------------------------------------- 5 | import java.io.StringWriter; -------------------------------------------------------------------------------- /java/test/resources/bug1514b.pde: -------------------------------------------------------------------------------- 1 | //----- èééèèéééàééèé''éé 2 | //---------------------------------------------------------------- 3 | //--- IMPORTS 4 | //---------------------------------------------------------------- 5 | import java.io.StringWriter; 6 | -------------------------------------------------------------------------------- /java/test/resources/bug1515.expected: -------------------------------------------------------------------------------- 1 | import processing.core.*; 2 | import processing.data.*; 3 | import processing.event.*; 4 | import processing.opengl.*; 5 | 6 | import java.util.HashMap; 7 | import java.util.ArrayList; 8 | import java.io.File; 9 | import java.io.BufferedReader; 10 | import java.io.PrintWriter; 11 | import java.io.InputStream; 12 | import java.io.OutputStream; 13 | import java.io.IOException; 14 | 15 | public class bug1515 extends PApplet { 16 | 17 | // a class definition that does something with things that extend PApplet 18 | class Heythere{ 19 | } 20 | 21 | // method definition which can do things with papplet 22 | public void doSomething( T thing ){ 23 | } 24 | 25 | static public void main(String[] passedArgs) { 26 | String[] appletArgs = new String[] { "bug1515" }; 27 | if (passedArgs != null) { 28 | PApplet.main(concat(appletArgs, passedArgs)); 29 | } else { 30 | PApplet.main(appletArgs); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /java/test/resources/bug1515.pde: -------------------------------------------------------------------------------- 1 | // a class definition that does something with things that extend PApplet 2 | class Heythere{ 3 | } 4 | 5 | // method definition which can do things with papplet 6 | public void doSomething( T thing ){ 7 | } -------------------------------------------------------------------------------- /java/test/resources/bug1516.pde: -------------------------------------------------------------------------------- 1 | import java.util.ArrayList; 2 | import java.util.List; 3 | import java.util.Collections; 4 | import java.util.Comparator; 5 | 6 | void setup() 7 | { 8 | List list = new ArrayList(); 9 | list.add("foo"); 10 | list.add("bar"); 11 | list.add("baz"); 12 | 13 | Comparator comparator = new Comparator() 14 | { 15 | public int compare(final String value0, final String value1) 16 | { 17 | return value0.compareTo(value1); 18 | } 19 | }; 20 | 21 | Collections.sort(list, comparator); 22 | } -------------------------------------------------------------------------------- /java/test/resources/bug1517.pde: -------------------------------------------------------------------------------- 1 | import java.util.ArrayList; 2 | import java.util.List; 3 | import java.util.Collections; 4 | import java.util.Comparator; 5 | 6 | Comparator comparator = new Comparator() 7 | { 8 | public int compare(final String value0, final String value1) 9 | { 10 | return value0.compareTo(value1); 11 | } 12 | }; 13 | 14 | void setup() 15 | { 16 | List list = new ArrayList(); 17 | list.add("foo"); 18 | list.add("bar"); 19 | list.add("baz"); 20 | 21 | Collections.sort(list, comparator); 22 | } -------------------------------------------------------------------------------- /java/test/resources/bug1518a.pde: -------------------------------------------------------------------------------- 1 | import java.util.ArrayList; 2 | import java.util.List; 3 | 4 | void setup() 5 | { 6 | List list = new ArrayList(); 7 | list.add("foo"); 8 | list.add("bar"); 9 | list.add("baz"); 10 | 11 | binarySearch(list, "bar"); 12 | } 13 | 14 | static int binarySearch(List> list, T 15 | key) { 16 | return 0; 17 | } -------------------------------------------------------------------------------- /java/test/resources/bug1518b.pde: -------------------------------------------------------------------------------- 1 | import java.util.ArrayList; 2 | import java.util.List; 3 | 4 | void setup() 5 | { 6 | List list = new ArrayList(); 7 | list.add("foo"); 8 | list.add("bar"); 9 | list.add("baz"); 10 | } 11 | 12 | static int binarySearch(List> list, T 13 | key) { 14 | return 0; 15 | } -------------------------------------------------------------------------------- /java/test/resources/bug1525.expected: -------------------------------------------------------------------------------- 1 | import processing.core.*; 2 | import processing.data.*; 3 | import processing.event.*; 4 | import processing.opengl.*; 5 | 6 | import java.util.HashMap; 7 | import java.util.ArrayList; 8 | import java.io.File; 9 | import java.io.BufferedReader; 10 | import java.io.PrintWriter; 11 | import java.io.InputStream; 12 | import java.io.OutputStream; 13 | import java.io.IOException; 14 | 15 | public class bug1525 extends PApplet { 16 | 17 | public void setup() { 18 | if (frameCount > (frameRate - 1)) { 19 | println("My head asplode!"); 20 | } 21 | noLoop(); 22 | } 23 | 24 | static public void main(String[] passedArgs) { 25 | String[] appletArgs = new String[] { "bug1525" }; 26 | if (passedArgs != null) { 27 | PApplet.main(concat(appletArgs, passedArgs)); 28 | } else { 29 | PApplet.main(appletArgs); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /java/test/resources/bug1525.pde: -------------------------------------------------------------------------------- 1 | if (frameCount > (frameRate - 1)) { 2 | println("My head asplode!"); 3 | } -------------------------------------------------------------------------------- /java/test/resources/bug1534.expected: -------------------------------------------------------------------------------- 1 | import processing.core.*; 2 | import processing.data.*; 3 | import processing.event.*; 4 | import processing.opengl.*; 5 | 6 | import java.util.HashMap; 7 | import java.util.ArrayList; 8 | import java.io.File; 9 | import java.io.BufferedReader; 10 | import java.io.PrintWriter; 11 | import java.io.InputStream; 12 | import java.io.OutputStream; 13 | import java.io.IOException; 14 | 15 | public class bug1534 extends PApplet { 16 | 17 | public void setup() { 18 | char c = '\"'; 19 | noLoop(); 20 | } 21 | 22 | static public void main(String[] passedArgs) { 23 | String[] appletArgs = new String[] { "bug1534" }; 24 | if (passedArgs != null) { 25 | PApplet.main(concat(appletArgs, passedArgs)); 26 | } else { 27 | PApplet.main(appletArgs); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /java/test/resources/bug1534.pde: -------------------------------------------------------------------------------- 1 | char c = '\"'; -------------------------------------------------------------------------------- /java/test/resources/bug16.pde: -------------------------------------------------------------------------------- 1 | println("Here comes an unterminated comment!"); 2 | 3 | /* 4 | banana 5 | apple 6 | pear 7 | * / 8 | 9 | println("Do you see what I did there?"); 10 | -------------------------------------------------------------------------------- /java/test/resources/bug1936.expected: -------------------------------------------------------------------------------- 1 | import processing.core.*; 2 | import processing.data.*; 3 | import processing.event.*; 4 | import processing.opengl.*; 5 | 6 | import java.util.HashMap; 7 | import java.util.ArrayList; 8 | import java.io.File; 9 | import java.io.BufferedReader; 10 | import java.io.PrintWriter; 11 | import java.io.InputStream; 12 | import java.io.OutputStream; 13 | import java.io.IOException; 14 | 15 | public class bug1936 extends PApplet { 16 | 17 | public void setup() { 18 | char a = PApplet.parseChar(PApplet.parseByte(PApplet.parseInt("15"))); 19 | noLoop(); 20 | } 21 | 22 | static public void main(String[] passedArgs) { 23 | String[] appletArgs = new String[] { "bug1936" }; 24 | if (passedArgs != null) { 25 | PApplet.main(concat(appletArgs, passedArgs)); 26 | } else { 27 | PApplet.main(appletArgs); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /java/test/resources/bug1936.pde: -------------------------------------------------------------------------------- 1 | char a = char(byte(int("15"))); -------------------------------------------------------------------------------- /java/test/resources/bug196.pde: -------------------------------------------------------------------------------- 1 | int a; 2 | void setup() 3 | { 4 | a = #FF000; 5 | } -------------------------------------------------------------------------------- /java/test/resources/bug281.expected: -------------------------------------------------------------------------------- 1 | import processing.core.*; 2 | import processing.data.*; 3 | import processing.event.*; 4 | import processing.opengl.*; 5 | 6 | import java.util.HashMap; 7 | import java.util.ArrayList; 8 | import java.io.File; 9 | import java.io.BufferedReader; 10 | import java.io.PrintWriter; 11 | import java.io.InputStream; 12 | import java.io.OutputStream; 13 | import java.io.IOException; 14 | 15 | public class bug281 extends PApplet { 16 | 17 | public void setup() { 18 | if ( "monopoly".charAt( 3 ) == '(' ) 19 | { 20 | println("parcheesi"); 21 | } 22 | noLoop(); 23 | } 24 | 25 | static public void main(String[] passedArgs) { 26 | String[] appletArgs = new String[] { "bug281" }; 27 | if (passedArgs != null) { 28 | PApplet.main(concat(appletArgs, passedArgs)); 29 | } else { 30 | PApplet.main(appletArgs); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /java/test/resources/bug281.pde: -------------------------------------------------------------------------------- 1 | if ( "monopoly".charAt( 3 ) == '(' ) 2 | { 3 | println("parcheesi"); 4 | } 5 | -------------------------------------------------------------------------------- /java/test/resources/bug315g.pde: -------------------------------------------------------------------------------- 1 | size(480, 120); 2 | smooth(); 3 | int y; 4 | y = 60; 5 | int d; 6 | d = 80; 7 | ellipse(75, y, d, d); 8 | -------------------------------------------------------------------------------- /java/test/resources/bug4.expected: -------------------------------------------------------------------------------- 1 | import processing.core.*; 2 | import processing.data.*; 3 | import processing.event.*; 4 | import processing.opengl.*; 5 | 6 | import java.util.HashMap; 7 | import java.util.ArrayList; 8 | import java.io.File; 9 | import java.io.BufferedReader; 10 | import java.io.PrintWriter; 11 | import java.io.InputStream; 12 | import java.io.OutputStream; 13 | import java.io.IOException; 14 | 15 | public class bug4 extends PApplet { 16 | 17 | public void setup() { 18 | int x = 12; 19 | float u = (PApplet.parseFloat(x)/width); 20 | /* size commented out by preprocessor */; 21 | 22 | noLoop(); 23 | } 24 | 25 | public void settings() { size(100,100); } 26 | 27 | static public void main(String[] passedArgs) { 28 | String[] appletArgs = new String[] { "bug4" }; 29 | if (passedArgs != null) { 30 | PApplet.main(concat(appletArgs, passedArgs)); 31 | } else { 32 | PApplet.main(appletArgs); 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /java/test/resources/bug4.pde: -------------------------------------------------------------------------------- 1 | int x = 12; 2 | float u = (float(x)/width); 3 | size(100, /** test **/ 100); -------------------------------------------------------------------------------- /java/test/resources/bug400g.expected: -------------------------------------------------------------------------------- 1 | import processing.core.*; 2 | import processing.data.*; 3 | import processing.event.*; 4 | import processing.opengl.*; 5 | 6 | import java.util.HashMap; 7 | import java.util.ArrayList; 8 | import java.io.File; 9 | import java.io.BufferedReader; 10 | import java.io.PrintWriter; 11 | import java.io.InputStream; 12 | import java.io.OutputStream; 13 | import java.io.IOException; 14 | 15 | public class bug400g extends PApplet { 16 | 17 | //// 18 | public void settings() { size(480,120); } 19 | 20 | public void setup(){ 21 | if(true){ 22 | } 23 | else{ // Syntax error on token "else", } expected 24 | } 25 | } 26 | 27 | static public void main(String[] passedArgs) { 28 | String[] appletArgs = new String[] { "bug400g" }; 29 | if (passedArgs != null) { 30 | PApplet.main(concat(appletArgs, passedArgs)); 31 | } else { 32 | PApplet.main(appletArgs); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /java/test/resources/bug400g.pde: -------------------------------------------------------------------------------- 1 | //// 2 | public void settings() { size(480,120); } 3 | 4 | void setup(){ 5 | if(true){ 6 | } 7 | else{ // Syntax error on token "else", } expected 8 | } 9 | } -------------------------------------------------------------------------------- /java/test/resources/bug405.expected: -------------------------------------------------------------------------------- 1 | for (int i : new int[] {1, 2, 3}) { 2 | println(i); 3 | } 4 | -------------------------------------------------------------------------------- /java/test/resources/bug405.pde: -------------------------------------------------------------------------------- 1 | for(int i : new int[] {1,2,3}) { 2 | println(i); 3 | } -------------------------------------------------------------------------------- /java/test/resources/bug420.expected: -------------------------------------------------------------------------------- 1 | int[] a = new int[] { 1, 2, 3, 4, 5 }; 2 | for (int i : a) { 3 | print(i); 4 | } 5 | -------------------------------------------------------------------------------- /java/test/resources/bug420.pde: -------------------------------------------------------------------------------- 1 | int[] a = new int[] { 1,2,3,4,5 }; 2 | for (int i: a) { print(i);} 3 | -------------------------------------------------------------------------------- /java/test/resources/bug427g.expected: -------------------------------------------------------------------------------- 1 | import processing.core.*; 2 | import processing.data.*; 3 | import processing.event.*; 4 | import processing.opengl.*; 5 | 6 | import java.util.HashMap; 7 | import java.util.ArrayList; 8 | import java.io.File; 9 | import java.io.BufferedReader; 10 | import java.io.PrintWriter; 11 | import java.io.InputStream; 12 | import java.io.OutputStream; 13 | import java.io.IOException; 14 | 15 | public class bug427g extends PApplet { 16 | 17 | static final boolean DEBUG = true; 18 | 19 | public void setup() { 20 | MyClass x = new MyClass(); 21 | } 22 | 23 | public class MyClass { 24 | public MyClass() { 25 | if (DEBUG) println("Debug"); 26 | } 27 | } 28 | 29 | static public void main(String[] passedArgs) { 30 | String[] appletArgs = new String[] { "bug427g" }; 31 | if (passedArgs != null) { 32 | PApplet.main(concat(appletArgs, passedArgs)); 33 | } else { 34 | PApplet.main(appletArgs); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /java/test/resources/bug427g.pde: -------------------------------------------------------------------------------- 1 | static final boolean DEBUG = true; 2 | 3 | void setup() { 4 | MyClass x = new MyClass(); 5 | } 6 | 7 | public class MyClass { 8 | public MyClass() { 9 | if (DEBUG) println("Debug"); 10 | } 11 | } 12 | 13 | 14 | -------------------------------------------------------------------------------- /java/test/resources/bug481.expected: -------------------------------------------------------------------------------- 1 | import processing.core.*; 2 | import processing.data.*; 3 | import processing.event.*; 4 | import processing.opengl.*; 5 | 6 | import java.applet.Applet; 7 | 8 | import java.util.HashMap; 9 | import java.util.ArrayList; 10 | import java.io.File; 11 | import java.io.BufferedReader; 12 | import java.io.PrintWriter; 13 | import java.io.InputStream; 14 | import java.io.OutputStream; 15 | import java.io.IOException; 16 | 17 | public class bug481 extends PApplet { 18 | 19 | public void setup() { 20 | 21 | Class[] abc = new Class[]{Applet.class}; 22 | noLoop(); 23 | } 24 | 25 | static public void main(String[] passedArgs) { 26 | String[] appletArgs = new String[] { "bug481" }; 27 | if (passedArgs != null) { 28 | PApplet.main(concat(appletArgs, passedArgs)); 29 | } else { 30 | PApplet.main(appletArgs); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /java/test/resources/bug481.pde: -------------------------------------------------------------------------------- 1 | import java.applet.Applet; 2 | Class[] abc = new Class[]{Applet.class}; -------------------------------------------------------------------------------- /java/test/resources/bug507.pde: -------------------------------------------------------------------------------- 1 | void setup() { 2 | if (1 == 2) { 3 | println("the impossible just happened"); 4 | } 5 | } else { 6 | println("zzz"); 7 | } 8 | } -------------------------------------------------------------------------------- /java/test/resources/bug5a.expected: -------------------------------------------------------------------------------- 1 | import processing.core.*; 2 | import processing.data.*; 3 | import processing.event.*; 4 | import processing.opengl.*; 5 | 6 | import java.util.HashMap; 7 | import java.util.ArrayList; 8 | import java.io.File; 9 | import java.io.BufferedReader; 10 | import java.io.PrintWriter; 11 | import java.io.InputStream; 12 | import java.io.OutputStream; 13 | import java.io.IOException; 14 | 15 | public class bug5a extends PApplet { 16 | 17 | public void setup() { 18 | println("The next line should not cause a failure."); 19 | // no newline after me 20 | noLoop(); 21 | } 22 | 23 | static public void main(String[] passedArgs) { 24 | String[] appletArgs = new String[] { "bug5a" }; 25 | if (passedArgs != null) { 26 | PApplet.main(concat(appletArgs, passedArgs)); 27 | } else { 28 | PApplet.main(appletArgs); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /java/test/resources/bug5a.pde: -------------------------------------------------------------------------------- 1 | println("The next line should not cause a failure."); 2 | // no newline after me -------------------------------------------------------------------------------- /java/test/resources/bug5b.expected: -------------------------------------------------------------------------------- 1 | import processing.core.*; 2 | import processing.data.*; 3 | import processing.event.*; 4 | import processing.opengl.*; 5 | 6 | import java.util.HashMap; 7 | import java.util.ArrayList; 8 | import java.io.File; 9 | import java.io.BufferedReader; 10 | import java.io.PrintWriter; 11 | import java.io.InputStream; 12 | import java.io.OutputStream; 13 | import java.io.IOException; 14 | 15 | public class bug5b extends PApplet { 16 | 17 | public void setup() { 18 | println("The next line should not cause a failure."); 19 | /* no newline after me */ 20 | noLoop(); 21 | } 22 | 23 | static public void main(String[] passedArgs) { 24 | String[] appletArgs = new String[] { "bug5b" }; 25 | if (passedArgs != null) { 26 | PApplet.main(concat(appletArgs, passedArgs)); 27 | } else { 28 | PApplet.main(appletArgs); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /java/test/resources/bug5b.pde: -------------------------------------------------------------------------------- 1 | println("The next line should not cause a failure."); 2 | /* no newline after me */ -------------------------------------------------------------------------------- /java/test/resources/bug6.pde: -------------------------------------------------------------------------------- 1 | println("hello");/println("world"); -------------------------------------------------------------------------------- /java/test/resources/bug631.expected: -------------------------------------------------------------------------------- 1 | import processing.core.*; 2 | import processing.data.*; 3 | import processing.event.*; 4 | import processing.opengl.*; 5 | 6 | import java.util.HashMap; 7 | import java.util.ArrayList; 8 | import java.io.File; 9 | import java.io.BufferedReader; 10 | import java.io.PrintWriter; 11 | import java.io.InputStream; 12 | import java.io.OutputStream; 13 | import java.io.IOException; 14 | 15 | public class bug631 extends PApplet { 16 | 17 | public void setup() { 18 | firstLoop: 19 | for (int i = 0; i < 10; i++) { 20 | for (int j = 0; j < 10; j++) { 21 | if ((i+j) % 5 != 0) continue firstLoop; 22 | System.out.println(i + " " + j); 23 | } 24 | } 25 | noLoop(); 26 | } 27 | 28 | static public void main(String[] passedArgs) { 29 | String[] appletArgs = new String[] { "bug631" }; 30 | if (passedArgs != null) { 31 | PApplet.main(concat(appletArgs, passedArgs)); 32 | } else { 33 | PApplet.main(appletArgs); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /java/test/resources/bug631.pde: -------------------------------------------------------------------------------- 1 | firstLoop: 2 | for (int i = 0; i < 10; i++) { 3 | for (int j = 0; j < 10; j++) { 4 | if ((i+j) % 5 != 0) continue firstLoop; 5 | System.out.println(i + " " + j); 6 | } 7 | } -------------------------------------------------------------------------------- /java/test/resources/bug763.pde: -------------------------------------------------------------------------------- 1 | void setup() 2 | { 3 | } 4 | 5 | void draw() 6 | { 7 | println("i am a bug...); 8 | } -------------------------------------------------------------------------------- /java/test/resources/bug820.pde: -------------------------------------------------------------------------------- 1 | float x1 = 0; 2 | float x1 = 2; 3 | -------------------------------------------------------------------------------- /java/test/resources/charspecial.expected: -------------------------------------------------------------------------------- 1 | import processing.core.*; 2 | import processing.data.*; 3 | import processing.event.*; 4 | import processing.opengl.*; 5 | 6 | import java.util.HashMap; 7 | import java.util.ArrayList; 8 | import java.io.File; 9 | import java.io.BufferedReader; 10 | import java.io.PrintWriter; 11 | import java.io.InputStream; 12 | import java.io.OutputStream; 13 | import java.io.IOException; 14 | 15 | public class charspecial extends PApplet { 16 | 17 | public void setup() { 18 | char x = '\n'; 19 | println(x); 20 | 21 | noLoop(); 22 | } 23 | 24 | static public void main(String[] passedArgs) { 25 | String[] appletArgs = new String[] { "charspecial" }; 26 | if (passedArgs != null) { 27 | PApplet.main(concat(appletArgs, passedArgs)); 28 | } else { 29 | PApplet.main(appletArgs); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /java/test/resources/charspecial.pde: -------------------------------------------------------------------------------- 1 | char x = '\n'; 2 | println(x); -------------------------------------------------------------------------------- /java/test/resources/classinstatic.pde: -------------------------------------------------------------------------------- 1 | class Test { 2 | 3 | int getInt() { return 5; } 4 | String toString() {return "test";} 5 | 6 | } 7 | 8 | 9 | Test t = new Test(); 10 | println(t.getInt()); 11 | println(t.toString()); -------------------------------------------------------------------------------- /java/test/resources/color.expected: -------------------------------------------------------------------------------- 1 | import processing.core.*; 2 | import processing.data.*; 3 | import processing.event.*; 4 | import processing.opengl.*; 5 | 6 | import java.util.HashMap; 7 | import java.util.ArrayList; 8 | import java.io.File; 9 | import java.io.BufferedReader; 10 | import java.io.PrintWriter; 11 | import java.io.InputStream; 12 | import java.io.OutputStream; 13 | import java.io.IOException; 14 | 15 | public class color extends PApplet { 16 | 17 | public void setup() { 18 | boolean test = true; 19 | int c1 = color(255, 255, 255); 20 | int c2 = test ? 0xFFA011CD : 0xC0C0C0C0; 21 | noLoop(); 22 | } 23 | 24 | static public void main(String[] passedArgs) { 25 | String[] appletArgs = new String[] { "color" }; 26 | if (passedArgs != null) { 27 | PApplet.main(concat(appletArgs, passedArgs)); 28 | } else { 29 | PApplet.main(appletArgs); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /java/test/resources/color.pde: -------------------------------------------------------------------------------- 1 | boolean test = true; 2 | color c1 = color(255, 255, 255); 3 | color c2 = test ? #A011CD : #C0C0C0C0; -------------------------------------------------------------------------------- /java/test/resources/colorimport.expected: -------------------------------------------------------------------------------- 1 | import processing.core.*; 2 | import processing.data.*; 3 | import processing.event.*; 4 | import processing.opengl.*; 5 | 6 | import test.color; 7 | 8 | import java.util.HashMap; 9 | import java.util.ArrayList; 10 | import java.io.File; 11 | import java.io.BufferedReader; 12 | import java.io.PrintWriter; 13 | import java.io.InputStream; 14 | import java.io.OutputStream; 15 | import java.io.IOException; 16 | 17 | public class colorimport extends PApplet { 18 | 19 | public void setup() { 20 | 21 | 22 | boolean test = true; 23 | int c1 = color(255, 255, 255); 24 | int c2 = test ? 0xFFA011CD : 0xC0C0C0C0; 25 | 26 | noLoop(); 27 | } 28 | 29 | static public void main(String[] passedArgs) { 30 | String[] appletArgs = new String[] { "colorimport" }; 31 | if (passedArgs != null) { 32 | PApplet.main(concat(appletArgs, passedArgs)); 33 | } else { 34 | PApplet.main(appletArgs); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /java/test/resources/colorimport.pde: -------------------------------------------------------------------------------- 1 | import test.color; 2 | 3 | boolean test = true; 4 | color c1 = color(255, 255, 255); 5 | color c2 = test ? #A011CD : #C0C0C0C0; 6 | -------------------------------------------------------------------------------- /java/test/resources/colorreturn.pde: -------------------------------------------------------------------------------- 1 | public void setup() { 2 | fill(getColor()); 3 | noStroke(); 4 | size(100, 100); 5 | ellipseMode(CENTER); 6 | ellipse(50, 50, 50, 50); 7 | } 8 | 9 | color getColor() { 10 | return #333333; 11 | } 12 | 13 | public void draw() { 14 | } 15 | -------------------------------------------------------------------------------- /java/test/resources/custommain.expected: -------------------------------------------------------------------------------- 1 | import processing.core.*; 2 | import processing.data.*; 3 | import processing.event.*; 4 | import processing.opengl.*; 5 | 6 | import java.util.HashMap; 7 | import java.util.ArrayList; 8 | import java.io.File; 9 | import java.io.BufferedReader; 10 | import java.io.PrintWriter; 11 | import java.io.InputStream; 12 | import java.io.OutputStream; 13 | import java.io.IOException; 14 | 15 | public class custommain extends PApplet { 16 | 17 | public static void main(String[] argv) { 18 | 19 | System.out.println("here"); 20 | 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /java/test/resources/custommain.pde: -------------------------------------------------------------------------------- 1 | public static void main(String[] argv) { 2 | 3 | System.out.println("here"); 4 | 5 | } -------------------------------------------------------------------------------- /java/test/resources/customrootclass.expected: -------------------------------------------------------------------------------- 1 | import processing.core.*; 2 | import processing.data.*; 3 | import processing.event.*; 4 | import processing.opengl.*; 5 | 6 | import processing.core.*; 7 | import processing.data.*; 8 | import processing.event.*; 9 | import processing.opengl.*; 10 | import java.util.HashMap; 11 | import java.util.ArrayList; 12 | import java.io.File; 13 | import java.io.BufferedReader; 14 | import java.io.PrintWriter; 15 | import java.io.InputStream; 16 | import java.io.OutputStream; 17 | import java.io.IOException; 18 | 19 | import java.util.HashMap; 20 | import java.util.ArrayList; 21 | import java.io.File; 22 | import java.io.BufferedReader; 23 | import java.io.PrintWriter; 24 | import java.io.InputStream; 25 | import java.io.OutputStream; 26 | import java.io.IOException; 27 | 28 | public class CustomObj extends PApplet { 29 | 30 | public static void main(String[] argv) { 31 | 32 | System.out.println("here"); 33 | 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /java/test/resources/customrootclass.pde: -------------------------------------------------------------------------------- 1 | import processing.core.*; 2 | import processing.data.*; 3 | import processing.event.*; 4 | import processing.opengl.*; 5 | 6 | import java.util.HashMap; 7 | import java.util.ArrayList; 8 | import java.io.File; 9 | import java.io.BufferedReader; 10 | import java.io.PrintWriter; 11 | import java.io.InputStream; 12 | import java.io.OutputStream; 13 | import java.io.IOException; 14 | 15 | public class CustomObj extends PApplet { 16 | 17 | public static void main(String[] argv) { 18 | 19 | System.out.println("here"); 20 | 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /java/test/resources/expressionsize.pde: -------------------------------------------------------------------------------- 1 | import processing.pdf.*; 2 | 3 | void setup() { 4 | size(400*2, 4e2/2); 5 | } 6 | 7 | void draw() { 8 | // Draw something good here 9 | line(0, 0, width/2, height); 10 | 11 | // Exit the program 12 | println("Finished."); 13 | exit(); 14 | } 15 | -------------------------------------------------------------------------------- /java/test/resources/expressionsizemethod.pde: -------------------------------------------------------------------------------- 1 | import processing.pdf.*; 2 | 3 | int getWidth() { 4 | return 400*2; 5 | } 6 | 7 | void setup() { 8 | size(getWidth(), 400/2); 9 | } 10 | 11 | void draw() { 12 | // Draw something good here 13 | line(0, 0, width/2, height); 14 | 15 | // Exit the program 16 | println("Finished."); 17 | exit(); 18 | } 19 | -------------------------------------------------------------------------------- /java/test/resources/expressionsizevar.pde: -------------------------------------------------------------------------------- 1 | import processing.pdf.*; 2 | 3 | void setup() { 4 | int newWidth = 400*2; 5 | size(newWidth, 400/2); 6 | } 7 | 8 | void draw() { 9 | // Draw something good here 10 | line(0, 0, width/2, height); 11 | 12 | // Exit the program 13 | println("Finished."); 14 | exit(); 15 | } 16 | -------------------------------------------------------------------------------- /java/test/resources/fullscreen.expected: -------------------------------------------------------------------------------- 1 | import processing.core.*; 2 | import processing.data.*; 3 | import processing.event.*; 4 | import processing.opengl.*; 5 | 6 | import java.util.HashMap; 7 | import java.util.ArrayList; 8 | import java.io.File; 9 | import java.io.BufferedReader; 10 | import java.io.PrintWriter; 11 | import java.io.InputStream; 12 | import java.io.OutputStream; 13 | import java.io.IOException; 14 | 15 | public class fullscreen extends PApplet { 16 | 17 | public void setup() { 18 | /* size commented out by preprocessor */; 19 | 20 | noLoop(); 21 | } 22 | 23 | public void settings() { fullScreen(FX2D); } 24 | 25 | static public void main(String[] passedArgs) { 26 | String[] appletArgs = new String[] { "fullscreen" }; 27 | if (passedArgs != null) { 28 | PApplet.main(concat(appletArgs, passedArgs)); 29 | } else { 30 | PApplet.main(appletArgs); 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /java/test/resources/fullscreen.pde: -------------------------------------------------------------------------------- 1 | fullScreen(FX2D); 2 | 3 | -------------------------------------------------------------------------------- /java/test/resources/fullscreen_arg.expected: -------------------------------------------------------------------------------- 1 | import processing.core.*; 2 | import processing.data.*; 3 | import processing.event.*; 4 | import processing.opengl.*; 5 | 6 | import java.util.HashMap; 7 | import java.util.ArrayList; 8 | import java.io.File; 9 | import java.io.BufferedReader; 10 | import java.io.PrintWriter; 11 | import java.io.InputStream; 12 | import java.io.OutputStream; 13 | import java.io.IOException; 14 | 15 | public class fullscreen_arg extends PApplet { 16 | 17 | public void setup() { 18 | /* size commented out by preprocessor */; 19 | 20 | noLoop(); 21 | } 22 | 23 | public void settings() { fullScreen(FX2D, 2); } 24 | 25 | static public void main(String[] passedArgs) { 26 | String[] appletArgs = new String[] { "fullscreen_arg" }; 27 | if (passedArgs != null) { 28 | PApplet.main(concat(appletArgs, passedArgs)); 29 | } else { 30 | PApplet.main(appletArgs); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /java/test/resources/fullscreen_arg.pde: -------------------------------------------------------------------------------- 1 | fullScreen(FX2D, 2); 2 | -------------------------------------------------------------------------------- /java/test/resources/fullscreen_export.pde: -------------------------------------------------------------------------------- 1 | int x = 0; 2 | 3 | void setup() { 4 | background(0); 5 | noStroke(); 6 | fill(102); 7 | } 8 | 9 | void draw() { 10 | rect(x, height*0.2, 1, height*0.6); 11 | x = x + 2; 12 | } 13 | -------------------------------------------------------------------------------- /java/test/resources/fullscreen_noarg.expected: -------------------------------------------------------------------------------- 1 | import processing.core.*; 2 | import processing.data.*; 3 | import processing.event.*; 4 | import processing.opengl.*; 5 | 6 | import java.util.HashMap; 7 | import java.util.ArrayList; 8 | import java.io.File; 9 | import java.io.BufferedReader; 10 | import java.io.PrintWriter; 11 | import java.io.InputStream; 12 | import java.io.OutputStream; 13 | import java.io.IOException; 14 | 15 | public class fullscreen_noarg extends PApplet { 16 | 17 | public void setup() { 18 | /* size commented out by preprocessor */; 19 | 20 | noLoop(); 21 | } 22 | 23 | public void settings() { fullScreen(); } 24 | 25 | static public void main(String[] passedArgs) { 26 | String[] appletArgs = new String[] { "fullscreen_noarg" }; 27 | if (passedArgs != null) { 28 | PApplet.main(concat(appletArgs, passedArgs)); 29 | } else { 30 | PApplet.main(appletArgs); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /java/test/resources/fullscreen_noarg.pde: -------------------------------------------------------------------------------- 1 | fullScreen(); 2 | -------------------------------------------------------------------------------- /java/test/resources/generics.expected: -------------------------------------------------------------------------------- 1 | import processing.core.*; 2 | import processing.data.*; 3 | import processing.event.*; 4 | import processing.opengl.*; 5 | 6 | import java.util.*; 7 | import java.util.HashMap; 8 | import java.util.ArrayList; 9 | import java.io.File; 10 | import java.io.BufferedReader; 11 | import java.io.PrintWriter; 12 | import java.io.InputStream; 13 | import java.io.OutputStream; 14 | import java.io.IOException; 15 | 16 | public class generics extends PApplet { 17 | 18 | public void setup() { 19 | List test = new ArrayList<>(); 20 | noLoop(); 21 | } 22 | 23 | static public void main(String[] passedArgs) { 24 | String[] appletArgs = new String[] { "generics" }; 25 | if (passedArgs != null) { 26 | PApplet.main(concat(appletArgs, passedArgs)); 27 | } else { 28 | PApplet.main(appletArgs); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /java/test/resources/generics.pde: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | 3 | List test = new ArrayList<>(); 4 | -------------------------------------------------------------------------------- /java/test/resources/lambdaexample.expected: -------------------------------------------------------------------------------- 1 | import processing.core.*; 2 | import processing.data.*; 3 | import processing.event.*; 4 | import processing.opengl.*; 5 | 6 | import java.util.*; 7 | import java.util.HashMap; 8 | import java.util.ArrayList; 9 | import java.io.File; 10 | import java.io.BufferedReader; 11 | import java.io.PrintWriter; 12 | import java.io.InputStream; 13 | import java.io.OutputStream; 14 | import java.io.IOException; 15 | 16 | public class lambdaexample extends PApplet { 17 | 18 | public void setup() { 19 | List test = new ArrayList<>(); 20 | test.add("a"); 21 | test.add("b"); 22 | test.forEach((x) -> { println(x); }); 23 | noLoop(); 24 | } 25 | 26 | static public void main(String[] passedArgs) { 27 | String[] appletArgs = new String[] { "lambdaexample" }; 28 | if (passedArgs != null) { 29 | PApplet.main(concat(appletArgs, passedArgs)); 30 | } else { 31 | PApplet.main(appletArgs); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /java/test/resources/lambdaexample.pde: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | 3 | List test = new ArrayList<>(); 4 | test.add("a"); 5 | test.add("b"); 6 | test.forEach((x) -> { println(x); }); 7 | -------------------------------------------------------------------------------- /java/test/resources/mixing.pde: -------------------------------------------------------------------------------- 1 | size(100, 100); 2 | int radius = 10; 3 | 4 | ellispe(radus, radus); 5 | 6 | void setup() { 7 | 8 | } 9 | -------------------------------------------------------------------------------- /java/test/resources/multilinestr.expected: -------------------------------------------------------------------------------- 1 | import processing.core.*; 2 | import processing.data.*; 3 | import processing.event.*; 4 | import processing.opengl.*; 5 | 6 | import java.util.HashMap; 7 | import java.util.ArrayList; 8 | import java.io.File; 9 | import java.io.BufferedReader; 10 | import java.io.PrintWriter; 11 | import java.io.InputStream; 12 | import java.io.OutputStream; 13 | import java.io.IOException; 14 | 15 | public class multilinestr extends PApplet { 16 | 17 | public void setup() { 18 | String testOldStyle = "line1\"\nline 2 \"\"\nline 3"; 19 | String testMultiline = "\nline4 \"\nline 5 \"\"\nline 6\nline 7"; 20 | 21 | println(testOldStyle); 22 | println(testMultiline); 23 | 24 | noLoop(); 25 | } 26 | 27 | static public void main(String[] passedArgs) { 28 | String[] appletArgs = new String[] { "multilinestr" }; 29 | if (passedArgs != null) { 30 | PApplet.main(concat(appletArgs, passedArgs)); 31 | } else { 32 | PApplet.main(appletArgs); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /java/test/resources/multilinestr.pde: -------------------------------------------------------------------------------- 1 | String testOldStyle = "line1\"\nline 2 \"\"\nline 3"; 2 | String testMultiline = """ 3 | line4 " 4 | line 5 "" 5 | line 6 6 | line 7"""; 7 | 8 | println(testOldStyle); 9 | println(testMultiline); 10 | -------------------------------------------------------------------------------- /java/test/resources/multilinestrclass.pde: -------------------------------------------------------------------------------- 1 | class TestClass { 2 | final String testMultiline1 = """ 3 | line1 " 4 | line 2 "" 5 | line 3 6 | line 4"""; 7 | 8 | String getStr() { 9 | return testMultiline1; 10 | } 11 | } 12 | 13 | 14 | void setup() { 15 | TestClass test = new TestClass(); 16 | println(test.getStr()); 17 | } 18 | 19 | void draw() { 20 | } 21 | -------------------------------------------------------------------------------- /java/test/resources/multimultilinestr.pde: -------------------------------------------------------------------------------- 1 | String testMultiline1 = """ 2 | line1 " 3 | line 2 "" 4 | line 3 5 | line 4"""; 6 | 7 | final String testMultiline2 = """ 8 | line5 " 9 | line 6 "" 10 | line 7 11 | line 8"""; 12 | 13 | println(testMultiline1); 14 | println(testMultiline2); 15 | -------------------------------------------------------------------------------- /java/test/resources/nosmooth.pde: -------------------------------------------------------------------------------- 1 | void setup(){ 2 | size(300,300, P2D); 3 | noSmooth(); 4 | } 5 | 6 | void draw(){ 7 | background(0); 8 | fill(255,0,0); 9 | ellipse(100,100,100,100); 10 | fill(0,255,0); 11 | ellipse(150,150,100,100); 12 | } 13 | -------------------------------------------------------------------------------- /java/test/resources/packageTest.expected: -------------------------------------------------------------------------------- 1 | package test.subtest; 2 | 3 | import processing.core.*; 4 | import processing.data.*; 5 | import processing.event.*; 6 | import processing.opengl.*; 7 | 8 | import java.util.*; 9 | import java.util.HashMap; 10 | import java.util.ArrayList; 11 | import java.io.File; 12 | import java.io.BufferedReader; 13 | import java.io.PrintWriter; 14 | import java.io.InputStream; 15 | import java.io.OutputStream; 16 | import java.io.IOException; 17 | 18 | public class packageTest extends PApplet { 19 | 20 | public void setup() { 21 | List test = new ArrayList<>(); 22 | noLoop(); 23 | } 24 | 25 | static public void main(String[] passedArgs) { 26 | String[] appletArgs = new String[] { "packageTest" }; 27 | if (passedArgs != null) { 28 | PApplet.main(concat(appletArgs, passedArgs)); 29 | } else { 30 | PApplet.main(appletArgs); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /java/test/resources/packageTest.pde: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | 3 | List test = new ArrayList<>(); 4 | -------------------------------------------------------------------------------- /java/test/resources/parampixeldensity.pde: -------------------------------------------------------------------------------- 1 | void setup() { 2 | size(100, 100); 3 | // Pulling the display's density dynamically 4 | pixelDensity(displayDensity()); 5 | noStroke(); 6 | } 7 | 8 | void draw() { 9 | background(0); 10 | ellipse(30, 48, 36, 36); 11 | ellipse(70, 48, 36, 36); 12 | } 13 | -------------------------------------------------------------------------------- /java/test/resources/pdfwrite.pde: -------------------------------------------------------------------------------- 1 | import processing.pdf.*; 2 | 3 | void setup() { 4 | size(400, 400, PDF, "filename.pdf"); 5 | } 6 | 7 | void draw() { 8 | // Draw something good here 9 | line(0, 0, width/2, height); 10 | 11 | // Exit the program 12 | println("Finished."); 13 | exit(); 14 | } 15 | -------------------------------------------------------------------------------- /java/test/resources/pgraphics.expected: -------------------------------------------------------------------------------- 1 | import processing.core.*; 2 | import processing.data.*; 3 | import processing.event.*; 4 | import processing.opengl.*; 5 | 6 | import java.util.HashMap; 7 | import java.util.ArrayList; 8 | import java.io.File; 9 | import java.io.BufferedReader; 10 | import java.io.PrintWriter; 11 | import java.io.InputStream; 12 | import java.io.OutputStream; 13 | import java.io.IOException; 14 | 15 | public class pgraphics extends PApplet { 16 | 17 | PGraphics gfx; 18 | 19 | public void setup() { 20 | 21 | gfx = createGraphics(width, height); 22 | gfx.smooth(); 23 | } 24 | 25 | public void draw() { 26 | } 27 | 28 | 29 | static public void main(String[] passedArgs) { 30 | String[] appletArgs = new String[] { "pgraphics" }; 31 | if (passedArgs != null) { 32 | PApplet.main(concat(appletArgs, passedArgs)); 33 | } else { 34 | PApplet.main(appletArgs); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /java/test/resources/pgraphics.pde: -------------------------------------------------------------------------------- 1 | PGraphics gfx; 2 | 3 | void setup() { 4 | 5 | gfx = createGraphics(width, height); 6 | gfx.smooth(); 7 | } 8 | 9 | void draw() { 10 | } 11 | -------------------------------------------------------------------------------- /java/test/resources/preferences.txt: -------------------------------------------------------------------------------- 1 | # unit test prefs 2 | 3 | editor.tabs.size=2 4 | 5 | preproc.save_build_files=false 6 | 7 | # preprocessor: pde.g 8 | preproc.color_datatype = true 9 | preproc.web_colors = true 10 | preproc.enhanced_casting = true 11 | 12 | # preprocessor: PdeEmitter.java 13 | preproc.substitute_floats = true 14 | #preproc.substitute_image = false 15 | #preproc.substitute_font = false 16 | 17 | # auto-convert non-ascii chars to unicode escape sequences 18 | preproc.substitute_unicode = true 19 | 20 | # PdePreproc.java 21 | # writes out the parse tree as parseTree.xml, which can be usefully 22 | # viewed in (at least) Mozilla or IE. useful when debugging the preprocessor. 23 | preproc.output_parse_tree = false 24 | 25 | # Changed after 1.0.9 to a new name, and also includes the specific entries 26 | preproc.imports.list = java.applet.*,java.awt.Dimension,java.awt.Frame,java.awt.event.MouseEvent,java.awt.event.KeyEvent,java.awt.event.FocusEvent,java.awt.Image,java.io.*,java.net.*,java.text.*,java.util.*,java.util.zip.*,java.util.regex.* 27 | -------------------------------------------------------------------------------- /java/test/resources/sizeclass.pde: -------------------------------------------------------------------------------- 1 | // Thanks StanLepunK: https://github.com/processing/processing4/issues/317 2 | Truc truc = new Truc(); 3 | 4 | void setup() { 5 | size(200,200); 6 | truc.size(1,1); // problem >>> error à "." 7 | // func(); 8 | } 9 | 10 | void draw() { 11 | truc.size(1,1); // no problem 12 | } 13 | 14 | void func() { 15 | truc.size(1,1); // no problem 16 | } 17 | 18 | class Truc { 19 | void size(int x, int y) { 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /java/test/resources/sizethis.pde: -------------------------------------------------------------------------------- 1 | import processing.pdf.*; 2 | 3 | void setup() { 4 | this.size(400, 400, PDF, "filename.pdf"); 5 | } 6 | 7 | void draw() { 8 | // Draw something good here 9 | line(0, 0, width/2, height); 10 | 11 | // Exit the program 12 | println("Finished."); 13 | exit(); 14 | } 15 | -------------------------------------------------------------------------------- /java/test/resources/smoothnoparam.pde: -------------------------------------------------------------------------------- 1 | void setup(){ 2 | size(300,300, P2D); 3 | smooth(); 4 | } 5 | 6 | void draw(){ 7 | background(0); 8 | fill(255,0,0); 9 | ellipse(100,100,100,100); 10 | fill(0,255,0); 11 | ellipse(150,150,100,100); 12 | } 13 | -------------------------------------------------------------------------------- /java/test/resources/smoothnoparamthis.pde: -------------------------------------------------------------------------------- 1 | void setup(){ 2 | size(300,300, P2D); 3 | this.smooth(); 4 | } 5 | 6 | void draw(){ 7 | background(0); 8 | fill(255,0,0); 9 | ellipse(100,100,100,100); 10 | fill(0,255,0); 11 | ellipse(150,150,100,100); 12 | } 13 | -------------------------------------------------------------------------------- /java/test/resources/smoothparam.pde: -------------------------------------------------------------------------------- 1 | void setup(){ 2 | size(300,300, P2D); 3 | smooth(4); 4 | } 5 | 6 | void draw(){ 7 | background(0); 8 | fill(255,0,0); 9 | ellipse(100,100,100,100); 10 | fill(0,255,0); 11 | ellipse(150,150,100,100); 12 | } 13 | -------------------------------------------------------------------------------- /java/test/resources/smoothparamstatic.pde: -------------------------------------------------------------------------------- 1 | size(300,300, P2D); 2 | smooth(4); 3 | background(0); 4 | fill(255,0,0); 5 | ellipse(100,100,100,100); 6 | fill(0,255,0); 7 | ellipse(150,150,100,100); 8 | -------------------------------------------------------------------------------- /java/test/resources/specialmethodsprivate.pde: -------------------------------------------------------------------------------- 1 | void setup() { 2 | size(100, 100); 3 | } 4 | 5 | @Override void draw() { 6 | ellipse(50, 50, 10, 10); 7 | Test t = new Test(); 8 | t.draw(); 9 | } 10 | 11 | class Test { 12 | private void draw() {} 13 | } 14 | 15 | -------------------------------------------------------------------------------- /java/test/resources/speicalmethods.pde: -------------------------------------------------------------------------------- 1 | ArrayList positions = new ArrayList<>(); 2 | 3 | void setup() { 4 | size(100, 100); 5 | positions.add(25); 6 | positions.add(50); 7 | positions.add(75); 8 | } 9 | 10 | void draw() { 11 | for (int i = 0; i < positions.size(); i++) { 12 | ellipse(positions.get(i), positions.get(i), 10, 10); 13 | } 14 | } 15 | 16 | void mousePressed() { 17 | positions.add(mouseX); 18 | } 19 | -------------------------------------------------------------------------------- /java/test/resources/staticannotations.pde: -------------------------------------------------------------------------------- 1 | class Button { 2 | 3 | int x, y, radius; 4 | 5 | public Button (int x, int y, int radius) { 6 | this.x = x; 7 | this.y = y; 8 | this.radius = radius; 9 | } 10 | 11 | boolean over() { 12 | return dist(mouseX, mouseY, this.x, this.y) < this.radius; 13 | } 14 | 15 | void draw() { 16 | ellipse(this.x, this.y, this.radius * 2, this.radius * 2); 17 | } 18 | 19 | @Deprecated 20 | void old() { 21 | ellipse(this.x, this.y, this.radius, this.radius); 22 | } 23 | 24 | } 25 | 26 | 27 | class ButtonOther extends Button { 28 | 29 | @Override 30 | boolean over() { 31 | return dist(mouseX, mouseY, this.x, this.y) < this.radius / 2; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /java/test/resources/staticclass.pde: -------------------------------------------------------------------------------- 1 | class Button { 2 | 3 | int x, y, radius; 4 | 5 | public Button (int x, int y, int radius) { 6 | this.x = x; 7 | this.y = y; 8 | this.radius = radius; 9 | } 10 | 11 | boolean over() { 12 | return dist(mouseX, mouseY, this.x, this.y) < this.radius; 13 | } 14 | 15 | void draw() { 16 | ellipse(this.x, this.y, this.radius * 2, this.radius * 2); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /java/test/resources/staticpixeldensity.pde: -------------------------------------------------------------------------------- 1 | size(100, 100); 2 | pixelDensity(2); 3 | noStroke(); 4 | background(0); 5 | ellipse(30, 48, 36, 36); 6 | ellipse(70, 48, 36, 36); 7 | -------------------------------------------------------------------------------- /java/test/resources/typeinference.pde: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | import java.util.function.*; 3 | 4 | void setup() { 5 | List list = new ArrayList<>(); 6 | list.add("line1\nline2"); 7 | list.add("line3"); 8 | 9 | // Local variable type inference in loop 10 | for (var s : list) { 11 | println(s); 12 | } 13 | 14 | // Local variable type inference 15 | var testString = list.get(0); 16 | println(testString.lines().count()); // Java 11 API 17 | } 18 | -------------------------------------------------------------------------------- /java/test/resources/whitespace.pde: -------------------------------------------------------------------------------- 1 | void setup() { 2 | size(640, 360); 3 | stroke(255); 4 | noFill(); 5 | } 6 | 7 | void drawBezier(int i) { 8 | bezier( 9 | mouseX - (i/2.0), 10 | 40+i, 11 | 410, 12 | 20, 13 | 440, 14 | 300, 15 | 240 - (i/16.0), 16 | 300 + (i/8.0) 17 | ); 18 | } 19 | 20 | void draw() { 21 | background(0); 22 | for (int i = 0; i < 200; i += 20) { 23 | drawBezier(i); 24 | } 25 | } -------------------------------------------------------------------------------- /java/theme/completion/class.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /java/theme/completion/field.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /java/theme/completion/local.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /java/theme/completion/method.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /java/theme/variables/array.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /java/theme/variables/boolean.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /java/theme/variables/byte.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /java/theme/variables/char.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /java/theme/variables/double.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /java/theme/variables/float.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /java/theme/variables/integer.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /java/theme/variables/long.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /java/theme/variables/object.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /java/theme/variables/short.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /java/theme/variables/string.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | --------------------------------------------------------------------------------