Recorder: support stabilization via hotkey
This commit is contained in:
parent
f56ee0dfac
commit
3457071db1
|
@ -25,6 +25,7 @@
|
||||||
#include "exactness_private.h"
|
#include "exactness_private.h"
|
||||||
|
|
||||||
#define MAX_PATH 1024
|
#define MAX_PATH 1024
|
||||||
|
#define STABILIZE_KEY_STR "F1"
|
||||||
#define SHOT_KEY_STR "F2"
|
#define SHOT_KEY_STR "F2"
|
||||||
#define SAVE_KEY_STR "F3"
|
#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);
|
if (n_evas >= 0) _add_to_list(EXACTNESS_ACTION_TAKE_SHOT, n_evas, timestamp, NULL, 0);
|
||||||
return;
|
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))
|
if (!strcmp(key, SAVE_KEY_STR))
|
||||||
{
|
{
|
||||||
_output_write();
|
_output_write();
|
||||||
|
@ -193,7 +200,7 @@ _event_key_cb(void *data, const Efl_Event *event)
|
||||||
}
|
}
|
||||||
else
|
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)
|
if (_unit)
|
||||||
{ /* Construct duplicate strings, free them when list if freed */
|
{ /* Construct duplicate strings, free them when list if freed */
|
||||||
|
@ -345,7 +352,10 @@ static const Ecore_Getopt optdesc = {
|
||||||
PACKAGE_VERSION,
|
PACKAGE_VERSION,
|
||||||
"(C) 2017 Enlightenment",
|
"(C) 2017 Enlightenment",
|
||||||
"BSD",
|
"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,
|
1,
|
||||||
{
|
{
|
||||||
ECORE_GETOPT_STORE_STR('t', "test", "Name of the filename where to store the test."),
|
ECORE_GETOPT_STORE_STR('t', "test", "Name of the filename where to store the test."),
|
||||||
|
|
Loading…
Reference in New Issue