2020-09-21 17:17:34 +00:00
|
|
|
// SPDX-License-Identifier: MIT
|
2020-06-22 15:27:53 +00:00
|
|
|
//
|
2020-09-21 17:17:34 +00:00
|
|
|
// EmulationStation Desktop Edition
|
2020-06-22 15:27:53 +00:00
|
|
|
// Scripting.h
|
|
|
|
//
|
2021-12-05 10:25:11 +00:00
|
|
|
// Executes custom scripts for various events.
|
2020-06-22 15:27:53 +00:00
|
|
|
// By calling fireEvent() the scripts inside the directory corresponding to the
|
2021-12-05 10:25:11 +00:00
|
|
|
// argument "eventName" will be executed with arg1, arg2, arg3 and arg4 as arguments.
|
2020-06-22 15:27:53 +00:00
|
|
|
//
|
2020-12-31 12:10:28 +00:00
|
|
|
// The scripts are searched for in ~/.emulationstation/scripts/<eventName>
|
2021-12-05 10:25:11 +00:00
|
|
|
// For example, if the event is called "game-start", all scripts inside the directory
|
2020-12-31 12:10:28 +00:00
|
|
|
// ~/.emulationstation/scripts/game-start/ will be executed.
|
2020-06-22 15:27:53 +00:00
|
|
|
//
|
|
|
|
|
2018-01-30 00:49:08 +00:00
|
|
|
#ifndef ES_CORE_SCRIPTING_H
|
|
|
|
#define ES_CORE_SCRIPTING_H
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
namespace Scripting
|
|
|
|
{
|
2020-06-22 15:27:53 +00:00
|
|
|
void fireEvent(const std::string& eventName,
|
2021-07-07 18:31:46 +00:00
|
|
|
const std::string& arg1 = "",
|
2021-12-05 10:25:11 +00:00
|
|
|
const std::string& arg2 = "",
|
|
|
|
const std::string& arg3 = "",
|
|
|
|
const std::string& arg4 = "");
|
2022-09-07 18:01:04 +00:00
|
|
|
}
|
2018-01-30 00:49:08 +00:00
|
|
|
|
2021-07-07 18:31:46 +00:00
|
|
|
#endif // ES_CORE_SCRIPTING_H
|