Leaked source code of windows server 2003
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.

172 lines
4.7 KiB

  1. #if !defined(INC__DUserMotion_h__INCLUDED)
  2. #define INC__DUserMotion_h__INCLUDED
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #ifdef DUSER_EXPORTS
  7. #define DUSER_API
  8. #else
  9. #define DUSER_API __declspec(dllimport)
  10. #endif
  11. /***************************************************************************\
  12. *
  13. * Transitions
  14. *
  15. \***************************************************************************/
  16. #define GTX_TYPE_DXFORM2D 1
  17. #define GTX_TYPE_DXFORM3DRM 2
  18. #define GTX_ITEMTYPE_NONE 0
  19. #define GTX_ITEMTYPE_BITMAP 1
  20. #define GTX_ITEMTYPE_HDC 2
  21. #define GTX_ITEMTYPE_HWND 3
  22. #define GTX_ITEMTYPE_GADGET 4
  23. #define GTX_ITEMTYPE_DXSURFACE 5
  24. #define GTX_EXEC_FORWARD 0x000000000
  25. #define GTX_EXEC_BACKWARD 0x000000001
  26. #define GTX_EXEC_DIR 0x000000001
  27. #define GTX_EXEC_CACHE 0x000000002
  28. #define GTX_EXEC_VALID (GTX_EXEC_DIR | GTX_EXEC_CACHE)
  29. #define GTX_IF_CROP 0x000000001
  30. #define GTX_IF_VALID (GTX_IF_CROP)
  31. //
  32. // Standard Transition header
  33. //
  34. struct GTX_TRXDESC
  35. {
  36. UINT tt;
  37. };
  38. //
  39. // DirectX Transforms 2D
  40. //
  41. //
  42. // TODO: Change implementation of DXTX2D to have better support for using Trx
  43. // with only one input. Should automatically create a secondary surface of a
  44. // specified color-key that can be use to transition to.
  45. //
  46. struct GTX_DXTX2D_TRXDESC : public GTX_TRXDESC
  47. {
  48. CLSID clsidTransform;
  49. float flDuration;
  50. LPCWSTR pszCopyright;
  51. };
  52. //
  53. // DirectX Transforms 3D Retained Mode
  54. //
  55. struct GTX_DXTX3DRM_TRXDESC : public GTX_TRXDESC
  56. {
  57. CLSID clsidTransform;
  58. float flDuration;
  59. LPCWSTR pszCopyright;
  60. IUnknown * pRM;
  61. };
  62. struct GTX_ITEM
  63. {
  64. UINT nFlags;
  65. UINT it;
  66. void * pvData;
  67. RECT rcCrop;
  68. };
  69. struct GTX_PLAY
  70. {
  71. GTX_ITEM rgIn[2];
  72. GTX_ITEM gxiOut;
  73. UINT nFlags;
  74. };
  75. DECLARE_HANDLE(HTRANSITION);
  76. DUSER_API HTRANSITION WINAPI CreateTransition(const GTX_TRXDESC * ptx);
  77. DUSER_API BOOL WINAPI PlayTransition(HTRANSITION htrx, const GTX_PLAY * pgx);
  78. DUSER_API BOOL WINAPI GetTransitionInterface(HTRANSITION htrx, IUnknown ** ppUnk);
  79. DUSER_API BOOL WINAPI BeginTransition(HTRANSITION htrx, const GTX_PLAY * pgx);
  80. DUSER_API BOOL WINAPI PrintTransition(HTRANSITION htrx, float fProgress);
  81. DUSER_API BOOL WINAPI EndTransition(HTRANSITION htrx, const GTX_PLAY * pgx);
  82. /***************************************************************************\
  83. *
  84. * Actions
  85. *
  86. \***************************************************************************/
  87. struct GMA_ACTION;
  88. DECLARE_HANDLE(HACTION);
  89. struct GMA_ACTIONINFO
  90. {
  91. HACTION hact; // Handle
  92. void * pvData; // Caller data
  93. float flDuration; // Duration in seconds
  94. float flProgress; // Progress (0 - 1)
  95. int cEvent; // Number of callbacks in this period
  96. int cPeriods; // Number of periods
  97. BOOL fFinished; // TODO: Change to a command
  98. };
  99. typedef void (CALLBACK * ACTIONPROC)(GMA_ACTIONINFO * pmai);
  100. struct GMA_ACTION
  101. {
  102. DWORD cbSize; // Size of structure
  103. float flDelay; // Delay in seconds before starting
  104. float flDuration; // Duration in seconds of each period (0 = single shot)
  105. float flPeriod; // Time between beginnings of repeats (0 = no gap)
  106. UINT cRepeat; // Number of times to repeat (0 = single, -1 = infinite)
  107. DWORD dwPause; // Pause between callbacks (0 = default, -1 = none)
  108. ACTIONPROC pfnProc; // Function to call
  109. void * pvData; // Caller data
  110. };
  111. DUSER_API HACTION WINAPI CreateAction(const GMA_ACTION * pma);
  112. DUSER_API BOOL WINAPI GetActionTimeslice(DWORD * pdwTimeslice);
  113. DUSER_API BOOL WINAPI SetActionTimeslice(DWORD dwTimeslice);
  114. /***************************************************************************\
  115. *
  116. * Animations
  117. *
  118. \***************************************************************************/
  119. class Visual;
  120. namespace DUser
  121. {
  122. struct KeyFrame
  123. {
  124. DWORD cbSize;
  125. };
  126. }; // namespace DUser
  127. DUSER_API void WINAPI DUserStopAnimation(Visual * pgvSubject, PRID pridAni);
  128. DUSER_API PRID WINAPI DUserGetAlphaPRID();
  129. DUSER_API PRID WINAPI DUserGetRectPRID();
  130. DUSER_API PRID WINAPI DUserGetRotatePRID();
  131. DUSER_API PRID WINAPI DUserGetScalePRID();
  132. #ifdef __cplusplus
  133. }; // extern "C"
  134. #endif
  135. #endif // INC__DUserMotion_h__INCLUDED