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.

203 lines
6.3 KiB

  1. /***************************************************************************\
  2. *
  3. * DirectUser-Display
  4. *
  5. \***************************************************************************/
  6. class EventGadget
  7. {
  8. event HRESULT OnEvent(in EventMsg * pmsg);
  9. dapi HRESULT GetFilter(out UINT nFilter);
  10. dapi HRESULT SetFilter(in UINT nNewFilter, in UINT nMask);
  11. dapi HRESULT AddHandlerG(in MSGID nEventMsg, in EventGadget * pgbHandler);
  12. dapi HRESULT AddHandlerD(in MSGID nEventMsg, in DUser::EventDelegate ed);
  13. dapi HRESULT RemoveHandlerG(in MSGID nEventMsg, in EventGadget * pgbHandler);
  14. dapi HRESULT RemoveHandlerD(in MSGID nEventMsg, in DUser::EventDelegate ed);
  15. };
  16. class Listener : public EventGadget
  17. {
  18. };
  19. class Visual : public EventGadget
  20. {
  21. dapi HRESULT GetExtension(out DeviceVisual * pDeviceVisual);
  22. dapi HRESULT DeleteTree();
  23. dapi HRESULT SetOrder(in Visual * pgvOther, in UINT nCmd);
  24. dapi HRESULT SetParent(in Visual * pgvParent, in Visual * pgvOther, in UINT nCmd);
  25. dapi HRESULT GetRelative(in UINT nCmd, out Visual * pgv);
  26. dapi HRESULT GetStyle(out UINT nStyle);
  27. dapi HRESULT SetStyle(in UINT nNewStyle, in UINT nMask);
  28. dapi HRESULT SetKeyboardFocus();
  29. dapi HRESULT IsParentChainStyle(in UINT nStyle, out BOOL fResult, in UINT nFlags);
  30. dapi HRESULT GetProperty(in PRID id, out void * pvValue);
  31. dapi HRESULT SetProperty(in PRID id, in void * pvValue);
  32. dapi HRESULT RemoveProperty(in PRID id);
  33. dapi HRESULT Invalidate(UINT nFlags);
  34. dapi HRESULT InvalidateRects(const RECT * rgrcClientPxl, int cRects, UINT nFlags);
  35. dapi HRESULT GetScale(out DirectUser::Geometry::SizeF sizefScale);
  36. dapi HRESULT SetScale(in DirectUser::Geometry::SizeF sizefScale);
  37. dapi HRESULT GetRotation(out float flRotationRad);
  38. dapi HRESULT SetRotation(in float flRotationRad);
  39. dapi HRESULT GetCenterPoint(out DirectUser::Geometry::PointF ptfCenter);
  40. dapi HRESULT SetCenterPoint(in DirectUser::Geometry::PointF ptfCenter);
  41. dapi HRESULT GetSize(out DirectUser::Geometry::Size sizeLogicalPxl);
  42. dapi HRESULT GetRect(out DirectUser::Geometry::Rect rcPxl);
  43. dapi HRESULT SetRect(in UINT nFlags, in DirectUser::Geometry::Rect rcPxl);
  44. dapi HRESULT ComputeContainerRect(out DirectUser::Geometry::Rect rcPxl);
  45. dapi HRESULT MapPoints(in Visual * pgvTo, in /* out */ POINT * rgptClientPxl, in int cPts);
  46. dapi HRESULT FindFromPoint(in POINT ptThisClientPxl, in UINT nStyle, out POINT ptFoundClientPxl, out Visual * pgvFound);
  47. };
  48. class Root : public Visual
  49. {
  50. dapi HRESULT GetFocus(out Visual * pgvFocus);
  51. dapi HRESULT GetBackgroundColor(out DUser::Color clrBackground);
  52. dapi HRESULT SetBackgroundColor(in DUser::Color clrBackground);
  53. dapi HRESULT GetFullScreen(out bool fFullScreen);
  54. dapi HRESULT SetFullScreen(in bool fFullScreen);
  55. dapi HRESULT SetPreBeginSceneROs(DUser::IRenderOperation ** rgpROs, int cROs);
  56. };
  57. //
  58. // Device extensions
  59. //
  60. class DeviceVisual
  61. {
  62. dapi HRESULT GetVisual(out Visual * pgvVisual);
  63. };
  64. class D3d7DeviceVisual : public DeviceVisual
  65. {
  66. dapi HRESULT GetVertexAlpha(out BYTE bAlpha);
  67. dapi HRESULT SetVertexAlpha(in BYTE bAlpha);
  68. dapi HRESULT GetLight(in int nID, in void * plight);
  69. dapi HRESULT SetLight(in int nID, in void * plight);
  70. dapi HRESULT RemoveLight(in int nID);
  71. };
  72. //
  73. // DirectUser-Animations
  74. //
  75. class Interpolation
  76. {
  77. dapi HRESULT AddRef();
  78. dapi HRESULT Release();
  79. dapi HRESULT Compute(in float flProgress, in float flStart, in float flEnd, out float flResult);
  80. };
  81. class LinearInterpolation : public Interpolation
  82. {
  83. };
  84. class LogInterpolation : public Interpolation
  85. {
  86. dapi HRESULT SetScale(in float flScale);
  87. };
  88. class ExpInterpolation : public Interpolation
  89. {
  90. dapi HRESULT SetScale(in float flScale);
  91. };
  92. class SCurveInterpolation : public Interpolation
  93. {
  94. dapi HRESULT SetScale(in float flScale);
  95. };
  96. class Flow
  97. {
  98. dapi HRESULT AddRef();
  99. dapi HRESULT Release();
  100. dapi HRESULT GetPRID(out PRID prid);
  101. dapi HRESULT GetKeyFrame(in Flow::ETime time, out DUser::KeyFrame * pkf);
  102. dapi HRESULT SetKeyFrame(in Flow::ETime time, in const DUser::KeyFrame * pkf);
  103. dapi HRESULT OnReset(in Visual * pgvSubject);
  104. dapi HRESULT OnAction(in Visual * pgvSubject, in Interpolation * pipol, in float flProgress);
  105. };
  106. class AlphaVertexFlow : public Flow
  107. {
  108. };
  109. class RectFlow : public Flow
  110. {
  111. };
  112. class RotateFlow : public Flow
  113. {
  114. };
  115. class ScaleFlow : public Flow
  116. {
  117. };
  118. class LightFlow : public Flow
  119. {
  120. };
  121. class Sequence : public Listener
  122. {
  123. dapi HRESULT AddRef();
  124. dapi HRESULT Release();
  125. dapi HRESULT GetLength(out float flLength);
  126. dapi HRESULT GetDelay(out float flDelay);
  127. dapi HRESULT SetDelay(in float flDelay);
  128. dapi HRESULT GetFlow(out Flow * pflow);
  129. dapi HRESULT SetFlow(in Flow * pflow);
  130. dapi HRESULT GetLoop(out int repeatCount);
  131. dapi HRESULT SetLoop(in int repeatCount);
  132. dapi HRESULT GetKeyFrameCount(out int cFrames);
  133. dapi HRESULT AddKeyFrame(in float flTime, out int idxKeyFrame);
  134. dapi HRESULT RemoveKeyFrame(in int idxKeyFrame);
  135. dapi HRESULT RemoveAllKeyFrames();
  136. dapi HRESULT FindKeyFrame(in float flTime, out int idxKeyFrame);
  137. dapi HRESULT GetTime(in int idxKeyFrame, out float flTime);
  138. dapi HRESULT SetTime(in int idxKeyFrame, in float flTime);
  139. dapi HRESULT GetKeyFrame(in int idxKeyFrame, out DUser::KeyFrame * pkf);
  140. dapi HRESULT SetKeyFrame(in int idxKeyFrame, in const DUser::KeyFrame * pkfSrc);
  141. dapi HRESULT GetInterpolation(in int idxKeyFrame, out Interpolation * pipol);
  142. dapi HRESULT SetInterpolation(in int idxKeyFrame, in Interpolation * pipol);
  143. dapi HRESULT Play(in Visual * pgvSubject, in Sequence::AnimationInfo * pai);
  144. dapi HRESULT Stop();
  145. dapi HRESULT Reset(in Visual * pgvSubject);
  146. dapi HRESULT GotoTime(in Visual * pgvSubject, in float flTime);
  147. };