2 * Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #include "efl_assist.h"
19 #include "efl_assist_private.h"
21 /*===========================================================================*
23 *===========================================================================*/
30 memset(&_ea, 0x00, sizeof(_ea));
32 _ea.ea_log_dom = eina_log_domain_register("efl-assist",
33 EINA_COLOR_LIGHTBLUE);
36 EINA_LOG_ERR("could not register efl-assist log domain");
37 _ea.ea_log_dom = EINA_LOG_DOMAIN_GLOBAL;
45 Ea_Event_Mgr *event_mgr;
47 //Remove Event Managers
48 EINA_LIST_FOREACH(_ea.event_mgrs, l, event_mgr)
49 ea_event_mgr_clear(event_mgr);
50 _ea.event_mgrs = eina_list_free(_ea.event_mgrs);
52 if ((_ea.ea_log_dom > - 1) && (_ea.ea_log_dom != EINA_LOG_DOMAIN_GLOBAL))
54 eina_log_domain_unregister(_ea.ea_log_dom);
60 _magic_string_get(ea_magic m)
64 return "None (Freed Object)";
66 case EA_MAGIC_CUTLINK:
74 __CONSTRUCTOR__ static void
77 if (!elm_init(0, NULL)) {
78 fprintf(stderr, "could not initialize elementary.\n");
87 __DESTRUCTOR__ static void
97 /*===========================================================================*
99 *===========================================================================*/
102 _ea_magic_fail(const void *d, ea_magic m, ea_magic req_m, const char *fname)
104 ERR("\n*** MAGIC FAIL (%s) ***\n", fname);
107 ERR(" Input handle pointer is NULL!");
108 else if (m == EA_MAGIC_NONE)
109 ERR(" Input handle has already been freed!");
111 ERR(" Input handle is wrong type\n"
112 " Expected: %08x - %s\n"
113 " Supplied: %08x - %s",
114 (unsigned int)req_m, _magic_string_get(req_m),
115 (unsigned int)m, _magic_string_get(m));
117 if (getenv("EA_ERROR_ABORT")) abort();
120 /*===========================================================================*
122 *===========================================================================*/