At long last, I have webclient running on Mac OSX. I only have a

PowerBook G4, so the only binary I can produce is for the PowerPC.
Perhaps someone lucky enough to own a MacBookPro can produce a binary
for me on that processor architecture.

Many thanks to the generous folks on #developers, in particular, timeless,
cbarrett, sdwilsh, and jhpedemonte.

Here are the changes.

SECTION: Changes

M dist/build.xml

- propogate clean on mac os x

- On mac os x, there is .jnilib and also .dylib

M dom/build.xml

- propogate make on mac os x

M webclient/build.xml

- new file for javah on mac

- propogate clobber_all on mac

M webclient/classes_spec/org/mozilla/webclient/BrowserControlCanvas.java

- get the tree lock before calling to native code to get the native window

A webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/CocoaAppKitThreadDelegatingNativeEventThread.java

- Allows running arbitrary code on the AppKit thread.  Prevents Thread
  Safety assertions.

M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/CocoaBrowserControlCanvas.java

- adhere to informal protocol to create NativeEventThread

M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/ImplObjectNative.java

- use NativeEventThread.instance.isNativeEventThread()

M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/NativeEventThread.java

- implement isNativeEventThread()

M webclient/src_moz/Makefile.in

- turn on objc-exceptions on mac os x

M webclient/src_moz/NativeBrowserControl.cpp
M webclient/src_moz/NativeBrowserControl.h

- work with cocoa

M webclient/src_moz/NativeEventThread.cpp
M webclient/src_moz/cocoa/CocoaBrowserControlCanvas.h
M webclient/src_moz/cocoa/CocoaBrowserControlCanvasImpl.cpp

- two methods to run arbitrary code on the AppKit thread

M webclient/src_moz/cocoa/CocoaBrowserControlCanvas.mm
M webclient/test/manual/src/classes/org/mozilla/webclient/test/TestBrowser.java


git-svn-id: svn://10.0.0.236/trunk@227737 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
edburns%acm.org
2007-06-10 16:24:12 +00:00
parent 43dba5fc79
commit 4d80afa4ef
16 changed files with 489 additions and 185 deletions

View File

@@ -37,6 +37,7 @@
#include "EmbedEventListener.h"
#include "NativeBrowserControl.h"
#include "ns_util.h"
#include "ns_globals.h"
// all of the crap that we need for event listeners
// and when chrome windows finish loading
@@ -132,6 +133,10 @@ NativeBrowserControl::Realize(jobject javaBrowserControl,
void *parentWinPtr, PRBool *aAlreadyRealized,
PRUint32 width, PRUint32 height)
{
// parentWinPtr is whatever was returned from
// <platform>BrowserControlCanvas.getWindow().
nsresult rv = NS_OK;
mJavaBrowserControl = javaBrowserControl;
@@ -147,10 +152,10 @@ NativeBrowserControl::Realize(jobject javaBrowserControl,
parentHWnd = ownerAsWidget;
width = ownerAsWidget->allocation.width;
height = ownerAsWidget->allocation.height;
#elif !defined(XP_MACOSX)
#elif defined(XP_PC)
parentHWnd = (HWND) parentWinPtr;
#else
parentHWnd = parentWinPtr;
#elif (defined(XP_MAC) || defined(XP_MACOSX)) && defined(MOZ_WIDGET_COCOA)
parentHWnd = (void *) parentWinPtr;
#endif
// create the window