當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。