本文整理匯總了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