]> saetta.ns0.it Git - libgtkcalendarex/commitdiff
Implemented GtkCalEx::add_event, GtkCalEx::remove_event and GtkCalEx::get_events.
authorAndrea Zagli <azagli@libero.it>
Sat, 4 Dec 2010 10:01:25 +0000 (11:01 +0100)
committerAndrea Zagli <azagli@libero.it>
Sat, 4 Dec 2010 10:01:25 +0000 (11:01 +0100)
src/gtkcalex.c

index 57d540cd0b0293a89a13e7b8a37eec1f2c62297c..64d9822f8c65ce749f22079c3c0d2520b139b506 100644 (file)
@@ -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)