本文整理汇总了C++中elm_win_add函数的典型用法代码示例。如果您正苦于以下问题:C++ elm_win_add函数的具体用法?C++ elm_win_add怎么用?C++ elm_win_add使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了elm_win_add函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: elm_main
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;
}
示例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;
}
示例3: main
int main(int argc, char **argv)
{
Evas_Object *edje;
elm_init(argc, argv);
win = elm_win_add(NULL, "tuto", ELM_WIN_BASIC);
elm_win_title_set(win, "Edje Tutorial");
evas_object_smart_callback_add(win, "delete,request", _win_del, NULL);
layout = elm_layout_add(win);
elm_layout_file_set(layout, "tut22.edj", "interface");
evas_object_show(layout);
elm_win_resize_object_add(win, layout);
table = elm_layout_add(layout);
elm_layout_file_set(table, "tut22.edj", "table");
evas_object_show(table);
evas_object_size_hint_weight_set(layout, 1, 1);
elm_object_part_content_set(layout, "table_swallow", table);
edje = elm_layout_edje_get(table);
edje_object_signal_callback_add(edje, "*", "*", _edje_signal_cb, NULL);
evas_object_resize(win, 800, 480);
evas_object_show(win);
elm_run();
elm_shutdown();
}
示例4: elm_win_add
Evas_Object *slideshow_create()
{
_win = elm_win_add(win, "Slide show", ELM_WIN_BASIC);
elm_win_autodel_set(_win, 1);
elm_win_fullscreen_set(_win, 1);
eyelight_smart = eyelight_object_add(evas_object_evas_get(_win));
eyelight_object_presentation_file_set(eyelight_smart, eyelight_object_presentation_file_get(pres));
evas_object_show(eyelight_smart);
elm_win_resize_object_add(_win, eyelight_smart);
container= evas_object_rectangle_add(evas_object_evas_get(_win));
evas_object_color_set(container,0,0,0,0);
evas_object_event_callback_add(container,EVAS_CALLBACK_KEY_DOWN, _slide_cb, NULL);
evas_object_event_callback_add(container,EVAS_CALLBACK_MOUSE_MOVE, _mouse_event_cb, NULL);
evas_object_event_callback_add(container,EVAS_CALLBACK_MOUSE_IN, _mouse_event_cb, NULL);
evas_object_repeat_events_set(container,1);
evas_object_show(container);
elm_win_resize_object_add(_win, container);
evas_object_raise(container);
evas_object_show(_win);
return _win;
}
示例5: 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;
}
示例6: 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;
}
示例7: 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;
}
示例8: 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;
}
示例9: 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;
}
示例10: elm_main
EAPI_MAIN int
elm_main(int argc, char **argv)
{
if (!ecore_main_loop_glib_integrate())
{
printf("Cannot integrate with glib main loop");
return -1;
}
#if !GLIB_CHECK_VERSION(2,35,0)
g_type_init();
#endif
Evas_Object *win;
win = elm_win_add(NULL, WINDOW_TEST_TITLE, ELM_WIN_BASIC);
elm_win_title_set(win, WINDOW_TEST_TITLE);
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
elm_win_autodel_set(win, EINA_TRUE );
evas_object_smart_callback_add(win, "focus,in", on_focus_in, NULL);
initialize_and_show_tooltip(win);
evas_object_resize(win, 320, 320);
/* and show the window */
evas_object_show(win);
elm_run();
elm_shutdown();
/* exit code */
return 0;
}
示例11: startup
static void startup(void)
{
tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
elm_init(0, NULL);
main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
evas_object_show(main_win);
}
示例12: 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;
}
示例13: START_TEST
END_TEST
START_TEST (elm_entry_atspi_text_text_get)
{
Evas_Object *win, *entry;
char *val;
const char *txt = "Lorem Xpśum dolor sit amęt";
elm_init(1, NULL);
win = elm_win_add(NULL, "entry", ELM_WIN_BASIC);
entry = elm_entry_add(win);
elm_object_text_set(entry, txt);
// invalid ranges
eo_do(entry, val = elm_interface_atspi_text_get(6, 100));
ck_assert(val == NULL);
eo_do(entry, val = elm_interface_atspi_text_get(-6, 10));
ck_assert(val == NULL);
eo_do(entry, val = elm_interface_atspi_text_get(-6, -10));
ck_assert(val == NULL);
eo_do(entry, val = elm_interface_atspi_text_get(60, 100));
ck_assert(val == NULL);
// proper range
eo_do(entry, val = elm_interface_atspi_text_get(6, 17));
ck_assert_str_eq(val, "Xpśum dolor");
if (val) free(val);
elm_shutdown();
}
示例14: 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;
}
示例15: 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;
}