1
/* Totem Complex Plugin scriptable
1
/* Totem Complex plugin
3
* Copyright (C) 2004 Bastien Nocera <hadess@hadess.net>
4
* Copyright (C) 2002 David A. Schleef <ds@schleef.org>
3
* Copyright © 2004 Bastien Nocera <hadess@hadess.net>
4
* Copyright © 2002 David A. Schleef <ds@schleef.org>
5
* Copyright © 2006, 2007, 2008 Christian Persch
6
7
* This library is free software; you can redistribute it and/or
7
8
* modify it under the terms of the GNU Library General Public
16
17
* You should have received a copy of the GNU Library General Public
17
18
* License along with this library; if not, write to the
18
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19
* Boston, MA 02111-1307, USA.
21
* $Id: totemComplexPlugin.h 5132 2008-02-15 23:52:58Z hadess $
19
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20
* Boston, MA 02110-1301 USA.
24
#ifndef __COMPLEX_PLUGIN_H__
25
#define __COMPLEX_PLUGIN_H__
27
#include <nsIClassInfo.h>
29
#include "totemIComplexPlayer.h"
30
#include "totemPlugin.h"
32
class totemScriptablePlugin : public totemIComplexPlayer,
23
#ifndef __TOTEM_COMPLEX_PLAYER_H__
24
#define __TOTEM_COMPLEX_PLAYER_H__
26
#include "totemNPClass.h"
27
#include "totemNPObject.h"
29
class totemComplexPlugin : public totemNPObject
37
NS_DECL_TOTEMICOMPLEXPLAYER
40
void* operator new (size_t aSize) CPP_THROW_NEW;
42
totemScriptablePlugin (totemPlugin *aPlugin);
44
PRBool IsValid () { return mPlugin != nsnull; }
45
void SetPlugin (totemPlugin *aPlugin) { mPlugin = aPlugin; }
47
static char *PluginDescription ();
48
static char *PluginLongDescription();
49
static void PluginMimeTypes (const totemPluginMimeEntry **, PRUint32 *);
32
totemComplexPlugin (NPP);
33
virtual ~totemComplexPlugin ();
51
~totemScriptablePlugin ();
58
nsCString mBackgroundColour;
74
eErrorSeverity_Severe,
75
eErrorSeverity_Critical,
76
eErrorSeverity_General,
77
eErrorSeverity_Warning,
78
eErrorSeverity_Notice,
79
eErrorSeverity_Informational,
83
PRUint32 mPlayState : 3; /* PlayState enum values have to fit */
85
PRUint32 mAutoGoToURL : 1;
86
PRUint32 mAutoStart : 1;
87
PRUint32 mCentred : 1;
88
PRUint32 mConsoleEvents : 1;
89
PRUint32 mContextMenu : 1;
90
PRUint32 mDoubleSize : 1;
91
PRUint32 mFullscreen : 1;
92
PRUint32 mMessageBox : 1;
93
PRUint32 mOriginalSize : 1;
94
PRUint32 mImageStatus : 1;
96
PRUint32 mMaintainAspect : 1;
98
PRUint32 mNoLabels : 1;
100
PRUint32 mPrefetch : 1;
101
PRUint32 mShowAbout : 1;
102
PRUint32 mShowPrefs : 1;
103
PRUint32 mShowStats : 1;
104
PRUint32 mShuffle : 1;
105
PRUint32 mWantErrors : 1;
106
PRUint32 mWantKeyEvents : 1;
107
PRUint32 mWantMouseEvents : 1;
108
PRUint32 mZoomed : 1;
52
eGetBufferingTimeElapsed,
53
eGetBufferingTimeRemaining,
58
eGetConnectionBandwidth,
66
eGetEnableContextMenu,
69
eGetEnableOriginalSize,
77
eGetLastErrorMoreInfoURL,
79
eGetLastErrorSeverity,
80
eGetLastErrorUserCode,
81
eGetLastErrorUserString,
97
eGetPacketsOutOfOrder,
102
eGetPreferedLanguageID,
103
eGetPreferedLanguageString,
104
eGetPreferredLanguageID,
105
eGetPreferredLanguageString,
119
eGetWantKeyboardEvents,
134
eSetEnableContextMenu,
135
eSetEnableDoubleSize,
136
eSetEnableFullScreen,
137
eSetEnableOriginalSize,
156
eSetWantKeyboardEvents,
160
virtual bool InvokeByIndex (int aIndex, const NPVariant *argv, uint32_t argc, NPVariant *_result);
111
#endif /* __COMPLEX_PLUGIN_H__ */
163
TOTEM_DEFINE_NPCLASS (totemComplexPlugin);
165
#endif /* __TOTEM_COMPLEX_PLAYER_H__ */