summaryrefslogtreecommitdiff
path: root/src/lib/ecore/efl_loop_handler.eo
blob: 0058ceb8a3b39665b131cc96e039b8e2cf82be91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
enum Efl.Loop_Handler_Flags {
   [[ A set of flags that can be OR'd together to indicate which are
   desired ]]
   none = 0, [[ No I/O is desired (generally useless) ]]
   read = 1, [[ Reading is desired ]]
   write = 2, [[ Writing is desired ]]
   error = 4, [[ Error channel input is desired ]]
}

class Efl.Loop_Handler (Efl.Object)
{
   [[ An object that describes an low-level source of I/O to listen to
   for available data to be read or written, depending on the OS and data
   source type. When I/O becomes available various events are produced
   and the callbacks attached to them will be called. ]]
   methods {
      @property active {
         [[ This sets what kind of I/O should be listened to only when
         using a fd or fd_file for the handler ]]
         set { }
         get { }
         values {
            flags: Efl.Loop_Handler_Flags; [[ The flags that indicate what kind of I/O should be listened for like read, write or error channels. ]]
         }
      }
      @property fd {
         [[ Controls a file descriptor to listen to for I/O, which points
         to a data pipe such as a device, socket or pipe etc. ]]
         set { }
         get { }
         values {
            fd: int; [[ The file descriptor ]]
         }
      }
      @property fd_file {
         [[ Controls a file descriptor to listen to for I/O that
         specifically points to a file in storage and not a device, socket or
         pipe etc. ]]
         set { }
         get { }
         values {
            fd: int; [[ The file descriptor ]]
         }
      }
      @property win32 {
         [[ Controls a windows win32 object handle to listen to for I/O.
         When it becomes available for any data the read event will be
         produced. ]]
         set { }
         get { }
         values {
            handle: void_ptr; [[ A win32 object handle ]]
         }
      }
   }
   events {
      read: void; [[ Called when a read occurs on the descriptor. ]]
      write: void; [[ Called when a write occurs on the descriptor. ]]
      error: void; [[ Called when a error occurrs on the descriptor. ]]
      buffer: void; [[ Called when buffered data already read from the descriptor should be processed. ]]
      prepare: void; [[ Called when preparing a descriptor for listening. ]]
   }

   implements {
      Efl.Object.constructor;
      Efl.Object.destructor;
      Efl.Object.finalize;
      Efl.Object.parent { set; }
   }
}