From: Andrea Zagli Date: Sat, 4 Dec 2010 10:01:25 +0000 (+0100) Subject: Implemented GtkCalEx::add_event, GtkCalEx::remove_event and GtkCalEx::get_events. X-Git-Url: https://saetta.ns0.it/gitweb?a=commitdiff_plain;h=c23ce12e8e38b95e17dc32e3b01ec02df7a83b64;p=libgtkcalendarex Implemented GtkCalEx::add_event, GtkCalEx::remove_event and GtkCalEx::get_events. --- diff --git a/src/gtkcalex.c b/src/gtkcalex.c index 57d540c..64d9822 100644 --- a/src/gtkcalex.c +++ b/src/gtkcalex.c @@ -392,6 +392,61 @@ GSList return priv->categories; } +/** + * gtk_calex_add_eventù: + * @calex: + * @event: + * + */ +void +gtk_calex_add_event (GtkCalEx *calex, GtkCalExEvent *event) +{ + GtkCalExPrivate *priv; + + g_return_if_fail (IS_GTK_CALEX (calex)); + g_return_if_fail (IS_GTK_CALEX_EVENT (event)); + + priv = GTK_CALEX_GET_PRIVATE (calex); + + priv->events = g_slist_append (priv->events, event); +} + +/** + * gtk_calex_remove_event: + * @calex: + * @event: + * + */ +void +gtk_calex_remove_event (GtkCalEx *calex, GtkCalExEvent *event) +{ + GtkCalExPrivate *priv; + + g_return_if_fail (IS_GTK_CALEX (calex)); + g_return_if_fail (IS_GTK_CALEX_EVENT (event)); + + priv = GTK_CALEX_GET_PRIVATE (calex); + + priv->events = g_slist_remove (priv->events, event); +} + +/** + * gtk_calex_get_events: + * @calex: + * + */ +GSList +*gtk_calex_get_events (GtkCalEx *calex) +{ + GtkCalExPrivate *priv; + + g_return_val_if_fail (IS_GTK_CALEX (calex), NULL); + + priv = GTK_CALEX_GET_PRIVATE (calex); + + return priv->events; +} + static void gtk_calex_size_request (GtkWidget *widget, GtkRequisition *requisition)