本文整理汇总了C++中eina_shutdown函数的典型用法代码示例。如果您正苦于以下问题:C++ eina_shutdown函数的具体用法?C++ eina_shutdown怎么用?C++ eina_shutdown使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了eina_shutdown函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: platformInitialize
bool platformInitialize() override
{
if (!eina_init())
return false;
if (!ecore_init()) {
// Could not init ecore.
eina_shutdown();
return false;
}
#ifdef HAVE_ECORE_X
XSetExtensionErrorHandler(dummyExtensionErrorHandler);
if (!ecore_x_init(0)) {
// Could not init ecore_x.
// PlatformScreenEfl and systemBeep() functions
// depend on ecore_x functionality.
ecore_shutdown();
eina_shutdown();
return false;
}
#endif
if (!ecore_evas_init()) {
#ifdef HAVE_ECORE_X
ecore_x_shutdown();
#endif
ecore_shutdown();
eina_shutdown();
return false;
}
if (!edje_init()) {
ecore_evas_shutdown();
#ifdef HAVE_ECORE_X
ecore_x_shutdown();
#endif
ecore_shutdown();
eina_shutdown();
return false;
}
if (!ecore_main_loop_glib_integrate())
return false;
SoupNetworkSession::defaultSession().setupHTTPProxyFromEnvironment();
return true;
}
开发者ID:AndriyKalashnykov,项目名称:webkit,代码行数:49,代码来源:WebProcessMainEfl.cpp
示例2: elicit_libs_init
/**
* Initialize libraries
*/
int
elicit_libs_init(void)
{
BrInitError error;
if (!br_init(&error) && error != BR_INIT_ERROR_DISABLED)
fprintf(stderr, "[Elicit] Failed to initialize binreloc (error code: %d)\nFalling back to hardcoded paths.", error);
if (!eina_init())
{
fprintf(stderr, "[Elicit] Failed to initialize eina.\n");
return 0;
}
if (!ecore_init())
{
fprintf(stderr, "[Elicit] Failed to initialize ecore.\n");
eina_shutdown();
return 0;
}
if (!ecore_evas_init() ||
!ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_SOFTWARE_XLIB))
{
fprintf(stderr, "[Elicit] Failed to initialize ecore_evas.\n");
fprintf(stderr, "[Elicit] Make sure you have the evas software X11 engine installed.\n");
eina_shutdown();
ecore_shutdown();
return 0;
}
if (!ecore_file_init())
{
fprintf(stderr, "[Elicit] Failed to initialize ecore_file.\n");
eina_shutdown();
ecore_shutdown();
ecore_evas_shutdown();
return 0;
}
if (!edje_init())
{
fprintf(stderr, "[Elicit] Failed to initialize edje.\n");
eina_shutdown();
ecore_shutdown();
ecore_evas_shutdown();
ecore_file_shutdown();
return 0;
}
return 1;
}
开发者ID:rephorm,项目名称:elicit,代码行数:51,代码来源:elicit.c
示例3: ecore_init
/**
* Set up connections, signal handlers, sockets etc.
* @return 1 or greater on success, 0 otherwise
*
* This function sets up all singal handlers and the basic event loop. If it
* succeeds, 1 will be returned, otherwise 0 will be returned.
*
* @code
* #include <Ecore.h>
*
* int main(int argc, char **argv)
* {
* if (!ecore_init())
* {
* printf("ERROR: Cannot init Ecore!\n");
* return -1;
* }
* ecore_main_loop_begin();
* ecore_shutdown();
* }
* @endcode
*/
EAPI int ecore_init(void)
{
if (++_ecore_init_count != 1)
return _ecore_init_count;
#ifdef HAVE_LOCALE_H
setlocale(LC_CTYPE, "");
#endif
/*
if (strcmp(nl_langinfo(CODESET), "UTF-8"))
{
WRN("Not a utf8 locale!");
}
*/
#ifdef HAVE_EVIL
if (!evil_init())
return --_ecore_init_count;
#endif
if (!eina_init())
goto shutdown_evil;
_ecore_log_dom =
eina_log_domain_register("Ecore", ECORE_DEFAULT_LOG_COLOR);
if (_ecore_log_dom < 0) {
EINA_LOG_ERR("Ecore was unable to create a log domain.");
goto shutdown_log_dom;
}
if (getenv("ECORE_FPS_DEBUG"))
_ecore_fps_debug = 1;
if (_ecore_fps_debug)
_ecore_fps_debug_init();
_ecore_main_loop_init();
_ecore_signal_init();
_ecore_exe_init();
_ecore_thread_init();
_ecore_glib_init();
_ecore_job_init();
_ecore_time_init();
#if HAVE_MALLINFO
if (getenv("ECORE_MEM_STAT")) {
_ecore_memory_pid = getpid();
ecore_animator_add(_ecore_memory_statistic, NULL);
}
#endif
#if defined(GLIB_INTEGRATION_ALWAYS)
if (_ecore_glib_always_integrate)
ecore_main_loop_glib_integrate();
#endif
return _ecore_init_count;
shutdown_log_dom:
eina_shutdown();
shutdown_evil:
#ifdef HAVE_EVIL
evil_shutdown();
#endif
return --_ecore_init_count;
}
开发者ID:Distrotech,项目名称:gnutls,代码行数:82,代码来源:ecore.c
示例4: START_TEST
END_TEST
START_TEST(eina_binshare_small)
{
char buf[4];
int i;
eina_init();
for (i = 1; i < 3; i++)
{
const char *t0, *t1;
int j;
for (j = 0; j < i; j++)
{
char c;
for (c = 'a'; c <= 'z'; c++)
buf[j] = c;
}
buf[i] = '\0';
t0 = eina_binshare_add_length(buf, i);
t1 = eina_binshare_add_length(buf, i);
fail_if(t0 == NULL);
fail_if(t1 == NULL);
fail_if(t0 != t1);
fail_if(memcmp(t0, buf, i) != 0);
eina_binshare_del(t0);
eina_binshare_del(t1);
}
eina_shutdown();
}
开发者ID:Limsik,项目名称:e17,代码行数:34,代码来源:eina_test_binshare.c
示例5: escarg_init
int
escarg_init(void)
{
if (++_escarg_init_count != 1)
return _escarg_init_count;
if (!eina_init())
{
fprintf(stderr, "Escarg can not initialize Eina\n");
return --_escarg_init_count;
}
_escarg_log_dom_global = eina_log_domain_register("escarg", EINA_COLOR_RED);
if (_escarg_log_dom_global < 0)
{
EINA_LOG_ERR("Escarg can not create a general log domain.");
goto shutdown_eina;
}
DBG("Successfully started");
return _escarg_init_count;
shutdown_eina:
eina_shutdown();
return --_escarg_init_count;
}
开发者ID:gfriloux,项目名称:escarg,代码行数:27,代码来源:escarg_main.c
示例6: START_TEST
END_TEST
START_TEST(eina_hash_extended)
{
Eina_Hash *hash = NULL;
int i;
fail_if(eina_init() != 2);
hash = eina_hash_string_djb2_new(NULL);
fail_if(hash == NULL);
fail_if(eina_hash_direct_add(hash, "42", "42") != EINA_TRUE);
for (i = 43; i < 3043; ++i)
{
char *tmp = malloc(10);
fail_if(!tmp);
eina_convert_itoa(i, tmp);
fail_if(eina_hash_direct_add(hash, tmp, tmp) != EINA_TRUE);
}
fail_if(eina_hash_find(hash, "42") == NULL);
eina_hash_free(hash);
fail_if(eina_shutdown() != 1);
}
开发者ID:Limsik,项目名称:e17,代码行数:28,代码来源:eina_test_hash.c
示例7: START_TEST
END_TEST
START_TEST(binbuf_manage_simple)
{
Eina_Binbuf *buf;
const char *_cbuf = "12\0 456 78\0 abcthis is some more random junk here!";
const unsigned char *cbuf = (const unsigned char *) _cbuf;
size_t size = sizeof(cbuf) - 1; /* We don't care about the real NULL */
unsigned char *alloc_buf = malloc(size);
memcpy(alloc_buf, cbuf, size);
eina_init();
buf = eina_binbuf_manage_new_length(alloc_buf, size);
fail_if(!buf);
fail_if(memcmp(eina_binbuf_string_get(buf), cbuf, size));
fail_if(size != eina_binbuf_length_get(buf));
eina_binbuf_append_length(buf, cbuf, size);
fail_if(memcmp(eina_binbuf_string_get(buf), cbuf, size));
fail_if(memcmp(eina_binbuf_string_get(buf) + size, cbuf, size));
fail_if(2 * size != eina_binbuf_length_get(buf));
eina_binbuf_free(buf);
eina_shutdown();
}
开发者ID:maikodaraine,项目名称:EnlightenmentUbuntu,代码行数:27,代码来源:eina_test_binbuf.c
示例8: estate_init
EAPI int
estate_init(void)
{
if (++_init_count == 1)
{
if (EINA_UNLIKELY(!eina_init()))
{
EINA_LOG_CRIT("Failed to init Eina");
return --_init_count;
}
_estate_log_dom = eina_log_domain_register("estate", EINA_COLOR_WHITE);
if (EINA_UNLIKELY(_estate_log_dom < 0))
{
EINA_LOG_CRIT("Failed to create log domain");
eina_shutdown();
return --_init_count;
}
#if 0
ESTATE_EVENT_ENTERER = ecore_event_type_new();
ESTATE_EVENT_EXITER = ecore_event_type_new();
ESTATE_EVENT_TRANSITION = ecore_event_type_new();
#endif
}
return _init_count;
}
开发者ID:jeanguyomarch,项目名称:Estate,代码行数:25,代码来源:estate_main.c
示例9: START_TEST
END_TEST
/* eina_binbuf_manage_new_length and eina_binbuf_manage_read_only_new_length
* are deprecated */
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
START_TEST(binbuf_manage_simple)
{
Eina_Binbuf *buf;
const char *_cbuf = "12\0 456 78\0 abcthis is some more random junk here!";
const unsigned char *cbuf = (const unsigned char *) _cbuf;
size_t size = sizeof(cbuf) - 1; /* We don't care about the real NULL */
unsigned char *alloc_buf = malloc(size);
memcpy(alloc_buf, cbuf, size);
eina_init();
buf = eina_binbuf_manage_new_length(alloc_buf, size);
fail_if(!buf);
fail_if(memcmp(eina_binbuf_string_get(buf), cbuf, size));
fail_if(size != eina_binbuf_length_get(buf));
eina_binbuf_append_length(buf, cbuf, size);
fail_if(memcmp(eina_binbuf_string_get(buf), cbuf, size));
fail_if(memcmp(eina_binbuf_string_get(buf) + size, cbuf, size));
fail_if(2 * size != eina_binbuf_length_get(buf));
eina_binbuf_free(buf);
eina_shutdown();
}
开发者ID:RomainNaour,项目名称:efl,代码行数:31,代码来源:eina_test_binbuf.c
示例10: main
int
main(int argc, char **argv)
{
Eina_List *list = NULL;
Eina_List *l;
void *list_data;
eina_init();
list = eina_list_append(list, eina_stringshare_add("calvin"));
list = eina_list_append(list, eina_stringshare_add("Leoben"));
list = eina_list_append(list, eina_stringshare_add("D'Anna"));
list = eina_list_append(list, eina_stringshare_add("Simon"));
list = eina_list_append(list, eina_stringshare_add("Doral"));
list = eina_list_append(list, eina_stringshare_add("Six"));
list = eina_list_append(list, eina_stringshare_add("Sharon"));
for(l = list; l; l = eina_list_next(l))
printf("%s\n", (char*)l->data);
for(l = eina_list_last(list); l; l = eina_list_prev(l))
printf("%s\n", (char*)eina_list_data_get(l));
EINA_LIST_FREE(list, list_data)
eina_stringshare_del(list_data);
eina_shutdown();
return 0;
}
开发者ID:Limsik,项目名称:e17,代码行数:30,代码来源:eina_list_04.c
示例11: efreet_shutdown
EAPI int
efreet_shutdown(void)
{
if (_efreet_init_count <= 0)
{
EINA_LOG_ERR("Init count not greater than 0 in shutdown.");
return 0;
}
if (--_efreet_init_count != 0)
return _efreet_init_count;
efreet_util_shutdown();
efreet_menu_shutdown();
efreet_desktop_shutdown();
efreet_ini_shutdown();
efreet_icon_shutdown();
efreet_xml_shutdown();
efreet_cache_shutdown();
efreet_base_shutdown();
IF_RELEASE(efreet_lang);
IF_RELEASE(efreet_lang_country);
IF_RELEASE(efreet_lang_modifier);
IF_RELEASE(efreet_language);
efreet_parsed_locale = 0; /* reset this in case they init efreet again */
ecore_file_shutdown();
ecore_shutdown();
eet_shutdown();
eina_shutdown();
return _efreet_init_count;
}
开发者ID:RomainNaour,项目名称:efl,代码行数:33,代码来源:efreet.c
示例12: main
int main(int argc, char **argv)
{
Eina_Strbuf *buf;
eina_init();
buf = eina_strbuf_new();
eina_strbuf_append_length(buf, "buffe", 5);
eina_strbuf_append_char(buf, 'r');
printf("%s\n", eina_strbuf_string_get(buf));
eina_strbuf_insert_escaped(buf, "my ", 0);
printf("%s\n", eina_strbuf_string_get(buf));
eina_strbuf_reset(buf);
eina_strbuf_append_escaped(buf, "my buffer");
printf("%s\n", eina_strbuf_string_get(buf));
eina_strbuf_reset(buf);
eina_strbuf_append_printf(buf, "%s%c", "buffe", 'r');
eina_strbuf_insert_printf(buf, " %s: %d", 6, "length", eina_strbuf_length_get(buf));
printf("%s\n", eina_strbuf_string_get(buf));
eina_strbuf_remove(buf, 0, 7);
printf("%s\n", eina_strbuf_string_get(buf));
eina_strbuf_replace_all(buf, "length", "size");
printf("%s\n", eina_strbuf_string_get(buf));
eina_strbuf_free(buf);
eina_shutdown();
return 0;
}
开发者ID:amitesh-singh,项目名称:Enlightenment,代码行数:35,代码来源:eina_strbuf_01.c
示例13: START_TEST
END_TEST
START_TEST(eina_rectangle_intersect)
{
Eina_Rectangle r1, r2, r3, r4, rd;
fail_if(!eina_init());
EINA_RECTANGLE_SET(&r1, 10, 10, 50, 50);
EINA_RECTANGLE_SET(&r2, 20, 20, 20, 20);
EINA_RECTANGLE_SET(&r3, 0, 0, 10, 10);
EINA_RECTANGLE_SET(&r4, 30, 30, 50, 50);
rd = r1;
fail_if(eina_rectangle_intersection(&rd, &r3));
fail_if(!eina_rectangle_intersection(&rd, &r2));
fail_if(rd.x != r2.x
|| rd.y != r2.y
|| rd.w != r2.w
|| rd.h != r2.h);
rd = r1;
fail_if(!eina_rectangle_intersection(&rd, &r4));
fail_if(rd.x != 30
|| rd.y != 30
|| rd.w != 30
|| rd.h != 30);
eina_shutdown();
}
开发者ID:OpenInkpot-archive,项目名称:iplinux-eina,代码行数:34,代码来源:eina_test_rectangle.c
示例14: eeze_shutdown
EAPI int
eeze_shutdown(void)
{
if (_eeze_init_count <= 0)
{
EINA_LOG_ERR("Init count not greater than 0 in shutdown.");
return 0;
}
if (--_eeze_init_count != 0)
return _eeze_init_count;
udev_unref(udev);
#ifdef HAVE_EEZE_MOUNT
eeze_disk_shutdown();
#endif
eeze_sensor_shutdown();
eeze_net_shutdown();
ecore_shutdown();
eina_log_domain_unregister(_eeze_udev_log_dom);
_eeze_udev_log_dom = -1;
eina_log_domain_unregister(_eeze_net_log_dom);
_eeze_net_log_dom = -1;
eina_log_domain_unregister(_eeze_sensor_log_dom);
_eeze_sensor_log_dom = -1;
eina_shutdown();
return _eeze_init_count;
}
开发者ID:RomainNaour,项目名称:efl,代码行数:27,代码来源:eeze_main.c
示例15: ecore_wince_shutdown
int
ecore_wince_shutdown()
{
HWND task_bar;
if (--_ecore_wince_init_count != 0)
return _ecore_wince_init_count;
/* force task bar to be shown (in case the application exits */
/* while being fullscreen) */
task_bar = FindWindow(L"HHTaskBar", NULL);
if (task_bar)
{
ShowWindow(task_bar, SW_SHOW);
EnableWindow(task_bar, TRUE);
}
if (!UnregisterClass(ECORE_WINCE_WINDOW_CLASS, _ecore_wince_instance))
ERR("UnregisterClass() failed");
if (!FreeLibrary(_ecore_wince_instance))
ERR("FreeLibrary() failed");
_ecore_wince_instance = NULL;
ecore_event_shutdown();
eina_log_domain_unregister(_ecore_wince_log_dom_global);
_ecore_wince_log_dom_global = -1;
eina_shutdown();
return _ecore_wince_init_count;
}
开发者ID:OpenInkpot-archive,项目名称:ecore,代码行数:32,代码来源:ecore_wince.c
示例16: eolian_shutdown
EAPI int eolian_shutdown(void)
{
if (_eolian_init_counter <= 0)
{
EINA_LOG_ERR("Init count not greater than 0 in shutdown.");
return 0;
}
_eolian_init_counter--;
if (_eolian_init_counter == 0)
{
INF("Shutdown");
eina_log_timing(_eolian_log_dom,
EINA_LOG_STATE_START,
EINA_LOG_STATE_SHUTDOWN);
eo_lexer_shutdown();
database_shutdown();
eina_prefix_free(_eolian_prefix);
_eolian_prefix = NULL;
eina_log_domain_unregister(_eolian_log_dom);
_eolian_log_dom = -1;
eina_shutdown();
}
return _eolian_init_counter;
}
开发者ID:RomainNaour,项目名称:efl,代码行数:28,代码来源:eolian.c
示例17: main
int
main(int argc, char **argv)
{
Eina_Benchmark *test;
unsigned int i;
if (argc != 2)
return -1;
_mempool_init();
eina_init();
for (i = 0; etc[i].bench_case; ++i)
{
test = eina_benchmark_new(etc[i].bench_case, argv[1]);
if (!test)
continue;
etc[i].build(test);
eina_benchmark_run(test);
eina_benchmark_free(test);
}
eina_bench_e17();
eina_shutdown();
_mempool_shutdown();
return 0;
}
开发者ID:wjhendr,项目名称:enlightenment,代码行数:33,代码来源:eina_bench.c
示例18: START_TEST
END_TEST
START_TEST(eina_inarray_test_reverse)
{
Eina_Inarray *array;
int i;
eina_init();
array = eina_inarray_new(sizeof(short), 1);
fail_unless(array != NULL);
for (i = 0; i < numbers_count; i++)
{
short val = i;
eina_inarray_push(array, &val);
}
eina_inarray_reverse(array);
for (i = 0; i < numbers_count; i++)
{
short *member = eina_inarray_nth(array, i);
fail_unless(*member == (numbers_count - i - 1));
}
eina_inarray_free(array);
eina_shutdown();
}
开发者ID:RomainNaour,项目名称:efl,代码行数:28,代码来源:eina_test_inarray.c
示例19: _ecore_imf_xim_init
static Eina_Bool
_ecore_imf_xim_init(void)
{
eina_init();
_ecore_imf_xim_log_dom = eina_log_domain_register("ecore_imf_xim", NULL);
if (_ecore_imf_xim_log_dom < 0)
{
EINA_LOG_ERR("Could not register log domain: ecore_imf_xim");
return EINA_FALSE;
}
DBG(" ");
if (!ecore_x_init(NULL))
{
eina_shutdown();
return EINA_FALSE;
}
ecore_imf_module_register(&xim_info,
xim_imf_module_create,
xim_imf_module_exit);
return EINA_TRUE;
}
开发者ID:RomainNaour,项目名称:efl,代码行数:26,代码来源:ecore_imf_xim.c
示例20: uninit
/**
* Close anything opened by this module
*/
Eina_Bool uninit(DB *db) {
EINA_SAFETY_ON_NULL_RETURN_VAL(db, EINA_FALSE);
INF("Uninitializing source 'zrpcdb'");
if (db->config)
db_config_free(db->config);
if (db->e){
INF("Connection pool teardown for 'zrpcdb'");
esql_free(db->e);
INF("Uninitialization of source 'zrpcdb' complete");
}
if (--init_count == 0){
ecore_event_handler_del(zrpc_res);
zrpc_res = NULL;
ecore_event_handler_del(zrpc_err);
zrpc_err = NULL;
}
if (type_cbs) eina_hash_free(type_cbs);
type_cbs = NULL;
if (db_cbs) eina_hash_free(db_cbs);
db_cbs = NULL;
if (db_cb_params) eina_hash_free(db_cb_params);
db_cb_params = NULL;
esql_shutdown();
eina_shutdown();
return EINA_TRUE;
}
开发者ID:zmike,项目名称:ezrpc,代码行数:32,代码来源:zrpcdb.c
注:本文中的eina_shutdown函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论