summaryrefslogtreecommitdiffstats
path: root/o3d
diff options
context:
space:
mode:
Diffstat (limited to 'o3d')
-rw-r--r--o3d/plugin/cross/main.cc17
-rw-r--r--o3d/plugin/linux/config.cc4
-rw-r--r--o3d/plugin/linux/main_linux.cc22
3 files changed, 28 insertions, 15 deletions
diff --git a/o3d/plugin/cross/main.cc b/o3d/plugin/cross/main.cc
index 23265e6..d6144ca 100644
--- a/o3d/plugin/cross/main.cc
+++ b/o3d/plugin/cross/main.cc
@@ -46,10 +46,6 @@ ExceptionManager *g_exception_manager = NULL;
namespace o3d {
-char *NP_GetMIMEDescription(void) {
- return O3D_PLUGIN_MIME_TYPE "::O3D MIME";
-}
-
NPError NP_GetValue(void *instance, NPPVariable variable, void *value) {
switch (variable) {
case NPPVpluginNameString:
@@ -172,4 +168,17 @@ NPError OSCALL NP_GetEntryPoints(NPPluginFuncs *pluginFuncs) {
return NPERR_NO_ERROR;
}
+
+char *NP_GetMIMEDescription(void) {
+ return O3D_PLUGIN_MIME_TYPE "::O3D MIME";
+}
+
} // namespace o3d / extern "C"
+
+#if !defined(O3D_INTERNAL_PLUGIN)
+extern "C" {
+NPError NP_GetValue(void *instance, NPPVariable variable, void *value) {
+ return o3d::NP_GetValue(instance, variable, value);
+}
+}
+#endif
diff --git a/o3d/plugin/linux/config.cc b/o3d/plugin/linux/config.cc
index ce1dca5..c45c24f 100644
--- a/o3d/plugin/linux/config.cc
+++ b/o3d/plugin/linux/config.cc
@@ -41,6 +41,8 @@
#include <iostream>
#include <fstream>
+namespace o3d {
+
// Checks OS version
bool CheckOSVersion(NPP npp) {
return true;
@@ -60,3 +62,5 @@ bool GetUserConfigMetrics() {
// TODO: Finish this function!
return true;
}
+
+} // namespace o3d
diff --git a/o3d/plugin/linux/main_linux.cc b/o3d/plugin/linux/main_linux.cc
index a0f1095..b897bb7 100644
--- a/o3d/plugin/linux/main_linux.cc
+++ b/o3d/plugin/linux/main_linux.cc
@@ -570,17 +570,6 @@ static gboolean GtkTimeoutCallback(gpointer user_data) {
return TRUE;
}
-NPError PlatformNPPGetValue(NPP instance, NPPVariable variable, void *value) {
- switch (variable) {
- case NPPVpluginNeedsXEmbed:
- *static_cast<NPBool *>(value) = g_xembed_support;
- return NPERR_NO_ERROR;
- default:
- return NPERR_INVALID_PARAM;
- }
- return NPERR_NO_ERROR;
-}
-
NPError InitializePlugin() {
if (!o3d::SetupOutOfMemoryHandler())
return NPERR_MODULE_LOAD_FAILED_ERROR;
@@ -647,6 +636,17 @@ NPError OSCALL NP_Shutdown(void) {
namespace o3d {
+NPError PlatformNPPGetValue(NPP instance, NPPVariable variable, void *value) {
+ switch (variable) {
+ case NPPVpluginNeedsXEmbed:
+ *static_cast<NPBool *>(value) = g_xembed_support;
+ return NPERR_NO_ERROR;
+ default:
+ return NPERR_INVALID_PARAM;
+ }
+ return NPERR_NO_ERROR;
+}
+
void RenderOnDemandCallbackHandler::Run() {
DrawPlugin(obj_);
}