Recorder: support stabilization via hotkey

master
Daniel Zaoui 4 years ago
parent f56ee0dfac
commit 3457071db1
  1. 14
      src/bin/recorder.c

@ -25,6 +25,7 @@
#include "exactness_private.h"
#define MAX_PATH 1024
#define STABILIZE_KEY_STR "F1"
#define SHOT_KEY_STR "F2"
#define SAVE_KEY_STR "F3"
@ -183,6 +184,12 @@ _event_key_cb(void *data, const Efl_Event *event)
if (n_evas >= 0) _add_to_list(EXACTNESS_ACTION_TAKE_SHOT, n_evas, timestamp, NULL, 0);
return;
}
if (!strcmp(key, STABILIZE_KEY_STR))
{
_printf(2, "Stabilize: %s timestamp=<%u>\n", __func__, timestamp);
if (n_evas >= 0) _add_to_list(EXACTNESS_ACTION_STABILIZE, n_evas, timestamp, NULL, 0);
return;
}
if (!strcmp(key, SAVE_KEY_STR))
{
_output_write();
@ -193,7 +200,7 @@ _event_key_cb(void *data, const Efl_Event *event)
}
else
{
if (!strcmp(key, _shot_key) || !strcmp(key, SAVE_KEY_STR)) return;
if (!strcmp(key, _shot_key) || !strcmp(key, SAVE_KEY_STR) || !strcmp(key, STABILIZE_KEY_STR)) return;
}
if (_unit)
{ /* Construct duplicate strings, free them when list if freed */
@ -345,7 +352,10 @@ static const Ecore_Getopt optdesc = {
PACKAGE_VERSION,
"(C) 2017 Enlightenment",
"BSD",
"A scenario recorder for EFL based applications.",
"A scenario recorder for EFL based applications.\n"
"\tF1 - Request stabilization\n"
"\tF2 - Request shot\n"
"\tF3 - Request to save the scenario\n",
1,
{
ECORE_GETOPT_STORE_STR('t', "test", "Name of the filename where to store the test."),

Loading…
Cancel
Save