本文整理汇总了C++中elm_bg_add函数的典型用法代码示例。如果您正苦于以下问题:C++ elm_bg_add函数的具体用法?C++ elm_bg_add怎么用?C++ elm_bg_add使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了elm_bg_add函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: _init_check
static void
_init_check(Evas_Object *win)
{
Evas_Object *bg, *cb1, *cb2, *icon;
Eina_Bool value1, value2;
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);
cb1 = elm_check_add(win);
elm_object_text_set(cb1, CHECK_TEXT1);
elm_check_state_pointer_set(cb1, &value1);
elm_check_state_set(cb1, EINA_TRUE);
evas_object_smart_callback_add(cb1, "changed", _print, &value1);
evas_object_move(cb1, 10, 10);
evas_object_resize(cb1, 200, 30);
evas_object_show(cb1);
icon = elm_icon_add(win);
elm_icon_order_lookup_set(icon, ELM_ICON_LOOKUP_THEME_FDO);
elm_icon_standard_set(icon, "home");
evas_object_show(icon);
cb2 = elm_check_add(win);
elm_object_text_set(cb2, CHECK_TEXT2);
elm_check_state_pointer_set(cb2, &value2);
elm_check_state_set(cb2, EINA_FALSE);
elm_object_part_content_set(cb2, "icon", icon);
evas_object_smart_callback_add(cb2, "changed", _print, &value2);
evas_object_move(cb2, 10, 50);
evas_object_resize(cb2, 200, 30);
evas_object_show(cb2);
}
开发者ID:radoslawjablonski,项目名称:eail,代码行数:35,代码来源:eail_check_test.c
示例2: elm_main
int
elm_main(int argc, char **argv)
{
Evas_Object *bg, *win, *pg = NULL;
static Pginfo info;
Evas_Coord w = 316, h = 520;
Measurements_Lists *ml = malloc(sizeof(Measurements_Lists));
win = elm_win_add(NULL, "converters-list", ELM_WIN_BASIC);
evas_object_resize(win, w, h);
elm_win_title_set(win, "Converters");
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_smart_callback_add(win, "delete,request",
_win_delete_request, NULL);
evas_object_show(bg);
create_pager(win, pg, &info, ml);
evas_object_show(win);
elm_run();
elm_shutdown();
free(ml);
return 0;
}
开发者ID:Limsik,项目名称:e17,代码行数:29,代码来源:main.c
示例3: elm_main
EAPI_MAIN int
elm_main(int argc, char **argv) {
Evas_Object *win = NULL;
Evas_Object *bg = NULL;
win = elm_win_add(NULL, "Background sample", ELM_WIN_BASIC);
elm_win_autodel_set(win, EINA_TRUE);
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
bg = elm_bg_add(win);
elm_bg_option_set(bg, ELM_BG_OPTION_CENTER);
elm_bg_color_set(bg, 255, 0, 255);
evas_object_show(bg);
evas_object_smart_callback_add(win, "focus,in", _register_cb, bg);
register_request_listener(EVENT_HIDE, hide, bg);
register_request_listener(EVENT_SHOW, show, bg);
elm_win_resize_object_add(win, bg);
evas_object_resize(win, 240, 200);
evas_object_show(win);
elm_run();
elm_shutdown();
return 0;
}
开发者ID:loleksak,项目名称:eail-its,代码行数:28,代码来源:background.c
示例4: elm_main
EAPI_MAIN int
elm_main(int argc,
char **argv)
{
Evas_Object *win, *bg;
Elm_Object_Item *it;
const char *data_dir;
elm_app_info_set(elm_main, "elementary", "images");
data_dir = "./data";
snprintf(img1, sizeof(img1), "%s/01.jpg", data_dir);
snprintf(img2, sizeof(img2), "%s/02.jpg", data_dir);
snprintf(img3, sizeof(img3), "%s/03.jpg", data_dir);
snprintf(img4, sizeof(img4), "%s/04.jpg", data_dir);
snprintf(img5, sizeof(img5), "%s/05.jpg", data_dir);
snprintf(img6, sizeof(img6), "%s/06.jpg", data_dir);
snprintf(img7, sizeof(img7), "%s/07.jpg", data_dir);
snprintf(img8, sizeof(img8), "%s/08.jpg", data_dir);
snprintf(img9, sizeof(img9), "%s/09.jpg", data_dir);
win = eailu_create_test_window_with_glib_init(NULL, _on_focus_in);
evas_object_resize(win, 600, 400);
evas_object_show(win);
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);
slideshow = elm_slideshow_add(win);
elm_slideshow_loop_set(slideshow, EINA_TRUE);
elm_slideshow_cache_before_set(slideshow, 8);
elm_slideshow_cache_after_set(slideshow, 8);
evas_object_size_hint_weight_set(slideshow,
EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, slideshow);
evas_object_show(slideshow);
itc.func.get = _get;
itc.func.del = NULL;
elm_slideshow_item_sorted_insert(slideshow, &itc, img1, _cmp_func);
elm_slideshow_item_sorted_insert(slideshow, &itc, img2, _cmp_func);
elm_slideshow_item_sorted_insert(slideshow, &itc, img3, _cmp_func);
elm_slideshow_item_sorted_insert(slideshow, &itc, img4, _cmp_func);
elm_slideshow_item_sorted_insert(slideshow, &itc, img5, _cmp_func);
elm_slideshow_item_sorted_insert(slideshow, &itc, img6, _cmp_func);
elm_slideshow_item_sorted_insert(slideshow, &itc, img7, _cmp_func);
elm_slideshow_item_sorted_insert(slideshow, &itc, img8, _cmp_func);
elm_slideshow_item_sorted_insert(slideshow, &itc, img9, _cmp_func);
/*show last item, otherwise tests fail*/
it = elm_slideshow_item_nth_get(slideshow, 8);
elm_slideshow_item_show(it);
elm_run();
elm_shutdown();
return 0;
}
开发者ID:radoslawjablonski,项目名称:eail,代码行数:60,代码来源:eail_slideshow_test.c
示例5: _init_bubble
static void
_init_bubble(Evas_Object *win)
{
Evas_Object *bg, *label, *icon, *bubble;
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, "This is the CONTENT of our bubble");
evas_object_show(label);
icon = elm_icon_add(win);
elm_icon_order_lookup_set(icon, ELM_ICON_LOOKUP_THEME_FDO);
elm_icon_standard_set(icon, "home");
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_smart_callback_add(bubble, "clicked", _bubble_clicked, NULL);
evas_object_resize(bubble, 300, 100);
evas_object_show(bubble);
}
开发者ID:radoslawjablonski,项目名称:eail,代码行数:28,代码来源:eail_bubble_test.c
示例6: elm_main
EAPI int
elm_main(int argc, char **argv)
{
Evas_Object *bg, *conform, *btn;
win = elm_win_add(NULL, "elm_illume", ELM_WIN_BASIC);
elm_win_title_set(win, "Illume Conformant Window");
elm_win_conformant_set(win, 1);
evas_object_smart_callback_add(win, "delete,request", _cb_win_del, NULL);
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);
conform = elm_conformant_add(win);
elm_win_resize_object_add(win, conform);
evas_object_size_hint_weight_set(conform, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_show(conform);
btn = elm_button_add(win);
elm_button_label_set(btn, "Click to Close");
evas_object_smart_callback_add(btn, "clicked", _cb_btn_close_clicked, NULL);
evas_object_show(btn);
elm_conformant_content_set(conform, btn);
evas_object_resize(win, 200, 200);
evas_object_show(win);
elm_run();
elm_shutdown();
return 0;
}
开发者ID:gzorin,项目名称:e17,代码行数:35,代码来源:main.c
示例7: _init_label
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);
}
开发者ID:radoslawjablonski,项目名称:eail,代码行数:25,代码来源:eail_label_test.c
示例8: elm_main
EAPI_MAIN int
elm_main(int argc, char **argv)
{
Evas_Object *win, *bg, *cal;
win = elm_win_add(NULL, "calendar", ELM_WIN_BASIC);
elm_win_title_set(win, "Calendar Creation Example");
elm_win_autodel_set(win, EINA_TRUE);
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
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);
cal = elm_calendar_add(win);
elm_win_resize_object_add(win, cal);
evas_object_size_hint_weight_set(cal, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_show(cal);
evas_object_show(win);
elm_run();
elm_shutdown();
return 0;
}
开发者ID:Limsik,项目名称:e17,代码行数:27,代码来源:calendar_example_01.c
示例9: elm_main
EAPI_MAIN int
elm_main(int argc, char **argv)
{
Evas_Object *o, *bg;
win = elm_win_add(NULL, "efl-thread-3", ELM_WIN_BASIC);
elm_win_title_set(win, "EFL Thread 3");
elm_win_autodel_set(win, EINA_TRUE);
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
evas_object_resize(win, 400, 400);
evas_object_show(win);
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);
o = evas_object_rectangle_add(evas_object_evas_get(win));
evas_object_color_set(o, 50, 80, 180, 255);
evas_object_resize(o, 100, 100);
evas_object_show(o);
rect = o;
// create custom thread to do some "work on the side"
my_thread_new();
elm_run();
elm_shutdown();
return 0;
}
开发者ID:Limsik,项目名称:e17,代码行数:31,代码来源:efl_thread_win32_3.c
示例10: _init_photo
static void
_init_photo(Evas_Object *win)
{
Evas_Object *bg, *bx, *photo;
const char * const filename = "./data/th-whiterabbit01.jpg";
bg = elm_bg_add(win);
elm_bg_color_set(bg, 255, 255, 255);
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bg);
evas_object_show(bg);
bx = elm_box_add(win);
elm_box_horizontal_set(bx, EINA_TRUE);
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);
elm_box_homogeneous_set(bx, EINA_TRUE);
elm_win_resize_object_add(win, bx);
photo = elm_photo_add(win);
g_assert(elm_photo_file_set(photo, filename));
elm_photo_size_set(photo, 100);
elm_photo_aspect_fixed_set(photo, EINA_FALSE);
evas_object_smart_callback_add(photo, "clicked", _on_photo_clicked, NULL);
evas_object_size_hint_weight_set(photo, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_photo_fill_inside_set(photo, EINA_TRUE);
evas_object_size_hint_align_set(photo, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_box_pack_end(bx, photo);
evas_object_show(photo);
evas_object_show(bx);
}
开发者ID:radoslawjablonski,项目名称:eail,代码行数:32,代码来源:eail_photo_test.c
示例11: _init_video
static void
_init_video(Evas_Object *win)
{
Evas_Object *bg, *video, *emotion;
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);
video = elm_video_add(win);
evas_object_size_hint_weight_set(video, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, video);
evas_object_show(video);
elm_video_file_set(video, VIDEO_FILE);
elm_video_play(video);
emotion = elm_video_emotion_get(video);
evas_object_smart_callback_add(emotion,
"playback_started",
_playback_started,
win);
evas_object_resize(win, 800, 800);
evas_object_show(win);
}
开发者ID:mknapinski,项目名称:eail,代码行数:26,代码来源:eail_video_tc3.c
示例12: _init_prefs
static void
_init_prefs(Evas_Object *win)
{
Evas_Object *bg, *prefs;
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
elm_win_autodel_set(win, EINA_TRUE);
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);
prefs = elm_prefs_add(win);
evas_object_size_hint_weight_set(prefs, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, prefs);
evas_object_show(prefs);
elm_prefs_autosave_set(prefs, EINA_TRUE);
prefs_data = elm_prefs_data_new("./data/prefs_example_02.cfg", NULL,
EET_FILE_MODE_READ_WRITE);
elm_prefs_file_set(prefs, "./data/prefs_example_02.epb", NULL);
elm_prefs_data_set(prefs, prefs_data);
evas_object_resize(win, 320, 320);
}
开发者ID:radoslawjablonski,项目名称:eail,代码行数:25,代码来源:eail_prefs_test.c
示例13: elm_main
EAPI int
elm_main(int argc, char **argv)
{
Ecore_X_Window xwin;
Ecore_X_Window_State states[2];
Evas_Object *bg;
int w, h;
win = elm_win_add(NULL, "elm_kbd", ELM_WIN_BASIC);
elm_win_title_set(win, "Elm Keyboard");
evas_object_smart_callback_add(win, "delete,request", _cb_win_del, NULL);
elm_win_keyboard_win_set(win, EINA_TRUE);
xwin = elm_win_xwindow_get(win);
states[0] = ECORE_X_WINDOW_STATE_SKIP_TASKBAR;
states[1] = ECORE_X_WINDOW_STATE_SKIP_PAGER;
ecore_x_netwm_window_state_set(xwin, states, 2);
ecore_x_icccm_hints_set(xwin, 0, 0, 0, 0, 0, 0, 0);
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);
_load_keys(win, &w, &h);
evas_object_resize(win, w, h);
evas_object_show(win);
elm_run();
elm_shutdown();
return 0;
}
开发者ID:gzorin,项目名称:e17,代码行数:33,代码来源:main.c
示例14: elm_main
int
elm_main(int argc, char **argv)
{
Evas_Object *o, *bg;
win = elm_win_add(NULL, "efl-thread-2", ELM_WIN_BASIC);
elm_win_title_set(win, "EFL Thread 2");
evas_object_resize(win, 400, 400);
evas_object_show(win);
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);
o = evas_object_rectangle_add(evas_object_evas_get(win));
evas_object_color_set(o, 50, 80, 180, 255);
evas_object_resize(o, 100, 100);
evas_object_show(o);
rect = o;
// create custom thread to do some "work on the side"
my_thread_new();
elm_run();
return 0;
}
开发者ID:wargio,项目名称:EFL-PS3,代码行数:27,代码来源:efl_thread_2.c
示例15: elm_main
EAPI_MAIN int
elm_main(int argc, char **argv)
{
Evas_Object *o, *bg;
win = elm_win_add(NULL, "efl-thread-4", ELM_WIN_BASIC);
elm_win_title_set(win, "EFL Thread 4");
elm_win_autodel_set(win, EINA_TRUE);
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
evas_object_resize(win, 400, 400);
evas_object_show(win);
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);
o = evas_object_rectangle_add(evas_object_evas_get(win));
evas_object_color_set(o, 50, 80, 180, 255);
evas_object_resize(o, 100, 100);
evas_object_show(o);
// new in the examples - we have a mouse down on the blue box cancel
// the thread
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN, down, NULL);
rect = o;
// create custom thread to do some "work on the side"
my_thread_new();
elm_run();
elm_shutdown();
return 0;
}
开发者ID:Limsik,项目名称:e17,代码行数:34,代码来源:efl_thread_win32_4.c
示例16: _grid_content_get
/* icon fetching callback */
static Evas_Object *
_grid_content_get(void *data,
Evas_Object *obj,
const char *part)
{
const Example_Item *it = data;
if (!strcmp(part, "elm.swallow.icon"))
{
Evas_Object *icon = elm_bg_add(obj);
char buf[PATH_MAX];
snprintf(buf, sizeof(buf), "%s/images/%s", elm_app_data_dir_get(),
it->path);
elm_bg_file_set(icon, buf, NULL);
evas_object_size_hint_aspect_set(icon, EVAS_ASPECT_CONTROL_VERTICAL, 1,
1);
evas_object_show(icon);
return icon;
}
else if (!strcmp(part, "elm.swallow.end"))
{
Evas_Object *ck;
ck = elm_check_add(obj);
evas_object_propagate_events_set(ck, EINA_FALSE);
evas_object_show(ck);
return ck;
}
return NULL;
}
开发者ID:FlorentRevest,项目名称:Elementary,代码行数:33,代码来源:gengrid_example.c
示例17: elm_main
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;
}
开发者ID:loleksak,项目名称:eail-its,代码行数:59,代码来源:map.c
示例18: elm_main
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;
}
开发者ID:Limsik,项目名称:e17,代码行数:59,代码来源:toolbar_example_03.c
示例19: elm_main
EAPI_MAIN int
elm_main(int argc, char **argv)
{
Evas_Object *win, *bg;
Evas_Object *thumb;
char buf[PATH_MAX];
#ifdef ELM_ETHUMB
Ethumb_Client *client;
#endif
elm_need_ethumb();
elm_app_info_set(elm_main, "elementary", "images/plant_01.jpg");
win = elm_win_add(NULL, "thumb", ELM_WIN_BASIC);
elm_win_title_set(win, "Thumbnailer");
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
elm_win_autodel_set(win, EINA_TRUE);
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);
#ifdef ELM_ETHUMB
client = elm_thumb_ethumb_client_get();
if (!client)
{
printf("error: could not get Ethumb client.\n");
return 1;
}
ethumb_client_size_set(client, 160, 160);
#endif
thumb = elm_thumb_add(win);
evas_object_smart_callback_add(thumb, "generate,start", _generation_started_cb, NULL);
evas_object_smart_callback_add(thumb, "generate,stop", _generation_finished_cb, NULL);
evas_object_smart_callback_add(thumb, "generate,error", _generation_error_cb, NULL);
elm_thumb_editable_set(thumb, EINA_FALSE);
snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
elm_thumb_file_set(thumb, buf, NULL);
elm_thumb_reload(thumb);
evas_object_size_hint_weight_set(thumb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, thumb);
evas_object_show(thumb);
evas_object_size_hint_min_set(bg, 160, 160);
evas_object_size_hint_max_set(bg, 640, 640);
evas_object_resize(win, 320, 320);
evas_object_show(win);
elm_run(); /* and run the program now, starting to handle all
* events, etc. */
elm_shutdown(); /* clean up and shut down */
/* exit code */
return 0;
}
开发者ID:TizenChameleon,项目名称:uifw-elementary,代码行数:59,代码来源:thumb_example_01.c
示例20: elm_main
EAPI_MAIN int
elm_main(int argc, char **argv)
{
Evas_Object *win, *bg, *map, *box, *bt;
win = elm_win_add(NULL, "map", ELM_WIN_BASIC);
elm_win_title_set(win, "Map Creation 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);
map = elm_map_add(win);
elm_win_resize_object_add(win, map);
evas_object_size_hint_weight_set(map, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_show(map);
box = elm_box_add(win);
evas_object_show(box);
bt = elm_button_add(win);
elm_object_text_set(bt, "+");
elm_box_pack_end(box, bt);
evas_object_show(bt);
evas_object_smart_callback_add(bt, "clicked", _bt_zoom_in, map);
bt = elm_button_add(win);
elm_object_text_set(bt, "-");
elm_box_pack_end(box, bt);
evas_object_show(bt);
evas_object_smart_callback_add(bt, "clicked", _bt_zoom_out, map);
bt = elm_button_add(win);
elm_object_text_set(bt, "X");
elm_box_pack_end(box, bt);
evas_object_show(bt);
evas_object_smart_callback_add(bt, "clicked", _bt_zoom_fit, map);
bt = elm_button_add(win);
elm_object_text_set(bt, "#");
elm_box_pack_end(box, bt);
evas_object_show(bt);
evas_object_smart_callback_add(bt, "clicked", _bt_zoom_fill, map);
elm_map_zoom_set(map, 12);
elm_map_region_show(map, -43.2, -22.9);
evas_object_resize(win, 512, 512);
evas_object_show(win);
ecore_timer_add(0.5, _nasty_hack, win);
elm_run();
elm_shutdown();
return 0;
}
开发者ID:Limsik,项目名称:e17,代码行数:58,代码来源:map_example_01.c
注:本文中的elm_bg_add函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论