本文整理汇总了C++中edje_object_add函数的典型用法代码示例。如果您正苦于以下问题:C++ edje_object_add函数的具体用法?C++ edje_object_add怎么用?C++ edje_object_add使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了edje_object_add函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: _forecasts_new
static Forecasts *
_forecasts_new(Evas *evas)
{
Forecasts *w;
char buf[4096];
w = E_NEW(Forecasts, 1);
w->forecasts_obj = edje_object_add(evas);
snprintf(buf, sizeof(buf), "%s/forecasts.edj",
e_module_dir_get(forecasts_config->module));
if (!e_theme_edje_object_set(w->forecasts_obj, "base/theme/modules/forecasts",
"modules/forecasts/main"))
edje_object_file_set(w->forecasts_obj, buf, "modules/forecasts/main");
evas_object_show(w->forecasts_obj);
w->icon_obj = edje_object_add(evas);
if (!e_theme_edje_object_set(w->icon_obj, "base/theme/modules/forecasts/icons",
"modules/forecasts/icons/3200"))
edje_object_file_set(w->icon_obj, buf, "modules/forecasts/icons/3200");
edje_object_part_swallow(w->forecasts_obj, "icon", w->icon_obj);
return w;
}
开发者ID:thewaiter,项目名称:moksha-modules-extra,代码行数:25,代码来源:e_mod_main.c
示例2: _smart_add
static void
_smart_add(Evas_Object *obj)
{
Smart_Data *sd;
/* Initialize smart data and clipping */
sd = calloc(1, sizeof(Smart_Data));
if (!sd) return;
sd->obj = obj;
sd->parent = NULL;
sd->children = NULL;
sd->clip = evas_object_rectangle_add(evas_object_evas_get(obj));
evas_object_smart_member_add(sd->clip, obj);
/* Set up edje object and canvas */
sd->bg = edje_object_add(evas_object_evas_get(obj));
edje_object_file_set(sd->bg, "../../data/themes/elexika.edj", "result_list");
evas_object_move(sd->bg, 0, 0);
evas_object_clip_set(sd->bg, sd->clip);
evas_object_smart_member_add(sd->bg, obj);
evas_object_show(sd->bg);
sd->overlay = edje_object_add(evas_object_evas_get(obj));
edje_object_file_set(sd->overlay, "../../data/themes/elexika.edj", "overlay");
evas_object_move(sd->overlay, 0, 0);
evas_object_clip_set(sd->overlay, sd->clip);
evas_object_smart_member_add(sd->overlay, obj);
evas_object_show(sd->overlay);
evas_object_smart_data_set(obj, sd);
}
开发者ID:hjanetzek,项目名称:elexika,代码行数:31,代码来源:elexika_result_list.c
示例3: _elitaire_card_shadow_on
/* ***************************************************************************
* other internals
* ***************************************************************************/
static void
_elitaire_card_shadow_on(Evas_Object * card)
{
Elitaire_Card * data = NULL;
data = (Elitaire_Card *) evas_object_smart_data_get(card);
if (data) {
Evas_Coord x, y, w, h, dy;
int n;
if (data->shadow) return;
data->shadow = edje_object_add(data->eli->evas);
evas_object_smart_member_add(data->shadow, card);
if (!edje_object_file_set(data->shadow, data->eli->file, "elitaire/card/shadow"))
fprintf(stderr, _("Elitaire Error: The shadow pic is missed!\n"));
n = elitaire_card_chain_length_calc(card);
dy = elitaire_card_offset_get(data->eli);
evas_object_geometry_get(card, &x, &y, &w, &h);
evas_object_move(data->shadow, x, y);
evas_object_resize(data->shadow, w, h + n * dy);
evas_object_clip_set(data->shadow, data->eli->clip);
evas_object_show(data->shadow);
evas_object_stack_below(data->shadow, data->image);
}
}
开发者ID:playya,项目名称:Enlightenment,代码行数:32,代码来源:elitaire_card_jobs.cpp
示例4: e_gadcon_popup_new
EAPI E_Gadcon_Popup *
e_gadcon_popup_new(E_Gadcon_Client *gcc)
{
E_Gadcon_Popup *pop;
Evas_Object *o;
E_Zone *zone;
pop = E_OBJECT_ALLOC(E_Gadcon_Popup, E_GADCON_POPUP_TYPE, _e_gadcon_popup_free);
if (!pop) return NULL;
zone = e_gadcon_client_zone_get(gcc);
pop->win = e_popup_new(zone, 0, 0, 0, 0);
e_popup_layer_set(pop->win, 350);
o = edje_object_add(pop->win->evas);
e_theme_edje_object_set(o, "base/theme/gadman", "e/gadman/popup");
evas_object_show(o);
evas_object_move(o, 0, 0);
e_popup_edje_bg_object_set(pop->win, o);
pop->o_bg = o;
pop->gcc = gcc;
pop->gadcon_lock = 1;
pop->gadcon_was_locked = 0;
return pop;
}
开发者ID:Limsik,项目名称:e17,代码行数:26,代码来源:e_gadcon_popup.c
示例5: elm_separator_add
EAPI Evas_Object *
elm_separator_add(Evas_Object *parent)
{
Evas_Object *obj;
Evas *e;
Widget_Data *wd;
ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
ELM_SET_WIDTYPE(widtype, "separator");
wd->horizontal = EINA_FALSE;
elm_widget_type_set(obj, "separator");
elm_widget_sub_object_add(parent, obj);
elm_widget_data_set(obj, wd);
elm_widget_del_hook_set(obj, _del_hook);
elm_widget_theme_hook_set(obj, _theme_hook);
elm_widget_can_focus_set(obj, EINA_FALSE);
wd->sep = edje_object_add(e);
_elm_theme_object_set(obj, wd->sep, "separator", "vertical", "default");
elm_widget_resize_object_set(obj, wd->sep);
_mirrored_set(obj, elm_widget_mirrored_get(obj));
_sizing_eval(obj);
return obj;
}
开发者ID:TizenChameleon,项目名称:uifw-elementary,代码行数:25,代码来源:elm_separator.c
示例6: elicit_band_new
Elicit_Band *
elicit_band_new(const char *theme_file)
{
Elicit_Band *band;
band = calloc(1, sizeof(Elicit_Band));
//XXX allow other engines
band->ee = ecore_evas_software_x11_new(0,0,0,0,10,10);
ecore_evas_borderless_set(band->ee, 1);
if (ecore_x_screen_is_composited(0))
ecore_evas_alpha_set(band->ee, 1);
else
ecore_evas_shaped_set(band->ee, 1);
band->obj = edje_object_add(ecore_evas_get(band->ee));
//XXX theme file!
if (!edje_object_file_set(band->obj, theme_file, "elicit.band"))
{
fprintf(stderr, "[Elicit] Error: Can't set band theme\n");
}
evas_object_move(band->obj, 0, 0);
evas_object_show(band->obj);
return band;
}
开发者ID:Elive,项目名称:elicit,代码行数:27,代码来源:band.c
示例7: 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
示例8: e_widget_frametable_add
/* externally accessible functions */
EAPI Evas_Object *
e_widget_frametable_add(Evas *evas, const char *label, int homogenous)
{
Evas_Object *obj, *o;
E_Widget_Data *wd;
Evas_Coord mw, mh;
obj = e_widget_add(evas);
e_widget_del_hook_set(obj, _e_wid_del_hook);
e_widget_disable_hook_set(obj, _e_wid_disable_hook);
wd = calloc(1, sizeof(E_Widget_Data));
e_widget_data_set(obj, wd);
o = edje_object_add(evas);
wd->o_frame = o;
e_theme_edje_object_set(o, "base/theme/widgets",
"e/widgets/frame");
edje_object_part_text_set(o, "e.text.label", label);
evas_object_show(o);
e_widget_sub_object_add(obj, o);
e_widget_resize_object_set(obj, o);
o = e_table_add(evas);
wd->o_table = o;
e_table_homogenous_set(o, homogenous);
edje_object_part_swallow(wd->o_frame, "e.swallow.content", o);
e_widget_sub_object_add(obj, o);
evas_object_show(o);
edje_object_size_min_calc(wd->o_frame, &mw, &mh);
e_widget_size_min_set(obj, mw, mh);
return obj;
}
开发者ID:jordemort,项目名称:e17,代码行数:36,代码来源:e_widget_frametable.c
示例9: main
int main(int argc, char **argv) {
init_efl();
char *theme = find_theme();
if (!theme)
fatal("Could not find theme");
Ecore_Evas *ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, 400, 400);
if (!ee) {
fprintf(stderr, "FATAL: Could not get an ee...\n");
exit(1);
}
Ecore_X_Screen_Size sz = get_screen_size(ee);
ecore_evas_resize(ee, sz.width, sz.height);
ecore_evas_title_set(ee, "Launcher");
ecore_evas_borderless_set(ee, 1);
ecore_evas_fullscreen_set(ee, 1);
Evas *evas = ecore_evas_get(ee);
Evas_Object *edje = edje_object_add(evas);
edje_object_file_set(edje, theme, "main");
evas_object_move(edje, 0, 0);
evas_object_resize(edje, sz.width, sz.height);
evas_object_show(edje);
ecore_evas_show(ee);
ecore_main_loop_begin();
shutdown_efl();
return 0;
}
开发者ID:derobert,项目名称:DebianLINK,代码行数:34,代码来源:nl-launcher.c
示例10: eyelight_viewer_slideshow_start
void eyelight_viewer_slideshow_start(Eyelight_Viewer* pres,int select)
{
Evas_Object *o;
int w_win, h_win;
const char* data;
evas_output_viewport_get(pres->evas, NULL, NULL, &w_win, &h_win);
pres->state = EYELIGHT_VIEWER_STATE_SLIDESHOW;
pres->slideshow_current = select;
o = edje_object_add(pres->evas);
pres->slideshow_background = o;
if(edje_object_file_set(o, pres->theme, "eyelight/slideshow") == 0)
WARN("eyelight_viewer_slideshow_start(), edje_object_file_set() erreur!");
data = edje_object_data_get(o, "nb_slides");
pres->slideshow_nb_slides = atoi(data);
evas_object_show(o);
evas_object_resize(o, pres->current_size_w, pres->current_size_h);
edje_object_scale_set(o, pres->current_scale);
evas_object_smart_member_add(o, pres->smart_obj);
evas_object_move(o, pres->current_pos_x, pres->current_pos_y);
evas_object_clip_set(o, pres->current_clip);
edje_object_signal_callback_add(o,"slideshow,slide,next","eyelight",_eyelight_viewer_slideshow_next_cb,pres);
edje_object_signal_callback_add(o,"slideshow,slide,previous","eyelight",_eyelight_viewer_slideshow_previous_cb,pres);
edje_object_signal_callback_add(o,"slideshow,next,end","eyelight",_eyelight_viewer_slideshow_next_end_cb,pres);
edje_object_signal_callback_add(o,"slideshow,previous,end","eyelight",_eyelight_viewer_slideshow_previous_end_cb,pres);
_eyelight_viewer_slideshow_slides_load(pres);
edje_object_signal_emit(pres->slideshow_background,
"show","eyelight");
}
开发者ID:Limsik,项目名称:e17,代码行数:34,代码来源:eyelight_viewer_slideshow.c
示例11: e_widget_label_add
/* externally accessible functions */
EAPI Evas_Object *
e_widget_label_add(Evas *evas, const char *label)
{
Evas_Object *obj, *o;
Evas_Coord mw, mh;
E_Widget_Data *wd;
obj = e_widget_add(evas);
e_widget_del_hook_set(obj, _e_wid_del_hook);
e_widget_disable_hook_set(obj, _e_wid_disable_hook);
wd = calloc(1, sizeof(E_Widget_Data));
e_widget_data_set(obj, wd);
o = edje_object_add(evas);
e_theme_edje_object_set(o, "base/theme/widgets",
"e/widgets/label");
wd->text = o;
edje_object_part_text_set(o, "e.text.label", label);
evas_object_show(o);
edje_object_size_min_calc(o, &mw, &mh);
e_widget_can_focus_set(obj, 0);
e_widget_size_min_set(obj, mw, mh);
e_widget_sub_object_add(obj, o);
e_widget_resize_object_set(obj, o);
return obj;
}
开发者ID:amitesh-singh,项目名称:Enlightenment,代码行数:28,代码来源:e_widget_label.c
示例12: e_icon_file_edje_set
EAPI Eina_Bool
e_icon_file_edje_set(Evas_Object *obj, const char *file, const char *part)
{
E_Smart_Data *sd;
if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0);
if (!(sd = evas_object_smart_data_get(obj)))
return EINA_FALSE;
/* smart code here */
if (sd->obj) evas_object_del(sd->obj);
sd->loading = 0;
if (sd->fdo)
{
eina_stringshare_del(sd->fdo);
sd->fdo = NULL;
}
if (sd->timer) ecore_timer_del(sd->timer);
sd->timer = NULL;
if (sd->guessing_animation) ecore_timer_del(sd->guessing_animation);
sd->guessing_animation = NULL;
sd->frame = 0;
sd->frame_count = 0;
sd->edje = EINA_TRUE;
sd->obj = edje_object_add(evas_object_evas_get(obj));
edje_object_file_set(sd->obj, file, part);
if (edje_object_load_error_get(sd->obj) != EDJE_LOAD_ERROR_NONE)
return EINA_FALSE;
if (evas_object_visible_get(obj)) evas_object_show(sd->obj);
evas_object_smart_member_add(sd->obj, obj);
_e_icon_smart_reconfigure(sd);
return EINA_TRUE;
}
开发者ID:haxworx,项目名称:Enform,代码行数:35,代码来源:e_icon.c
示例13: _gc_init
static E_Gadcon_Client *
_gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style)
{
Instance *inst;
E_Gadcon_Client *gcc;
char buf[PATH_MAX];
snprintf(buf, sizeof(buf), "%s/exalt.edj", e_module_dir_get(exalt_config->module));
inst = E_NEW(Instance, 1);
inst->o_button = edje_object_add(gc->evas);
if (!e_theme_edje_object_set(inst->o_button, "base/theme/modules/exalt",
"modules/exalt/main"))
edje_object_file_set(inst->o_button, buf, "e/modules/exalt/main");
gcc = e_gadcon_client_new(gc, name, id, style, inst->o_button);
gcc->data = inst;
inst->gcc = gcc;
evas_object_event_callback_add(inst->o_button, EVAS_CALLBACK_MOUSE_DOWN, _cb_mouse_down, inst);
exalt_config->instances = evas_list_append(exalt_config->instances, inst);
exalt_dbus_notify_set( exalt_config->conn, _exalt_notify_cb, inst);
return gcc;
}
开发者ID:BackupTheBerlios,项目名称:exalt-svn,代码行数:27,代码来源:e_mod_gadcon.c
示例14: START_TEST
END_TEST
START_TEST(edje_test_simple_layout_geometry)
{
int x, y, w, h;
int r, g, b, a;
Evas *evas = EDJE_TEST_INIT_EVAS();
Evas_Object *obj, *bg;
obj = edje_object_add(evas);
fail_unless(edje_object_file_set(obj, test_layout_get("test_layout.edj"), "test_group"));
/* rel1.relative: 0.0 0.0;
* rel2.relative: 1.0 1.0; */
evas_object_resize(obj, 1000, 1000);
edje_object_part_geometry_get(obj, "background", &x, &y, &w, &h);
fail_if(x != 0 || y != 0);
fail_if(w != 1000 || h != 1000);
bg = edje_object_part_object_get(obj, "background");
fail_if(!bg);
evas_object_color_get(bg, &r, &g, &b, &a);
fail_if(r != 255 || g != 255 || b != 255 || a != 255);
EDJE_TEST_FREE_EVAS();
}
开发者ID:jigpu,项目名称:efl,代码行数:28,代码来源:edje_test_edje.c
示例15: enna_panel_infos_set_cover
void
enna_panel_infos_set_cover(Evas_Object *obj, Enna_Metadata *m)
{
Evas_Object *cover;
char *file = NULL;
int from_vfs = 1;
const char *cv;
Smart_Data *sd = evas_object_data_get(obj, "sd");
if (!sd)
return;
if (!m)
{
file = strdup(VIDEO_DEFAULT_COVER);
from_vfs = 0;
}
cv = enna_metadata_meta_get(m, "cover", 1);
if (!file && cv)
{
char dst[1024] = { 0 };
snprintf(dst, sizeof(dst), "%s/covers/%s",
enna_util_data_home_get(), cv);
if (ecore_file_exists(dst))
file = strdup(dst);
}
if (!file)
{
file = strdup(VIDEO_DEFAULT_COVER);
from_vfs = 0;
}
if (from_vfs)
{
cover = elm_icon_add(sd->o_edje);
elm_image_file_set(cover, file, NULL);
}
else
{
cover = edje_object_add(evas_object_evas_get(sd->o_edje));
edje_object_file_set(cover, enna_config_theme_get(), file);
}
ENNA_OBJECT_DEL(sd->o_cover);
sd->o_cover = cover;
edje_object_part_swallow(sd->o_edje,
"panel.cover.swallow", sd->o_cover);
/* hide underlying shadows with default movie poster cover */
edje_object_signal_emit(sd->o_edje,
(!strcmp(file, VIDEO_DEFAULT_COVER)) ?
"shadow,hide" : "shadow,show", "enna");
eina_stringshare_del(cv);
eina_stringshare_del(file);
}
开发者ID:enna-project,项目名称:enna,代码行数:60,代码来源:video_infos.c
示例16: enna_panel_infos_set_rating
void
enna_panel_infos_set_rating(Evas_Object *obj, Enna_Metadata *m)
{
Evas_Object *rating = NULL;
const char *rt;
Smart_Data *sd = evas_object_data_get(obj, "sd");
if (!sd)
return;
rt = enna_metadata_meta_get(m, "rating", 1);
if (rt)
{
char rate[16];
int r;
r = MMAX(atoi(rt), 0);
r = MMIN(r, 5);
memset(rate, '\0', sizeof(rate));
snprintf(rate, sizeof(rate), "rating/%d", r);
rating = edje_object_add(evas_object_evas_get(sd->o_edje));
edje_object_file_set(rating, enna_config_theme_get(), rate);
}
ENNA_OBJECT_DEL(sd->o_rating);
sd->o_rating = rating;
edje_object_part_swallow(sd->o_edje,
"panel.rating.swallow", sd->o_rating);
eina_stringshare_del(rt);
}
开发者ID:enna-project,项目名称:enna,代码行数:30,代码来源:video_infos.c
示例17: emusic_slider_creat
int
emusic_slider_creat(Em_Smart_Data *em)
{
Evas_Object *slider, *obj;
sd = calloc(1, sizeof(Smart_Data));
if (!sd) return FALSE;
obj = edje_object_add(em->evas);
if (!edje_object_file_set(obj, emusic_config_theme_get(), "widget/slider"))
{
int err = edje_object_load_error_get(obj);
const char *errmsg = edje_load_error_str(err);
ERR("cannot load theme '%s', group '%s': %s\n",
emusic_config_theme_get(),"widget/slider", errmsg);
evas_object_del(obj);
return NULL;
}
em->slider = obj;
slider = elm_slider_add(obj);
evas_object_smart_callback_add(slider, "changed", _slider_changed_cb, em);
elm_slider_label_set(slider, "Label");
elm_slider_unit_format_set(slider, "%1.1f units");
elm_slider_span_size_set(slider, 120);
evas_object_size_hint_align_set(slider, EVAS_HINT_FILL, 0.5);
evas_object_size_hint_weight_set(slider, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
edje_object_part_swallow(obj, "slider.swallow", slider);
evas_object_show(slider);
sd->slider = slider;
return 1;
}
开发者ID:mink365,项目名称:e_music,代码行数:33,代码来源:emusic_slider.c
示例18: _gc_init
/* Gadcon Api Functions */
static E_Gadcon_Client *
_gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style)
{
E_Music_Control_Instance *inst;
E_Music_Control_Module_Context *ctxt;
EINA_SAFETY_ON_NULL_RETURN_VAL(music_control_mod, NULL);
ctxt = music_control_mod->data;
inst = calloc(1, sizeof(E_Music_Control_Instance));
inst->ctxt = ctxt;
inst->gadget = edje_object_add(gc->evas);
e_theme_edje_object_set(inst->gadget, "base/theme/modules/music-control",
"modules/music-control/main");
inst->gcc = e_gadcon_client_new(gc, name, id, style, inst->gadget);
inst->gcc->data = inst;
evas_object_event_callback_add(inst->gadget, EVAS_CALLBACK_MOUSE_DOWN, music_control_mouse_down_cb, inst);
ctxt->instances = eina_list_append(ctxt->instances, inst);
_actions_register(ctxt);
return inst->gcc;
}
开发者ID:maikodaraine,项目名称:EnlightenmentUbuntu,代码行数:26,代码来源:e_mod_main.c
示例19: main
int main(void) {
Evas_Object *o;
Ecore_Evas *ee;
int r;
evas_init();
ecore_init();
ecore_evas_init();
edje_init();
ee = ecore_evas_new(NULL, 0, 0, 320, 240, NULL);
if (!ee)
return -1;
o = edje_object_add(ecore_evas_get(ee));
if (!edje_object_file_set(o, "test.edj", "main")) {
fprintf(stderr, "could not load edje: %d\n",
edje_object_load_error_get(o));
return -2;
}
evas_object_resize(o, 320, 240);
evas_object_show(o);
ecore_evas_alpha_set(ee, 1);
ecore_evas_borderless_set(ee, 1);
ecore_evas_show(ee);
ecore_main_loop_begin();
return 0;
}
开发者ID:barbieri,项目名称:barbieri-playground,代码行数:30,代码来源:test-transp-bg.c
示例20: elexika_result_list_append
void
elexika_result_list_append(Evas_Object *obj, Eina_List *list)
{
Evas_Object *o;
Smart_Data *sd;
Evas_Coord minw, minh;
Eina_List *l;
Match *match;
sd = evas_object_smart_data_get(obj);
if (!sd) return;
for (l = list; l; l = l->next) {
match = l->data;
o = edje_object_add(evas_object_evas_get(sd->obj));
edje_object_file_set(o, "../../data/themes/elexika.edj", "result");
edje_object_part_text_set(o, "result.text", match->str);
evas_object_clip_set(o, sd->clip);
evas_object_smart_member_add(o, obj);
sd->children = eina_list_append(sd->children, o);
if (eina_list_count(sd->children) % 2 == 0)
edje_object_signal_emit(o, "result,state,even", "result_list");
evas_object_stack_below(o, sd->overlay);
evas_object_show(o);
}
_sizing_eval(obj);
}
开发者ID:hjanetzek,项目名称:elexika,代码行数:30,代码来源:elexika_result_list.c
注:本文中的edje_object_add函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论