day_item structures updated to take item state into account

day_item_nb() created
This commit is contained in:
Frederic Culot 2007-02-24 17:38:16 +00:00
parent 9cdea998ba
commit 3cefb284d0

View File

@ -1,8 +1,8 @@
/* $calcurse: day.h,v 1.8 2006/12/08 08:38:54 culot Exp $ */
/* $calcurse: day.h,v 1.9 2007/02/24 17:38:16 culot Exp $ */
/*
* Calcurse - text-based organizer
* Copyright (c) 2004-2006 Frederic Culot
* Copyright (c) 2004-2007 Frederic Culot
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -39,19 +39,21 @@
struct day_item_s {
struct day_item_s *next;
int type; /* (recursive or normal) event or appointment */
long start; /* seconds since 1 jan 1970 */
char *mesg; /* item description */
int evnt_id; /* event identifier */
long appt_dur; /* appointment duration in seconds */
int type; /* (recursive or normal) event or appointment */
int evnt_id; /* event identifier */
int appt_pos; /* real position in recurrent list */
char state; /* appointment state */
char *mesg; /* item description */
};
struct day_saved_item_s {
int type ;
char *mesg;
char start[MAX_LENGTH];
char end[MAX_LENGTH];
char state;
char type ;
char *mesg;
};
int day_store_items(long date, int *pnb_events, int *pnb_apoints);
@ -62,7 +64,7 @@ int day_store_recur_apoints(long date);
int day_store_apoints(long date);
struct day_item_s *day_add_event(int type, char *mesg, long day, int id);
struct day_item_s *day_add_apoint(int type, char *mesg, long start, long dur,
int real_pos);
char state, int real_pos);
void day_write_pad(long date, int width, int length, int incolor, int colr);
apoint_llist_node_t *day_item_s2apoint_s(struct day_item_s *p);
void day_popup_item(void);
@ -71,5 +73,6 @@ void day_edit_item(int year, int month, int day, int item_num, int colr);
char *day_edit_time(long time, int colr);
int day_erase_item(long date, int item_number, int force_erase);
struct day_item_s *day_get_item(int item_number);
int day_item_nb(long date, int day_num, int type);
#endif /* CALCURSE_DAY_H */