Add simple event "touch" to multi-touch Windows 7 messages

Bug #616382 reported by Guillermo Andrade
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Panda3D
Expired
Wishlist
Unassigned

Bug Description

Hello,

This is a little patch for panda/windisplay/winGraphicsWindow.cxx to post events for WM_TOUCH messages from Windows 7.
For every touch a event named "touch" is sended using throw_event.
event parameter are :
- id of touch
- flags of touch
- x and y that are position of touch in windows coordinates.

There is a simple way to test this patch:

#---------------------------------------------------------

import direct.directbase.DirectStart #Initialize Panda and create a window

from direct.showbase.DirectObject import DirectObject
import sys

class World(DirectObject): #Our main class
  def __init__(self):
    self.accept("touch", self.handleTouch)

  def handleTouch(self,id,flag,x,y):
      print "touch : id=",id," flag=", flag, " x= ",x," y=", y

w = World()
run()
#--------------------------------------------------------------

Revision history for this message
Guillermo Andrade (guillermo-andrade) wrote :
Revision history for this message
rdb (rdb) wrote :

Would it perhaps be more consistent to have touch-up and touch-down events?

Changed in panda3d:
importance: Undecided → Wishlist
Revision history for this message
Guillermo Andrade (guillermo-andrade) wrote :

there are 3 states passed on "flag" message parameter: UP, DOWN and MOVE.
If you want to have different messages for all states then you need 3 messages : "touch-down", "touch-move" and "touch-up".
Il will try to send you next week a new patch with this.

rdb (rdb)
tags: added: windows
removed: contrib windows7
Revision history for this message
rdb (rdb) wrote :

Marking Incomplete due to inactivity.

Changed in panda3d:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Panda3D because there has been no activity for 60 days.]

Changed in panda3d:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.