Bug 793125 - Crash due to popup menus left attached too long
[evolution.git] / src / calendar / gui / e-cal-model-tasks.h
blob0fa19ff935d18d427d1cf9db90660a51f0903a10
1 /*
3 * Evolution calendar - Data model for ETable
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU Lesser General Public License as published by
7 * the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this program; if not, see <http://www.gnu.org/licenses/>.
18 * Authors:
19 * Rodrigo Moya <rodrigo@ximian.com>
21 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
25 #ifndef E_CAL_MODEL_TASKS_H
26 #define E_CAL_MODEL_TASKS_H
28 #include "e-cal-model.h"
30 /* Standard GObject macros */
31 #define E_TYPE_CAL_MODEL_TASKS \
32 (e_cal_model_tasks_get_type ())
33 #define E_CAL_MODEL_TASKS(obj) \
34 (G_TYPE_CHECK_INSTANCE_CAST \
35 ((obj), E_TYPE_CAL_MODEL_TASKS, ECalModelTasks))
36 #define E_CAL_MODEL_TASKS_CLASS(cls) \
37 (G_TYPE_CHECK_CLASS_CAST \
38 ((cls), E_TYPE_CAL_MODEL_TASKS, ECalModelTasksClass))
39 #define E_IS_CAL_MODEL_TASKS(obj) \
40 (G_TYPE_CHECK_INSTANCE_TYPE \
41 ((obj), E_TYPE_CAL_MODEL_TASKS))
42 #define E_IS_CAL_MODEL_TASKS_CLASS(cls) \
43 (G_TYPE_CHECK_CLASS_TYPE \
44 ((cls), E_TYPE_CAL_MODEL_TASKS))
45 #define E_CAL_MODEL_TASKS_GET_CLASS(obj) \
46 (G_TYPE_INSTANCE_GET_CLASS \
47 ((obj), E_TYPE_CAL_MODEL_TASKS, ECalModelTasksClass))
49 G_BEGIN_DECLS
51 typedef struct _ECalModelTasks ECalModelTasks;
52 typedef struct _ECalModelTasksClass ECalModelTasksClass;
53 typedef struct _ECalModelTasksPrivate ECalModelTasksPrivate;
55 typedef enum {
56 /* If you add new items here or reorder them, you have to update the
57 * .etspec files for the tables using this model */
58 E_CAL_MODEL_TASKS_FIELD_COMPLETED = E_CAL_MODEL_FIELD_LAST,
59 E_CAL_MODEL_TASKS_FIELD_COMPLETE,
60 E_CAL_MODEL_TASKS_FIELD_DUE,
61 E_CAL_MODEL_TASKS_FIELD_GEO,
62 E_CAL_MODEL_TASKS_FIELD_OVERDUE,
63 E_CAL_MODEL_TASKS_FIELD_PERCENT,
64 E_CAL_MODEL_TASKS_FIELD_PRIORITY,
65 E_CAL_MODEL_TASKS_FIELD_STATUS,
66 E_CAL_MODEL_TASKS_FIELD_URL,
67 E_CAL_MODEL_TASKS_FIELD_STRIKEOUT, /* it's another virtual readonly column */
68 E_CAL_MODEL_TASKS_FIELD_LAST
69 } ECalModelTasksField;
71 struct _ECalModelTasks {
72 ECalModel parent;
73 ECalModelTasksPrivate *priv;
76 struct _ECalModelTasksClass {
77 ECalModelClass parent_class;
80 GType e_cal_model_tasks_get_type (void);
81 ECalModel * e_cal_model_tasks_new (ECalDataModel *data_model,
82 ESourceRegistry *registry,
83 EShell *shell);
84 gboolean e_cal_model_tasks_get_highlight_due_today
85 (ECalModelTasks *model);
86 void e_cal_model_tasks_set_highlight_due_today
87 (ECalModelTasks *model,
88 gboolean highlight);
89 const gchar * e_cal_model_tasks_get_color_due_today
90 (ECalModelTasks *model);
91 void e_cal_model_tasks_set_color_due_today
92 (ECalModelTasks *model,
93 const gchar *color_due_today);
94 gboolean e_cal_model_tasks_get_highlight_overdue
95 (ECalModelTasks *model);
96 void e_cal_model_tasks_set_highlight_overdue
97 (ECalModelTasks *model,
98 gboolean highlight);
99 const gchar * e_cal_model_tasks_get_color_overdue
100 (ECalModelTasks *model);
101 void e_cal_model_tasks_set_color_overdue
102 (ECalModelTasks *model,
103 const gchar *color_overdue);
104 void e_cal_model_tasks_mark_comp_complete
105 (ECalModelTasks *model,
106 ECalModelComponent *comp_data);
107 void e_cal_model_tasks_mark_comp_incomplete
108 (ECalModelTasks *model,
109 ECalModelComponent *comp_data);
110 void e_cal_model_tasks_update_due_tasks
111 (ECalModelTasks *model);
113 G_END_DECLS
115 #endif /* E_CAL_MODEL_TASKS_H */