![]() |
libxputty 0.1
|
Go to the source code of this file.
Functions | |
bool | is_root_directory (char *path) |
void | add_root_directory (FilePicker *filepicker, char *path) |
bool | is_file (DIR *dirp, struct dirent *dp) |
bool | is_directory (DIR *dirp, struct dirent *dp) |
int | fp_check_link (char *path, struct dirent *dp) |
int | fp_check_dir (char *path, struct dirent *dp) |
int | fp_is_link (struct dirent *dp) |
int | fp_get_files (FilePicker *filepicker, char *path, int get_dirs, int get_files) |
fp_get_files - fill file_names and dir_names with the results from readdir path | |
void | fp_free (FilePicker *filepicker) |
fp_free - release all memory used by the filepicker | |
void | fp_init (FilePicker *filepicker, const char *path) |
fp_init - set default values used by the filepicker | |
void add_root_directory | ( | FilePicker * | filepicker, |
char * | path | ||
) |
Definition at line 108 of file xfilepicker.c.
References asprintf(), FilePicker::dir_counter, and FilePicker::dir_names.
int fp_check_dir | ( | char * | path, |
struct dirent * | dp | ||
) |
Definition at line 201 of file xfilepicker.c.
Referenced by fp_get_files().
int fp_check_link | ( | char * | path, |
struct dirent * | dp | ||
) |
Definition at line 186 of file xfilepicker.c.
Referenced by fp_get_files().
void fp_free | ( | FilePicker * | filepicker | ) |
fp_free - release all memory used by the filepicker
*filepicker | - pointer to the struct to be released |
Definition at line 275 of file xfilepicker.c.
References FilePicker::filter, FilePicker::path, and FilePicker::selected_file.
int fp_get_files | ( | FilePicker * | filepicker, |
char * | path, | ||
int | get_dirs, | ||
int | get_files | ||
) |
fp_get_files - fill file_names and dir_names with the results from readdir path
*filepicker | - pointer to the struct holding the list pointers |
*path | - the path to read from |
get_dirs | - 0 = only read files 1 = refill the directory buffer as well |
get_files | - 0 = only read directorys 1 = refill the file buffer as well |
Definition at line 226 of file xfilepicker.c.
References asprintf(), FilePicker::dir_names, FilePicker::file_counter, FilePicker::file_names, fp_check_dir(), fp_check_link(), fp_is_link(), is_directory(), and is_file().
Referenced by open_directory_dialog(), open_file_dialog(), and save_file_dialog().
void fp_init | ( | FilePicker * | filepicker, |
const char * | path | ||
) |
fp_init - set default values used by the filepicker
*filepicker | - pointer to the struct to alocate |
*path | - the path to read from |
Definition at line 283 of file xfilepicker.c.
References asprintf(), FilePicker::dir_counter, FilePicker::dir_names, FilePicker::file_counter, FilePicker::file_names, FilePicker::filter, FilePicker::path, FilePicker::selected_file, FilePicker::show_hidden, and FilePicker::use_filter.
Referenced by open_directory_dialog(), open_file_dialog(), and save_file_dialog().
int fp_is_link | ( | struct dirent * | dp | ) |
Definition at line 218 of file xfilepicker.c.
Referenced by fp_get_files().
bool is_directory | ( | DIR * | dirp, |
struct dirent * | dp | ||
) |
Definition at line 131 of file xfilepicker.c.
Referenced by fp_get_files().
bool is_file | ( | DIR * | dirp, |
struct dirent * | dp | ||
) |
Definition at line 127 of file xfilepicker.c.
Referenced by fp_get_files().
bool is_root_directory | ( | char * | path | ) |
Definition at line 103 of file xfilepicker.c.