1/* 2 * Copyright 2005 Jacek Caban 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Lesser General Public 6 * License as published by the Free Software Foundation; either 7 * version 2.1 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Lesser General Public License for more details. 13 * 14 * You should have received a copy of the GNU Lesser General Public 15 * License along with this library; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 17 */ 18 19import "urlmon.idl"; 20 21interface IHlink; 22interface IHlinkSite; 23interface IHlinkFrame; 24interface IHlinkBrowseContext; 25 26cpp_quote("HRESULT WINAPI HlinkCreateFromMoniker(IMoniker*, LPCWSTR, LPCWSTR, IHlinkSite*, DWORD, IUnknown*, REFIID, void**);") 27cpp_quote("HRESULT WINAPI HlinkCreateFromString(LPCWSTR, LPCWSTR, LPCWSTR, IHlinkSite*, DWORD, IUnknown*, REFIID, void**);") 28cpp_quote("HRESULT WINAPI HlinkCreateFromData(IDataObject*, IHlinkSite*, DWORD dwSiteData, IUnknown*, REFIID, void**);") 29cpp_quote("HRESULT WINAPI HlinkCreateExtensionServices(LPCWSTR, HWND, LPCWSTR, LPCWSTR, IUnknown*, REFIID, void**);") 30cpp_quote("HRESULT WINAPI HlinkQueryCreateFromData(IDataObject*);") 31cpp_quote("HRESULT WINAPI HlinkClone(IHlink*, REFIID, IHlinkSite*, DWORD, void **);") 32cpp_quote("HRESULT WINAPI HlinkCreateBrowseContext(IUnknown*, REFIID, void **);") 33cpp_quote("HRESULT WINAPI HlinkNavigateToStringReference(LPCWSTR, LPCWSTR, IHlinkSite*, DWORD, IHlinkFrame*, DWORD, LPBC, IBindStatusCallback*, IHlinkBrowseContext*);") 34cpp_quote("HRESULT WINAPI HlinkNavigate(IHlink*, IHlinkFrame*, DWORD, LPBC, IBindStatusCallback*, IHlinkBrowseContext*);") 35cpp_quote("HRESULT WINAPI HlinkOnNavigate(IHlinkFrame*, IHlinkBrowseContext*, DWORD, IMoniker*, LPCWSTR, LPCWSTR, ULONG*);") 36cpp_quote("HRESULT WINAPI HlinkIsShortcut(LPCWSTR);") 37cpp_quote("HRESULT WINAPI HlinkTranslateURL(LPCWSTR,DWORD,LPWSTR*);") 38cpp_quote("HRESULT WINAPI HlinkParseDisplayName(LPBC,LPCWSTR,BOOL,ULONG*,IMoniker**);") 39cpp_quote("HRESULT WINAPI HlinkResolveMonikerForData(LPMONIKER,DWORD,LPBC,ULONG,FORMATETC*,IBindStatusCallback*,LPMONIKER);") 40cpp_quote("HRESULT WINAPI HlinkUpdateStackItem(IHlinkFrame*, IHlinkBrowseContext*, ULONG, IMoniker*, LPCWSTR, LPCWSTR);") 41 42typedef enum _HLSR_NOREDEF10 { 43 HLSR_HOME, 44 HLSR_SEARCHPAGE, 45 HLSR_HISTORYFOLDER 46} HLSR; 47 48cpp_quote("HRESULT WINAPI HlinkSetSpecialReference(ULONG uReference, LPCWSTR pwzReference);") 49cpp_quote("HRESULT WINAPI HlinkGetSpecialReference(ULONG uReference, LPWSTR *ppwzReference);") 50 51cpp_quote("#define SID_SHlinkFrame IID_IHlinkFrame") 52 53/***************************************************************************** 54 * IHlink interface 55 */ 56[ 57 object, 58 uuid(79EAC9C3-BAF9-11CE-8C82-00AA004BA90B), 59 pointer_default(unique) 60] 61interface IHlink: IUnknown 62{ 63 typedef [unique] IHlink *LPHLINK; 64 65 typedef enum { 66 HLNF_INTERNALJUMP = 0x00000001, 67 HLNF_OPENINNEWWINDOW = 0x00000002, 68 HLNF_NAVIGATINGBACK = 0x00000004, 69 HLNF_NAVIGATINGFORWARD = 0x00000008, 70 HLNF_NAVIGATINGTOSTACKITEM = 0x00000010, 71 HLNF_CREATENOHISTORY = 0x00000020 72 } HLNF; 73 74 typedef enum { 75 HLINKGETREF_DEFAULT = 0, 76 HLINKGETREF_ABSOLUTE = 1, 77 HLINKGETREF_RELATIVE = 2, 78 } HLINKGETREF; 79 80 typedef enum { 81 HLFNAMEF_DEFAULT = 0x00000000, 82 HLFNAMEF_TRYCACHE = 0x00000001, 83 HLFNAMEF_TRYPRETTYTARGET = 0x00000002, 84 HLFNAMEF_TRYFULLTARGET = 0x00000004, 85 HLFNAMEF_TRYWIN95SHORTCUT = 0x00000008 86 } HLFNAMEF; 87 88 typedef enum { 89 HLINKMISC_RELATIVE = 0x00000001, 90 } HLINKMISC; 91 92 typedef enum { 93 HLINKSETF_TARGET = 0x00000001, 94 HLINKSETF_LOCATION = 0x00000002 95 } HLINKSETF; 96 97 HRESULT SetHlinkSite( 98 [in, unique] IHlinkSite *pihlSite, 99 [in] DWORD dwSiteData); 100 101 HRESULT GetHlinkSite( 102 [out] IHlinkSite **ppihlSite, 103 [out] DWORD *pdwSiteData); 104 105 HRESULT SetMonikerReference( 106 [in] DWORD grfHLSETF, 107 [in, unique] IMoniker *pimkTarget, 108 [in, unique] LPCWSTR pwzLocation); 109 110 HRESULT GetMonikerReference( 111 [in] DWORD dwWhichRef, 112 [out] IMoniker **ppimkTarget, 113 [out] LPWSTR *ppwzLocation); 114 115 HRESULT SetStringReference( 116 [in] DWORD grfHLSETF, 117 [in, unique] LPCWSTR pwzTarget, 118 [in, unique] LPCWSTR pwzLocation); 119 120 HRESULT GetStringReference( 121 [in] DWORD dwWhichRef, 122 [out] LPWSTR *ppwzTarget, 123 [out] LPWSTR *ppwzLocation); 124 125 HRESULT SetFriendlyName( 126 [in, unique] LPCWSTR pwzFriendlyName); 127 128 HRESULT GetFriendlyName( 129 [in] DWORD grfHLFNAMEF, 130 [out] LPWSTR *ppwzFriendlyName); 131 132 HRESULT SetTargetFrameName( 133 [in, unique] LPCWSTR pwzTargetFrameName); 134 135 HRESULT GetTargetFrameName( 136 [out] LPWSTR *ppwzTargetFrameName); 137 138 HRESULT GetMiscStatus( 139 [out] DWORD *pdwStatus); 140 141 HRESULT Navigate( 142 [in] DWORD grfHLNF, 143 [in, unique] LPBC pibc, 144 [in, unique] IBindStatusCallback *pibsc, 145 [in, unique] IHlinkBrowseContext *pihlbc); 146 147 HRESULT SetAdditionalParams( 148 [in, unique] LPCWSTR pwzAdditionalParams); 149 150 HRESULT GetAdditionalParams( 151 [out] LPWSTR *ppwzAdditionalParams); 152} 153 154/***************************************************************************** 155 * IHlinkSite interface 156 */ 157[ 158 object, 159 uuid(79EAC9C2-BAF9-11CE-8C82-00AA004BA90B), 160 pointer_default(unique) 161] 162interface IHlinkSite: IUnknown 163{ 164 typedef [unique] IHlinkSite *LPHLINKSITE; 165 166 typedef enum { 167 HLINKWHICHMK_CONTAINER = 1, 168 HLINKWHICHMK_BASE = 2, 169 } HLINKWHICHMK; 170 171 HRESULT QueryService( 172 [in] DWORD dwSiteData, 173 [in] REFGUID guidService, 174 [in] REFIID riid, 175 [out, iid_is(riid)] IUnknown **ppiunk); 176 177 HRESULT GetMoniker( 178 [in] DWORD dwSiteData, 179 [in] DWORD dwAssign, 180 [in] DWORD dwWhich, 181 [out] IMoniker **ppimk); 182 183 HRESULT ReadyToNavigate( 184 [in] DWORD dwSiteData, 185 [in] DWORD dwReserved); 186 187 HRESULT OnNavigationComplete( 188 [in] DWORD dwSiteData, 189 [in] DWORD dwreserved, 190 [in] HRESULT hrError, 191 [in, unique] LPCWSTR pwzError); 192} 193 194/***************************************************************************** 195 * IEnumHLITEM interface 196 */ 197[ 198 local, 199 object, 200 uuid(79EAC9C6-BAF9-11CE-8C82-00AA004BA90B), 201 pointer_default(unique) 202] 203interface IEnumHLITEM : IUnknown 204{ 205 typedef [unique] IEnumHLITEM *LPENUMHLITEM; 206 207 typedef struct tagHLITEM { 208 ULONG uHLID; 209 LPWSTR pwzFriendlyName; 210 } HLITEM; 211 typedef [unique] HLITEM *LPHLITEM; 212 213 HRESULT Next( 214 [in] ULONG celt, 215 [out] HLITEM *rgelt, 216 [out] ULONG *pceltFetched); 217 218 HRESULT Skip( 219 [in] ULONG celt); 220 221 HRESULT Reset(); 222 223 HRESULT Clone( 224 [out] IEnumHLITEM **ppienumhlitem); 225} 226 227/***************************************************************************** 228 * IHlinkBrowseContext interface 229 */ 230[ 231 local, 232 object, 233 uuid(79EAC9C7-BAF9-11CE-8C82-00AA004BA90B), 234 pointer_default(unique) 235] 236interface IHlinkBrowseContext : IUnknown 237{ 238 typedef [unique] IHlinkBrowseContext *LPHLINKBROWSECONTEXT; 239 240 enum { 241 HLTB_DOCKEDLEFT = 0, 242 HLTB_DOCKEDTOP = 1, 243 HLTB_DOCKEDRIGHT = 2, 244 HLTB_DOCKEDBOTTOM = 3, 245 HLTB_FLOATING = 4 246 }; 247 248 typedef struct _tagHLTBINFO { 249 ULONG uDockType; 250 RECT rcTbPos; 251 } HLTBINFO; 252 253 enum { 254 HLBWIF_HASFRAMEWNDINFO = 0x00000001, 255 HLBWIF_HASDOCWNDINFO = 0x00000002, 256 HLBWIF_FRAMEWNDMAXIMIZED = 0x00000004, 257 HLBWIF_DOCWNDMAXIMIZED = 0x00000008, 258 HLBWIF_HASWEBTOOLBARINFO = 0x00000010, 259 HLBWIF_WEBTOOLBARHIDDEN = 0x00000020 260 }; 261 262 typedef struct _tagHLBWINFO { 263 ULONG cbSize; 264 DWORD grfHLBWIF; 265 RECT rcFramePos; 266 RECT rcDocPos; 267 HLTBINFO hltbinfo; 268 } HLBWINFO; 269 270 typedef [unique] HLBWINFO *LPHLBWINFO; 271 272 enum { 273 HLID_INVALID = 0x00000000, 274 HLID_PREVIOUS = 0xFFFFFFFF, 275 HLID_NEXT = 0xFFFFFFFE, 276 HLID_CURRENT = 0xFFFFFFFD, 277 HLID_STACKBOTTOM = 0xFFFFFFFC, 278 HLID_STACKTOP = 0xFFFFFFFB 279 }; 280 281 enum { 282 HLQF_ISVALID = 0x00000001, 283 HLQF_ISCURRENT = 0x00000002 284 }; 285 286 HRESULT Register( 287 [in] DWORD reserved, 288 [in, unique] IUnknown *piunk, 289 [in, unique] IMoniker *pimk, 290 [out] DWORD *pdwRegister); 291 292cpp_quote("#ifdef WINE_NO_UNICODE_MACROS") 293cpp_quote("#undef GetObject") 294cpp_quote("#endif") 295 296 HRESULT GetObject( 297 [in, unique] IMoniker *pimk, 298 [in] BOOL fBindIfRootRegistered, 299 [out] IUnknown **ppiunk); 300 301 HRESULT Revoke( 302 [in] DWORD dwRegister); 303 304 HRESULT SetBrowseWindowInfo( 305 [in, unique] HLBWINFO *phlbwi); 306 307 HRESULT GetBrowseWindowInfo( 308 [out] HLBWINFO *phlbwi); 309 310 HRESULT SetInitialHlink( 311 [in, unique] IMoniker * pimkTarget, 312 [in, unique] LPCWSTR pwzLocation, 313 [in, unique] LPCWSTR pwzFriendlyName); 314 315 HRESULT OnNavigateHlink( 316 [in] DWORD grfHLNF, 317 [in, unique] IMoniker *pimkTarget, 318 [in, unique] LPCWSTR pwzLocation, 319 [in, unique] LPCWSTR pwzFriendlyName, 320 [out] ULONG *puHLID); 321 322 HRESULT UpdateHlink( 323 [in] ULONG uHLID, 324 [in, unique] IMoniker *pimkTarget, 325 [in, unique] LPCWSTR pwzLocation, 326 [in, unique] LPCWSTR pwzFriendlyName); 327 328 HRESULT EnumNavigationStack( 329 [in] DWORD dwReserved, 330 [in] DWORD grfHLFNAMEF, 331 [out] IEnumHLITEM **ppienumhlitem); 332 333 HRESULT QueryHlink( 334 [in] DWORD grfHLQF, 335 [in] ULONG uHLID); 336 337 HRESULT GetHlink( 338 [in] ULONG uHLID, 339 [out] IHlink **ppihl); 340 341 HRESULT SetCurrentHlink( 342 [in] ULONG uHLID); 343 344 HRESULT Clone( 345 [in, unique] IUnknown *piunkOuter, 346 [in] REFIID riid, 347 [out, iid_is(riid)] IUnknown **ppiunkObj); 348 349 HRESULT Close( 350 [in] DWORD reserved); 351} 352 353 354/***************************************************************************** 355 * IHlinkTarget interface 356 */ 357[ 358 object, 359 uuid(79EAC9C4-BAF9-11CE-8C82-00AA004BA90B), 360 pointer_default(unique) 361] 362interface IHlinkTarget : IUnknown 363{ 364 typedef [unique] IHlinkTarget *LPHLINKTARGET; 365 366 HRESULT SetBrowseContext( 367 [in, unique] IHlinkBrowseContext *pihlbc); 368 369 HRESULT GetBrowseContext( 370 [out] IHlinkBrowseContext **ppihlbc); 371 372 HRESULT Navigate( 373 [in] DWORD grfHLNF, 374 [in, unique] LPCWSTR pwzJumpLocation); 375 376 HRESULT GetMoniker( 377 [in,unique] LPCWSTR pwzLocation, 378 [in] DWORD dwAssign, 379 [out] IMoniker **ppimkLocation); 380 381 HRESULT GetFriendlyName( 382 [in,unique] LPCWSTR pwzLocation, 383 [out] LPWSTR *ppwzFriendlyName); 384} 385 386/***************************************************************************** 387 * IHlinkFrame interface 388 */ 389[ 390 object, 391 uuid(79eac9c5-baf9-11ce-8c82-00aa004ba90b), 392 pointer_default(unique) 393] 394 395interface IHlinkFrame : IUnknown 396{ 397 typedef IHlinkFrame *LPHLINKFRAME; 398 399 HRESULT SetBrowseContext( 400 [in, unique] IHlinkBrowseContext * pihlbc); 401 HRESULT GetBrowseContext( 402 [out] IHlinkBrowseContext ** ppihlbc); 403 HRESULT Navigate( 404 [in] DWORD grfHLNF, 405 [in, unique] LPBC pbc, 406 [in, unique] IBindStatusCallback *pibsc, 407 [in, unique] IHlink *pihlNavigate); 408 HRESULT OnNavigate( 409 [in] DWORD grfHLNF, 410 [in, unique] IMoniker *pimkTarget, 411 [in, unique] LPCWSTR pwzLocation, 412 [in, unique] LPCWSTR pwzFriendlyName, 413 [in] DWORD dwreserved); 414 HRESULT UpdateHlink( 415 [in] ULONG uHLID, 416 [in, unique] IMoniker *pimkTarget, 417 [in, unique] LPCWSTR pwzLocation, 418 [in, unique] LPCWSTR pwzFriendlyName); 419} 420 421/***************************************************************************** 422 * IExtensionServices interface 423 */ 424[ 425 object, 426 uuid(79eac9cb-baf9-11ce-8c82-00aa004ba90b), 427 pointer_default(unique) 428] 429 430interface IExtensionServices: IUnknown 431{ 432 typedef IExtensionServices *LPEXTENSIONSERVICES; 433 434 HRESULT SetAdditionalHeaders( 435 [in] LPCWSTR pwzAdditionalHeaders); 436 437 HRESULT SetAuthenticateData( 438 [in] HWND phwnd, 439 [in] LPCWSTR pwzUsername, 440 [in] LPCWSTR pwzPassword); 441} 442