コード例 #1
0
ファイル: emerite.c プロジェクト: jeanguyomarch/Email
EOLIAN static Eo_Base *
_emerite_eo_base_constructor(Eo *obj, Emerite_Data *pd)
{
    Eina_Bool chk;
    char exe[PATH_MAX];
    const char exe_name[] = "emerite";

    obj = eo_constructor(eo_super(obj, MY_CLASS));

    if (email_in_tree_is())
    {
        snprintf(exe, sizeof(exe), "%s/emerite/%s", BUILD_BIN_DIR, exe_name);
    }
    else
    {
        snprintf(exe, sizeof(exe), "%s", exe_name);
    }
    exe[sizeof(exe) - 1] = '\0';

    pd->exe = ecore_exe_pipe_run(exe, ECORE_EXE_TERM_WITH_PARENT, pd);
    if (EINA_UNLIKELY(!pd->exe))
    {
        EINA_LOG_CRIT("Failed to create Ecore_Exe");
        return NULL; // FIXME leak
    }

    chk = email_subprocess_callback_register(pd->exe, ECORE_EXE_EVENT_DEL,
            _exe_del_cb, obj);
    if (EINA_UNLIKELY(!chk))
    {
        EINA_LOG_CRIT("Failed to register deletion callback");
        return NULL; // FIXME leak
    }
    return obj;
}
コード例 #2
0
ファイル: elm_mapbuf.c プロジェクト: tasn/elementary
   ELM_MAPBUF_DATA_GET(obj, sd);
   if (sd->content)
     {
        evas_object_size_hint_min_get(sd->content, &minw, &minh);
        evas_object_size_hint_max_get(sd->content, &maxw, &maxh);
     }
   evas_object_size_hint_min_set(obj, minw, minh);
   evas_object_size_hint_max_set(obj, maxw, maxh);
}

EOLIAN static Eina_Bool
_elm_mapbuf_elm_widget_theme_apply(Eo *obj, Elm_Mapbuf_Data *sd EINA_UNUSED)
{
   Eina_Bool int_ret = EINA_FALSE;
   int_ret = elm_obj_widget_theme_apply(eo_super(obj, MY_CLASS));
   if (!int_ret) return EINA_FALSE;

   _sizing_eval(obj);

   return EINA_TRUE;
}

static void
_changed_size_hints_cb(void *data,
                       Evas *e EINA_UNUSED,
                       Evas_Object *obj EINA_UNUSED,
                       void *event_info EINA_UNUSED)
{
   _sizing_eval(data);
}