Thread: eMonitor
View Single Post
Old 06-18-2012, 01:44 PM   #58
w126
Junior Member
w126 began at the beginning.
 
Posts: 9
Karma: 42
Join Date: May 2010
Device: Kindle Paperwhite (2013), Onyx Boox M92, Kindle 2
Here is quick and dirty fragment of code that adds mouse cursor:
Code:
      ...
      memory.Blit(0, 0, w, h, context, l, t)
# start of inserted code
      pos=wx.GetMousePosition()
      (cw,ch)=memory.GetTextExtent('x')
      memory.DrawText('x',pos.x-cw/2, pos.y-ch/2)
# end of inserted code
      memory.SelectObject(wx.NullBitmap)
      ...
It draws 'x' letter instead of actual cursor image.
However, because of the delay (around 1 second) it's inconvenient to use it for pointing and clicking items if you only look at the reader screen. I'm thinking about adding a mouse cursor in the HTML page and quicker updates of its position, independent of screen image updates (new positions could be retrieved with AJAX requests).
w126 is offline   Reply With Quote