12345678910111213141516171819202122232425262728293031323334353637 |
- #ifndef INCLUDED_TIMER_TASK_TREE_H
- #define INCLUDED_TIMER_TASK_TREE_H
- #include <gtk/gtk.h>
- G_BEGIN_DECLS
- #define TIMER_TYPE_TASK_TREE timer_task_tree_get_type()
- G_DECLARE_FINAL_TYPE(TimerTaskTree, timer_task_tree, TIMER, TASK_TREE, GtkTreeView)
- GtkWidget *timer_task_tree_new();
- /* time in seconds */
- void timer_task_tree_add_task(TimerTaskTree *self, GDateTime *date, const char *task, gint64 time);
- void timer_task_tree_set_task_names(TimerTaskTree *self, const char **names, gsize len);
- const char** timer_task_tree_get_task_names(TimerTaskTree *self, gsize *len);
- void timer_task_tree_update_header_dates(TimerTaskTree *self);
- void timer_task_tree_set_data_path(TimerTaskTree *self, const char *path);
- void timer_task_tree_save(TimerTaskTree *self);
- void timer_task_tree_add_from_file(TimerTaskTree *self, const char *path);
- char *timer_task_tree_get_csv(TimerTaskTree *self);
- void timer_task_tree_expand_today(TimerTaskTree *self);
- typedef struct {
- GDateTime *date;
- gint64 lenght;
- } TimerDataPoint;
- TimerDataPoint *timer_task_tree_get_day_data(TimerTaskTree *self, gsize *length);
- TimerDataPoint *timer_task_tree_get_task_data(TimerTaskTree *self, gsize *length);
- void timer_free_task_data(TimerDataPoint *data, gsize length);
- GDateTime *timer_task_tree_get_last_task_end(TimerTaskTree *self);
- G_END_DECLS
- #endif /* INCLUDED_TIMER_TASK_TREE_H */
|