2017-02-22 05:14:42 +00:00
|
|
|
#include <libical/ical.h>
|
2011-03-25 18:45:13 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <gtk/gtk.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <sys/stat.h>
|
2017-02-22 05:14:47 +00:00
|
|
|
#include "calendarfunc.h"
|
|
|
|
#include "settings.h"
|
2011-03-25 18:45:13 +00:00
|
|
|
|
|
|
|
|
|
|
|
time_t modtime; /* modified time of icalendar file */
|
|
|
|
struct calobj* calRoot; /* 1st element in list of calendar obj*/
|
|
|
|
int xr, yr; /*evil hack for moving dayview window*/
|
2014-10-05 15:29:59 +00:00
|
|
|
int datetype[32][2]; /* hashtable for coloring days.[jdn%32][0] stores color of day jdn,
|
2011-03-25 18:45:13 +00:00
|
|
|
[jdn%32][1] stores jdn. */
|
|
|
|
struct calobj{
|
|
|
|
struct icaltimetype start;
|
|
|
|
struct icaltimetype end;
|
|
|
|
icalcomponent *comp;
|
|
|
|
int type;
|
|
|
|
char *text;
|
|
|
|
struct calobj* next;
|
|
|
|
struct calobj* exclude;
|
|
|
|
};
|
|
|
|
|
|
|
|
int get_datetype(int day);
|
|
|
|
void calendar();
|
|
|
|
void showDay(struct icaltimetype dt);
|
|
|
|
void destroy (GtkWidget * widget, gpointer data);
|
|
|
|
int dayevents(struct icaltimetype dt, GtkWidget *table);
|
|
|
|
|
|
|
|
void deleteCalObjs();
|
|
|
|
void addCalObj(struct icaltimetype start, struct icaltimetype end,
|
|
|
|
int type, const char *text, icalcomponent * d);
|
|
|
|
int getDayType(struct icaltimetype dt);
|
2017-02-22 05:14:47 +00:00
|
|
|
int eventOnDay(struct icaltimetype dt, struct calobj* it);
|
2011-03-25 18:45:13 +00:00
|
|
|
int calcDayType(struct icaltimetype dt);
|
|
|
|
char* read_stream(char *s, size_t size, void *d);
|
|
|
|
void checkicalversion();
|
|
|
|
|