+
    WBi7                     T   ^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# )   )_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                   V  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                   &   a  ] tR t^t o R tRtV tR# )Property.__metaclass__c                    R # )z<class 'GObject.Property'> selfs   &7/usr/lib/python3.14/site-packages/gi/_propertyhelper.py__repr__Property.__metaclass__.__repr__   s    /    r"   N)__name__
__module____qualname____firstlineno__r&   __static_attributes____classdictcell____classdict__s   @r%   __metaclass__r       s     	0 	0r(   r1   Nc
                   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 sz cannot be lower than 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$   rG   setterr8   r:   r?   r@   rB   rJ   rL   msgs   &&&&&&&&&& r%   __init__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                d    R V P                   ;'       g    R RV P                  P                    R2# )z<GObject Property z(uninitialized)z (z)>)r5   r8   r#   s   &r%   r&   Property.__repr__   s/    #DII$B$B1B#C2diinnEUUWXXr(   c                    Vf   V # R V n         V P                  V4      pV P                   '       d   V P                   pR V n         VhV# N)rM   fget)r$   instanceklassvalueexcs   &&&  r%   __get__Property.__get__   sE    K			(#999))CDIIr(   c                    Vf   \         hR V n        VP                  V P                  V4       V P                  '       d   V P                  pR V n        VhR # rU   )r>   rM   set_propertyr5   )r$   rW   rY   rZ   s   &&& r%   __set__Property.__set__   sK    O	dii/999))CDII r(   c                $    V P                  V4      # )z;Allows application of the getter along with init arguments.)rG   r$   rV   s   &&r%   __call__Property.__call__   s    {{4  r(   c                z    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.)rA   r@   rV   rb   s   &&r%   rG   Property.getter   s+    <<<DJ<<DL	r(   c                l    Wn         V P                  '       g   V P                  P                  V n        V # )z8Set the setter function to fset. For use as a decorator.)rH   r5   rV   r)   )r$   rH   s   &&r%   rN   Property.setter  s(    	 yyy		**DIr(   c                R   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_lookupr<   r8   
issubclassr   GObjectGEnumGFlagsGBoxed
GInterface	__gtype__r   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r>   )r$   type_s   &&r%   r7   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                Z    Ve   V# V P                   P                  V P                  R 4      # rU   )_default_lookupgetr8   )r$   r:   s   &&r%   r9   Property._get_default4  s*    N##''		488r(   c                N   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 stringsrq   zvariant value )TF)r8   r:   r   r>   r   r   is_ar   r   GTyper   r   r<   listr=   bytesr   hasattr)r$   ptyper:   vals   &   r%   r;   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      # rU   )_min_value_lookuprv   r8   r#   s   &r%   rI   Property._get_minimum`      %%))$))T::r(   c                N    V P                   P                  V P                  R 4      # rU   )_max_value_lookuprv   r8   r#   s   &r%   rK   Property._get_maximumc  r   r(   c                B    \        VR V P                  ,           V4       R# )_property_helper_N)setattrr5   r$   rW   rY   s   &&&r%   rF   Property._default_setterj  s    -		95Ar(   c                R    \        VR V P                  ,           V P                  4      # )r   )getattrr5   r:   r$   rW   s   &&r%   rE   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r>   r5   r8   r)   rM   r   s   &&&r%   rC   Property._readonly_setterp  s-    yyktH~'>'>&?}M
	r(   c                l    \        V P                   R \        V4      P                   R24      V n        R# )r   z is write-onlyNr   r   s   &&r%   rD   Property._writeonly_getteru  s-    yyktH~'>'>&?~N
	r(   c           	        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"   )r8   r	   r
   r   r   r   r   r   r   rJ   rL   r:   r   r   ry   r   r   r   r   r   r   r   NotImplementedErrorr?   r@   rB   )r$   r~   argss   &  r%   get_pspec_args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(   )rA   rM   r@   r:   rV   rB   rH   rL   rJ   r5   r?   r8   l         l    l    )8r)   r*   r+   r,   rA   intr	   boolr   floatr   r=   r   r6   r   rj   r
   r   r   r   
G_MAXFLOATG_MAXDOUBLEG_MININTr   	G_MINLONGr   r   	G_MAXUINT
G_MAXULONGG_MAXINT	G_MAXLONGr   ru   r8   r1   r   PARAM_READWRITErP   r&   r[   r_   rc   rG   rN   r7   r9   r;   rI   rK   rF   rE   rC   rD   r   r-   r.   r/   s   @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                ,  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                 R    VP                   P                  R R4      p\        WR4      # -_N)r5   replacer   )r$   pspecr5   s   && r%   obj_get_property,install_properties.<locals>.obj_get_property  s%    zz!!#s+t4((r(   c                    < VP                   P                  R R4      p\        SVR4      pV'       d   VP                  W4       R# R# r   )r5   r   r   rH   )r$   r   rY   r5   propclss   &&&  r%   obj_set_property,install_properties.<locals>.obj_set_property  s;    zz!!#s+sD$'IId" r(   )__dict__rv   itemsr<   r   r5   r   
ValueErrorappendr   rV   rE   rH   rF   r>   r)   r   r   )r   gpropertiespropsr5   r   r   r   s   f      r%   install_propertiesr     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   
_constantsr   r   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r"   r(   r%   <module>r      s   &       6 ^^
oo<<<<MM	MM	MM	^^
bE bEJ3+r(   