Ewl_Filelist_Model: The model for the filelist
Detailed Description
A model for the filelist.
Functions | |
int | ewl_filelist_model_column_sortable (void *data, unsigned int column) |
unsigned int | ewl_filelist_model_data_count (void *data) |
int | ewl_filelist_model_data_expandable_get (void *data, unsigned int row) |
void * | ewl_filelist_model_data_expansion_data_fetch (void *data, unsigned int parent) |
void * | ewl_filelist_model_data_fetch (void *data, unsigned int row, unsigned int column) |
void | ewl_filelist_model_data_sort (void *data, unsigned int column, Ewl_Sort_Direction sort) |
unsigned int | ewl_filelist_model_data_unref (void *data) |
Ewl_Filelist_Directory * | ewl_filelist_model_directory_new (const char *path, unsigned char show_dot, unsigned int show_dot_dot, Ewl_Filelist_Filter *filter) |
Retrieves all files in a directory. | |
Ewl_Filelist_Filter * | ewl_filelist_model_filter_get (Ewl_Filelist_Directory *dir) |
Gets the filter used on a directory. | |
unsigned int | ewl_filelist_model_filter_set (Ewl_Filelist_Directory *dir, Ewl_Filelist_Filter *filter) |
Sets a filter onto a directory. | |
unsigned int | ewl_filelist_model_show_dot_files_get (Ewl_Filelist_Directory *dir) |
Returns if the model shows dot files. | |
unsigned int | ewl_filelist_model_show_dot_files_set (Ewl_Filelist_Directory *dir, unsigned int show_dot) |
This function sets whether the filelist should contain hidden files. |
Function Documentation
int ewl_filelist_model_column_sortable | ( | void * | data, | |
unsigned int | column | |||
) |
References DENTER_FUNCTION, DLEVEL_STABLE, and DRETURN_INT.
unsigned int ewl_filelist_model_data_count | ( | void * | data | ) |
int ewl_filelist_model_data_expandable_get | ( | void * | data, | |
unsigned int | row | |||
) |
void* ewl_filelist_model_data_expansion_data_fetch | ( | void * | data, | |
unsigned int | parent | |||
) |
void* ewl_filelist_model_data_fetch | ( | void * | data, | |
unsigned int | row, | |||
unsigned int | column | |||
) |
References DCHECK_PARAM_PTR_RET, DENTER_FUNCTION, Ewl_Filelist_Directory::dirs, DLEVEL_STABLE, DRETURN_PTR, ewl_filelist_groupname_get(), ewl_filelist_modtime_get(), ewl_filelist_perms_get(), ewl_filelist_size_get(), ewl_filelist_username_get(), Ewl_Filelist_Directory::files, Ewl_Filelist_File::groupname, Ewl_Filelist_File::mode, Ewl_Filelist_File::modtime, Ewl_Filelist_Directory::name, Ewl_Filelist_File::name, Ewl_Filelist_Directory::num_dirs, PATH_MAX, Ewl_Filelist_File::size, and Ewl_Filelist_File::username.
void ewl_filelist_model_data_sort | ( | void * | data, | |
unsigned int | column, | |||
Ewl_Sort_Direction | sort | |||
) |
unsigned int ewl_filelist_model_data_unref | ( | void * | data | ) |
Ewl_Filelist_Directory* ewl_filelist_model_directory_new | ( | const char * | path, | |
unsigned char | show_dot, | |||
unsigned int | show_dot_dot, | |||
Ewl_Filelist_Filter * | filter | |||
) |
Retrieves all files in a directory.
- Parameters:
-
path,: The path to the directory to read show_dot,: TRUE shows dot files, FALSE does not show_dot_dot,: TRUE shows .. for navigating upwards, FALSE does not filter,: The Ewl_Filelist_Filter to use
- Returns:
- Returns an Ewl_Filelist_Directory structure
References DCHECK_PARAM_PTR_RET, DENTER_FUNCTION, Ewl_Filelist_Directory::dirs, DLEVEL_STABLE, DRETURN_PTR, ewl_filelist_model_filter(), Ewl_Filelist_Directory::files, Ewl_Filelist_Directory::filter, FREE, Ewl_Filelist_File::groupname, IF_FREE_LIST, Ewl_Filelist_File::is_dir, Ewl_Filelist_File::mode, Ewl_Filelist_File::modtime, Ewl_Filelist_Directory::name, Ewl_Filelist_File::name, NEW, Ewl_Filelist_Directory::num_dirs, Ewl_Filelist_Directory::num_files, PATH_MAX, Ewl_Filelist_Directory::rdirs, Ewl_Filelist_File::readable, Ewl_Filelist_Directory::rfiles, Ewl_Filelist_Directory::show_dot, Ewl_Filelist_File::size, Ewl_Filelist_File::username, and Ewl_Filelist_File::writeable.
Referenced by ewl_filelist_directory_set(), and ewl_filelist_model_data_expansion_data_fetch().
Ewl_Filelist_Filter* ewl_filelist_model_filter_get | ( | Ewl_Filelist_Directory * | dir | ) |
Gets the filter used on a directory.
- Parameters:
-
dir,: The directory to get the filter for
- Returns:
- : Returns the Ewl_Filelist_Filter used
References DCHECK_PARAM_PTR_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, and Ewl_Filelist_Directory::filter.
unsigned int ewl_filelist_model_filter_set | ( | Ewl_Filelist_Directory * | dir, | |
Ewl_Filelist_Filter * | filter | |||
) |
Sets a filter onto a directory.
- Parameters:
-
dir,: The directory to set a filter upon filter,: The Ewl_Filelist_Filter to use
- Returns:
- : Returns TRUE on data change, FALSE if not
References DCHECK_PARAM_PTR_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, ewl_filelist_model_filter(), and Ewl_Filelist_Directory::filter.
Referenced by ewl_filelist_filter_set().
unsigned int ewl_filelist_model_show_dot_files_get | ( | Ewl_Filelist_Directory * | dir | ) |
Returns if the model shows dot files.
- Parameters:
-
dir,: The Ewl_Filelist_Directory to work with
- Returns:
- Returns if the model shows dot files
References DCHECK_PARAM_PTR_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, and Ewl_Filelist_Directory::show_dot.
unsigned int ewl_filelist_model_show_dot_files_set | ( | Ewl_Filelist_Directory * | dir, | |
unsigned int | show_dot | |||
) |
This function sets whether the filelist should contain hidden files.
- Parameters:
-
dir,: The Ewl_Filelist_Directory to work with show_dot,: TRUE shows dot files, FALSE does not
- Returns:
- Returns TRUE if a change in data, FALSE if not
References DCHECK_PARAM_PTR_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, ewl_filelist_model_filter(), and Ewl_Filelist_Directory::show_dot.
Referenced by ewl_filelist_show_dot_files_set().