当前位置: 首页>>代码示例>>C++>>正文


C++ elm_run函数代码示例

本文整理汇总了C++中elm_run函数的典型用法代码示例。如果您正苦于以下问题:C++ elm_run函数的具体用法?C++ elm_run怎么用?C++ elm_run使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了elm_run函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: elm_main

EAPI_MAIN int
elm_main(int argc, char **argv)
{
   Evas_Object *o;

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

   win = elm_win_util_standard_add("efl-thread-3", "EFL Thread 3");
   elm_win_autodel_set(win, EINA_TRUE);

   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();

   evas_object_resize(win, 400, 400);
   evas_object_show(win);

   elm_run();
   elm_shutdown();

   return 0;
}
开发者ID:rzr,项目名称:testing-elementary18,代码行数:27,代码来源:efl_thread_3.c

示例2: elm_main

EAPI int elm_main (int argc, char** argv) {
	rockon_data *rdata;

	if (log_init() == EINA_FALSE) {
		EINA_LOG_ERR("Log domains init failed");
	}

	rdata = rockon_data_new();

	gui_window_set(rdata);

	xmms2_connect(rdata);
	if (rdata->connection == NULL) {
		cmd_server_launch(rdata);
	}

	EINA_LOG_DBG("MainLoop Start");
	elm_run();
	EINA_LOG_DBG("MainLoop End");

	rockon_data_del(rdata);
	log_shutdown();
	elm_shutdown();

	return 0;
}
开发者ID:paulomenin,项目名称:rockon,代码行数:26,代码来源:rockon.c

示例3: elm_main

EAPI_MAIN int
elm_main(int argc, char **argv)
{
   Evas_Object *o;

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

   win = elm_win_util_standard_add("efl-thread-4", "EFL Thread 4");
   evas_object_smart_callback_add(win, "delete,request", del, NULL);

   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();

   evas_object_resize(win, 400, 400);
   evas_object_show(win);

   elm_run();
   pthread_mutex_lock(&th_lock);
   th_exit = 1;
   pthread_mutex_unlock(&th_lock);
   elm_shutdown();

   return 0;
}
开发者ID:maikodaraine,项目名称:EnlightenmentUbuntu,代码行数:33,代码来源:efl_thread_4.c

示例4: 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();
}
开发者ID:Limsik,项目名称:e17,代码行数:34,代码来源:tut22.c

示例5: 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

示例6: 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

示例7: 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

示例8: 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

示例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;
}
开发者ID:Limsik,项目名称:e17,代码行数:34,代码来源:efl_thread_win32_4.c

示例10: elm_main

EAPI_MAIN int
elm_main(int argc, char **argv)
{
   Evas_Object *win, *bt;
   Elm_Transit *trans;

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

   win = elm_win_util_standard_add("transit-basic", "Transit - Basic");
   elm_win_autodel_set(win, EINA_TRUE);

   bt = elm_button_add(win);
   elm_object_text_set(bt, "Resizing Effect");
   evas_object_show(bt);
   evas_object_move(bt, 50, 100);
   evas_object_resize(bt, 100, 50);

   trans = elm_transit_add();
   elm_transit_object_add(trans, bt);

   elm_transit_effect_resizing_add(trans, 100, 50, 300, 150);

   elm_transit_duration_set(trans, 5.0);
   elm_transit_go(trans);

   evas_object_resize(win, 400, 400);
   evas_object_show(win);

   elm_run();

   return 0;
}
开发者ID:FlorentRevest,项目名称:Elementary,代码行数:32,代码来源:transit_example_01.c

示例11: 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;
}
开发者ID:radoslawjablonski,项目名称:eail,代码行数:33,代码来源:eail_tooltip_test.c

示例12: 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

示例13: elm_main

EAPI_MAIN int
elm_main(int argc, char **argv)
{
   Evas_Object *win = NULL, *image = NULL, *btn = NULL, *bx = NULL;
   char buf[PATH_MAX];
   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
   win = elm_win_util_standard_add("test", "Hello Elementary");
   elm_win_autodel_set(win, EINA_TRUE);
   
   bx = elm_box_add(win);
   evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   elm_win_resize_object_add(win, bx);
   evas_object_show(bx);
   
   snprintf(buf, sizeof(buf), "bodhilogo-simple.png");

   image = elm_image_add(win);
    /*if (!elm_image_file_set(image, buf, NULL))
     {
        printf("error: could not load image \"%s\"\n", buf);
        return -1;
     } */
   elm_image_file_set(image, NULL, NULL);
   evas_object_size_hint_weight_set(image, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   elm_win_resize_object_add(win, image);
   evas_object_show(image);
   
   evas_object_resize(win, 300, 200);
   evas_object_show(win);

   elm_run(); 
   return EXIT_SUCCESS;
}
开发者ID:rbtylee,项目名称:Elementary,代码行数:33,代码来源:elm_image.c

示例14: 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

示例15: elm_main

EAPI_MAIN int
elm_main(int argc, char **argv)
{
   Evas_Object *o;

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

   win = elm_win_util_standard_add("efl-thread-5", "EFL Thread 5");
   evas_object_smart_callback_add(win, "delete,request", del, NULL);

   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);
   evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN, down, NULL);
   rect = o;

   // explicitly create ecore thread to do some "work on the side" and pass
   // in NULL as data ptr to callbacks and true at the end means to actually
   // make a new thread and not use the thread pool (there is a thread pool
   // with as many thread workers as there are cpu's so this means you do not
   // overload the cpu's with more work than you actually have processing
   // units *IF* your threads do actually spend their time doing actual
   // heavy computation)
   thr = ecore_thread_feedback_run(th_do, th_feedback, th_end, th_cancel,
                                   NULL, EINA_TRUE);

   evas_object_resize(win, 400, 400);
   evas_object_show(win);

   elm_run();
   if (thr) ecore_thread_cancel(thr);

   return 0;
}
开发者ID:FlorentRevest,项目名称:Elementary,代码行数:35,代码来源:efl_thread_5.c


注:本文中的elm_run函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。