- Timestamp:
- 2009-10-10T23:57:26Z (15 years ago)
- Branches:
- master
- Children:
- 4164e62
- Parents:
- e046390
- Location:
- lib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/events.h
re046390 rc5c18c1 49 49 typedef enum { 50 50 B_EV_IO_READ = 1 << 0, 51 B_EV_IO_WRITE = 1 << 1 51 B_EV_IO_WRITE = 1 << 1, 52 B_EV_FLAG_FORCE_ONCE = 1 << 16, 53 B_EV_FLAG_FORCE_REPEAT = 1 << 17, 52 54 } b_input_condition; 53 55 typedef gboolean (*b_event_handler)(gpointer data, gint fd, b_input_condition cond); -
lib/events_glib.c
re046390 rc5c18c1 49 49 b_event_handler function; 50 50 gpointer data; 51 guint flags; 51 52 } GaimIOClosure; 52 53 … … 87 88 event_debug( "Returned FALSE, cancelling.\n" ); 88 89 89 return st; 90 if (closure->flags & B_EV_FLAG_FORCE_ONCE) 91 return FALSE; 92 else if (closure->flags & B_EV_FLAG_FORCE_REPEAT) 93 return TRUE; 94 else 95 return st; 90 96 } 91 97 … … 105 111 closure->function = function; 106 112 closure->data = data; 113 closure->flags = condition; 107 114 108 115 if (condition & B_EV_IO_READ) -
lib/events_libevent.c
re046390 rc5c18c1 60 60 b_event_handler function; 61 61 void *data; 62 guint flags; 62 63 }; 63 64 … … 150 151 return; 151 152 } 152 else if( !st )153 else if( !st && !( b_ev->flags & B_EV_FLAG_FORCE_REPEAT ) ) 153 154 { 154 155 event_debug( "Handler returned FALSE: " ); … … 212 213 } 213 214 215 b_ev->flags = condition; 214 216 g_hash_table_insert( id_hash, &b_ev->id, b_ev ); 215 217 return b_ev->id;
Note: See TracChangeset
for help on using the changeset viewer.