From 6876c9a5d401da067a275a5a5adfb2691dabbbf1 Mon Sep 17 00:00:00 2001 From: benfry Date: Fri, 23 Nov 2012 19:33:34 +0000 Subject: [PATCH] remove motionX/Y/etc... not the right direction --- android/core/src/processing/core/PApplet.java | 74 +++++++++---------- android/todo.txt | 32 ++++---- core/todo.txt | 64 ++++++++-------- todo.txt | 6 ++ 4 files changed, 94 insertions(+), 82 deletions(-) diff --git a/android/core/src/processing/core/PApplet.java b/android/core/src/processing/core/PApplet.java index 787ef105a..c93d49a49 100644 --- a/android/core/src/processing/core/PApplet.java +++ b/android/core/src/processing/core/PApplet.java @@ -168,36 +168,36 @@ public class PApplet extends Activity implements PConstants, Runnable { /** absolute x position of input on screen */ public int mouseY; - /** current x position of motion (relative to start of motion) */ - public float motionX; - - /** current y position of the mouse (relative to start of motion) */ - public float motionY; - - /** Last reported pressure of the current motion event */ - public float motionPressure; - - /** Last reported positions and pressures for all pointers */ - protected int numPointers; - protected int pnumPointers; - - protected float[] ppointersX = {0}; - protected float[] ppointersY = {0}; - protected float[] ppointersPressure = {0}; - - protected float[] pointersX = {0}; - protected float[] pointersY = {0}; - protected float[] pointersPressure = {0}; - - protected int downMillis; - protected float downX, downY; - protected boolean onePointerGesture = false; - protected boolean twoPointerGesture = true; - - protected final int MIN_SWIPE_LENGTH = 150; // Minimum length (in pixels) of a swipe event - protected final int MAX_SWIPE_DURATION = 2000; // Maximum duration (in millis) of a swipe event - protected final int MAX_TAP_DISP = 20; // Maximum displacement (in pixels) during a tap event - protected final int MAX_TAP_DURATION = 1000; // Maximum duration (in millis) of a tap event +// /** current x position of motion (relative to start of motion) */ +// public float motionX; +// +// /** current y position of the mouse (relative to start of motion) */ +// public float motionY; +// +// /** Last reported pressure of the current motion event */ +// public float motionPressure; +// +// /** Last reported positions and pressures for all pointers */ +// protected int numPointers; +// protected int pnumPointers; +// +// protected float[] ppointersX = {0}; +// protected float[] ppointersY = {0}; +// protected float[] ppointersPressure = {0}; +// +// protected float[] pointersX = {0}; +// protected float[] pointersY = {0}; +// protected float[] pointersPressure = {0}; +// +// protected int downMillis; +// protected float downX, downY; +// protected boolean onePointerGesture = false; +// protected boolean twoPointerGesture = true; +// +// protected final int MIN_SWIPE_LENGTH = 150; // Minimum length (in pixels) of a swipe event +// protected final int MAX_SWIPE_DURATION = 2000; // Maximum duration (in millis) of a swipe event +// protected final int MAX_TAP_DISP = 20; // Maximum displacement (in pixels) during a tap event +// protected final int MAX_TAP_DURATION = 1000; // Maximum duration (in millis) of a tap event /** @@ -210,14 +210,14 @@ public class PApplet extends Activity implements PConstants, Runnable { * you're gonna run into trouble. */ public int pmouseX, pmouseY; - public float pmotionX, pmotionY; +// public float pmotionX, pmotionY; /** * previous mouseX/Y for the draw loop, separated out because this is * separate from the pmouseX/Y when inside the mouse event handlers. */ protected int dmouseX, dmouseY; - protected float dmotionX, dmotionY; +// protected float dmotionX, dmotionY; /** * pmotionX/Y for the event handlers (motionPressed(), motionDragged() etc) @@ -227,7 +227,7 @@ public class PApplet extends Activity implements PConstants, Runnable { * to be updated once per trip through draw(). */ protected int emouseX, emouseY; - protected float emotionX, emotionY; +// protected float emotionX, emotionY; // /** // * Used to set pmotionX/Y to motionX/Y the first time motionX/Y are used, @@ -1968,8 +1968,8 @@ public class PApplet extends Activity implements PConstants, Runnable { // last position the mouse was in during the previous draw. pmouseX = dmouseX; pmouseY = dmouseY; - pmotionX = dmotionX; - pmotionY = dmotionY; +// pmotionX = dmotionX; +// pmotionY = dmotionY; //println("Calling draw()"); draw(); @@ -1978,8 +1978,8 @@ public class PApplet extends Activity implements PConstants, Runnable { // dmouseX/Y is updated only once per frame (unlike emouseX/Y) dmouseX = mouseX; dmouseY = mouseY; - dmotionX = motionX; - dmotionY = motionY; +// dmotionX = motionX; +// dmotionY = motionY; // these are called *after* loop so that valid // drawing commands can be run inside them. it can't diff --git a/android/todo.txt b/android/todo.txt index be3a9ad62..8200983f8 100644 --- a/android/todo.txt +++ b/android/todo.txt @@ -2,10 +2,23 @@ X removing default imports for X android.view.MotionEvent, android.view.KeyEvent,android.graphics.Bitmap X due to conflicts w/ the new p5 event system +X change event handling to hopefully clean up some inconsistencies +X remove motionX/Y/Pressure... these need to be handled separately +X mouseX/Y no longer include history with moves +X better to use motion object when that's done +o coordinates from motionX/Y reportedly inconsistent +X http://code.google.com/p/processing/issues/detail?id=1018 +X moving away from this anyway +X pmouseX/Y not being set properly? +X http://code.google.com/p/processing/issues/detail?id=238 cleaning/earlier A Defects in the tessellation of SVG shapes in A3D A http://code.google.com/p/processing/issues/detail?id=291 +X change run/present/export/export application names in the menus +A Blacked-out screen when restoring Android app from background. +A http://code.google.com/p/processing/issues/detail?id=381 +X android sdk/build location has changed (android-7 not 2.1) fix build.xml _ Finish implementation of OPEN and CHORD drawing modes for arc() @@ -26,21 +39,18 @@ _ implement Android version of command line tools _ http://code.google.com/p/processing/issues/detail?id=1323 _ emulator not starting up on OS X? +_ Android emulator doesn't always start on the first attempt +_ http://code.google.com/p/processing/issues/detail?id=1210 -motion/touch events + +implement motion/touch events _ registerMethod("motionEvent") and "mouseEvent" not implemented _ PMotionEvent is being used internal to PApplet, need to re-wrap _ should be able to fire MotionEvents _ modify MotionEvent code to use TouchEvent class, even if basic version _ internally, PApplet might subclass it for the pointers _ but queueing needs to work -_ coordinates from motionX/Y reportedly inconsistent -_ http://code.google.com/p/processing/issues/detail?id=1018 -_ pmouseX/Y not being set properly? -_ http://code.google.com/p/processing/issues/detail?id=238 -_ Android emulator doesn't always start on the first attempt -_ http://code.google.com/p/processing/issues/detail?id=1210 _ inside AndroidPreprocessor _ processing.mode.java.JavaBuild.scrubComments(sketch.getCode(0).getProgram()) @@ -146,12 +156,6 @@ _ gui stuff: http://hg.postspectacular.com/cp5magic/wiki/Home _ "failed to get signature key" problem _ Caused by: /Users/aandnota/Documents/android-sdk-mac_x86/tools/ant/ant_rules_r3.xml:209: com.android.sdklib.build.ApkCreationException: Unable to get debug signature key -_ android sdk/build location has changed (android-7 not 2.1) fix build.xml - -_ Blacked-out screen when restoring Android app from background. -_ http://code.google.com/p/processing/issues/detail?id=381 -_ probably related to the other thread hooey - _ saveStream() on processing-android-core.zip breaks behind firewall _ downloads a 5kb html login page rather than the correct file @@ -174,8 +178,6 @@ _ something to bring up the full console window _ signing tool _ selection of which avd (emulator), or plugged-in devices (if multiple) -_ change run/present/export/export application names in the menus - _ throw an error if a file in the 'data' dir ends with .gz _ on export (application) diff --git a/core/todo.txt b/core/todo.txt index c826cf962..678382e13 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -59,8 +59,38 @@ A http://code.google.com/p/processing/issues/detail?id=762 A OPENGL renderer stops rendering after text is written using textMode(SCREEN) A http://code.google.com/p/processing/issues/detail?id=710 +cleaning +o remove screenBlend(), textureBlend() from PGraphics et al +o have andres take over all current GL issues in the tracker +X Support 'black' as color for SVG files (PhiLho fix) +X http://code.google.com/p/processing/issues/detail?id=1010 -_ createShape() not yet implemented for 2.0 +events +X make sure alt/ctl/meta/etc all work (for both mouse and key) +X remove thread blocking when dequeueing events +X finish postEvent() +X need to make events interleave +X http://code.google.com/p/processing/issues/detail?id=79 +X mouseButton not being set properly in mouseClicked +X http://code.google.com/p/processing/issues/detail?id=1350 +X mouseButton is 0 in mouseReleased() on OS X +X http://code.google.com/p/processing/issues/detail?id=1373 +o unconfirmed: keyEvent works only using JAVA2D +X http://code.google.com/p/processing/issues/detail?id=1279 +X can't find anything on this, closed +X mouseEntered/Exited? (they're caught but not handled) +X http://code.google.com/p/processing/issues/detail?id=500 +X also look into Android issues with this stuff +X this only works for awt events... switch to using internal event code +if (external && event.getNative() instanceof java.awt.event.KeyEvent && + ((java.awt.event.KeyEvent) event.getNative()).getModifiers() == + Toolkit.getDefaultToolkit().getMenuShortcutKeyMask() && + event.getKeyCode() == 'W') { + exit(); + } + + +_ createShape() not yet implemented for Java2D _ http://code.google.com/p/processing/issues/detail?id=1400 _ look into json and how it would work @@ -75,39 +105,13 @@ join tables together (static is kinda gross) lastRowIndex() (to avoid getRowCount() - 1) addRow() -cleaning -o remove screenBlend(), textureBlend() from PGraphics et al -o have andres take over all current GL issues in the tracker -X Support 'black' as color for SVG files (PhiLho fix) -X http://code.google.com/p/processing/issues/detail?id=1010 - -events -_ make sure alt/ctl/meta/etc all work (for both mouse and key) -_ remove thread blocking when dequeueing events -_ finish postEvent() -_ need to make events interleave -_ http://code.google.com/p/processing/issues/detail?id=79 -_ mouseButton not being set properly in mouseClicked -_ http://code.google.com/p/processing/issues/detail?id=1350 -_ mouseButton is 0 in mouseReleased() on OS X -_ http://code.google.com/p/processing/issues/detail?id=1373 -_ unconfirmed: keyEvent works only using JAVA2D -_ http://code.google.com/p/processing/issues/detail?id=1279 -_ mouseEntered/Exited? (they're caught but not handled) -_ http://code.google.com/p/processing/issues/detail?id=500 -_ also look into Android issues with this stuff -_ this only works for awt events... switch to using internal event code -if (external && event.getNative() instanceof java.awt.event.KeyEvent && - ((java.awt.event.KeyEvent) event.getNative()).getModifiers() == - Toolkit.getDefaultToolkit().getMenuShortcutKeyMask() && - event.getKeyCode() == 'W') { - exit(); - } - Request r = createRequest("http://p5.org/feed/13134.jpg"); Request r = createRequest("http://p5.org/feed/13134.jpg", "callbackName"); Request r = createRequest("http://p5.org/feed/13134, "callbackName", "jpg"); +_ splice() throws ClassCastException when used with objects like PVector +_ http://code.google.com/p/processing/issues/detail?id=1407 + _ add "CGAffineTransformInvert: singular matrix" problem to the Wiki _ http://code.google.com/p/processing/issues/detail?id=1363 diff --git a/todo.txt b/todo.txt index d37754b2c..27d7c4908 100644 --- a/todo.txt +++ b/todo.txt @@ -8,6 +8,12 @@ X removed: java.applet.*,java.awt.Dimension,java.awt.Frame,java.awt.event.Mous X mode detection isn't properly ignoring code inside comments X http://code.google.com/p/processing/issues/detail?id=1404 +earlier +X The sketch name can't begin with '_' (underscore) +X http://code.google.com/p/processing/issues/detail?id=859 + +_ fix the debug stuff before shipping this out + _ remove java.awt.* imports from sketches _ go through examples to make sure they're not being used _ do command line to run through all examples?