A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd

docs: Do a proper "merge" with the API docs

This keeps all the old descriptions etc that were there before.

Had to fix up the tools some more, honestly feels better to just
rewrite this crap in perl.

Change-Id: Ic15deae200c143ba5457423e12c81f871c0fef09

+267 -227
+244 -207
docs/PLUGIN_API
··· 8 8 # \/ \/ \/ \/ \/ 9 9 # $Id$ 10 10 # 11 - # Generated from http://svn.rockbox.org/viewvc.cgi/trunk/apps/plugin.h 11 + # Generated from https://git.rockbox.org/cgit/rockbox.git/aapps/plugin.h 12 12 # 13 13 # Format: 14 14 # \group memory and strings ··· 81 81 \group strings and memory 82 82 \param str 83 83 \return 84 - \description 84 + \description he atoi() function converts the initial portion of a string pointed to by str to int 85 85 86 86 struct mp3entry* audio_current_track(void) 87 87 \group playback control 88 - \return 88 + \return the mp3entry struct of the currently playing track 89 89 \description 90 + \see [S[firmware/export/id3.h]] 90 91 91 92 void audio_ff_rewind(long newtime) 92 93 \group playback control ··· 113 114 114 115 struct mp3entry* audio_next_track(void) 115 116 \group playback control 116 - \return 117 + \return the mp3entry struct of the upcoming track 117 118 \description 119 + \see [S[firmware/export/id3.h]] 118 120 119 121 void audio_pause(void) 120 122 \group playback control ··· 167 169 void backlight_off(void) 168 170 \group For OLED targets like the Sansa Clip, the backlight_* functions control * the display enable, which has essentially the same effect. 169 171 \conditions (defined(HAVE_BACKLIGHT)) 170 - \description 172 + \description Turns the backlight off 171 173 172 174 void backlight_on(void) 173 175 \group For OLED targets like the Sansa Clip, the backlight_* functions control * the display enable, which has essentially the same effect. 174 176 \conditions (defined(HAVE_BACKLIGHT)) 175 - \description 177 + \description Turns the backlight on 176 178 177 179 void backlight_set_brightness(int val) 178 180 \group For OLED targets like the Sansa Clip, the backlight_* functions control * the display enable, which has essentially the same effect. ··· 183 185 void backlight_set_timeout(int index) 184 186 \group For OLED targets like the Sansa Clip, the backlight_* functions control * the display enable, which has essentially the same effect. 185 187 \conditions (defined(HAVE_BACKLIGHT)) 186 - \param index 187 - \description 188 + \param index 0 : backlight always off%BR%1 : no time out%BR%2 : 1s%BR%3 : 2s%BR%4 : 3s%BR%5 : 4s%BR%6 : 5s%BR%7 : 6s%BR%8 : 7s%BR%9 : 8s%BR%10 : 9s%BR%11 : 10s%BR%12 : 15s%BR%13 : 20s%BR%14 : 25s%BR%15 : 30s%BR%16 : 45s%BR%17 : 60s%BR%18 : 90s%BR%other : backlight always off 189 + \description Set the backlight timeout 188 190 189 191 void backlight_set_timeout_plugged(int index) 190 192 \conditions (defined(HAVE_BACKLIGHT)) && (CONFIG_CHARGING) ··· 198 200 199 201 int battery_level(void) 200 202 \group power 201 - \return 202 - \description 203 + \return battery level in percent 204 + \description On the simulator, battery_level is always 75 203 205 204 206 bool battery_level_safe(void) 205 207 \group power ··· 335 337 336 338 void button_clear_queue(void) 337 339 \group button 338 - \description 340 + \description Empty the button queue 339 341 340 342 long button_get(bool block) 341 343 \group button 342 - \param block 343 - \return 344 + \param block If is set TRUE, button_get won't return until a key is pressed 345 + \return a bitmask for which keys were pressed 344 346 \description 345 347 346 348 intptr_t button_get_data(void) ··· 358 360 long button_get_w_tmo(int ticks) 359 361 \group button 360 362 \param ticks 361 - \return 362 - \description 363 + \return a bitmask for which keys were pressed; if no key was pressed, return BUTTON_NONE 364 + \description Wait for a key press for =ticks= ticks. (there are HZ ticks per second) 363 365 364 366 bool button_hold(void) 365 367 \group button ··· 386 388 387 389 int button_status(void) 388 390 \group button 389 - \return 391 + \return a bitmask for which keys are currently pressed 390 392 \description 391 393 392 394 int button_status_wdata(int *pdata) ··· 399 401 void cancel_cpu_boost(void) 400 402 \group kernel/ system 401 403 \conditions (defined(HAVE_SCHEDULER_BOOSTCTRL)) 402 - \description 404 + \description Unboosts the CPU for the current thread 403 405 404 406 const struct cbmp_bitmap_info_entry *core_bitmaps 405 407 \return ··· 436 438 \return 437 439 \description 438 440 439 - int close(int fildes) 440 - \group file 441 - \param fildes 442 - \return 443 - \description 444 - 445 - int closedir(DIR *dirp) 441 + int closedir(DIR* dirp) 446 442 \group dir 447 - \param dirp 443 + \param dir 448 444 \return 449 - \description 445 + \description The closedir() function closes the directory stream associated with =dir=. The directory stream descriptor dir is not available after this call. 450 446 451 447 int codec_close(void) 452 448 \group misc ··· 502 498 \group kernel/ system 503 499 \conditions ((CONFIG_PLATFORM & PLATFORM_NATIVE)) && (defined(HAVE_ADJUSTABLE_CPU_FREQ)) && (!( defined(CPU_BOOST_LOGGING) )) 504 500 \param on_off 505 - \description 501 + \description Boosts the CPU if =on_off= is true, otherwise it unboosts the CPU 506 502 507 503 void cpu_boost_(bool on_off,char*location,int line) 508 504 \group kernel/ system ··· 515 511 long *cpu_frequency 516 512 \group kernel/ system 517 513 \conditions ((CONFIG_PLATFORM & PLATFORM_NATIVE)) 518 - \return 514 + \return the current cpu frequency 519 515 \description 520 516 521 517 uint32_t crc_32(const void *src, uint32_t len, uint32_t crc32) ··· 534 530 \return 535 531 \description 536 532 537 - int creat(const char *path, mode_t mode) 538 - \group file 539 - \param path 540 - \param mode 541 - \return 542 - \description 543 - 544 533 char *create_numbered_filename(char *buffer, const char *path, const char *prefix, const char *suffix, int numberlen IF_CNFN_NUM_(, int *num)) 545 534 \group file 546 535 \param buffer ··· 561 550 \param priority 562 551 \param core 563 552 \param name 564 - \return 565 - \description 553 + \description Creates a thread 554 + \return its ID if context area could be allocated, else return -1 566 555 567 556 int create_xing_header(int fd, long startpos, long filesize, unsigned char *buf, unsigned long num_frames, unsigned long rec_time, unsigned long header_template, void (*progressfunc)(int), bool generate_toc, unsigned char* tempbuf, size_t tempbuf_len) 568 557 \group metadata ··· 589 578 \group misc 590 579 \conditions (defined(DEBUG) || defined(SIMULATOR)) 591 580 \param fmt 592 - \description 581 + \description Prints =fmt= in a printf-like fashion to STDERR 593 582 594 583 long default_event_handler(long event) 595 584 \group kernel/ system 596 585 \param event 597 - \return 586 + \return SYS_USB_CONNECTED and call usb_screen() if =event= equals to SYS_USB_CONNECTED, else do nothing and return 0 598 587 \description 599 588 600 589 long default_event_handler_ex(long event, void (*callback)(void *), void *parameter) ··· 709 698 \group file 710 699 \param fildes 711 700 \param fmt 712 - \return 713 - \description 714 - 715 - off_t filesize(int fildes) 716 - \group file 717 - \param fildes 718 - \return 719 - \description 701 + \return number of characters writen to =fd= or a negative value upon error 702 + \description Write a formated string in the =fd= 720 703 721 704 int filetype_get_attr(const char* file) 722 705 \param file ··· 752 735 753 736 struct font* font_get(int font) 754 737 \param font 755 - \return 756 - \description 738 + \return the font structure for =font= 739 + \description If the requested font isn't loaded/compiled-in, decrement the font number and try again. 740 + \see [S[firmware/export/font.h]] 757 741 758 742 int font_getstringsize(const unsigned char *str, int *w, int *h, int fontnumber) 759 743 \param str ··· 771 755 772 756 int font_load(const char *path) 773 757 \param path 774 - \return 775 - \description 758 + \description Load font =path= 759 + \return returns ID or -1 if failed 760 + \see [S[firmware/export/font.h]] 776 761 777 762 void font_unload(int font_id) 778 763 \param font_id ··· 842 827 843 828 struct tm* get_time(void) 844 829 \group misc 845 - \return 830 + \return current time 846 831 \description 832 + \see [S[firmware/include/time.h]] 847 833 848 834 struct user_settings* global_settings 849 - \return 835 + \group misc 836 + \return the global_settings struct 850 837 \description 838 + \see [S[apps/settings.h]] 851 839 852 840 struct system_status *global_status 853 - \return 841 + \group misc 842 + \return the global_status struct 854 843 \description 844 + \see [S[apps/settings.h]] 855 845 856 846 struct tm * gmtime_r(const time_t *timep, struct tm *tm) 857 847 \group misc ··· 986 976 \group misc 987 977 \param buffer 988 978 \param buflen 989 - \param kbd 990 - \return 991 - \description 979 + \param *kbd 980 + \return 0 upon success, negative upon failure 981 + \description Prompt for a string to be stored in =buffer= which is of length =buflen= 992 982 993 983 void keyclick_click(bool rawbutton, int action) 994 984 \param rawbutton ··· 1008 998 \param y 1009 999 \param width 1010 1000 \param height 1011 - \description 1001 + \description Put a bitmap at given XY coordinates. Element src[i] is the binary representation of column number i of the bitmap read from bottom to top. 1012 1002 1013 1003 void lcd_bitmap_part(const fb_data *src, int src_x, int src_y, int stride, int x, int y, int width, int height) 1014 1004 \group lcd ··· 1107 1097 1108 1098 void lcd_clear_display(void) 1109 1099 \group lcd 1110 - \description 1100 + \description Clears the LCD and the framebuffer 1111 1101 1112 1102 void lcd_drawline(int x1, int y1, int x2, int y2) 1113 1103 \group lcd 1114 - \param x1 1115 - \param y1 1116 - \param x2 1117 - \param y2 1118 - \description 1104 + \param x1 X top coordinate 1105 + \param y1 Y top coordinate 1106 + \param x2 X bottom coordinate 1107 + \param y2 Y bottom coordinate 1108 + \description Draws a line at (=x1=, =y1=) -> (=x2=, =y2=) within current drawing mode 1119 1109 1120 1110 void lcd_drawpixel(int x, int y) 1121 1111 \group lcd 1122 1112 \param x 1123 1113 \param y 1124 - \description 1114 + \description Draws a pixel at (=x=, =y=) within current drawing mode 1125 1115 1126 1116 void lcd_drawrect(int x, int y, int width, int height) 1127 1117 \group lcd ··· 1129 1119 \param y 1130 1120 \param width 1131 1121 \param height 1132 - \description 1122 + \description Draws a rectangle at (=x=, =y=) -> (=x= + =width=, =y= + =height=) within current drawing mode 1133 1123 1134 1124 void lcd_fillrect(int x, int y, int width, int height) 1135 1125 \group lcd ··· 1137 1127 \param y 1138 1128 \param width 1139 1129 \param height 1140 - \description 1130 + \description Draws a filled rectangle at (=x=, =y=) -> (=x= + =width=, =y= + =height=) within current drawing mode 1141 1131 1142 1132 int lcd_getstringsize(const unsigned char *str, int *w, int *h) 1143 1133 \group lcd 1144 - \param str 1145 - \param w 1146 - \param h 1147 - \return 1148 - \description 1134 + \param str String 1135 + \param w Width 1136 + \param h Height 1137 + \return Success or not 1138 + \description Stores the width and height of the string in =w= and =h= 1149 1139 1150 1140 fb_data* lcd_get_backdrop(void) 1151 1141 \group lcd 1152 1142 \conditions (LCD_DEPTH > 1) 1153 - \return 1154 - \description 1143 + \return Pointer to framebuffer data 1144 + \description Gets the current backdrop 1145 + \see lcd_framebuffer 1155 1146 1156 1147 unsigned lcd_get_background(void) 1157 1148 \group lcd ··· 1161 1152 1162 1153 int lcd_get_drawmode(void) 1163 1154 \group lcd 1164 - \return 1155 + \return current LCD drawing mode 1165 1156 \description 1166 1157 1167 1158 unsigned lcd_get_foreground(void) ··· 1172 1163 1173 1164 void lcd_hline(int x1, int x2, int y) 1174 1165 \group lcd 1175 - \param x1 1176 - \param x2 1177 - \param y 1178 - \description 1166 + \param x1 X start coordinate 1167 + \param x2 X end coordinate 1168 + \param y Y coordinate 1169 + \description Draws a horizontal line at (=x1=, =y=) -> (=x2=, =y=) within current drawing mode 1179 1170 1180 1171 void lcd_mono_bitmap(const unsigned char *src, int x, int y, int width, int height) 1181 1172 \group lcd ··· 1206 1197 1207 1198 void lcd_puts(int x, int y, const unsigned char *string) 1208 1199 \group lcd 1209 - \param x 1210 - \param y 1200 + \param x Row X 1201 + \param y Column Y 1211 1202 \param string 1212 - \description 1203 + \description Puts string on the LCD at row =x= and column =y= 1213 1204 1214 1205 void lcd_putsf(int x, int y, const unsigned char *fmt, ...) 1215 1206 \group lcd ··· 1220 1211 1221 1212 void lcd_putsxy(int x, int y, const unsigned char *string) 1222 1213 \group lcd 1223 - \param x 1224 - \param y 1214 + \param x X coordinate 1215 + \param y Y coordinate 1225 1216 \param string 1226 - \description 1217 + \description Puts string on the LCD at position (=x=, =y=) 1227 1218 1228 1219 void lcd_putsxyf(int x, int y, const unsigned char *fmt, ...) 1229 1220 \group lcd ··· 1234 1225 1235 1226 bool lcd_puts_scroll(int x, int y, const unsigned char* string) 1236 1227 \group lcd 1237 - \param x 1238 - \param y 1228 + \param x Row X 1229 + \param y Column Y 1239 1230 \param string 1240 1231 \return 1241 - \description 1232 + \description Puts scrolling string on the LCD at row =x= and column =y=. The scrolling style is STYLE_DEFAULT. 1242 1233 1243 1234 void lcd_remote_bitmap(const fb_remote_data *src, int x, int y, int width, int height) 1244 1235 \group remote lcd ··· 1271 1262 void lcd_remote_drawline(int x1, int y1, int x2, int y2) 1272 1263 \group remote lcd 1273 1264 \conditions (defined(HAVE_REMOTE_LCD)) 1274 - \param x1 1275 - \param y1 1276 - \param x2 1277 - \param y2 1278 - \description 1265 + \param x1 X top coordinate 1266 + \param y1 Y top coordinate 1267 + \param x2 X bottom coordinate 1268 + \param y2 Y bottom coordinate 1269 + \description Draws a line at (=x1=, =y1=) -> (=x2=, =y2=) within current drawing mode 1279 1270 1280 1271 void lcd_remote_drawpixel(int x, int y) 1281 1272 \group remote lcd 1282 1273 \conditions (defined(HAVE_REMOTE_LCD)) 1283 1274 \param x 1284 1275 \param y 1285 - \description 1276 + \description Draws a pixel at (=x=, =y=) within current drawing mode 1286 1277 1287 1278 void lcd_remote_drawrect(int x, int y, int nx, int ny) 1288 1279 \group remote lcd ··· 1305 1296 int lcd_remote_getstringsize(const unsigned char *str, int *w, int *h) 1306 1297 \group remote lcd 1307 1298 \conditions (defined(HAVE_REMOTE_LCD)) 1308 - \param str 1309 - \param w 1310 - \param h 1311 - \return 1312 - \description 1299 + \param str String 1300 + \param w Width 1301 + \param h Height 1302 + \return Success or not 1303 + \description Stores the width and height of the string in =w= and =h= 1313 1304 1314 1305 unsigned lcd_remote_get_background(void) 1315 1306 \group remote lcd ··· 1394 1385 \group remote lcd 1395 1386 \conditions (defined(HAVE_REMOTE_LCD)) 1396 1387 \param font 1397 - \description 1388 + \description Set default font 1398 1389 1399 1390 void lcd_remote_set_background(unsigned background) 1400 1391 \group remote lcd ··· 1449 1440 void lcd_setfont(int font) 1450 1441 \group lcd 1451 1442 \param font 1452 - \description 1443 + \description Set default font 1453 1444 1454 1445 void lcd_set_backdrop(fb_data* backdrop) 1455 1446 \group lcd 1456 1447 \conditions (LCD_DEPTH > 1) 1457 - \param backdrop 1458 - \description 1448 + \param backdrop Pointer to backdrop image 1449 + \description Set the backdrop to =backdrop= 1450 + \see lcd_framebuffer 1459 1451 1460 1452 void lcd_set_background(unsigned foreground) 1461 1453 \group lcd ··· 1466 1458 void lcd_set_contrast(int x) 1467 1459 \group lcd 1468 1460 \conditions (defined(HAVE_LCD_CONTRAST)) 1469 - \param x 1470 - \description 1461 + \param x Should be between =MIN_CONTRAST_SETTING= and =MAX_CONTRAST_SETTING= 1462 + \description Sets LCD contrast to value =x= 1471 1463 1472 1464 void lcd_set_drawmode(int mode) 1473 1465 \group lcd ··· 1500 1492 1501 1493 void lcd_update(void) 1502 1494 \group lcd 1503 - \description 1495 + \description Pushes LCD framebuffer changes to the LCD 1504 1496 1505 1497 void lcd_update_rect(int x, int y, int width, int height) 1506 1498 \group lcd 1507 - \param x 1508 - \param y 1509 - \param width 1510 - \param height 1511 - \description 1499 + \param x measured in pixels 1500 + \param y measured in pixels 1501 + \param width measured in pixels 1502 + \param height measured in pixels 1503 + \description Pushes LCD framebuffer changes to the LCD within rectangle (=x=, =y=) -> (=x= + =width=, =y= + =height=). Notice that the smallest vertical resolution in updates that the hardware supports is 8 pixels. 1512 1504 1513 1505 void lcd_vline(int x, int y1, int y2) 1514 1506 \group lcd 1515 - \param x 1516 - \param y1 1517 - \param y2 1518 - \description 1507 + \param x X coordinate 1508 + \param y1 Y start coordinate 1509 + \param y2 Y end coordinate 1510 + \description Draws a vertical line at (=x=, =y1=) -> (=x=, =y2=) within current drawing mode 1519 1511 1520 1512 void lcd_yuv_set_options(unsigned options) 1521 1513 \group lcd ··· 1576 1568 \return 1577 1569 \description 1578 1570 1579 - off_t lseek(int fildes, off_t offset, int whence) 1580 - \group file 1581 - \param fildes 1582 - \param offset 1583 - \param whence 1584 - \return 1585 - \description 1586 - 1587 1571 void *memchr(const void *s1, int c, size_t n) 1588 1572 \group strings and memory 1589 1573 \param s1 ··· 1606 1590 \param in 1607 1591 \param n 1608 1592 \return 1609 - \description 1593 + \description Copies =n= bytes of data in memory from =in= to =out= 1610 1594 1611 1595 void* memmove(void *out, const void *in, size_t n) 1612 1596 \group strings and memory ··· 1622 1606 \param c 1623 1607 \param length 1624 1608 \return 1625 - \description 1609 + \description Fills a memory region with specified byte value =c= 1626 1610 1627 1611 void mixer_channel_calculate_peaks(enum pcm_mixer_channel channel, struct pcm_peaks *peaks) 1628 1612 \param channel ··· 1729 1713 DIR * opendir(const char *dirname) 1730 1714 \group dir 1731 1715 \param dirname 1732 - \return 1733 - \description 1716 + \return a pointer to the directory stream 1717 + \description The opendir() function opens a directory stream corresponding to the directory name. The stream is positioned at the first entry in the directory. 1734 1718 1735 1719 int open_utf8(const char* pathname, int flags) 1736 1720 \group file ··· 1800 1784 1801 1785 bool pcm_is_playing(void) 1802 1786 \group sound 1803 - \return 1787 + \return true unless playback is paused 1804 1788 \description 1805 1789 1806 1790 void pcm_play_data(pcm_play_callback_type get_more, pcm_status_callback_type status_cb, const void *start, size_t size) 1807 1791 \group sound 1808 - \param get_more 1809 - \param status_cb 1810 - \param start 1811 - \param size 1792 + \param get_more Optional callback 1793 + \param status_cb Optional status callback 1794 + \param start is the address of raw 16-16, interleaved PCM data 1795 + \param size is the size of the data to play 1812 1796 \description 1813 1797 1814 1798 void pcm_play_lock(void) ··· 1817 1801 1818 1802 void pcm_play_stop(void) 1819 1803 \group sound 1820 - \description 1804 + \description Stops the playback and empties the audio buffer. 1821 1805 1822 1806 void pcm_play_unlock(void) 1823 1807 \group sound ··· 1844 1828 1845 1829 int playlist_amount(void) 1846 1830 \group playback control 1847 - \return 1831 + \return the number of tracks in current playlist 1848 1832 \description 1849 1833 1850 1834 int playlist_create(const char *dir, const char *file) ··· 1864 1848 1865 1849 struct playlist_info* playlist_get_current(void) 1866 1850 \group playback control 1867 - \return 1851 + \return pointer to current playlist 1868 1852 \description 1869 1853 1870 1854 int playlist_get_display_index(void) ··· 1969 1953 \group plugin 1970 1954 \param buffer_size 1971 1955 \return 1972 - \description 1956 + \description Steals =buffer_size= bytes from the available RAM, reducing the available buffer for audio buffering 1973 1957 1974 1958 void* plugin_get_buffer(size_t *buffer_size) 1975 1959 \group plugin 1976 - \param buffer_size 1977 - \return 1960 + \param buffer_size this is the memory size left in plugin buffer upon return 1961 + \return a pointer to the portion of the plugin buffer that is not already being used. If no plugin is loaded, returns the entire plugin buffer. 1978 1962 \description 1979 1963 1980 1964 char* plugin_get_current_filename(void) ··· 2004 1988 \param exit_callback 2005 1989 \description 2006 1990 1991 + int close(int filedes) 1992 + \group file 1993 + \param fiedes 1994 + \return 0 upon success 1995 + \description The close() function will deallocate the file descriptor indicated by =fd=. To deallocate means to make the file descriptor available for return by subsequent calls to open() or other functions that allocate file descriptors. 1996 + 1997 + int creat(const char *pathname, mode_t mode) 1998 + \group file 1999 + \param pathname 2000 + \param mode 2001 + \return the file descriptor associated to this file 2002 + \description Create a file with mode O_RDONLY, O_WRONLY or O_RDWR 2003 + 2004 + off_t filesize(int filedes) 2005 + \group file 2006 + \param filedes 2007 + \return size of a file; upon error, returns -1 2008 + \description 2009 + 2010 + int ftruncate(int fildes, off_t length) 2011 + \group file 2012 + \param fildes 2013 + \param length 2014 + \return 2015 + \description Truncate file to the specified =length= 2016 + 2017 + off_t lseek(int fildes, off_t offset, int whence) 2018 + \group file 2019 + \param fildes 2020 + \param offset 2021 + \param whence 2022 + \return 2023 + \description The lseek() function sets the file pointer associated with the open file descriptor specified by =fd= as follows: If =whence= is SEEK_SET, the pointer is set to =offset= bytes. If =whence= is SEEK_CUR, the pointer is set to its current location plus =offset=. If =whence= is SEEK_END, the pointer is set to the size of the file plus =offset=. 2024 + 2025 + int open(const char *path, int oflag, ...) 2026 + \group file 2027 + \param path 2028 + \param oflag 2029 + \return 2030 + \description The open() function establishes the connection between a file and a file descriptor. It creates an open file description that refers to a file and a file descriptor that refers to that open file description. The file descriptor is used by other I/O functions to refer to that file. 2031 + 2032 + ssize_t read(int fildes, void *buf, size_t nbyte) 2033 + \group file 2034 + \param fildes 2035 + \param buf 2036 + \param nbyte 2037 + \return 2038 + \description The read() function attempts to read =count= bytes from the file associated with the open file descriptor, =fd=, into the buffer pointed to by =buf= 2039 + 2040 + int remove(const char *path) 2041 + \group file 2042 + \param path 2043 + \return 2044 + \description remove() deletes a name from the filesystem. It calls unlink for files, and rmdir for directories. 2045 + 2046 + 2047 + int rename(const char *old, const char *new) 2048 + \group file 2049 + \param old points to the pathname of the file to be renamed 2050 + \param new points to the new pathname of the file 2051 + \return 2052 + \description The rename() function changes the name of a file 2053 + 2054 + unsigned sleep(unsigned ticks) 2055 + \group kernel/ system 2056 + \param ticks 2057 + \return 2058 + \description Sleep a specified number of =ticks=, we have HZ ticks per second 2059 + 2060 + ssize_t write(int fildes, const void *buf, size_t nbyte) 2061 + \group file 2062 + \param fildes 2063 + \param buf 2064 + \param nbyte 2065 + \return 2066 + \description Write writes up to =count= bytes to the file referenced by the file descriptor =fd= from the buffer starting at =buf= 2067 + 2007 2068 void profile_func_enter(void *this_fn, void *call_site) 2008 2069 \conditions (defined(RB_PROFILE)) 2009 2070 \param this_fn ··· 2026 2087 2027 2088 void qsort(void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *)) 2028 2089 \group misc 2029 - \param base 2030 - \param nmemb 2031 - \param size 2090 + \param base start of array 2091 + \param nmemb number of elements 2092 + \param size describes the size of each element of the array 2032 2093 \param compar 2033 - \description 2094 + \description qsort sorts an array (begining at =base=) of =nmemb= objects 2034 2095 2035 2096 void queue_delete(struct event_queue *q) 2036 2097 \param q ··· 2088 2149 2089 2150 int rand(void) 2090 2151 \group misc 2091 - \return 2152 + \return a pseudo random number between 0 and 0x7fffffff 2092 2153 \description 2093 2154 2094 2155 const char *rbversion 2095 - \return 2096 - \description 2097 - 2098 - ssize_t read(int fildes, void *buf, size_t nbyte) 2099 - \group file 2100 - \param fildes 2101 - \param buf 2102 - \param nbyte 2103 - \return 2156 + \return version of the plugin API 2104 2157 \description 2105 2158 2106 2159 struct dirent * readdir(DIR *dirp) 2107 2160 \group dir 2108 2161 \param dirp 2109 - \return 2162 + \return a pointer to a dirent structure representing the next directory entry in the directory stream pointed to by =dir= or NULL on reaching the end-of-file or if an error occurred 2110 2163 \description 2111 2164 2112 2165 int read_bmp_fd(int fd, struct bitmap *bm, int maxsize, int format, const struct custom_format *cformat) ··· 2152 2205 \param fd 2153 2206 \param buffer 2154 2207 \param buffer_size 2155 - \return 2156 - \description 2208 + \return number of bytes read (which may be larger than the number of bytes stored in buffer) or upon error -1 (and buffer contains whatever could be read) 2209 + \description Read (up to) a line of text from =fd= into =buffer=. A line is terminated by a LF char. Neither LF nor CR chars are stored in buffer. 2157 2210 2158 2211 void register_storage_idle_func(void (*function)(void)) 2159 2212 \group file ··· 2167 2220 2168 2221 void remote_backlight_off(void) 2169 2222 \conditions (defined(HAVE_BACKLIGHT)) && (defined(HAVE_REMOTE_LCD)) 2170 - \description 2223 + \description Turns the remote backlight off 2171 2224 2172 2225 void remote_backlight_on(void) 2173 2226 \conditions (defined(HAVE_BACKLIGHT)) && (defined(HAVE_REMOTE_LCD)) 2174 - \description 2227 + \description Turns the remote backlight on 2175 2228 2176 2229 void remote_backlight_set_timeout(int index) 2177 2230 \conditions (defined(HAVE_BACKLIGHT)) && (defined(HAVE_REMOTE_LCD)) ··· 2183 2236 \param index 2184 2237 \description 2185 2238 2186 - int remove(const char *path) 2187 - \group file 2188 - \param path 2189 - \return 2190 - \description 2191 - 2192 2239 int remove_array_ptr(void **arr, void *ptr) 2193 2240 \group misc 2194 2241 \param arr ··· 2202 2249 \param handler 2203 2250 \description 2204 2251 2205 - int rename(const char *old, const char *new) 2206 - \group file 2207 - \param old 2208 - \param new 2209 - \return 2210 - \description 2211 - 2212 2252 void reset_poweroff_timer(void) 2213 2253 \group kernel/ system 2214 - \description 2254 + \description The function name pretty much says what it's supposed to do 2215 2255 2216 2256 int rmdir(const char *path) 2217 2257 \group dir ··· 2281 2321 \conditions (defined(HAVE_ALBUMART)) 2282 2322 \param id3 2283 2323 \param size_string 2284 - \param buf 2285 - \param buflen 2286 - \return 2287 - \description 2324 + \param buf Pointer to output 2325 + \param buflen Max length for =buf= 2326 + \return true if an album art was found 2327 + \description Searches the the album art file for the given =id3= struct, appending the =size_string= to the search pattern (cover.bmp). It writes the complete path into =buf=, but not more bytes than =buflen=. 2288 2328 2289 2329 void semaphore_init(struct semaphore *s, int max, int start) 2290 2330 \group kernel/ system ··· 2317 2357 const struct settings_list* find_setting(const void* variable) 2318 2358 \group options 2319 2359 \param variable 2360 + \param id 2320 2361 \return 2321 2362 \description 2322 2363 ··· 2331 2372 \param line 2332 2373 \param name 2333 2374 \param value 2334 - \return 2335 - \description 2375 + \return false if no valid config entry was found 2376 + \description Parse a line from a configuration file. The line format is: 'name: value'. Any whitespace before setting name or value (after ':') is ignored. A # as first non-whitespace character discards the whole line. Function sets pointers to null-terminated setting name and value. 2336 2377 2337 2378 int settings_save(void) 2338 2379 \group options ··· 2454 2495 \param buf 2455 2496 \param size 2456 2497 \param fmt 2457 - \return 2458 - \description 2498 + \return the number of characters printed or that would have been printed if the output was truncated (not including the trailing NULL character) upon success 2499 + \description Write a formatted string =fmt= in buffer =buf= of size =size= (including the trailing NULL character). These support %c, %s, %d and %x only with the width and zero padding flag only. 2459 2500 2460 2501 int sound_current(int setting); /*stub* 2461 2502 \group sound ··· 2524 2565 \group lcd 2525 2566 \param ticks 2526 2567 \param str 2527 - \description 2568 + \description Display a formatted string in a box for =ticks= time. The string is formatted as with the printf function. (there are =HZ= ticks per second) 2528 2569 2529 2570 void splashf(int ticks, const char *fmt, ...) ATTRIBUTE_PRINTF(2, 3) 2530 2571 \group lcd ··· 2547 2588 void srand(unsigned int seed) 2548 2589 \group misc 2549 2590 \param seed 2550 - \description 2591 + \description Seed the random number generator 2551 2592 2552 2593 void storage_sleep(void) 2553 2594 \group file ··· 2564 2605 2565 2606 int strcasecmp(const char *, const char *) 2566 2607 \group strings and memory 2567 - \param 2568 - \param 2569 - \return 2570 - \description 2608 + \param 2609 + \param 2610 + \return an integer less than, equal to, or greater than zero if s1 is found, respectively, to be less than, to match, or be greater than s2 2611 + \description The strcasecmp() function compares the two strings s1 and s2, ignoring the case of the characters 2571 2612 2572 2613 char *strcat(char *s1, const char *s2) 2573 2614 \group strings and memory 2574 2615 \param s1 2575 2616 \param s2 2576 - \return 2577 - \description 2617 + \return =s1= concatenated with =s2= 2618 + \description Appends =s2= to =s1=, replacing the NULL terminating character of =s1= and returns it 2578 2619 2579 2620 char *strchr(const char *s, int c) 2580 2621 \group strings and memory ··· 2585 2626 2586 2627 int strcmp(const char *, const char *) 2587 2628 \group strings and memory 2588 - \param 2589 - \param 2629 + \param 2630 + \param 2590 2631 \return 2591 - \description 2632 + \description strcmp() compares the string a to string b. If a sorts lexicographically after b, strcmp returns a number greater than zero. If the two strings match, strcmp returns zero. If a sorts lexicographically before b, strcmp returns a number less than zero. 2592 2633 2593 2634 char* strcpy(char *dst, const char *src) 2594 2635 \group strings and memory 2595 2636 \param dst 2596 2637 \param src 2597 - \return 2598 - \description 2638 + \return the initial value of =dst= 2639 + \description strcpy() copies the string pointed to by =src= (including the terminating null character) to the array pointed to by =dst= 2599 2640 2600 2641 char* strip_extension(char* buffer, int buffer_size, const char *filename) 2601 2642 \group file ··· 2624 2665 size_t strlen(const char *str) 2625 2666 \group strings and memory 2626 2667 \param str 2627 - \return 2628 - \description 2668 + \return the character count 2669 + \description The strlen() function works out the length of the string starting at =str= by counting characters until it reaches a null character. 2629 2670 2630 2671 int strncasecmp(const char *s1, const char *s2, size_t n) 2631 2672 \group strings and memory ··· 2633 2674 \param s2 2634 2675 \param n 2635 2676 \return 2636 - \description 2677 + \description Like strcasecmp() but only on the first =n= characters 2678 + \see strcasecmp 2637 2679 2638 2680 int strncmp(const char *, const char *, size_t) 2639 2681 \group strings and memory 2640 - \param 2641 - \param 2682 + \param 2683 + \param 2642 2684 \param size_t 2643 2685 \return 2644 2686 \description ··· 2647 2689 \group strings and memory 2648 2690 \param s 2649 2691 \param c 2650 - \return 2651 - \description 2692 + \return a pointer to the located character, or a null pointer if =c= does not occur in string. 2693 + \description This function finds the last occurence of =c= (converted to a char) in the string pointed to by string (including the terminating null character) 2652 2694 2653 2695 char* strtok_r(char *ptr, const char *sep, char **end) 2654 2696 \group strings and memory ··· 2896 2938 \param thread_id 2897 2939 \description 2898 2940 2899 - unsigned sleep(unsigned ticks) 2900 - \group kernel/ system 2901 - \param ticks 2902 - \return 2903 - \description 2904 - 2905 2941 bool timer_register(int reg_prio, void (*unregister_callback)(void), long cycles, void (*timer_callback)(void) IF_COP(, int core)) 2906 2942 \param reg_prio 2907 2943 \param unregister_callback ··· 2952 2988 void trigger_cpu_boost(void) 2953 2989 \group kernel/ system 2954 2990 \conditions (defined(HAVE_SCHEDULER_BOOSTCTRL)) 2955 - \description 2991 + \description Boosts the CPU for the current thread 2956 2992 2957 2993 void unregister_storage_idle_func(void (*function)(void), bool run) 2958 2994 \group file ··· 3090 3126 3091 3127 void yield(void) 3092 3128 \group kernel/ system 3093 - \description 3129 + \description Let another thread run. This should be used as soon as you have to "wait" for something or similar, and also if you do anything that takes "a long time". This function is the entire foundation that our "cooperative multitasking" is based on. Use it! 3130 + \see [W[RockboxKernel]] 3094 3131 3095 3132 void __div0(void) 3096 3133 \group kernel/ system
+2 -2
utils/rockbox_api/functions.php
··· 1 1 <?php 2 - $svn = "http://svn.rockbox.org/viewvc.cgi/trunk/"; 3 - $wiki = "http://www.rockbox.org/wiki/"; 2 + $svn = "https://git.rockbox.org/cgit/rockbox.git/"; 3 + $wiki = "https://www.rockbox.org/wiki/"; 4 4 5 5 function func_sort($a, $b) 6 6 {
+1 -1
utils/rockbox_api/generate.php
··· 13 13 # \/ \/ \/ \/ \/ 14 14 # \$Id$ 15 15 # 16 - # Generated from $svn\x61pps/plugin.h 16 + # Generated from $svn\x61apps/plugin.h 17 17 # 18 18 # Format: 19 19 # \\group memory and strings
+20 -17
utils/rockbox_api/update.php
··· 21 21 { 22 22 unset($new[$name]); 23 23 $name = clean_func($el["func"]); 24 - 24 + 25 25 $new[$name] = array( 26 26 "group" => array($el["group"]), 27 27 "description" => array("") 28 28 ); 29 - 30 - if(strlen($el["cond"]) > 2) 29 + 30 + if(strlen($el["cond"]) > 2) { 31 31 $new[$name]["conditions"][0] = $el["cond"]; 32 - 32 + } else { 33 + $new[$name]["conditions"][0] = ""; 34 + } 35 + 33 36 $args = get_args($el["func"]); 34 37 if(count($args) > 0) 35 38 { ··· 40 43 } 41 44 $new[$name]["param"] = $args; 42 45 } 43 - 46 + 44 47 if(get_return($el["func"]) !== false) 45 48 $new[$name]["return"][0] = ""; 46 49 } ··· 53 56 { 54 57 $merged[$name] = $input[$name]; 55 58 $merged[$name]["conditions"] = $new[$name]["conditions"]; 56 - 59 + 57 60 if(strlen($el["group"][0]) > 0) 58 61 $merged[$name]["group"] = $el["group"]; 59 - 62 + 60 63 if(isset($el["param"])) 61 64 { 62 65 foreach($el["param"] as $nr => $parel) ··· 65 68 { 66 69 $param = trim($parel); 67 70 $p1 = substr($param, 0, strpos($param, " ")); 68 - 71 + 69 72 $param = trim($input[$name]["param"][$nr]); 70 73 $p2 = substr($param, strpos($param, " ")); 71 74 $merged[$name]["params"][] = $p1." ".$p2." [AUTO-ADDED]"; ··· 74 77 $merged[$name]["params"][] = $parel; 75 78 } 76 79 } 77 - 80 + 78 81 if(!isset($el["return"]) && isset($merged[$name]["return"])) 79 82 unset($merged[$name]["return"]); 80 - 83 + 81 84 unset($input[$name]); 82 85 } 83 86 else ··· 101 104 # \/ \/ \/ \/ \/ 102 105 # \$Id$ 103 106 # 104 - # Generated from $svn\x61pps/plugin.h 107 + # Generated from $svn\x61apps/plugin.h 105 108 # 106 109 # Format: 107 110 # \\group memory and strings ··· 125 128 { 126 129 echo "\n".clean_func($func)."\n"; 127 130 128 - if(strlen($line["group"]) > 0) 131 + if(strlen($line["group"][0]) > 0) 129 132 echo " \\group ".trim($line["group"][0])."\n"; 130 133 131 - if(strlen($line["conditions"]) > 2) 134 + if(strlen($line["conditions"][0]) > 2) 132 135 echo " \\conditions ".trim(_simplify($line["conditions"][0]))."\n"; 133 136 134 137 if(isset($line["param"])) ··· 142 145 143 146 if(isset($line["return"])) 144 147 { 145 - if(trim($line["return"]) == "") 148 + if(trim($line["return"][0]) == "") 146 149 echo " \\return\n"; 147 150 else 148 151 echo " \\return ".trim($line["return"][0])."\n"; 149 152 } 150 - 151 - if(trim($line["description"]) == "") 153 + 154 + if(trim($line["description"][0]) == "") 152 155 echo " \\description\n"; 153 156 else 154 157 echo " \\description ".trim($line["description"][0])."\n"; 155 - 158 + 156 159 if(isset($line["see"])) 157 160 echo " \\see ".trim($line["see"][0])."\n"; 158 161 }