+elementary (1.0.0+svn.51480slp2+build41) unstable; urgency=low
+
+ * sync with beat-theme
+ * Git: 165.213.180.234:/git/slp/pkgs/elementary
+ * Tag: elementary_1.0.0+svn.51480slp2+build41
+
+ -- Hyoyoung Chang <hyoyoung.chang@samsung.com> Fri, 22 Oct 2010 15:45:19 +0900
+
+elementary (1.0.0+svn.51480slp2+build40) unstable; urgency=low
+
+ * elm_fx changes
+ * Git: 165.213.180.234:/git/slp/pkgs/elementary
+ * Tag: elementary_1.0.0+svn.51480slp2+build40
+
+ -- Hyoyoung Chang <hyoyoung.chang@samsung.com> Fri, 22 Oct 2010 14:05:18 +0900
+
+elementary (1.0.0+svn.51480slp2+build39) unstable; urgency=low
+
+ * [entry] add checking current widget at cnp
+ * Git: 165.213.180.234:/git/slp/pkgs/elementary
+ * Tag: elementary_1.0.0+svn.51480slp2+build39
+
+ -- Hyoyoung Chang <hyoyoung.chang@samsung.com> Fri, 22 Oct 2010 11:20:30 +0900
+
+elementary (1.0.0+svn.51480slp2+build38) unstable; urgency=low
+
+ * [entry] added copy paste feature - 2 handler selection
+ * Git: 165.213.180.234:/git/slp/pkgs/elementary
+ * Tag: elementary_1.0.0+svn.51480slp2+build38
+
+ -- Myungjae Lee <mjae.lee@samsung.com> Thu, 20 Oct 2010 22:56:00 +0900
+
+elementary (1.0.0+svn.51480slp2+build37) unstable; urgency=low
+
+ * [els_icon] rotate bug fixed
+ * Git: 165.213.180.234:/git/slp/pkgs/elementary
+ * Tag: elementary_1.0.0+svn.51480slp2+build37
+
+ -- Jeonghyun Yun <jh0506.yun@samsung.com> Wed, 20 Oct 2010 21:06:16 +0900
+
+elementary (1.0.0+svn.51480slp2+build36) unstable; urgency=low
+
+ * [cnp_helper] merge upstream changes
+ * Git: 165.213.180.234:/git/slp/pkgs/elementary
+ * Tag: elementary_1.0.0+svn.51480slp2+build36
+
+ -- Hyoyoung Chang <hyoyoung.chang@samsung.com> Wed, 20 Oct 2010 17:48:25 +0900
+
elementary (1.0.0+svn.51480slp2+build35) unstable; urgency=low
* [elm_entry] password tag bug fix
Source: elementary
Section: x11
Priority: optional
-Maintainer: Jaehwan Kim <jae.hwan.kim@samsung.com>, Chuneon Park <chuneon.park@samsung.com>, Juyung Seo <juyung.seo@samsung.com>, Myungjae Lee <mjae.lee@samsung.com>, Woohyun Jung <wh0705.jung@samsung.com>, Jihoon Kim <jihoon48.kim@samsung.com>
+Maintainer: Jaehwan Kim <jae.hwan.kim@samsung.com>, Chuneon Park <chuneon.park@samsung.com>, Juyung Seo <juyung.seo@samsung.com>, Myungjae Lee <mjae.lee@samsung.com>, Woohyun Jung <wh0705.jung@samsung.com>, Jihoon Kim <jihoon48.kim@samsung.com>, Jeonghyun Yun <jh0506.yun@samsung.com>
Uploaders: Doyoun Kang <doyoun.kang@samsung.com>, Hyoyoung Chang <hyoyoung.chang@samsung.com>
Build-Depends: debhelper (>= 6), cdbs, libecore-dev, libevas-dev, libeet-dev, libeet-bin, libedje-dev, pkg-config, libtool, libeina-dev, libefreet-dev, libethumb-dev, libxml2-dev
Standards-Version: 3.8.1
EAPI double elm_genlist_longpress_timeout_get(const Evas_Object *obj);
EAPI void elm_genlist_effect_set(const Evas_Object *obj, Eina_Bool emode);
EAPI void elm_genlist_pinch_zoom_set(Evas_Object *obj, Eina_Bool emode);
+ EAPI void elm_genlist_pinch_zoom_mode_set(Evas_Object *obj, Eina_Bool emode);
EINA_DEPRECATED EAPI void elm_genlist_queue_exception_set(const Evas_Object *obj, Eina_Bool emode);
/* Rotation Fx */
EAPI Elm_Effect *elm_fx_rotation_add(Evas_Object *obj, float from_degree, float to_degree, Eina_Bool cw);
+ /* Rotation3D Fx */
+ EAPI Elm_Effect *elm_fx_rotation3d_add(Evas_Object *obj, float from_degree, float to_degree, float* axis_dir, float* axis_pos);
+
/* Color Fx */
EAPI Elm_Effect *elm_fx_color_add(Evas_Object *obj, unsigned int from_r, unsigned int from_g, unsigned int from_b, unsigned int from_a, unsigned int to_r, unsigned int to_g, unsigned int to_b, unsigned int to_a);
if (h > minh) minh = h;
evas_object_size_hint_min_set(obj, minw, minh);
- evas_object_size_hint_max_set(obj, maxw, maxh);
+ //evas_object_size_hint_max_set(obj, maxw, maxh);
}
static void
if (sel->format == ELM_SEL_FORMAT_MARKUP){
*data_ret = remove_tags(sel->selbuf, size_ret);
- } else if (sel->format == ELM_SEL_FORMAT_TEXT){
+ } else if (sel->format == ELM_SEL_FORMAT_TEXT || sel->format == ELM_SEL_FORMAT_HTML){
*data_ret = strdup(sel->selbuf);
*size_ret = strlen(sel->selbuf);
} else if (sel->format == ELM_SEL_FORMAT_IMAGE){
_on_focus_hook(void *data, Evas_Object *obj)
{
Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd || !wd->base) return ;
-
- if (!elm_widget_focus_get(obj))
- edje_object_signal_emit(wd->base, "elm,state,focus,out", "elm");
+ if (!wd || !wd->base) return ;
+
+ if (elm_widget_focus_get(obj))
+ {
+ if (wd->layout == ELM_DATEFIELD_LAYOUT_TIME)
+ elm_object_focus(wd->time[TIME_HOUR]);
+
+ else if (wd->layout == ELM_DATEFIELD_LAYOUT_DATEANDTIME || wd->layout == ELM_DATEFIELD_LAYOUT_DATE)
+ {
+ switch (wd->date_format)
+ {
+ case DATE_FORMAT_YYDDMM:
+ case DATE_FORMAT_YYMMDD:
+ elm_object_focus(wd->date[DATE_YEAR]);
+ break;
+ case DATE_FORMAT_MMDDYY:
+ case DATE_FORMAT_MMYYDD:
+ elm_object_focus(wd->date[DATE_MON]);
+ break;
+ case DATE_FORMAT_DDMMYY:
+ case DATE_FORMAT_DDYYMM:
+ elm_object_focus(wd->date[DATE_DAY]);
+ }
+ }
+ }
}
static void
focus_obj = elm_widget_focused_object_get(data);
if (focus_obj) elm_object_unfocus(focus_obj);
- edje_object_signal_emit(wd->base, "elm,state,focus,out", "elm");
}
static void
Widget_Data *wd = elm_widget_data_get(data);
if (!wd || !wd->base) return;
- if (elm_widget_focus_get(data))
- edje_object_signal_emit(wd->base, "elm,state,focus,in", "elm");
-
if (obj == wd->date[DATE_YEAR])
edje_object_signal_emit(wd->base, "elm,state,year,focus,in", "elm");
else if (obj == wd->date[DATE_MON])
if (wd->pm) edje_object_part_text_set(wd->base, "elm.text.ampm", "PM");
else edje_object_part_text_set(wd->base, "elm.text.ampm", "AM");
}
- sprintf(str, "%d", num);
+ sprintf(str, "%02d", num);
elm_entry_entry_set(wd->time[TIME_HOUR], str);
edje_object_signal_emit(wd->base, "elm,state,hour,focus,out", "elm");
}
if (num > MIN_MAXIMUM) num = MIN_MAXIMUM;
wd->min = num;
- sprintf(str, "%d", num);
+ sprintf(str, "%02d", num);
elm_entry_entry_set(wd->time[TIME_MIN], str);
edje_object_signal_emit(wd->base, "elm,state,min,focus,out", "elm");
}
- edje_object_signal_emit(wd->base, "elm,state,focus,out", "elm");
+
evas_object_smart_callback_call(data, "changed", NULL);
}
}
if (wd->hour > HOUR_12H_MAXIMUM)
- sprintf(str, "%d", wd->hour - HOUR_12H_MAXIMUM);
+ sprintf(str, "%02d", wd->hour - HOUR_12H_MAXIMUM);
else if (wd->hour == 0)
- sprintf(str, "%d", HOUR_12H_MAXIMUM);
+ sprintf(str, "%02d", HOUR_12H_MAXIMUM);
else
- sprintf(str, "%d", wd->hour);
+ sprintf(str, "%02d", wd->hour);
}
elm_entry_entry_set(wd->time[TIME_HOUR], str);
- sprintf(str, "%d", wd->min);
- if (wd->min == 0) str[1] = '0';
+ sprintf(str, "%02d", wd->min);
elm_entry_entry_set(wd->time[TIME_MIN], str);
}
for (i = 0; i < DATE_MAX; i++)
{
wd->date[i] = elm_entry_add(obj);
+ elm_entry_single_line_set(wd->date[i], EINA_TRUE);
elm_entry_context_menu_disabled_set(wd->date[i], EINA_TRUE);
if (i == DATE_MON) elm_entry_input_panel_layout_set(wd->date[i], ELM_INPUT_PANEL_LAYOUT_MONTH);
else elm_entry_input_panel_layout_set(wd->date[i], ELM_INPUT_PANEL_LAYOUT_NUMBERONLY);
for (i = 0; i < TIME_MAX; i++)
{
wd->time[i] = elm_entry_add(obj);
+ elm_entry_single_line_set(wd->time[i], EINA_TRUE);
elm_entry_context_menu_disabled_set(wd->time[i], EINA_TRUE);
elm_entry_input_panel_layout_set(wd->time[i], ELM_INPUT_PANEL_LAYOUT_NUMBERONLY);
elm_entry_maximum_bytes_set(wd->time[i], TIME_MAX_LENGTH);
*
* Signals that you can add callbacks for are:
* - "changed" - The text within the entry was changed
- * - "activated" - The entry has received focus and the cursor
+ * - "activated" - The entry has had editing finished and changes are to be committed (generally when enter key is pressed)
* - "press" - The entry has been clicked
* - "longpressed" - The entry has been clicked for a couple seconds
* - "clicked" - The entry has been clicked
static void _signal_selection_start(void *data, Evas_Object *obj, const char *emission, const char *source);
static void _signal_selection_changed(void *data, Evas_Object *obj, const char *emission, const char *source);
static void _signal_selection_cleared(void *data, Evas_Object *obj, const char *emission, const char *source);
+static void _signal_handler_move_start(void *data, Evas_Object *obj, const char *emission, const char *source);
+static void _signal_handler_move_end(void *data, Evas_Object *obj, const char *emission, const char *source);
static void _signal_entry_paste_request(void *data, Evas_Object *obj, const char *emission, const char *source);
static void _signal_entry_copy_notify(void *data, Evas_Object *obj, const char *emission, const char *source);
static void _signal_entry_cut_notify(void *data, Evas_Object *obj, const char *emission, const char *source);
if (!wd->editable) return;
if (elm_widget_focus_get(obj))
{
- evas_object_focus_set(wd->ent, 1);
+ evas_object_focus_set(wd->ent, EINA_TRUE);
edje_object_signal_emit(wd->ent, "elm,action,focus", "elm");
if (top) elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_ON);
else
{
edje_object_signal_emit(wd->ent, "elm,action,unfocus", "elm");
- edje_object_part_text_set(wd->ent, "elm_entry_remain_byte_count", "");
- evas_object_focus_set(wd->ent, 0);
+ //edje_object_part_text_set(wd->ent, "elm_entry_remain_byte_count", "");
+ evas_object_focus_set(wd->ent, EINA_FALSE);
if (top) elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_OFF);
evas_object_smart_callback_call(obj, SIG_UNFOCUSED, NULL);
}
if (!wd->password)
edje_object_part_text_select_allow_set(wd->ent, "elm.text", EINA_TRUE);
edje_object_signal_emit(wd->ent, "elm,state,select,on", "elm");
- elm_widget_scroll_hold_push(data);
+ //elm_widget_scroll_hold_push(data);
}
static void
edje_object_signal_emit(wd->ent, "elm,state,select,off", "elm");
elm_widget_scroll_hold_pop(data);
_store_selection(ELM_SEL_CLIPBOARD, data);
-// edje_object_part_text_select_none(wd->ent, "elm.text");
+ edje_object_part_text_select_none(wd->ent, "elm.text");
}
static void
(wd->ent, "context_menu_orientation");
if ((context_menu_orientation) &&
(!strcmp(context_menu_orientation, "horizontal")))
- elm_hoversel_horizontal_set(wd->hoversel, 1);
+ elm_hoversel_horizontal_set(wd->hoversel, EINA_TRUE);
elm_object_style_set(wd->hoversel, "entry");
elm_widget_sub_object_add(data, wd->hoversel);
elm_hoversel_label_set(wd->hoversel, "Text");
{
ecore_timer_del(wd->longpress_timer);
wd->longpress_timer = NULL;
- }
+ }
}
static void
}
static void
+_signal_handler_move_start(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
+{
+ Widget_Data *wd = elm_widget_data_get(data);
+ elm_object_scroll_freeze_push(data);
+}
+
+static void
+_signal_handler_move_end(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
+{
+ Widget_Data *wd = elm_widget_data_get(data);
+ elm_object_scroll_freeze_pop(data);
+}
+
+static void
_signal_selection_start(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
{
Widget_Data *wd = elm_widget_data_get(data);
static void
_signal_selection_changed(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
{
+ Evas_Coord cx, cy, cw, ch;
Widget_Data *wd = elm_widget_data_get(data);
if (!wd) return;
wd->have_selection = EINA_TRUE;
evas_object_smart_callback_call(data, SIG_SELECTION_CHANGED, NULL);
elm_selection_set(ELM_SEL_PRIMARY, obj, ELM_SEL_FORMAT_MARKUP,
elm_entry_selection_get(data));
+
+ edje_object_part_text_cursor_geometry_get(wd->ent, "elm.text", &cx, &cy, &cw, &ch);
+ if (!wd->deferred_recalc_job)
+ elm_widget_show_region_set(data, cx, cy, cw, ch + elm_finger_size_get());
+ else
+ {
+ wd->deferred_cur = EINA_TRUE;
+ wd->cx = cx;
+ wd->cy = cy;
+ wd->cw = cw;
+ wd->ch = ch + elm_finger_size_get();
+ }
}
static void
/*
Widget_Data *wd = elm_widget_data_get(data);
Ecore_X_Event_Selection_Clear *ev = event;
- if (!wd) return 1;
- if (!wd->have_selection) return 1;
+ if (!wd) return ECORE_CALLBACK_PASS_ON;
+ if (!wd->have_selection) return ECORE_CALLBACK_PASS_ON;
if ((ev->selection == ECORE_X_SELECTION_CLIPBOARD) ||
(ev->selection == ECORE_X_SELECTION_PRIMARY))
{
return ECORE_CALLBACK_PASS_ON;
}
- elm_selection_get(ELM_SEL_SECONDARY,ELM_SEL_FORMAT_MARKUP,data,NULL,NULL);
+ if (cnpwidgetdata == data)
+ {
+ elm_selection_get(ELM_SEL_SECONDARY,ELM_SEL_FORMAT_MARKUP,data,NULL,NULL);
+ }
// end for cbhm
return ECORE_CALLBACK_PASS_ON;
byte_len = strlen(text);/*no of bytes*/
remain_bytes = wd->max_no_of_bytes-byte_len;
sprintf(buf,"%d",remain_bytes);
- edje_object_part_text_set(wd->ent, "elm_entry_remain_byte_count", buf);
+ //edje_object_part_text_set(wd->ent, "elm_entry_remain_byte_count", buf);
if(input_data)
{
insert_text = (char *)input_data;
_elm_theme_object_set(obj, wd->ent, "entry", "base", "default");
edje_object_signal_callback_add(wd->ent, "entry,changed", "elm.text",
_signal_entry_changed, obj);
+ edje_object_signal_callback_add(wd->ent, "handler,move,start", "elm.text",
+ _signal_handler_move_start, obj);
+ edje_object_signal_callback_add(wd->ent, "handler,move,end", "elm.text",
+ _signal_handler_move_end, obj);
edje_object_signal_callback_add(wd->ent, "selection,start", "elm.text",
_signal_selection_start, obj);
edje_object_signal_callback_add(wd->ent, "selection,changed", "elm.text",
static void _move_edit_controls( Elm_Genlist_Item *it, int itx, int ity );
static Eina_Bool _item_moving_effect_timer_cb(void *data);
static int _item_flip_effect_show(void *data);
-static void elm_genlist_pinch_zoom_mode_set(Evas_Object *obj, int emode);
static Evas_Smart_Class _pan_sc = EVAS_SMART_CLASS_INIT_VERSION;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
+ wd->move_effect_mode = ELM_GENLIST_ITEM_MOVE_EFFECT_NONE;
+ wd->pinchzoom_effect_mode = ELM_GENLIST_ITEM_PINCHZOOM_EFFECT_NONE;
+ elm_smart_scroller_hold_set(wd->scr, 0);
+ elm_smart_scroller_freeze_set(wd->scr, 0);
+ elm_smart_scroller_freeze_momentum_animator_set(wd->scr, 0);
+ elm_smart_scroller_freeze_bounce_animator_set(wd->scr, 0);
+ elm_smart_scroller_bounce_allow_set(wd->scr, EINA_FALSE, EINA_TRUE);
+ wd->max_git_num = 0;
+
if(wd->item_moving_effect_timer)
{
// ecore_timer_del(wd->item_moving_effect_timer);
if(!wd)
return ECORE_CALLBACK_CANCEL;
+ if(wd->pinchzoom_effect_mode == ELM_GENLIST_ITEM_PINCHZOOM_EFFECT_NONE)
+ return ECORE_CALLBACK_CANCEL;
+
elm_smart_scroller_bounce_allow_set(wd->scr, EINA_FALSE, EINA_FALSE);
added_gy += 0.1;
if (!wd)
return ECORE_CALLBACK_CANCEL;
+ if(wd->pinchzoom_effect_mode == ELM_GENLIST_ITEM_PINCHZOOM_EFFECT_NONE)
+ return ECORE_CALLBACK_CANCEL;
+
t = ecore_loop_time_get();
top_git = wd->pinch_it;
return bg ;
}
-static void
-elm_genlist_pinch_zoom_mode_set(Evas_Object *obj, int emode)
+EAPI void
+elm_genlist_pinch_zoom_mode_set(Evas_Object *obj, Eina_Bool emode)
{
- Item_Block *itb;
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
struct _Mod_Api
{
- void (*obj_hook) (Evas_Object *obj);
- void (*obj_unhook) (Evas_Object *obj);
+ Eina_Bool (*obj_hook) (Evas_Object *obj);
+ Eina_Bool (*obj_unhook) (Evas_Object *obj);
char * (*obj_url_request) (Evas_Object *obj, int x, int y, int zoom);
Eina_Bool (*obj_convert_coord_into_geo) (const Evas_Object *obj, int zoom, int x, int y, int size, double *lon, double *lat);
Eina_Bool (*obj_convert_geo_into_coord) (const Evas_Object *obj, int zoom, double lon, double lat, int size, int *x, int *y);
struct event_t *ev;
ev = calloc(1, sizeof(struct event_t));
- if(ev == NULL) printf("Cannot allocate event_t\n");
+ if(ev == NULL) DBG("Cannot allocate event_t");
ev->object = object;
ev->device = device;
}
destroy_event_object(ev0);
}else{
- printf("[%d] Cannot get event0\n", __LINE__);
+ DBG("Cannot get event0");
}
if (!wd) return;
if (ev->button != 1) return;
ev = create_event_object(obj, down->device);
if(!ev){
- printf("Failed : create_event_object\n");
+ DBG("Failed : create_event_object");
return;
}
ev = get_event_object(move->device);
if(ev == NULL) {
- printf("[%d] : Cannot get multi device\n", __LINE__);
+ DBG("Cannot get multi device");
return;
}
ev0 = get_event_object(0);
if(ev0 == NULL) {
- printf("[%d] : Cannot get device0\n", __LINE__);
+ DBG("Cannot get device0");
return;
}
ev = get_event_object(up->device);
if(ev == NULL){
- printf("[%d] : Cannot get multi device\n", __LINE__);
+ DBG("Cannot get multi device");
return;
}
Widget_Data *wd;
Evas_Coord minw, minh;
Evas_Object *obj;
+ Eina_Bool ret = EINA_FALSE;
+ int idx;
static Evas_Smart *smart = NULL;
- setenv("ELM_MODULES", "decarta>map/api", 1);
if (!ecore_file_download_protocol_available("http://"))
{
ERR("Ecore must be built with the support of HTTP for the widget map !");
wd->markers_max_num = 30;
wd->source = ELM_MAP_SOURCE_MAPNIK;
+ for(idx=ELM_MAP_SOURCE_MAPNIK; idx<=ELM_MAP_SOURCE_CUSTOM_6; idx++)
+ if(map_sources_tab[idx].use_module == EINA_TRUE){
+ if(!wd->api){
+ wd->api = module(obj);
+ if ((wd->api) && (wd->api->obj_hook)) ret = wd->api->obj_hook(obj);
+ if (!ret) DBG("Failed : loading module [%s]", elm_map_source_name_get(idx));
+ }
+ }
+
evas_object_smart_callback_add(obj, "scroll-hold-on", _hold_on, obj);
evas_object_smart_callback_add(obj, "scroll-hold-off", _hold_off, obj);
evas_object_smart_callback_add(obj, "scroll-freeze-on", _freeze_on, obj);
elm_map_utils_convert_coord_into_geo(const Evas_Object *obj, int x, int y, int size, double *lon, double *lat)
{
Widget_Data *wd = elm_widget_data_get(obj);
+ int zoom = floor(log2(size/256));
if(map_sources_tab[elm_map_source_get(obj)].use_module == EINA_TRUE)
if(wd->api) if ((wd->api) && (wd->api->obj_convert_coord_into_geo)){
- if(wd->api->obj_convert_coord_into_geo(obj, wd->zoom, x, y, size, lon, lat)==EINA_TRUE)
+ if(wd->api->obj_convert_coord_into_geo(obj, zoom, x, y, size, lon, lat)==EINA_TRUE)
return;
}
elm_map_utils_convert_geo_into_coord(const Evas_Object *obj, double lon, double lat, int size, int *x, int *y)
{
Widget_Data *wd = elm_widget_data_get(obj);
+ int zoom = floor(log2(size/256));
if(map_sources_tab[elm_map_source_get(obj)].use_module == EINA_TRUE)
if(wd->api) if ((wd->api) && (wd->api->obj_convert_geo_into_coord)){
- if(wd->api->obj_convert_geo_into_coord(obj, wd->zoom, lon, lat, size, x, y)==EINA_TRUE)
+ if(wd->api->obj_convert_geo_into_coord(obj, zoom, lon, lat, size, x, y)==EINA_TRUE)
return;
}
zoom = wd->zoom;
wd->zoom = -1;
- if(map_sources_tab[source].use_module == EINA_TRUE){
- if(!wd->api){
- wd->api = module(obj);
- if ((wd->api) && (wd->api->obj_hook)) wd->api->obj_hook(obj);
- }
- }
-
if (map_sources_tab[wd->source].zoom_max < zoom)
zoom = map_sources_tab[wd->source].zoom_max;
if (map_sources_tab[wd->source].zoom_min > zoom)
strncpy(buf, "item/", sizeof(buf));\r
strncat(buf, item_style, sizeof(buf) - strlen(buf));\r
if (!eina_stringshare_replace(&item->item_style, item_style)) return;\r
- _elm_theme_object_set(item->obj, item->base, "navigationbar2", buf, elm_widget_style_get(item->obj));\r
+ _elm_theme_object_set(item->obj, item->base, "navigationbar_ex", buf, elm_widget_style_get(item->obj));\r
if(item->title)\r
edje_object_part_text_set(item->base, "elm.text", item->title);\r
if(item->subtitle)\r
if (content)
{
- wd->contents.left = content;
elm_widget_sub_object_add(obj, content);
+ wd->contents.left = content;
edje_object_part_swallow(wd->panes, "elm.swallow.left", content);
+ if (wd->contents.right)
+ edje_object_signal_emit(wd->panes, "panes_pair", "elm");
}
+ else
+ edje_object_signal_emit(wd->panes, "panes_unpair", "elm");
}
/**
if (content)
{
- wd->contents.right = content;
elm_widget_sub_object_add(obj, content);
+ wd->contents.right = content;
edje_object_part_swallow(wd->panes, "elm.swallow.right", content);
- edje_object_signal_emit(wd->panes, "panes_pair", "elm");
+ if (wd->contents.left)
+ edje_object_signal_emit(wd->panes, "panes_pair", "elm");
}
+ else
+ edje_object_signal_emit(wd->panes, "panes_unpair", "elm");
}
/**
wd = elm_widget_data_get(obj);
content = edje_object_part_swallow_get(wd->panes, "elm.swallow.left");
- if(!content) return NULL;
+ if (!content)
+ return NULL;
edje_object_part_unswallow(wd->panes, content);
elm_widget_sub_object_del(obj, content);
evas_object_hide(content);
wd = elm_widget_data_get(obj);
content = edje_object_part_swallow_get(wd->panes, "elm.swallow.right");
- if(!content) return NULL;
+ if (!content)
+ return NULL;
edje_object_part_unswallow(wd->panes, content);
elm_widget_sub_object_del(obj, content);
evas_object_hide(content);
{
Widget_Data *wd = elm_widget_data_get(obj);
wd->fixed = fixed;
- if(wd->fixed == EINA_TRUE)
- edje_object_signal_emit(wd->panes, "elm.fixed", "movement.decider");
+ if (wd->fixed == EINA_TRUE)
+ edje_object_signal_emit(wd->panes, "elm.fixed", "movement.decider");
else
- edje_object_signal_emit(wd->panes, "elm.unfixed", "movement.decider");
+ edje_object_signal_emit(wd->panes, "elm.unfixed", "movement.decider");
}
/**
break;
}
}
+
wd->cur_seg_id = item->segment_id;
evas_object_smart_callback_call(item->obj, "changed", (void*)wd->cur_seg_id);
if(!wd) return;
Evas_Coord w = 0, h = 0;
-
_update_list(it->obj);
+
evas_object_geometry_get(it->base, NULL, NULL, &w, &h);
if(wd->max_height == 1) wd->max_height = h;
_update_list(Evas_Object *obj)
{
Elm_Segment_Item *it;
+ Elm_Segment_Item *next_sel_it;
Eina_List *l;
int i = 0;
edje_object_signal_emit(it->base, "elm,state,text,hidden", "elm");
if (it->icon && edje_object_part_swallow_get(it->base, "elm.swallow.content") == NULL)
{
- if(it->icon)
- {
- edje_object_part_swallow(it->base, "elm.swallow.content", it->icon);
- edje_object_signal_emit(it->base, "elm,state,icon,visible", "elm");
- }
- else
- edje_object_signal_emit(it->base, "elm,state,icon,hidden", "elm");
+ if(it->icon)
+ {
+ edje_object_part_swallow(it->base, "elm.swallow.content", it->icon);
+ edje_object_signal_emit(it->base, "elm,state,icon,visible", "elm");
+ }
+ else
+ edje_object_signal_emit(it->base, "elm,state,icon,hidden", "elm");
}
edje_object_message_signal_process(it->base);
i++;
}
+
if(wd->data && wd->selected)
{
_signal_segment_on(wd->data);
wd->selected = EINA_FALSE;
}
+ if(wd->cur_seg_id != wd->del_index || wd->cur_seg_id == 0)
+ {
+ next_sel_it = _item_find(obj, wd->cur_seg_id);
+ if(next_sel_it)
+ {
+ _signal_segment_on((void*)next_sel_it);
+ wd->selected = EINA_FALSE;
+ }
+ }
}
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
- if (wd->insert_index && wd->cur_seg_id >= wd->insert_index)
+ if ((wd->insert_index > 0) && wd->cur_seg_id >= wd->insert_index)
{
++wd->cur_seg_id;
wd->insert_index = 0;
}
- if (wd->del_index)
+ if (wd->del_index > 0)
{
if (wd->cur_seg_id >= wd->del_index)
--wd->cur_seg_id;
- wd->del_index =0;
+ wd->del_index = -1;
}
EINA_LIST_FOREACH(wd->seg_ctrl, l, it)
return NULL;
}
-
-static Elm_Segment_Item *
-_item_search(Evas_Object *obj, Elm_Segment_Item *item)
-{
- Elm_Segment_Item *it;
- Eina_List *l;
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd)
- return NULL;
-
- EINA_LIST_FOREACH(wd->seg_ctrl, l, it)
- {
- if (it == item) {
- return it;
- }
- }
- return NULL;
-}
-
-
/**
* Add a new segmentcontrol to the parent
* @param parent The parent object
evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE, _object_resize, obj);
wd->id = 0;
- wd->del_index = 0;
- wd->insert_index = 0;
+ wd->del_index = -1;
+ wd->insert_index = -1;
wd->cur_seg_id = -1;
wd->selected = EINA_FALSE;
+ wd->data = NULL;
deffont = edje_object_data_get(wd->base, "default_font_size");
if (deffont) wd->cur_fontsize = atoi(deffont);
evas_object_event_callback_add(it->base, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down, it);
evas_object_event_callback_add(it->base, EVAS_CALLBACK_MOUSE_UP, _mouse_up, it);
evas_object_event_callback_add(it->base, EVAS_CALLBACK_RESIZE, _object_item_resize, it);
- wd->insert_index = 0;
- wd->del_index = 0;
+ wd->insert_index = -1;
+ wd->del_index = -1;
_refresh_segment_ids(obj);
if(animate && it->segment_id && wd->ani_it == NULL)
if(!wd) return;
-// it = _item_search(obj, item);
it = item;
if(!it) return;
if(item->segment_id == wd->cur_seg_id) return;
wd->selected = EINA_TRUE;
if(wd->data)
- {
+ {
evas_object_del((Evas_Object *)wd->data);
wd->data = NULL;
}
- wd->data = item;
+ wd->data = (void*)item;
}
else if(item->segment_id == wd->cur_seg_id)
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd;
- Evas_Coord w, h;
wd = elm_widget_data_get(obj);
wd->max_drag_w = dw;
x = ev->x - w/2;\r
y = ev->y - h;\r
\r
- evas_object_data_set(wd->moving_obj, "returning", 1);\r
+ evas_object_data_set(wd->moving_obj, "returning", (void *)1);\r
wd->animating++;\r
move_object_with_animation(wd->moving_obj, x, y, w, h, x_, y_, w_, h_, 0.25, edit_item_return_cb, wd);\r
}\r
elm_table_pack(wd->box, wd->moving_obj, wd->empty_num-1, 0, 1, 1);\r
\r
wd->animating++;\r
- evas_object_data_set(item->base, "animating", 1);\r
+ evas_object_data_set(item->base, "animating", (void *)1);\r
move_object_with_animation(item->base, x, y, w, h, x_, y_, w_, h_, 0.25, bar_item_move_end_cb, wd);\r
}\r
}\r
#include <Elementary.h>
+#include "elm_priv.h"
/**
*
evas_map_point_image_uv_set(map, 1, flip->from_size.x, 0);
evas_map_point_image_uv_set(map, 2, flip->from_size.x,
flip->from_size.y);
- evas_map_point_image_uv_set(map, 3, 0, flip->to_size.y);
+ evas_map_point_image_uv_set(map, 3, 0, flip->from_size.y);
}
}
{
case ELM_FX_WIPE_DIR_UP:
w2 = (x + w);
- h2 = h - (h * frame);
+ h2 = y + h - (h * frame);
evas_map_point_image_uv_set(map, 0, 0, 0);
evas_map_point_image_uv_set(map, 1, w, 0);
evas_map_point_image_uv_set(map, 2, w, h2);
evas_map_point_coord_set(map, 1, w2, y + h2, 0);
evas_map_point_coord_set(map, 2, w2, y + h, 0);
evas_map_point_coord_set(map, 3, x, y + h, 0);
+ fprintf(stderr, "%f %f %f %f\n", x, y, w, h);
break;
default:
break;
return effect;
}
+
+
+
+/////////////////////////////////////////////////////////////////////////////////////
+//Rotation3d FX
+/////////////////////////////////////////////////////////////////////////////////////
+typedef struct _rotation3d Elm_Fx_Rotation3d;
+static void _elm_fx_rotation3d_begin(void *data, Eina_Bool auto_reverse,
+ unsigned int repeat_cnt);
+static void _elm_fx_rotation3d_end(void *data, Eina_Bool auto_reverse,
+ unsigned int repeat_cnt);
+static void _elm_fx_rotation3d_op(void *data, Elm_Animator *animator,
+ double frame);
+
+struct _rotation3d
+{
+ Evas_Object *obj;
+ float from[3];
+ float to[3];
+ float axis_pos[3];
+};
+
+static void
+_elm_fx_rotation3d_begin(void *data, Eina_Bool auto_reverse,
+ unsigned int repeat_cnt)
+{
+ Elm_Fx_Rotation3d *rotation = data;
+ evas_object_show(rotation->obj);
+}
+
+static void
+_elm_fx_rotation3d_end(void *data, Eina_Bool auto_reverse,
+ unsigned int repeat_cnt)
+{
+ Elm_Fx_Rotation3d *rotation = data;
+ evas_object_map_enable_set(rotation->obj, EINA_FALSE);
+}
+
+static void
+_elm_fx_rotation3d_op(void *data, Elm_Animator *animator, double frame)
+{
+ Elm_Fx_Rotation3d *rotation;
+
+ Evas_Map *map;
+
+ Evas_Coord x, y, w, h;
+
+ float degree[3];
+
+ float half_w, half_h;
+
+ map = evas_map_new(4);
+ if (!map)
+ return;
+
+ rotation = data;
+
+ evas_map_smooth_set(map, EINA_TRUE);
+ evas_map_util_points_populate_from_object_full(map, rotation->obj, 0);
+ degree[0] = rotation->from[0] + (float)(frame * rotation->to[0]);
+ degree[1] = rotation->from[1] + (float)(frame * rotation->to[1]);
+ degree[2] = rotation->from[2] + (float)(frame * rotation->to[2]);
+
+ evas_object_geometry_get(rotation->obj, &x, &y, &w, &h);
+
+ half_w = (float)w *0.5;
+
+ half_h = (float)h *0.5;
+
+ evas_map_util_3d_rotate(map, degree[0], degree[1], degree[2], rotation->axis_pos[0], rotation->axis_pos[1], rotation->axis_pos[2]);
+ evas_map_util_3d_perspective(map, x + half_w, y + half_h, 0, 1000);
+ evas_object_map_enable_set(rotation->obj, EINA_TRUE);
+ evas_object_map_set(rotation->obj, map);
+ evas_map_free(map);
+}
+
+/**
+ * Add Rotation3d effect
+ *
+ * @param[in] obj Evas_Object that effect is applying to
+ * @param[in] from degree Degree when effect begins
+ * @param[in] to_degree Degree when effect is ends
+ * @param[in] axis_dir[3] rotation axis vector. it should be normalized.
+ * @param[in] axis_pos[3] rotation axis origin position.
+ * @param[in] cw Rotation direction. EINA_TRUE is clock wise
+ * @return Rotation effect
+ *
+ * @ingroup Transit
+ */
+EAPI Elm_Effect *
+elm_fx_rotation3d_add(Evas_Object *obj, float from_degree, float to_degree,
+ float* axis_dir, float* axis_pos)
+{
+ Elm_Effect *effect;
+
+ Elm_Fx_Rotation3d *rotation;
+
+ if (!obj)
+ return NULL;
+
+ effect = calloc(1, sizeof(Elm_Effect));
+ if (!effect)
+ return NULL;
+
+ rotation = calloc(1, sizeof(Elm_Fx_Rotation3d));
+
+ if (!rotation)
+ {
+ free(effect);
+ return NULL;
+ }
+
+ rotation->obj = obj;
+ rotation->from[0] = from_degree * axis_dir[0];
+ rotation->from[1] = from_degree * axis_dir[1];
+ rotation->from[2] = from_degree * axis_dir[2];
+ rotation->to[0] = (to_degree * axis_dir[0]) - rotation->from[0];
+ rotation->to[1] = (to_degree * axis_dir[1]) - rotation->from[1];
+ rotation->to[2] = (to_degree * axis_dir[2]) - rotation->from[2];
+ rotation->axis_pos[0] = axis_pos[0];
+ rotation->axis_pos[1] = axis_pos[1];
+ rotation->axis_pos[2] = axis_pos[2];
+
+ effect->begin_op = _elm_fx_rotation3d_begin;
+ effect->end_op = _elm_fx_rotation3d_end;
+ effect->animation_op = _elm_fx_rotation3d_op;
+ effect->user_data = rotation;
+
+ return effect;
+}
+
+
+
/////////////////////////////////////////////////////////////////////////////////////
// ImageAnimation FX
/////////////////////////////////////////////////////////////////////////////////////
case ELM_IMAGE_ROTATE_180_CW:
_els_smart_icon_rotate_180(sd);
return;
- default:
- return;
+ //default:
+ //return;
}
evas_object_image_size_get(sd->obj, &iw, &ih);