changeset 5:6696b6295860 default tip

Decided to abandon this plugin, for now at least. See README for details.
author Atul Varma <varmaa@toolness.com>
date Wed, 30 Apr 2008 23:53:21 -0700
parents 9a9f30dde6c1
children
files README np_entry.cpp
diffstat 2 files changed, 20 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/README	Wed Apr 30 20:01:31 2008 -0700
+++ b/README	Wed Apr 30 23:53:21 2008 -0700
@@ -7,3 +7,12 @@
 following command line:
 
 /Developer/Tools/DeRez SimplePlugin.rsrc /System/Library/Frameworks/Carbon.framework/Headers/Carbon.r -useDF
+
+Found this technical note on plugins:
+
+  http://www.mozilla.org/projects/plugins/plugin_scripting_ABI_technote.html
+
+And after further finding out that the API is different on OS X than
+it is on Windows, I've decided that making an NPAPI plugin is too much
+of a hassle for now--its variance on different platforms, etc. may
+even be why Google Gears only uses NPAPI for Safari.
--- a/np_entry.cpp	Wed Apr 30 20:01:31 2008 -0700
+++ b/np_entry.cpp	Wed Apr 30 23:53:21 2008 -0700
@@ -88,6 +88,8 @@
   return NPP_GetMIMEDescription();
 }
 
+#include <stdio.h>
+
 NPError
 NP_GetValue(void* future, NPPVariable variable, void *value)
 {
@@ -188,3 +190,12 @@
 {
   return NPERR_NO_ERROR;
 }
+
+/* This function declaration taken from
+ * modules/plugin/samples/default/mac/npmac.cpp. */
+int main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs, NPP_ShutdownUPP* unloadUpp);
+
+DEFINE_API_C(int) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs, NPP_ShutdownUPP* unloadUpp)
+{
+    printf("In main().\n");
+}