Enlightenment CVS committal

Author  : cmarcelo
Project : e17
Module  : libs/etk

Dir     : e17/libs/etk/src/lib


Modified Files:
        etk_signal.c etk_signal.h etk_type.c 


Log Message:
To get (Etk_Signal *) from code or name, use etk_type_signal_get* functions.

===================================================================
RCS file: /cvs/e/e17/libs/etk/src/lib/etk_signal.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -3 -r1.39 -r1.40
--- etk_signal.c        3 Oct 2007 22:49:28 -0000       1.39
+++ etk_signal.c        4 Oct 2007 17:01:43 -0000       1.40
@@ -138,7 +138,7 @@
  *
  * assumes @a signal_name and @a type to be valid.
  */
-Etk_Signal *etk_signal_lookup_by_name(const char *signal_name, Etk_Type *type)
+static Etk_Signal *etk_signal_lookup_by_name(const char *signal_name, Etk_Type 
*type)
 {
    unsigned i;
 
@@ -151,29 +151,6 @@
 
    return NULL;
 }
-
-/**
- * @brief Gets the signal corresponding to the code and the object type.
- *
- * assumes @a signal_name and @a type to be valid.
- */
-Etk_Signal *etk_signal_lookup_by_code(int signal_code, Etk_Type *type)
-{
-   if (!type)
-      return NULL;
-
-   if (signal_code < 0 || signal_code >= type->signals_count)
-   {
-      ETK_WARNING("Invalid signal lookup: the type \"%s\" doesn't "
-                  "have a signal with code \"%d\"", type->name,
-                  signal_code);
-      return NULL;
-   }
-
-   return type->signals[signal_code];
-}
-
-
 
 /**
  * @brief Gets the signal code corresponding to the name and the object type.
===================================================================
RCS file: /cvs/e/e17/libs/etk/src/lib/etk_signal.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -3 -r1.25 -r1.26
--- etk_signal.h        3 Oct 2007 22:49:28 -0000       1.25
+++ etk_signal.h        4 Oct 2007 17:01:43 -0000       1.26
@@ -142,9 +142,6 @@
 Evas_List * etk_signal_get_all();
 const Etk_Type * etk_signal_object_type_get(Etk_Signal *signal);
 
-Etk_Signal *etk_signal_lookup_by_code(int signal_code, Etk_Type *type);
-Etk_Signal *etk_signal_lookup_by_name(const char *signal_name, Etk_Type *type);
-
 /** @} */
 
 #ifdef __cplusplus
===================================================================
RCS file: /cvs/e/e17/libs/etk/src/lib/etk_type.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- etk_type.c  29 Sep 2007 22:42:03 -0000      1.15
+++ etk_type.c  4 Oct 2007 17:01:43 -0000       1.16
@@ -293,9 +293,12 @@
 
 /**
  * @brief Gets the signal corresponding to the type and the signal name
+ *
  * @param type the type that is associated to the signal to get
  * @param signal_name the name of the signal to get
- * @return Returns the signal corresponding to the type and the signal name, 
or NULL on failure
+ *
+ * @return Returns the signal corresponding to the type and the signal name,
+ *         or NULL on failure
  */
 Etk_Signal *etk_type_signal_get_by_name(Etk_Type *type, const char 
*signal_name)
 {
@@ -311,6 +314,15 @@
    return NULL;
 }
 
+/**
+ * @brief Gets the signal corresponding to the type and the signal code
+ *
+ * @param type the type that is associated to the signal to get
+ * @param signal_code the code of the signal to get
+ *
+ * @return Returns the signal corresponding to the type and the signal name,
+ *         or NULL on failure
+ */
 Etk_Signal *etk_type_signal_get(Etk_Type *type, int signal_code)
 {
    if (!type || signal_code < 0 || signal_code >= type->signals_count)



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to