Question about properties

I’m in the process of learning from the ruby-gnome2 source code and
while reading the code I noticed that some function calls are commented
and it says something like ‘XXXXX is a property’. An example of this is
the VISIBLE attribute in gtk/rbwidget.c line 1053.

Could somebody tell me what this means exactly and where is the
corresponsing C code to access XXXX actually defined?

Thanks for your help!

Laurent

Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

Hi,

On Fri, 30 Jun 2006 00:07:19 +0200
Laurent J. [email protected] wrote:

I’m in the process of learning from the ruby-gnome2 source code and
while reading the code I noticed that some function calls are commented
and it says something like ‘XXXXX is a property’. An example of this is
the VISIBLE attribute in gtk/rbwidget.c line 1053.

Could somebody tell me what this means exactly and where is the
corresponsing C code to access XXXX actually defined?

GLib properties are auto generated by Ruby/GLib on runtime.
So you can access these properties like as Gtk::Widget#foo=,
Gtk::Widget#foo
unless no C codes.

See rbgobj_define_property_accessors() in glib/src/rbgobject.c.


.:% Masao M.[email protected]

Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

Masao M. wrote:

Could somebody tell me what this means exactly and where is the
corresponsing C code to access XXXX actually defined?

GLib properties are auto generated by Ruby/GLib on runtime.
So you can access these properties like as Gtk::Widget#foo=, Gtk::Widget#foo
unless no C codes.

See rbgobj_define_property_accessors() in glib/src/rbgobject.c.

Ok I see. Is this done when calling G_DEF_CLASS in each Init_xxxx
function?

Thanks

Laurent

Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

Hi,

On Wed, 05 Jul 2006 09:20:25 +0200
Laurent J. [email protected] wrote:

Ok I see. Is this done when calling G_DEF_CLASS in each Init_xxxx function?

No. G_DEF_CLASS has another role.

It’s better to read these article first below.

http://ruby-gnome2.sourceforge.jp/hiki.cgi?Naming+and+Conversion+Rules
http://ruby-gnome2.sourceforge.jp/hiki.cgi?How+to+Implement+Ruby-GNOME2

HTH,


.:% Masao M.[email protected]

Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs