зеркало из https://github.com/mozilla/gecko-dev.git
Bug 186036 - Allow PPEmbed to build under Mach-O. NOT YET PART OF BUILD. r=pinkerton/sr=bryner/a=asa
This commit is contained in:
Родитель
fad9fac9e7
Коммит
32df2c754b
|
@ -0,0 +1,66 @@
|
|||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla 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/MPL/
|
||||
#
|
||||
# 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.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2001
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Conrad Carlen <ccarlen@netscape.com>
|
||||
#
|
||||
# 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 MPL, 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 MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
DEPTH = ../../../
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
ifdef MOZ_DEBUG
|
||||
BUILDSTYLE = Development
|
||||
else
|
||||
BUILDSTYLE = Deployment
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
ABS_topsrcdir := $(shell cd $(topsrcdir); pwd)
|
||||
ifneq ($(ABS_topsrcdir),$(MOZ_BUILD_ROOT))
|
||||
export::
|
||||
rsync -a --exclude .DS_Store --exclude "CVS/" $(srcdir)/PPEmbed.pbproj .
|
||||
ln -fs $(srcdir)/pch
|
||||
ln -fs $(srcdir)/resources
|
||||
ln -fs $(srcdir)/source
|
||||
endif
|
||||
|
||||
libs::
|
||||
pbxbuild -buildstyle $(BUILDSTYLE) build
|
||||
|
||||
clean clobber::
|
||||
rm -rf build
|
|
@ -1124,20 +1124,6 @@
|
|||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>Browser.ppob</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Resource</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>Browser.rsrc</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Resource</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>profDirServiceProviderDebug.o</PATH>
|
||||
|
@ -1348,6 +1334,27 @@
|
|||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>SaveFormatPanel.r</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>Views.r</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>PPEmbed.r</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
</FILELIST>
|
||||
<LINKORDER>
|
||||
<FILEREF>
|
||||
|
@ -1475,16 +1482,6 @@
|
|||
<PATH>CustomTextColorCDEF.rsrc</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>Browser.ppob</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>Browser.rsrc</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>WindowsLib</PATH>
|
||||
|
@ -1615,6 +1612,21 @@
|
|||
<PATH>CTextInputEventHandling.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>SaveFormatPanel.r</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>Views.r</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>PPEmbed.r</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
</LINKORDER>
|
||||
</TARGET>
|
||||
<TARGET>
|
||||
|
@ -2671,20 +2683,6 @@
|
|||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>Browser.ppob</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Resource</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>Browser.rsrc</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Resource</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>NSPR20.shlb</PATH>
|
||||
|
@ -2902,6 +2900,27 @@
|
|||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>SaveFormatPanel.r</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>Views.r</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>PPEmbed.r</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
</FILELIST>
|
||||
<LINKORDER>
|
||||
<FILEREF>
|
||||
|
@ -3029,16 +3048,6 @@
|
|||
<PATH>CustomTextColorCDEF.rsrc</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>Browser.ppob</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>Browser.rsrc</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>cfmAlias.rsrc</PATH>
|
||||
|
@ -3169,6 +3178,21 @@
|
|||
<PATH>CTextInputEventHandling.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>SaveFormatPanel.r</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>Views.r</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>PPEmbed.r</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
</LINKORDER>
|
||||
</TARGET>
|
||||
<TARGET>
|
||||
|
@ -4190,20 +4214,6 @@
|
|||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>Browser.ppob</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Resource</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>Browser.rsrc</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Resource</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>profDirServiceProviderDebug.o</PATH>
|
||||
|
@ -4393,6 +4403,27 @@
|
|||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>SaveFormatPanel.r</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>Views.r</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>PPEmbed.r</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
</FILELIST>
|
||||
<LINKORDER>
|
||||
<FILEREF>
|
||||
|
@ -4500,16 +4531,6 @@
|
|||
<PATH>CustomTextColorCDEF.rsrc</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>Browser.ppob</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>Browser.rsrc</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>CarbonLib</PATH>
|
||||
|
@ -4615,6 +4636,21 @@
|
|||
<PATH>CTextInputEventHandling.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>SaveFormatPanel.r</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>Views.r</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>PPEmbed.r</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
</LINKORDER>
|
||||
</TARGET>
|
||||
<TARGET>
|
||||
|
@ -5629,20 +5665,6 @@
|
|||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>Browser.ppob</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Resource</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>Browser.rsrc</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Resource</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>NSPR20.shlb</PATH>
|
||||
|
@ -5839,6 +5861,27 @@
|
|||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>SaveFormatPanel.r</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>Views.r</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>PPEmbed.r</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
</FILELIST>
|
||||
<LINKORDER>
|
||||
<FILEREF>
|
||||
|
@ -6006,16 +6049,6 @@
|
|||
<PATH>CustomTextColorCDEF.rsrc</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>Browser.ppob</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>Browser.rsrc</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>cfmAlias.rsrc</PATH>
|
||||
|
@ -6061,6 +6094,21 @@
|
|||
<PATH>CTextInputEventHandling.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>SaveFormatPanel.r</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>Views.r</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>PPEmbed.r</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
</LINKORDER>
|
||||
</TARGET>
|
||||
</TARGETLIST>
|
||||
|
@ -6205,13 +6253,31 @@
|
|||
<FILEREF>
|
||||
<TARGETNAME>PPEmbedDebug</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>Browser.rsrc</PATH>
|
||||
<PATH>PPEmbed.r</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>PPEmbedDebug</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>Browser.ppob</PATH>
|
||||
<PATH>Views.r</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>PPEmbedDebug</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>ContextMenus.r</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>PPEmbedDebug</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>SaveFormatPanel.r</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>PPEmbedDebug</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>Throbber.r</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
|
@ -6232,18 +6298,6 @@
|
|||
<PATH>cfmAliasDebug.rsrc</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>PPEmbedDebug</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>ContextMenus.r</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>PPEmbedDebug</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>Throbber.r</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
</GROUP>
|
||||
<GROUP><NAME>PowerPlant</NAME>
|
||||
<FILEREF>
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,112 @@
|
|||
Mach-O Build Notes
|
||||
|
||||
1. The Mach-O build of PPEmbed is made with PowerPlant from CW Pro 8. Project
|
||||
Builder has no idea where PowerPlant is installed on your drive. PPEmbed.pbproj
|
||||
is set up with PowerPlant located, by absolute path, at /Developer/PowerPlant.
|
||||
Needless to say, that's not where it exists on your drive, so a symlink is needed.
|
||||
Open a terminal window and do this:
|
||||
|
||||
% cd /Developer
|
||||
% ln -s <Drag the PowerPlant folder into the terminal window>
|
||||
|
||||
You can type the whole path to the PowerPlant folder if you like, but it's a
|
||||
long, gruesome path with spaces.
|
||||
|
||||
2. A few changes need to be made to PowerPlant in order to get it to compile with
|
||||
gcc. Fortunately, these don't prevent it from being compiled with CW. The diffs
|
||||
are included below. They cannot easily be applied with patch, but do illustrate
|
||||
the changes.
|
||||
|
||||
================================================================================
|
||||
diff -u -t orig-PP-files/LException.cp changed-PP-files/LException.cp
|
||||
--- orig-PP-files/LException.cp Thu Jan 23 14:41:59 2003
|
||||
+++ changed-PP-files/LException.cp Thu Jan 23 14:41:20 2003
|
||||
@@ -91,7 +91,7 @@
|
||||
// ¥ ~LException Destructor [public]
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
-LException::~LException()
|
||||
+LException::~LException() throw()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
// Returns the error message as a C string. Inherited from std::exception.
|
||||
|
||||
const char*
|
||||
-LException::what() const
|
||||
+LException::what() const throw()
|
||||
{
|
||||
StringPtr lastPtr = (StringPtr) &mErrorString[mErrorString[0]];
|
||||
|
||||
================================================================================
|
||||
diff -u -t orig-PP-files/LException.h changed-PP-files/LException.h
|
||||
--- orig-PP-files/LException.h Thu Jan 23 14:41:49 2003
|
||||
+++ changed-PP-files/LException.h Thu Jan 23 14:41:01 2003
|
||||
@@ -30,9 +30,9 @@
|
||||
|
||||
LException& operator = ( const LException& inException );
|
||||
|
||||
- virtual ~LException();
|
||||
+ virtual ~LException() throw();
|
||||
|
||||
- virtual const char* what() const;
|
||||
+ virtual const char* what() const throw();
|
||||
|
||||
SInt32 GetErrorCode() const;
|
||||
|
||||
================================================================================
|
||||
diff -u -t orig-PP-files/LGATabsControlImp.cp changed-PP-files/LGATabsControlImp.cp
|
||||
--- orig-PP-files/LGATabsControlImp.cp Thu Jan 23 14:41:54 2003
|
||||
+++ changed-PP-files/LGATabsControlImp.cp Thu Jan 23 14:41:08 2003
|
||||
@@ -991,11 +991,11 @@
|
||||
tabButton->SetIconResourceID(info->iconSuiteID);
|
||||
}
|
||||
break;
|
||||
+ }
|
||||
|
||||
default:
|
||||
LGAControlImp::SetDataTag(inPartCode, inTag, inDataSize, inDataPtr);
|
||||
break;
|
||||
- }
|
||||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
diff -u -t orig-PP-files/LStream.h changed-PP-files/LStream.h
|
||||
--- orig-PP-files/LStream.h Thu Jan 23 14:41:43 2003
|
||||
+++ changed-PP-files/LStream.h Thu Jan 23 14:41:14 2003
|
||||
@@ -154,13 +154,13 @@
|
||||
(*this) << (double) inNum;
|
||||
return (*this);
|
||||
}
|
||||
-
|
||||
+#ifdef __MWERKS__
|
||||
LStream& operator << (short double inNum)
|
||||
{
|
||||
(*this) << (double) inNum;
|
||||
return (*this);
|
||||
}
|
||||
-
|
||||
+#endif
|
||||
LStream& operator << (bool inBool)
|
||||
{
|
||||
WriteBlock(&inBool, sizeof(inBool));
|
||||
@@ -276,7 +276,7 @@
|
||||
outNum = num;
|
||||
return (*this);
|
||||
}
|
||||
-
|
||||
+#ifdef __MWERKS
|
||||
LStream& operator >> (short double &outNum)
|
||||
{
|
||||
double num;
|
||||
@@ -284,7 +284,7 @@
|
||||
outNum = (short double) num;
|
||||
return (*this);
|
||||
}
|
||||
-
|
||||
+#endif
|
||||
LStream& operator >> (bool &outBool)
|
||||
{
|
||||
ReadBlock(&outBool, sizeof(outBool));
|
|
@ -0,0 +1,159 @@
|
|||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
||||
*
|
||||
* 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 PPEmbed code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Conrad Carlen <ccarlen@netscape.com>
|
||||
*
|
||||
* 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 MPL, 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 MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
// PowerPlant Config
|
||||
#define PP_Target_Carbon 1
|
||||
#define PP_Suppress_Notes_221 1
|
||||
#define PP_MenuUtils_Option PP_MenuUtils_AppearanceOnly
|
||||
#define PP_Uses_Aqua_MenuBar 1
|
||||
|
||||
// Carbon Headers
|
||||
#include <Carbon/Carbon.h>
|
||||
|
||||
// PowerPlant Headers
|
||||
#include <LAction.h>
|
||||
#include <LUndoer.h>
|
||||
#include <UTETextAction.h>
|
||||
#include <UTEViewTextAction.h>
|
||||
|
||||
#include <LModelDirector.h>
|
||||
#include <LModelObject.h>
|
||||
#include <LModelProperty.h>
|
||||
#include <UAppleEventsMgr.h>
|
||||
#include <UExtractFromAEDesc.h>
|
||||
|
||||
#include <LArray.h>
|
||||
#include <LArrayIterator.h>
|
||||
#include <LComparator.h>
|
||||
#include <LRunArray.h>
|
||||
#include <LVariableArray.h>
|
||||
#include <TArray.h>
|
||||
#include <TArrayIterator.h>
|
||||
|
||||
#include <LApplication.h>
|
||||
#include <LCommander.h>
|
||||
#include <LDocApplication.h>
|
||||
#include <LDocument.h>
|
||||
#include <LSingleDoc.h>
|
||||
|
||||
#include <LAttachable.h>
|
||||
#include <LAttachment.h>
|
||||
#include <LBroadcaster.h>
|
||||
#include <LDragAndDrop.h>
|
||||
#include <LDragTask.h>
|
||||
#include <LEventDispatcher.h>
|
||||
#include <LListener.h>
|
||||
#include <LPeriodical.h>
|
||||
#include <LSharable.h>
|
||||
|
||||
#include <LDataStream.h>
|
||||
#include <LFile.h>
|
||||
#include <LFileStream.h>
|
||||
#include <LHandleStream.h>
|
||||
#include <LStream.h>
|
||||
|
||||
#include <LButton.h>
|
||||
#include <LCaption.h>
|
||||
#include <LCicnButton.h>
|
||||
#include <LControl.h>
|
||||
#include <LDialogBox.h>
|
||||
#include <LEditField.h>
|
||||
#include <LFocusBox.h>
|
||||
#include <LGrafPortView.h>
|
||||
#include <LListBox.h>
|
||||
#include <LOffscreenView.h>
|
||||
#include <LPane.h>
|
||||
#include <LPicture.h>
|
||||
#include <LPlaceHolder.h>
|
||||
#include <LPrintout.h>
|
||||
#include <LRadioGroupView.h>
|
||||
#include <LScroller.h>
|
||||
#include <LStdControl.h>
|
||||
#include <LTabGroupView.h>
|
||||
#include <LTableView.h>
|
||||
#include <LTextEditView.h>
|
||||
#include <LView.h>
|
||||
#include <LWindow.h>
|
||||
#include <UGWorld.h>
|
||||
#include <UQuickTime.h>
|
||||
|
||||
#include <PP_Constants.h>
|
||||
#include <PP_KeyCodes.h>
|
||||
#include <PP_Macros.h>
|
||||
#include <PP_Messages.h>
|
||||
#include <PP_Prefix.h>
|
||||
#include <PP_Resources.h>
|
||||
#include <PP_Types.h>
|
||||
|
||||
#include <LClipboard.h>
|
||||
#include <LFileTypeList.h>
|
||||
#include <LMenu.h>
|
||||
#include <LMenuBar.h>
|
||||
#include <LRadioGroup.h>
|
||||
#include <LString.h>
|
||||
#include <LTabGroup.h>
|
||||
#include <UDesktop.h>
|
||||
|
||||
#include <UAttachments.h>
|
||||
#include <UCursor.h>
|
||||
#include <UDebugging.h>
|
||||
#include <UDrawingState.h>
|
||||
#include <UDrawingUtils.h>
|
||||
#include <UEnvironment.h>
|
||||
#include <UException.h>
|
||||
#include <UKeyFilters.h>
|
||||
#include <UMemoryMgr.h>
|
||||
#include <UModalDialogs.h>
|
||||
#include <UPrinting.h>
|
||||
#include <UReanimator.h>
|
||||
#include <URegions.h>
|
||||
#include <URegistrar.h>
|
||||
#include <UScrap.h>
|
||||
#include <UScreenPort.h>
|
||||
#include <UTextEdit.h>
|
||||
#include <UTextTraits.h>
|
||||
#include <UWindows.h>
|
||||
|
||||
// Mozilla
|
||||
#include "mozilla-config.h"
|
||||
|
||||
// Flags applicable to any build
|
||||
#include "PPEmbedConfig.h"
|
||||
|
||||
// Flags for this particular build
|
||||
#define POWERPLANT_IS_FRAMEWORK
|
Двоичные данные
embedding/browser/powerplant/resources/Browser.ppob
Двоичные данные
embedding/browser/powerplant/resources/Browser.ppob
Двоичный файл не отображается.
Двоичные данные
embedding/browser/powerplant/resources/Browser.rsrc
Двоичные данные
embedding/browser/powerplant/resources/Browser.rsrc
Двоичный файл не отображается.
Двоичный файл не отображается.
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,82 @@
|
|||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
||||
*
|
||||
* 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 PPEmbed code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* 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 MPL, 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 MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include <Types.r>
|
||||
|
||||
resource 'DITL' (1550, "Save format panel", purgeable) {
|
||||
{ /* array DITLarray: 2 elements */
|
||||
/* [1] */
|
||||
{16, 12, 32, 75},
|
||||
StaticText {
|
||||
disabled,
|
||||
"Save as:"
|
||||
},
|
||||
/* [2] */
|
||||
{12, 68, 36, 236},
|
||||
Control {
|
||||
enabled,
|
||||
1550
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
resource 'MENU' (1550) {
|
||||
1550,
|
||||
textMenuProc,
|
||||
allEnabled,
|
||||
enabled,
|
||||
"Save Format",
|
||||
{ /* array: 3 elements */
|
||||
/* [1] */
|
||||
"Text Only", noIcon, noKey, noMark, plain,
|
||||
/* [2] */
|
||||
"HTML", noIcon, noKey, noMark, plain,
|
||||
/* [3] */
|
||||
"HTML Complete", noIcon, noKey, noMark, plain
|
||||
}
|
||||
};
|
||||
|
||||
resource 'CNTL' (1550, "Save format popup", purgeable) {
|
||||
{12, 68, 36, 236},
|
||||
0,
|
||||
visible,
|
||||
0,
|
||||
1550,
|
||||
401,
|
||||
0,
|
||||
""
|
||||
};
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 23 KiB |
|
@ -202,14 +202,25 @@ NS_METHOD CAppFileLocationProvider::GetProductDirectory(nsILocalFile **aLocalFil
|
|||
nsCOMPtr<nsIProperties> directoryService =
|
||||
do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
|
||||
OSErr err;
|
||||
|
||||
#if defined(XP_MACOSX)
|
||||
FSRef fsRef;
|
||||
err = ::FSFindFolder(kUserDomain, kDomainLibraryFolderType, kCreateFolder, &fsRef);
|
||||
if (err) return NS_ERROR_FAILURE;
|
||||
NS_NewLocalFile(nsString(), PR_TRUE, getter_AddRefs(localDir));
|
||||
if (!localDir) return NS_ERROR_FAILURE;
|
||||
nsCOMPtr<nsILocalFileMac> localDirMac(do_QueryInterface(localDir));
|
||||
rv = localDirMac->InitWithFSRef(&fsRef);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
#else
|
||||
long response;
|
||||
err = ::Gestalt(gestaltSystemVersion, &response);
|
||||
const char *prop = (!err && response >= 0x00001000) ? NS_MAC_USER_LIB_DIR : NS_MAC_DOCUMENTS_DIR;
|
||||
|
||||
rv = directoryService->Get(prop, NS_GET_IID(nsILocalFile), getter_AddRefs(localDir));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
#endif
|
||||
|
||||
rv = localDir->AppendRelativeNativePath(nsDependentCString(mProductDirName));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
|
||||
#include "CBrowserApp.h"
|
||||
|
||||
#include <LGrowZone.h>
|
||||
#include <PP_Messages.h>
|
||||
#include <PP_Resources.h>
|
||||
#include <UDrawingState.h>
|
||||
|
@ -70,14 +69,17 @@
|
|||
#include "nsIFileChannel.h"
|
||||
#include "nsXPIDLString.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "macstdlibextras.h"
|
||||
#include "SIOUX.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsIWindowWatcher.h"
|
||||
#include "nsIDOMWindow.h"
|
||||
#include "nsIDownload.h"
|
||||
#include "nsCRT.h"
|
||||
|
||||
#if defined(__MWERKS__) && !defined(__MACH__)
|
||||
#include "macstdlibextras.h"
|
||||
#include "SIOUX.h"
|
||||
#endif
|
||||
|
||||
#include <TextServices.h>
|
||||
|
||||
#ifdef USE_PROFILES
|
||||
|
@ -99,30 +101,34 @@ int main()
|
|||
SetDebugThrow_(PP_PowerPlant::debugAction_Alert); // Set Debugging options
|
||||
SetDebugSignal_(PP_PowerPlant::debugAction_Alert);
|
||||
|
||||
#ifdef POWERPLANT_IS_FRAMEWORK
|
||||
// A framework's Resource Mgr resources must be opened explicitly.
|
||||
CFBundleRef powerplantBundle = ::CFBundleGetBundleWithIdentifier(
|
||||
CFSTR("org.mozilla.PowerPlant"));
|
||||
SInt16 powerPlantResRefNum = -1;
|
||||
if (powerplantBundle) {
|
||||
powerPlantResRefNum = ::CFBundleOpenBundleResourceMap(powerplantBundle);
|
||||
::CFRelease(powerplantBundle);
|
||||
}
|
||||
#endif
|
||||
|
||||
PP_PowerPlant::InitializeHeap(3); // Initialize Memory Manager
|
||||
// Parameter is number of Master Pointer
|
||||
// blocks to allocate
|
||||
|
||||
|
||||
#if __PowerPlant__ >= 0x02100000
|
||||
PP_PowerPlant::UQDGlobals::InitializeToolbox();
|
||||
#else
|
||||
PP_PowerPlant::UQDGlobals::InitializeToolbox(&qd);
|
||||
#endif
|
||||
|
||||
#if DEBUG
|
||||
#if defined(__MWERKS__) && !TARGET_CARBON
|
||||
::InitializeSIOUX(false);
|
||||
#endif
|
||||
|
||||
#if !TARGET_CARBON
|
||||
#if !TARGET_CARBON
|
||||
new PP_PowerPlant::LGrowZone(20000); // Install a GrowZone function to catch low memory situations.
|
||||
::InitTSMAwareApplication();
|
||||
#endif
|
||||
|
||||
new PP_PowerPlant::LGrowZone(20000); // Install a GrowZone function to catch low memory situations.
|
||||
|
||||
{
|
||||
CBrowserApp theApp; // create instance of your application
|
||||
|
||||
theApp.Run();
|
||||
}
|
||||
|
||||
|
@ -277,8 +283,7 @@ CBrowserApp::StartUp()
|
|||
|
||||
nsCOMPtr<nsProfileDirServiceProvider> locProvider;
|
||||
NS_NewProfileDirServiceProvider(PR_TRUE, getter_AddRefs(locProvider));
|
||||
if (!locProvider)
|
||||
return NS_ERROR_FAILURE;
|
||||
ThrowIfNil_(locProvider);
|
||||
|
||||
// Directory service holds an strong reference to any
|
||||
// provider that is registered with it. Let it hold the
|
||||
|
@ -601,7 +606,7 @@ pascal OSStatus CBrowserApp::AppEventHandler(EventHandlerCallRef aHandlerChain,
|
|||
typeHICommand, NULL, sizeof(HICommand),
|
||||
NULL, &command) != noErr)
|
||||
return result;
|
||||
|
||||
|
||||
switch (::GetEventKind(event))
|
||||
{
|
||||
case kEventCommandProcess:
|
||||
|
@ -609,10 +614,12 @@ pascal OSStatus CBrowserApp::AppEventHandler(EventHandlerCallRef aHandlerChain,
|
|||
switch (command.commandID)
|
||||
{
|
||||
case kHICommandPreferences:
|
||||
{
|
||||
CBrowserApp *theApp = reinterpret_cast<CBrowserApp*>(userData);
|
||||
theApp->ObeyCommand(PP_PowerPlant::cmd_Preferences, nsnull);
|
||||
result = noErr;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ const PRInt32 kGrowIconSize = 15;
|
|||
CBrowserChrome::CBrowserChrome(CBrowserShell *aShell,
|
||||
UInt32 aChromeFlags,
|
||||
Boolean aIsMainContent) :
|
||||
mBrowserWindow(nsnull), mBrowserShell(aShell),
|
||||
mBrowserShell(aShell), mBrowserWindow(nsnull),
|
||||
mChromeFlags(aChromeFlags), mIsMainContent(aIsMainContent),
|
||||
mSizeToContent(false),
|
||||
mInModalLoop(false), mWindowVisible(false),
|
||||
|
@ -409,7 +409,7 @@ NS_IMETHODIMP CBrowserChrome::GetSiteWindow(void * *aSiteWindow)
|
|||
NS_ENSURE_ARG(aSiteWindow);
|
||||
NS_ENSURE_STATE(mBrowserWindow);
|
||||
|
||||
*aSiteWindow = mBrowserWindow->Compat_GetMacWindow();
|
||||
*aSiteWindow = mBrowserWindow->GetMacWindow();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -498,8 +498,6 @@ void CBrowserChrome::ListenToMessage(MessageT inMessage, void* ioParam)
|
|||
{
|
||||
case msg_OnNetStopChange:
|
||||
{
|
||||
const MsgNetStartInfo *info = reinterpret_cast<MsgNetStartInfo*>(ioParam);
|
||||
|
||||
mInitialLoadComplete = true;
|
||||
|
||||
// See if we need to size it and show it
|
||||
|
|
|
@ -257,9 +257,9 @@ NS_IMETHODIMP CBrowserShellProgressListener::OnSecurityChange(nsIWebProgress *aW
|
|||
//*****************************************************************************
|
||||
|
||||
CBrowserShell::CBrowserShell() :
|
||||
LDropArea(GetMacWindow()),
|
||||
mChromeFlags(nsIWebBrowserChrome::CHROME_DEFAULT), mIsMainContent(true),
|
||||
mContextMenuFlags(nsIContextMenuListener2::CONTEXT_NONE),
|
||||
LDropArea(GetMacWindow())
|
||||
mContextMenuFlags(nsIContextMenuListener2::CONTEXT_NONE)
|
||||
{
|
||||
nsresult rv = CommonConstruct();
|
||||
if (rv != NS_OK)
|
||||
|
@ -356,7 +356,7 @@ NS_IMETHODIMP CBrowserShell::EnsureTopLevelWidget(nsIWidget **aWidget)
|
|||
nsresult rv;
|
||||
nsIWidget *widget = nsnull;
|
||||
|
||||
err = ::GetWindowProperty(Compat_GetMacWindow(), 'PPMZ', 'WIDG', sizeof(nsIWidget*), nsnull, (void*)&widget);
|
||||
err = ::GetWindowProperty(GetMacWindow(), 'PPMZ', 'WIDG', sizeof(nsIWidget*), nsnull, (void*)&widget);
|
||||
if (err == noErr && widget) {
|
||||
*aWidget = widget;
|
||||
NS_ADDREF(*aWidget);
|
||||
|
@ -377,11 +377,11 @@ NS_IMETHODIMP CBrowserShell::EnsureTopLevelWidget(nsIWidget **aWidget)
|
|||
Rect grayRect;
|
||||
::GetRegionBounds(grayRgn, &grayRect);
|
||||
nsRect r(0, 0, grayRect.right - grayRect.left, grayRect.bottom - grayRect.top);
|
||||
rv = newWidget->Create(Compat_GetMacWindow(), r, nsnull, nsnull, nsnull, nsnull, nsnull);
|
||||
rv = newWidget->Create(GetMacWindow(), r, nsnull, nsnull, nsnull, nsnull, nsnull);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
widget = newWidget;
|
||||
err = ::SetWindowProperty(Compat_GetMacWindow(), 'PPMZ', 'WIDG', sizeof(nsIWidget*), (void*)&widget);
|
||||
err = ::SetWindowProperty(GetMacWindow(), 'PPMZ', 'WIDG', sizeof(nsIWidget*), (void*)&widget);
|
||||
if (err == noErr) {
|
||||
*aWidget = newWidget;
|
||||
NS_ADDREF(*aWidget);
|
||||
|
@ -939,7 +939,7 @@ NS_METHOD CBrowserShell::SetWebBrowser(nsIWebBrowser* aBrowser)
|
|||
FocusDraw();
|
||||
|
||||
/*
|
||||
CBrowserWindow *ourWindow = dynamic_cast<CBrowserWindow*>(LWindow::FetchWindowObject(Compat_GetMacWindow()));
|
||||
CBrowserWindow *ourWindow = dynamic_cast<CBrowserWindow*>(LWindow::FetchWindowObject(GetMacWindow()));
|
||||
NS_ENSURE_TRUE(ourWindow, NS_ERROR_FAILURE);
|
||||
|
||||
nsCOMPtr<nsIWidget> aWidget;
|
||||
|
@ -1678,7 +1678,9 @@ OSStatus CBrowserShell::HandleUpdateActiveInputArea(
|
|||
&err);
|
||||
if (noErr != err)
|
||||
return err;
|
||||
return NS_FAILED(res) ? eventNotHandledErr : noErr;
|
||||
if (NS_FAILED(res))
|
||||
return eventNotHandledErr;
|
||||
return noErr;
|
||||
}
|
||||
|
||||
OSStatus CBrowserShell::HandleUnicodeForKeyEvent(
|
||||
|
@ -1698,8 +1700,10 @@ OSStatus CBrowserShell::HandleUnicodeForKeyEvent(
|
|||
(void*)keyboardEvent,
|
||||
&err);
|
||||
if (noErr != err)
|
||||
return err;
|
||||
return NS_FAILED(res) ? eventNotHandledErr : noErr;
|
||||
return err;
|
||||
if (NS_FAILED(res))
|
||||
return eventNotHandledErr;
|
||||
return noErr;
|
||||
}
|
||||
|
||||
OSStatus CBrowserShell::HandleOffsetToPos(
|
||||
|
@ -1714,9 +1718,12 @@ OSStatus CBrowserShell::HandleOffsetToPos(
|
|||
|
||||
OSStatus err = noErr;
|
||||
nsresult res = tieSink->HandleOffsetToPos( offset, pointX, pointY, &err);
|
||||
|
||||
if (noErr != err)
|
||||
return err;
|
||||
return NS_FAILED(res) ? eventNotHandledErr : noErr;
|
||||
return err;
|
||||
if (NS_FAILED(res))
|
||||
return eventNotHandledErr;
|
||||
return noErr;
|
||||
}
|
||||
|
||||
OSStatus CBrowserShell::HandlePosToOffset(
|
||||
|
@ -1735,8 +1742,10 @@ OSStatus CBrowserShell::HandlePosToOffset(
|
|||
nsresult res = tieSink->HandlePosToOffset( currentPointX, currentPointY,
|
||||
offset, regionClass, &err);
|
||||
if (noErr != err)
|
||||
return err;
|
||||
return NS_FAILED(res) ? eventNotHandledErr : noErr;
|
||||
return err;
|
||||
if (NS_FAILED(res))
|
||||
return eventNotHandledErr;
|
||||
return noErr;
|
||||
}
|
||||
|
||||
OSStatus CBrowserShell::HandleGetSelectedText(nsAString& selectedText)
|
||||
|
@ -1748,8 +1757,11 @@ OSStatus CBrowserShell::HandleGetSelectedText(nsAString& selectedText)
|
|||
|
||||
OSStatus err = noErr;
|
||||
nsresult res = tieSink->HandleGetSelectedText( selectedText, &err);
|
||||
|
||||
if (noErr != err)
|
||||
return err;
|
||||
return NS_FAILED(res) ? eventNotHandledErr : noErr;
|
||||
return err;
|
||||
if (NS_FAILED(res))
|
||||
return eventNotHandledErr;
|
||||
return noErr;
|
||||
}
|
||||
|
||||
|
|
|
@ -182,7 +182,7 @@ void CBrowserWindow::ShowSelf()
|
|||
|
||||
nsIWidget *widget = nsnull;
|
||||
|
||||
OSStatus err = ::GetWindowProperty(Compat_GetMacWindow(), 'PPMZ', 'WIDG', sizeof(nsIWidget*), nsnull, (void*)&widget);
|
||||
OSStatus err = ::GetWindowProperty(GetMacWindow(), 'PPMZ', 'WIDG', sizeof(nsIWidget*), nsnull, (void*)&widget);
|
||||
if (err == noErr && widget)
|
||||
widget->Show(PR_TRUE);
|
||||
}
|
||||
|
@ -199,8 +199,6 @@ void CBrowserWindow::ListenToMessage(MessageT inMessage,
|
|||
{
|
||||
case msg_OnNetStartChange:
|
||||
{
|
||||
const MsgNetStartInfo *info = reinterpret_cast<MsgNetStartInfo*>(ioParam);
|
||||
|
||||
if (mProgressBar) {
|
||||
mProgressBar->Show();
|
||||
mProgressBar->SetIndeterminateFlag(true, true);
|
||||
|
@ -216,8 +214,6 @@ void CBrowserWindow::ListenToMessage(MessageT inMessage,
|
|||
|
||||
case msg_OnNetStopChange:
|
||||
{
|
||||
const MsgNetStopInfo *info = reinterpret_cast<MsgNetStopInfo*>(ioParam);
|
||||
|
||||
if (mThrobber)
|
||||
mThrobber->Stop();
|
||||
|
||||
|
|
|
@ -299,13 +299,14 @@ nsresult CHeaderSniffer::PerformSave(nsIURI* inOriginalURI, const ESaveFormat in
|
|||
|
||||
{
|
||||
Str255 defaultName;
|
||||
char tempBuf1[256], tempBuf2[64];
|
||||
bool result;
|
||||
|
||||
CPlatformUCSConversion::GetInstance()->UCSToPlatform(defaultFileName, defaultName);
|
||||
::CopyPascalStringToC(defaultName, tempBuf1);
|
||||
#ifndef XP_MACOSX
|
||||
char tempBuf1[256], tempBuf2[64];
|
||||
::CopyPascalStringToC(defaultName, tempBuf1);
|
||||
::CopyCStringToPascal(NS_TruncNodeName(tempBuf1, tempBuf2), defaultName);
|
||||
|
||||
#endif
|
||||
if (isHTML) {
|
||||
ESaveFormat saveFormat = SaveFormatFromPrefValue(filterIndex);
|
||||
UNavServicesDialogs::LCustomFileDesignator customDesignator;
|
||||
|
|
|
@ -22,6 +22,9 @@
|
|||
|
||||
#include "CIconServicesIcon.h"
|
||||
|
||||
#include "UResourceMgr.h"
|
||||
#include "UMemoryMgr.h"
|
||||
|
||||
#include <Processes.h>
|
||||
|
||||
//*****************************************************************************
|
||||
|
@ -29,7 +32,7 @@
|
|||
//*****************************************************************************
|
||||
|
||||
OSType CIconServicesIcon::mgAppCreator;
|
||||
FSSpec CIconServicesIcon::mgAppFileSpec;
|
||||
FSSpec CIconServicesIcon::mgIconFileSpec;
|
||||
|
||||
CIconServicesIcon::CIconServicesIcon(const SPaneInfo& inPaneInfo,
|
||||
MessageT inValueMessage,
|
||||
|
@ -63,6 +66,9 @@ CIconServicesIcon::~CIconServicesIcon()
|
|||
|
||||
void CIconServicesIcon::DrawSelf()
|
||||
{
|
||||
if (!mIconRef)
|
||||
return;
|
||||
|
||||
Rect iconRect;
|
||||
CalcLocalFrameRect(iconRect);
|
||||
AdjustIconRect(iconRect);
|
||||
|
@ -112,6 +118,9 @@ SInt16 CIconServicesIcon::FindHotSpot(Point inPoint) const
|
|||
Boolean CIconServicesIcon::PointInHotSpot(Point inPoint,
|
||||
SInt16 inHotSpot) const
|
||||
{
|
||||
if (!mIconRef)
|
||||
return false;
|
||||
|
||||
Rect iconRect;
|
||||
CalcLocalFrameRect(iconRect);
|
||||
AdjustIconRect(iconRect);
|
||||
|
@ -158,11 +167,34 @@ void CIconServicesIcon::Init()
|
|||
ProcessInfoRec info;
|
||||
info.processInfoLength = sizeof(info);
|
||||
info.processName = nil;
|
||||
info.processAppSpec = &mgAppFileSpec;
|
||||
info.processAppSpec = nil;
|
||||
err = ::GetProcessInformation(&psn, &info);
|
||||
ThrowIfError_(err);
|
||||
mgAppCreator = info.processSignature;
|
||||
|
||||
// RegisterIconRefFromResource() needs to be given an FSSpec of
|
||||
// the file containing the 'icns' resource of the icon being
|
||||
// registered. The following will track down the file no matter
|
||||
// how our application is packaged.
|
||||
|
||||
StResLoad resLoadState(false);
|
||||
StResource resHandle('icns', mIconResID); // throws if N/A
|
||||
SInt16 resRefNum = ::HomeResFile(resHandle);
|
||||
if (resRefNum != -1)
|
||||
{
|
||||
FCBPBRec pb;
|
||||
|
||||
pb.ioNamePtr = mgIconFileSpec.name;
|
||||
pb.ioVRefNum = 0;
|
||||
pb.ioRefNum = resRefNum;
|
||||
pb.ioFCBIndx = 0;
|
||||
err = PBGetFCBInfoSync(&pb);
|
||||
if (err == noErr)
|
||||
{
|
||||
mgIconFileSpec.vRefNum = pb.ioFCBVRefNum;
|
||||
mgIconFileSpec.parID = pb.ioFCBParID;
|
||||
}
|
||||
}
|
||||
gInitialized = true;
|
||||
}
|
||||
GetIconRef();
|
||||
|
@ -182,17 +214,11 @@ void CIconServicesIcon::AdjustIconRect(Rect& ioRect) const
|
|||
|
||||
void CIconServicesIcon::GetIconRef()
|
||||
{
|
||||
OSErr err;
|
||||
IconRef iconRef;
|
||||
|
||||
// We would like to first see if the icon is already registered
|
||||
// But, for some reason, the following call always returns noErr and the wrong icon.
|
||||
// err = ::GetIconRef(mgAppFileSpec.vRefNum, mgAppCreator, mIconType, &iconRef);
|
||||
// err = ::GetIconRef(mgIconFileSpec.vRefNum, mgAppCreator, mIconType, &iconRef);
|
||||
// if (err != noErr)
|
||||
|
||||
err = ::RegisterIconRefFromResource(mgAppCreator, mIconType, &mgAppFileSpec, mIconResID, &iconRef);
|
||||
ThrowIfError_(err);
|
||||
mIconRef = iconRef;
|
||||
::RegisterIconRefFromResource(mgAppCreator, mIconType, &mgIconFileSpec, mIconResID, &mIconRef);
|
||||
}
|
||||
|
||||
void CIconServicesIcon::ReleaseIconRef()
|
||||
|
|
|
@ -70,7 +70,7 @@ protected:
|
|||
bool mbIsPressed;
|
||||
|
||||
static OSType mgAppCreator;
|
||||
static FSSpec mgAppFileSpec;
|
||||
static FSSpec mgIconFileSpec;
|
||||
};
|
||||
|
||||
#endif // __CIconServicesIcon_h__
|
||||
|
|
|
@ -333,7 +333,10 @@ void CProfileManager::DoLogout()
|
|||
if (item == iCancel)
|
||||
return;
|
||||
|
||||
rv = profileService->ShutDownCurrentProfile(item == iPersist ? nsIProfile::SHUTDOWN_PERSIST : nsIProfile::SHUTDOWN_CLEANSE);
|
||||
if (item == iPersist)
|
||||
rv = profileService->ShutDownCurrentProfile(nsIProfile::SHUTDOWN_PERSIST);
|
||||
else
|
||||
rv = profileService->ShutDownCurrentProfile(nsIProfile::SHUTDOWN_CLEANSE);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
// Just put this up modally until they pick a new profile
|
||||
DoManageProfilesDialog();
|
||||
|
|
|
@ -90,7 +90,7 @@ void CThrobber::HideSelf()
|
|||
void CThrobber::DrawSelf()
|
||||
{
|
||||
if (mMovieController)
|
||||
::MCDraw(mMovieController, Compat_GetMacWindow());
|
||||
::MCDraw(mMovieController, GetMacWindow());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
||||
*
|
||||
* 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 the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications, Inc. Portions created by Netscape are
|
||||
* Copyright (C) 1999, Mozilla. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Conrad Carlen <ccarlen@netscape.com>
|
||||
*/
|
||||
|
||||
#ifndef __CarbonCompatibility_h
|
||||
#define __CarbonCompatibility_h
|
||||
|
||||
// Some PowerPlant compatibility macros
|
||||
#if __PowerPlant__ >= 0x02108000
|
||||
#define Compat_GetMacWindow GetMacWindow
|
||||
#else
|
||||
#define Compat_GetMacWindow GetMacPort
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
|
@ -23,9 +23,11 @@
|
|||
#include "EmbedEventHandling.h"
|
||||
#include "CTextInputEventHandler.h"
|
||||
|
||||
#include "nsRepeater.h"
|
||||
#include "prthread.h"
|
||||
|
||||
#if defined(__MWERKS__) && defined(DEBUG) && !TARGET_CARBON
|
||||
#include "SIOUX.h"
|
||||
#endif
|
||||
|
||||
#include "nsIWidget.h"
|
||||
#include "nsIEventSink.h"
|
||||
|
@ -121,7 +123,7 @@ void CEmbedEventAttachment::ExecuteSelf(MessageT inMessage,
|
|||
} else if (inMessage == msg_Event) {
|
||||
inMacEvent = static_cast<EventRecord*>(ioParam);
|
||||
|
||||
#ifdef DEBUG
|
||||
#if defined(__MWERKS__) && defined(DEBUG) && !TARGET_CARBON
|
||||
// 2. See if the event is for the console window.
|
||||
// Limit what types of events we send to it.
|
||||
if ((inMacEvent->what == mouseDown ||
|
||||
|
@ -237,32 +239,9 @@ CEmbedIdler::~CEmbedIdler()
|
|||
|
||||
void CEmbedIdler::SpendTime(const EventRecord& inMacEvent)
|
||||
{
|
||||
Repeater::DoIdlers(inMacEvent);
|
||||
::PR_Sleep(PR_INTERVAL_NO_WAIT);
|
||||
}
|
||||
|
||||
|
||||
//*****************************************************************************
|
||||
// CEmbedRepeater
|
||||
//
|
||||
//
|
||||
//*****************************************************************************
|
||||
|
||||
CEmbedRepeater::CEmbedRepeater()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
CEmbedRepeater::~CEmbedRepeater()
|
||||
{
|
||||
}
|
||||
|
||||
void CEmbedRepeater::SpendTime(const EventRecord& inMacEvent)
|
||||
{
|
||||
Repeater::DoRepeaters(inMacEvent);
|
||||
}
|
||||
|
||||
|
||||
//*****************************************************************************
|
||||
// Initialization Function - Call at application startup.
|
||||
//*****************************************************************************
|
||||
|
@ -276,10 +255,6 @@ void InitializeEmbedEventHandling(LApplication* theApplication)
|
|||
CEmbedIdler *embedIdler = new CEmbedIdler;
|
||||
ThrowIfNil_(embedIdler);
|
||||
embedIdler->StartIdling();
|
||||
|
||||
CEmbedRepeater *embedRepeater = new CEmbedRepeater;
|
||||
ThrowIfNil_(embedRepeater);
|
||||
embedRepeater->StartRepeating();
|
||||
|
||||
#if TARGET_CARBON
|
||||
InitializeTextInputEventHandling();
|
||||
|
|
|
@ -28,8 +28,6 @@
|
|||
|
||||
#include "PPHeadersDebug_pch"
|
||||
|
||||
#include "CarbonCompatibility.h"
|
||||
|
||||
// Config flags common to all builds
|
||||
#include "PPEmbedConfig.h"
|
||||
|
||||
|
|
|
@ -245,8 +245,6 @@ NS_IMETHODIMP CPromptService::ConfirmEx(nsIDOMWindow *parent, const PRUnichar *d
|
|||
{
|
||||
NS_ENSURE_ARG_POINTER(buttonPressed);
|
||||
|
||||
nsresult resultErr = NS_OK;
|
||||
|
||||
StDialogHandler theHandler(dlog_ConfirmEx, CBrowserChrome::GetLWindowForDOMWindow(parent));
|
||||
LWindow *theDialog = theHandler.GetDialog();
|
||||
nsCAutoString cStr;
|
||||
|
|
|
@ -224,7 +224,7 @@ NS_IMETHODIMP CDownload::OnProgressChange(nsIWebProgress *aWebProgress, nsIReque
|
|||
if (aMaxTotalProgress == -1)
|
||||
mPercentComplete = -1;
|
||||
else
|
||||
mPercentComplete = ((float)aCurTotalProgress / (float)aMaxTotalProgress) * 100.0;
|
||||
mPercentComplete = (PRInt32)(((float)aCurTotalProgress / (float)aMaxTotalProgress) * 100.0 + 0.5);
|
||||
|
||||
MsgOnDLProgressChangeInfo info(this, aCurTotalProgress, aMaxTotalProgress);
|
||||
BroadcastMessage(msg_OnDLProgressChange, &info);
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
#include "nsIDownload.h"
|
||||
#include "nsIWebProgressListener.h"
|
||||
#include "nsIHelperAppLauncherDialog.h"
|
||||
#include "nsIExternalHelperAppService.h"
|
||||
|
||||
#include "nsIURI.h"
|
||||
#include "nsILocalFile.h"
|
||||
|
|
|
@ -302,7 +302,7 @@ void CDownloadProgressView::FinishCreateSelf()
|
|||
paneID_SrcURILabel,
|
||||
paneID_DestFileLabel };
|
||||
|
||||
for (int i = 0; i < sizeof(labelIDs) / sizeof(labelIDs[0]); i++) {
|
||||
for (size_t i = 0; i < sizeof(labelIDs) / sizeof(labelIDs[0]); i++) {
|
||||
LStaticText *staticText = dynamic_cast<LStaticText*>(FindPaneByID(labelIDs[i]));
|
||||
if (staticText)
|
||||
staticText->SetFontStyle(styleRec);
|
||||
|
@ -520,7 +520,7 @@ void CDownloadProgressView::UpdateStatus(CDownload::MsgOnDLProgressChangeInfo *i
|
|||
}
|
||||
|
||||
if (mTimeRemainingText) {
|
||||
PRInt32 secsRemaining = rint(float(info->mMaxProgress - info->mCurProgress) / bytesPerSec);
|
||||
PRInt32 secsRemaining = (PRInt32)(float(info->mMaxProgress - info->mCurProgress) / bytesPerSec + 0.5);
|
||||
mTimeRemainingText->SetText(FormatFuzzyTime(secsRemaining, valueStr));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,19 +21,32 @@
|
|||
*/
|
||||
|
||||
#include "UMacUnicode.h"
|
||||
|
||||
#include <TextCommon.h>
|
||||
#include <Script.h>
|
||||
|
||||
#include "nsString.h"
|
||||
#include "nsIUnicodeEncoder.h"
|
||||
#include "nsIUnicodeDecoder.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsICharsetConverterManager.h"
|
||||
|
||||
static TextEncoding getSystemEncoding()
|
||||
{
|
||||
OSStatus err;
|
||||
TextEncoding theEncoding;
|
||||
|
||||
err = ::UpgradeScriptInfoToTextEncoding(smSystemScript, kTextLanguageDontCare,
|
||||
kTextRegionDontCare, NULL, &theEncoding);
|
||||
|
||||
if (err != noErr)
|
||||
theEncoding = kTextEncodingMacRoman;
|
||||
|
||||
return theEncoding;
|
||||
}
|
||||
|
||||
CPlatformUCSConversion *CPlatformUCSConversion::mgInstance = nsnull;
|
||||
UnicodeToTextInfo CPlatformUCSConversion::sEncoderInfo = nsnull;
|
||||
TextToUnicodeInfo CPlatformUCSConversion::sDecoderInfo = nsnull;
|
||||
|
||||
CPlatformUCSConversion::CPlatformUCSConversion() :
|
||||
mCharsetSel(kPlatformCharsetSel_FileName)
|
||||
CPlatformUCSConversion::CPlatformUCSConversion()
|
||||
{
|
||||
mEncoder = nsnull;
|
||||
mDecoder = nsnull;
|
||||
}
|
||||
|
||||
|
||||
|
@ -47,123 +60,78 @@ CPlatformUCSConversion::GetInstance()
|
|||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
CPlatformUCSConversion::SetCharsetSelector(nsPlatformCharsetSel aSel)
|
||||
{
|
||||
if (mCharsetSel != aSel) {
|
||||
mCharsetSel = aSel;
|
||||
mPlatformCharset.Truncate(0);
|
||||
mEncoder = nsnull;
|
||||
mDecoder = nsnull;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
CPlatformUCSConversion::PreparePlatformCharset()
|
||||
{
|
||||
nsresult res = NS_OK;
|
||||
|
||||
if (mPlatformCharset.Length() == 0)
|
||||
{
|
||||
nsCOMPtr<nsIPlatformCharset> pcharset =
|
||||
do_GetService(NS_PLATFORMCHARSET_CONTRACTID, &res);
|
||||
if (!(NS_SUCCEEDED(res) && pcharset)) {
|
||||
NS_WARNING("cannot get platform charset");
|
||||
}
|
||||
if(NS_SUCCEEDED(res) && pcharset) {
|
||||
res = pcharset->GetCharset(mCharsetSel, mPlatformCharset);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
CPlatformUCSConversion::PrepareEncoder()
|
||||
{
|
||||
nsresult res = NS_OK;
|
||||
|
||||
if(! mEncoder)
|
||||
{
|
||||
res = PreparePlatformCharset();
|
||||
if(NS_SUCCEEDED(res)) {
|
||||
nsCOMPtr<nsICharsetConverterManager> ucmgr =
|
||||
do_GetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &res);
|
||||
NS_ASSERTION((NS_SUCCEEDED(res) && ucmgr),
|
||||
"cannot get charset converter manager ");
|
||||
if(NS_SUCCEEDED(res) && ucmgr)
|
||||
res = ucmgr->GetUnicodeEncoder( &mPlatformCharset, getter_AddRefs(mEncoder));
|
||||
NS_ASSERTION((NS_SUCCEEDED(res) && mEncoder),
|
||||
"cannot find the unicode encoder");
|
||||
}
|
||||
}
|
||||
return res;
|
||||
nsresult rv = NS_OK;
|
||||
if (!sEncoderInfo) {
|
||||
OSStatus err;
|
||||
err = ::CreateUnicodeToTextInfoByEncoding(getSystemEncoding(), &sEncoderInfo);
|
||||
if (err)
|
||||
rv = NS_ERROR_FAILURE;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
CPlatformUCSConversion::PrepareDecoder()
|
||||
{
|
||||
nsresult res = NS_OK;
|
||||
|
||||
if(! mDecoder)
|
||||
{
|
||||
res = PreparePlatformCharset();
|
||||
if(NS_SUCCEEDED(res)) {
|
||||
nsCOMPtr<nsICharsetConverterManager> ucmgr =
|
||||
do_GetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &res);
|
||||
NS_ASSERTION((NS_SUCCEEDED(res) && ucmgr),
|
||||
"cannot get charset converter manager ");
|
||||
if(NS_SUCCEEDED(res) && ucmgr)
|
||||
res = ucmgr->GetUnicodeDecoder( &mPlatformCharset, getter_AddRefs(mDecoder));
|
||||
NS_ASSERTION((NS_SUCCEEDED(res) && mDecoder),
|
||||
"cannot find the unicode decoder");
|
||||
}
|
||||
}
|
||||
return res;
|
||||
nsresult rv = NS_OK;
|
||||
if (!sDecoderInfo) {
|
||||
OSStatus err;
|
||||
err = ::CreateTextToUnicodeInfoByEncoding(getSystemEncoding(), &sDecoderInfo);
|
||||
if (err)
|
||||
rv = NS_ERROR_FAILURE;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
CPlatformUCSConversion::UCSToPlatform(const nsAString& aIn, nsACString& aOut)
|
||||
{
|
||||
nsresult res;
|
||||
nsresult rv = PrepareEncoder();
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
OSStatus err = noErr;
|
||||
char stackBuffer[512];
|
||||
|
||||
aOut.Truncate(0);
|
||||
res = PrepareEncoder();
|
||||
if(NS_SUCCEEDED(res))
|
||||
{
|
||||
nsReadingIterator<PRUnichar> done_reading;
|
||||
aIn.EndReading(done_reading);
|
||||
nsReadingIterator<PRUnichar> done_reading;
|
||||
aIn.EndReading(done_reading);
|
||||
|
||||
// for each chunk of |aIn|...
|
||||
PRUint32 fragmentLength = 0;
|
||||
nsReadingIterator<PRUnichar> iter;
|
||||
for (aIn.BeginReading(iter); iter != done_reading && NS_SUCCEEDED(res); iter.advance(PRInt32(fragmentLength)))
|
||||
{
|
||||
fragmentLength = PRUint32(iter.size_forward());
|
||||
PRInt32 inLength = fragmentLength;
|
||||
PRInt32 outLength;
|
||||
|
||||
res = mEncoder->GetMaxLength(iter.get(), fragmentLength, &outLength);
|
||||
if (NS_SUCCEEDED(res))
|
||||
{
|
||||
char *outBuf = (char*)nsMemory::Alloc(outLength);
|
||||
if (outBuf)
|
||||
{
|
||||
res = mEncoder->Convert(iter.get(), &inLength, outBuf, &outLength);
|
||||
if (NS_SUCCEEDED(res))
|
||||
aOut.Append(outBuf, outLength);
|
||||
nsMemory::Free(outBuf);
|
||||
}
|
||||
else
|
||||
res = NS_ERROR_OUT_OF_MEMORY;
|
||||
// for each chunk of |aIn|...
|
||||
PRUint32 fragmentLength = 0;
|
||||
nsReadingIterator<PRUnichar> iter;
|
||||
for (aIn.BeginReading(iter); iter != done_reading && err == noErr; iter.advance(PRInt32(fragmentLength)))
|
||||
{
|
||||
fragmentLength = PRUint32(iter.size_forward());
|
||||
UInt32 bytesLeft = fragmentLength * sizeof(UniChar);
|
||||
nsReadingIterator<PRUnichar> sub_iter(iter);
|
||||
|
||||
do {
|
||||
UInt32 bytesRead = 0, bytesWritten = 0;
|
||||
err = ::ConvertFromUnicodeToText(sEncoderInfo,
|
||||
bytesLeft,
|
||||
(const UniChar*)sub_iter.get(),
|
||||
kUnicodeUseFallbacksMask | kUnicodeLooseMappingsMask,
|
||||
0, nsnull, nsnull, nsnull,
|
||||
sizeof(stackBuffer),
|
||||
&bytesRead,
|
||||
&bytesWritten,
|
||||
stackBuffer);
|
||||
if (err == kTECUsedFallbacksStatus)
|
||||
err = noErr;
|
||||
else if (err == kTECOutputBufferFullStatus) {
|
||||
bytesLeft -= bytesRead;
|
||||
sub_iter.advance(bytesRead / sizeof(UniChar));
|
||||
}
|
||||
aOut.Append(stackBuffer, bytesWritten);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
while (err == kTECOutputBufferFullStatus);
|
||||
}
|
||||
return (err == noErr) ? NS_OK : NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
|
@ -189,41 +157,47 @@ CPlatformUCSConversion::UCSToPlatform(const nsAString& aIn, Str255& aOut)
|
|||
NS_IMETHODIMP
|
||||
CPlatformUCSConversion::PlatformToUCS(const nsACString& aIn, nsAString& aOut)
|
||||
{
|
||||
nsresult res;
|
||||
nsresult rv = PrepareDecoder();
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
OSStatus err = noErr;
|
||||
UniChar stackBuffer[512];
|
||||
|
||||
aOut.Truncate(0);
|
||||
res = PrepareDecoder();
|
||||
if (NS_SUCCEEDED(res))
|
||||
nsReadingIterator<char> done_reading;
|
||||
aIn.EndReading(done_reading);
|
||||
|
||||
// for each chunk of |aIn|...
|
||||
PRUint32 fragmentLength = 0;
|
||||
nsReadingIterator<char> iter;
|
||||
for (aIn.BeginReading(iter); iter != done_reading && err == noErr; iter.advance(PRInt32(fragmentLength)))
|
||||
{
|
||||
nsReadingIterator<char> done_reading;
|
||||
aIn.EndReading(done_reading);
|
||||
|
||||
// for each chunk of |aIn|...
|
||||
PRUint32 fragmentLength = 0;
|
||||
nsReadingIterator<char> iter;
|
||||
for (aIn.BeginReading(iter); iter != done_reading && NS_SUCCEEDED(res); iter.advance(PRInt32(fragmentLength)))
|
||||
{
|
||||
fragmentLength = PRUint32(iter.size_forward());
|
||||
PRInt32 inLength = fragmentLength;
|
||||
PRInt32 outLength;
|
||||
|
||||
res = mDecoder->GetMaxLength(iter.get(), inLength, &outLength);
|
||||
if (NS_SUCCEEDED(res))
|
||||
{
|
||||
PRUnichar *outBuf = (PRUnichar*)nsMemory::Alloc(outLength * sizeof(PRUnichar));
|
||||
if (outBuf)
|
||||
{
|
||||
res = mDecoder->Convert(iter.get(), &inLength, outBuf, &outLength);
|
||||
if(NS_SUCCEEDED(res))
|
||||
aOut.Append(outBuf, outLength);
|
||||
nsMemory::Free(outBuf);
|
||||
}
|
||||
else
|
||||
res = NS_ERROR_OUT_OF_MEMORY;
|
||||
fragmentLength = PRUint32(iter.size_forward());
|
||||
UInt32 bytesLeft = fragmentLength;
|
||||
nsReadingIterator<char> sub_iter(iter);
|
||||
|
||||
do {
|
||||
UInt32 bytesRead = 0, bytesWritten = 0;
|
||||
err = ::ConvertFromTextToUnicode(sDecoderInfo,
|
||||
bytesLeft,
|
||||
sub_iter.get(),
|
||||
kUnicodeUseFallbacksMask | kUnicodeLooseMappingsMask,
|
||||
0, nsnull, nsnull, nsnull,
|
||||
sizeof(stackBuffer),
|
||||
&bytesRead,
|
||||
&bytesWritten,
|
||||
stackBuffer);
|
||||
if (err == kTECUsedFallbacksStatus)
|
||||
err = noErr;
|
||||
else if (err == kTECOutputBufferFullStatus) {
|
||||
bytesLeft -= bytesRead;
|
||||
sub_iter.advance(bytesRead);
|
||||
}
|
||||
aOut.Append((PRUnichar *)stackBuffer, bytesWritten / sizeof(PRUnichar));
|
||||
}
|
||||
}
|
||||
return res;
|
||||
while (err == kTECOutputBufferFullStatus);
|
||||
}
|
||||
return (err == noErr) ? NS_OK : NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -23,12 +23,10 @@
|
|||
#ifndef __UMacUnicode__
|
||||
#define __UMacUnicode__
|
||||
|
||||
#include "nsIPlatformCharset.h"
|
||||
#include "nsIUnicodeEncoder.h"
|
||||
#include "nsIUnicodeDecoder.h"
|
||||
#include "nsString.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
||||
#include <UnicodeConverter.h>
|
||||
|
||||
class CPlatformUCSConversion {
|
||||
public:
|
||||
|
@ -36,9 +34,7 @@ public:
|
|||
virtual ~CPlatformUCSConversion(){};
|
||||
|
||||
static CPlatformUCSConversion* GetInstance();
|
||||
|
||||
NS_IMETHOD SetCharsetSelector(nsPlatformCharsetSel aSel);
|
||||
|
||||
|
||||
NS_IMETHOD UCSToPlatform(const nsAString& aIn, nsACString& aOut);
|
||||
NS_IMETHOD UCSToPlatform(const nsAString& aIn, Str255& aOut);
|
||||
|
||||
|
@ -47,15 +43,11 @@ public:
|
|||
|
||||
private:
|
||||
static CPlatformUCSConversion *mgInstance;
|
||||
static UnicodeToTextInfo sEncoderInfo;
|
||||
static TextToUnicodeInfo sDecoderInfo;
|
||||
|
||||
NS_IMETHOD PreparePlatformCharset();
|
||||
NS_IMETHOD PrepareEncoder();
|
||||
NS_IMETHOD PrepareDecoder();
|
||||
|
||||
nsPlatformCharsetSel mCharsetSel;
|
||||
nsAutoString mPlatformCharset;
|
||||
nsCOMPtr<nsIUnicodeEncoder> mEncoder;
|
||||
nsCOMPtr<nsIUnicodeDecoder> mDecoder;
|
||||
nsresult PrepareEncoder();
|
||||
nsresult PrepareDecoder();
|
||||
};
|
||||
|
||||
#endif // __UMacUnicode__
|
||||
|
|
|
@ -0,0 +1,65 @@
|
|||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla 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/MPL/
|
||||
#
|
||||
# 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.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2001
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Conrad Carlen <ccarlen@netscape.com>
|
||||
#
|
||||
# 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 MPL, 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 MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
DEPTH = ../../../
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
ifdef MOZ_DEBUG
|
||||
BUILDSTYLE = Development
|
||||
else
|
||||
BUILDSTYLE = Deployment
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
ABS_topsrcdir := $(shell cd $(topsrcdir); pwd)
|
||||
ifneq ($(ABS_topsrcdir),$(MOZ_BUILD_ROOT))
|
||||
export::
|
||||
rsync -a --exclude .DS_Store --exclude "CVS/" $(srcdir)/PowerPlant.pbproj .
|
||||
ln -fs $(srcdir)/pch
|
||||
ln -fs $(srcdir)/resources
|
||||
endif
|
||||
|
||||
libs::
|
||||
pbxbuild -buildstyle $(BUILDSTYLE) build
|
||||
|
||||
clean clobber::
|
||||
rm -rf build
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,150 @@
|
|||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
||||
*
|
||||
* 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) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Conrad Carlen <ccarlen@netscape.com>
|
||||
*
|
||||
* 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 MPL, 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 MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
// PowerPlant Config
|
||||
#define PP_Target_Carbon 1
|
||||
#define PP_Suppress_Notes_221 1
|
||||
#define PP_MenuUtils_Option PP_MenuUtils_AppearanceOnly
|
||||
#define PP_Uses_Aqua_MenuBar 1
|
||||
|
||||
// Carbon Headers
|
||||
#include <Carbon/Carbon.h>
|
||||
|
||||
// PowerPlant Headers
|
||||
#include <LAction.h>
|
||||
#include <LUndoer.h>
|
||||
#include <UTETextAction.h>
|
||||
#include <UTEViewTextAction.h>
|
||||
|
||||
#include <LModelDirector.h>
|
||||
#include <LModelObject.h>
|
||||
#include <LModelProperty.h>
|
||||
#include <UAppleEventsMgr.h>
|
||||
#include <UExtractFromAEDesc.h>
|
||||
|
||||
#include <LArray.h>
|
||||
#include <LArrayIterator.h>
|
||||
#include <LComparator.h>
|
||||
#include <LRunArray.h>
|
||||
#include <LVariableArray.h>
|
||||
#include <TArray.h>
|
||||
#include <TArrayIterator.h>
|
||||
|
||||
#include <LApplication.h>
|
||||
#include <LCommander.h>
|
||||
#include <LDocApplication.h>
|
||||
#include <LDocument.h>
|
||||
#include <LSingleDoc.h>
|
||||
|
||||
#include <LAttachable.h>
|
||||
#include <LAttachment.h>
|
||||
#include <LBroadcaster.h>
|
||||
#include <LDragAndDrop.h>
|
||||
#include <LDragTask.h>
|
||||
#include <LEventDispatcher.h>
|
||||
#include <LListener.h>
|
||||
#include <LPeriodical.h>
|
||||
#include <LSharable.h>
|
||||
|
||||
#include <LDataStream.h>
|
||||
#include <LFile.h>
|
||||
#include <LFileStream.h>
|
||||
#include <LHandleStream.h>
|
||||
#include <LStream.h>
|
||||
|
||||
#include <LButton.h>
|
||||
#include <LCaption.h>
|
||||
#include <LCicnButton.h>
|
||||
#include <LControl.h>
|
||||
#include <LDialogBox.h>
|
||||
#include <LEditField.h>
|
||||
#include <LFocusBox.h>
|
||||
#include <LGrafPortView.h>
|
||||
#include <LListBox.h>
|
||||
#include <LOffscreenView.h>
|
||||
#include <LPane.h>
|
||||
#include <LPicture.h>
|
||||
#include <LPlaceHolder.h>
|
||||
#include <LPrintout.h>
|
||||
#include <LRadioGroupView.h>
|
||||
#include <LScroller.h>
|
||||
#include <LStdControl.h>
|
||||
#include <LTabGroupView.h>
|
||||
#include <LTableView.h>
|
||||
#include <LTextEditView.h>
|
||||
#include <LView.h>
|
||||
#include <LWindow.h>
|
||||
#include <UGWorld.h>
|
||||
#include <UQuickTime.h>
|
||||
|
||||
#include <PP_Constants.h>
|
||||
#include <PP_KeyCodes.h>
|
||||
#include <PP_Macros.h>
|
||||
#include <PP_Messages.h>
|
||||
#include <PP_Prefix.h>
|
||||
#include <PP_Resources.h>
|
||||
#include <PP_Types.h>
|
||||
|
||||
#include <LClipboard.h>
|
||||
#include <LFileTypeList.h>
|
||||
#include <LMenu.h>
|
||||
#include <LMenuBar.h>
|
||||
#include <LRadioGroup.h>
|
||||
#include <LString.h>
|
||||
#include <LTabGroup.h>
|
||||
#include <UDesktop.h>
|
||||
|
||||
#include <UAttachments.h>
|
||||
#include <UCursor.h>
|
||||
#include <UDebugging.h>
|
||||
#include <UDrawingState.h>
|
||||
#include <UDrawingUtils.h>
|
||||
#include <UEnvironment.h>
|
||||
#include <UException.h>
|
||||
#include <UKeyFilters.h>
|
||||
#include <UMemoryMgr.h>
|
||||
#include <UModalDialogs.h>
|
||||
#include <UPrinting.h>
|
||||
#include <UReanimator.h>
|
||||
#include <URegions.h>
|
||||
#include <URegistrar.h>
|
||||
#include <UScrap.h>
|
||||
#include <UScreenPort.h>
|
||||
#include <UTextEdit.h>
|
||||
#include <UTextTraits.h>
|
||||
#include <UWindows.h>
|
Двоичный файл не отображается.
Загрузка…
Ссылка в новой задаче