本文整理汇总了C++中edje_object_add函数的典型用法代码示例。如果您正苦于以下问题:C++ edje_object_add函数的具体用法?C++ edje_object_add怎么用?C++ edje_object_add使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了edje_object_add函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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);
}
示例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);
}
}
示例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;
}
示例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;
}
示例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;
}
示例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();
}
示例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;
}
示例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;
}
示例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");
}
示例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;
}
示例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;
}
示例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;
}
示例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();
}
示例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);
}