Re: Steps to get to GTK+ 3.0



On Thu, 2008-06-05 at 08:59 +0200, Jean-Yves Lefort wrote:
[...]
> Likewise, you can implement a class "Foo" containing an int property
> "bar" using the GObject way:
> 
> 	#define G_TYPE_FOO		(g_foo_get_type())
> 	#define G_FOO(obj)		(G_TYPE_CHECK_INSTANCE_CAST((obj), G_TYPE_FOO, GFoo))
> 	#define G_FOO_CLASS(class)	(G_TYPE_CHECK_CLASS_CAST((class), G_TYPE_FOO, GFooClass))
> 	#define G_IS_FOO(obj)		(G_TYPE_CHECK_INSTANE_TYPE((obj), G_TYPE_FOO))
> 	#define G_IS_FOO_CLASS(class)	(G_TYPE_CHECK_CLASS_TYPE((class), G_TYPE_FOO))
> 	#define G_FOO_GET_CLASS(obj)	(G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_FOO, GFooClass))
[...]
> 
> or using the Qt way:
> 
> 	class QFoo : public QObject
> 	{
> 	   Q_OBJECT
> 
> 	   Q_PROPERTY(int bar READ bar WRITE setBar)
[...]
> 
> Which way do you prefer?

The Vala way ?




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