Add mouse vertical scrolling.
[familia.git] / src / gedcom / familia_gedcom.h
1 /****************************************************************************
2  *  Familia Lignum - Genealogical program                                   *
3  *  Copyright (C) 2011-2012 Rafał Długołęcki <rafal@dlugolecki.net.pl>      *
4  *                                                                          *
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; version 2 of the License.                 *
8  *                                                                          *
9  *  This program is distributed in the hope that it will be useful,         *
10  *  but WITHOUT ANY WARRANTY; without even the implied warranty of          *
11  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           *
12  *  GNU General Public License for more details.                            *
13  *                                                                          *
14  *  You should have received a copy of the GNU General Public License along *
15  *  with this program; if not, write to the Free Software Foundation, Inc., *
16  *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.             *
17  *                                                                          *
18  ****************************************************************************/
19
20 #ifndef _FAMILIA_GEDCOM_H
21 #define _FAMILIA_GEDCOM_H
22
23 #include <gedcom.h>
24
25 #include "../storage/storage.h"
26
27 /**
28  * @file familia_gedcom.h
29  * @brief GEDCOM Parser integration code.
30  */
31
32 /**
33  * Familia - Gedcom context.
34  * Used for passing current object/value between different states.
35  */
36 struct fged_ctxt {
37         /** Currently parsed object, stored in storage */
38         void * object;
39
40         /** Type of current object */
41         enum familia_storage_type type;
42 };
43
44 enum fged_timestamp_type {
45         UNSET,
46
47         BIRTH,
48         
49 };
50
51 /**
52  * Familia - Gedcom timestampable context.
53  */
54 struct fged_timestampable_ctxt {
55         /** Parent context */
56         struct familia_gedcom_parser_ctxt * ctxt;
57
58         /** Type of the timestamp */
59         enum fged_timestamp_type type;
60 };
61
62 /**
63  * Initializes integration with gedcom-parse library
64  */
65 void familia_gedcom_init();
66
67 /**
68  * Helper function for displaying Gedcom_val. Data is passed to the stderr.
69  * @param val Gedcom parser dynamic variable. Can be a NULL, string, date, age
70  *        or xref pointer. Check: Libgedcom interface details form more
71  *        informations.
72  */
73 void familia_gedcom_dump_val(Gedcom_val val);
74
75 #endif /*_FAMILIA_GEDCOM_H */