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.

216 lines
5.7 KiB

  1. // -*- Mode: C++ -*-
  2. /*++
  3. Copyright (c) 1998 Microsoft Corporation
  4. Abstract:
  5. Interface definitions for Windows Multimedia Runtime components
  6. --*/
  7. cpp_quote("#include \"danim.h\"")
  8. [
  9. uuid(a1b046bc-4ad2-11d2-b953-3078302c2030),
  10. lcid(0x0000),
  11. version(1.0)
  12. ]
  13. library WindowsMultimediaRuntime
  14. {
  15. importlib("STDOLE2.TLB");
  16. importlib("DANIM.TLB");
  17. interface IMMBehavior;
  18. interface IMMTimeline;
  19. interface IMMPlayer;
  20. interface IMMFactory;
  21. typedef enum {
  22. MM_PLAY_EVENT,
  23. MM_STOP_EVENT,
  24. MM_REPEAT_EVENT,
  25. MM_AUTOREVERSE_EVENT,
  26. MM_PAUSE_EVENT,
  27. MM_RESUME_EVENT,
  28. } MM_EVENT_TYPE ;
  29. [
  30. object,
  31. uuid(dc2f58e6-4ad2-11d2-b953-3078302c2030),
  32. dual,
  33. pointer_default(unique)
  34. ]
  35. interface IMMEventCB : IUnknown
  36. {
  37. HRESULT OnEvent([in] double eventTime,
  38. [in] IMMBehavior *,
  39. [in] MM_EVENT_TYPE et);
  40. }
  41. typedef enum {
  42. MM_PLAYING_STATE,
  43. MM_STOPPED_STATE,
  44. MM_PAUSED_STATE,
  45. } MM_STATE;
  46. typedef enum {
  47. MM_START_ABSOLUTE,
  48. MM_START_EVENT,
  49. MM_START_WITH,
  50. MM_START_AFTER,
  51. } MM_START_TYPE;
  52. typedef enum {
  53. MM_STOP_ABSOLUTE,
  54. MM_STOP_WITH
  55. } MM_STOP_TYPE;
  56. [
  57. object,
  58. uuid(18b4a8b2-5f36-11d2-b957-3078302c2030),
  59. dual,
  60. pointer_default(unique)
  61. ]
  62. interface IMMBehavior : IDispatch
  63. {
  64. [propget] HRESULT ID([out, retval] BSTR *);
  65. [propput] HRESULT ID([in] BSTR);
  66. [propget] HRESULT StartOffset([out, retval] float *);
  67. [propput] HRESULT StartOffset([in] float);
  68. [propget] HRESULT Duration([out, retval] float *);
  69. [propput] HRESULT Duration([in] float);
  70. [propget] HRESULT Repeat([out, retval] LONG *);
  71. [propput] HRESULT Repeat([in] LONG);
  72. [propget] HRESULT AutoReverse([out, retval] VARIANT_BOOL *);
  73. [propput] HRESULT AutoReverse([in] VARIANT_BOOL);
  74. [propget] HRESULT RepeatDur([out, retval] float *);
  75. [propput] HRESULT RepeatDur([in] float);
  76. [propget] HRESULT EndOffset([out, retval] float *);
  77. [propput] HRESULT EndOffset([in] float);
  78. [propget] HRESULT EaseIn([out, retval] float *);
  79. [propput] HRESULT EaseIn([in] float);
  80. [propget] HRESULT EaseInStart([out, retval] float *);
  81. [propput] HRESULT EaseInStart([in] float);
  82. [propget] HRESULT EaseOut([out, retval] float *);
  83. [propput] HRESULT EaseOut([in] float);
  84. [propget] HRESULT EaseOutEnd([out, retval] float *);
  85. [propput] HRESULT EaseOutEnd([in] float);
  86. [propget] HRESULT EventCB([out, retval] IMMEventCB **);
  87. [propput] HRESULT EventCB([in] IMMEventCB *);
  88. [propget] HRESULT TotalTime([out, retval] float *);
  89. HRESULT Begin(VARIANT_BOOL bAfterOffset);
  90. HRESULT End();
  91. HRESULT Pause();
  92. HRESULT Run();
  93. HRESULT Seek([in] double lTime);
  94. [propget] HRESULT CurrentTime([out, retval] double * d);
  95. [propget] HRESULT PlayState([out, retval] MM_STATE *);
  96. [propget] HRESULT DABehavior([out, retval] IDABehavior **);
  97. HRESULT GetDABehavior(REFIID iid, void ** retobj);
  98. }
  99. // Flags for the endsync property.
  100. enum {
  101. MM_ENDSYNC_NONE = 0x00000000,
  102. MM_ENDSYNC_FIRST = 0x00000001,
  103. MM_ENDSYNC_LAST = 0x00000002,
  104. } ;
  105. [
  106. object,
  107. uuid(03030490-4ad3-11d2-b953-3078302c2030),
  108. dual,
  109. pointer_default(unique)
  110. ]
  111. interface IMMTimeline : IMMBehavior
  112. {
  113. HRESULT AddBehavior([in] IMMBehavior * bvr,
  114. [in] MM_START_TYPE st,
  115. [in] IMMBehavior * basebvr);
  116. HRESULT RemoveBehavior([in] IMMBehavior * bvr);
  117. HRESULT AddView([in] IDAView * view,
  118. [in] IUnknown *pUnk,
  119. [in] IDAImage * img,
  120. [in] IDASound * snd);
  121. [propget] HRESULT EndSync([out, retval] DWORD * flags);
  122. [propput] HRESULT EndSync([in] DWORD flags);
  123. }
  124. [
  125. object,
  126. uuid(abc4aa1c-5bbc-11d2-b957-3078302c2030),
  127. dual,
  128. pointer_default(unique)
  129. ]
  130. interface IMMPlayer : IDispatch
  131. {
  132. [propget] HRESULT ID([out, retval] BSTR *);
  133. [propput] HRESULT ID([in] BSTR);
  134. HRESULT Play();
  135. HRESULT Stop();
  136. HRESULT Pause();
  137. HRESULT Resume();
  138. [propget] HRESULT PlayerState([out, retval] MM_STATE *);
  139. [propget] HRESULT CurrentTime([out, retval] double * d);
  140. HRESULT SetPosition([in] double lTime);
  141. HRESULT SetDirection([in] VARIANT_BOOL bForward);
  142. [propget] HRESULT Behavior([out, retval] IMMBehavior ** bvr);
  143. [propget] HRESULT View([out, retval] IDAView ** v);
  144. }
  145. [
  146. object,
  147. uuid(083a2970-4ad3-11d2-b953-3078302c2030),
  148. dual,
  149. hidden,
  150. pointer_default(unique)
  151. ]
  152. interface IMMFactory : IDispatch
  153. {
  154. HRESULT CreateBehavior([in] BSTR id,
  155. [in] IDABehavior *bvr,
  156. [out, retval] IMMBehavior **ppOut);
  157. HRESULT CreateTimeline([in] BSTR id,
  158. [out, retval] IMMTimeline **ppOut);
  159. HRESULT CreatePlayer([in] BSTR id,
  160. [in] IMMBehavior * bvr,
  161. [in] IDAView *v,
  162. [out, retval] IMMPlayer **ppOut);
  163. }
  164. [
  165. uuid(0c02242c-4ad3-11d2-b953-3078302c2030)
  166. ]
  167. coclass MMFactory
  168. {
  169. [default] interface IMMFactory;
  170. };
  171. }