2013-04-25 22:13:00 -07:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "elementary_config.h"
|
|
|
|
#endif
|
|
|
|
|
2018-04-03 04:27:30 -07:00
|
|
|
#define EFL_ACCESS_OBJECT_PROTECTED
|
2017-09-24 23:33:31 -07:00
|
|
|
#define EFL_UI_TRANSLATABLE_PROTECTED
|
2018-05-03 16:34:17 -07:00
|
|
|
#define EFL_PART_PROTECTED
|
2014-10-17 08:56:11 -07:00
|
|
|
|
2012-05-02 18:19:05 -07:00
|
|
|
#include <Elementary.h>
|
|
|
|
#include "elm_priv.h"
|
2012-08-01 14:04:47 -07:00
|
|
|
#include "elm_widget_dayselector.h"
|
2012-11-25 22:32:53 -08:00
|
|
|
#include "elm_widget_container.h"
|
2012-05-02 18:19:05 -07:00
|
|
|
|
edje/elm: Rename _internal_ to _part_ (EO)
In Edje and Elementary, we have part objects, which are what is returned
by the interface efl_part(). Those objects can't be of an opaque type as
this doesn't work nicely with strongly typed languages such as C++ or
C#. In JS, Lua, C the types are weak and mostly runtime-based so it
doesn't matter much.
As a consequence, the documentation and the types need to look nice in
this EO API. Thus, we remove the abusive term "internal" and explicitly
call all those classes "part" something.
Eventually we want the types to be declared in the EO file so bindings
(C#, C++, ...) can generate the proper access methods, returning the
best possible types.
Note that right now a few of those part types are used in the legacy API
but don't actually need to be exposed externally.
This is kind of a mega commit that does all the renaming at once, but
it's really just a big sed operation. The power of good IDEs :)
Ref T5315
Ref T5306
2017-09-12 21:29:25 -07:00
|
|
|
#include "elm_dayselector_part.eo.h"
|
2016-05-24 04:40:18 -07:00
|
|
|
#include "elm_part_helper.h"
|
|
|
|
|
2014-06-03 03:35:28 -07:00
|
|
|
#define MY_CLASS ELM_DAYSELECTOR_CLASS
|
2012-11-25 22:32:53 -08:00
|
|
|
|
2013-11-07 03:44:22 -08:00
|
|
|
#define MY_CLASS_NAME "Elm_Dayselector"
|
|
|
|
#define MY_CLASS_NAME_LEGACY "elm_dayselector"
|
2012-05-02 18:19:05 -07:00
|
|
|
|
|
|
|
/* signals to edc */
|
2012-05-03 15:43:51 -07:00
|
|
|
#define ITEM_TYPE_WEEKDAY_DEFAULT "elm,type,weekday,default"
|
|
|
|
#define ITEM_TYPE_WEEKDAY_STYLE1 "elm,type,weekday,style1"
|
|
|
|
#define ITEM_TYPE_WEEKEND_DEFAULT "elm,type,weekend,default"
|
|
|
|
#define ITEM_TYPE_WEEKEND_STYLE1 "elm,type,weekend,style1"
|
|
|
|
#define ITEM_POS_LEFT "elm,pos,check,left"
|
|
|
|
#define ITEM_POS_RIGHT "elm,pos,check,right"
|
|
|
|
#define ITEM_POS_MIDDLE "elm,pos,check,middle"
|
|
|
|
|
2012-05-02 18:19:05 -07:00
|
|
|
static const char SIG_CHANGED[] = "dayselector,changed";
|
2012-05-03 15:43:51 -07:00
|
|
|
static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
|
|
|
{SIG_CHANGED, ""},
|
2014-01-23 02:30:34 -08:00
|
|
|
{SIG_WIDGET_LANG_CHANGED, ""}, /**< handled by elm_widget */
|
2014-02-07 21:05:06 -08:00
|
|
|
{SIG_WIDGET_ACCESS_CHANGED, ""}, /**< handled by elm_widget */
|
2012-05-03 15:43:51 -07:00
|
|
|
{NULL, NULL}
|
2012-05-02 18:19:05 -07:00
|
|
|
};
|
|
|
|
|
2014-03-21 07:01:48 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_elm_dayselector_elm_layout_sizing_eval(Eo *obj, Elm_Dayselector_Data *sd EINA_UNUSED)
|
2012-05-02 18:19:05 -07:00
|
|
|
{
|
|
|
|
Evas_Coord min_w = -1, min_h = -1;
|
2013-10-05 01:14:03 -07:00
|
|
|
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
|
2012-05-02 18:19:05 -07:00
|
|
|
|
|
|
|
elm_coords_finger_size_adjust(ELM_DAYSELECTOR_MAX, &min_w, 1, &min_h);
|
2012-05-03 15:43:51 -07:00
|
|
|
edje_object_size_min_restricted_calc
|
2012-11-25 22:32:53 -08:00
|
|
|
(wd->resize_obj, &min_w, &min_h, min_w, min_h);
|
2012-05-02 18:19:05 -07:00
|
|
|
evas_object_size_hint_min_set(obj, min_w, min_h);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-05-03 15:43:51 -07:00
|
|
|
_dayselector_resize(void *data,
|
2014-01-06 06:30:02 -08:00
|
|
|
Evas *e EINA_UNUSED,
|
|
|
|
Evas_Object *obj EINA_UNUSED,
|
|
|
|
void *event_info EINA_UNUSED)
|
2012-05-02 18:19:05 -07:00
|
|
|
{
|
2012-05-03 15:43:51 -07:00
|
|
|
elm_layout_sizing_eval(data);
|
2012-05-02 18:19:05 -07:00
|
|
|
}
|
|
|
|
|
2017-08-30 02:47:21 -07:00
|
|
|
EOLIAN static void
|
2017-09-21 23:13:16 -07:00
|
|
|
_elm_dayselector_efl_ui_translatable_translation_update(Eo *obj EINA_UNUSED, Elm_Dayselector_Data *sd)
|
2012-05-02 18:19:05 -07:00
|
|
|
{
|
|
|
|
time_t t;
|
2012-05-03 15:43:51 -07:00
|
|
|
Eina_List *l;
|
2012-05-02 18:19:05 -07:00
|
|
|
char buf[1024];
|
2012-05-03 15:43:51 -07:00
|
|
|
struct tm time_daysel;
|
2014-09-27 22:13:49 -07:00
|
|
|
Elm_Dayselector_Item_Data *it;
|
2012-05-03 15:43:51 -07:00
|
|
|
|
2013-07-11 11:34:58 -07:00
|
|
|
if (sd->weekdays_names_set)
|
2017-08-30 02:47:21 -07:00
|
|
|
return;
|
2013-07-11 11:34:58 -07:00
|
|
|
|
2012-05-02 18:19:05 -07:00
|
|
|
t = time(NULL);
|
|
|
|
localtime_r(&t, &time_daysel);
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_LIST_FOREACH(sd->items, l, it)
|
2012-05-02 18:19:05 -07:00
|
|
|
{
|
|
|
|
time_daysel.tm_wday = it->day;
|
|
|
|
strftime(buf, sizeof(buf), "%a", &time_daysel);
|
|
|
|
elm_object_text_set(VIEW(it), buf);
|
|
|
|
}
|
2012-05-03 15:43:51 -07:00
|
|
|
|
2017-09-21 23:13:16 -07:00
|
|
|
efl_ui_translatable_translation_update(efl_super(obj, MY_CLASS));
|
2012-05-02 18:19:05 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-05-03 15:43:51 -07:00
|
|
|
_update_items(Evas_Object *obj)
|
2012-05-02 18:19:05 -07:00
|
|
|
{
|
|
|
|
Eina_List *l;
|
2012-05-03 15:43:51 -07:00
|
|
|
Eina_Bool rtl;
|
|
|
|
unsigned int last_day;
|
2014-09-27 22:13:49 -07:00
|
|
|
Elm_Dayselector_Item_Data *it;
|
2012-05-03 15:43:51 -07:00
|
|
|
|
|
|
|
ELM_DAYSELECTOR_DATA_GET(obj, sd);
|
|
|
|
|
|
|
|
last_day = sd->week_start + ELM_DAYSELECTOR_MAX - 1;
|
|
|
|
if (last_day >= ELM_DAYSELECTOR_MAX)
|
|
|
|
last_day = last_day % ELM_DAYSELECTOR_MAX;
|
|
|
|
|
2017-06-13 03:41:15 -07:00
|
|
|
rtl = efl_ui_mirrored_get(obj);
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_LIST_FOREACH(sd->items, l, it)
|
2012-05-03 15:43:51 -07:00
|
|
|
{
|
2013-10-05 05:35:27 -07:00
|
|
|
elm_object_signal_emit(VIEW(it), it->day_style, ""); // XXX: compat
|
|
|
|
elm_object_signal_emit(VIEW(it), it->day_style, "elm");
|
2012-05-03 15:43:51 -07:00
|
|
|
if (it->day == sd->week_start)
|
|
|
|
{
|
|
|
|
if (rtl) elm_object_signal_emit(VIEW(it), ITEM_POS_RIGHT, "elm");
|
|
|
|
else elm_object_signal_emit(VIEW(it), ITEM_POS_LEFT, "elm");
|
|
|
|
}
|
|
|
|
else if (it->day == last_day)
|
|
|
|
{
|
|
|
|
if (rtl) elm_object_signal_emit(VIEW(it), ITEM_POS_LEFT, "elm");
|
|
|
|
else elm_object_signal_emit(VIEW(it), ITEM_POS_RIGHT, "elm");
|
|
|
|
}
|
|
|
|
else
|
|
|
|
elm_object_signal_emit(VIEW(it), ITEM_POS_MIDDLE, "elm");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline unsigned int
|
2014-03-21 07:01:48 -07:00
|
|
|
_item_location_get(Elm_Dayselector_Data *sd,
|
2014-09-27 22:13:49 -07:00
|
|
|
Elm_Dayselector_Item_Data *it)
|
2012-05-03 15:43:51 -07:00
|
|
|
{
|
|
|
|
return (ELM_DAYSELECTOR_MAX - sd->week_start + it->day) %
|
|
|
|
ELM_DAYSELECTOR_MAX;
|
|
|
|
}
|
|
|
|
|
2017-08-09 00:13:06 -07:00
|
|
|
EOLIAN static Efl_Ui_Theme_Apply
|
2018-01-07 20:55:35 -08:00
|
|
|
_elm_dayselector_efl_ui_widget_theme_apply(Eo *obj, Elm_Dayselector_Data *sd)
|
2012-05-03 15:43:51 -07:00
|
|
|
{
|
2017-08-09 00:13:06 -07:00
|
|
|
Efl_Ui_Theme_Apply int_ret = EFL_UI_THEME_APPLY_FAILED;
|
2012-11-25 22:32:53 -08:00
|
|
|
|
2012-05-03 15:43:51 -07:00
|
|
|
Eina_List *l;
|
2012-05-02 18:19:05 -07:00
|
|
|
char buf[1024];
|
2014-09-27 22:13:49 -07:00
|
|
|
Elm_Dayselector_Item_Data *it;
|
2012-05-03 15:43:51 -07:00
|
|
|
|
2017-10-23 22:03:46 -07:00
|
|
|
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
|
2017-08-09 00:13:06 -07:00
|
|
|
if (!int_ret) return EFL_UI_THEME_APPLY_FAILED;
|
2012-05-02 18:19:05 -07:00
|
|
|
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_LIST_FOREACH(sd->items, l, it)
|
2012-05-02 18:19:05 -07:00
|
|
|
{
|
2012-05-03 15:43:51 -07:00
|
|
|
snprintf
|
|
|
|
(buf, sizeof(buf), "dayselector/%s", elm_object_style_get(obj));
|
2012-05-02 18:19:05 -07:00
|
|
|
elm_object_style_set(VIEW(it), buf);
|
2012-05-03 15:43:51 -07:00
|
|
|
|
|
|
|
snprintf
|
|
|
|
(buf, sizeof(buf), "day%d,visible", _item_location_get(sd, it));
|
|
|
|
elm_layout_signal_emit(obj, buf, "elm");
|
2012-05-02 18:19:05 -07:00
|
|
|
}
|
2012-05-03 15:43:51 -07:00
|
|
|
|
2012-05-02 18:19:05 -07:00
|
|
|
_update_items(obj);
|
2012-05-03 15:43:51 -07:00
|
|
|
elm_layout_sizing_eval(obj);
|
|
|
|
|
theme: return enum from elm_widget_style_set instead of bool
Summary:
if trying to apply incorrect theme, widget apply default theme and return TRUE.
so there is no way to check it really apply correct theme.
To resolve this problem, _elm_theme_set return three type enum
* related history : 4ca3ef45146e05908a13d1010909abeba9693ad6
* elm_object_style_set is public api, so I didn't change it.
* typedef name [ Theme_Apply ] is temporarily, please suggest better one.
@fix
Reviewers: singh.amitesh, herb, Hermet, cedric, jpeg, raster
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4073
2016-06-30 23:09:42 -07:00
|
|
|
return int_ret;
|
2012-05-02 18:19:05 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-05-03 15:43:51 -07:00
|
|
|
_item_del_cb(void *data,
|
2014-01-06 06:30:02 -08:00
|
|
|
Evas *e EINA_UNUSED,
|
2012-05-03 15:43:51 -07:00
|
|
|
Evas_Object *obj,
|
2014-01-06 06:30:02 -08:00
|
|
|
void *event_info EINA_UNUSED)
|
2012-05-02 18:19:05 -07:00
|
|
|
{
|
|
|
|
Eina_List *l;
|
|
|
|
char buf[1024];
|
2014-09-27 22:13:49 -07:00
|
|
|
Elm_Dayselector_Item_Data *it;
|
2012-05-03 15:43:51 -07:00
|
|
|
|
|
|
|
ELM_DAYSELECTOR_DATA_GET(data, sd);
|
2012-05-02 18:19:05 -07:00
|
|
|
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_LIST_FOREACH(sd->items, l, it)
|
2012-05-02 18:19:05 -07:00
|
|
|
{
|
|
|
|
if (obj == VIEW(it))
|
|
|
|
{
|
2012-05-03 15:43:51 -07:00
|
|
|
sd->items = eina_list_remove(sd->items, it);
|
2012-05-02 18:19:05 -07:00
|
|
|
eina_stringshare_del(it->day_style);
|
2012-05-03 15:43:51 -07:00
|
|
|
snprintf(buf, sizeof(buf), "day%d,default",
|
|
|
|
_item_location_get(sd, it));
|
|
|
|
elm_layout_signal_emit(obj, buf, "elm");
|
|
|
|
|
2018-05-07 15:16:29 -07:00
|
|
|
// The object is already being deleted, there is no point in calling efl_del on it nore setting it to NULL.
|
2012-05-03 15:43:51 -07:00
|
|
|
|
|
|
|
elm_layout_sizing_eval(obj);
|
2012-05-02 18:19:05 -07:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-05-03 15:43:51 -07:00
|
|
|
_item_signal_emit_cb(void *data,
|
2014-01-06 06:30:02 -08:00
|
|
|
Evas_Object *obj EINA_UNUSED,
|
2012-05-03 15:43:51 -07:00
|
|
|
const char *emission,
|
2014-01-06 06:30:02 -08:00
|
|
|
const char *source EINA_UNUSED)
|
2012-05-02 18:19:05 -07:00
|
|
|
{
|
2014-09-27 22:13:49 -07:00
|
|
|
Elm_Dayselector_Item_Data *it = data;
|
2012-05-02 18:19:05 -07:00
|
|
|
|
2012-05-03 15:43:51 -07:00
|
|
|
eina_stringshare_replace(&it->day_style, emission);
|
2012-05-02 18:19:05 -07:00
|
|
|
}
|
|
|
|
|
2016-06-20 07:31:31 -07:00
|
|
|
static void
|
2016-08-30 05:34:10 -07:00
|
|
|
_item_clicked_cb(void *data, const Efl_Event *event EINA_UNUSED)
|
2012-05-02 18:19:05 -07:00
|
|
|
{
|
2014-09-27 22:13:49 -07:00
|
|
|
Elm_Dayselector_Item_Data *it = data;
|
2012-05-02 18:19:05 -07:00
|
|
|
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call(WIDGET(it), EFL_UI_CHECK_EVENT_CHANGED, (void *)it->day);
|
2012-05-02 18:19:05 -07:00
|
|
|
}
|
|
|
|
|
2014-09-27 22:13:49 -07:00
|
|
|
static Elm_Dayselector_Item_Data *
|
2012-05-03 15:43:51 -07:00
|
|
|
_item_find(const Evas_Object *obj,
|
|
|
|
Elm_Dayselector_Day day)
|
2012-05-02 18:19:05 -07:00
|
|
|
{
|
|
|
|
Eina_List *l;
|
2014-09-27 22:13:49 -07:00
|
|
|
Elm_Dayselector_Item_Data *it;
|
2012-05-02 18:19:05 -07:00
|
|
|
|
2012-05-03 15:43:51 -07:00
|
|
|
ELM_DAYSELECTOR_DATA_GET(obj, sd);
|
|
|
|
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_LIST_FOREACH(sd->items, l, it)
|
2012-05-03 15:43:51 -07:00
|
|
|
if (day == it->day) return it;
|
|
|
|
|
2012-05-02 18:19:05 -07:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2016-05-24 04:40:18 -07:00
|
|
|
static Eina_Bool
|
2016-06-02 20:01:35 -07:00
|
|
|
_elm_dayselector_content_set(Eo *obj, Elm_Dayselector_Data *sd, const char *item, Evas_Object *content)
|
2012-05-02 18:19:05 -07:00
|
|
|
{
|
2012-11-25 22:32:53 -08:00
|
|
|
Eina_Bool int_ret = EINA_FALSE;
|
|
|
|
|
2012-05-03 15:43:51 -07:00
|
|
|
int day;
|
2012-05-02 18:19:05 -07:00
|
|
|
char buf[1024];
|
2014-09-27 22:13:49 -07:00
|
|
|
Elm_Dayselector_Item_Data *it = NULL;
|
2012-05-03 15:43:51 -07:00
|
|
|
|
2017-02-21 01:14:36 -08:00
|
|
|
EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_isa(content, EFL_UI_NSTATE_CLASS), EINA_FALSE);
|
2014-03-21 07:01:48 -07:00
|
|
|
if (!item) return EINA_FALSE;
|
2012-05-03 15:43:51 -07:00
|
|
|
|
|
|
|
day = atoi(item + (strlen(item) - 1));
|
2014-03-21 07:01:48 -07:00
|
|
|
if (day < 0 || day > ELM_DAYSELECTOR_MAX) return EINA_FALSE;
|
2012-05-02 18:19:05 -07:00
|
|
|
|
2012-05-03 15:43:51 -07:00
|
|
|
it = _item_find(obj, day);
|
|
|
|
if (it)
|
2012-05-02 18:19:05 -07:00
|
|
|
{
|
2012-05-03 15:43:51 -07:00
|
|
|
snprintf(buf, sizeof(buf), "day%d", _item_location_get(sd, it));
|
|
|
|
|
2016-08-15 06:44:41 -07:00
|
|
|
int_ret = efl_content_set(efl_part(efl_super(obj, MY_CLASS), buf), content);
|
2014-03-21 07:01:48 -07:00
|
|
|
if (!int_ret) return EINA_FALSE;
|
2012-05-03 15:43:51 -07:00
|
|
|
|
2014-03-21 07:01:48 -07:00
|
|
|
if (!content) return EINA_TRUE; /* item deletion already handled */
|
2012-05-03 15:43:51 -07:00
|
|
|
|
|
|
|
evas_object_del(VIEW(it));
|
2018-05-07 15:16:29 -07:00
|
|
|
VIEW_SET(it, content);
|
2012-05-02 18:19:05 -07:00
|
|
|
}
|
2012-05-03 15:43:51 -07:00
|
|
|
else
|
2012-05-02 18:19:05 -07:00
|
|
|
{
|
2016-08-15 06:44:41 -07:00
|
|
|
Eo *eo_it = efl_add(ELM_DAYSELECTOR_ITEM_CLASS, obj);
|
|
|
|
it = efl_data_scope_get(eo_it, ELM_DAYSELECTOR_ITEM_CLASS);
|
2012-05-03 15:43:51 -07:00
|
|
|
it->day = day;
|
|
|
|
|
|
|
|
snprintf(buf, sizeof(buf), "day%d", _item_location_get(sd, it));
|
|
|
|
|
2016-08-15 06:44:41 -07:00
|
|
|
int_ret = efl_content_set(efl_part(efl_super(obj, MY_CLASS), buf), content);
|
2012-11-25 22:32:53 -08:00
|
|
|
if (!int_ret)
|
2012-05-02 18:19:05 -07:00
|
|
|
{
|
2016-08-10 07:23:04 -07:00
|
|
|
efl_del(eo_it);
|
2014-03-21 07:01:48 -07:00
|
|
|
return EINA_FALSE;
|
2012-05-02 18:19:05 -07:00
|
|
|
}
|
2012-05-03 15:43:51 -07:00
|
|
|
|
|
|
|
sd->items = eina_list_append(sd->items, it);
|
2018-05-07 15:16:29 -07:00
|
|
|
VIEW_SET(it, content);
|
2012-05-02 18:19:05 -07:00
|
|
|
}
|
|
|
|
|
2012-05-03 15:43:51 -07:00
|
|
|
snprintf(buf, sizeof(buf), "day%d,visible", _item_location_get(sd, it));
|
|
|
|
elm_layout_signal_emit(obj, buf, "elm");
|
2012-05-02 18:19:05 -07:00
|
|
|
|
2016-08-10 07:23:04 -07:00
|
|
|
efl_event_callback_add
|
2016-05-17 09:14:47 -07:00
|
|
|
(VIEW(it), EFL_UI_CHECK_EVENT_CHANGED, _item_clicked_cb, it);
|
2012-05-03 15:43:51 -07:00
|
|
|
evas_object_event_callback_add
|
|
|
|
(VIEW(it), EVAS_CALLBACK_DEL, _item_del_cb, obj);
|
|
|
|
|
|
|
|
elm_object_signal_callback_add
|
2013-10-05 05:35:27 -07:00
|
|
|
(VIEW(it), ITEM_TYPE_WEEKDAY_DEFAULT, "*", _item_signal_emit_cb, it);
|
2012-05-03 15:43:51 -07:00
|
|
|
elm_object_signal_callback_add
|
2013-10-05 05:35:27 -07:00
|
|
|
(VIEW(it), ITEM_TYPE_WEEKDAY_STYLE1, "*", _item_signal_emit_cb, it);
|
2012-05-03 15:43:51 -07:00
|
|
|
elm_object_signal_callback_add
|
2013-10-05 05:35:27 -07:00
|
|
|
(VIEW(it), ITEM_TYPE_WEEKEND_DEFAULT, "*", _item_signal_emit_cb, it);
|
2012-05-03 15:43:51 -07:00
|
|
|
elm_object_signal_callback_add
|
2013-10-05 05:35:27 -07:00
|
|
|
(VIEW(it), ITEM_TYPE_WEEKEND_STYLE1, "*", _item_signal_emit_cb, it);
|
2012-05-03 15:43:51 -07:00
|
|
|
|
|
|
|
elm_layout_sizing_eval(obj);
|
|
|
|
_update_items(obj);
|
|
|
|
|
2014-03-21 07:01:48 -07:00
|
|
|
return EINA_TRUE;
|
2012-05-02 18:19:05 -07:00
|
|
|
}
|
|
|
|
|
2015-05-19 05:34:07 -07:00
|
|
|
EOLIAN static Eo *
|
2016-08-10 07:23:04 -07:00
|
|
|
_elm_dayselector_item_efl_object_constructor(Eo *eo_item, Elm_Dayselector_Item_Data *item)
|
2014-09-27 22:13:49 -07:00
|
|
|
{
|
2016-08-15 06:44:41 -07:00
|
|
|
eo_item = efl_constructor(efl_super(eo_item, ELM_DAYSELECTOR_ITEM_CLASS));
|
|
|
|
item->base = efl_data_scope_get(eo_item, ELM_WIDGET_ITEM_CLASS);
|
2015-05-19 05:34:07 -07:00
|
|
|
|
|
|
|
return eo_item;
|
2014-09-27 22:13:49 -07:00
|
|
|
}
|
|
|
|
|
2016-05-24 04:40:18 -07:00
|
|
|
static Evas_Object*
|
|
|
|
_elm_dayselector_content_unset(Eo *obj, Elm_Dayselector_Data *sd, const char *item)
|
2012-05-02 18:19:05 -07:00
|
|
|
{
|
2012-05-03 15:43:51 -07:00
|
|
|
int day;
|
2012-05-02 18:19:05 -07:00
|
|
|
char buf[1024];
|
2012-05-03 15:43:51 -07:00
|
|
|
Evas_Object *content;
|
2014-09-27 22:13:49 -07:00
|
|
|
Elm_Dayselector_Item_Data *it = NULL;
|
2012-05-02 18:19:05 -07:00
|
|
|
|
2012-05-03 15:43:51 -07:00
|
|
|
day = atoi(item + (strlen(item) - 1));
|
2014-03-21 07:01:48 -07:00
|
|
|
if (day < 0 || day > ELM_DAYSELECTOR_MAX) return NULL;
|
2012-05-02 18:19:05 -07:00
|
|
|
|
2012-05-03 15:43:51 -07:00
|
|
|
it = _item_find(obj, day);
|
2014-03-21 07:01:48 -07:00
|
|
|
if (!it) return NULL;
|
2012-05-02 18:19:05 -07:00
|
|
|
|
2016-08-15 06:44:41 -07:00
|
|
|
content = efl_content_unset(efl_part(efl_super(obj, MY_CLASS), buf));
|
2014-03-21 07:01:48 -07:00
|
|
|
if (!content) return NULL;
|
2012-05-02 18:19:05 -07:00
|
|
|
|
2012-05-03 15:43:51 -07:00
|
|
|
sd->items = eina_list_remove(sd->items, it);
|
2016-08-10 07:23:04 -07:00
|
|
|
efl_event_callback_del(content, EFL_UI_CHECK_EVENT_CHANGED, _item_clicked_cb, it);
|
2012-05-03 15:43:51 -07:00
|
|
|
evas_object_event_callback_del(content, EVAS_CALLBACK_DEL, _item_del_cb);
|
|
|
|
|
|
|
|
elm_object_signal_callback_del
|
2013-10-05 05:35:27 -07:00
|
|
|
(content, ITEM_TYPE_WEEKDAY_DEFAULT, "*", _item_signal_emit_cb);
|
2012-05-03 15:43:51 -07:00
|
|
|
elm_object_signal_callback_del
|
2013-10-05 05:35:27 -07:00
|
|
|
(content, ITEM_TYPE_WEEKDAY_STYLE1, "*", _item_signal_emit_cb);
|
2012-05-03 15:43:51 -07:00
|
|
|
elm_object_signal_callback_del
|
2013-10-05 05:35:27 -07:00
|
|
|
(content, ITEM_TYPE_WEEKEND_DEFAULT, "*", _item_signal_emit_cb);
|
2012-05-03 15:43:51 -07:00
|
|
|
elm_object_signal_callback_del
|
2013-10-05 05:35:27 -07:00
|
|
|
(content, ITEM_TYPE_WEEKEND_STYLE1, "*", _item_signal_emit_cb);
|
2012-05-03 15:43:51 -07:00
|
|
|
|
|
|
|
snprintf(buf, sizeof(buf), "day%d,default", _item_location_get(sd, it));
|
|
|
|
elm_layout_signal_emit(obj, buf, "elm");
|
|
|
|
|
2016-08-10 07:23:04 -07:00
|
|
|
efl_del(EO_OBJ(it));
|
2012-05-03 15:43:51 -07:00
|
|
|
|
|
|
|
elm_layout_sizing_eval(obj);
|
|
|
|
|
2014-03-21 07:01:48 -07:00
|
|
|
return content;
|
2012-05-02 18:19:05 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_items_style_set(Evas_Object *obj)
|
|
|
|
{
|
|
|
|
Eina_List *l;
|
2014-09-27 22:13:49 -07:00
|
|
|
Elm_Dayselector_Item_Data *it;
|
2012-05-02 18:19:05 -07:00
|
|
|
unsigned int weekend_last;
|
|
|
|
|
2012-05-03 15:43:51 -07:00
|
|
|
ELM_DAYSELECTOR_DATA_GET(obj, sd);
|
|
|
|
|
|
|
|
weekend_last = sd->weekend_start + sd->weekend_len - 1;
|
2012-05-02 18:19:05 -07:00
|
|
|
if (weekend_last >= ELM_DAYSELECTOR_MAX)
|
|
|
|
weekend_last = weekend_last % ELM_DAYSELECTOR_MAX;
|
|
|
|
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_LIST_FOREACH(sd->items, l, it)
|
2012-05-02 18:19:05 -07:00
|
|
|
{
|
2012-05-03 15:43:51 -07:00
|
|
|
if (weekend_last >= sd->weekend_start)
|
2012-05-02 18:19:05 -07:00
|
|
|
{
|
2012-05-03 15:43:51 -07:00
|
|
|
if ((it->day >= sd->weekend_start) && (it->day <= weekend_last))
|
2012-05-02 18:19:05 -07:00
|
|
|
eina_stringshare_replace(&it->day_style,
|
|
|
|
ITEM_TYPE_WEEKEND_DEFAULT);
|
|
|
|
else
|
|
|
|
eina_stringshare_replace(&it->day_style,
|
|
|
|
ITEM_TYPE_WEEKDAY_DEFAULT);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2012-05-03 15:43:51 -07:00
|
|
|
if ((it->day >= sd->weekend_start) || (it->day <= weekend_last))
|
2012-05-02 18:19:05 -07:00
|
|
|
eina_stringshare_replace(&it->day_style,
|
|
|
|
ITEM_TYPE_WEEKEND_DEFAULT);
|
|
|
|
else
|
|
|
|
eina_stringshare_replace(&it->day_style,
|
|
|
|
ITEM_TYPE_WEEKDAY_DEFAULT);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-05-03 15:43:51 -07:00
|
|
|
_items_create(Evas_Object *obj)
|
2012-05-02 18:19:05 -07:00
|
|
|
{
|
|
|
|
time_t t;
|
|
|
|
char buf[1024];
|
2012-05-03 15:43:51 -07:00
|
|
|
unsigned int idx;
|
|
|
|
struct tm time_daysel;
|
2012-05-02 18:19:05 -07:00
|
|
|
|
|
|
|
t = time(NULL);
|
|
|
|
localtime_r(&t, &time_daysel);
|
|
|
|
|
|
|
|
for (idx = 0; idx < ELM_DAYSELECTOR_MAX; idx++)
|
|
|
|
{
|
2012-05-03 15:43:51 -07:00
|
|
|
Evas_Object *chk;
|
|
|
|
|
|
|
|
chk = elm_check_add(obj);
|
|
|
|
elm_object_style_set(chk, "dayselector/default");
|
|
|
|
|
2012-05-02 18:19:05 -07:00
|
|
|
time_daysel.tm_wday = idx;
|
|
|
|
strftime(buf, sizeof(buf), "%a", &time_daysel);
|
2012-05-03 15:43:51 -07:00
|
|
|
elm_object_text_set(chk, buf);
|
|
|
|
|
2015-10-22 12:37:44 -07:00
|
|
|
snprintf(buf, sizeof(buf), "day%u", idx);
|
2012-05-03 15:43:51 -07:00
|
|
|
elm_layout_content_set(obj, buf, chk);
|
2012-07-31 05:24:58 -07:00
|
|
|
|
|
|
|
// XXX: ACCESS
|
2013-07-30 20:53:04 -07:00
|
|
|
_elm_access_text_set(_elm_access_info_get(chk),
|
2012-07-31 05:24:58 -07:00
|
|
|
ELM_ACCESS_TYPE, E_("day selector item"));
|
2012-05-02 18:19:05 -07:00
|
|
|
}
|
2012-05-03 15:43:51 -07:00
|
|
|
|
2012-05-02 18:19:05 -07:00
|
|
|
_items_style_set(obj);
|
|
|
|
_update_items(obj);
|
|
|
|
}
|
|
|
|
|
2014-03-21 07:01:48 -07:00
|
|
|
EOLIAN static void
|
2016-06-17 01:26:08 -07:00
|
|
|
_elm_dayselector_efl_canvas_group_group_add(Eo *obj, Elm_Dayselector_Data *priv)
|
2012-05-03 15:43:51 -07:00
|
|
|
{
|
2016-08-15 06:44:41 -07:00
|
|
|
efl_canvas_group_add(efl_super(obj, MY_CLASS));
|
2013-09-24 21:33:39 -07:00
|
|
|
elm_widget_sub_object_parent_add(obj);
|
2013-08-26 08:29:45 -07:00
|
|
|
|
2013-11-12 10:24:59 -08:00
|
|
|
if (!elm_layout_theme_set(obj, "dayselector", "base",
|
|
|
|
elm_widget_style_get(obj)))
|
2013-12-25 20:03:55 -08:00
|
|
|
CRI("Failed to set layout!");
|
2012-05-03 15:43:51 -07:00
|
|
|
|
|
|
|
priv->week_start = _elm_config->week_start;
|
|
|
|
priv->weekend_start = _elm_config->weekend_start;
|
|
|
|
priv->weekend_len = _elm_config->weekend_len;
|
|
|
|
_items_create(obj);
|
|
|
|
|
|
|
|
evas_object_event_callback_add
|
|
|
|
(obj, EVAS_CALLBACK_RESIZE, _dayselector_resize, obj);
|
|
|
|
|
|
|
|
elm_layout_sizing_eval(obj);
|
|
|
|
}
|
|
|
|
|
2014-03-21 07:01:48 -07:00
|
|
|
EOLIAN static void
|
2016-06-17 01:26:08 -07:00
|
|
|
_elm_dayselector_efl_canvas_group_group_del(Eo *obj, Elm_Dayselector_Data *sd)
|
2012-05-03 15:43:51 -07:00
|
|
|
{
|
2014-09-27 22:13:49 -07:00
|
|
|
Elm_Dayselector_Item_Data *it;
|
2012-05-03 15:43:51 -07:00
|
|
|
|
2013-03-08 20:23:42 -08:00
|
|
|
EINA_LIST_FREE(sd->items, it)
|
2012-05-03 15:43:51 -07:00
|
|
|
{
|
|
|
|
sd->items = eina_list_remove(sd->items, it);
|
|
|
|
eina_stringshare_del(it->day_style);
|
2018-05-04 14:52:25 -07:00
|
|
|
// No need to efl_del the object as they have been created by efl_add and are dead by now.
|
2012-05-03 15:43:51 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
/* handles freeing sd */
|
2016-08-15 06:44:41 -07:00
|
|
|
efl_canvas_group_del(efl_super(obj, MY_CLASS));
|
2012-05-03 15:43:51 -07:00
|
|
|
}
|
|
|
|
|
2012-05-02 18:19:05 -07:00
|
|
|
EAPI Evas_Object *
|
|
|
|
elm_dayselector_add(Evas_Object *parent)
|
|
|
|
{
|
2012-05-03 15:43:51 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
|
2017-11-06 21:00:43 -08:00
|
|
|
return elm_legacy_add(MY_CLASS, parent);
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
2012-05-03 15:43:51 -07:00
|
|
|
|
2015-05-19 05:34:07 -07:00
|
|
|
EOLIAN static Eo *
|
2016-08-10 07:23:04 -07:00
|
|
|
_elm_dayselector_efl_object_constructor(Eo *obj, Elm_Dayselector_Data *_pd EINA_UNUSED)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2016-08-15 06:44:41 -07:00
|
|
|
obj = efl_constructor(efl_super(obj, MY_CLASS));
|
2016-06-20 21:26:15 -07:00
|
|
|
efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY);
|
2016-06-16 22:12:02 -07:00
|
|
|
evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks);
|
2018-04-03 04:27:30 -07:00
|
|
|
efl_access_object_role_set(obj, EFL_ACCESS_ROLE_PANEL);
|
2015-05-19 05:34:07 -07:00
|
|
|
|
|
|
|
return obj;
|
2012-05-02 18:19:05 -07:00
|
|
|
}
|
|
|
|
|
2014-03-21 07:01:48 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_elm_dayselector_day_selected_set(Eo *obj, Elm_Dayselector_Data *_pd EINA_UNUSED, Elm_Dayselector_Day day, Eina_Bool selected)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2015-06-17 06:02:48 -07:00
|
|
|
Elm_Dayselector_Item_Data *it = _item_find(obj, day);
|
|
|
|
if (!it)
|
|
|
|
{
|
|
|
|
ERR("Failed to find item");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
elm_check_state_set(VIEW(it), selected);
|
2012-05-02 18:19:05 -07:00
|
|
|
}
|
|
|
|
|
2014-03-21 07:01:48 -07:00
|
|
|
EOLIAN static Eina_Bool
|
2015-06-25 04:21:00 -07:00
|
|
|
_elm_dayselector_day_selected_get(const Eo *obj, Elm_Dayselector_Data *_pd EINA_UNUSED, Elm_Dayselector_Day day)
|
2012-05-02 18:19:05 -07:00
|
|
|
{
|
2015-06-17 06:02:48 -07:00
|
|
|
Elm_Dayselector_Item_Data *it = _item_find(obj, day);
|
|
|
|
if (!it)
|
|
|
|
{
|
|
|
|
ERR("Failed to find item");
|
|
|
|
return EINA_FALSE;
|
|
|
|
}
|
|
|
|
return elm_check_state_get(VIEW(it));
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
|
|
|
|
2014-03-21 07:01:48 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_elm_dayselector_week_start_set(Eo *obj, Elm_Dayselector_Data *sd, Elm_Dayselector_Day day)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2013-10-05 01:14:03 -07:00
|
|
|
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
|
2012-05-02 18:19:05 -07:00
|
|
|
Eina_List *l;
|
|
|
|
char buf[1024];
|
2014-09-27 22:13:49 -07:00
|
|
|
Elm_Dayselector_Item_Data *it;
|
2012-05-03 15:43:51 -07:00
|
|
|
|
|
|
|
/* just shuffling items, so swalling them directly */
|
|
|
|
sd->week_start = day;
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_LIST_FOREACH(sd->items, l, it)
|
2012-05-02 18:19:05 -07:00
|
|
|
{
|
2012-05-03 15:43:51 -07:00
|
|
|
snprintf(buf, sizeof(buf), "day%d", _item_location_get(sd, it));
|
|
|
|
edje_object_part_swallow
|
2012-11-25 22:32:53 -08:00
|
|
|
(wd->resize_obj, buf, VIEW(it));
|
2012-05-02 18:19:05 -07:00
|
|
|
}
|
2012-05-03 15:43:51 -07:00
|
|
|
|
2012-05-02 18:19:05 -07:00
|
|
|
_update_items(obj);
|
|
|
|
}
|
|
|
|
|
2014-03-21 07:01:48 -07:00
|
|
|
EOLIAN static Elm_Dayselector_Day
|
2018-04-17 11:09:44 -07:00
|
|
|
_elm_dayselector_week_start_get(const Eo *obj EINA_UNUSED, Elm_Dayselector_Data *sd)
|
2012-05-02 18:19:05 -07:00
|
|
|
{
|
2014-03-21 07:01:48 -07:00
|
|
|
return sd->week_start;
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
|
|
|
|
2014-03-21 07:01:48 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_elm_dayselector_weekend_start_set(Eo *obj, Elm_Dayselector_Data *sd, Elm_Dayselector_Day day)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2012-05-03 15:43:51 -07:00
|
|
|
sd->weekend_start = day;
|
2012-05-02 18:19:05 -07:00
|
|
|
|
|
|
|
_items_style_set(obj);
|
|
|
|
_update_items(obj);
|
|
|
|
}
|
|
|
|
|
2014-03-21 07:01:48 -07:00
|
|
|
EOLIAN static Elm_Dayselector_Day
|
2018-04-17 11:09:44 -07:00
|
|
|
_elm_dayselector_weekend_start_get(const Eo *obj EINA_UNUSED, Elm_Dayselector_Data *sd)
|
2012-05-02 18:19:05 -07:00
|
|
|
{
|
2014-03-21 07:01:48 -07:00
|
|
|
return sd->weekend_start;
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
|
|
|
|
2014-03-21 07:01:48 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_elm_dayselector_weekend_length_set(Eo *obj, Elm_Dayselector_Data *sd, unsigned int length)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2012-05-03 15:43:51 -07:00
|
|
|
sd->weekend_len = length;
|
2012-05-02 18:19:05 -07:00
|
|
|
|
|
|
|
_items_style_set(obj);
|
|
|
|
_update_items(obj);
|
|
|
|
}
|
|
|
|
|
2014-03-21 07:01:48 -07:00
|
|
|
EOLIAN static unsigned int
|
2018-04-17 11:09:44 -07:00
|
|
|
_elm_dayselector_weekend_length_get(const Eo *obj EINA_UNUSED, Elm_Dayselector_Data *sd)
|
2013-07-11 11:34:58 -07:00
|
|
|
{
|
2014-03-21 07:01:48 -07:00
|
|
|
return sd->weekend_len;
|
2013-07-11 11:34:58 -07:00
|
|
|
}
|
|
|
|
|
2014-03-21 07:01:48 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_elm_dayselector_weekdays_names_set(Eo *obj, Elm_Dayselector_Data *sd, const char **weekdays)
|
2013-07-11 11:34:58 -07:00
|
|
|
{
|
|
|
|
int idx;
|
|
|
|
time_t now;
|
|
|
|
struct tm time_daysel;
|
2014-09-27 22:13:49 -07:00
|
|
|
Elm_Dayselector_Item_Data *it;
|
2013-07-11 11:34:58 -07:00
|
|
|
char buf[1024];
|
|
|
|
|
|
|
|
if (weekdays)
|
|
|
|
sd->weekdays_names_set = EINA_TRUE;
|
|
|
|
else
|
|
|
|
{
|
2013-11-12 10:24:03 -08:00
|
|
|
now = time(NULL);
|
|
|
|
localtime_r(&now, &time_daysel);
|
|
|
|
sd->weekdays_names_set = EINA_FALSE;
|
2013-07-11 11:34:58 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
for (idx = 0; idx < ELM_DAYSELECTOR_MAX; idx++)
|
|
|
|
{
|
|
|
|
it = _item_find(obj, idx);
|
2015-06-17 06:02:48 -07:00
|
|
|
if (!it) continue;
|
2013-07-11 11:34:58 -07:00
|
|
|
|
|
|
|
if (sd->weekdays_names_set)
|
|
|
|
elm_object_text_set(VIEW(it), weekdays[idx]);
|
|
|
|
else
|
2013-11-12 10:24:03 -08:00
|
|
|
{
|
|
|
|
time_daysel.tm_wday = idx;
|
|
|
|
strftime(buf, sizeof(buf), "%a", &time_daysel);
|
|
|
|
elm_object_text_set(VIEW(it), buf);
|
|
|
|
}
|
2013-07-11 11:34:58 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-03-21 07:01:48 -07:00
|
|
|
EOLIAN static Eina_List *
|
2015-06-25 04:21:00 -07:00
|
|
|
_elm_dayselector_weekdays_names_get(const Eo *obj, Elm_Dayselector_Data *sd EINA_UNUSED)
|
2013-07-11 11:34:58 -07:00
|
|
|
{
|
|
|
|
int idx;
|
|
|
|
const char *weekday;
|
2014-09-27 22:13:49 -07:00
|
|
|
Elm_Dayselector_Item_Data *it;
|
2014-03-21 07:01:48 -07:00
|
|
|
Eina_List *weekdays = NULL;
|
2013-07-11 11:34:58 -07:00
|
|
|
|
|
|
|
for (idx = 0; idx < ELM_DAYSELECTOR_MAX; idx++)
|
|
|
|
{
|
|
|
|
it = _item_find(obj, idx);
|
2015-06-17 06:02:48 -07:00
|
|
|
if (!it) continue ;
|
|
|
|
|
2013-07-11 11:34:58 -07:00
|
|
|
weekday = elm_object_text_get(VIEW(it));
|
2014-03-21 07:01:48 -07:00
|
|
|
weekdays = eina_list_append(weekdays, eina_stringshare_add(weekday));
|
2013-07-11 11:34:58 -07:00
|
|
|
}
|
2014-03-21 07:01:48 -07:00
|
|
|
return weekdays;
|
2013-07-11 11:34:58 -07:00
|
|
|
}
|
|
|
|
|
2012-11-25 22:32:53 -08:00
|
|
|
static void
|
2016-08-10 07:23:04 -07:00
|
|
|
_elm_dayselector_class_constructor(Efl_Class *klass)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2013-11-07 03:44:22 -08:00
|
|
|
evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
|
|
|
|
2016-05-24 04:40:18 -07:00
|
|
|
/* Efl.Part begin */
|
|
|
|
|
2017-09-19 04:02:26 -07:00
|
|
|
ELM_PART_OVERRIDE(elm_dayselector, ELM_DAYSELECTOR, Elm_Dayselector_Data)
|
|
|
|
ELM_PART_OVERRIDE_CONTENT_SET(elm_dayselector, ELM_DAYSELECTOR, Elm_Dayselector_Data)
|
|
|
|
ELM_PART_OVERRIDE_CONTENT_UNSET(elm_dayselector, ELM_DAYSELECTOR, Elm_Dayselector_Data)
|
edje/elm: Rename _internal_ to _part_ (EO)
In Edje and Elementary, we have part objects, which are what is returned
by the interface efl_part(). Those objects can't be of an opaque type as
this doesn't work nicely with strongly typed languages such as C++ or
C#. In JS, Lua, C the types are weak and mostly runtime-based so it
doesn't matter much.
As a consequence, the documentation and the types need to look nice in
this EO API. Thus, we remove the abusive term "internal" and explicitly
call all those classes "part" something.
Eventually we want the types to be declared in the EO file so bindings
(C#, C++, ...) can generate the proper access methods, returning the
best possible types.
Note that right now a few of those part types are used in the legacy API
but don't actually need to be exposed externally.
This is kind of a mega commit that does all the renaming at once, but
it's really just a big sed operation. The power of good IDEs :)
Ref T5315
Ref T5306
2017-09-12 21:29:25 -07:00
|
|
|
#include "elm_dayselector_part.eo.c"
|
2016-05-24 04:40:18 -07:00
|
|
|
|
|
|
|
/* Efl.Part end */
|
|
|
|
|
2017-05-18 01:52:17 -07:00
|
|
|
/* Internal EO APIs and hidden overrides */
|
|
|
|
|
|
|
|
#define ELM_DAYSELECTOR_EXTRA_OPS \
|
2017-08-07 00:13:38 -07:00
|
|
|
ELM_LAYOUT_SIZING_EVAL_OPS(elm_dayselector), \
|
2017-05-18 01:52:17 -07:00
|
|
|
EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_dayselector)
|
|
|
|
|
2014-03-21 07:01:48 -07:00
|
|
|
#include "elm_dayselector.eo.c"
|
2014-09-27 22:13:49 -07:00
|
|
|
#include "elm_dayselector_item.eo.c"
|
|
|
|
|