Hacked By AnonymousFox

Current Path : /usr/lib64/python3.6/site-packages/gi/overrides/__pycache__/
Upload File :
Current File : //usr/lib64/python3.6/site-packages/gi/overrides/__pycache__/Gio.cpython-36.pyc

3

��<_>#�@sJddlZddlmZmZddlmZmZddlmZddl	m
Z
ddlmZddl
Z
ed�ZgZGd	d
�d
ej�Zee�Zejd
�Gdd�dej�Zee�Zejd�Gd
d�dej�Zee�Zejd�Gdd�dej�Zee�Zejd�Gdd�dej�Zee�Zejd�Gdd�d�ZGdd�dej�Zee�Zejd�dS)�N�)�wakeup_on_signal�register_sigint_fallback)�override�deprecated_init)�get_introspection_module)�PyGIWarning)�GLib�Gioc@seZdZdd�ZdS)�ApplicationcOs<t|j��(t��tjj|f|�|�SQRXWdQRXdS)N)r�quitrr
r�run)�self�args�kwargs�r�/usr/lib64/python3.6/Gio.pyr
'szApplication.runN)�__name__�
__module__�__qualname__r
rrrrr%srcseZdZ�fdd�Z�ZS)�
VolumeMonitorcs&tt|�j||�tjdtdd�dS)NzZGio.VolumeMonitor shouldn't be instantiated directly, use Gio.VolumeMonitor.get() instead.r)�
stacklevel)�superr�__init__�warnings�warnr)rrr)�	__class__rrr3szVolumeMonitor.__init__)rrrr�
__classcell__rr)rrr1src@s eZdZdd�Zdd�ZeZdS)�FileEnumeratorcCs|S)Nr)rrrr�__iter__BszFileEnumerator.__iter__cCs|jd�}|dk	r|St�dS)N)Z	next_file�
StopIteration)r�	file_inforrr�__next__Es
zFileEnumerator.__next__N)rrrrr"�nextrrrrrAs	rc@seZdZdd�ZdS)�MenuItemcCs,x&|D]\}}}|j|tj||��qWdS)N)Zset_attribute_valuer	�Variant)rZ
attributes�name�
format_string�valuerrr�
set_attributeVszMenuItem.set_attributeN)rrrr)rrrrr$Usr$c@sTeZdZdZeejjdd�Zdd�Zdd	�Z	d
d�Z
e
Zdd
�Zdd�Z
dd�ZdS)�Settingsz0Provide dictionary-like access to GLib.Settings.�schema�path�backend)Z	arg_namescCs||j�kS)N)�	list_keys)r�keyrrr�__contains__eszSettings.__contains__cCst|j��S)N)�lenr.)rrrr�__len__hszSettings.__len__cCsdS)NTr)rrrr�__bool__kszSettings.__bool__cCs$||krtd|f��|j|�j�S)Nzunknown key: %r)�KeyErrorZ	get_value�unpack)rr/rrr�__getitem__sszSettings.__getitem__cCs�||krtd|f��|j|�}|jd�j�}|jd�}|dkrj|jd�j�}|jd�s\t�|dd�}nf|dkr�|jd�j�jd�s�t�|jd�jd�j�}|j�}||kr�td||f��nt	dt
|���|j|tj
||��dS)	Nzunknown key: %rr��type�a�enumz$value %s is not an allowed enum (%s)z'Cannot handle allowed type range class )r4Z	get_rangeZget_child_valueZ
get_stringZget_type_string�
startswith�AssertionErrorr5�
ValueError�NotImplementedError�strZ	set_valuer	r%)rr/r(�rangeZtype_�vZtype_strZallowedrrr�__setitem__zs"

zSettings.__setitem__cCs|j�S)N)r.)rrrr�keys�sz
Settings.keysN)r+r,r-)rrr�__doc__rr
r*rr0r2r3Z__nonzero__r6rBrCrrrrr*_sr*c@s4eZdZdZdd�Zdd�Zdd�Zedd	��Zd
S)�_DBusProxyMethodCallz1Helper class to implement DBusProxy method calls.cCs||_||_dS)N)�
dbus_proxy�method_name)rrFrGrrrr�sz_DBusProxyMethodCall.__init__c
Csv|\}}}y|j|�}WnFtk
r^tj�dd�\}}	|rN|||	|�n|||	|�dSX|||j|�|�dS)Nr)Zcall_finish�	Exception�sys�exc_info�_unpack_result)
r�obj�result�	user_dataZresult_callbackZerror_callbackZreal_user_data�ret�etype�errrZ__async_result_handler�s
z+_DBusProxyMethodCall.__async_result_handlercOs�|r0|d}|dd�}t|t�s4td|��nd}tj|t|��}d|kr�|d|jd�|jd�f}|jj|j	||jdd�|jd	d
�d|j
|�n0|jj|j	||jdd�|jd	d�d�}|j|�SdS)Nrr7z6first argument must be the method signature string: %rz()Zresult_handlerZ
error_handlerrN�flagsZtimeout���rS)
�
isinstancer?�	TypeErrorr	r%�tuple�getrFZcallrG�*_DBusProxyMethodCall__async_result_handlerZ	call_syncrK)rrrZ	signatureZarg_variantrNrMrrr�__call__�s&


z_DBusProxyMethodCall.__call__cCs2|j�}t|�dkr|d}nt|�dkr.d}|S)z?Convert a D-BUS return variant into an appropriate return valuer7rN)r5r1)�klassrMrrrrK�s
z#_DBusProxyMethodCall._unpack_resultN)	rrrrDrrXrY�classmethodrKrrrrrE�s
rEc@seZdZdZdd�ZdS)�	DBusProxya$Provide comfortable and pythonic method calls.

    This marshalls the method arguments into a GVariant, invokes the
    call_sync() method on the DBusProxy object, and unmarshalls the result
    GVariant back into a Python tuple.

    The first argument always needs to be the D-Bus signature tuple of the
    method call. Example:

      proxy = Gio.DBusProxy.new_sync(...)
      result = proxy.MyMethod('(is)', 42, 'hello')

    The exception are methods which take no arguments, like
    proxy.MyMethod('()'). For these you can omit the signature and just write
    proxy.MyMethod().

    Optional keyword arguments:

    - timeout: timeout for the call in milliseconds (default to D-Bus timeout)

    - flags: Combination of Gio.DBusCallFlags.*

    - result_handler: Do an asynchronous method call and invoke
         result_handler(proxy_object, result, user_data) when it finishes.

    - error_handler: If the asynchronous call raises an exception,
      error_handler(proxy_object, exception, user_data) is called when it
      finishes. If error_handler is not given, result_handler is called with
      the exception object as result instead.

    - user_data: Optional user data to pass to result_handler for
      asynchronous calls.

    Example for asynchronous calls:

      def mymethod_done(proxy, result, user_data):
          if isinstance(result, Exception):
              # handle error
          else:
              # do something with result

      proxy.MyMethod('(is)', 42, 'hello',
          result_handler=mymethod_done, user_data='data')
    cCs
t||�S)N)rE)rr&rrr�__getattr__szDBusProxy.__getattr__N)rrrrDr]rrrrr\�s,r\)rZ_ossighelperrrZ	overridesrr�modulerZgirZ
gi.repositoryr	rIr
�__all__r�appendrrr$r*rEr\rrrr�<module>s6



9
C1

Hacked By AnonymousFox1.0, Coded By AnonymousFox