Commit 4b619ef4 authored by Sergey Radionov's avatar Sergey Radionov Committed by Rafaël Carré

npapi: Changed files to be compilable by VC.

Signed-off-by: Rafaël Carré's avatarRafaël Carré <funman@videolan.org>
parent 2ba937ee
......@@ -1871,12 +1871,13 @@ LibvlcLogoNPObject::invoke(int index, const NPVariant *args,
return INVOKERESULT_NO_ERROR;
}
// MSVC++ doesn't support zero length arrays, so insert dummy "0"
const NPUTF8 * const LibvlcDeinterlaceNPObject::propertyNames[] = {
0
};
enum LibvlcDeinterlaceNPObjectPropertyIds {
};
COUNTNAMES(LibvlcDeinterlaceNPObject,propertyCount,propertyNames);
const int LibvlcDeinterlaceNPObject::propertyCount=0;
RuntimeNPObject::InvokeResult
LibvlcDeinterlaceNPObject::getProperty(int index, NPVariant &result)
......
......@@ -29,7 +29,11 @@
** support framework for runtime script objects
*/
#include <npapi.h>
//on windows, to avoid including <npapi.h>
//from Microsoft SDK (rather then from Mozilla SDK),
//#include it indirectly via <npfunctions.h>
#include <npfunctions.h>
#include <npruntime.h>
static void RuntimeNPClassDeallocate(NPObject *npobj);
......
......@@ -22,6 +22,10 @@
#ifndef POSITION_H
#define POSITION_H
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
struct posidx_s { const char *n; size_t i; };
static const posidx_s posidx[] = {
{ "center", 0 },
......
......@@ -34,13 +34,10 @@
#include "../vlcplugin.h"
#ifndef _NPAPI_H_
# include "npapi.h"
#endif
#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20)
#include "npupp.h"
#else
#include "npfunctions.h"
#include <npfunctions.h>
#endif
#include "../vlcshell.h"
......
......@@ -26,6 +26,10 @@
/*****************************************************************************
* Preamble
*****************************************************************************/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "vlcplugin.h"
#include "control/npolibvlc.h"
......@@ -443,7 +447,11 @@ void VlcPlugin::event_callback(const libvlc_event_t* event,
plugin->events.callback(event, npparams, npcount);
NPN_PluginThreadAsyncCall(plugin->getBrowser(), eventAsync, plugin);
#else
#ifdef _MSC_VER
#pragma message("NPN_PluginThreadAsyncCall not implemented yet.")
#else
#warning NPN_PluginThreadAsyncCall not implemented yet.
#endif //_MSC_VER
printf("No NPN_PluginThreadAsyncCall(), doing nothing.\n");
#endif
}
......
......@@ -29,6 +29,10 @@
#ifndef __VLCPLUGIN_H__
#define __VLCPLUGIN_H__
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <vlc/vlc.h>
// Setup XP_MACOSX, XP_UNIX, XP_WIN
......@@ -80,7 +84,11 @@
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
#include <npapi.h>
//on windows, to avoid including <npapi.h>
//from Microsoft SDK (rather then from Mozilla SDK),
//#include it indirectly via <npfunctions.h>
#include <npfunctions.h>
#include <vector>
#include <assert.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment