ÿØÿà JFIF      ÿÛ C      

!"$"$ÿÛ C  ÿÂ p " ÿÄ              ÿÄ             ÿÚ    ÕÔË®
(%	aA*‚XYD¡(J„¡E¢RE,P€XYae )(E¤²€B¤R¥	BQ¤¢ X«)X…€¤   @  

  ..............................................................................................................................................................................
.............................................................................                                                  
                                                                                                                                                                                     ÿØÿà JFIF      ÿÛ C      

!"$"$ÿÛ C  ÿÂ p " ÿÄ              ÿÄ             ÿÚ    ÕÔË®
(%	aA*‚XYD¡(J„¡E¢RE,P€XYae )(E¤²€B¤R¥	BQ¤¢ X«)X…€¤   @  

  ..............................................................................................................................................................................
.............................................................................                                                  
                                                                                                                                                                                     o
    b^M%                     @   s   d dl Z d dlZddlmZmZmZmZmZmZm	Z	m
Z
mZmZmZmZmZmZmZmZmZmZ ddlmZmZ ddlmZmZmZmZmZ e Zi Z dd Z!dd	 Z"G d
d de#Z$dd Z%dS )    N   )
RepositoryFunctionInfoRegisteredTypeInfoEnumInfo
ObjectInfoInterfaceInfoConstantInfo
StructInfo	UnionInfoCallbackInfoStructBoxed	CCallbackenum_addenum_register_new_gtype_and_add	flags_add flags_register_new_gtype_and_add
GInterface)GObjectMeta
StructMeta)	TYPE_NONE
TYPE_BOXEDTYPE_POINTER	TYPE_ENUM
TYPE_FLAGSc                 C   sP   |   }|s|  }|r|jr|jS tS | }| }td| }t||S Ngi.repository.)	Z
get_parent
get_g_typepytypeobjectget_namespaceget_name	importlibimport_modulegetattr)object_infoZparent_object_infoZgtype	namespacenamemodule r*   +/usr/lib/python3/dist-packages/gi/module.pyget_parent_for_object@   s   

r,   c                 C   sD   g }|   D ]}| }| }td| }|t|| q|S r   )Zget_interfacesr!   r"   r#   r$   appendr%   )r&   
interfacesZinterface_infor'   r(   r)   r*   r*   r+   get_interfaces_for_objectW   s   r/   c                   @   s2   e Zd ZdZdddZdd Zdd Zd	d
 ZdS )IntrospectionModuleaU  An object which wraps an introspection typelib.

    This wrapping creates a python module like representation of the typelib
    using gi repository as a foundation. Accessing attributes of the module
    will dynamically pull them in and create wrappers for the members.
    These members are then cached on this introspection module.
    Nc                 C   sV   t || || _|| _d| | _t | j}|g| _| jdu r)t | j| _dS dS )z"Might raise gi._gi.RepositoryErrorr   N)
repositoryZrequire
_namespaceZ_version__name__get_typelib_path__path__Zget_version)selfr'   versionpathr*   r*   r+   __init__j   s   

zIntrospectionModule.__init__c                    s  t | j|}|std| j|f t|tr| }|j}|d u r|	 r;|
tr0t|}n|tks6J t|}n|
trEt|}n
|tksKJ t|}||_d|  |_ddd}| D ]}| |}t||||  qc| D ]	}t||j| q{|tkr||_nt|tr1| }t|trt| t fddt |D }	 f|	 }
t!}nKt|t"rt#f}
t!}n@t|t$rt%f}
t!}n5t|t&t'fr|
t(rt)f}
n|
t*s|tks|j+|krt,f}
nt-d| |. f t/}nt0||tkr|j}|d ur||
vr|| j1|< |S |d| j |d	}|||
|}|tkr0||_nt|t2r:|}nt|t3rE| }nt0||| j1|< |S )
Nz%r object has no attribute %rr    ZabcdefgjhijklmnopqrstuvwxyzZABCDEFGJHIJKLMNOPQRSTUVWXYZc                 3   s    | ]
}t  |s|V  qd S N)
issubclass).0Z	interfaceparentr*   r+   	<genexpr>   s    z2IntrospectionModule.__getattr__.<locals>.<genexpr>z$unable to create a wrapper for %s.%s)__info__
__module__Z	__gtype__)4r1   Zfind_by_namer2   AttributeErrorr3   
isinstancer   r   r   Zis_flagsZis_ar   r   r   r   r   r   r   rA   r!   rB   	maketransZ
get_valuesZget_name_unescaped	translatesetattrZ	get_valueZget_methodsr   r   r,   tupler/   r   r   r   r   r   r
   r   r   r   r   Zfundamentalr   	TypeErrorr"   r   NotImplementedError__dict__r   r	   )r6   r(   infoZg_typewrapperZascii_upper_transZ
value_infoZ
value_nameZmethod_infor.   bases	metaclassZtype_Zdict_r*   r>   r+   __getattr__x   s   
















zIntrospectionModule.__getattr__c                 C   s   t | j}d| j|f S )Nz <IntrospectionModule %r from %r>)r1   r4   r2   )r6   r8   r*   r*   r+   __repr__   s   zIntrospectionModule.__repr__c                 C   sF   t t| j}|| j  t| j}|dd |D  t	|S )Nc                 s   s"    | ]}t |ts| V  qd S r;   )rD   r   r"   )r=   rL   r*   r*   r+   r@      s    z.IntrospectionModule.__dir__.<locals>.<genexpr>)
setdir	__class__updaterK   keysr1   Z	get_infosr2   list)r6   resultZnamespace_infosr*   r*   r+   __dir__   s
   zIntrospectionModule.__dir__r;   )r3   rB   __qualname____doc__r9   rP   rQ   rY   r*   r*   r*   r+   r0   b   s    
jr0   c                 C   s0   | t v rt |  S t| }t| |}|t | < |S )z
    :Returns:
        An object directly wrapping the gi module without overrides.

    Might raise gi._gi.RepositoryError
    )_introspection_modulesgiZget_required_versionr0   )r'   r7   r)   r*   r*   r+   get_introspection_module   s   

r^   )&r#   r]   Z_gir   r   r   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   typesr   r   Z
_constantsr   r   r   r   r   get_defaultr1   r\   r,   r/   r    r0   r^   r*   r*   r*   r+   <module>   s   P 