]> Dogcows Code - chaz/homebank/blob - src/gtk-dateentry.h
import homebank-5.1.3
[chaz/homebank] / src / gtk-dateentry.h
1 /* HomeBank -- Free, easy, personal accounting for everyone.
2 * Copyright (C) 1995-2017 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_DATE_ENTRY_H__
21 #define __GTK_DATE_ENTRY_H__
22
23 G_BEGIN_DECLS
24
25 #define GTK_TYPE_DATE_ENTRY (gtk_date_entry_get_type ())
26 #define GTK_DATE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_DATE_ENTRY, GtkDateEntry))
27 #define GTK_DATE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_DATE_ENTRY, GtkDateEntryClass)
28 #define GTK_IS_DATE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_DATE_ENTRY))
29 #define GTK_IS_DATE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_DATE_ENTRY))
30 #define GTK_DATE_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_DATE_ENTRY, GtkDateEntryClass))
31
32 typedef struct _GtkDateEntry GtkDateEntry;
33 typedef struct _GtkDateEntryClass GtkDateEntryClass;
34 typedef struct _GtkDateEntryPrivate GtkDateEntryPrivate;
35
36
37 struct _GtkDateEntry
38 {
39 GtkBox box;
40
41 /*< private >*/
42 GtkDateEntryPrivate *priv;
43 };
44
45
46 struct _GtkDateEntryClass
47 {
48 GtkBoxClass parent_class;
49
50 /* signals */
51 void (* changed) (GtkDateEntry *dateentry);
52
53 /* Padding for future expansion */
54 void (*_gtk_reserved0) (void);
55 void (*_gtk_reserved1) (void);
56 void (*_gtk_reserved2) (void);
57 void (*_gtk_reserved3) (void);
58 };
59
60
61 struct _GtkDateEntryPrivate
62 {
63 GtkWidget *entry;
64 GtkWidget *button;
65 GtkWidget *arrow;
66 GtkWidget *popup_window;
67 GtkWidget *frame;
68 GtkWidget *calendar;
69
70 GDate *date;
71 guint32 lastdate;
72
73 GDate mindate, maxdate;
74 GdkDevice *device;
75 gboolean has_grab;
76 gboolean popup_in_progress;
77
78 GdkDevice *grab_pointer;
79 GdkDevice *grab_keyboard;
80 };
81
82
83 GType gtk_date_entry_get_type(void) G_GNUC_CONST;
84
85 GtkWidget *gtk_date_entry_new(void);
86
87 guint32 gtk_date_entry_get_date(GtkDateEntry * dateentry);
88 void gtk_date_entry_set_date(GtkDateEntry * dateentry, guint32 julian_days);
89 void gtk_date_entry_set_mindate(GtkDateEntry * dateentry, guint32 julian_days);
90 void gtk_date_entry_set_maxdate(GtkDateEntry * dateentry, guint32 julian_days);
91
92 G_END_DECLS
93
94 #endif /* __GTK_DATE_ENTRY_H__ */
95
96
This page took 0.032031 seconds and 4 git commands to generate.