Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/ecore

Dir     : e17/libs/ecore/src


Modified Files:
      Tag: SPLIT
        Ecore.h ecore_main.c ecore_private.h 


Log Message:


updates...

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/Ecore.h,v
retrieving revision 1.45.2.6
retrieving revision 1.45.2.7
diff -u -3 -r1.45.2.6 -r1.45.2.7
--- Ecore.h     13 Jan 2003 13:04:46 -0000      1.45.2.6
+++ Ecore.h     13 Jan 2003 22:27:31 -0000      1.45.2.7
@@ -101,7 +101,7 @@
        
    void              ecore_main_loop_begin(void);
    void              ecore_main_loop_quit(void);
-   Ecore_Fd_Handler *ecore_main_fd_handler_add(int fd, Ecore_Fd_Handler_Flags flags, 
int (*func) (Ecore_Fd_Handler *fd_handler, void *data), void *data);
+   Ecore_Fd_Handler *ecore_main_fd_handler_add(int fd, Ecore_Fd_Handler_Flags flags, 
+int (*func) (Ecore_Fd_Handler *fd_handler, void *data), void *data, int (*buf_func) 
+(Ecore_Fd_Handler *fd_handler, void *buf_data), void *buf_data);
    void             *ecore_main_fd_handler_del(Ecore_Fd_Handler *fd_handler);
    int               ecore_main_fd_handler_fd_get(Ecore_Fd_Handler *fd_handler);
    int               ecore_main_fd_handler_active_get(Ecore_Fd_Handler *fd_handler, 
Ecore_Fd_Handler_Flags flags);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/Attic/ecore_main.c,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -3 -r1.1.2.4 -r1.1.2.5
--- ecore_main.c        13 Jan 2003 13:04:47 -0000      1.1.2.4
+++ ecore_main.c        13 Jan 2003 22:27:39 -0000      1.1.2.5
@@ -9,6 +9,7 @@
 static int  _ecore_main_select(double timeout);
 static void _ecore_main_fd_handlers_cleanup(void);
 static void _ecore_main_fd_handlers_call(void);
+static int _ecore_main_fd_handlers_buf_call(void);
     
 static  int               quit = 0;
 static  Ecore_Fd_Handler *fd_handlers = NULL;
@@ -109,19 +110,23 @@
        /* this should read or write any data to the monitored fd and then */
        /* post events onto the ecore event pipe if necessary */
        if (have_event) _ecore_main_fd_handlers_call();
-       /* process signals into events .... */
-       if (have_signal)
+       do
          {
-            while (_ecore_signal_count_get()) _ecore_signal_call();
+            /* process signals into events .... */
+            if (have_signal)
+              {
+                 while (_ecore_signal_count_get()) _ecore_signal_call();
+              }
+            
+            /* filter events to remove useless ones etc. ... */
+            /* FIXME: implement some other day... */
+            
+            /* handle events ... */
+            _ecore_event_call();       
+            _ecore_main_fd_handlers_cleanup();
+            have_signal = 1;
          }
-       
-       /* filter events to remove useless ones etc. ... */
-       /* FIXME: implement some other day... */
-       
-       /* handle events ... */
-       _ecore_event_call();
-       
-       _ecore_main_fd_handlers_cleanup();
+       while (_ecore_main_fd_handlers_buf_call());
      }
 }
 
@@ -149,7 +154,7 @@
  * This adds a fd handler, calling @p func whenever the fd is active
  */
 Ecore_Fd_Handler *
-ecore_main_fd_handler_add(int fd, Ecore_Fd_Handler_Flags flags, int (*func) 
(Ecore_Fd_Handler *fd_handler, void *data), void *data)
+ecore_main_fd_handler_add(int fd, Ecore_Fd_Handler_Flags flags, int (*func) 
+(Ecore_Fd_Handler *fd_handler, void *data), void *data, int (*buf_func) 
+(Ecore_Fd_Handler *fd_handler, void *buf_data), void *buf_data)
 {
    Ecore_Fd_Handler *fdh;
    
@@ -162,6 +167,8 @@
    fdh->delete_me = 0;
    fdh->func = func;
    fdh->data = data;
+   fdh->buf_func = buf_func;
+   fdh->buf_data = buf_data;
    fd_handlers = _ecore_list_append(fd_handlers, fdh);
    return fdh;
 }
@@ -317,6 +324,24 @@
        if (!fdh->delete_me)
          {
             if ((fdh->read_active) || (fdh->write_active))
+              fdh->func(fdh, fdh->data);
+         }
+     }
+}
+
+static int
+_ecore_main_fd_handlers_buf_call(void)
+{
+   Ecore_List    *l;
+   
+   for (l = fd_handlers; l; l = l->next)
+     {
+       Ecore_Fd_Handler *fdh;
+       
+       fdh = l;
+       if (!fdh->delete_me)
+         {
+            if (fdh->buf_func(fdh, fdh->buf_data))
               fdh->func(fdh, fdh->data);
          }
      }
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/Attic/ecore_private.h,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -3 -r1.1.2.5 -r1.1.2.6
--- ecore_private.h     13 Jan 2003 13:04:47 -0000      1.1.2.5
+++ ecore_private.h     13 Jan 2003 22:27:42 -0000      1.1.2.6
@@ -74,6 +74,8 @@
    int                      delete_me : 1;
    int                    (*func) (Ecore_Fd_Handler *fd_handler, void *data);
    void                    *data;
+   int                    (*buf_func) (Ecore_Fd_Handler *fd_handler, void *data);
+   void                    *buf_data;
 };
 
 struct _Ecore_Event_Handler




-------------------------------------------------------
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to