Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

103 lines
3.1 KiB

  1. #if !defined(INC__DUser_h__INCLUDED)
  2. #define INC__DUser_h__INCLUDED
  3. //
  4. // Setup implied switches
  5. //
  6. #ifdef _GDIPLUS_H
  7. #if !defined(GADGET_ENABLE_GDIPLUS)
  8. #define GADGET_ENABLE_GDIPLUS
  9. #endif
  10. #endif
  11. #ifdef DUSER_EXPORTS
  12. #define DUSER_API
  13. #else
  14. #define DUSER_API __declspec(dllimport)
  15. #endif
  16. //
  17. // Object declaration wrappers
  18. //
  19. #define BEGIN_ENUM(name) \
  20. struct name \
  21. { \
  22. enum E; \
  23. \
  24. inline name() \
  25. { \
  26. } \
  27. \
  28. inline name(E src) \
  29. { \
  30. value = src; \
  31. } \
  32. \
  33. inline void operator=(E e) \
  34. { \
  35. value = e; \
  36. } \
  37. \
  38. inline bool operator==(E e) \
  39. { \
  40. return value == e; \
  41. } \
  42. \
  43. inline bool operator!=(E e) \
  44. { \
  45. return value != e; \
  46. } \
  47. \
  48. inline bool operator<(E e) \
  49. { \
  50. return value < e; \
  51. } \
  52. \
  53. inline bool operator<=(E e) \
  54. { \
  55. return value <= e; \
  56. } \
  57. \
  58. inline bool operator>(E e) \
  59. { \
  60. return value > e; \
  61. } \
  62. \
  63. inline bool operator>=(E e) \
  64. { \
  65. return value >= e; \
  66. } \
  67. \
  68. inline operator E() const \
  69. { \
  70. return value; \
  71. } \
  72. \
  73. enum E \
  74. { \
  75. #define END_ENUM() \
  76. } value; \
  77. }; \
  78. //
  79. // Include external DirectUser definitions.
  80. //
  81. #include <ObjBase.h> // "interface", STDMETHOD, and CoCreateInstance
  82. #include <unknwn.h> // IUnknown
  83. #include <DUserError.h>
  84. #include <DUserColor.h>
  85. #include <DUserGeom2D.h>
  86. #include <DUserCore.h>
  87. #include <DUserMotion.h>
  88. #endif // INC__DUser_h__INCLUDED