PreviewSimulation.idl 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. /******************************************************************************
  2. |* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  3. |* ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  4. |* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  5. |* PARTICULAR PURPOSE.
  6. |*
  7. |* Copyright 1995-2005 Nero AG and its licensors. All Rights Reserved.
  8. |*-----------------------------------------------------------------------------
  9. |* NeroSDK / NeroVisionAPI
  10. |*
  11. |* PROGRAM: PreviewSimulation.idl
  12. |*
  13. |* PURPOSE: Interface definition of the NeroVision API
  14. ******************************************************************************/
  15. [
  16. local, uuid(67240823-38DA-4693-A9C3-D4EEAC602CB8),
  17. helpstring("Callback interface given to the simulation to get notifications during playback")
  18. ]
  19. interface IPreviewCallback : IUnknown
  20. {
  21. HRESULT NotifyPosChanged([in] double pos, [in] int title, [in] int chapter);
  22. HRESULT NotifyPlaybackEnd();
  23. };
  24. [
  25. local, uuid(75A17C62-CCB7-4801-B1A1-C3868C8EF2FE),
  26. helpstring("Interface for previewing a project or title")
  27. ]
  28. interface IPreview : IUnknown
  29. {
  30. typedef [helpstring("The supported input keys for the simulation")]
  31. enum
  32. {
  33. SimulationKey_Play,
  34. SimulationKey_Pause,
  35. SimulationKey_Up,
  36. SimulationKey_Down,
  37. SimulationKey_Left,
  38. SimulationKey_Right,
  39. SimulationKey_Enter,
  40. SimulationKey_RootMenu,
  41. SimulationKey_TitleMenu,
  42. SimulationKey_Prev,
  43. SimulationKey_Next,
  44. SimulationKey_Return,
  45. SimulationKey_Numeric
  46. } SimulationKey;
  47. typedef [helpstring("The state of the simulation")]
  48. enum
  49. {
  50. SimulationState_Stopped,
  51. SimulationState_Paused,
  52. SimulationState_Running
  53. } SimulationState;
  54. [helpstring("Sets the project and item to preview.")]
  55. HRESULT SetPreviewContext([in] IProject* project, [in] BSTR xmlID, [out, retval] boolean* pbSuccess);
  56. [helpstring("Specifies the placement of the preview window.")]
  57. HRESULT SetPreviewWindow([in] HANDLE_PTR hParentWnd, [in] int left, [in] int top, [in] int right, [in] int bottom, [out, retval] boolean* pbSuccess);
  58. [propput, helpstring("Sets the bitmap to display while no video is shown. The DIB handle must be freed by the caller.")]
  59. HRESULT BackgroundBitmap([in] HANDLE_PTR hDib);
  60. [propput, helpstring("Sets the color of the preview window while no video is shown.")]
  61. HRESULT BackgroundColor([in] COLORREF color);
  62. [helpstring("Forwards a message to the video window.")]
  63. HRESULT NotifyOwnerMessage([in] long uMsg, [in] long wParam, [in] long lParam);
  64. [helpstring("Starts the preview.")]
  65. HRESULT StartPreview([out, retval] boolean* pbSuccess);
  66. [helpstring("Stops the preview.")]
  67. HRESULT StopPreview();
  68. [helpstring("Sets the preview position to a title or chapter specified by an XML ID.")]
  69. HRESULT JumpToID([in] BSTR xmlID, [out, retval] boolean* pbSuccess);
  70. [helpstring("Sets the preview position to a chapter specified by title and chapter numbers.")]
  71. HRESULT JumpToChapter([in] int title, [in] int chapter, [out, retval] boolean* pbSuccess);
  72. [helpstring("Retrieves the current title and chapter numbers.")]
  73. HRESULT GetCurrentChapter([out] int* title, [out] int* chapter);
  74. [propget, helpstring("Gets the total duration of the title currently being previewed.")]
  75. HRESULT Duration([out, retval] double* duration);
  76. [propput, helpstring("Sets the audio volume.")]
  77. HRESULT Volume([in] double volume);
  78. [propget, helpstring("Gets the audio volume.")]
  79. HRESULT Volume([out, retval] double* volume);
  80. [propput, helpstring("Sets the preview position within the current title.")]
  81. HRESULT Position([in] double pos);
  82. [propget, helpstring("Gets the preview position within the current title")]
  83. HRESULT Position([out, retval] double* pos);
  84. [propget, helpstring("Gets the current state of the simulation.")]
  85. HRESULT State([out, retval] SimulationState* state);
  86. [helpstring("Provides key input to the simulation.")]
  87. HRESULT HandleKeyInput([in] SimulationKey key);
  88. [helpstring("Provides numeric input to the simulation.")]
  89. HRESULT HandleNumericInput([in] unsigned char num);
  90. [helpstring("Queries whether a specific key is supported by the preview.")]
  91. HRESULT IsKeySupported([in] SimulationKey key, [out, retval] boolean* supported);
  92. [propput, helpstring("Sets the callback interface for the preview.")]
  93. HRESULT Callback([in] IPreviewCallback* notify);
  94. [propget, helpstring("Gets the error object of the last called function.")]
  95. HRESULT LastError([out, retval] IError** pError);
  96. };
  97. [
  98. uuid(FDEC7B7F-1209-40bc-AA36-9CAC8CD1A35A),
  99. helpstring("Preview object"),
  100. ]
  101. coclass Preview
  102. {
  103. [default] interface IPreview;
  104. };