本文整理汇总了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)