aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bin/Makefile.am40
-rw-r--r--src/bin/about.c12
-rw-r--r--src/bin/controls.c10
-rw-r--r--src/bin/main.c54
-rw-r--r--src/bin/media.c41
-rw-r--r--src/bin/options.c44
-rw-r--r--src/bin/options_font.c9
-rw-r--r--src/bin/termio.c50
-rw-r--r--src/bin/termiolink.c1
9 files changed, 156 insertions, 105 deletions
diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
index 5716e9b..9c92d4a 100644
--- a/src/bin/Makefile.am
+++ b/src/bin/Makefile.am
@@ -1,5 +1,31 @@
MAINTAINERCLEANFILES = Makefile.in
+EDJE_CODEGEN = @edje_codegen@
+
+background_generated.c background_generated.h: $(top_builddir)/data/themes/default.edj
+ $(EDJE_CODEGEN) --prefix="background" $(top_builddir)/data/themes/default.edj \
+terminology/background $(builddir)/background_generated.c $(builddir)/background_generated.h
+
+cursor_generated.c cursor_generated.h: $(top_builddir)/data/themes/default.edj
+ $(EDJE_CODEGEN) --prefix="cursor" $(top_builddir)/data/themes/default.edj \
+terminology/cursor $(builddir)/cursor_generated.c $(builddir)/cursor_generated.h
+
+selection_generated.c selection_generated.h: $(top_builddir)/data/themes/default.edj
+ $(EDJE_CODEGEN) --prefix="selection" $(top_builddir)/data/themes/default.edj \
+terminology/selection $(builddir)/selection_generated.c $(builddir)/selection_generated.h
+
+mediactrl_generated.c mediactrl_generated.h: $(top_builddir)/data/themes/default.edj
+ $(EDJE_CODEGEN) --prefix="mediactrl" $(top_builddir)/data/themes/default.edj \
+terminology/mediactrl $(builddir)/mediactrl_generated.c $(builddir)/mediactrl_generated.h
+
+mediabusy_generated.c mediabusy_generated.h: $(top_builddir)/data/themes/default.edj
+ $(EDJE_CODEGEN) --prefix="mediabusy" $(top_builddir)/data/themes/default.edj \
+terminology/mediabusy $(builddir)/mediabusy_generated.c $(builddir)/mediabusy_generated.h
+
+fontpreview_generated.c fontpreview_generated.h: $(top_builddir)/data/themes/default.edj
+ $(EDJE_CODEGEN) --prefix="fontpreview" $(top_builddir)/data/themes/default.edj \
+terminology/fontpreview $(builddir)/fontpreview_generated.c $(builddir)/fontpreview_generated.h
+
bin_PROGRAMS = terminology
terminology_CPPFLAGS = -I. \
@@ -8,7 +34,21 @@ terminology_CPPFLAGS = -I. \
terminology_LDADD = @TERMINOLOGY_LIBS@
+BUILT_SOURCES = \
+background_generated.c background_generated.h \
+cursor_generated.c cursor_generated.h \
+fontpreview_generated.c fontpreview_generated.h \
+selection_generated.c selection_generated.h \
+mediactrl_generated.c mediactrl_generated.h \
+mediabusy_generated.c mediabusy_generated.h
+
terminology_SOURCES = \
+background_generated.c background_generated.h \
+cursor_generated.c cursor_generated.h \
+fontpreview_generated.c fontpreview_generated.h \
+selection_generated.c selection_generated.h \
+mediactrl_generated.c mediactrl_generated.h \
+mediabusy_generated.c mediabusy_generated.h \
private.h \
about.c about.h \
col.c col.h \
diff --git a/src/bin/about.c b/src/bin/about.c
index 94678bf..7730d0b 100644
--- a/src/bin/about.c
+++ b/src/bin/about.c
@@ -3,6 +3,8 @@
#include <Elementary.h>
#include "about.h"
+#include "background_generated.h"
+
static Evas_Object *ab_layout = NULL, *ab_over = NULL;
static Eina_Bool ab_out = EINA_FALSE;
static Ecore_Timer *ab_del_timer = NULL;
@@ -100,18 +102,18 @@ about_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term)
"DAMAGE.</b>"
);
evas_object_show(o);
- edje_object_part_swallow(bg, "terminology.about", ab_layout);
+ background_about_set(bg, ab_layout);
}
if (!ab_out)
{
ab_over = o = evas_object_rectangle_add(evas_object_evas_get(win));
evas_object_color_set(o, 0, 0, 0, 0);
- edje_object_part_swallow(bg, "terminology.dismiss", o);
+ background_about_set(bg, o);
evas_object_show(o);
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN,
_cb_mouse_down, term);
- edje_object_signal_emit(bg, "about,show", "terminology");
+ background_about_show_emit(bg);
elm_object_signal_emit(ab_layout, "begin" ,"terminology");
ab_out = EINA_TRUE;
elm_object_focus_set(ab_layout, EINA_TRUE);
@@ -125,8 +127,8 @@ about_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term)
{
evas_object_del(ab_over);
ab_over = NULL;
-
- edje_object_signal_emit(bg, "about,hide", "terminology");
+
+ background_about_hide_emit(bg);
ab_out = EINA_FALSE;
elm_object_focus_set(ab_layout, EINA_FALSE);
elm_object_focus_set(term, EINA_TRUE);
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 @@
#include "about.h"
#include "termio.h"
+#include "background_generated.h"
+
static Evas_Object *ct_frame = NULL, *ct_box = NULL, *ct_over = NULL;
static Eina_Bool ct_out = EINA_FALSE;
static Ecore_Timer *ct_del_timer = NULL;
@@ -130,14 +132,14 @@ controls_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term)
evas_object_show(o);
evas_object_smart_callback_add(o, "clicked", _cb_ct_about, NULL);
- edje_object_part_swallow(bg, "terminology.controls", ct_frame);
+ background_controls_set(bg, ct_frame);
evas_object_show(ct_frame);
}
if (!ct_out)
{
ct_over = o = evas_object_rectangle_add(evas_object_evas_get(win));
evas_object_color_set(o, 0, 0, 0, 0);
- edje_object_part_swallow(bg, "terminology.dismiss", o);
+ background_dismiss_set(bg, o);
evas_object_show(o);
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN,
_cb_mouse_down, term);
@@ -145,7 +147,7 @@ controls_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term)
ct_win = win;
ct_bg = bg;
ct_term = term;
- edje_object_signal_emit(bg, "controls,show", "terminology");
+ background_controls_show_emit(bg);
ct_out = EINA_TRUE;
elm_object_focus_set(ct_frame, EINA_TRUE);
if (ct_del_timer)
@@ -159,7 +161,7 @@ controls_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term)
evas_object_del(ct_over);
ct_over = NULL;
- edje_object_signal_emit(bg, "controls,hide", "terminology");
+ background_controls_hide_emit(bg);
ct_out = EINA_FALSE;
elm_object_focus_set(ct_frame, EINA_FALSE);
elm_object_focus_set(term, EINA_TRUE);
diff --git a/src/bin/main.c b/src/bin/main.c
index 088ec68..ab13f4b 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -11,6 +11,9 @@
#include "media.h"
#include "utils.h"
+#include "background_generated.h"
+#include "cursor_generated.h"
+
int _log_domain = -1;
static Evas_Object *win = NULL, *bg = NULL, *backbg = NULL, *term = NULL, *media = NULL;
@@ -34,7 +37,7 @@ _cb_focus_in(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
{
if (!focused) elm_win_urgent_set(win, EINA_FALSE);
focused = EINA_TRUE;
- edje_object_signal_emit(bg, "focus,in", "terminology");
+ cursor_focus_in_emit(bg);
if (cmdbox_up)
elm_object_focus_set(cmdbox, EINA_TRUE);
else
@@ -45,7 +48,7 @@ static void
_cb_focus_out(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
{
focused = EINA_FALSE;
- edje_object_signal_emit(bg, "focus,out", "terminology");
+ cursor_focus_out_emit(bg);
if (cmdbox_up)
elm_object_focus_set(cmdbox, EINA_FALSE);
else
@@ -105,7 +108,7 @@ _cb_bell(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event __UNUSE
Config *config = termio_config_get(term);
if (!config->disable_visual_bell)
- edje_object_signal_emit(bg, "bell", "terminology");
+ background_bell_emit(bg);
if (!config) return;
if (config->urg_bell)
{
@@ -127,7 +130,7 @@ _cb_popmedia_done(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const char
static void
_cb_popmedia_del(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *o __UNUSED__, void *event_info __UNUSED__)
{
- edje_object_signal_emit(bg, "popmedia,off", "terminology");
+ background_popup_off_emit(bg);
}
static void
@@ -145,16 +148,16 @@ _cb_popup(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event __UNUS
if (!popmedia) termio_mouseover_suspend_pushpop(term, 1);
popmedia = o = media_add(win, src, config, MEDIA_POP, &type);
evas_object_event_callback_add(o, EVAS_CALLBACK_DEL, _cb_popmedia_del, NULL);
- edje_object_part_swallow(bg, "terminology.popmedia", o);
+ background_popmedia_set(bg, o);
evas_object_show(o);
if (type == TYPE_IMG)
- edje_object_signal_emit(bg, "popmedia,image", "terminology");
+ background_popup_image_emit(bg);
else if (type == TYPE_SCALE)
- edje_object_signal_emit(bg, "popmedia,scale", "terminology");
+ background_popup_scale_emit(bg);
else if (type == TYPE_EDJE)
- edje_object_signal_emit(bg, "popmedia,edje", "terminology");
+ background_popup_edje_emit(bg);
else if (type == TYPE_MOV)
- edje_object_signal_emit(bg, "popmedia,movie", "terminology");
+ background_popup_movie_emit(bg);
}
static Eina_Bool
@@ -170,7 +173,7 @@ _cb_cmdbox(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event __UNU
{
cmdbox_up = EINA_TRUE;
elm_object_focus_set(term, EINA_FALSE);
- edje_object_signal_emit(bg, "cmdbox,show", "terminology");
+ background_command_box_show_emit(bg);
elm_entry_entry_set(cmdbox, "");
evas_object_show(cmdbox);
if (_cmdbox_focus_timer) ecore_timer_del(_cmdbox_focus_timer);
@@ -183,7 +186,7 @@ _cb_cmd_activated(void *data __UNUSED__, Evas_Object *obj, void *event __UNUSED_
char *cmd;
elm_object_focus_set(obj, EINA_FALSE);
- edje_object_signal_emit(bg, "cmdbox,hide", "terminology");
+ background_command_box_hide_emit(bg);
elm_object_focus_set(term, EINA_TRUE);
cmd = (char *)elm_entry_entry_get(obj);
if (cmd)
@@ -207,7 +210,7 @@ static void
_cb_cmd_aborted(void *data __UNUSED__, Evas_Object *obj, void *event __UNUSED__)
{
elm_object_focus_set(obj, EINA_FALSE);
- edje_object_signal_emit(bg, "cmdbox,hide", "terminology");
+ background_command_box_hide_emit(bg);
elm_object_focus_set(term, EINA_TRUE);
if (_cmdbox_focus_timer)
{
@@ -238,7 +241,7 @@ static void
_cb_cmd_hints_changed(void *data, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
{
evas_object_show(obj);
- edje_object_part_swallow(data, "terminology.cmdbox", obj);
+ background_cmdbox_set(data, obj);
}
void
@@ -246,13 +249,13 @@ main_trans_update(const Config *config)
{
if (config->translucent)
{
- edje_object_signal_emit(bg, "translucent,on", "terminology");
+ background_translucent_on_emit(bg);
elm_win_alpha_set(win, EINA_TRUE);
evas_object_hide(backbg);
}
else
{
- edje_object_signal_emit(bg, "translucent,off", "terminology");
+ background_translucent_off_emit(bg);
elm_win_alpha_set(win, EINA_FALSE);
evas_object_show(backbg);
}
@@ -263,7 +266,7 @@ _cb_media_del(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void
{
Config *config = data;
media = NULL;
- edje_object_signal_emit(bg, "media,off", "terminology");
+ background_media_off_emit(bg);
if (config->temporary) eina_stringshare_replace(&(config->background), NULL);
}
@@ -284,22 +287,22 @@ main_media_update(const Config *config)
o = media = media_add(win, config->background, config, MEDIA_BG, &type);
evas_object_event_callback_add(media, EVAS_CALLBACK_DEL,
_cb_media_del, config);
- edje_object_part_swallow(bg, "terminology.background", o);
+ background_background_set(bg, o);
evas_object_show(o);
if (type == TYPE_IMG)
- edje_object_signal_emit(bg, "media,image", "terminology");
+ background_media_image_emit(bg);
else if (type == TYPE_SCALE)
- edje_object_signal_emit(bg, "media,scale", "terminology");
+ background_media_scale_emit(bg);
else if (type == TYPE_EDJE)
- edje_object_signal_emit(bg, "media,edje", "terminology");
+ background_media_edje_emit(bg);
else if (type == TYPE_MOV)
- edje_object_signal_emit(bg, "media,movie", "terminology");
+ background_media_movie_emit(bg);
}
else
{
if (media)
{
- edje_object_signal_emit(bg, "media,off", "terminology");
+ background_media_off_emit(bg);
evas_object_del(media);
media = NULL;
}
@@ -679,8 +682,7 @@ elm_main(int argc, char **argv)
elm_object_content_set(conform, o);
evas_object_show(o);
- edje_object_signal_callback_add(o, "popmedia,done", "terminology",
- _cb_popmedia_done, NULL);
+ background_popup_dismiss_callback_add(o, _cb_popmedia_done, NULL);
if (pos_set)
{
@@ -706,7 +708,7 @@ elm_main(int argc, char **argv)
evas_object_smart_callback_add(o, "aborted", _cb_cmd_aborted, bg);
evas_object_smart_callback_add(o, "changed,user", _cb_cmd_changed, bg);
evas_object_event_callback_add(o, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _cb_cmd_hints_changed, bg);
- edje_object_part_swallow(bg, "terminology.cmdbox", o);
+ background_cmdbox_set(bg, o);
term = o = termio_add(win, config, cmd, login_shell, cd, size_w, size_h);
termio_win_set(o, win);
@@ -715,7 +717,7 @@ elm_main(int argc, char **argv)
evas_object_size_hint_fill_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_event_callback_add(o, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
_cb_size_hint, win);
- edje_object_part_swallow(bg, "terminology.content", o);
+ background_content_set(bg, o);
evas_object_smart_callback_add(o, "options", _cb_options, NULL);
evas_object_smart_callback_add(o, "change", _cb_change, NULL);
evas_object_smart_callback_add(o, "exited", _cb_exited, NULL);
diff --git a/src/bin/media.c b/src/bin/media.c
index e748941..13cb661 100644
--- a/src/bin/media.c
+++ b/src/bin/media.c
@@ -8,6 +8,9 @@
#include "config.h"
#include "utils.h"
+#include "mediabusy_generated.h"
+#include "mediactrl_generated.h"
+
typedef struct _Media Media;
struct _Media
@@ -372,7 +375,7 @@ _cb_mov_frame_decode(void *data, Evas_Object *obj __UNUSED__, void *event __UNUS
len = emotion_object_play_length_get(sd->o_img);
pos = emotion_object_position_get(sd->o_img);
pos /= len;
- edje_object_part_drag_value_set(sd->o_ctrl, "terminology.posdrag", pos, pos);
+ mediactrl_volume_drag_value_set(sd->o_ctrl, pos, pos);
}
static void
@@ -456,7 +459,8 @@ _cb_media_vol(void *data, Evas_Object *obj __UNUSED__, const char *emission __UN
double vx, vy;
Media *sd = evas_object_smart_data_get(data);
if (!sd) return;
- edje_object_part_drag_value_get(sd->o_ctrl, "terminology.voldrag", &vx, &vy);
+
+ mediactrl_volume_drag_value_get(sd->o_ctrl, &vx, &vy);
media_volume_set(data, vx + vy);
}
@@ -466,7 +470,8 @@ _cb_media_pos(void *data, Evas_Object *obj __UNUSED__, const char *emission __UN
double vx, vy;
Media *sd = evas_object_smart_data_get(data);
if (!sd) return;
- edje_object_part_drag_value_get(sd->o_ctrl, "terminology.posdrag", &vx, &vy);
+
+ mediactrl_volume_drag_value_get(sd->o_ctrl, &vx, &vy);
media_position_set(data, vx + vy);
}
@@ -518,16 +523,14 @@ _type_mov_init(Evas_Object *obj)
o = sd->o_ctrl = edje_object_add(evas_object_evas_get(obj));
theme_apply(o, sd->config, "terminology/mediactrl");
vol = emotion_object_audio_volume_get(sd->o_img);
- edje_object_part_drag_value_set(o, "terminology.voldrag", vol, vol);
- edje_object_signal_callback_add(o, "play", "",
- _cb_media_play, obj);
- edje_object_signal_callback_add(o, "pause", "",
- _cb_media_pause, obj);
- edje_object_signal_callback_add(o, "stop", "",
- _cb_media_stop, obj);
+ mediactrl_volume_drag_value_set(o, vol, vol);
+ mediactrl_play_callback_add(o, _cb_media_play, obj);
+ mediactrl_pause_callback_add(o,
+ _cb_media_pause, obj);
+ mediactrl_stop_callback_add(o, _cb_media_stop, obj);
edje_object_signal_callback_add(o, "drag", "terminology.posdrag",
_cb_media_pos, obj);
- edje_object_signal_callback_add(o, "drag", "terminology.voldrag",
+ edje_object_signal_callback_add(o, "drag", "terminology.volume",
_cb_media_vol, obj);
/* TODO where to stack the object in the ui? controls cannot be part of
* the 'media smart obj' becouse controls need to be on top of the term obj.
@@ -798,8 +801,8 @@ _url_compl_cb(void *data, int type __UNUSED__, void *event_info)
Media *sd = evas_object_smart_data_get(obj);
if (!sd) return EINA_TRUE;
if (ev->url_con != sd->url) return EINA_TRUE;
-
- edje_object_signal_emit(sd->o_busy, "done", "terminology");
+
+ mediabusy_done_emit(sd->o_busy);
ecore_event_handler_del(sd->url_prog_hand);
ecore_event_handler_del(sd->url_compl_hand);
ecore_con_url_free(sd->url);
@@ -928,7 +931,7 @@ media_add(Evas_Object *parent, const char *src, const Config *config, int mode,
evas_object_smart_member_add(o, obj);
theme_apply(o, sd->config, "terminology/mediabusy");
evas_object_show(o);
- edje_object_signal_emit(o, "busy", "terminology");
+ mediabusy_busy_emit(o);
sd->realf = eina_stringshare_add(buf);
sd->url_prog_hand = ecore_event_handler_add
@@ -972,9 +975,9 @@ media_mute_set(Evas_Object *obj, Eina_Bool mute)
if ((!sd) || (sd->type != TYPE_MOV)) return;
emotion_object_audio_mute_set(sd->o_img, mute);
if (mute)
- edje_object_signal_emit(sd->o_ctrl, "mute,set", "terminology");
+ mediactrl_mute_set_emit(sd->o_ctrl);
else
- edje_object_signal_emit(sd->o_ctrl, "mute,unset", "terminology");
+ mediactrl_mute_unset_emit(sd->o_ctrl);
}
void
@@ -984,9 +987,9 @@ media_play_set(Evas_Object *obj, Eina_Bool play)
if ((!sd) || (sd->type != TYPE_MOV)) return;
emotion_object_play_set(sd->o_img, play);
if (play)
- edje_object_signal_emit(sd->o_ctrl, "play,set", "terminology");
+ mediactrl_play_set_emit(sd->o_ctrl);
else
- edje_object_signal_emit(sd->o_ctrl, "pause,set", "terminology");
+ mediactrl_pause_set_emit(sd->o_ctrl);
}
void
@@ -1014,7 +1017,7 @@ media_volume_set(Evas_Object *obj, double vol)
Media *sd = evas_object_smart_data_get(obj);
if ((!sd) || (sd->type != TYPE_MOV)) return;
emotion_object_audio_volume_set(sd->o_img, vol);
- edje_object_part_drag_value_set(sd->o_ctrl, "terminology.voldrag", vol, vol);
+ mediactrl_volume_drag_value_set(sd->o_ctrl, vol, vol);
}
int
diff --git a/src/bin/options.c b/src/bin/options.c
index 80b8019..c2091f7 100644
--- a/src/bin/options.c
+++ b/src/bin/options.c
@@ -12,6 +12,8 @@
#include "config.h"
#include "termio.h"
+#include "background_generated.h"
+
static Evas_Object *op_frame, *op_box = NULL, *op_toolbar = NULL,
*op_opbox = NULL, *op_tbox = NULL, *op_temp = NULL,
*op_over = NULL;
@@ -26,7 +28,7 @@ _cb_op_font(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event __UN
{
if (mode == 1) return;
mode = 1;
- edje_object_signal_emit(saved_bg, "optdetails,hide", "terminology");
+ background_option_details_hide_emit(saved_bg);
}
static void
@@ -34,7 +36,7 @@ _cb_op_theme(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event __U
{
if (mode == 2) return;
mode = 2;
- edje_object_signal_emit(saved_bg, "optdetails,hide", "terminology");
+ background_option_details_hide_emit(saved_bg);
}
static void
@@ -42,7 +44,7 @@ _cb_op_wallpaper(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event
{
if (mode == 3) return;
mode = 3;
- edje_object_signal_emit(saved_bg, "optdetails,hide", "terminology");
+ background_option_details_hide_emit(saved_bg);
}
static void
@@ -50,7 +52,7 @@ _cb_op_colors(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event __
{
if (mode == 4) return;
mode = 4;
- edje_object_signal_emit(saved_bg, "optdetails,hide", "terminology");
+ background_option_details_hide_emit(saved_bg);
}
static void
@@ -58,7 +60,7 @@ _cb_op_video(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event __U
{
if (mode == 5) return;
mode = 5;
- edje_object_signal_emit(saved_bg, "optdetails,hide", "terminology");
+ background_option_details_hide_emit(saved_bg);
}
static void
@@ -66,7 +68,7 @@ _cb_op_behavior(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event
{
if (mode == 6) return;
mode = 6;
- edje_object_signal_emit(saved_bg, "optdetails,hide", "terminology");
+ background_option_details_hide_emit(saved_bg);
}
static void
@@ -74,7 +76,7 @@ _cb_op_helpers(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event _
{
if (mode == 7) return;
mode = 7;
- edje_object_signal_emit(saved_bg, "optdetails,hide", "terminology");
+ background_option_details_hide_emit(saved_bg);
}
static void
@@ -119,7 +121,7 @@ _cb_opdt_hide_done(void *data, Evas_Object *obj __UNUSED__, const char *sig __UN
case 7: options_helpers(op_opbox, data); break;
default: break;
}
- edje_object_signal_emit(saved_bg, "optdetails,show", "terminology");
+ background_option_details_show_emit(saved_bg);
}
void
@@ -138,7 +140,7 @@ options_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term)
op_opbox = o = elm_box_add(win);
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
- edje_object_part_swallow(bg, "terminology.optdetails", o);
+ background_option_details_set(bg, o);
evas_object_show(o);
op_frame = o = elm_frame_add(win);
@@ -191,25 +193,25 @@ options_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term)
evas_object_show(o);
evas_object_smart_callback_add(o, "changed", _cb_op_tmp_chg, config);
- edje_object_part_swallow(bg, "terminology.options", op_frame);
+ background_options_set(bg, op_frame);
evas_object_show(op_frame);
}
else if ((op_opbox) && (!op_out))
- edje_object_signal_emit(bg, "optdetails,show", "terminology");
+ background_option_details_show_emit(bg);
if (!op_out)
{
- edje_object_signal_callback_add(bg, "optdetails,hide,done",
- "terminology",
- _cb_opdt_hide_done, term);
+ background_option_details_hide_done_callback_add(bg,
+ _cb_opdt_hide_done,
+ term);
op_over = o = evas_object_rectangle_add(evas_object_evas_get(win));
evas_object_color_set(o, 0, 0, 0, 0);
- edje_object_part_swallow(bg, "terminology.dismiss", o);
+ background_dismiss_set(bg, o);
evas_object_show(o);
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN,
_cb_mouse_down, term);
- edje_object_signal_emit(bg, "options,show", "terminology");
+ background_options_show_emit(bg);
op_out = EINA_TRUE;
elm_object_focus_set(op_toolbar, EINA_TRUE);
if (op_del_timer)
@@ -220,13 +222,13 @@ options_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term)
}
else
{
- edje_object_signal_callback_del(bg, "optdetails,hide,done",
- "terminology",
- _cb_opdt_hide_done);
+ background_option_details_hide_done_callback_del_full(bg,
+ _cb_opdt_hide_done,
+ NULL);
evas_object_del(op_over);
op_over = NULL;
- edje_object_signal_emit(bg, "options,hide", "terminology");
- edje_object_signal_emit(bg, "optdetails,hide", "terminology");
+ background_options_hide_emit(bg);
+ background_option_details_hide_emit(bg);
op_out = EINA_FALSE;
elm_object_focus_set(op_frame, EINA_FALSE);
elm_object_focus_set(term, EINA_TRUE);
diff --git a/src/bin/options_font.c b/src/bin/options_font.c
index af578a0..908a7cc 100644
--- a/src/bin/options_font.c
+++ b/src/bin/options_font.c
@@ -7,6 +7,8 @@
#include "options_font.h"
#include "utils.h"
+#include "fontpreview_generated.h"
+
#define TEST_STRING "oislOIS.015!|,"
static Evas_Object *op_fontslider, *op_fontlist, *op_fsml, *op_fbig;
@@ -84,7 +86,7 @@ static void
_cb_op_font_preview_del(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *event __UNUSED__)
{
Evas_Object *o;
- o = edje_object_part_swallow_get(obj, "terminology.text.preview");
+ o = fontpreview_text_preview_get(obj);
if (o) evas_object_del(o);
}
@@ -98,7 +100,7 @@ _cb_op_font_preview_eval(void *data, Evas *e __UNUSED__, Evas_Object *obj, void
char buf[4096];
if (!evas_object_visible_get(obj)) return;
- if (edje_object_part_swallow_get(obj, "terminology.text.preview")) return;
+ if (fontpreview_text_preview_get(obj)) return;
evas_object_geometry_get(obj, &ox, &oy, &ow, &oh);
if ((ow < 2) || (oh < 2)) return;
evas_output_viewport_get(evas_object_evas_get(obj), &vx, &vy, &vw, &vh);
@@ -118,7 +120,7 @@ _cb_op_font_preview_eval(void *data, Evas *e __UNUSED__, Evas_Object *obj, void
evas_object_text_font_set(o, f->name, config->font.size);
evas_object_geometry_get(o, NULL, NULL, &ow, &oh);
evas_object_size_hint_min_set(o, ow, oh);
- edje_object_part_swallow(obj, "terminology.text.preview", o);
+ fontpreview_text_preview_set(obj, o);
}
}
@@ -189,7 +191,6 @@ _cb_font_del(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *
evas_object_event_callback_del_full(term, EVAS_CALLBACK_RESIZE,
_cb_term_resize, term);
}
-
void
options_font_clear(void)
{
diff --git a/src/bin/termio.c b/src/bin/termio.c
index d992f7a..48231de 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -14,6 +14,10 @@
#include "utils.h"
#include "media.h"
+#include "background_generated.h"
+#include "cursor_generated.h"
+#include "selection_generated.h"
+
typedef struct _Termio Termio;
struct _Termio
@@ -567,15 +571,16 @@ _smart_apply(Evas_Object *obj)
{
sd->top_left = EINA_FALSE;
sd->bottom_right = EINA_TRUE;
- edje_object_signal_emit(sd->cur.selo_theme, "mouse,out", "zone.top_left");
- edje_object_signal_emit(sd->cur.selo_theme, "mouse,in", "zone.bottom_right");
+ mediactrl_mouse_out_emit(sd->cur.selo_theme);
+ selection_top_left_blinking_stop_emit(sd->cur.selo_theme);
+ selection_bottom_right_blinking_emit(sd->cur.selo_theme);
}
else if (sd->bottom_right)
{
sd->top_left = EINA_TRUE;
sd->bottom_right = EINA_FALSE;
- edje_object_signal_emit(sd->cur.selo_theme, "mouse,out", "zone.bottom_right");
- edje_object_signal_emit(sd->cur.selo_theme, "mouse,in", "zone.top_left");
+ selection_bottom_right_blinking_stop_emit(sd->cur.selo_theme);
+ selection_top_left_blinking_emit(sd->cur.selo_theme);
}
}
@@ -603,23 +608,16 @@ _smart_apply(Evas_Object *obj)
(end_y + 1 - start_y) * sd->font.chh);
if ((start_y == end_y) ||
((start_x == 0) && (end_x == (sd->grid.w - 1))))
- edje_object_signal_emit(sd->cur.selo_theme,
- "mode,oneline", "terminology");
+ selection_mode_oneline_emit(sd->cur.selo_theme);
else if ((start_y == (end_y - 1)) &&
(start_x > end_x))
- edje_object_signal_emit(sd->cur.selo_theme,
- "mode,disjoint", "terminology");
+ selection_mode_disjoint_emit(sd->cur.selo_theme);
else if (start_x == 0)
- edje_object_signal_emit(sd->cur.selo_theme,
- "mode,topfull", "terminology");
+ selection_mode_topfull_emit(sd->cur.selo_theme);
else if (end_x == (sd->grid.w - 1))
- {
- edje_object_signal_emit(sd->cur.selo_theme,
- "mode,bottomfull", "terminology");
- }
+ selection_mode_bottomfull_emit(sd->cur.selo_theme);
else
- edje_object_signal_emit(sd->cur.selo_theme,
- "mode,multiline", "terminology");
+ selection_mode_multiline_emit(sd->cur.selo_theme);
evas_object_show(sd->cur.selo_theme);
}
else
@@ -1048,7 +1046,7 @@ _smart_cb_key_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__,
keyin_handle(sd->pty, ev);
end:
if (sd->config->flicker_on_key)
- edje_object_signal_emit(sd->cur.obj, "key,down", "terminology");
+ cursor_key_down_emit(sd->cur.obj);
}
static void
@@ -1072,9 +1070,9 @@ _smart_cb_focus_in(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__,
sd = evas_object_smart_data_get(data);
if (!sd) return;
if (sd->config->disable_cursor_blink)
- edje_object_signal_emit(sd->cur.obj, "focus,in,noblink", "terminology");
+ cursor_focus_in_noblink_emit(sd->cur.obj);
else
- edje_object_signal_emit(sd->cur.obj, "focus,in", "terminology");
+ cursor_focus_in_emit(sd->cur.obj);
if (!sd->win) return;
elm_win_keyboard_mode_set(sd->win, ELM_WIN_KEYBOARD_TERMINAL);
if (sd->imf)
@@ -1093,7 +1091,7 @@ _smart_cb_focus_out(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__,
sd = evas_object_smart_data_get(data);
if (!sd) return;
- edje_object_signal_emit(sd->cur.obj, "focus,out", "terminology");
+ cursor_focus_out_emit(sd->cur.obj);
if (!sd->win) return;
elm_win_keyboard_mode_set(sd->win, ELM_WIN_KEYBOARD_OFF);
if (sd->imf)
@@ -1848,8 +1846,8 @@ _termio_config_set(Evas_Object *obj, Config *config)
theme_apply(sd->cur.selo_theme, config, "terminology/selection");
theme_auto_reload_enable(sd->cur.selo_theme);
- edje_object_part_swallow(sd->cur.selo_theme, "terminology.top_left", sd->cur.selo_top);
- edje_object_part_swallow(sd->cur.selo_theme, "terminology.bottom_right", sd->cur.selo_bottom);
+ selection_top_left_set(sd->cur.selo_theme, sd->cur.selo_top);
+ selection_bottom_right_set(sd->cur.selo_theme, sd->cur.selo_bottom);
}
static void
@@ -2307,7 +2305,7 @@ _smart_pty_bell(void *data)
Termio *sd = evas_object_smart_data_get(data);
if (!sd) return;
evas_object_smart_callback_call(data, "bell", NULL);
- edje_object_signal_emit(sd->cur.obj, "bell", "terminology");
+ background_bell_emit(sd->cur.obj);
}
static void
@@ -2574,11 +2572,11 @@ termio_config_update(Evas_Object *obj)
termpty_backscroll_set(sd->pty, sd->config->scrollback);
sd->scroll = 0;
- edje_object_signal_emit(sd->cur.obj, "focus,out", "terminology");
+ cursor_focus_out_emit(sd->cur.obj);
if (sd->config->disable_cursor_blink)
- edje_object_signal_emit(sd->cur.obj, "focus,in,noblink", "terminology");
+ cursor_focus_in_noblink_emit(sd->cur.obj);
else
- edje_object_signal_emit(sd->cur.obj, "focus,in", "terminology");
+ cursor_focus_in_emit(sd->cur.obj);
evas_object_scale_set(sd->grid.obj, elm_config_scale_get());
evas_object_textgrid_font_set(sd->grid.obj, sd->font.name, sd->font.size);
diff --git a/src/bin/termiolink.c b/src/bin/termiolink.c
index e523320..67d7aff 100644
--- a/src/bin/termiolink.c
+++ b/src/bin/termiolink.c
@@ -3,6 +3,7 @@
#include "termio.h"
#include "utils.h"
+
static Eina_Bool
coord_back(int *x, int *y, int w, int h __UNUSED__)
{