lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adds scheme binding for Side_position_interface::set_axis (issue188


From: mtsolo
Subject: Re: Adds scheme binding for Side_position_interface::set_axis (issue1880050)
Date: Tue, 03 Aug 2010 09:57:27 +0000

Reviewers: Neil Puttock,

Message:
I created a binding for chain_callback in grob-scheme.cc.  Please see
http://codereview.appspot.com/1890044 .  I'm fine using this and then
maybe making a scheme version of set_axis (i.e.
side-position-interface::set-axis) in the appropriate .scm file.  First,
let me know if this is what you had in mind.

Cheers,
Mike

Description:
Adds scheme binding for Side_position_interface::set_axis



Provides scheme bindings for Side_position_interface::set_axis

Please review this at http://codereview.appspot.com/1880050/show

Affected files:
  A lily/side-position-interface-scheme.cc


Index: lily/side-position-interface-scheme.cc
diff --git a/lily/side-position-interface-scheme.cc b/lily/side-position-interface-scheme.cc
new file mode 100644
index 0000000000000000000000000000000000000000..8ed43feade8b4edbb2ef2a62a4374b96059d503b
--- /dev/null
+++ b/lily/side-position-interface-scheme.cc
@@ -0,0 +1,35 @@
+/*
+  This file is part of LilyPond, the GNU music typesetter.
+
+  Copyright (C) 2010 Han-Wen Nienhuys <address@hidden>
+
+  LilyPond is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  LilyPond is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "side-position-interface.hh"
+#include "grob.hh"
+
+LY_DEFINE (ly_side_position_interface__set_axis, "ly:side-position-interface::set-axis!",
+          2, 0, 0, (SCM grob, SCM axis),
+          "Set @var{axis} as @var{grob}'s axis for offset callbacks.")
+{
+  LY_ASSERT_TYPE (unsmob_grob, grob, 1);
+  LY_ASSERT_TYPE (is_axis, axis, 2);
+
+  Side_position_interface::set_axis (unsmob_grob (grob),
+                                     Axis (scm_to_int (axis)));
+
+  return SCM_UNSPECIFIED;
+}
+





reply via email to

[Prev in Thread] Current Thread [Next in Thread]