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.

148 lines
2.6 KiB

  1. helper EventGadget
  2. {
  3. typedef UINT (CALLBACK * EventHandler)(void * pvData, EventMsg * pmsg);
  4. };
  5. helper Visual
  6. {
  7. struct VisualCI : public DUser::Gadget::ConstructInfo
  8. {
  9. Visual * pgvParent;
  10. };
  11. inline HRESULT IsVisible(BOOL * pfVisible, UINT nFlags)
  12. {
  13. return IsParentChainStyle(GS_VISIBLE, pfVisible, nFlags);
  14. }
  15. inline HRESULT IsEnabled(BOOL * pfEnabled, UINT nFlags)
  16. {
  17. return IsParentChainStyle(GS_ENABLED, pfEnabled, nFlags);
  18. }
  19. };
  20. helper Flow
  21. {
  22. enum ETime
  23. {
  24. tBegin = 0,
  25. tEnd
  26. };
  27. struct FlowCI : public DUser::Gadget::ConstructInfo
  28. {
  29. DWORD cbSize;
  30. Visual * pgvSubject;
  31. };
  32. };
  33. helper AlphaVertexFlow
  34. {
  35. static PRID GetPRID()
  36. {
  37. return DUserGetAlphaVertexPRID();
  38. }
  39. struct AlphaKeyFrame : DUser::KeyFrame
  40. {
  41. BYTE bAlpha;
  42. };
  43. };
  44. helper RectFlow
  45. {
  46. static PRID GetPRID()
  47. {
  48. return DUserGetRectPRID();
  49. }
  50. struct RectKeyFrame : DUser::KeyFrame
  51. {
  52. UINT nChangeFlags;
  53. RECT rcPxl;
  54. };
  55. };
  56. helper RotateFlow
  57. {
  58. enum EDirection
  59. {
  60. dMin = 0,
  61. dShort = 0, // Shortest arc
  62. dLong = 1, // Longer arc
  63. dCW = 2, // Clock-wise
  64. dCCW = 3, // Counter clock-wise
  65. dMax = 3,
  66. };
  67. static PRID GetPRID()
  68. {
  69. return DUserGetRotatePRID();
  70. }
  71. struct RotateKeyFrame : DUser::KeyFrame
  72. {
  73. float flRotation;
  74. EDirection nDir;
  75. };
  76. };
  77. helper ScaleFlow
  78. {
  79. static PRID GetPRID()
  80. {
  81. return DUserGetScalePRID();
  82. }
  83. struct ScaleKeyFrame : DUser::KeyFrame
  84. {
  85. UINT nChangeFlags;
  86. float flScale;
  87. };
  88. };
  89. helper LightFlow
  90. {
  91. static PRID GetPRID()
  92. {
  93. return DUserGetLightPRID();
  94. }
  95. struct LightKeyFrame : DUser::KeyFrame
  96. {
  97. UINT id;
  98. float x;
  99. float y;
  100. float z;
  101. float xDirection;
  102. float yDirection;
  103. float zDirection;
  104. float outerCone;
  105. float innerCone;
  106. float attenuationA0;
  107. float attenuationA1;
  108. float attenuationA2;
  109. int flags;
  110. };
  111. };
  112. helper Sequence
  113. {
  114. struct AnimationInfo
  115. {
  116. DWORD cbSize;
  117. };
  118. BEGIN_STRUCT(CompleteEvent, EventMsg)
  119. BOOL fNormal; // Sequenced finished normally
  120. END_STRUCT(CompleteEvent)
  121. DEFINE_EVENT(evComplete, "E90A6ABB-E4CF-4988-87EA-6D1EEDCD0097");
  122. };