a=edburns
bug=20659

Changes to bring webclient sort of up to working shape on unix.
This commit is contained in:
edburns%acm.org 1999-12-06 23:31:11 +00:00
Родитель 63ea9e61f9
Коммит d95b24a1a5
10 изменённых файлов: 141 добавлений и 966 удалений

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

@ -43,7 +43,7 @@ import java.io.FileNotFoundException;
* This is a static class, it is neven instantiated.
*
* @version $Id: BrowserControlFactory.java,v 1.1 1999-12-03 01:55:28 edburns%acm.org Exp $
* @version $Id: BrowserControlFactory.java,v 1.2 1999-12-06 23:31:04 edburns%acm.org Exp $
*
* @see org.mozilla.webclient.test.EmbeddedMozilla
@ -116,17 +116,30 @@ public static void setAppData(String absolutePathToNativeBrowserBinDir) throws F
// none loads, then I return a error message.
// If you think up of a better way, let me know.
// -- Mark
Class win32DrawingSurfaceInfoClass;
Class win32DrawingSurfaceInfoClass =
Class.forName("sun.awt.windows.WDrawingSurfaceInfo");
try {
win32DrawingSurfaceInfoClass =
Class.forName("sun.awt.windows.WDrawingSurfaceInfo");
}
catch (Exception e) {
win32DrawingSurfaceInfoClass = null;
}
if (win32DrawingSurfaceInfoClass != null) {
platformCanvasClassName = "org.mozilla.webclient.win32.Win32BrowserControlCanvas";
}
if (null == platformCanvasClassName) {
Class motifDrawingSurfaceInfoClass =
Class.forName("sun.awt.motif.MDrawingSurfaceInfo");
Class motifDrawingSurfaceInfoClass;
try {
motifDrawingSurfaceInfoClass =
Class.forName("sun.awt.motif.MDrawingSurfaceInfo");
}
catch (Exception e) {
motifDrawingSurfaceInfoClass = null;
}
if (motifDrawingSurfaceInfoClass != null) {
platformCanvasClassName = "org.mozilla.webclient.motif.MotifBrowserControlCanvas";
@ -184,7 +197,7 @@ public static void main(String [] args)
Assert.setEnabled(true);
Log.setApplicationName("BrowserControlFactory");
Log.setApplicationVersion("0.0");
Log.setApplicationVersionDate("$Id: BrowserControlFactory.java,v 1.1 1999-12-03 01:55:28 edburns%acm.org Exp $");
Log.setApplicationVersionDate("$Id: BrowserControlFactory.java,v 1.2 1999-12-06 23:31:04 edburns%acm.org Exp $");
java.awt.Canvas canvas = null;
BrowserControl control = null;

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

@ -36,7 +36,7 @@ import org.mozilla.util.ParameterCheck;
* There is one instance of the WebShellCanvas per top level awt Frame.
* @version $Id: MotifBrowserControlCanvas.java,v 1.4 1999-11-06 02:24:18 dmose%mozilla.org Exp $
* @version $Id: MotifBrowserControlCanvas.java,v 1.5 1999-12-06 23:31:05 edburns%acm.org Exp $
*
* @see org.mozilla.webclient.BrowserControlCanvasFactory
*
@ -57,6 +57,7 @@ public class MotifBrowserControlCanvas extends BrowserControlCanvas /* implement
static {
System.loadLibrary("webclientstub");
MotifBrowserControlCanvas.loadMainDll();
}
static private boolean firstTime = true;
@ -66,6 +67,7 @@ public class MotifBrowserControlCanvas extends BrowserControlCanvas /* implement
private int gtkWinPtr;
private MDrawingSurfaceInfo drawingSurfaceInfo;
static private native void loadMainDll();
private native int createTopLevelWindow();
private native int createContainerWindow(int parent, int width, int height);
private native int getGTKWinID(int gtkWinPtr);
@ -80,6 +82,7 @@ public class MotifBrowserControlCanvas extends BrowserControlCanvas /* implement
this.canvasWinID = 0;
this.gtkWinPtr = 0;
this.drawingSurfaceInfo = null;
}
public void paint(Graphics g) {

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

@ -41,7 +41,7 @@ import org.mozilla.util.Assert;
* This is a test application for using the BrowserControl.
*
* @version $Id: EmbeddedMozilla.java,v 1.5 1999-12-03 01:55:30 edburns%acm.org Exp $
* @version $Id: EmbeddedMozilla.java,v 1.6 1999-12-06 23:31:06 edburns%acm.org Exp $
*
* @see org.mozilla.webclient.BrowserControlFactory
@ -77,7 +77,8 @@ public static void printUsage()
public EmbeddedMozilla (String title, String binDir, String url) {
super(title);
System.out.println("constructed with " + url);
System.out.println("constructed with binDir: " + binDir + " url: " +
url);
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {

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

@ -49,7 +49,7 @@
#include "nsString.h"
#include "nsRepository.h"
#ifdef NECKO
#include "nsNeckoUtil.h"
#include "nsNetUtil.h"
#else
#include "nsINetService.h"
#endif
@ -69,6 +69,12 @@ nsMacMessageSink gMessageSink;
#ifdef XP_UNIX
#include <gtk/gtk.h>
#include "motif/MozillaEventThread.h"
// debug: edburns: start
#include <unistd.h>
// debug: edburns: end
#endif
#include "nsActions.h"
@ -79,6 +85,10 @@ nsMacMessageSink gMessageSink;
#include "DocumentObserver.h"
#include "nsIDocumentLoader.h"
#ifdef XP_UNIX
#include "gtkmozarea.h"
#endif
#ifdef XP_PC
#define APPSHELL_DLL "appshell.dll"
@ -144,6 +154,26 @@ struct WebShellInitContext {
int h;
};
#ifdef XP_UNIX
void edburnsDebugBreak(void)
{
pid_t curPid = -1;
if (-1 == (curPid = getpid())) {
printf("can't get pid\n");
return;
}
printf("dbx - %d\n\n", curPid);
fflush(stdout);
sleep(10);
return;
}
#endif
void PostEvent (WebShellInitContext * initContext, PLEvent * event);
void * PostSynchronousEvent (WebShellInitContext * initContext, PLEvent * event);
@ -334,7 +364,8 @@ EmbeddedEventHandler (void * arg) {
printf("EmbeddedEventHandler(%lx): Init the WebShell...\n", initContext);
#endif
rv = initContext->webShell->Init((nsNativeWidget *)initContext->parentHWnd,
//rv = initContext->webShell->Init((nsNativeWidget *)initContext->parentHWnd,
rv = initContext->webShell->Init((nsNativeWidget *) GTK_MOZAREA(initContext->parentHWnd)->superwin,
initContext->x, initContext->y, initContext->w, initContext->h);
if (NS_FAILED(rv)) {
initContext->initFailCode = kInitWebShellError;
@ -414,6 +445,18 @@ EmbeddedEventHandler (void * arg) {
void
InitEmbeddedEventHandler (WebShellInitContext* initContext)
{
// this used to be in nativeInitialize
// PENDING, assert that the registryFile and component Dir are valid
NS_InitXPCOM(NULL, &gRegistryFile, &gComponentDir);
NS_SetupRegistry();
nsComponentManager::RegisterComponentLib(kSessionHistoryCID, NULL,
NULL, APPSHELL_DLL,
PR_FALSE, PR_FALSE);
NS_AutoregisterComponents();
#if DEBUG_RAPTOR_CANVAS
printf("InitEmbeddedEventHandler(%lx): Creating embedded thread...\n", initContext);
#endif
@ -677,6 +720,7 @@ Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeInitialize(
JNIEnv * pEnv = env;
jobject jobj = obj;
static PRBool gFirstTime = PR_TRUE;
if (gFirstTime)
{
// set the gRegistryFile and gComponentDir correctly
@ -686,12 +730,6 @@ Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeInitialize(
gComponentDir = nativePath;
gComponentDir += "components";
NS_InitXPCOM(NULL, &gRegistryFile, &gComponentDir);
NS_SetupRegistry();
nsComponentManager::RegisterComponentLib(kSessionHistoryCID, NULL,
NULL, APPSHELL_DLL,
PR_FALSE, PR_FALSE);
NS_AutoregisterComponents();
gFirstTime = PR_FALSE;
}
} // Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeInitialize()
@ -1978,6 +2016,10 @@ Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeDebugBreak(JNIEnv *jE
{
const char *charFileName = (char *) jEnv->GetStringUTFChars(fileName, 0);
nsDebug::Break(charFileName, lineNumber);
#ifdef XP_UNIX
edburnsDebugBreak();
#endif
}

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

@ -8,6 +8,8 @@ DLLNAMESTUB = libwebclientstub.so
MOZILLA_TOP = ../../..
DIST = ${MOZILLA_TOP}/dist
LIBDIR = ${DIST}/lib
CC = gcc -g -gstabs
MKSHLIB = c++ -G
# WARNING: YOU NEED TO RUN 'gtk-config --cflags' and stick it in here
GTKINCLUDES = -I/usr/openwin/include -I/opt/local/lib/glib/include -I/opt/local/include
# WARNING: YOU NEED TO RUN 'gtk-config --libs' and stick it in here
@ -23,10 +25,17 @@ STUBINCLUDE = ${JAVAINCLUDE}
STUBLIBS = ${JAVALIBS} /usr/lib/libC.so.5
# For the latest mozilla build
LIBS = ${GTKLIBS} ${JAVALIBS} \
-L${DIST}/bin -lraptorgfx -lexpat -lxmltok -ljsurl -lmozdbm -lmozjs -lsecfree -lmozutil -lnspr3 -lxp -ljpeg -lpng -lz -lpthread -lXm -lXt -L${DIST}/lib -lxpcom -limg -lplds3 -lgfx_gtk -lraptorwebwidget -lraptorhtmlpars -lraptorplugin -lpref -lplds3 -lplc3 -ljsdom -L${DIST}/lib -ltimer_gtk_s /usr/lib/libC.so.5
-L${DIST}/bin -L${LIBDIR} -lraptorgfx -lexpat_s -lxmltok_s -lmozjs -lmozutil_s -lnspr3 -ljpeg -lpng -lzlib -lpthread -lXm -lXt -L${DIST}/lib -lxpcom -limg_s -lplds3 -lgfx_gtk -lraptorwebwidget -lraptorplugin -lgtksuperwin -lplds3 -lplc3 -ljsdom -L${DIST}/lib -ltimer_s /usr/lib/libC.so.5
#-L${DIST}/bin -L${LIBDIR} -lraptorgfx -lexpat_s -lxmltok_s -ljsurl -lmozdbm -lmozjs -lsecfree -lmozutil_s -lnspr3 -lxp -ljpeg -lpng -lz -lpthread -lXm -lXt -L${DIST}/lib -lxpcom -limg -lplds3 -lgfx_gtk -lgkwebwidget -lgkhtmlpars -lgkplugin -lpref -lplds3 -lplc3 -ljsdom -L${DIST}/lib -ltimer_gtk_s /usr/lib/libC.so.5
LN = ln -f -s
all: libwebclientstub.so libwebclient.so component.reg components
all: libwebclientstub.so libwebclient.so copy
copy:
cp libwebclient*.so ${DIST}/bin
# component.reg components
component.reg:
${LN} ${DIST}/bin/component.reg
@ -35,37 +44,40 @@ components:
${LN} ${DIST}/bin/components
libwebclientstub.so: BrowserControlMozillaShimStub.o MotifBrowserControlCanvasStub.o
cc -G -o ${DLLNAMESTUB} BrowserControlMozillaShimStub.o MotifBrowserControlCanvasStub.o ${STUBLIBS}
${MKSHLIB} -o ${DLLNAMESTUB} BrowserControlMozillaShimStub.o MotifBrowserControlCanvasStub.o ${STUBLIBS}
libwebclient.so: BrowserControlMozillaShim.o MotifBrowserControlCanvas.o gtkmozilla.o nsActions.o nsSetupRegistry.o
cc -G -o ${DLLNAME} BrowserControlMozillaShim.o MotifBrowserControlCanvas.o gtkmozilla.o nsActions.o nsSetupRegistry.o ${LIBS}
libwebclient.so: BrowserControlMozillaShim.o MotifBrowserControlCanvas.o gtkmozilla.o nsActions.o nsSetupRegistry.o DocumentObserver.o
${MKSHLIB} -o ${DLLNAME} BrowserControlMozillaShim.o MotifBrowserControlCanvas.o gtkmozilla.o nsActions.o nsSetupRegistry.o DocumentObserver.o ${LIBS}
gtkmozilla.o: motif/gtkmozilla.cpp
CC ${DEFINES} ${INCLUDE} -c motif/gtkmozilla.cpp
${CC} ${DEFINES} ${INCLUDE} -c motif/gtkmozilla.cpp
MotifBrowserControlCanvasStub.o: motif/MotifBrowserControlCanvasStub.cpp
CC ${STUBDEFINES} ${STUBINCLUDE} -c motif/MotifBrowserControlCanvasStub.cpp
${CC} ${STUBDEFINES} ${STUBINCLUDE} -c motif/MotifBrowserControlCanvasStub.cpp
MotifBrowserControlCanvas.o: motif/MotifBrowserControlCanvas.cpp
CC ${DEFINES} ${INCLUDE} -c motif/MotifBrowserControlCanvas.cpp
${CC} ${DEFINES} ${INCLUDE} -c motif/MotifBrowserControlCanvas.cpp
BrowserControlMozillaShimStub.o: motif/BrowserControlMozillaShimStub.cpp
CC ${STUBDEFINES} ${STUBINCLUDE} -c motif/BrowserControlMozillaShimStub.cpp
${CC} ${STUBDEFINES} ${STUBINCLUDE} -c motif/BrowserControlMozillaShimStub.cpp
BrowserControlMozillaShim.o: BrowserControlMozillaShim.cpp
CC ${DEFINES} ${INCLUDE} -c BrowserControlMozillaShim.cpp
${CC} ${DEFINES} ${INCLUDE} -c BrowserControlMozillaShim.cpp
motif/nsSetupRegistry.cpp:
cd motif
${LN} ${MOZILLA_TOP}/../webshell/tests/viewer/nsSetupRegistry.cpp motif/nsSetupRegistry.cpp
${LN} ${MOZILLA_TOP}/../xpfe/bootstrap/nsSetupRegistry.cpp motif/nsSetupRegistry.cpp
cd ..
#PENDING(mark): I think we should use this for the Win32 version as well...
nsSetupRegistry.o: motif/nsSetupRegistry.cpp
CC ${DEFINES} ${INCLUDE} -c motif/nsSetupRegistry.cpp
${CC} ${DEFINES} ${INCLUDE} -c motif/nsSetupRegistry.cpp
nsActions.o: nsActions.cpp
CC ${DEFINES} ${INCLUDE} -c nsActions.cpp
${CC} ${DEFINES} ${INCLUDE} -c nsActions.cpp
DocumentObserver.o: DocumentObserver.cpp
${CC} ${DEFINES} ${INCLUDE} -c DocumentObserver.cpp
clean:
rm -f component.reg components *.o *.so *~ motif/*~ motif/nsSetupRegistry.cpp

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

@ -1,848 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* 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):
*/
/*
* BrowserControlMozillaShimStub.cpp
*/
// PENDING(mark): I suppose this is where I need to go into my explaination of why
// this file is needed...
// For loading DLL
#include <dlfcn.h>
// JNI...yada, yada, yada
#include <jni.h>
// JNI Header
#include "../BrowserControlMozillaShim.h"
// JNI Header
#include "MozillaEventThread.h"
// Global reference to webclient dll
void * webClientDll;
extern void locateMotifBrowserControlStubFunctions(void *);
void (* nativeInitialize) (JNIEnv *, jobject);
void (* nativeTerminate) (JNIEnv *, jobject);
void (* nativeSendKeyDownEvent) (JNIEnv *, jobject, jint, jchar, jint, jint, jint);
void (* nativeSendKeyUpEvent) (JNIEnv *, jobject, jint, jchar, jint, jint, jint);
void (* nativeSendMouseEvent) (JNIEnv *, jobject, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint);
void (* nativeIdleEvent) (JNIEnv *, jobject, jint, jint);
void (* nativeUpdateEvent) (JNIEnv *, jobject, jint, jint);
jint (* nativeWidgetCreate) (JNIEnv *, jobject, jint, jint, jint, jint, jint);
void (* nativeWidgetDelete) (JNIEnv *, jobject, jint);
void (* nativeWidgetResize) (JNIEnv *, jobject, jint, jint, jint, jint, jint, jboolean);
void (* nativeWidgetEnable) (JNIEnv *, jobject, jint, jboolean);
void (* nativeWidgetShow) (JNIEnv *, jobject, jint, jboolean);
void (* nativeWidgetInvalidate) (JNIEnv *, jobject, jint, jboolean);
void (* nativeWidgetUpdate) (JNIEnv *, jobject, jint);
void (* nativeProcessEvents) (JNIEnv *, jobject, jint);
jint (* nativeWebShellCreate) (JNIEnv *, jobject, jint, jint, jint, jint, jint);
void (* nativeWebShellDelete) (JNIEnv *, jobject, jint);
void (* nativeWebShellLoadURL) (JNIEnv *, jobject, jint, jstring);
void (* nativeWebShellStop) (JNIEnv *, jobject, jint);
void (* nativeWebShellShow) (JNIEnv *, jobject, jint);
void (* nativeWebShellHide) (JNIEnv *, jobject, jint);
void (* nativeWebShellSetBounds) (JNIEnv *, jobject, jint, jint, jint, jint, jint);
void (* nativeWebShellMoveTo) (JNIEnv *, jobject, jint, jint, jint);
void (* nativeWebShellSetFocus) (JNIEnv *, jobject, jint);
void (* nativeWebShellRemoveFocus) (JNIEnv *, jobject, jint);
void (* nativeWebShellRepaint) (JNIEnv *, jobject, jint, jboolean);
jboolean (* nativeWebShellCanBack) (JNIEnv *, jobject, jint);
jboolean (* nativeWebShellCanForward) (JNIEnv *, jobject, jint);
jboolean (* nativeWebShellBack) (JNIEnv *, jobject, jint);
jboolean (* nativeWebShellForward) (JNIEnv *, jobject, jint);
jboolean (* nativeWebShellGoTo) (JNIEnv *, jobject, jint, jint);
jint (* nativeWebShellGetHistoryLength) (JNIEnv *, jobject, jint);
jint (* nativeWebShellGetHistoryIndex) (JNIEnv *, jobject, jint);
jstring (* nativeWebShellGetURL) (JNIEnv *, jobject, jint, jint);
// added by Mark Goddard OTMP 9/2/1999
jboolean (* nativeWebShellRefresh)(JNIEnv *, jobject, jint);
jboolean (* nativeWebShellAddDocListener) (JNIEnv *, jobject, jint, jobject);
void (* processNativeEventQueue) (JNIEnv *, jobject, jint);
void locateBrowserControlStubFunctions(void * dll) {
nativeInitialize = (void (*) (JNIEnv *, jobject)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeInitialize");
if (!nativeInitialize) {
printf("got dlsym error %s\n", dlerror());
}
nativeTerminate = (void (*) (JNIEnv *, jobject)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeTerminate");
if (!nativeTerminate) {
printf("got dlsym error %s\n", dlerror());
}
nativeSendKeyDownEvent = (void (*) (JNIEnv *, jobject, jint, jchar, jint, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeSendKeyDownEvent");
if (!nativeSendKeyDownEvent) {
printf("got dlsym error %s\n", dlerror());
}
nativeSendKeyUpEvent = (void (*) (JNIEnv *, jobject, jint, jchar, jint, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeSendKeyUpEvent");
if (!nativeSendKeyUpEvent) {
printf("got dlsym error %s\n", dlerror());
}
nativeSendMouseEvent = (void (*) (JNIEnv *, jobject, jint, jint, jint, jint, jint, jint, jint, jint,jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeSendMouseEvent");
if (!nativeSendMouseEvent) {
printf("got dlsym error %s\n", dlerror());
}
nativeIdleEvent = (void (*) (JNIEnv *, jobject, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeIdleEvent");
if (!nativeIdleEvent) {
printf("got dlsym error %s\n", dlerror());
}
nativeUpdateEvent = (void (*) (JNIEnv *, jobject, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeUpdateEvent");
if (!nativeUpdateEvent) {
printf("got dlsym error %s\n", dlerror());
}
nativeWidgetCreate = (jint (*) (JNIEnv *, jobject, jint, jint, jint, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWidgetCreate");
if (!nativeWidgetCreate) {
printf("got dlsym error %s\n", dlerror());
}
nativeWidgetDelete = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWidgetDelete");
if (!nativeWidgetDelete) {
printf("got dlsym error %s\n", dlerror());
}
nativeWidgetResize = (void (*) (JNIEnv *, jobject, jint, jint, jint, jint, jint, jboolean)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWidgetResize");
if (!nativeWidgetResize) {
printf("got dlsym error %s\n", dlerror());
}
nativeWidgetEnable = (void (*) (JNIEnv *, jobject, jint, jboolean)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWidgetEnable");
if (!nativeWidgetEnable) {
printf("got dlsym error %s\n", dlerror());
}
nativeWidgetShow = (void (*) (JNIEnv *, jobject, jint, jboolean)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWidgetShow");
if (!nativeWidgetShow) {
printf("got dlsym error %s\n", dlerror());
}
nativeWidgetInvalidate = (void (*) (JNIEnv *, jobject, jint, jboolean)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWidgetInvalidate");
if (!nativeWidgetInvalidate) {
printf("got dlsym error %s\n", dlerror());
}
nativeWidgetUpdate = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWidgetUpdate");
if (!nativeWidgetUpdate) {
printf("got dlsym error %s\n", dlerror());
}
nativeProcessEvents = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeProcessEvents");
if (!nativeProcessEvents) {
printf("got dlsym error %s\n", dlerror());
}
nativeWebShellCreate = (jint (*) (JNIEnv *, jobject, jint, jint, jint, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellCreate");
if (!nativeWebShellCreate) {
printf("got dlsym error %s\n", dlerror());
}
nativeWebShellDelete = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellDelete");
if (!nativeWebShellDelete) {
printf("got dlsym error %s\n", dlerror());
}
nativeWebShellLoadURL = (void (*) (JNIEnv *, jobject, jint, jstring)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellLoadURL");
if (!nativeWebShellLoadURL) {
printf("got dlsym error %s\n", dlerror());
}
nativeWebShellStop = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellStop");
if (!nativeWebShellStop) {
printf("got dlsym error %s\n", dlerror());
}
nativeWebShellShow = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellShow");
if (!nativeWebShellShow) {
printf("got dlsym error %s\n", dlerror());
}
nativeWebShellHide = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellHide");
if (!nativeWebShellHide) {
printf("got dlsym error %s\n", dlerror());
}
nativeWebShellSetBounds = (void (*) (JNIEnv *, jobject, jint, jint, jint, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellSetBounds");
if (!nativeWebShellSetBounds) {
printf("got dlsym error %s\n", dlerror());
}
nativeWebShellMoveTo = (void (*) (JNIEnv *, jobject, jint, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellMoveTo");
if (!nativeWebShellMoveTo) {
printf("got dlsym error %s\n", dlerror());
}
nativeWebShellSetFocus = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellSetFocus");
if (!nativeWebShellSetFocus) {
printf("got dlsym error %s\n", dlerror());
}
nativeWebShellRemoveFocus = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellRemoveFocus");
if (!nativeWebShellRemoveFocus) {
printf("got dlsym error %s\n", dlerror());
}
nativeWebShellRepaint = (void (*) (JNIEnv *, jobject, jint, jboolean)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellRepaint");
if (!nativeWebShellRepaint) {
printf("got dlsym error %s\n", dlerror());
}
nativeWebShellCanBack = (jboolean (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellCanBack");
if (!nativeWebShellCanBack) {
printf("got dlsym error %s\n", dlerror());
}
nativeWebShellCanForward = (jboolean (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellCanForward");
if (!nativeWebShellCanForward) {
printf("got dlsym error %s\n", dlerror());
}
nativeWebShellBack = (jboolean (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellBack");
if (!nativeWebShellBack) {
printf("got dlsym error %s\n", dlerror());
}
nativeWebShellForward = (jboolean (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellForward");
if (!nativeWebShellForward) {
printf("got dlsym error %s\n", dlerror());
}
nativeWebShellGoTo = (jboolean (*) (JNIEnv *, jobject, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellGoTo");
if (!nativeWebShellGoTo) {
printf("got dlsym error %s\n", dlerror());
}
nativeWebShellGetHistoryLength = (jint (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellGetHistoryLength");
if (!nativeWebShellGetHistoryLength) {
printf("got dlsym error %s\n", dlerror());
}
nativeWebShellGetHistoryIndex = (jint (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellGetHistoryIndex");
if (!nativeWebShellGetHistoryIndex) {
printf("got dlsym error %s\n", dlerror());
}
nativeWebShellGetURL = (jstring (*) (JNIEnv *, jobject, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellGetURL");
if (!nativeWebShellGetURL) {
printf("got dlsym error %s\n", dlerror());
}
// added by Mark Goddard OTMP 9/2/1999
nativeWebShellRefresh = (jboolean (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellRefresh");
if (!nativeWebShellRefresh) {
printf("got dlsym error %s\n", dlerror());
}
nativeWebShellAddDocListener = (jboolean (*) (JNIEnv *, jobject, jint, jobject)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellAddDocListener");
if (!nativeWebShellAddDocListener) {
printf("got dlsym error %s\n", dlerror());
}
processNativeEventQueue = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_motif_MozillaEventThread_processNativeEventQueue");
if (!processNativeEventQueue) {
printf("got dlsym error %s\n", dlerror());
}
}
/*
* Class: org_mozilla_webclient_motif_MotifMozillaEventQueue
* Method: processNativeEventQueue
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_org_mozilla_webclient_motif_MozillaEventThread_processNativeEventQueue
(JNIEnv * env, jobject obj, jint gtkWinPtr) {
(* processNativeEventQueue) (env, obj, gtkWinPtr);
}
/*
* Class: MozWebShellMozillaShim
* Method: raptorInitialize
* Signature: ()V
*/
JNIEXPORT void JNICALL
Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeInitialize (
JNIEnv * env,
jobject obj)
{
webClientDll = dlopen("libwebclient.so", RTLD_LAZY | RTLD_GLOBAL);
if (webClientDll) {
locateBrowserControlStubFunctions(webClientDll);
locateMotifBrowserControlStubFunctions(webClientDll);
(* nativeInitialize) (env, obj);
} else {
printf("Got Error: %s\n", dlerror());
}
} // Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeInitialize()
/*
* Class: MozWebShellMozillaShim
* Method: raptorTerminate
* Signature: ()V
*/
JNIEXPORT void JNICALL
Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeTerminate (
JNIEnv * env,
jobject obj)
{
(* nativeTerminate) (env, obj);
} // Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeTerminate()
/*
* Class: MozWebShellMozillaShim
* Method: raptorSendKeyDownEvent
* Signature: (ICIII)V
*/
JNIEXPORT void JNICALL
Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeSendKeyDownEvent (
JNIEnv * env,
jobject obj,
jint widgetPtr,
jchar keyChar,
jint keyCode,
jint modifiers,
jint eventTime)
{
(* nativeSendKeyDownEvent) (env, obj, widgetPtr, keyChar, keyCode, modifiers, eventTime);
} // Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeSendKeyDownEvent()
/*
* Class: MozWebShellMozillaShim
* Method: raptorSendKeyUpEvent
* Signature: (ICIII)V
*/
JNIEXPORT void JNICALL
Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeSendKeyUpEvent (
JNIEnv * env,
jobject obj,
jint widgetPtr,
jchar keyChar,
jint keyCode,
jint modifiers,
jint eventTime)
{
(* nativeSendKeyUpEvent) (env, obj, widgetPtr, keyChar, keyCode, modifiers, eventTime);
} // Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeSendKeyUpEvent()
/*
* Class: MozWebShellMozillaShim
* Method: raptorSendMouseEvent
* Signature: (IIIIIIIIIII)V
*/
JNIEXPORT void JNICALL
Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeSendMouseEvent (
JNIEnv * env,
jobject obj,
jint windowPtr,
jint widgetPtr,
jint widgetX,
jint widgetY,
jint windowX,
jint windowY,
jint mouseMessage,
jint numClicks,
jint modifiers,
jint eventTime)
{
(* nativeSendMouseEvent) (env, obj, windowPtr, widgetPtr, widgetX, widgetY, windowX, windowY, mouseMessage, numClicks, modifiers, eventTime);
} // Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeSendMouseEvent()
/*
* Class: MozWebShellMozillaShim
* Method: raptorIdleEvent
* Signature: (I)V
*/
JNIEXPORT void JNICALL
Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeIdleEvent (
JNIEnv * env,
jobject obj,
jint windowPtr,
jint eventTime)
{
(* nativeIdleEvent) (env, obj, windowPtr, eventTime);
} // Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeIdleEvent()
/*
* Class: MozWebShellMozillaShim
* Method: raptorUpdateEvent
* Signature: (II)V
*/
JNIEXPORT void JNICALL
Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeUpdateEvent (
JNIEnv * env,
jobject obj,
jint windowPtr,
jint eventTime)
{
(* nativeUpdateEvent) (env, obj, windowPtr, eventTime);
} // Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeUpdateEvent()
/*
* Class: MozWebShellMozillaShim
* Method: raptorWidgetCreate
* Signature: (I)I
*/
JNIEXPORT jint JNICALL
Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWidgetCreate (
JNIEnv * env,
jobject obj,
jint windowPtr,
jint x,
jint y,
jint width,
jint height)
{
return (* nativeWidgetCreate) (env, obj, windowPtr, x, y, width, height);
} // Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWidgetCreate()
/*
* Class: MozWebShellMozillaShim
* Method: raptorWidgetDelete
* Signature: (I)I
*/
JNIEXPORT void JNICALL
Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWidgetDelete (
JNIEnv * env,
jobject obj,
jint widgetPtr)
{
(* nativeWidgetDelete) (env, obj, widgetPtr);
} // Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWidgetDelete()
/*
* Class: MozWebShellMozillaShim
* Method: raptorWidgetResize
* Signature: (IIIZ)V
*/
JNIEXPORT void JNICALL
Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWidgetResize (
JNIEnv * env,
jobject obj,
jint widgetPtr,
jint x,
jint y,
jint width,
jint height,
jboolean repaint)
{
(* nativeWidgetResize) (env, obj, widgetPtr, x, y, width, height, repaint);
} // Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWidgetResize()
/*
* Class: MozWebShellMozillaShim
* Method: raptorWidgetEnable
* Signature: (IZ)V
*/
JNIEXPORT void JNICALL
Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWidgetEnable (
JNIEnv * env,
jobject obj,
jint widgetPtr,
jboolean enable)
{
(* nativeWidgetEnable) (env, obj, widgetPtr, enable);
} // Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWidgetEnable()
/*
* Class: MozWebShellMozillaShim
* Method: raptorWidgetShow
* Signature: (IZ)V
*/
JNIEXPORT void JNICALL
Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWidgetShow (
JNIEnv * env,
jobject obj,
jint widgetPtr,
jboolean show)
{
(* nativeWidgetShow) (env, obj, widgetPtr, show);
} // Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWidgetShow()
/*
* Class: MozWebShellMozillaShim
* Method: raptorWidgetInvalidate
* Signature: (IZ)V
*/
JNIEXPORT void JNICALL
Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWidgetInvalidate (
JNIEnv * env,
jobject obj,
jint widgetPtr,
jboolean isSynchronous)
{
(* nativeWidgetInvalidate) (env, obj, widgetPtr, isSynchronous);
} // Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWidgetInvalidate()
/*
* Class: MozWebShellMozillaShim
* Method: raptorWidgetUpdate
* Signature: (I)V
*/
JNIEXPORT void JNICALL
Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWidgetUpdate (
JNIEnv * env,
jobject obj,
jint widgetPtr)
{
(* nativeWidgetUpdate) (env, obj, widgetPtr);
} // Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWidgetUpdate()
JNIEXPORT void JNICALL
Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeProcessEvents (
JNIEnv* env,
jobject obj,
jint theWebShell)
{
(* nativeProcessEvents) (env, obj, theWebShell);
}
/*
* Class: MozWebShellMozillaShim
* Method: raptorWebShellCreate
* Signature: (IIIIII)I
*/
JNIEXPORT jint JNICALL
Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellCreate (
JNIEnv * env,
jobject obj,
jint windowPtr,
jint x,
jint y,
jint width,
jint height)
{
return (* nativeWebShellCreate) (env, obj, windowPtr, x, y, width, height);
} // Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellCreate()
/*
* Class: MozWebShellMozillaShim
* Method: raptorWebShellDelete
* Signature: (I)V
*/
JNIEXPORT void JNICALL
Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellDelete (
JNIEnv * env,
jobject obj,
jint webShellPtr)
{
(* nativeWebShellDelete) (env, obj, webShellPtr);
} // Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellDelete()
/*
* Class: MozWebShellMozillaShim
* Method: raptorWebShellLoadURL
* Signature: (ILjava/lang/String;)V
*/
JNIEXPORT void JNICALL
Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellLoadURL (
JNIEnv * env,
jobject obj,
jint webShellPtr,
jstring urlString)
{
(* nativeWebShellLoadURL) (env, obj, webShellPtr, urlString);
} // Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellLoadURL()
/*
* Class: MozWebShellMozillaShim
* Method: raptorWebShellStop
* Signature: (I)V
*/
JNIEXPORT void JNICALL
Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellStop (
JNIEnv * env,
jobject obj,
jint webShellPtr)
{
(* nativeWebShellStop) (env, obj, webShellPtr);
} // Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellStop()
/*
* Class: MozWebShellMozillaShim
* Method: raptorWebShellShow
* Signature: (I)V
*/
JNIEXPORT void JNICALL
Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellShow (
JNIEnv * env,
jobject obj,
jint webShellPtr)
{
(* nativeWebShellShow) (env, obj, webShellPtr);
} // Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellShow()
/*
* Class: MozWebShellMozillaShim
* Method: raptorWebShellHide
* Signature: (I)V
*/
JNIEXPORT void JNICALL
Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellHide (
JNIEnv * env,
jobject obj,
jint webShellPtr)
{
(* nativeWebShellHide) (env, obj, webShellPtr);
} // Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellHide()
/*
* Class: MozWebShellMozillaShim
* Method: raptorWebShellSetBounds
* Signature: (IIIII)V
*/
JNIEXPORT void JNICALL
Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellSetBounds (
JNIEnv * env,
jobject obj,
jint webShellPtr,
jint x,
jint y,
jint width,
jint height)
{
(* nativeWebShellSetBounds) (env, obj, webShellPtr, x, y, width, height);
} // Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellSetBounds()
/*
* Class: MozWebShellMozillaShim
* Method: raptorWebShellMoveTo
* Signature: (III)V
*/
JNIEXPORT void JNICALL
Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellMoveTo (
JNIEnv * env,
jobject obj,
jint webShellPtr,
jint x,
jint y)
{
(* nativeWebShellMoveTo) (env, obj, webShellPtr, x, y);
} // Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellMoveTo()
/*
* Class: MozWebShellMozillaShim
* Method: raptorWebShellSetFocus
* Signature: (I)V
*/
JNIEXPORT void JNICALL
Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellSetFocus (
JNIEnv * env,
jobject obj,
jint webShellPtr)
{
(* nativeWebShellSetFocus) (env, obj, webShellPtr);
} // Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellSetFocus()
/*
* Class: MozWebShellMozillaShim
* Method: raptorWebShellRemoveFocus
* Signature: (I)V
*/
JNIEXPORT void JNICALL
Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellRemoveFocus (
JNIEnv * env,
jobject obj,
jint webShellPtr)
{
(* nativeWebShellRemoveFocus) (env, obj, webShellPtr);
} // Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellRemoveFocus()
/*
* Class: MozWebShellMozillaShim
* Method: raptorWebShellRepaint
* Signature: (IZ)V
*/
JNIEXPORT void JNICALL
Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellRepaint (
JNIEnv * env,
jobject obj,
jint webShellPtr,
jboolean forceRepaint)
{
(* nativeWebShellRepaint) (env, obj, webShellPtr, forceRepaint);
} // Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellRepaint()
/*
* Class: MozWebShellMozillaShim
* Method: raptorWebShellCanBack
* Signature: (I)Z
*/
JNIEXPORT jboolean JNICALL
Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellCanBack (
JNIEnv * env,
jobject obj,
jint webShellPtr)
{
return (* nativeWebShellCanBack) (env, obj, webShellPtr);
} // Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellCanBack()
/*
* Class: MozWebShellMozillaShim
* Method: raptorWebShellCanForward
* Signature: (I)Z
*/
JNIEXPORT jboolean JNICALL
Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellCanForward (
JNIEnv * env,
jobject obj,
jint webShellPtr)
{
return (* nativeWebShellCanForward) (env, obj, webShellPtr);
} // Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellCanForward()
/*
* Class: MozWebShellMozillaShim
* Method: raptorWebShellBack
* Signature: (I)Z
*/
JNIEXPORT jboolean JNICALL
Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellBack (
JNIEnv * env,
jobject obj,
jint webShellPtr)
{
return (* nativeWebShellBack) (env, obj, webShellPtr);
} // Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellBack()
/*
* Class: MozWebShellMozillaShim
* Method: raptorWebShellForward
* Signature: (I)Z
*/
JNIEXPORT jboolean JNICALL
Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellForward (
JNIEnv * env,
jobject obj,
jint webShellPtr)
{
return (* nativeWebShellForward) (env, obj, webShellPtr);
} // Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellForward()
/*
* Class: MozWebShellMozillaShim
* Method: raptorWebShellGoTo
* Signature: (II)Z
*/
JNIEXPORT jboolean JNICALL
Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellGoTo (
JNIEnv * env,
jobject obj,
jint webShellPtr,
jint historyIndex)
{
return (* nativeWebShellGoTo) (env, obj, webShellPtr, historyIndex);
} // Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellGoTo()
/*
* Class: MozWebShellMozillaShim
* Method: raptorWebShellGetHistoryLength
* Signature: (I)I
*/
JNIEXPORT jint JNICALL
Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellGetHistoryLength (
JNIEnv * env,
jobject obj,
jint webShellPtr)
{
return (* nativeWebShellGetHistoryLength) (env, obj, webShellPtr);
} // Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellGetHistoryLength()
/*
* Class: MozWebShellMozillaShim
* Method: raptorWebShellGetHistoryIndex
* Signature: (I)I
*/
JNIEXPORT jint JNICALL
Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellGetHistoryIndex (
JNIEnv * env,
jobject obj,
jint webShellPtr)
{
return (* nativeWebShellGetHistoryIndex) (env, obj, webShellPtr);
} // Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellGetHistoryIndex()
/*
* Class: MozWebShellMozillaShim
* Method: raptorWebShellGetURL
* Signature: (II)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL
Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellGetURL (
JNIEnv * env,
jobject obj,
jint webShellPtr,
jint historyIndex)
{
return (* nativeWebShellGetURL) (env, obj, webShellPtr, historyIndex);
} // Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellGetURL()
// added by Mark Goddard OTMP 9/2/1999
/*
* Class: MozWebShellMozillaShim
* Method: raptorWebShellRefresh
* Signature: (I)Z
*/
JNIEXPORT jboolean JNICALL
Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellRefresh (
JNIEnv * env,
jobject obj,
jint webShellPtr)
{
return (* nativeWebShellRefresh) (env, obj, webShellPtr);
} // Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellRefresh()
/*
* Class: BrowserControlMozillaShimStub
* Method: nativeWebShellAddDocListener
* Signature: (I)Z
*/
JNIEXPORT jboolean JNICALL
Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellAddDocListener (
JNIEnv * env,
jobject obj,
jint webShellPtr,
jobject listener)
{
return (* nativeWebShellAddDocListener) (env, obj, webShellPtr, listener);
} // Java_org_mozilla_webclient_BrowserControlMozillaShim_nativeWebShellAddDocListener()
// EOF

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

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

@ -33,6 +33,7 @@
#include <gdk/gdkx.h>
#include <gtk/gtk.h>
#include "gtkmozilla.h"
#include "gtkmozarea.h"
#include "nsIDOMDocument.h"
#include <dlfcn.h>
@ -48,37 +49,8 @@ extern "C" {
*/
JNIEXPORT jint JNICALL Java_org_mozilla_webclient_motif_MotifBrowserControlCanvas_createTopLevelWindow
(JNIEnv * env, jobject obj) {
static GtkWidget *window = NULL;
static GtkWidget *mShell = NULL;
// PENDING(mark): This is a hack needed in order to get those error
// messages about:
/***************************************************
*nsComponentManager: Load(/disk4/mozilla/mozilla/dist/bin/components/librdf.so)
*FAILED with error: libsunwjdga.so: cannot open shared object file:
*No such file or directory
****************************************************/
// But the weird thing is, libhistory.so isn't linked with libsunwjdga.so.
// In fact, libsunwjdga.so doesn't even exist anywhere! I know it's
// a JDK library, but I think it is only supposed to get used on
// Solaris, not Linux. And why the hell is nsComponentManager trying
// to open this JDK library anyways? I need to try and get my stuff
// building on Solaris. Also, I will have to scan the Linux
// JDK1.2 sources and figure out what's going on. In the meantime....
//
// -Mark
void * dll;
dll = dlopen("components/libhistory.so", RTLD_NOW | RTLD_GLOBAL);
if (!dll) {
printf("Got Error: %s\n", dlerror());
}
dll = dlopen("components/librdf.so", RTLD_NOW | RTLD_GLOBAL);
if (!dll) {
printf("Got Error: %s\n", dlerror());
}
NS_SetupRegistry();
/* Initialise GTK */
gtk_set_locale ();
@ -86,11 +58,11 @@ JNIEXPORT jint JNICALL Java_org_mozilla_webclient_motif_MotifBrowserControlCanva
gdk_rgb_init();
window = gtk_window_new (GTK_WINDOW_POPUP);
gtk_window_set_default_size(GTK_WINDOW(window), 300, 300);
gtk_window_set_title(GTK_WINDOW(window), "Simple browser");
return (jint) window;
mShell = gtk_window_new (GTK_WINDOW_POPUP);
gtk_window_set_default_size(GTK_WINDOW(mShell), 300, 300);
gtk_window_set_title(GTK_WINDOW(mShell), "Simple browser");
return (jint) mShell;
}
/*
@ -101,25 +73,21 @@ JNIEXPORT jint JNICALL Java_org_mozilla_webclient_motif_MotifBrowserControlCanva
JNIEXPORT jint JNICALL Java_org_mozilla_webclient_motif_MotifBrowserControlCanvas_createContainerWindow
(JNIEnv * env, jobject obj, jint parent, jint screenWidth, jint screenHeight) {
GtkWidget * window = (GtkWidget *) parent;
GtkWidget * vbox;
GtkWidget * mozilla;
vbox = gtk_vbox_new (FALSE, 5);
gtk_container_add (GTK_CONTAINER (window), vbox);
gtk_widget_show(vbox);
mozilla = gtk_mozilla_new();
gtk_box_pack_start (GTK_BOX (vbox), mozilla, TRUE, TRUE, 0);
GtkWidget *mMozArea = NULL;
mMozArea = gtk_mozarea_new();
gtk_container_add(GTK_CONTAINER(window), mMozArea);
gtk_widget_realize(GTK_WIDGET(mMozArea));
// HACK: javaMake sure this window doesn't appear onscreen!!!!
gtk_widget_set_uposition(window, screenWidth + 20, screenHeight + 20);
gtk_widget_show(mozilla);
gtk_widget_show(mMozArea);
gtk_widget_show(window);
//gtk_main();
return (jint) mozilla;
return (jint) mMozArea;
}
int getWinID(GtkWidget * gtkWidgetPtr) {
@ -179,9 +147,19 @@ JNIEXPORT void JNICALL Java_org_mozilla_webclient_motif_MotifBrowserControlCanva
}
}
/*
* Class: org_mozilla_webclient_motif_MotifBrowserControlCanvas
* Method: loadMainDll
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_org_mozilla_webclient_motif_MotifBrowserControlCanvas_loadMainDll
(JNIEnv *, jclass)
{
printf("incorrect loadMainDll called\n\n");
fflush(stdout);
}
} // End extern "C"

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

@ -31,6 +31,8 @@
#include <jni.h>
#include "MotifBrowserControlCanvas.h"
#include "BrowserControlMozillaShimStub.h"
#include <dlfcn.h>
extern void locateBrowserControlStubFunctions(void *);
@ -132,3 +134,14 @@ JNIEXPORT void JNICALL Java_org_mozilla_webclient_motif_MotifBrowserControlCanva
(JNIEnv * env, jobject obj, jint xwinID, jint width, jint height) {
(* setGTKWindowSize) (env, obj, xwinID, width, height);
}
/*
* Class: org_mozilla_webclient_motif_MotifBrowserControlCanvas
* Method: loadMainDll
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_org_mozilla_webclient_motif_MotifBrowserControlCanvas_loadMainDll
(JNIEnv *, jclass)
{
loadMainDll();
}

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

@ -1,39 +0,0 @@
#!/bin/sh
MOZILLA_TOP=${PWD}/../../..
MOZILLA_DIST=${MOZILLA_TOP}/dist
MOZILLA_FIVE_HOME=${MOZILLA_DIST}/bin
export MOZILLA_FIVE_HOME
# Standard JDK 1.2 location
JDK_LOCATION=${JDKHOME}
# WARNING: YOU NEED TO RUN 'gtk-config --libs' and stick in whatever library
# paths it gives you!!!!
GTKLIBS=/usr/local/X11R6/lib:/opt/local/lib:/usr/openwin/lib:/usr/dt/lib
# For Solaris
LD_LIBRARY_PATH=${JDK_LOCATION}/jre/lib/sparc:${JDK_LOCATION}/jre/lib/sparc/native_threads:${JDK_LOCATION}/jre/lib/sparc/classic:${MOZILLA_DIST}/bin:${GTKLIBS}:.:/usr/local/lib:/usr/lib:/lib
export LD_LIBRARY_PATH
JAVA=${JDK_LOCATION}/bin/java
OUTPUT_DIR=${MOZILLA_DIST}/classes
# JDK 1.2 CLASSES
CLASSES=${JDK_LOCATION}/lib/tools.jar:${JDK_LOCATION}/lib/rt.jar:${OUTPUT_DIR}
CLASSNAME=org.mozilla.webclient.test.EmbeddedMozilla
echo
echo "===================================================================="
echo JDKHOME=${JDKHOME}
echo "===================================================================="
echo CLASSPATH=${CLASSES}
echo "===================================================================="
echo MOZILLA_FIVE_HOME=${MOZILLA_FIVE_HOME}
echo "===================================================================="
echo LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
echo "===================================================================="
echo
# For debugging...
#${JAVA} -native -verbose:jni -Xcheck:jni -classpath ${CLASSES} ${CLASSNAME} $1
echo ${JAVA} -native -classpath ${CLASSES} ${CLASSNAME} $1 $2 $3 $4 $5
${JAVA} -native -classpath ${CLASSES} ${CLASSNAME} $1 $2 $3 $4 $5