1 /* gEDA - GPL Electronic Design Automation
2 * gschem - gEDA Schematic Capture
3 * Copyright (C) 1998-2007 Ales Hvezda
4 * Copyright (C) 1998-2007 gEDA Contributors (see ChangeLog for details)
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA
38 #include <libgeda/libgeda.h>
40 #include "../include/i_vars.h"
41 #include "../include/globals.h"
42 #include "../include/prototype.h"
44 #ifdef HAVE_LIBDMALLOC
48 /*! a random int, used only as a place holder */
49 static int default_dummy
;
51 /*! \todo Finish function documentation!!!
53 * \par Function Description
56 void g_rc_parse_gtkrc()
61 filename
= g_strconcat (g_rc_parse_path (),
65 gtk_rc_parse (filename
);
68 home
= g_getenv ("HOME");
70 filename
= g_strconcat (home
,
74 gtk_rc_parse (filename
);
80 /*! \todo Finish function documentation!!!
82 * \par Function Description
85 SCM
g_rc_gschem_version(SCM version
)
89 SCM_ASSERT (scm_is_string (version
), version
,
90 SCM_ARG1
, "gschem-version");
92 if (g_strcasecmp (SCM_STRING_CHARS (version
), DATE_VERSION
) != 0) {
94 "You are running gEDA/gaf version [%s%s.%s],\n",
95 PREPEND_VERSION_STRING
, DOTTED_VERSION
, DATE_VERSION
);
97 "but you have a version [%s] gschemrc file:\n[%s]\n",
98 SCM_STRING_CHARS (version
), rc_filename
);
100 "Please be sure that you have the latest rc file.\n");
109 /*! \todo Finish function documentation!!!
110 * \brief General color setting function
111 * \par Function Description
114 static SCM
g_rc_color_general(SCM index
, SCM color
, SCM outline_color
,
115 SCM ps_color
, SCM ir
, SCM ig
, SCM ib
,
116 const char *rc_name
, int *color_var
)
121 char *outline_color_name
;
122 char *ps_color_string
;
128 SCM_ASSERT (scm_is_integer (index
), index
, SCM_ARG1
, rc_name
);
129 SCM_ASSERT (scm_is_string (color
), color
, SCM_ARG2
, rc_name
);
130 SCM_ASSERT (scm_is_string (outline_color
),
131 outline_color
, SCM_ARG3
, rc_name
);
132 SCM_ASSERT (scm_is_string (ps_color
), ps_color
,
134 SCM_ASSERT (scm_is_integer (ir
), ir
, SCM_ARG5
, rc_name
);
135 SCM_ASSERT (scm_is_integer (ig
), ig
, SCM_ARG6
, rc_name
);
136 SCM_ASSERT (scm_is_integer (ib
), ib
, SCM_ARG7
, rc_name
);
138 color_index
= scm_to_int (index
);
139 color_name
= SCM_STRING_CHARS (color
);
140 outline_color_name
= SCM_STRING_CHARS (outline_color
);
141 ps_color_string
= SCM_STRING_CHARS (ps_color
);
142 image_red
= scm_to_int (ir
);
143 image_green
= scm_to_int (ig
);
144 image_blue
= scm_to_int (ib
);
146 status
= s_color_request (color_index
, color_name
, outline_color_name
,
148 image_red
, image_green
, image_blue
);
151 printf("%d %s %s %s %d %d %d\n", color_index
, color_name
,
152 outline_color_name
, ps_color_string
,
153 image_red
, image_green
, image_blue
);
159 _("Invalid color [%s] passed to %s\n"),
164 *color_var
= color_index
;
171 #define DEFINE_G_RC_COLOR(func, rc, var) \
172 SCM func(SCM index, SCM color, SCM outline_color, SCM ps_color, \
173 SCM ir, SCM ig, SCM ib) \
175 return g_rc_color_general(index, color, outline_color, \
176 ps_color, ir, ig, ib, (rc), &(var)); \
179 DEFINE_G_RC_COLOR(g_rc_override_net_color
,
180 "override-net-color",
181 default_override_net_color
)
183 DEFINE_G_RC_COLOR(g_rc_override_bus_color
,
184 "override-bus-color",
185 default_override_bus_color
)
187 DEFINE_G_RC_COLOR(g_rc_override_pin_color
,
188 "override-pin-color",
189 default_override_pin_color
)
191 DEFINE_G_RC_COLOR(g_rc_attribute_color
,
193 default_attribute_color
)
195 DEFINE_G_RC_COLOR(g_rc_detachedattr_color
,
196 "detached-attribute-color",
197 default_detachattr_color
)
199 DEFINE_G_RC_COLOR(g_rc_text_color
,
203 DEFINE_G_RC_COLOR(g_rc_net_color
,
207 DEFINE_G_RC_COLOR(g_rc_bus_color
,
211 DEFINE_G_RC_COLOR(g_rc_pin_color
,
215 DEFINE_G_RC_COLOR(g_rc_graphic_color
,
217 default_graphic_color
)
219 DEFINE_G_RC_COLOR(g_rc_grid_color
,
223 DEFINE_G_RC_COLOR(g_rc_background_color
,
225 default_background_color
)
227 DEFINE_G_RC_COLOR(g_rc_select_color
,
229 default_select_color
)
231 DEFINE_G_RC_COLOR(g_rc_boundingbox_color
,
235 DEFINE_G_RC_COLOR(g_rc_zoom_box_color
,
237 default_zoom_box_color
)
239 DEFINE_G_RC_COLOR(g_rc_net_endpoint_color
,
240 "net-endpoint-color",
241 default_net_endpoint_color
)
243 DEFINE_G_RC_COLOR(g_rc_junction_color
,
245 default_junction_color
)
247 DEFINE_G_RC_COLOR(g_rc_logic_bubble_color
,
248 "logic-bubble-color",
249 default_logic_bubble_color
)
251 DEFINE_G_RC_COLOR(g_rc_lock_color
,
255 DEFINE_G_RC_COLOR(g_rc_output_color_background
,
256 "output-color-background",
257 default_print_color_background
)
259 DEFINE_G_RC_COLOR(g_rc_stroke_color
,
261 default_stroke_color
)
263 DEFINE_G_RC_COLOR(g_rc_freestyle_color
,
267 /*! \todo Finish function documentation!!!
269 * \par Function Description
272 SCM
g_rc_net_endpoint_mode(SCM mode
)
274 static const vstbl_entry mode_table
[] = {
275 {FILLEDBOX
, "filledbox"}
278 RETURN_G_RC_MODE("net-endpoint-mode",
279 default_net_endpoint_mode
,
283 /*! \todo Finish function documentation!!!
285 * \par Function Description
288 SCM
g_rc_net_midpoint_mode(SCM mode
)
290 static const vstbl_entry mode_table
[] = {
294 RETURN_G_RC_MODE("net-midpoint-mode",
295 default_net_midpoint_mode
,
299 /*! \todo Finish function documentation!!!
301 * \par Function Description
304 SCM
g_rc_net_style(SCM mode
)
306 static const vstbl_entry mode_table
[] = {
311 RETURN_G_RC_MODE("net-style",
316 /*! \todo Finish function documentation!!!
318 * \par Function Description
321 SCM
g_rc_bus_style(SCM mode
)
323 static const vstbl_entry mode_table
[] = {
328 RETURN_G_RC_MODE("bus-style",
333 /*! \todo Finish function documentation!!!
335 * \par Function Description
338 SCM
g_rc_pin_style(SCM mode
)
340 static const vstbl_entry mode_table
[] = {
345 RETURN_G_RC_MODE("pin-style",
350 /*! \todo Finish function documentation!!!
352 * \par Function Description
355 SCM
g_rc_line_style(SCM mode
)
357 static const vstbl_entry mode_table
[] = {
362 RETURN_G_RC_MODE("pin-style",
367 /*! \todo Finish function documentation!!!
369 * \par Function Description
372 SCM
g_rc_action_feedback_mode(SCM mode
)
374 static const vstbl_entry mode_table
[] = {
375 {OUTLINE
, "outline" },
376 {BOUNDINGBOX
, "boundingbox"}
379 RETURN_G_RC_MODE("action-feedback-mode",
380 default_actionfeedback_mode
,
384 /*! \todo Finish function documentation!!!
386 * \par Function Description
389 SCM
g_rc_zoom_with_pan(SCM mode
)
391 static const vstbl_entry mode_table
[] = {
396 RETURN_G_RC_MODE("zoom-with-pan",
397 default_zoom_with_pan
,
401 /*! \todo Finish function documentation!!!
403 * \par Function Description
406 SCM
g_rc_text_feedback(SCM mode
)
408 static const vstbl_entry mode_table
[] = {
409 {ALWAYS
, "always" },
410 {ONLY_WHEN_READABLE
, "only-when-readable"}
413 RETURN_G_RC_MODE("text-feedback",
414 default_text_feedback
,
418 /*! \todo Finish function documentation!!!
420 * \par Function Description
423 SCM
g_rc_text_display_zoomfactor(SCM zoomfactor
)
427 SCM_ASSERT (scm_is_integer (zoomfactor
), zoomfactor
,
428 SCM_ARG1
, "test-display-zoom-factor");
430 val
= scm_to_int (zoomfactor
);
433 _("Invalid zoomfactor [%d] passed to %s\n"),
435 "text-display-zoom-factor");
436 val
= 10; /* absolute default */
439 default_text_display_zoomfactor
= val
;
444 /*! \todo Finish function documentation!!!
446 * \par Function Description
449 SCM
g_rc_scrollbar_update(SCM scmmode
)
451 SCM ret
= SCM_BOOL_T
;
453 SCM_ASSERT (scm_is_string (scmmode
), scmmode
,
454 SCM_ARG1
, "scrollbar-update");
459 /*! \todo Finish function documentation!!!
461 * \par Function Description
464 SCM
g_rc_object_clipping(SCM mode
)
466 static const vstbl_entry mode_table
[] = {
471 RETURN_G_RC_MODE("object-clipping",
472 default_object_clipping
,
476 /*! \todo Finish function documentation!!!
478 * \par Function Description
481 SCM
g_rc_logging(SCM mode
)
483 static const vstbl_entry mode_table
[] = {
488 RETURN_G_RC_MODE("logging",
493 /*! \todo Finish function documentation!!!
495 * \par Function Description
498 SCM
g_rc_embed_components(SCM mode
)
500 static const vstbl_entry mode_table
[] = {
505 RETURN_G_RC_MODE("embed-components",
506 default_embed_complex
,
510 /*! \todo Finish function documentation!!!
512 * \par Function Description
515 SCM
g_rc_text_size(SCM size
)
519 SCM_ASSERT (scm_is_integer (size
), size
, SCM_ARG1
, "text-size");
521 val
= scm_to_int (size
);
524 _("Invalid size [%d] passed to text-size\n"),
526 val
= 10; /* absolute default */
529 default_text_size
= val
;
534 /*! \brief Sets the output font scaling factor
536 * \par Use this setting to change the scale of the output PS font
537 * characters. This allows to fine tune the font size so that it
538 * matches more closely with the screen.
540 * \return SCM_BOOL_T always.
543 SCM
g_rc_postscript_font_scale(SCM scale
)
547 SCM_ASSERT (SCM_REALP (scale
), scale
, SCM_ARG1
, "postscript-font-scale");
549 val
=(float)(SCM_REAL_VALUE (scale
));
551 fprintf(stderr
, _("Invalid size [%f] passed to postscript-font-scale\n"),
553 val
= 1.0; /* absolute default */
556 default_postscript_font_scale
= val
;
561 /*! \todo Finish function documentation!!!
563 * \par Function Description
565 * \todo inconsistant naming with keyword name and variable to hold
568 SCM
g_rc_text_caps_style(SCM mode
)
570 static const vstbl_entry mode_table
[] = {
576 RETURN_G_RC_MODE("text-caps-style",
581 /*! \todo Finish function documentation!!!
583 * \par Function Description
586 SCM
g_rc_snap_size(SCM size
)
590 SCM_ASSERT (scm_is_integer (size
), size
, SCM_ARG1
, "snap-size");
592 val
= scm_to_int (size
);
594 fprintf(stderr
, _("Invalid size [%d] passed to snap-size\n"),
596 val
= 100; /* absolute default */
599 default_snap_size
= val
;
604 /*! \todo Finish function documentation!!!
606 * \par Function Description
609 SCM
g_rc_logging_destination(SCM mode
)
611 static const vstbl_entry mode_table
[] = {
612 {LOG_WINDOW
, "log_window" },
613 {STDOUT_TTY
, "tty" },
614 {BOTH_LOGWIN_STDOUT
, "both" }
617 RETURN_G_RC_MODE("logging-destination",
622 /*! \todo Finish function documentation!!!
624 * \par Function Description
627 SCM
g_rc_attribute_name(SCM scm_path
)
632 SCM_ASSERT (scm_is_string (scm_path
), scm_path
,
633 SCM_ARG1
, "attribute-name");
635 path
= SCM_STRING_CHARS (scm_path
);
638 if (!s_attrib_uniq(path
)) {
641 s_attrib_add_entry (path
);
648 /*! \todo Finish function documentation!!!
650 * \par Function Description
653 SCM
g_rc_scrollbars(SCM mode
)
655 static const vstbl_entry mode_table
[] = {
660 RETURN_G_RC_MODE("scrollbars",
661 default_scrollbars_flag
,
665 /*! \todo Finish function documentation!!!
667 * \par Function Description
670 SCM
g_rc_paper_size(SCM width
, SCM height
)
671 #define FUNC_NAME "paper-size"
673 SCM_ASSERT (SCM_NIMP (width
) && SCM_REALP (width
), width
,
674 SCM_ARG1
, FUNC_NAME
);
675 SCM_ASSERT (SCM_NIMP (height
) && SCM_REALP (height
), height
,
676 SCM_ARG2
, FUNC_NAME
);
678 /* yes this is legit, we are casting the resulting double to an int */
679 default_paper_width
= (int) (SCM_NUM2DOUBLE (0, width
) * MILS_PER_INCH
);
680 default_paper_height
= (int) (SCM_NUM2DOUBLE (0, height
) * MILS_PER_INCH
);
686 /*! \todo Finish function documentation!!!
688 * \par Function Description
691 SCM
g_rc_paper_sizes(SCM scm_papername
, SCM scm_width
, SCM scm_height
)
692 #define FUNC_NAME "paper-sizes"
699 SCM_ASSERT (scm_is_string (scm_papername
), scm_papername
,
700 SCM_ARG1
, FUNC_NAME
);
701 SCM_ASSERT (SCM_NIMP (scm_width
) && SCM_REALP (scm_width
), scm_width
,
702 SCM_ARG2
, FUNC_NAME
);
703 SCM_ASSERT (SCM_NIMP (scm_height
) && SCM_REALP (scm_height
), scm_height
,
704 SCM_ARG3
, FUNC_NAME
);
706 papername
= SCM_STRING_CHARS (scm_papername
);
707 width
= (int) (SCM_NUM2DOUBLE (0, scm_width
) * MILS_PER_INCH
);
708 height
= (int) (SCM_NUM2DOUBLE (0, scm_height
) * MILS_PER_INCH
);
710 if (!s_papersizes_uniq(papername
)) {
713 s_papersizes_add_entry(papername
, width
, height
);
721 /*! \todo Finish function documentation!!!
723 * \par Function Description
726 SCM
g_rc_output_text(SCM mode
)
728 static const vstbl_entry mode_table
[] = {
729 {VECTOR_FONTS
, "vector" },
733 RETURN_G_RC_MODE("output-text",
738 /*! \todo Finish function documentation!!!
740 * \par Function Description
742 * \todo this keyword needs a better name ...
744 SCM
g_rc_output_type(SCM mode
)
746 static const vstbl_entry mode_table
[] = {
747 {WINDOW
, "current window" },
748 {EXTENTS
, "limits" }, /* deprecated */
749 {EXTENTS
, "extents" },
750 {EXTENTS_NOMARGINS
, "extents no margins" },
753 RETURN_G_RC_MODE("output-type",
754 default_print_output_type
,
758 /*! \todo Finish function documentation!!!
760 * \par Function Description
763 SCM
g_rc_output_orientation(SCM mode
)
765 static const vstbl_entry mode_table
[] = {
766 {PORTRAIT
, "portrait" },
767 {LANDSCAPE
, "landscape"},
770 RETURN_G_RC_MODE("output-orientation",
771 default_print_orientation
,
775 /*! \todo Finish function documentation!!!
777 * \par Function Description
780 SCM
g_rc_image_color(SCM mode
)
782 static const vstbl_entry mode_table
[] = {
787 RETURN_G_RC_MODE("image-color",
792 /*! \todo Finish function documentation!!!
794 * \par Function Description
797 SCM
g_rc_image_size(SCM width
, SCM height
)
799 SCM_ASSERT (scm_is_integer (width
), width
, SCM_ARG1
, "image-size");
800 SCM_ASSERT (scm_is_integer (height
), height
, SCM_ARG2
, "image-size");
802 /* yes this is legit, we are casting the resulting double to an int */
803 default_image_width
= scm_to_int (width
);
804 default_image_height
= scm_to_int (height
);
809 /*! \todo Finish function documentation!!!
811 * \par Function Description
814 SCM
g_rc_output_color(SCM mode
)
816 static const vstbl_entry mode_table
[] = {
821 /* this variable is inconsistantly named with the rest */
822 RETURN_G_RC_MODE("output-color",
827 /*! \todo Finish function documentation!!!
829 * \par Function Description
832 SCM
g_rc_output_capstyle(SCM mode
)
834 static const vstbl_entry mode_table
[] = {
835 {BUTT_CAP
, "butt" },
836 {ROUND_CAP
, "round" },
837 {SQUARE_CAP
, "square"},
840 RETURN_G_RC_MODE("output-capstyle",
841 default_print_output_capstyle
,
845 /*! \todo Finish function documentation!!!
847 * \par Function Description
850 SCM
g_rc_log_window(SCM mode
)
852 static const vstbl_entry mode_table
[] = {
853 {MAP_ON_STARTUP
, "startup" },
854 {MAP_LATER
, "later" },
857 RETURN_G_RC_MODE("log-window",
862 /*! \todo Finish function documentation!!!
864 * \par Function Description
867 SCM
g_rc_log_window_type(SCM mode
)
869 static const vstbl_entry mode_table
[] = {
870 {TRANSIENT
, "transient" },
871 {DECORATED
, "decorated" },
874 RETURN_G_RC_MODE("log-window-type",
875 default_log_window_type
,
879 /*! \todo Finish function documentation!!!
881 * \par Function Description
884 SCM
g_rc_third_button(SCM mode
)
886 static const vstbl_entry mode_table
[] = {
887 {POPUP_ENABLED
, "popup" },
888 {MOUSEPAN_ENABLED
, "mousepan"},
891 RETURN_G_RC_MODE("third-button",
892 default_third_button
,
896 /*! \todo Finish function documentation!!!
898 * \par Function Description
901 SCM
g_rc_middle_button(SCM mode
)
903 static const vstbl_entry mode_table
[] = {
907 {MID_MOUSEPAN_ENABLED
, "mousepan"},
910 RETURN_G_RC_MODE("middle-button",
911 default_middle_button
,
915 /*! \todo Finish function documentation!!!
917 * \par Function Description
920 SCM
g_rc_net_consolidate(SCM mode
)
922 static const vstbl_entry mode_table
[] = {
927 RETURN_G_RC_MODE("net-consolidate",
928 default_net_consolidate
,
932 /*! \todo Finish function documentation!!!
934 * \par Function Description
937 SCM
g_rc_file_preview(SCM mode
)
939 static const vstbl_entry mode_table
[] = {
944 /* this variable is inconsistantly named with the rest */
945 RETURN_G_RC_MODE("file-preview",
946 default_file_preview
,
950 /*! \todo Finish function documentation!!!
952 * \par Function Description
955 SCM
g_rc_enforce_hierarchy(SCM mode
)
957 static const vstbl_entry mode_table
[] = {
962 RETURN_G_RC_MODE("enforce-hierarchy",
963 default_enforce_hierarchy
,
967 /*! \todo Finish function documentation!!!
969 * \par Function Description
972 SCM
g_rc_text_origin_marker(SCM mode
)
974 static const vstbl_entry mode_table
[] = {
979 RETURN_G_RC_MODE("text-origin-marker",
980 default_text_origin_marker
,
984 /*! \todo Finish function documentation!!!
986 * \par Function Description
989 SCM
g_rc_fast_mousepan(SCM mode
)
991 static const vstbl_entry mode_table
[] = {
996 RETURN_G_RC_MODE("fast-mousepan",
997 default_fast_mousepan
,
1001 /*! \todo Finish function documentation!!!
1003 * \par Function Description
1006 SCM
g_rc_raise_dialog_boxes_on_expose(SCM mode
)
1008 static const vstbl_entry mode_table
[] = {
1009 {TRUE
, "enabled" },
1010 {FALSE
, "disabled"},
1013 RETURN_G_RC_MODE("raise-dialog-boxes-on-expose",
1014 default_raise_dialog_boxes
,
1018 /*! \todo Finish function documentation!!!
1020 * \par Function Description
1023 SCM
g_rc_continue_component_place(SCM mode
)
1025 static const vstbl_entry mode_table
[] = {
1026 {TRUE
, "enabled" },
1027 {FALSE
, "disabled"},
1030 RETURN_G_RC_MODE("continue-component-place",
1031 default_continue_component_place
,
1035 /*! \todo Finish function documentation!!!
1037 * \par Function Description
1040 SCM
g_rc_undo_levels(SCM levels
)
1044 SCM_ASSERT (scm_is_integer (levels
), levels
, SCM_ARG1
, "undo-levels");
1046 val
= scm_to_int (levels
);
1049 fprintf(stderr
, _("Invalid num levels [%d] passed to undo-levels\n"),
1051 val
= 10; /* absolute default */
1054 default_undo_levels
= val
;
1059 /*! \todo Finish function documentation!!!
1061 * \par Function Description
1064 SCM
g_rc_undo_control(SCM mode
)
1066 static const vstbl_entry mode_table
[] = {
1067 {TRUE
, "enabled" },
1068 {FALSE
, "disabled"},
1071 RETURN_G_RC_MODE("undo-control", default_undo_control
, 2);
1074 /*! \todo Finish function documentation!!!
1076 * \par Function Description
1079 SCM
g_rc_undo_type(SCM mode
)
1081 static const vstbl_entry mode_table
[] = {
1082 {UNDO_DISK
, "disk" },
1083 {UNDO_MEMORY
, "memory" },
1086 RETURN_G_RC_MODE("undo-type",
1091 /*! \todo Finish function documentation!!!
1093 * \par Function Description
1096 SCM
g_rc_draw_grips(SCM mode
)
1098 static const vstbl_entry mode_table
[] = {
1099 {TRUE
, "enabled" },
1100 {FALSE
, "disabled"},
1103 RETURN_G_RC_MODE("draw-grips",
1108 /*! \todo Finish function documentation!!!
1110 * \par Function Description
1113 SCM
g_rc_netconn_rubberband(SCM mode
)
1115 static const vstbl_entry mode_table
[] = {
1116 {TRUE
, "enabled" },
1117 {FALSE
, "disabled"},
1120 RETURN_G_RC_MODE("netconn-rubberband",
1121 default_netconn_rubberband
,
1125 /*! \todo Finish function documentation!!!
1127 * \par Function Description
1130 SCM
g_rc_sort_component_library(SCM mode
)
1132 static const vstbl_entry mode_table
[] = {
1133 {TRUE
, "enabled" },
1134 {FALSE
, "disabled"},
1137 RETURN_G_RC_MODE("sort_component_library",
1138 default_sort_component_library
,
1142 /*! \todo Finish function documentation!!!
1144 * \par Function Description
1147 SCM
g_rc_add_menu(SCM menu_name
, SCM menu_items
)
1149 SCM_ASSERT (scm_is_string (menu_name
), menu_name
,
1150 SCM_ARG1
, "add-menu");
1151 SCM_ASSERT (SCM_NIMP (menu_items
) && SCM_CONSP (menu_items
), menu_items
,
1152 SCM_ARG2
, "add-menu");
1154 s_menu_add_entry(SCM_STRING_CHARS (menu_name
), menu_items
);
1159 /*! \todo Finish function documentation!!!
1161 * \par Function Description
1164 SCM
g_rc_window_size(SCM width
, SCM height
)
1166 SCM_ASSERT (scm_is_integer (width
), width
, SCM_ARG1
, "window-size");
1167 SCM_ASSERT (scm_is_integer (height
), height
, SCM_ARG2
, "window-size");
1169 default_width
= scm_to_int (width
);
1170 default_height
= scm_to_int (height
);
1175 /*! \todo Finish function documentation!!!
1177 * \par Function Description
1180 SCM
g_rc_warp_cursor(SCM mode
)
1182 static const vstbl_entry mode_table
[] = {
1183 {TRUE
, "enabled" },
1184 {FALSE
, "disabled"},
1187 RETURN_G_RC_MODE("warp-cursor",
1188 default_warp_cursor
,
1192 /*! \todo Finish function documentation!!!
1194 * \par Function Description
1197 SCM
g_rc_toolbars(SCM mode
)
1199 static const vstbl_entry mode_table
[] = {
1200 {TRUE
, "enabled" },
1201 {FALSE
, "disabled"},
1204 RETURN_G_RC_MODE("toolbars",
1209 /*! \todo Finish function documentation!!!
1211 * \par Function Description
1214 SCM
g_rc_handleboxes(SCM mode
)
1216 static const vstbl_entry mode_table
[] = {
1217 {TRUE
, "enabled" },
1218 {FALSE
, "disabled"},
1221 RETURN_G_RC_MODE("handleboxes",
1222 default_handleboxes
,
1226 /*! \todo Finish function documentation!!!
1228 * \par Function Description
1231 SCM
g_rc_setpagedevice_orientation(SCM mode
)
1233 static const vstbl_entry mode_table
[] = {
1234 {TRUE
, "enabled" },
1235 {FALSE
, "disabled"},
1238 RETURN_G_RC_MODE("setpagedevice-orientation",
1239 default_setpagedevice_orientation
,
1243 /*! \todo Finish function documentation!!!
1245 * \par Function Description
1248 SCM
g_rc_setpagedevice_pagesize(SCM mode
)
1250 static const vstbl_entry mode_table
[] = {
1251 {TRUE
, "enabled" },
1252 {FALSE
, "disabled"},
1255 RETURN_G_RC_MODE("setpagedevice-pagesize",
1256 default_setpagedevice_pagesize
,
1260 /*! \todo Finish function documentation!!!
1262 * \par Function Description
1265 SCM
g_rc_bus_ripper_size(SCM size
)
1269 SCM_ASSERT (scm_is_integer (size
), size
, SCM_ARG1
, "bus-ripper-size");
1271 val
= scm_to_int (size
);
1274 fprintf(stderr
, _("Invalid size [%d] passed to bus-ripper-size\n"),
1276 val
= 200; /* absolute default */
1279 default_bus_ripper_size
= val
;
1284 /*! \todo Finish function documentation!!!
1286 * \par Function Description
1289 SCM
g_rc_bus_ripper_type(SCM mode
)
1291 static const vstbl_entry mode_table
[] = {
1292 {COMP_BUS_RIPPER
, "component" },
1293 {NET_BUS_RIPPER
, "net" }
1296 RETURN_G_RC_MODE("bus-ripper-type",
1297 default_bus_ripper_type
,
1301 /*! \todo Finish function documentation!!!
1303 * \par Function Description
1306 SCM
g_rc_bus_ripper_rotation(SCM mode
)
1308 static const vstbl_entry mode_table
[] = {
1309 {SYMMETRIC
, "symmetric" },
1310 {NON_SYMMETRIC
, "non-symmetric" }
1313 RETURN_G_RC_MODE("bus-ripper-rotation",
1314 default_bus_ripper_rotation
,
1318 /*! \todo Finish function documentation!!!
1320 * \par Function Description
1323 SCM
g_rc_force_boundingbox(SCM mode
)
1325 static const vstbl_entry mode_table
[] = {
1327 {FALSE
, "disabled" }
1330 RETURN_G_RC_MODE("force-boundingbox",
1331 default_force_boundingbox
,
1335 /*! \todo Finish function documentation!!!
1337 * \par Function Description
1340 SCM
g_rc_grid_dot_size(SCM dotsize
)
1344 SCM_ASSERT (scm_is_integer (dotsize
), dotsize
, SCM_ARG1
, "grid-dot-size");
1346 val
= scm_to_int (dotsize
);
1349 fprintf(stderr
, _("Invalid dot size [%d] passed to grid-dot-size\n"),
1351 val
= 1; /* absolute default */
1354 default_grid_dot_size
= val
;
1359 /*! \todo Finish function documentation!!!
1361 * \par Function Description
1364 SCM
g_rc_grid_mode(SCM mode
)
1366 static const vstbl_entry mode_table
[] = {
1367 {GRID_VARIABLE_MODE
, "variable" },
1368 {GRID_FIXED_MODE
, "fixed" }
1371 RETURN_G_RC_MODE("grid-mode",
1376 /*! \todo Finish function documentation!!!
1378 * \par Function Description
1381 SCM
g_rc_grid_fixed_threshold(SCM spacing
)
1385 SCM_ASSERT (scm_is_integer (spacing
), spacing
, SCM_ARG1
, "grid-fixed-threshold");
1387 val
= scm_to_int (spacing
);
1390 fprintf(stderr
, _("Invalid pixel spacing [%d] passed to grid-fixed-threshold\n"),
1392 val
= 10; /* absolute default */
1395 default_grid_fixed_threshold
= val
;
1400 /*! \todo Finish function documentation!!!
1402 * \par Function Description
1405 SCM
g_rc_output_vector_threshold(SCM numlines
)
1409 SCM_ASSERT (scm_is_integer (numlines
), numlines
,
1410 SCM_ARG1
, "output-vector-threshold");
1412 val
= scm_to_int (numlines
);
1414 default_print_vector_threshold
= val
;
1419 /*! \todo Finish function documentation!!!
1421 * \par Function Description
1424 SCM
g_rc_add_attribute_offset(SCM offset
)
1428 SCM_ASSERT (scm_is_integer (offset
), offset
,
1429 SCM_ARG1
, "add-attribute-offset");
1431 val
= scm_to_int (offset
);
1434 fprintf(stderr
, _("Invalid offset [%d] passed to add-attribute-offset\n"),
1436 val
= 50; /* absolute default */
1439 default_add_attribute_offset
= val
;
1444 /*! \todo Finish function documentation!!!
1446 * \par Function Description
1449 SCM
g_rc_auto_save_interval(SCM seconds
)
1453 SCM_ASSERT (scm_is_integer (seconds
), seconds
, SCM_ARG1
, "auto-save-interval");
1455 val
= scm_to_int (seconds
);
1458 fprintf(stderr
, _("Invalid number of seconds [%d] passed to auto-save-interval\n"),
1460 val
= 120; /* absolute default */
1463 default_auto_save_interval
= val
;
1468 /*! \todo Finish function documentation!!!
1470 * \par Function Description
1473 SCM
g_rc_drag_can_move(SCM mode
)
1475 static const vstbl_entry mode_table
[] = {
1477 {FALSE
, "disabled" }
1480 RETURN_G_RC_MODE("drag-can-move",
1481 default_drag_can_move
,
1485 /*! \todo Finish function documentation!!!
1487 * \par Function Description
1490 SCM
g_rc_mousepan_gain(SCM gain
)
1494 SCM_ASSERT (scm_is_integer (gain
), gain
, SCM_ARG1
, "mousepan-gain");
1496 val
= scm_to_int (gain
);
1499 fprintf(stderr
, _("Invalid gain [%d] passed to mousepan-gain\n"),
1501 val
= 5; /* absolute default */
1504 default_mousepan_gain
= val
;
1509 /*! \brief Scheme function for setting the step for keyboard pan.
1511 * Default setting is 20.
1513 SCM
g_rc_keyboardpan_gain(SCM gain
)
1517 SCM_ASSERT (scm_is_integer (gain
), gain
, SCM_ARG1
, "keyboardpan-gain");
1519 val
= scm_to_int (gain
);
1522 fprintf(stderr
, _("Invalid gain [%d] passed to keyboardpan-gain\n"),
1524 val
= 20; /* absolute default */
1527 default_keyboardpan_gain
= val
;
1532 /*! \todo Finish function documentation!!!
1534 * \par Function Description
1537 SCM
g_rc_print_command(SCM scm_command
)
1538 #define FUNC_NAME "print-command"
1542 SCM_ASSERT (scm_is_string (scm_command
), scm_command
,
1543 SCM_ARG1
, FUNC_NAME
);
1545 command
= SCM_STRING_CHARS (scm_command
);
1547 g_free (default_print_command
);
1548 default_print_command
= g_strdup (command
);
1554 /*! \todo Finish function documentation!!!
1556 * \par Function Description
1559 SCM
g_rc_select_slack_pixels(SCM pixels
)
1563 SCM_ASSERT (scm_is_integer (pixels
), pixels
, SCM_ARG1
, "select-slack-pixels");
1565 val
= scm_to_int (pixels
);
1568 fprintf(stderr
, _("Invalid number of pixels [%d] passed to select-slack-pixels\n"),
1570 val
= 4; /* absolute default */
1573 default_select_slack_pixels
= val
;