scheme-api: Correct some C documentation comments.
[geda-gaf.git] / libgeda / src / scheme_deprecated.c
blobe75ea87590d6589551a7782badaba6e1d257e64a
1 /* gEDA - GPL Electronic Design Automation
2 * libgeda - gEDA's library
3 * Copyright (C) 1998-2010 gEDA Contributors (see ChangeLog for details)
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA
20 /*!
21 * \file scheme_deprecated.c
22 * \brief Deprecated Scheme API functions
24 #include <config.h>
26 #include "libgeda_priv.h"
27 #include "libgedaguile_priv.h"
29 /*! \brief Get the width of line used to draw an object
30 * \par Function Description
31 * Returns the line width used to draw an object. Deprecated because
32 * it doesn't respect type restrictions, unlike the %object-stroke
33 * function in (geda core object).
35 * \param obj_s the object to get line width for.
36 * \return the line width.
38 SCM_DEFINE (get_line_width, "%get-line-width", 1, 0, 0,
39 (SCM obj_s), "Get the width of line used to draw an object")
41 SCM_ASSERT (EDASCM_OBJECTP (obj_s), obj_s,
42 SCM_ARG1, s_get_line_width);
44 OBJECT *object = edascm_to_object (obj_s);
46 return scm_from_int(object->line_width);
49 /*!
50 * \brief Create the (geda core deprecated) Scheme module.
51 * \par Function Description
52 * Defines procedures in the (geda core deprecated) module. The module can
53 * be accessed using (use-modules (geda core deprecated)).
55 static void
56 init_module_geda_core_deprecated ()
58 /* Register the functions */
59 #include "scheme_deprecated.x"
61 /* Some other deprecated definitions */
62 scm_c_define("OBJ_LINE", SCM_MAKE_CHAR((unsigned char) OBJ_LINE));
63 scm_c_define("OBJ_BOX", SCM_MAKE_CHAR((unsigned char) OBJ_BOX));
64 scm_c_define("OBJ_PICTURE", SCM_MAKE_CHAR((unsigned char) OBJ_PICTURE));
65 scm_c_define("OBJ_CIRCLE", SCM_MAKE_CHAR((unsigned char) OBJ_CIRCLE));
66 scm_c_define("OBJ_NET", SCM_MAKE_CHAR((unsigned char) OBJ_NET));
67 scm_c_define("OBJ_BUS", SCM_MAKE_CHAR((unsigned char) OBJ_BUS));
68 scm_c_define("OBJ_COMPLEX", SCM_MAKE_CHAR((unsigned char) OBJ_COMPLEX));
69 scm_c_define("OBJ_TEXT", SCM_MAKE_CHAR((unsigned char) OBJ_TEXT));
70 scm_c_define("OBJ_PIN", SCM_MAKE_CHAR((unsigned char) OBJ_PIN));
71 scm_c_define("OBJ_ARC", SCM_MAKE_CHAR((unsigned char) OBJ_ARC));
72 scm_c_define("OBJ_PLACEHOLDER", SCM_MAKE_CHAR((unsigned char) OBJ_PLACEHOLDER));
73 scm_c_define("OBJ_PATH", SCM_MAKE_CHAR((unsigned char) OBJ_PATH));
75 /* Add them to the module's public definitions. */
76 scm_c_export (s_get_line_width, "OBJ_LINE", "OBJ_BOX", "OBJ_PICTURE",
77 "OBJ_CIRCLE", "OBJ_NET", "OBJ_BUS", "OBJ_COMPLEX", "OBJ_TEXT",
78 "OBJ_PIN", "OBJ_ARC", "OBJ_PATH", "OBJ_PLACEHOLDER", NULL);
81 /*!
82 * \brief Initialise the basic gEDA page manipulation procedures.
83 * \par Function Description
84 * Registers some Scheme procedures for working with #PAGE
85 * smobs. Should only be called by edascm_init().
87 void
88 edascm_init_deprecated ()
90 /* Define the (geda core page) module */
91 scm_c_define_module ("geda core deprecated",
92 init_module_geda_core_deprecated,
93 NULL);