Re: Fwd: GTK+ is real object oriented?

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

 



frederico schardong wrote:
> I like C sintax, but is it that create this confusion to me... Thanks
> for clearly, and I agree that GTK is OO.

Take a look at Vala[1].  I think you'd like it.  It compiles to C code,
so there is zero overhead.  Vala syntax itself is basically C with
object-oriented syntactical sugar.  Most distros have a reasonably
updated version of Vala in their repositories.

Certainly if you want to make your own GTK widgets that derive from
other widgets, or make your own object-oriented, GObject-based code,
Vala is very handy.  As OO as GTK is, creating new classes in straight C
is very ugly.  Vala-generated code can be used in straight C programs
directly.  If you made a new Vala class called "foo," for example, it
automatically provides the C-style methods like:

foo_new()

Vala has an advantage over C++ in that any Vala classes you create can
be used by any of the language bindings (in theory), whereas C++ classes
cannot be used easily by C code.

[1] http://live.gnome.org/Vala
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux