]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/pointer-group-interface.hh
*** empty log message ***
[lilypond.git] / lily / include / pointer-group-interface.hh
1 /*
2   pointer-group-interface.hh -- declare Pointer_group_interface
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
7
8 */
9
10 #ifndef POINTER_GROUP_INTERFACE_HH
11 #define POINTER_GROUP_INTERFACE_HH
12
13 #include "parray.hh"
14 #include "lily-proto.hh"
15 #include "lily-guile.hh"
16
17
18 struct Pointer_group_interface
19 {
20 public:
21   static int count (Grob *, SCM);
22   static void add_grob (Grob *, SCM nm, Grob *e);
23   static void add_grob (Grob *, SCM nm, SCM x);
24 };
25
26 Link_array<Grob> const &internal_extract_grob_array (Grob const *elt, SCM symbol);
27 Link_array<Item> internal_extract_item_array (Grob const *elt, SCM symbol);
28
29 #define extract_grob_array(x,prop) internal_extract_grob_array (x, ly_symbol2scm (prop))
30 #define extract_item_array(x,prop) internal_extract_item_array (x, ly_symbol2scm (prop))
31
32
33 /*
34   This is dubious coding style, but lets not risk that we change the
35   representation of grob sets again.
36  */
37 #define extract_grob_set(grob,prop,set) \
38   Link_array<Grob> const &set (internal_extract_grob_array (grob, ly_symbol2scm (prop))) 
39 #define extract_item_set(grob,prop,set) \
40   Link_array<Item> set (internal_extract_item_array (grob, ly_symbol2scm (prop)))
41
42
43
44 #endif /* POINTER_GROUP_INTERFACE_HH */
45