2 // Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 3 of the License, or
8 // (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 #ifndef GNASH_W32_PLUGIN_H
20 #define GNASH_W32_PLUGIN_H
23 #include "pluginbase.h"
36 #include "sound_handler.h"
38 #include "Renderer_agg.h"
39 #include "MovieClip.h"
40 #include "movie_definition.h"
41 #include "movie_root.h"
42 #include "SystemClock.h"
45 class nsPluginInstance
: public nsPluginInstanceBase
48 nsPluginInstance(nsPluginCreateData
*);
49 virtual ~nsPluginInstance();
51 // We are required to implement these three methods.
52 NPBool
init(NPWindow
* aWindow
);
54 NPBool
isInitialized(void) { return _initialized
; }
56 NPError
NewStream(NPMIMEType type
, NPStream
*stream
, NPBool seekable
,
58 NPError
DestroyStream(NPStream
*stream
, NPError reason
);
59 int32
Write(NPStream
*stream
, int32 offset
, int32 len
, void *buffer
);
62 typedef std::map
<std::string
, std::string
> VariableMap
;
63 const char* getVersion();
64 void threadMain(void);
66 HWND
getWindow() { return _window
; }
67 int getWidth() { return _width
; };
68 int getHeight() { return _height
; };
69 int getRowStride() { return _rowstride
; }
70 HDC
getMemDC() { return _hMemDC
; }
71 HBITMAP
getBitmap() { return _bmp
; }
72 unsigned char* getMemAddr() { return _memaddr
; }
73 size_t getMemSize() { return _rowstride
* _height
; }
74 void notify_mouse_state(int x
, int y
, int buttons
)
79 mouse_buttons
= buttons
;
92 VariableMap _flashVars
;
102 unsigned char* _memaddr
;
104 std::auto_ptr
<gnash::media::sound_handler
> _sound_handler
;
105 gnash::Renderer
* _Renderer
;
112 static void FSCommand_callback(gnash::MovieClip
* movie
, const std::string
& command
, const std::string
& args
);
115 #endif // __PLUGIN_H__