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


Python gtk_client_base.GTKXpraClient类代码示例

本文整理汇总了Python中xpra.client.gtk_base.gtk_client_base.GTKXpraClient的典型用法代码示例。如果您正苦于以下问题:Python GTKXpraClient类的具体用法?Python GTKXpraClient怎么用?Python GTKXpraClient使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了GTKXpraClient类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: destroy_window

 def destroy_window(self, wid, window):
     #override so we can cleanup the group-leader if needed:
     GTKXpraClient.destroy_window(self, wid, window)
     group_leader = window.group_leader
     if group_leader is None or len(self._group_leader_wids)==0:
         return
     wids = self._group_leader_wids.get(group_leader)
     if wids is None:
         #not recorded any window ids on this group leader
         #means it is another managed window, leave it alone
         return
     if wid in wids:
         wids.remove(wid)
     if len(wids)>0:
         #still has another window pointing to it
         return
     #the last window has gone, we can remove the group leader,
     #find all the references to this group leader:
     refs = []
     for ref, gl in self._ref_to_group_leader.items():
         if gl==group_leader:
             refs.append(ref)
     for ref in refs:
         del self._ref_to_group_leader[ref]
     log("last window for refs %s is gone, destroying the group leader %s", refs, group_leader)
     group_leader.destroy()
开发者ID:svn2github,项目名称:Xpra,代码行数:26,代码来源:client.py

示例2: init

 def init(self, opts):
     GTKXpraClient.init(self, opts)
     if opts.window_layout:
         assert opts.window_layout in WINDOW_LAYOUTS
         self.ClientWindowClass = WINDOW_LAYOUTS.get(opts.window_layout)
     else:
         self.ClientWindowClass = ClientWindow
     log("init(..) ClientWindowClass=%s", self.ClientWindowClass)
开发者ID:svn2github,项目名称:Xpra,代码行数:8,代码来源:client.py

示例3: __init__

    def __init__(self):
        GTKXpraClient.__init__(self)
        self.border = None
        self.local_clipboard_requests = 0
        self.remote_clipboard_requests = 0

        self._ref_to_group_leader = {}
        self._group_leader_wids = {}
开发者ID:svn2github,项目名称:Xpra,代码行数:8,代码来源:client.py

示例4: init

 def init(self, opts):
     GTKXpraClient.init(self, opts)
     self.ClientWindowClass = BorderClientWindow
     self.remote_clipboard = opts.remote_clipboard
     self.local_clipboard = opts.local_clipboard
     log("init(..) ClientWindowClass=%s", self.ClientWindowClass)
     from xpra.platform.ui_thread_watcher import get_UI_watcher
     self.UI_watcher = get_UI_watcher(self.timeout_add)
开发者ID:svn2github,项目名称:Xpra,代码行数:8,代码来源:client.py

示例5: __init__

 def __init__(self):
     GTKXpraClient.__init__(self)
     self.UI_watcher = None
     self.border = None
     self.local_clipboard_requests = 0
     self.remote_clipboard_requests = 0
     #only used with the translated clipboard class:
     self.local_clipboard = ""
     self.remote_clipboard = ""
开发者ID:svn2github,项目名称:Xpra,代码行数:9,代码来源:client.py

示例6: process_ui_capabilities

 def process_ui_capabilities(self):
     GTKXpraClient.process_ui_capabilities(self)
     self.UI_watcher.start()
     #if server supports it, enable UI thread monitoring workaround when needed:
     def UI_resumed():
         self.send("resume", True, self._id_to_window.keys())
     def UI_failed():
         self.send("suspend", True, self._id_to_window.keys())
     self.UI_watcher.add_resume_callback(UI_resumed)
     self.UI_watcher.add_fail_callback(UI_failed)
开发者ID:ljmljz,项目名称:xpra,代码行数:10,代码来源:client.py

示例7: __init__

    def __init__(self):
        GTKXpraClient.__init__(self)
        self.GLClientWindowClass = None
        self.local_clipboard_requests = 0
        self.remote_clipboard_requests = 0

        #avoid ugly "not implemented" warning on win32
        self.supports_group_leader = not sys.platform.startswith("win")

        self._ref_to_group_leader = {}
        self._group_leader_wids = {}
开发者ID:svn2github,项目名称:Xpra,代码行数:11,代码来源:client.py

示例8: init

 def init(self, opts):
     GTKXpraClient.init(self, opts)
     if opts.window_layout:
         assert opts.window_layout in WINDOW_LAYOUTS
         self.ClientWindowClass = WINDOW_LAYOUTS.get(opts.window_layout)
     if self.ClientWindowClass:
         log.info("window layout '%s' specified, disabling OpenGL", opts.window_layout)
         opts.opengl = False
     else:
         self.ClientWindowClass = BorderClientWindow
         log("init(..) ClientWindowClass=%s", self.ClientWindowClass)
开发者ID:svn2github,项目名称:Xpra,代码行数:11,代码来源:client.py

示例9: get_notifier_classes

 def get_notifier_classes(self):
     ncs = GTKXpraClient.get_notifier_classes(self)
     try:
         from xpra.client.gtk2.gtk2_notifier import GTK2_Notifier
         ncs.append(GTK2_Notifier)
     except Exception, e:
         log.warn("cannot load GTK2 notifier: %s", e)
开发者ID:svn2github,项目名称:Xpra,代码行数:7,代码来源:client.py

示例10: make_hello

 def make_hello(self):
     capabilities = GTKXpraClient.make_hello(self)
     capabilities["encoding.supports_delta"] = [
         x for x in ("png", "rgb24", "rgb32") if x in self.get_core_encodings()
     ]
     capabilities["pointer.grabs"] = True
     return capabilities
开发者ID:svn2github,项目名称:Xpra,代码行数:7,代码来源:client.py

示例11: process_ui_capabilities

 def process_ui_capabilities(self, capabilities):
     GTKXpraClient.process_ui_capabilities(self, capabilities)
     if self.server_randr:
         display = gdk.display_get_default()
         i=0
         while i<display.get_n_screens():
             screen = display.get_screen(i)
             screen.connect("size-changed", self._screen_size_changed)
             i += 1
     #if server supports it, enable UI thread monitoring workaround when needed:
     if self.suspend_resume and (sys.platform.startswith("darwin") or FAKE_UI_LOCKUPS>0):
         self.start_UI_thread_polling()
         if FAKE_UI_LOCKUPS>0:
             def sleep_in_ui_thread(*args):
                 time.sleep(FAKE_UI_LOCKUPS)
                 return True
             gobject.timeout_add((10+FAKE_UI_LOCKUPS)*1000, sleep_in_ui_thread)
开发者ID:svn2github,项目名称:Xpra,代码行数:17,代码来源:client.py

示例12: do_get_core_encodings

 def do_get_core_encodings(self):
     encodings = GTKXpraClient.do_get_core_encodings(self)
     #we can handle rgb32 format (but not necessarily transparency!)
     def add(x):
         if x in self.allowed_encodings and x not in encodings:
             encodings.append(x)
     add("rgb32")
     return encodings
开发者ID:svn2github,项目名称:Xpra,代码行数:8,代码来源:client.py

示例13: do_get_core_encodings

 def do_get_core_encodings(self):
     cencs = GTKXpraClient.do_get_core_encodings(self)
     for x in ("webp", ):
         if x in cencs:
             cencs.remove(x)
     #for some reason, the cairo_workaround does not work for ARGB32
     #cencs.append("rgb32")
     return cencs
开发者ID:svn2github,项目名称:Xpra,代码行数:8,代码来源:client.py

示例14: get_notifier_classes

 def get_notifier_classes(self):
     ncs = GTKXpraClient.get_notifier_classes(self)
     if not WIN32:
         #for some reason, not included in win32 builds?
         try:
             from xpra.client.gtk3.gtk3_notifier import GTK3_Notifier
             ncs.append(GTK3_Notifier)
         except Exception, e:
             log("failed to load the GTK3 notification class: %s", e)
开发者ID:svn2github,项目名称:Xpra,代码行数:9,代码来源:client.py

示例15: process_ui_capabilities

 def process_ui_capabilities(self, capabilities):
     GTKXpraClient.process_ui_capabilities(self, capabilities)
     if self.server_randr:
         display = gdk.display_get_default()
         i=0
         while i<display.get_n_screens():
             screen = display.get_screen(i)
             screen.connect("size-changed", self.screen_size_changed)
             i += 1
     global UI_watcher
     UI_watcher.start()
     #if server supports it, enable UI thread monitoring workaround when needed:
     if self.suspend_resume:
         def UI_resumed():
             self.send("resume", True, self._id_to_window.keys())
         def UI_failed():
             self.send("suspend", True, self._id_to_window.keys())
         UI_watcher.add_resume_callback(UI_resumed)
         UI_watcher.add_fail_callback(UI_failed)
开发者ID:svn2github,项目名称:Xpra,代码行数:19,代码来源:client.py


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