data->script_display_message_func = script_obj_new_null ();
data->script_hide_message_func = script_obj_new_null ();
data->script_quit_func = script_obj_new_null ();
+ data->script_system_update_func = script_obj_new_null ();
data->mode = mode;
script_obj_t *plymouth_hash = script_obj_hash_get_element (state->global, "Plymouth");
plymouth_get_mode,
data,
NULL);
+ script_add_native_function (plymouth_hash,
+ "SetSystemUpdateFunction",
+ plymouth_set_function,
+ &data->script_system_update_func,
+ "function",
+ NULL);
script_obj_unref (plymouth_hash);
data->script_main_op = script_parse_string (script_lib_plymouth_string, "script-lib-plymouth.script");
script_obj_unref (ret.object);
}
+void script_lib_plymouth_on_system_update (script_state_t *state,
+ script_lib_plymouth_data_t *data,
+ int progress)
+{
+ script_obj_t *new_status_obj = script_obj_new_number (progress);
+ script_return_t ret = script_execute_object (state,
+ data->script_system_update_func,
+ NULL,
+ new_status_obj,
+ NULL);
+ script_obj_unref (new_status_obj);
+ script_obj_unref (ret.object);
+}
+
void script_lib_plymouth_on_quit (script_state_t *state,
script_lib_plymouth_data_t *data)
{
script_obj_t *script_display_message_func;
script_obj_t *script_hide_message_func;
script_obj_t *script_quit_func;
+ script_obj_t *script_system_update_func;
ply_boot_splash_mode_t mode;
} script_lib_plymouth_data_t;
const char *new_message);
void script_lib_plymouth_on_quit (script_state_t *state,
script_lib_plymouth_data_t *data);
+void script_lib_plymouth_on_system_update (script_state_t *state,
+ script_lib_plymouth_data_t *data,
+ int progress);
+
#endif /* SCRIPT_LIB_PLYMOUTH_H */