GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
gnc-recurrence.h
1 /* gnc-recurrence.h:
2  *
3  * GncRecurrence is a minimal GUI for specifying a Recurrence.
4  *
5  * You see, small is _nice_. :)
6  *
7  */
8 
9 /* Copyright (C) 2005, Chris Shoemaker <[email protected]> *
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License as
13  * published by the Free Software Foundation; either version 2 of
14  * the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, contact:
23  *
24  * Free Software Foundation Voice: +1-617-542-5942
25  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
26  * Boston, MA 02111-1301, USA [email protected]
27  */
28 
29 #ifndef GNC_RECURRENCE_H
30 #define GNC_RECURRENCE_H
31 
32 #include <glib.h>
33 #include "Recurrence.h"
34 
35 #define GNC_TYPE_RECURRENCE (gnc_recurrence_get_type())
36 #define GNC_RECURRENCE(obj) G_TYPE_CHECK_INSTANCE_CAST \
37  (obj, GNC_TYPE_RECURRENCE, GncRecurrence)
38 #define GNC_RECURRENCE_CLASS(klass) G_TYPE_CHECK_CLASS_CAST \
39  (klass, GNC_TYPE_RECURRENCE, GncRecurrence)
40 #define GNC_IS_RECURRENCE(obj) G_TYPE_CHECK_INSTANCE_TYPE \
41  (obj, GNC_TYPE_RECURRENCE)
42 
43 typedef struct _GncRecurrence GncRecurrence;
45 
46 GType gnc_recurrence_get_type(void);
47 GtkWidget * gnc_recurrence_new(void);
48 
49 void gnc_recurrence_set(GncRecurrence *gr, const Recurrence *r);
50 
51 /* The returned Recurrence is internally owned and is only valid as
52  long as the GncRecurrence is around. */
53 const Recurrence * gnc_recurrence_get(GncRecurrence *gr);
54 
55 /* "composite" recurrences */
56 void gnc_recurrence_comp_set_list(GncRecurrenceComp *grc, const GList *r);
57 
58 /* The GList is newly-allocated, but the Recurrences are internally
59  owned. */
60 GList * gnc_recurrence_comp_get_list(GncRecurrenceComp *grc);
61 
62 /* This works, but is not used. Kind of experimental... */
63 GtkWidget * gnc_recurrence_comp_new(void);
64 GType gnc_recurrence_comp_get_type(void);
65 
66 #endif