View Single Post
Old 01-18-2012, 12:23 PM   #9
rupor
meat popsicle
rupor rocks like Gibraltar!rupor rocks like Gibraltar!rupor rocks like Gibraltar!rupor rocks like Gibraltar!rupor rocks like Gibraltar!rupor rocks like Gibraltar!rupor rocks like Gibraltar!rupor rocks like Gibraltar!rupor rocks like Gibraltar!rupor rocks like Gibraltar!rupor rocks like Gibraltar!
 
rupor's Avatar
 
Posts: 225
Karma: 100000
Join Date: Jul 2007
Location: USA
Device: Kindles, Pixels, iPads
Quote:
Originally Posted by vortigern View Post
I'm thinking there should be a way of attaching a method to change modes to the global TouchDown/Up methods (if they exist!) and that there should be some clue in the browser code.
It looks rather simple, actually - unless I am mistaken.

Standard Android SDK has been modified and new interface introduced: ViewParentEink. It has following methods (which track standard View methods with an extra parameter at the end - updateMode):

.method public final invalidateChild(Landroid/view/View;Landroid/graphics/Rect;I)V
.registers 20
.parameter "child"
.parameter "dirty"
.parameter "updateMode"


.method public invalidateChildInParent([ILandroid/graphics/Rect;I)Landroid/view/ViewParentEink;
.registers 11
.parameter "location"
.parameter "dirty"
.parameter "updateMode"

Interface has been implemented in ViewGroup - so any view which implements AbsoluteLayout has access to those methods.

Sony's browser WebView keeps current updateMode in a class variable and updates it when necessary (touch, zoom with eInk mode constants). All calls to invalidate are using this "new" framework functions - the rest happens automatically.

Something like that...
rupor is offline   Reply With Quote