Initial checkin for mozEmbed, XPCOM based embedding component. Not part of the mozilla build.

This commit is contained in:
radha%netscape.com 2002-08-13 19:21:53 +00:00
Родитель 716944e91f
Коммит 17f931a950
8 изменённых файлов: 318 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,32 @@
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): radha@netscape.com
#
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = public src
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -0,0 +1,26 @@
#!nmake
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
DEPTH=..\..\..
DIRS=public src
include <$(DEPTH)\config\rules.mak>

Просмотреть файл

Просмотреть файл

@ -0,0 +1,37 @@
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = mozEmbed
XPIDLSRCS = nsIQABrowserChrome.idl \
nsIQABrowserUIGlue.idl \
nsIQABrowserView.idl \
$(NULL)
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -0,0 +1,37 @@
#!nmake
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
DEPTH=..\..\..\..
REQUIRES = widget \
webBrowser_core \
$(NULL)
MODULE=mozEmbed
XPIDLSRCS = \
.\nsIQABrowserChrome.idl \
.\nsIQABrowserUIGlue.idl \
.\nsIQABrowserView.idl \
$(NULL)
include <$(DEPTH)\config\rules.mak>

Просмотреть файл

@ -0,0 +1,54 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Radha Kulkarni <radha@netscape.com>, Original Author
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.idl"
#include "nsIBaseWindow.idl"
#include "nsIWeakReference.idl"
interface nsIQABrowserUIGlue;
interface nsIQABrowserView;
[scriptable, uuid(31D58E11-E4A3-49fc-B544-C100F375A280)]
interface nsIQABrowserChrome : nsISupports
{
// Hold a handle to the nsIQABrwoserUIGlue which is above the chrome
// and to the nsIQABrowserView below the chrome.
void initQAChrome(in nsIQABrowserUIGlue uiGlue, in nativeWindow nativeWnd);
};

Просмотреть файл

@ -0,0 +1,76 @@
/* -- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -- /
BEGIN LICENSE BLOCK
Version: Mozilla-sample-code 1.0
Copyright (c) 2002 Netscape Communications Corporation and
other contributors
Permission is hereby granted, free of charge, to any person obtaining a
copy of this Mozilla sample software and associated documentation files
(the "Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Contributor(s):
Radha Kulkarni <radha@netscape.com>
END LICENSE BLOCK */
// This interface acts as a glue between the required/optional
// Gecko embedding interfaces and the actual platform specific
// code that owns the UI.
// For ex, in the mozembed sample the required interfaces such as
// nsIWebBrowserChrome etc. are implemented in a XP way in the
// WebBrowserChrome.js. However, when they get called to update the
// statusbar etc. they call on this interface to get the actual job
// done.
#include "nsISupports.idl"
#include "nsIBaseWindow.idl"
interface nsIWebBrowserChrome;
interface nsIWebBrowser;
interface nsIDOMEvent;
interface nsIDOMNode;
[scriptable, uuid(86D2C83D-AEFA-4382-BDC5-881A9232ED7B)]
interface nsIQABrowserUIGlue : nsISupports
{
void destroy(in nsIWebBrowserChrome aChrome);
void destroyed(in nsIWebBrowserChrome aChrome);
void setFocus(in nsIWebBrowserChrome aChrome);
void updateStatusBarText(in nsIWebBrowserChrome aChrome, in wstring aStatusText);
void updateCurrentURI(in nsIWebBrowserChrome aChrome);
void updateBusyState(in nsIWebBrowserChrome aChrome, in boolean aBusy);
void updateProgress(in nsIWebBrowserChrome aChrome, in long aCurrent, in long aMax);
void showContextMenu(in nsIWebBrowserChrome aChrome, in long aContextFlags, in nsIDOMEvent aEvent, in nsIDOMNode aNode);
void showTooltip(in nsIWebBrowserChrome aChrome, in long aXCoords, in long aYCoords, in wstring aTipText);
void hideTooltip(in nsIWebBrowserChrome aChrome);
void showWindow(in nsIWebBrowserChrome aChrome, in boolean aShow);
void sizeTo(in nsIWebBrowserChrome aChrome, in long aWidth, in long aHeight);
string getResourceStringById(in long aID);
attribute boolean visibility;
attribute wstring title;
attribute boolean allowNewBrowserWindows;
nsIWebBrowserChrome createNewBrowserWindow(in long aChromeFlags, in nsIWebBrowserChrome aParent);
void loadURL(in string aURL);
void loadHomePage();
};

Просмотреть файл

@ -0,0 +1,56 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Radha Kulkarni <radha@netscape.com>, Original Author
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.idl"
#include "nsIBaseWindow.idl"
interface nsIWebBrowser;
interface nsIWebBrowserChrome;
[scriptable, uuid(169157F5-A70F-4ea7-BA36-BDFDE702CCFE)]
interface nsIQABrowserView : nsISupports
{
//void Init(in nativeWindow aNativeWnd);
void CreateBrowser(in nativeWindow aNativeWnd, in nsIWebBrowserChrome aChrome);
void DestroyBrowser();
// Get a handle to the nsIWebBrowser object.
readonly attribute nsIWebBrowser WebBrowser;
};