]> saetta.ns0.it Git - libgtkcalendarex/commitdiff
New files.
authorAndrea Zagli <azagli@libero.it>
Sat, 14 Feb 2009 20:26:45 +0000 (20:26 +0000)
committerAndrea Zagli <azagli@libero.it>
Sat, 14 Feb 2009 20:26:45 +0000 (20:26 +0000)
git-svn-id: http://saetta.homelinux.org/svn/gtkcalendarex/trunk@3 7d3eb3ea-7290-43d7-a45e-e3c8929cbc33

src/gtkcalex.c
src/gtkcalex.h
src/gtkcalexviewday.c [new file with mode: 0644]
src/gtkcalexviewday.h [new file with mode: 0644]
src/gtkcalexviewmonth.c [new file with mode: 0644]
src/gtkcalexviewmonth.h [new file with mode: 0644]
src/gtkcalexviewweek.c [new file with mode: 0644]
src/gtkcalexviewweek.h [new file with mode: 0644]

index 89331e31b54c683dad8d696521e2442ac39e3fa5..b4e312ce567818bbe49c2c730e50971235e0d343 100644 (file)
 
 #include "gtkcalex.h"
 
+#include <goocanvas.h>
+
 enum
 {
-       PROP_0
+       PROP_0,
+       PROP_VIEW_TYPE,
+       PROP_DATE
 };
 
 static void gtk_calex_class_init (GtkCalExClass *klass);
 static void gtk_calex_init (GtkCalEx *gtk_calex);
 
 static void gtk_calex_set_property (GObject *object,
-                                     guint property_id,
-                                     const GValue *value,
-                                     GParamSpec *pspec);
+                                    guint property_id,
+                                    const GValue *value,
+                                    GParamSpec *pspec);
 static void gtk_calex_get_property (GObject *object,
-                                     guint property_id,
-                                     GValue *value,
-                                     GParamSpec *pspec);
+                                    guint property_id,
+                                    GValue *value,
+                                    GParamSpec *pspec);
 
 
 #define GTK_CALEX_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TYPE_GTK_CALEX, GtkCalExPrivate))
@@ -41,6 +45,9 @@ static void gtk_calex_get_property (GObject *object,
 typedef struct _GtkCalExPrivate GtkCalExPrivate;
 struct _GtkCalExPrivate
        {
+               GtkWidget *scrolledw; 
+               GtkWidget *goo_canvas;
+               GooCanvasItem *goo_canvas_root;
        };
 
 GType
@@ -88,19 +95,6 @@ gtk_calex_init (GtkCalEx *gtk_calex)
        GtkCalExPrivate *priv = GTK_CALEX_GET_PRIVATE (gtk_calex);
 }
 
-/**
- * gtk_calex_new:
- *
- * Returns: the newly created #GtkCalEx object.
- */
-GtkCalEx
-*gtk_calex_new ()
-{
-       GtkCalEx *gtk_calex = GTK_CALEX (g_object_new (gtk_calex_get_type (), NULL));
-
-       return gtk_calex;
-}
-
 static void
 gtk_calex_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
 {
@@ -110,6 +104,12 @@ gtk_calex_set_property (GObject *object, guint property_id, const GValue *value,
 
        switch (property_id)
                {
+                       case PROP_VIEW_TYPE:
+                               break;
+
+                       case PROP_DATE:
+                               break;
+
                        default:
                                G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
                                break;
@@ -125,8 +125,60 @@ gtk_calex_get_property (GObject *object, guint property_id, GValue *value, GPara
 
        switch (property_id)
                {
+                       case PROP_VIEW_TYPE:
+                               break;
+
+                       case PROP_DATE:
+                               break;
+
                        default:
                                G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
                                break;
                }
 }
+
+/**
+ * gtk_calex_new:
+ *
+ * Returns: the newly created #GtkCalEx object.
+ */
+GtkCalEx
+*gtk_calex_new ()
+{
+       GtkWidget *viewport;
+
+       GtkCalEx *gtk_calex = GTK_CALEX (g_object_new (gtk_calex_get_type (), NULL));
+
+       GtkCalExPrivate *priv = GTK_CALEX_GET_PRIVATE (gtk_calex);
+
+       priv->scrolledw = gtk_scrolled_window_new (NULL, NULL);
+
+       viewport = gtk_viewport_new ();
+       gtk_container_add (GTK_CONTAINER (priv->scrolledw), viewport);
+
+       priv->goo_canvas = goo_canvas_new ();
+
+       priv->goo_canvas_root = goo_canvas_get_root_item (GOO_CANVAS (priv->goo_canvas));
+
+       return gtk_calex;
+}
+
+GtkCalExViewType
+gtk_calex_get_view_type (GtkCalEx *calex)
+{
+}
+
+void
+gtk_calex_set_view_type (GtkCalEx *calex, GtkCalExTypeView type)
+{
+}
+
+GDate
+*gtk_calex_get_date (GtkCalEx *calex)
+{
+}
+
+void
+gtk_calex_set_date (GetCalEx *calex, GDate *date)
+{
+}
index 8e34c88570dac69eb32123e0c804ad3d233b5851..50dd641cf863c3ecd567988a3ccf78c5cc3a7abd 100644 (file)
@@ -52,6 +52,18 @@ GType gtk_calex_get_type (void) G_GNUC_CONST;
 
 GtkCalEx *gtk_calex_new (void);
 
+typedef enum {
+       GTK_CALEX_VIEW_TYPE_DAY,
+       GTK_CALEX_VIEW_TYPE_WORK_WEEK,
+       GTK_CALEX_VIEW_TYPE_WEEK,
+       GTK_CALEX_VIEW_TYPE_MONTH
+} GtkCalExViewType;
+
+GtkCalExViewType gtk_calex_get_view_type (GtkCalEx *calex);
+void gtk_calex_set_view_type (GtkCalEx *calex, GtkCalExTypeView type);
+
+GDate *gtk_calex_get_date (GtkCalEx *calex);
+void gtk_calex_set_date (GetCalEx *calex, GDate *date);
 
 G_END_DECLS
 
diff --git a/src/gtkcalexviewday.c b/src/gtkcalexviewday.c
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/gtkcalexviewday.h b/src/gtkcalexviewday.h
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/gtkcalexviewmonth.c b/src/gtkcalexviewmonth.c
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/gtkcalexviewmonth.h b/src/gtkcalexviewmonth.h
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/gtkcalexviewweek.c b/src/gtkcalexviewweek.c
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/gtkcalexviewweek.h b/src/gtkcalexviewweek.h
new file mode 100644 (file)
index 0000000..e69de29