ok

Mini Shell

Direktori : /proc/thread-self/root/lib/python2.7/site-packages/pyudev/
Upload File :
Current File : //proc/thread-self/root/lib/python2.7/site-packages/pyudev/glib.pyc

�
��:Oc@`sjdZddlmZmZmZmZddlZddlZdejfd��YZ	ej
e	�dS(u�
    pyudev.pygtk
    ============

    Provide :class:`~pyudev.glib.GUDevMonitorObserver` to integrate a
    :class:`~pyudev.Monitor` into a :class:`glib.MainLoop`.

    To use this module, :mod:`glib` and :mod:`gobject` from PyGObject_ must be
    available.  PyGtk is not required.

    .. _PyGObject: http://www.pygtk.org/

    .. moduleauthor::  Sebastian Wiesner  <lunaryorn@googlemail.com>
    .. versionadded:: 0.7
i(tprint_functiontdivisiontunicode_literalstabsolute_importNtGUDevMonitorObservercB`seZdZidd6dd6dd6dd6Ziejejejejffe	d	�6ejejejffe	d�6ejejejffe	d�6ejejejffe	d�6ejejejffe	d�6Z
d
�Zed��Z
e
jd��Z
d
�ZRS(u
    Observe a :class:`~pyudev.Monitor` and emit Glib signals upon device
    events:

    >>> context = pyudev.Context()
    >>> monitor = pyudev.Monitor.from_netlink(context)
    >>> monitor.filter_by(subsystem='input')
    >>> observer = pyudev.pygtk.GUDevMonitorObserver(monitor)
    >>> def device_connected(observer, device):
    ...     print('{0!r} added'.format(device))
    >>> observer.connect('device-added', device_connected)
    >>> monitor.start()

    This class is a child of :class:`gobject.GObject`.
    udevice-addeduaddudevice-removeduremoveudevice-changeduchangeudevice-movedumoveudevice-eventcC`s/tjj|�||_d|_t|_dS(N(tgobjecttGObjectt__init__tmonitortNonetevent_sourcetTruetenabled(tselfR((s//usr/lib/python2.7/site-packages/pyudev/glib.pyRTs		cC`s
|jdk	S(u�
        Whether this observer is enabled or not.

        If ``True`` (the default), this observer is enabled, and emits events.
        Otherwise it is disabled and does not emit any events.

        .. versionadded:: 0.14
        N(R
R	(R
((s//usr/lib/python2.7/site-packages/pyudev/glib.pyRZs
cC`sf|r9|jdkr9tj|jtj|j�|_n)|rb|jdk	rbtj|j�ndS(N(R
R	tglibtio_add_watchRtIO_INt_process_udev_eventt
source_remove(R
tvalue((s//usr/lib/python2.7/site-packages/pyudev/glib.pyRfs
cC`sd|tjkr`|jj�}|r`|\}}|jd||�|j|j||�q`ntS(Nudevice-event(RRRtreceive_devicetemitt_action_signal_mapR(R
tsourcet	conditionteventtactiontdevice((s//usr/lib/python2.7/site-packages/pyudev/glib.pyRns(t__name__t
__module__t__doc__RRtSIGNAL_RUN_LASTt	TYPE_NONEtTYPE_STRINGt
TYPE_PYOBJECTtstrt__gsignals__RtpropertyRtsetterR(((s//usr/lib/python2.7/site-packages/pyudev/glib.pyR,s&	(Rt
__future__RRRRRRRRt
type_register(((s//usr/lib/python2.7/site-packages/pyudev/glib.pyt<module> s
"L

Zerion Mini Shell 1.0