Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/browser-plugin/scriptable.h
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marcopg@litl.com>2009-03-14 02:30:52 (GMT)
committer Marco Pesenti Gritti <marcopg@litl.com>2010-07-27 22:04:20 (GMT)
commit12676ee4975c899d086b3b17f9326cdf60fbfcc4 (patch)
tree7aa5a28c473b699b1e288abe62ee8b5eba8eeb66 /browser-plugin/scriptable.h
parent4ef6544ecca1803b48985882b1e0e769257b1c93 (diff)
Reformat to respect evince indentation style.
Diffstat (limited to 'browser-plugin/scriptable.h')
-rw-r--r--browser-plugin/scriptable.h165
1 files changed, 83 insertions, 82 deletions
diff --git a/browser-plugin/scriptable.h b/browser-plugin/scriptable.h
index 325cf50..1c0203d 100644
--- a/browser-plugin/scriptable.h
+++ b/browser-plugin/scriptable.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; c-indent-level: 8 -*- */
/* this file is part of evince, a gnome document viewer
*
* Copyright (C) 2009 litl, LLC
@@ -28,106 +29,106 @@ NPObject *AllocateConstructablePluginObject (NPP npp, NPClass *aClass);
class ScriptablePluginObjectBase : public NPObject
{
- public:
- ScriptablePluginObjectBase (NPP npp) : mNpp(npp)
- {
- }
-
- virtual ~ScriptablePluginObjectBase ()
- {
- }
-
- virtual void Invalidate ();
- virtual bool HasMethod (NPIdentifier name);
- virtual bool Invoke (NPIdentifier name, const NPVariant *args,
- uint32_t argCount, NPVariant *result);
- virtual bool InvokeDefault (const NPVariant *args, uint32_t argCount,
- NPVariant *result);
- virtual bool HasProperty (NPIdentifier name);
- virtual bool GetProperty (NPIdentifier name, NPVariant *result);
- virtual bool SetProperty (NPIdentifier name, const NPVariant *value);
- virtual bool RemoveProperty (NPIdentifier name);
- virtual bool Enumerate (NPIdentifier **identifier, uint32_t *count);
- virtual bool Construct (const NPVariant *args, uint32_t argCount,
- NPVariant *result);
-
- static void _Deallocate (NPObject *npobj);
- static void _Invalidate (NPObject *npobj);
- static bool _HasMethod (NPObject *npobj, NPIdentifier name);
- static bool _Invoke (NPObject *npobj, NPIdentifier name,
- const NPVariant *args, uint32_t argCount,
- NPVariant *result);
- static bool _InvokeDefault (NPObject *npobj, const NPVariant *args,
- uint32_t argCount, NPVariant *result);
- static bool _HasProperty (NPObject * npobj, NPIdentifier name);
- static bool _GetProperty (NPObject *npobj, NPIdentifier name,
- NPVariant *result);
- static bool _SetProperty (NPObject *npobj, NPIdentifier name,
- const NPVariant *value);
- static bool _RemoveProperty (NPObject *npobj, NPIdentifier name);
- static bool _Enumerate (NPObject *npobj, NPIdentifier **identifier,
- uint32_t *count);
- static bool _Construct (NPObject *npobj, const NPVariant *args,
- uint32_t argCount, NPVariant *result);
-
- protected:
- NPP mNpp;
+ public:
+ ScriptablePluginObjectBase (NPP npp) : mNpp(npp)
+ {
+ }
+
+ virtual ~ScriptablePluginObjectBase ()
+ {
+ }
+
+ virtual void Invalidate ();
+ virtual bool HasMethod (NPIdentifier name);
+ virtual bool Invoke (NPIdentifier name, const NPVariant *args,
+ uint32_t argCount, NPVariant *result);
+ virtual bool InvokeDefault (const NPVariant *args, uint32_t argCount,
+ NPVariant *result);
+ virtual bool HasProperty (NPIdentifier name);
+ virtual bool GetProperty (NPIdentifier name, NPVariant *result);
+ virtual bool SetProperty (NPIdentifier name, const NPVariant *value);
+ virtual bool RemoveProperty (NPIdentifier name);
+ virtual bool Enumerate (NPIdentifier **identifier, uint32_t *count);
+ virtual bool Construct (const NPVariant *args, uint32_t argCount,
+ NPVariant *result);
+
+ static void _Deallocate (NPObject *npobj);
+ static void _Invalidate (NPObject *npobj);
+ static bool _HasMethod (NPObject *npobj, NPIdentifier name);
+ static bool _Invoke (NPObject *npobj, NPIdentifier name,
+ const NPVariant *args, uint32_t argCount,
+ NPVariant *result);
+ static bool _InvokeDefault (NPObject *npobj, const NPVariant *args,
+ uint32_t argCount, NPVariant *result);
+ static bool _HasProperty (NPObject * npobj, NPIdentifier name);
+ static bool _GetProperty (NPObject *npobj, NPIdentifier name,
+ NPVariant *result);
+ static bool _SetProperty (NPObject *npobj, NPIdentifier name,
+ const NPVariant *value);
+ static bool _RemoveProperty (NPObject *npobj, NPIdentifier name);
+ static bool _Enumerate (NPObject *npobj, NPIdentifier **identifier,
+ uint32_t *count);
+ static bool _Construct (NPObject *npobj, const NPVariant *args,
+ uint32_t argCount, NPVariant *result);
+
+ protected:
+ NPP mNpp;
};
class ScriptablePluginObject : public ScriptablePluginObjectBase
{
- public:
- ScriptablePluginObject (NPP npp);
+ public:
+ ScriptablePluginObject (NPP npp);
- virtual bool HasMethod (NPIdentifier name);
- virtual bool HasProperty (NPIdentifier name);
- virtual bool GetProperty (NPIdentifier name, NPVariant *result);
- virtual bool Invoke (NPIdentifier name, const NPVariant *args,
- uint32_t argCount, NPVariant *result);
- virtual bool InvokeDefault (const NPVariant *args, uint32_t argCount,
- NPVariant *result);
-
- private:
- NPIdentifier mZoomInID;
- NPIdentifier mZoomOutID;
- NPIdentifier mFindPreviousID;
- NPIdentifier mFindNextID;
+ virtual bool HasMethod (NPIdentifier name);
+ virtual bool HasProperty (NPIdentifier name);
+ virtual bool GetProperty (NPIdentifier name, NPVariant *result);
+ virtual bool Invoke (NPIdentifier name, const NPVariant *args,
+ uint32_t argCount, NPVariant *result);
+ virtual bool InvokeDefault (const NPVariant *args, uint32_t argCount,
+ NPVariant *result);
+
+ private:
+ NPIdentifier mZoomInID;
+ NPIdentifier mZoomOutID;
+ NPIdentifier mFindPreviousID;
+ NPIdentifier mFindNextID;
};
class ConstructablePluginObject : public ScriptablePluginObjectBase
{
- public:
- ConstructablePluginObject (NPP npp) : ScriptablePluginObjectBase (npp)
- {
- }
+ public:
+ ConstructablePluginObject (NPP npp) : ScriptablePluginObjectBase (npp)
+ {
+ }
- virtual bool Construct (const NPVariant *args, uint32_t argCount,
- NPVariant *result);
+ virtual bool Construct (const NPVariant *args, uint32_t argCount,
+ NPVariant *result);
};
-#define DECLARE_NPOBJECT_CLASS_WITH_BASE(_class, ctor) \
-static NPClass s##_class##_NPClass = { \
- NP_CLASS_STRUCT_VERSION_CTOR, \
- ctor, \
- ScriptablePluginObjectBase::_Deallocate, \
- ScriptablePluginObjectBase::_Invalidate, \
- ScriptablePluginObjectBase::_HasMethod, \
- ScriptablePluginObjectBase::_Invoke, \
- ScriptablePluginObjectBase::_InvokeDefault, \
- ScriptablePluginObjectBase::_HasProperty, \
- ScriptablePluginObjectBase::_GetProperty, \
- ScriptablePluginObjectBase::_SetProperty, \
- ScriptablePluginObjectBase::_RemoveProperty, \
- ScriptablePluginObjectBase::_Enumerate, \
- ScriptablePluginObjectBase::_Construct \
+#define DECLARE_NPOBJECT_CLASS_WITH_BASE(_class, ctor) \
+static NPClass s##_class##_NPClass = { \
+ NP_CLASS_STRUCT_VERSION_CTOR, \
+ ctor, \
+ ScriptablePluginObjectBase::_Deallocate, \
+ ScriptablePluginObjectBase::_Invalidate, \
+ ScriptablePluginObjectBase::_HasMethod, \
+ ScriptablePluginObjectBase::_Invoke, \
+ ScriptablePluginObjectBase::_InvokeDefault, \
+ ScriptablePluginObjectBase::_HasProperty, \
+ ScriptablePluginObjectBase::_GetProperty, \
+ ScriptablePluginObjectBase::_SetProperty, \
+ ScriptablePluginObjectBase::_RemoveProperty, \
+ ScriptablePluginObjectBase::_Enumerate, \
+ ScriptablePluginObjectBase::_Construct \
}
#define GET_NPOBJECT_CLASS(_class) &s##_class##_NPClass
DECLARE_NPOBJECT_CLASS_WITH_BASE (ScriptablePluginObject,
- AllocateScriptablePluginObject);
+ AllocateScriptablePluginObject);
DECLARE_NPOBJECT_CLASS_WITH_BASE (ConstructablePluginObject,
- AllocateConstructablePluginObject);
+ AllocateConstructablePluginObject);
#endif // __SCRIPTABLE_PLUGIN_H__