2007-02-03 05:05:30 -08:00
|
|
|
#ifndef EFREET_ICON_H
|
|
|
|
#define EFREET_ICON_H
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file efreet_icon.h
|
|
|
|
* @brief Contains the structures and methods used to support the FDO icon
|
|
|
|
* theme specificiation.
|
2007-09-06 09:15:10 -07:00
|
|
|
* @addtogroup Efreet_Icon Efreet_Icon: The FDO Icon Theme
|
|
|
|
* Specification functions and structures
|
2007-02-03 05:05:30 -08:00
|
|
|
*
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The possible contexts for an icon directory
|
|
|
|
*/
|
2009-09-13 17:38:59 -07:00
|
|
|
typedef enum Efreet_Icon_Theme_Context
|
2007-02-03 05:05:30 -08:00
|
|
|
{
|
|
|
|
EFREET_ICON_THEME_CONTEXT_NONE,
|
|
|
|
EFREET_ICON_THEME_CONTEXT_ACTIONS,
|
|
|
|
EFREET_ICON_THEME_CONTEXT_DEVICES,
|
|
|
|
EFREET_ICON_THEME_CONTEXT_FILESYSTEMS,
|
|
|
|
EFREET_ICON_THEME_CONTEXT_MIMETYPES
|
2009-09-13 17:38:59 -07:00
|
|
|
} Efreet_Icon_Theme_Context;
|
2007-02-03 05:05:30 -08:00
|
|
|
|
|
|
|
/**
|
2007-09-06 09:15:10 -07:00
|
|
|
* The possible size types for an icon directory
|
2007-02-03 05:05:30 -08:00
|
|
|
*/
|
2009-09-13 17:38:59 -07:00
|
|
|
typedef enum Efreet_Icon_Size_Type
|
2007-02-03 05:05:30 -08:00
|
|
|
{
|
|
|
|
EFREET_ICON_SIZE_TYPE_NONE,
|
|
|
|
EFREET_ICON_SIZE_TYPE_FIXED,
|
|
|
|
EFREET_ICON_SIZE_TYPE_SCALABLE,
|
|
|
|
EFREET_ICON_SIZE_TYPE_THRESHOLD
|
2009-09-13 17:38:59 -07:00
|
|
|
} Efreet_Icon_Size_Type;
|
2007-02-03 05:05:30 -08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Efreet_Icon_Theme
|
|
|
|
*/
|
|
|
|
typedef struct Efreet_Icon_Theme Efreet_Icon_Theme;
|
|
|
|
|
|
|
|
/**
|
2007-09-06 09:15:10 -07:00
|
|
|
* Efreet_Icon_Theme
|
|
|
|
* @brief contains all of the known information about a given theme
|
2007-02-03 05:05:30 -08:00
|
|
|
*/
|
|
|
|
struct Efreet_Icon_Theme
|
|
|
|
{
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
const char *internal; /**< The internal theme name */
|
|
|
|
const char *name; /**< The user visible name */
|
|
|
|
} name; /**< The different names for the theme */
|
|
|
|
|
2010-04-01 12:41:03 -07:00
|
|
|
const char *comment; /**< String describing the theme */
|
|
|
|
const char *example_icon; /**< Icon to use as an example of the theme */
|
2007-02-03 05:05:30 -08:00
|
|
|
|
|
|
|
/* An icon theme can have multiple directories that store it's icons. We
|
* estickies,
* etk,
* PROTO/exalt,
* E-MODULES-EXTRA/diskio,
* E-MODULES-EXTRA/drawer,
* E-MODULES-EXTRA/penguins,
* E-MODULES-EXTRA/slideshow,
* E-MODULES-EXTRA/mail,
* E-MODULES-EXTRA/forecasts,
* E-MODULES-EXTRA/iiirk,
* E-MODULES-EXTRA/places,
* e,
* ewl,
* ecore,
* elitaire,
* entrance,
* e_dbus,
* efreet: Here we go, move from Ecore_List to Eina_List.
NOTE: This patch is huge, I did test it a lot, and I hope nothing is
broken. But if you think something change after this commit, please
contact me ASAP.
SVN revision: 39200
2009-02-25 03:03:47 -08:00
|
|
|
* need to be able to find a search each one. */
|
2007-02-03 05:05:30 -08:00
|
|
|
|
* estickies,
* etk,
* PROTO/exalt,
* E-MODULES-EXTRA/diskio,
* E-MODULES-EXTRA/drawer,
* E-MODULES-EXTRA/penguins,
* E-MODULES-EXTRA/slideshow,
* E-MODULES-EXTRA/mail,
* E-MODULES-EXTRA/forecasts,
* E-MODULES-EXTRA/iiirk,
* E-MODULES-EXTRA/places,
* e,
* ewl,
* ecore,
* elitaire,
* entrance,
* e_dbus,
* efreet: Here we go, move from Ecore_List to Eina_List.
NOTE: This patch is huge, I did test it a lot, and I hope nothing is
broken. But if you think something change after this commit, please
contact me ASAP.
SVN revision: 39200
2009-02-25 03:03:47 -08:00
|
|
|
Eina_List *paths; /**< The paths */
|
|
|
|
Eina_List *inherits; /**< Icon themes we inherit from */
|
|
|
|
Eina_List *directories; /**< List of subdirectories for this theme */
|
2007-02-03 05:05:30 -08:00
|
|
|
|
|
|
|
double last_cache_check; /**< Last time the cache was checked */
|
|
|
|
|
|
|
|
unsigned char hidden:1; /**< Should this theme be hidden from users */
|
|
|
|
unsigned char valid:1; /**< Have we seen an index for this theme */
|
2010-09-08 04:27:59 -07:00
|
|
|
unsigned char fake:1; /**< This isn't' a real theme but the user has
|
2007-09-06 09:15:10 -07:00
|
|
|
tried to query from it. We create the
|
2007-02-03 05:05:30 -08:00
|
|
|
fake one to give us the theme cache. */
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Efreet_Icon_Theme_Directory
|
|
|
|
*/
|
|
|
|
typedef struct Efreet_Icon_Theme_Directory Efreet_Icon_Theme_Directory;
|
|
|
|
|
|
|
|
/**
|
2007-09-06 09:15:10 -07:00
|
|
|
* Efreet_Icon_Theme_Directory
|
2007-02-03 05:05:30 -08:00
|
|
|
* @brief Contains all the information about a sub-directory of a theme
|
|
|
|
*/
|
|
|
|
struct Efreet_Icon_Theme_Directory
|
|
|
|
{
|
2010-04-01 12:41:03 -07:00
|
|
|
const char *name; /**< The directory name */
|
2007-02-03 05:05:30 -08:00
|
|
|
Efreet_Icon_Theme_Context context; /**< The type of icons in the dir */
|
|
|
|
Efreet_Icon_Size_Type type; /**< The size type for the icons */
|
|
|
|
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
unsigned int normal; /**< The size for this directory */
|
|
|
|
unsigned int min; /**< The minimum size for this directory */
|
|
|
|
unsigned int max; /**< The maximum size for this directory */
|
|
|
|
unsigned int threshold; /**< Size difference threshold */
|
|
|
|
} size; /**< The size settings for the icon theme */
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2007-09-06 09:15:10 -07:00
|
|
|
* Efreet_Icon
|
2007-02-03 05:05:30 -08:00
|
|
|
*/
|
|
|
|
typedef struct Efreet_Icon Efreet_Icon;
|
|
|
|
|
|
|
|
/**
|
2007-09-06 09:15:10 -07:00
|
|
|
* Efreet_Icon
|
2007-02-03 05:05:30 -08:00
|
|
|
* @brief Contains all the information about a given icon
|
|
|
|
*/
|
|
|
|
struct Efreet_Icon
|
|
|
|
{
|
2010-04-01 12:41:03 -07:00
|
|
|
const char *path; /**< Full path to the icon */
|
|
|
|
const char *name; /**< Translated UTF8 string that can
|
2007-02-03 05:05:30 -08:00
|
|
|
be used for the icon name */
|
|
|
|
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
int x0, /**< x0 position */
|
|
|
|
y0, /**< y0 position */
|
|
|
|
x1, /**< x1 position */
|
|
|
|
y1; /**< y1 position */
|
2007-09-06 09:15:10 -07:00
|
|
|
} embedded_text_rectangle; /**< Rectangle where text can
|
2007-02-03 05:05:30 -08:00
|
|
|
be displayed on the icon */
|
|
|
|
|
* estickies,
* etk,
* PROTO/exalt,
* E-MODULES-EXTRA/diskio,
* E-MODULES-EXTRA/drawer,
* E-MODULES-EXTRA/penguins,
* E-MODULES-EXTRA/slideshow,
* E-MODULES-EXTRA/mail,
* E-MODULES-EXTRA/forecasts,
* E-MODULES-EXTRA/iiirk,
* E-MODULES-EXTRA/places,
* e,
* ewl,
* ecore,
* elitaire,
* entrance,
* e_dbus,
* efreet: Here we go, move from Ecore_List to Eina_List.
NOTE: This patch is huge, I did test it a lot, and I hope nothing is
broken. But if you think something change after this commit, please
contact me ASAP.
SVN revision: 39200
2009-02-25 03:03:47 -08:00
|
|
|
Eina_List *attach_points; /**< List of points to be used as anchor
|
2007-02-03 05:05:30 -08:00
|
|
|
points for emblems/overlays */
|
|
|
|
|
|
|
|
unsigned int ref_count; /**< References to this icon */
|
|
|
|
unsigned char has_embedded_text_rectangle:1; /**< Was the embedded
|
|
|
|
rectangle set */
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Efreet_Point
|
|
|
|
*/
|
|
|
|
typedef struct Efreet_Icon_Point Efreet_Icon_Point;
|
|
|
|
|
|
|
|
/**
|
2007-09-06 09:15:10 -07:00
|
|
|
* Efreet_Point
|
2007-02-03 05:05:30 -08:00
|
|
|
* @brief Stores an x, y point.
|
|
|
|
*/
|
|
|
|
struct Efreet_Icon_Point
|
|
|
|
{
|
|
|
|
int x; /**< x coord */
|
|
|
|
int y; /**< y coord */
|
|
|
|
};
|
|
|
|
|
2007-11-04 01:32:35 -08:00
|
|
|
EAPI const char *efreet_icon_user_dir_get(void);
|
|
|
|
EAPI void efreet_icon_extension_add(const char *ext);
|
|
|
|
|
2009-02-25 19:46:35 -08:00
|
|
|
EAPI Eina_List **efreet_icon_extra_list_get(void);
|
* estickies,
* etk,
* PROTO/exalt,
* E-MODULES-EXTRA/diskio,
* E-MODULES-EXTRA/drawer,
* E-MODULES-EXTRA/penguins,
* E-MODULES-EXTRA/slideshow,
* E-MODULES-EXTRA/mail,
* E-MODULES-EXTRA/forecasts,
* E-MODULES-EXTRA/iiirk,
* E-MODULES-EXTRA/places,
* e,
* ewl,
* ecore,
* elitaire,
* entrance,
* e_dbus,
* efreet: Here we go, move from Ecore_List to Eina_List.
NOTE: This patch is huge, I did test it a lot, and I hope nothing is
broken. But if you think something change after this commit, please
contact me ASAP.
SVN revision: 39200
2009-02-25 03:03:47 -08:00
|
|
|
EAPI Eina_List *efreet_icon_theme_list_get(void);
|
2007-11-04 01:32:35 -08:00
|
|
|
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,
|
2008-08-14 13:48:41 -07:00
|
|
|
unsigned int size);
|
2007-11-04 01:32:35 -08:00
|
|
|
EAPI char *efreet_icon_list_find(const char *theme_name,
|
* estickies,
* etk,
* PROTO/exalt,
* E-MODULES-EXTRA/diskio,
* E-MODULES-EXTRA/drawer,
* E-MODULES-EXTRA/penguins,
* E-MODULES-EXTRA/slideshow,
* E-MODULES-EXTRA/mail,
* E-MODULES-EXTRA/forecasts,
* E-MODULES-EXTRA/iiirk,
* E-MODULES-EXTRA/places,
* e,
* ewl,
* ecore,
* elitaire,
* entrance,
* e_dbus,
* efreet: Here we go, move from Ecore_List to Eina_List.
NOTE: This patch is huge, I did test it a lot, and I hope nothing is
broken. But if you think something change after this commit, please
contact me ASAP.
SVN revision: 39200
2009-02-25 03:03:47 -08:00
|
|
|
Eina_List *icons,
|
2008-08-14 13:48:41 -07:00
|
|
|
unsigned int size);
|
2008-08-14 09:59:41 -07:00
|
|
|
EAPI char *efreet_icon_path_find(const char *theme_name,
|
2007-11-04 01:32:35 -08:00
|
|
|
const char *icon,
|
2008-08-14 13:48:41 -07:00
|
|
|
unsigned int size);
|
2007-11-04 01:32:35 -08:00
|
|
|
EAPI void efreet_icon_free(Efreet_Icon *icon);
|
2007-02-03 05:05:30 -08:00
|
|
|
|
2007-09-06 09:15:10 -07:00
|
|
|
/**
|
2007-02-03 05:05:30 -08:00
|
|
|
* @}
|
|
|
|
*/
|
|
|
|
|
|
|
|
#endif
|