本文整理汇总了C++中eo_do函数的典型用法代码示例。如果您正苦于以下问题:C++ eo_do函数的具体用法?C++ eo_do怎么用?C++ eo_do使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了eo_do函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: main
int
main(int argc, char *argv[])
{
(void) argc;
(void) argv;
eo_init();
Eo *obj = eo_add(SIMPLE_CLASS, NULL);
eo_do(obj, simple_a_set(1), simple_b_set(2));
int a, b, sum = 0;
eo_do(obj, simple_a_get(&a), simple_b_get(&b), mixin_ab_sum_get(&sum));
fail_if(sum != a + b + 2); /* 2 for the two mixins... */
eo_do(obj, mixin_ab_sum_get(&sum), mixin_ab_sum_get(&sum));
Mixin2_Public_Data *pd2 = eo_data_get(obj, MIXIN2_CLASS);
fail_if(pd2->count != 6);
Mixin3_Public_Data *pd3 = eo_data_get(obj, MIXIN3_CLASS);
fail_if(pd3->count != 9);
eo_unref(obj);
obj = eo_add(INHERIT_CLASS, NULL);
eo_do(obj, simple_a_set(5), simple_a_get(&a));
fail_if(a != 5);
eo_unref(obj);
eo_shutdown();
return 0;
}
开发者ID:wjhendr,项目名称:enlightenment,代码行数:33,代码来源:mixin_main.c
示例2: START_TEST
END_TEST
START_TEST(edje_test_filters)
{
Evas *evas = EDJE_TEST_INIT_EVAS();
const Evas_Object *text, *sub;
Evas_Object *obj, *src = NULL;
const char *prg, *name;
Eina_Bool b;
obj = edje_object_add(evas);
fail_unless(edje_object_file_set(obj, test_layout_get("test_filters.edj"), "test_group"));
evas_object_resize(obj, 200, 200);
/* check value of no_render flag as seen from evas land */
sub = edje_object_part_object_get(obj, "mask");
fail_if(!eo_do_ret(sub, b, evas_obj_no_render_get()));
/* text part: check filter status */
text = edje_object_part_object_get(obj, "text");
fail_if(!text);
eo_do(text, efl_gfx_filter_program_get(&prg, &name));
fail_if(!prg);
fail_if(!name || strcmp(name, "filterfile"));
eo_do(text, efl_gfx_filter_source_get("mask", &src));
fail_if(!src);
// TODO: Verify properly that the filter runs well
EDJE_TEST_FREE_EVAS();
}
开发者ID:FlorentRevest,项目名称:EFL,代码行数:34,代码来源:edje_test_edje.c
示例3: 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();
}
开发者ID:FlorentRevest,项目名称:Elementary,代码行数:31,代码来源:elm_test_entry.c
示例4: START_TEST
END_TEST
START_TEST (elm_atspi_children_and_parent2)
{
elm_init(0, NULL);
generate_app();
Eo* root = eo_add(ELM_ATSPI_APP_OBJECT_CLASS, NULL);
Eo *win = NULL;
Eina_List *root_children;
eo_do(root, root_children = elm_interface_atspi_accessible_children_get());
win = eina_list_nth(root_children, 0);
Eina_List *win_children;
eo_do(win, win_children = elm_interface_atspi_accessible_children_get());
ck_assert(eina_list_count(win_children) == 2);
Eo *btn = NULL;
btn = eina_list_nth(win_children, 0);
ck_assert(btn != NULL);
ck_assert(btn == g_bg);
btn = eina_list_nth(win_children, 1);
ck_assert(btn != NULL);
ck_assert(btn == g_btn);
eo_unref(root);
elm_shutdown();
}
开发者ID:FlorentRevest,项目名称:Elementary,代码行数:33,代码来源:elm_test_atspi.c
示例5: main
int
main(int argc, char *argv[])
{
(void) argc;
(void) argv;
eo_init();
Eo *obj = eo_add(SIMPLE_CLASS, NULL);
eo_do(obj, simple_a_set(1), simple_b_set(2));
int a, b, sum = 0;
eo_do(obj, simple_a_get(&a), simple_b_get(&b), interface_ab_sum_get(&sum));
fail_if(sum != a + b);
sum = 0;
eo_do(obj, interface_ab_sum_get(&sum), interface_ab_sum_get(&sum));
fail_if(sum != a + b);
eo_do(obj, interface2_ab_sum_get2(&sum), interface2_ab_sum_get2(&sum));
fail_if(sum != a + b + 1);
eo_unref(obj);
eo_shutdown();
return 0;
}
开发者ID:jigpu,项目名称:efl,代码行数:25,代码来源:interface_main.c
示例6: main
int
main(int argc, char *argv[])
{
int ret = 0;
(void) argc;
(void) argv;
eo_init();
Eo *obj = eo_add(SIMPLE_CLASS, NULL);
fail_if(my_init_count != 2);
eo_do(obj, simple_a_set(1), simple_b_set(2));
int a, b;
eo_do(obj, simple_a_get(&a), simple_b_get(&b), mixin_add_and_print(5));
eo_unref(obj);
fail_if(my_init_count != 0);
obj = eo_add(SIMPLE2_CLASS, NULL);
fail_if(obj);
obj = eo_add(SIMPLE3_CLASS, NULL);
fail_if(obj);
my_init_count = 0;
obj = eo_add(SIMPLE4_CLASS, NULL);
fail_if(my_init_count != 2);
eo_unref(obj);
fail_if(my_init_count != 0);
obj = eo_add(SIMPLE5_CLASS, NULL);
fail_if(!obj);
eo_unref(obj);
obj = eo_add(SIMPLE6_CLASS, NULL);
fail_if(!obj);
eo_unref(obj);
obj = eo_add(SIMPLE7_CLASS, NULL);
fail_if(obj);
my_init_count = 0;
obj = eo_add_custom(SIMPLE_CLASS, NULL, simple_constructor(7));
fail_if(!obj);
fail_if(my_init_count != 2);
eo_do(obj, simple_a_get(&a));
fail_if(a != 7);
eo_unref(obj);
eo_shutdown();
return ret;
}
开发者ID:jigpu,项目名称:efl,代码行数:60,代码来源:constructors_main.c
示例7: _emous_mount_del
void
_emous_mount_del(const char *mount_point)
{
Emous_Manager *manager;
eo_do(EMOUS_MANAGER_CLASS, manager = emous_manager_object_get());
eo_do(manager, eo_event_callback_call(EMOUS_MANAGER_EVENT_DEVICE_DEL, (void*)mount_point));
}
开发者ID:danielhass,项目名称:jesus,代码行数:9,代码来源:emous_mp.c
示例8: _camera_light_changeZ_cb
static void
_camera_light_changeZ_cb(void *data, Evas_Object *obj, void *event_info)
{
Evas_Real x, y, z;
if ((Eo*)data)
{
eo_do((Eo*)data, evas_canvas3d_node_position_get(EVAS_CANVAS3D_SPACE_PARENT, &x, &y, NULL));
z = elm_spinner_value_get(obj);
eo_do((Eo*)data, evas_canvas3d_node_position_set(x, y, z));
}
}
开发者ID:FlorentRevest,项目名称:Elementary,代码行数:12,代码来源:camera_light.c
示例9: main
int
main(int argc, char *argv[])
{
(void) argc;
(void) argv;
eo_init();
Eo *obj = eo_add(INHERIT2_CLASS, NULL);
eo_do(obj, simple_a_set(1));
Simple_Public_Data *pd = eo_data_get(obj, SIMPLE_CLASS);
fail_if(pd->a != 2);
eo_unref(obj);
obj = eo_add(INHERIT3_CLASS, NULL);
eo_do(obj, simple_a_set(1));
pd = eo_data_get(obj, SIMPLE_CLASS);
fail_if(pd->a != 3);
eo_unref(obj);
obj = eo_add(INHERIT2_CLASS, NULL);
eo_do(obj, inherit2_print());
eo_unref(obj);
obj = eo_add(SIMPLE_CLASS, NULL);
fail_if(eo_do(obj, inherit2_print2()));
fail_if(eo_do_super(obj, simple_a_print()));
fail_if(eo_do(obj, simple_class_print()));
fail_if(!eo_class_do(SIMPLE_CLASS, simple_class_print()));
fail_if(!eo_class_do(INHERIT_CLASS, simple_class_print()));
fail_if(!eo_class_do(INHERIT2_CLASS, simple_class_print()));
fail_if(!eo_class_do(INHERIT3_CLASS, simple_class_print()));
fail_if(eo_class_do(SIMPLE_CLASS, simple_a_print()));
eo_constructor_super(obj);
eo_destructor_super(obj);
eo_unref(obj);
eo_shutdown();
return 0;
}
开发者ID:wargio,项目名称:e17,代码行数:49,代码来源:main.c
示例10: _a_changed_cb
static Eina_Bool
_a_changed_cb(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info)
{
(void) desc;
(void) obj;
int new_a = *((int *) event_info);
printf("%s event_info:'%d' data:'%d'\n", __func__, new_a, (int) (intptr_t) data);
cb_count++;
eo_do(obj, eo_event_callback_priority_add(EV_A_CHANGED, EO_CALLBACK_PRIORITY_BEFORE, _null_cb, (void *) 23423));
eo_do(obj, eo_event_callback_del(EV_A_CHANGED, _null_cb, (void *) 23423));
/* Stop as we reached the 3rd one. */
return (cb_count != 3);
}
开发者ID:jigpu,项目名称:efl,代码行数:16,代码来源:signals_main.c
示例11: _sub_path_process
static void
_sub_path_process(Elm_App_Client *eo, Eldbus_Message_Iter *obj_iter, Elm_App_Client_Data *data, Eina_Bool loading_list)
{
const char *obj_path;
Eldbus_Message_Iter *array_iface, *iface;
eldbus_message_iter_arguments_get(obj_iter, "oa{sa{sv}}", &obj_path, &array_iface);
while (eldbus_message_iter_get_and_next(array_iface, '{', &iface))
{
const char *iface_name;
Eldbus_Message_Iter *array_props;
Elm_App_Client_View *view;
eldbus_message_iter_arguments_get(iface, "sa{sv}", &iface_name,
&array_props);
if (strcmp(iface_name, "org.enlightenment.ApplicationView1"))
continue;
view = eina_hash_find(data->views, obj_path);
if (view)
continue;
view = eo_add(ELM_APP_CLIENT_VIEW_CLASS, eo,
elm_app_client_view_path_set(obj_path));
eina_hash_add(data->views, obj_path, view);
if (!loading_list)
eo_do(eo, eo_event_callback_call(ELM_APP_CLIENT_EVENT_VIEW_CREATED, view));
}
}
开发者ID:FlorentRevest,项目名称:Elementary,代码行数:29,代码来源:elm_app_client.c
示例12: _timer_hide_window_cb
static Eina_Bool
_timer_hide_window_cb(void *data)
{
Eo *win = (Eo*) data;
eo_do(win, efl_gfx_visible_set(EINA_FALSE));
return ECORE_CALLBACK_PASS_ON;
}
开发者ID:FlorentRevest,项目名称:Elementary,代码行数:7,代码来源:elm_test_win.c
示例13: _ector_renderer_cairo_gradient_radial_ector_renderer_generic_base_draw
// Clearly duplicated and should be in a common place...
static Eina_Bool
_ector_renderer_cairo_gradient_radial_ector_renderer_generic_base_draw(Eo *obj, Ector_Renderer_Cairo_Gradient_Radial_Data *pd, Ector_Rop op, Eina_Array *clips, unsigned int mul_col)
{
if (pd->pat) return EINA_FALSE;
Ector_Renderer_Generic_Gradient_Radial_Data *gld;
// FIXME: don't ignore clipping !
gld = eo_data_scope_get(obj, ECTOR_RENDERER_GENERIC_GRADIENT_RADIAL_MIXIN);
if (!pd->pat || !gld) return EINA_FALSE;
eo_do_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS, ector_renderer_draw(op, clips, mul_col));
USE(obj, cairo_arc, EINA_FALSE);
USE(obj, cairo_fill, EINA_FALSE);
cairo_arc(pd->parent->cairo,
gld->radial.x, gld->radial.y,
gld->radius,
0, 2 * M_PI);
eo_do(obj, ector_renderer_cairo_base_fill());
cairo_fill(pd->parent->cairo);
return EINA_TRUE;
}
开发者ID:FlorentRevest,项目名称:EFL,代码行数:26,代码来源:ector_renderer_cairo_gradient_radial.c
示例14: _evas_gl_preload_main_loop_wakeup
static void
_evas_gl_preload_main_loop_wakeup(void)
{
Evas_GL_Texture_Async_Preload *async;
evas_gl_make_current_cb cb = async_gl_make_current;
void *data = async_engine_data;
Eina_Bool running = async_loader_running;
if (running) evas_gl_preload_render_lock(cb, data);
EINA_LIST_FREE(async_loader_todie, async)
{
Eo *target;
EINA_LIST_FREE(async->tex->targets, target)
eo_do(target, evas_obj_image_pixels_dirty_set(EINA_TRUE));
async->im->cache_entry.flags.preload_done = 0;
async->tex->was_preloaded = EINA_TRUE;
async->tex->ptt->allocations = eina_list_remove(async->tex->ptt->allocations, async->tex->aptt);
pt_unref(async->tex->ptt);
async->tex->ptt = NULL;
free(async->tex->aptt);
async->tex->aptt = NULL;
evas_gl_common_texture_free(async->tex, EINA_FALSE);
evas_cache_image_drop(&async->im->cache_entry);
free(async);
}
开发者ID:jigpu,项目名称:efl,代码行数:28,代码来源:evas_gl_preload.c
示例15: _load_set
static void
_load_set(Esql_Model_Data *pd, Emodel_Load load)
{
if ((pd->load.status & (EMODEL_LOAD_STATUS_LOADED | EMODEL_LOAD_STATUS_LOADING)) &&
(load.status & (EMODEL_LOAD_STATUS_LOADED | EMODEL_LOAD_STATUS_LOADING)))
{
load.status = pd->load.status | load.status;
switch (load.status)
{
case EMODEL_LOAD_STATUS_LOADED_PROPERTIES:
load.status &= ~EMODEL_LOAD_STATUS_LOADING_PROPERTIES;
break;
case EMODEL_LOAD_STATUS_LOADING_PROPERTIES:
load.status &= ~EMODEL_LOAD_STATUS_LOADED_PROPERTIES;
break;
case EMODEL_LOAD_STATUS_LOADED_CHILDREN:
load.status &= ~EMODEL_LOAD_STATUS_LOADING_CHILDREN;
break;
case EMODEL_LOAD_STATUS_LOADING_CHILDREN:
load.status &= ~EMODEL_LOAD_STATUS_LOADED_CHILDREN;
break;
default: break;
}
}
if (pd->load.status != load.status)
{
pd->load.status = load.status;
eo_do(pd->obj, eo_event_callback_call(EMODEL_EVENT_LOAD_STATUS, &load));
}
}
开发者ID:carloslack,项目名称:esskyuehl,代码行数:31,代码来源:esql_model.c
示例16: evas_object_map_enable_set
EAPI void
evas_object_map_enable_set(Evas_Object *eo_obj, Eina_Bool enabled)
{
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
return;
MAGIC_CHECK_END();
eo_do(eo_obj, evas_obj_map_enable_set(enabled));
}
开发者ID:antognolli,项目名称:Evas,代码行数:8,代码来源:evas_map.c
示例17: evas_object_name_set
EAPI void
evas_object_name_set(Evas_Object *eo_obj, const char *name)
{
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
return;
MAGIC_CHECK_END();
eo_do(eo_obj, evas_obj_name_set(name));
}
开发者ID:jigpu,项目名称:efl,代码行数:8,代码来源:evas_name.c
示例18: edje_object_part_external_object_get
EAPI Evas_Object *
edje_object_part_external_object_get(const Evas_Object *obj, const char *part)
{
if (!obj) return NULL;
Evas_Object *ret = NULL;
eo_do((Eo *)obj, edje_obj_part_external_object_get(part, &ret));
return ret;
}
开发者ID:wjhendr,项目名称:enlightenment,代码行数:8,代码来源:edje_external.c
示例19: evas_object_data_set
EAPI void
evas_object_data_set(Evas_Object *obj, const char *key, const void *data)
{
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
return;
MAGIC_CHECK_END();
eo_do(obj, eo_base_data_set(key, data, NULL));
}
开发者ID:jigpu,项目名称:efl,代码行数:8,代码来源:evas_data.c
示例20: evas_object_raise
EAPI void
evas_object_raise(Evas_Object *eo_obj)
{
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
return;
MAGIC_CHECK_END();
eo_do(eo_obj, evas_obj_raise());
}
开发者ID:TetragrammatonHermit,项目名称:enlightenment,代码行数:8,代码来源:evas_stack.c
注:本文中的eo_do函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论