관리-도구
편집 파일: module.cpython-39.pyc
a �����6Uc�&����������������������@���s����d�dl�Z�d�dlmZ�d�dlZddlmZmZmZmZm Z m Z mZmZm Z mZmZmZmZmZmZmZmZmZ�ddlmZmZ�ddlmZmZmZmZmZ�e� ��Z!i�Z"dd��Z#d d ��Z$G�dd��de%�Z&d d��Z'dS�)�����N)�Lock����)� 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$|jr$|jS�tS�|���}|���}t�d|��}t||�S��N�gi.repository.) Z get_parent� get_g_type�pytype�object� get_namespace�get_name� importlib� import_module�getattr)�object_infoZparent_object_infoZgtype� namespace�name�module��r+����//usr/lib64/python3.9/site-packages/gi/module.py�get_parent_for_objectA���s���� r-���c�����������������C���sD���g�}|�����D�]2}|���}|���}t�d|��}|�t||���q|S�r���)Zget_interfacesr"���r#���r$���r%����appendr&���)r'���� interfacesZinterface_infor(���r)���r*���r+���r+���r,����get_interfaces_for_objectX���s����r0���c�������������������@���s2���e�Zd�ZdZddd�Zdd��Zdd��Zd d ��ZdS�)�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���sZ���t��||��||�_||�_d|�|�_t��|�j�}|g|�_|�jdu�rNt��|�j�|�_t��|�_ dS�)z"Might raise gi._gi.RepositoryErrorr���N) � repositoryZrequire� _namespaceZ_version�__name__�get_typelib_path�__path__Zget_versionr����_lock)�selfr(����version�pathr+���r+���r,����__init__k���s���� zIntrospectionModule.__init__c��������������������s��t��|�j|�}|s$td|�j|f���t|t��rL|���}|�j���|j }|d�u��r|� ��r�|�t�rlt |�}q�|tksxJ��t|�}n(|�t�r�t|�}n|tks�J��t|�}||_d|����|_d�dd�}|���D�]&}|����|�}t||||������q�|���D�]}t||j|���q|tk�r(||_ W�d�����n1��s>0����Y���n�t|t��r�|���}t|t��r�t|���t ��fdd�t!|�D���} ��f| �} t"}n�t|t#��r�t$f} t"}n�t|t%��r�t&f} t"}ntt|t't(f��r:|�t)��r�t*f} nB|�t+��s|tk�s|j,|k�rt-f} nt.d|���|�/��f���t0}nt1|��|�j�~�|tk�r�|j }|d�u�r�|| v�r�||�j2|<�|W��d�����S�|d|�j�|d �} ||| | �}|tk�r�||_ W�d�����n1��s�0����Y��n0t|t3��r�|}nt|t4��r|���}nt1|��||�j2|<�|S�) Nz%r object has no attribute %rr�����ZabcdefgjhijklmnopqrstuvwxyzZABCDEFGJHIJKLMNOPQRSTUVWXYZc�����������������3���s���|�]}t���|�s|V��qd�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__)5r2���Zfind_by_namer3����AttributeErrorr4���� isinstancer���r���r7���r ���Zis_flagsZis_ar���r���r���r���r���r���r���rC���r"���rD���� maketransZ get_valuesZget_name_unescaped� translate�setattrZ get_valueZget_methodsr���r���r-����tupler0���r���r ���r���r ���r���r���r���r���r���r���Zfundamentalr���� TypeErrorr#���r����NotImplementedError�__dict__r���r ���)r8���r)����infoZg_type�wrapperZascii_upper_transZ value_infoZ value_nameZmethod_infor/����bases� metaclass�type_Zdict_r+���r@���r,����__getattr__{���s������ � * �� � ( zIntrospectionModule.__getattr__c�����������������C���s���t��|�j�}d|�j|f�S�)Nz <IntrospectionModule %r from %r>)r2���r5���r3���)r8���r:���r+���r+���r,����__repr__����s����zIntrospectionModule.__repr__c�����������������C���sF���t�t|�j��}|�|�j�����t�|�j�}|�dd��|D����t |�S�)Nc�����������������s���s ���|�]}t�|t�s|���V��qd�S�r=���)rF���r ���r#���)r?���rN���r+���r+���r,���rB�������s��� �z.IntrospectionModule.__dir__.<locals>.<genexpr>) �set�dir� __class__�updaterM����keysr2���Z get_infosr3����list)r8����resultZnamespace_infosr+���r+���r,����__dir__����s ����zIntrospectionModule.__dir__)N)r4���rD����__qualname__�__doc__r;���rS���rT���r\���r+���r+���r+���r,���r1���c���s ��� mr1���c�����������������C���s0���|�t�v�rt�|��S�t�|��}t|�|�}|t�|�<�|S�)z� :Returns: An object directly wrapping the gi module without overrides. Might raise gi._gi.RepositoryError )�_introspection_modules�giZget_required_versionr1���)r(���r9���r*���r+���r+���r,����get_introspection_module����s���� ra���)(r$���� threadingr���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_defaultr2���r_���r-���r0���r!���r1���ra���r+���r+���r+���r,����<module>���s���P�