当前位置: 首页>>代码示例>>Python>>正文


Python X.NONE属性代码示例

本文整理汇总了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,
        ) 
开发者ID:python-xlib,项目名称:python-xlib,代码行数:20,代码来源:xinput.py

示例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) 
开发者ID:autokey,项目名称:autokey,代码行数:21,代码来源:interface.py

示例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) 
开发者ID:autokey,项目名称:autokey,代码行数:21,代码来源:interface.py

示例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() 
开发者ID:tuwid,项目名称:darkc0de-old-stuff,代码行数:24,代码来源:x11.py

示例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
        ) 
开发者ID:gillescastel,项目名称:inkscape-shortcut-manager,代码行数:12,代码来源:main.py

示例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() 
开发者ID:gillescastel,项目名称:inkscape-shortcut-manager,代码行数:8,代码来源:main.py

示例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 
开发者ID:AXeL-dev,项目名称:Dindo-Bot,代码行数:16,代码来源:_pyautogui_x11.py

示例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) 
开发者ID:python-xlib,项目名称:python-xlib,代码行数:8,代码来源:damage.py

示例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,
        ) 
开发者ID:python-xlib,项目名称:python-xlib,代码行数:15,代码来源:xinput.py

示例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) 
开发者ID:python-xlib,项目名称:python-xlib,代码行数:13,代码来源:xtest.py


注:本文中的Xlib.X.NONE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。