Skip to content

Commit

Permalink
Document Browser
Browse files Browse the repository at this point in the history
  • Loading branch information
dogo committed Aug 31, 2024
1 parent 3f8641d commit b580347
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 31 deletions.
7 changes: 2 additions & 5 deletions src/audio.h
Original file line number Diff line number Diff line change
Expand Up @@ -470,23 +470,20 @@ extern void oslAudioVSync();
#define oslSetSoundLoop(s, loop) oslSetSoundEndCallback(s, (loop) ? oslSoundLoopFunc : NULL)

/**
* @enum OSL_FMT_GENERAL
* General audio format flags for basic settings and operations within OSLib.
*/
enum {
OSL_FMT_NONE = 0 //!< Indicates no special format settings are applied. Used as a default or placeholder value.
};

/**
* @enum OSL_FMT_GENERAL
* General audio format flags for basic settings and operations within OSLib.
* Mask flags used to isolate or filter out specific bits from format flags, typically used in bitwise operations.
*/
enum {
OSL_FMT_MASK = 0xff //!< Mask used to isolate or filter out specific bits from format flags, typically used in bitwise operations.
};

/**
* @enum OSL_FMT_AUDIO_CONFIG
* Defines the audio output configuration and streaming capabilities for playback in OSLib.
* These flags are used to set the properties of audio channels and to control how audio data is processed and delivered.
*/
Expand All @@ -497,7 +494,6 @@ enum {
};

/**
* @enum OSL_FMT_SAMPLE_RATE
* Sample rate options for audio playback.
*/
enum {
Expand Down Expand Up @@ -613,6 +609,7 @@ extern OSL_AUDIO_VOICE osl_audioVoices[OSL_NUM_AUDIO_CHANNELS];
* @param voice The channel number on which the sound was playing.
* @return Always returns 1 to indicate that the sound should continue playing.
*/
extern int oslSoundLoopFunc(OSL_SOUND *s, int voice);

/** @} */ // end of audio_adv

Expand Down
2 changes: 1 addition & 1 deletion src/bgm.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @file osl_bgm.h
* @file bgm.h
* @brief Defines the BGM_FORMAT_HEADER structure for BGM file format in OSLib.
*/

Expand Down
74 changes: 49 additions & 25 deletions src/browser.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,44 +6,68 @@ extern "C" {
#endif

/** @defgroup Browser Browser
Functions to display Sony's internet browser
@{
@brief Functions to display Sony's internet browser.
@{
*/

/**Memory error initializing the browser*/
#define OSL_BROWSER_ERROR_MEMORY -1
/**Error initializing the browser*/
#define OSL_BROWSER_ERROR_INIT -2

/** Initializes the internet browser.
\param url
The url to open
\param downloadDir
The default download directory
\param browserMemory
The amount of memory to allocate for the browser
\param displaymode
One of pspUtilityHtmlViewerDisplayModes
\param options
One of pspUtilityHtmlViewerOptions
\param interfacemode
One of pspUtilityHtmlViewerInterfaceModes
\param connectmode
One of pspUtilityHtmlViewerConnectModes
/** @brief Memory error initializing the browser.
*/
#define OSL_BROWSER_ERROR_MEMORY -1

*/
/** @brief Error initializing the browser.
*/
#define OSL_BROWSER_ERROR_INIT -2

/**
* @brief Initializes the internet browser.
*
* This function initializes Sony's internet browser with the specified URL and options.
*
* @param url The URL to open.
* @param downloadDir The default download directory.
* @param browserMemory The amount of memory to allocate for the browser.
* @param displaymode One of the `pspUtilityHtmlViewerDisplayModes`.
* @param options One of the `pspUtilityHtmlViewerOptions`.
* @param interfacemode One of the `pspUtilityHtmlViewerInterfaceModes`.
* @param connectmode One of the `pspUtilityHtmlViewerConnectModes`.
*
* @return Returns 0 on success, or a negative error code on failure.
*/
int oslBrowserInit(char *url, char *downloadDir, int browserMemory, unsigned int displaymode, unsigned int options, unsigned int interfacemode, unsigned int connectmode);

/**
* @brief Renders the browser display.
*
* This function handles the drawing/rendering of the browser's display.
*/
void oslDrawBrowser();

/**
* @brief Gets the current status of the browser.
*
* This function returns the current status of the browser, which can be used to determine
* if the browser is still active or if there are any errors.
*
* @return The current status of the browser.
*/
int oslGetBrowserStatus();

/**
* @brief Ends the browser session.
*
* This function closes the internet browser and frees any resources allocated during initialization.
*/
void oslEndBrowser();

/**
* @brief Checks if the browser is active.
*
* This function checks whether the browser is currently active.
*
* @return Returns 1 if the browser is active, 0 otherwise.
*/
int oslBrowserIsActive();


/** @} */ // end of Browser

#ifdef __cplusplus
Expand Down

0 comments on commit b580347

Please sign in to comment.