summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Roberto de Souza <jose.souza@intel.com>2013-09-06 15:42:17 -0300
committerJosé Roberto de Souza <jose.souza@intel.com>2013-09-19 15:53:43 -0300
commit7530e8d3049d42dfb98cbe8b448d59d25c4bf6d0 (patch)
tree67663a83548388f1c4b2e5c7f82afa7d89e0882e
parentefd096b3bda4518a4e6031988de209b5b26e715a (diff)
Add functions to access userfull data and functionally of win, term and split
-rw-r--r--src/bin/main.c37
-rw-r--r--src/bin/main.h11
2 files changed, 40 insertions, 8 deletions
diff --git a/src/bin/main.c b/src/bin/main.c
index bcb5d86..20f7c61 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -23,10 +23,6 @@
23 #define PANES_BOTTOM "bottom" 23 #define PANES_BOTTOM "bottom"
24#endif 24#endif
25 25
26typedef struct _Win Win;
27typedef struct _Term Term;
28typedef struct _Split Split;
29
30struct _Win 26struct _Win
31{ 27{
32 Evas_Object *win; 28 Evas_Object *win;
@@ -1416,16 +1412,21 @@ _cb_new(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event EINA_U
1416 main_new(term->wn->win, term->term); 1412 main_new(term->wn->win, term->term);
1417} 1413}
1418 1414
1419static void 1415void
1420_cb_select(void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED) 1416main_term_focus(Term *term)
1421{ 1417{
1422 Term *term = data;
1423 Split *sp; 1418 Split *sp;
1424 1419
1425 sp = _split_find(term->wn->win, term->term); 1420 sp = _split_find(term->wn->win, term->term);
1426 _sel_go(sp, term); 1421 _sel_go(sp, term);
1427} 1422}
1428 1423
1424static void
1425_cb_select(void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED)
1426{
1427 Term *term = data;
1428 main_term_focus(term);
1429}
1429 1430
1430static void 1431static void
1431_cb_split_h(void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED) 1432_cb_split_h(void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED)
@@ -2189,6 +2190,26 @@ main_term_new(Win *wn, Config *config, const char *cmd,
2189 return term; 2190 return term;
2190} 2191}
2191 2192
2193Win *main_term_win_get(Term *term)
2194{
2195 return term->wn;
2196}
2197
2198Evas_Object *main_win_evas_object_get(Win *wn)
2199{
2200 return wn->win;
2201}
2202
2203Eina_List *main_win_terms_get(Win *wn)
2204{
2205 return wn->terms;
2206}
2207
2208Evas_Object *main_term_evas_object_get(Term *term)
2209{
2210 return term->term;
2211}
2212
2192static void 2213static void
2193main_ipc_new(Ipc_Instance *inst) 2214main_ipc_new(Ipc_Instance *inst)
2194{ 2215{
diff --git a/src/bin/main.h b/src/bin/main.h
index c91dc07..bf03aba 100644
--- a/src/bin/main.h
+++ b/src/bin/main.h
@@ -3,6 +3,10 @@
3 3
4#include "config.h" 4#include "config.h"
5 5
6typedef struct _Win Win;
7typedef struct _Term Term;
8typedef struct _Split Split;
9
6void main_new(Evas_Object *win, Evas_Object *term); 10void main_new(Evas_Object *win, Evas_Object *term);
7void main_split_h(Evas_Object *win, Evas_Object *term); 11void main_split_h(Evas_Object *win, Evas_Object *term);
8void main_split_v(Evas_Object *win, Evas_Object *term); 12void main_split_v(Evas_Object *win, Evas_Object *term);
@@ -15,4 +19,11 @@ void main_config_sync(const Config *config);
15 19
16void change_theme(Evas_Object *win, Config *config); 20void change_theme(Evas_Object *win, Config *config);
17 21
22void main_term_focus(Term *term);
23
24Win *main_term_win_get(Term *term);
25Evas_Object *main_win_evas_object_get(Win *wn);
26Eina_List *main_win_terms_get(Win *wn);
27Evas_Object *main_term_evas_object_get(Term *term);
28
18#endif 29#endif