Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/ecore

Dir     : e17/libs/ecore/src


Modified Files:
      Tag: SPLIT
        Ecore.h ecore_events.c 


Log Message:


generate new event type id's

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/Ecore.h,v
retrieving revision 1.45.2.10
retrieving revision 1.45.2.11
diff -u -3 -r1.45.2.10 -r1.45.2.11
--- Ecore.h     16 Jan 2003 04:58:18 -0000      1.45.2.10
+++ Ecore.h     16 Jan 2003 05:01:29 -0000      1.45.2.11
@@ -79,11 +79,11 @@
    void ecore_app_args_get(int *argc, char ***argv);
    void ecore_app_restart(void);
 
-   Ecore_Event         *ecore_event_add(int type, void *ev, void (*func_free) (void 
*ev, void *data), void *data);
-   void                 ecore_event_del(Ecore_Event *event);
-       
    Ecore_Event_Handler *ecore_event_handler_add(int type, int (*func) (int type, void 
*event, void *data), const void *data);
    void                *ecore_event_handler_del(Ecore_Event_Handler *event_handler);
+   Ecore_Event         *ecore_event_add(int type, void *ev, void (*func_free) (void 
+*ev, void *data), void *data);
+   void                 ecore_event_del(Ecore_Event *event);
+   int                  ecore_event_type_new(void);
 
    Ecore_Exe *ecore_exe_run(const char *exe_cmd, const void *data);
    pid_t      ecore_exe_pid_get(Ecore_Exe *exe);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/Attic/ecore_events.c,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -u -3 -r1.1.2.6 -r1.1.2.7
--- ecore_events.c      16 Jan 2003 04:58:18 -0000      1.1.2.6
+++ ecore_events.c      16 Jan 2003 05:01:29 -0000      1.1.2.7
@@ -6,6 +6,8 @@
 
 static Ecore_Event_Handler *event_handlers = NULL;
 
+static int          event_id_max = ECORE_EVENT_COUNT;
+
 /**
  * Add an event handler
  * @param type
@@ -76,6 +78,19 @@
 {
    if (!event) return;
    event->delete_me = 1;
+}
+
+/**
+ * Allocate a new event type id sensibly and return the new id
+ * @return A new event type id.
+ * 
+ * This function allocates a new event type id and returns it.
+ */
+int
+ecore_event_type_new(void)
+{
+   event_id_max++;
+   return event_id_max - 1;
 }
 
 int




-------------------------------------------------------
This SF.NET email is sponsored by: A Thawte Code Signing Certificate 
is essential in establishing user confidence by providing assurance of 
authenticity and code integrity. Download our Free Code Signing guide:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0028en
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to