GnuCash  5.6-150-g038405b370+
datecell.h
Go to the documentation of this file.
1 /********************************************************************\
2  * datecell.h -- Date entry/handling/display cell *
3  * *
4  * This program is free software; you can redistribute it and/or *
5  * modify it under the terms of the GNU General Public License as *
6  * published by the Free Software Foundation; either version 2 of *
7  * the License, or (at your option) any later version. *
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*
15  * along with this program; if not, contact: *
16  * *
17  * Free Software Foundation Voice: +1-617-542-5942 *
18  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
19  * Boston, MA 02110-1301, USA gnu@gnu.org *
20  * *
21 \********************************************************************/
22 
78 #ifndef DATE_CELL_H
79 #define DATE_CELL_H
80 
81 #ifdef __cplusplus
82 extern "C" {
83 #endif
84 
85 #include <time.h>
86 
87 #include "basiccell.h"
88 #include "qof.h"
89 
90 
91 typedef struct
92 {
93  BasicCell cell;
94 } DateCell;
95 
97 BasicCell * gnc_date_cell_new (void);
98 
107  int day, int mon, int year);
112 void gnc_date_cell_set_value_secs (DateCell *cell, time64 secs);
113 
125 void gnc_date_cell_commit (DateCell *cell);
126 
132 void gnc_date_cell_get_date (DateCell *cell, time64 *time, gboolean warn);
133 
134 #ifdef __cplusplus
135 }
136 #endif
137 
139 #endif
void gnc_date_cell_set_value_secs(DateCell *cell, time64 secs)
Sets the contents of the cell with seconds before or since the Unix epoch.
void gnc_date_cell_set_value(DateCell *cell, int day, int mon, int year)
Accepts a numeric date and sets the contents of the date cell to that value.
void gnc_date_cell_get_date(DateCell *cell, time64 *time, gboolean warn)
Set a time64 to the value in the DateCell.
BasicCell * gnc_date_cell_new(void)
installs a callback to handle date recording
void gnc_date_cell_commit(DateCell *cell)
Commits any pending changes to the value of the cell.
gint64 time64
Most systems that are currently maintained, including Microsoft Windows, BSD-derived Unixes and Linux...
Definition: gnc-date.h:87
The DateCell object implements a date handling cell.
Definition: datecell.h:91