/*
 * Copyright 2006 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";

/*****************************************************************************
 *    ITargetNotify interface
 */
[
    object,
    uuid(863a99a0-21bc-11d0-82b4-00a0c90c29c5),
    pointer_default(unique)
]
interface ITargetNotify : IUnknown
{
    typedef [unique] ITargetNotify *LPTARGETNOTIFY;

    HRESULT OnCreate(
            [in] IUnknown *pUnkDestination,
            [in] ULONG cbCookie);

    HRESULT OnReuse([in] IUnknown *pUnkDestination);
}

/*****************************************************************************
 *    ITargetNotify2 interface
 */
[
    object,
    uuid(3050f6b1-98b5-11cf-bb82-00aa00bdce0b),
    pointer_default(unique)
]
interface ITargetNotify2 : ITargetNotify
{
    typedef [unique] ITargetNotify2 *LPTARGETNOTIFY2;

    HRESULT GetOptionString([in,out] BSTR *pbstrOptions);
}

/*****************************************************************************
 *    ITargetFrame2 interface
 */
[
    object,
    uuid(86d52e11-94a8-11d0-82af-00c04fd5ae38),
    pointer_default(unique)
]
interface ITargetFrame2 : IUnknown
{
    typedef [unique] ITargetFrame2 *LPTARGETFRAME2;

    typedef enum {
        FINDFRAME_NONE               = 0,
        FINDFRAME_JUSTTESTEXISTENCE  = 1,
        FINDFRAME_INTERNAL           = 0x80000000
    } FINDFRAME_FLAGS;

    typedef enum {
        FRAMEOPTIONS_SCROLL_YES   = 0x00000001,
        FRAMEOPTIONS_SCROLL_NO    = 0x00000002,
        FRAMEOPTIONS_SCROLL_AUTO  = 0x00000004,
        FRAMEOPTIONS_NORESIZE     = 0x00000008,
        FRAMEOPTIONS_NO3DBORDER   = 0x00000010,
        FRAMEOPTIONS_DESKTOP      = 0x00000020,
        FRAMEOPTIONS_BROWSERBAND  = 0x00000040
    } FRAMEOPTIONS_FLAGS;

    HRESULT SetFrameName([in] LPCWSTR pszFrameName);

    HRESULT GetFrameName([out] LPWSTR *ppszFrameName);

    HRESULT GetParentFrame([out] IUnknown **ppunkParent);

    HRESULT SetFrameSrc([in] LPCWSTR pszFrameSrc);

    HRESULT GetFrameSrc([out] LPWSTR *ppszFrameSrc);

    HRESULT GetFramesContainer([out] IOleContainer **ppContainer);

    HRESULT SetFrameOptions([in] DWORD dwFlags);

    HRESULT GetFrameOptions([out] DWORD *pdwFlags);

    HRESULT SetFrameMargins(
            [in] DWORD dwWidth,
            [in] DWORD dwHeight);

    HRESULT GetFrameMargins(
            [out] DWORD *pdwWidth,
            [out] DWORD *pdwHeight);

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

    HRESULT GetTargetAlias(
            [in,unique] LPCWSTR pszTargetName,
             [out] LPWSTR *ppszTargetAlias);
}

/*****************************************************************************
 *    ITargetContainer interface
 */
[
    object,
    uuid(7847ec01-2bec-11d0-82b4-00a0c90C29c5),
    pointer_default(unique)
]
interface ITargetContainer : IUnknown
{
    typedef [unique] ITargetContainer *LPTARGETCONTAINER;

    HRESULT GetFrameUrl([out] LPWSTR *ppszFrameSrc);

    HRESULT GetFramesContainer([out] IOleContainer **ppContainer);

}