本文整理汇总了Python中gi.repository.Atspi.generate_mouse_event方法的典型用法代码示例。如果您正苦于以下问题:Python Atspi.generate_mouse_event方法的具体用法?Python Atspi.generate_mouse_event怎么用?Python Atspi.generate_mouse_event使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gi.repository.Atspi
的用法示例。
在下文中一共展示了Atspi.generate_mouse_event方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: generateMouseEvent
# 需要导入模块: from gi.repository import Atspi [as 别名]
# 或者: from gi.repository.Atspi import generate_mouse_event [as 别名]
def generateMouseEvent(self, x, y, name):
"""
Generates a mouse event at the given absolute x and y coordinate. The kind
of event generated is specified by the name. For example, MOUSE_B1P
(button 1 press), MOUSE_REL (relative motion), MOUSE_B3D (butten 3
double-click).
@@param x: Horizontal coordinate, usually left-hand oriented
@@type x: integer
@@param y: Vertical coordinate, usually left-hand oriented
@@type y: integer
@@param name: Name of the event to generate
@@type name: string
"""
if not self.has_implementations:
self._set_default_registry ()
Atspi.generate_mouse_event (x, y, name)
示例2: click
# 需要导入模块: from gi.repository import Atspi [as 别名]
# 或者: from gi.repository.Atspi import generate_mouse_event [as 别名]
def click(self, button=1, x_offset=0, y_offset=0):
point = self._accessible.get_position(Atspi.CoordType.SCREEN)
Atspi.generate_mouse_event(point.x+x_offset,
point.y+y_offset,
"b%sc" % button)
示例3: absMotion
# 需要导入模块: from gi.repository import Atspi [as 别名]
# 或者: from gi.repository.Atspi import generate_mouse_event [as 别名]
def absMotion(x_offset=0, y_offset=0):
Atspi.generate_mouse_event(x_offset, y_offset, "abs")
return True
示例4: release
# 需要导入模块: from gi.repository import Atspi [as 别名]
# 或者: from gi.repository.Atspi import generate_mouse_event [as 别名]
def release(button=1, x_offset=0, y_offset=0):
Atspi.generate_mouse_event(x_offset, y_offset, "b%sr" % button)
return True
示例5: press
# 需要导入模块: from gi.repository import Atspi [as 别名]
# 或者: from gi.repository.Atspi import generate_mouse_event [as 别名]
def press(button=1, x_offset=0, y_offset=0):
Atspi.generate_mouse_event(x_offset, y_offset, "b%sp" % button)
return True