2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
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.
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.
33 @discussion WebHistoryItems are created by WebKit to represent pages visited.
34 The WebBackForwardList and WebHistory classes both use WebHistoryItems to represent
35 pages visited. With the exception of the displayTitle, the properties of
36 WebHistoryItems are set by WebKit. WebHistoryItems are normally never created directly.
42 uuid(1E2970AE-72B7-4500-A7A0-12B0FFEB91FC),
43 pointer_default(unique)
45 interface IWebHistoryItem : IUnknown
48 @method initWithURLString:title:lastVisitedTimeInterval:
49 @param URLString The URL string for the item.
50 @param title The title to use for the item. This is normally the <title> of a page.
51 @param time The time used to indicate when the item was used.
52 @abstract Initialize a new WebHistoryItem
53 @discussion WebHistoryItems are normally created for you by the WebKit.
54 You may use this method to prepopulate a WebBackForwardList, or create
55 'artificial' items to add to a WebBackForwardList. When first initialized
56 the URLString and originalURLString will be the same.
57 - (id)initWithURLString:(NSString *)URLString title:(NSString *)title lastVisitedTimeInterval:(NSTimeInterval)time;
59 HRESULT initWithURLString([in] BSTR urlString, [in] BSTR title, [in] DATE lastVisited);
62 @method originalURLString
63 @abstract The string representation of the originial URL of this item.
64 This value is normally set by the WebKit.
65 @result The string corresponding to the initial URL of this item.
66 - (NSString *)originalURLString;
68 HRESULT originalURLString([out, retval] BSTR* url);
72 @abstract The string representation of the URL represented by this item.
73 @discussion The URLString may be different than the originalURLString if the page
74 redirected to a new location. This value is normally set by the WebKit.
75 @result The string corresponding to the final URL of this item.
76 - (NSString *)URLString;
78 HRESULT URLString([out, retval] BSTR* url);
83 @abstract The title of the page represented by this item.
84 @discussion This title cannot be changed by the client. This value
85 is normally set by the WebKit when a page title for the item is received.
86 @result The title of this item.
89 HRESULT title([out, retval] BSTR* pageTitle);
92 @method lastVisitedTimeInterval
93 @abstract The last time the page represented by this item was visited. The interval
94 is since the reference date as determined by NSDate. This value is normally set by
96 @result The last time this item was visited.
97 - (NSTimeInterval)lastVisitedTimeInterval;
99 HRESULT lastVisitedTimeInterval([out, retval] DATE* lastVisited);
102 @method setAlternateTitle:
103 @param alternateTitle The new display title for this item.
104 @abstract A title that may be used by the client to display this item.
105 - (void)setAlternateTitle:(NSString *)alternateTitle;
107 HRESULT setAlternateTitle([in] BSTR title);
111 @abstract A title that may be used by the client to display this item.
112 @result The alternate title for this item.
113 - (NSString *)alternateTitle;
115 HRESULT alternateTitle([out, retval] BSTR* title);
119 @abstract The favorite icon of the page represented by this item.
120 @discussion This icon returned will be determined by the WebKit.
121 @result The icon associated with this item's URL.
124 HRESULT icon([out, retval] OLE_HANDLE* hBitmap);