genCEnum        package:RGtkBindingGenerator        R Documentation

_G_e_n_e_r_a_t_e _C _c_o_d_e _f_o_r _a_c_c_e_s_s_o_r_s _a_n_d _e_n_u_m_e_r_a_t_i_o_n _e_l_e_m_e_n_t_s

_D_e_s_c_r_i_p_t_i_o_n:

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

_U_s_a_g_e:

     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)

_A_r_g_u_m_e_n_t_s:

    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.

_V_a_l_u_e:

     '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.

_A_u_t_h_o_r(_s):

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

_R_e_f_e_r_e_n_c_e_s:

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

_S_e_e _A_l_s_o:

     'genCode'

_E_x_a_m_p_l_e_s:

