本文整理汇总了Python中gi.repository.Gdk.CURRENT_TIME属性的典型用法代码示例。如果您正苦于以下问题:Python Gdk.CURRENT_TIME属性的具体用法?Python Gdk.CURRENT_TIME怎么用?Python Gdk.CURRENT_TIME使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类gi.repository.Gdk
的用法示例。
在下文中一共展示了Gdk.CURRENT_TIME属性的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: open_help
# 需要导入模块: from gi.repository import Gdk [as 别名]
# 或者: from gi.repository.Gdk import CURRENT_TIME [as 别名]
def open_help(self, action, param):
"""Open help callback."""
try:
Gtk.show_uri(None, "help:gtg", Gdk.CURRENT_TIME)
except GLib.Error:
log.error('Could not open help')
示例2: __sub_setGrabbed
# 需要导入模块: from gi.repository import Gdk [as 别名]
# 或者: from gi.repository.Gdk import CURRENT_TIME [as 别名]
def __sub_setGrabbed(self, grabbed):
if grabbed and not Gdk.pointer_is_grabbed():
Gdk.pointer_grab(self.subwindow.get_window(), True,
Gdk.EventMask.LEAVE_NOTIFY_MASK |
Gdk.EventMask.POINTER_MOTION_MASK |
Gdk.EventMask.BUTTON_PRESS_MASK, None, None,
Gdk.CURRENT_TIME)
Gdk.keyboard_grab(self.subwindow.get_window(), True,
Gdk.CURRENT_TIME)
elif Gdk.pointer_is_grabbed():
Gdk.pointer_ungrab(Gdk.CURRENT_TIME)
Gdk.keyboard_ungrab(Gdk.CURRENT_TIME)
示例3: action_pic_open
# 需要导入模块: from gi.repository import Gdk [as 别名]
# 或者: from gi.repository.Gdk import CURRENT_TIME [as 别名]
def action_pic_open(self, *args):
uri = 'file://' + self.view.get_active_pic().filename
Gtk.show_uri(None, uri, Gdk.CURRENT_TIME)
示例4: action_pic_directory
# 需要导入模块: from gi.repository import Gdk [as 别名]
# 或者: from gi.repository.Gdk import CURRENT_TIME [as 别名]
def action_pic_directory(self, *args):
trunc = -1 * len(self.view.get_active_pic().filename.split('/')[-1])
uri = 'file://' + self.view.get_active_pic().filename
Gtk.show_uri(None, uri[0:trunc], Gdk.CURRENT_TIME)
示例5: on_help_activate
# 需要导入模块: from gi.repository import Gdk [as 别名]
# 或者: from gi.repository.Gdk import CURRENT_TIME [as 别名]
def on_help_activate(self, *args):
Gtk.show_uri(None, 'help:dynamic-wallpaper-editor', Gdk.CURRENT_TIME)
示例6: search
# 需要导入模块: from gi.repository import Gdk [as 别名]
# 或者: from gi.repository.Gdk import CURRENT_TIME [as 别名]
def search(self, argv):
term = str(argv[-1])
self.app.search_term(term)
self.app.window.present_with_time(Gdk.CURRENT_TIME)
示例7: on_report
# 需要导入模块: from gi.repository import Gdk [as 别名]
# 或者: from gi.repository.Gdk import CURRENT_TIME [as 别名]
def on_report(self, *args):
"""Action callback, opening a new issue on the github repo."""
win = self.props.active_window
Gtk.show_uri_on_window(win, BUG_REPORT_URL, Gdk.CURRENT_TIME)
示例8: _show_help_page
# 需要导入模块: from gi.repository import Gdk [as 别名]
# 或者: from gi.repository.Gdk import CURRENT_TIME [as 别名]
def _show_help_page(self, suffix):
win = self.props.active_window
Gtk.show_uri_on_window(win, 'help:drawing' + suffix, Gdk.CURRENT_TIME)