summaryrefslogtreecommitdiff
path: root/src/bin/controls.c
diff options
context:
space:
mode:
authorFlavio Vinicius Alvares Ceolin <flavio.ceolin@profusion.mobi>2012-10-19 22:04:01 +0000
committerFlavio Vinicius Alvares Ceolin <flavio.ceolin@profusion.mobi>2012-10-19 22:04:01 +0000
commit0dcc9e20440e34edea7b2e27151ad6ffbf4e07e4 (patch)
tree50352d12c715fb06ec628a3bc8ca256961c9fdbf /src/bin/controls.c
parent26c02a3f9e7ce0874a79a97c82cebf4cc03236f7 (diff)
Using the edje_codegen to handle with the theme
Using the code generated to handle the parts of the edj file. Trying to avoid mistakes with the parts names and make the code more independent from the theme (the parts can change the name since it maintaining the same api) SVN revision: 78271
Diffstat (limited to 'src/bin/controls.c')
-rw-r--r--src/bin/controls.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/bin/controls.c b/src/bin/controls.c
index 0d80755..a816dbf 100644
--- a/src/bin/controls.c
+++ b/src/bin/controls.c
@@ -6,6 +6,8 @@
6#include "about.h" 6#include "about.h"
7#include "termio.h" 7#include "termio.h"
8 8
9#include "background_generated.h"
10
9static Evas_Object *ct_frame = NULL, *ct_box = NULL, *ct_over = NULL; 11static Evas_Object *ct_frame = NULL, *ct_box = NULL, *ct_over = NULL;
10static Eina_Bool ct_out = EINA_FALSE; 12static Eina_Bool ct_out = EINA_FALSE;
11static Ecore_Timer *ct_del_timer = NULL; 13static Ecore_Timer *ct_del_timer = NULL;
@@ -130,14 +132,14 @@ controls_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term)
130 evas_object_show(o); 132 evas_object_show(o);
131 evas_object_smart_callback_add(o, "clicked", _cb_ct_about, NULL); 133 evas_object_smart_callback_add(o, "clicked", _cb_ct_about, NULL);
132 134
133 edje_object_part_swallow(bg, "terminology.controls", ct_frame); 135 background_controls_set(bg, ct_frame);
134 evas_object_show(ct_frame); 136 evas_object_show(ct_frame);
135 } 137 }
136 if (!ct_out) 138 if (!ct_out)
137 { 139 {
138 ct_over = o = evas_object_rectangle_add(evas_object_evas_get(win)); 140 ct_over = o = evas_object_rectangle_add(evas_object_evas_get(win));
139 evas_object_color_set(o, 0, 0, 0, 0); 141 evas_object_color_set(o, 0, 0, 0, 0);
140 edje_object_part_swallow(bg, "terminology.dismiss", o); 142 background_dismiss_set(bg, o);
141 evas_object_show(o); 143 evas_object_show(o);
142 evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN, 144 evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN,
143 _cb_mouse_down, term); 145 _cb_mouse_down, term);
@@ -145,7 +147,7 @@ controls_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term)
145 ct_win = win; 147 ct_win = win;
146 ct_bg = bg; 148 ct_bg = bg;
147 ct_term = term; 149 ct_term = term;
148 edje_object_signal_emit(bg, "controls,show", "terminology"); 150 background_controls_show_emit(bg);
149 ct_out = EINA_TRUE; 151 ct_out = EINA_TRUE;
150 elm_object_focus_set(ct_frame, EINA_TRUE); 152 elm_object_focus_set(ct_frame, EINA_TRUE);
151 if (ct_del_timer) 153 if (ct_del_timer)
@@ -159,7 +161,7 @@ controls_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term)
159 evas_object_del(ct_over); 161 evas_object_del(ct_over);
160 ct_over = NULL; 162 ct_over = NULL;
161 163
162 edje_object_signal_emit(bg, "controls,hide", "terminology"); 164 background_controls_hide_emit(bg);
163 ct_out = EINA_FALSE; 165 ct_out = EINA_FALSE;
164 elm_object_focus_set(ct_frame, EINA_FALSE); 166 elm_object_focus_set(ct_frame, EINA_FALSE);
165 elm_object_focus_set(term, EINA_TRUE); 167 elm_object_focus_set(term, EINA_TRUE);