SVN revision: 32339
devs/devilhorns/wayland_egl
Sebastian Dransfeld 15 years ago
parent be1229247a
commit d15dcd181c
  1. 10
      legacy/efreet/configure.in
  2. 7
      legacy/efreet/src/bin/Makefile.am
  3. 4
      legacy/efreet/src/bin/ef_desktop.c
  4. 2
      legacy/efreet/src/bin/ef_icon_theme.c
  5. 2
      legacy/efreet/src/bin/ef_ini.c
  6. 5
      legacy/efreet/src/bin/ef_locale.c
  7. 8
      legacy/efreet/src/bin/ef_menu.c
  8. 3
      legacy/efreet/src/bin/ef_mime.c
  9. 9
      legacy/efreet/src/bin/ef_utils.c
  10. 10
      legacy/efreet/src/bin/main.c
  11. 26
      legacy/efreet/src/lib/Efreet.h
  12. 18
      legacy/efreet/src/lib/Efreet_Mime.h
  13. 4
      legacy/efreet/src/lib/efreet.c
  14. 10
      legacy/efreet/src/lib/efreet_base.c
  15. 10
      legacy/efreet/src/lib/efreet_base.h
  16. 56
      legacy/efreet/src/lib/efreet_desktop.c
  17. 49
      legacy/efreet/src/lib/efreet_desktop.h
  18. 18
      legacy/efreet/src/lib/efreet_icon.c
  19. 30
      legacy/efreet/src/lib/efreet_icon.h
  20. 45
      legacy/efreet/src/lib/efreet_ini.c
  21. 30
      legacy/efreet/src/lib/efreet_ini.h
  22. 18
      legacy/efreet/src/lib/efreet_menu.c
  23. 21
      legacy/efreet/src/lib/efreet_menu.h
  24. 16
      legacy/efreet/src/lib/efreet_mime.c
  25. 2
      legacy/efreet/src/lib/efreet_private.h
  26. 38
      legacy/efreet/src/lib/efreet_utils.c
  27. 47
      legacy/efreet/src/lib/efreet_utils.h

@ -41,6 +41,16 @@ fi
CFLAGS=$PCFLAGS
AC_ARG_ENABLE(hidden-visibility,
[AC_HELP_STRING([--enable-hidden-visibility],[Enable hidden visibility])],
[enable_hidden_visibility=$enableval], [enable_hidden_visibility="auto"])
if test "x$enable_hidden_visibility" = "xyes" ; then
CPPFLAGS="$CPPFLAGS -fvisibility=hidden"
else
AC_DEFINE(DEFAULT_VISIBLITY, 1, [Default visibility])
fi
AM_CONDITIONAL(DEFAULT_VISIBILITY, test "x$enable_hidden_visibility" != "xyes")
AC_SUBST(requirements)
AC_OUTPUT([
efreet.pc

@ -17,13 +17,16 @@ efreet_test_SOURCES = \
ef_data_dirs.c \
ef_icon_theme.c \
ef_ini.c \
ef_locale.c \
ef_desktop.c \
ef_menu.c \
ef_utils.c \
ef_mime.c \
main.c
if DEFAULT_VISIBILITY
efreet_test_SOURCES += \
ef_utils.c \
ef_locale.c
endif
efreet_spec_test_DEPENDENCIES = $(top_builddir)/src/lib/libefreet.la
efreet_spec_test_LDADD = $(top_builddir)/src/lib/libefreet.la

@ -5,7 +5,9 @@
#include <stdlib.h>
#include <unistd.h>
#include <limits.h>
#include "../lib/efreet_private.h"
#define IF_FREE(x) do { if (x) free(x); x = NULL; } while (0);
#define NEW(x, c) calloc(c, sizeof(x))
static void _cb_command(void *data, Efreet_Desktop *desktop, char *exec, int remaining);

@ -1,5 +1,4 @@
#include "Efreet.h"
#include "efreet_private.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@ -11,6 +10,7 @@
#define SIZE "128x128"
#define THEME "Tango"
#define FREE(x) do { free(x); x = NULL; } while (0);
static void ef_icon_theme_themes_find(const char *search_dir,
Ecore_Hash *themes);

@ -1,8 +1,8 @@
#include "Efreet.h"
#include "efreet_private.h"
#include "config.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int
ef_cb_ini_parse(void)

@ -1,5 +1,8 @@
#include <Efreet.h>
#include "Efreet.h"
#include "efreet_private.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
int
ef_cb_locale(void)

@ -1,11 +1,13 @@
/* vim: set sw=4 ts=4 sts=4 et: */
#include "Efreet.h"
#include "efreet_private.h"
#include "config.h"
#include <stdio.h>
#include <unistd.h>
#if 0
static void
ef_menu_desktop_exec(Efreet_Menu *menu)
{
#if 0
if (menu->entries)
{
Efreet_Desktop *desktop;
@ -22,8 +24,8 @@ ef_menu_desktop_exec(Efreet_Menu *menu)
while ((sub_menu = ecore_list_next(menu->sub_menus)))
ef_menu_desktop_exec(sub_menu);
}
#endif
}
#endif
int
ef_cb_menu_get(void)

@ -1,8 +1,9 @@
/* vim: set sw=4 ts=4 sts=4 et: */
#include "Efreet.h"
#include "Efreet_Mime.h"
#include "efreet_private.h"
#include "config.h"
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/time.h>

@ -1,23 +1,16 @@
/* vim: set sw=4 ts=4 sts=4 et: */
#include "Efreet.h"
#include "efreet_private.h"
#include <stdio.h>
int
ef_cb_utils(void)
{
Efreet_Desktop *desktop;
char *tmp1;
const char *tmp2;
if (!efreet_util_init()) return 0;
printf("\n");
tmp1 = efreet_util_path_in_default("applications",
"/usr/share/applications/test.desktop");
if (tmp1)
{
printf("%s\n", tmp1);
free(tmp1);
}
tmp2 = efreet_util_path_to_file_id("/usr/share/applications/this/tmp/test.desktop");
if (tmp2) printf("%s\n", tmp2);

@ -15,7 +15,10 @@ int ef_cb_efreet_icon_theme(void);
int ef_cb_efreet_icon_theme_list(void);
int ef_cb_efreet_icon_match(void);
int ef_cb_ini_parse(void);
int ef_cb_ini_long_line(void);
#if DEFAULT_VISIBILITY
int ef_cb_locale(void);
#endif
int ef_cb_desktop_parse(void);
int ef_cb_desktop_save(void);
int ef_cb_desktop_command_get(void);
@ -29,8 +32,9 @@ int ef_cb_menu_save(void);
#if 0
int ef_cb_menu_edit(void);
#endif
int ef_cb_ini_long_line(void);
#ifndef HIDDEN_VISIBILITY
int ef_cb_utils(void);
#endif
int ef_mime_cb_get(void);
typedef struct Efreet_Test Efreet_Test;
@ -51,7 +55,9 @@ static Efreet_Test tests[] = {
{"Icon Matching", ef_cb_efreet_icon_match},
{"INI Parsing", ef_cb_ini_parse},
{"INI Long Line Parsing", ef_cb_ini_long_line},
#if DEFAULT_VISIBILITY
{"Locale Parsing", ef_cb_locale},
#endif
{"Desktop Parsing", ef_cb_desktop_parse},
{"Desktop Type Parsing", ef_cb_desktop_type_parse},
{"Desktop Save", ef_cb_desktop_save},
@ -65,7 +71,9 @@ static Efreet_Test tests[] = {
#if 0
{"Menu Edit", ef_cb_menu_edit},
#endif
#if DEFAULT_VISIBILITY
{"Utils", ef_cb_utils},
#endif
{"Mime", ef_mime_cb_get},
{NULL, NULL}
};

@ -24,18 +24,40 @@
* @li Desktop Menu Specification
*/
#ifdef EAPI
#undef EAPI
#endif
#ifdef _MSC_VER
# ifdef BUILDING_DLL
# define EAPI __declspec(dllexport)
# else
# define EAPI __declspec(dllimport)
# endif
#else
# ifdef __GNUC__
# if __GNUC__ >= 4
# define EAPI __attribute__ ((visibility("default")))
# else
# define EAPI
# endif
# else
# define EAPI
# endif
#endif
#ifdef __cplusplus
extern "C" {
#endif
#include "efreet_base.h"
#include "efreet_ini.h"
#include "efreet_icon.h"
#include "efreet_desktop.h"
#include "efreet_menu.h"
#include "efreet_utils.h"
int efreet_init(void);
int efreet_shutdown(void);
EAPI int efreet_init(void);
EAPI int efreet_shutdown(void);
#ifdef __cplusplus
}

@ -26,17 +26,17 @@ extern "C" {
* @{
*/
int efreet_mime_init(void);
void efreet_mime_shutdown(void);
EAPI int efreet_mime_init(void);
EAPI void efreet_mime_shutdown(void);
const char *efreet_mime_type_get(const char *file);
const char *efreet_mime_magic_type_get(const char *file);
const char *efreet_mime_globs_type_get(const char *file);
const char *efreet_mime_special_type_get(const char *file);
const char *efreet_mime_fallback_type_get(const char *file);
EAPI const char *efreet_mime_type_get(const char *file);
EAPI const char *efreet_mime_magic_type_get(const char *file);
EAPI const char *efreet_mime_globs_type_get(const char *file);
EAPI const char *efreet_mime_special_type_get(const char *file);
EAPI const char *efreet_mime_fallback_type_get(const char *file);
char *efreet_mime_type_icon_get(const char *mime, const char *theme,
const char *size);
EAPI char *efreet_mime_type_icon_get(const char *mime, const char *theme,
const char *size);
/**
* @}

@ -15,7 +15,7 @@ static int efreet_parse_locale_setting(const char *env);
* @return Returns > 0 if the initialization was successful, 0 otherwise
* @brief Initializes the Efreet system
*/
int
EAPI int
efreet_init(void)
{
if (init++) return init;
@ -34,7 +34,7 @@ efreet_init(void)
* @brief Shuts down Efreet if a balanced number of init/shutdown calls have
* been made
*/
int
EAPI int
efreet_shutdown(void)
{
if (--init) return init;

@ -68,7 +68,7 @@ efreet_home_dir_get(void)
* @return Returns the XDG Data Home directory
* @brief Retrieves the XDG Data Home directory
*/
const char *
EAPI const char *
efreet_data_home_get(void)
{
if (xdg_data_home) return xdg_data_home;
@ -85,7 +85,7 @@ efreet_data_home_get(void)
* list then the next call to efreet_data_dirs_get() will return your
* modified values. DO NOT free this list.
*/
Ecore_List *
EAPI Ecore_List *
efreet_data_dirs_get(void)
{
if (xdg_data_dirs) return xdg_data_dirs;
@ -98,7 +98,7 @@ efreet_data_dirs_get(void)
* @return Returns the XDG Config Home directory
* @brief Retrieves the XDG Config Home directory
*/
const char *
EAPI const char *
efreet_config_home_get(void)
{
if (xdg_config_home) return xdg_config_home;
@ -115,7 +115,7 @@ efreet_config_home_get(void)
* list then the next call to efreet_config_dirs_get() will return your
* modified values. DO NOT free this list.
*/
Ecore_List *
EAPI Ecore_List *
efreet_config_dirs_get(void)
{
if (xdg_config_dirs) return xdg_config_dirs;
@ -127,7 +127,7 @@ efreet_config_dirs_get(void)
* @return Returns the XDG Cache Home directory
* @brief Retrieves the XDG Cache Home directory
*/
const char *
EAPI const char *
efreet_cache_home_get(void)
{
if (xdg_cache_home) return xdg_cache_home;

@ -15,13 +15,13 @@
#include <Ecore.h>
#include <Ecore_Data.h>
const char *efreet_data_home_get(void);
Ecore_List *efreet_data_dirs_get(void);
EAPI const char *efreet_data_home_get(void);
EAPI Ecore_List *efreet_data_dirs_get(void);
const char *efreet_config_home_get(void);
Ecore_List *efreet_config_dirs_get(void);
EAPI const char *efreet_config_home_get(void);
EAPI Ecore_List *efreet_config_dirs_get(void);
const char *efreet_cache_home_get(void);
EAPI const char *efreet_cache_home_get(void);
/**
* @}

@ -28,9 +28,9 @@ static int efreet_desktop_command_file_id = 0;
static int init = 0;
static int cache_flush = 0;
int EFREET_DESKTOP_TYPE_APPLICATION = 0;
int EFREET_DESKTOP_TYPE_LINK = 0;
int EFREET_DESKTOP_TYPE_DIRECTORY = 0;
EAPI int EFREET_DESKTOP_TYPE_APPLICATION = 0;
EAPI int EFREET_DESKTOP_TYPE_LINK = 0;
EAPI int EFREET_DESKTOP_TYPE_DIRECTORY = 0;
/**
* @internal
@ -49,6 +49,8 @@ struct Efreet_Desktop_Type_Info
static int efreet_desktop_read(Efreet_Desktop *desktop);
static void efreet_desktop_clear(Efreet_Desktop *desktop);
static Efreet_Desktop_Type_Info *efreet_desktop_type_parse(const char *type_str);
static Ecore_List *efreet_desktop_string_list_parse(const char *string);
static char *efreet_desktop_string_list_join(Ecore_List *list);
static void *efreet_desktop_application_fields_parse(Efreet_Desktop *desktop,
Efreet_Ini *ini);
static void efreet_desktop_application_fields_save(Efreet_Desktop *desktop,
@ -179,7 +181,7 @@ efreet_desktop_cache_check(Efreet_Desktop *desktop)
* @brief Gets a reference to an Efreet_Desktop structure representing the
* contents of @a file or NULL if @a file is not a valid .desktop file.
*/
Efreet_Desktop *
EAPI Efreet_Desktop *
efreet_desktop_get(const char *file)
{
Efreet_Desktop *desktop;
@ -220,7 +222,7 @@ efreet_desktop_get(const char *file)
* @param desktop: The Efreet_Desktop to ref
* @return Returns the new reference count
*/
int
EAPI int
efreet_desktop_ref(Efreet_Desktop *desktop)
{
if (!desktop) return 0;
@ -233,7 +235,7 @@ efreet_desktop_ref(Efreet_Desktop *desktop)
* @return Returns a new empty_Efreet_Desktop on success, NULL on failure
* @brief Creates a new empty Efreet_Desktop structure or NULL on failure
*/
Efreet_Desktop *
EAPI Efreet_Desktop *
efreet_desktop_empty_new(const char *file)
{
Efreet_Desktop *desktop;
@ -256,7 +258,7 @@ efreet_desktop_empty_new(const char *file)
* @brief Creates a new Efreet_Desktop structure initialized from the
* contents of @a file or NULL on failure
*/
Efreet_Desktop *
EAPI Efreet_Desktop *
efreet_desktop_new(const char *file)
{
Efreet_Desktop *desktop;
@ -382,7 +384,7 @@ efreet_desktop_clear(Efreet_Desktop *desktop)
* @brief Saves any changes made to @a desktop back to the file on the
* filesystem
*/
int
EAPI int
efreet_desktop_save(Efreet_Desktop *desktop)
{
Efreet_Desktop_Type_Info *info;
@ -444,7 +446,7 @@ efreet_desktop_save(Efreet_Desktop *desktop)
* @return Returns 1 on success or 0 on failure
* @brief Saves @a desktop to @a file
*/
int
EAPI int
efreet_desktop_save_as(Efreet_Desktop *desktop, const char *file)
{
if (desktop == ecore_hash_get(efreet_desktop_cache, desktop->orig_path))
@ -463,7 +465,7 @@ efreet_desktop_save_as(Efreet_Desktop *desktop, const char *file)
* @return Returns no value
* @brief Frees the Efreet_Desktop structure and all of it's data
*/
void
EAPI void
efreet_desktop_free(Efreet_Desktop *desktop)
{
if (!desktop) return;
@ -512,7 +514,7 @@ efreet_desktop_free(Efreet_Desktop *desktop)
* @return Returns the Ecore_Exce for @a desktop
* @brief Parses the @a desktop exec line and returns an Ecore_Exe.
*/
void
EAPI void
efreet_desktop_exec(Efreet_Desktop *desktop, Ecore_List *files, void *data)
{
efreet_desktop_command_get(desktop, files, efreet_desktop_exec_cb, data);
@ -527,11 +529,10 @@ efreet_desktop_exec_cb(void *data, Efreet_Desktop *desktop __UNUSED__,
}
/**
* @internal
* @param environment: the environment name
* @brief sets the global desktop environment name
*/
void
EAPI void
efreet_desktop_environment_set(const char *environment)
{
if (desktop_environment) ecore_string_release(desktop_environment);
@ -540,11 +541,10 @@ efreet_desktop_environment_set(const char *environment)
}
/**
* @internal
* @return environment: the environment name
* @brief sets the global desktop environment name
*/
const char *
EAPI const char *
efreet_desktop_environment_get(void)
{
return desktop_environment;
@ -556,7 +556,7 @@ efreet_desktop_environment_get(void)
* @brief Retrieves the number of categories the given @a desktop belongs
* too
*/
unsigned int
EAPI unsigned int
efreet_desktop_category_count_get(Efreet_Desktop *desktop)
{
if (!desktop || !desktop->categories) return 0;
@ -568,7 +568,7 @@ efreet_desktop_category_count_get(Efreet_Desktop *desktop)
* @param category: the category name
* @brief add a category to a desktop
*/
void
EAPI void
efreet_desktop_category_add(Efreet_Desktop *desktop, const char *category)
{
if (!desktop) return;
@ -593,7 +593,7 @@ efreet_desktop_category_add(Efreet_Desktop *desktop, const char *category)
* @brief removes a category from a desktop
* @return 1 if the desktop had his category listed, 0 otherwise
*/
int
EAPI int
efreet_desktop_category_del(Efreet_Desktop *desktop, const char *category)
{
int found = 0;
@ -617,7 +617,7 @@ efreet_desktop_category_del(Efreet_Desktop *desktop, const char *category)
* @return Returns the id of the new type
* @brief Adds the given type to the list of types in the system
*/
int
EAPI int
efreet_desktop_type_add(const char *type, Efreet_Desktop_Type_Parse_Cb parse_func,
Efreet_Desktop_Type_Save_Cb save_func,
Efreet_Desktop_Type_Free_Cb free_func)
@ -649,8 +649,8 @@ efreet_desktop_type_add(const char *type, Efreet_Desktop_Type_Parse_Cb parse_fun
*
* This allows applications to add non-standard types that behave exactly as standard types.
*/
int
efreet_desktop_type_alias (int from_type, const char *alias)
EAPI int
efreet_desktop_type_alias(int from_type, const char *alias)
{
Efreet_Desktop_Type_Info *info;
info = ecore_list_index_goto(efreet_desktop_types, from_type);
@ -676,7 +676,7 @@ efreet_desktop_type_info_free(Efreet_Desktop_Type_Info *info)
* @param desktop the desktop
* @return type specific data, or NULL if there is none
*/
void *
EAPI void *
efreet_desktop_type_data_get(Efreet_Desktop *desktop)
{
return desktop->type_data;
@ -710,7 +710,7 @@ efreet_desktop_type_parse(const char *type_str)
* @return an Ecore_List of ecore string's
* @brief Parse ';' separate list of strings according to the desktop spec
*/
Ecore_List *
static Ecore_List *
efreet_desktop_string_list_parse(const char *string)
{
Ecore_List *list;
@ -754,7 +754,7 @@ efreet_desktop_string_list_parse(const char *string)
* @return a raw string list
* @brief Create a ';' separate list of strings according to the desktop spec
*/
char *
static char *
efreet_desktop_string_list_join(Ecore_List *list)
{
const char *tmp;
@ -792,7 +792,7 @@ efreet_desktop_string_list_join(Ecore_List *list)
* it will force it to be re-read off disk next time efreet_desktop_get() is
* called.
*/
void
EAPI void
efreet_desktop_cache_flush(void)
{
cache_flush++;
@ -1080,7 +1080,7 @@ efreet_desktop_environment_check(Efreet_Ini *ini)
* @return Returns 1 on success or 0 on failure
* @brief Get a command to use to execute a desktop entry.
*/
int
EAPI int
efreet_desktop_command_get(Efreet_Desktop *desktop, Ecore_List *files,
Efreet_Desktop_Command_Cb func, void *data)
{
@ -1095,7 +1095,7 @@ efreet_desktop_command_get(Efreet_Desktop *desktop, Ecore_List *files,
*
* The returned list and each of its elements must be freed.
*/
Ecore_List *
EAPI Ecore_List *
efreet_desktop_command_local_get(Efreet_Desktop *desktop, Ecore_List *files)
{
Efreet_Desktop_Command *command;
@ -1151,7 +1151,7 @@ efreet_desktop_command_local_get(Efreet_Desktop *desktop, Ecore_List *files)
* @brief Get a command to use to execute a desktop entry, and receive progress
* updates for downloading of remote URI's passed in.
*/
int
EAPI int
efreet_desktop_command_progress_get(Efreet_Desktop *desktop, Ecore_List *files,
Efreet_Desktop_Command_Cb cb_command,
Efreet_Desktop_Progress_Cb cb_progress,

@ -2,8 +2,6 @@
#ifndef EFREET_DESKTOP_H
#define EFREET_DESKTOP_H
#include "efreet_ini.h"
/**
* @file efreet_desktop.h
* @brief Contains the structures and methods used to support the
@ -14,9 +12,9 @@
* @{
*/
extern int EFREET_DESKTOP_TYPE_APPLICATION;
extern int EFREET_DESKTOP_TYPE_LINK;
extern int EFREET_DESKTOP_TYPE_DIRECTORY;
EAPI extern int EFREET_DESKTOP_TYPE_APPLICATION;
EAPI extern int EFREET_DESKTOP_TYPE_LINK;
EAPI extern int EFREET_DESKTOP_TYPE_DIRECTORY;
/**
* Efreet_Desktop_Type
@ -99,49 +97,48 @@ struct Efreet_Desktop
void *type_data; /**< Type specific data for custom types */
};
Efreet_Desktop *efreet_desktop_get(const char *file);
int efreet_desktop_ref(Efreet_Desktop *desktop);
Efreet_Desktop *efreet_desktop_empty_new(const char *file);
Efreet_Desktop *efreet_desktop_new(const char *file);
void efreet_desktop_free(Efreet_Desktop *desktop);
EAPI Efreet_Desktop *efreet_desktop_get(const char *file);
EAPI int efreet_desktop_ref(Efreet_Desktop *desktop);
EAPI Efreet_Desktop *efreet_desktop_empty_new(const char *file);
EAPI Efreet_Desktop *efreet_desktop_new(const char *file);
EAPI void efreet_desktop_free(Efreet_Desktop *desktop);
int efreet_desktop_save(Efreet_Desktop *desktop);
int efreet_desktop_save_as(Efreet_Desktop *desktop,
EAPI int efreet_desktop_save(Efreet_Desktop *desktop);
EAPI int efreet_desktop_save_as(Efreet_Desktop *desktop,
const char *file);
void efreet_desktop_exec(Efreet_Desktop *desktop,
EAPI void efreet_desktop_exec(Efreet_Desktop *desktop,
Ecore_List *files, void *data);
void efreet_desktop_environment_set(const char *environment);
int efreet_desktop_command_progress_get(Efreet_Desktop *desktop,
EAPI void efreet_desktop_environment_set(const char *environment);
EAPI const char *efreet_desktop_environment_get(void);
EAPI int efreet_desktop_command_progress_get(Efreet_Desktop *desktop,
Ecore_List *files,
Efreet_Desktop_Command_Cb cb_command,
Efreet_Desktop_Progress_Cb cb_prog,
void *data);
int efreet_desktop_command_get(Efreet_Desktop *desktop,
EAPI int efreet_desktop_command_get(Efreet_Desktop *desktop,
Ecore_List *files,
Efreet_Desktop_Command_Cb func,
void *data);
Ecore_List * efreet_desktop_command_local_get(Efreet_Desktop *desktop,
EAPI Ecore_List * efreet_desktop_command_local_get(Efreet_Desktop *desktop,
Ecore_List *files);
unsigned int efreet_desktop_category_count_get(Efreet_Desktop *desktop);
void efreet_desktop_category_add(Efreet_Desktop *desktop,
EAPI unsigned int efreet_desktop_category_count_get(Efreet_Desktop *desktop);
EAPI void efreet_desktop_category_add(Efreet_Desktop *desktop,
const char *category);
int efreet_desktop_category_del(Efreet_Desktop *desktop,
EAPI int efreet_desktop_category_del(Efreet_Desktop *desktop,
const char *category);
int efreet_desktop_type_add(const char *type,
EAPI int efreet_desktop_type_add(const char *type,
Efreet_Desktop_Type_Parse_Cb parse_func,
Efreet_Desktop_Type_Save_Cb save_func,
Efreet_Desktop_Type_Free_Cb free_func);
int efreet_desktop_type_alias (int from_type,
EAPI int efreet_desktop_type_alias (int from_type,
const char *alias);
void *efreet_desktop_type_data_get(Efreet_Desktop *desktop);
EAPI void *efreet_desktop_type_data_get(Efreet_Desktop *desktop);
Ecore_List *efreet_desktop_string_list_parse(const char *string);
char *efreet_desktop_string_list_join(Ecore_List *list);
void efreet_desktop_cache_flush(void);
EAPI void efreet_desktop_cache_flush(void);
/**
* @}

@ -164,7 +164,7 @@ efreet_icon_deprecated_user_dir_get(void)
return efreet_icon_deprecated_user_dir;
}
const char *
EAPI const char *
efreet_icon_user_dir_get(void)
{
const char *user;
@ -185,7 +185,7 @@ efreet_icon_user_dir_get(void)
* @return Returns no value.
* @brief Adds the given extension to the list of possible icon extensions
*/
void
EAPI void
efreet_icon_extension_add(const char *ext)
{
ecore_list_prepend(efreet_icon_extensions, strdup(ext));
@ -199,7 +199,7 @@ efreet_icon_extension_add(const char *ext)
* from first to last directory in this list. the strings in the list should
* be created with ecore_string_instance().
*/
Ecore_List *
EAPI Ecore_List *
efreet_icon_extra_list_get(void)
{
return efreet_extra_icon_dirs;
@ -211,7 +211,7 @@ efreet_icon_extra_list_get(void)
* @brief Retrieves all of the non-hidden icon themes available on the system.
* The returned list must be freed. Do not free the list data.
*/
Ecore_List *
EAPI Ecore_List *
efreet_icon_theme_list_get(void)
{
Ecore_List *list, *theme_list;
@ -248,7 +248,7 @@ efreet_icon_theme_list_get(void)
* none exists.
* @brief Tries to get the icon theme structure for the given theme name
*/
Efreet_Icon_Theme *
EAPI Efreet_Icon_Theme *
efreet_icon_theme_find(const char *theme_name)
{
const char *key;
@ -330,7 +330,7 @@ efreet_icon_find_theme_check(const char *theme_name)
* @return Returns the path to the given icon or NULL if none found
* @brief Retrives the path to the given icon.
*/
char *
EAPI char *
efreet_icon_path_find(const char *theme_name, const char *icon, const char *size)
{
struct stat st;
@ -398,7 +398,7 @@ efreet_icon_path_find(const char *theme_name, const char *icon, const char *size
* @note This function will search the given theme for all icons before falling
* back. This is useful when searching for mimetype icons.
*/
char *
EAPI char *
efreet_icon_list_find(const char *theme_name, Ecore_List *icons,
const char *size)
{
@ -450,7 +450,7 @@ efreet_icon_list_find(const char *theme_name, Ecore_List *icons,
* if the icon is not found
* @brief Retrieves all of the information about the given icon.
*/
Efreet_Icon *
EAPI Efreet_Icon *
efreet_icon_find(const char *theme, const char *icon, const char *size)
{
char *path;
@ -961,7 +961,7 @@ efreet_icon_new(const char *path)
* @return Returns no value.
* @brief Free's the given icon and all its internal data.
*/
void
EAPI void
efreet_icon_free(Efreet_Icon *icon)
{
if (!icon) return;

@ -158,20 +158,22 @@ struct Efreet_Icon_Point
int y; /**< y coord */
};
const char *efreet_icon_user_dir_get(void);
void efreet_icon_extension_add(const char *ext);
Ecore_List *efreet_icon_extra_list_get(void);
Ecore_List *efreet_icon_theme_list_get(void);
Efreet_Icon_Theme *efreet_icon_theme_find(const char *theme_name);
Efreet_Icon *efreet_icon_find(const char *theme_name, const char *icon,
const char *size);
char *efreet_icon_list_find(const char *theme_name,
Ecore_List *icons,
const char *size);
char *efreet_icon_path_find(const char *theme, const char *icon,
const char *size);
void efreet_icon_free(Efreet_Icon *icon);
EAPI const char *efreet_icon_user_dir_get(void);
EAPI void efreet_icon_extension_add(const char *ext);
EAPI Ecore_List *efreet_icon_extra_list_get(void);
EAPI Ecore_List *efreet_icon_theme_list_get(void);
EAPI Efreet_Icon_Theme *efreet_icon_theme_find(const char *theme_name);
EAPI Efreet_Icon *efreet_icon_find(const char *theme_name,
const char *icon,
const char *size);
EAPI char *efreet_icon_list_find(const char *theme_name,
Ecore_List *icons,
const char *size);
EAPI char *efreet_icon_path_find(const char *theme,
const char *icon,
const char *size);
EAPI void efreet_icon_free(Efreet_Icon *icon);
/**
* @}

@ -40,14 +40,13 @@ efreet_ini_shutdown(void)
}
/**
* @internal
* @param file: The file to parse
* @return Returns a new Efreet_Ini structure initialized with the contents
* of @a file, or NULL on memory allocation failure
* @brief Creates and initializes a new Ini structure with the contents of
* @a file, or NULL on failure
*/
Efreet_Ini *
EAPI Efreet_Ini *
efreet_ini_new(const char *file)
{
Efreet_Ini *ini;
@ -241,12 +240,11 @@ next_line:
}
/**
* @internal
* @param ini: The Efreet_Ini to work with
* @return Returns no value
* @brief Frees the given Efree_Ini structure.
*/
void
EAPI void
efreet_ini_free(Efreet_Ini *ini)
{
if (!ini) return;
@ -256,13 +254,12 @@ efreet_ini_free(Efreet_Ini *ini)
}
/**
* @internal
* @param ini: The Efreet_Ini to work with
* @param file: The file to load
* @return Returns no value
* @brief Saves the given Efree_Ini structure.
*/
int
EAPI int
efreet_ini_save(Efreet_Ini *ini, const char *file)
{
FILE *f;
@ -277,13 +274,12 @@ efreet_ini_save(Efreet_Ini *ini, const char *file)
}
/**
* @internal
* @param ini: The Efreet_Ini to work with
* @param section: The section of the ini file we want to get values from
* @return Returns 1 if the section exists, otherwise 0
* @brief Sets the current working section of the ini file to @a section
*/
int
EAPI int
efreet_ini_section_set(Efreet_Ini *ini, const char *section)
{
if (!ini || !ini->data || !section) return 0;
@ -293,13 +289,12 @@ efreet_ini_section_set(Efreet_Ini *ini, const char *section)
}
/**
* @internal
* @param ini: The Efreet_Ini to work with
* @param section: The section of the ini file we want to add
* @return Returns no value
* @brief Adds a new working section of the ini file to @a section
*/
void
EAPI void
efreet_ini_section_add(Efreet_Ini *ini, const char *section)
{
Ecore_Hash *hash;
@ -321,14 +316,13 @@ efreet_ini_section_add(Efreet_Ini *ini, const char *section)
}
/**
* @internal
* @param ini: The Efree_Ini to work with
* @param key: The key to lookup
* @return Returns the string associated with the given key or NULL if not
* found.
* @brief Retrieves the value for the given key or NULL if none found.
*/
const char *
EAPI const char *
efreet_ini_string_get(Efreet_Ini *ini, const char *key)
{
if (!ini || !key || !ini->section) return NULL;
@ -337,14 +331,13 @@ efreet_ini_string_get(Efreet_Ini *ini, const char *key)
}
/**
* @internal
* @param ini: The Efree_Ini to work with
* @param key: The key to use
* @param value: The value to set
* @return Returns no value
* @brief Sets the value for the given key
*/
void
EAPI void
efreet_ini_string_set(Efreet_Ini *ini, const char *key, const char *value)
{
if (!ini || !key || !ini->section) return;
@ -353,14 +346,13 @@ efreet_ini_string_set(Efreet_Ini *ini, const char *key, const char *value)
}
/**
* @internal
* @param ini: The Efree_Ini to work with
* @param key: The key to lookup
* @return Returns the integer associated with the given key or -1 if not
* found.
* @brief Retrieves the value for the given key or -1 if none found.
*/
int
EAPI int
efreet_ini_int_get(Efreet_Ini *ini, const char *key)
{
const char *str;
@ -374,14 +366,13 @@ efreet_ini_int_get(Efreet_Ini *ini, const char *key)
}
/**
* @internal
* @param ini: The Efree_Ini to work with
* @param key: The key to use
* @param value: The value to set
* @return Returns no value
* @brief Sets the value for the given key
*/
void
EAPI void
efreet_ini_int_set(Efreet_Ini *ini, const char *key, int value)
{
char str[12];
@ -393,14 +384,13 @@ efreet_ini_int_set(Efreet_Ini *ini, const char *key, int value)
}
/**
* @internal
* @param ini: The Efree_Ini to work with
* @param key: The key to lookup
* @return Returns the double associated with the given key or -1 if not
* found.
* @brief Retrieves the value for the given key or -1 if none found.
*/
double
EAPI double
efreet_ini_double_get(Efreet_Ini *ini, const char *key)
{
const char *str;
@ -414,14 +404,13 @@ efreet_ini_double_get(Efreet_Ini *ini, const char *key)
}
/**
* @internal
* @param ini: The Efree_Ini to work with
* @param key: The key to use
* @param value: The value to set
* @return Returns no value
* @brief Sets the value for the given key
*/
void
EAPI void
efreet_ini_double_set(Efreet_Ini *ini, const char *key, double value)
{
char str[512];
@ -437,13 +426,12 @@ efreet_ini_double_set(Efreet_Ini *ini, const char *key, double value)
}
/**
* @internal
* @param ini: The ini struct to work with
* @param key: The key to search for
* @return Returns 1 if the boolean is true, 0 otherwise
* @brief Retrieves the boolean value at key @a key from the ini @a ini
*/
unsigned int
EAPI unsigned int
efreet_ini_boolean_get(Efreet_Ini *ini, const char *key)
{
const char *str;
@ -457,14 +445,13 @@ efreet_ini_boolean_get(Efreet_Ini *ini, const char *key)
}
/**
* @internal
* @param ini: The ini struct to work with
* @param key: The key to use
* @param value: The value to set
* @return Returns no value
* @brief Sets the value for the given key
*/
void
EAPI void
efreet_ini_boolean_set(Efreet_Ini *ini, const char *key, unsigned int value)
{
if (!ini || !key || !ini->section) return;
@ -474,14 +461,13 @@ efreet_ini_boolean_set(Efreet_Ini *ini, const char *key, unsigned int value)
}
/**
* @internal
* @param ini: The ini struct to work with
* @param key: The key to search for
* @return Returns the utf8 encoded string associated with @a key, or NULL
* if none found
* @brief Retrieves the utf8 encoded string associated with @a key in the current locale or NULL if none found
*/
const char *
EAPI const char *
efreet_ini_localestring_get(Efreet_Ini *ini, const char *key)
{
const char *lang, *country, *modifier;
@ -541,14 +527,13 @@ efreet_ini_localestring_get(Efreet_Ini *ini, const char *key)
}
/**
* @internal
* @param ini: The ini struct to work with
* @param key: The key to use
* @param value: The value to set
* @return Returns no value
* @brief Sets the value for the given key
*/
void
EAPI void
efreet_ini_localestring_set(Efreet_Ini *ini, const char *key, const char *value)
{
const char *lang, *country, *modifier;

@ -26,30 +26,30 @@ struct Efreet_Ini
Ecore_Hash *section; /**< currently selected section */
};
Efreet_Ini *efreet_ini_new(const char *file);
void efreet_ini_free(Efreet_Ini *ini);
int efreet_ini_save(Efreet_Ini *ini, const char *path);
EAPI Efreet_Ini *efreet_ini_new(const char *file);
EAPI void efreet_ini_free(Efreet_Ini *ini);
EAPI int efreet_ini_save(Efreet_Ini *ini, const char *path);
int efreet_ini_section_set(Efreet_Ini *ini, const char *section);
void efreet_ini_section_add(Efreet_Ini *ini, const char *section);
EAPI int efreet_ini_section_set(Efreet_Ini *ini, const char *section);
EAPI void efreet_ini_section_add(Efreet_Ini *ini, const char *section);
const char *efreet_ini_string_get(Efreet_Ini *ini, const char *key);
void efreet_ini_string_set(Efreet_Ini *ini, const char *key,
EAPI const char *efreet_ini_string_get(Efreet_Ini *ini, const char *key);
EAPI void efreet_ini_string_set(Efreet_Ini *ini, const char *key,
const char *value);
const char *efreet_ini_localestring_get(Efreet_Ini *ini, const char *key);
void efreet_ini_localestring_set(Efreet_Ini *ini, const char *key,
EAPI const char *efreet_ini_localestring_get(Efreet_Ini *ini, const char *key);
EAPI void efreet_ini_localestring_set(Efreet_Ini *ini, const char *key,
const char *value);
unsigned int efreet_ini_boolean_get(Efreet_Ini *ini, const char *key);
void efreet_ini_boolean_set(Efreet_Ini *ini, const char *key,
EAPI unsigned int efreet_ini_boolean_get(Efreet_Ini *ini, const char *key);
EAPI void efreet_ini_boolean_set(Efreet_Ini *ini, const char *key,
unsigned int value);
int efreet_ini_int_get(Efreet_Ini *ini, const char *key);
void efreet_ini_int_set(Efreet_Ini *ini, const char *key, int value);
EAPI int efreet_ini_int_get(Efreet_Ini *ini, const char *key);
EAPI void efreet_ini_int_set(Efreet_Ini *ini, const char *key, int value);
double efreet_ini_double_get(Efreet_Ini *ini, const char *key);
void efreet_ini_double_set(Efreet_Ini *ini, const char *key,
EAPI double efreet_ini_double_get(Efreet_Ini *ini, const char *key);
EAPI void efreet_ini_double_set(Efreet_Ini *ini, const char *key,
double value);
/**

@ -486,7 +486,7 @@ efreet_menu_init(void)
* @brief Initialize legacy kde support. This function blocks while
* the kde-config script is run.
*/
int
EAPI int
efreet_menu_kde_legacy_init(void)
{
FILE *f;
@ -554,7 +554,7 @@ efreet_menu_shutdown(void)
ecore_string_shutdown();
}
Efreet_Menu *
EAPI Efreet_Menu *
efreet_menu_new(void)
{
Efreet_Menu *menu;
@ -568,7 +568,7 @@ efreet_menu_new(void)
* NULL if none found
* @brief Creates the default menu representation
*/
Efreet_Menu *
EAPI Efreet_Menu *
efreet_menu_get(void)
{
char menu[PATH_MAX];
@ -601,7 +601,7 @@ efreet_menu_get(void)
* failure
* @brief Parses the given .menu file and creates the menu representation
*/
Efreet_Menu *
EAPI Efreet_Menu *
efreet_menu_parse(const char *path)
{
Efreet_Xml *xml;
@ -683,7 +683,7 @@ efreet_menu_parse(const char *path)
* @return Returns 1 on success, 0 on failure
* @brief Saves the menu to file
*/
int
EAPI int
efreet_menu_save(Efreet_Menu *menu, const char *path)
{
FILE *f;
@ -802,7 +802,7 @@ efreet_menu_save_indent(FILE *f, int indent)
* @brief Insert a desktop element in a menu structure. Only accepts desktop files
* in default directories.
*/
int
EAPI int
efreet_menu_desktop_insert(Efreet_Menu *menu, Efreet_Desktop *desktop, int pos)
{
Efreet_Menu *entry;
@ -842,7 +842,7 @@ efreet_menu_desktop_insert(Efreet_Menu *menu, Efreet_Desktop *desktop, int pos)
* @brief Remove a desktop element in a menu structure. Only accepts desktop files
* in default directories.
*/
int
EAPI int
efreet_menu_desktop_remove(Efreet_Menu *menu, Efreet_Desktop *desktop)
{
Efreet_Menu *entry;
@ -868,7 +868,7 @@ efreet_menu_desktop_remove(Efreet_Menu *menu, Efreet_Desktop *desktop)
* @return Returns no value
* @brief Dumps the contents of the menu to the command line
*/
void
EAPI void
efreet_menu_dump(Efreet_Menu *menu, const char *indent)
{
printf("%s%s: ", indent, menu->name);
@ -2503,7 +2503,7 @@ efreet_menu_entry_new(void)
* @return Returns no value
* @brief Frees the given structure
*/
void
EAPI void
efreet_menu_free(Efreet_Menu *entry)
{
IF_RELEASE(entry->name);