summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schmidt <stefan@osg.samsung.com>2016-04-15 14:37:02 +0200
committerStefan Schmidt <stefan@osg.samsung.com>2016-04-17 17:42:40 +0200
commite728ea168fefb67b91f4743d23ee6a40ddae3ebe (patch)
tree7c8c02837bef0886f62ca74646adaad252578207
parent4f6cc20e849bcc17d52088eed52b30480f85004c (diff)
docs: add description for ecore_poller class and cleanup some other parts
-rw-r--r--src/lib/ecore/ecore_poller.eo34
1 files changed, 23 insertions, 11 deletions
diff --git a/src/lib/ecore/ecore_poller.eo b/src/lib/ecore/ecore_poller.eo
index a40b5764fe..62ffe4f921 100644
--- a/src/lib/ecore/ecore_poller.eo
+++ b/src/lib/ecore/ecore_poller.eo
@@ -9,30 +9,42 @@ enum Ecore.Poller_Type
9 9
10class Ecore.Poller (Eo.Base) 10class Ecore.Poller (Eo.Base)
11{ 11{
12 [[Ecore poller provides infrastructure for the creation of pollers.
13
14 Pollers are, in essence, callbacks that share a single timer per type. Because
15 not all pollers need to be called at the same frequency the user may specify
16 the frequency in ticks(each expiration of the shared timer is called a tick,
17 in ecore poller parlance) for each added poller. Ecore pollers should only be
18 used when the poller doesn't have specific requirements on the exact times to
19 poll.
20
21 This architecture means that the main loop is only woken up once to handle
22 all pollers of that type, this will save power as the CPU has more of a
23 chance to go into a low power state the longer it is asleep for, so this
24 should be used in situations where power usage is a concern.
25
26 For now only 1 core poller type is supported: ECORE_POLLER_CORE, the default
27 interval for ECORE_POLLER_CORE is 0.125(or 1/8th) second.
28 ]]
12 methods { 29 methods {
13 constructor { 30 constructor {
14 [[Constructor with parameters for Ecore Poller.]] 31 [[Constructor with parameters for Ecore Poller.]]
15 legacy: null; 32 legacy: null;
16 params { 33 params {
17 @in type: Ecore.Poller_Type; 34 @in type: Ecore.Poller_Type; [[Ecore poller type which defines the frequency of ticks
18 @in interval: int; 35 for the poller.]]
19 @in func: Ecore_Task_Cb; 36 @in interval: int; [[The tick interval; must be a power of 2 and <= 32768.]]
20 @in data: const(void)*; 37 @in func: Ecore_Task_Cb; [[Ecore poller callback function.]]
38 @in data: const(void)*; [[Private data passed to callback function.]]
21 } 39 }
22 } 40 }
23 @property interval { 41 @property interval {
42 [[Polling interval rate of the poller.]]
24 set { 43 set {
25 [[Changes the polling interval rate of the poller.
26
27 This allows the changing of a poller's polling interval. It is
28 useful when you want to alter a poll rate without deleting and
29 re-creating a poller.
30 ]]
31 legacy: ecore_poller_poller_interval_set; 44 legacy: ecore_poller_poller_interval_set;
32 return: bool; [[true on success, false on failure.]] 45 return: bool; [[true on success, false on failure.]]
33 } 46 }
34 get { 47 get {
35 [[Gets the polling interval rate of the poller.]]
36 legacy: ecore_poller_poller_interval_get; 48 legacy: ecore_poller_poller_interval_get;
37 } 49 }
38 values { 50 values {