mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-02-06 08:24:56 +01:00
List recent files
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
parent
1cd609d33b
commit
47cd9b1895
2 changed files with 19 additions and 0 deletions
|
@ -68,3 +68,11 @@ zathura_db_get_fileinfo(zathura_database_t* db, const char* file,
|
|||
|
||||
return ZATHURA_DATABASE_GET_INTERFACE(db)->get_fileinfo(db, file, file_info);
|
||||
}
|
||||
|
||||
girara_list_t*
|
||||
zathura_db_get_recent_files(zathura_database_t* db)
|
||||
{
|
||||
g_return_val_if_fail(ZATHURA_IS_DATABASE(db), NULL);
|
||||
|
||||
return ZATHURA_DATABASE_GET_INTERFACE(db)->get_recent_files(db);
|
||||
}
|
||||
|
|
|
@ -50,6 +50,8 @@ struct _ZathuraDatabaseInterface
|
|||
bool (*set_fileinfo)(ZathuraDatabase* db, const char* file, zathura_fileinfo_t* file_info);
|
||||
|
||||
bool (*get_fileinfo)(ZathuraDatabase* db, const char* file, zathura_fileinfo_t* file_info);
|
||||
|
||||
girara_list_t* (*get_recent_files)(ZathuraDatabase* db);
|
||||
};
|
||||
|
||||
GType zathura_database_get_type(void);
|
||||
|
@ -128,4 +130,13 @@ bool zathura_db_set_fileinfo(zathura_database_t* db, const char* file,
|
|||
bool zathura_db_get_fileinfo(zathura_database_t* db, const char* file,
|
||||
zathura_fileinfo_t* file_info);
|
||||
|
||||
/* Get a list of recent files from the database. The most recent file is listed
|
||||
* first.
|
||||
*
|
||||
* @param db The database instance
|
||||
* @return list of files
|
||||
*/
|
||||
girara_list_t* zathura_db_get_recent_files(zathura_database_t* db);
|
||||
|
||||
|
||||
#endif // DATABASE_H
|
||||
|
|
Loading…
Reference in a new issue