# Copyright (C) 2001 Tobias Peters # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # The prefix for all C identifiers introduced by libgdome-ruby C_NAME_PREFIX = "rbdom" # The name used by libgdome-ruby for the VALUE holding a reference to the class # that provides this interface. # interface might be a string containing the name of the interface or # an object that responds to to_s def rbdom_class_name(interface) " " + C_NAME_PREFIX + "_class_" + interface.to_s() + " " end # The name used by libgdome-ruby for the C function providing this method of # this interface. # interface and methods might be a strings containing the names of the # interface or method, or they might be objects of type Idl_Interface or # Idl_Method, respectively def rbdom_method_name(interface, method) " " + C_NAME_PREFIX + "_method_" + interface.to_s() + "_" + method.to_s() + " " end # The name of the C function that wraps a C struct (holding an instance of # interface) in a ruby object of the desired class def c2rb_name(interface) " " + C_NAME_PREFIX + "_c2rb_" + interface.to_s() + " " end # The name of the C function that extracts a wrapped C struct (holding an # instance of interface) from the corresponding ruby object def rb2c_name(interface) " " + C_NAME_PREFIX + "_rb2c_" + interface.to_s() + " " end