[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: g_register.c
User: cnieves
Date: 07/04/14 14:05:16
Modified: . g_register.c globals.c o_complex.c x_event.c
Log:
Added complex place list changed hook.
* include/globals.h, include/prototype.h, src/g_register.c,
src/globals.c, src/o_complex.c, src/x_event.c:
Added complex place changed hook.
This is the list used when placing new components.
Revision Changes Path
1.53 +2 -1 eda/geda/gaf/gschem/src/g_register.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: g_register.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/g_register.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -b -r1.52 -r1.53
--- g_register.c 24 Feb 2007 11:47:33 -0000 1.52
+++ g_register.c 14 Apr 2007 18:05:15 -0000 1.53
@@ -364,5 +364,6 @@
rotate_pin_hook = scm_create_hook ("rotate-pin-hook", 1);
add_attribute_hook = scm_create_hook ("add-attribute-hook", 1);
new_page_hook = scm_create_hook ("new-page-hook", 1);
-
+ complex_place_list_changed_hook =
+ scm_create_hook ("complex-place-list-changed-hook", 1);
}
1.20 +1 -0 eda/geda/gaf/gschem/src/globals.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: globals.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/globals.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- globals.c 10 Feb 2007 18:33:17 -0000 1.19
+++ globals.c 14 Apr 2007 18:05:15 -0000 1.20
@@ -81,6 +81,7 @@
SCM add_component_object_hook;
SCM mirror_component_object_hook;
SCM rotate_component_object_hook;
+SCM complex_place_list_changed_hook;
SCM copy_component_hook;
SCM move_component_hook;
SCM add_pin_hook;
1.32 +29 -0 eda/geda/gaf/gschem/src/o_complex.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: o_complex.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_complex.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- o_complex.c 24 Feb 2007 18:43:14 -0000 1.31
+++ o_complex.c 14 Apr 2007 18:05:15 -0000 1.32
@@ -173,12 +173,41 @@
}
}
+ /* Run the complex place list changed hook */
+ o_complex_place_changed_run_hook (w_current);
+
o_drawbounding(w_current,
NULL,
w_current->page_current->complex_place_list,
x_get_darkcolor(w_current->bb_color), TRUE);
}
+/*! \brief Run the complex place list changed hook.
+ * \par Function Description
+ * The complex place list is usually used when placing new components
+ * in the schematic. This function should be called whenever that list
+ * is modified.
+ * \param [in] w_current TOPLEVEL structure.
+ *
+ */
+void o_complex_place_changed_run_hook(TOPLEVEL *w_current) {
+ GList *ptr = NULL;
+
+ /* Run the complex place list changed hook */
+ if (scm_hook_empty_p(complex_place_list_changed_hook) == SCM_BOOL_F &&
+ w_current->page_current->complex_place_list != NULL) {
+ ptr = w_current->page_current->complex_place_list;
+ while (ptr) {
+ scm_run_hook(complex_place_list_changed_hook,
+ scm_cons (g_make_object_smob
+ (w_current,
+ (OBJECT *) ptr->data), SCM_EOL));
+ ptr = ptr->next;
+ }
+
+ }
+}
+
/*! \todo Finish function documentation!!!
* \brief
* \par Function Description
1.46 +3 -0 eda/geda/gaf/gschem/src/x_event.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: x_event.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/x_event.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -b -r1.45 -r1.46
--- x_event.c 24 Feb 2007 18:43:14 -0000 1.45
+++ x_event.c 14 Apr 2007 18:05:15 -0000 1.46
@@ -805,6 +805,9 @@
o_complex_place_rotate(w_current);
+ /* Run the complex place list changed hook */
+ o_complex_place_changed_run_hook (w_current);
+
o_drawbounding(w_current,
NULL,
w_current->page_current->complex_place_list,
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs