Device Orientation API

Matthias Huber matthias.huber at wollishausen.de
Thu Sep 10 10:20:29 CEST 2009


Patryk Benderz schrieb:
> [cut]
>   
>> Basically, it's sending you a string whenever the orientation changes. Valid 
>> substrings contain "portrait", "landscape", "faceup", "facedown".
>>     
> IMHO using integers where (x,y,z) are -1,0 or 1, would be better idea.
> This way you could make mathematical operations on this. Or use a
> conditions like: (x=1,y>=0,z<0). There is already some info about axis
> on wiki somewhere
>   
... and for putting this together, one could make macro(tests) ot the
integers:
     portrait := (x,y,z) =~ (90,0,270)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openmoko.org/pipermail/community/attachments/20090910/aa37c86c/attachment.htm 


More information about the community mailing list