Download

Support

/build/buildd/efreet-0.5.0.49898/src/lib/efreet_private.h

Go to the documentation of this file.
00001 /* vim: set sw=4 ts=4 sts=4 et: */
00002 #ifndef EFREET_PRIVATE_H
00003 #define EFREET_PRIVATE_H
00004 
00005 #include <Eet.h>
00006 
00007 #undef alloca
00008 #ifdef HAVE_ALLOCA_H
00009 # include <alloca.h>
00010 #elif defined __GNUC__
00011 # define alloca __builtin_alloca
00012 #elif defined _AIX
00013 # define alloca __alloca
00014 #elif defined _MSC_VER
00015 # include <malloc.h>
00016 # define alloca _alloca
00017 #else
00018 # include <stddef.h>
00019 # ifdef  __cplusplus
00020 extern "C"
00021 # endif
00022 void *alloca (size_t);
00023 #endif
00024 
00025 
00039 #define NEW(x, c) calloc(c, sizeof(x))
00040 
00045 #define FREE(x) do { free(x); x = NULL; } while (0)
00046 
00051 #define IF_FREE(x) do { if (x) FREE(x); } while (0)
00052 
00057 #define IF_RELEASE(x) do { \
00058     if (x) { \
00059         const char *__tmp; __tmp = (x); (x) = NULL; eina_stringshare_del(__tmp); \
00060     } \
00061     (x) = NULL; \
00062 } while (0)
00063 
00068 #define IF_FREE_LIST(list, free_cb) do { \
00069     while (list) \
00070     { \
00071         free_cb(eina_list_data_get(list)); \
00072         list = eina_list_remove_list(list, list); \
00073     } \
00074 } while (0)
00075 
00080 #define IF_FREE_HASH(x) do { \
00081     if (x) { \
00082         Eina_Hash *__tmp; __tmp = (x); (x) = NULL; eina_hash_free(__tmp); \
00083     } \
00084     (x) = NULL; \
00085 } while (0)
00086 
00092 extern int _efreet_log_dom_global;
00093 #ifdef EFREET_DEFAULT_LOG_COLOR
00094 #undef EFREET_DEFAULT_LOG_COLOR
00095 #endif
00096 #define EFREET_DEFAULT_LOG_COLOR "\033[36m"
00097 
00098 #define EFREET_MODULE_LOG_DOM _efreet_log_dom_global; /*default log domain for each module. It can redefined inside each module */
00099 #ifdef ERROR
00100 #undef ERROR
00101 #endif
00102 #define ERROR(...) EINA_LOG_DOM_ERR(EFREET_MODULE_LOG_DOM, __VA_ARGS__)
00103 #ifdef DEBUG
00104 #undef DEBUG
00105 #endif
00106 #define DEBUG(...) EINA_LOG_DOM_DBG(EFREET_MODULE_LOG_DOM, __VA_ARGS__)
00107 #ifdef INFO
00108 #undef INFO
00109 #endif
00110 #define INFO(...) EINA_LOG_DOM_INFO(EFREET_MODULE_LOG_DOM, __VA_ARGS__)
00111 #ifdef WARN
00112 #undef WARN
00113 #endif
00114 #define WARN(...) EINA_LOG_DOM_WARN(EFREET_MODULE_LOG_DOM, __VA_ARGS__)
00115 
00121 #define EFREET_MODULE_LOG_DOM _efreet_log_dom_global; /*default log domain for each module. It can redefined inside each module */
00122 #ifdef ERR
00123 #undef ERR
00124 #endif
00125 #define ERR(...) EINA_LOG_DOM_ERR(EFREET_MODULE_LOG_DOM, __VA_ARGS__)
00126 #ifdef DBG
00127 #undef DBG
00128 #endif
00129 #define DBG(...) EINA_LOG_DOM_DBG(EFREET_MODULE_LOG_DOM, __VA_ARGS__)
00130 #ifdef INF
00131 #undef INF
00132 #endif
00133 #define INF(...) EINA_LOG_DOM_INFO(EFREET_MODULE_LOG_DOM, __VA_ARGS__)
00134 #ifdef WRN
00135 #undef WRN
00136 #endif
00137 #define WRN(...) EINA_LOG_DOM_WARN(EFREET_MODULE_LOG_DOM, __VA_ARGS__)
00138 
00139 int efreet_base_init(void);
00140 void efreet_base_shutdown(void);
00141 
00142 int efreet_icon_init(void);
00143 void efreet_icon_shutdown(void);
00144 
00145 int efreet_menu_init(void);
00146 void efreet_menu_shutdown(void);
00147 EAPI Eina_List *efreet_default_dirs_get(const char *user_dir,
00148                                         Eina_List *system_dirs,
00149                                         const char *suffix);
00150 
00151 int efreet_ini_init(void);
00152 void efreet_ini_shutdown(void);
00153 
00154 int efreet_desktop_init(void);
00155 void efreet_desktop_shutdown(void);
00156 
00157 int efreet_util_init(void);
00158 int efreet_util_shutdown(void);
00159 
00160 EAPI const char *efreet_home_dir_get(void);
00161 
00162 const char *efreet_lang_get(void);
00163 const char *efreet_lang_country_get(void);
00164 const char *efreet_lang_modifier_get(void);
00165 
00166 size_t efreet_array_cat(char *buffer, size_t size, const char *strs[]);
00167 
00168 const char *efreet_desktop_environment_get(void);
00169 
00170 EAPI Eet_Data_Descriptor *efreet_desktop_edd_init(void);
00171 EAPI void efreet_desktop_edd_shutdown(Eet_Data_Descriptor *edd);
00172 
00173 void efreet_util_desktop_cache_reload(void);
00174 EAPI const char *efreet_desktop_util_cache_file(void);
00175 EAPI const char *efreet_desktop_cache_file(void);
00176 EAPI const char *efreet_desktop_cache_dirs(void);
00177 
00178 #define NON_EXISTING (void *)-1
00179 
00180 EAPI extern int efreet_cache_update;
00181 
00186 #endif

Copyright © Enlightenment.org

Efreet Documentation Generated: Tue Aug 3 2010 10:37:52