IWebHistoryItem.idl 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. /*
  2. * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
  3. *
  4. * Redistribution and use in source and binary forms, with or without
  5. * modification, are permitted provided that the following conditions
  6. * are met:
  7. * 1. Redistributions of source code must retain the above copyright
  8. * notice, this list of conditions and the following disclaimer.
  9. * 2. Redistributions in binary form must reproduce the above copyright
  10. * notice, this list of conditions and the following disclaimer in the
  11. * documentation and/or other materials provided with the distribution.
  12. *
  13. * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
  14. * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  15. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  16. * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
  17. * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  18. * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  19. * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  20. * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
  21. * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  22. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  23. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  24. */
  25. #ifndef DO_NO_IMPORTS
  26. import "oaidl.idl";
  27. import "ocidl.idl";
  28. #endif
  29. /*!
  30. @class WebHistoryItem
  31. @discussion WebHistoryItems are created by WebKit to represent pages visited.
  32. The WebBackForwardList and WebHistory classes both use WebHistoryItems to represent
  33. pages visited. With the exception of the displayTitle, the properties of
  34. WebHistoryItems are set by WebKit. WebHistoryItems are normally never created directly.
  35. */
  36. [
  37. object,
  38. oleautomation,
  39. hidden,
  40. uuid(1E2970AE-72B7-4500-A7A0-12B0FFEB91FC),
  41. pointer_default(unique)
  42. ]
  43. interface IWebHistoryItem : IUnknown
  44. {
  45. /*!
  46. @method initWithURLString:title:lastVisitedTimeInterval:
  47. @param URLString The URL string for the item.
  48. @param title The title to use for the item. This is normally the <title> of a page.
  49. @param time The time used to indicate when the item was used.
  50. @abstract Initialize a new WebHistoryItem
  51. @discussion WebHistoryItems are normally created for you by the WebKit.
  52. You may use this method to prepopulate a WebBackForwardList, or create
  53. 'artificial' items to add to a WebBackForwardList. When first initialized
  54. the URLString and originalURLString will be the same.
  55. - (id)initWithURLString:(NSString *)URLString title:(NSString *)title lastVisitedTimeInterval:(NSTimeInterval)time;
  56. */
  57. HRESULT initWithURLString([in] BSTR urlString, [in] BSTR title, [in] DATE lastVisited);
  58. /*!
  59. @method originalURLString
  60. @abstract The string representation of the originial URL of this item.
  61. This value is normally set by the WebKit.
  62. @result The string corresponding to the initial URL of this item.
  63. - (NSString *)originalURLString;
  64. */
  65. HRESULT originalURLString([out, retval] BSTR* url);
  66. /*!
  67. @method URLString
  68. @abstract The string representation of the URL represented by this item.
  69. @discussion The URLString may be different than the originalURLString if the page
  70. redirected to a new location. This value is normally set by the WebKit.
  71. @result The string corresponding to the final URL of this item.
  72. - (NSString *)URLString;
  73. */
  74. HRESULT URLString([out, retval] BSTR* url);
  75. /*!
  76. @method title
  77. @abstract The title of the page represented by this item.
  78. @discussion This title cannot be changed by the client. This value
  79. is normally set by the WebKit when a page title for the item is received.
  80. @result The title of this item.
  81. - (NSString *)title;
  82. */
  83. HRESULT title([out, retval] BSTR* pageTitle);
  84. /*!
  85. @method lastVisitedTimeInterval
  86. @abstract The last time the page represented by this item was visited. The interval
  87. is since the reference date as determined by NSDate. This value is normally set by
  88. the WebKit.
  89. @result The last time this item was visited.
  90. - (NSTimeInterval)lastVisitedTimeInterval;
  91. */
  92. HRESULT lastVisitedTimeInterval([out, retval] DATE* lastVisited);
  93. /*!
  94. @method setAlternateTitle:
  95. @param alternateTitle The new display title for this item.
  96. @abstract A title that may be used by the client to display this item.
  97. - (void)setAlternateTitle:(NSString *)alternateTitle;
  98. */
  99. HRESULT setAlternateTitle([in] BSTR title);
  100. /*
  101. @method title
  102. @abstract A title that may be used by the client to display this item.
  103. @result The alternate title for this item.
  104. - (NSString *)alternateTitle;
  105. */
  106. HRESULT alternateTitle([out, retval] BSTR* title);
  107. /*!
  108. @method icon
  109. @abstract The favorite icon of the page represented by this item.
  110. @discussion This icon returned will be determined by the WebKit.
  111. @result The icon associated with this item's URL.
  112. - (NSImage *)icon;
  113. */
  114. HRESULT icon([out, retval] OLE_HANDLE* hBitmap);
  115. }