Re: [Vala] Question about the "Standard Enumerations" value



Hi !
They are "usually" translated to enum members.
So GtkReliefStyle <http://library.gnome.org/devel/gtk/stable/gtk-Standard-Enumerations.html#GtkReliefStyle> fields, ie GTK_RELIEF_NORMAL, GTK_RELIEF_HALF, GTK_RELIEF_NONE,
are translated to Gtk.ReliefStyle.NORMAL, Gtk.ReliefStyle.HALF.
The c-name prefix, GTK_RELIEF_, GTK_RESIZE_, ... is removed from the enum field name and the resulting name is put in the corresponding Gtk.MyEnum enumeration.
++

ps: why isn't there a reply-to field to the ml there ?


heimdall_spe wrote:
Hi everybody,

Before starting complain, I let me say that Vala is really a "kick ass"
project. Thanks for all your work guys :o)

But the lack of documentation is a problem for people like me, that have
no experience in gnome app development. So please excuse me, for this
mail, because I'm pretty sure the answer is very very easy, when you
already know it.

I'm stuck because, in my little program, I want to set up properties on
gtk widget, but I don't know the right syntax. Example :

-> I want to set button with no relief style
C documentation say that is : gtk_button_set_relief (GtkButton
<http://library.gnome.org/devel/gtk/stable/GtkButton.html> *button,
GtkReliefStyle
<http://library.gnome.org/devel/gtk/stable/gtk-Standard-Enumerations.html#GtkReliefStyle>
newstyle);

So I guess, it would be something like that in vala :
button.set_relief(XXXXX);
But XXXX isn't "GTK_RELIEF_NONE"...

Another example : vertical_label.set_justify(XXXX);
But XXX isn't "GTK_JUSTIFY_RIGHT" either...

So my silly question is : where I can found something for translating
gtk "Standard Enumerations"
(http://library.gnome.org/devel/gtk/stable/gtk-Standard-Enumerations.html)
into vala syntax ?

I search everywhere, but I haven't found any listing with the proper
syntax...
Can you help me please ?

_______________________________________________
Vala-list mailing list
Vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list



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