moved code here. still needs to update gh
This commit is contained in:
6
mpvd/include/audio.h
Normal file
6
mpvd/include/audio.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef AUDIO_H
|
||||
#define AUDIO_H
|
||||
|
||||
void play_audio(const char *file_path);
|
||||
|
||||
#endif
|
||||
10
mpvd/include/dir.h
Normal file
10
mpvd/include/dir.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#ifndef DIR_H
|
||||
#define DIR_H
|
||||
|
||||
#define MAX_PATH_LEN 512 // Declare MAX_PATH_LEN for use across files
|
||||
|
||||
char* get_music_directory();
|
||||
char** load_songs(int *count, const char *music_dir);
|
||||
void navigate_directory(const char *dir, char **songs, int *song_count); // Declare navigate_directory
|
||||
|
||||
#endif
|
||||
14
mpvd/include/ui.h
Normal file
14
mpvd/include/ui.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#ifndef UI_H
|
||||
#define UI_H
|
||||
|
||||
#include <ncurses.h>
|
||||
|
||||
void init_ncurses();
|
||||
void end_ncurses();
|
||||
void display_songs(WINDOW *win, char **songs, int song_count, int selected);
|
||||
void display_controls(WINDOW *control_win, int is_playing);
|
||||
|
||||
// Update handle_input to accept current_directory
|
||||
void handle_input(int ch, char **songs, int *selected_song, int *song_count, WINDOW *song_win, WINDOW *control_win, int *is_playing, char *current_directory);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user