RetroArch
Classes | Typedefs | Functions
file_list.h File Reference
#include <retro_common_api.h>
#include <stddef.h>
#include <stdlib.h>
#include <boolean.h>
Include dependency graph for file_list.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  item_file
 
struct  file_list
 

Typedefs

typedef struct file_list file_list_t
 

Functions

voidfile_list_get_userdata_at_offset (const file_list_t *list, size_t index)
 
voidfile_list_get_actiondata_at_offset (const file_list_t *list, size_t index)
 
void file_list_free (file_list_t *list)
 frees the list More...
 
bool file_list_reserve (file_list_t *list, size_t nitems)
 makes the list big enough to contain at least nitems More...
 
bool file_list_append (file_list_t *userdata, const char *path, const char *label, unsigned type, size_t current_directory_ptr, size_t entry_index)
 
bool file_list_prepend (file_list_t *list, const char *path, const char *label, unsigned type, size_t directory_ptr, size_t entry_idx)
 
void file_list_pop (file_list_t *list, size_t *directory_ptr)
 
void file_list_clear (file_list_t *list)
 
void file_list_copy (const file_list_t *src, file_list_t *dst)
 
void file_list_get_last (const file_list_t *list, const char **path, const char **label, unsigned *type, size_t *entry_idx)
 
voidfile_list_get_last_actiondata (const file_list_t *list)
 
size_t file_list_get_size (const file_list_t *list)
 
size_t file_list_get_directory_ptr (const file_list_t *list)
 
void file_list_get_at_offset (const file_list_t *list, size_t index, const char **path, const char **label, unsigned *type, size_t *entry_idx)
 
void file_list_free_userdata (const file_list_t *list, size_t index)
 
void file_list_free_actiondata (const file_list_t *list, size_t idx)
 
void file_list_set_label_at_offset (file_list_t *list, size_t index, const char *label)
 
void file_list_get_label_at_offset (const file_list_t *list, size_t index, const char **label)
 
void file_list_set_alt_at_offset (file_list_t *list, size_t index, const char *alt)
 
void file_list_set_userdata (const file_list_t *list, size_t idx, void *ptr)
 
void file_list_set_actiondata (const file_list_t *list, size_t idx, void *ptr)
 
void file_list_get_alt_at_offset (const file_list_t *list, size_t index, const char **alt)
 
void file_list_sort_on_alt (file_list_t *list)
 
void file_list_sort_on_type (file_list_t *list)
 
bool file_list_search (const file_list_t *list, const char *needle, size_t *index)
 

Typedef Documentation

◆ file_list_t

typedef struct file_list file_list_t

Function Documentation

◆ file_list_append()

bool file_list_append ( file_list_t userdata,
const char *  path,
const char *  label,
unsigned  type,
size_t  current_directory_ptr,
size_t  entry_index 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_list_clear()

void file_list_clear ( file_list_t list)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_list_copy()

void file_list_copy ( const file_list_t src,
file_list_t dst 
)
Here is the call graph for this function:

◆ file_list_free()

void file_list_free ( file_list_t list)

frees the list

NOTE: This function will also free() the entries actiondata and userdata fields if they are non-null. If you store complex or non-contiguous data there, make sure you free it's fields before calling this function or you might get a memory leak.

Parameters
list
Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_list_free_actiondata()

void file_list_free_actiondata ( const file_list_t list,
size_t  idx 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_list_free_userdata()

void file_list_free_userdata ( const file_list_t list,
size_t  index 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_list_get_actiondata_at_offset()

void* file_list_get_actiondata_at_offset ( const file_list_t list,
size_t  index 
)
Here is the caller graph for this function:

◆ file_list_get_alt_at_offset()

void file_list_get_alt_at_offset ( const file_list_t list,
size_t  index,
const char **  alt 
)
Here is the caller graph for this function:

◆ file_list_get_at_offset()

void file_list_get_at_offset ( const file_list_t list,
size_t  index,
const char **  path,
const char **  label,
unsigned *  type,
size_t *  entry_idx 
)
Here is the caller graph for this function:

◆ file_list_get_directory_ptr()

size_t file_list_get_directory_ptr ( const file_list_t list)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_list_get_label_at_offset()

void file_list_get_label_at_offset ( const file_list_t list,
size_t  index,
const char **  label 
)
Here is the caller graph for this function:

◆ file_list_get_last()

void file_list_get_last ( const file_list_t list,
const char **  path,
const char **  label,
unsigned *  type,
size_t *  entry_idx 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_list_get_last_actiondata()

void* file_list_get_last_actiondata ( const file_list_t list)
Here is the caller graph for this function:

◆ file_list_get_size()

size_t file_list_get_size ( const file_list_t list)
Here is the caller graph for this function:

◆ file_list_get_userdata_at_offset()

void* file_list_get_userdata_at_offset ( const file_list_t list,
size_t  index 
)
Here is the caller graph for this function:

◆ file_list_pop()

void file_list_pop ( file_list_t list,
size_t *  directory_ptr 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_list_prepend()

bool file_list_prepend ( file_list_t list,
const char *  path,
const char *  label,
unsigned  type,
size_t  directory_ptr,
size_t  entry_idx 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_list_reserve()

bool file_list_reserve ( file_list_t list,
size_t  nitems 
)

makes the list big enough to contain at least nitems

This function will not change the capacity if nitems is smaller than the current capacity.

Parameters
list
nitems
Returns
whether or not the operation succeeded
Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_list_search()

bool file_list_search ( const file_list_t list,
const char *  needle,
size_t *  index 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_list_set_actiondata()

void file_list_set_actiondata ( const file_list_t list,
size_t  idx,
void ptr 
)
Here is the caller graph for this function:

◆ file_list_set_alt_at_offset()

void file_list_set_alt_at_offset ( file_list_t list,
size_t  index,
const char *  alt 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_list_set_label_at_offset()

void file_list_set_label_at_offset ( file_list_t list,
size_t  index,
const char *  label 
)
Here is the call graph for this function:

◆ file_list_set_userdata()

void file_list_set_userdata ( const file_list_t list,
size_t  idx,
void ptr 
)
Here is the caller graph for this function:

◆ file_list_sort_on_alt()

void file_list_sort_on_alt ( file_list_t list)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_list_sort_on_type()

void file_list_sort_on_type ( file_list_t list)
Here is the call graph for this function: