FireBreath  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Pages
PluginWindowMacQD.h
1 /**********************************************************\
2 Original Author: Richard Bateman (taxilian)
3 
4 Created: Nov 24, 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 Richard Bateman, Firebreath development team
13 \**********************************************************/
14 
15 #ifndef H_PLUGINWINDOWMACQD
16 #define H_PLUGINWINDOWMACQD
17 
18 #include <Carbon/Carbon.h>
19 #include "PluginWindowMac.h"
20 
21 // When in 64 bit mode QuickDraw doesn't work, so the npapi headers set this flag.
22 // If the flag is set, we should not compile this class
23 #ifndef NP_NO_QUICKDRAW
24 
25 namespace FB
26 {
27  class PluginWindowMacQD : public PluginWindowMac
28  {
29  public:
30  PluginWindowMacQD();
31  virtual ~PluginWindowMacQD();
32 
33  NPError SetWindow(NPWindow* window);
34 
35  DrawingModel getDrawingModel() const { return DrawingModelQuickDraw; }
36  void* getDrawingPrimitive() const { return m_port.port; }
37  WindowRef getWindowRef() const { return m_window; }
38 
39  protected:
40  NP_Port m_port;
41  WindowRef m_window;
42  };
43 };
44 
45 #endif // NP_NO_QUICKDRAW
46 
47 #endif // H_PLUGINWINDOWMACQD