add gitignore
[chaz/homebank] / src / gtk-dateentry.h
1 /* HomeBank -- Free, easy, personal accounting for everyone.
2 * Copyright (C) 1995-2014 Maxime DOYEN
3 *
4 * This file is part of HomeBank.
5 *
6 * HomeBank is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * HomeBank is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #ifndef __GTK_DATEENTRY_H__
21 #define __GTK_DATEENTRY_H__
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif /* __cplusplus */
26
27
28 #define GTK_TYPE_DATE_ENTRY (gtk_dateentry_get_type ())
29 #define GTK_DATE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_DATE_ENTRY, GtkDateEntry))
30 #define GTK_DATE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_DATE_ENTRY, GtkDateEntryClass)
31 #define GTK_IS_DATE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_DATE_ENTRY))
32 #define GTK_IS_DATE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_DATE_ENTRY))
33 #define GTK_DATE_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_DATE_ENTRY, GtkDateEntryClass))
34
35
36 typedef struct _GtkDateEntry GtkDateEntry;
37 typedef struct _GtkDateEntryClass GtkDateEntryClass;
38
39 /* you should access only the entry and list fields directly */
40 struct _GtkDateEntry
41 {
42 /*< private >*/
43 GtkHBox hbox;
44
45 /*< public >*/
46 GtkWidget *entry;
47 GtkWidget *arrow;
48 GtkWidget *popup;
49 GtkWidget *popwin;
50 GtkWidget *frame;
51 GtkWidget *calendar;
52
53 GDate *date;
54 guint32 lastdate;
55
56 GDate mindate, maxdate;
57
58 };
59
60 struct _GtkDateEntryClass
61 {
62 GtkHBoxClass parent_class;
63
64 /* signals */
65 void (* changed) (GtkDateEntry *dateentry);
66
67 /* Padding for future expansion */
68 void (*_gtk_reserved1) (void);
69 void (*_gtk_reserved2) (void);
70 void (*_gtk_reserved3) (void);
71 void (*_gtk_reserved4) (void);
72 };
73
74 GType gtk_dateentry_get_type(void);
75
76 GtkWidget *gtk_dateentry_new(void);
77
78 guint32 gtk_dateentry_get_date(GtkDateEntry * dateentry);
79 void gtk_dateentry_set_date(GtkDateEntry * dateentry, guint32 julian_days);
80 void gtk_dateentry_set_mindate(GtkDateEntry * dateentry, guint32 julian_days);
81 void gtk_dateentry_set_maxdate(GtkDateEntry * dateentry, guint32 julian_days);
82
83 #ifdef __cplusplus
84 }
85 #endif /* __cplusplus */
86
87 #endif /* __GTK_DATE_ENTRY_H__ */
88
89
This page took 0.041081 seconds and 4 git commands to generate.