当前位置: 首页>>代码示例>>C++>>正文


C++ ECORE_MAGIC_FAIL函数代码示例

本文整理汇总了C++中ECORE_MAGIC_FAIL函数的典型用法代码示例。如果您正苦于以下问题:C++ ECORE_MAGIC_FAIL函数的具体用法?C++ ECORE_MAGIC_FAIL怎么用?C++ ECORE_MAGIC_FAIL使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了ECORE_MAGIC_FAIL函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ecore_animator_del

EAPI void *
ecore_animator_del(Ecore_Animator *animator)
{
   void *data = NULL;

   EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
   _ecore_lock();
   if (!ECORE_MAGIC_CHECK(animator, ECORE_MAGIC_ANIMATOR))
     {
        ECORE_MAGIC_FAIL(animator, ECORE_MAGIC_ANIMATOR,
                         "ecore_animator_del");
        goto unlock;
     }
   if (animator->delete_me)
     {
        data = animator->data;
        goto unlock;
     }
   animator->delete_me = EINA_TRUE;
   animators_delete_me++;
   if (animator->run_func)
     data = animator->run_data;
   else
     data = animator->data;
unlock:
   _ecore_unlock();
   return data;
}
开发者ID:wargio,项目名称:e17,代码行数:28,代码来源:ecore_anim.c

示例2: ecore_timer_pending_get

/**
 * Get the pending time regarding a timer.
 *
 * @param        timer The timer to learn from.
 * @ingroup        Ecore_Time_Group
 */
EAPI double
ecore_timer_pending_get(Ecore_Timer *timer)
{
   double now;
   double ret = 0.0;

   _ecore_lock();

   if (!ECORE_MAGIC_CHECK(timer, ECORE_MAGIC_TIMER))
     {
        ECORE_MAGIC_FAIL(timer, ECORE_MAGIC_TIMER,
                         "ecore_timer_pending_get");
        goto unlock;
     }

   now = ecore_time_get();

   if (timer->frozen)
     ret = timer->pending;
   else
     ret = timer->at - now;
unlock:
   _ecore_unlock();
   return ret;
}
开发者ID:roman5566,项目名称:EFL-PS3,代码行数:31,代码来源:ecore_timer.c

示例3: ecore_timer_thaw

/**
 * Resumes a frozen (paused) timer.
 *
 * @param timer The timer to be resumed.
 *
 * The timer will be resumed from its previous relative position in time. That
 * means, if it had X seconds remaining until expire when it was paused, it will
 * be started now with those same X seconds remaining to expire again. But
 * notice that the interval time won't be touched by this call or by
 * ecore_timer_freeze().
 *
 * @see ecore_timer_freeze()
 */
EAPI void
ecore_timer_thaw(Ecore_Timer *timer)
{
   double now;

   _ecore_lock();

   if (!ECORE_MAGIC_CHECK(timer, ECORE_MAGIC_TIMER))
     {
        ECORE_MAGIC_FAIL(timer, ECORE_MAGIC_TIMER,
                         "ecore_timer_thaw");
        goto unlock;
     }

   /* Timer not frozen */
   if (!timer->frozen)
     goto unlock;

   suspended = (Ecore_Timer *)eina_inlist_remove(EINA_INLIST_GET(suspended), EINA_INLIST_GET(timer));
   now = ecore_time_get();

   _ecore_timer_set(timer, timer->pending + now, timer->in, timer->func, timer->data);
unlock:
   _ecore_unlock();
}
开发者ID:roman5566,项目名称:EFL-PS3,代码行数:38,代码来源:ecore_timer.c

示例4: ecore_con_url_http_post_send

/**
 * Send a Curl httppost 
 * @return 1 on success, 0 on error.
 * @ingroup Ecore_Con_Url_Group
 */
EAPI int
ecore_con_url_http_post_send(Ecore_Con_Url *url_con, void *httppost)
{
#ifdef HAVE_CURL
  if (url_con->post)
    curl_formfree(url_con->post);
  url_con->post = NULL;

  if (!ECORE_MAGIC_CHECK(url_con, ECORE_MAGIC_CON_URL))
    {
      ECORE_MAGIC_FAIL(url_con, ECORE_MAGIC_CON_URL, "ecore_con_url_http_post_send");
      return 0;
    }

  url_con->post = httppost;
  
  if (url_con->active) return 0;
  if (!url_con->url) return 0;  
  
  curl_easy_setopt(url_con->curl_easy, CURLOPT_HTTPPOST, httppost);
  
  return ecore_con_url_send(url_con, NULL, 0, NULL);
#else
  return 0;
  url_con = NULL;
#endif
}
开发者ID:OpenInkpot-archive,项目名称:ecore,代码行数:32,代码来源:ecore_con_url.c

示例5: ecore_con_url_url_set

/**
 * Sets the URL to send the request to.
 *
 * @param url_con Connection object through which the request will be sent.
 * @param url URL that will receive the request
 *
 * @return 1 on success, 0 on error.
 *
 * @ingroup Ecore_Con_Url_Group
 */
EAPI int
ecore_con_url_url_set(Ecore_Con_Url *url_con, const char *url)
{
#ifdef HAVE_CURL
   if (!ECORE_MAGIC_CHECK(url_con, ECORE_MAGIC_CON_URL))
     {
	ECORE_MAGIC_FAIL(url_con, ECORE_MAGIC_CON_URL, "ecore_con_url_url_set");
	return 0;
     }

   if (url_con->active) return 0;

   if (url_con->url) free(url_con->url);
   url_con->url = NULL;
   if (url) url_con->url = strdup(url);
   if (url_con->url)
     curl_easy_setopt(url_con->curl_easy, CURLOPT_URL, url_con->url);
   else
     curl_easy_setopt(url_con->curl_easy, CURLOPT_URL, "");
   return 1;
#else
   return 0;
   url_con = NULL;
   url = NULL;
#endif
}
开发者ID:OpenInkpot-archive,项目名称:ecore,代码行数:36,代码来源:ecore_con_url.c

示例6: ecore_con_url_httpauth_set

/**
 * Sets url_con to use http auth, with given username and password, "safely" or not.
 *
 * @param url_con Connection object to perform a request on, previously created
 *		  with ecore_con_url_new() or ecore_con_url_custom_new().
 * @param username Username to use in authentication
 * @param password Password to use in authentication
 * @param safe Whether to use "safer" methods (eg, NOT http basic auth)
 *
 * @return 1 on success, 0 on error.
 *
 * @ingroup Ecore_Con_Url_Group
 */
EAPI int
ecore_con_url_httpauth_set(Ecore_Con_Url *url_con, const char *username, const char *password, Eina_Bool safe)
{
#ifdef HAVE_CURL
   if (!ECORE_MAGIC_CHECK(url_con, ECORE_MAGIC_CON_URL))
     {
	ECORE_MAGIC_FAIL(url_con, ECORE_MAGIC_CON_URL, "ecore_con_url_httpauth_set");
	return 0;
     }
# ifdef CURLOPT_USERNAME
#  ifdef CURLOPT_PASSWORD   
   if ((username != NULL) && (password != NULL))
     {
	if (safe)
          curl_easy_setopt(url_con->curl_easy, CURLOPT_HTTPAUTH, CURLAUTH_ANYSAFE);
	else
          curl_easy_setopt(url_con->curl_easy, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
	curl_easy_setopt(url_con->curl_easy, CURLOPT_USERNAME, username);
	curl_easy_setopt(url_con->curl_easy, CURLOPT_PASSWORD, password);
        return 1;
     }
#  endif
# endif
#endif
   return 0;
}
开发者ID:OpenInkpot-archive,项目名称:ecore,代码行数:39,代码来源:ecore_con_url.c

示例7: ecore_imf_context_del

EAPI void
ecore_imf_context_del(Ecore_IMF_Context *ctx)
{
   Ecore_IMF_Func_Node *fn;

   if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
     {
        ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
                         "ecore_imf_context_del");
        return;
     }

   if (show_req_ctx == ctx)
     show_req_ctx = NULL;

   if (ctx->klass->del) ctx->klass->del(ctx);

   if (ctx->callbacks)
     {
        EINA_LIST_FREE(ctx->callbacks, fn)
           free(fn);
     }

   if (ctx->input_panel_callbacks)
     {
        EINA_LIST_FREE(ctx->input_panel_callbacks, fn)
           free(fn);
     }

   ECORE_MAGIC_SET(ctx, ECORE_MAGIC_NONE);
   free(ctx);
}
开发者ID:caivega,项目名称:efl-1,代码行数:32,代码来源:ecore_imf_context.c

示例8: ecore_exe_free

EAPI void *
ecore_exe_free(Ecore_Exe *exe)
{
   void *data;

   if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
     {
        ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_free");
        return NULL;
     }

   data = exe->data;

   if (exe->pre_free_cb)
     exe->pre_free_cb(data, exe);

   CloseHandle(exe->process2);
   CloseHandle(exe->process_thread);
   CloseHandle(exe->process);
   free(exe->cmd);
   _ecore_exe_win32_pipes_close(exe);
   exes = (Ecore_Exe *)eina_inlist_remove(EINA_INLIST_GET(exes), EINA_INLIST_GET(exe));
   ECORE_MAGIC_SET(exe, ECORE_MAGIC_NONE);
   if (exe->tag) free(exe->tag);
   free(exe);

   return data;
}
开发者ID:Limsik,项目名称:e17,代码行数:28,代码来源:ecore_exe_win32.c

示例9: ecore_timer_interval_set

/**
 * Change the interval the timer ticks of. If set during
 * a timer call, this will affect the next interval.
 *
 * @param   timer The timer to change.
 * @param   in    The interval in seconds.
 * @ingroup Ecore_Time_Group
 */
EAPI void ecore_timer_interval_set(Ecore_Timer * timer, double in)
{
	if (!ECORE_MAGIC_CHECK(timer, ECORE_MAGIC_TIMER)) {
		ECORE_MAGIC_FAIL(timer, ECORE_MAGIC_TIMER,
				 "ecore_timer_interval_set");
		return;
	}
	timer->in = in;
}
开发者ID:Distrotech,项目名称:gnutls,代码行数:17,代码来源:ecore_timer.c

示例10: ecore_timer_interval_get

/**
 * Get the interval the timer ticks on.
 *
 * @param   timer The timer to retrieve the interval from
 * @return  The interval on success. -1 on failure.
 * @ingroup Ecore_Time_Group
 */
EAPI double ecore_timer_interval_get(Ecore_Timer * timer)
{
	if (!ECORE_MAGIC_CHECK(timer, ECORE_MAGIC_TIMER)) {
		ECORE_MAGIC_FAIL(timer, ECORE_MAGIC_TIMER,
				 "ecore_timer_interval_get");
		return -1.0;
	}

	return timer->in;
}
开发者ID:Distrotech,项目名称:gnutls,代码行数:17,代码来源:ecore_timer.c

示例11: ecore_exe_flags_get

EAPI Ecore_Exe_Flags
ecore_exe_flags_get(const Ecore_Exe *exe)
{
   if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
     {
        ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_data_get");
        return 0;
     }
   return exe->flags;
}
开发者ID:Limsik,项目名称:e17,代码行数:10,代码来源:ecore_exe_win32.c

示例12: ecore_exe_data_get

EAPI void *
ecore_exe_data_get(const Ecore_Exe *exe)
{
   if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
     {
        ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_data_get");
        return NULL;
     }
   return exe->data;
}
开发者ID:Limsik,项目名称:e17,代码行数:10,代码来源:ecore_exe_win32.c

示例13: ecore_exe_cmd_get

EAPI const char *
ecore_exe_cmd_get(const Ecore_Exe *exe)
{
   if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
     {
        ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_cmd_get");
        return NULL;
     }
   return exe->cmd;
}
开发者ID:Limsik,项目名称:e17,代码行数:10,代码来源:ecore_exe_win32.c

示例14: ecore_exe_pid_get

EAPI pid_t
ecore_exe_pid_get(const Ecore_Exe *exe)
{
   if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
     {
        ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_pid_get");
        return -1;
     }
   return exe->process_id;
}
开发者ID:Limsik,项目名称:e17,代码行数:10,代码来源:ecore_exe_win32.c

示例15: ecore_exe_close_stdin

EAPI void
ecore_exe_close_stdin(Ecore_Exe *exe)
{
   if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
     {
        ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_close_stdin");
        return;
     }
   exe->close_stdin = 1;
}
开发者ID:Limsik,项目名称:e17,代码行数:10,代码来源:ecore_exe_win32.c


注:本文中的ECORE_MAGIC_FAIL函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。