From cb3a6877fcbb001a8ee9afd3e4a25579ac40f805 Mon Sep 17 00:00:00 2001 From: Christian Soffke Date: Thu, 13 Apr 2023 15:14:58 +0200 Subject: RFC: Turn Playing Time function into plugin Since this function already requires hitting the disk, it may make sense to turn it into a plugin. A minor advantage (apart from cleaning up onplay.c and saving RAM) is that you can now access the menu not just from the WPS context menu, but also from the Shortcuts Menu or using the WPS plugin shortcut. On the other hand, TSR plugins would have to be terminated when Playing Time is launched, as is already the case for other plugins such as PictureFlow. Change-Id: Iea85229486887463ffc52f05e33e2340437f69a4 --- apps/plugin.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'apps/plugin.h') diff --git a/apps/plugin.h b/apps/plugin.h index 007552d120..b6dff14b1f 100644 --- a/apps/plugin.h +++ b/apps/plugin.h @@ -958,6 +958,17 @@ struct plugin_api { /* new stuff at the end, sort into place next time the API gets incompatible */ + const char* (*format_time_auto)(char *buffer, int buf_len, long value, + int unit_idx, bool supress_unit); + char* (*output_dyn_value)(char *buf, int buf_size, int value, + const unsigned char * const *units, + unsigned int unit_count, bool binary_scale); + int (*playlist_get_resume_info)(int *resume_index); + int (*playlist_get_track_info)(struct playlist_info* playlist, int index, + struct playlist_track_info* info); + bool (*list_do_action)(int context, int timeout, + struct gui_synclist *lists, int *action); + int (*talk_idarray)(const long *idarray, bool enqueue); }; /* plugin header */ -- cgit v1.2.3