本文整理汇总了C++中elm_init函数的典型用法代码示例。如果您正苦于以下问题:C++ elm_init函数的具体用法?C++ elm_init怎么用?C++ elm_init使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了elm_init函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: START_TEST
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();
}
示例2: init_thread
void init_thread(void* parameter)
{
eth_system_device_init();
lwip_system_init();
dfs_init();
elm_init();
rt_hw_uart_init("uart0", 0);
rt_console_set_device("uart0");
rt_kprintf("rt-thread system start!\r\n");
finsh_system_init();
rt_hw_dflash_init("dflash0");
dfs_mount("dflash0", "/", "elm", 0, 0);
rt_hw_enet_phy_init();
rt_kprintf("waitting for connection...");
/* tcp server demo */
extern void tcpserv(void* parameter);
tcpserv(RT_NULL);
}
示例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: START_TEST
END_TEST
START_TEST (elm_atspi_description_set)
{
elm_init(0, NULL);
Eo* root = eo_add(ELM_ATSPI_APP_OBJECT_CLASS, NULL);
const char *ret = NULL;
const char *desc = "Test description";
eo_do(root, ret = elm_interface_atspi_accessible_description_get());
ck_assert(ret == NULL);
eo_do(root, elm_interface_atspi_accessible_description_set(desc));
eo_do(root, ret = elm_interface_atspi_accessible_description_get());
ck_assert(ret != NULL);
ck_assert_str_eq(ret, "Test description");
eo_unref(root);
elm_shutdown();
}
示例5: rt_init_thread_entry
/* thread phase init */
void rt_init_thread_entry(void *parameter)
{
/* Filesystem Initialization */
#ifdef RT_USING_DFS
# ifdef RT_USING_SPI
/* init hardware device */
if(sst25vfxx_init("flash0", "spi10") != RT_EOK)
{
if(at45dbxx_init("flash0", "spi10") != RT_EOK)
{
rt_kprintf("[error] No such spi flash!\r\n");
}
}
# endif
/* init filesystem */
{
/* init the device filesystem */
dfs_init();
/* init the elm FAT filesystam*/
elm_init();
/* mount spi flash fat as root directory */
if (dfs_mount("flash0", "/", "elm", 0, 0) == 0)
rt_kprintf("SPI File System initialized!\n");
else
rt_kprintf("SPI File System init failed!\n");
}
#endif
}
示例6: 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);
}
示例7: 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);
ctxpopup = elm_ctxpopup_add(main_win);
elm_ctxpopup_horizontal_set(ctxpopup, EINA_TRUE);
}
示例8: 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);
test_eo = elm_calendar_add(main_win);
elm_calendar_min_max_year_set(test_eo, 2010, 2020);
}
开发者ID:TizenChameleon,项目名称:uifw-elementary,代码行数:11,代码来源:utc_UIFW_elm_calendar_min_max_year_get_func.c
示例9: main
int
main(int argc, char **argv)
{
Evas_Object *win;
if (!elm_init(argc, argv)) return -1;
win = elm_win_util_standard_add("Genlist", "Genlist Basic Tutorial");
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
elm_win_autodel_set(win, EINA_TRUE);
//win 400x400 px
evas_object_resize(win, 400, 400);
//GENLIST here
Evas_Object *list;
list = elm_genlist_add(win);
Elm_Genlist_Item_Class *_itc = elm_genlist_item_class_new();
_itc->item_style = "default";
_itc->func.text_get = _genlist_text_get;
_itc->func.content_get = _genlist_content_get;
_itc->func.state_get = NULL;
_itc->func.del = NULL;
Elm_Genlist_Item_Class *_itc2 = elm_genlist_item_class_new();
_itc2->item_style = "group_index";
_itc2->func.text_get = _genlist_text_get;
_itc2->func.content_get = _genlist_content_get;
_itc2->func.state_get = NULL;
_itc2->func.del = NULL;
int i=0;
for (i=0; i<20; i++)
{
elm_genlist_item_append(
list,
_itc,
(void *)(uintptr_t) i, // Item data
NULL, // Parent item for trees, NULL if none
ELM_GENLIST_ITEM_NONE, // Item type; this is the common one
_genlist_selected_cb, // Callback on selection of the item
_itc2 // Data for that callback function
);
}
evas_object_size_hint_weight_set(list, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, list);
evas_object_show(list);
evas_object_show(win);
elm_run();
elm_shutdown();
return 0;
}
示例10: rt_init_thread_entry
void rt_init_thread_entry(void* parameter)
{
/* Filesystem Initialization */
#ifdef RT_USING_DFS
{
/* init the device filesystem */
dfs_init();
#ifdef RT_USING_DFS_ELMFAT
/* init the elm chan FatFs filesystam*/
elm_init();
/* mount sd card fat partition 1 as root directory */
if (dfs_mount("sd0", "/", "elm", 0, 0) == 0)
{
rt_kprintf("File System initialized!\n");
}
else
rt_kprintf("File System initialzation failed!\n");
#endif
}
#endif
/* LwIP Initialization */
#ifdef RT_USING_LWIP
{
extern void lwip_sys_init(void);
#ifdef STM32F10X_CL
extern void rt_hw_stm32_eth_init(void);
#endif
/* register ethernetif device */
eth_system_device_init();
#ifdef STM32F10X_CL
rt_hw_stm32_eth_init();
#else
/* STM32F103 */
#if STM32_ETH_IF == 0
rt_hw_enc28j60_init();
#elif STM32_ETH_IF == 1
rt_hw_dm9000_init();
#endif
#endif
/* re-init device driver */
rt_device_init_all();
/* init lwip system */
lwip_sys_init();
rt_kprintf("TCP/IP initialized!\n");
}
#endif
}
示例11: external_elm_init
void
external_elm_init(void)
{
int argc = 0;
char **argv = NULL;
init_count++;
DBG("elm_real_init\n");
if (init_count > 1) return;
ecore_app_args_get(&argc, &argv);
elm_init(argc, argv);
}
示例12: rt_init_thread_entry
void rt_init_thread_entry(void *parameter)
{
int fd;
rt_uint32_t sz;
char buffer[20];
#ifdef RT_USING_DFS
dfs_init();
#ifdef RT_USING_DFS_ELMFAT
elm_init();
/* mount sd card fat partition 1 as root directory */
if (dfs_mount("sd0", "/", "elm", 0, 0) == 0)
{
rt_kprintf("File System initialized!\n");
/*Open a file*/
fd = open("/fattest.txt", O_RDWR|O_CREAT, 0);
if (fd < 0)
{
rt_kprintf("open file for write failed\n");
return;
}
sz = write(fd,"Hello RT-Thread!",sizeof("Hello RT-Thread!"));
if (sz != 0)
{
rt_kprintf("written %d\n",sz);
}
else
rt_kprintf("haven't written\n");
lseek(fd, 0, SEEK_SET);
sz = read(fd, buffer, sizeof(buffer));
if (sz != 0)
{
rt_kprintf("READ %d:",sz);
while (sz--)
rt_kprintf("%c",buffer[sz]);//opposite
rt_kprintf("\n");
}
else
rt_kprintf("haven't read\n");
close(fd);
}
else
rt_kprintf("File System initialzation failed!\n");
#endif
#endif
}
示例13: _elm_precondition
void _elm_precondition(void)
{
elm_init(0, NULL);
main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
elm_win_title_set(main_win, "Elementary Unit Test Suite");
evas_object_smart_callback_add(main_win, "delete,request", _win_del, NULL);
main_bg = elm_bg_add(main_win);
evas_object_size_hint_weight_set(main_bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_resize(main_win, 320, 480);
evas_object_show(main_win);
}
示例14: main
int
main(int argc, char **argv)
{
em = E_MUSIC_NEW(Em_Smart_Data);
/* Init Local */
char *curlocale=setlocale(LC_ALL, "");
curlocale=curlocale?curlocale:setlocale(LC_ALL, "C");
// mylocale = curlocale?strdup(curlocale):NULL;
bindtextdomain("e_music", LOCALEDIR);
textdomain("e_music");
/* have to init it */
if (!eina_init())
{
fprintf(stderr, "ERROR: failed to init eina.");
exit(-1);
}
_log_dom = eina_log_domain_register("E-music", EINA_COLOR_CYAN);
if (_log_dom < 0)
{
EINA_LOG_ERR("could not register E-music log domain.");
_log_dom = EINA_LOG_DOMAIN_GLOBAL;
}
eina_log_domain_level_set("E-music", 3);
eet_init();
emusic_config_init(NULL);
emusic_config_load_theme();
eina_log_domain_level_set("E-music", emusic_config->log_level);
if (!emusic_playback_init(em))
{
ERR("could not init playback.\n");
return 0;
}
elm_init(argc, argv);
elm_main();
/* Main Loop*/
elm_run();
emusic_config_shutdown();
eina_log_domain_unregister(_log_dom);
elm_shutdown();
return 0;
}
示例15: main
int main(int argc, char **argv)
#endif
{
#ifdef MEMORY_DEBUG
elm_init();
#endif //MEMORY_DEBUG
gargc=argc;
gargv=argv;
// do basic initialization
#ifdef OLC
olc_init();
#endif //OLC
init_logging("log");
check_log_level_on_command_line();
create_tcp_out_mutex();
init_translatables();
#ifdef FSAA
init_fsaa_modes();
#endif /* FSAA */
init_vars();
ENTER_DEBUG_MARK("init stuff");
init_stuff();
LEAVE_DEBUG_MARK("init stuff");
start_rendering();
#ifdef MEMORY_DEBUG
elm_cleanup();
#endif //MEMORY_DEBUG
#ifdef OLC
olc_shutdown();
#endif //OLC
#ifndef WINDOWS
// attempt to restart if requested
if(restart_required > 0){
LOG_INFO("Restarting %s\n", *argv);
execv(*argv, argv);
}
#endif //WINDOWS
return 0;
}