libgeda

scheme_deprecated.c

Go to the documentation of this file.
00001 /* gEDA - GPL Electronic Design Automation
00002  * libgeda - gEDA's library
00003  * Copyright (C) 1998-2010 gEDA Contributors (see ChangeLog for details)
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation; either version 2 of the License, or
00008  * (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA
00018  */
00019 
00024 #include <config.h>
00025 
00026 #include "libgeda_priv.h"
00027 #include "libgedaguile_priv.h"
00028 
00038 SCM_DEFINE (get_line_width, "%get-line-width", 1, 0, 0,
00039             (SCM obj_s), "Get the width of line used to draw an object")
00040 {
00041   SCM_ASSERT (EDASCM_OBJECTP (obj_s), obj_s,
00042               SCM_ARG1, s_get_line_width);
00043 
00044   OBJECT *object = edascm_to_object (obj_s);
00045 
00046   return scm_from_int(object->line_width);
00047 }
00048 
00055 static void
00056 init_module_geda_core_deprecated ()
00057 {
00058   /* Register the functions */
00059   #include "scheme_deprecated.x"
00060 
00061   /* Some other deprecated definitions */
00062   scm_c_define("OBJ_LINE",    SCM_MAKE_CHAR((unsigned char) OBJ_LINE));
00063   scm_c_define("OBJ_BOX",     SCM_MAKE_CHAR((unsigned char) OBJ_BOX));
00064   scm_c_define("OBJ_PICTURE", SCM_MAKE_CHAR((unsigned char) OBJ_PICTURE));
00065   scm_c_define("OBJ_CIRCLE",  SCM_MAKE_CHAR((unsigned char) OBJ_CIRCLE));
00066   scm_c_define("OBJ_NET",     SCM_MAKE_CHAR((unsigned char) OBJ_NET));
00067   scm_c_define("OBJ_BUS",     SCM_MAKE_CHAR((unsigned char) OBJ_BUS));
00068   scm_c_define("OBJ_COMPLEX", SCM_MAKE_CHAR((unsigned char) OBJ_COMPLEX));
00069   scm_c_define("OBJ_TEXT",    SCM_MAKE_CHAR((unsigned char) OBJ_TEXT));
00070   scm_c_define("OBJ_PIN",     SCM_MAKE_CHAR((unsigned char) OBJ_PIN));
00071   scm_c_define("OBJ_ARC",     SCM_MAKE_CHAR((unsigned char) OBJ_ARC));
00072   scm_c_define("OBJ_PLACEHOLDER", SCM_MAKE_CHAR((unsigned char) OBJ_PLACEHOLDER));
00073   scm_c_define("OBJ_PATH",    SCM_MAKE_CHAR((unsigned char) OBJ_PATH));
00074 
00075   /* Add them to the module's public definitions. */
00076   scm_c_export (s_get_line_width, "OBJ_LINE", "OBJ_BOX", "OBJ_PICTURE",
00077                 "OBJ_CIRCLE", "OBJ_NET", "OBJ_BUS", "OBJ_COMPLEX", "OBJ_TEXT",
00078                 "OBJ_PIN", "OBJ_ARC", "OBJ_PATH", "OBJ_PLACEHOLDER", NULL);
00079 }
00080 
00087 void
00088 edascm_init_deprecated ()
00089 {
00090   /* Define the (geda core page) module */
00091   scm_c_define_module ("geda core deprecated",
00092                        init_module_geda_core_deprecated,
00093                        NULL);
00094 }
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines