summaryrefslogtreecommitdiff
path: root/src/lib/elua
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2015-04-20 17:00:16 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2015-05-06 15:05:22 +0100
commita02bb195d9aabc9726dcac1345f8404d60aefaec (patch)
tree91ad3e115d5d8fa942f974e950e21658d3813e82 /src/lib/elua
parenta5486874d5a54032f1e46afff03c5cf0c11062fb (diff)
elua lib: docs for elua_util_script_run
Diffstat (limited to 'src/lib/elua')
-rw-r--r--src/lib/elua/Elua.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/lib/elua/Elua.h b/src/lib/elua/Elua.h
index 58cb104a70..08bfc0c3aa 100644
--- a/src/lib/elua/Elua.h
+++ b/src/lib/elua/Elua.h
@@ -418,6 +418,34 @@ EAPI int elua_util_string_run(Elua_State *es, const char *chunk,
418 * @ingroup Elua 418 * @ingroup Elua
419 */ 419 */
420EAPI Eina_Bool elua_util_app_load(Elua_State *es, const char *appname); 420EAPI Eina_Bool elua_util_app_load(Elua_State *es, const char *appname);
421
422/**
423 * @brief Runs a script.
424 *
425 * This is a more complicated function that runs a script. It's a combination
426 * of the previously mentioned util functions. It takes argc and argv, which
427 * are typically given to the program, and an index of the first positional
428 * arg in argv (i.e. not options). The value on this index is then used as
429 * the potential name.
430 *
431 * If this name is either a dash or empty, the script is loaded from stdin.
432 * If it's a value and a file with this name exists, the script is loaded from
433 * the file. Otherwise, the name is treated to be an application name, and
434 * is loaded from the application path.
435 *
436 * If all succeeds, this is then run, and a quit value is written into the
437 * quit arg; if it's true (1), it means the app wants to exit immediately.
438 * If it's false (0), it means the app likely wants to execute a main loop.
439 *
440 * @param[in] es The Elua state.
441 * @param[in] argc The argument count.
442 * @param[in] argv The arguments.
443 * @param[in] n The index of the first positional argument.
444 * @param[out] quit Whether to quit or run a main loop.
445 * @return 0 on success, non-zero value on failure (-1 for NULL inputs).
446 *
447 * @ingroup Elua
448 */
421EAPI int elua_util_script_run(Elua_State *es, int argc, char **argv, int n, 449EAPI int elua_util_script_run(Elua_State *es, int argc, char **argv, int n,
422 int *quit); 450 int *quit);
423 451