2014-02-15 15:17:40 -08:00
|
|
|
#ifndef EDI_FILEPANEL_H_
|
|
|
|
# define EDI_FILEPANEL_H_
|
2014-02-14 15:50:25 -08:00
|
|
|
|
|
|
|
#include <Elementary.h>
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
* @brief These routines are used for managing the Edi file panel.
|
|
|
|
*/
|
|
|
|
|
2014-02-26 00:17:44 -08:00
|
|
|
typedef void (*edi_filepanel_item_clicked_cb)(const char *path,
|
2014-03-13 11:31:24 -07:00
|
|
|
const char *type,
|
|
|
|
Eina_Bool newwin);
|
2014-02-15 15:17:40 -08:00
|
|
|
|
2014-02-14 15:50:25 -08:00
|
|
|
/**
|
|
|
|
* @brief UI management functions.
|
|
|
|
* @defgroup UI
|
|
|
|
*
|
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* Initialisation and management of the file panel UI
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2017-06-18 13:49:53 -07:00
|
|
|
* Initialise a new Edi filepanel and add it to the parent panel.
|
2014-02-14 15:50:25 -08:00
|
|
|
*
|
2014-02-23 12:22:32 -08:00
|
|
|
* @param parent The panel into which the panel will be loaded.
|
|
|
|
* @param win The main window of the application.
|
2014-02-25 23:28:24 -08:00
|
|
|
* @param path The project path being opened.
|
|
|
|
* @param cb A callback to inform the app a file should be opened.
|
2014-02-14 15:50:25 -08:00
|
|
|
*
|
|
|
|
* @ingroup UI
|
|
|
|
*/
|
2014-02-23 12:22:32 -08:00
|
|
|
void edi_filepanel_add(Evas_Object *parent, Evas_Object *win,
|
2014-02-26 00:17:44 -08:00
|
|
|
const char *path, edi_filepanel_item_clicked_cb cb);
|
2014-02-14 15:50:25 -08:00
|
|
|
|
2017-09-01 12:40:02 -07:00
|
|
|
/**
|
|
|
|
* Get the path of the currently selected item in the file panel.
|
|
|
|
*
|
|
|
|
* @param obj The filepanel object.
|
|
|
|
* @return The path of the selected item.
|
|
|
|
*
|
|
|
|
* @ingroup UI
|
|
|
|
*/
|
2015-07-17 10:30:25 -07:00
|
|
|
const char *edi_filepanel_selected_path_get(Evas_Object *obj);
|
|
|
|
|
2017-09-01 12:40:02 -07:00
|
|
|
/**
|
|
|
|
* Select an item in the filepanel from its path.
|
|
|
|
*
|
|
|
|
* @param path The path to be selected in the file panel.
|
|
|
|
*
|
|
|
|
* @ingroup UI
|
|
|
|
*/
|
2017-09-01 12:16:19 -07:00
|
|
|
void edi_filepanel_select_path(const char *path);
|
2017-09-01 12:40:02 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Initialise a file panel search.
|
|
|
|
*
|
|
|
|
* @ingroup UI
|
|
|
|
*/
|
2016-02-11 06:13:12 -08:00
|
|
|
void edi_filepanel_search();
|
|
|
|
|
2017-09-17 08:34:35 -07:00
|
|
|
/**
|
|
|
|
* Clear cache of file statuses, update the cache and update file panel items.
|
|
|
|
*
|
|
|
|
* @ingroup UI
|
|
|
|
*/
|
|
|
|
void edi_filepanel_status_refresh(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Update the cache of scm statuses in memory.
|
|
|
|
*
|
|
|
|
* @ingroup UI
|
|
|
|
*/
|
|
|
|
void edi_filepanel_scm_status_update(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Update a single item's state in the filepanel by path.
|
|
|
|
*
|
|
|
|
* @param path The path of the file to be updated.
|
|
|
|
*
|
|
|
|
* @ingroup UI
|
|
|
|
*/
|
|
|
|
void edi_filepanel_item_update(const char *path);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Update all items' state in the filepanel.
|
|
|
|
*
|
|
|
|
* @ingroup UI
|
|
|
|
*/
|
|
|
|
void edi_filepanel_item_update_all(void);
|
|
|
|
|
2014-02-14 15:50:25 -08:00
|
|
|
/**
|
|
|
|
* @}
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2014-02-15 15:17:40 -08:00
|
|
|
#endif /* EDI_FILEPANEL_H_ */
|