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 00014 #include <stdlib.h> 00015 #include <stdio.h> 00016 #include <string.h> 00017 #include <unistd.h> 00018 #include <ctype.h> 00019 #include <fcntl.h> 00020 #include <sys/mman.h> 00021 #include <sys/types.h> 00022 #include <sys/stat.h> 00023 #include <dirent.h> 00024 #include <fnmatch.h> 00025 #include <limits.h> 00026 00027 #include <Ecore.h> 00028 #include <Ecore_File.h> 00029 #include <Ecore_Str.h> 00030 00031 #include "config.h" 00032 #include "efreet_xml.h" 00033 #include "efreet_ini.h" 00034 00039 #define NEW(x, c) calloc(c, sizeof(x)) 00040 00045 #define FREE(x) { free(x); x = NULL; } 00046 00051 #define IF_FREE(x) { if (x) FREE(x) } 00052 00057 #define IF_RELEASE(x) { if (x) ecore_string_release(x); x = NULL; } 00058 00063 #define IF_FREE_LIST(x) { if (x) ecore_list_destroy(x); x = NULL; } 00064 00069 #define IF_FREE_DLIST(x) { if (x) ecore_dlist_destroy(x); x = NULL; } 00070 00075 #define IF_FREE_HASH(x) { if (x) ecore_hash_destroy(x); x = NULL; } 00076 00081 #if HAVE___ATTRIBUTE__ 00082 #define __UNUSED__ __attribute__((unused)) 00083 #else 00084 #define __UNUSED__ 00085 #endif 00086 00087 #ifndef PATH_MAX 00088 00092 #define PATH_MAX 4096 00093 #endif 00094 00099 enum Efreet_Desktop_Command_Flag 00100 { 00101 EFREET_DESKTOP_EXEC_FLAG_FULLPATH = 0x0001, 00102 EFREET_DESKTOP_EXEC_FLAG_URI = 0x0002, 00103 EFREET_DESKTOP_EXEC_FLAG_DIR = 0x0004, 00104 EFREET_DESKTOP_EXEC_FLAG_FILE = 0x0008 00105 }; 00106 00111 typedef enum Efreet_Desktop_Command_Flag Efreet_Desktop_Command_Flag; 00112 00117 typedef struct Efreet_Desktop_Command Efreet_Desktop_Command; 00118 00123 struct Efreet_Desktop_Command 00124 { 00125 Efreet_Desktop *desktop; 00126 int num_pending; 00127 00128 Efreet_Desktop_Command_Flag flags; 00129 00130 Efreet_Desktop_Command_Cb cb_command; 00131 Efreet_Desktop_Progress_Cb cb_progress; 00132 void *data; 00133 00134 Ecore_List *files; 00135 }; 00136 00141 typedef struct Efreet_Desktop_Command_File Efreet_Desktop_Command_File; 00142 00147 struct Efreet_Desktop_Command_File 00148 { 00149 Efreet_Desktop_Command *command; 00150 char *dir; 00151 char *file; 00152 char *fullpath; 00153 char *uri; 00154 00155 int pending; 00156 }; 00157 00158 int efreet_base_init(void); 00159 void efreet_base_shutdown(void); 00160 00161 int efreet_icon_init(void); 00162 void efreet_icon_shutdown(void); 00163 00164 int efreet_menu_init(void); 00165 void efreet_menu_shutdown(void); 00166 Ecore_List *efreet_default_dirs_get(const char *user_dir, 00167 Ecore_List *system_dirs, 00168 const char *suffix); 00169 00170 int efreet_ini_init(void); 00171 int efreet_ini_shutdown(void); 00172 00173 int efreet_desktop_init(void); 00174 int efreet_desktop_shutdown(void); 00175 00176 const char *efreet_home_dir_get(void); 00177 00178 const char *efreet_lang_get(void); 00179 const char *efreet_lang_country_get(void); 00180 const char *efreet_lang_modifier_get(void); 00181 00182 size_t efreet_array_cat(char *buffer, size_t size, const char *strs[]); 00183 00184 int efreet_util_init(void); 00185 void efreet_util_shutdown(void); 00186 00187 00192 #endif 00193