X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fhildon-date-editor.h;h=402f183ed2d17ab76be7ef92b789c596a14bc391;hb=85419906ab4398031c5cb41a8bf7a821baf0125c;hp=ef669f8e5dba791c0c0acaefe639bf3d9bc986ea;hpb=ac648dd09cca286542ff7b2a71d0a998f1710e99;p=hildon diff --git a/src/hildon-date-editor.h b/src/hildon-date-editor.h index ef669f8..402f183 100644 --- a/src/hildon-date-editor.h +++ b/src/hildon-date-editor.h @@ -1,5 +1,5 @@ /* - * This file is part of hildon-libs + * This file is a part of hildon * * Copyright (C) 2005, 2006 Nokia Corporation, all rights reserved. * @@ -8,7 +8,7 @@ * 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 @@ -22,66 +22,88 @@ * */ -#ifndef __HILDON_DATE_EDITOR_H__ -#define __HILDON_DATE_EDITOR_H__ +#ifndef __HILDON_DATE_EDITOR_H__ +#define __HILDON_DATE_EDITOR_H__ -#include -#include "hildon-time-editor.h" +#include +#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; -struct _HildonDateEditor { - GtkContainer par; +#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 +{ + GtkContainer parent; }; -struct _HildonDateEditorClass { +struct _HildonDateEditorClass +{ GtkContainerClass parent_class; - gboolean (*date_error) (HildonDateEditor *editor, - HildonDateTimeEditorError 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__ */