Cleaned up and consolidated code which creates new pages.
[geda-gaf.git] / gschem / src / globals.c
blob77db05d65b8567bbf87d6ddc9e9c30f192d65f2c
1 /* gEDA - GPL Electronic Design Automation
2 * gschem - gEDA Schematic Capture
3 * Copyright (C) 1998-2000 Ales V. Hvezda
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
19 /*! \todo Add global variable documentation!!!
22 #include <config.h>
23 #include <stdio.h>
25 #include <libgeda/libgeda.h>
27 #include "../include/globals.h"
28 #include "../include/prototype.h"
30 #ifdef HAVE_LIBDMALLOC
31 #include <dmalloc.h>
32 #endif
34 /* this is needed since guile scripts only deal with the current
35 * window set in x_event* functions */
36 TOPLEVEL *global_window_current = NULL;
38 char *rc_filename = NULL;
39 char *script_filename = NULL;
40 char *output_filename = NULL;
42 /* color stuff */
43 GdkColormap *colormap;
44 GdkVisual *visual;
46 /* colors */
47 GdkColor white;
48 GdkColor black;
50 int do_logging = TRUE;
51 int logging_dest = LOG_WINDOW;
53 /* these are required by libgeda */
54 void (*arc_draw_func)() = o_arc_draw;
55 void (*box_draw_func)() = o_box_draw;
56 void (*picture_draw_func)() = o_picture_draw;
57 void (*circle_draw_func)() = o_circle_draw;
58 void (*complex_draw_func)() = o_complex_draw;
59 void (*line_draw_func)() = o_line_draw;
60 void (*net_draw_func)() = o_net_draw;
61 void (*bus_draw_func)() = o_bus_draw;
62 void (*text_draw_func)() = o_text_draw;
63 void (*pin_draw_func)() = o_pin_draw;
64 void (*select_func)() = o_select_object; /* NEW SELECTION code */
65 void (*x_log_update_func)() = NULL;
66 void (*variable_set_func)() = NULL; /* not used by gschem */
67 int (*load_newer_backup_func)() = x_fileselect_load_backup;
69 /* command line options */
70 int quiet_mode = FALSE;
71 int verbose_mode = FALSE;
72 int stroke_info_mode = FALSE;
73 int auto_place_mode = FALSE;
75 /* Global buffers */
76 OBJECT *object_buffer[MAX_BUFFERS];
78 /* Hooks */
79 SCM add_attribute_hook;
80 SCM add_component_hook;
81 SCM add_component_object_hook;
82 SCM mirror_component_object_hook;
83 SCM rotate_component_object_hook;
84 SCM complex_place_list_changed_hook;
85 SCM copy_component_hook;
86 SCM move_component_hook;
87 SCM add_pin_hook;
88 SCM rotate_pin_hook;
89 SCM mirror_pin_hook;
90 SCM deselect_component_hook;
91 SCM deselect_net_hook;
92 SCM deselect_all_hook;
93 SCM select_component_hook;
94 SCM select_net_hook;
95 SCM new_page_hook;