+
    QiT  c                   s    R t RtRtRtRtRt^ RIt^ RIt]P                  ! RR4       ^ R	I	H
t
 ^ R
I	Ht ^RIHt ^RIHt  ! R R4      tR# )=Utilities for obtaining objects via the collection interface.z$Id$z
$Revision$z$Date$zCopyright (c) 2023 Igalia, S.L.ZLGPLNAtspiz2.0)r   )GLib)debug)AXObjectc            
       s  a  ] tR t^+t o Rt]R]P                  P                  R]P                  P                  R]P                  P                  R]P                  P                  R3	V 3R lR ll4       t
]]P                  P                  3V 3R lR ll4       t]]P                  P                  3V 3R lR	 ll4       tR
tV tR# )AXCollectionr    NFc                s@  < V ^8  d   QhRS[ S[,          R,          RS[P                  RS[ S[,          R,          RS[P                  RS[ S[,          R,          RS[P                  RS[ S[,          R,          R	S[P                  R
S[RS[P
                  R,          /
# )   statesNstate_match_type
attributesattribute_match_typerolesrole_match_type
interfacesinterface_match_typeinvertreturn)listZstrr   CollectionMatchTypeZbool	MatchRuleZformat__classdict__   "7/usr/lib/python3.14/site-packages/orca/ax_collection.py__annotate__AXCollection.__annotate__2   s     3 3S	D 3333 I$3 $77	3
 Cy43 223 I$3 $773 3 "'4!73    c	                sH   V f   . p Vf   . pVf   . pVf   . p\         P                  ! 4       p	V '       d   V  F  p
V	P                  V
4       K  	  / pV'       dT   V FM  pVP                  R^4      w  rVP	                  RR4      pW9   d   W,          R,           V,           W&   KI  WV&   KO  	   \         P
                  P                  V	VVVVVVVV4	      pV#   \        P                   d6   pRT.p\        P                  ! \        P                  TR4        Rp?R# Rp?ii ; i)z4Creates a match rule based on the supplied criteria.NZ:z\:z-AXCollection: Exception in create_match_rule:T)r   ZStateSetZaddZsplitZreplacer   Znewr   GErrorr   print_tokens
LEVEL_INFO)r   r   r	   r
   r   r   r   r   r   Z	state_setZstateZattributes_dictZattrZkeyZvalueruleerrortokenss   &&&&&&&&&         r   create_match_ruleZAXCollection.create_match_rule1   s!    >FJ=EJNN$	e$   +-"!ZZQ/
c51)+:+?#+E+MO(+0C( #	??&&y'7'6';','6'1';'-/D  {{ 	EuMFu//>	s   .'C D!,*DD!c          	      s   < V ^8  d   QhRS[ P                  RS[ P                  RS[ P                  RS[S[ P                  ,          /# )r   objr   orderr   )r   
Accessibler   CollectionSortOrderr   r   r   r   r   r   i   sL      oo ,, %""#	r   c                sV   \         P                  ! V 4      '       g.   RV R.p\        P                  ! \        P                  VR4       . # Vf   . # \
        P
                  ! 4       p \        P                  P                  WV^ R4      pR\        T4       R\
        P
                  ! 4       T,
          R R	2p\        P                  ! \        P                  TR4       T#   \        P                   d7   pRT.p\        P                  ! \        P                  TR4       . u Rp?# Rp?ii ; i)
z6Returns a list of objects matching the specified rule.AXCollection:"does not implement this interface.TNz+AXCollection: Exception in get_all_matches:zAXCollection: z match(es) found in .4fs)r   supports_collectionr   r   r   timer   
Collectionget_matchesr   r   ZlenZprint_message)r"   r   r#   r    startmatchesr   Zmsg   &&&     r   get_all_matchesZAXCollection.get_all_matchesh   s     ++C00%s,PQFu//>I<I			 &&223eQMG s7|n,@uATUX@YYZ[E,,c48 {{ 	CUKFu//>I	s   &"C D(2+D#D(#D(c          	      s   < V ^8  d   QhRS[ P                  RS[ P                  RS[ P                  RS[ P                  R,          /# )r   r"   r   r#   r   N)r   r$   r   r%   r   r   r   r   r      sL      oo (( 
		D	 	r   c                sh   \         P                  ! V 4      '       g.   RV R.p\        P                  ! \        P                  VR4       R# Vf   R# \
        P
                  ! 4       p \        P                  P                  WV^R4      pRpT'       d
   T^ ,          pRTR\
        P
                  ! 4       T,
          R R	2.p\        P                  ! \        P                  TR4       T#   \        P                   d6   pRT.p\        P                  ! \        P                  TR4        Rp?R# Rp?ii ; i)
z5Returns the first object matching the specified rule.r&   r'   TNz+AXCollection: Exception in get_first_match:zAXCollection: foundzin r(   r)   )r   r*   r   r   r   r+   r   r,   r-   r   r   )r"   r   r#   r    r.   r/   r   Zmatchr0   r   get_first_matchZAXCollection.get_first_match   s    ++C00%s,PQFu//><			 &&223eQMG AJE'#diikE6I#5Na0PQ5++VT: {{ 	CUKFu//>	s   &"C' 'D1<*D,,D1 )Z__name__Z
__module__Z__qualname__Z__firstlineno____doc__Zstaticmethodr   r   ZALLZANYr!   r%   Z	CANONICALr1   r2   Z__static_attributes__Z__classdictcell__)r   s   @r   r   r   +   s     G
 #'6;6O6O6S6S'+:?:S:S:W:W"&5:5N5N5R5R'+:?:S:S:W:W3 3 3l  05/H/H/R/R  :  ,1+D+D+N+N  r   r   )r4   Z__id__Z__version__Z__date__Z__copyright__Z__license__r+   ZgiZrequire_versionZgi.repositoryr   r   Z r   Z	ax_objectr   r   r3   r   r   <module>r5      sR   0 D1  	   7E "    { {r   