[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: gaf.git: branch: master updated (1.5.0-20080706-73-g371c370)
The branch, master has been updated
via 371c37024225e506b1018445e61f4392e13d7db9 (commit)
from 4f7b81ccb2246c8eae803ce13dd3927f5743b3ad (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
gschem/include/prototype.h | 1 +
gschem/src/g_hook.c | 6 ++++++
gschem/src/g_register.c | 1 +
3 files changed, 8 insertions(+), 0 deletions(-)
=================
Commit Messages
=================
commit 371c37024225e506b1018445e61f4392e13d7db9
Author: Bernd Jendrissek <bernd.jendrissek@xxxxxxxxx>
Date: Thu Aug 7 01:19:04 2008 +0200
Make the current page accessible to scheme.
Signed-off-by: Peter TB Brett <peter@xxxxxxxxxxxxx>
:100644 100644 6a286d5... 2a65402... M gschem/include/prototype.h
:100644 100644 bb5963a... 4a342c3... M gschem/src/g_hook.c
:100644 100644 7fe01cf... f5fb451... M gschem/src/g_register.c
=========
Changes
=========
commit 371c37024225e506b1018445e61f4392e13d7db9
Author: Bernd Jendrissek <bernd.jendrissek@xxxxxxxxx>
Date: Thu Aug 7 01:19:04 2008 +0200
Make the current page accessible to scheme.
Signed-off-by: Peter TB Brett <peter@xxxxxxxxxxxxx>
diff --git a/gschem/include/prototype.h b/gschem/include/prototype.h
index 6a286d5..2a65402 100644
--- a/gschem/include/prototype.h
+++ b/gschem/include/prototype.h
@@ -44,6 +44,7 @@ SCM g_get_object_pins (SCM object_smob);
SCM g_add_component(SCM page_smob, SCM scm_comp_name, SCM scm_x, SCM scm_y,
SCM scm_angle, SCM scm_selectable, SCM scm_mirror);
SCM g_get_objects_in_page(SCM page_smob);
+SCM g_get_current_page(void);
/* g_keys.c */
int g_keys_execute(GSCHEM_TOPLEVEL *w_current, int state, int keyval);
GArray *g_keys_dump_keymap (void);
diff --git a/gschem/src/g_hook.c b/gschem/src/g_hook.c
index bb5963a..4a342c3 100644
--- a/gschem/src/g_hook.c
+++ b/gschem/src/g_hook.c
@@ -770,3 +770,9 @@ SCM g_get_objects_in_page(SCM page_smob) {
return return_list;
}
+
+SCM g_get_current_page(void)
+{
+ return (g_make_page_smob(global_window_current->toplevel,
+ global_window_current->toplevel->page_current));
+}
diff --git a/gschem/src/g_register.c b/gschem/src/g_register.c
index 7fe01cf..f5fb451 100644
--- a/gschem/src/g_register.c
+++ b/gschem/src/g_register.c
@@ -344,6 +344,7 @@ void g_register_funcs (void)
scm_c_define_gsubr ("set-attribute-value!", 2, 0, 0, g_set_attrib_value_x);
scm_c_define_gsubr ("add-component-at-xy", 7, 0, 0, g_add_component);
scm_c_define_gsubr ("get-objects-in-page", 1, 0, 0, g_get_objects_in_page);
+ scm_c_define_gsubr ("get-current-page", 0, 0, 0, g_get_current_page);
add_component_hook = scm_create_hook ("add-component-hook", 1);
add_component_object_hook = scm_create_hook ("add-component-object-hook",
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs