Ejemplo n.º 1
0
static void
set_api_state(api_data *api)
{
   Evas_Object *icon;

   const Eina_List *items = elm_box_children_get(api->box);
   if (!eina_list_count(items))
     return;

   /* use elm_box_children_get() to get list of children */
   switch(api->state)
     { /* Put all api-changes under switch */
      case HOVERSEL_HORIZ:  /* Make first hover horiz (0) */
         elm_hoversel_horizontal_set(eina_list_nth(items, 0), EINA_TRUE);
         elm_hoversel_hover_begin(eina_list_nth(items, 0));
         break;

      case HOVERSEL_END:  /* Make first hover horiz (1) */
         elm_hoversel_hover_begin(eina_list_nth(items, 1));
         elm_hoversel_hover_end(eina_list_nth(items, 1));
         break;

      case HOVERSEL_LABAL_SET: /* set second hover label (2) */
         elm_object_text_set(eina_list_nth(items, 1), "Label from API");
         break;

      case HOVERSEL_ICON_UNSET: /* 3 */
         elm_object_text_set(eina_list_nth(items, 5), "Label only");
         icon = elm_object_part_content_unset(eina_list_nth(items, 5), "icon");
         evas_object_del(icon);
         break;

      case HOVERSEL_CLEAR_OPEN: /* 4 */
         elm_hoversel_hover_begin(eina_list_nth(items, 1));
         elm_hoversel_clear(eina_list_nth(items, 1));
         break;

      case HOVERSEL_CLEAR: /* 5 */
         elm_hoversel_clear(eina_list_nth(items, 0));
         break;

      case API_STATE_LAST:
         break;

      default:
         return;
     }
}
Ejemplo n.º 2
0
PREFIX value ml_elm_hoversel_clear(value v_obj)
{
        elm_hoversel_clear((Evas_Object*) v_obj);
        return Val_unit;
}
Ejemplo n.º 3
0
static void
_rm_items(void *data, Evas_Object *obj, void *event_info)
{
   if(!elm_hoversel_expanded_get(obj))
     elm_hoversel_clear(obj);
}