-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathScriptablePluginObject.h
More file actions
executable file
·35 lines (31 loc) · 1.03 KB
/
ScriptablePluginObject.h
File metadata and controls
executable file
·35 lines (31 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef _NPSPLUGINOBJ_H_
#define _NPSPLUGINOBJ_H_
#include "npapi.h"
#include "npruntime.h"
#include "ScriptablePluginObjectBase.h"
class ScriptablePluginObject : public ScriptablePluginObjectBase
{
public:
ScriptablePluginObject(NPP npp)
: ScriptablePluginObjectBase(npp)
{
mcreateinput_id=NPN_GetStringIdentifier("createInput");
}
NPIdentifier mcreateinput_id;
virtual bool HasMethod(NPIdentifier name);
virtual bool HasProperty(NPIdentifier name);
virtual bool GetProperty(NPIdentifier name, NPVariant *result);
virtual bool SetProperty(NPIdentifier name, const NPVariant *value);
virtual bool Invoke(NPIdentifier name, const NPVariant *args,
uint32_t argCount, NPVariant *result);
virtual bool InvokeDefault(const NPVariant *args, uint32_t argCount,
NPVariant *result);
};
static NPObject *
AllocateScriptablePluginObject(NPP npp, NPClass *aClass)
{
return new ScriptablePluginObject(npp);
}
DECLARE_NPOBJECT_CLASS_WITH_BASE(ScriptablePluginObject,
AllocateScriptablePluginObject);
#endif