Enlightenment CVS committal

Author  : rephorm
Project : e17
Module  : libs/efreet

Dir     : e17/libs/efreet/src/lib


Modified Files:
        efreet_desktop.c efreet_desktop.h 


Log Message:
add efreet_type_alias()

===================================================================
RCS file: /cvs/e/e17/libs/efreet/src/lib/efreet_desktop.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- efreet_desktop.c    18 Jun 2007 04:26:50 -0000      1.19
+++ efreet_desktop.c    20 Jun 2007 18:04:26 -0000      1.20
@@ -620,6 +620,24 @@
 }
 
 /**
+ * @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
  */
===================================================================
RCS file: /cvs/e/e17/libs/efreet/src/lib/efreet_desktop.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- efreet_desktop.h    18 Jun 2007 04:26:50 -0000      1.11
+++ efreet_desktop.h    20 Jun 2007 18:04:26 -0000      1.12
@@ -134,6 +134,8 @@
                                     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);



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to