Пример #1
0
static Evas_Object * create_inner_layout (void *data)
{
    struct appdata *ad = (struct appdata *)data;
    Evas_Object *bx = NULL ;
    Evas_Object *ef = NULL ;
    Evas_Object *en = NULL;

    Evas_Object *parent = ad->naviframe;
    const char *imdata_ko = "LANG:ko_KR";
    const char *imdata_en = "LANG:en_US";

    bx = elm_box_add (parent);
    evas_object_size_hint_weight_set (bx, EVAS_HINT_EXPAND, 0.0);
    evas_object_size_hint_align_set (bx, EVAS_HINT_FILL, 0.0);
    evas_object_show (bx);

    ef = _create_ef_layout (parent, _("ko_KR"), _("Korean Layout"));
    elm_box_pack_end (bx, ef);
    en =  elm_object_part_content_get(ef, "elm.swallow.content");
    elm_entry_input_panel_imdata_set (en, imdata_ko, strlen(imdata_ko));

    ef = _create_ef_layout (parent, _("en_US"), _("English layout"));
    elm_box_pack_end (bx, ef);
    en =  elm_object_part_content_get(ef, "elm.swallow.content");
    elm_entry_input_panel_imdata_set (en, imdata_en, strlen(imdata_en));

    return bx;
}
Пример #2
0
/**
 * @brief Implementation of get_image_position from AtkImage interface
 *
 * @param image EailButton instance
 * @param [out] x horizontal coordinate
 * @param [out] y vertical coordinate
 * @param coord_type coord type
 */
static void
eail_button_get_image_position(AtkImage     *image,
                               gint         *x,
                               gint         *y,
                               AtkCoordType  coord_type)
{
    Evas_Object *button_image;
    Evas_Object *widget;
    AtkObject *obj;

    widget = eail_widget_get_widget(EAIL_WIDGET(image));
    if (!widget)
    {
        *x = G_MININT;
        *y = G_MININT;
        return;
    }

    button_image = elm_object_part_content_get(widget, "icon");
    if (button_image)
    {
        obj = eail_factory_get_accessible(button_image);
        atk_image_get_image_position(ATK_IMAGE(obj), x, y, coord_type);
    }
    else
    {
        *x = G_MININT;
        *y = G_MININT;
    }
}
static Eina_Bool _fn_pb_timer_bar(void *data)
{
	pswd_popup_t *pswd_popup_data = (pswd_popup_t *)data;
	pbc_popup_t *pbc_popup_data = pswd_popup_data->pbc_popup_data;
	if (!pbc_popup_data || pbc_popup_data->timer == NULL || pbc_popup_data->progressbar == NULL) {
		return ECORE_CALLBACK_CANCEL;
	}
	const double diff = (double)1/(double)MAX_PBC_TIMEOUT_SECS;
	pbc_popup_data->value = elm_progressbar_value_get(pbc_popup_data->progressbar);
	pbc_popup_data->value += diff;
	if (pbc_popup_data->value >= 1) {
		if (pbc_popup_data->checker == 0) {
			__COMMON_FUNC_ENTER__;
			common_utils_show_info_timeout_popup(pswd_popup_data->win, PBC_TIMEOUT_MSG_STR, 3.0f);
			Evas_Object *cancel_btn = elm_object_part_content_get(pbc_popup_data->popup, "button1");
			evas_object_smart_callback_call(cancel_btn, "clicked", NULL);
			__COMMON_FUNC_EXIT__;
		}
		return ECORE_CALLBACK_CANCEL;
	}

	int remain_mins = (int)(MAX_PBC_TIMEOUT_SECS * (1 - pbc_popup_data->value));
	int remain_secs = 0;
	remain_secs = remain_mins % 60;
	remain_mins /= 60;

	char *remaining_time_str = g_strdup_printf("<font_size=40><align=center>%02d:%02d</align></font_size>", remain_mins, remain_secs);
	elm_object_text_set(pbc_popup_data->timer_label, remaining_time_str);
	//INFO_LOG(UG_NAME_NORMAL, "pbc_popup_data->value = %lf; remain_mins = %d; remain_secs = %d; remaining_time_str = %s", pbc_popup_data->value, remain_mins, remain_secs, remaining_time_str);
	g_free(remaining_time_str);

	elm_progressbar_value_set(pbc_popup_data->progressbar, pbc_popup_data->value);

	return ECORE_CALLBACK_RENEW;
}
Пример #4
0
/**
 * @brief Get state set of accessible object
 *
 * @param obj object instance
 *
 * @returns referred AtkStateSet object
 */
static AtkStateSet *
eail_naviframe_page_ref_state_set(AtkObject *obj)
{
   EailNaviframePage *page;
   AtkStateSet *state_set;
   Evas_Object *widget;

   g_return_val_if_fail(EAIL_IS_NAVIFRAME_PAGE(obj), NULL);

   page = EAIL_NAVIFRAME_PAGE(obj);
   if (!page->naviframe) return NULL;

   widget = elm_object_part_content_get(page->naviframe, "default");

   state_set = atk_state_set_new();

   /* only item-page on top is visible*/
   if (elm_naviframe_top_item_get(page->naviframe) == page->page)
     {
        atk_state_set_add_state(state_set, ATK_STATE_SHOWING);
        atk_state_set_add_state(state_set, ATK_STATE_VISIBLE);
     }

   if (!elm_object_disabled_get(widget))
     atk_state_set_add_state(state_set, ATK_STATE_ENABLED);

   return state_set;
}
Пример #5
0
/**
 * @brief Implementation of get_image_size from AtkImage interface
 *
 * @param image EailButton instance
 * @param [out] width width image
 * @param [out] height height image
 */
static void
eail_button_get_image_size(AtkImage *image,
                           gint     *width,
                           gint     *height)
{
    Evas_Object *widget;
    Evas_Object *button_image;
    AtkObject *obj;

    widget = eail_widget_get_widget(EAIL_WIDGET(image));
    if (!widget)
    {
        *width = -1;
        *height = -1;
        return;
    }

    button_image = elm_object_part_content_get(widget, "icon");
    if (button_image)
    {
        obj = eail_factory_get_accessible(button_image);
        atk_image_get_image_size(ATK_IMAGE(obj), width, height);
    }
    else
    {
        *width = -1;
        *height = -1;
    }
}
Пример #6
0
Eflxx::CountedPtr <Evasxx::Object> Object::getContent ()
{
  Evas_Object *eo = elm_object_part_content_get(o, NULL);
 
  Evasxx::Object *ret_o = Evasxx::Object::wrap (eo);

  return Eflxx::CountedPtr <Evasxx::Object> (ret_o);
}
Пример #7
0
Eflxx::CountedPtr <Evasxx::Object> Object::getContent (const std::string &part)
{
  Evas_Object *eo = elm_object_part_content_get(o, part.c_str());
 
  Evasxx::Object *ret_o = Evasxx::Object::wrap (eo);

  return Eflxx::CountedPtr <Evasxx::Object> (ret_o);
}
static Evas_Object *_create_ef_layout (Evas_Object *parent, const char *label, const char *guide_text)
{
    Evas_Object *ef = NULL;
    ef = _create_ef(parent,label,guide_text);
    Evas_Object *en = elm_object_part_content_get(ef,"elm.swallow.content");
    evas_object_smart_callback_add (en, "cursor,changed", _cursor_changed_cb, NULL);

    return ef;
}
Пример #9
0
/**
 * @brief Gets list of children widgets
 *
 * @param widget EailWidget object
 *
 * @return list of children, NULL otherwise
 */
static Eina_List *
eail_slider_get_widget_children(EailWidget *widget)
{
   Eina_List *list = NULL;
   Evas_Object *child, *obj;

   obj = eail_widget_get_widget(EAIL_WIDGET(widget));
   if (obj)
     {
        child = elm_object_part_content_get(obj, "icon");
        if (child && elm_object_widget_check(child))
          list = eina_list_append(list, child);

        child = elm_object_part_content_get(obj, "end");
        if (child && elm_object_widget_check(child))
          list = eina_list_append(list, child);
     }

   return list;
}
Пример #10
0
/**
 * @brief Helper function to getting nested content in "elm_popup" widget
 *
 * @param obj an AtkObject
 *
 * @returns nested widget content from "elm_popup" widget
 */
static Evas_Object *
_eail_get_nested_widget(AtkObject *obj)
{
    Evas_Object *popup_widget = NULL, *nested_widget = NULL;

    /* getting widget of popup class */
    popup_widget = _eail_get_popup_widget_from_atkobj(obj);
    if (!popup_widget) return NULL;

    nested_widget = elm_object_part_content_get(popup_widget, "default");

    return nested_widget;
}
Пример #11
0
/**
 * @brief Helper function for getting nested content of elm_popup widget
 *
 * @param obj AtkObject instance
 *
 * @returns Evas_Object representing the nested widget content
 * from elm_popup widget
 */
static Evas_Object *
_eail_get_nested_widget(AtkObject *obj)
{
   Evas_Object *ctxpopup_widget = NULL, *nested_widget = NULL;
   /* getting widget of ctxpopup class */
   ctxpopup_widget = eail_widget_get_widget(EAIL_WIDGET(obj));
   if (!ctxpopup_widget)
     {
        ERR("No widget found for EailCtxpopup object!");
     }

   nested_widget = elm_object_part_content_get(ctxpopup_widget, "default");

   return nested_widget;
}
Пример #12
0
/**
 * @brief Helper function for getting nested content in notify widget
 *
 * @param obj an AtkObject
 *
 * @returns nested widget content from notify widget
 */
static Evas_Object *
_eail_get_nested_widget(AtkObject *obj)
{
   Evas_Object *notify_widget = NULL, *nested_widget = NULL;
   /* getting widget of notify class */
   notify_widget = eail_widget_get_widget(EAIL_WIDGET(obj));
   if (!notify_widget)
     {
        ERR("No widget found for notification object!");
     }

   nested_widget = elm_object_part_content_get(notify_widget, "default");

   return nested_widget;
}
Пример #13
0
/**
 * @brief Gets widget children
 *
 * @param widget an EailWidget
 * @return widget children list
 */
static Eina_List *
eail_frame_get_widget_children(EailWidget *widget)
{
   Eina_List *list = NULL;
   Evas_Object *content;
   Evas_Object *obj;

   obj = eail_widget_get_widget(EAIL_WIDGET(widget));
   if (obj)
     {
        content = elm_object_part_content_get(obj, "default");
        if (content)
          list = eina_list_append(list, content);
     }

   return list;
}
Пример #14
0
/**
 * @brief Implementation of eail_widget_get_widget_children callback from
 * EailWidget
 *
 * @returns Eina_List filled with Evas_Object* objects contained in Panel widget
 */
static Eina_List*
eail_panel_children_get(EailWidget *widget)
{
   Evas_Object *obj, *child;
   Eina_List *list;

   g_return_val_if_fail(EAIL_IS_PANEL(widget), NULL);

   obj = eail_widget_get_widget(widget);
   if (obj == NULL) return NULL;
   child = elm_object_part_content_get(obj, "default");
   if (child == NULL) return NULL;

   list = NULL;
   list = eina_list_append(list, child);

   return list;
}
Пример #15
0
/**
 * @brief Implementation AtkObject->ref_child callback
 *
 * ATK doc says:\n
 * Gets a reference to the specified accessible child of the object. The
 * accessible children are 0-based so the first accessible child is at index 0,
 * the second at index 1 and so on.
 *
 * @param obj an AtkObject
 * @param i child index
 *
 * @returns an AtkObject representing the specified accessible child of the
 * accessible.
 */
static AtkObject *
eail_dayselector_ref_child(AtkObject *obj, gint i)
{
   AtkObject *child = NULL;
   Eina_Strbuf *part_name = NULL;
   Evas_Object *ds_widget = NULL, *day_check = NULL;

   g_return_val_if_fail (EAIL_IS_WIDGET(obj), NULL);

   ds_widget = eail_widget_get_widget(EAIL_WIDGET(obj) );
   part_name = _eail_dayselector_gen_day_str(i);
   day_check = elm_object_part_content_get
                  (ds_widget, eina_strbuf_string_get(part_name));

   /* dayselector consists of objects with type CHECK-widget */
   child = _eail_create_dayselector_child(day_check);

   eina_strbuf_free(part_name);
   return child;
}
Пример #16
0
static void
_signal_cb(void *data, Evas_Object *o, const char *emission, const char *source)
{
   struct _App *app = data;
   Evas_Object *icon = elm_object_part_content_get(o, "elm.swallow.content");

   printf("signal received\n");

   if (!strcmp("elm,action,back", emission))
     app->current--;
   else if (!strcmp("elm,action,next", emission))
     app->current++;

   if (app->current < 0)
     app->current = sizeof(images) - 1;
   else if (images[app->current] == NULL)
     app->current = 0;

   elm_icon_standard_set(icon, images[app->current]);
}
Пример #17
0
/**
 * @brief Helper function to getting nested button content in "elm_popup" widget
 *
 * @param obj an AtkObject
 * @param index index of button in popup widget
 *
 * @returns nested button widget from "elm_popup" widget or NULL if failed
 */
static Evas_Object *
_eail_get_nested_popup_button(AtkObject *obj, gint index)
{
    gchar buf[EAIL_POPUP_CHAR_BUF_SIZE];
    Evas_Object *ret_button = NULL, *popup_widget = NULL;

    if (index >= EAIL_POPUP_NUM_BUTTONS)
    {
        ERR("Index of popup button cannot be >= %d", EAIL_POPUP_NUM_BUTTONS);
        return NULL;
    }

    popup_widget = _eail_get_popup_widget_from_atkobj(obj);
    if (!popup_widget) return NULL;

    snprintf(buf, sizeof(buf), EAIL_POPUP_BUTTON_FORMAT, (index + 1));
    ret_button = elm_object_part_content_get(popup_widget, buf);

    return ret_button;
}
Evas_Object *common_utils_entry_layout_get_entry(Evas_Object *layout)
{
	return elm_object_part_content_get(layout, "elm.swallow.content");
}
char *common_utils_entry_layout_get_text(Evas_Object *layout)
{
	Evas_Object *entry = elm_object_part_content_get(layout, "elm.swallow.content");
	return elm_entry_markup_to_utf8(elm_entry_entry_get(entry));
}
void common_utils_entry_password_set(Evas_Object *layout, Eina_Bool pswd_set)
{
	Evas_Object *entry = elm_object_part_content_get(layout, "elm.swallow.content");
	elm_entry_password_set(entry, pswd_set);
}
Пример #21
0
EINA_DEPRECATED EAPI Evas_Object *
elm_scrolled_entry_end_get(const Evas_Object *obj)
{return elm_object_part_content_get(obj, "end");}