vidmode.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: vidmode.h
  3. // Purpose: interface of wxVideoMode
  4. // Author: wxWidgets team
  5. // Licence: wxWindows licence
  6. /////////////////////////////////////////////////////////////////////////////
  7. /**
  8. @struct wxVideoMode
  9. Determines the sizes and locations of displays connected to the system.
  10. @library{wxcore}
  11. @category{cfg}
  12. @stdobjects
  13. ::wxDefaultVideoMode
  14. @see wxClientDisplayRect(), wxDisplaySize(), wxDisplaySizeMM()
  15. */
  16. struct wxVideoMode
  17. {
  18. public:
  19. /**
  20. Constructs this class using the given parameters.
  21. */
  22. wxVideoMode(int width = 0, int height = 0, int depth = 0, int freq = 0);
  23. /**
  24. Returns true if this mode matches the other one in the sense that all
  25. non zero fields of the other mode have the same value in this one
  26. (except for refresh which is allowed to have a greater value).
  27. */
  28. bool Matches(const wxVideoMode& other) const;
  29. /**
  30. Returns the screen width in pixels (e.g.\ 640), 0 means unspecified.
  31. */
  32. int GetWidth() const;
  33. /**
  34. Returns the screen height in pixels (e.g.\ 480), 0 means unspecified.
  35. */
  36. int GetHeight() const;
  37. /**
  38. Returns bits per pixel (e.g.\ 32), 1 is monochrome and 0 means
  39. unspecified/known.
  40. */
  41. int GetDepth() const;
  42. /**
  43. Returns true if the object has been initialized
  44. */
  45. bool IsOk() const;
  46. bool operator==(const wxVideoMode& m) const;
  47. bool operator!=(const wxVideoMode& mode) const;
  48. /**
  49. The screen width in pixels (e.g.\ 640), 0 means unspecified.
  50. */
  51. int w;
  52. /**
  53. The screen height in pixels (e.g.\ 480), 0 means unspecified.
  54. */
  55. int h;
  56. /**
  57. Bits per pixel (e.g.\ 32), 1 is monochrome and 0 means
  58. unspecified/known.
  59. */
  60. int bpp;
  61. /**
  62. Refresh frequency in Hz, 0 means unspecified/unknown.
  63. */
  64. int refresh;
  65. };
  66. /**
  67. A global wxVideoMode instance used by wxDisplay.
  68. */
  69. const wxVideoMode wxDefaultVideoMode;