本文整理匯總了Python中Quartz.kCGEventLeftMouseDragged方法的典型用法代碼示例。如果您正苦於以下問題:Python Quartz.kCGEventLeftMouseDragged方法的具體用法?Python Quartz.kCGEventLeftMouseDragged怎麽用?Python Quartz.kCGEventLeftMouseDragged使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Quartz
的用法示例。
在下文中一共展示了Quartz.kCGEventLeftMouseDragged方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: mousedrag
# 需要導入模塊: import Quartz [as 別名]
# 或者: from Quartz import kCGEventLeftMouseDragged [as 別名]
def mousedrag(self, posx, posy):
self.mouseEvent(Quartz.kCGEventLeftMouseDragged, posx,posy)
# Detecting Blinking of eyes
示例2: mousedrag
# 需要導入模塊: import Quartz [as 別名]
# 或者: from Quartz import kCGEventLeftMouseDragged [as 別名]
def mousedrag(self, posx, posy):
self.mouseEvent(Quartz.kCGEventLeftMouseDragged, posx,posy)
示例3: _dragTo
# 需要導入模塊: import Quartz [as 別名]
# 或者: from Quartz import kCGEventLeftMouseDragged [as 別名]
def _dragTo(x, y, button):
if button == LEFT:
_sendMouseEvent(Quartz.kCGEventLeftMouseDragged , x, y, Quartz.kCGMouseButtonLeft)
elif button == MIDDLE:
_sendMouseEvent(Quartz.kCGEventOtherMouseDragged , x, y, Quartz.kCGMouseButtonCenter)
elif button == RIGHT:
_sendMouseEvent(Quartz.kCGEventRightMouseDragged , x, y, Quartz.kCGMouseButtonRight)
else:
assert False, "button argument not in ('left', 'middle', 'right')"
time.sleep(0.01) # needed to allow OS time to catch up.
示例4: drag
# 需要導入模塊: import Quartz [as 別名]
# 或者: from Quartz import kCGEventLeftMouseDragged [as 別名]
def drag(x, y):
drag = Quartz.CGEventCreateMouseEvent(None, Quartz.kCGEventLeftMouseDragged, (x, y), 0)
Quartz.CGEventPost(Quartz.kCGHIDEventTap, drag)