pyspi patch for hypertext object support



Hi,

I've attached a patch for current CVS HEAD which implements support for
Hypertext object.

I haven't implemented all member functions, but it's enough to be used
by dogtail.

Please review & commit.

Thanks,
-- 
Marius Andreiana
Index: cspi.pxd
===================================================================
RCS file: /cvs/gnome/pyspi/cspi.pxd,v
retrieving revision 1.1.1.1
diff -r1.1.1.1 cspi.pxd
6a7
> 	ctypedef Accessible AccessibleHypertext
368a370,379
> 
> 	# Accessible Objects
> 	SPIBoolean Accessible_isHypertext               (Accessible *obj)
> 	AccessibleHypertext *Accessible_getHypertext (Accessible *obj)
> 	# Subinterface Methods - AccessibleHypertext Interface
> 	void AccessibleHypertext_ref             (AccessibleHypertext *obj)
> 	void AccessibleHypertext_unref           (AccessibleHypertext *obj)
> 	SPIBoolean AccessibleHypertext_getLink (AccessibleText *obj,
> 												long int linkIndex)
> 
Index: pyspi.pyx
===================================================================
RCS file: /cvs/gnome/pyspi/pyspi.pyx,v
retrieving revision 1.2
diff -r1.2 pyspi.pyx
18a19
> cdef class Hypertext (Text)
495a497,508
> 	def getHypertext (self):
> 		"""
> 		Wrapper around cspi.Accessible_getHypertext, returning an
> 		atspi.Hypertext or None
> 		"""
> 		self.__checkSelf ()
> 		cdef Hypertext hypertext
> 		hypertext = Hypertext ()
> 		hypertext.__setItem (cspi.Accessible_getHypertext (self.__item))
> 		if hypertext.__item != NULL:
> 			return hypertext
> 
759a773,784
> 
> cdef class Hypertext (Text):
> 	"""
> 	Wrapper around the low-level cspi.AccessibleHypertext_ functions,
> 	giving an OO-style API.
> 	"""
> 	def getLink (self, linkIndex):
> 		"""
> 		Wraps cspi.AccessibleHypertext_getLink, raising AtspiException if it fails
> 		"""
> 		self.__checkSelf ()
> 		return cspi.AccessibleHypertext_getLink (self.__item, linkIndex)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]