/*
- * This file is part of hildon-libs
+ * This file is a part of hildon
*
* Copyright (C) 2005, 2006 Nokia Corporation, all rights reserved.
*
* 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; version 2.1 of
- * the License.
+ * 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
*
*/
-#ifndef __HILDON_DATE_EDITOR_H__
-#define __HILDON_DATE_EDITOR_H__
+#ifndef HILDON_DISABLE_DEPRECATED
-#include <gtk/gtkcontainer.h>
+#ifndef __HILDON_DATE_EDITOR_H__
+#define __HILDON_DATE_EDITOR_H__
+
+#include <gtk/gtk.h>
+
+#include "hildon-time-editor.h"
G_BEGIN_DECLS
-/**
- * HILDON_TYPE_DATE_EDITOR:
- *
- * Macro for getting type of date editor.
- * Since: 0.12.10
- */
-#define HILDON_TYPE_DATE_EDITOR ( hildon_date_editor_get_type() )
-
-#define HILDON_DATE_EDITOR(obj) (GTK_CHECK_CAST (obj,\
- HILDON_TYPE_DATE_EDITOR, HildonDateEditor))
-#define HILDON_DATE_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass),\
- HILDON_TYPE_DATE_EDITOR, HildonDateEditorClass))
-#define HILDON_IS_DATE_EDITOR(obj) (GTK_CHECK_TYPE (obj,\
- HILDON_TYPE_DATE_EDITOR))
-#define HILDON_IS_DATE_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass),\
- HILDON_TYPE_DATE_EDITOR))
-
-/**
- * HildonDateEditor:
- *
- * Internal struct for date editor.
- */
-typedef struct _HildonDateEditor HildonDateEditor;
-typedef struct _HildonDateEditorClass HildonDateEditorClass;
-typedef enum
+#define HILDON_TYPE_DATE_EDITOR \
+ (hildon_date_editor_get_type())
+
+#define HILDON_DATE_EDITOR(obj) \
+ (GTK_CHECK_CAST (obj,\
+ HILDON_TYPE_DATE_EDITOR, HildonDateEditor))
+
+#define HILDON_DATE_EDITOR_CLASS(klass) \
+ (GTK_CHECK_CLASS_CAST ((klass),\
+ HILDON_TYPE_DATE_EDITOR, HildonDateEditorClass))
+
+#define HILDON_IS_DATE_EDITOR(obj) \
+ (GTK_CHECK_TYPE (obj,\
+ HILDON_TYPE_DATE_EDITOR))
+
+#define HILDON_IS_DATE_EDITOR_CLASS(klass) \
+ (GTK_CHECK_CLASS_TYPE ((klass),\
+ HILDON_TYPE_DATE_EDITOR))
+
+typedef struct _HildonDateEditor HildonDateEditor;
+
+typedef struct _HildonDateEditorClass HildonDateEditorClass;
+
+
+struct _HildonDateEditor
{
- NO_ERROR = -1,
- MAX_DAY,
- MAX_MONTH,
- MAX_YEAR,
- MIN_DAY,
- MIN_MONTH,
- MIN_YEAR,
- EMPTY_DAY,
- EMPTY_MONTH,
- EMPTY_YEAR,
- INVALID_DATE,
- INVALID_CHAR
-
-}HildonDateEditorErrorType;
-
-struct _HildonDateEditor {
- GtkContainer par;
+ GtkContainer parent;
};
-struct _HildonDateEditorClass {
+struct _HildonDateEditorClass
+{
GtkContainerClass parent_class;
- gboolean (*date_error) (HildonDateEditor *editor,
- HildonDateEditorErrorType type);
+ gboolean (*date_error) (HildonDateEditor *editor, HildonDateTimeError type);
};
-GType hildon_date_editor_get_type(void) G_GNUC_CONST;
+GType G_GNUC_CONST
+hildon_date_editor_get_type (void);
+
+GtkWidget*
+hildon_date_editor_new (void);
-GtkWidget *hildon_date_editor_new(void);
+void
+hildon_date_editor_set_date (HildonDateEditor *date,
+ guint year,
+ guint month,
+ guint day);
-void hildon_date_editor_set_date(HildonDateEditor * date,
- guint year, guint month, guint day);
+void
+hildon_date_editor_get_date (HildonDateEditor *date,
+ guint *year,
+ guint *month,
+ guint *day);
-void hildon_date_editor_get_date(HildonDateEditor * date,
- guint * year, guint * month, guint * day);
+gboolean
+hildon_date_editor_set_year (HildonDateEditor *editor,
+ guint year);
-gboolean hildon_date_editor_set_year(HildonDateEditor *editor, guint year);
-gboolean hildon_date_editor_set_month(HildonDateEditor *editor, guint month);
-gboolean hildon_date_editor_set_day(HildonDateEditor *editor, guint day);
+gboolean
+hildon_date_editor_set_month (HildonDateEditor *editor,
+ guint month);
-guint hildon_date_editor_get_year(HildonDateEditor *editor);
-guint hildon_date_editor_get_month(HildonDateEditor *editor);
-guint hildon_date_editor_get_day(HildonDateEditor *editor);
+gboolean hildon_date_editor_set_day (HildonDateEditor *editor,
+ guint day);
+
+guint
+hildon_date_editor_get_year (HildonDateEditor *editor);
+
+guint
+hildon_date_editor_get_month (HildonDateEditor *editor);
+
+guint
+hildon_date_editor_get_day (HildonDateEditor *editor);
G_END_DECLS
-#endif /* __HILDON_DATE_EDITOR_H__ */
+
+#endif /* __HILDON_DATE_EDITOR_H__ */
+
+#endif /* HILDON_DISABLE_DEPRECATED */