mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-08-03 10:55:57 -04:00
Move whole descriptions into documentation headers
This commit is contained in:
parent
c74a6332f7
commit
fae12fdb7c
@ -35,7 +35,9 @@ class AudioSpec;
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Audio device
|
||||
///
|
||||
/// \ingroup audio
|
||||
///
|
||||
/// \headerfile SDL2pp/AudioDevice.hh
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
|
@ -29,8 +29,15 @@ namespace SDL2pp {
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Audio format specification
|
||||
///
|
||||
/// \ingroup audio
|
||||
///
|
||||
/// \headerfile SDL2pp/Audiospec.hh
|
||||
///
|
||||
/// This class extends SDL_AudioSpec - a structure that describes
|
||||
/// audio format. It may be used to describe format of loaded
|
||||
/// SDL2pp::Wav audio fragments and to specify desired or actual
|
||||
/// audio output format of SDL2pp::AudioDevice
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
class AudioSpec : public SDL_AudioSpec {
|
||||
public:
|
||||
@ -109,14 +116,3 @@ public:
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \class SDL2pp::AudioSpec
|
||||
/// \ingroup audio
|
||||
///
|
||||
/// This class extends SDL_AudioSpec - a structure that describes
|
||||
/// audio format. It may be used to describe format of loaded
|
||||
/// SDL2pp::Wav audio fragments and to specify desired or actual
|
||||
/// audio output format of SDL2pp::AudioDevice
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
|
@ -29,8 +29,34 @@ namespace SDL2pp {
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief %Exception object representing %SDL error
|
||||
///
|
||||
/// \ingroup general
|
||||
///
|
||||
/// \headerfile SDL2pp/Exception.hh
|
||||
///
|
||||
/// Internally, libSDL2pp checks return value of each SDL2
|
||||
/// function it calls which may fail. If the function fails,
|
||||
/// SDL2pp::Exception is thrown, and SDL2 error which expains
|
||||
/// cause of function failure is stored in the exception and
|
||||
/// may be extracted later.
|
||||
///
|
||||
/// what() usually contains a name of SDL2 function which failed,
|
||||
/// e.g. "SDL_Init() failed"
|
||||
///
|
||||
/// Usage example:
|
||||
/// \code
|
||||
/// {
|
||||
/// try {
|
||||
/// SDL2pp::SDL sdl(SDL_INIT_VIDEO);
|
||||
/// } catch (SDL2pp::Exception& e) {
|
||||
/// std::cerr << "Fatal error:"
|
||||
/// << e.what() // "SDL_Init failed"
|
||||
/// << ", SDL error: "
|
||||
/// << e.GetSDLError() // "x11 not available"
|
||||
/// << std::endl;
|
||||
/// }
|
||||
/// }
|
||||
/// \endcode
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
class Exception : public std::exception {
|
||||
private:
|
||||
@ -75,33 +101,3 @@ public:
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \class SDL2pp::Exception
|
||||
/// \ingroup general
|
||||
///
|
||||
/// Internally, libSDL2pp checks return value of each SDL2
|
||||
/// function it calls which may fail. If the function fails,
|
||||
/// SDL2pp::Exception is thrown, and SDL2 error which expains
|
||||
/// cause of function failure is stored in the exception and
|
||||
/// may be extracted later.
|
||||
///
|
||||
/// what() usually contains a name of SDL2 function which failed,
|
||||
/// e.g. "SDL_Init() failed"
|
||||
///
|
||||
/// Usage example:
|
||||
/// \code
|
||||
/// {
|
||||
/// try {
|
||||
/// SDL2pp::SDL sdl(SDL_INIT_VIDEO);
|
||||
/// } catch (SDL2pp::Exception& e) {
|
||||
/// std::cerr << "Fatal error:"
|
||||
/// << e.what() // "SDL_Init failed"
|
||||
/// << ", SDL error: "
|
||||
/// << e.GetSDLError() // "x11 not available"
|
||||
/// << std::endl;
|
||||
/// }
|
||||
/// }
|
||||
/// \endcode
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
|
@ -29,8 +29,29 @@ namespace SDL2pp {
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Object taking care of %SDL library (de-)initialization
|
||||
///
|
||||
/// \ingroup general
|
||||
///
|
||||
/// \headerfile SDL2pp/SDL.hh
|
||||
///
|
||||
/// Before using any SDL2 functions, the library must be initialized.
|
||||
/// Likewise, it should be deinitialized before application exits.
|
||||
/// SDL2pp::SDL object takes care of this in a RAII way
|
||||
/// by initializing the library in constructor and deinitializing
|
||||
/// in destructor, with an ability to init/quit specific subsystems
|
||||
/// in between
|
||||
///
|
||||
/// Usage example:
|
||||
/// \code
|
||||
/// int main() {
|
||||
/// SDL2pp::SDL sdl(SDL_INIT_VIDEO);
|
||||
///
|
||||
/// // ...use SDL functions...
|
||||
///
|
||||
/// // SDL library is automatically deinitialized before exit
|
||||
/// return 0;
|
||||
/// }
|
||||
/// \endcode
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
class SDL {
|
||||
public:
|
||||
@ -99,28 +120,3 @@ public:
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \class SDL2pp::SDL
|
||||
/// \ingroup general
|
||||
///
|
||||
/// Before using any SDL2 functions, the library must be initialized.
|
||||
/// Likewise, it should be deinitialized before application exits.
|
||||
/// SDL2pp::SDL object takes care of this in a RAII way
|
||||
/// by initializing the library in constructor and deinitializing
|
||||
/// in destructor, with an ability to init/quit specific subsystems
|
||||
/// in between
|
||||
///
|
||||
/// Usage example:
|
||||
/// \code
|
||||
/// int main() {
|
||||
/// SDL2pp::SDL sdl(SDL_INIT_VIDEO);
|
||||
///
|
||||
/// // ...use SDL functions...
|
||||
///
|
||||
/// // SDL library is automatically deinitialized before exit
|
||||
/// return 0;
|
||||
/// }
|
||||
/// \endcode
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
|
@ -41,6 +41,8 @@ class RWops;
|
||||
/// \brief Image stored in the graphics card memory that
|
||||
/// can be used for fast drawing
|
||||
///
|
||||
/// \ingroup rendering
|
||||
///
|
||||
/// \headerfile SDL2pp/Texture.hh
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
@ -234,9 +236,3 @@ public:
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \class SDL2pp::Texture
|
||||
/// \ingroup rendering
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
|
@ -33,8 +33,20 @@ class RWops;
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Chunk of audio data read from a .WAV file
|
||||
///
|
||||
/// \ingroup audio
|
||||
///
|
||||
/// \headerfile SDL2pp/Wav.hh
|
||||
///
|
||||
/// SDL2pp::Wav is a wrapper around basic SDL2 audio fragment
|
||||
/// handling functionality, basically SDL_LoadWAV and related
|
||||
/// functions.
|
||||
///
|
||||
/// The class holds raw audio data which is loaded from a disk
|
||||
/// file or from an arbitrary source with SDL2pp::RWops and
|
||||
/// may be used in audio playback.
|
||||
///
|
||||
/// See audio_wav demo for an example.
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
class Wav {
|
||||
private:
|
||||
@ -124,19 +136,3 @@ public:
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \class SDL2pp::Wav
|
||||
/// \ingroup audio
|
||||
///
|
||||
/// SDL2pp::Wav is a wrapper around basic SDL2 audio fragment
|
||||
/// handling functionality, basically SDL_LoadWAV and related
|
||||
/// functions.
|
||||
///
|
||||
/// The class holds raw audio data which is loaded from a disk
|
||||
/// file or from an arbitrary source with SDL2pp::RWops and
|
||||
/// may be used in audio playback.
|
||||
///
|
||||
/// See audio_wav demo for an example.
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
|
@ -35,8 +35,29 @@ namespace SDL2pp {
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief GUI window object
|
||||
///
|
||||
/// \ingroup windows
|
||||
///
|
||||
/// \headerfile SDL2pp/Window.hh
|
||||
///
|
||||
/// SDL2pp::Window is a wrapper around SDL_Window structure
|
||||
/// and related functions which take care of GUI window
|
||||
/// management.
|
||||
///
|
||||
/// Usage example:
|
||||
/// \code
|
||||
/// {
|
||||
/// SDL2pp::SDL sdl(SDL_INIT_VIDEO);
|
||||
/// SDL2pp::Window window("Test Window",
|
||||
/// SDL_WINDOWPOS_UNDEFINED,
|
||||
/// SDL_WINDOWPOS_UNDEFINED,
|
||||
/// 640,
|
||||
/// 480,
|
||||
/// SDL_WINDOW_OPENGL);
|
||||
///
|
||||
/// SDL_Delay(3000); // show window for 3 seconds
|
||||
/// }
|
||||
/// \endcode
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
class Window {
|
||||
private:
|
||||
@ -129,28 +150,3 @@ public:
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \class SDL2pp::Window
|
||||
/// \ingroup windows
|
||||
///
|
||||
/// SDL2pp::Window is a wrapper around SDL_Window structure
|
||||
/// and related functions which take care of GUI window
|
||||
/// management.
|
||||
///
|
||||
/// Usage example:
|
||||
/// \code
|
||||
/// {
|
||||
/// SDL2pp::SDL sdl(SDL_INIT_VIDEO);
|
||||
/// SDL2pp::Window window("Test Window",
|
||||
/// SDL_WINDOWPOS_UNDEFINED,
|
||||
/// SDL_WINDOWPOS_UNDEFINED,
|
||||
/// 640,
|
||||
/// 480,
|
||||
/// SDL_WINDOW_OPENGL);
|
||||
///
|
||||
/// SDL_Delay(3000); // show window for 3 seconds
|
||||
/// }
|
||||
/// \endcode
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
|
Loading…
x
Reference in New Issue
Block a user