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.

404 lines
16 KiB

  1. // -*- Mode: C++ -*-
  2. /*++
  3. Copyright (c) 1998 Microsoft Corporation
  4. Abstract:
  5. Interface definitions for TIME components
  6. --*/
  7. #include "datimeid.h"
  8. import "servprov.idl";
  9. cpp_quote("#include <olectl.h>")
  10. cpp_quote("#include \"danim.h\"")
  11. interface ITIMEElementCollection;
  12. [
  13. uuid(33adbfcc-3e0d-11d2-b948-00c04fa32195),
  14. lcid(0x0000),
  15. version(1.0)
  16. ]
  17. library TIME
  18. {
  19. typedef enum _MediaType
  20. {
  21. MT_Media,
  22. MT_Image,
  23. MT_Audio,
  24. MT_Video,
  25. MT_Animation,
  26. MT_Textstream
  27. }MediaType;
  28. importlib("STDOLE2.TLB");
  29. #include <olectl.h>
  30. [
  31. object,
  32. uuid(e53dc05c-3f93-11d2-b948-00c04fa32195),
  33. dual,
  34. pointer_default(unique)
  35. ]
  36. interface ITIMEElement : IDispatch
  37. {
  38. [propget, id(DISPID_TIMEELEMENT_BEGIN)] HRESULT begin([out, retval] VARIANT * time);
  39. [propput, id(DISPID_TIMEELEMENT_BEGIN)] HRESULT begin([in] VARIANT time);
  40. [propget, id(DISPID_TIMEELEMENT_BEGINWITH)] HRESULT beginWith([out, retval] VARIANT * time);
  41. [propput, id(DISPID_TIMEELEMENT_BEGINWITH)] HRESULT beginWith([in] VARIANT time);
  42. [propget, id(DISPID_TIMEELEMENT_BEGINAFTER)] HRESULT beginAfter([out, retval] VARIANT * time);
  43. [propput, id(DISPID_TIMEELEMENT_BEGINAFTER)] HRESULT beginAfter([in] VARIANT time);
  44. [propget, id(DISPID_TIMEELEMENT_BEGINEVENT)] HRESULT beginEvent([out, retval] VARIANT * time);
  45. [propput, id(DISPID_TIMEELEMENT_BEGINEVENT)] HRESULT beginEvent([in] VARIANT time);
  46. [propget, id(DISPID_TIMEELEMENT_DUR)] HRESULT dur([out, retval] VARIANT * time);
  47. [propput, id(DISPID_TIMEELEMENT_DUR)] HRESULT dur([in] VARIANT time);
  48. [propget, id(DISPID_TIMEELEMENT_END)] HRESULT end([out, retval] VARIANT * time);
  49. [propput, id(DISPID_TIMEELEMENT_END)] HRESULT end([in] VARIANT time);
  50. [propget, id(DISPID_TIMEELEMENT_ENDWITH)] HRESULT endWith([out, retval] VARIANT * time);
  51. [propput, id(DISPID_TIMEELEMENT_ENDWITH)] HRESULT endWith([in] VARIANT time);
  52. [propget, id(DISPID_TIMEELEMENT_ENDEVENT)] HRESULT endEvent([out, retval] VARIANT * time);
  53. [propput, id(DISPID_TIMEELEMENT_ENDEVENT)] HRESULT endEvent([in] VARIANT time);
  54. [propget, id(DISPID_TIMEELEMENT_ENDSYNC)] HRESULT endSync([out, retval] VARIANT * time);
  55. [propput, id(DISPID_TIMEELEMENT_ENDSYNC)] HRESULT endSync([in] VARIANT time);
  56. [propget, id(DISPID_TIMEELEMENT_REPEAT)] HRESULT repeat([out, retval] VARIANT * time);
  57. [propput, id(DISPID_TIMEELEMENT_REPEAT)] HRESULT repeat([in] VARIANT time);
  58. [propget, id(DISPID_TIMEELEMENT_REPEATDUR)] HRESULT repeatDur([out, retval] VARIANT * time);
  59. [propput, id(DISPID_TIMEELEMENT_REPEATDUR)] HRESULT repeatDur([in] VARIANT time);
  60. [propget, id(DISPID_TIMEELEMENT_ACCELERATE)] HRESULT accelerate([out, retval] int * );
  61. [propput, id(DISPID_TIMEELEMENT_ACCELERATE)] HRESULT accelerate([in] int );
  62. [propget, id(DISPID_TIMEELEMENT_DECELERATE)] HRESULT decelerate([out, retval] int * );
  63. [propput, id(DISPID_TIMEELEMENT_DECELERATE)] HRESULT decelerate([in] int );
  64. [propget, id(DISPID_TIMEELEMENT_ENDHOLD)] HRESULT endHold([out, retval] VARIANT_BOOL *);
  65. [propput, id(DISPID_TIMEELEMENT_ENDHOLD)] HRESULT endHold([in] VARIANT_BOOL );
  66. [propget, id(DISPID_TIMEELEMENT_AUTOREVERSE)] HRESULT autoReverse([out, retval] VARIANT_BOOL *);
  67. [propput, id(DISPID_TIMEELEMENT_AUTOREVERSE)] HRESULT autoReverse([in] VARIANT_BOOL );
  68. [propget, id(DISPID_TIMEELEMENT_EVENTRESTART)] HRESULT eventRestart([out, retval] VARIANT_BOOL *);
  69. [propput, id(DISPID_TIMEELEMENT_EVENTRESTART)] HRESULT eventRestart([in] VARIANT_BOOL );
  70. [propget, id(DISPID_TIMEELEMENT_TIMEACTION)] HRESULT timeAction([out, retval] BSTR * time);
  71. [propput, id(DISPID_TIMEELEMENT_TIMEACTION)] HRESULT timeAction([in] BSTR time);
  72. [id (DISPID_TIMEELEMENT_BEGINELEMENT)] HRESULT beginElement();
  73. [id (DISPID_TIMEELEMENT_ENDELEMENT)] HRESULT endElement();
  74. [id (DISPID_TIMEELEMENT_PAUSE)] HRESULT pause();
  75. [id (DISPID_TIMEELEMENT_RESUME)] HRESULT resume();
  76. [id (DISPID_TIMEELEMENT_CUE)] HRESULT cue();
  77. [propget, id(DISPID_TIMEELEMENT_TIMELINE)] HRESULT timeline([out, retval] BSTR *);
  78. [propput, id(DISPID_TIMEELEMENT_TIMELINE)] HRESULT timeline([in] BSTR );
  79. [propget, id(DISPID_TIMEELEMENT_CURRTIME)] HRESULT currTime([out, retval] float * time);
  80. [propput, id(DISPID_TIMEELEMENT_CURRTIME)] HRESULT currTime([in] float time);
  81. [propget, id(DISPID_TIMEELEMENT_LOCALTIME)] HRESULT localTime([out, retval] float * time);
  82. [propput, id(DISPID_TIMEELEMENT_LOCALTIME)] HRESULT localTime([in] float time);
  83. [propget, id(DISPID_TIMEELEMENT_CURRSTATE)] HRESULT currState([out, retval] BSTR * state);
  84. [propget, id(DISPID_TIMEELEMENT_SYNCBEHAVIOR)] HRESULT syncBehavior([out, retval] BSTR * sync);
  85. [propput, id(DISPID_TIMEELEMENT_SYNCBEHAVIOR)] HRESULT syncBehavior([in] BSTR sync);
  86. [propget, id(DISPID_TIMEELEMENT_SYNCTOLERANCE)] HRESULT syncTolerance([out, retval] VARIANT * tol);
  87. [propput, id(DISPID_TIMEELEMENT_SYNCTOLERANCE)] HRESULT syncTolerance([in] VARIANT tol);
  88. [propget, id(DISPID_TIMEELEMENT_PARENTTIMEELEMENT)] HRESULT parentTIMEElement([out, retval] ITIMEElement ** parent);
  89. [propput, id(DISPID_TIMEELEMENT_PARENTTIMEELEMENT)] HRESULT parentTIMEElement([in] ITIMEElement * parent);
  90. //
  91. // Collections
  92. //
  93. [propget, id(DISPID_TIMEELEMENT_ALLTIMEELEMENTS)]
  94. HRESULT allTIMEElements([out, retval] ITIMEElementCollection **ppDisp);
  95. [propget, id(DISPID_TIMEELEMENT_CHILDRENTIMEELEMENTS)]
  96. HRESULT childrenTIMEElements([out, retval] ITIMEElementCollection **ppDisp);
  97. [propget, id(DISPID_TIMEELEMENT_ALLTIMEINTERFACES), restricted]
  98. HRESULT allTIMEInterfaces([out, retval] ITIMEElementCollection **ppDisp);
  99. [propget, id(DISPID_TIMEELEMENT_CHILDRENTIMEINTERFACES), restricted]
  100. HRESULT childrenTIMEInterfaces([out, retval] ITIMEElementCollection **ppDisp);
  101. //
  102. // DirectAnimation behaviors
  103. //
  104. [propget, id(DISPID_TIMEELEMENT_TIMELINEBEHAVIOR)]
  105. HRESULT timelineBehavior([out, retval] IDispatch ** bvr);
  106. [propget, id(DISPID_TIMEELEMENT_PROGRESSBEHAVIOR)]
  107. HRESULT progressBehavior([out, retval] IDispatch ** bvr);
  108. [propget, id(DISPID_TIMEELEMENT_ONOFFBEHAVIOR)]
  109. HRESULT onOffBehavior([out, retval] IDispatch ** bvr);
  110. };
  111. //
  112. // ITIMEDAElement
  113. //
  114. [
  115. object,
  116. uuid(7a6af9a0-9355-11d2-80ba-00c04fa32195),
  117. pointer_default(unique)
  118. ]
  119. interface ITIMEDAElementRenderSite : IUnknown
  120. {
  121. HRESULT Invalidate(LPRECT prc);
  122. }
  123. [
  124. object,
  125. uuid(9e328494-9354-11d2-80ba-00c04fa32195),
  126. pointer_default(unique)
  127. ]
  128. interface ITIMEDAElementRender : IUnknown
  129. {
  130. HRESULT Tick();
  131. HRESULT Draw(HDC dc, LPRECT prc);
  132. [propget] HRESULT RenderSite([out, retval] ITIMEDAElementRenderSite ** ppSite);
  133. [propput] HRESULT RenderSite([in] ITIMEDAElementRenderSite * pSite);
  134. };
  135. [
  136. object,
  137. uuid(17c7a570-4d53-11d2-b954-00c04fa32195),
  138. dual,
  139. pointer_default(unique)
  140. ]
  141. interface ITIMEDAElement : IDispatch
  142. {
  143. [propget, id(DISPID_TIMEDAELEMENT_IMAGE)] HRESULT image([out, retval] VARIANT * img);
  144. [propput, id(DISPID_TIMEDAELEMENT_IMAGE)] HRESULT image([in] VARIANT img);
  145. [propget, id(DISPID_TIMEDAELEMENT_SOUND)] HRESULT sound([out, retval] VARIANT * snd);
  146. [propput, id(DISPID_TIMEDAELEMENT_SOUND)] HRESULT sound([in] VARIANT snd);
  147. [propget, id(DISPID_TIMEDAELEMENT_RENDERMODE)] HRESULT renderMode([out, retval] VARIANT * mode);
  148. [propput, id(DISPID_TIMEDAELEMENT_RENDERMODE)] HRESULT renderMode([in] VARIANT mode);
  149. [id(DISPID_TIMEDAELEMENT_ADDDABEHAVIOR)]
  150. HRESULT addDABehavior([in] VARIANT bvr,
  151. [out, retval] LONG * cookie);
  152. [id(DISPID_TIMEDAELEMENT_REMOVEDABEHAVIOR)]
  153. HRESULT removeDABehavior([in] LONG cookie);
  154. [propget, id(DISPID_TIMEDAELEMENT_STATICS)]
  155. HRESULT statics([out, retval] IDispatch ** ppStatics);
  156. [propget, id(DISPID_TIMEDAELEMENT_RENDEROBJECT)]
  157. HRESULT renderObject([out, retval] ITIMEDAElementRender ** );
  158. };
  159. //
  160. // ITIMEBodyElement
  161. //
  162. [
  163. object,
  164. uuid(111c45f0-4de9-11d2-b954-00c04fa32195),
  165. dual,
  166. pointer_default(unique)
  167. ]
  168. interface ITIMEBodyElement : ITIMEElement
  169. {
  170. [propget, id(DISPID_TIMEBODYELEMENT_TIMESTARTRULE)] HRESULT timeStartRule([out, retval] BSTR * startrule);
  171. [propput, id(DISPID_TIMEBODYELEMENT_TIMESTARTRULE)] HRESULT timeStartRule([in] BSTR startrule);
  172. [id(DISPID_TIMEBODYELEMENT_ADDTIMEDAELEMENT)] HRESULT addTIMEDAElement([in] ITIMEDAElement * daelm);
  173. [id(DISPID_TIMEBODYELEMENT_REMOVETIMEDAELEMENT)] HRESULT removeTIMEDAElement([in] ITIMEDAElement * daelm);
  174. };
  175. [
  176. object,
  177. uuid(68675562-53ab-11d2-b955-3078302c2030),
  178. dual,
  179. pointer_default(unique)
  180. ]
  181. interface ITIMEMediaElement : ITIMEElement
  182. {
  183. [propget, id(DISPID_TIMEMEDIAELEMENT_SRC)] HRESULT src([out, retval] VARIANT * url);
  184. [propput, id(DISPID_TIMEMEDIAELEMENT_SRC)] HRESULT src([in] VARIANT url);
  185. [propget, id(DISPID_TIMEMEDIAELEMENT_IMG)] HRESULT img([out, retval] VARIANT * url);
  186. [propput, id(DISPID_TIMEMEDIAELEMENT_IMG)] HRESULT img([in] VARIANT url);
  187. [propget, id(DISPID_TIMEMEDIAELEMENT_PLAYER)] HRESULT player([out, retval] VARIANT * clsid);
  188. [propput, id(DISPID_TIMEMEDIAELEMENT_PLAYER)] HRESULT player([in] VARIANT clsid);
  189. [propget, id(DISPID_TIMEMEDIAELEMENT_SRCTYPE)] HRESULT type([out, retval] VARIANT * type);
  190. [propput, id(DISPID_TIMEMEDIAELEMENT_SRCTYPE)] HRESULT type([in] VARIANT type);
  191. [propget, id(DISPID_TIMEMEDIAELEMENT_PLAYEROBJECT)] HRESULT playerObject([out, retval] IDispatch **ppDisp);
  192. [propget, id(DISPID_TIMEMEDIAELEMENT_CLOCKSOURCE)] HRESULT clockSource([out, retval] VARIANT_BOOL * b);
  193. [propput, id(DISPID_TIMEMEDIAELEMENT_CLOCKSOURCE)] HRESULT clockSource([in] VARIANT_BOOL b);
  194. [propget, id(DISPID_TIMEMEDIAELEMENT_CLIPBEGIN)] HRESULT clipBegin([out, retval] VARIANT * type);
  195. [propput, id(DISPID_TIMEMEDIAELEMENT_CLIPBEGIN)] HRESULT clipBegin([in] VARIANT type);
  196. [propget, id(DISPID_TIMEMEDIAELEMENT_CLIPEND)] HRESULT clipEnd([out, retval] VARIANT * type);
  197. [propput, id(DISPID_TIMEMEDIAELEMENT_CLIPEND)] HRESULT clipEnd([in] VARIANT type);
  198. };
  199. [
  200. object,
  201. uuid(423e9da4-3e0d-11d2-b948-00c04fa32195),
  202. dual,
  203. hidden,
  204. pointer_default(unique)
  205. ]
  206. interface ITIMEFactory : IDispatch
  207. {
  208. [id(DISPID_TIMEFACTORY_CREATETIMEELEMENT)] HRESULT CreateTIMEElement([in] REFIID riid, [in] IUnknown *pUnk, [out, retval] void ** timeelm);
  209. [id(DISPID_TIMEFACTORY_CREATETIMEELEMENTBODY)] HRESULT CreateTIMEBodyElement([in] REFIID riid, [out, retval] void ** timeelm);
  210. [id(DISPID_TIMEFACTORY_CREATETIMEDAELEMENT)] HRESULT CreateTIMEDAElement([in] REFIID riid, [out, retval] void ** timeelm);
  211. [id(DISPID_TIMEFACTORY_CREATETIMEMEDIAELEMENT)] HRESULT CreateTIMEMediaElement([in] REFIID riid, [in] MediaType type, [out, retval] void ** timeelm);
  212. }
  213. [
  214. odl,
  215. oleautomation,
  216. dual,
  217. uuid(1C00BC3A-5E1C-11d2-B252-00A0C90D6111),
  218. ]
  219. interface ITIMEElementCollection : IDispatch
  220. {
  221. [propput, id(DISPID_TIMEELEMENTCOLLECTION_LENGTH)]
  222. HRESULT length([in] long v);
  223. [propget, id(DISPID_TIMEELEMENTCOLLECTION_LENGTH)]
  224. HRESULT length([retval, out] long * p);
  225. [propget, id(DISPID_TIMEELEMENTCOLLECTION__NEWENUM), restricted, hidden]
  226. HRESULT _newEnum([retval, out] IUnknown** ppIUnknown);
  227. [id(DISPID_TIMEELEMENTCOLLECTION_ITEM)]
  228. HRESULT item([optional, in] VARIANT varName,[optional, in] VARIANT varIndex,[retval, out] IDispatch** ppDisp);
  229. [id(DISPID_TIMEELEMENTCOLLECTION_TAGS)]
  230. HRESULT tags([in] VARIANT varName, [retval, out] IDispatch** ppDisp);
  231. };
  232. [
  233. odl,
  234. oleautomation,
  235. dual,
  236. uuid(E6FAA0B2-69FE-11d2-B259-00A0C90D6111),
  237. ]
  238. interface ITIMEMediaPlayer : IDispatch
  239. {
  240. [id(DISPID_TIMEMEDIAPLAYER_INIT)]
  241. HRESULT Init();
  242. [id(DISPID_TIMEMEDIAPLAYER_CLIPBEGIN)]
  243. HRESULT clipBegin([in] VARIANT varClipBegin);
  244. [id(DISPID_TIMEMEDIAPLAYER_CLIPEND)]
  245. HRESULT clipEnd([in] VARIANT varClipEnd);
  246. [id(DISPID_TIMEMEDIAPLAYER_BEGIN)]
  247. HRESULT begin();
  248. [id(DISPID_TIMEMEDIAPLAYER_END)]
  249. HRESULT end();
  250. [id(DISPID_TIMEMEDIAPLAYER_RESUME)]
  251. HRESULT resume();
  252. [id(DISPID_TIMEMEDIAPLAYER_PAUSE)]
  253. HRESULT pause();
  254. [id(DISPID_TIMEMEDIAPLAYER_TICK)]
  255. HRESULT tick();
  256. [propput, id(DISPID_TIMEMEDIAPLAYER_CURRENTTIME)]
  257. HRESULT CurrentTime([in] double dblCurrentTime);
  258. [propget, id(DISPID_TIMEMEDIAPLAYER_CURRENTTIME)]
  259. HRESULT CurrentTime([out, retval] double *dblCurrentTime);
  260. [propput, id(DISPID_TIMEMEDIAPLAYER_SRC)]
  261. HRESULT src([in] BSTR bstrURL);
  262. [propget, id(DISPID_TIMEMEDIAPLAYER_SRC)]
  263. HRESULT src([retval, out] BSTR *pbstrURL);
  264. [propput, id(DISPID_TIMEMEDIAPLAYER_REPEAT)]
  265. HRESULT repeat([in] long ltime);
  266. [propget, id(DISPID_TIMEMEDIAPLAYER_REPEAT)]
  267. HRESULT repeat([retval, out] long *ltime);
  268. [id(DISPID_TIMEMEDIAPLAYER_CUE)]
  269. HRESULT cue();
  270. };
  271. [
  272. hidden,
  273. uuid(4539E412-7813-11d2-B25F-00A0C90D6111)
  274. ]
  275. dispinterface TIMEMediaPlayerEvents
  276. {
  277. properties:
  278. methods:
  279. [id(DISPID_TIMEMEDIAPLAYEREVENTS_ONBEGIN)] void onbegin();
  280. [id(DISPID_TIMEMEDIAPLAYEREVENTS_ONEND)] void onend();
  281. [id(DISPID_TIMEMEDIAPLAYEREVENTS_ONRESUME)] void onresume();
  282. [id(DISPID_TIMEMEDIAPLAYEREVENTS_ONPAUSE)] void onpause();
  283. [id(DISPID_TIMEMEDIAPLAYEREVENTS_ONMEDIAREADY)] void onmediaready();
  284. [id(DISPID_TIMEMEDIAPLAYEREVENTS_ONMEDIASLIP)] void onmediaslip();
  285. [id(DISPID_TIMEMEDIAPLAYEREVENTS_ONMEDIALOADFAILED)] void onmedialoadfailed();
  286. [id(DISPID_TIMEMEDIAPLAYEREVENTS_READYSTATECHANGE)] void onreadystatechange(long readystate);
  287. };
  288. [
  289. object,
  290. uuid(73BA8F8A-80E0-11d2-B263-00A0C90D6111),
  291. dual,
  292. hidden,
  293. pointer_default(unique)
  294. ]
  295. interface ITIMEMMFactory : IDispatch
  296. {
  297. HRESULT CreateBehavior([in] BSTR id,
  298. [in] IDispatch *bvr,
  299. [out, retval] IUnknown **ppOut);
  300. HRESULT CreateTimeline([in] BSTR id,
  301. [out, retval] IUnknown **ppOut);
  302. HRESULT CreatePlayer([in] BSTR id,
  303. [in] IUnknown * bvr,
  304. [in] IServiceProvider * sp,
  305. [out, retval] IUnknown **ppOut);
  306. HRESULT CreateView([in] BSTR id,
  307. [in] IDispatch * imgbvr,
  308. [in] IDispatch * sndbvr,
  309. [in] IUnknown * viewsite,
  310. [out, retval] IUnknown **ppOut);
  311. }
  312. [
  313. uuid(33FDA1EA-80DF-11d2-B263-00A0C90D6111)
  314. ]
  315. coclass TIMEMMFactory
  316. {
  317. [default] interface ITIMEMMFactory;
  318. };
  319. [
  320. uuid(476c391c-3e0d-11d2-b948-00c04fa32195)
  321. ]
  322. coclass TIMEFactory
  323. {
  324. [default] interface ITIMEFactory;
  325. };
  326. }