IVideoModeList.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. // Copyright (C) 2002-2012 Nikolaus Gebhardt
  2. // This file is part of the "Irrlicht Engine".
  3. // For conditions of distribution and use, see copyright notice in irrlicht.h
  4. #ifndef IRR_I_VIDEO_MODE_LIST_H_INCLUDED
  5. #define IRR_I_VIDEO_MODE_LIST_H_INCLUDED
  6. #include "IReferenceCounted.h"
  7. #include "dimension2d.h"
  8. namespace irr
  9. {
  10. namespace video
  11. {
  12. //! A list of all available video modes.
  13. /** You can get a list via IrrlichtDevice::getVideoModeList().
  14. You only need the null device (EDT_NULL) to get the video-modes. */
  15. class IVideoModeList : public virtual IReferenceCounted
  16. {
  17. public:
  18. //! Gets amount of video modes in the list.
  19. /** \return Returns amount of video modes. */
  20. virtual s32 getVideoModeCount() const = 0;
  21. //! Get the screen size of a video mode in pixels.
  22. /** \param modeNumber: zero based index of the video mode.
  23. \return Size of screen in pixels of the specified video mode. */
  24. virtual core::dimension2d<u32> getVideoModeResolution(s32 modeNumber) const = 0;
  25. //! Get a supported screen size with certain constraints.
  26. /** \param minSize: Minimum dimensions required.
  27. \param maxSize: Maximum dimensions allowed.
  28. \return Size of screen in pixels which matches the requirements.
  29. as good as possible. */
  30. virtual core::dimension2d<u32> getVideoModeResolution(const core::dimension2d<u32>& minSize, const core::dimension2d<u32>& maxSize) const = 0;
  31. //! Get the pixel depth of a video mode in bits.
  32. /** \param modeNumber: zero based index of the video mode.
  33. \return Size of each pixel of the specified video mode in bits. */
  34. virtual s32 getVideoModeDepth(s32 modeNumber) const = 0;
  35. //! Get current desktop screen resolution.
  36. /** \return Size of screen in pixels of the current desktop video mode. */
  37. virtual const core::dimension2d<u32>& getDesktopResolution() const = 0;
  38. //! Get the pixel depth of a video mode in bits.
  39. /** \return Size of each pixel of the current desktop video mode in bits. */
  40. virtual s32 getDesktopDepth() const = 0;
  41. };
  42. } // end namespace video
  43. } // end namespace irr
  44. #endif