diff options
author | David Walter Seikel | 2012-04-22 09:20:32 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-04-22 09:20:32 +1000 |
commit | 3ad3455551be0d7859ecb02290376206d5e66498 (patch) | |
tree | 497917e12b4d7f458dff9765d9b53f64c4e03fc3 /libraries/eina/src/examples/eina_model_04_whistler.c | |
parent | Update EFL to latest beta. (diff) | |
download | SledjHamr-3ad3455551be0d7859ecb02290376206d5e66498.zip SledjHamr-3ad3455551be0d7859ecb02290376206d5e66498.tar.gz SledjHamr-3ad3455551be0d7859ecb02290376206d5e66498.tar.bz2 SledjHamr-3ad3455551be0d7859ecb02290376206d5e66498.tar.xz |
And actually include new files, plus elementary libraries.
Diffstat (limited to 'libraries/eina/src/examples/eina_model_04_whistler.c')
-rw-r--r-- | libraries/eina/src/examples/eina_model_04_whistler.c | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/libraries/eina/src/examples/eina_model_04_whistler.c b/libraries/eina/src/examples/eina_model_04_whistler.c new file mode 100644 index 0000000..ed9832f --- /dev/null +++ b/libraries/eina/src/examples/eina_model_04_whistler.c | |||
@@ -0,0 +1,59 @@ | |||
1 | /* | ||
2 | * whistler.c | ||
3 | * | ||
4 | */ | ||
5 | |||
6 | #include "eina_model_04_whistler.h" | ||
7 | |||
8 | void | ||
9 | whistler_whistle(Eina_Model *m) | ||
10 | { | ||
11 | const Eina_Model_Interface *iface = NULL; | ||
12 | iface = eina_model_interface_get(m, WHISTLER_INTERFACE_NAME); | ||
13 | |||
14 | EINA_SAFETY_ON_NULL_RETURN(iface); | ||
15 | |||
16 | void (*pf)(Eina_Model *); | ||
17 | |||
18 | pf = eina_model_interface_method_resolve(iface, m, Whistler_Interface, whistle); | ||
19 | EINA_SAFETY_ON_NULL_RETURN(pf); | ||
20 | printf("%s() \t", __func__); | ||
21 | pf(m); | ||
22 | } | ||
23 | /* | ||
24 | * call for overridden Swimmer Interface function | ||
25 | */ | ||
26 | void | ||
27 | swimmer_swim(Eina_Model *m) | ||
28 | { | ||
29 | const Eina_Model_Interface *iface = NULL; | ||
30 | iface = eina_model_interface_get(m, SWIMMER_INTERFACE_NAME); | ||
31 | |||
32 | EINA_SAFETY_ON_NULL_RETURN(iface); | ||
33 | |||
34 | void (*pf)(Eina_Model *); | ||
35 | |||
36 | pf = eina_model_interface_method_resolve(iface, m, Swimmer_Interface, swim); | ||
37 | EINA_SAFETY_ON_NULL_RETURN(pf); | ||
38 | printf("%s() \t", __func__); | ||
39 | pf(m); | ||
40 | } | ||
41 | |||
42 | /* | ||
43 | * call for overridden Diver Interface function | ||
44 | */ | ||
45 | void | ||
46 | diver_dive(Eina_Model *m) | ||
47 | { | ||
48 | const Eina_Model_Interface *iface = NULL; | ||
49 | iface = eina_model_interface_get(m, DIVER_INTERFACE_NAME); | ||
50 | |||
51 | EINA_SAFETY_ON_NULL_RETURN(iface); | ||
52 | |||
53 | void (*pf)(Eina_Model *); | ||
54 | |||
55 | pf = eina_model_interface_method_resolve(iface, m, Diver_Interface, dive); | ||
56 | EINA_SAFETY_ON_NULL_RETURN(pf); | ||
57 | printf("%s() \t", __func__); | ||
58 | pf(m); | ||
59 | } | ||