On S60 5th Edition eSWT SDK I want to know that if one is guarenteed that while services mouseevent another will not happen while I am servicing event?
For example;public class Fubar implements MouseListener, MouseEventListener {
private Point mouseLoc = new Point(-1,-1);
public void mouseDoubleClick(MouseEvent e){
}
public void mouseDown(MouseEvent e)
{
mouseLoc.x = e.x;
mouseLoc.y = e.y;
/*
* do other processing:
* ANOTHER EVENT OCCUR AND CHANGE mouseLoc?
*/
}
public void mouseUp(MouseEvent e)
{
/*
* do other processing (maybe change mouseLoc):
* ANOTHER EVENT OCCUR AND CHANGE mouseLoc?
*/
}
public void mouseMove(MouseEvent e)
{
/*
* do other processing (maybe change mouseLoc):
* ANOTHER EVENT OCCUR AND CHANGE mouseLoc?
*/
}
}Am I ok as long as another mouseevent is not invoked while i am in one because need to use value. I thought about locks but if I don't need why bother.
In eSWT all the UI access is limited to a single thread that is the UI thread. That means that all the listeners are also called on that same single thread. Since it is not possible for a thread to execute code pieces of code at the same time it is guaranteed that only a single event is serviced at a time.
--
Gorkem