w3-tools.com - Free Webmaster Tools and Resources
 
w3-tools.com - Free Webmaster Tools and Resources
 Free Webmaster Tools and Resources

 



PHP-GTK Manual

This manual is provided as a courtesy. It is not an official source. Please check gtk.php.net for updated information.

PHP-GTK Manual

PHP-GTK Manual

GtkObject::get_arg

In most cases where you are likely to need to know the content of an argument, there will be a get method in place which is basically a wrapper for get_arg() . This is good, because there is, unfortunately, no way to know for certain the name of the argument to pass to this function without looking at GTK+ source. A brief tutorial on making sense of what you see there follows.

An individual widget's arguments are initialized as a set of enumerated values at the beginning of the c file relating to that object. For example, in gtklabel.c in GTK 1.2.10 you will see this directly after the includes:

Around a hundred lines later, these argument types are defined as they are added to the widget, in the class_init function:

This gives you the name (in quotes) that you are looking for, the type of data that the argument will consist of, the fact that it is writeable (always), and the name of the original enumerated value to bind this information to.

For get_arg() , all you really need is the part that is in quotes, which can be surmised by looking at the initial enums. The datatype may, however, be useful information if you need to set an argument and have no other means of doing so than set_arg() .

The way you would access this is as follows:

Newsletter

Join to our newsletter and receive news and updates about our site.
Your name: 
E-mail address: 
Action: 
 

Hosted by

Search

Google
Web w3-tools.com

Links

  What is my IP? Find your IP address!     Valid XHTML 1.0 Transitional  
Copyright © 2006. by w3-tools.com. All rights reserved