summaryrefslogtreecommitdiff
path: root/src/gui/views/gcal-view.h
blob: d4511566098f13753dcbf0dfd1d897895c2b8e80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/* gcal-view.h
 *
 * Copyright (C) 2012 - Erick PĂ©rez Castellanos
 *
 * 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
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */

#pragma once

#include "gcal-context.h"
#include "gcal-event-widget.h"

G_BEGIN_DECLS

#define GCAL_TYPE_VIEW (gcal_view_get_type ())

G_DECLARE_INTERFACE (GcalView, gcal_view, GCAL, VIEW, GtkWidget)

struct _GcalViewInterface
{
  GTypeInterface      parent;

  /* signals */
  void               (*create_event)                             (GcalView           *view,
                                                                  GDateTime          *start_span,
                                                                  GDateTime          *end_span,
                                                                  gdouble             x,
                                                                  gdouble             y);

  void               (*create_event_detailed)                    (GcalView           *view,
                                                                  GDateTime          *start_span,
                                                                  GDateTime          *end_span);

  GDateTime*         (*get_date)                                 (GcalView           *view);

  void               (*set_date)                                 (GcalView           *view,
                                                                  GDateTime          *date);

  GDateTime*         (*get_next_date)                            (GcalView           *self);

  GDateTime*         (*get_previous_date)                        (GcalView           *self);

  /* Marks related API */
  void               (*clear_marks)                              (GcalView           *view);

  GList*             (*get_children_by_uuid)                     (GcalView              *view,
                                                                  GcalRecurrenceModType  mod,
                                                                  const gchar           *uuid);
};

void                 gcal_view_set_date                          (GcalView           *view,
                                                                  GDateTime          *date);

GDateTime*           gcal_view_get_date                          (GcalView           *view);

GcalContext*         gcal_view_get_context                       (GcalView           *self);

void                 gcal_view_clear_marks                       (GcalView           *view);

GList*               gcal_view_get_children_by_uuid              (GcalView              *view,
                                                                  GcalRecurrenceModType  mod,
                                                                  const gchar           *uuid);

GDateTime*           gcal_view_get_next_date                     (GcalView              *self);

GDateTime*           gcal_view_get_previous_date                 (GcalView              *self);

G_END_DECLS