Skip to content

Commit ecc072b

Browse files
committed
bring back mouseEvent on Android
1 parent 91ba6f3 commit ecc072b

4 files changed

Lines changed: 19 additions & 8 deletions

File tree

android/core/src/processing/core/PApplet.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,8 @@ static public class RendererChangeException extends RuntimeException { }
242242

243243
public boolean mousePressed;
244244

245+
public MouseEvent mouseEvent;
246+
245247
// public MotionEvent motionEvent;
246248

247249
/** Post events to the main thread that created the Activity */
@@ -2137,6 +2139,8 @@ protected void dequeueEvents() {
21372139

21382140

21392141
protected void handleMouseEvent(MouseEvent event) {
2142+
mouseEvent = event;
2143+
21402144
// http://dev.processing.org/bugs/show_bug.cgi?id=170
21412145
// also prevents mouseExited() on the mac from hosing the mouse
21422146
// position, because x/y are bizarre values on the exit event.

android/todo.txt

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ X http://code.google.com/p/processing/issues/detail?id=1018
1111
X moving away from this anyway
1212
X pmouseX/Y not being set properly?
1313
X http://code.google.com/p/processing/issues/detail?id=238
14+
X mouseEvent is back (see the Wiki)
1415

1516
cleaning/earlier
1617
A Defects in the tessellation of SVG shapes in A3D
@@ -20,6 +21,16 @@ A Blacked-out screen when restoring Android app from background.
2021
A http://code.google.com/p/processing/issues/detail?id=381
2122
X android sdk/build location has changed (android-7 not 2.1) fix build.xml
2223

24+
motion events
25+
o registerMethod("motionEvent") and "mouseEvent" not implemented
26+
o PMotionEvent is being used internal to PApplet, need to re-wrap
27+
o should be able to fire MotionEvents
28+
o modify MotionEvent code to use TouchEvent class, even if basic version
29+
o internally, PApplet might subclass it for the pointers
30+
o but queueing needs to work
31+
X opting to take a step backwards on the motion event handling
32+
_ write a little stub code for people who want to use motionX/Y/etc
33+
2334

2435
_ Finish implementation of OPEN and CHORD drawing modes for arc()
2536
_ http://code.google.com/p/processing/issues/detail?id=1405
@@ -43,14 +54,6 @@ _ Android emulator doesn't always start on the first attempt
4354
_ http://code.google.com/p/processing/issues/detail?id=1210
4455

4556

46-
implement motion/touch events
47-
_ registerMethod("motionEvent") and "mouseEvent" not implemented
48-
_ PMotionEvent is being used internal to PApplet, need to re-wrap
49-
_ should be able to fire MotionEvents
50-
_ modify MotionEvent code to use TouchEvent class, even if basic version
51-
_ internally, PApplet might subclass it for the pointers
52-
_ but queueing needs to work
53-
5457

5558
_ inside AndroidPreprocessor
5659
_ processing.mode.java.JavaBuild.scrubComments(sketch.getCode(0).getProgram())

core/todo.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ X add an additional parameter for the others
2525
_ http://code.google.com/p/processing/issues/detail?id=711
2626
X changed events to PRESS, RELEASE, CLICK, DRAG, MOVE, ENTER, EXIT
2727
X instead of past-tense versions of the same
28+
A Implement arc() with modes on OpenGL
29+
A http://code.google.com/p/processing/issues/detail?id=1406
2830

2931
cleanup/earlier by Andres
3032
A when turning smoothing on, internal lines of shapes are visible

todo.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ earlier
1212
X The sketch name can't begin with '_' (underscore)
1313
X http://code.google.com/p/processing/issues/detail?id=859
1414

15+
_ does launching p5 from inside the .zip folder cause it to quit immediately?
16+
1517
_ fix the debug stuff before shipping this out
1618

1719
_ remove java.awt.* imports from sketches

0 commit comments

Comments
 (0)