Re: Steps to get to GTK+ 3.0
- From: Xavier Bestel <xavier bestel free fr>
- To: Jean-Yves Lefort <jylefort brutele be>
- Cc: gtk-devel-list gnome org, Kristian Rietveld <kris imendio com>
- Subject: Re: Steps to get to GTK+ 3.0
- Date: Thu, 05 Jun 2008 10:59:11 +0200
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]