Beispiel #1
0
/* void mouseRelease(in nsISupports anode, in long x, in long y, in long button); */
NS_IMETHODIMP nsNativeEvents::MouseRelease(nsISupports *aNode, PRInt32 x, PRInt32 y, PRInt32 button)
{
  AccessibleDocumentWrapper doc(aNode);

  void* windowHandle = doc.getWindowHandle();
  LOG(DEBUG) << "Have mouseRelease window handle: " << windowHandle;

  if (!windowHandle) {
    LOG(WARN) << "No window handle!";
    return NS_ERROR_NULL_POINTER;
  }

  LOG(DEBUG) << "Calling mouseUpAt: " << x << ", " << y << " with button: " << button;
  WD_RESULT res = mouseUpAt(windowHandle, x, y, button);

  LOG(DEBUG) << "Result was: " << (res == SUCCESS ? "ok" : "fail");

  return res == SUCCESS ? NS_OK : NS_ERROR_FAILURE;
}
Beispiel #2
0
int wdeMouseUpAt(HWND hwnd, long windowX, long windowY)
{
	mouseUpAt(hwnd, windowX, windowY, MOUSEBUTTON_LFET);
	return SUCCESS;
}