2013-04-25 22:13:00 -07:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "elementary_config.h"
|
|
|
|
#endif
|
|
|
|
|
2014-10-17 08:56:11 -07:00
|
|
|
#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
|
|
|
|
|
2012-03-05 03:07:05 -08:00
|
|
|
#include <Elementary.h>
|
|
|
|
#include "elm_priv.h"
|
2012-11-25 22:32:53 -08:00
|
|
|
|
2012-03-07 05:27:06 -08:00
|
|
|
#ifdef HAVE_LOCALE_H
|
|
|
|
# include <locale.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef HAVE_LANGINFO_H
|
|
|
|
# include <langinfo.h>
|
|
|
|
#endif
|
|
|
|
|
2016-11-08 02:54:04 -08:00
|
|
|
#include "elm_datetime.h"
|
2012-03-05 03:07:05 -08:00
|
|
|
|
|
|
|
EAPI Evas_Object *
|
|
|
|
elm_datetime_add(Evas_Object *parent)
|
|
|
|
{
|
2012-05-03 15:43:47 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
|
2016-11-08 02:54:04 -08:00
|
|
|
Evas_Object *obj = efl_add(EFL_UI_CLOCK_CLASS, parent);
|
2012-11-25 22:32:53 -08:00
|
|
|
return obj;
|
|
|
|
}
|
2012-03-05 03:07:05 -08:00
|
|
|
|
2016-11-08 02:54:04 -08:00
|
|
|
EAPI void
|
|
|
|
elm_datetime_format_set(Evas_Object *obj,
|
|
|
|
const char *fmt)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2016-11-08 02:54:04 -08:00
|
|
|
efl_ui_clock_format_set(obj, fmt);
|
2012-03-05 03:07:05 -08:00
|
|
|
}
|
|
|
|
|
2016-11-08 02:54:04 -08:00
|
|
|
EAPI const char *
|
|
|
|
elm_datetime_format_get(const Evas_Object *obj)
|
2012-03-05 03:07:05 -08:00
|
|
|
{
|
2016-11-08 02:54:04 -08:00
|
|
|
return efl_ui_clock_format_get(obj);
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
2012-03-05 03:07:05 -08:00
|
|
|
|
2016-11-08 02:54:04 -08:00
|
|
|
EAPI void
|
|
|
|
elm_datetime_field_limit_set(Evas_Object *obj, Elm_Datetime_Field_Type type, int min, int max)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2016-11-08 02:54:04 -08:00
|
|
|
efl_ui_clock_field_limit_set(obj, type, min, max);
|
2012-03-05 03:07:05 -08:00
|
|
|
}
|
|
|
|
|
2016-11-08 02:54:04 -08:00
|
|
|
EAPI void
|
|
|
|
elm_datetime_field_limit_get(const Evas_Object *obj, Elm_Datetime_Field_Type fieldtype, int *min, int *max)
|
2012-03-05 03:07:05 -08:00
|
|
|
{
|
2016-11-08 02:54:04 -08:00
|
|
|
efl_ui_clock_field_limit_get(obj, fieldtype, min, max);
|
2012-03-05 03:07:05 -08:00
|
|
|
}
|
|
|
|
|
2016-11-08 02:54:04 -08:00
|
|
|
EAPI Eina_Bool
|
|
|
|
elm_datetime_value_min_set(Evas_Object *obj, const Efl_Time *mintime)
|
2012-03-05 03:07:05 -08:00
|
|
|
{
|
2016-11-08 02:54:04 -08:00
|
|
|
return efl_ui_clock_value_min_set(obj, (Efl_Time *)mintime);
|
2012-03-05 03:07:05 -08:00
|
|
|
}
|
|
|
|
|
2016-11-08 02:54:04 -08:00
|
|
|
EAPI Eina_Bool
|
|
|
|
elm_datetime_value_min_get(const Evas_Object *obj, Efl_Time *mintime)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2016-11-08 02:54:04 -08:00
|
|
|
return efl_ui_clock_value_min_get(obj, mintime);
|
2012-03-05 03:07:05 -08:00
|
|
|
}
|
|
|
|
|
2016-11-08 02:54:04 -08:00
|
|
|
EAPI Eina_Bool
|
|
|
|
elm_datetime_value_set(Evas_Object *obj, const Efl_Time *newtime)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2016-11-08 02:54:04 -08:00
|
|
|
return efl_ui_clock_value_set(obj, (Efl_Time *)newtime);
|
2012-03-05 03:07:05 -08:00
|
|
|
}
|
|
|
|
|
2016-11-08 02:54:04 -08:00
|
|
|
EAPI Eina_Bool elm_datetime_value_get(const Evas_Object *obj, Efl_Time *currtime)
|
2012-03-05 03:07:05 -08:00
|
|
|
{
|
2016-11-08 02:54:04 -08:00
|
|
|
return efl_ui_clock_value_get(obj, currtime);
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
|
|
|
|
2016-11-08 02:54:04 -08:00
|
|
|
EAPI void
|
|
|
|
elm_datetime_field_visible_set(Evas_Object *obj, Elm_Datetime_Field_Type fieldtype, Eina_Bool visible)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2016-11-08 02:54:04 -08:00
|
|
|
efl_ui_clock_field_visible_set(obj, fieldtype, visible);
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
|
|
|
|
2016-11-08 02:54:04 -08:00
|
|
|
EAPI Eina_Bool elm_datetime_field_visible_get(const Evas_Object *obj, Elm_Datetime_Field_Type fieldtype)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2016-11-08 02:54:04 -08:00
|
|
|
return efl_ui_clock_field_visible_get(obj, fieldtype);
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
|
|
|
|
2016-11-08 02:54:04 -08:00
|
|
|
EAPI Eina_Bool
|
|
|
|
elm_datetime_value_max_set(Evas_Object *obj, const Efl_Time *maxtime)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2016-11-08 02:54:04 -08:00
|
|
|
return efl_ui_clock_value_max_set(obj, (Efl_Time *)maxtime);
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
|
|
|
|
2016-11-08 02:54:04 -08:00
|
|
|
EAPI Eina_Bool
|
|
|
|
elm_datetime_value_max_get(const Evas_Object *obj, Efl_Time *maxtime)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2016-11-08 02:54:04 -08:00
|
|
|
return efl_ui_clock_value_max_get(obj, maxtime);
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|