From 1175d4dbe2f36a27ea281e36e7c6993100811a21 Mon Sep 17 00:00:00 2001 From: Josh Aas Date: Wed, 3 Sep 2008 00:39:55 -0400 Subject: [PATCH] remove xpcom plugin api samples, sdk documentation updates, mac build updates. b=360955 rs=jst --- modules/plugin/sdk/readme.txt | 61 +- .../4x-scriptable/acmeIScriptObject.idl | 28 - .../plugin/sdk/samples/4x-scriptable/doc.html | 220 -- .../sdk/samples/4x-scriptable/makefile.win | 77 - .../sdk/samples/4x-scriptable/np4xscr.def | 6 - .../sdk/samples/4x-scriptable/np4xscr.rc | 112 - .../sdk/samples/4x-scriptable/np_entry.cpp | 119 - .../sdk/samples/4x-scriptable/npmac.cpp | 705 ------ .../sdk/samples/4x-scriptable/npn_gate.cpp | 199 -- .../sdk/samples/4x-scriptable/npp_gate.cpp | 260 -- .../4x-scriptable/nsI4xScriptablePlugin.idl | 51 - .../4x-scriptable/nsScriptablePeer.cpp | 168 -- .../samples/4x-scriptable/nsScriptablePeer.h | 107 - .../4x-scriptable/nsScriptablePeer1.cpp | 81 - .../samples/4x-scriptable/nsScriptablePeer1.h | 96 - .../sdk/samples/4x-scriptable/plugin.cpp | 215 -- .../plugin/sdk/samples/4x-scriptable/plugin.h | 79 - .../sdk/samples/4x-scriptable/readme.txt | 39 - .../sdk/samples/4x-scriptable/resource.h | 20 - .../samples/4x-scriptable/script-test.html | 53 - .../sdk/samples/4x-scriptable/test.html | 48 - .../samples/SanePlugin/{README => readme.txt} | 0 .../sdk/samples/basic/mac/Basic Plugin.xml | 530 ---- modules/plugin/sdk/samples/basic/readme.txt | 3 + .../plugin/sdk/samples/npruntime/readme.txt | 3 + .../samples/npthread/{windows => }/readme.txt | 2 +- .../scriptable/mac/Scriptable Plugin.xml | 2136 ----------------- .../scriptable/mac/Scriptable PluginIDL.xml | 1438 ----------- .../plugin/sdk/samples/scriptable/readme.txt | 3 + modules/plugin/sdk/samples/simple/Makefile.in | 84 - .../plugin/sdk/samples/simple/npsimple.cpp | 1406 ----------- .../simple/nsISimplePluginInstance.idl | 50 - modules/plugin/sdk/samples/simple/simpleCID.h | 44 - modules/plugin/sdk/samples/simple/test.html | 12 - .../testevents/{README.txt => readme.txt} | 4 +- .../sdk/samples/unixprinting/readme.txt | 3 + modules/plugin/sdk/samples/winless/readme.txt | 3 + 37 files changed, 25 insertions(+), 8440 deletions(-) delete mode 100644 modules/plugin/sdk/samples/4x-scriptable/acmeIScriptObject.idl delete mode 100644 modules/plugin/sdk/samples/4x-scriptable/doc.html delete mode 100644 modules/plugin/sdk/samples/4x-scriptable/makefile.win delete mode 100644 modules/plugin/sdk/samples/4x-scriptable/np4xscr.def delete mode 100644 modules/plugin/sdk/samples/4x-scriptable/np4xscr.rc delete mode 100644 modules/plugin/sdk/samples/4x-scriptable/np_entry.cpp delete mode 100644 modules/plugin/sdk/samples/4x-scriptable/npmac.cpp delete mode 100644 modules/plugin/sdk/samples/4x-scriptable/npn_gate.cpp delete mode 100644 modules/plugin/sdk/samples/4x-scriptable/npp_gate.cpp delete mode 100644 modules/plugin/sdk/samples/4x-scriptable/nsI4xScriptablePlugin.idl delete mode 100644 modules/plugin/sdk/samples/4x-scriptable/nsScriptablePeer.cpp delete mode 100644 modules/plugin/sdk/samples/4x-scriptable/nsScriptablePeer.h delete mode 100644 modules/plugin/sdk/samples/4x-scriptable/nsScriptablePeer1.cpp delete mode 100644 modules/plugin/sdk/samples/4x-scriptable/nsScriptablePeer1.h delete mode 100644 modules/plugin/sdk/samples/4x-scriptable/plugin.cpp delete mode 100644 modules/plugin/sdk/samples/4x-scriptable/plugin.h delete mode 100644 modules/plugin/sdk/samples/4x-scriptable/readme.txt delete mode 100644 modules/plugin/sdk/samples/4x-scriptable/resource.h delete mode 100644 modules/plugin/sdk/samples/4x-scriptable/script-test.html delete mode 100644 modules/plugin/sdk/samples/4x-scriptable/test.html rename modules/plugin/sdk/samples/SanePlugin/{README => readme.txt} (100%) delete mode 100644 modules/plugin/sdk/samples/basic/mac/Basic Plugin.xml create mode 100644 modules/plugin/sdk/samples/basic/readme.txt create mode 100644 modules/plugin/sdk/samples/npruntime/readme.txt rename modules/plugin/sdk/samples/npthread/{windows => }/readme.txt (98%) delete mode 100644 modules/plugin/sdk/samples/scriptable/mac/Scriptable Plugin.xml delete mode 100644 modules/plugin/sdk/samples/scriptable/mac/Scriptable PluginIDL.xml create mode 100644 modules/plugin/sdk/samples/scriptable/readme.txt delete mode 100644 modules/plugin/sdk/samples/simple/Makefile.in delete mode 100644 modules/plugin/sdk/samples/simple/npsimple.cpp delete mode 100644 modules/plugin/sdk/samples/simple/nsISimplePluginInstance.idl delete mode 100644 modules/plugin/sdk/samples/simple/simpleCID.h delete mode 100644 modules/plugin/sdk/samples/simple/test.html rename modules/plugin/sdk/samples/testevents/{README.txt => readme.txt} (96%) create mode 100644 modules/plugin/sdk/samples/unixprinting/readme.txt create mode 100644 modules/plugin/sdk/samples/winless/readme.txt diff --git a/modules/plugin/sdk/readme.txt b/modules/plugin/sdk/readme.txt index 7f05681516b1..459af15ad455 100644 --- a/modules/plugin/sdk/readme.txt +++ b/modules/plugin/sdk/readme.txt @@ -1,62 +1,17 @@ -Last updated 12.20.2001 - -The current version of the Netscape Plugin API is designed to help -the developers to start creating plugins for Mozilla based browsers. +Last updated September 2008 This SDK is based on the API developed originally for Netscape browsers -starting with Netscape 2.x. Some additions have been made at the time -of release Netscape 3.x and Netscape 4.x. The present SDK reflects major -changes related to Mozilla code base: LiveConnect for plugin scriptability -is no longer supported, existing plugins should be modified slightly to -become scriptable again; the browser services are now accessible from -the plugin through the access to the service manager. - -The SDK is intended to help in creating full-blown plugins to work with -Mozilla code base without actually having the whole Mozilla source tree -present and built. +starting with Netscape 2.x. It is intended to help in creating plugins +that will work with any modern NPAPI-compliant web browsers. =============================================================== -The Common folder contains stub implementations of the NPAPI methods, there -is no need to modify files in this folder, just include them into your project. -This is not necessary though, some samples or plugin projects may use -their own implementations, the files in this folder are just an illustration -of one possible way to do that. +Samples -The Samples section at this point contains the following plugin samples: - -1. Basic plugin - -Shows the bare bones of the plugin dll. It does not do anything special, -'Hello, World' type of thing. Demonstrates how the plugin dll is invoked -and how NPAPI methods are called. Can be used as a starting template for -writing your own plugin. - -2. Simple plugin - -This plugin example illustrates specific for Mozilla code base features. -It is scriptable via JavaScript and uses services provided by the browser. -Some xpcom interfaces are implemented here so the Mozilla browser is aware -of its capabilities. The plugin does not draw in the native window but -rather uses JavaScript box to display the result of its work. Therefore, -there are no separate projects for different platforms in this sample. - -3. Scriptable plugin - -Yet another example of plugin scriptability. This plugin implements two -native methods callable from the JavaScript and uses native window drawings. - -4. Windowless plugin - -Example of a plugin which does not use native window messaging mechanism -and relies exclusively on NPP_HandleEvent to receive GUI messages such -as for painting. This plugin simply draws gray rectangle in occupied area. - -Scriptable samples require generation of .xpt files which should reside -in the Mozilla Components directory. To make sure Mozilla is aware of -the presence of the new .xpt file one may look at xpti.dat. To force -Mozilla to re-scan the Components directory xpti.dat should be removed -before Mozilla is started. +The "samples" directory contains NPAPI plugin samples. Within the "samples" +directory the common folder contains stub implementations of the NPAPI methods. +There is no need to modify files in this folder, just include them into your +project if you wish. Each sample plugin contains a readme file describing it. =============================================================== diff --git a/modules/plugin/sdk/samples/4x-scriptable/acmeIScriptObject.idl b/modules/plugin/sdk/samples/4x-scriptable/acmeIScriptObject.idl deleted file mode 100644 index 533d2536d8e5..000000000000 --- a/modules/plugin/sdk/samples/4x-scriptable/acmeIScriptObject.idl +++ /dev/null @@ -1,28 +0,0 @@ -/* - acmeIScriptObject.idl - */ - -#include "nsISupports.idl" - -[scriptable, uuid(f78d64e0-1dd1-11b2-a9b4-ae998c529d3e)] -interface acmeIScriptObject : nsISupports { - acmeIScriptObject getProperty(in string name); - void setProperty(in string name, in string value); - - /** - * Evaluates a string expression. - */ - acmeIScriptObject evaluate(in string expression); - - /** - * Conversions. - */ - string toString(); - double toNumber(); - - /** - * Constructors. - */ - acmeIScriptObject fromString(in string value); - acmeIScriptObject fromNumber(in double value); -}; diff --git a/modules/plugin/sdk/samples/4x-scriptable/doc.html b/modules/plugin/sdk/samples/4x-scriptable/doc.html deleted file mode 100644 index 77d6e54968e5..000000000000 --- a/modules/plugin/sdk/samples/4x-scriptable/doc.html +++ /dev/null @@ -1,220 +0,0 @@ - - - - - - Scripting Old Style Plugins with Mozilla - - - -
Scripting Old Style Plugins in Mozilla -
April 11, 2001 -
(see online version for the latest updates: -http://mozilla.org/docs/scripting-plugins.html) -
- -

Introduction -
New in Mozilla code -
New in plugin code -
JavaScript code -
Building and installing the plugin -
What else to read -
Examples -

Introduction -

Plugins that used to take advantage of being scriptable via LiveConnect -in 4.x Netscape browsers lost this possibility in the new world. The main -reason for this is that there is no guarantee of Java compatibility on -a binary level due to the jri/jni switch. The newly introduced Mozilla -Plugin API allows plugins be scriptable via a different mechanism called -XPConnect.  -Basically, this means that in order to use and take full advantage of this -new API, which is interface-based,  and to be scriptable, plugins -must be rewritten to become XPCOM -components. Switching to the new world may not be immediately desirable -by some plugin makers, since the task involves a fair amount of effort, -and if the plugin mostly works fine lacking only scriptability, developers -will probably just give up on this feature, which may result in unpleasant -experience for the end user. -

In order to make the transtion smoother, some changes have been made -to the Mozilla code. The changes allow to make existing 4.x plugins scriptable -with only minor modifications in their code. The present document describes -the steps of what should be done to the plugin code to turn it scriptable -again. -

What's in the Mozilla code? -

A couple of lines have been added to the DOM code asking a plugin to -return a scriptable iid and a pointer to a scriptable instance object. -The old Plugin API call NPP_GetValue is used to retrieve this -information from the plugin. So the plugin project should be aware of two -new additions to NPPVariable enumeration type which are now defined -in npapi.h as -

  NPPVpluginScriptableInstance = 10, -
  NPPVpluginScriptableIID      = -11 -

and two analogous additions to nsPluginInstanceVariable type in nsplugindefs.h -as -

  nsPluginInstanceVariable_ScriptableInstance = 10, -
  nsPluginInstanceVariable_ScriptableIID      -= 11 -

What's in the plugin code? -

1. A unique interface id should be obtained. Windows command uuidgen -should be sufficient. -

2. An Interface Definition (.idl) file describing the plugin -scriptable interface should be added to the project (see -example 1). -

3. A Scriptable instance object should be implemented in the plugin. -This class will contain native methods callable from JavaScript. This class -should also inherit from nsISecurityCheckedComponent and implement its -methods to be able to request all necessary privileges from the Mozilla -security manager (see example 2). -

4. Two new cases for the above mentioned new variables should be added -to the plugin implementation of NPP_GetValue (see -example 3). -

How to call plugin native methods -

The following HTML code will do the job: -

<embed type="application/plugin-mimetype"> -
<script> -
var embed = document.embeds[0]; -
embed.nativeMethod(); -
</script> -

How to build and install -

Having the built Mozilla tree is probably not necessary, but building -the plugin with a scriptable instance interface will require Mozilla headers -and the XPCOM compatible idl compiler -- xpidl.exe. MS DevStudio MIDL -should not be used. (Let's assume 'TestPlugin' as a plugin name-place -holder.) -

1. Compile nsITestPlugin.idl with the idl compiler. This will generate -nsITestPlugin.h and nsITestPlugin.xpt files. -

2. Put nsITestPlugin.xpt to the Components folder. -

3. Build nptestplugin.dll with nsITestPlugin.h included for compiling -scriptable instance class implementaion. -

4. Put nptestplugin.dll to the Plugins folder. -

Related sources -
  -

- -

Example 1. Sample .idl file -

#include "nsISupports.idl" -

[scriptable, uuid(bedb0778-2ee0-11d5-9cf8-0060b0fbd8ac)] -
interface nsITestPlugin : nsISupports { -
  void nativeMethod(); -
}; -

Example 2. Scriptable instance class -

#include "nsITestPlugin.h" -
#include "nsISecurityCheckedComponent.h" -

class nsScriptablePeer : public nsITestPlugin, -
                         -public nsISecurityCheckedComponent -
{ -
public: -
  nsScriptablePeer(); -
  ~nsScriptablePeer(); -

  NS_DECL_ISUPPORTS -
  NS_DECL_NSITESTPLUGIN -
  NS_DECL_NSISECURITYCHECKEDCOMPONENT -
}; -

nsScriptablePeer::nsScriptablePeer() -
{ -
  NS_INIT_ISUPPORTS(); -
} -

nsScriptablePeer::~nsScriptablePeer() -
{ -
} -

NS_IMPL_ISUPPORTS2(nsScriptablePeer, nsITestPlugin, nsISecurityCheckedComponent) -

// the following method will be callable from JavaScript -
NS_IMETHODIMP nsScriptablePeer::NativeMethod() -
{ -
  return NS_OK; -
} -

// the purpose of the rest of the code is to get successfully -
// through the Mozilla Security Manager -
static const char gAllAccess[] = "AllAccess"; -
NS_IMETHODIMP nsScriptablePeer::CanCreateWrapper(const nsIID * -iid, char **_retval) -
{ -
  if (!_retval) -
    return NS_ERROR_NULL_POINTER; -
  *_retval = (char*)NPN_MemAlloc(sizeof(gAllAccess)+1); -
  if (!*_retval) -
    return NS_ERROR_OUT_OF_MEMORY; -
  strcpy(*_retval, gAllAccess); -
  return NS_OK; -
} -

NS_IMETHODIMP nsScriptablePeer::CanCallMethod(const nsIID * iid, -const PRUnichar *methodName, char **_retval) -
{ -
  if (!_retval) -
    return NS_ERROR_NULL_POINTER; -
  *_retval = (char*)NPN_MemAlloc(sizeof(gAllAccess)+1); -
  if (!*_retval) -
    return NS_ERROR_OUT_OF_MEMORY; -
  strcpy(*_retval, gAllAccess); -
  return NS_OK; -
} -

NS_IMETHODIMP nsScriptablePeer::CanGetProperty(const nsIID * iid, -const PRUnichar *propertyName, char **_retval) -
{ -
  if (!_retval) -
    return NS_ERROR_NULL_POINTER; -
  *_retval = (char*)NPN_MemAlloc(sizeof(gAllAccess)+1); -
  if (!*_retval) -
    return NS_ERROR_OUT_OF_MEMORY; -
  strcpy(*_retval, gAllAccess); -
  return NS_OK; -
} -

NS_IMETHODIMP nsScriptablePeer::CanSetProperty(const nsIID * iid, -const PRUnichar *propertyName, char **_retval) -
{ -
  if (!_retval) -
    return NS_ERROR_NULL_POINTER; -
  *_retval = (char*)NPN_MemAlloc(sizeof(gAllAccess)+1); -
  if (!*_retval) -
    return NS_ERROR_OUT_OF_MEMORY; -
  strcpy(*_retval, gAllAccess); -
  return NS_OK; -
} -

Example 3. NPP_GetValue implementation -

#include "nsITestPlugin.h" -

NPError NPP_GetValue(NPP instance, NPPVariable variable, void *value) -
{ -
  if(instance == NULL) -
    return NPERR_INVALID_INSTANCE_ERROR; -

  NPError rv = NPERR_NO_ERROR; -
  static nsIID scriptableIID = NS_ITESTPLUGIN_IID; -

  if (variable == NPPVpluginScriptableInstance) -
  { -
    if (this is first time and we haven't created -it yet) -
    { -
      nsITestPlugin * scriptablePeer = -new nsScriptablePeer(); -
      if(scriptablePeer) -
        // addref for ourself, -don't forget to release on shutdown to trigger its destruction -
        NS_ADDREF(scriptablePeer); -
    } -
    // add reference for the caller requesting the -object -
    NS_ADDREF(scriptablePeer); -
   *(nsISupports **)value = scriptablePeer; -
  } -
  else if (variable == NPPVpluginScriptableIID) -
  { -
    nsIID* ptr = (nsIID *)NPN_MemAlloc(sizeof(nsIID)); -
    *ptr = scriptableIID; -
    *(nsIID **)value = ptr; -
  } -
  return rv; -
} -
  - - diff --git a/modules/plugin/sdk/samples/4x-scriptable/makefile.win b/modules/plugin/sdk/samples/4x-scriptable/makefile.win deleted file mode 100644 index bdd5dceb8af2..000000000000 --- a/modules/plugin/sdk/samples/4x-scriptable/makefile.win +++ /dev/null @@ -1,77 +0,0 @@ -#!gmake -# -# ***** 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) 1998 -# 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 ***** - -DEPTH = ..\..\..\.. -include <$(DEPTH)/config/config.mak> - -MODULE = np4xscr - -XPIDLSRCS = \ - .\nsI4xScriptablePlugin.idl \ - $(NULL) - -MAKE_OBJ_TYPE = DLL -DLLNAME = np4xscr -RESFILE = np4xscr.res -DEFFILE = np4xscr.def -DLL=.\$(OBJDIR)\$(DLLNAME).dll - -OBJS = \ - .\$(OBJDIR)\np_entry.obj \ - .\$(OBJDIR)\npn_gate.obj \ - .\$(OBJDIR)\npp_gate.obj \ - .\$(OBJDIR)\plugin.obj \ - .\$(OBJDIR)\nsScriptablePeer.obj \ - $(NULL) - -WIN_LIBS = version.lib - -#uncomment if you are building the nsScriptablePeer1 version -#LLIBS= $(LIBNSPR) \ -# $(DIST)\lib\xpcom.lib \ -# $(NULL) - -include <$(DEPTH)/config/rules.mak> - -#MAKE_INSTALL=echo $(MAKE_INSTALL) - -libs:: $(DLL) -# $(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).dll $(DIST)\bin\plugins - -clobber:: - rm -f *.sbr $(DIST)\bin\plugins\$(DLLNAME).dll $(DIST)\bin\components\$(DLLNAME).xpt diff --git a/modules/plugin/sdk/samples/4x-scriptable/np4xscr.def b/modules/plugin/sdk/samples/4x-scriptable/np4xscr.def deleted file mode 100644 index 6c69b0002f4f..000000000000 --- a/modules/plugin/sdk/samples/4x-scriptable/np4xscr.def +++ /dev/null @@ -1,6 +0,0 @@ -LIBRARY NP4XSCR - -EXPORTS - NP_GetEntryPoints @1 - NP_Initialize @2 - NP_Shutdown @3 diff --git a/modules/plugin/sdk/samples/4x-scriptable/np4xscr.rc b/modules/plugin/sdk/samples/4x-scriptable/np4xscr.rc deleted file mode 100644 index 7b6838e8952e..000000000000 --- a/modules/plugin/sdk/samples/4x-scriptable/np4xscr.rc +++ /dev/null @@ -1,112 +0,0 @@ -//Microsoft Developer Studio generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifndef _MAC -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904e4" - BEGIN - VALUE "Comments", "\0" - VALUE "CompanyName", " \0" - VALUE "FileDescription", "np4xscr\0" - VALUE "FileExtents", "4sc\0" - VALUE "FileOpenName", "np4xscr\0" - VALUE "FileVersion", "1, 0, 0, 1\0" - VALUE "InternalName", "np4xscr\0" - VALUE "LegalCopyright", "Copyright İ 1999\0" - VALUE "LegalTrademarks", "\0" - VALUE "MIMEType", "application/mozilla-4x-scriptable-plugin\0" - VALUE "OriginalFilename", "ns4xscr.dll\0" - VALUE "PrivateBuild", "\0" - VALUE "ProductName", "4x scriptable example plugin for Mozilla\0" - VALUE "ProductVersion", "1, 0, 0, 1\0" - VALUE "SpecialBuild", "\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1252 - END -END - -#endif // !_MAC - - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE DISCARDABLE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE DISCARDABLE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE DISCARDABLE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/modules/plugin/sdk/samples/4x-scriptable/np_entry.cpp b/modules/plugin/sdk/samples/4x-scriptable/np_entry.cpp deleted file mode 100644 index ab7b95b7f4f0..000000000000 --- a/modules/plugin/sdk/samples/4x-scriptable/np_entry.cpp +++ /dev/null @@ -1,119 +0,0 @@ -/* -*- 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) 1998 - * 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 ***** */ - -////////////////////////////////////////////////////////////// -// -// Main plugin entry point implementation -// -#include "npapi.h" -#include "npupp.h" - -NPNetscapeFuncs NPNFuncs; - -#ifdef XP_WIN - -NPError OSCALL NP_GetEntryPoints(NPPluginFuncs* pFuncs) -{ - if(pFuncs == NULL) - return NPERR_INVALID_FUNCTABLE_ERROR; - - if(pFuncs->size < sizeof(NPPluginFuncs)) - return NPERR_INVALID_FUNCTABLE_ERROR; - - pFuncs->version = (NP_VERSION_MAJOR << 8) | NP_VERSION_MINOR; - pFuncs->newp = NPP_New; - pFuncs->destroy = NPP_Destroy; - pFuncs->setwindow = NPP_SetWindow; - pFuncs->newstream = NPP_NewStream; - pFuncs->destroystream = NPP_DestroyStream; - pFuncs->asfile = NPP_StreamAsFile; - pFuncs->writeready = NPP_WriteReady; - pFuncs->write = NPP_Write; - pFuncs->print = NPP_Print; - pFuncs->event = NPP_HandleEvent; - pFuncs->urlnotify = NPP_URLNotify; - pFuncs->getvalue = NPP_GetValue; - pFuncs->setvalue = NPP_SetValue; - pFuncs->javaClass = NULL; - - return NPERR_NO_ERROR; -} - -#endif /* XP_WIN */ - -NPError OSCALL NP_Initialize(NPNetscapeFuncs* pFuncs) -{ - if(pFuncs == NULL) - return NPERR_INVALID_FUNCTABLE_ERROR; - - if(HIBYTE(pFuncs->version) > NP_VERSION_MAJOR) - return NPERR_INCOMPATIBLE_VERSION_ERROR; - - if(pFuncs->size < sizeof NPNetscapeFuncs) - return NPERR_INVALID_FUNCTABLE_ERROR; - - NPNFuncs.size = pFuncs->size; - NPNFuncs.version = pFuncs->version; - NPNFuncs.geturlnotify = pFuncs->geturlnotify; - NPNFuncs.geturl = pFuncs->geturl; - NPNFuncs.posturlnotify = pFuncs->posturlnotify; - NPNFuncs.posturl = pFuncs->posturl; - NPNFuncs.requestread = pFuncs->requestread; - NPNFuncs.newstream = pFuncs->newstream; - NPNFuncs.write = pFuncs->write; - NPNFuncs.destroystream = pFuncs->destroystream; - NPNFuncs.status = pFuncs->status; - NPNFuncs.uagent = pFuncs->uagent; - NPNFuncs.memalloc = pFuncs->memalloc; - NPNFuncs.memfree = pFuncs->memfree; - NPNFuncs.memflush = pFuncs->memflush; - NPNFuncs.reloadplugins = pFuncs->reloadplugins; - NPNFuncs.getJavaEnv = NULL; - NPNFuncs.getJavaPeer = NULL; - NPNFuncs.getvalue = pFuncs->getvalue; - NPNFuncs.setvalue = pFuncs->setvalue; - NPNFuncs.invalidaterect = pFuncs->invalidaterect; - NPNFuncs.invalidateregion = pFuncs->invalidateregion; - NPNFuncs.forceredraw = pFuncs->forceredraw; - - return NPERR_NO_ERROR; -} - -NPError OSCALL NP_Shutdown() -{ - return NPERR_NO_ERROR; -} diff --git a/modules/plugin/sdk/samples/4x-scriptable/npmac.cpp b/modules/plugin/sdk/samples/4x-scriptable/npmac.cpp deleted file mode 100644 index c458583a4d13..000000000000 --- a/modules/plugin/sdk/samples/4x-scriptable/npmac.cpp +++ /dev/null @@ -1,705 +0,0 @@ -/* ***** 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) 1998 - * 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 ***** */ - -//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -// -// npmac.cpp -// -//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -#include -#include -#include -#include -#include -#include - -#define XP_MAC 1 -#define NDEBUG 1 - -// -// A4Stuff.h contains the definition of EnterCodeResource and -// EnterCodeResource, used for setting up the code resourceıs -// globals for 68K (analagous to the function SetCurrentA5 -// defined by the toolbox). -// -#if TARGET_CPU_68K -#include -#else -#define EnterCodeResource() -#define ExitCodeResource() -#endif - -#include "npapi.h" - -// -// The Mixed Mode procInfos defined in npupp.h assume Think C- -// style calling conventions. These conventions are used by -// Metrowerks with the exception of pointer return types, which -// in Metrowerks 68K are returned in A0, instead of the standard -// D0. Thus, since NPN_MemAlloc and NPN_UserAgent return pointers, -// Mixed Mode will return the values to a 68K plugin in D0, but -// a 68K plugin compiled by Metrowerks will expect the result in -// A0. The following pragma forces Metrowerks to use D0 instead. -// -#ifdef __MWERKS__ -#ifndef powerc -#pragma pointers_in_D0 -#endif -#endif - -#include "npupp.h" - -#ifdef __MWERKS__ -#ifndef powerc -#pragma pointers_in_A0 -#endif -#endif - -// The following fix for static initializers (which fixes a preious -// incompatibility with some parts of PowerPlant, was submitted by -// Jan Ulbrich. -#ifdef __MWERKS__ - #ifdef __cplusplus - extern "C" { - #endif - #ifndef powerc - extern void __InitCode__(void); - #else - extern void __sinit(void); - #define __InitCode__ __sinit - #endif - extern void __destroy_global_chain(void); - #ifdef __cplusplus - } - #endif // __cplusplus -#endif // __MWERKS__ - -// -// Define PLUGIN_TRACE to 1 to have the wrapper functions emit -// DebugStr messages whenever they are called. -// -#define PLUGIN_TRACE 0 - -#if PLUGIN_TRACE -#define PLUGINDEBUGSTR(msg) ::DebugStr(msg) -#else -#define PLUGINDEBUGSTR -#endif - - - - - - -//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -// -// Globals -// -//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -#if !TARGET_API_MAC_CARBON -QDGlobals* gQDPtr; // Pointer to Netscape's QuickDraw globals -#endif - -short gResFile; // Refnum of the plugin's resource file -NPNetscapeFuncs gNetscapeFuncs; // Function table for procs in Netscape called by plugin - - -//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -// -// Wrapper functions for all calls from the plugin to Netscape. -// These functions let the plugin developer just call the APIs -// as documented and defined in npapi.h, without needing to know -// about the function table and call macros in npupp.h. -// -//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - - -void NPN_Version(int* plugin_major, int* plugin_minor, int* netscape_major, int* netscape_minor) -{ - *plugin_major = NP_VERSION_MAJOR; - *plugin_minor = NP_VERSION_MINOR; - *netscape_major = gNetscapeFuncs.version >> 8; // Major version is in high byte - *netscape_minor = gNetscapeFuncs.version & 0xFF; // Minor version is in low byte -} - -NPError NPN_GetURLNotify(NPP instance, const char* url, const char* window, void* notifyData) -{ - int navMinorVers = gNetscapeFuncs.version & 0xFF; - NPError err; - - if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) - { - err = CallNPN_GetURLNotifyProc(gNetscapeFuncs.geturlnotify, instance, url, window, notifyData); - } - else - { - err = NPERR_INCOMPATIBLE_VERSION_ERROR; - } - return err; -} - -NPError NPN_GetURL(NPP instance, const char* url, const char* window) -{ - return CallNPN_GetURLProc(gNetscapeFuncs.geturl, instance, url, window); -} - -NPError NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file, void* notifyData) -{ - int navMinorVers = gNetscapeFuncs.version & 0xFF; - NPError err; - - if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) - { - err = CallNPN_PostURLNotifyProc(gNetscapeFuncs.posturlnotify, instance, url, - window, len, buf, file, notifyData); - } - else - { - err = NPERR_INCOMPATIBLE_VERSION_ERROR; - } - return err; -} - -NPError NPN_PostURL(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file) -{ - return CallNPN_PostURLProc(gNetscapeFuncs.posturl, instance, url, window, len, buf, file); -} - -NPError NPN_RequestRead(NPStream* stream, NPByteRange* rangeList) -{ - return CallNPN_RequestReadProc(gNetscapeFuncs.requestread, stream, rangeList); -} - -NPError NPN_NewStream(NPP instance, NPMIMEType type, const char* window, NPStream** stream) -{ - int navMinorVers = gNetscapeFuncs.version & 0xFF; - NPError err; - - if( navMinorVers >= NPVERS_HAS_STREAMOUTPUT ) - { - err = CallNPN_NewStreamProc(gNetscapeFuncs.newstream, instance, type, window, stream); - } - else - { - err = NPERR_INCOMPATIBLE_VERSION_ERROR; - } - return err; -} - -int32 NPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer) -{ - int navMinorVers = gNetscapeFuncs.version & 0xFF; - NPError err; - - if( navMinorVers >= NPVERS_HAS_STREAMOUTPUT ) - { - err = CallNPN_WriteProc(gNetscapeFuncs.write, instance, stream, len, buffer); - } - else - { - err = NPERR_INCOMPATIBLE_VERSION_ERROR; - } - return err; -} - -NPError NPN_DestroyStream(NPP instance, NPStream* stream, NPError reason) -{ - int navMinorVers = gNetscapeFuncs.version & 0xFF; - NPError err; - - if( navMinorVers >= NPVERS_HAS_STREAMOUTPUT ) - { - err = CallNPN_DestroyStreamProc(gNetscapeFuncs.destroystream, instance, stream, reason); - } - else - { - err = NPERR_INCOMPATIBLE_VERSION_ERROR; - } - return err; -} - -void NPN_Status(NPP instance, const char* message) -{ - CallNPN_StatusProc(gNetscapeFuncs.status, instance, message); -} - -const char* NPN_UserAgent(NPP instance) -{ - return CallNPN_UserAgentProc(gNetscapeFuncs.uagent, instance); -} - -#define DEBUG_MEMORY 0 - -void* NPN_MemAlloc(uint32 size) -{ -#if DEBUG_MEMORY - return (void*) NewPtrClear(size); -#else - return CallNPN_MemAllocProc(gNetscapeFuncs.memalloc, size); -#endif -} - -void NPN_MemFree(void* ptr) -{ -#if DEBUG_MEMORY - DisposePtr(Ptr(ptr)); -#else - CallNPN_MemFreeProc(gNetscapeFuncs.memfree, ptr); -#endif -} - -uint32 NPN_MemFlush(uint32 size) -{ - return CallNPN_MemFlushProc(gNetscapeFuncs.memflush, size); -} - -void NPN_ReloadPlugins(NPBool reloadPages) -{ - CallNPN_ReloadPluginsProc(gNetscapeFuncs.reloadplugins, reloadPages); -} - - -NPError NPN_GetValue(NPP instance, NPNVariable variable, void *value) -{ - return CallNPN_GetValueProc( gNetscapeFuncs.getvalue, instance, variable, value); -} - -NPError NPN_SetValue(NPP instance, NPPVariable variable, void *value) -{ - return CallNPN_SetValueProc( gNetscapeFuncs.setvalue, instance, variable, value); -} - -void NPN_InvalidateRect(NPP instance, NPRect *rect) -{ - CallNPN_InvalidateRectProc( gNetscapeFuncs.invalidaterect, instance, rect); -} - -void NPN_InvalidateRegion(NPP instance, NPRegion region) -{ - CallNPN_InvalidateRegionProc( gNetscapeFuncs.invalidateregion, instance, region); -} - -void NPN_ForceRedraw(NPP instance) -{ - CallNPN_ForceRedrawProc( gNetscapeFuncs.forceredraw, instance); -} - -//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -// -// Wrapper functions for all calls from Netscape to the plugin. -// These functions let the plugin developer just create the APIs -// as documented and defined in npapi.h, without needing to -// install those functions in the function table or worry about -// setting up globals for 68K plugins. -// -//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -NPError Private_Initialize(void); -void Private_Shutdown(void); -NPError Private_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved); -NPError Private_Destroy(NPP instance, NPSavedData** save); -NPError Private_SetWindow(NPP instance, NPWindow* window); -NPError Private_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype); -NPError Private_DestroyStream(NPP instance, NPStream* stream, NPError reason); -int32 Private_WriteReady(NPP instance, NPStream* stream); -int32 Private_Write(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer); -void Private_StreamAsFile(NPP instance, NPStream* stream, const char* fname); -void Private_Print(NPP instance, NPPrint* platformPrint); -int16 Private_HandleEvent(NPP instance, void* event); -void Private_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData); -NPError Private_GetValue(NPP instance, NPPVariable variable, void *result); -NPError Private_SetValue(NPP instance, NPNVariable variable, void *value); - - -NPError Private_Initialize(void) -{ - NPError err; - EnterCodeResource(); - PLUGINDEBUGSTR("\pInitialize;g;"); - err = NPP_Initialize(); - ExitCodeResource(); - return err; -} - -void Private_Shutdown(void) -{ - EnterCodeResource(); - PLUGINDEBUGSTR("\pShutdown;g;"); - NPP_Shutdown(); - - __destroy_global_chain(); - - ExitCodeResource(); -} - - -NPError Private_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved) -{ - EnterCodeResource(); - NPError ret = NPP_New(pluginType, instance, mode, argc, argn, argv, saved); - PLUGINDEBUGSTR("\pNew;g;"); - ExitCodeResource(); - return ret; -} - -NPError Private_Destroy(NPP instance, NPSavedData** save) -{ - NPError err; - EnterCodeResource(); - PLUGINDEBUGSTR("\pDestroy;g;"); - err = NPP_Destroy(instance, save); - ExitCodeResource(); - return err; -} - -NPError Private_SetWindow(NPP instance, NPWindow* window) -{ - NPError err; - EnterCodeResource(); - PLUGINDEBUGSTR("\pSetWindow;g;"); - err = NPP_SetWindow(instance, window); - ExitCodeResource(); - return err; -} - -NPError Private_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype) -{ - NPError err; - EnterCodeResource(); - PLUGINDEBUGSTR("\pNewStream;g;"); - err = NPP_NewStream(instance, type, stream, seekable, stype); - ExitCodeResource(); - return err; -} - -int32 Private_WriteReady(NPP instance, NPStream* stream) -{ - int32 result; - EnterCodeResource(); - PLUGINDEBUGSTR("\pWriteReady;g;"); - result = NPP_WriteReady(instance, stream); - ExitCodeResource(); - return result; -} - -int32 Private_Write(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer) -{ - int32 result; - EnterCodeResource(); - PLUGINDEBUGSTR("\pWrite;g;"); - result = NPP_Write(instance, stream, offset, len, buffer); - ExitCodeResource(); - return result; -} - -void Private_StreamAsFile(NPP instance, NPStream* stream, const char* fname) -{ - EnterCodeResource(); - PLUGINDEBUGSTR("\pStreamAsFile;g;"); - NPP_StreamAsFile(instance, stream, fname); - ExitCodeResource(); -} - - -NPError Private_DestroyStream(NPP instance, NPStream* stream, NPError reason) -{ - NPError err; - EnterCodeResource(); - PLUGINDEBUGSTR("\pDestroyStream;g;"); - err = NPP_DestroyStream(instance, stream, reason); - ExitCodeResource(); - return err; -} - -int16 Private_HandleEvent(NPP instance, void* event) -{ - int16 result; - EnterCodeResource(); - PLUGINDEBUGSTR("\pHandleEvent;g;"); - result = NPP_HandleEvent(instance, event); - ExitCodeResource(); - return result; -} - -void Private_Print(NPP instance, NPPrint* platformPrint) -{ - EnterCodeResource(); - PLUGINDEBUGSTR("\pPrint;g;"); - NPP_Print(instance, platformPrint); - ExitCodeResource(); -} - -void Private_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData) -{ - EnterCodeResource(); - PLUGINDEBUGSTR("\pURLNotify;g;"); - NPP_URLNotify(instance, url, reason, notifyData); - ExitCodeResource(); -} - - -NPError Private_GetValue(NPP instance, NPPVariable variable, void *result) -{ - NPError err; - EnterCodeResource(); - PLUGINDEBUGSTR("\pGetValue;g;"); - err = NPP_GetValue(instance, variable, result); - ExitCodeResource(); - return err; -} - -NPError Private_SetValue(NPP instance, NPNVariable variable, void *value) -{ - NPError err; - EnterCodeResource(); - PLUGINDEBUGSTR("\pSetValue;g;"); - err = NPP_SetValue(instance, variable, value); - ExitCodeResource(); - return err; -} - -void SetUpQD(void); - -void SetUpQD(void) -{ - ProcessSerialNumber PSN; - FSSpec myFSSpec; - Str63 name; - ProcessInfoRec infoRec; - OSErr result = noErr; - CFragConnectionID connID; - Str255 errName; - - // - // Memorize the pluginıs resource file - // refnum for later use. - // - gResFile = CurResFile(); - -#if !TARGET_API_MAC_CARBON - // - // Ask the system if CFM is available. - // - long response; - OSErr err = Gestalt(gestaltCFMAttr, &response); - Boolean hasCFM = BitTst(&response, 31-gestaltCFMPresent); - - if (hasCFM) - { - // - // GetProcessInformation takes a process serial number and - // will give us back the name and FSSpec of the application. - // See the Process Manager in IM. - // - infoRec.processInfoLength = sizeof(ProcessInfoRec); - infoRec.processName = name; - infoRec.processAppSpec = &myFSSpec; - - PSN.highLongOfPSN = 0; - PSN.lowLongOfPSN = kCurrentProcess; - - result = GetProcessInformation(&PSN, &infoRec); - if (result != noErr) - PLUGINDEBUGSTR("\pFailed in GetProcessInformation"); - } - else - // - // If no CFM installed, assume it must be a 68K app. - // - result = -1; - - if (result == noErr) - { - // - // Now that we know the app name and FSSpec, we can call GetDiskFragment - // to get a connID to use in a subsequent call to FindSymbol (it will also - // return the address of ³main² in app, which we ignore). If GetDiskFragment - // returns an error, we assume the app must be 68K. - // - Ptr mainAddr; - result = GetDiskFragment(infoRec.processAppSpec, 0L, 0L, infoRec.processName, - kReferenceCFrag, &connID, (Ptr*)&mainAddr, errName); - } - - if (result == noErr) - { - // - // The app is a PPC code fragment, so call FindSymbol - // to get the exported ³qd² symbol so we can access its - // QuickDraw globals. - // - CFragSymbolClass symClass; - result = FindSymbol(connID, "\pqd", (Ptr*)&gQDPtr, &symClass); - if (result != noErr) - PLUGINDEBUGSTR("\pFailed in FindSymbol qd"); - } - else - { - // - // The app is 68K, so use its A5 to compute the address - // of its QuickDraw globals. - // - gQDPtr = (QDGlobals*)(*((long*)SetCurrentA5()) - (sizeof(QDGlobals) - sizeof(GrafPtr))); - } -#endif /* !TARGET_API_MAC_CARBON */ -} - - - -NPError main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs, NPP_ShutdownUPP* unloadUpp); - -#pragma export on - -#if !TARGET_API_MAC_CARBON -RoutineDescriptor mainRD = BUILD_ROUTINE_DESCRIPTOR(uppNPP_MainEntryProcInfo, main); -#endif - -#pragma export off - - -NPError main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs, NPP_ShutdownUPP* unloadUpp) -{ - EnterCodeResource(); - PLUGINDEBUGSTR("\pmain"); - - NPError err = NPERR_NO_ERROR; - - // - // Ensure that everything Netscape passed us is valid! - // - if ((nsTable == NULL) || (pluginFuncs == NULL) || (unloadUpp == NULL)) - err = NPERR_INVALID_FUNCTABLE_ERROR; - - // - // Check the ³major² version passed in Netscapeıs function table. - // We wonıt load if the major version is newer than what we expect. - // Also check that the function tables passed in are big enough for - // all the functions we need (they could be bigger, if Netscape added - // new APIs, but thatıs OK with us -- weıll just ignore them). - // - if (err == NPERR_NO_ERROR) - { - if ((nsTable->version >> 8) > NP_VERSION_MAJOR) // Major version is in high byte - err = NPERR_INCOMPATIBLE_VERSION_ERROR; -// if (nsTable->size < sizeof(NPNetscapeFuncs)) -// err = NPERR_INVALID_FUNCTABLE_ERROR; -// if (pluginFuncs->size < sizeof(NPPluginFuncs)) -// err = NPERR_INVALID_FUNCTABLE_ERROR; - } - - - if (err == NPERR_NO_ERROR) - { - // - // Copy all the fields of Netscapeıs function table into our - // copy so we can call back into Netscape later. Note that - // we need to copy the fields one by one, rather than assigning - // the whole structure, because the Netscape function table - // could actually be bigger than what we expect. - // - - int navMinorVers = nsTable->version & 0xFF; - - gNetscapeFuncs.version = nsTable->version; - gNetscapeFuncs.size = nsTable->size; - gNetscapeFuncs.posturl = nsTable->posturl; - gNetscapeFuncs.geturl = nsTable->geturl; - gNetscapeFuncs.requestread = nsTable->requestread; - gNetscapeFuncs.newstream = nsTable->newstream; - gNetscapeFuncs.write = nsTable->write; - gNetscapeFuncs.destroystream = nsTable->destroystream; - gNetscapeFuncs.status = nsTable->status; - gNetscapeFuncs.uagent = nsTable->uagent; - gNetscapeFuncs.memalloc = nsTable->memalloc; - gNetscapeFuncs.memfree = nsTable->memfree; - gNetscapeFuncs.memflush = nsTable->memflush; - gNetscapeFuncs.reloadplugins = nsTable->reloadplugins; - if( navMinorVers >= NPVERS_HAS_LIVECONNECT ) - { - gNetscapeFuncs.getJavaEnv = NULL; - gNetscapeFuncs.getJavaPeer = NULL; - } - if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) - { - gNetscapeFuncs.geturlnotify = nsTable->geturlnotify; - gNetscapeFuncs.posturlnotify = nsTable->posturlnotify; - } - gNetscapeFuncs.getvalue = nsTable->getvalue; - gNetscapeFuncs.setvalue = nsTable->setvalue; - gNetscapeFuncs.invalidaterect = nsTable->invalidaterect; - gNetscapeFuncs.invalidateregion = nsTable->invalidateregion; - gNetscapeFuncs.forceredraw = nsTable->forceredraw; - - // defer static constructors until the global functions are initialized. - __InitCode__(); - - // - // Set up the plugin function table that Netscape will use to - // call us. Netscape needs to know about our version and size - // and have a UniversalProcPointer for every function we implement. - // - pluginFuncs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR; - pluginFuncs->size = sizeof(NPPluginFuncs); - pluginFuncs->newp = NewNPP_NewProc(Private_New); - pluginFuncs->destroy = NewNPP_DestroyProc(Private_Destroy); - pluginFuncs->setwindow = NewNPP_SetWindowProc(Private_SetWindow); - pluginFuncs->newstream = NewNPP_NewStreamProc(Private_NewStream); - pluginFuncs->destroystream = NewNPP_DestroyStreamProc(Private_DestroyStream); - pluginFuncs->asfile = NewNPP_StreamAsFileProc(Private_StreamAsFile); - pluginFuncs->writeready = NewNPP_WriteReadyProc(Private_WriteReady); - pluginFuncs->write = NewNPP_WriteProc(Private_Write); - pluginFuncs->print = NewNPP_PrintProc(Private_Print); - pluginFuncs->event = NewNPP_HandleEventProc(Private_HandleEvent); - if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) - { - pluginFuncs->urlnotify = NewNPP_URLNotifyProc(Private_URLNotify); - } - if( navMinorVers >= NPVERS_HAS_LIVECONNECT ) - { - pluginFuncs->javaClass = NULL; - pluginFuncs->getvalue = NewNPP_GetValueProc(Private_GetValue); - pluginFuncs->setvalue = NewNPP_SetValueProc(Private_SetValue); - } - *unloadUpp = NewNPP_ShutdownProc(Private_Shutdown); - SetUpQD(); - err = Private_Initialize(); - } - - ExitCodeResource(); - return err; -} diff --git a/modules/plugin/sdk/samples/4x-scriptable/npn_gate.cpp b/modules/plugin/sdk/samples/4x-scriptable/npn_gate.cpp deleted file mode 100644 index 25841e4f5550..000000000000 --- a/modules/plugin/sdk/samples/4x-scriptable/npn_gate.cpp +++ /dev/null @@ -1,199 +0,0 @@ -/* -*- 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) 1998 - * 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 ***** */ - -//////////////////////////////////////////////////////////// -// -// Implementation of Netscape entry points (NPN_*) -// -#include "npapi.h" -#include "npupp.h" - -extern NPNetscapeFuncs NPNFuncs; - -void NPN_Version(int* plugin_major, int* plugin_minor, int* netscape_major, int* netscape_minor) -{ - *plugin_major = NP_VERSION_MAJOR; - *plugin_minor = NP_VERSION_MINOR; - *netscape_major = HIBYTE(NPNFuncs.version); - *netscape_minor = LOBYTE(NPNFuncs.version); -} - -NPError NPN_GetURLNotify(NPP instance, const char *url, const char *target, void* notifyData) -{ - int navMinorVers = NPNFuncs.version & 0xFF; - NPError rv = NPERR_NO_ERROR; - - if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) - rv = NPNFuncs.geturlnotify(instance, url, target, notifyData); - else - rv = NPERR_INCOMPATIBLE_VERSION_ERROR; - - return rv; -} - -NPError NPN_GetURL(NPP instance, const char *url, const char *target) -{ - NPError rv = NPNFuncs.geturl(instance, url, target); - return rv; -} - -NPError NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file, void* notifyData) -{ - int navMinorVers = NPNFuncs.version & 0xFF; - NPError rv = NPERR_NO_ERROR; - - if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) - rv = NPNFuncs.posturlnotify(instance, url, window, len, buf, file, notifyData); - else - rv = NPERR_INCOMPATIBLE_VERSION_ERROR; - - return rv; -} - -NPError NPN_PostURL(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file) -{ - NPError rv = NPNFuncs.posturl(instance, url, window, len, buf, file); - return rv; -} - -NPError NPN_RequestRead(NPStream* stream, NPByteRange* rangeList) -{ - NPError rv = NPNFuncs.requestread(stream, rangeList); - return rv; -} - -NPError NPN_NewStream(NPP instance, NPMIMEType type, const char* target, NPStream** stream) -{ - int navMinorVersion = NPNFuncs.version & 0xFF; - - NPError rv = NPERR_NO_ERROR; - - if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT ) - rv = NPNFuncs.newstream(instance, type, target, stream); - else - rv = NPERR_INCOMPATIBLE_VERSION_ERROR; - - return rv; -} - -int32 NPN_Write(NPP instance, NPStream *stream, int32 len, void *buffer) -{ - int navMinorVersion = NPNFuncs.version & 0xFF; - int32 rv = 0; - - if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT ) - rv = NPNFuncs.write(instance, stream, len, buffer); - else - rv = -1; - - return rv; -} - -NPError NPN_DestroyStream(NPP instance, NPStream* stream, NPError reason) -{ - int navMinorVersion = NPNFuncs.version & 0xFF; - NPError rv = NPERR_NO_ERROR; - - if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT ) - rv = NPNFuncs.destroystream(instance, stream, reason); - else - rv = NPERR_INCOMPATIBLE_VERSION_ERROR; - - return rv; -} - -void NPN_Status(NPP instance, const char *message) -{ - NPNFuncs.status(instance, message); -} - -const char* NPN_UserAgent(NPP instance) -{ - const char * rv = NULL; - rv = NPNFuncs.uagent(instance); - return rv; -} - -void* NPN_MemAlloc(uint32 size) -{ - void * rv = NULL; - rv = NPNFuncs.memalloc(size); - return rv; -} - -void NPN_MemFree(void* ptr) -{ - NPNFuncs.memfree(ptr); -} - -uint32 NPN_MemFlush(uint32 size) -{ - uint32 rv = NPNFuncs.memflush(size); - return rv; -} - -void NPN_ReloadPlugins(NPBool reloadPages) -{ - NPNFuncs.reloadplugins(reloadPages); -} - -NPError NPN_GetValue(NPP instance, NPNVariable variable, void *value) -{ - NPError rv = NPNFuncs.getvalue(instance, variable, value); - return rv; -} - -NPError NPN_SetValue(NPP instance, NPPVariable variable, void *value) -{ - NPError rv = NPNFuncs.setvalue(instance, variable, value); - return rv; -} - -void NPN_InvalidateRect(NPP instance, NPRect *invalidRect) -{ - NPNFuncs.invalidaterect(instance, invalidRect); -} - -void NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion) -{ - NPNFuncs.invalidateregion(instance, invalidRegion); -} - -void NPN_ForceRedraw(NPP instance) -{ - NPNFuncs.forceredraw(instance); -} diff --git a/modules/plugin/sdk/samples/4x-scriptable/npp_gate.cpp b/modules/plugin/sdk/samples/4x-scriptable/npp_gate.cpp deleted file mode 100644 index 4aa2f56ced20..000000000000 --- a/modules/plugin/sdk/samples/4x-scriptable/npp_gate.cpp +++ /dev/null @@ -1,260 +0,0 @@ -/* -*- 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) 1998 - * 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 ***** */ - -//////////////////////////////////////////////////////////// -// -// Implementation of plugin entry points (NPP_*) -// most are just empty stubs for this particular plugin -// -#include "plugin.h" - -NPError NPP_Initialize(void) -{ - return NPERR_NO_ERROR; -} - -void NPP_Shutdown(void) -{ -} - -// here the plugin creates an instance of our CPlugin object which -// will be associated with this newly created plugin instance and -// will do all the necessary job -NPError NPP_New(NPMIMEType pluginType, - NPP instance, - uint16 mode, - int16 argc, - char* argn[], - char* argv[], - NPSavedData* saved) -{ - if(instance == NULL) - return NPERR_INVALID_INSTANCE_ERROR; - - NPError rv = NPERR_NO_ERROR; - - CPlugin * pPlugin = new CPlugin(instance); - if(pPlugin == NULL) - return NPERR_OUT_OF_MEMORY_ERROR; - - instance->pdata = (void *)pPlugin; - return rv; -} - -// here is the place to clean up and destroy the CPlugin object -NPError NPP_Destroy (NPP instance, NPSavedData** save) -{ - if(instance == NULL) - return NPERR_INVALID_INSTANCE_ERROR; - - NPError rv = NPERR_NO_ERROR; - - CPlugin * pPlugin = (CPlugin *)instance->pdata; - if(pPlugin != NULL) { - pPlugin->shut(); - delete pPlugin; - } - return rv; -} - -// during this call we know when the plugin window is ready or -// is about to be destroyed so we can do some gui specific -// initialization and shutdown -NPError NPP_SetWindow (NPP instance, NPWindow* pNPWindow) -{ - if(instance == NULL) - return NPERR_INVALID_INSTANCE_ERROR; - - NPError rv = NPERR_NO_ERROR; - - if(pNPWindow == NULL) - return NPERR_GENERIC_ERROR; - - CPlugin * pPlugin = (CPlugin *)instance->pdata; - - if(pPlugin == NULL) - return NPERR_GENERIC_ERROR; - - // window just created - if(!pPlugin->isInitialized() && (pNPWindow->window != NULL)) { - if(!pPlugin->init(pNPWindow)) { - delete pPlugin; - pPlugin = NULL; - return NPERR_MODULE_LOAD_FAILED_ERROR; - } - } - - // window goes away - if((pNPWindow->window == NULL) && pPlugin->isInitialized()) - return NPERR_NO_ERROR; - - // window resized - if(pPlugin->isInitialized() && (pNPWindow->window != NULL)) - return NPERR_NO_ERROR; - - // this should not happen, nothing to do - if((pNPWindow->window == NULL) && !pPlugin->isInitialized()) - return NPERR_NO_ERROR; - - return rv; -} - -// ============================== -// ! Scriptability related code ! -// ============================== -// -// here the plugin is asked by Mozilla to tell if it is scriptable -// we should return a valid interface id and a pointer to -// nsScriptablePeer interface which we should have implemented -// and which should be defined in the corressponding *.xpt file -// in the bin/components folder -NPError NPP_GetValue(NPP instance, NPPVariable variable, void *value) -{ - if(instance == NULL) - return NPERR_INVALID_INSTANCE_ERROR; - - NPError rv = NPERR_NO_ERROR; - - if(instance == NULL) - return NPERR_GENERIC_ERROR; - - CPlugin * pPlugin = (CPlugin *)instance->pdata; - if(pPlugin == NULL) - return NPERR_GENERIC_ERROR; - - if (variable == NPPVpluginScriptableInstance) { - // addref happens in getter, so we don't addref here - nsI4xScriptablePlugin * scriptablePeer = pPlugin->getScriptablePeer(); - if (scriptablePeer) { - *(nsISupports **)value = scriptablePeer; - } else { - rv = NPERR_OUT_OF_MEMORY_ERROR; - } - } - else if (variable == NPPVpluginScriptableIID) { - static nsIID scriptableIID = NS_I4XSCRIPTABLEPLUGIN_IID; - nsIID* ptr = (nsIID *)NPN_MemAlloc(sizeof(nsIID)); - if (ptr) { - *ptr = scriptableIID; - *(nsIID **)value = ptr; - } else { - rv = NPERR_OUT_OF_MEMORY_ERROR; - } - } - - return rv; -} - -NPError NPP_NewStream(NPP instance, - NPMIMEType type, - NPStream* stream, - NPBool seekable, - uint16* stype) -{ - if(instance == NULL) - return NPERR_INVALID_INSTANCE_ERROR; - - NPError rv = NPERR_NO_ERROR; - return rv; -} - -int32 NPP_WriteReady (NPP instance, NPStream *stream) -{ - if(instance == NULL) - return NPERR_INVALID_INSTANCE_ERROR; - - int32 rv = 0x0fffffff; - return rv; -} - -int32 NPP_Write (NPP instance, NPStream *stream, int32 offset, int32 len, void *buffer) -{ - if(instance == NULL) - return NPERR_INVALID_INSTANCE_ERROR; - - int32 rv = len; - return rv; -} - -NPError NPP_DestroyStream (NPP instance, NPStream *stream, NPError reason) -{ - if(instance == NULL) - return NPERR_INVALID_INSTANCE_ERROR; - - NPError rv = NPERR_NO_ERROR; - return rv; -} - -void NPP_StreamAsFile (NPP instance, NPStream* stream, const char* fname) -{ - if(instance == NULL) - return; -} - -void NPP_Print (NPP instance, NPPrint* printInfo) -{ - if(instance == NULL) - return; -} - -void NPP_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData) -{ - if(instance == NULL) - return; -} - -NPError NPP_SetValue(NPP instance, NPNVariable variable, void *value) -{ - if(instance == NULL) - return NPERR_INVALID_INSTANCE_ERROR; - - NPError rv = NPERR_NO_ERROR; - return rv; -} - -int16 NPP_HandleEvent(NPP instance, void* event) -{ - if(instance == NULL) - return 0; - - int16 rv = 0; - CPlugin * pPlugin = (CPlugin *)instance->pdata; - if (pPlugin) - rv = pPlugin->handleEvent(event); - - return rv; -} diff --git a/modules/plugin/sdk/samples/4x-scriptable/nsI4xScriptablePlugin.idl b/modules/plugin/sdk/samples/4x-scriptable/nsI4xScriptablePlugin.idl deleted file mode 100644 index f4c9a50e128d..000000000000 --- a/modules/plugin/sdk/samples/4x-scriptable/nsI4xScriptablePlugin.idl +++ /dev/null @@ -1,51 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * ***** 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) 2001 - * 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 "nsISupports.idl" - -interface acmeIScriptObject; - -[scriptable, uuid(482e1890-1fe5-11d5-9cf8-0060b0fbd8ac)] -interface nsI4xScriptablePlugin : nsISupports { - void showVersion(); - void clear(); - - readonly attribute string version; - - void setWindow(in acmeIScriptObject window); -}; diff --git a/modules/plugin/sdk/samples/4x-scriptable/nsScriptablePeer.cpp b/modules/plugin/sdk/samples/4x-scriptable/nsScriptablePeer.cpp deleted file mode 100644 index 0c6455c5f4d5..000000000000 --- a/modules/plugin/sdk/samples/4x-scriptable/nsScriptablePeer.cpp +++ /dev/null @@ -1,168 +0,0 @@ -/* -*- 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) 1998 - * 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 ***** */ - -// ============================== -// ! Scriptability related code ! -// ============================== -// - -///////////////////////////////////////////////////// -// -// This file implements the nsScriptablePeer object -// The native methods of this class are supposed to -// be callable from JavaScript -// -#include "plugin.h" -#include "acmeIScriptObject.h" -#include "npapi.h" - -static NS_DEFINE_IID(kI4xScriptablePluginIID, NS_I4XSCRIPTABLEPLUGIN_IID); -static NS_DEFINE_IID(kIClassInfoIID, NS_ICLASSINFO_IID); -static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID); - -nsScriptablePeer::nsScriptablePeer(CPlugin* aPlugin) -{ - mRefCnt = 0; - mPlugin = aPlugin; - mWindow = nsnull; -} - -nsScriptablePeer::~nsScriptablePeer() -{ -} - -// AddRef, Release and QueryInterface are common methods and must -// be implemented for any interface -NS_IMETHODIMP_(nsrefcnt) nsScriptablePeer::AddRef() -{ - ++mRefCnt; - return mRefCnt; -} - -NS_IMETHODIMP_(nsrefcnt) nsScriptablePeer::Release() -{ - --mRefCnt; - if (mRefCnt == 0) { - delete this; - return 0; - } - return mRefCnt; -} - -// here nsScriptablePeer should return three interfaces it can be asked for by their iid's -// static casts are necessary to ensure that correct pointer is returned -NS_IMETHODIMP nsScriptablePeer::QueryInterface(const nsIID& aIID, void** aInstancePtr) -{ - if(!aInstancePtr) - return NS_ERROR_NULL_POINTER; - - if(aIID.Equals(kI4xScriptablePluginIID)) { - *aInstancePtr = static_cast(this); - AddRef(); - return NS_OK; - } - - if(aIID.Equals(kIClassInfoIID)) { - *aInstancePtr = static_cast(this); - AddRef(); - return NS_OK; - } - - if(aIID.Equals(kISupportsIID)) { - *aInstancePtr = static_cast(static_cast(this)); - AddRef(); - return NS_OK; - } - - return NS_NOINTERFACE; -} - -// -// the following two methods will be callable from JavaScript -// -NS_IMETHODIMP nsScriptablePeer::ShowVersion() -{ - if (mPlugin) - mPlugin->showVersion(); - - return NS_OK; -} - -NS_IMETHODIMP nsScriptablePeer::Clear() -{ - if (mPlugin) - mPlugin->clear(); - - return NS_OK; -} - -NS_IMETHODIMP nsScriptablePeer::GetVersion(char * *aVersion) -{ - if (mPlugin) - mPlugin->getVersion(aVersion); - return NS_OK; -} - -NS_IMETHODIMP nsScriptablePeer::SetWindow(acmeIScriptObject *window) -{ - NS_IF_ADDREF(window); - NS_IF_RELEASE(mWindow); - mWindow = window; - - // evaluate a JavaScript expression. - acmeIScriptObject* result; - nsresult rv = window->Evaluate("Math.PI", &result); - if (NS_SUCCEEDED(rv) && result) { - double value; - result->ToNumber(&value); - NS_RELEASE(result); - } - - // read the current window's location. - acmeIScriptObject* location = nsnull; - rv = window->GetProperty("location", &location); - if (NS_SUCCEEDED(rv) && location) { - char* locationStr = NULL; - rv = location->ToString(&locationStr); - if (NS_SUCCEEDED(rv) && locationStr) { - NPN_MemFree(locationStr); - } - NS_RELEASE(location); - } - - return NS_OK; -} diff --git a/modules/plugin/sdk/samples/4x-scriptable/nsScriptablePeer.h b/modules/plugin/sdk/samples/4x-scriptable/nsScriptablePeer.h deleted file mode 100644 index dd839ef20eb8..000000000000 --- a/modules/plugin/sdk/samples/4x-scriptable/nsScriptablePeer.h +++ /dev/null @@ -1,107 +0,0 @@ -/* -*- 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) 1998 - * 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 ***** */ - -// ============================== -// ! Scriptability related code ! -// ============================== -// -// nsScriptablePeer - xpconnect scriptable peer -// - -#ifndef __nsScriptablePeer_h__ -#define __nsScriptablePeer_h__ - -#include "nsI4xScriptablePlugin.h" -#include "nsIClassInfo.h" -#include "nsIProgrammingLanguage.h" - -class CPlugin; - -// We must implement nsIClassInfo because it signals the -// Mozilla Security Manager to allow calls from JavaScript. - -class nsClassInfoMixin : public nsIClassInfo -{ - // These flags are used by the DOM and security systems to signal that - // JavaScript callers are allowed to call this object's scritable methods. - NS_IMETHOD GetFlags(PRUint32 *aFlags) - {*aFlags = nsIClassInfo::PLUGIN_OBJECT | nsIClassInfo::DOM_OBJECT; - return NS_OK;} - NS_IMETHOD GetImplementationLanguage(PRUint32 *aImplementationLanguage) - {*aImplementationLanguage = nsIProgrammingLanguage::CPLUSPLUS; - return NS_OK;} - // The rest of the methods can safely return error codes... - NS_IMETHOD GetInterfaces(PRUint32 *count, nsIID * **array) - {return NS_ERROR_NOT_IMPLEMENTED;} - NS_IMETHOD GetHelperForLanguage(PRUint32 language, nsISupports **_retval) - {return NS_ERROR_NOT_IMPLEMENTED;} - NS_IMETHOD GetContractID(char * *aContractID) - {return NS_ERROR_NOT_IMPLEMENTED;} - NS_IMETHOD GetClassDescription(char * *aClassDescription) - {return NS_ERROR_NOT_IMPLEMENTED;} - NS_IMETHOD GetClassID(nsCID * *aClassID) - {return NS_ERROR_NOT_IMPLEMENTED;} - NS_IMETHOD GetClassIDNoAlloc(nsCID *aClassIDNoAlloc) - {return NS_ERROR_NOT_IMPLEMENTED;} -}; - -class nsScriptablePeer : public nsI4xScriptablePlugin, - public nsClassInfoMixin -{ -public: - nsScriptablePeer(CPlugin* plugin); - ~nsScriptablePeer(); - -public: - // methods from nsISupports - NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr); - NS_IMETHOD_(nsrefcnt) AddRef(); - NS_IMETHOD_(nsrefcnt) Release(); - -protected: - nsrefcnt mRefCnt; - -public: - // native methods callable from JavaScript - NS_DECL_NSI4XSCRIPTABLEPLUGIN - -protected: - CPlugin* mPlugin; - acmeIScriptObject* mWindow; -}; - -#endif diff --git a/modules/plugin/sdk/samples/4x-scriptable/nsScriptablePeer1.cpp b/modules/plugin/sdk/samples/4x-scriptable/nsScriptablePeer1.cpp deleted file mode 100644 index 74e23967183a..000000000000 --- a/modules/plugin/sdk/samples/4x-scriptable/nsScriptablePeer1.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* -*- 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) 1998 - * 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 ***** */ - -// ============================== -// ! Scriptability related code ! -// ============================== -// - -///////////////////////////////////////////////////// -// -// This file implements the nsScriptablePeer object -// The native methods of this class are supposed to -// be callable from JavaScript -// -#include "plugin.h" - -nsScriptablePeer::nsScriptablePeer(CPlugin* aPlugin) -{ - - mPlugin = aPlugin; -} - -nsScriptablePeer::~nsScriptablePeer() -{ -} - -// Notice that we expose our claim to implement nsIClassInfo. -NS_IMPL_ISUPPORTS2(nsScriptablePeer, nsI4xScriptablePlugin, nsIClassInfo) - -// -// the following two methods will be callable from JavaScript -// -NS_IMETHODIMP nsScriptablePeer::ShowVersion() -{ - if (mPlugin) - mPlugin->showVersion(); - - return NS_OK; -} - -NS_IMETHODIMP nsScriptablePeer::Clear() -{ - if (mPlugin) - mPlugin->clear(); - - return NS_OK; -} diff --git a/modules/plugin/sdk/samples/4x-scriptable/nsScriptablePeer1.h b/modules/plugin/sdk/samples/4x-scriptable/nsScriptablePeer1.h deleted file mode 100644 index e807a49b4de8..000000000000 --- a/modules/plugin/sdk/samples/4x-scriptable/nsScriptablePeer1.h +++ /dev/null @@ -1,96 +0,0 @@ -/* -*- 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) 1998 - * 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 ***** */ - -// ============================== -// ! Scriptability related code ! -// ============================== -// -// nsScriptablePeer - xpconnect scriptable peer -// - -#ifndef __nsScriptablePeer_h__ -#define __nsScriptablePeer_h__ - -#include "nsI4xScriptablePlugin.h" -#include "nsIClassInfo.h" -#include "nsIProgrammingLanguage.h" - -class CPlugin; - -// We must implement nsIClassInfo because it signals the -// Mozilla Security Manager to allow calls from JavaScript. - -class nsClassInfoMixin : public nsIClassInfo -{ - // These flags are used by the DOM and security systems to signal that - // JavaScript callers are allowed to call this object's scritable methods. - NS_IMETHOD GetFlags(PRUint32 *aFlags) - {*aFlags = nsIClassInfo::PLUGIN_OBJECT | nsIClassInfo::DOM_OBJECT; - return NS_OK;} - NS_IMETHOD GetImplementationLanguage(PRUint32 *aImplementationLanguage) - {*aImplementationLanguage = nsIProgrammingLanguage::CPLUSPLUS; - return NS_OK;} - // The rest of the methods can safely return error codes... - NS_IMETHOD GetInterfaces(PRUint32 *count, nsIID * **array) - {return NS_ERROR_NOT_IMPLEMENTED;} - NS_IMETHOD GetHelperForLanguage(PRUint32 language, nsISupports **_retval) - {return NS_ERROR_NOT_IMPLEMENTED;} - NS_IMETHOD GetContractID(char * *aContractID) - {return NS_ERROR_NOT_IMPLEMENTED;} - NS_IMETHOD GetClassDescription(char * *aClassDescription) - {return NS_ERROR_NOT_IMPLEMENTED;} - NS_IMETHOD GetClassID(nsCID * *aClassID) - {return NS_ERROR_NOT_IMPLEMENTED;} - NS_IMETHOD GetClassIDNoAlloc(nsCID *aClassIDNoAlloc) - {return NS_ERROR_NOT_IMPLEMENTED;} -}; - -class nsScriptablePeer : public nsI4xScriptablePlugin, - public nsClassInfoMixin -{ -public: - nsScriptablePeer(CPlugin* plugin); - ~nsScriptablePeer(); - - NS_DECL_ISUPPORTS - NS_DECL_NSI4XSCRIPTABLEPLUGIN - -protected: - CPlugin* mPlugin; -}; - -#endif diff --git a/modules/plugin/sdk/samples/4x-scriptable/plugin.cpp b/modules/plugin/sdk/samples/4x-scriptable/plugin.cpp deleted file mode 100644 index 3d21ae56b352..000000000000 --- a/modules/plugin/sdk/samples/4x-scriptable/plugin.cpp +++ /dev/null @@ -1,215 +0,0 @@ -/* -*- 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) 1998 - * 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 ***** */ - -////////////////////////////////////////////////// -// -// CPlugin class implementation -// -#ifdef XP_WIN -#include -#include -#endif - -#ifdef XP_MAC -#include -#endif - -#include "plugin.h" - -CPlugin::CPlugin(NPP pNPInstance) : - m_pNPInstance(pNPInstance), - m_pNPStream(NULL), - m_bInitialized(FALSE), - m_pScriptablePeer(NULL) -{ -#ifdef XP_WIN - m_hWnd = NULL; -#endif - - const char *ua = NPN_UserAgent(m_pNPInstance); - strcpy(m_String, ua); -} - -CPlugin::~CPlugin() -{ - NS_IF_RELEASE(m_pScriptablePeer); -} - -#ifdef XP_WIN -static LRESULT CALLBACK PluginWinProc(HWND, UINT, WPARAM, LPARAM); -static WNDPROC lpOldProc = NULL; -#endif - -NPBool CPlugin::init(NPWindow* pNPWindow) -{ - if(pNPWindow == NULL) - return FALSE; - -#ifdef XP_WIN - m_hWnd = (HWND)pNPWindow->window; - if(m_hWnd == NULL) - return FALSE; - - // subclass window so we can intercept window messages and - // do our drawing to it - lpOldProc = SubclassWindow(m_hWnd, (WNDPROC)PluginWinProc); - - // associate window with our CPlugin object so we can access - // it in the window procedure - SetWindowLong(m_hWnd, GWL_USERDATA, (LONG)this); -#endif - - m_Window = pNPWindow; - - m_bInitialized = TRUE; - return TRUE; -} - -void CPlugin::shut() -{ -#ifdef XP_WIN - // subclass it back - SubclassWindow(m_hWnd, lpOldProc); - m_hWnd = NULL; -#endif - - m_bInitialized = FALSE; -} - -NPBool CPlugin::isInitialized() -{ - return m_bInitialized; -} - -int16 CPlugin::handleEvent(void* event) -{ -#ifdef XP_MAC - NPEvent* ev = (NPEvent*)event; - if (m_Window) { - Rect box = { m_Window->y, m_Window->x, - m_Window->y + m_Window->height, m_Window->x + m_Window->width }; - if (ev->what == updateEvt) { - ::TETextBox(m_String, strlen(m_String), &box, teJustCenter); - } - } -#endif - return 0; -} - -// this will force to draw a version string in the plugin window -void CPlugin::showVersion() -{ - const char *ua = NPN_UserAgent(m_pNPInstance); - strcpy(m_String, ua); - -#ifdef XP_WIN - InvalidateRect(m_hWnd, NULL, TRUE); - UpdateWindow(m_hWnd); -#endif - - if (m_Window) { - NPRect r = { m_Window->y, m_Window->x, - m_Window->y + m_Window->height, m_Window->x + m_Window->width }; - NPN_InvalidateRect(m_pNPInstance, &r); - } -} - -// this will clean the plugin window -void CPlugin::clear() -{ - strcpy(m_String, ""); - -#ifdef XP_WIN - InvalidateRect(m_hWnd, NULL, TRUE); - UpdateWindow(m_hWnd); -#endif -} - -void CPlugin::getVersion(char* *aVersion) -{ - const char *ua = NPN_UserAgent(m_pNPInstance); - char*& version = *aVersion; - version = (char*)NPN_MemAlloc(1 + strlen(ua)); - if (version) - strcpy(version, ua); -} - -// ============================== -// ! Scriptability related code ! -// ============================== -// -// this method will return the scriptable object (and create it if necessary) -nsI4xScriptablePlugin* CPlugin::getScriptablePeer() -{ - if (!m_pScriptablePeer) { - m_pScriptablePeer = new nsScriptablePeer(this); - if(!m_pScriptablePeer) - return NULL; - - NS_ADDREF(m_pScriptablePeer); - } - - // add reference for the caller requesting the object - NS_ADDREF(m_pScriptablePeer); - return m_pScriptablePeer; -} - -#ifdef XP_WIN -static LRESULT CALLBACK PluginWinProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch (msg) { - case WM_PAINT: - { - // draw a frame and display the string - PAINTSTRUCT ps; - HDC hdc = BeginPaint(hWnd, &ps); - RECT rc; - GetClientRect(hWnd, &rc); - FrameRect(hdc, &rc, GetStockBrush(BLACK_BRUSH)); - CPlugin * p = (CPlugin *)GetWindowLong(hWnd, GWL_USERDATA); - if(p) - DrawText(hdc, p->m_String, strlen(p->m_String), &rc, DT_SINGLELINE | DT_CENTER | DT_VCENTER); - EndPaint(hWnd, &ps); - } - break; - default: - break; - } - - return DefWindowProc(hWnd, msg, wParam, lParam); -} -#endif diff --git a/modules/plugin/sdk/samples/4x-scriptable/plugin.h b/modules/plugin/sdk/samples/4x-scriptable/plugin.h deleted file mode 100644 index 3836a17c6d9b..000000000000 --- a/modules/plugin/sdk/samples/4x-scriptable/plugin.h +++ /dev/null @@ -1,79 +0,0 @@ -/* -*- 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) 1998 - * 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 ***** */ - -#ifndef __PLUGIN_H__ -#define __PLUGIN_H__ - -#include "npapi.h" -#include "nsScriptablePeer.h" - -class CPlugin -{ -private: - NPP m_pNPInstance; - -#ifdef XP_WIN - HWND m_hWnd; -#endif - - NPWindow * m_Window; - - NPStream * m_pNPStream; - NPBool m_bInitialized; - nsI4xScriptablePlugin * m_pScriptablePeer; - -public: - char m_String[128]; - -public: - CPlugin(NPP pNPInstance); - ~CPlugin(); - - NPBool init(NPWindow* pNPWindow); - void shut(); - NPBool isInitialized(); - - int16 handleEvent(void* event); - - void showVersion(); - void clear(); - void getVersion(char* *aVersion); - - nsI4xScriptablePlugin* getScriptablePeer(); -}; - -#endif // __PLUGIN_H__ diff --git a/modules/plugin/sdk/samples/4x-scriptable/readme.txt b/modules/plugin/sdk/samples/4x-scriptable/readme.txt deleted file mode 100644 index 32cd58d05056..000000000000 --- a/modules/plugin/sdk/samples/4x-scriptable/readme.txt +++ /dev/null @@ -1,39 +0,0 @@ -This is a plugin sample which demonstrates how with minimal modifications -in the 4.x legacy plugin code to achieve scripting functionality despite -of Mozilla not supporting LiveConnect in the way it was supported in -Netscape Communicator. - -To build the sample: - -1. create .xpt and nsI4xScrPlugin.h out of nsI4xScrPlugin.idl file -using Netscape idl compiler xpidl.exe. The command options are: - xpidl -m header nsI4xScrPlugin.idl - xpidl -m typelib nsI4xScrPlugin.idl -nsISupports.idl and nsrootidl.idl are needed for this. - -2. create a project and build np4xscr.dll -- the plugin itself - -3. place .xpt file in the components directory and the dll in the -plugins directory - -4. load test.html and see it in work - -The current sample code was written for Windows but can be easily -modified for other platforms. - -Important notice: although developers who work on xpcom plugins -are strongly encouraged to use Netscape macros for common interface -method declarations and implementations, in the present sample we -decided to use their manual implementation. This is because the technique -shown in the sample may be useful for plugins which are supposed to -work under both Mozilla based browsers and Netscape Communicator -(4.x browsers). Using the macros requires linking against some -libraries which are not present in 4.x browsers (xpcom.lib, nspr.lib). - -Files which under other circumstances would benefit from using -the macros are nsScriptablePeer.h and nsScriptablePeer.cpp. The versions -which use macros are also included (nsScriptablePeer1.h and -nsScriptablePeer1.cpp) for reference purposes. - -Some header files from mozilla/dist/include and some .idl files from -mozilla/dist/idl are still needed to successfully build the sample. diff --git a/modules/plugin/sdk/samples/4x-scriptable/resource.h b/modules/plugin/sdk/samples/4x-scriptable/resource.h deleted file mode 100644 index 43f7ebf62419..000000000000 --- a/modules/plugin/sdk/samples/4x-scriptable/resource.h +++ /dev/null @@ -1,20 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Developer Studio generated include file. -// Used by np4xscr.rc -// -#define IDD_MAIN 101 -#define IDC_BUTTON_GO 1002 -#define IDC_STATIC_UA 1003 -#define IDC_BUTTON1 1005 -#define IDC_BUTTON_DONT 1005 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 102 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1006 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/modules/plugin/sdk/samples/4x-scriptable/script-test.html b/modules/plugin/sdk/samples/4x-scriptable/script-test.html deleted file mode 100644 index 51388fbc2400..000000000000 --- a/modules/plugin/sdk/samples/4x-scriptable/script-test.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - diff --git a/modules/plugin/sdk/samples/4x-scriptable/test.html b/modules/plugin/sdk/samples/4x-scriptable/test.html deleted file mode 100644 index ecca29200375..000000000000 --- a/modules/plugin/sdk/samples/4x-scriptable/test.html +++ /dev/null @@ -1,48 +0,0 @@ - - -4x Scriptable Plug-in Test - - - -

-

XPConnect Scriptable Old Style Sample Plug-in

-
- -This page contains a testcase which demonstrates the work of scriptable 4.x style -Navigator plug-in with Mozilla. The example plug-in occupies the area right below this text, -and you should see a frame the plug-in draws around its window. Below the plug-in window -there are two buttons. Clicking on the buttons will result in calling native plugin -methods from JavaScript. Show Version will instruct the plug-in to retrieve the -Mozilla user agent string and display it in the plug-in window, Clear button will -call plug-in method to erase the window. - -

- -
- -
- - - -
-
- - -
- -
- - - diff --git a/modules/plugin/sdk/samples/SanePlugin/README b/modules/plugin/sdk/samples/SanePlugin/readme.txt similarity index 100% rename from modules/plugin/sdk/samples/SanePlugin/README rename to modules/plugin/sdk/samples/SanePlugin/readme.txt diff --git a/modules/plugin/sdk/samples/basic/mac/Basic Plugin.xml b/modules/plugin/sdk/samples/basic/mac/Basic Plugin.xml deleted file mode 100644 index 3dbbb33c80c5..000000000000 --- a/modules/plugin/sdk/samples/basic/mac/Basic Plugin.xml +++ /dev/null @@ -1,530 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -]> - - - - - BasicPluginCarbon - - - - UserSourceTrees - - - AlwaysSearchUserPathsfalse - InterpretDOSAndUnixPathsfalse - RequireFrameworkStyleIncludesfalse - UserSearchPaths - - SearchPath - Path:: - PathFormatMacOS - PathRootProject - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SearchPath - Path:::include: - PathFormatMacOS - PathRootProject - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SearchPath - Path:::common: - PathFormatMacOS - PathRootProject - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SearchPath - Path::::include: - PathFormatMacOS - PathRootProject - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SystemSearchPaths - - SearchPath - Path:MSL: - PathFormatMacOS - PathRootCodeWarrior - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SearchPath - Path:MacOS Support: - PathFormatMacOS - PathRootCodeWarrior - - Recursivetrue - FrameworkPathfalse - HostFlagsMacOS - - - - - MWRuntimeSettings_WorkingDirectory - MWRuntimeSettings_CommandLine - MWRuntimeSettings_HostApplication - Path - PathFormatGeneric - PathRootAbsolute - - MWRuntimeSettings_EnvVars - - - LinkerMacOS PPC Linker - PreLinker - PostLinker - TargetnameBasicPluginCarbon - OutputDirectory - Path: - PathFormatMacOS - PathRootProject - - SaveEntriesUsingRelativePathsfalse - - - FileMappings - - FileTypeAPPL - FileExtension - Compiler - EditLanguage - Precompilefalse - Launchabletrue - ResourceFiletrue - IgnoredByMakefalse - - - FileTypeAppl - FileExtension - Compiler - EditLanguage - Precompilefalse - Launchabletrue - ResourceFiletrue - IgnoredByMakefalse - - - FileTypeMMLB - FileExtension - CompilerLib Import PPC - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeMPLF - FileExtension - CompilerLib Import PPC - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeMWCD - FileExtension - Compiler - EditLanguage - Precompilefalse - Launchabletrue - ResourceFiletrue - IgnoredByMakefalse - - - FileTypeRSRC - FileExtension - Compiler - EditLanguage - Precompilefalse - Launchabletrue - ResourceFiletrue - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.bh - CompilerBalloon Help - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.c - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.c++ - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.cc - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.cp - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.cpp - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.exp - Compiler - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.h - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMaketrue - - - FileTypeTEXT - FileExtension.p - CompilerMW Pascal PPC - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.pas - CompilerMW Pascal PPC - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.pch - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompiletrue - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.pch++ - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompiletrue - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.r - CompilerRez - EditLanguageRez - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.s - CompilerPPCAsm - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeXCOF - FileExtension - CompilerXCOFF Import PPC - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypedocu - FileExtension - Compiler - EditLanguage - Precompilefalse - Launchabletrue - ResourceFiletrue - IgnoredByMakefalse - - - FileTypersrc - FileExtension - Compiler - EditLanguage - Precompilefalse - Launchabletrue - ResourceFiletrue - IgnoredByMakefalse - - - FileTypeshlb - FileExtension - CompilerPEF Import PPC - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypestub - FileExtension - CompilerPEF Import PPC - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileExtension.doc - Compiler - EditLanguage - Precompilefalse - Launchabletrue - ResourceFilefalse - IgnoredByMaketrue - - - - - CacheModDatesfalse - ActivateBrowserfalse - DumpBrowserInfofalse - CacheSubprojectsfalse - UseThirdPartyDebuggerfalse - DebuggerAppPath - Path - PathFormatGeneric - PathRootAbsolute - - DebuggerCmdLineArgs - DebuggerWorkingDir - Path - PathFormatGeneric - PathRootAbsolute - - - - LogSystemMessagestrue - AutoTargetDLLstrue - StopAtWatchpointstrue - PauseWhileRunningfalse - PauseInterval5 - PauseUIFlags0 - AltExePath - Path - PathFormatGeneric - PathRootAbsolute - - StopAtTempBPOnLaunchtrue - CacheSymbolicstrue - TempBPFunctionNamemain - TempBPType0 - - - Enabledfalse - ConnectionName - DownloadPath - LaunchRemoteAppfalse - RemoteAppPath - - - OtherExecutables - - - CustomColor1 - Red0 - Green39321 - Blue0 - - CustomColor2 - Red0 - Green32767 - Blue0 - - CustomColor3 - Red0 - Green32767 - Blue0 - - CustomColor4 - Red0 - Green32767 - Blue0 - - - - MWFrontEnd_C_cplusplus0 - MWFrontEnd_C_checkprotos1 - MWFrontEnd_C_arm0 - MWFrontEnd_C_trigraphs0 - MWFrontEnd_C_onlystdkeywords0 - MWFrontEnd_C_enumsalwaysint1 - MWFrontEnd_C_mpwpointerstyle0 - MWFrontEnd_C_prefixnamepluginCarbonPrefix.h - MWFrontEnd_C_ansistrict0 - MWFrontEnd_C_mpwcnewline0 - MWFrontEnd_C_wchar_type1 - MWFrontEnd_C_enableexceptions0 - MWFrontEnd_C_dontreusestrings0 - MWFrontEnd_C_poolstrings0 - MWFrontEnd_C_dontinline0 - MWFrontEnd_C_useRTTI0 - MWFrontEnd_C_multibyteaware0 - MWFrontEnd_C_unsignedchars0 - MWFrontEnd_C_autoinline0 - MWFrontEnd_C_booltruefalse1 - MWFrontEnd_C_direct_to_som0 - MWFrontEnd_C_som_env_check0 - MWFrontEnd_C_alwaysinline0 - MWFrontEnd_C_inlinelevel0 - MWFrontEnd_C_ecplusplus0 - MWFrontEnd_C_objective_c0 - MWFrontEnd_C_defer_codegen0 - - - MWWarning_C_warn_illpragma1 - MWWarning_C_warn_emptydecl1 - MWWarning_C_warn_possunwant1 - MWWarning_C_warn_unusedvar1 - MWWarning_C_warn_unusedarg0 - MWWarning_C_warn_extracomma1 - MWWarning_C_pedantic1 - MWWarning_C_warningerrors0 - MWWarning_C_warn_hidevirtual1 - MWWarning_C_warn_implicitconv0 - MWWarning_C_warn_notinlined0 - MWWarning_C_warn_structclass0 - - - MWFTP_Post_hostName - MWFTP_Post_username - MWFTP_Post_password263pi6sn63j4esi,p' \ No newline at end of file diff --git a/modules/plugin/sdk/samples/basic/readme.txt b/modules/plugin/sdk/samples/basic/readme.txt new file mode 100644 index 000000000000..6de40030d5cf --- /dev/null +++ b/modules/plugin/sdk/samples/basic/readme.txt @@ -0,0 +1,3 @@ +Basic Plugin + +You should see the plugin window with a black frame aroung it and the browser user agent string drawn inside. diff --git a/modules/plugin/sdk/samples/npruntime/readme.txt b/modules/plugin/sdk/samples/npruntime/readme.txt new file mode 100644 index 000000000000..878e49addbc6 --- /dev/null +++ b/modules/plugin/sdk/samples/npruntime/readme.txt @@ -0,0 +1,3 @@ +NPRuntime Plugin + +This sample plugin can be scripted, JavaScript can call into the plugin via NPRuntime. diff --git a/modules/plugin/sdk/samples/npthread/windows/readme.txt b/modules/plugin/sdk/samples/npthread/readme.txt similarity index 98% rename from modules/plugin/sdk/samples/npthread/windows/readme.txt rename to modules/plugin/sdk/samples/npthread/readme.txt index ba7a5516515e..251cbfbd0b93 100644 --- a/modules/plugin/sdk/samples/npthread/windows/readme.txt +++ b/modules/plugin/sdk/samples/npthread/readme.txt @@ -1,4 +1,4 @@ -03-05-2002 +NPThread Plugin This sample is an attempt to write a wrapper plugin which would run the real plugin in a separate thread. The current code is just a first prototype diff --git a/modules/plugin/sdk/samples/scriptable/mac/Scriptable Plugin.xml b/modules/plugin/sdk/samples/scriptable/mac/Scriptable Plugin.xml deleted file mode 100644 index 124029f6f14a..000000000000 --- a/modules/plugin/sdk/samples/scriptable/mac/Scriptable Plugin.xml +++ /dev/null @@ -1,2136 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -]> - - - - - ScriptablePluginCarbon - - - - UserSourceTrees - - - AlwaysSearchUserPathsfalse - InterpretDOSAndUnixPathsfalse - RequireFrameworkStyleIncludesfalse - UserSearchPaths - - SearchPath - Path:: - PathFormatMacOS - PathRootProject - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SearchPath - Path:::include: - PathFormatMacOS - PathRootProject - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SearchPath - Path:::common: - PathFormatMacOS - PathRootProject - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SearchPath - Path::::include: - PathFormatMacOS - PathRootProject - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SystemSearchPaths - - SearchPath - Path:MSL: - PathFormatMacOS - PathRootCodeWarrior - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SearchPath - Path:MacOS Support: - PathFormatMacOS - PathRootCodeWarrior - - Recursivetrue - FrameworkPathfalse - HostFlagsMacOS - - - - - MWRuntimeSettings_WorkingDirectory - MWRuntimeSettings_CommandLine - MWRuntimeSettings_HostApplication - Path - PathFormatGeneric - PathRootAbsolute - - MWRuntimeSettings_EnvVars - - - LinkerMacOS PPC Linker - PreLinker - PostLinker - TargetnameScriptablePluginCarbon - OutputDirectory - Path: - PathFormatMacOS - PathRootProject - - SaveEntriesUsingRelativePathsfalse - - - FileMappings - - FileTypeAPPL - FileExtension - Compiler - EditLanguage - Precompilefalse - Launchabletrue - ResourceFiletrue - IgnoredByMakefalse - - - FileTypeAppl - FileExtension - Compiler - EditLanguage - Precompilefalse - Launchabletrue - ResourceFiletrue - IgnoredByMakefalse - - - FileTypeMMLB - FileExtension - CompilerLib Import PPC - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeMPLF - FileExtension - CompilerLib Import PPC - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeMWCD - FileExtension - Compiler - EditLanguage - Precompilefalse - Launchabletrue - ResourceFiletrue - IgnoredByMakefalse - - - FileTypeRSRC - FileExtension - Compiler - EditLanguage - Precompilefalse - Launchabletrue - ResourceFiletrue - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.bh - CompilerBalloon Help - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.c - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.c++ - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.cc - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.cp - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.cpp - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.exp - Compiler - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.h - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMaketrue - - - FileTypeTEXT - FileExtension.p - CompilerMW Pascal PPC - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.pas - CompilerMW Pascal PPC - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.pch - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompiletrue - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.pch++ - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompiletrue - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.r - CompilerRez - EditLanguageRez - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.s - CompilerPPCAsm - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeXCOF - FileExtension - CompilerXCOFF Import PPC - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypedocu - FileExtension - Compiler - EditLanguage - Precompilefalse - Launchabletrue - ResourceFiletrue - IgnoredByMakefalse - - - FileTypersrc - FileExtension - Compiler - EditLanguage - Precompilefalse - Launchabletrue - ResourceFiletrue - IgnoredByMakefalse - - - FileTypeshlb - FileExtension - CompilerPEF Import PPC - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypestub - FileExtension - CompilerPEF Import PPC - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileExtension.doc - Compiler - EditLanguage - Precompilefalse - Launchabletrue - ResourceFilefalse - IgnoredByMaketrue - - - - - CacheModDatesfalse - ActivateBrowserfalse - DumpBrowserInfofalse - CacheSubprojectsfalse - UseThirdPartyDebuggerfalse - DebuggerAppPath - Path - PathFormatGeneric - PathRootAbsolute - - DebuggerCmdLineArgs - DebuggerWorkingDir - Path - PathFormatGeneric - PathRootAbsolute - - - - LogSystemMessagestrue - AutoTargetDLLstrue - StopAtWatchpointstrue - PauseWhileRunningfalse - PauseInterval5 - PauseUIFlags0 - AltExePath - Path - PathFormatGeneric - PathRootAbsolute - - StopAtTempBPOnLaunchtrue - CacheSymbolicstrue - TempBPFunctionNamemain - TempBPType0 - - - Enabledfalse - ConnectionName - DownloadPath - LaunchRemoteAppfalse - RemoteAppPath - - - OtherExecutables - - - CustomColor1 - Red0 - Green39321 - Blue0 - - CustomColor2 - Red0 - Green32767 - Blue0 - - CustomColor3 - Red0 - Green32767 - Blue0 - - CustomColor4 - Red0 - Green32767 - Blue0 - - - - MWFrontEnd_C_cplusplus0 - MWFrontEnd_C_checkprotos1 - MWFrontEnd_C_arm0 - MWFrontEnd_C_trigraphs0 - MWFrontEnd_C_onlystdkeywords0 - MWFrontEnd_C_enumsalwaysint1 - MWFrontEnd_C_mpwpointerstyle0 - MWFrontEnd_C_prefixnamepluginCarbonPrefix.h - MWFrontEnd_C_ansistrict0 - MWFrontEnd_C_mpwcnewline0 - MWFrontEnd_C_wchar_type1 - MWFrontEnd_C_enableexceptions0 - MWFrontEnd_C_dontreusestrings0 - MWFrontEnd_C_poolstrings0 - MWFrontEnd_C_dontinline0 - MWFrontEnd_C_useRTTI0 - MWFrontEnd_C_multibyteaware0 - MWFrontEnd_C_unsignedchars0 - MWFrontEnd_C_autoinline0 - MWFrontEnd_C_booltruefalse1 - MWFrontEnd_C_direct_to_som0 - MWFrontEnd_C_som_env_check0 - MWFrontEnd_C_alwaysinline0 - MWFrontEnd_C_inlinelevel0 - MWFrontEnd_C_ecplusplus0 - MWFrontEnd_C_objective_c0 - MWFrontEnd_C_defer_codegen0 - - - MWWarning_C_warn_illpragma1 - MWWarning_C_warn_emptydecl1 - MWWarning_C_warn_possunwant1 - MWWarning_C_warn_unusedvar1 - MWWarning_C_warn_unusedarg0 - MWWarning_C_warn_extracomma1 - MWWarning_C_pedantic1 - MWWarning_C_warningerrors0 - MWWarning_C_warn_hidevirtual1 - MWWarning_C_warn_implicitconv0 - MWWarning_C_warn_notinlined0 - MWWarning_C_warn_structclass0 - - - MWFTP_Post_hostName - MWFTP_Post_username - MWFTP_Post_password0 - MWFTP_Post_remoteDir - MWFTP_Post_ftp_PathVersion0 - MWFTP_Post_ftp_PathType0 - MWFTP_Post_ftp_PathFormat0 - MWFTP_Post_ftp_tree - MWFTP_Post_uploadDir - MWFTP_Post_ftp_port21 - MWFTP_Post_SendBin1 - MWFTP_Post_ShouldLog1 - - - MWCommandLine_Java_clsName - MWCommandLine_Java_args - - - MWVJavaDebugging_Protocol1 - MWVJavaDebugging_JDKVersion1 - MWVJavaDebugging_TimeOut10 - MWVJavaDebugging_SupportSlowDevicesfalse - - - MWJava_Language_optimizefalse - MWJava_Language_warnDeprecatedfalse - MWJava_Language_emitMapfalse - MWJava_Language_strictFileNamesfalse - MWJava_Language_strictFileHierarchyfalse - MWJava_Language_1_1_Compatiblefalse - MWJava_Language_emitHeaders0 - MWJava_Language_headerTypeJNINativeHeaders - MWJava_Language_packageFilter - MWJava_Language_genCommentstrue - MWJava_Language_genHeadersfalse - - - MWJava_MRJAppBuilder_outFileMRJApplication - MWJava_MRJAppBuilder_mergefalse - MWJava_MRJAppBuilder_quitMenutrue - MWJava_MRJAppBuilder_growfalse - MWJava_MRJAppBuilder_stdoutTypeConsole - MWJava_MRJAppBuilder_stderrTypeConsole - MWJava_MRJAppBuilder_stdinTypeConsole - MWJava_MRJAppBuilder_appIconPVersion0 - MWJava_MRJAppBuilder_appIconPType0 - MWJava_MRJAppBuilder_appIconPFormat0 - MWJava_MRJAppBuilder_appIconPTree - MWJava_MRJAppBuilder_appIconFile - MWJava_MRJAppBuilder_splashScreenPVersion0 - MWJava_MRJAppBuilder_splashScreenPType0 - MWJava_MRJAppBuilder_splashScreenPFormat0 - MWJava_MRJAppBuilder_splashScreenPTree - MWJava_MRJAppBuilder_splashScreenPICTFile - MWJava_MRJAppBuilder_aboutName - MWJava_MRJAppBuilder_stdoutPVersion0 - MWJava_MRJAppBuilder_stdoutPType0 - MWJava_MRJAppBuilder_stdoutPFormat0 - MWJava_MRJAppBuilder_stdoutPTree - MWJava_MRJAppBuilder_stdoutFile - MWJava_MRJAppBuilder_stdoutAppendfalse - MWJava_MRJAppBuilder_stderrPType0 - MWJava_MRJAppBuilder_stderrPFormat0 - MWJava_MRJAppBuilder_stderrPTree - MWJava_MRJAppBuilder_stderrFile - MWJava_MRJAppBuilder_stderrAppendfalse - MWJava_MRJAppBuilder_stdinPType0 - MWJava_MRJAppBuilder_stdinPFormat0 - MWJava_MRJAppBuilder_stdinPTree - MWJava_MRJAppBuilder_stdinFile - - - MWJava_Output_outputtypeJarFile - MWJava_Output_outfileJavaClasses.jar - MWJava_Output_ftype1514754080 - MWJava_Output_fcreator1297570384 - MWJava_Output_compress0 - MWJava_Output_genManifest0 - MWJava_Output_trunctypeFront - MWJava_Output_deleteClasses0 - MWJava_Output_consoleApp1 - - - MWJava_Proj_projtypeApplet - MWJava_Proj_mainClassName - MWJava_Proj_HTMLAppCreator1463898714 - MWJava_Proj_HTMLAppName - MWJava_Proj_PathVersion0 - MWJava_Proj_PathType0 - MWJava_Proj_PathFormat0 - MWJava_Proj_tree - MWJava_Proj_HTMLAppWin32Name - MWJava_Proj_compress0 - MWJava_Proj_useVM1 - MWJava_Proj_vmarguments - MWJava_Proj_vmName - MWJava_Proj_simPropFile - - - MWJavaDoc_Proj_Version1 - MWJavaDoc_Proj_Depricated1 - MWJavaDoc_Proj_Author1 - MWJavaDoc_Proj_Index1 - MWJavaDoc_Proj_Tree1 - MWJavaDoc_Proj_SunResolveToSame0 - MWJavaDoc_Proj_Shortnames1 - MWJavaDoc_Proj_Folder0 - MWJavaDoc_Proj_GenerateAPILinks0 - MWJavaDoc_Proj_scopePublic - MWJavaDoc_Proj_fcreator1297303877 - MWJavaDoc_Proj_encodingName - MWJavaDoc_Proj_decodingName - MWJavaDoc_Proj_javaPackagePathhttp://java.sun.com/products/jdk/1.1/docs/api/ - - - MWMerge_MacOS_projectTypeApplication - MWMerge_MacOS_outputNameMerge Out - MWMerge_MacOS_outputCreator???? - MWMerge_MacOS_outputTypeAPPL - MWMerge_MacOS_suppressWarning0 - MWMerge_MacOS_copyFragments1 - MWMerge_MacOS_copyResources1 - MWMerge_MacOS_flattenResource0 - MWMerge_MacOS_flatFileNamea.rsrc - MWMerge_MacOS_flatFileOutputPath - Path: - PathFormatMacOS - PathRootProject - - MWMerge_MacOS_skipResources - DLGX - ckid - Proj - WSPC - - - - FileLockedfalse - ResourcesMapIsReadOnlyfalse - PrinterDriverIsMultiFinderCompatiblefalse - Invisiblefalse - HasBundlefalse - NameLockedfalse - Stationeryfalse - HasCustomIconfalse - Sharedfalse - HasBeenInitedfalse - Label0 - Comments - - - MWMacOSPackager_UsePackager0 - MWMacOSPackager_FolderToPackage - Path: - PathFormatMacOS - PathRootProject - - MWMacOSPackager_CreateClassicAlias0 - MWMacOSPackager_ClassicAliasMethodUseTargetOutput - MWMacOSPackager_ClassicAliasPath - Path: - PathFormatMacOS - PathRootProject - - MWMacOSPackager_CreatePkgInfo0 - MWMacOSPackager_PkgCreatorType???? - MWMacOSPackager_PkgFileTypeAPPL - - - MWCodeGen_PPC_structalignmentMC68K - MWCodeGen_PPC_tracebacktablesNone - MWCodeGen_PPC_processorGeneric - MWCodeGen_PPC_readonlystrings0 - MWCodeGen_PPC_tocdata1 - MWCodeGen_PPC_profiler0 - MWCodeGen_PPC_fpcontract1 - MWCodeGen_PPC_schedule0 - MWCodeGen_PPC_peephole0 - MWCodeGen_PPC_processorspecific0 - MWCodeGen_PPC_altivec0 - MWCodeGen_PPC_vectortocdata1 - MWCodeGen_PPC_vrsave0 - - - MWCodeGen_MachO_structalignmentPPC - MWCodeGen_MachO_tracebacktablesNone - MWCodeGen_MachO_processorGeneric - MWCodeGen_MachO_readonlystrings0 - MWCodeGen_MachO_profiler0 - MWCodeGen_MachO_fpcontract1 - MWCodeGen_MachO_schedule0 - MWCodeGen_MachO_peephole1 - MWCodeGen_MachO_processorspecific0 - MWCodeGen_MachO_altivec0 - MWCodeGen_MachO_vrsave1 - MWCodeGen_MachO_common0 - MWCodeGen_MachO_implicit_templates1 - - - MWDisassembler_PPC_showcode1 - MWDisassembler_PPC_extended1 - MWDisassembler_PPC_mix0 - MWDisassembler_PPC_nohex0 - MWDisassembler_PPC_showdata1 - MWDisassembler_PPC_showexceptions1 - MWDisassembler_PPC_showsym0 - MWDisassembler_PPC_shownames1 - - - GlobalOptimizer_PPC_optimizationlevelLevel0 - GlobalOptimizer_PPC_optforSpeed - - - MWLinker_PPC_linksym1 - MWLinker_PPC_symfullpath1 - MWLinker_PPC_linkmap0 - MWLinker_PPC_nolinkwarnings0 - MWLinker_PPC_dontdeadstripinitcode0 - MWLinker_PPC_permitmultdefs0 - MWLinker_PPC_linkmodeFast - MWLinker_PPC_initname - MWLinker_PPC_mainnamemain - MWLinker_PPC_termname - - - MWLinker_MachO_exportsNone - MWLinker_MachO_mainnamestart - MWLinker_MachO_currentversion0 - MWLinker_MachO_compatibleversion0 - MWLinker_MachO_symfullpath0 - MWLinker_MachO_supresswarnings0 - MWLinker_MachO_multisymerror0 - MWLinker_MachO_prebind1 - MWLinker_MachO_deadstrip1 - MWLinker_MachO_objectivecsemantics0 - MWLinker_MachO_whichfileloaded0 - MWLinker_MachO_whyfileloaded0 - MWLinker_MachO_readonlyrelocsErrors - MWLinker_MachO_undefinedsymbolsErrors - MWLinker_MachO_twolevelnamespace1 - MWLinker_MachO_stripdebugsymbols0 - - - MWProject_MachO_typeExecutable - MWProject_MachO_outfilea.exe - MWProject_MachO_filecreator???? - MWProject_MachO_filetypeMEXE - MWProject_MachO_stacksize64 - MWProject_MachO_stackaddress0 - MWProject_MachO_flatrsrc1 - MWProject_MachO_flatrsrcfilenamea.rsrc - MWProject_MachO_flatrsrcoutputdir - Path: - PathFormatMacOS - PathRootProject - - MWProject_MachO_installpath./ - - - MWPEF_exportsPragma - MWPEF_libfolder0 - MWPEF_sortcodeNone - MWPEF_expandbss1 - MWPEF_sharedata0 - MWPEF_olddefversion0 - MWPEF_oldimpversion0 - MWPEF_currentversion0 - MWPEF_fragmentnamenpScriptablePlugin - MWPEF_collapsereloads0 - - - MWProject_PPC_typeSharedLibrary - MWProject_PPC_outfileScriptable Plugin - MWProject_PPC_filecreatorMOSS - MWProject_PPC_filetypeNSPL - MWProject_PPC_size0 - MWProject_PPC_minsize0 - MWProject_PPC_stacksize0 - MWProject_PPC_flags0 - MWProject_PPC_symfilename - MWProject_PPC_rsrcname - MWProject_PPC_rsrcheaderNative - MWProject_PPC_rsrctype???? - MWProject_PPC_rsrcid0 - MWProject_PPC_rsrcflags0 - MWProject_PPC_rsrcstore0 - MWProject_PPC_rsrcmerge0 - MWProject_PPC_flatrsrc0 - MWProject_PPC_flatrsrcoutputdir - Path: - PathFormatMacOS - PathRootProject - - MWProject_PPC_flatrsrcfilename - - - MWAssembler_PPC_auxheader0 - MWAssembler_PPC_symmodeMac - MWAssembler_PPC_dialectPPC - MWAssembler_PPC_prefixfile - MWAssembler_PPC_typecheck0 - MWAssembler_PPC_warnings0 - MWAssembler_PPC_casesensitive0 - - - MWRez_Language_maxwidth80 - MWRez_Language_scriptRoman - MWRez_Language_alignmentAlign1 - MWRez_Language_filtermodeFilterSkip - MWRez_Language_suppresswarnings0 - MWRez_Language_escapecontrolchars1 - MWRez_Language_prefixname - MWRez_Language_filteredtypes'CODE' 'DATA' 'PICT' - - - MWWinRC_prefixname - - - MWCodeGen_X86_processorGeneric - MWCodeGen_X86_alignmentbytes8 - MWCodeGen_X86_exceptionsZeroOverhead - MWCodeGen_X86_extinst_mmx0 - MWCodeGen_X86_extinst_3dnow0 - MWCodeGen_X86_use_mmx_3dnow_convention0 - MWCodeGen_X86_machinecodelisting0 - MWCodeGen_X86_intrinsics0 - MWCodeGen_X86_syminfo0 - MWCodeGen_X86_codeviewinfo1 - MWCodeGen_X86_extinst_cmov_fcomi0 - MWCodeGen_X86_extinst_sse0 - - - PDisasmX86_showHeaderstrue - PDisasmX86_showSymTabtrue - PDisasmX86_showCodetrue - PDisasmX86_showSourcefalse - PDisasmX86_showHextrue - PDisasmX86_showRelocationtrue - PDisasmX86_showCommentsfalse - PDisasmX86_showDebugfalse - PDisasmX86_showExceptionsfalse - PDisasmX86_showDatatrue - PDisasmX86_showRawfalse - PDisasmX86_verbosefalse - - - MWDebugger_X86_Exceptions - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - GlobalOptimizer_X86_optimizationlevelLevel0 - GlobalOptimizer_X86_optforSpeed - - - MWLinker_X86_entrypointusageDefault - MWLinker_X86_entrypoint - MWLinker_X86_subsystemWinGUI - MWLinker_X86_subsysmajorid4 - MWLinker_X86_subsysminorid0 - MWLinker_X86_usrmajorid0 - MWLinker_X86_usrminorid0 - MWLinker_X86_commandfile - MWLinker_X86_generatemap0 - MWLinker_X86_linksym0 - MWLinker_X86_linkCV1 - - - MWProject_X86_typeApplication - MWProject_X86_outfilenoname.exe - MWProject_X86_baseaddress4194304 - MWProject_X86_maxstacksize1024 - MWProject_X86_minstacksize4 - MWProject_X86_size1024 - MWProject_X86_minsize4 - MWProject_X86_importlib - xpidl Settings - 0001000101000000000000000000000000000000000000000000000000000000 - 0000000000000000 - - - - - Name - MSL_Runtime_PPC.Lib - MacOS - Library - - - - Name - npp_gate.cpp - MacOS - Text - Debug - - - Name - npn_gate.cpp - MacOS - Text - Debug - - - Name - np_entry.cpp - MacOS - Text - Debug - - - Name - CarbonLib - MacOS - Library - Debug - - - Name - MSL_C_Carbon.Lib - MacOS - Library - Debug - - - Name - console.stubs.c - MacOS - Text - Debug - - - Name - plugin.cpp - MacOS - Text - Debug - - - Name - nsScriptablePeer.cpp - MacOS - Text - Debug - - - Name - Scriptable.rsrc - MacOS - Resource - Debug - - - - - Name - npp_gate.cpp - MacOS - - - Name - npn_gate.cpp - MacOS - - - Name - np_entry.cpp - MacOS - - - Name - MSL_Runtime_PPC.Lib - MacOS - - - Name - CarbonLib - MacOS - - - Name - MSL_C_Carbon.Lib - MacOS - - - Name - console.stubs.c - MacOS - - - Name - plugin.cpp - MacOS - - - Name - nsScriptablePeer.cpp - MacOS - - - Name - Scriptable.rsrc - MacOS - - - - - ScriptablePlugin - - - - UserSourceTrees - - - AlwaysSearchUserPathsfalse - InterpretDOSAndUnixPathsfalse - RequireFrameworkStyleIncludesfalse - UserSearchPaths - - SearchPath - Path:: - PathFormatMacOS - PathRootProject - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SearchPath - Path:::include: - PathFormatMacOS - PathRootProject - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SearchPath - Path:::common: - PathFormatMacOS - PathRootProject - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SearchPath - Path::::include: - PathFormatMacOS - PathRootProject - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SystemSearchPaths - - SearchPath - Path:MSL: - PathFormatMacOS - PathRootCodeWarrior - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SearchPath - Path:MacOS Support: - PathFormatMacOS - PathRootCodeWarrior - - Recursivetrue - FrameworkPathfalse - HostFlagsMacOS - - - - - MWRuntimeSettings_WorkingDirectory - MWRuntimeSettings_CommandLine - MWRuntimeSettings_HostApplication - Path - PathFormatGeneric - PathRootAbsolute - - MWRuntimeSettings_EnvVars - - - LinkerMacOS PPC Linker - PreLinker - PostLinker - TargetnameScriptablePlugin - OutputDirectory - Path: - PathFormatMacOS - PathRootProject - - SaveEntriesUsingRelativePathsfalse - - - FileMappings - - FileTypeAPPL - FileExtension - Compiler - EditLanguage - Precompilefalse - Launchabletrue - ResourceFiletrue - IgnoredByMakefalse - - - FileTypeAppl - FileExtension - Compiler - EditLanguage - Precompilefalse - Launchabletrue - ResourceFiletrue - IgnoredByMakefalse - - - FileTypeMMLB - FileExtension - CompilerLib Import PPC - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeMPLF - FileExtension - CompilerLib Import PPC - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeMWCD - FileExtension - Compiler - EditLanguage - Precompilefalse - Launchabletrue - ResourceFiletrue - IgnoredByMakefalse - - - FileTypeRSRC - FileExtension - Compiler - EditLanguage - Precompilefalse - Launchabletrue - ResourceFiletrue - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.bh - CompilerBalloon Help - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.c - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.c++ - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.cc - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.cp - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.cpp - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.exp - Compiler - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.h - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMaketrue - - - FileTypeTEXT - FileExtension.p - CompilerMW Pascal PPC - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.pas - CompilerMW Pascal PPC - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.pch - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompiletrue - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.pch++ - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompiletrue - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.r - CompilerRez - EditLanguageRez - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.s - CompilerPPCAsm - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeXCOF - FileExtension - CompilerXCOFF Import PPC - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypedocu - FileExtension - Compiler - EditLanguage - Precompilefalse - Launchabletrue - ResourceFiletrue - IgnoredByMakefalse - - - FileTypersrc - FileExtension - Compiler - EditLanguage - Precompilefalse - Launchabletrue - ResourceFiletrue - IgnoredByMakefalse - - - FileTypeshlb - FileExtension - CompilerPEF Import PPC - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypestub - FileExtension - CompilerPEF Import PPC - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileExtension.doc - Compiler - EditLanguage - Precompilefalse - Launchabletrue - ResourceFilefalse - IgnoredByMaketrue - - - - - CacheModDatesfalse - ActivateBrowsertrue - DumpBrowserInfofalse - CacheSubprojectstrue - UseThirdPartyDebuggerfalse - DebuggerAppPath - Path - PathFormatGeneric - PathRootAbsolute - - DebuggerCmdLineArgs - DebuggerWorkingDir - Path - PathFormatGeneric - PathRootAbsolute - - - - LogSystemMessagestrue - AutoTargetDLLsfalse - StopAtWatchpointstrue - PauseWhileRunningfalse - PauseInterval5 - PauseUIFlags0 - AltExePath - Path - PathFormatGeneric - PathRootAbsolute - - StopAtTempBPOnLaunchtrue - CacheSymbolicstrue - TempBPFunctionNamemain - TempBPType0 - - - Enabledfalse - ConnectionName - DownloadPath - LaunchRemoteAppfalse - RemoteAppPath - - - OtherExecutables - - - CustomColor1 - Red0 - Green39321 - Blue0 - - CustomColor2 - Red0 - Green32767 - Blue0 - - CustomColor3 - Red0 - Green32767 - Blue0 - - CustomColor4 - Red0 - Green32767 - Blue0 - - - - MWFrontEnd_C_cplusplus0 - MWFrontEnd_C_checkprotos1 - MWFrontEnd_C_arm0 - MWFrontEnd_C_trigraphs0 - MWFrontEnd_C_onlystdkeywords0 - MWFrontEnd_C_enumsalwaysint1 - MWFrontEnd_C_mpwpointerstyle0 - MWFrontEnd_C_prefixnamepluginPrefix.h - MWFrontEnd_C_ansistrict0 - MWFrontEnd_C_mpwcnewline0 - MWFrontEnd_C_wchar_type1 - MWFrontEnd_C_enableexceptions0 - MWFrontEnd_C_dontreusestrings0 - MWFrontEnd_C_poolstrings0 - MWFrontEnd_C_dontinline0 - MWFrontEnd_C_useRTTI0 - MWFrontEnd_C_multibyteaware0 - MWFrontEnd_C_unsignedchars0 - MWFrontEnd_C_autoinline0 - MWFrontEnd_C_booltruefalse1 - MWFrontEnd_C_direct_to_som0 - MWFrontEnd_C_som_env_check0 - MWFrontEnd_C_alwaysinline0 - MWFrontEnd_C_inlinelevel0 - MWFrontEnd_C_ecplusplus0 - MWFrontEnd_C_objective_c0 - MWFrontEnd_C_defer_codegen0 - - - MWWarning_C_warn_illpragma1 - MWWarning_C_warn_emptydecl1 - MWWarning_C_warn_possunwant1 - MWWarning_C_warn_unusedvar1 - MWWarning_C_warn_unusedarg0 - MWWarning_C_warn_extracomma1 - MWWarning_C_pedantic1 - MWWarning_C_warningerrors0 - MWWarning_C_warn_hidevirtual1 - MWWarning_C_warn_implicitconv0 - MWWarning_C_warn_notinlined0 - MWWarning_C_warn_structclass0 - - - MWFTP_Post_hostName - MWFTP_Post_username - MWFTP_Post_password0 - MWFTP_Post_remoteDir - MWFTP_Post_ftp_PathVersion0 - MWFTP_Post_ftp_PathType0 - MWFTP_Post_ftp_PathFormat0 - MWFTP_Post_ftp_tree - MWFTP_Post_uploadDir - MWFTP_Post_ftp_port21 - MWFTP_Post_SendBin1 - MWFTP_Post_ShouldLog1 - - - MWCommandLine_Java_clsName - MWCommandLine_Java_args - - - MWVJavaDebugging_Protocol1 - MWVJavaDebugging_JDKVersion1 - MWVJavaDebugging_TimeOut10 - MWVJavaDebugging_SupportSlowDevicesfalse - - - MWJava_Language_optimizefalse - MWJava_Language_warnDeprecatedfalse - MWJava_Language_emitMapfalse - MWJava_Language_strictFileNamesfalse - MWJava_Language_strictFileHierarchyfalse - MWJava_Language_1_1_Compatiblefalse - MWJava_Language_emitHeaders0 - MWJava_Language_headerTypeJNINativeHeaders - MWJava_Language_packageFilter - MWJava_Language_genCommentstrue - MWJava_Language_genHeadersfalse - - - MWJava_MRJAppBuilder_outFileMRJApplication - MWJava_MRJAppBuilder_mergefalse - MWJava_MRJAppBuilder_quitMenutrue - MWJava_MRJAppBuilder_growfalse - MWJava_MRJAppBuilder_stdoutTypeConsole - MWJava_MRJAppBuilder_stderrTypeConsole - MWJava_MRJAppBuilder_stdinTypeConsole - MWJava_MRJAppBuilder_appIconPVersion0 - MWJava_MRJAppBuilder_appIconPType0 - MWJava_MRJAppBuilder_appIconPFormat0 - MWJava_MRJAppBuilder_appIconPTree - MWJava_MRJAppBuilder_appIconFile - MWJava_MRJAppBuilder_splashScreenPVersion0 - MWJava_MRJAppBuilder_splashScreenPType0 - MWJava_MRJAppBuilder_splashScreenPFormat0 - MWJava_MRJAppBuilder_splashScreenPTree - MWJava_MRJAppBuilder_splashScreenPICTFile - MWJava_MRJAppBuilder_aboutName - MWJava_MRJAppBuilder_stdoutPVersion0 - MWJava_MRJAppBuilder_stdoutPType0 - MWJava_MRJAppBuilder_stdoutPFormat0 - MWJava_MRJAppBuilder_stdoutPTree - MWJava_MRJAppBuilder_stdoutFile - MWJava_MRJAppBuilder_stdoutAppendfalse - MWJava_MRJAppBuilder_stderrPType0 - MWJava_MRJAppBuilder_stderrPFormat0 - MWJava_MRJAppBuilder_stderrPTree - MWJava_MRJAppBuilder_stderrFile - MWJava_MRJAppBuilder_stderrAppendfalse - MWJava_MRJAppBuilder_stdinPType0 - MWJava_MRJAppBuilder_stdinPFormat0 - MWJava_MRJAppBuilder_stdinPTree - MWJava_MRJAppBuilder_stdinFile - - - MWJava_Output_outputtypeJarFile - MWJava_Output_outfileJavaClasses.jar - MWJava_Output_ftype1514754080 - MWJava_Output_fcreator1297570384 - MWJava_Output_compress0 - MWJava_Output_genManifest0 - MWJava_Output_trunctypeFront - MWJava_Output_deleteClasses0 - MWJava_Output_consoleApp1 - - - MWJava_Proj_projtypeApplet - MWJava_Proj_mainClassName - MWJava_Proj_HTMLAppCreator1463898714 - MWJava_Proj_HTMLAppName - MWJava_Proj_PathVersion0 - MWJava_Proj_PathType0 - MWJava_Proj_PathFormat0 - MWJava_Proj_tree - MWJava_Proj_HTMLAppWin32Name - MWJava_Proj_compress0 - MWJava_Proj_useVM1 - MWJava_Proj_vmarguments - MWJava_Proj_vmName - MWJava_Proj_simPropFile - - - MWJavaDoc_Proj_Version1 - MWJavaDoc_Proj_Depricated1 - MWJavaDoc_Proj_Author1 - MWJavaDoc_Proj_Index1 - MWJavaDoc_Proj_Tree1 - MWJavaDoc_Proj_SunResolveToSame0 - MWJavaDoc_Proj_Shortnames1 - MWJavaDoc_Proj_Folder0 - MWJavaDoc_Proj_GenerateAPILinks0 - MWJavaDoc_Proj_scopePublic - MWJavaDoc_Proj_fcreator1297303877 - MWJavaDoc_Proj_encodingName - MWJavaDoc_Proj_decodingName - MWJavaDoc_Proj_javaPackagePathhttp://java.sun.com/products/jdk/1.1/docs/api/ - - - MWMerge_MacOS_projectTypeApplication - MWMerge_MacOS_outputNameMerge Out - MWMerge_MacOS_outputCreator???? - MWMerge_MacOS_outputTypeAPPL - MWMerge_MacOS_suppressWarning0 - MWMerge_MacOS_copyFragments1 - MWMerge_MacOS_copyResources1 - MWMerge_MacOS_flattenResource0 - MWMerge_MacOS_flatFileNamea.rsrc - MWMerge_MacOS_flatFileOutputPath - Path: - PathFormatMacOS - PathRootProject - - MWMerge_MacOS_skipResources - DLGX - ckid - Proj - WSPC - - - - FileLockedfalse - ResourcesMapIsReadOnlyfalse - PrinterDriverIsMultiFinderCompatiblefalse - Invisiblefalse - HasBundlefalse - NameLockedfalse - Stationeryfalse - HasCustomIconfalse - Sharedfalse - HasBeenInitedfalse - Label0 - Comments - - - MWMacOSPackager_UsePackager0 - MWMacOSPackager_FolderToPackage - Path: - PathFormatMacOS - PathRootProject - - MWMacOSPackager_CreateClassicAlias0 - MWMacOSPackager_ClassicAliasMethodUseTargetOutput - MWMacOSPackager_ClassicAliasPath - Path: - PathFormatMacOS - PathRootProject - - MWMacOSPackager_CreatePkgInfo0 - MWMacOSPackager_PkgCreatorType???? - MWMacOSPackager_PkgFileTypeAPPL - - - MWCodeGen_PPC_structalignmentPPC - MWCodeGen_PPC_tracebacktablesInline - MWCodeGen_PPC_processorGeneric - MWCodeGen_PPC_readonlystrings1 - MWCodeGen_PPC_tocdata1 - MWCodeGen_PPC_profiler0 - MWCodeGen_PPC_fpcontract1 - MWCodeGen_PPC_schedule1 - MWCodeGen_PPC_peephole1 - MWCodeGen_PPC_processorspecific0 - MWCodeGen_PPC_altivec0 - MWCodeGen_PPC_vectortocdata0 - MWCodeGen_PPC_vrsave0 - - - MWCodeGen_MachO_structalignmentPPC - MWCodeGen_MachO_tracebacktablesNone - MWCodeGen_MachO_processorGeneric - MWCodeGen_MachO_readonlystrings0 - MWCodeGen_MachO_profiler0 - MWCodeGen_MachO_fpcontract1 - MWCodeGen_MachO_schedule0 - MWCodeGen_MachO_peephole1 - MWCodeGen_MachO_processorspecific0 - MWCodeGen_MachO_altivec0 - MWCodeGen_MachO_vrsave1 - MWCodeGen_MachO_common0 - MWCodeGen_MachO_implicit_templates1 - - - MWDisassembler_PPC_showcode1 - MWDisassembler_PPC_extended1 - MWDisassembler_PPC_mix0 - MWDisassembler_PPC_nohex0 - MWDisassembler_PPC_showdata1 - MWDisassembler_PPC_showexceptions1 - MWDisassembler_PPC_showsym0 - MWDisassembler_PPC_shownames1 - - - GlobalOptimizer_PPC_optimizationlevelLevel0 - GlobalOptimizer_PPC_optforSpeed - - - MWLinker_PPC_linksym1 - MWLinker_PPC_symfullpath1 - MWLinker_PPC_linkmap0 - MWLinker_PPC_nolinkwarnings0 - MWLinker_PPC_dontdeadstripinitcode0 - MWLinker_PPC_permitmultdefs0 - MWLinker_PPC_linkmodeFast - MWLinker_PPC_initname - MWLinker_PPC_mainnamemain - MWLinker_PPC_termname - - - MWLinker_MachO_exportsNone - MWLinker_MachO_mainnamestart - MWLinker_MachO_currentversion0 - MWLinker_MachO_compatibleversion0 - MWLinker_MachO_symfullpath0 - MWLinker_MachO_supresswarnings0 - MWLinker_MachO_multisymerror0 - MWLinker_MachO_prebind1 - MWLinker_MachO_deadstrip1 - MWLinker_MachO_objectivecsemantics0 - MWLinker_MachO_whichfileloaded0 - MWLinker_MachO_whyfileloaded0 - MWLinker_MachO_readonlyrelocsErrors - MWLinker_MachO_undefinedsymbolsErrors - MWLinker_MachO_twolevelnamespace1 - MWLinker_MachO_stripdebugsymbols0 - - - MWProject_MachO_typeExecutable - MWProject_MachO_outfilea.exe - MWProject_MachO_filecreator???? - MWProject_MachO_filetypeMEXE - MWProject_MachO_stacksize64 - MWProject_MachO_stackaddress0 - MWProject_MachO_flatrsrc1 - MWProject_MachO_flatrsrcfilenamea.rsrc - MWProject_MachO_flatrsrcoutputdir - Path: - PathFormatMacOS - PathRootProject - - MWProject_MachO_installpath./ - - - MWPEF_exportsPragma - MWPEF_libfolder0 - MWPEF_sortcodeNone - MWPEF_expandbss0 - MWPEF_sharedata0 - MWPEF_olddefversion0 - MWPEF_oldimpversion0 - MWPEF_currentversion0 - MWPEF_fragmentnamensScriptablePlugin - MWPEF_collapsereloads0 - - - MWProject_PPC_typeSharedLibrary - MWProject_PPC_outfileScriptable Plugin - MWProject_PPC_filecreatorMOSS - MWProject_PPC_filetypeNSPL - MWProject_PPC_size0 - MWProject_PPC_minsize0 - MWProject_PPC_stacksize0 - MWProject_PPC_flags0 - MWProject_PPC_symfilename - MWProject_PPC_rsrcname - MWProject_PPC_rsrcheaderNative - MWProject_PPC_rsrctype???? - MWProject_PPC_rsrcid0 - MWProject_PPC_rsrcflags0 - MWProject_PPC_rsrcstore0 - MWProject_PPC_rsrcmerge0 - MWProject_PPC_flatrsrc0 - MWProject_PPC_flatrsrcoutputdir - Path: - PathFormatMacOS - PathRootProject - - MWProject_PPC_flatrsrcfilename - - - MWAssembler_PPC_auxheader0 - MWAssembler_PPC_symmodeMac - MWAssembler_PPC_dialectPPC - MWAssembler_PPC_prefixfile - MWAssembler_PPC_typecheck0 - MWAssembler_PPC_warnings0 - MWAssembler_PPC_casesensitive0 - - - MWRez_Language_maxwidth80 - MWRez_Language_scriptRoman - MWRez_Language_alignmentAlign1 - MWRez_Language_filtermodeFilterSkip - MWRez_Language_suppresswarnings0 - MWRez_Language_escapecontrolchars1 - MWRez_Language_prefixname - MWRez_Language_filteredtypes'CODE' 'DATA' 'PICT' - - - MWWinRC_prefixname - - - MWCodeGen_X86_processorGeneric - MWCodeGen_X86_alignmentbytes8 - MWCodeGen_X86_exceptionsZeroOverhead - MWCodeGen_X86_extinst_mmx0 - MWCodeGen_X86_extinst_3dnow0 - MWCodeGen_X86_use_mmx_3dnow_convention0 - MWCodeGen_X86_machinecodelisting0 - MWCodeGen_X86_intrinsics0 - MWCodeGen_X86_syminfo0 - MWCodeGen_X86_codeviewinfo1 - MWCodeGen_X86_extinst_cmov_fcomi0 - MWCodeGen_X86_extinst_sse0 - - - PDisasmX86_showHeaderstrue - PDisasmX86_showSymTabtrue - PDisasmX86_showCodetrue - PDisasmX86_showSourcefalse - PDisasmX86_showHextrue - PDisasmX86_showRelocationtrue - PDisasmX86_showCommentsfalse - PDisasmX86_showDebugfalse - PDisasmX86_showExceptionsfalse - PDisasmX86_showDatatrue - PDisasmX86_showRawfalse - PDisasmX86_verbosefalse - - - MWDebugger_X86_Exceptions - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - GlobalOptimizer_X86_optimizationlevelLevel0 - GlobalOptimizer_X86_optforSpeed - - - MWLinker_X86_entrypointusageDefault - MWLinker_X86_entrypoint - MWLinker_X86_subsystemWinGUI - MWLinker_X86_subsysmajorid4 - MWLinker_X86_subsysminorid0 - MWLinker_X86_usrmajorid0 - MWLinker_X86_usrminorid0 - MWLinker_X86_commandfile - MWLinker_X86_generatemap0 - MWLinker_X86_linksym0 - MWLinker_X86_linkCV1 - - - MWProject_X86_typeApplication - MWProject_X86_outfilenoname.exe - MWProject_X86_baseaddress4194304 - MWProject_X86_maxstacksize1024 - MWProject_X86_minstacksize4 - MWProject_X86_size1024 - MWProject_X86_minsize4 - MWProject_X86_importlib - xpidl Settings - 0001000101000000000000000000000000000000000000000000000000000000 - 0000000000000000 - - - - - Name - MSL_Runtime_PPC.Lib - MacOS - Library - - - - Name - InterfaceLib - MacOS - Library - - - - Name - npp_gate.cpp - MacOS - Text - - - - Name - npn_gate.cpp - MacOS - Text - - - - Name - np_entry.cpp - MacOS - Text - - - - Name - plugin.cpp - MacOS - Text - - - - Name - nsScriptablePeer.cpp - MacOS - Text - - - - Name - Scriptable.rsrc - MacOS - Resource - - - - Name - MSL_C_PPC.Lib - MacOS - Library - - - - - - Name - MSL_Runtime_PPC.Lib - MacOS - - - Name - InterfaceLib - MacOS - - - Name - npp_gate.cpp - MacOS - - - Name - npn_gate.cpp - MacOS - - - Name - np_entry.cpp - MacOS - - - Name - plugin.cpp - MacOS - - - Name - nsScriptablePeer.cpp - MacOS - - - Name - Scriptable.rsrc - MacOS - - - Name - MSL_C_PPC.Lib - MacOS - - - - - - - ScriptablePluginCarbon - ScriptablePlugin - - - - Plugin Src - - ScriptablePluginCarbon - Name - nsScriptablePeer.cpp - MacOS - - - ScriptablePluginCarbon - Name - plugin.cpp - MacOS - - - Resources - - ScriptablePluginCarbon - Name - Scriptable.rsrc - MacOS - - - Common - - ScriptablePluginCarbon - Name - npn_gate.cpp - MacOS - - - ScriptablePluginCarbon - Name - npp_gate.cpp - MacOS - - - ScriptablePluginCarbon - Name - np_entry.cpp - MacOS - - - ScriptablePluginCarbon - Name - console.stubs.c - MacOS - - - System Libraries - - ScriptablePluginCarbon - Name - MSL_Runtime_PPC.Lib - MacOS - - - ScriptablePlugin - Name - MSL_C_PPC.Lib - MacOS - - - ScriptablePlugin - Name - InterfaceLib - MacOS - - - ScriptablePluginCarbon - Name - CarbonLib - MacOS - - - ScriptablePluginCarbon - Name - MSL_C_Carbon.Lib - MacOS - - - - - diff --git a/modules/plugin/sdk/samples/scriptable/mac/Scriptable PluginIDL.xml b/modules/plugin/sdk/samples/scriptable/mac/Scriptable PluginIDL.xml deleted file mode 100644 index ea96879580a7..000000000000 --- a/modules/plugin/sdk/samples/scriptable/mac/Scriptable PluginIDL.xml +++ /dev/null @@ -1,1438 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -]> - - - - - ScriptablePlugin.headers - - - - UserSourceTrees - - - AlwaysSearchUserPathsfalse - InterpretDOSAndUnixPathsfalse - RequireFrameworkStyleIncludesfalse - UserSearchPaths - - SearchPath - Path: - PathFormatMacOS - PathRootProject - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SearchPath - Path::::IDL: - PathFormatMacOS - PathRootProject - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SearchPath - Path:: - PathFormatMacOS - PathRootProject - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SystemSearchPaths - - SearchPath - Path: - PathFormatMacOS - PathRootCodeWarrior - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - - - MWRuntimeSettings_WorkingDirectory - MWRuntimeSettings_CommandLine - MWRuntimeSettings_HostApplication - Path - PathFormatGeneric - PathRootAbsolute - - MWRuntimeSettings_EnvVars - - - Linkerxpt Linker - PreLinker - PostLinker - TargetnameScriptablePlugin.headers - OutputDirectory - Path: - PathFormatMacOS - PathRootProject - - SaveEntriesUsingRelativePathsfalse - - - FileMappings - - FileTypeRSRC - FileExtension - CompilerRez - EditLanguage - Precompilefalse - Launchabletrue - ResourceFiletrue - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.bh - CompilerBalloon Help - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.c - CompilerRunTSScript - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.idl - Compilerxpidl - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.r - CompilerRez - EditLanguageRez - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypersrc - FileExtension - CompilerRez - EditLanguage - Precompilefalse - Launchabletrue - ResourceFiletrue - IgnoredByMakefalse - - - FileExtension.xpt - Compiler - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - - - CacheModDatestrue - ActivateBrowsertrue - DumpBrowserInfofalse - CacheSubprojectstrue - UseThirdPartyDebuggerfalse - DebuggerAppPath - Path - PathFormatGeneric - PathRootAbsolute - - DebuggerCmdLineArgs - DebuggerWorkingDir - Path - PathFormatGeneric - PathRootAbsolute - - - - LogSystemMessagestrue - AutoTargetDLLsfalse - StopAtWatchpointstrue - PauseWhileRunningfalse - PauseInterval5 - PauseUIFlags0 - AltExePath - Path - PathFormatGeneric - PathRootAbsolute - - StopAtTempBPOnLaunchtrue - CacheSymbolicstrue - TempBPFunctionNamemain - TempBPType0 - - - Enabledfalse - ConnectionName - DownloadPath - LaunchRemoteAppfalse - RemoteAppPath - - - OtherExecutables - - - CustomColor1 - Red0 - Green32767 - Blue0 - - CustomColor2 - Red0 - Green32767 - Blue0 - - CustomColor3 - Red0 - Green32767 - Blue0 - - CustomColor4 - Red0 - Green32767 - Blue0 - - - - MWFrontEnd_C_cplusplus0 - MWFrontEnd_C_checkprotos0 - MWFrontEnd_C_arm0 - MWFrontEnd_C_trigraphs0 - MWFrontEnd_C_onlystdkeywords0 - MWFrontEnd_C_enumsalwaysint0 - MWFrontEnd_C_mpwpointerstyle0 - MWFrontEnd_C_prefixname - MWFrontEnd_C_ansistrict0 - MWFrontEnd_C_mpwcnewline0 - MWFrontEnd_C_wchar_type1 - MWFrontEnd_C_enableexceptions1 - MWFrontEnd_C_dontreusestrings0 - MWFrontEnd_C_poolstrings0 - MWFrontEnd_C_dontinline0 - MWFrontEnd_C_useRTTI1 - MWFrontEnd_C_multibyteaware0 - MWFrontEnd_C_unsignedchars0 - MWFrontEnd_C_autoinline0 - MWFrontEnd_C_booltruefalse1 - MWFrontEnd_C_direct_to_som0 - MWFrontEnd_C_som_env_check0 - MWFrontEnd_C_alwaysinline0 - MWFrontEnd_C_inlinelevel0 - MWFrontEnd_C_ecplusplus0 - MWFrontEnd_C_objective_c0 - MWFrontEnd_C_defer_codegen0 - - - MWWarning_C_warn_illpragma0 - MWWarning_C_warn_emptydecl0 - MWWarning_C_warn_possunwant0 - MWWarning_C_warn_unusedvar0 - MWWarning_C_warn_unusedarg0 - MWWarning_C_warn_extracomma0 - MWWarning_C_pedantic0 - MWWarning_C_warningerrors0 - MWWarning_C_warn_hidevirtual0 - MWWarning_C_warn_implicitconv0 - MWWarning_C_warn_notinlined0 - MWWarning_C_warn_structclass0 - - - MWFTP_Post_hostName - MWFTP_Post_username - MWFTP_Post_password0 - MWFTP_Post_remoteDir - MWFTP_Post_ftp_PathVersion0 - MWFTP_Post_ftp_PathType0 - MWFTP_Post_ftp_PathFormat0 - MWFTP_Post_ftp_tree - MWFTP_Post_uploadDir - MWFTP_Post_ftp_port21 - MWFTP_Post_SendBin1 - MWFTP_Post_ShouldLog1 - - - MWCommandLine_Java_clsName - MWCommandLine_Java_args - - - MWVJavaDebugging_Protocol1 - MWVJavaDebugging_JDKVersion1 - MWVJavaDebugging_TimeOut10 - MWVJavaDebugging_SupportSlowDevicesfalse - - - MWJava_Language_optimizefalse - MWJava_Language_warnDeprecatedfalse - MWJava_Language_emitMapfalse - MWJava_Language_strictFileNamesfalse - MWJava_Language_strictFileHierarchyfalse - MWJava_Language_1_1_Compatiblefalse - MWJava_Language_emitHeaders0 - MWJava_Language_headerTypeJNINativeHeaders - MWJava_Language_packageFilter - MWJava_Language_genCommentstrue - MWJava_Language_genHeadersfalse - - - MWJava_MRJAppBuilder_outFileMRJApplication - MWJava_MRJAppBuilder_mergefalse - MWJava_MRJAppBuilder_quitMenutrue - MWJava_MRJAppBuilder_growfalse - MWJava_MRJAppBuilder_stdoutTypeConsole - MWJava_MRJAppBuilder_stderrTypeConsole - MWJava_MRJAppBuilder_stdinTypeConsole - MWJava_MRJAppBuilder_appIconPVersion0 - MWJava_MRJAppBuilder_appIconPType0 - MWJava_MRJAppBuilder_appIconPFormat0 - MWJava_MRJAppBuilder_appIconPTree - MWJava_MRJAppBuilder_appIconFile - MWJava_MRJAppBuilder_splashScreenPVersion0 - MWJava_MRJAppBuilder_splashScreenPType0 - MWJava_MRJAppBuilder_splashScreenPFormat0 - MWJava_MRJAppBuilder_splashScreenPTree - MWJava_MRJAppBuilder_splashScreenPICTFile - MWJava_MRJAppBuilder_aboutName - MWJava_MRJAppBuilder_stdoutPVersion0 - MWJava_MRJAppBuilder_stdoutPType0 - MWJava_MRJAppBuilder_stdoutPFormat0 - MWJava_MRJAppBuilder_stdoutPTree - MWJava_MRJAppBuilder_stdoutFile - MWJava_MRJAppBuilder_stdoutAppendfalse - MWJava_MRJAppBuilder_stderrPType0 - MWJava_MRJAppBuilder_stderrPFormat0 - MWJava_MRJAppBuilder_stderrPTree - MWJava_MRJAppBuilder_stderrFile - MWJava_MRJAppBuilder_stderrAppendfalse - MWJava_MRJAppBuilder_stdinPType0 - MWJava_MRJAppBuilder_stdinPFormat0 - MWJava_MRJAppBuilder_stdinPTree - MWJava_MRJAppBuilder_stdinFile - - - MWJava_Output_outputtypeJarFile - MWJava_Output_outfileJavaClasses.jar - MWJava_Output_ftype1514754080 - MWJava_Output_fcreator1297570384 - MWJava_Output_compress0 - MWJava_Output_genManifest0 - MWJava_Output_trunctypeFront - MWJava_Output_deleteClasses0 - MWJava_Output_consoleApp1 - - - MWJava_Proj_projtypeApplet - MWJava_Proj_mainClassName - MWJava_Proj_HTMLAppCreator1463898714 - MWJava_Proj_HTMLAppName - MWJava_Proj_PathVersion0 - MWJava_Proj_PathType0 - MWJava_Proj_PathFormat0 - MWJava_Proj_tree - MWJava_Proj_HTMLAppWin32Name - MWJava_Proj_compress0 - MWJava_Proj_useVM1 - MWJava_Proj_vmarguments - MWJava_Proj_vmName - MWJava_Proj_simPropFile - - - MWJavaDoc_Proj_Version1 - MWJavaDoc_Proj_Depricated1 - MWJavaDoc_Proj_Author1 - MWJavaDoc_Proj_Index1 - MWJavaDoc_Proj_Tree1 - MWJavaDoc_Proj_SunResolveToSame0 - MWJavaDoc_Proj_Shortnames1 - MWJavaDoc_Proj_Folder0 - MWJavaDoc_Proj_GenerateAPILinks0 - MWJavaDoc_Proj_scopePublic - MWJavaDoc_Proj_fcreator1297303877 - MWJavaDoc_Proj_encodingName - MWJavaDoc_Proj_decodingName - MWJavaDoc_Proj_javaPackagePathhttp://java.sun.com/products/jdk/1.1/docs/api/ - - - MWMerge_MacOS_projectTypeApplication - MWMerge_MacOS_outputNameMerge Out - MWMerge_MacOS_outputCreator???? - MWMerge_MacOS_outputTypeAPPL - MWMerge_MacOS_suppressWarning0 - MWMerge_MacOS_copyFragments1 - MWMerge_MacOS_copyResources1 - MWMerge_MacOS_flattenResource0 - MWMerge_MacOS_flatFileNamea.rsrc - MWMerge_MacOS_flatFileOutputPath - Path: - PathFormatMacOS - PathRootProject - - MWMerge_MacOS_skipResources - DLGX - ckid - Proj - WSPC - - - - FileLockedfalse - ResourcesMapIsReadOnlyfalse - PrinterDriverIsMultiFinderCompatiblefalse - Invisiblefalse - HasBundlefalse - NameLockedfalse - Stationeryfalse - HasCustomIconfalse - Sharedfalse - HasBeenInitedfalse - Label0 - Comments - - - MWMacOSPackager_UsePackager0 - MWMacOSPackager_FolderToPackage - Path: - PathFormatMacOS - PathRootProject - - MWMacOSPackager_CreateClassicAlias0 - MWMacOSPackager_ClassicAliasMethodUseTargetOutput - MWMacOSPackager_ClassicAliasPath - Path: - PathFormatMacOS - PathRootProject - - MWMacOSPackager_CreatePkgInfo0 - MWMacOSPackager_PkgCreatorType???? - MWMacOSPackager_PkgFileTypeAPPL - - - MWCodeGen_PPC_structalignmentMC68K - MWCodeGen_PPC_tracebacktablesNone - MWCodeGen_PPC_processorGeneric - MWCodeGen_PPC_readonlystrings0 - MWCodeGen_PPC_tocdata1 - MWCodeGen_PPC_profiler0 - MWCodeGen_PPC_fpcontract1 - MWCodeGen_PPC_schedule0 - MWCodeGen_PPC_peephole1 - MWCodeGen_PPC_processorspecific0 - MWCodeGen_PPC_altivec0 - MWCodeGen_PPC_vectortocdata0 - MWCodeGen_PPC_vrsave0 - - - MWCodeGen_MachO_structalignmentPPC - MWCodeGen_MachO_tracebacktablesNone - MWCodeGen_MachO_processorGeneric - MWCodeGen_MachO_readonlystrings0 - MWCodeGen_MachO_profiler0 - MWCodeGen_MachO_fpcontract1 - MWCodeGen_MachO_schedule0 - MWCodeGen_MachO_peephole1 - MWCodeGen_MachO_processorspecific0 - MWCodeGen_MachO_altivec0 - MWCodeGen_MachO_vrsave1 - MWCodeGen_MachO_common0 - MWCodeGen_MachO_implicit_templates1 - - - MWDisassembler_PPC_showcode1 - MWDisassembler_PPC_extended1 - MWDisassembler_PPC_mix0 - MWDisassembler_PPC_nohex0 - MWDisassembler_PPC_showdata1 - MWDisassembler_PPC_showexceptions1 - MWDisassembler_PPC_showsym0 - MWDisassembler_PPC_shownames1 - - - GlobalOptimizer_PPC_optimizationlevelLevel0 - GlobalOptimizer_PPC_optforSpeed - - - MWLinker_PPC_linksym1 - MWLinker_PPC_symfullpath1 - MWLinker_PPC_linkmap0 - MWLinker_PPC_nolinkwarnings0 - MWLinker_PPC_dontdeadstripinitcode0 - MWLinker_PPC_permitmultdefs0 - MWLinker_PPC_linkmodeFast - MWLinker_PPC_initname - MWLinker_PPC_mainname__start - MWLinker_PPC_termname - - - MWLinker_MachO_exportsNone - MWLinker_MachO_mainnamestart - MWLinker_MachO_currentversion0 - MWLinker_MachO_compatibleversion0 - MWLinker_MachO_symfullpath0 - MWLinker_MachO_supresswarnings0 - MWLinker_MachO_multisymerror0 - MWLinker_MachO_prebind1 - MWLinker_MachO_deadstrip1 - MWLinker_MachO_objectivecsemantics0 - MWLinker_MachO_whichfileloaded0 - MWLinker_MachO_whyfileloaded0 - MWLinker_MachO_readonlyrelocsErrors - MWLinker_MachO_undefinedsymbolsErrors - MWLinker_MachO_twolevelnamespace1 - MWLinker_MachO_stripdebugsymbols0 - - - MWProject_MachO_typeExecutable - MWProject_MachO_outfilea.exe - MWProject_MachO_filecreator???? - MWProject_MachO_filetypeMEXE - MWProject_MachO_stacksize64 - MWProject_MachO_stackaddress0 - MWProject_MachO_flatrsrc1 - MWProject_MachO_flatrsrcfilenamea.rsrc - MWProject_MachO_flatrsrcoutputdir - Path: - PathFormatMacOS - PathRootProject - - MWProject_MachO_installpath./ - - - MWPEF_exportsNone - MWPEF_libfolder0 - MWPEF_sortcodeNone - MWPEF_expandbss0 - MWPEF_sharedata0 - MWPEF_olddefversion0 - MWPEF_oldimpversion0 - MWPEF_currentversion0 - MWPEF_fragmentname - MWPEF_collapsereloads0 - - - MWProject_PPC_typeApplication - MWProject_PPC_outfilea.out - MWProject_PPC_filecreator???? - MWProject_PPC_filetypeAPPL - MWProject_PPC_size384 - MWProject_PPC_minsize384 - MWProject_PPC_stacksize64 - MWProject_PPC_flags22720 - MWProject_PPC_symfilename - MWProject_PPC_rsrcname - MWProject_PPC_rsrcheaderNative - MWProject_PPC_rsrctype???? - MWProject_PPC_rsrcid0 - MWProject_PPC_rsrcflags0 - MWProject_PPC_rsrcstore0 - MWProject_PPC_rsrcmerge0 - MWProject_PPC_flatrsrc0 - MWProject_PPC_flatrsrcoutputdir - Path: - PathFormatMacOS - PathRootProject - - MWProject_PPC_flatrsrcfilename - - - MWAssembler_PPC_auxheader0 - MWAssembler_PPC_symmodeMac - MWAssembler_PPC_dialectPPC - MWAssembler_PPC_prefixfile - MWAssembler_PPC_typecheck0 - MWAssembler_PPC_warnings0 - MWAssembler_PPC_casesensitive0 - - - MWRez_Language_maxwidth80 - MWRez_Language_scriptRoman - MWRez_Language_alignmentAlign1 - MWRez_Language_filtermodeFilterSkip - MWRez_Language_suppresswarnings0 - MWRez_Language_escapecontrolchars1 - MWRez_Language_prefixname - MWRez_Language_filteredtypes'CODE' 'DATA' 'PICT' - - - MWWinRC_prefixname - - - MWCodeGen_X86_processorGeneric - MWCodeGen_X86_alignmentbytes8 - MWCodeGen_X86_exceptionsZeroOverhead - MWCodeGen_X86_extinst_mmx0 - MWCodeGen_X86_extinst_3dnow0 - MWCodeGen_X86_use_mmx_3dnow_convention0 - MWCodeGen_X86_machinecodelisting0 - MWCodeGen_X86_intrinsics0 - MWCodeGen_X86_syminfo0 - MWCodeGen_X86_codeviewinfo1 - MWCodeGen_X86_extinst_cmov_fcomi0 - MWCodeGen_X86_extinst_sse0 - - - PDisasmX86_showHeaderstrue - PDisasmX86_showSymTabtrue - PDisasmX86_showCodetrue - PDisasmX86_showSourcefalse - PDisasmX86_showHextrue - PDisasmX86_showRelocationtrue - PDisasmX86_showCommentsfalse - PDisasmX86_showDebugfalse - PDisasmX86_showExceptionsfalse - PDisasmX86_showDatatrue - PDisasmX86_showRawfalse - PDisasmX86_verbosefalse - - - MWDebugger_X86_Exceptions - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - GlobalOptimizer_X86_optimizationlevelLevel0 - GlobalOptimizer_X86_optforSpeed - - - MWLinker_X86_entrypointusageDefault - MWLinker_X86_entrypoint - MWLinker_X86_subsystemWinGUI - MWLinker_X86_subsysmajorid4 - MWLinker_X86_subsysminorid0 - MWLinker_X86_usrmajorid0 - MWLinker_X86_usrminorid0 - MWLinker_X86_commandfile - MWLinker_X86_generatemap0 - MWLinker_X86_linksym0 - MWLinker_X86_linkCV1 - - - MWProject_X86_typeApplication - MWProject_X86_outfilenoname.exe - MWProject_X86_baseaddress4194304 - MWProject_X86_maxstacksize1024 - MWProject_X86_minstacksize4 - MWProject_X86_size1024 - MWProject_X86_minsize4 - MWProject_X86_importlib - xpidl Settings - 0001000101001A6E7353637269707461626C65506C7567696E2E686561646572 - 7300000000000000 - - - - - Name - nsIScriptablePlugin.idl - MacOS - Text - - - - - - Name - nsIScriptablePlugin.idl - MacOS - - - - - ScriptablePlugin.xpt - - - - UserSourceTrees - - - AlwaysSearchUserPathsfalse - InterpretDOSAndUnixPathsfalse - RequireFrameworkStyleIncludesfalse - UserSearchPaths - - SearchPath - Path: - PathFormatMacOS - PathRootProject - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SearchPath - Path::::IDL: - PathFormatMacOS - PathRootProject - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SearchPath - Path:: - PathFormatMacOS - PathRootProject - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SystemSearchPaths - - SearchPath - Path: - PathFormatMacOS - PathRootCodeWarrior - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - - - MWRuntimeSettings_WorkingDirectory - MWRuntimeSettings_CommandLine - MWRuntimeSettings_HostApplication - Path - PathFormatGeneric - PathRootAbsolute - - MWRuntimeSettings_EnvVars - - - Linkerxpt Linker - PreLinker - PostLinker - TargetnameScriptablePlugin.xpt - OutputDirectory - Path: - PathFormatMacOS - PathRootProject - - SaveEntriesUsingRelativePathsfalse - - - FileMappings - - FileTypeRSRC - FileExtension - CompilerRez - EditLanguage - Precompilefalse - Launchabletrue - ResourceFiletrue - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.bh - CompilerBalloon Help - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.c - CompilerRunTSScript - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.idl - Compilerxpidl - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.r - CompilerRez - EditLanguageRez - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypersrc - FileExtension - CompilerRez - EditLanguage - Precompilefalse - Launchabletrue - ResourceFiletrue - IgnoredByMakefalse - - - FileExtension.xpt - Compiler - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - - - CacheModDatestrue - ActivateBrowsertrue - DumpBrowserInfofalse - CacheSubprojectstrue - UseThirdPartyDebuggerfalse - DebuggerAppPath - Path - PathFormatGeneric - PathRootAbsolute - - DebuggerCmdLineArgs - DebuggerWorkingDir - Path - PathFormatGeneric - PathRootAbsolute - - - - LogSystemMessagestrue - AutoTargetDLLsfalse - StopAtWatchpointstrue - PauseWhileRunningfalse - PauseInterval5 - PauseUIFlags0 - AltExePath - Path - PathFormatGeneric - PathRootAbsolute - - StopAtTempBPOnLaunchtrue - CacheSymbolicstrue - TempBPFunctionNamemain - TempBPType0 - - - Enabledfalse - ConnectionName - DownloadPath - LaunchRemoteAppfalse - RemoteAppPath - - - OtherExecutables - - - CustomColor1 - Red0 - Green32767 - Blue0 - - CustomColor2 - Red0 - Green32767 - Blue0 - - CustomColor3 - Red0 - Green32767 - Blue0 - - CustomColor4 - Red0 - Green32767 - Blue0 - - - - MWFrontEnd_C_cplusplus0 - MWFrontEnd_C_checkprotos0 - MWFrontEnd_C_arm0 - MWFrontEnd_C_trigraphs0 - MWFrontEnd_C_onlystdkeywords0 - MWFrontEnd_C_enumsalwaysint0 - MWFrontEnd_C_mpwpointerstyle0 - MWFrontEnd_C_prefixname - MWFrontEnd_C_ansistrict0 - MWFrontEnd_C_mpwcnewline0 - MWFrontEnd_C_wchar_type1 - MWFrontEnd_C_enableexceptions1 - MWFrontEnd_C_dontreusestrings0 - MWFrontEnd_C_poolstrings0 - MWFrontEnd_C_dontinline0 - MWFrontEnd_C_useRTTI1 - MWFrontEnd_C_multibyteaware0 - MWFrontEnd_C_unsignedchars0 - MWFrontEnd_C_autoinline0 - MWFrontEnd_C_booltruefalse1 - MWFrontEnd_C_direct_to_som0 - MWFrontEnd_C_som_env_check0 - MWFrontEnd_C_alwaysinline0 - MWFrontEnd_C_inlinelevel0 - MWFrontEnd_C_ecplusplus0 - MWFrontEnd_C_objective_c0 - MWFrontEnd_C_defer_codegen0 - - - MWWarning_C_warn_illpragma0 - MWWarning_C_warn_emptydecl0 - MWWarning_C_warn_possunwant0 - MWWarning_C_warn_unusedvar0 - MWWarning_C_warn_unusedarg0 - MWWarning_C_warn_extracomma0 - MWWarning_C_pedantic0 - MWWarning_C_warningerrors0 - MWWarning_C_warn_hidevirtual0 - MWWarning_C_warn_implicitconv0 - MWWarning_C_warn_notinlined0 - MWWarning_C_warn_structclass0 - - - MWFTP_Post_hostName - MWFTP_Post_username - MWFTP_Post_password0 - MWFTP_Post_remoteDir - MWFTP_Post_ftp_PathVersion0 - MWFTP_Post_ftp_PathType0 - MWFTP_Post_ftp_PathFormat0 - MWFTP_Post_ftp_tree - MWFTP_Post_uploadDir - MWFTP_Post_ftp_port21 - MWFTP_Post_SendBin1 - MWFTP_Post_ShouldLog1 - - - MWCommandLine_Java_clsName - MWCommandLine_Java_args - - - MWVJavaDebugging_Protocol1 - MWVJavaDebugging_JDKVersion1 - MWVJavaDebugging_TimeOut10 - MWVJavaDebugging_SupportSlowDevicesfalse - - - MWJava_Language_optimizefalse - MWJava_Language_warnDeprecatedfalse - MWJava_Language_emitMapfalse - MWJava_Language_strictFileNamesfalse - MWJava_Language_strictFileHierarchyfalse - MWJava_Language_1_1_Compatiblefalse - MWJava_Language_emitHeaders0 - MWJava_Language_headerTypeJNINativeHeaders - MWJava_Language_packageFilter - MWJava_Language_genCommentstrue - MWJava_Language_genHeadersfalse - - - MWJava_MRJAppBuilder_outFileMRJApplication - MWJava_MRJAppBuilder_mergefalse - MWJava_MRJAppBuilder_quitMenutrue - MWJava_MRJAppBuilder_growfalse - MWJava_MRJAppBuilder_stdoutTypeConsole - MWJava_MRJAppBuilder_stderrTypeConsole - MWJava_MRJAppBuilder_stdinTypeConsole - MWJava_MRJAppBuilder_appIconPVersion0 - MWJava_MRJAppBuilder_appIconPType0 - MWJava_MRJAppBuilder_appIconPFormat0 - MWJava_MRJAppBuilder_appIconPTree - MWJava_MRJAppBuilder_appIconFile - MWJava_MRJAppBuilder_splashScreenPVersion0 - MWJava_MRJAppBuilder_splashScreenPType0 - MWJava_MRJAppBuilder_splashScreenPFormat0 - MWJava_MRJAppBuilder_splashScreenPTree - MWJava_MRJAppBuilder_splashScreenPICTFile - MWJava_MRJAppBuilder_aboutName - MWJava_MRJAppBuilder_stdoutPVersion0 - MWJava_MRJAppBuilder_stdoutPType0 - MWJava_MRJAppBuilder_stdoutPFormat0 - MWJava_MRJAppBuilder_stdoutPTree - MWJava_MRJAppBuilder_stdoutFile - MWJava_MRJAppBuilder_stdoutAppendfalse - MWJava_MRJAppBuilder_stderrPType0 - MWJava_MRJAppBuilder_stderrPFormat0 - MWJava_MRJAppBuilder_stderrPTree - MWJava_MRJAppBuilder_stderrFile - MWJava_MRJAppBuilder_stderrAppendfalse - MWJava_MRJAppBuilder_stdinPType0 - MWJava_MRJAppBuilder_stdinPFormat0 - MWJava_MRJAppBuilder_stdinPTree - MWJava_MRJAppBuilder_stdinFile - - - MWJava_Output_outputtypeJarFile - MWJava_Output_outfileJavaClasses.jar - MWJava_Output_ftype1514754080 - MWJava_Output_fcreator1297570384 - MWJava_Output_compress0 - MWJava_Output_genManifest0 - MWJava_Output_trunctypeFront - MWJava_Output_deleteClasses0 - MWJava_Output_consoleApp1 - - - MWJava_Proj_projtypeApplet - MWJava_Proj_mainClassName - MWJava_Proj_HTMLAppCreator1463898714 - MWJava_Proj_HTMLAppName - MWJava_Proj_PathVersion0 - MWJava_Proj_PathType0 - MWJava_Proj_PathFormat0 - MWJava_Proj_tree - MWJava_Proj_HTMLAppWin32Name - MWJava_Proj_compress0 - MWJava_Proj_useVM1 - MWJava_Proj_vmarguments - MWJava_Proj_vmName - MWJava_Proj_simPropFile - - - MWJavaDoc_Proj_Version1 - MWJavaDoc_Proj_Depricated1 - MWJavaDoc_Proj_Author1 - MWJavaDoc_Proj_Index1 - MWJavaDoc_Proj_Tree1 - MWJavaDoc_Proj_SunResolveToSame0 - MWJavaDoc_Proj_Shortnames1 - MWJavaDoc_Proj_Folder0 - MWJavaDoc_Proj_GenerateAPILinks0 - MWJavaDoc_Proj_scopePublic - MWJavaDoc_Proj_fcreator1297303877 - MWJavaDoc_Proj_encodingName - MWJavaDoc_Proj_decodingName - MWJavaDoc_Proj_javaPackagePathhttp://java.sun.com/products/jdk/1.1/docs/api/ - - - MWMerge_MacOS_projectTypeApplication - MWMerge_MacOS_outputNameMerge Out - MWMerge_MacOS_outputCreator???? - MWMerge_MacOS_outputTypeAPPL - MWMerge_MacOS_suppressWarning0 - MWMerge_MacOS_copyFragments1 - MWMerge_MacOS_copyResources1 - MWMerge_MacOS_flattenResource0 - MWMerge_MacOS_flatFileNamea.rsrc - MWMerge_MacOS_flatFileOutputPath - Path: - PathFormatMacOS - PathRootProject - - MWMerge_MacOS_skipResources - DLGX - ckid - Proj - WSPC - - - - FileLockedfalse - ResourcesMapIsReadOnlyfalse - PrinterDriverIsMultiFinderCompatiblefalse - Invisiblefalse - HasBundlefalse - NameLockedfalse - Stationeryfalse - HasCustomIconfalse - Sharedfalse - HasBeenInitedfalse - Label0 - Comments - - - MWMacOSPackager_UsePackager0 - MWMacOSPackager_FolderToPackage - Path: - PathFormatMacOS - PathRootProject - - MWMacOSPackager_CreateClassicAlias0 - MWMacOSPackager_ClassicAliasMethodUseTargetOutput - MWMacOSPackager_ClassicAliasPath - Path: - PathFormatMacOS - PathRootProject - - MWMacOSPackager_CreatePkgInfo0 - MWMacOSPackager_PkgCreatorType???? - MWMacOSPackager_PkgFileTypeAPPL - - - MWCodeGen_PPC_structalignmentMC68K - MWCodeGen_PPC_tracebacktablesNone - MWCodeGen_PPC_processorGeneric - MWCodeGen_PPC_readonlystrings0 - MWCodeGen_PPC_tocdata1 - MWCodeGen_PPC_profiler0 - MWCodeGen_PPC_fpcontract1 - MWCodeGen_PPC_schedule0 - MWCodeGen_PPC_peephole1 - MWCodeGen_PPC_processorspecific0 - MWCodeGen_PPC_altivec0 - MWCodeGen_PPC_vectortocdata0 - MWCodeGen_PPC_vrsave0 - - - MWCodeGen_MachO_structalignmentPPC - MWCodeGen_MachO_tracebacktablesNone - MWCodeGen_MachO_processorGeneric - MWCodeGen_MachO_readonlystrings0 - MWCodeGen_MachO_profiler0 - MWCodeGen_MachO_fpcontract1 - MWCodeGen_MachO_schedule0 - MWCodeGen_MachO_peephole1 - MWCodeGen_MachO_processorspecific0 - MWCodeGen_MachO_altivec0 - MWCodeGen_MachO_vrsave1 - MWCodeGen_MachO_common0 - MWCodeGen_MachO_implicit_templates1 - - - MWDisassembler_PPC_showcode1 - MWDisassembler_PPC_extended1 - MWDisassembler_PPC_mix0 - MWDisassembler_PPC_nohex0 - MWDisassembler_PPC_showdata1 - MWDisassembler_PPC_showexceptions1 - MWDisassembler_PPC_showsym0 - MWDisassembler_PPC_shownames1 - - - GlobalOptimizer_PPC_optimizationlevelLevel0 - GlobalOptimizer_PPC_optforSpeed - - - MWLinker_PPC_linksym1 - MWLinker_PPC_symfullpath1 - MWLinker_PPC_linkmap0 - MWLinker_PPC_nolinkwarnings0 - MWLinker_PPC_dontdeadstripinitcode0 - MWLinker_PPC_permitmultdefs0 - MWLinker_PPC_linkmodeFast - MWLinker_PPC_initname - MWLinker_PPC_mainname__start - MWLinker_PPC_termname - - - MWLinker_MachO_exportsNone - MWLinker_MachO_mainnamestart - MWLinker_MachO_currentversion0 - MWLinker_MachO_compatibleversion0 - MWLinker_MachO_symfullpath0 - MWLinker_MachO_supresswarnings0 - MWLinker_MachO_multisymerror0 - MWLinker_MachO_prebind1 - MWLinker_MachO_deadstrip1 - MWLinker_MachO_objectivecsemantics0 - MWLinker_MachO_whichfileloaded0 - MWLinker_MachO_whyfileloaded0 - MWLinker_MachO_readonlyrelocsErrors - MWLinker_MachO_undefinedsymbolsErrors - MWLinker_MachO_twolevelnamespace1 - MWLinker_MachO_stripdebugsymbols0 - - - MWProject_MachO_typeExecutable - MWProject_MachO_outfilea.exe - MWProject_MachO_filecreator???? - MWProject_MachO_filetypeMEXE - MWProject_MachO_stacksize64 - MWProject_MachO_stackaddress0 - MWProject_MachO_flatrsrc1 - MWProject_MachO_flatrsrcfilenamea.rsrc - MWProject_MachO_flatrsrcoutputdir - Path: - PathFormatMacOS - PathRootProject - - MWProject_MachO_installpath./ - - - MWPEF_exportsNone - MWPEF_libfolder0 - MWPEF_sortcodeNone - MWPEF_expandbss0 - MWPEF_sharedata0 - MWPEF_olddefversion0 - MWPEF_oldimpversion0 - MWPEF_currentversion0 - MWPEF_fragmentname - MWPEF_collapsereloads0 - - - MWProject_PPC_typeApplication - MWProject_PPC_outfilea.out - MWProject_PPC_filecreator???? - MWProject_PPC_filetypeAPPL - MWProject_PPC_size384 - MWProject_PPC_minsize384 - MWProject_PPC_stacksize64 - MWProject_PPC_flags22720 - MWProject_PPC_symfilename - MWProject_PPC_rsrcname - MWProject_PPC_rsrcheaderNative - MWProject_PPC_rsrctype???? - MWProject_PPC_rsrcid0 - MWProject_PPC_rsrcflags0 - MWProject_PPC_rsrcstore0 - MWProject_PPC_rsrcmerge0 - MWProject_PPC_flatrsrc0 - MWProject_PPC_flatrsrcoutputdir - Path: - PathFormatMacOS - PathRootProject - - MWProject_PPC_flatrsrcfilename - - - MWAssembler_PPC_auxheader0 - MWAssembler_PPC_symmodeMac - MWAssembler_PPC_dialectPPC - MWAssembler_PPC_prefixfile - MWAssembler_PPC_typecheck0 - MWAssembler_PPC_warnings0 - MWAssembler_PPC_casesensitive0 - - - MWRez_Language_maxwidth80 - MWRez_Language_scriptRoman - MWRez_Language_alignmentAlign1 - MWRez_Language_filtermodeFilterSkip - MWRez_Language_suppresswarnings0 - MWRez_Language_escapecontrolchars1 - MWRez_Language_prefixname - MWRez_Language_filteredtypes'CODE' 'DATA' 'PICT' - - - MWWinRC_prefixname - - - MWCodeGen_X86_processorGeneric - MWCodeGen_X86_alignmentbytes8 - MWCodeGen_X86_exceptionsZeroOverhead - MWCodeGen_X86_extinst_mmx0 - MWCodeGen_X86_extinst_3dnow0 - MWCodeGen_X86_use_mmx_3dnow_convention0 - MWCodeGen_X86_machinecodelisting0 - MWCodeGen_X86_intrinsics0 - MWCodeGen_X86_syminfo0 - MWCodeGen_X86_codeviewinfo1 - MWCodeGen_X86_extinst_cmov_fcomi0 - MWCodeGen_X86_extinst_sse0 - - - PDisasmX86_showHeaderstrue - PDisasmX86_showSymTabtrue - PDisasmX86_showCodetrue - PDisasmX86_showSourcefalse - PDisasmX86_showHextrue - PDisasmX86_showRelocationtrue - PDisasmX86_showCommentsfalse - PDisasmX86_showDebugfalse - PDisasmX86_showExceptionsfalse - PDisasmX86_showDatatrue - PDisasmX86_showRawfalse - PDisasmX86_verbosefalse - - - MWDebugger_X86_Exceptions - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - GlobalOptimizer_X86_optimizationlevelLevel0 - GlobalOptimizer_X86_optforSpeed - - - MWLinker_X86_entrypointusageDefault - MWLinker_X86_entrypoint - MWLinker_X86_subsystemWinGUI - MWLinker_X86_subsysmajorid4 - MWLinker_X86_subsysminorid0 - MWLinker_X86_usrmajorid0 - MWLinker_X86_usrminorid0 - MWLinker_X86_commandfile - MWLinker_X86_generatemap0 - MWLinker_X86_linksym0 - MWLinker_X86_linkCV1 - - - MWProject_X86_typeApplication - MWProject_X86_outfilenoname.exe - MWProject_X86_baseaddress4194304 - MWProject_X86_maxstacksize1024 - MWProject_X86_minstacksize4 - MWProject_X86_size1024 - MWProject_X86_minsize4 - MWProject_X86_importlib - xpidl Settings - 0001000301001453637269707461626C65506C7567696E2E7870747474707474 - 0000000000000000 - - - - - Name - nsIScriptablePlugin.idl - MacOS - Text - - - - - - Name - nsIScriptablePlugin.idl - MacOS - - - - - - - ScriptablePlugin.headers - ScriptablePlugin.xpt - - - - - ScriptablePlugin.headers - Name - nsIScriptablePlugin.idl - MacOS - - - - diff --git a/modules/plugin/sdk/samples/scriptable/readme.txt b/modules/plugin/sdk/samples/scriptable/readme.txt new file mode 100644 index 000000000000..5b4dbb1bf7fa --- /dev/null +++ b/modules/plugin/sdk/samples/scriptable/readme.txt @@ -0,0 +1,3 @@ +Scriptable Plugin + +This sample plugin can be scripted, JavaScript can call into the plugin via NPRuntime. diff --git a/modules/plugin/sdk/samples/simple/Makefile.in b/modules/plugin/sdk/samples/simple/Makefile.in deleted file mode 100644 index f3f657cd0fb8..000000000000 --- a/modules/plugin/sdk/samples/simple/Makefile.in +++ /dev/null @@ -1,84 +0,0 @@ -# -# ***** 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) 1998 -# 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 ***** - -DEPTH = ../../../../.. -topsrcdir = @top_srcdir@ -srcdir = @srcdir@ -VPATH = @srcdir@ - -include $(DEPTH)/config/autoconf.mk - -MODULE = npsimple -LIBRARY_NAME = npsimple -IS_COMPONENT = 1 -MODULE_NAME = SimplePlugin - -# Ack! we should not be using the internal API or linking against -# MOZ_COMPONENT_LIBS! -MOZILLA_INTERNAL_API = 1 - -REQUIRES = xpcom \ - string \ - plugin \ - widget \ - $(NULL) - -# Make sure that it builds but don't install it -NO_DIST_INSTALL = 1 -NO_INSTALL = 1 - -XPIDLSRCS = nsISimplePluginInstance.idl - -CPPSRCS = npsimple.cpp - -LOCAL_INCLUDES = -I$(srcdir)/.. -I$(srcdir)/../../public -I$(XPIDL_GEN_DIR) - -EXTRA_DSO_LDOPTS += \ - -L$(DIST)/lib \ - -lgtksuperwin \ - $(MOZ_COMPONENT_LIBS) \ - $(NULL) - -include $(topsrcdir)/config/rules.mk - -CXXFLAGS += $(MOZ_TOOLKIT_REGISTRY_CFLAGS) - -libs:: - $(INSTALL) $(srcdir)/test.html $(DIST)/bin/res/samples - -install:: - $(SYSINSTALL) $(IFLAGS1) $(srcdir)/test.html $(DESTDIR)$(mozappdir)/res/samples diff --git a/modules/plugin/sdk/samples/simple/npsimple.cpp b/modules/plugin/sdk/samples/simple/npsimple.cpp deleted file mode 100644 index 97eea6f5e162..000000000000 --- a/modules/plugin/sdk/samples/simple/npsimple.cpp +++ /dev/null @@ -1,1406 +0,0 @@ -/* -*- 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) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Pierre Phaneuf - * - * 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 ***** */ - -/******************************************************************************* - * npsimple.cpp - ****************************************************************************** - * Simple Sample Plugin - * Copyright (c) 1996 Netscape Communications. All rights reserved. - ****************************************************************************** - * OVERVIEW - * -------- - * Section 1 - Includes - * Section 2 - Instance Structs - * Section 3 - API Plugin Implementations - * Section 4 - Utility Method Implementations - *******************************************************************************/ - -/******************************************************************************* - * SECTION 1 - Includes - ******************************************************************************/ -#include -#include -#include "nsplugin.h" -#include "nsIServiceManager.h" -#include "nsISupports.h" -#include "nsIFactory.h" -#include "nsIGenericFactory.h" -#include "nsMemory.h" -#include "nsString.h" -#include "simpleCID.h" - -#include "nsISimplePluginInstance.h" -#include "nsIScriptablePlugin.h" - -/*------------------------------------------------------------------------------ - * Windows Includes - *----------------------------------------------------------------------------*/ -#ifdef _WINDOWS /* Windows Includes */ -#include -#endif /* _WINDOWS */ -/*------------------------------------------------------------------------------ - * UNIX includes - *----------------------------------------------------------------------------*/ -#ifdef XP_UNIX -#include -#include -#include -#include -#include -#endif /* XP_UNIX */ - -#ifdef XP_UNIX - -gboolean draw (GtkWidget *widget, GdkEventExpose *event, gpointer data); - -#endif - - -/******************************************************************************* - * SECTION 2 - Instance Structs - ******************************************************************************* - * Instance state information about the plugin. - * - * PLUGIN DEVELOPERS: - * Use this struct to hold per-instance information that you'll - * need in the various functions in this file. - ****************************************************************************** - * First comes the PlatformInstance struct, which contains platform specific - * information for each instance. - *****************************************************************************/ - -/*------------------------------------------------------------------------------ - * Windows PlatformInstance - *----------------------------------------------------------------------------*/ - -#if defined(XP_WIN) // XXXX OS2TODO -typedef struct _PlatformInstance -{ - HWND fhWnd; - WNDPROC fDefaultWindowProc; -} PlatformInstance; - -/*------------------------------------------------------------------------------ - * UNIX PlatformInstance - *----------------------------------------------------------------------------*/ - -#elif defined(XP_UNIX) -typedef struct _PlatformInstance -{ - Window window; - GtkWidget *moz_box; - GdkSuperWin *superwin; - GtkWidget *label; - Display * display; - uint32 x, y; - uint32 width, height; -} PlatformInstance; - -/*------------------------------------------------------------------------------ - * Macintosh PlatformInstance - *----------------------------------------------------------------------------*/ - -#elif defined(XP_MAC) -typedef struct _PlatformInstance -{ - int placeholder; -} PlatformInstance; - -/*------------------------------------------------------------------------------ - * Stub PlatformInstance - *----------------------------------------------------------------------------*/ - -#else -typedef struct _PlatformInstance -{ - int placeholder; -} PlatformInstance; -#endif /* end Section 2 */ - - -// Define constants for easy use -static NS_DEFINE_CID(kSimplePluginCID, NS_SIMPLEPLUGIN_CID); -static NS_DEFINE_CID(kPluginManagerCID, NS_PLUGINMANAGER_CID); - -#define PLUGIN_MIME_TYPE "application/x-simple" - -static const char kPluginName[] = "Simple Sample Plug-in"; -static const char kPluginDescription[] = "Demonstrates a simple plug-in."; - -static const char* kMimeTypes[] = { - PLUGIN_MIME_TYPE -}; - -static const char* kMimeDescriptions[] = { - "Simple Sample Plug-in" -}; - -static const char* kFileExtensions[] = { - "smp" -}; - -static const PRInt32 kNumMimeTypes = sizeof(kMimeTypes) / sizeof(*kMimeTypes); - - - -//////////////////////////////////////////////////////////////////////////////// -// Simple Plugin Classes -//////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////// -// SimplePluginInstance represents an instance of the simple plugin class. - -class SimplePluginInstance : - public nsIPluginInstance, - public nsIScriptablePlugin, - public nsISimplePluginInstance { - -public: - //////////////////////////////////////////////////////////////////////////// - // for implementing a generic module - static NS_METHOD - Create(nsISupports* aOuter, REFNSIID aIID, void** aResult); - - static NS_METHOD - RegisterSelf(nsIComponentManager* aCompMgr, - nsIFile* aPath, - const char* aRegistryLocation, - const char* aComponentType, - const nsModuleComponentInfo *info); - - static NS_METHOD - UnregisterSelf(nsIComponentManager* aCompMgr, - nsIFile* aPath, - const char* aRegistryLocation, - const nsModuleComponentInfo *info); - - - NS_DECL_ISUPPORTS - NS_DECL_NSISCRIPTABLEPLUGIN - NS_DECL_NSISIMPLEPLUGININSTANCE - - //////////////////////////////////////////////////////////////////////////// - // from nsIEventHandler: - - // (Corresponds to NPP_HandleEvent.) - // Note that for Unix and Mac the nsPluginEvent structure is different - // from the old NPEvent structure -- it's no longer the native event - // record, but is instead a struct. This was done for future extensibility, - // and so that the Mac could receive the window argument too. For Windows - // and OS2, it's always been a struct, so there's no change for them. - NS_IMETHOD - HandleEvent(nsPluginEvent* event, PRBool* handled); - - //////////////////////////////////////////////////////////////////////////// - // from nsIPluginInstance: - - NS_IMETHOD - Initialize(nsIPluginInstancePeer* peer); - - // Required backpointer to the peer. - NS_IMETHOD - GetPeer(nsIPluginInstancePeer* *result); - - // See comment for nsIPlugin::CreateInstance, above. - NS_IMETHOD - Start(void); - - // The old NPP_Destroy call has been factored into two plugin instance - // methods: - // - // Stop -- called when the plugin instance is to be stopped (e.g. by - // displaying another plugin manager window, causing the page containing - // the plugin to become removed from the display). - // - // Destroy -- called once, before the plugin instance peer is to be - // destroyed. This method is used to destroy the plugin instance. - - NS_IMETHOD - Stop(void); - - NS_IMETHOD - Destroy(void); - - // (Corresponds to NPP_SetWindow.) - NS_IMETHOD - SetWindow(nsPluginWindow* window); - - NS_IMETHOD - NewStream(nsIPluginStreamListener** listener); - - // (Corresponds to NPP_Print.) - NS_IMETHOD - Print(nsPluginPrint* platformPrint); - - NS_IMETHOD - GetValue(nsPluginInstanceVariable variable, void *value); - - - //////////////////////////////////////////////////////////////////////////// - // SimplePluginInstance specific methods: - - SimplePluginInstance(void); - virtual ~SimplePluginInstance(void); - - void PlatformNew(void); - nsresult PlatformDestroy(void); - nsresult PlatformSetWindow(nsPluginWindow* window); - PRInt16 PlatformHandleEvent(nsPluginEvent* event); - - void SetMode(nsPluginMode mode) { fMode = mode; } - -#ifdef XP_UNIX - NS_IMETHOD Repaint(void); -#endif - -#ifdef XP_WIN - static LRESULT CALLBACK - PluginWindowProc( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); -#endif - - char* fText; - -protected: - nsIPluginInstancePeer* fPeer; - nsPluginWindow* fWindow; - nsPluginMode fMode; - PlatformInstance fPlatform; -}; - -//////////////////////////////////////////////////////////////////////////////// -// SimplePluginStream represents the stream used by SimplePluginInstances -// to receive data from the browser. - -class SimplePluginStreamListener : public nsIPluginStreamListener { -public: - - NS_DECL_ISUPPORTS - - //////////////////////////////////////////////////////////////////////////// - // from nsIPluginStreamListener: - - /** - * Notify the observer that the URL has started to load. This method is - * called only once, at the beginning of a URL load.

- * - * @return The return value is currently ignored. In the future it may be - * used to cancel the URL load.. - */ - NS_IMETHOD - OnStartBinding(nsIPluginStreamInfo* pluginInfo); - - /** - * Notify the client that data is available in the input stream. This - * method is called whenver data is written into the input stream by the - * networking library...

- * - * @param aIStream The input stream containing the data. This stream can - * be either a blocking or non-blocking stream. - * @param length The amount of data that was just pushed into the stream. - * @return The return value is currently ignored. - */ - NS_IMETHOD - OnDataAvailable(nsIPluginStreamInfo* pluginInfo, - nsIInputStream* input, - PRUint32 length); - - NS_IMETHOD - OnFileAvailable(nsIPluginStreamInfo* pluginInfo, const char* fileName); - - /** - * Notify the observer that the URL has finished loading. This method is - * called once when the networking library has finished processing the - * URL transaction initiatied via the nsINetService::Open(...) call.

- * - * This method is called regardless of whether the URL loaded successfully.

- * - * @param status Status code for the URL load. - * @param msg A text string describing the error. - * @return The return value is currently ignored. - */ - NS_IMETHOD - OnStopBinding(nsIPluginStreamInfo* pluginInfo, nsresult status); - - NS_IMETHOD - OnNotify(const char* url, nsresult status); - - NS_IMETHOD - GetStreamType(nsPluginStreamType *result); - - //////////////////////////////////////////////////////////////////////////// - // SimplePluginStreamListener specific methods: - - SimplePluginStreamListener(SimplePluginInstance* inst, const char* url); - virtual ~SimplePluginStreamListener(void); - -protected: - const char* fMessageName; -}; - -/******************************************************************************* - * SECTION 3 - API Plugin Implementations - ******************************************************************************/ - -// XXXwaterson document! -static const nsModuleComponentInfo gComponentInfo[] = { - { "Simple Plugin", - NS_SIMPLEPLUGIN_CID, - NS_INLINE_PLUGIN_CONTRACTID_PREFIX PLUGIN_MIME_TYPE, - SimplePluginInstance::Create, - SimplePluginInstance::RegisterSelf, - SimplePluginInstance::UnregisterSelf }, -}; - -NS_IMPL_NSGETMODULE(SimplePlugin, gComponentInfo) - - - -//////////////////////////////////////////////////////////////////////////////// -// nsIScriptablePlugin methods -//////////////////////////////////////////////////////////////////////////////// -NS_METHOD -SimplePluginInstance::GetScriptablePeer(void **aScriptablePeer) -{ - // We implement the interface we want to be scriptable by - // (nsISimplePluginInstance) so we just return this. - - // NOTE if this function returns something other than - // nsIPluginInstance, then that object will also need to implement - // nsISecurityCheckedComponent to be scriptable. The security - // system knows to special-case nsIPluginInstance when checking - // security, but in general, XPCOM components must implement - // nsISecurityCheckedComponent to be scriptable from content - // javascript. - - *aScriptablePeer = static_cast(this); - NS_ADDREF(static_cast(*aScriptablePeer)); - return NS_OK; -} - -NS_METHOD -SimplePluginInstance::GetScriptableInterface(nsIID **aScriptableInterface) -{ - *aScriptableInterface = (nsIID *)nsMemory::Alloc(sizeof(nsIID)); - NS_ENSURE_TRUE(*aScriptableInterface, NS_ERROR_OUT_OF_MEMORY); - - **aScriptableInterface = NS_GET_IID(nsISimplePluginInstance); - - return NS_OK; -} - -//////////////////////////////////////////////////////////////////////////////// -// SimplePluginInstance Methods -//////////////////////////////////////////////////////////////////////////////// - -NS_METHOD -SimplePluginInstance::Create(nsISupports* aOuter, REFNSIID aIID, void** aResult) -{ - NS_PRECONDITION(aOuter == nsnull, "no aggregation"); - if (aOuter) - return NS_ERROR_NO_AGGREGATION; - - SimplePluginInstance* plugin = new SimplePluginInstance(); - if (! plugin) - return NS_ERROR_OUT_OF_MEMORY; - - nsresult rv; - NS_ADDREF(plugin); - rv = plugin->QueryInterface(aIID, aResult); - NS_RELEASE(plugin); - return rv; -} - -NS_METHOD -SimplePluginInstance::RegisterSelf(nsIComponentManager* aCompMgr, - nsIFile* aPath, - const char* aRegistryLocation, - const char* aComponentType, - const nsModuleComponentInfo *info) -{ - nsresult rv; - - nsIServiceManager *svcMgr; - rv = aCompMgr->QueryInterface(NS_GET_IID(nsIServiceManager), - reinterpret_cast(&svcMgr)); - if (NS_FAILED(rv)) - return rv; - - nsIPluginManager* pm; - rv = svcMgr->GetService(kPluginManagerCID, - NS_GET_IID(nsIPluginManager), - reinterpret_cast(&pm)); - NS_RELEASE(svcMgr); - - if (NS_SUCCEEDED(rv)) { - rv = pm->RegisterPlugin(kSimplePluginCID, - kPluginName, - kPluginDescription, - kMimeTypes, - kMimeDescriptions, - kFileExtensions, - kNumMimeTypes); - - NS_RELEASE(pm); - } - - return rv; -} - - -NS_METHOD -SimplePluginInstance::UnregisterSelf(nsIComponentManager* aCompMgr, - nsIFile* aPath, - const char* aRegistryLocation, - const nsModuleComponentInfo *info) -{ - nsresult rv; - - nsIServiceManager *svcMgr; - rv = aCompMgr->QueryInterface(NS_GET_IID(nsIServiceManager), - reinterpret_cast(&svcMgr)); - if (NS_FAILED(rv)) - return rv; - - nsIPluginManager* pm; - rv = svcMgr->GetService(kPluginManagerCID, - NS_GET_IID(nsIPluginManager), - reinterpret_cast(&pm)); - NS_RELEASE(svcMgr); - - if (NS_SUCCEEDED(rv)) { - rv = pm->UnregisterPlugin(kSimplePluginCID); - NS_RELEASE(pm); - } - - return rv; -} - - -SimplePluginInstance::SimplePluginInstance(void) - : fText(NULL), fPeer(NULL), fWindow(NULL), fMode(nsPluginMode_Embedded) -{ - static const char text[] = "Hello World!"; - fText = (char*) nsMemory::Clone(text, sizeof(text)); - -#ifdef XP_UNIX - fPlatform.moz_box = nsnull; - fPlatform.superwin = nsnull; - fPlatform.label = nsnull; -#endif - -} - -SimplePluginInstance::~SimplePluginInstance(void) -{ - if(fText) - nsMemory::Free(fText); - PlatformDestroy(); // Perform platform specific cleanup -} - -// These macros produce simple version of QueryInterface and AddRef. -// See the nsISupports.h header file for details. - -NS_IMPL_ISUPPORTS3(SimplePluginInstance, nsIPluginInstance, nsISimplePluginInstance, nsIScriptablePlugin) - -/*+++++++++++++++++++++++++++++++++++++++++++++++++ - * NewInstance: - * Creates a new instance of a plug-in and returns an error value. - * - * NewInstance creates a new instance of your plug-in with MIME type specified - * by pluginType. The parameter mode is NP_EMBED if the instance was created - * by an EMBED tag, or NP_FULL if the instance was created by a separate file. - * You can allocate any instance-specific private data in instance->pdata at this - * time. The NPP pointer is valid until the instance is destroyed. - +++++++++++++++++++++++++++++++++++++++++++++++++*/ - -NS_METHOD -SimplePluginInstance::Initialize(nsIPluginInstancePeer* peer) -{ -#ifdef NS_DEBUG - printf("SimplePluginInstance::Initialize\n"); -#endif - - NS_ASSERTION(peer != NULL, "null peer"); - - fPeer = peer; - nsIPluginTagInfo* taginfo; - const char* const* names = nsnull; - const char* const* values = nsnull; - PRUint16 count = 0; - nsresult result; - - peer->AddRef(); - result = peer->GetMode(&fMode); - if (NS_FAILED(result)) return result; - - result = peer->QueryInterface(NS_GET_IID(nsIPluginTagInfo), (void **)&taginfo); - - if (NS_SUCCEEDED(result)) - { - taginfo->GetAttributes(count, names, values); - NS_IF_RELEASE(taginfo); - } - -#ifdef NS_DEBUG - printf("Attribute count = %d\n", count); - - for (int i = 0; i < count; i++) - { - printf("plugin param=%s, value=%s\n", names[i], values[i]); - } -#endif - - PlatformNew(); /* Call Platform-specific initializations */ - return NS_OK; -} - -NS_METHOD -SimplePluginInstance::GetPeer(nsIPluginInstancePeer* *result) -{ -#ifdef NS_DEBUG - printf("SimplePluginInstance::GetPeer\n"); -#endif - - fPeer->AddRef(); - *result = fPeer; - return NS_OK; -} - -NS_METHOD -SimplePluginInstance::Start(void) -{ -#ifdef NS_DEBUG - printf("SimplePluginInstance::Start\n"); -#endif - - return NS_OK; -} - -NS_METHOD -SimplePluginInstance::Stop(void) -{ -#ifdef NS_DEBUG - printf("SimplePluginInstance::Stop\n"); -#endif - - return NS_OK; -} - -NS_METHOD -SimplePluginInstance::Destroy(void) -{ -#ifdef NS_DEBUG - printf("SimplePluginInstance::Destroy\n"); -#endif - - return NS_OK; -} - -/*+++++++++++++++++++++++++++++++++++++++++++++++++ - * NPP_SetWindow: - * Sets the window in which a plug-in draws, and returns an error value. - * - * NPP_SetWindow informs the plug-in instance specified by instance of the - * the window denoted by window in which the instance draws. This nsPluginWindow - * pointer is valid for the life of the instance, or until NPP_SetWindow is called - * again with a different value. Subsequent calls to NPP_SetWindow for a given - * instance typically indicate that the window has been resized. If either window - * or window->window are NULL, the plug-in must not perform any additional - * graphics operations on the window and should free any resources associated - * with the window. - +++++++++++++++++++++++++++++++++++++++++++++++++*/ - -NS_METHOD -SimplePluginInstance::SetWindow(nsPluginWindow* window) -{ -#ifdef NS_DEBUG - printf("SimplePluginInstance::SetWindow\n"); -#endif - - nsresult result; - - /* - * PLUGIN DEVELOPERS: - * Before setting window to point to the - * new window, you may wish to compare the new window - * info to the previous window (if any) to note window - * size changes, etc. - */ - result = PlatformSetWindow(window); - fWindow = window; - return result; -} - -NS_METHOD -SimplePluginInstance::NewStream(nsIPluginStreamListener** listener) -{ -#ifdef NS_DEBUG - printf("SimplePluginInstance::NewStream\n"); -#endif - - if(listener != NULL) - { - SimplePluginStreamListener* sl = - new SimplePluginStreamListener(this, "http://www.mozilla.org"); - if(!sl) - return NS_ERROR_UNEXPECTED; - sl->AddRef(); - *listener = sl; - } - - return NS_OK; -} - - -/* attribute string text; */ -NS_IMETHODIMP SimplePluginInstance::GetText(char * *aText) -{ -#ifdef NS_DEBUG - printf("SimplePluginInstance::GetText\n"); -#endif - - if(!fText) - { - *aText = NULL; - return NS_OK; - } - char* ptr = *aText = (char*) nsMemory::Clone(fText, strlen(fText)+1); - return ptr ? NS_OK : NS_ERROR_OUT_OF_MEMORY; -} -NS_IMETHODIMP SimplePluginInstance::SetText(const char * aText) -{ -#ifdef NS_DEBUG - printf("SimplePluginInstance::SetText\n"); -#endif - - if(fText) - { - nsMemory::Free(fText); - fText = NULL; - } - - if(aText) - { - fText = (char*) nsMemory::Clone(aText, strlen(aText)+1); - if(!fText) - return NS_ERROR_OUT_OF_MEMORY; - -#ifdef XP_WIN - if(fPlatform.fhWnd) { - InvalidateRect( fPlatform.fhWnd, NULL, TRUE ); - UpdateWindow( fPlatform.fhWnd ); - } -#endif - -#ifdef XP_UNIX - // force a redraw - Repaint(); -#endif - - } - - return NS_OK; -} - -/*+++++++++++++++++++++++++++++++++++++++++++++++++ - * NPP_Print: - +++++++++++++++++++++++++++++++++++++++++++++++++*/ - -NS_METHOD -SimplePluginInstance::Print(nsPluginPrint* printInfo) -{ -#ifdef NS_DEBUG - printf("SimplePluginInstance::Print\n"); -#endif - - if (printInfo == NULL) - return NS_ERROR_FAILURE; - - if (printInfo->mode == nsPluginMode_Full) { - /* - * PLUGIN DEVELOPERS: - * If your plugin would like to take over - * printing completely when it is in full-screen mode, - * set printInfo->pluginPrinted to TRUE and print your - * plugin as you see fit. If your plugin wants Netscape - * to handle printing in this case, set - * printInfo->pluginPrinted to FALSE (the default) and - * do nothing. If you do want to handle printing - * yourself, printOne is true if the print button - * (as opposed to the print menu) was clicked. - * On the Macintosh, platformPrint is a THPrint; on - * Windows, platformPrint is a structure - * (defined in npapi.h) containing the printer name, port, - * etc. - */ - - /* Do the default*/ - printInfo->print.fullPrint.pluginPrinted = PR_FALSE; - } - else { /* If not fullscreen, we must be embedded */ - /* - * PLUGIN DEVELOPERS: - * If your plugin is embedded, or is full-screen - * but you returned false in pluginPrinted above, NPP_Print - * will be called with mode == nsPluginMode_Embedded. The nsPluginWindow - * in the printInfo gives the location and dimensions of - * the embedded plugin on the printed page. On the - * Macintosh, platformPrint is the printer port; on - * Windows, platformPrint is the handle to the printing - * device context. - */ - } - return NS_OK; -} - -/*+++++++++++++++++++++++++++++++++++++++++++++++++ - * NPP_HandleEvent: - * Mac-only, but stub must be present for Windows - * Delivers a platform-specific event to the instance. - * - * On the Macintosh, event is a pointer to a standard Macintosh EventRecord. - * All standard event types are passed to the instance as appropriate. In general, - * return TRUE if you handle the event and FALSE if you ignore the event. - +++++++++++++++++++++++++++++++++++++++++++++++++*/ - -NS_METHOD -SimplePluginInstance::HandleEvent(nsPluginEvent* event, PRBool* handled) -{ -#ifdef NS_DEBUG - printf("SimplePluginInstance::HandleEvent\n"); -#endif - - *handled = (PRBool)PlatformHandleEvent(event); - return NS_OK; -} - -NS_METHOD -SimplePluginInstance::GetValue(nsPluginInstanceVariable variable, void *value) -{ -#ifdef NS_DEBUG - printf("SimplePluginInstance::GetValue\n"); -#endif - - return NS_ERROR_FAILURE; -} - -//////////////////////////////////////////////////////////////////////////////// -// SimplePluginStreamListener Methods -//////////////////////////////////////////////////////////////////////////////// - -SimplePluginStreamListener::SimplePluginStreamListener(SimplePluginInstance* inst, - const char* msgName) - : fMessageName(msgName) -{ - char msg[256]; - sprintf(msg, "### Creating SimplePluginStreamListener for %s\n", fMessageName); -} - -SimplePluginStreamListener::~SimplePluginStreamListener(void) -{ - char msg[256]; - sprintf(msg, "### Destroying SimplePluginStreamListener for %s\n", fMessageName); -} - -// This macro produces a simple version of QueryInterface, AddRef and Release. -// See the nsISupports.h header file for details. - -NS_IMPL_ISUPPORTS1(SimplePluginStreamListener, nsIPluginStreamListener) - -NS_METHOD -SimplePluginStreamListener::OnStartBinding(nsIPluginStreamInfo* pluginInfo) -{ -#ifdef NS_DEBUG - printf("SimplePluginStreamListener::OnStartBinding\n"); -#endif - - char msg[256]; - sprintf(msg, "### Opening plugin stream for %s\n", fMessageName); - return NS_OK; -} - -NS_METHOD -SimplePluginStreamListener::OnDataAvailable(nsIPluginStreamInfo* pluginInfo, - nsIInputStream* input, - PRUint32 length) -{ -#ifdef NS_DEBUG - printf("SimplePluginStreamListener::OnDataAvailable\n"); -#endif - - char* buffer = new char[length]; - if (buffer) { - PRUint32 amountRead = 0; - nsresult rslt = input->Read(buffer, length, &amountRead); - if (rslt == NS_OK) { - char msg[256]; - sprintf(msg, "### Received %d bytes for %s\n", length, fMessageName); - } - delete buffer; - } - return NS_OK; -} - -NS_METHOD -SimplePluginStreamListener::OnFileAvailable(nsIPluginStreamInfo* pluginInfo, - const char* fileName) -{ -#ifdef NS_DEBUG - printf("SimplePluginStreamListener::OnFileAvailable\n"); -#endif - - char msg[256]; - sprintf(msg, "### File available for %s: %s\n", fMessageName, fileName); - return NS_OK; -} - -NS_METHOD -SimplePluginStreamListener::OnStopBinding(nsIPluginStreamInfo* pluginInfo, nsresult status ) -{ -#ifdef NS_DEBUG - printf("SimplePluginStreamListener::OnStopBinding\n"); -#endif - - char msg[256]; - sprintf(msg, "### Closing plugin stream for %s\n", fMessageName); - return NS_OK; -} - -NS_METHOD -SimplePluginStreamListener::OnNotify(const char* url, nsresult status) -{ -#ifdef NS_DEBUG - printf("SimplePluginStreamListener::OnNotify\n"); -#endif - - return NS_OK; -} - -NS_METHOD -SimplePluginStreamListener::GetStreamType(nsPluginStreamType *result) -{ -#ifdef NS_DEBUG - printf("SimplePluginStreamListener::GetStreamType\n"); -#endif - - *result = nsPluginStreamType_Normal; - return NS_OK; -} - -/******************************************************************************* - * SECTION 4 - Utility Method Implementations - *******************************************************************************/ - -/*------------------------------------------------------------------------------ - * Platform-Specific Implemenations - *------------------------------------------------------------------------------ - * UNIX Implementations - *----------------------------------------------------------------------------*/ - -#if defined(XP_UNIX) - -/*+++++++++++++++++++++++++++++++++++++++++++++++++ - * PlatformNew - * - * Initialize any Platform-Specific instance data. - +++++++++++++++++++++++++++++++++++++++++++++++++*/ - -void -SimplePluginInstance::PlatformNew(void) -{ - fPlatform.window = 0; -} - -/*+++++++++++++++++++++++++++++++++++++++++++++++++ - * PlatformDestroy - * - * Destroy any Platform-Specific instance data. - +++++++++++++++++++++++++++++++++++++++++++++++++*/ - -nsresult -SimplePluginInstance::PlatformDestroy(void) -{ - gtk_widget_destroy(fPlatform.moz_box); - fPlatform.moz_box = 0; - return NS_OK; -} - -/*+++++++++++++++++++++++++++++++++++++++++++++++++ - * PlatformSetWindow - * - * Perform platform-specific window operations - +++++++++++++++++++++++++++++++++++++++++++++++++*/ - -nsresult -SimplePluginInstance::PlatformSetWindow(nsPluginWindow* window) -{ -#ifdef NS_DEBUG - printf("SimplePluginInstance::PlatformSetWindow\n"); -#endif - - if (window == NULL || window->window == NULL) - return NS_ERROR_NULL_POINTER; - - GdkWindow *win = gdk_window_lookup((XID)window->window); - - if ( fPlatform.superwin && fPlatform.superwin->bin_window == win ) - return NS_OK; - - // should we destroy fPlatform.superwin ?? - - fPlatform.superwin = gdk_superwin_new(win, 0, 0, window->width, window->height); - - // a little cleanup - if (fPlatform.label) - gtk_widget_destroy(fPlatform.label); - if (fPlatform.moz_box) - gtk_widget_destroy(fPlatform.moz_box); - - // create a containing mozbox and a label to put in it - fPlatform.moz_box = gtk_mozbox_new(fPlatform.superwin->bin_window); - fPlatform.label = gtk_label_new(fText); - gtk_container_add(GTK_CONTAINER(fPlatform.moz_box), fPlatform.label); - - // grow the label to fit the entire mozbox - gtk_widget_set_usize(fPlatform.label, window->width, window->height); - - // connect to expose events - gtk_signal_connect (GTK_OBJECT(fPlatform.label), "expose_event", - GTK_SIGNAL_FUNC(draw), this); - - gtk_widget_show(fPlatform.label); - gtk_widget_show(fPlatform.moz_box); - - return NS_OK; -} - -/*+++++++++++++++++++++++++++++++++++++++++++++++++ - * PlatformHandleEvent - * - * Handle platform-specific events. - +++++++++++++++++++++++++++++++++++++++++++++++++*/ - -int16 -SimplePluginInstance::PlatformHandleEvent(nsPluginEvent* event) -{ - /* UNIX Plugins do not use HandleEvent */ - return 0; -} - -NS_IMETHODIMP -SimplePluginInstance::Repaint(void) -{ -#ifdef DEBUG - printf("SimplePluginInstance::Repaint()\n"); -#endif - - if ( !fPlatform.moz_box || !fPlatform.label ) - return NS_ERROR_FAILURE; - - // Set the label text - gtk_label_set_text(GTK_LABEL(fPlatform.label), fText); - - // show the new label - gtk_widget_show(fPlatform.label); - gtk_widget_show(fPlatform.moz_box); - - return NS_OK; -} - -gboolean draw (GtkWidget *widget, GdkEventExpose *event, gpointer data) -{ - SimplePluginInstance * pthis = (SimplePluginInstance *)data; - - pthis->Repaint(); - return TRUE; -} - -/*------------------------------------------------------------------------------ - * Windows Implementations - *----------------------------------------------------------------------------*/ - -#elif defined(XP_WIN) -const char* gInstanceLookupString = "instance->pdata"; - -/*+++++++++++++++++++++++++++++++++++++++++++++++++ - * PlatformNew - * - * Initialize any Platform-Specific instance data. - +++++++++++++++++++++++++++++++++++++++++++++++++*/ - -void -SimplePluginInstance::PlatformNew(void) -{ - fPlatform.fhWnd = NULL; - fPlatform.fDefaultWindowProc = NULL; -} - -/*+++++++++++++++++++++++++++++++++++++++++++++++++ - * PlatformDestroy - * - * Destroy any Platform-Specific instance data. - +++++++++++++++++++++++++++++++++++++++++++++++++*/ - -nsresult -SimplePluginInstance::PlatformDestroy(void) -{ - if( fWindow != NULL ) { /* If we have a window, clean - * it up. */ - SetWindowLong( fPlatform.fhWnd, GWL_WNDPROC, (LONG)fPlatform.fDefaultWindowProc); - fPlatform.fDefaultWindowProc = NULL; - fPlatform.fhWnd = NULL; - } - - return NS_OK; -} - -/*+++++++++++++++++++++++++++++++++++++++++++++++++ - * PlatformSetWindow - * - * Perform platform-specific window operations - +++++++++++++++++++++++++++++++++++++++++++++++++*/ - -nsresult -SimplePluginInstance::PlatformSetWindow(nsPluginWindow* window) -{ - if( fWindow != NULL ) /* If we already have a window, clean - * it up before trying to subclass - * the new window. */ - { - if( (window == NULL) || ( window->window == NULL ) ) { - /* There is now no window to use. get rid of the old - * one and exit. */ - SetWindowLong( fPlatform.fhWnd, GWL_WNDPROC, (LONG)fPlatform.fDefaultWindowProc); - fPlatform.fDefaultWindowProc = NULL; - fPlatform.fhWnd = NULL; - return NS_OK; - } - - else if ( fPlatform.fhWnd == (HWND) window->window ) { - /* The new window is the same as the old one. Exit now. */ - return NS_OK; - } - else { - /* Clean up the old window, so that we can subclass the new - * one later. */ - SetWindowLong( fPlatform.fhWnd, GWL_WNDPROC, (LONG)fPlatform.fDefaultWindowProc); - fPlatform.fDefaultWindowProc = NULL; - fPlatform.fhWnd = NULL; - } - } - else if( (window == NULL) || ( window->window == NULL ) ) { - /* We can just get out of here if there is no current - * window and there is no new window to use. */ - return NS_OK; - } - - /* At this point, we will subclass - * window->window so that we can begin drawing and - * receiving window messages. */ - fPlatform.fDefaultWindowProc = - (WNDPROC)SetWindowLong( (HWND)window->window, - GWL_WNDPROC, (LONG)SimplePluginInstance::PluginWindowProc); - fPlatform.fhWnd = (HWND) window->window; - SetProp(fPlatform.fhWnd, gInstanceLookupString, (HANDLE)this); - - InvalidateRect( fPlatform.fhWnd, NULL, TRUE ); - UpdateWindow( fPlatform.fhWnd ); - return NS_OK; -} - -/*+++++++++++++++++++++++++++++++++++++++++++++++++ - * PlatformHandleEvent - * - * Handle platform-specific events. - +++++++++++++++++++++++++++++++++++++++++++++++++*/ - -PRInt16 -SimplePluginInstance::PlatformHandleEvent(nsPluginEvent* event) -{ - /* Windows Plugins use the Windows event call-back mechanism - for events. (See PluginWindowProc) */ - return 0; -} - -/*+++++++++++++++++++++++++++++++++++++++++++++++++ - * PluginWindowProc - * - * Handle the Windows window-event loop. - +++++++++++++++++++++++++++++++++++++++++++++++++*/ - -LRESULT CALLBACK -SimplePluginInstance::PluginWindowProc( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) -{ - SimplePluginInstance* inst = (SimplePluginInstance*) GetProp(hWnd, gInstanceLookupString); - - switch( Msg ) { - case WM_PAINT: { - PAINTSTRUCT paintStruct; - HDC hdc; - - hdc = BeginPaint( hWnd, &paintStruct ); - - if(paintStruct.fErase) - FillRect(hdc, &paintStruct.rcPaint, - (HBRUSH) GetStockObject(WHITE_BRUSH)); - - if(inst->fText) { - RECT rcWnd; - GetWindowRect(hWnd, &rcWnd); - SetTextAlign(hdc, TA_CENTER); - TextOut(hdc, (rcWnd.right-rcWnd.left)/2, (rcWnd.bottom-rcWnd.top)/2, inst->fText, strlen(inst->fText)); - } - - EndPaint( hWnd, &paintStruct ); - break; - } - default: { - CallWindowProc(inst->fPlatform.fDefaultWindowProc, hWnd, Msg, wParam, lParam); - } - } - return 0; -} - - - -/*------------------------------------------------------------------------------ - * Macintosh Implementations - *----------------------------------------------------------------------------*/ - -#elif defined(XP_MAC) - -PRBool StartDraw(nsPluginWindow* window); -void EndDraw(nsPluginWindow* window); -void DoDraw(SimplePluginInstance* This); - -CGrafPort gSavePort; -CGrafPtr gOldPort; - -/*+++++++++++++++++++++++++++++++++++++++++++++++++ - * PlatformNew - * - * Initialize any Platform-Specific instance data. - +++++++++++++++++++++++++++++++++++++++++++++++++*/ - -void -SimplePluginInstance::PlatformNew(void) -{ -} - -/*+++++++++++++++++++++++++++++++++++++++++++++++++ - * PlatformDestroy - * - * Destroy any Platform-Specific instance data. - +++++++++++++++++++++++++++++++++++++++++++++++++*/ - -nsresult -SimplePluginInstance::PlatformDestroy(void) -{ - return NS_OK; -} - -/*+++++++++++++++++++++++++++++++++++++++++++++++++ - * PlatformSetWindow - * - * Perform platform-specific window operations - +++++++++++++++++++++++++++++++++++++++++++++++++*/ - -nsresult -SimplePluginInstance::PlatformSetWindow(nsPluginWindow* window) -{ - fWindow = window; - if( StartDraw( window ) ) { - DoDraw(This); - EndDraw( window ); - } - return NS_OK; -} - -/*+++++++++++++++++++++++++++++++++++++++++++++++++ - * PlatformHandleEvent - * - * Handle platform-specific events. - +++++++++++++++++++++++++++++++++++++++++++++++++*/ - -int16 -SimplePluginInstance::PlatformHandleEvent(nsPluginEvent* event) -{ - int16 eventHandled = FALSE; - - EventRecord* ev = (EventRecord*) event; - if (This != NULL && event != NULL) - { - switch (ev->what) - { - /* - * Draw ourselves on update events - */ - case updateEvt: - if( StartDraw( fWindow ) ) { - DoDraw(This); - EndDraw( fWindow ); - } - eventHandled = true; - break; - default: - break; - } - } - return eventHandled; -} - -/*+++++++++++++++++++++++++++++++++++++++++++++++++ - * StartDraw - +++++++++++++++++++++++++++++++++++++++++++++++++*/ - -PRBool -SimplePluginInstance::StartDraw(nsPluginWindow* window) -{ - NP_Port* port; - Rect clipRect; - RGBColor col; - - if (window == NULL) - return FALSE; - port = (NP_Port*) window->window; - if (window->clipRect.left < window->clipRect.right) - { - /* Preserve the old port */ - GetPort((GrafPtr*)&gOldPort); - SetPort((GrafPtr)port->port); - /* Preserve the old drawing environment */ - gSavePort.portRect = port->port->portRect; - gSavePort.txFont = port->port->txFont; - gSavePort.txFace = port->port->txFace; - gSavePort.txMode = port->port->txMode; - gSavePort.rgbFgColor = port->port->rgbFgColor; - gSavePort.rgbBkColor = port->port->rgbBkColor; - GetClip(gSavePort.clipRgn); - /* Setup our drawing environment */ - clipRect.top = window->clipRect.top + port->porty; - clipRect.left = window->clipRect.left + port->portx; - clipRect.bottom = window->clipRect.bottom + port->porty; - clipRect.right = window->clipRect.right + port->portx; - SetOrigin(port->portx,port->porty); - ClipRect(&clipRect); - clipRect.top = clipRect.left = 0; - TextSize(12); - TextFont(geneva); - TextMode(srcCopy); - col.red = col.green = col.blue = 0; - RGBForeColor(&col); - col.red = col.green = col.blue = 65000; - RGBBackColor(&col); - return TRUE; - } - else - return FALSE; -} - -/*+++++++++++++++++++++++++++++++++++++++++++++++++ - * EndDraw - +++++++++++++++++++++++++++++++++++++++++++++++++*/ - -void -SimplePluginInstance::EndDraw(nsPluginWindow* window) -{ - CGrafPtr myPort; - NP_Port* port = (NP_Port*) window->window; - SetOrigin(gSavePort.portRect.left, gSavePort.portRect.top); - SetClip(gSavePort.clipRgn); - GetPort((GrafPtr*)&myPort); - myPort->txFont = gSavePort.txFont; - myPort->txFace = gSavePort.txFace; - myPort->txMode = gSavePort.txMode; - RGBForeColor(&gSavePort.rgbFgColor); - RGBBackColor(&gSavePort.rgbBkColor); - SetPort((GrafPtr)gOldPort); -} - -/*+++++++++++++++++++++++++++++++++++++++++++++++++ - * DoDraw - +++++++++++++++++++++++++++++++++++++++++++++++++*/ - -void -SimplePluginInstance::DoDraw(void) -{ - Rect drawRect; - drawRect.top = 0; - drawRect.left = 0; - drawRect.bottom = drawRect.top + fWindow->height; - drawRect.right = drawRect.left + fWindow->width; - EraseRect( &drawRect ); - MoveTo( 2, 12 ); - DrawString("\pHello, World!"); -} - - - -/*------------------------------------------------------------------------------ - * Stub Implementations - *----------------------------------------------------------------------------*/ - -#else - -void -SimplePluginInstance::PlatformNew(void) -{ -} - -nsresult -SimplePluginInstance::PlatformDestroy(void) -{ - return NS_ERROR_NOT_IMPLEMENTED; -} - -nsresult -SimplePluginInstance::PlatformSetWindow(nsPluginWindow* window) -{ - return NS_ERROR_NOT_IMPLEMENTED; -} - -int16 -SimplePluginInstance::PlatformHandleEvent(nsPluginEvent* event) -{ - int16 eventHandled = FALSE; - return eventHandled; -} - -#endif /* end Section 5 */ - -/******************************************************************************/ diff --git a/modules/plugin/sdk/samples/simple/nsISimplePluginInstance.idl b/modules/plugin/sdk/samples/simple/nsISimplePluginInstance.idl deleted file mode 100644 index fba5c64204b5..000000000000 --- a/modules/plugin/sdk/samples/simple/nsISimplePluginInstance.idl +++ /dev/null @@ -1,50 +0,0 @@ -/* -*- 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) 1998 - * 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 ***** */ - -/** - * A sample interface to show calling the plugin from JavaScript via XPConnect. - * - */ - -#include "nsISupports.idl" - -[scriptable, uuid(fa8728f0-117a-11d4-8fa5-0010a4e73d9a)] -interface nsISimplePluginInstance : nsISupports -{ - attribute string text; -}; - diff --git a/modules/plugin/sdk/samples/simple/simpleCID.h b/modules/plugin/sdk/samples/simple/simpleCID.h deleted file mode 100644 index 488b68aadf32..000000000000 --- a/modules/plugin/sdk/samples/simple/simpleCID.h +++ /dev/null @@ -1,44 +0,0 @@ -/* -*- 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) 1998 - * 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 ***** */ - -#ifndef __SIMPLECID_H -#define __SIMPLECID_H - -// {312DA841-3DBF-11d3-BCFB-00A0C9C8D91D} -#define NS_SIMPLEPLUGIN_CID { 0x312da841, 0x3dbf, 0x11d3, { 0xbc, 0xfb, 0x0, 0xa0, 0xc9, 0xc8, 0xd9, 0x1d } } - -#endif diff --git a/modules/plugin/sdk/samples/simple/test.html b/modules/plugin/sdk/samples/simple/test.html deleted file mode 100644 index 1cd5ed43861d..000000000000 --- a/modules/plugin/sdk/samples/simple/test.html +++ /dev/null @@ -1,12 +0,0 @@ - - - Simple Test - - - -
-

Simple Test

- -
- - diff --git a/modules/plugin/sdk/samples/testevents/README.txt b/modules/plugin/sdk/samples/testevents/readme.txt similarity index 96% rename from modules/plugin/sdk/samples/testevents/README.txt rename to modules/plugin/sdk/samples/testevents/readme.txt index 27f9efb56fe7..d639dabd35a4 100644 --- a/modules/plugin/sdk/samples/testevents/README.txt +++ b/modules/plugin/sdk/samples/testevents/readme.txt @@ -1,5 +1,3 @@ -README for the plugin event sample. - INTENT: ------- The intent of this plugin is to demonstrate how to implement a @@ -46,4 +44,4 @@ PROBLEMS: MAC NOTES: ---------- -No Mac support at all. +No Mac support. diff --git a/modules/plugin/sdk/samples/unixprinting/readme.txt b/modules/plugin/sdk/samples/unixprinting/readme.txt new file mode 100644 index 000000000000..f1cafe947ab7 --- /dev/null +++ b/modules/plugin/sdk/samples/unixprinting/readme.txt @@ -0,0 +1,3 @@ +unixprinting plugin + +Sample plugin for plugin printing. diff --git a/modules/plugin/sdk/samples/winless/readme.txt b/modules/plugin/sdk/samples/winless/readme.txt new file mode 100644 index 000000000000..2093b88705eb --- /dev/null +++ b/modules/plugin/sdk/samples/winless/readme.txt @@ -0,0 +1,3 @@ +Winless Plugin + +This is a windowless plugin sample.