genCEnum {RGtkBindingGenerator}R Documentation

Generate C code for accessors and enumeration elements

Description

These functions generate code S and C code to acess slots or fields in a Gtk object from S.

Usage

genCEnum(enum, name, defs = NULL, local = T, isEnum = T)
genFieldAccessor(name, type, className, defs)
genFieldAccessorCCode(name, className, croutine, type, defs)
genFieldAccessorRCode(sname, className, croutine, type, defs)
genFieldAccessors(defs)

Arguments

enum the definition of the specific enumeration, usually read from the .defs files via getDefs.
name For the other functions, this is the name of the S variable under which the enumeration constants will be stored.
defs the collection of definitions of classes, enumerations, etc. read from the .defs files
local unused
isEnum a logical value indicating whether the definition is for an enumeration or a Gtk flag.
type the name of the Gtk type of the field
className the name of the S class in which the field is located. This is used in the generated code to verify that the source object is of the correct type.
croutine the name of the C routine which is to be called to fetch the value of the field.
sname the name of the S function/variable which is to hold the field accessor.

Value

genFieldAccessorRCode returns a string giving the definition of an S function for accessing the particular slot/field in the source object.
genFieldAccessorCCode returns the associated C code for accessing the field in the source that is called by the S accessor function.
genFieldAccessor returns a list containing the S and C code for accessing the specified field. These are identified by named elements rcode and

ccode

.
genFieldAccessors returns a list with an element for each of the classes in the collection of definitions. Each element is itself a list whose elements correspond to the different fields directly defined within that class (i.e. not inherited fields). And each element in this sub-list is the list returned from genFieldAccessor for that field.

Author(s)

Duncan Temple Lang <duncan@research.bell-labs.com>

References

http://www.omegahat.org/RGtk, http://www.omegahat.org/RGtkBindingGenerator, http://www.gtk.org http://www.pygtk.org(?)

See Also

genCode

Examples



[Package RGtkBindingGenerator version 0.3 Index]