|
XenevaOS
|
#include <stdint.h>#include <_xeneva.h>#include <stdio.h>#include <sys/_keproc.h>#include <sys/_kefile.h>#include <sys/iocodes.h>#include <chitralekha.h>#include <widgets/base.h>#include <widgets/button.h>#include <widgets/window.h>#include <widgets/menubar.h>#include <widgets/msgbox.h>#include <widgets/menu.h>#include <widgets/scrollpane.h>#include <widgets/icon.h>#include <widgets/view.h>#include <sys/mman.h>#include <nanojpg.h>#include <string.h>#include <stdlib.h>#include "minimp3.h"#include "miniid3.h"
Classes | |
| struct | Resampler |
Macros | |
| #define | MINIMP3_IMPLEMENTATION |
| #define | MINIID3_IMPLEMENTATION |
| #define | CHUNK 4096 |
| #define | WINDOW (16 * 1024) |
| #define | BUF_CAP (WINDOW + CHUNK) |
| #define | AUDIO_BLOCK 4096 |
| #define | NBUF 8 |
Functions | |
| void | play_mp3 (const char *path) |
| void | RegisterSound () |
| void | PlayerThread () |
| void | WindowHandleMessage (PostEvent *e) |
| void | AboutClicked (ChWidget *wid, ChWindow *win) |
| void | ExitItemClicked (ChWidget *wid, ChWindow *win) |
| void | DrawWallpaper (ChCanvas *canv, char *filename, int x, int y) |
| void | DrawMusicBackground (ChCanvas *canv, const char *mp3Path, int x, int y, int w, int h) |
| void | UpdateHomeUI () |
| void | UpdateBrowserUI () |
| void | BrowseMenuActionHandler (ChWidget *wid, ChWindow *win) |
| void | SelectButtonActionHandler (ChWidget *wid, ChWindow *win) |
| void | MusicPrepareLibrary (ChListView *lv) |
| void | PlayPauseButtonAction (ChWidget *wid, ChWindow *mainWin) |
| void | PrepareBrowserUI () |
| void | AudioPlayerClose (ChWindow *win) |
| int | main (int argc, char *argv[]) |
Variables | |
| ChitralekhaApp * | app |
| ChWindow * | mainWin |
| ChCanvas * | mainCanvas |
| ChCanvas * | browserCanvas |
| list_t * | mainWidgetList |
| list_t * | browserWidgetList |
| ChListView * | browseList |
| ChIcon * | musicIcon |
| ChMenubar * | mainMenubar |
| bool | _music_library_drawn |
| char * | selectedFile |
| int | snd |
| int | _file |
| bool | _start_player |
| void * | soundbuff |
| void * | filebuff |
| bool | _auto_start |
| #define AUDIO_BLOCK 4096 |
| #define CHUNK 4096 |
| #define MINIID3_IMPLEMENTATION |
| #define MINIMP3_IMPLEMENTATION |
BSD 2-Clause License
Copyright (c) 2022, Manas Kamal Choudhury All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
| #define NBUF 8 |
| #define WINDOW (16 * 1024) |
| void AudioPlayerClose | ( | ChWindow * | win | ) |
| void DrawMusicBackground | ( | ChCanvas * | canv, |
| const char * | mp3Path, | ||
| int | x, | ||
| int | y, | ||
| int | w, | ||
| int | h | ||
| ) |
| void DrawWallpaper | ( | ChCanvas * | canv, |
| char * | filename, | ||
| int | x, | ||
| int | y | ||
| ) |
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
| void MusicPrepareLibrary | ( | ChListView * | lv | ) |
| void play_mp3 | ( | const char * | path | ) |
| void PlayerThread | ( | ) |
| void PrepareBrowserUI | ( | ) |
| void RegisterSound | ( | ) |
| void UpdateBrowserUI | ( | ) |
| void UpdateHomeUI | ( | ) |
| void WindowHandleMessage | ( | PostEvent * | e | ) |
| bool _auto_start |
| int _file |
| bool _music_library_drawn |
| bool _start_player |
| ChitralekhaApp* app |
| ChListView* browseList |
| ChCanvas* browserCanvas |
| list_t* browserWidgetList |
| void* filebuff |
| ChCanvas* mainCanvas |
| ChMenubar* mainMenubar |
| list_t* mainWidgetList |
| ChWindow* mainWin |
| ChIcon* musicIcon |
| char* selectedFile |
| int snd |
| void* soundbuff |