Example #1
0
void _connect_button_click_cb(void *data, Evas_Object *connect_button, void *ev) {
   int check = -1;
   //int autoCheck =0;
   char ip_final[16] = { 0, };

   ipEntry_1 = elm_entry_entry_get(ipEntry1);
   ipEntry_2 = elm_entry_entry_get(ipEntry2);
   ipEntry_3 = elm_entry_entry_get(ipEntry3);
   ipEntry_4 = elm_entry_entry_get(ipEntry4);

   strcpy(ip_final, ipEntry_1);
   strcat(ip_final, ".");
   strcat(ip_final, ipEntry_2);
   strcat(ip_final, ".");
   strcat(ip_final, ipEntry_3);
   strcat(ip_final, ".");
   strcat(ip_final, ipEntry_4);

   port_final = elm_entry_entry_get(portEntry);

   //dlog_print(DLOG_DEBUG, "IP", ip_final);
   //dlog_print(DLOG_DEBUG, "PORT", port_final);

   check = inputIP(&ip_final);
   initiate();

   if(check == 2){
      elm_object_text_set(connect_button, "Connected");
   }

   remote_control_cb(1);

}
Example #2
0
void utils_edit_area_image_add(void *data, Evas_Object *obj, void *event_info)
{
    if(eyelight_edit_name_get(_current_obj) != EYELIGHT_NAME_CUSTOM_AREA
            && eyelight_edit_name_get(_current_obj) != EYELIGHT_NAME_THEME_AREA)
        return ;

    Evas_Object *inwin, *fs, *fr;

    setlocale(LC_ALL, "");

    inwin = elm_win_inwin_add(win);
    evas_object_show(inwin);

    fr = elm_frame_add(inwin);
    elm_win_inwin_content_set(inwin, fr);
    elm_object_text_set(fr, D_("Select an image"));

    fs = elm_fileselector_add(win);
    elm_fileselector_expandable_set(fs, EINA_FALSE);
    elm_fileselector_path_set(fs, getenv("HOME"));
    evas_object_size_hint_weight_set(fs, 1.0, 1.0);
    elm_object_content_set(fr, fs);
    evas_object_show(fs);
    evas_object_smart_callback_add(fs, "done", _utils_edit_area_image_add_cb, inwin);
}
Example #3
0
/**
* send
* This function is  used to create button
* @param           parent       pointer to Evas object, as the  parent
* @param           label        string for  title
* @param           icon_path    string for  icon path
* @param           cb           as cb when get signle "clicked"
* @param           cb_data      as cb'data
* @param           style        as style
* @return          when success, return a pointer to evas object, or return NULL
* @exception
*/
Evas_Object *widget_create_button(Evas_Object * parent, char *style,
				  const char *label, const char *icon_path,
				  EO_SMART_CB cb, void *cb_data)
{
	Evas_Object *ret = NULL;
	Evas_Object *icon = NULL;
	int nErr = SUCCESS;
	CLK_FUN_BEG();
	ret = elm_button_add(parent);
	CLK_RETVM_IF(!ret, NULL, "elm_button_add error!");
	elm_object_style_set(ret, style);
	evas_object_size_hint_weight_set(ret, EVAS_HINT_EXPAND,
					 EVAS_HINT_EXPAND);
	evas_object_size_hint_align_set(ret, EVAS_HINT_FILL, 0.5);
	if (icon_path) {
		icon = widget_create_icon(parent, icon_path);
	}
	if (label) {
		elm_object_text_set(ret, label);
	}
	if (icon) {
		elm_object_part_content_set(ret, "icon", icon);
	}
	if (cb && cb_data) {
		evas_object_smart_callback_add(ret, "clicked", cb, cb_data);
	}
	evas_object_show(ret);
 End:
	CLK_FUN_END();
	return ret;
}
static void
btn_extension_click_cb(void *data, Evas_Object *btn, void *ev)
{
   const char *lbl = elm_object_text_get(btn);

   if (!strncmp(lbl, "Load", 4))
     {
        elm_theme_extension_add(NULL, "./theme_example.edj");
        elm_object_text_set(btn, "Unload extension");
     }
   else if (!strncmp(lbl, "Unload", 6))
     {
        elm_theme_extension_del(NULL, "./theme_example.edj");
        elm_object_text_set(btn, "Load extension");
     }
}
Example #5
0
EAPI_MAIN int
elm_main(int argc, char **argv) {
	Evas_Object *win = NULL;
	Evas_Object *dayselector = NULL;

	win = elm_win_add(NULL, "dayselector sample", ELM_WIN_BASIC);
	elm_win_title_set(win, "dayselector sample");
	elm_win_autodel_set(win, EINA_TRUE);
	elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

	dayselector = elm_dayselector_add(win);
	elm_object_text_set(dayselector, "DaySelector!");

	request_init();

	evas_object_smart_callback_add(win, "focus,in", _register_cb, dayselector);

	register_request_listener(EVENT_RESIZE, resize, dayselector);
	register_request_listener(EVENT_SET_DISABLED, set_disabled, dayselector);
	register_request_listener(EVENT_SET_ENABLED, set_enabled, dayselector);
	register_request_listener(EVENT_HIDE, hide, dayselector);
	register_request_listener(EVENT_SHOW, show, dayselector);

	evas_object_resize(win, 380, 80);
	evas_object_resize(dayselector, 120, 40);
	evas_object_move(dayselector, 30, 15);

	evas_object_show(win);
	evas_object_show(dayselector);

	elm_run();
	request_shutdown();
	elm_shutdown();
	return 0;
}
END_TEST

START_TEST (elm_entry_atspi_text_string_get_line)
{
   Evas_Object *win, *entry;
   char *val;
   int start, end;

   const char *txt = "Lorem ipśum<br>   dolor sit amęt";

   elm_init(1, NULL);
   win = elm_win_add(NULL, "entry", ELM_WIN_BASIC);

   entry = elm_entry_add(win);
   evas_object_resize(entry, 500, 500);

   elm_object_text_set(entry, txt);

   start = 1;
   eo_do(entry, val = elm_interface_atspi_text_string_get(ELM_ATSPI_TEXT_GRANULARITY_LINE, &start, &end));

   ck_assert_str_eq(val, "Lorem ipśum");
   ck_assert(start == 0);
   ck_assert(end == 11);
   if (val) free(val);

   start = 13;
   eo_do(entry, val = elm_interface_atspi_text_string_get(ELM_ATSPI_TEXT_GRANULARITY_LINE, &start, &end));
   ck_assert_str_eq(val, "   dolor sit amęt");
   ck_assert(start == 12);
   ck_assert(end == 29);
   if (val) free(val);

   elm_shutdown();
}
static void
_profile_changed_signal_cb(void *userdata, const char *profile)
{
	/*FIXME: I should probably free this profile, but how?, CHECK DBUS*/
	(void) userdata;
	elm_object_text_set(view.profiles_combo, profile);
}
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;
}
Example #9
0
static void
create_base_gui(appdata_s *ad)
{
	/* Window */
	ad->win = elm_win_util_standard_add(PACKAGE, PACKAGE);
	elm_win_autodel_set(ad->win, EINA_TRUE);

	if (elm_win_wm_rotation_supported_get(ad->win)) {
		int rots[4] = { 0, 90, 180, 270 };
		elm_win_wm_rotation_available_rotations_set(ad->win, (const int *)(&rots), 4);
	}

	evas_object_smart_callback_add(ad->win, "delete,request", win_delete_request_cb, NULL);
	eext_object_event_callback_add(ad->win, EEXT_CALLBACK_BACK, win_back_cb, ad);

	/* Conformant */
	ad->conform = elm_conformant_add(ad->win);
	elm_win_indicator_mode_set(ad->win, ELM_WIN_INDICATOR_SHOW);
	elm_win_indicator_opacity_set(ad->win, ELM_WIN_INDICATOR_OPAQUE);
	evas_object_size_hint_weight_set(ad->conform, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
	elm_win_resize_object_add(ad->win, ad->conform);
	evas_object_show(ad->conform);

	/* Label */
	ad->label = elm_label_add(ad->conform);
	elm_object_text_set(ad->label, "<align=center>Hello EFL</align>");
	evas_object_size_hint_weight_set(ad->label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
	elm_object_content_set(ad->conform, ad->label);

	/* Show window after base gui is set up */
	evas_object_show(ad->win);
}
Example #10
0
void
enna_browser_bar_file_set(Evas_Object *obj, Enna_File *file)
{
   Evas_Object *o_entry = evas_object_data_get(obj, "entry");

   elm_object_text_set(o_entry, file->mrl);
}
Example #11
0
static void
_init_label(Evas_Object *win)
{
   Evas_Object *bg, *label;

   bg = elm_bg_add(win);
   evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   elm_win_resize_object_add(win, bg);
   evas_object_show(bg);

   label = elm_label_add(win);
   elm_object_text_set(label, "Lorem ipsum dolor sit amet, consectetur adipisicing elit,"
                       "sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
                       "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris"
                       "nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in"
                       "reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla"
                       "pariatur. Excepteur sint occaecat cupidatat non proident, sunt"
                       "in culpa qui officia deserunt mollit anim id est laborum.");
   elm_label_line_wrap_set(label, ELM_WRAP_WORD);
   evas_object_resize(label, 200, 170);
   evas_object_move(label, 0, 0);
   evas_object_show(label);

   evas_object_resize(win, 200, 320);
}
void
contact_list_add(struct ContactListData *list_data)
{
	Evas_Object *win;
	win = ui_utils_view_window_get(list_data->view);
	list_data->index = NULL;
	list_data->list = elm_genlist_add(win);
	elm_genlist_mode_set(list_data->list, ELM_LIST_LIMIT);
	elm_genlist_longpress_timeout_set(list_data->list, 0.5);
	//elm_genlist_multi_select_set(list_data->list, EINA_TRUE);
	evas_object_size_hint_align_set(list_data->list, 0.0, 0.0);
	elm_object_scale_set(list_data->list, 1.0);
	itc.item_style = "contact";
	itc.func.text_get = gl_text_get;
	itc.func.content_get = gl_content_get;
	itc.func.state_get = NULL;
	itc.func.del = gl_del;
	evas_object_show(list_data->list);
	if (list_data->layout) {
		elm_object_part_content_set(list_data->layout, "contacts_list",
				list_data->list);
	}
	list_data->progress = elm_progressbar_add(win);
	elm_object_style_set(list_data->progress, "wheel");
	elm_object_text_set(list_data->progress, D_("Loading..."));
	evas_object_size_hint_align_set(list_data->progress, EVAS_HINT_FILL, 0.5);
	evas_object_size_hint_weight_set(list_data->progress, EVAS_HINT_EXPAND,
	                                 EVAS_HINT_EXPAND);
	elm_object_part_content_set(list_data->layout, "loading_indicator", list_data->progress);
	evas_object_show(list_data->progress);
}
static Evas_Object *_gl_hidden_btn_content_get(void *data, Evas_Object *obj, const char *part)
{
	Evas_Object *find_hidden_ap_btn = elm_button_add(obj);
	elm_object_text_set(find_hidden_ap_btn, sc(PACKAGE, I18N_TYPE_Find_Hidden_Network));

	return find_hidden_ap_btn;
}
Example #14
0
EAPI_MAIN int
elm_main(int argc, char **argv)
{
   Evas_Object *win, *bg, *bx, *tb, *bt, *menu;
   Elm_Object_Item *tb_it;

   win = elm_win_add(NULL, "toolbar", ELM_WIN_BASIC);
   elm_win_title_set(win, "Toolbar Example");
   evas_object_smart_callback_add(win, "delete,request", _on_done, NULL);

   bg = elm_bg_add(win);
   elm_win_resize_object_add(win, bg);
   evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_show(bg);

   bx = elm_box_add(win);
   elm_win_resize_object_add(win, bx);
   evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL);
   evas_object_show(bx);

   bt = elm_button_add(win);
   evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
   elm_object_text_set(bt, "Button");
   evas_object_show(bt);

   tb = elm_toolbar_add(win);
   evas_object_size_hint_weight_set(tb, 0.0, 0.0);
   evas_object_size_hint_align_set(tb, EVAS_HINT_FILL, 0.0);
   evas_object_show(tb);

   elm_toolbar_item_append(tb, "document-print", "Print", NULL, NULL);
   elm_toolbar_item_append(tb, "folder-new", "Folder", NULL, NULL);
   elm_toolbar_item_append(tb, "clock", "Clock", NULL, NULL);
   elm_toolbar_item_append(tb, "refresh", "Update", NULL, NULL);

   elm_toolbar_menu_parent_set(tb, win);

   tb_it = elm_toolbar_item_append(tb, "mail-send", "Send Mail", NULL, NULL);
   elm_toolbar_item_menu_set(tb_it, EINA_TRUE);

   menu = elm_toolbar_item_menu_get(tb_it);
   elm_menu_item_add(menu, NULL, "emptytrash", "Empty Trash", NULL, NULL);
   elm_menu_item_add(menu, NULL, "trashcan_full", "Full Trash", NULL, NULL);

   elm_toolbar_item_priority_set(tb_it, 10);

   elm_box_pack_end(bx, tb);
   elm_box_pack_end(bx, bt);

   evas_object_resize(win, 230, 200);
   evas_object_show(win);

   elm_run();
   elm_shutdown();

   return 0;
}
Example #15
0
EAPI_MAIN int
elm_main(int argc, char **argv) {
	Evas_Object *map = NULL;
	Evas_Object *bg = NULL;
	Evas_Object *icon = NULL;
	Elm_Map_Overlay *item =  NULL;

	win = elm_win_add(NULL, "Main Window", ELM_WIN_BASIC);
	elm_win_title_set(win, "Hello, My World Map!");
	elm_win_autodel_set(win, EINA_TRUE);
	elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

	bg = elm_bg_add(win);
	evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
	elm_win_resize_object_add(win, bg);
	evas_object_show(bg);

	map = elm_map_add(win);
	evas_object_size_hint_weight_set(map, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
	elm_win_resize_object_add(win, map);
	evas_object_show(map);

	icon = elm_icon_add(win);
	elm_object_text_set(icon, "Icon1");
	elm_icon_standard_set(icon, "home");

	item = elm_map_overlay_add(map,21.009865, 52.224855);
	elm_map_overlay_icon_set(item, icon);

	evas_object_smart_callback_add(win, "focus,in", _register_cb, map);

	register_request_listener(EVENT_SET_FOCUS, set_focus, map);
	register_request_listener(EVENT_UNSET_FOCUS, unset_focus, map);
	register_request_listener(EVENT_SET_FOCUSABLE, set_focusable, map);
	register_request_listener(EVENT_UNSET_FOCUSABLE, unset_focusable, map);
	register_request_listener(EVENT_ADD_CHILDREN, add_children,map);
	register_request_listener(EVENT_RM_CHILDREN, rm_children,item);
	register_request_listener(EVENT_HIDE, hide, map);
	register_request_listener(EVENT_SHOW, show, map);

	register_request_listener(ACTION_ZOOM_IN, register_action_zoom_in, map);
	register_request_listener(ACTION_ZOOM_OUT, register_action_zoom_out, map);
	register_request_listener(ACTION_SCROLL_LEFT, register_action_scroll_left, map);
	register_request_listener(ACTION_SCROLL_RIGHT, register_action_scroll_right, map);
	register_request_listener(ACTION_SCROLL_UP, register_action_scroll_up, map);
	register_request_listener(ACTION_SCROLL_DOWN, register_action_scroll_down, map);
	register_request_listener(ACTION_CLICK, register_action_click, map);
	register_request_listener(ACTION_PRESS, register_action_press, map);

	elm_map_zoom_set(map, 2);

	evas_object_resize(win, 800, 800);
	evas_object_show(win);

	elm_run();
	request_shutdown();
	elm_shutdown();
	return 0;
}
Example #16
0
static void
_init_panes(Evas_Object *win)
{
   Evas_Object *bg, *panes, *panes_h, *bt;

   bg = elm_bg_add(win);
   elm_win_resize_object_add(win, bg);
   evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   elm_win_focus_highlight_enabled_set(win, EINA_TRUE);
   evas_object_show(bg);

   panes = elm_panes_add(win);
   elm_win_resize_object_add(win, panes);
   evas_object_size_hint_weight_set(panes, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(panes, EVAS_HINT_FILL, EVAS_HINT_FILL);
   evas_object_show(panes);

   bt = elm_button_add(win);
   elm_object_text_set(bt, "Left");
   evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
   evas_object_show(bt);
   elm_object_part_content_set(panes, "left", bt);

   panes_h = elm_panes_add(win);
   elm_panes_horizontal_set(panes_h, EINA_TRUE);
   evas_object_size_hint_weight_set(panes_h, EVAS_HINT_EXPAND,
                                    EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(panes_h, EVAS_HINT_FILL, EVAS_HINT_FILL);
   evas_object_show(panes_h);
   elm_object_part_content_set(panes, "right", panes_h);

   bt = elm_button_add(win);
   elm_object_text_set(bt, "Up");
   evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
   evas_object_show(bt);
   elm_object_part_content_set(panes_h, "left", bt);

   bt = elm_button_add(win);
   elm_object_text_set(bt, "Down");
   evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
   evas_object_show(bt);
   elm_object_part_content_set(panes_h, "right", bt);
}
Example #17
0
int
elm_main(int argc, char **argv)
{
	Evas_Object *win, *box, *lab, *btn;

	// new window - do the usual and give it a name (hello) and title (Hello)
	win = elm_win_util_standard_add("hello", "Hello");
	// when the user clicks "close" on a window there is a request to delete
	evas_object_smart_callback_add(win, "delete,request", on_done, NULL);

	// add a box object - default is vertical. a box holds children in a row,
	// either horizontally or vertically. nothing more.
	box = elm_box_add(win);
	// make the box horizontal
	elm_box_horizontal_set(box, EINA_TRUE);
	// add object as a resize object for the window (controls window minimum
	// size as well as gets resized if window is resized)
	elm_win_resize_object_add(win, box);
	evas_object_show(box);

	// add a label widget, set the text and put it in the pad frame
	lab = elm_label_add(win);
	// set default text of the label
	elm_object_text_set(lab, "Hello out there world!");
	// pack the label at the end of the box
	elm_box_pack_end(box, lab);
	evas_object_show(lab);

	// add an ok button
	btn = elm_button_add(win);
	// set default text of button to "OK"
	elm_object_text_set(btn, "OK");
	// pack the button at the end of the box
	elm_box_pack_end(box, btn);
	evas_object_show(btn);
	// call on_done when button is clicked
	evas_object_smart_callback_add(btn, "clicked", on_done, NULL);

	// now we are done, show the window
	evas_object_show(win);

	// run the mainloop and process events and callbacks
	elm_run();
	elm_shutdown();
	return 0;
}
Example #18
0
static void
set_api_state(api_data *api)
{
   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");
         elm_object_part_content_unset(eina_list_nth(items, 5), "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;
     }
}
EAPI_MAIN int
elm_main(int argc, char **argv)
{
   Evas_Object *win, *bubble, *label, *icon;

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

   win = elm_win_util_standard_add("bubble", "Bubble");
   elm_win_autodel_set(win, EINA_TRUE);

   label = elm_label_add(win);
   elm_object_text_set(label, "This is the CONTENT of our bubble");
   evas_object_show(label);

   icon = evas_object_rectangle_add(evas_object_evas_get(win));
   evas_object_color_set(icon, 0, 0, 255, 255);
   evas_object_show(icon);

   bubble = elm_bubble_add(win);
   elm_object_part_content_set(bubble, "icon", icon);
   elm_object_part_text_set(bubble, "info", "INFO");
   elm_object_text_set(bubble, "LABEL");
   elm_object_content_set(bubble, label);
   evas_object_resize(bubble, 300, 100);
   evas_object_show(bubble);

   evas_object_smart_callback_add(bubble, "clicked", _bla, NULL);

   label = elm_label_add(win);
   elm_object_text_set(label, "Bubble with no icon, info or label");
   evas_object_show(label);

   bubble = elm_bubble_add(win);
   elm_object_content_set(bubble, label);
   evas_object_resize(bubble, 200, 50);
   evas_object_move(bubble, 0, 110);
   evas_object_show(bubble);

   evas_object_resize(win, 300, 200);
   evas_object_show(win);

   elm_run();

   return 0;
}
Example #20
0
static void
_set_list_title (
        Evas_Object *obj,
        Elm_Object_Item *item)
{
    if (item && obj) {
        elm_object_text_set(obj, elm_object_item_text_get(item));
    }
}
Example #21
0
void
upload_start(Upload *ul, Enlil_Photo *photo)
{
   evas_object_show(ul->main);

   elm_object_text_set(ul->pb, enlil_photo_name_get(photo));
   elm_progressbar_pulse_set(ul->pb, 1);
   elm_progressbar_pulse(ul->pb, 1);
}
static void
_swallow_btn_cb(void *data, Evas_Object *btn, void *event_info)
{
   Evas_Object *layout = data;

   if (_btn_large == EINA_FALSE)
     {
	_btn_large = EINA_TRUE;
	elm_object_signal_emit(layout, "button,enlarge", "");
	elm_object_text_set(btn, "Reduce me!");
     }
   else
     {
	_btn_large = EINA_FALSE;
	elm_object_signal_emit(layout, "button,reduce", "");
	elm_object_text_set(btn, "Enlarge me!");
     }
}
Example #23
0
static void
_set_loggedin_username ()
{
    GVariant *vusername = _get_property ("Name");
    if (vusername && main_window->user_label) {
        elm_object_text_set(main_window->user_label,
                g_variant_get_string (vusername, NULL));
    }
    if (vusername) g_variant_unref (vusername);
}
Example #24
0
void add_children(void *data) {
	Evas_Object *map = (Evas_Object*) data;
	Evas_Object *icon = NULL;
	Elm_Map_Overlay *item =  NULL;
	icon = elm_icon_add(win);
	elm_object_text_set(icon, "Icon2");
	elm_icon_standard_set(icon, "home");
	item = elm_map_overlay_add(map,-53.276369,-9.968851);
	elm_map_overlay_icon_set(item, icon);
}
Example #25
0
static Evas_Object *
_add_user_list (
        Evas_Object *win)
{
    Evas_Object *box = NULL, *main_box, *label, *users_list, *cb;
    box = elm_box_add (win);
    evas_object_size_hint_weight_set (box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_show (box);
    elm_win_resize_object_add (win, box);
    evas_object_size_hint_align_set (box, 0.1, 0.1);

    label = elm_label_add(win);
    elm_object_text_set(label, "Switch User");
    elm_box_pack_end (box, label);
    evas_object_show(label);

    users_list = elm_hoversel_add(win);
    elm_hoversel_horizontal_set(users_list, EINA_FALSE);
    elm_object_text_set(users_list, "Select User From the List");

    _populate_users (users_list);

    evas_object_smart_callback_add(users_list, "selected",
            _on_switch_user_clicked, NULL);
    elm_box_pack_end (box, users_list);

    evas_object_show(users_list);

    main_box = elm_box_add (win);
    evas_object_size_hint_weight_set (main_box, EVAS_HINT_EXPAND,
            EVAS_HINT_EXPAND);
    evas_object_show (main_box);
    elm_box_horizontal_set (main_box, EINA_TRUE);
    elm_win_resize_object_add (win, main_box);

    elm_box_pack_end (main_box, box);

    cb = _add_checkbox (win);
    elm_box_pack_end (main_box, cb);

    return box;
}
static Evas_Object *
gl_content_get(void *data, Evas_Object * obj, const char *part)
{
	(void) data;
	if (!strcmp(part,"elm.swallow.end")) {
		Evas_Object *btn = elm_button_add(obj);
		elm_object_text_set(btn, "Action");
		return (btn);
	}
	return (NULL);
}
static void
_checkbox_transition_add(Evas_Object *box, const char *label, Eina_Bool *checked)
{
   Evas_Object *check = elm_check_add(elm_object_parent_widget_get(box));
   evas_object_size_hint_weight_set(check, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(check, 0.0, 0.0);
   elm_object_text_set(check, label);
   elm_check_state_pointer_set(check, checked);
   elm_box_pack_end(box, check);
   evas_object_show(check);
}
Example #28
0
static void
create_datetime_popup(datetimedata_s *dd)
{
	Evas_Object *set_btn, *cancel_btn;

	dd->popup = elm_popup_add(dd->nf);
	eext_object_event_callback_add(dd->popup, EEXT_CALLBACK_BACK, eext_popup_back_cb, NULL);
	evas_object_size_hint_weight_set(dd->popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
	elm_popup_align_set(dd->popup, ELM_NOTIFY_ALIGN_FILL, 0.5);

	cancel_btn = elm_button_add(dd->popup);
	elm_object_text_set(cancel_btn, "Cancel");
	elm_object_part_content_set(dd->popup, "button1", cancel_btn);
	evas_object_smart_callback_add(cancel_btn, "clicked", popup_cancel_btn_clicked_cb, dd);

	set_btn = elm_button_add(dd->popup);
	elm_object_text_set(set_btn, "Set");
	elm_object_part_content_set(dd->popup, "button2", set_btn);
	evas_object_smart_callback_add(set_btn, "clicked", popup_set_btn_clicked_cb, dd);
}
Example #29
0
SH_API Evas_Object *
create_label(Evas_Object *parent, const char *text)
{
  Evas_Object *label;

  label = elm_label_add(parent);

  elm_object_text_set(label, text);

  return label;
}
Evas_Object *common_utils_show_info_timeout_popup(Evas_Object *win, const char* info_text, const double timeout)
{
	Evas_Object *popup = elm_popup_add(win);
	elm_object_text_set(popup, info_text);
	elm_popup_timeout_set(popup, timeout);
	evas_object_smart_callback_add(popup, "timeout", (Evas_Smart_Cb)evas_object_del, popup);
	evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
	elm_popup_orient_set(popup, ELM_POPUP_ORIENT_CENTER);
	evas_object_show(popup);
	return popup;
}