summaryrefslogtreecommitdiff
path: root/Tests/CFBundleTest/np_macmain.cpp
diff options
context:
space:
mode:
authorRichard Bateman <taxilian@gmail.com>2010-10-06 20:43:04 -0600
committerDavid Cole <david.cole@kitware.com>2011-01-11 12:54:44 -0500
commit5457b8254cb43e002fe90b7c81ae65134ec12b24 (patch)
tree5eddb832a213487dd64cd8adb5c2ea88bb3d2baa /Tests/CFBundleTest/np_macmain.cpp
parent6754b26bf0bb69ad6d65249bf4122dbbda446922 (diff)
downloadcmake-5457b8254cb43e002fe90b7c81ae65134ec12b24.tar.gz
Add support for CFBundle targets on the Mac (#11295)
This commit enables building, for example, plugin bundles to be loaded by web browsers.
Diffstat (limited to 'Tests/CFBundleTest/np_macmain.cpp')
-rw-r--r--Tests/CFBundleTest/np_macmain.cpp49
1 files changed, 49 insertions, 0 deletions
diff --git a/Tests/CFBundleTest/np_macmain.cpp b/Tests/CFBundleTest/np_macmain.cpp
new file mode 100644
index 0000000000..78004d002c
--- /dev/null
+++ b/Tests/CFBundleTest/np_macmain.cpp
@@ -0,0 +1,49 @@
+/***********************************************************\
+ Written by: Richard Bateman (taxilian)
+
+ Based on the default np_macmain.cpp from FireBreath
+ http://firebreath.googlecode.com
+
+ This file has been stripped to prevent it from accidently
+ doing anything useful.
+\***********************************************************/
+
+
+#include <stdio.h>
+
+typedef void (*NPP_ShutdownProcPtr)(void);
+typedef short NPError;
+
+#pragma GCC visibility push(default)
+
+struct NPNetscapeFuncs;
+struct NPPluginFuncs;
+
+extern "C" {
+ NPError NP_Initialize(NPNetscapeFuncs *browserFuncs);
+ NPError NP_GetEntryPoints(NPPluginFuncs *pluginFuncs);
+ NPError NP_Shutdown(void);
+}
+
+#pragma GCC visibility pop
+
+void initPluginModule()
+{
+}
+
+NPError NP_GetEntryPoints(NPPluginFuncs* pFuncs)
+{
+ printf("NP_GetEntryPoints()\n");
+ return 0;
+}
+
+NPError NP_Initialize(NPNetscapeFuncs* pFuncs)
+{
+ printf("NP_Initialize()\n");
+ return 0;
+}
+
+NPError NP_Shutdown()
+{
+ return 0;
+}