aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/win.c
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2015-08-06 21:26:43 +0200
committerBoris Faure <billiob@gmail.com>2015-08-06 21:53:14 +0200
commit3716c7ec51d25d93b70a5197bfbef4eb2f7b9e68 (patch)
tree55fc928df4423042fdb815a6e5ff8f37731ad688 /src/bin/win.c
parentrewrite whether a term container is splittable. CID1315267 and CID1315268 (diff)
downloadterminology-3716c7ec51d25d93b70a5197bfbef4eb2f7b9e68.tar.gz
apply zoom level/font size to all terms in a window
Diffstat (limited to 'src/bin/win.c')
-rw-r--r--src/bin/win.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/bin/win.c b/src/bin/win.c
index 9293f5b..3a91d90 100644
--- a/src/bin/win.c
+++ b/src/bin/win.c
@@ -4117,6 +4117,24 @@ term_new(Win *wn, Config *config, const char *cmd,
/* }}} */
+
+
+static Eina_Bool
+_font_size_set(Term *term, void *data)
+{
+ int fontsize = (intptr_t) data;
+
+ termio_font_size_set(term->termio, fontsize);
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+void
+win_font_size_set(Win *wn, int new_size)
+{
+ for_each_term_do(wn, &_font_size_set, (void*)(intptr_t)new_size);
+}
+
void
windows_free(void)
{
@@ -4146,3 +4164,19 @@ windows_update(void)
tc->update(tc);
}
}
+
+Eina_Bool
+for_each_term_do(Win *wn, For_Each_Term cb, void *data)
+{
+ Eina_List *l;
+ Term *term;
+ Eina_Bool res = ECORE_CALLBACK_DONE;
+
+ EINA_LIST_FOREACH(wn->terms, l, term)
+ {
+ res = cb(term, data);
+ if (res == ECORE_CALLBACK_CANCEL)
+ return res;
+ }
+ return res;
+}