FireBreath  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Pages
NpapiPluginWin.h
1 /**********************************************************\
2 Original Author: Richard Bateman (taxilian)
3 
4 Created: Dec 3, 2009
5 License: Dual license model; choose one of two:
6  New BSD License
7  http://www.opensource.org/licenses/bsd-license.php
8  - or -
9  GNU Lesser General Public License, version 2.1
10  http://www.gnu.org/licenses/lgpl-2.1.html
11 
12 Copyright 2009 PacketPass, Inc and the Firebreath development team
13 \**********************************************************/
14 
15 #pragma once
16 #ifndef H_FB_NPAPI_NPAPIPLUGINWIN
17 #define H_FB_NPAPI_NPAPIPLUGINWIN
18 
19 #include "win_common.h"
20 #include "NpapiPlugin.h"
21 
22 namespace FB {
23  class PluginWindow;
24  class PluginWindowWin;
25  class PluginWindowlessWin;
26 
27  namespace Npapi {
28 
29  class NpapiPluginWin : public NpapiPlugin
30  {
31  public:
32  NpapiPluginWin(const NpapiBrowserHostPtr& host, const std::string& mimetype);
33  virtual ~NpapiPluginWin(void);
34  void init(NPMIMEType pluginType, int16_t argc, char* argn[], char *argv[]);
35 
36  protected:
37  void pluginWindowFactory(NPDrawingModel);
38 
39  boost::scoped_ptr<PluginWindow> pluginWin;
40  NPDrawingModel m_drawingModel;
41 
42  public:
43  void invalidateWindow(uint32_t left, uint32_t top, uint32_t right, uint32_t bottom);
44  // These calls are proxied from the NpapiPluginModule to this object, and are
45  // the NPP_ functions given to the browser; essentially, the entrypoints for the
46  // plugin instance
47  NPError SetWindow(NPWindow* window);
48  int16_t HandleEvent(void* event);
49  };
50 }; }; // FB::Npapi
51 
52 #endif
53