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


Python GObject.connect方法代码示例

本文整理汇总了Python中gobject.GObject.connect方法的典型用法代码示例。如果您正苦于以下问题:Python GObject.connect方法的具体用法?Python GObject.connect怎么用?Python GObject.connect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gobject.GObject的用法示例。


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

示例1: on_resource_load_finished

# 需要导入模块: from gobject import GObject [as 别名]
# 或者: from gobject.GObject import connect [as 别名]
 def on_resource_load_finished(self, func, *args ):
     from gobject import GObject
     def WebView_C_Callable( _webview, _webframe, _webresource, data):
         from .webkit3__WebKitWebFrame import WebKitWebFrame
         from .webkit3__WebKitWebResource import WebKitWebResource
         func( self, self.get_main_frame(), WebKitWebResource(None, obj=_webresource), *args)#WebKitWebFrame(None,obj=_webframe), WebKitWebResource(None,obj=_webresource), *args)
         return None
     CFUNC = CFUNCTYPE(None, POINTER(c_int), POINTER(c_int), POINTER(c_int), POINTER(c_int))
     GObject.connect( self, 'resource-load-finished', func, *args, cfunc = (CFUNC(WebView_C_Callable),CFUNC))
开发者ID:jaykhopale,项目名称:pywebkit3,代码行数:11,代码来源:webkit3__WebKitWebView.py

示例2: _attempt_connection

# 需要导入模块: from gobject import GObject [as 别名]
# 或者: from gobject.GObject import connect [as 别名]
 def _attempt_connection(self, _backoff):
     self._disconnect_viewer()
     self._session = SpiceClientGtk.Session()
     self._session.set_property('password', self._password)
     self._session.set_property('enable-usbredir', False)
     # Ensure clipboard sharing is disabled
     self._gtk_session = SpiceClientGtk.spice_gtk_session_get(self._session)
     self._gtk_session.set_property('auto-clipboard', False)
     GObject.connect(self._session, 'channel-new', self._new_channel)
     self._session.open_fd(-1)
开发者ID:cmusatyalab,项目名称:vmnetx,代码行数:12,代码来源:view.py

示例3: _connect_viewer

# 需要导入模块: from gobject import GObject [as 别名]
# 或者: from gobject.GObject import connect [as 别名]
 def _connect_viewer(self, password):
     self._disconnect_viewer()
     self._session = SpiceClientGtk.Session()
     self._session.set_property('password', password)
     self._session.set_property('enable-usbredir', False)
     # Ensure clipboard sharing is disabled
     self._gtk_session = SpiceClientGtk.spice_gtk_session_get(self._session)
     self._gtk_session.set_property('auto-clipboard', False)
     try:
         # Enable audio
         self._audio = SpiceClientGtk.Audio(self._session)
     except RuntimeError:
         # No local PulseAudio, etc.
         pass
     GObject.connect(self._session, 'channel-new', self._new_channel)
     self._session.open_fd(-1)
开发者ID:jaharkes,项目名称:vmnetx,代码行数:18,代码来源:view.py

示例4: _new_channel

# 需要导入模块: from gobject import GObject [as 别名]
# 或者: from gobject.GObject import connect [as 别名]
 def _new_channel(self, session, channel):
     if session != self._session:
         # Stale channel; ignore
         return
     GObject.connect(channel, 'open-fd', self._request_fd)
     GObject.connect(channel, 'channel-event', self._channel_event)
     type = SpiceClientGtk.spice_channel_type_to_string(
             channel.get_property('channel-type'))
     if type == 'display':
         # Create the display but don't show it until configured by
         # the server
         GObject.connect(channel, 'display-primary-create',
                 self._display_create)
         self._destroy_display()
         self._display_channel = channel
         self._display = SpiceClientGtk.Display(self._session,
                 channel.get_property('channel-id'))
         # Default was False in spice-gtk < 0.14
         self._display.set_property('scaling', True)
         self._display.connect('size-request', self._size_request)
         self._display.connect('keyboard-grab', self._grab, 'keyboard')
         self._display.connect('mouse-grab', self._grab, 'mouse')
         if self._motion_interval is not None:
             self._display.connect('motion-notify-event', self._motion)
     elif type == 'playback':
         if self._audio is None:
             try:
                 # Enable audio
                 self._audio = SpiceClientGtk.Audio(self._session)
             except RuntimeError:
                 # No local PulseAudio, etc.
                 pass
开发者ID:cmusatyalab,项目名称:vmnetx,代码行数:34,代码来源:view.py

示例5: _new_channel

# 需要导入模块: from gobject import GObject [as 别名]
# 或者: from gobject.GObject import connect [as 别名]
 def _new_channel(self, session, channel):
     if session != self._session:
         # Stale channel; ignore
         return
     GObject.connect(channel, 'open-fd', self._request_fd)
     GObject.connect(channel, 'channel-event', self._channel_event)
     type = SpiceClientGtk.spice_channel_type_to_string(
             channel.get_property('channel-type'))
     if type == 'display':
         # Create the display but don't show it until configured by
         # the server
         GObject.connect(channel, 'display-primary-create',
                 self._display_create)
         self._destroy_display()
         self._display_channel = channel
         self._display = SpiceClientGtk.Display(self._session,
                 channel.get_property('channel-id'))
         # Default was False in spice-gtk < 0.14
         self._display.set_property('scaling', True)
         self._display.connect('size-request', self._size_request)
         self._display.connect('keyboard-grab', self._grab, 'keyboard')
         self._display.connect('mouse-grab', self._grab, 'mouse')
         self._connect_display_signals(self._display)
开发者ID:jaharkes,项目名称:vmnetx,代码行数:25,代码来源:view.py

示例6: on_view_ready

# 需要导入模块: from gobject import GObject [as 别名]
# 或者: from gobject.GObject import connect [as 别名]
    def on_view_ready(self, func, *args):
        from gobject import GObject
        GObject.connect( self, 'load-finished', func, *args)

        
开发者ID:jaykhopale,项目名称:pywebkit3,代码行数:5,代码来源:webkit3__WebKitWebView.py


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