/*
 * Copyright 2006,2011 Jacek Caban for CodeWeavers
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 */

import "objidl.idl";
import "oleidl.idl";
import "urlmon.idl";

cpp_quote("#include <htiframe.h>")


/*****************************************************************************
 *    ITargetFrame interface
 */
[
    object,
    uuid(d5f78c80-5252-11cf-90fa-00aa0042106e),
    pointer_default(unique)
]
interface ITargetFrame: IUnknown
{
    typedef [unique] ITargetFrame *LPTARGETFRAME;

    typedef enum {
        NAVIGATEFRAME_FL_RECORD                    = 0x01,
        NAVIGATEFRAME_FL_POST                      = 0x02,
        NAVIGATEFRAME_FL_NO_DOC_CACHE              = 0x04,
        NAVIGATEFRAME_FL_NO_IMAGE_CACHE            = 0x08,
        NAVIGATEFRAME_FL_AUTH_FAIL_CACHE_OK        = 0x10,
        NAVIGATEFRAME_FL_SENDING_FROM_FORM         = 0x20,
        NAVIGATEFRAME_FL_REALLY_SENDING_FROM_FORM  = 0x40
    } NAVIGATEFRAME_FLAGS;

    typedef struct tagNavigateData {
        ULONG ulTarget;
        ULONG ulURL;
        ULONG ulRefURL;
        ULONG ulPostData;
        DWORD dwFlags;
    } NAVIGATEDATA;

    HRESULT SetFrameName([in] LPCWSTR pszFrameName);
    HRESULT GetFrameName([out] LPWSTR *ppszFrameName);
    HRESULT GetParentFrame([out] IUnknown **ppunkParent);

    HRESULT FindFrame(
            [in] LPCWSTR pszTargetName,
            [in] IUnknown *ppunkContextFrame,
            [in] DWORD dwFlags,
            [out] IUnknown **ppunkTargetFrame);

    HRESULT SetFrameSrc([in] LPCWSTR pszFrameSrc);
    HRESULT GetFrameSrc([out] LPWSTR *ppszFrameSrc);
}

/*****************************************************************************
 *    ITargetFramePriv interface
 */
[
    object,
    uuid(9216e421-2bf5-11d0-82b4-00a0c90c29c5),
    pointer_default(unique)
]
interface ITargetFramePriv : IUnknown
{
    typedef [unique] ITargetFramePriv *LPTARGETFRAMEPRIV;

    HRESULT FindFrameDownwards(
            [in] LPCWSTR pszTargetName,
            [in] DWORD dwFlags,
            [out] IUnknown **ppunkTargetFrame);

    HRESULT FindFrameInContext(
            [in] LPCWSTR pszTargetName,
            [in] IUnknown *punkContextFrame,
            [in] DWORD dwFlags,
            [out] IUnknown **ppunkTargetFrame);

    HRESULT OnChildFrameActivate([in] IUnknown *pUnkChildFrame);
    HRESULT OnChildFrameDeactivate([in] IUnknown *pUnkChildFrame);

    HRESULT NavigateHack(
            [in] DWORD grfHLNF,
            [in, unique] LPBC pbc,
            [in, unique] IBindStatusCallback *pibsc,
            [in, unique] LPCWSTR pszTargetName,
            [in] LPCWSTR pszUrl,
            [in, unique] LPCWSTR pszLocation);

    HRESULT FindBrowserByIndex(
            [in] DWORD dwID,
            [out] IUnknown **ppunkBrowser);
}

/*****************************************************************************
 *    ITargetFramePriv2 interface
 */
[
    object,
    uuid(b2c867e6-69d6-46f2-a611-ded9a4bd7fef),
    pointer_default(unique)
]
interface ITargetFramePriv2 : ITargetFramePriv
{
    typedef [unique] ITargetFramePriv2 *LPTARGETFRAMEPRIV2;

    HRESULT AggregatedNavigation2(
            [in] DWORD grfHLNF,
            [in, unique] LPBC pbc,
            [in, unique] IBindStatusCallback *pibsc,
            [in, unique] LPCWSTR pszTargetName,
            [in] IUri *pUri,
            [in, unique] LPCWSTR pszLocation);
}