aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/col.c4
-rw-r--r--src/bin/col.h2
-rw-r--r--src/bin/config.c2
-rw-r--r--src/bin/config.h2
-rw-r--r--src/bin/gravatar.c4
-rw-r--r--src/bin/gravatar.h2
-rw-r--r--src/bin/keyin.c4
-rw-r--r--src/bin/keyin.h4
-rw-r--r--src/bin/main.h4
-rw-r--r--src/bin/media.c4
-rw-r--r--src/bin/media.h4
-rw-r--r--src/bin/miniview.c4
-rw-r--r--src/bin/miniview.h4
-rw-r--r--src/bin/term_container.h14
-rw-r--r--src/bin/termio.c21
-rw-r--r--src/bin/termio.h20
-rw-r--r--src/bin/termiolink.c2
-rw-r--r--src/bin/termiolink.h2
-rw-r--r--src/bin/termpty.c10
-rw-r--r--src/bin/termpty.h6
-rw-r--r--src/bin/termptydbl.c2
-rw-r--r--src/bin/termptydbl.h4
-rw-r--r--src/bin/termptyesc.c8
-rw-r--r--src/bin/termptyesc.h2
-rw-r--r--src/bin/termptyext.c4
-rw-r--r--src/bin/termptyext.h2
-rw-r--r--src/bin/termptygfx.c2
-rw-r--r--src/bin/termptygfx.h2
-rw-r--r--src/bin/termptyops.c2
-rw-r--r--src/bin/win.c86
-rw-r--r--src/bin/win.h18
31 files changed, 128 insertions, 123 deletions
diff --git a/src/bin/col.c b/src/bin/col.c
index 003847c..e73b472 100644
--- a/src/bin/col.c
+++ b/src/bin/col.c
@@ -380,7 +380,9 @@ static const Color default_colors256[256] =
};
void
-colors_term_init(Evas_Object *textgrid, Evas_Object *bg, Config *config)
+colors_term_init(Evas_Object *textgrid,
+ const Evas_Object *bg,
+ const Config *config)
{
int c, n;
char buf[32];
diff --git a/src/bin/col.h b/src/bin/col.h
index c277287..2fe8dfe 100644
--- a/src/bin/col.h
+++ b/src/bin/col.h
@@ -4,7 +4,7 @@
#include <Evas.h>
#include "config.h"
-void colors_term_init(Evas_Object *textgrid, Evas_Object *bg, Config *config);
+void colors_term_init(Evas_Object *textgrid, const Evas_Object *bg, const Config *config);
void colors_standard_get(int set, int col, unsigned char *r, unsigned char *g, unsigned char *b, unsigned char *a);
#endif
diff --git a/src/bin/config.c b/src/bin/config.c
index 087e253..a80e434 100644
--- a/src/bin/config.c
+++ b/src/bin/config.c
@@ -650,7 +650,7 @@ config_load(const char *key)
}
Config *
-config_fork(Config *config)
+config_fork(const Config *config)
{
Config_Keys *key;
Eina_List *l;
diff --git a/src/bin/config.h b/src/bin/config.h
index 2db6b25..cef03fc 100644
--- a/src/bin/config.h
+++ b/src/bin/config.h
@@ -92,7 +92,7 @@ void config_shutdown(void);
void config_sync(const Config *config_src, Config *config);
void config_save(Config *config, const char *key);
Config *config_load(const char *key);
-Config *config_fork(Config *config);
+Config *config_fork(const Config *config);
Config *config_new();
void config_del(Config *config);
void config_default_font_set(Config *config, Evas *evas);
diff --git a/src/bin/gravatar.c b/src/bin/gravatar.c
index 06cbea9..c93c4d9 100644
--- a/src/bin/gravatar.c
+++ b/src/bin/gravatar.c
@@ -28,7 +28,7 @@ int _gravatar_log_dom = -1;
typedef struct _Gravatar {
const char *url;
- Config *config;
+ const Config *config;
} Gravatar;
static Evas_Object *
@@ -56,7 +56,7 @@ _tooltip_del(void *data,
}
void
-gravatar_tooltip(Evas_Object *obj, Config *config, char *email)
+gravatar_tooltip(Evas_Object *obj, const Config *config, char *email)
{
int n;
MD5_CTX ctx;
diff --git a/src/bin/gravatar.h b/src/bin/gravatar.h
index fb5ea14..c7a3cdd 100644
--- a/src/bin/gravatar.h
+++ b/src/bin/gravatar.h
@@ -4,7 +4,7 @@
#include "config.h"
void
-gravatar_tooltip(Evas_Object *obj, Config *config, char *email);
+gravatar_tooltip(Evas_Object *obj, const Config *config, char *email);
void gravatar_init(void);
void gravatar_shutdown(void);
diff --git a/src/bin/keyin.c b/src/bin/keyin.c
index 5907e83..15ec8a0 100644
--- a/src/bin/keyin.c
+++ b/src/bin/keyin.c
@@ -775,7 +775,7 @@ _key_binding_free(void *data)
/* Returns -2 for duplicate key, 0 on success, -1 otherwise */
int
-keyin_add_config(Config_Keys *key)
+keyin_add_config(const Config_Keys *key)
{
Shortcut_Action *action = _actions;
@@ -804,7 +804,7 @@ keyin_add_config(Config_Keys *key)
}
int
-keyin_remove_config(Config_Keys *key)
+keyin_remove_config(const Config_Keys *key)
{
Key_Binding *kb;
diff --git a/src/bin/keyin.h b/src/bin/keyin.h
index 9687381..d9127a1 100644
--- a/src/bin/keyin.h
+++ b/src/bin/keyin.h
@@ -34,8 +34,8 @@ struct _Shortcut_Action
const Shortcut_Action *shortcut_actions_get(void);
int key_bindings_load(Config *config);
-int keyin_add_config(Config_Keys *cfg_key);
-int keyin_remove_config(Config_Keys *cfg_key);
+int keyin_add_config(const Config_Keys *cfg_key);
+int keyin_remove_config(const Config_Keys *cfg_key);
void key_bindings_shutdown(void);
#endif
diff --git a/src/bin/main.h b/src/bin/main.h
index 61d387f..8edb2be 100644
--- a/src/bin/main.h
+++ b/src/bin/main.h
@@ -6,8 +6,8 @@
Config * main_config_get(void);
void main_new(Evas_Object *win, Evas_Object *term);
void main_new_with_dir(Evas_Object *win, Evas_Object *term, const char *wdir);
-void main_split_h(Evas_Object *win, Evas_Object *term, char *cmd);
-void main_split_v(Evas_Object *win, Evas_Object *term, char *cmd);
+void main_split_h(Evas_Object *win, Evas_Object *term, const char *cmd);
+void main_split_v(Evas_Object *win, Evas_Object *term, const char *cmd);
void term_close(Evas_Object *win, Evas_Object *term,
Eina_Bool hold_if_requested);
diff --git a/src/bin/media.c b/src/bin/media.c
index 3a45463..e1af48b 100644
--- a/src/bin/media.c
+++ b/src/bin/media.c
@@ -1486,7 +1486,7 @@ media_play_set(Evas_Object *obj, Eina_Bool play)
}
Eina_Bool
-media_play_get(Evas_Object *obj)
+media_play_get(const Evas_Object *obj)
{
Media *sd = evas_object_smart_data_get(obj);
if ((!sd) || (sd->type != MEDIA_TYPE_MOV)) return EINA_FALSE;
@@ -1542,7 +1542,7 @@ media_src_type_get(const char *src)
}
Evas_Object *
-media_control_get(Evas_Object *obj)
+media_control_get(const Evas_Object *obj)
{
Media *sd = evas_object_smart_data_get(obj);
if (!sd) return NULL;
diff --git a/src/bin/media.h b/src/bin/media.h
index 48b5c16..5f33cd4 100644
--- a/src/bin/media.h
+++ b/src/bin/media.h
@@ -30,14 +30,14 @@ enum _Media_Type {
Evas_Object *media_add(Evas_Object *parent, const char *src, const Config *config, int mode, Media_Type type);
void media_mute_set(Evas_Object *obj, Eina_Bool mute);
void media_play_set(Evas_Object *obj, Eina_Bool play);
-Eina_Bool media_play_get(Evas_Object *obj);
+Eina_Bool media_play_get(const Evas_Object *obj);
void media_position_set(Evas_Object *obj, double pos);
void media_volume_set(Evas_Object *obj, double vol);
void media_visualize_set(Evas_Object *obj, Eina_Bool visualize);
void media_stop(Evas_Object *obj);
const char *media_get(const Evas_Object *obj);
Media_Type media_src_type_get(const char *src);
-Evas_Object *media_control_get(Evas_Object *obj);
+Evas_Object *media_control_get(const Evas_Object *obj);
void media_unknown_handle(const char *handler, const char *src);
#endif
diff --git a/src/bin/miniview.c b/src/bin/miniview.c
index a526c17..0b01dcc 100644
--- a/src/bin/miniview.c
+++ b/src/bin/miniview.c
@@ -207,7 +207,7 @@ _smart_cb_mouse_wheel(void *data,
}
void
-miniview_position_offset(Evas_Object *obj, int by, Eina_Bool sanitize)
+miniview_position_offset(const Evas_Object *obj, int by, Eina_Bool sanitize)
{
Miniview *mv = evas_object_smart_data_get(obj);
int remain = 0;
@@ -476,7 +476,7 @@ _smart_hide(Evas_Object *obj)
}
void
-miniview_redraw(Evas_Object *obj)
+miniview_redraw(const Evas_Object *obj)
{
Miniview *mv;
diff --git a/src/bin/miniview.h b/src/bin/miniview.h
index 5ce22b8..65d28c6 100644
--- a/src/bin/miniview.h
+++ b/src/bin/miniview.h
@@ -5,8 +5,8 @@
Evas_Object * miniview_add(Evas_Object *parent, Evas_Object *termio);
-void miniview_redraw(Evas_Object *obj);
-void miniview_position_offset(Evas_Object *obj, int by, Eina_Bool sanitize);
+void miniview_redraw(const Evas_Object *obj);
+void miniview_position_offset(const Evas_Object *obj, int by, Eina_Bool sanitize);
Eina_Bool miniview_handle_key(Evas_Object *obj, const Evas_Event_Key_Down *ev);
void miniview_init(void);
diff --git a/src/bin/term_container.h b/src/bin/term_container.h
index 5015140..40b7090 100644
--- a/src/bin/term_container.h
+++ b/src/bin/term_container.h
@@ -37,13 +37,13 @@ struct _Term_Container {
Eina_Bool is_focused;
const char *title;
- Term *(*term_next)(Term_Container *tc, Term_Container *child);
- Term *(*term_prev)(Term_Container *tc, Term_Container *child);
- Term *(*term_first)(Term_Container *tc);
- Term *(*term_last)(Term_Container *tc);
- Term *(*focused_term_get)(Term_Container *tc);
- Evas_Object* (*get_evas_object)(Term_Container *container);
- Term *(*find_term_at_coords)(Term_Container *container,
+ Term *(*term_next)(const Term_Container *tc, const Term_Container *child);
+ Term *(*term_prev)(const Term_Container *tc, const Term_Container *child);
+ Term *(*term_first)(const Term_Container *tc);
+ Term *(*term_last)(const Term_Container *tc);
+ Term *(*focused_term_get)(const Term_Container *tc);
+ Evas_Object* (*get_evas_object)(const Term_Container *container);
+ Term *(*find_term_at_coords)(const Term_Container *container,
Evas_Coord mx, Evas_Coord my);
void (*split)(Term_Container *tc, Term_Container *child,
Term *from, const char *cmd, Eina_Bool is_horizontal);
diff --git a/src/bin/termio.c b/src/bin/termio.c
index 9b03008..04dd187 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -302,7 +302,7 @@ termio_mouseover_suspend_pushpop(Evas_Object *obj, int dir)
}
void
-termio_size_get(Evas_Object *obj, int *w, int *h)
+termio_size_get(const Evas_Object *obj, int *w, int *h)
{
Termio *sd = evas_object_smart_data_get(obj);
EINA_SAFETY_ON_NULL_RETURN(sd);
@@ -311,7 +311,7 @@ termio_size_get(Evas_Object *obj, int *w, int *h)
}
int
-termio_scroll_get(Evas_Object *obj)
+termio_scroll_get(const Evas_Object *obj)
{
Termio *sd = evas_object_smart_data_get(obj);
EINA_SAFETY_ON_NULL_RETURN_VAL(sd, 0);
@@ -358,7 +358,7 @@ termio_scroll_top_backlog(Evas_Object *obj)
}
const char *
-termio_title_get(Evas_Object *obj)
+termio_title_get(const Evas_Object *obj)
{
Termio *sd = evas_object_smart_data_get(obj);
EINA_SAFETY_ON_NULL_RETURN_VAL(sd, NULL);
@@ -382,7 +382,7 @@ termio_user_title_set(Evas_Object *obj, const char *title)
}
const char *
-termio_icon_name_get(Evas_Object *obj)
+termio_icon_name_get(const Evas_Object *obj)
{
Termio *sd = evas_object_smart_data_get(obj);
EINA_SAFETY_ON_NULL_RETURN_VAL(sd, NULL);
@@ -428,7 +428,7 @@ termio_selection_exists(const Evas_Object *obj)
}
Termpty *
-termio_pty_get(Evas_Object *obj)
+termio_pty_get(const Evas_Object *obj)
{
Termio *sd = evas_object_smart_data_get(obj);
EINA_SAFETY_ON_NULL_RETURN_VAL(sd, NULL);
@@ -437,7 +437,7 @@ termio_pty_get(Evas_Object *obj)
}
Evas_Object *
-termio_miniview_get(Evas_Object *obj)
+termio_miniview_get(const Evas_Object *obj)
{
Termio *sd = evas_object_smart_data_get(obj);
EINA_SAFETY_ON_NULL_RETURN_VAL(sd, NULL);
@@ -446,7 +446,7 @@ termio_miniview_get(Evas_Object *obj)
}
Term*
-termio_term_get(Evas_Object *obj)
+termio_term_get(const Evas_Object *obj)
{
Termio *sd = evas_object_smart_data_get(obj);
EINA_SAFETY_ON_NULL_RETURN_VAL(sd, NULL);
@@ -549,7 +549,7 @@ termio_cwd_get(const Evas_Object *obj, char *buf, size_t size)
}
Evas_Object *
-termio_textgrid_get(Evas_Object *obj)
+termio_textgrid_get(const Evas_Object *obj)
{
Termio *sd = evas_object_smart_data_get(obj);
EINA_SAFETY_ON_NULL_RETURN_VAL(sd, NULL);
@@ -558,7 +558,7 @@ termio_textgrid_get(Evas_Object *obj)
}
Evas_Object *
-termio_win_get(Evas_Object *obj)
+termio_win_get(const Evas_Object *obj)
{
Termio *sd = evas_object_smart_data_get(obj);
EINA_SAFETY_ON_NULL_RETURN_VAL(sd, NULL);
@@ -2069,7 +2069,8 @@ _mouse_in_selection(Termio *sd, int cx, int cy)
char *
-termio_selection_get(Evas_Object *obj, int c1x, int c1y, int c2x, int c2y,
+termio_selection_get(const Evas_Object *obj,
+ int c1x, int c1y, int c2x, int c2y,
size_t *lenp,
Eina_Bool rtrim)
{
diff --git a/src/bin/termio.h b/src/bin/termio.h
index 0567de6..02cb616 100644
--- a/src/bin/termio.h
+++ b/src/bin/termio.h
@@ -10,7 +10,7 @@
Evas_Object *termio_add(Evas_Object *parent, Config *config, const char *cmd, Eina_Bool login_shell, const char *cd, int w, int h, Term *term);
void termio_win_set(Evas_Object *obj, Evas_Object *win);
void termio_theme_set(Evas_Object *obj, Evas_Object *theme);
-char *termio_selection_get(Evas_Object *obj,
+char *termio_selection_get(const Evas_Object *obj,
int c1x, int c1y, int c2x, int c2y,
size_t *len, Eina_Bool right_trim);
Eina_Bool termio_selection_exists(const Evas_Object *obj);
@@ -27,24 +27,24 @@ void termio_paste_selection(Evas_Object *obj, Elm_Sel_Type);
const char *termio_link_get(const Evas_Object *obj);
void termio_mouseover_suspend_pushpop(Evas_Object *obj, int dir);
void termio_event_feed_mouse_in(Evas_Object *obj);
-void termio_size_get(Evas_Object *obj, int *w, int *h);
-int termio_scroll_get(Evas_Object *obj);
+void termio_size_get(const Evas_Object *obj, int *w, int *h);
+int termio_scroll_get(const Evas_Object *obj);
void termio_font_size_set(Evas_Object *obj, int size);
void termio_grid_size_set(Evas_Object *obj, int w, int h);
pid_t termio_pid_get(const Evas_Object *obj);
Eina_Bool termio_cwd_get(const Evas_Object *obj, char *buf, size_t size);
-Evas_Object *termio_textgrid_get(Evas_Object *obj);
-Evas_Object *termio_win_get(Evas_Object *obj);
-const char *termio_title_get(Evas_Object *obj);
+Evas_Object *termio_textgrid_get(const Evas_Object *obj);
+Evas_Object *termio_win_get(const Evas_Object *obj);
+const char *termio_title_get(const Evas_Object *obj);
void termio_user_title_set(Evas_Object *obj, const char *title);
-const char *termio_icon_name_get(Evas_Object *obj);
+const char *termio_icon_name_get(const Evas_Object *obj);
void termio_media_mute_set(Evas_Object *obj, Eina_Bool mute);
void termio_media_visualize_set(Evas_Object *obj, Eina_Bool visualize);
void termio_config_set(Evas_Object *obj, Config *config);
Config *termio_config_get(const Evas_Object *obj);
-Termpty *termio_pty_get(Evas_Object *obj);
-Evas_Object * termio_miniview_get(Evas_Object *obj);
-Term* termio_term_get(Evas_Object *obj);
+Termpty *termio_pty_get(const Evas_Object *obj);
+Evas_Object * termio_miniview_get(const Evas_Object *obj);
+Term* termio_term_get(const Evas_Object *obj);
#endif
diff --git a/src/bin/termiolink.c b/src/bin/termiolink.c
index 4394d85..13dab93 100644
--- a/src/bin/termiolink.c
+++ b/src/bin/termiolink.c
@@ -228,7 +228,7 @@ bad:
}
char *
-termio_link_find(Evas_Object *obj, int cx, int cy,
+termio_link_find(const Evas_Object *obj, int cx, int cy,
int *x1r, int *y1r, int *x2r, int *y2r)
{
char *s = NULL;
diff --git a/src/bin/termiolink.h b/src/bin/termiolink.h
index 455e20c..bb97d90 100644
--- a/src/bin/termiolink.h
+++ b/src/bin/termiolink.h
@@ -1,6 +1,6 @@
#ifndef _TERMIO_LINK_H__
#define _TERMIO_LINK_H__ 1
-char *termio_link_find(Evas_Object *obj, int cx, int cy, int *x1r, int *y1r, int *x2r, int *y2r);
+char *termio_link_find(const Evas_Object *obj, int cx, int cy, int *x1r, int *y1r, int *x2r, int *y2r);
#endif
diff --git a/src/bin/termpty.c b/src/bin/termpty.c
index 5ef82f1..66bee83 100644
--- a/src/bin/termpty.c
+++ b/src/bin/termpty.c
@@ -802,7 +802,7 @@ termpty_line_length(const Termcell *cells, ssize_t nb_cells)
static inline void
-verify_beacon(Termpty *ty EINA_UNUSED, int verbose EINA_UNUSED)
+verify_beacon(const Termpty *ty EINA_UNUSED, int verbose EINA_UNUSED)
{
#if 0
Termsave *ts;
@@ -955,7 +955,7 @@ termpty_backlog_length(Termpty *ty)
while (42)
{
int nb_lines;
- Termsave *ts;
+ const Termsave *ts;
ts = BACKLOG_ROW_GET(ty, backlog_y);
if (!ts->cells || backlog_y >= (int)ty->backsize)
@@ -1454,7 +1454,7 @@ termpty_block_insert(Termpty *ty, int ch, Termblock *blk)
}
int
-termpty_block_id_get(Termcell *cell, int *x, int *y)
+termpty_block_id_get(const Termcell *cell, int *x, int *y)
{
int id;
@@ -1466,7 +1466,7 @@ termpty_block_id_get(Termcell *cell, int *x, int *y)
}
Termblock *
-termpty_block_get(Termpty *ty, int id)
+termpty_block_get(const Termpty *ty, int id)
{
if (!ty->block.blocks) return NULL;
return eina_hash_find(ty->block.blocks, &id);
@@ -1483,7 +1483,7 @@ termpty_block_chid_update(Termpty *ty, Termblock *blk)
}
Termblock *
-termpty_block_chid_get(Termpty *ty, const char *chid)
+termpty_block_chid_get(const Termpty *ty, const char *chid)
{
Termblock *tb;
diff --git a/src/bin/termpty.h b/src/bin/termpty.h
index c859401..30742c0 100644
--- a/src/bin/termpty.h
+++ b/src/bin/termpty.h
@@ -247,10 +247,10 @@ pid_t termpty_pid_get(const Termpty *ty);
void termpty_block_free(Termblock *tb);
Termblock *termpty_block_new(Termpty *ty, int w, int h, const char *path, const char *link);
void termpty_block_insert(Termpty *ty, int ch, Termblock *blk);
-int termpty_block_id_get(Termcell *cell, int *x, int *y);
-Termblock *termpty_block_get(Termpty *ty, int id);
+int termpty_block_id_get(const Termcell *cell, int *x, int *y);
+Termblock *termpty_block_get(const Termpty *ty, int id);
void termpty_block_chid_update(Termpty *ty, Termblock *blk);
-Termblock *termpty_block_chid_get(Termpty *ty, const char *chid);
+Termblock *termpty_block_chid_get(const Termpty *ty, const char *chid);
void termpty_cell_copy(Termpty *ty, Termcell *src, Termcell *dst, int n);
void termpty_cell_fill(Termpty *ty, Termcell *src, Termcell *dst, int n);
diff --git a/src/bin/termptydbl.c b/src/bin/termptydbl.c
index 7e1e4b0..38db33b 100644
--- a/src/bin/termptydbl.c
+++ b/src/bin/termptydbl.c
@@ -5,7 +5,7 @@
#include "termptydbl.h"
Eina_Bool
-_termpty_is_dblwidth_slow_get(Termpty *ty, int g)
+_termpty_is_dblwidth_slow_get(const Termpty *ty, int g)
{
// check for east asian full-width (F), half-width (H), wide (W),
// narrow (Na) or ambiguous (A) codepoints
diff --git a/src/bin/termptydbl.h b/src/bin/termptydbl.h
index 635b8cc..142e16c 100644
--- a/src/bin/termptydbl.h
+++ b/src/bin/termptydbl.h
@@ -1,10 +1,10 @@
#ifndef _TERMPTY_DBL_H__
#define _TERMPTY_DBL_H__ 1
-Eina_Bool _termpty_is_dblwidth_slow_get(Termpty *ty, int g);
+Eina_Bool _termpty_is_dblwidth_slow_get(const Termpty *ty, int g);
static inline Eina_Bool
-_termpty_is_dblwidth_get(Termpty *ty, int g)
+_termpty_is_dblwidth_get(const Termpty *ty, int g)
{
// check for east asian full-width (F), half-width (H), wide (W),
// narrow (Na) or ambiguous (A) codepoints
diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c
index aef05eb..7b5f847 100644
--- a/src/bin/termptyesc.c
+++ b/src/bin/termptyesc.c
@@ -974,7 +974,7 @@ _handle_esc_csi_cursor_pos_set(Termpty *ty, Eina_Unicode **b,
}
static int
-_handle_esc_csi(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce)
+_handle_esc_csi(Termpty *ty, const Eina_Unicode *c, const Eina_Unicode *ce)
{
int arg, i;
const Eina_Unicode *cc, *be;
@@ -1564,7 +1564,7 @@ _handle_xterm_777_command(Termpty *_ty EINA_UNUSED,
}
static int
-_handle_esc_xterm(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce)
+_handle_esc_xterm(Termpty *ty, const Eina_Unicode *c, const Eina_Unicode *ce)
{
const Eina_Unicode *cc, *be;
Eina_Unicode buf[4096], *p;
@@ -1908,7 +1908,7 @@ end:
}
static int
-_handle_esc(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce)
+_handle_esc(Termpty *ty, const Eina_Unicode *c, const Eina_Unicode *ce)
{
int len = ce - c;
@@ -2046,7 +2046,7 @@ _handle_esc(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce)
/* XXX: ce is excluded */
int
-termpty_handle_seq(Termpty *ty, Eina_Unicode *c, Eina_Unicode *ce)
+termpty_handle_seq(Termpty *ty, const Eina_Unicode *c, const Eina_Unicode *ce)
{
Eina_Unicode *cc;
int len = 0;
diff --git a/src/bin/termptyesc.h b/src/bin/termptyesc.h
index 9579673..85bef23 100644
--- a/src/bin/termptyesc.h
+++ b/src/bin/termptyesc.h
@@ -1,6 +1,6 @@
#ifndef _TERMPTY_ESC_H__
#define _TERMPTY_ESC_H__ 1
-int termpty_handle_seq(Termpty *ty, Eina_Unicode *c, Eina_Unicode *ce);
+int termpty_handle_seq(Termpty *ty, const Eina_Unicode *c, const Eina_Unicode *ce);
#endif
diff --git a/src/bin/termptyext.c b/src/bin/termptyext.c
index 2af1414..e059f25 100644
--- a/src/bin/termptyext.c
+++ b/src/bin/termptyext.c
@@ -34,7 +34,7 @@
static Eina_Bool
_handle_op_a(Termpty *_ty EINA_UNUSED,
const char *txt,
- Eina_Unicode *_utxt EINA_UNUSED)
+ const Eina_Unicode *_utxt EINA_UNUSED)
{
switch (txt[1])
{
@@ -48,7 +48,7 @@ _handle_op_a(Termpty *_ty EINA_UNUSED,
}
Eina_Bool
-_termpty_ext_handle(Termpty *ty, const char *txt, Eina_Unicode *utxt)
+_termpty_ext_handle(Termpty *ty, const char *txt, const Eina_Unicode *utxt)
{
switch (txt[0]) // major opcode
{
diff --git a/src/bin/termptyext.h b/src/bin/termptyext.h
index 8e1bdde..8cf8cf9 100644
--- a/src/bin/termptyext.h
+++ b/src/bin/termptyext.h
@@ -1,6 +1,6 @@
#ifndef _TERMPTY_EXT_H__
#define _TERMPTY_EXT_H__ 1
-Eina_Bool _termpty_ext_handle(Termpty *ty, const char *txt, Eina_Unicode *utxt);
+Eina_Bool _termpty_ext_handle(Termpty *ty, const char *txt, const Eina_Unicode *utxt);
#endif
diff --git a/src/bin/termptygfx.c b/src/bin/termptygfx.c
index aababb8..79dee37 100644
--- a/src/bin/termptygfx.c
+++ b/src/bin/termptygfx.c
@@ -34,7 +34,7 @@ static const unsigned short vt100_to_unicode[62] =
};
Eina_Unicode
-_termpty_charset_trans(Eina_Unicode g, Termpty *ty)
+_termpty_charset_trans(const Termpty *ty, Eina_Unicode g)
{
switch (ty->termstate.charsetch)
{
diff --git a/src/bin/termptygfx.h b/src/bin/termptygfx.h
index b1dc027..eaeaa7b 100644
--- a/src/bin/termptygfx.h
+++ b/src/bin/termptygfx.h
@@ -3,6 +3,6 @@
#include "termpty.h"
-Eina_Unicode _termpty_charset_trans(Eina_Unicode g, Termpty *ty);
+Eina_Unicode _termpty_charset_trans(const Termpty *ty, Eina_Unicode g);
#endif
diff --git a/src/bin/termptyops.c b/src/bin/termptyops.c
index db069d7..774a885 100644
--- a/src/bin/termptyops.c
+++ b/src/bin/termptyops.c
@@ -191,7 +191,7 @@ termpty_text_append(Termpty *ty, const Eina_Unicode *codepoints, int len)
termpty_cell_copy(ty, &(cells[j - 1]), &(cells[j]), 1);
}
- g = _termpty_charset_trans(codepoints[i], ty);
+ g = _termpty_charset_trans(ty, codepoints[i]);
/* Skip 0-width space */
if (EINA_UNLIKELY(g == 0x200b))
{
diff --git a/src/bin/win.c b/src/bin/win.c
index ba5078e..ce048d2 100644
--- a/src/bin/win.c
+++ b/src/bin/win.c
@@ -186,7 +186,7 @@ static void _term_tabregion_free(Term *term);
/* {{{ Solo */
static Evas_Object *
-_solo_get_evas_object(Term_Container *tc)
+_solo_get_evas_object(const Term_Container *tc)
{
Solo *solo;
assert (tc->type == TERM_CONTAINER_TYPE_SOLO);
@@ -196,7 +196,7 @@ _solo_get_evas_object(Term_Container *tc)
}
static Term *
-_solo_focused_term_get(Term_Container *container)
+_solo_focused_term_get(const Term_Container *container)
{
Solo *solo;
assert (container->type == TERM_CONTAINER_TYPE_SOLO);
@@ -206,7 +206,7 @@ _solo_focused_term_get(Term_Container *container)
}
static Term *
-_solo_find_term_at_coords(Term_Container *tc,
+_solo_find_term_at_coords(const Term_Container *tc,
Evas_Coord _mx EINA_UNUSED,
Evas_Coord _my EINA_UNUSED)
{
@@ -283,21 +283,21 @@ _solo_split(Term_Container *tc,
}
static Term *
-_solo_term_next(Term_Container *tc,
- Term_Container *_child EINA_UNUSED)
+_solo_term_next(const Term_Container *tc,
+ const Term_Container *_child EINA_UNUSED)
{
return tc->parent->term_next(tc->parent, tc);
}
static Term *
-_solo_term_prev(Term_Container *tc,
- Term_Container *_child EINA_UNUSED)
+_solo_term_prev(const Term_Container *tc,
+ const Term_Container *_child EINA_UNUSED)
{
return tc->parent->term_prev(tc->parent, tc);
}
static Term *
-_solo_term_first(Term_Container *tc)
+_solo_term_first(const Term_Container *tc)
{
Solo *solo;
assert (tc->type == TERM_CONTAINER_TYPE_SOLO);
@@ -306,7 +306,7 @@ _solo_term_first(Term_Container *tc)
}
static Term *
-_solo_term_last(Term_Container *tc)
+_solo_term_last(const Term_Container *tc)
{
Solo *solo;
assert (tc->type == TERM_CONTAINER_TYPE_SOLO);
@@ -581,23 +581,25 @@ bad:
Evas_Object *
-win_base_get(Win *wn)
+win_base_get(const Win *wn)
{
return wn->base;
}
-Config *win_config_get(Win *wn)
+Config *
+win_config_get(const Win *wn)
{
return wn->config;
}
-Eina_List * win_terms_get(Win *wn)
+Eina_List *
+win_terms_get(const Win *wn)
{
return wn->terms;
}
Evas_Object *
-win_evas_object_get(Win *wn)
+win_evas_object_get(const Win *wn)
{
return wn->win;
}
@@ -759,7 +761,7 @@ win_add(const char *name, const char *role,
}
static Evas_Object *
-_win_get_evas_object(Term_Container *tc)
+_win_get_evas_object(const Term_Container *tc)
{
Win *wn;
assert (tc->type == TERM_CONTAINER_TYPE_WIN);
@@ -770,21 +772,21 @@ _win_get_evas_object(Term_Container *tc)
}
static Term *
-_win_term_next(Term_Container *_tc EINA_UNUSED,
- Term_Container *child)
+_win_term_next(const Term_Container *_tc EINA_UNUSED,
+ const Term_Container *child)
{
return child->term_first(child);
}
static Term *
-_win_term_prev(Term_Container *_tc EINA_UNUSED,
- Term_Container *child)
+_win_term_prev(const Term_Container *_tc EINA_UNUSED,
+ const Term_Container *child)
{
return child->term_last(child);
}
static Term *
-_win_term_first(Term_Container *tc)
+_win_term_first(const Term_Container *tc)
{
Win *wn;
assert (tc->type == TERM_CONTAINER_TYPE_WIN);
@@ -794,7 +796,7 @@ _win_term_first(Term_Container *tc)
}
static Term *
-_win_term_last(Term_Container *tc)
+_win_term_last(const Term_Container *tc)
{
Win *wn;
assert (tc->type == TERM_CONTAINER_TYPE_WIN);
@@ -804,7 +806,7 @@ _win_term_last(Term_Container *tc)
}
static Term *
-_win_focused_term_get(Term_Container *tc)
+_win_focused_term_get(const Term_Container *tc)
{
Win *wn;
assert (tc->type == TERM_CONTAINER_TYPE_WIN);
@@ -815,7 +817,7 @@ _win_focused_term_get(Term_Container *tc)
}
static Term *
-_win_find_term_at_coords(Term_Container *tc,
+_win_find_term_at_coords(const Term_Container *tc,
Evas_Coord mx, Evas_Coord my)
{
Win *wn;
@@ -1144,7 +1146,7 @@ term_close(Evas_Object *win, Evas_Object *term, Eina_Bool hold_if_requested)
/* {{{ Splits */
static Term *
-_split_term_next(Term_Container *tc, Term_Container *child)
+_split_term_next(const Term_Container *tc, const Term_Container *child)
{
Split *split;
@@ -1158,7 +1160,7 @@ _split_term_next(Term_Container *tc, Term_Container *child)
}
static Term *
-_split_term_prev(Term_Container *tc, Term_Container *child)
+_split_term_prev(const Term_Container *tc, const Term_Container *child)
{
Split *split;
@@ -1172,7 +1174,7 @@ _split_term_prev(Term_Container *tc, Term_Container *child)
}
static Term *
-_split_term_first(Term_Container *tc)
+_split_term_first(const Term_Container *tc)
{
Split *split;
@@ -1183,7 +1185,7 @@ _split_term_first(Term_Container *tc)
}
static Term *
-_split_term_last(Term_Container *tc)
+_split_term_last(const Term_Container *tc)
{
Split *split;
@@ -1194,7 +1196,7 @@ _split_term_last(Term_Container *tc)
}
static Evas_Object *
-_split_get_evas_object(Term_Container *tc)
+_split_get_evas_object(const Term_Container *tc)
{
Split *split;
@@ -1314,7 +1316,7 @@ _split_swallow(Term_Container *tc, Term_Container *orig,
}
static Term *
-_split_focused_term_get(Term_Container *tc)
+_split_focused_term_get(const Term_Container *tc)
{
Split *split;
@@ -1327,7 +1329,7 @@ _split_focused_term_get(Term_Container *tc)
}
static Term *
-_split_find_term_at_coords(Term_Container *tc,
+_split_find_term_at_coords(const Term_Container *tc,
Evas_Coord mx, Evas_Coord my)
{
Split *split;
@@ -2099,7 +2101,7 @@ _cb_select(void *data,
static Evas_Object *
-_tabs_get_evas_object(Term_Container *container)
+_tabs_get_evas_object(const Term_Container *container)
{
Tabs *tabs;
Term_Container *tc;
@@ -2116,7 +2118,7 @@ _tabs_get_evas_object(Term_Container *container)
}
static Term *
-_tabs_focused_term_get(Term_Container *tc)
+_tabs_focused_term_get(const Term_Container *tc)
{
Tabs *tabs;
@@ -2130,7 +2132,7 @@ _tabs_focused_term_get(Term_Container *tc)
}
static Term *
-_tabs_find_term_at_coords(Term_Container *container,
+_tabs_find_term_at_coords(const Term_Container *container,
Evas_Coord mx,
Evas_Coord my)
{
@@ -2159,7 +2161,7 @@ _tabs_size_eval(Term_Container *container, Sizeinfo *info)
}
static Eina_List *
-_tab_item_find(Tabs *tabs, Term_Container *child)
+_tab_item_find(const Tabs *tabs, const Term_Container *child)
{
Eina_List *l;
Tab_Item *tab_item;
@@ -2283,7 +2285,7 @@ _tabs_update(Term_Container *tc)
}
static Term *
-_tabs_term_next(Term_Container *tc, Term_Container *child)
+_tabs_term_next(const Term_Container *tc, const Term_Container *child)
{
Tabs *tabs;
Tab_Item *tab_item;
@@ -2306,7 +2308,7 @@ _tabs_term_next(Term_Container *tc, Term_Container *child)
}
static Term *
-_tabs_term_prev(Term_Container *tc, Term_Container *child)
+_tabs_term_prev(const Term_Container *tc, const Term_Container *child)
{
Tabs *tabs;
Tab_Item *tab_item;
@@ -2329,7 +2331,7 @@ _tabs_term_prev(Term_Container *tc, Term_Container *child)
}
static Term *
-_tabs_term_first(Term_Container *tc)
+_tabs_term_first(const Term_Container *tc)
{
Tabs *tabs;
Tab_Item *tab_item;
@@ -2344,7 +2346,7 @@ _tabs_term_first(Term_Container *tc)
}
static Term *
-_tabs_term_last(Term_Container *tc)
+_tabs_term_last(const Term_Container *tc)
{
Tabs *tabs;
Tab_Item *tab_item;
@@ -2974,7 +2976,7 @@ term_unfocus(Term *term)
}
Term *
-term_prev_get(Term *term)
+term_prev_get(const Term *term)
{
Term_Container *tc = term->container;
@@ -3002,7 +3004,7 @@ void term_prev(Term *term)
}
Term *
-term_next_get(Term *term)
+term_next_get(const Term *term)
{
Term_Container *tc = term->container;
@@ -4177,20 +4179,20 @@ main_term_popup_exists(const Term *term)
}
Win *
-term_win_get(Term *term)
+term_win_get(const Term *term)
{
return term->wn;
}
Evas_Object *
-term_termio_get(Term *term)
+term_termio_get(const Term *term)
{
return term->termio;
}
Evas_Object *
-term_miniview_get(Term *term)
+term_miniview_get(const Term *term)
{
if (term)
return term->miniview;
diff --git a/src/bin/win.h b/src/bin/win.h
index 9c5a91e..27ca09e 100644
--- a/src/bin/win.h
+++ b/src/bin/win.h
@@ -11,8 +11,8 @@ typedef struct _Term Term;
Eina_Bool main_term_popup_exists(const Term *term);
void term_unfocus(Term *term);
-Evas_Object *term_termio_get(Term *term);
-Evas_Object *term_miniview_get(Term *term);
+Evas_Object *term_termio_get(const Term *term);
+Evas_Object *term_miniview_get(const Term *term);
void term_miniview_toggle(Term *term);
void term_set_title(Term *term);
void term_miniview_hide(Term *term);
@@ -38,21 +38,21 @@ int win_term_set(Win *wn, Term *term);
Eina_List *
terms_from_win_object(Evas_Object *win);
-Evas_Object *win_base_get(Win *wn);
-Evas_Object *win_evas_object_get(Win *win);
-Eina_List * win_terms_get(Win *wn);
-Config *win_config_get(Win *wn);
+Evas_Object *win_base_get(const Win *wn);
+Evas_Object *win_evas_object_get(const Win *win);
+Eina_List * win_terms_get(const Win *wn);
+Config *win_config_get(const Win *wn);
void win_term_swallow(Win *wn, Term *term);
void win_add_split(Win *wn, Term *term);
void win_sizing_handle(Win *wn);
void term_ref(Term *term);
void term_unref(Term *term);
-Term *term_next_get(Term *term);
-Term *term_prev_get(Term *term);
+Term *term_next_get(const Term *term);
+Term *term_prev_get(const Term *term);
void term_next(Term *term);
void term_prev(Term *term);
-Win * term_win_get(Term *term);
+Win * term_win_get(const Term *term);
void
win_font_size_set(Win *wn, int new_size);