author=Ashutosh Kulkarni

r=edburns
approver=edburns
bug=28407

THIS CODE IS NOT MOZILLA CODE!

This code change allows webclient to work with GTKSUPERWIN.


git-svn-id: svn://10.0.0.236/trunk@61306 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
edburns%acm.org
2000-02-18 19:16:27 +00:00
parent 590a0f0bdc
commit b31ba12625
4 changed files with 102 additions and 16 deletions

View File

@@ -35,13 +35,15 @@ import org.mozilla.util.ParameterCheck;
import java.awt.Rectangle;
import java.awt.Canvas;
import org.mozilla.webclient.motif.*;
/**
*
* <B>BrowserControlImpl</B> provides the implementation for BrowserControl
*
* <B>Lifetime And Scope</B> <P>
*
* @version $Id: BrowserControlImpl.java,v 1.7 1999-12-23 04:09:27 edburns%acm.org Exp $
* @version $Id: BrowserControlImpl.java,v 1.8 2000-02-18 19:16:26 edburns%acm.org Exp $
*
* @see org.mozilla.webclient.BrowserControl
*
@@ -98,7 +100,7 @@ protected BrowserControlImpl(Canvas yourCanvas)
public void createWindow(int windowPtr, Rectangle bounds) throws Exception
{
nativeWebShell = BrowserControlNativeShim.webShellCreate(windowPtr, bounds);
nativeWebShell = BrowserControlNativeShim.webShellCreate(windowPtr, bounds, this);
}
public Canvas getCanvas()
@@ -281,7 +283,7 @@ public static void main(String [] args)
// BrowserControlImpl me = new BrowserControlImpl();
Log.setApplicationName("BrowserControlImpl");
Log.setApplicationVersion("0.0");
Log.setApplicationVersionDate("$Id: BrowserControlImpl.java,v 1.7 1999-12-23 04:09:27 edburns%acm.org Exp $");
Log.setApplicationVersionDate("$Id: BrowserControlImpl.java,v 1.8 2000-02-18 19:16:26 edburns%acm.org Exp $");
}

View File

@@ -48,7 +48,7 @@ import java.awt.*;
* There is one instance of this class and all of the exposed methods
* are static.
* @version $Id: BrowserControlNativeShim.java,v 1.1 1999-12-23 04:09:29 edburns%acm.org Exp $
* @version $Id: BrowserControlNativeShim.java,v 1.2 2000-02-18 19:16:26 edburns%acm.org Exp $
*
* @see org.mozilla.webclient.BrowserControlImpl
@@ -72,6 +72,8 @@ private static BrowserControlNativeShim instance = null;
private static Object lock = null;
//private static int myGtkwinptr;
//
// Instance Variables
@@ -127,14 +129,15 @@ public static void terminate () throws Exception
//
public static int webShellCreate (int windowPtr,
Rectangle bounds) throws Exception
Rectangle bounds, BrowserControlImpl abrowsercontrolimpl) throws Exception
{
synchronized(lock) {
if (initialized) {
return(instance.nativeWebShellCreate(windowPtr,
return(instance.nativeWebShellCreate(windowPtr,
bounds.x, bounds.y,
bounds.width + 1,
bounds.height + 1));
bounds.height + 1,
abrowsercontrolimpl));
}
else {
throw new Exception("Error: unable to create native nsIWebShell");
@@ -371,8 +374,10 @@ private native void nativeTerminate () throws Exception;
// WebShell interface
//
private native void nativeDummy (BrowserControlNativeShim testShim);
private native int nativeWebShellCreate (int windowPtr,
int x, int y, int width, int height) throws Exception;
int x, int y, int width, int height, BrowserControlImpl abrowsercontrolimpl) throws Exception;
private native void nativeWebShellDelete (int webShellPtr) throws Exception;
private native void nativeWebShellLoadURL (int webShellPtr, String urlString) throws Exception;
private native void nativeWebShellStop (int webShellPtr) throws Exception;
@@ -416,7 +421,7 @@ public static void main(String [] args)
BrowserControlNativeShim me = new BrowserControlNativeShim();
Log.setApplicationName("BrowserControlNativeShim");
Log.setApplicationVersion("0.0");
Log.setApplicationVersionDate("$Id: BrowserControlNativeShim.java,v 1.1 1999-12-23 04:09:29 edburns%acm.org Exp $");
Log.setApplicationVersionDate("$Id: BrowserControlNativeShim.java,v 1.2 2000-02-18 19:16:26 edburns%acm.org Exp $");
}