history.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /** \file history.h
  2. * \brief Header: save, load and show history
  3. */
  4. #ifndef MC__WIDGET_HISTORY_H
  5. #define MC__WIDGET_HISTORY_H
  6. /*** typedefs(not structures) and defined constants **********************************************/
  7. /*** enums ***************************************************************************************/
  8. /*** structures declarations (and typedefs of structures)*****************************************/
  9. /* forward declaration */
  10. struct mc_config_t;
  11. /*** global variables defined in .c file *********************************************************/
  12. extern int num_history_items_recorded;
  13. /*** declarations of public functions ************************************************************/
  14. /* read history to the mc_config, but don't save config to file */
  15. GList *history_get (const char *input_name);
  16. /* load history form the mc_config */
  17. GList *history_load (struct mc_config_t * cfg, const char *name);
  18. /* save history to the mc_config, but don't save config to file */
  19. void history_save (struct mc_config_t * cfg, const char *name, GList * h);
  20. #if 0
  21. /* write history to the ${XDG_CACHE_HOME}/mc/history file */
  22. void history_put (const char *input_name, GList * h);
  23. #endif
  24. /* for repositioning of history dialog we should pass widget to this
  25. * function, as position of history dialog depends on widget's position */
  26. char *history_show (GList ** history, Widget * widget);
  27. /*** inline functions ****************************************************************************/
  28. #endif /* MC__WIDGET_HISTORY_H */