Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Core Library Structure
The Android core library follows very closely the structure of the Java core library. It is organized in four main packages:
- processing.android: Classes that wrap the Android components and services required to create a Processing app, wallpaper, or watch face: PFragment, PWallpaper, etc. They should not be used directly from the sketch.
- processing.core: Basic Processing classes, including PApplet, PGraphics, PImage, and PFont.
- processing.data: Data handling classes and utilities: Table, XML, JSONObject, etc.
- processing.event: All related to event handling: Event, KeyEvent, MouseEvent, and TouchEvent.
- processing.a2d: The classes implementing the Android2D rendererer: PGraphicsAndroid2D, PSurfaceAndroid2D, etc.
- processing.opengl: The classes implementing the OpenGL renderer: PGraphicsOpenGL, PGraphics2D, PGraphics3D, PShader, PGL.
Differences between versions 3 and 4 of the mode
The version 4.0 of the mode introduces significant changes in the structure of the core library in order to support wallpapers, watch faces, and VR (Cardboard/Daydream) apps. PApplet simply extends Object, and contains a surface instance of type PSurface. PSurface holds the activity associated with the PApplet (in the case of regular sketches), or the service (for wallpapers and watch faces), the corresponding surface view, and the rendering thread.