summaryrefslogtreecommitdiff
path: root/legacy/ecore/src/lib/ecore/ecore_main.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2012-03-29 08:52:25 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-03-29 08:52:25 +0000
commitedc6198ececb0c11850cba5f18a20df8e874282b (patch)
tree2a98e5e789c39ec5fac5bcff23ab96e71bacc3ef /legacy/ecore/src/lib/ecore/ecore_main.c
parent12c38ee1c9c519fa5f4a0cb626902b49af561858 (diff)
main loop checks for all of ecore -> back. (removed by cedric last year)
SVN revision: 69727
Diffstat (limited to '')
-rw-r--r--legacy/ecore/src/lib/ecore/ecore_main.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/legacy/ecore/src/lib/ecore/ecore_main.c b/legacy/ecore/src/lib/ecore/ecore_main.c
index 587c83be24..95db03dd5c 100644
--- a/legacy/ecore/src/lib/ecore/ecore_main.c
+++ b/legacy/ecore/src/lib/ecore/ecore_main.c
@@ -856,6 +856,7 @@ _ecore_main_fd_handler_del(Ecore_Fd_Handler *fd_handler)
856EAPI int 856EAPI int
857ecore_main_loop_iterate_may_block(int may_block) 857ecore_main_loop_iterate_may_block(int may_block)
858{ 858{
859 EINA_MAIN_LOOP_CHECK_RETURN_VAL(0);
859#ifndef USE_G_MAIN_LOOP 860#ifndef USE_G_MAIN_LOOP
860 _ecore_lock(); 861 _ecore_lock();
861in_main_loop++; 862in_main_loop++;
@@ -870,6 +871,7 @@ in_main_loop--;
870EAPI void 871EAPI void
871ecore_main_loop_iterate(void) 872ecore_main_loop_iterate(void)
872{ 873{
874 EINA_MAIN_LOOP_CHECK_RETURN;
873#ifndef USE_G_MAIN_LOOP 875#ifndef USE_G_MAIN_LOOP
874 _ecore_lock(); 876 _ecore_lock();
875 _ecore_main_loop_iterate_internal(1); 877 _ecore_main_loop_iterate_internal(1);
@@ -900,6 +902,7 @@ ecore_main_loop_iterate(void)
900EAPI void 902EAPI void
901ecore_main_loop_begin(void) 903ecore_main_loop_begin(void)
902{ 904{
905 EINA_MAIN_LOOP_CHECK_RETURN;
903#ifndef USE_G_MAIN_LOOP 906#ifndef USE_G_MAIN_LOOP
904 _ecore_lock(); 907 _ecore_lock();
905 in_main_loop++; 908 in_main_loop++;
@@ -928,6 +931,7 @@ ecore_main_loop_begin(void)
928EAPI void 931EAPI void
929ecore_main_loop_quit(void) 932ecore_main_loop_quit(void)
930{ 933{
934 EINA_MAIN_LOOP_CHECK_RETURN;
931 do_quit = 1; 935 do_quit = 1;
932#ifdef USE_G_MAIN_LOOP 936#ifdef USE_G_MAIN_LOOP
933 if (ecore_main_loop) 937 if (ecore_main_loop)
@@ -950,6 +954,7 @@ ecore_main_loop_quit(void)
950EAPI void 954EAPI void
951ecore_main_loop_select_func_set(Ecore_Select_Function func) 955ecore_main_loop_select_func_set(Ecore_Select_Function func)
952{ 956{
957 EINA_MAIN_LOOP_CHECK_RETURN;
953 main_loop_select = func; 958 main_loop_select = func;
954} 959}
955 960
@@ -961,6 +966,7 @@ ecore_main_loop_select_func_set(Ecore_Select_Function func)
961EAPI Ecore_Select_Function 966EAPI Ecore_Select_Function
962ecore_main_loop_select_func_get(void) 967ecore_main_loop_select_func_get(void)
963{ 968{
969 EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
964 return main_loop_select; 970 return main_loop_select;
965} 971}
966 972
@@ -974,6 +980,7 @@ ecore_main_fd_handler_add(int fd,
974{ 980{
975 Ecore_Fd_Handler *fdh = NULL; 981 Ecore_Fd_Handler *fdh = NULL;
976 982
983 EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
977 _ecore_lock(); 984 _ecore_lock();
978 985
979 if ((fd < 0) || (flags == 0) || (!func)) goto unlock; 986 if ((fd < 0) || (flags == 0) || (!func)) goto unlock;
@@ -1019,6 +1026,7 @@ ecore_main_win32_handler_add(void *h,
1019{ 1026{
1020 Ecore_Win32_Handler *wh; 1027 Ecore_Win32_Handler *wh;
1021 1028
1029 EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
1022 if (!h || !func) return NULL; 1030 if (!h || !func) return NULL;
1023 1031
1024 wh = ecore_win32_handler_calloc(1); 1032 wh = ecore_win32_handler_calloc(1);
@@ -1050,6 +1058,7 @@ ecore_main_fd_handler_del(Ecore_Fd_Handler *fd_handler)
1050{ 1058{
1051 void *ret = NULL; 1059 void *ret = NULL;
1052 1060
1061 EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
1053 _ecore_lock(); 1062 _ecore_lock();
1054 1063
1055 if (!ECORE_MAGIC_CHECK(fd_handler, ECORE_MAGIC_FD_HANDLER)) 1064 if (!ECORE_MAGIC_CHECK(fd_handler, ECORE_MAGIC_FD_HANDLER))
@@ -1068,6 +1077,7 @@ unlock:
1068EAPI void * 1077EAPI void *
1069ecore_main_win32_handler_del(Ecore_Win32_Handler *win32_handler) 1078ecore_main_win32_handler_del(Ecore_Win32_Handler *win32_handler)
1070{ 1079{
1080 EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
1071 if (!ECORE_MAGIC_CHECK(win32_handler, ECORE_MAGIC_WIN32_HANDLER)) 1081 if (!ECORE_MAGIC_CHECK(win32_handler, ECORE_MAGIC_WIN32_HANDLER))
1072 { 1082 {
1073 ECORE_MAGIC_FAIL(win32_handler, ECORE_MAGIC_WIN32_HANDLER, 1083 ECORE_MAGIC_FAIL(win32_handler, ECORE_MAGIC_WIN32_HANDLER,
@@ -1093,6 +1103,7 @@ ecore_main_fd_handler_prepare_callback_set(Ecore_Fd_Handler *fd_handler,
1093 Ecore_Fd_Prep_Cb func, 1103 Ecore_Fd_Prep_Cb func,
1094 const void *data) 1104 const void *data)
1095{ 1105{
1106 EINA_MAIN_LOOP_CHECK_RETURN;
1096 _ecore_lock(); 1107 _ecore_lock();
1097 1108
1098 if (!ECORE_MAGIC_CHECK(fd_handler, ECORE_MAGIC_FD_HANDLER)) 1109 if (!ECORE_MAGIC_CHECK(fd_handler, ECORE_MAGIC_FD_HANDLER))
@@ -1116,6 +1127,7 @@ ecore_main_fd_handler_fd_get(Ecore_Fd_Handler *fd_handler)
1116{ 1127{
1117 int fd = -1; 1128 int fd = -1;
1118 1129
1130 EINA_MAIN_LOOP_CHECK_RETURN_VAL(-1);
1119 _ecore_lock(); 1131 _ecore_lock();
1120 1132
1121 if (!ECORE_MAGIC_CHECK(fd_handler, ECORE_MAGIC_FD_HANDLER)) 1133 if (!ECORE_MAGIC_CHECK(fd_handler, ECORE_MAGIC_FD_HANDLER))
@@ -1136,6 +1148,7 @@ ecore_main_fd_handler_active_get(Ecore_Fd_Handler *fd_handler,
1136{ 1148{
1137 int ret = EINA_FALSE; 1149 int ret = EINA_FALSE;
1138 1150
1151 EINA_MAIN_LOOP_CHECK_RETURN_VAL(EINA_FALSE);
1139 _ecore_lock(); 1152 _ecore_lock();
1140 1153
1141 if (!ECORE_MAGIC_CHECK(fd_handler, ECORE_MAGIC_FD_HANDLER)) 1154 if (!ECORE_MAGIC_CHECK(fd_handler, ECORE_MAGIC_FD_HANDLER))
@@ -1158,6 +1171,7 @@ ecore_main_fd_handler_active_set(Ecore_Fd_Handler *fd_handler,
1158{ 1171{
1159 int ret; 1172 int ret;
1160 1173
1174 EINA_MAIN_LOOP_CHECK_RETURN;
1161 _ecore_lock(); 1175 _ecore_lock();
1162 1176
1163 if (!ECORE_MAGIC_CHECK(fd_handler, ECORE_MAGIC_FD_HANDLER)) 1177 if (!ECORE_MAGIC_CHECK(fd_handler, ECORE_MAGIC_FD_HANDLER))