TimerTaskTree.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef INCLUDED_TIMER_TASK_TREE_H
  2. #define INCLUDED_TIMER_TASK_TREE_H
  3. #include <gtk/gtk.h>
  4. G_BEGIN_DECLS
  5. #define TIMER_TYPE_TASK_TREE timer_task_tree_get_type()
  6. G_DECLARE_FINAL_TYPE(TimerTaskTree, timer_task_tree, TIMER, TASK_TREE, GtkTreeView)
  7. GtkWidget *timer_task_tree_new();
  8. /* time in seconds */
  9. void timer_task_tree_add_task(TimerTaskTree *self, GDateTime *date, const char *task, gint64 time);
  10. void timer_task_tree_set_task_names(TimerTaskTree *self, const char **names, gsize len);
  11. const char** timer_task_tree_get_task_names(TimerTaskTree *self, gsize *len);
  12. void timer_task_tree_update_header_dates(TimerTaskTree *self);
  13. void timer_task_tree_set_data_path(TimerTaskTree *self, const char *path);
  14. void timer_task_tree_save(TimerTaskTree *self);
  15. void timer_task_tree_add_from_file(TimerTaskTree *self, const char *path);
  16. char *timer_task_tree_get_csv(TimerTaskTree *self);
  17. void timer_task_tree_expand_today(TimerTaskTree *self);
  18. typedef struct {
  19. GDateTime *date;
  20. gint64 lenght;
  21. } TimerDataPoint;
  22. TimerDataPoint *timer_task_tree_get_day_data(TimerTaskTree *self, gsize *length);
  23. TimerDataPoint *timer_task_tree_get_task_data(TimerTaskTree *self, gsize *length);
  24. void timer_free_task_data(TimerDataPoint *data, gsize length);
  25. GDateTime *timer_task_tree_get_last_task_end(TimerTaskTree *self);
  26. G_END_DECLS
  27. #endif /* INCLUDED_TIMER_TASK_TREE_H */