+
    hvh7  c                   sT   ^RI Ht ^RIHtHtHtHtHtHtH	t	H
t
HtHtHtHtHtHtHtHtHtHtHtHtHtHtHtHt ]P6                  t]P8                  t]P:                  t]P<                  t]P>                  t]P@                  t ]PB                  t!]PD                  t" ! R R4      t#R t$R# )i   )_gi)	TYPE_NONETYPE_INTERFACE	TYPE_CHAR
TYPE_UCHARTYPE_BOOLEANTYPE_INT	TYPE_UINT	TYPE_LONG
TYPE_ULONG
TYPE_INT64TYPE_UINT64	TYPE_ENUM
TYPE_FLAGS
TYPE_FLOATTYPE_DOUBLETYPE_STRINGTYPE_POINTER
TYPE_BOXED
TYPE_PARAMTYPE_OBJECTTYPE_PYOBJECT
TYPE_GTYPE	TYPE_STRVTYPE_VARIANTc                   sV  a  ] tR t^9t o Rt]]]]]	]
]]]]/t]^ ]^ ]^ ]]) ]
]) ]]]]]R/t]]]]]R]R]]]
]]]]]/t]^ ]^ ]^ ]^ ]^ ]^ ]R]R]
R/	t  ! R R]!4      t"RRRRRR]#PH                  RR3	R lt%R t&R	 t'R
 t(R t)R t*R t+R t,R t-R t.R t/R t0R t1R t2R t3R t4R t5Rt6V t7R# )Propertya  Creates a new Property which when used in conjunction with
GObject subclass will create a Python property accessor for the
GObject ParamSpec.

:param callable getter:
    getter to get the value of the property
:param callable setter:
    setter to set the value of the property
:param type type:
    type of property
:param default:
    default value, must match the property type.
:param str nick:
    short description
:param str blurb:
    long description
:param GObject.ParamFlags flags:
    parameter flags
:keyword minimum:
    minimum allowed value (int, float, long only)
:keyword maximum:
    maximum allowed value (int, float, long only)

.. code-block:: python

    class MyObject(GObject.Object):
        prop = GObject.Property(type=str)


    obj = MyObject()
    obj.prop = "value"

    obj.prop  # now is 'value'

The API is similar to the builtin :py:func:`property`:

.. code-block:: python

    class AnotherObject(GObject.Object):
        value = 0

        @GObject.Property
        def prop(self):
            "Read only property."
            return 1

        @GObject.Property(type=int)
        def propInt(self):
            "Read-write integer property."
            return self.value

        @propInt.setter
        def propInt(self, value):
            self.value = value
 g        c                   s&   a  ] tR t^t o R tRtV tR# )Property.__metaclass__c                s    R # )z<class 'GObject.Property'> self   &9/usr/lib64/python3.14/site-packages/gi/_propertyhelper.py__repr__ZProperty.__metaclass__.__repr__   s    /    r   N)__name__
__module____qualname____firstlineno__r!   __static_attributes____classdictcell__Z__classdict__   @r    __metaclass__r      s     	0 	0r"   r+   Nc
                s   R V n         Vf   \        pV P                  V4      V n        V P	                  V4      V n        V P                  4        \        V\        4      '       g   \        R4      hWPn
        \        V\        4      '       g   \        R4      hW`n        W`n        Wpn        V'       d   V'       g   V P                  pMEV'       d   V'       g   V P                  pM(V'       g!   V'       g   V P                   pV P"                  pV P%                  V4       W n        VeC   WP)                  4       8  d.   RV P                  R RV P)                  4       R 2p
\        V
4      hMV P)                  4       pWn        V	eC   WP-                  4       8  d.   RV P                  R RV P-                  4       R 2p
\        V
4      hMV P-                  4       p	Wn        R V n        R # )	Nznick must be a stringzblurb must be a stringzMinimum for type Zsz cannot be lower than ZdzMaximum for type z cannot be higher than )nameobject_type_from_pythontype_get_defaultdefault_check_default
isinstancestr	TypeErrornickblurb__doc__flags_readonly_setter_writeonly_getter_default_getter_default_settergetterfset_get_minimumminimum_get_maximummaximum_exc)r   r>   setterr/   r1   r6   r7   r9   rA   rC   Zmsgs   &&&&&&&&&& r    __init__ZProperty.__init__   s    	<D**40	((1$$$344	%%%455
 
 &**FF++F))F))FF 	**,,)$))A6LTM^M^M`abLcdn$ - '')G**,,)$))A6MdN_N_NabcMden$ - '')G	r"   c                sd    R V P                   ;'       g    R RV P                  P                    R2# )z<GObject Property z(uninitialized)z (z)>)r,   r/   r   r   r    r!   ZProperty.__repr__   s/    #DII$B$B1B#C2diinnEUUWXXr"   c                s    Vf   V # R V n         V P                  V4      pV P                   '       d   V P                   pR V n         VhV# N)rD   fget)r   instanceZklassvalueexcs   &&&  r    __get__ZProperty.__get__   sE    K			(#999))CDIIr"   c                s    Vf   \         hR V n        VP                  V P                  V4       V P                  '       d   V P                  pR V n        VhR # rG   )r5   rD   Zset_propertyr,   )r   rI   rJ   rK   s   &&& r    __set__ZProperty.__set__   sK    O	dii/999))CDII r"   c                s$    V P                  V4      # )z;Allows application of the getter along with init arguments.)r>   r   rH      &&r    __call__ZProperty.__call__   s    {{4  r"   c                sz    VP                   '       d#   VP                   V n        VP                   V n         Wn        V # )z8Set the getter function to fget. For use as a decorator.)r8   r7   rH   rN   rO   r    r>   ZProperty.getter   s+    <<<DJ<<DL	r"   c                sl    Wn         V P                  '       g   V P                  P                  V n        V # )z8Set the setter function to fset. For use as a decorator.)r?   r,   rH   r#   )r   r?   rO   r    rE   ZProperty.setter  s(    	 yyy		**DIr"   c                sR   WP                   9   d   V P                   V,          # \        V\        4      '       dj   \        V\        P
                  \        P                  \        P                  \        P                  \        P                  34      '       d   VP                  # V\        \        \        \        \        \         \"        \$        \&        \(        \*        \,        \.        \0        \2        \4        \6        \8        \:        \<        \>        \@        39   d   V# \C        R V: 24      h)zUnsupported type: )"_type_from_pytype_lookupr3   r/   Z
issubclassr    ZGObjectZGEnumZGFlagsZGBoxedZ
GInterface	__gtype__r   r   r   r   r   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r5   )r   Ztype_rO   r    r.   ZProperty._type_from_python  s    1110077eT""zCKKCJJ

CNNS(
 (
 ??"-
 
0 L,UI677r"   c                sZ    Ve   V# V P                   P                  V P                  R 4      # rG   )_default_lookupgetr/   )r   r1   rO   r    r0   ZProperty._get_default4  s*    N##''		488r"   c                sN   V P                   pV P                  pV\        8X  d   VR9  d   \        RV: 24      hV\        8X  d   Ve   \        R4      hR# V\
        8X  d   Ve   \        R4      hR# VP                  \        4      '       dO   Vf   \        R4      h\        P                  ! V4      P                  V4      '       g   \        RV RV: 24      hR# VP                  \        4      '       d@   \        P                  ! V4      P                  V4      '       g   \        RV RV: 24      hR# VP                  \        4      '       d`   Ve\   \        V\        4      '       g   \        R	V: R
24      hV F-  p\        V4      \        \        39  g   K  \        R	V: R24      h	  R# VP                  \         4      '       d\   VeV   \#        VR4      '       d0   \        P                  ! V4      P                  \         4      '       g   \        RV RV: 24      hR# R# R# )Tz#default must be True or False, not Nz)object types does not have default valuesz(GType types does not have default valuesz%enum properties needs a default valuezenum value z must be an instance of zflags value zStrv value z must be a listz must contain only stringsrR   zvariant value )TF)r/   r1   r   r5   r   r   is_ar   r    ZGTyper   r   r3   Zlistr4   Zbytesr   Zhasattr)r   ptyper1   Zvals   &   r    r2   ZProperty._check_default9  s   		,,L g]&BA'MNNM!" KLL #j " JKK #ZZ	"" GHH99W%**511!'*B5)L  2 ZZ
##99W%**511"7)+CE9M  2 ZZ	""w':gt,,+g[ HII9S%L0#k'<V$WXX  JJ|$$#G[11yy)..|<< nWI5MeYWXX = $ %r"   c                N    V P                   P                  V P                  R 4      # rG   )_min_value_lookuprT   r/   r   r   r    r@   ZProperty._get_minimum`      %%))$))T::r"   c                rW   rG   )_max_value_lookuprT   r/   r   r   r    rB   ZProperty._get_maximumc  rY   r"   c                sB    \        VR V P                  ,           V4       R# )_property_helper_N)Zsetattrr,   r   rI   rJ      &&&r    r=   ZProperty._default_setterj  s    -		95Ar"   c                sR    \        VR V P                  ,           V P                  4      # )r[   )getattrr,   r1   r   rI   rO   r    r<   ZProperty._default_getterm  s    x!4tyy!@$,,OOr"   c                l    \        V P                   R \        V4      P                   R24      V n        R# ) property of z is read-onlyNr5   r,   r/   r#   rD   r\   r]   r    r:   ZProperty._readonly_setterp  s-    yyktH~'>'>&?}M
	r"   c                r`   )ra   z is write-onlyNrb   r_   rO   r    r;   ZProperty._writeonly_getteru  s-    yyktH~'>'>&?~N
	r"   c           	     s   V P                   pV\        \        \        \        \
        \        \        \        39   d%   V P                  V P                  V P                  3pMV\        \        39   gR   VP                  \        4      '       g7   VP                  \         4      '       g   VP                  \"        4      '       d   V P                  3pMUV\$        \&        39   g7   VP                  \(        4      '       g   VP                  \*        4      '       d   RpM\-        V4      hV P                   V P.                  V P0                  .VOV P2                  N5# )Nr   )r/   r   r   r   r	   r
   r   r   r   rA   rC   r1   r   r   rU   r   r   r   r   r   r   r   ZNotImplementedErrorr6   r7   r9   )r   rV   Zargss   &  r    get_pspec_argsZProperty.get_pspec_args~  s    			
 	
 <<t||;Dk<00zz)$$zz*%%zz,''LL?DmZ00zz+&&zz*%%D%e,,		499djjD4DDDr"   )r8   rD   r7   r1   rH   r9   r?   rC   rA   r,   r6   r/   l         l    l    )8r#   r$   r%   r&   r8   Zintr   Zboolr   Zfloatr   r4   r   r-   r   rQ   r   r	   r   r   
G_MAXFLOATG_MAXDOUBLEG_MININTr   	G_MINLONGr
   rX   	G_MAXUINT
G_MAXULONGG_MAXINT	G_MAXLONGrZ   rS   r/   r+   r    ZPARAM_READWRITErF   r!   rL   rM   rP   r>   rE   r.   r0   r2   r@   rB   r=   r<   r:   r;   rc   r'   r(   r)   r*   r    r   r   9   s^    6r 	Xl{[  	1AQZKk\(9H
 	9JIYJ[(9	 	!11AAQRCS
O0 0 !!=~Y	! 8D9
%YN;;BP


E Er"   r   c                s,  a  S P                   P                  R/ 4      p. pS P                   P                  4        F  w  r4\        V\        4      '       g   K  VP
                  '       g   W4n        VP
                  V9   dA   WP
                  ,          VP                  4       8X  d   Km  \        RVP
                   R24      hVP                  4       WP
                  &   VP                  V4       K  	  V'       g   R# VS n	        RS P                   9   g   RS P                   9   dZ   V FS  pVP                  VP                  8w  g   VP                  VP                  8w  g   K;  \        RS P                  : R24      h	  R	 pVS n        V 3R
 lpVS n        R# )zScans the given class for instances of Property and merges them
into the classes __gproperties__ dict if it exists or adds it if not.
__gproperties__z	Property z% was already found in __gproperties__Ndo_get_propertydo_set_propertyzGObject subclass zl defines do_get/set_property and it also uses a property with a custom setter or getter. This is not allowedc                 sR    VP                   P                  R R4      p\        WR4      # Z-Z_N)r,   replacer^   )r   pspecr,   s   && r    obj_get_propertyZ,install_properties.<locals>.obj_get_property  s%    zz!!#s+t4((r"   c                 s   < VP                   P                  R R4      p\        SVR4      pV'       d   VP                  W4       R# R# ro   )r,   rp   r^   r?   )r   rq   rJ   r,   propclss   &&&  r    obj_set_propertyZ,install_properties.<locals>.obj_set_property  s;    zz!!#s+sD$'IId" r"   )Z__dict__rT   Zitemsr3   r   r,   rc   Z
ValueErrorZappendrl   rH   r<   r?   r=   r5   r#   rm   rn   )rt   ZgpropertiesZpropsr,   rs   rr   ru   s   f      r    install_propertiesrv     sW    ,,""#4b9KEll((*
dH%% 999 	 yyK'yy)T-@-@-BB 		{*OP  &*%8%8%:K		"LL! +$ %CCLL(,=,MDyyD000DIIAUAU4U''7 86 6  ) +C# +Cr"   N)%r   r    Z
_constantsr   r   r   r   r   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rd   re   rf   rj   rh   rg   rk   ri   r   rv   r   r"   r    <module>rw      s   &       6 ^^
oo<<<<MM	MM	MM	^^
bE bEJ3+r"   