-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathWebP2P.cpp
81 lines (67 loc) · 2.08 KB
/
WebP2P.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/**
* This file is part of WebP2P.
*
* WebP2P is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WebP2P is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with WebP2P. If not, see <http://www.gnu.org/licenses/>.
*
* Filename: WebP2P.cpp
* Author(s): Dries Staelens (partly auto-generated by Firebreath)
* Copyright: Copyright (c) 2010 Dries Staelens
* Description: Implementation of the browser plug-in.
**/
/* Firebreath includes */
#include "NpapiTypes.h"
/* WebP2P includes */
#include "WebP2PAPI.hpp"
#include "WebP2P.hpp"
void WebP2P::StaticInitialize() {
}
void WebP2P::StaticDeinitialize() {
}
WebP2P::WebP2P() {
}
WebP2P::~WebP2P() {
}
void WebP2P::onPluginReady() {
}
FB::JSAPIPtr WebP2P::createJSAPI() {
// m_host is the BrowserHost
FB::DOM::WindowPtr window = m_host->getDOMWindow();
return FB::JSAPIPtr(
new WebP2PAPI(FB::ptr_cast<WebP2P>(shared_ptr()), m_host));
}
bool WebP2P::onMouseDown(FB::MouseDownEvent *evt, FB::PluginWindow *)
{
//printf("Mouse down at: %d, %d\n", evt->m_x, evt->m_y);
return false;
}
bool WebP2P::onMouseUp(FB::MouseUpEvent *evt, FB::PluginWindow *)
{
//printf("Mouse up at: %d, %d\n", evt->m_x, evt->m_y);
return false;
}
bool WebP2P::onMouseMove(FB::MouseMoveEvent *evt, FB::PluginWindow *)
{
//printf("Mouse move at: %d, %d\n", evt->m_x, evt->m_y);
return false;
}
bool WebP2P::onWindowAttached(FB::AttachedEvent *evt, FB::PluginWindow *)
{
// The window is attached; act appropriately
return false;
}
bool WebP2P::onWindowDetached(FB::DetachedEvent *evt, FB::PluginWindow *)
{
// The window is about to be detached; act appropriately
return false;
}