From eb55ca322fe3532429de5c069b1f481792c236a1 Mon Sep 17 00:00:00 2001
From: Andrea Zagli <azagli@libero.it>
Date: Mon, 1 Nov 2010 08:32:10 +0100
Subject: [PATCH] Skeleton of GObject files.

---
 .gitignore              |  49 ++++++++++++++++++
 autogen.sh              | 101 +++++--------------------------------
 config.h.in             |   7 +++
 src/Makefile.am         |  14 ++++--
 src/gtkcalex.c          |  36 ++-----------
 src/gtkcalex.h          |  10 ++--
 src/gtkcalexviewday.c   | 109 ++++++++++++++++++++++++++++++++++++++++
 src/gtkcalexviewday.h   |  58 +++++++++++++++++++++
 src/gtkcalexviewmonth.c | 109 ++++++++++++++++++++++++++++++++++++++++
 src/gtkcalexviewmonth.h |  58 +++++++++++++++++++++
 src/gtkcalexviewweek.c  | 109 ++++++++++++++++++++++++++++++++++++++++
 src/gtkcalexviewweek.h  |  58 +++++++++++++++++++++
 tests/test.c            |   2 +-
 13 files changed, 593 insertions(+), 127 deletions(-)
 create mode 100644 .gitignore

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..af9210a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,49 @@
+*~
+*.rpath
+*.pot
+*.mo
+*.gmo
+*.o
+*.lo
+*.la
+*.bak
+*.stamp
+*.tar.gz
+*.pc
+*.sed
+*.sin
+*.header
+*.exe
+.libs
+.deps
+ABOUT-NLS
+INSTALL
+Makefile
+Makefile.in
+Makefile.in.in
+Makevars
+aclocal.m4
+autom4te.cache/
+config.guess
+config.log
+config.sub
+configure
+depcomp
+gtk-doc.make
+install-sh
+ltmain.sh
+m4/
+missing
+config.h
+config.status
+docs/reference/version.xml
+docs/reference/html/
+docs/reference/xml/
+libtool
+stamp-h1
+tests/test
+POTFILES
+mkinstalldirs
+stamp-it
+intltool-*
+Rules-quot
diff --git a/autogen.sh b/autogen.sh
index 2d2e2e7..03f9530 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,98 +1,23 @@
-#!/bin/sh
+#!/bin/bash
 # Run this to generate all the initial makefiles, etc.
 
 srcdir=`dirname $0`
 test -z "$srcdir" && srcdir=.
 
-ORIGDIR=`pwd`
-cd $srcdir
-PROJECT=libgtkcalendarex
-TEST_TYPE=-f
-FILE=configure.ac
+PKG_NAME="libgtkcalendarex"
 
-DIE=0
-
-have_libtool=false
-if libtoolize --version < /dev/null > /dev/null 2>&1 ; then
-	libtool_version=`libtoolize --version | sed 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'`
-	case $libtool_version in
-	    1.4*|1.5*)
-		have_libtool=true
-		;;
-	esac
-fi
-if $have_libtool ; then : ; else
-	echo
-	echo "You must have libtool 1.4 installed to compile $PROJECT."
-	echo "Install the appropriate package for your distribution,"
-	echo "or get the source tarball at http://ftp.gnu.org/gnu/libtool/"
-	DIE=1
-fi
-
-(gtkdocize --version) < /dev/null > /dev/null 2>&1 || {
-	echo
-	echo "You must have gtk-doc installed to compile $PROJECT."
-	echo "Install the appropriate package for your distribution,"
-	echo "or get the source tarball at http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/"
-	DIE=1
+(test -f $srcdir/configure.ac \
+  && test -d $srcdir/src \
+  && test -f $srcdir/src/libgtkcalendarex.h) || {
+    echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
+    echo " top-level libgtkcalendarex directory"
+    exit 1
 }
 
-(autoconf --version) < /dev/null > /dev/null 2>&1 || {
-	echo
-	echo "You must have autoconf installed to compile $PROJECT."
-	echo "Install the appropriate package for your distribution,"
-	echo "or get the source tarball at http://ftp.gnu.org/gnu/autoconf/"
-	DIE=1
+which gnome-autogen.sh || {
+    echo "You need to install gnome-common from GNOME and make"
+    echo "sure the gnome-autogen.sh script is in your \$PATH."
+    exit 1
 }
 
-if automake --version < /dev/null > /dev/null 2>&1 ; then
-    AUTOMAKE=automake
-    ACLOCAL=aclocal
-else
-	echo
-	echo "You must have automake 1.7.x installed to compile $PROJECT."
-	echo "Install the appropriate package for your distribution,"
-	echo "or get the source tarball at http://ftp.gnu.org/gnu/automake/"
-	DIE=1
-fi
-
-if test "$DIE" -eq 1; then
-	exit 1
-fi
-
-test $TEST_TYPE $FILE || {
-	echo "You must run this script in the top-level $PROJECT directory"
-	exit 1
-}
-
-if test -z "$AUTOGEN_SUBDIR_MODE"; then
-        if test -z "$*"; then
-                echo "I am going to run ./configure with no arguments - if you wish "
-                echo "to pass any to it, please specify them on the $0 command line."
-        fi
-fi
-
-rm -rf autom4te.cache
-
-# README and INSTALL are required by automake, but may be deleted by clean
-# up rules. to get automake to work, simply touch these here, they will be
-# regenerated from their corresponding *.in files by ./configure anyway.
-touch README INSTALL
-
-$ACLOCAL || exit $?
-
-libtoolize --force || exit $?
-gtkdocize || exit $?
-
-autoheader || exit $?
-
-$AUTOMAKE --add-missing || exit $?
-autoconf || exit $?
-cd $ORIGDIR || exit $?
-
-if test -z "$AUTOGEN_SUBDIR_MODE"; then
-        $srcdir/configure --enable-maintainer-mode $AUTOGEN_CONFIGURE_ARGS "$@" || exit $?
-
-        echo 
-        echo "Now type 'make' to compile $PROJECT."
-fi
+USE_GNOME2_MACROS=1 . gnome-autogen.sh
diff --git a/config.h.in b/config.h.in
index 09ee04c..423fcf8 100644
--- a/config.h.in
+++ b/config.h.in
@@ -30,6 +30,10 @@
 /* Define to 1 if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+   */
+#undef LT_OBJDIR
+
 /* Name of package */
 #undef PACKAGE
 
@@ -45,6 +49,9 @@
 /* Define to the one symbol short name of this package. */
 #undef PACKAGE_TARNAME
 
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
 
diff --git a/src/Makefile.am b/src/Makefile.am
index a02ac93..ce6d4cf 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,15 +1,23 @@
 LIBS = $(GTKCALEX_LIBS)
 
 AM_CPPFLAGS = $(GTKCALEX_CFLAGS) \
-              -DG_LOG_DOMAIN=\"libgtkcalendarex\"
+              -DG_LOG_DOMAIN=\"GtkCalendarEx\"
 
 lib_LTLIBRARIES = libgtkcalendarex.la
 
 libgtkcalendarex_la_LDFLAGS = -no-undefined
 
 libgtkcalendarex_la_SOURCES = \
-                        gtkcalex.c
+                              gtkcalex.c \
+                              gtkcalexviewday.c \
+                              gtkcalexviewmonth.c \
+                              gtkcalexviewweek.c
 
 include_HEADERS = \
                   libgtkcalendarex.h \
-                  gtkcalex.h
+                  gtkcalex.h \
+                  gtkcalexviewday.h \
+                  gtkcalexviewmonth.h \
+                  gtkcalexviewweek.h
+
+libgtkcalendared_includedir = $(includedir)/libgtkcalendarex
diff --git a/src/gtkcalex.c b/src/gtkcalex.c
index b4e312c..5f9ec39 100644
--- a/src/gtkcalex.c
+++ b/src/gtkcalex.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2009 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2009-2010 Andrea Zagli <azagli@libero.it>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -50,33 +50,7 @@ struct _GtkCalExPrivate
 		GooCanvasItem *goo_canvas_root;
 	};
 
-GType
-gtk_calex_get_type (void)
-{
-	static GType gtk_calex_type = 0;
-
-	if (!gtk_calex_type)
-		{
-			static const GTypeInfo gtk_calex_info =
-			{
-				sizeof (GtkCalExClass),
-				NULL,	/* base_init */
-				NULL,	/* base_finalize */
-				(GClassInitFunc) gtk_calex_class_init,
-				NULL,	/* class_finalize */
-				NULL,	/* class_data */
-				sizeof (GtkCalEx),
-				0,	/* n_preallocs */
-				(GInstanceInitFunc) gtk_calex_init,
-				NULL
-			};
-
-			gtk_calex_type = g_type_register_static (G_TYPE_OBJECT, "GtkCalEx",
-			                                          &gtk_calex_info, 0);
-		}
-
-	return gtk_calex_type;
-}
+G_DEFINE_TYPE (GtkCalEx, gtk_calex, G_TYPE_OBJECT)
 
 static void
 gtk_calex_class_init (GtkCalExClass *klass)
@@ -153,7 +127,7 @@ GtkCalEx
 
 	priv->scrolledw = gtk_scrolled_window_new (NULL, NULL);
 
-	viewport = gtk_viewport_new ();
+	viewport = gtk_viewport_new (NULL, NULL);
 	gtk_container_add (GTK_CONTAINER (priv->scrolledw), viewport);
 
 	priv->goo_canvas = goo_canvas_new ();
@@ -169,7 +143,7 @@ gtk_calex_get_view_type (GtkCalEx *calex)
 }
 
 void
-gtk_calex_set_view_type (GtkCalEx *calex, GtkCalExTypeView type)
+gtk_calex_set_view_type (GtkCalEx *calex, GtkCalExViewType type)
 {
 }
 
@@ -179,6 +153,6 @@ GDate
 }
 
 void
-gtk_calex_set_date (GetCalEx *calex, GDate *date)
+gtk_calex_set_date (GtkCalEx *calex, GDate *date)
 {
 }
diff --git a/src/gtkcalex.h b/src/gtkcalex.h
index 50dd641..498a1ac 100644
--- a/src/gtkcalex.h
+++ b/src/gtkcalex.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2009 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2009-2010 Andrea Zagli <azagli@libero.it>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -56,14 +56,16 @@ typedef enum {
 	GTK_CALEX_VIEW_TYPE_DAY,
 	GTK_CALEX_VIEW_TYPE_WORK_WEEK,
 	GTK_CALEX_VIEW_TYPE_WEEK,
-	GTK_CALEX_VIEW_TYPE_MONTH
+	GTK_CALEX_VIEW_TYPE_MONTH,
+	GTK_CALEX_VIEW_LIST
 } GtkCalExViewType;
 
 GtkCalExViewType gtk_calex_get_view_type (GtkCalEx *calex);
-void gtk_calex_set_view_type (GtkCalEx *calex, GtkCalExTypeView type);
+void gtk_calex_set_view_type (GtkCalEx *calex, GtkCalExViewType type);
 
 GDate *gtk_calex_get_date (GtkCalEx *calex);
-void gtk_calex_set_date (GetCalEx *calex, GDate *date);
+void gtk_calex_set_date (GtkCalEx *calex, GDate *date);
+
 
 G_END_DECLS
 
diff --git a/src/gtkcalexviewday.c b/src/gtkcalexviewday.c
index e69de29..6c7dee3 100644
--- a/src/gtkcalexviewday.c
+++ b/src/gtkcalexviewday.c
@@ -0,0 +1,109 @@
+/*
+ * Copyright (C) 2009-2010 Andrea Zagli <azagli@libero.it>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library 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
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include "gtkcalexviewday.h"
+
+#include <goocanvas.h>
+
+enum
+{
+	PROP_0
+};
+
+static void gtk_calex_view_day_class_init (GtkCalExViewDayClass *klass);
+static void gtk_calex_view_day_init (GtkCalExViewDay *gtk_calex_view_day);
+
+static void gtk_calex_view_day_set_property (GObject *object,
+                                    guint property_id,
+                                    const GValue *value,
+                                    GParamSpec *pspec);
+static void gtk_calex_view_day_get_property (GObject *object,
+                                    guint property_id,
+                                    GValue *value,
+                                    GParamSpec *pspec);
+
+
+#define GTK_CALEX_VIEW_DAY_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TYPE_GTK_CALEX_VIEW_DAY, GtkCalExViewDayPrivate))
+
+typedef struct _GtkCalExViewDayPrivate GtkCalExViewDayPrivate;
+struct _GtkCalExViewDayPrivate
+	{
+		gpointer foo;
+	};
+
+G_DEFINE_TYPE (GtkCalExViewDay, gtk_calex_view_day, G_TYPE_OBJECT)
+
+static void
+gtk_calex_view_day_class_init (GtkCalExViewDayClass *klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+	g_type_class_add_private (object_class, sizeof (GtkCalExViewDayPrivate));
+
+	object_class->set_property = gtk_calex_view_day_set_property;
+	object_class->get_property = gtk_calex_view_day_get_property;
+}
+
+static void
+gtk_calex_view_day_init (GtkCalExViewDay *gtk_calex_view_day)
+{
+	GtkCalExViewDayPrivate *priv = GTK_CALEX_VIEW_DAY_GET_PRIVATE (gtk_calex_view_day);
+}
+
+static void
+gtk_calex_view_day_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+	GtkCalExViewDay *gtk_calex_view_day = GTK_CALEX_VIEW_DAY (object);
+
+	GtkCalExViewDayPrivate *priv = GTK_CALEX_VIEW_DAY_GET_PRIVATE (gtk_calex_view_day);
+
+	switch (property_id)
+		{
+			default:
+				G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+				break;
+		}
+}
+
+static void
+gtk_calex_view_day_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+	GtkCalExViewDay *gtk_calex_view_day = GTK_CALEX_VIEW_DAY (object);
+
+	GtkCalExViewDayPrivate *priv = GTK_CALEX_VIEW_DAY_GET_PRIVATE (gtk_calex_view_day);
+
+	switch (property_id)
+		{
+			default:
+				G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+				break;
+		}
+}
+
+/**
+ * gtk_calex_view_day_new:
+ *
+ * Returns: the newly created #GtkCalExViewDay object.
+ */
+GtkCalExViewDay
+*gtk_calex_view_day_new ()
+{
+	GtkCalExViewDay *gtk_calex_view_day = GTK_CALEX_VIEW_DAY (g_object_new (gtk_calex_view_day_get_type (), NULL));
+
+	return gtk_calex_view_day;
+}
diff --git a/src/gtkcalexviewday.h b/src/gtkcalexviewday.h
index e69de29..2456924 100644
--- a/src/gtkcalexviewday.h
+++ b/src/gtkcalexviewday.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2009-2010 Andrea Zagli <azagli@libero.it>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library 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
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ * 
+ */
+
+#ifndef __GTK_CALEX_VIEW_DAY_H__
+#define __GTK_CALEX_VIEW_DAY_H__
+
+#include <glib.h>
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+
+#define TYPE_GTK_CALEX_VIEW_DAY               (gtk_calex_view_day_get_type ())
+#define GTK_CALEX_VIEW_DAY(obj)               (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GTK_CALEX_VIEW_DAY, GtkCalExViewDay))
+#define GTK_CALEX_VIEW_DAY_CLASS(klass)       (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GTK_CALEX_VIEW_DAY, GtkCalExViewDayClass))
+#define IS_GTK_CALEX_VIEW_DAY(obj)            (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GTK_CALEX_VIEW_DAY))
+#define IS_GTK_CALEX_VIEW_DAY_CLASS(klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GTK_CALEX_VIEW_DAY))
+#define GTK_CALEX_VIEW_DAY_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GTK_CALEX_VIEW_DAY, GtkCalExViewDayClass))
+
+
+typedef struct _GtkCalExViewDay GtkCalExViewDay;
+typedef struct _GtkCalExViewDayClass GtkCalExViewDayClass;
+
+struct _GtkCalExViewDay
+	{
+		GObject parent;
+	};
+
+struct _GtkCalExViewDayClass
+	{
+		GObjectClass parent_class;
+	};
+
+GType gtk_calex_view_day_get_type (void) G_GNUC_CONST;
+
+
+GtkCalExViewDay *gtk_calex_view_day_new (void);
+
+
+G_END_DECLS
+
+#endif /* __GTK_CALEX_VIEW_DAY_H__ */
diff --git a/src/gtkcalexviewmonth.c b/src/gtkcalexviewmonth.c
index e69de29..7fe290b 100644
--- a/src/gtkcalexviewmonth.c
+++ b/src/gtkcalexviewmonth.c
@@ -0,0 +1,109 @@
+/*
+ * Copyright (C) 2009-2010 Andrea Zagli <azagli@libero.it>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library 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
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include "gtkcalexviewmonth.h"
+
+#include <goocanvas.h>
+
+enum
+{
+	PROP_0
+};
+
+static void gtk_calex_view_month_class_init (GtkCalExViewMonthClass *klass);
+static void gtk_calex_view_month_init (GtkCalExViewMonth *gtk_calex_view_month);
+
+static void gtk_calex_view_month_set_property (GObject *object,
+                                    guint property_id,
+                                    const GValue *value,
+                                    GParamSpec *pspec);
+static void gtk_calex_view_month_get_property (GObject *object,
+                                    guint property_id,
+                                    GValue *value,
+                                    GParamSpec *pspec);
+
+
+#define GTK_CALEX_VIEW_MONTH_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TYPE_GTK_CALEX_VIEW_MONTH, GtkCalExViewMonthPrivate))
+
+typedef struct _GtkCalExViewMonthPrivate GtkCalExViewMonthPrivate;
+struct _GtkCalExViewMonthPrivate
+	{
+		gpointer foo;
+	};
+
+G_DEFINE_TYPE (GtkCalExViewMonth, gtk_calex_view_month, G_TYPE_OBJECT)
+
+static void
+gtk_calex_view_month_class_init (GtkCalExViewMonthClass *klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+	g_type_class_add_private (object_class, sizeof (GtkCalExViewMonthPrivate));
+
+	object_class->set_property = gtk_calex_view_month_set_property;
+	object_class->get_property = gtk_calex_view_month_get_property;
+}
+
+static void
+gtk_calex_view_month_init (GtkCalExViewMonth *gtk_calex_view_month)
+{
+	GtkCalExViewMonthPrivate *priv = GTK_CALEX_VIEW_MONTH_GET_PRIVATE (gtk_calex_view_month);
+}
+
+static void
+gtk_calex_view_month_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+	GtkCalExViewMonth *gtk_calex_view_month = GTK_CALEX_VIEW_MONTH (object);
+
+	GtkCalExViewMonthPrivate *priv = GTK_CALEX_VIEW_MONTH_GET_PRIVATE (gtk_calex_view_month);
+
+	switch (property_id)
+		{
+			default:
+				G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+				break;
+		}
+}
+
+static void
+gtk_calex_view_month_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+	GtkCalExViewMonth *gtk_calex_view_month = GTK_CALEX_VIEW_MONTH (object);
+
+	GtkCalExViewMonthPrivate *priv = GTK_CALEX_VIEW_MONTH_GET_PRIVATE (gtk_calex_view_month);
+
+	switch (property_id)
+		{
+			default:
+				G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+				break;
+		}
+}
+
+/**
+ * gtk_calex_view_month_new:
+ *
+ * Returns: the newly created #GtkCalExViewMonth object.
+ */
+GtkCalExViewMonth
+*gtk_calex_view_month_new ()
+{
+	GtkCalExViewMonth *gtk_calex_view_month = GTK_CALEX_VIEW_MONTH (g_object_new (gtk_calex_view_month_get_type (), NULL));
+
+	return gtk_calex_view_month;
+}
diff --git a/src/gtkcalexviewmonth.h b/src/gtkcalexviewmonth.h
index e69de29..999ee04 100644
--- a/src/gtkcalexviewmonth.h
+++ b/src/gtkcalexviewmonth.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2009-2010 Andrea Zagli <azagli@libero.it>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library 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
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ * 
+ */
+
+#ifndef __GTK_CALEX_VIEW_MONTH_H__
+#define __GTK_CALEX_VIEW_MONTH_H__
+
+#include <glib.h>
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+
+#define TYPE_GTK_CALEX_VIEW_MONTH               (gtk_calex_view_month_get_type ())
+#define GTK_CALEX_VIEW_MONTH(obj)               (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GTK_CALEX_VIEW_MONTH, GtkCalExViewMonth))
+#define GTK_CALEX_VIEW_MONTH_CLASS(klass)       (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GTK_CALEX_VIEW_MONTH, GtkCalExViewMonthClass))
+#define IS_GTK_CALEX_VIEW_MONTH(obj)            (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GTK_CALEX_VIEW_MONTH))
+#define IS_GTK_CALEX_VIEW_MONTH_CLASS(klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GTK_CALEX_VIEW_MONTH))
+#define GTK_CALEX_VIEW_MONTH_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GTK_CALEX_VIEW_MONTH, GtkCalExViewMonthClass))
+
+
+typedef struct _GtkCalExViewMonth GtkCalExViewMonth;
+typedef struct _GtkCalExViewMonthClass GtkCalExViewMonthClass;
+
+struct _GtkCalExViewMonth
+	{
+		GObject parent;
+	};
+
+struct _GtkCalExViewMonthClass
+	{
+		GObjectClass parent_class;
+	};
+
+GType gtk_calex_view_month_get_type (void) G_GNUC_CONST;
+
+
+GtkCalExViewMonth *gtk_calex_view_month_new (void);
+
+
+G_END_DECLS
+
+#endif /* __GTK_CALEX_VIEW_MONTH_H__ */
diff --git a/src/gtkcalexviewweek.c b/src/gtkcalexviewweek.c
index e69de29..67a793a 100644
--- a/src/gtkcalexviewweek.c
+++ b/src/gtkcalexviewweek.c
@@ -0,0 +1,109 @@
+/*
+ * Copyright (C) 2009-2010 Andrea Zagli <azagli@libero.it>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library 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
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include "gtkcalexviewweek.h"
+
+#include <goocanvas.h>
+
+enum
+{
+	PROP_0
+};
+
+static void gtk_calex_view_week_class_init (GtkCalExViewWeekClass *klass);
+static void gtk_calex_view_week_init (GtkCalExViewWeek *gtk_calex_view_week);
+
+static void gtk_calex_view_week_set_property (GObject *object,
+                                    guint property_id,
+                                    const GValue *value,
+                                    GParamSpec *pspec);
+static void gtk_calex_view_week_get_property (GObject *object,
+                                    guint property_id,
+                                    GValue *value,
+                                    GParamSpec *pspec);
+
+
+#define GTK_CALEX_VIEW_WEEK_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TYPE_GTK_CALEX_VIEW_WEEK, GtkCalExViewWeekPrivate))
+
+typedef struct _GtkCalExViewWeekPrivate GtkCalExViewWeekPrivate;
+struct _GtkCalExViewWeekPrivate
+	{
+		gpointer foo;
+	};
+
+G_DEFINE_TYPE (GtkCalExViewWeek, gtk_calex_view_week, G_TYPE_OBJECT)
+
+static void
+gtk_calex_view_week_class_init (GtkCalExViewWeekClass *klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+	g_type_class_add_private (object_class, sizeof (GtkCalExViewWeekPrivate));
+
+	object_class->set_property = gtk_calex_view_week_set_property;
+	object_class->get_property = gtk_calex_view_week_get_property;
+}
+
+static void
+gtk_calex_view_week_init (GtkCalExViewWeek *gtk_calex_view_week)
+{
+	GtkCalExViewWeekPrivate *priv = GTK_CALEX_VIEW_WEEK_GET_PRIVATE (gtk_calex_view_week);
+}
+
+static void
+gtk_calex_view_week_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+	GtkCalExViewWeek *gtk_calex_view_week = GTK_CALEX_VIEW_WEEK (object);
+
+	GtkCalExViewWeekPrivate *priv = GTK_CALEX_VIEW_WEEK_GET_PRIVATE (gtk_calex_view_week);
+
+	switch (property_id)
+		{
+			default:
+				G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+				break;
+		}
+}
+
+static void
+gtk_calex_view_week_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+	GtkCalExViewWeek *gtk_calex_view_week = GTK_CALEX_VIEW_WEEK (object);
+
+	GtkCalExViewWeekPrivate *priv = GTK_CALEX_VIEW_WEEK_GET_PRIVATE (gtk_calex_view_week);
+
+	switch (property_id)
+		{
+			default:
+				G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+				break;
+		}
+}
+
+/**
+ * gtk_calex_view_week_new:
+ *
+ * Returns: the newly created #GtkCalExViewWeek object.
+ */
+GtkCalExViewWeek
+*gtk_calex_view_week_new ()
+{
+	GtkCalExViewWeek *gtk_calex_view_week = GTK_CALEX_VIEW_WEEK (g_object_new (gtk_calex_view_week_get_type (), NULL));
+
+	return gtk_calex_view_week;
+}
diff --git a/src/gtkcalexviewweek.h b/src/gtkcalexviewweek.h
index e69de29..e6352d7 100644
--- a/src/gtkcalexviewweek.h
+++ b/src/gtkcalexviewweek.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2009-2010 Andrea Zagli <azagli@libero.it>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library 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
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ * 
+ */
+
+#ifndef __GTK_CALEX_VIEW_WEEK_H__
+#define __GTK_CALEX_VIEW_WEEK_H__
+
+#include <glib.h>
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+
+#define TYPE_GTK_CALEX_VIEW_WEEK               (gtk_calex_view_week_get_type ())
+#define GTK_CALEX_VIEW_WEEK(obj)               (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GTK_CALEX_VIEW_WEEK, GtkCalExViewWeek))
+#define GTK_CALEX_VIEW_WEEK_CLASS(klass)       (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GTK_CALEX_VIEW_WEEK, GtkCalExViewWeekClass))
+#define IS_GTK_CALEX_VIEW_WEEK(obj)            (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GTK_CALEX_VIEW_WEEK))
+#define IS_GTK_CALEX_VIEW_WEEK_CLASS(klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GTK_CALEX_VIEW_WEEK))
+#define GTK_CALEX_VIEW_WEEK_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GTK_CALEX_VIEW_WEEK, GtkCalExViewWeekClass))
+
+
+typedef struct _GtkCalExViewWeek GtkCalExViewWeek;
+typedef struct _GtkCalExViewWeekClass GtkCalExViewWeekClass;
+
+struct _GtkCalExViewWeek
+	{
+		GObject parent;
+	};
+
+struct _GtkCalExViewWeekClass
+	{
+		GObjectClass parent_class;
+	};
+
+GType gtk_calex_view_week_get_type (void) G_GNUC_CONST;
+
+
+GtkCalExViewWeek *gtk_calex_view_week_new (void);
+
+
+G_END_DECLS
+
+#endif /* __GTK_CALEX_VIEW_WEEK_H__ */
diff --git a/tests/test.c b/tests/test.c
index 56d8173..f952f6a 100644
--- a/tests/test.c
+++ b/tests/test.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2009 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2009-2010 Andrea Zagli <azagli@libero.it>
  *
  * 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
-- 
2.49.0