???<!-- GIF89;a -->
123123123123
.....................................................................................................................................???<!-- GIF89;a -->
123123123123
.....................................................................................................................................3
‰å<_n  ã               @   sˆ  d dl mZ d dlmZ eeeƒZd dlZd dlZd dlZd dl	Z	dZ
dejkrXee
ƒ‚ddlmZ ddlmZ dd	lmZ dd
lmZ ddlmZ eZeZeZi ZejjejjeƒdƒZe	jdƒZeejej< eje_eje_ejdd… ZdjeŽ ZG dd„ de	jƒZ e de
ƒejd< e de
ƒejd< e de
ƒejd< e de
ƒejd< e de
ƒejd< dd„ Z!dd„ Z"dd„ Z#dd„ Z$ddd„Z%dS ) é    )Úabsolute_import)Úextend_pathNzÜWhen using gi.repository you must not import static modules like "gobject". Please change all occurrences of "import gobject" to "from gi.repository import GObject". See: https://bugzilla.gnome.org/show_bug.cgi?id=709183Zgobjecté   )Ú_gi)Ú_API)Ú
Repository)ÚPyGIDeprecationWarning)ÚPyGIWarningZ	overrideszgi._gobjectz{0}.{1}.{2}c               @   s   e Zd ZdZdd„ ZdS )Ú_DummyStaticModuleNc             C   s   t tƒ‚d S )N)ÚAttributeErrorÚ_static_binding_error)ÚselfÚname© r   ú /usr/lib64/python3.6/__init__.pyÚ__getattr__D   s    z_DummyStaticModule.__getattr__)Ú__name__Ú
__module__Ú__qualname__Ú__path__r   r   r   r   r   r
   A   s   r
   ZglibZgioZgtkzgtk.gdkc             C   s@   t | tƒr ttt| jdƒƒƒ}n| }|tkr<td| tf ƒ‚d S )NÚ.zNpygobject's version %s required, and available version %s is not recent enough)	Ú
isinstanceÚstrÚtupleÚmapÚintÚsplitÚversion_infoÚ
ValueErrorÚ__version__)ÚversionZversion_listr   r   r   Úcheck_versionO   s    
r!   c             C   sÐ   t jƒ }tjd dkr*t|tƒs<tdƒ‚nt|tƒs<tdƒ‚| |jƒ krj|j	| ƒ}||krjtd| |f ƒ‚| t
kr’t
|  |kr’td| t
|  f ƒ‚|j| ƒ}|s¬td|  ƒ‚||krÄtd| |f ƒ‚|t
| < dS )	a­   Ensures the correct versions are loaded when importing `gi` modules.

    :param namespace: The name of module to require.
    :type namespace: str
    :param version: The version of module to require.
    :type version: str
    :raises ValueError: If module/version is already loaded, already required, or unavailable.

    :Example:

    .. code-block:: python

        import gi
        gi.require_version('Gtk', '3.0')

    r   é   z'Namespace version needs to be a string.z.Namespace %s is already loaded with version %sz(Namespace %s already requires version %szNamespace %s not availablez)Namespace %s not available for version %sN)r   Zget_defaultÚsysr   r   Z
basestringr   r   Zget_loaded_namespacesZget_versionÚ	_versionsZenumerate_versions)Ú	namespacer    Z
repositoryZloaded_versionZavailable_versionsr   r   r   Úrequire_version\   s*    




r&   c             C   s$   x| j ƒ D ]\}}t||ƒ q
W dS )a3   Utility function for consolidating multiple `gi.require_version()` calls.

    :param requires: The names and versions of modules to require.
    :type requires: dict

    :Example:

    .. code-block:: python

        import gi
        gi.require_versions({'Gtk': '3.0', 'GLib': '2.0', 'Gio': '2.0'})
    N)Úitemsr&   )ZrequiresZmodule_nameZmodule_versionr   r   r   Úrequire_versions‹   s    r(   c             C   s   t j| d ƒS )N)r$   Úget)r%   r   r   r   Úget_required_versionœ   s    r*   c             C   sP   yt j| |ƒ W n. tk
r> } ztt|ƒƒ‚W Y dd}~X nX tjd| ƒ dS )a©  Ensure the given foreign marshaling module is available and loaded.

    :param str namespace:
        Introspection namespace of the foreign module (e.g. "cairo")
    :param symbol:
        Optional symbol typename to ensure a converter exists.
    :type symbol: str or None
    :raises: ImportError

    :Example:

    .. code-block:: python

        import gi
        import cairo
        gi.require_foreign('cairo')

    Nzgi.repository)r   Úrequire_foreignÚ	ExceptionÚImportErrorr   Ú	importlibÚimport_module)r%   ZsymbolÚer   r   r   r+       s
    r+   )N)&Z
__future__r   Zpkgutilr   r   r   r#   Úosr.   Útypesr   Úmodulesr-   Ú r   r   r   r   r	   r$   ÚpathÚjoinÚdirnameÚ__file__Z_overridesdirÚ
ModuleTypeZ_gobjectZ_PyGObject_APIZpygobject_versionr   Úformatr   r
   r!   r&   r(   r*   r+   r   r   r   r   Ú<module>   sH   



/