本文整理汇总了Python中Xlib.X.NONE属性的典型用法代码示例。如果您正苦于以下问题:Python X.NONE属性的具体用法?Python X.NONE怎么用?Python X.NONE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类Xlib.X
的用法示例。
在下文中一共展示了X.NONE属性的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: passive_grab_device
# 需要导入模块: from Xlib import X [as 别名]
# 或者: from Xlib.X import NONE [as 别名]
def passive_grab_device(self, deviceid, time, detail,
grab_type, grab_mode, paired_device_mode,
owner_events, event_mask, modifiers):
return XIPassiveGrabDevice(
display=self.display,
opcode=self.display.get_extension_major(extname),
deviceid=deviceid,
grab_window=self,
time=time,
cursor=X.NONE,
detail=detail,
grab_type=grab_type,
grab_mode=grab_mode,
paired_device_mode=paired_device_mode,
owner_events=owner_events,
mask=event_mask,
modifiers=modifiers,
)
示例2: __sendKeyPressEvent
# 需要导入模块: from Xlib import X [as 别名]
# 或者: from Xlib.X import NONE [as 别名]
def __sendKeyPressEvent(self, keyCode, modifiers, theWindow=None):
if theWindow is None:
focus = self.localDisplay.get_input_focus().focus
else:
focus = theWindow
keyEvent = event.KeyPress(
detail=keyCode,
time=X.CurrentTime,
root=self.rootWindow,
window=focus,
child=X.NONE,
root_x=1,
root_y=1,
event_x=1,
event_y=1,
state=modifiers,
same_screen=1
)
focus.send_event(keyEvent)
示例3: __sendKeyReleaseEvent
# 需要导入模块: from Xlib import X [as 别名]
# 或者: from Xlib.X import NONE [as 别名]
def __sendKeyReleaseEvent(self, keyCode, modifiers, theWindow=None):
if theWindow is None:
focus = self.localDisplay.get_input_focus().focus
else:
focus = theWindow
keyEvent = event.KeyRelease(
detail=keyCode,
time=X.CurrentTime,
root=self.rootWindow,
window=focus,
child=X.NONE,
root_x=1,
root_y=1,
event_x=1,
event_y=1,
state=modifiers,
same_screen=1
)
focus.send_event(keyEvent)
示例4: sendKey
# 需要导入模块: from Xlib import X [as 别名]
# 或者: from Xlib.X import NONE [as 别名]
def sendKey(window, keycode, modifiers=0, released=True):
if released:
type = KeyRelease
event_class = KeyReleaseEvent
else:
type = KeyPress
event_class = KeyPressEvent
event = event_class(
type=type,
detail=keycode,
time=CurrentTime,
root=NONE,
window=window,
child=NONE,
root_x=0,
root_y=0,
event_x=0,
event_y=0,
state=modifiers,
same_screen=1)
window.send_event(event)
window.display.flush()
示例5: event
# 需要导入模块: from Xlib import X [as 别名]
# 或者: from Xlib.X import NONE [as 别名]
def event(self, name, detail, state):
return name(
time=X.CurrentTime,
root=self.root,
window=self.inkscape,
same_screen=0, child=Xlib.X.NONE,
root_x=0, root_y=0, event_x=0, event_y=0,
state=state,
detail=detail
)
示例6: press
# 需要导入模块: from Xlib import X [as 别名]
# 或者: from Xlib.X import NONE [as 别名]
def press(self, key, mask=X.NONE):
keycode = self.string_to_keycode(key)
self.inkscape.send_event(self.event(event.KeyPress, keycode, mask), propagate=True)
self.inkscape.send_event(self.event(event.KeyRelease, keycode, mask), propagate=True)
self.disp.flush()
self.disp.sync()
示例7: _getMouseEvent
# 需要导入模块: from Xlib import X [as 别名]
# 或者: from Xlib.X import NONE [as 别名]
def _getMouseEvent():
screen = _display.screen()
window = screen.root
window.grab_pointer(1, X.PointerMotionMask|X.ButtonReleaseMask|X.ButtonPressMask, X.GrabModeAsync, X.GrabModeAsync, X.NONE, X.NONE, X.CurrentTime)
e = _display.next_event()
_display.ungrab_pointer(X.CurrentTime)
if e.type == X.ButtonPress:
e = MOUSE_EVENT[e.detail] + '_down'
elif e.type == X.ButtonRelease:
e = MOUSE_EVENT[e.detail] + '_up'
else:
e = 'moving'
return e
示例8: damage_subtract
# 需要导入模块: from Xlib import X [as 别名]
# 或者: from Xlib.X import NONE [as 别名]
def damage_subtract(self, damage, repair=X.NONE, parts=X.NONE):
DamageSubtract(display=self.display,
opcode=self.display.get_extension_major(extname),
damage=damage,
repair=repair,
parts=parts)
示例9: grab_device
# 需要导入模块: from Xlib import X [as 别名]
# 或者: from Xlib.X import NONE [as 别名]
def grab_device(self, deviceid, time, grab_mode, paired_device_mode, owner_events, event_mask):
return XIGrabDevice(
display=self.display,
opcode=self.display.get_extension_major(extname),
deviceid=deviceid,
grab_window=self,
time=time,
cursor=X.NONE,
grab_mode=grab_mode,
paired_device_mode=paired_device_mode,
owner_events=owner_events,
mask=event_mask,
)
示例10: fake_input
# 需要导入模块: from Xlib import X [as 别名]
# 或者: from Xlib.X import NONE [as 别名]
def fake_input(self, event_type, detail = 0, time = X.CurrentTime,
root = X.NONE, x = 0, y = 0):
FakeInput(display = self.display,
opcode = self.display.get_extension_major(extname),
event_type = event_type,
detail = detail,
time = time,
root = root,
x = x,
y = y)