forked from enlightenment/efl
parent
0cf249a46f
commit
2993abfb7d
|
@ -619,6 +619,24 @@ efreet_desktop_type_add(const char *type, Efreet_Desktop_Type_Parse_Cb parse_fun
|
|||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Add an alias for an existing desktop type.
|
||||
* @param from_type the type to alias (e.g. EFREE_DESKTOP_TYPE_APPLICATION)
|
||||
* @param alias the alias
|
||||
* @return the new type id, or -1 if @p from_type was not valid
|
||||
*
|
||||
* 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)
|
||||
{
|
||||
Efreet_Desktop_Type_Info *info;
|
||||
info = ecore_list_goto_index(efreet_desktop_types, from_type);
|
||||
if (!info) return -1;
|
||||
|
||||
return efreet_desktop_type_add(alias, info->parse_func, info->save_func, info->free_func);
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @brief Free an Efreet Desktop_Type_Info struct
|
||||
|
|
|
@ -134,6 +134,8 @@ 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,
|
||||
const char *alias);
|
||||
void *efreet_desktop_type_data_get(Efreet_Desktop *desktop);
|
||||
|
||||
Ecore_List *efreet_desktop_string_list_parse(const char *string);
|
||||
|
|
Loading…
Reference in New Issue