[gnome-calendar] gcal-view: started API migration
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] gcal-view: started API migration
- Date: Thu, 4 Dec 2014 22:20:03 +0000 (UTC)
commit 3dd88ba8295c8aaaac1894c2835a0a85cbd236ad
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Thu May 30 17:07:05 2013 -0400
gcal-view: started API migration
src/gcal-view.c | 38 ++++++++++++++++++++++++++++++++++++++
src/gcal-view.h | 27 +++++++++++++++++++++++++++
2 files changed, 65 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-view.c b/src/gcal-view.c
index 00134bc..a13c491 100644
--- a/src/gcal-view.c
+++ b/src/gcal-view.c
@@ -184,3 +184,41 @@ gcal_view_create_event_on_current_unit (GcalView *view)
GCAL_VIEW_GET_INTERFACE (view)->create_event_on_current_unit (view);
}
+
+void
+gcal_view_mark_current_unit (GcalView *view)
+{
+ g_return_if_fail (GCAL_IS_VIEW (view));
+ g_return_if_fail (GCAL_VIEW_GET_INTERFACE (view)->mark_current_unit);
+
+ GCAL_VIEW_GET_INTERFACE (view)->mark_current_unit (view);
+}
+
+void
+gcal_view_clear_mark (GcalView *view)
+{
+ g_return_if_fail (GCAL_IS_VIEW (view));
+ g_return_if_fail (GCAL_VIEW_GET_INTERFACE (view)->clear_mark);
+
+ GCAL_VIEW_GET_INTERFACE (view)->clear_mark (view);
+}
+
+void
+gcal_view_move_back (GcalView *view,
+ gint steps)
+{
+ g_return_if_fail (GCAL_IS_VIEW (view));
+ g_return_if_fail (GCAL_VIEW_GET_INTERFACE (view)->move_back);
+
+ GCAL_VIEW_GET_INTERFACE (view)->move_back (view, steps);
+}
+
+void
+gcal_view_move_forward (GcalView *view,
+ gint steps)
+{
+ g_return_if_fail (GCAL_IS_VIEW (view));
+ g_return_if_fail (GCAL_VIEW_GET_INTERFACE (view)->move_forward);
+
+ GCAL_VIEW_GET_INTERFACE (view)->move_forward (view, steps);
+}
diff --git a/src/gcal-view.h b/src/gcal-view.h
index 90a9d57..d2bdc1f 100644
--- a/src/gcal-view.h
+++ b/src/gcal-view.h
@@ -60,9 +60,23 @@ struct _GcalViewIface
GtkWidget* (*get_by_uuid) (GcalView *view, const gchar *uuid);
void (*reposition_child) (GcalView *view, const gchar *uuid);
+/* FIXME remove me in favor of the one below */
void (*clear_selection) (GcalView *view);
+/* FIXME remove me in favor of the one below */
void (*create_event_on_current_unit) (GcalView *view);
+
+/* New API */
+ /* Marks related API */
+ void (*mark_current_unit) (GcalView *view);
+ void (*clear_mark) (GcalView *view);
+
+ /* Navigation related API */
+ void (*move_back) (GcalView *view,
+ gint steps);
+ void (*move_forward) (GcalView *view,
+ gint steps);
+
};
GType gcal_view_get_type (void);
@@ -89,10 +103,23 @@ GtkWidget* gcal_view_get_by_uuid (GcalView *view,
void gcal_view_reposition_child (GcalView *view,
const gchar *uuid);
+/* FIXME remove me in favor of the one below */
void gcal_view_clear_selection (GcalView *view);
+/* FIXME remove me in favor of the one below */
void gcal_view_create_event_on_current_unit (GcalView *view);
+/* New API */
+void gcal_view_mark_current_unit (GcalView *view);
+
+void gcal_view_clear_mark (GcalView *view);
+
+void gcal_view_move_back (GcalView *view,
+ gint steps);
+
+void gcal_view_move_forward (GcalView *view,
+ gint steps);
+
G_END_DECLS
#endif /* __GCAL_MONTH_VIEW_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]