propagate excape command to main.c and put in some skeleton for

handling cmds.



SVN revision: 81686
This commit is contained in:
Carsten Haitzler 2012-12-25 01:53:41 +00:00
parent 52b938fedc
commit dbcac72da3
2 changed files with 47 additions and 0 deletions

View File

@ -157,6 +157,50 @@ _cb_popup(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event __UNUS
edje_object_signal_emit(bg, "popmedia,movie", "terminology");
}
static void
_cb_command(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event)
{
const char *cmd = event;
printf("CMD: '%s'\n", cmd);
if (cmd[0] == 'p') // popmedia
{
if (cmd[1] == 'n') // now
{
}
else if (cmd[1] == 'q') // queue it to display after current one
{
}
}
else if (cmd[0] == 'b') // set background
{
if (cmd[1] == 't') // temporary
{
}
else if (cmd[1] == 'p') // permanent
{
}
}
else if (cmd[0] == 'a') // set alpha
{
if (cmd[1] == 't') // temporary
{
}
else if (cmd[1] == 'p') // permanent
{
}
}
else if (cmd[0] == 'a') // set alpha
{
if (cmd[1] == 't') // temporary
{
}
else if (cmd[1] == 'p') // permanent
{
}
}
}
static Eina_Bool
_cb_cmd_focus(void *data)
{
@ -757,6 +801,7 @@ elm_main(int argc, char **argv)
evas_object_smart_callback_add(o, "bell", _cb_bell, NULL);
evas_object_smart_callback_add(o, "popup", _cb_popup, NULL);
evas_object_smart_callback_add(o, "cmdbox", _cb_cmdbox, NULL);
evas_object_smart_callback_add(o, "command", _cb_command, NULL);
evas_object_show(o);
main_trans_update(config);

View File

@ -2471,6 +2471,8 @@ _smart_pty_command(void *data)
Termio *sd;
sd = evas_object_smart_data_get(obj);
if (!sd) return;
if (!sd->pty->cur_cmd) return;
evas_object_smart_callback_call(obj, "command", (void *)sd->pty->cur_cmd);
}
Evas_Object *